@itcase/storybook-config 1.2.78 → 1.2.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/EmailTemplatePreview.js +1 -1
- package/dist/cjs/decorators/withFormSubmitDecorator.js +0 -1
- package/dist/cjs/decorators/withNextDecorator.js +1 -1
- package/dist/cjs/decorators/withUiDecorator.js +1 -1
- package/dist/cjs/decorators.js +1 -2
- package/dist/components/EmailTemplatePreview/index.d.ts +2 -0
- package/dist/components/EmailTemplatePreview/index.js +38 -0
- package/dist/components/EmailTemplatePreview.js +1 -1
- package/dist/components/FormSubmitWrapper/FormSubmitWrapper.d.ts +14 -0
- package/dist/components/FormSubmitWrapper/FormSubmitWrapper.js +84 -0
- package/dist/components/FormSubmitWrapper/autoSubmitForm.d.ts +2 -0
- package/dist/components/FormSubmitWrapper/autoSubmitForm.js +106 -0
- package/dist/components/FormSubmitWrapper/index.d.ts +2 -0
- package/dist/components/FormSubmitWrapper/index.js +2 -0
- package/dist/config/addons/addonThemes.d.ts +15 -0
- package/dist/config/addons/addonThemes.js +14 -15
- package/dist/config/addons/addonsNextJs.d.ts +2 -0
- package/dist/config/addons/addonsNextJs.js +8 -9
- package/dist/config/addons/addonsReactNative.d.ts +2 -0
- package/dist/config/addons/addonsReactNative.js +6 -7
- package/dist/config/addons/addonsReactNativeWeb.d.ts +2 -0
- package/dist/config/addons/addonsReactNativeWeb.js +2 -3
- package/dist/config/addons/addonsVite.d.ts +2 -0
- package/dist/config/addons/addonsVite.js +8 -9
- package/dist/config/addons/addonsWebpack.d.ts +18 -0
- package/dist/config/addons/addonsWebpack.js +26 -27
- package/dist/config/appearance/appearance.d.ts +1 -0
- package/dist/config/appearance/appearance.js +1 -1
- package/dist/config/backgrounds/backgrounds.d.ts +23 -0
- package/dist/config/backgrounds/backgrounds.js +22 -24
- package/dist/config/code/code.d.ts +8 -0
- package/dist/config/code/code.js +18 -22
- package/dist/config/config/mainConfigNextJsVite.d.ts +10 -0
- package/dist/config/config/mainConfigNextJsVite.js +35 -38
- package/dist/config/config/mainConfigReactNative.d.ts +9 -0
- package/dist/config/config/mainConfigReactNative.js +21 -23
- package/dist/config/config/mainConfigReactNativeWeb.d.ts +23 -0
- package/dist/config/config/mainConfigReactNativeWeb.js +42 -46
- package/dist/config/config/mainConfigVite.d.ts +9 -0
- package/dist/config/config/mainConfigVite.js +75 -80
- package/dist/config/config/mainConfigWebpack.d.ts +9 -0
- package/dist/config/config/mainConfigWebpack.js +39 -64
- package/dist/config/framework/frameworkNextJs.d.ts +4 -0
- package/dist/config/framework/frameworkNextJs.js +3 -4
- package/dist/config/framework/frameworkNextJsVite.d.ts +4 -0
- package/dist/config/framework/frameworkNextJsVite.js +3 -4
- package/dist/config/framework/frameworkReactNative.d.ts +4 -0
- package/dist/config/framework/frameworkReactNative.js +3 -4
- package/dist/config/framework/frameworkReactNativeWeb.d.ts +4 -0
- package/dist/config/framework/frameworkReactNativeWeb.js +3 -4
- package/dist/config/framework/frameworkVite.d.ts +4 -0
- package/dist/config/framework/frameworkVite.js +3 -4
- package/dist/config/framework/frameworkWebpack.d.ts +11 -0
- package/dist/config/framework/frameworkWebpack.js +9 -10
- package/dist/config/main/index.d.ts +26 -0
- package/dist/config/main/index.js +26 -53
- package/dist/config/msw/index.d.ts +2 -0
- package/dist/config/msw/index.js +2 -7
- package/dist/config/msw/mswHandlers.d.ts +5 -0
- package/dist/config/msw/mswHandlers.js +20 -24
- package/dist/config/ondevice/ondeviceBackgrounds.d.ts +8 -0
- package/dist/config/ondevice/ondeviceBackgrounds.js +8 -9
- package/dist/config/preview/index.d.ts +6 -0
- package/dist/config/preview/index.js +6 -13
- package/dist/config/refs/refs.d.ts +13 -0
- package/dist/config/refs/refs.js +12 -13
- package/dist/config/sourceLink/sourceLink.d.ts +35 -0
- package/dist/config/sourceLink/sourceLink.js +32 -36
- package/dist/config/static/staticDirsNextJs.d.ts +5 -0
- package/dist/config/static/staticDirsNextJs.js +5 -6
- package/dist/config/static/staticDirsReactNative.d.ts +2 -0
- package/dist/config/static/staticDirsReactNative.js +2 -3
- package/dist/config/static/staticDirsReactNativeWeb.d.ts +2 -0
- package/dist/config/static/staticDirsReactNativeWeb.js +2 -3
- package/dist/config/static/staticDirsVite.d.ts +5 -0
- package/dist/config/static/staticDirsVite.js +2 -3
- package/dist/config/static/staticDirsWebpack.d.ts +5 -0
- package/dist/config/static/staticDirsWebpack.js +2 -3
- package/dist/config/status/status.d.ts +21 -0
- package/dist/config/status/status.js +23 -24
- package/dist/config/users/authorization.d.ts +22 -0
- package/dist/config/users/authorization.js +6 -8
- package/dist/config/users/users.d.ts +18 -0
- package/dist/config/users/users.js +19 -21
- package/dist/config/viewport/viewport.d.ts +264 -0
- package/dist/config/viewport/viewport.js +23 -25
- package/dist/config/vite/getMediaProxyServerConfig.d.ts +13 -0
- package/dist/config/vite/getMediaProxyServerConfig.js +14 -16
- package/dist/decorators/index.d.ts +8 -0
- package/dist/decorators/index.js +8 -0
- package/dist/decorators/withClearStoresDecorator.d.ts +4 -0
- package/dist/decorators/withExtraProviders.d.ts +2 -0
- package/dist/decorators/withFigmaSourceLink.d.ts +5 -0
- package/dist/decorators/withFormSubmitDecorator.d.ts +2 -0
- package/dist/decorators/withFormSubmitDecorator.js +0 -1
- package/dist/decorators/withLayoutDecorator.d.ts +4 -0
- package/dist/decorators/withNextDecorator.d.ts +9 -0
- package/dist/decorators/withNextDecorator.js +1 -1
- package/dist/decorators/withUiDecorator.d.ts +5 -0
- package/dist/decorators/withUiDecorator.js +1 -1
- package/dist/decorators.js +1 -2
- package/dist/utils/getFigmaSourceLink.d.ts +2 -0
- package/dist/utils/getFigmaSourceLink.js +13 -14
- package/dist/utils/getStoryInfoBlocks.d.ts +2 -0
- package/dist/utils/getStoryInfoBlocks.js +45 -55
- package/dist/utils/handleMSWParameters.d.ts +8 -0
- package/dist/utils/handleMSWParameters.js +18 -27
- package/dist/utils/hasFormParameters.d.ts +2 -0
- package/dist/utils/hasFormParameters.js +6 -9
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.js +9 -17
- package/dist/utils/isVitestEnvironment.d.ts +2 -0
- package/dist/utils/isVitestEnvironment.js +2 -3
- package/dist/utils/storybookServerErrorOnSubmit.d.ts +2 -0
- package/dist/utils/storybookServerErrorOnSubmit.js +12 -19
- package/package.json +62 -55
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
const FRAMEWORK_WEBPACK = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
framework: {
|
|
3
|
+
name: '@storybook/react-webpack5',
|
|
4
|
+
options: {
|
|
5
|
+
builder: {
|
|
6
|
+
useSWC: true,
|
|
7
|
+
},
|
|
8
|
+
},
|
|
8
9
|
},
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { FRAMEWORK_WEBPACK }
|
|
10
|
+
};
|
|
11
|
+
export { FRAMEWORK_WEBPACK };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ADDONS_NEXTJS } from '../addons/addonsNextJs.js';
|
|
2
|
+
import { ADDONS_REACT_NATIVE } from '../addons/addonsReactNative.js';
|
|
3
|
+
import { ADDONS_REACT_NATIVE_WEB } from '../addons/addonsReactNativeWeb.js';
|
|
4
|
+
import { ADDONS_VITE } from '../addons/addonsVite.js';
|
|
5
|
+
import { ADDONS_WEBPACK } from '../addons/addonsWebpack.js';
|
|
6
|
+
import { CODE } from '../code/code.js';
|
|
7
|
+
import { MAIN_CONFIG_NEXTJS_VITE } from '../config/mainConfigNextJsVite.js';
|
|
8
|
+
import { MAIN_CONFIG_REACT_NATIVE } from '../config/mainConfigReactNative.js';
|
|
9
|
+
import { MAIN_CONFIG_REACT_NATIVE_WEB } from '../config/mainConfigReactNativeWeb.js';
|
|
10
|
+
import { MAIN_CONFIG_VITE } from '../config/mainConfigVite.js';
|
|
11
|
+
import { MAIN_CONFIG_WEBPACK } from '../config/mainConfigWebpack.js';
|
|
12
|
+
import { FRAMEWORK_NEXTJS } from '../framework/frameworkNextJs.js';
|
|
13
|
+
import { FRAMEWORK_NEXTJS_VITE } from '../framework/frameworkNextJsVite.js';
|
|
14
|
+
import { FRAMEWORK_REACT_NATIVE } from '../framework/frameworkReactNative.js';
|
|
15
|
+
import { FRAMEWORK_REACT_NATIVE_WEB } from '../framework/frameworkReactNativeWeb.js';
|
|
16
|
+
import { FRAMEWORK_VITE } from '../framework/frameworkVite.js';
|
|
17
|
+
import { FRAMEWORK_WEBPACK } from '../framework/frameworkWebpack.js';
|
|
18
|
+
import { REFS } from '../refs/refs.js';
|
|
19
|
+
import { STATIC_DIRS_NEXTJS } from '../static/staticDirsNextJs.js';
|
|
20
|
+
import { STATIC_DIRS_REACT_NATIVE } from '../static/staticDirsReactNative.js';
|
|
21
|
+
import { STATIC_DIRS_REACT_NATIVE_WEB } from '../static/staticDirsReactNativeWeb.js';
|
|
22
|
+
import { STATIC_DIRS_VITE } from '../static/staticDirsVite.js';
|
|
23
|
+
import { STATIC_DIRS_WEBPACK } from '../static/staticDirsWebpack.js';
|
|
24
|
+
import { STATUS } from '../status/status.js';
|
|
25
|
+
import { AUTHORIZATION } from '../users/authorization.js';
|
|
26
|
+
export { ADDONS_NEXTJS, ADDONS_REACT_NATIVE, ADDONS_REACT_NATIVE_WEB, ADDONS_VITE, ADDONS_WEBPACK, AUTHORIZATION, CODE, FRAMEWORK_NEXTJS, FRAMEWORK_NEXTJS_VITE, FRAMEWORK_REACT_NATIVE, FRAMEWORK_REACT_NATIVE_WEB, FRAMEWORK_VITE, FRAMEWORK_WEBPACK, MAIN_CONFIG_NEXTJS_VITE, MAIN_CONFIG_REACT_NATIVE, MAIN_CONFIG_REACT_NATIVE_WEB, MAIN_CONFIG_VITE, MAIN_CONFIG_WEBPACK, REFS, STATIC_DIRS_NEXTJS, STATIC_DIRS_REACT_NATIVE, STATIC_DIRS_REACT_NATIVE_WEB, STATIC_DIRS_VITE, STATIC_DIRS_WEBPACK, STATUS, };
|
|
@@ -1,53 +1,26 @@
|
|
|
1
|
-
import { ADDONS_NEXTJS } from '../addons/addonsNextJs.js'
|
|
2
|
-
import { ADDONS_REACT_NATIVE } from '../addons/addonsReactNative.js'
|
|
3
|
-
import { ADDONS_REACT_NATIVE_WEB } from '../addons/addonsReactNativeWeb.js'
|
|
4
|
-
import { ADDONS_VITE } from '../addons/addonsVite.js'
|
|
5
|
-
import { ADDONS_WEBPACK } from '../addons/addonsWebpack.js'
|
|
6
|
-
import { CODE } from '../code/code.js'
|
|
7
|
-
import { MAIN_CONFIG_NEXTJS_VITE } from '../config/mainConfigNextJsVite.js'
|
|
8
|
-
import { MAIN_CONFIG_REACT_NATIVE } from '../config/mainConfigReactNative.js'
|
|
9
|
-
import { MAIN_CONFIG_REACT_NATIVE_WEB } from '../config/mainConfigReactNativeWeb.js'
|
|
10
|
-
import { MAIN_CONFIG_VITE } from '../config/mainConfigVite.js'
|
|
11
|
-
import { MAIN_CONFIG_WEBPACK } from '../config/mainConfigWebpack.js'
|
|
12
|
-
import { FRAMEWORK_NEXTJS } from '../framework/frameworkNextJs.js'
|
|
13
|
-
import { FRAMEWORK_NEXTJS_VITE } from '../framework/frameworkNextJsVite.js'
|
|
14
|
-
import { FRAMEWORK_REACT_NATIVE } from '../framework/frameworkReactNative.js'
|
|
15
|
-
import { FRAMEWORK_REACT_NATIVE_WEB } from '../framework/frameworkReactNativeWeb.js'
|
|
16
|
-
import { FRAMEWORK_VITE } from '../framework/frameworkVite.js'
|
|
17
|
-
import { FRAMEWORK_WEBPACK } from '../framework/frameworkWebpack.js'
|
|
18
|
-
import { REFS } from '../refs/refs.js'
|
|
19
|
-
import { STATIC_DIRS_NEXTJS } from '../static/staticDirsNextJs.js'
|
|
20
|
-
import { STATIC_DIRS_REACT_NATIVE } from '../static/staticDirsReactNative.js'
|
|
21
|
-
import { STATIC_DIRS_REACT_NATIVE_WEB } from '../static/staticDirsReactNativeWeb.js'
|
|
22
|
-
import { STATIC_DIRS_VITE } from '../static/staticDirsVite.js'
|
|
23
|
-
import { STATIC_DIRS_WEBPACK } from '../static/staticDirsWebpack.js'
|
|
24
|
-
import { STATUS } from '../status/status.js'
|
|
25
|
-
import { AUTHORIZATION } from '../users/authorization.js'
|
|
26
|
-
|
|
27
|
-
export {
|
|
28
|
-
ADDONS_NEXTJS,
|
|
29
|
-
ADDONS_REACT_NATIVE,
|
|
30
|
-
ADDONS_REACT_NATIVE_WEB,
|
|
31
|
-
ADDONS_VITE,
|
|
32
|
-
ADDONS_WEBPACK,
|
|
33
|
-
AUTHORIZATION,
|
|
34
|
-
CODE,
|
|
35
|
-
FRAMEWORK_NEXTJS,
|
|
36
|
-
FRAMEWORK_NEXTJS_VITE,
|
|
37
|
-
FRAMEWORK_REACT_NATIVE,
|
|
38
|
-
FRAMEWORK_REACT_NATIVE_WEB,
|
|
39
|
-
FRAMEWORK_VITE,
|
|
40
|
-
FRAMEWORK_WEBPACK,
|
|
41
|
-
MAIN_CONFIG_NEXTJS_VITE,
|
|
42
|
-
MAIN_CONFIG_REACT_NATIVE,
|
|
43
|
-
MAIN_CONFIG_REACT_NATIVE_WEB,
|
|
44
|
-
MAIN_CONFIG_VITE,
|
|
45
|
-
MAIN_CONFIG_WEBPACK,
|
|
46
|
-
REFS,
|
|
47
|
-
STATIC_DIRS_NEXTJS,
|
|
48
|
-
STATIC_DIRS_REACT_NATIVE,
|
|
49
|
-
STATIC_DIRS_REACT_NATIVE_WEB,
|
|
50
|
-
STATIC_DIRS_VITE,
|
|
51
|
-
STATIC_DIRS_WEBPACK,
|
|
52
|
-
STATUS,
|
|
53
|
-
}
|
|
1
|
+
import { ADDONS_NEXTJS } from '../addons/addonsNextJs.js';
|
|
2
|
+
import { ADDONS_REACT_NATIVE } from '../addons/addonsReactNative.js';
|
|
3
|
+
import { ADDONS_REACT_NATIVE_WEB } from '../addons/addonsReactNativeWeb.js';
|
|
4
|
+
import { ADDONS_VITE } from '../addons/addonsVite.js';
|
|
5
|
+
import { ADDONS_WEBPACK } from '../addons/addonsWebpack.js';
|
|
6
|
+
import { CODE } from '../code/code.js';
|
|
7
|
+
import { MAIN_CONFIG_NEXTJS_VITE } from '../config/mainConfigNextJsVite.js';
|
|
8
|
+
import { MAIN_CONFIG_REACT_NATIVE } from '../config/mainConfigReactNative.js';
|
|
9
|
+
import { MAIN_CONFIG_REACT_NATIVE_WEB } from '../config/mainConfigReactNativeWeb.js';
|
|
10
|
+
import { MAIN_CONFIG_VITE } from '../config/mainConfigVite.js';
|
|
11
|
+
import { MAIN_CONFIG_WEBPACK } from '../config/mainConfigWebpack.js';
|
|
12
|
+
import { FRAMEWORK_NEXTJS } from '../framework/frameworkNextJs.js';
|
|
13
|
+
import { FRAMEWORK_NEXTJS_VITE } from '../framework/frameworkNextJsVite.js';
|
|
14
|
+
import { FRAMEWORK_REACT_NATIVE } from '../framework/frameworkReactNative.js';
|
|
15
|
+
import { FRAMEWORK_REACT_NATIVE_WEB } from '../framework/frameworkReactNativeWeb.js';
|
|
16
|
+
import { FRAMEWORK_VITE } from '../framework/frameworkVite.js';
|
|
17
|
+
import { FRAMEWORK_WEBPACK } from '../framework/frameworkWebpack.js';
|
|
18
|
+
import { REFS } from '../refs/refs.js';
|
|
19
|
+
import { STATIC_DIRS_NEXTJS } from '../static/staticDirsNextJs.js';
|
|
20
|
+
import { STATIC_DIRS_REACT_NATIVE } from '../static/staticDirsReactNative.js';
|
|
21
|
+
import { STATIC_DIRS_REACT_NATIVE_WEB } from '../static/staticDirsReactNativeWeb.js';
|
|
22
|
+
import { STATIC_DIRS_VITE } from '../static/staticDirsVite.js';
|
|
23
|
+
import { STATIC_DIRS_WEBPACK } from '../static/staticDirsWebpack.js';
|
|
24
|
+
import { STATUS } from '../status/status.js';
|
|
25
|
+
import { AUTHORIZATION } from '../users/authorization.js';
|
|
26
|
+
export { ADDONS_NEXTJS, ADDONS_REACT_NATIVE, ADDONS_REACT_NATIVE_WEB, ADDONS_VITE, ADDONS_WEBPACK, AUTHORIZATION, CODE, FRAMEWORK_NEXTJS, FRAMEWORK_NEXTJS_VITE, FRAMEWORK_REACT_NATIVE, FRAMEWORK_REACT_NATIVE_WEB, FRAMEWORK_VITE, FRAMEWORK_WEBPACK, MAIN_CONFIG_NEXTJS_VITE, MAIN_CONFIG_REACT_NATIVE, MAIN_CONFIG_REACT_NATIVE_WEB, MAIN_CONFIG_VITE, MAIN_CONFIG_WEBPACK, REFS, STATIC_DIRS_NEXTJS, STATIC_DIRS_REACT_NATIVE, STATIC_DIRS_REACT_NATIVE_WEB, STATIC_DIRS_VITE, STATIC_DIRS_WEBPACK, STATUS, };
|
package/dist/config/msw/index.js
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
serverErrorDataHandler,
|
|
4
|
-
serverErrorHandler,
|
|
5
|
-
} from './mswHandlers.js'
|
|
6
|
-
|
|
7
|
-
export { handleGetRequest, serverErrorDataHandler, serverErrorHandler }
|
|
1
|
+
import { handleGetRequest, serverErrorDataHandler, serverErrorHandler, } from './mswHandlers.js';
|
|
2
|
+
export { handleGetRequest, serverErrorDataHandler, serverErrorHandler };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HttpHandler, JsonBodyType } from 'msw';
|
|
2
|
+
declare function serverErrorHandler(errors: JsonBodyType): HttpHandler;
|
|
3
|
+
declare function serverErrorDataHandler(message: JsonBodyType): HttpHandler;
|
|
4
|
+
declare function handleGetRequest(url: string, data: JsonBodyType, status?: number): HttpHandler;
|
|
5
|
+
export { handleGetRequest, serverErrorDataHandler, serverErrorHandler };
|
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
import { http, HttpResponse, passthrough } from 'msw'
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
})
|
|
1
|
+
import { http, HttpResponse, passthrough } from 'msw';
|
|
2
|
+
function serverErrorHandler(errors) {
|
|
3
|
+
return http.all('*', ({ request }) => {
|
|
4
|
+
if (request.method === 'GET') {
|
|
5
|
+
return passthrough();
|
|
6
|
+
}
|
|
7
|
+
return HttpResponse.json(errors, { status: 400 });
|
|
8
|
+
});
|
|
10
9
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
})
|
|
10
|
+
function serverErrorDataHandler(message) {
|
|
11
|
+
return http.all('*', ({ request }) => {
|
|
12
|
+
if (request.method === 'GET') {
|
|
13
|
+
return passthrough();
|
|
14
|
+
}
|
|
15
|
+
return HttpResponse.json({ non_field_errors: message }, { status: 400 });
|
|
16
|
+
});
|
|
19
17
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
})
|
|
18
|
+
function handleGetRequest(url, data, status) {
|
|
19
|
+
return http.get(url, () => {
|
|
20
|
+
return HttpResponse.json(data, { status });
|
|
21
|
+
});
|
|
25
22
|
}
|
|
26
|
-
|
|
27
|
-
export { handleGetRequest, serverErrorDataHandler, serverErrorHandler }
|
|
23
|
+
export { handleGetRequest, serverErrorDataHandler, serverErrorHandler };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
const ONDEVICE_BACKGROUNDS = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { ONDEVICE_BACKGROUNDS }
|
|
2
|
+
default: 'plain',
|
|
3
|
+
values: [
|
|
4
|
+
{ name: 'plain', value: 'white' },
|
|
5
|
+
{ name: 'warm', value: 'hotpink' },
|
|
6
|
+
{ name: 'cool', value: 'deepskyblue' },
|
|
7
|
+
],
|
|
8
|
+
};
|
|
9
|
+
export { ONDEVICE_BACKGROUNDS };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ADDON_THEMES } from '../addons/addonThemes.js';
|
|
2
|
+
import { BACKGROUNDS } from '../backgrounds/backgrounds.js';
|
|
3
|
+
import { ONDEVICE_BACKGROUNDS } from '../ondevice/ondeviceBackgrounds.js';
|
|
4
|
+
import { SOURCE_LINK } from '../sourceLink/sourceLink.js';
|
|
5
|
+
import { VIEWPORTS } from '../viewport/viewport.js';
|
|
6
|
+
export { ADDON_THEMES, BACKGROUNDS, ONDEVICE_BACKGROUNDS, SOURCE_LINK, VIEWPORTS, };
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import { ADDON_THEMES } from '../addons/addonThemes.js'
|
|
2
|
-
import { BACKGROUNDS } from '../backgrounds/backgrounds.js'
|
|
3
|
-
import { ONDEVICE_BACKGROUNDS } from '../ondevice/ondeviceBackgrounds.js'
|
|
4
|
-
import { SOURCE_LINK } from '../sourceLink/sourceLink.js'
|
|
5
|
-
import { VIEWPORTS } from '../viewport/viewport.js'
|
|
6
|
-
|
|
7
|
-
export {
|
|
8
|
-
ADDON_THEMES,
|
|
9
|
-
BACKGROUNDS,
|
|
10
|
-
ONDEVICE_BACKGROUNDS,
|
|
11
|
-
SOURCE_LINK,
|
|
12
|
-
VIEWPORTS,
|
|
13
|
-
}
|
|
1
|
+
import { ADDON_THEMES } from '../addons/addonThemes.js';
|
|
2
|
+
import { BACKGROUNDS } from '../backgrounds/backgrounds.js';
|
|
3
|
+
import { ONDEVICE_BACKGROUNDS } from '../ondevice/ondeviceBackgrounds.js';
|
|
4
|
+
import { SOURCE_LINK } from '../sourceLink/sourceLink.js';
|
|
5
|
+
import { VIEWPORTS } from '../viewport/viewport.js';
|
|
6
|
+
export { ADDON_THEMES, BACKGROUNDS, ONDEVICE_BACKGROUNDS, SOURCE_LINK, VIEWPORTS, };
|
package/dist/config/refs/refs.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
const REFS = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export { REFS }
|
|
2
|
+
'itcase-storybook': {
|
|
3
|
+
title: 'Introduction',
|
|
4
|
+
url: 'https://itcase.pro/storybook/',
|
|
5
|
+
expanded: false,
|
|
6
|
+
},
|
|
7
|
+
'itcase-ui': {
|
|
8
|
+
title: 'ITCase UI',
|
|
9
|
+
url: 'https://itcase.pro/ui/',
|
|
10
|
+
expanded: false,
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
export { REFS };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
declare const SOURCE_LINK: {
|
|
2
|
+
links: {
|
|
3
|
+
before: {
|
|
4
|
+
href: string;
|
|
5
|
+
icon: string;
|
|
6
|
+
label: string;
|
|
7
|
+
order: number;
|
|
8
|
+
};
|
|
9
|
+
'component-editor': ({ importPath, rootPath }: {
|
|
10
|
+
importPath: any;
|
|
11
|
+
rootPath: any;
|
|
12
|
+
}) => {
|
|
13
|
+
type: string;
|
|
14
|
+
label: string;
|
|
15
|
+
href: string;
|
|
16
|
+
icon: string;
|
|
17
|
+
};
|
|
18
|
+
'story-editor': ({ importPath, rootPath }: {
|
|
19
|
+
importPath: any;
|
|
20
|
+
rootPath: any;
|
|
21
|
+
}) => {
|
|
22
|
+
type: string;
|
|
23
|
+
label: string;
|
|
24
|
+
href: string;
|
|
25
|
+
icon: string;
|
|
26
|
+
};
|
|
27
|
+
'addon-powered-by': {
|
|
28
|
+
label: string;
|
|
29
|
+
href: string;
|
|
30
|
+
icon: string;
|
|
31
|
+
order: number;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export { SOURCE_LINK };
|
|
@@ -1,39 +1,35 @@
|
|
|
1
1
|
/* eslint-disable perfectionist/sort-objects */
|
|
2
|
-
import { getFileUrl } from 'storybook-addon-source-link'
|
|
3
|
-
|
|
2
|
+
import { getFileUrl } from 'storybook-addon-source-link';
|
|
4
3
|
const SOURCE_LINK = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
4
|
+
links: {
|
|
5
|
+
before: { href: '', icon: '', label: '', order: 0 },
|
|
6
|
+
'component-editor': ({ importPath, rootPath }) => {
|
|
7
|
+
if (!rootPath)
|
|
8
|
+
return undefined;
|
|
9
|
+
const storiesFolderIndex = importPath.indexOf('/stories/');
|
|
10
|
+
const componentPath = storiesFolderIndex !== -1
|
|
11
|
+
? `${importPath.slice(0, storiesFolderIndex)}/index.ts`
|
|
12
|
+
: importPath.replace(/\.stories\.(js|jsx|mjs|ts|tsx)$/, '.$1');
|
|
13
|
+
const fileUrl = getFileUrl(rootPath, componentPath);
|
|
14
|
+
return {
|
|
15
|
+
type: 'editor',
|
|
16
|
+
label: 'VSCode — ' + componentPath,
|
|
17
|
+
href: fileUrl.href,
|
|
18
|
+
icon: 'VSCodeIcon',
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
'story-editor': ({ importPath, rootPath }) => {
|
|
22
|
+
if (!rootPath)
|
|
23
|
+
return undefined;
|
|
24
|
+
const fileUrl = getFileUrl(rootPath, importPath);
|
|
25
|
+
return {
|
|
26
|
+
type: 'editor',
|
|
27
|
+
label: 'Story — ' + importPath.replace(/\.(js|jsx|tsx|tsx)?$/, ''),
|
|
28
|
+
href: fileUrl.href,
|
|
29
|
+
icon: 'StorybookIcon',
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
'addon-powered-by': { label: '', href: '', icon: '', order: 1000 },
|
|
24
33
|
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const fileUrl = getFileUrl(rootPath, importPath)
|
|
28
|
-
return {
|
|
29
|
-
type: 'editor',
|
|
30
|
-
label: 'Story — ' + importPath.replace(/\.(js|jsx|tsx|tsx)?$/, ''),
|
|
31
|
-
href: fileUrl.href,
|
|
32
|
-
icon: 'StorybookIcon',
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
'addon-powered-by': { label: '', href: '', icon: '', order: 1000 },
|
|
36
|
-
},
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export { SOURCE_LINK }
|
|
34
|
+
};
|
|
35
|
+
export { SOURCE_LINK };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
const STATIC_DIRS_NEXTJS = [
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
]
|
|
6
|
-
|
|
7
|
-
export { STATIC_DIRS_NEXTJS }
|
|
2
|
+
{ from: '../public', to: '/' },
|
|
3
|
+
{ from: '../src/appearance/', to: 'src/appearance/' },
|
|
4
|
+
{ from: '../public/img', to: 'img/' },
|
|
5
|
+
];
|
|
6
|
+
export { STATIC_DIRS_NEXTJS };
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
const STATIC_DIRS_REACT_NATIVE = []
|
|
2
|
-
|
|
3
|
-
export { STATIC_DIRS_REACT_NATIVE }
|
|
1
|
+
const STATIC_DIRS_REACT_NATIVE = [];
|
|
2
|
+
export { STATIC_DIRS_REACT_NATIVE };
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
const STATIC_DIRS_REACT_NATIVE_WEB = []
|
|
2
|
-
|
|
3
|
-
export { STATIC_DIRS_REACT_NATIVE_WEB }
|
|
1
|
+
const STATIC_DIRS_REACT_NATIVE_WEB = [];
|
|
2
|
+
export { STATIC_DIRS_REACT_NATIVE_WEB };
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
const STATIC_DIRS_VITE = [{ from: '../public', to: '/' }]
|
|
2
|
-
|
|
3
|
-
export { STATIC_DIRS_VITE }
|
|
1
|
+
const STATIC_DIRS_VITE = [{ from: '../public', to: '/' }];
|
|
2
|
+
export { STATIC_DIRS_VITE };
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
const STATIC_DIRS_WEBPACK = [{ from: '../public', to: '/' }]
|
|
2
|
-
|
|
3
|
-
export { STATIC_DIRS_WEBPACK }
|
|
1
|
+
const STATIC_DIRS_WEBPACK = [{ from: '../public', to: '/' }];
|
|
2
|
+
export { STATIC_DIRS_WEBPACK };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const STATUS: {
|
|
2
|
+
type: string;
|
|
3
|
+
statuses: {
|
|
4
|
+
emailDevelopServer: {
|
|
5
|
+
description: string;
|
|
6
|
+
color: string;
|
|
7
|
+
background: string;
|
|
8
|
+
};
|
|
9
|
+
emailRemoteServer: {
|
|
10
|
+
description: string;
|
|
11
|
+
color: string;
|
|
12
|
+
background: string;
|
|
13
|
+
};
|
|
14
|
+
emailServerUrlNotSet: {
|
|
15
|
+
description: string;
|
|
16
|
+
color: string;
|
|
17
|
+
background: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export { STATUS };
|
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
const STATUS = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
type: !process.env.EMAIL_URL
|
|
3
|
+
? 'emailServerUrlNotSet'
|
|
4
|
+
: process.env.EMAIL_URL.includes('http://')
|
|
5
|
+
? 'emailDevelopServer'
|
|
6
|
+
: 'emailRemoteServer',
|
|
7
|
+
statuses: {
|
|
8
|
+
emailDevelopServer: {
|
|
9
|
+
description: 'Story use template from local django-server',
|
|
10
|
+
color: '#ffffff',
|
|
11
|
+
background: 'red',
|
|
12
|
+
},
|
|
13
|
+
emailRemoteServer: {
|
|
14
|
+
description: 'Story use template from remote server',
|
|
15
|
+
color: '#ffffff',
|
|
16
|
+
background: 'green',
|
|
17
|
+
},
|
|
18
|
+
emailServerUrlNotSet: {
|
|
19
|
+
description: 'Please set EMAIL_URL in .env.local',
|
|
20
|
+
color: '#ffffff',
|
|
21
|
+
background: 'red',
|
|
22
|
+
},
|
|
12
23
|
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
color: '#ffffff',
|
|
16
|
-
background: 'green',
|
|
17
|
-
},
|
|
18
|
-
emailServerUrlNotSet: {
|
|
19
|
-
description: 'Please set EMAIL_URL in .env.local',
|
|
20
|
-
color: '#ffffff',
|
|
21
|
-
background: 'red',
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export { STATUS }
|
|
24
|
+
};
|
|
25
|
+
export { STATUS };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare const AUTHORIZATION: {
|
|
2
|
+
profileUrl: string;
|
|
3
|
+
signInUrl: string;
|
|
4
|
+
values: {
|
|
5
|
+
admin: {
|
|
6
|
+
name: string;
|
|
7
|
+
color: string;
|
|
8
|
+
token: string;
|
|
9
|
+
};
|
|
10
|
+
manager: {
|
|
11
|
+
name: string;
|
|
12
|
+
color: string;
|
|
13
|
+
token: string;
|
|
14
|
+
};
|
|
15
|
+
user: {
|
|
16
|
+
name: string;
|
|
17
|
+
color: string;
|
|
18
|
+
token: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export { AUTHORIZATION };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { USERS } from './users.js'
|
|
2
|
-
|
|
1
|
+
import { USERS } from './users.js';
|
|
3
2
|
const AUTHORIZATION = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export { AUTHORIZATION }
|
|
3
|
+
profileUrl: `${process.env.REST_BASE_URL}/rest/profile/`,
|
|
4
|
+
signInUrl: `${process.env.REST_BASE_URL}/rest/sign-in/`,
|
|
5
|
+
values: USERS,
|
|
6
|
+
};
|
|
7
|
+
export { AUTHORIZATION };
|