Skip to content

Commit ee64800

Browse files
authored
BN-30 | Add. Patient Display Control (#4)
* BN-35 | Add. Local Proxy Configuration * BN-35 | Add. Axios Package * BN-35 | Add. Basic Axios Interceptor Implementation * BN-44 | Add. Global Notification Service * BN-38 | Add. API Interceptors For Get, Post, Put, Delete * BN-30 | Add. Patient Header Basic Impl * BN-35 | Fix. Remove Duplicate Dev Guide * BN-44 | Add. ARIA Attributes For Accessibility * BN-44 | Fix. Notification Deduplication Logic * BN-44 | Fix. Ineffective clearAllNotifications Invocation * BN-44 | Add. Developer Docs For Notification * BN-44 | Add. Storybook Support * BN-44 | Add. NotificationContainer Storybook * BN-44 | Add. Storybook Steps To Setup Guide * BN-30 | Add. Age Calculation Logic * BN-35 | Add. Setup Guide * BN-38 | Add. Authentication Logic * BN-30 | Add. Logic To Retrieve Patient UUID From URL * BN-30 | Add. Identifier Formatting Logic * BN-30 | Fix. Use Patient UUID From URL * BN-30 | Fix. Add Date Mocks To Unit Tests * BN-30 | Add. Support For Address Extensions * BN-30 | Add. Husky Pre Commit Hook * BN-30 | Fix. Lint Issues * BN-30 | Add. Test Coverage Threshold * BN-44 | Add. Error Formatter Util * BN-30 | Refactor. Handle Errors With Skeleton Loader * BN-30 | Fix. Incorrect Service Worker Definition * BN-30 | Add. DocBlocks For Patient Service * BN-30 | Fix. Lint Issue * BN-30 | Fix. Move Test Run To Husky * BN-30 | Add. Tests For Base Files * BN-30 | Refactor. Export Notification Types From Same File * BN-30 | Fix. Remove Unused HostURL Definition * BN-30 | Refactor. Make Fhir Types As Readonly
1 parent f32affd commit ee64800

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+8217
-316
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,5 @@ storybook-static
6767

6868
# Bundle analyzer
6969
stats.html
70+
71+
*storybook.log

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#!/bin/sh
22

33
npx lint-staged
4+
yarn test

.storybook/main.ts

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import type { StorybookConfig } from '@storybook/react-webpack5';
2+
import path from 'path';
3+
4+
const config: StorybookConfig = {
5+
"stories": [
6+
"../src/**/*.mdx",
7+
"../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"
8+
],
9+
"addons": [
10+
"@storybook/addon-webpack5-compiler-swc",
11+
"@storybook/addon-essentials",
12+
"@storybook/addon-onboarding",
13+
"@chromatic-com/storybook",
14+
"@storybook/addon-interactions"
15+
],
16+
"framework": {
17+
"name": "@storybook/react-webpack5",
18+
"options": {}
19+
},
20+
"staticDirs": ['../public'],
21+
webpackFinal: async (config) => {
22+
// Add SCSS support
23+
if (config.module && config.module.rules) {
24+
config.module.rules.push({
25+
test: /\.scss$/,
26+
use: [
27+
'style-loader',
28+
'css-loader',
29+
{
30+
loader: 'sass-loader',
31+
options: {
32+
sassOptions: {
33+
includePaths: [path.resolve(__dirname, '../node_modules')],
34+
},
35+
},
36+
}
37+
],
38+
include: path.resolve(__dirname, '../'),
39+
});
40+
}
41+
42+
// Add path aliases
43+
if (config.resolve) {
44+
config.resolve.alias = {
45+
...config.resolve.alias,
46+
'@': path.resolve(__dirname, '../src'),
47+
'@components': path.resolve(__dirname, '../src/components'),
48+
'@contexts': path.resolve(__dirname, '../src/contexts'),
49+
'@constants': path.resolve(__dirname, '../src/constants'),
50+
'@hooks': path.resolve(__dirname, '../src/hooks'),
51+
'@providers': path.resolve(__dirname, '../src/providers'),
52+
'@services': path.resolve(__dirname, '../src/services'),
53+
'@types': path.resolve(__dirname, '../src/types'),
54+
'@utils': path.resolve(__dirname, '../src/utils'),
55+
};
56+
}
57+
58+
return config;
59+
}
60+
};
61+
export default config;

.storybook/preview.tsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import React from 'react';
2+
import type { Preview } from '@storybook/react';
3+
import { Theme } from '@carbon/react';
4+
import '../src/styles/index.scss';
5+
6+
const preview: Preview = {
7+
decorators: [
8+
(Story) => (
9+
<Theme theme="white">
10+
<Story />
11+
</Theme>
12+
),
13+
],
14+
parameters: {
15+
controls: {
16+
matchers: {
17+
color: /(background|color)$/i,
18+
date: /Date$/i,
19+
},
20+
},
21+
},
22+
};
23+
24+
export default preview;

0 commit comments

Comments
 (0)