@admin-layout/client 3.1.1-alpha.10 → 3.2.1-alpha.0
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/lib/colors/presets/black.js +2 -2
- package/lib/colors/presets/black.js.map +1 -0
- package/lib/colors/presets/blue.js +2 -2
- package/lib/colors/presets/blue.js.map +1 -0
- package/lib/colors/presets/green.js +2 -2
- package/lib/colors/presets/green.js.map +1 -0
- package/lib/colors/presets/orange.js +2 -2
- package/lib/colors/presets/orange.js.map +1 -0
- package/lib/colors/presets/red.js +2 -2
- package/lib/colors/presets/red.js.map +1 -0
- package/lib/colors/presets/white.js +2 -2
- package/lib/colors/presets/white.js.map +1 -0
- package/lib/colors/presets/yellow.js +2 -2
- package/lib/colors/presets/yellow.js.map +1 -0
- package/lib/components/ApplicationErrorFillWrapper.js +2 -5
- package/lib/components/ApplicationErrorFillWrapper.js.map +1 -0
- package/lib/components/ApplicationErrorHandlerCommon.js +8 -14
- package/lib/components/ApplicationErrorHandlerCommon.js.map +1 -0
- package/lib/components/ErrorBoundaryCommon.js +3 -5
- package/lib/components/ErrorBoundaryCommon.js.map +1 -0
- package/lib/config/defaultSettings.js +2 -2
- package/lib/config/defaultSettings.js.map +1 -0
- package/lib/config/env-config.js +2 -5
- package/lib/config/env-config.js.map +1 -0
- package/lib/constants/constants.js +3 -3
- package/lib/constants/constants.js.map +1 -0
- package/lib/constants/error.js +5 -5
- package/lib/constants/error.js.map +1 -0
- package/lib/graphql/link/error-link.js +3 -6
- package/lib/graphql/link/error-link.js.map +1 -0
- package/lib/index.js +1 -7
- package/lib/index.js.map +1 -0
- package/lib/index.native.js +1 -7
- package/lib/index.native.js.map +1 -0
- package/lib/redux/actions/error-actions.js +4 -5
- package/lib/redux/actions/error-actions.js.map +1 -0
- package/lib/redux/reducers/error.js +3 -4
- package/lib/redux/reducers/error.js.map +1 -0
- package/lib/redux/selectors/index.js +1 -3
- package/lib/redux/selectors/index.js.map +1 -0
- package/lib/redux/settings.js +2 -6
- package/lib/redux/settings.js.map +1 -0
- package/lib/themes/systemFont/index.js +1 -1
- package/lib/themes/systemFont/index.js.map +1 -0
- package/lib/themes/templates/createLayoutTheme.js +2 -3
- package/lib/themes/templates/createLayoutTheme.js.map +1 -0
- package/lib/themes/templates/darkLayoutTheme.js +5 -8
- package/lib/themes/templates/darkLayoutTheme.js.map +1 -0
- package/lib/themes/templates/lightLayoutTheme.js +10 -12
- package/lib/themes/templates/lightLayoutTheme.js.map +1 -0
- package/lib/utils/componentSize.js +3 -5
- package/lib/utils/componentSize.js.map +1 -0
- package/lib/utils/seperatedMenus.js +2 -2
- package/lib/utils/seperatedMenus.js.map +1 -0
- package/package.json +5 -3
- package/lib/colors/Color.js +0 -1
- package/lib/colors/index.js +0 -2
- package/lib/colors/presets/brinkPink.js +0 -11
- package/lib/colors/presets/cyan.js +0 -11
- package/lib/colors/presets/index.js +0 -14
- package/lib/colors/presets/lime.js +0 -11
- package/lib/colors/presets/pink.js +0 -11
- package/lib/colors/presets/purple.js +0 -11
- package/lib/colors/presets/skyBlue.js +0 -11
- package/lib/colors/presets/turquoise.js +0 -11
- package/lib/components/__tests__/ApplicationErrorHandlerCommon.test.js +0 -82
- package/lib/components/index.js +0 -3
- package/lib/config/index.js +0 -1
- package/lib/constants/index.js +0 -2
- package/lib/graphql/index.js +0 -1
- package/lib/graphql/link/index.js +0 -1
- package/lib/interfaces/default-settings.js +0 -1
- package/lib/interfaces/error-state.js +0 -1
- package/lib/interfaces/index.js +0 -6
- package/lib/interfaces/layout/base-menu.js +0 -1
- package/lib/interfaces/layout/basic-layout.js +0 -1
- package/lib/interfaces/layout/breadcrum.js +0 -1
- package/lib/interfaces/layout/global-footer.js +0 -1
- package/lib/interfaces/layout/global-header.js +0 -1
- package/lib/interfaces/layout/index.js +0 -8
- package/lib/interfaces/layout/menu.js +0 -1
- package/lib/interfaces/layout/page.js +0 -1
- package/lib/interfaces/layout/sider-menu.js +0 -1
- package/lib/interfaces/pure-settings.js +0 -1
- package/lib/interfaces/typings.js +0 -1
- package/lib/redux/actions/index.js +0 -2
- package/lib/redux/actions/settings-action.js +0 -1
- package/lib/redux/index.js +0 -3
- package/lib/redux/reducers/index.js +0 -1
- package/lib/themes/LayoutTheme.js +0 -1
- package/lib/themes/TextStyle.js +0 -1
- package/lib/themes/index.js +0 -4
- package/lib/themes/systemFont/index.native.js +0 -1
- package/lib/themes/templates/index.js +0 -3
- package/lib/utils/index.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"black.js","sources":["../../../src/colors/presets/black.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAS,MAAA,KAAO,GAAA;AAEhB,IAAA,OAAA,EAAA,MAAa;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
const blue = {
|
|
2
2
|
base100: '#CEEDFD',
|
|
3
3
|
base200: '#9ED7FC',
|
|
4
4
|
base300: '#6DBAF7',
|
|
@@ -8,4 +8,4 @@ export const blue = {
|
|
|
8
8
|
base700: '#0842A5',
|
|
9
9
|
base800: '#052E85',
|
|
10
10
|
base900: '#03216E'
|
|
11
|
-
};
|
|
11
|
+
};export{blue};//# sourceMappingURL=blue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blue.js","sources":["../../../src/colors/presets/blue.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAS,MAAA,IAAO,GAAA;AAEhB,IAAA,OAAA,EAAA,SAAa;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
const green = {
|
|
2
2
|
base100: '#DAFCD0',
|
|
3
3
|
base200: '#ADF9A3',
|
|
4
4
|
base300: '#76EE73',
|
|
@@ -8,4 +8,4 @@ export const green = {
|
|
|
8
8
|
base700: '#0E8F3B',
|
|
9
9
|
base800: '#087338',
|
|
10
10
|
base900: '#055F35'
|
|
11
|
-
};
|
|
11
|
+
};export{green};//# sourceMappingURL=green.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"green.js","sources":["../../../src/colors/presets/green.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAS,MAAA,KAAO,GAAA;AAEhB,IAAA,OAAA,EAAA,SAAa;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
const orange = {
|
|
2
2
|
base100: '#FEEED4',
|
|
3
3
|
base200: '#FDD8AA',
|
|
4
4
|
base300: '#FABB7F',
|
|
@@ -8,4 +8,4 @@ export const orange = {
|
|
|
8
8
|
base700: '#AC3A15',
|
|
9
9
|
base800: '#8B240D',
|
|
10
10
|
base900: '#731408'
|
|
11
|
-
};
|
|
11
|
+
};export{orange};//# sourceMappingURL=orange.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orange.js","sources":["../../../src/colors/presets/orange.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAS,MAAA,MAAO,GAAM;AAEtB,IAAA,OAAA,EAAA,SAAa;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"red.js","sources":["../../../src/colors/presets/red.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAS,MAAA,GAAO,GAAA;AAEhB,IAAA,OAAA,EAAA,SAAa;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"white.js","sources":["../../../src/colors/presets/white.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAS,MAAA,KAAO,GAAA;AAEhB,IAAA,OAAA,EAAA,MAAa;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
const yellow = {
|
|
2
2
|
base100: '#FEF7CD',
|
|
3
3
|
base200: '#FEED9B',
|
|
4
4
|
base300: '#FDE069',
|
|
@@ -8,4 +8,4 @@ export const yellow = {
|
|
|
8
8
|
base700: '#B37E03',
|
|
9
9
|
base800: '#906202',
|
|
10
10
|
base900: '#774D01'
|
|
11
|
-
};
|
|
11
|
+
};export{yellow};//# sourceMappingURL=yellow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yellow.js","sources":["../../../src/colors/presets/yellow.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAS,MAAA,MAAO,GAAM;AAEtB,IAAA,OAAA,EAAA,SAAa;;;;;;;;;"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { APPLICATION_ERROR_SLOT_FILL } from '../constants';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
export const ApplicationErrorFillWrapper = (props) => {
|
|
1
|
+
import {Fill}from'@common-stack/components-pro';import {APPLICATION_ERROR_SLOT_FILL}from'../constants/constants.js';import*as React from'react';const ApplicationErrorFillWrapper = (props) => {
|
|
5
2
|
return React.createElement(Fill, { ...props, name: APPLICATION_ERROR_SLOT_FILL });
|
|
6
|
-
};
|
|
3
|
+
};export{ApplicationErrorFillWrapper};//# sourceMappingURL=ApplicationErrorFillWrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApplicationErrorFillWrapper.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useSelector } from 'react-redux';
|
|
3
|
-
import "reflect-metadata";
|
|
4
|
-
import { Slot } from '@common-stack/components-pro';
|
|
5
|
-
import { APPLICATION_ERROR_SLOT_FILL } from '../constants';
|
|
6
|
-
import { backendErrorSelector } from '../redux/selectors';
|
|
7
|
-
/**
|
|
1
|
+
import React__default from'react';import {useSelector}from'react-redux';import'reflect-metadata';import {Slot}from'@common-stack/components-pro';import {APPLICATION_ERROR_SLOT_FILL}from'../constants/constants.js';import {backendErrorSelector}from'../redux/selectors/index.js';/**
|
|
8
2
|
* ApplicationErrorSlot is needed for mobile. Since for mobile
|
|
9
3
|
* we import Slot from @common-stack/react-mobile. The default
|
|
10
4
|
* Slot under RenderApplicationErrorSlot works for browser
|
|
@@ -15,19 +9,19 @@ import { backendErrorSelector } from '../redux/selectors';
|
|
|
15
9
|
* @param [RendererComponent] IRendererComponentType
|
|
16
10
|
* @returns ReactNode
|
|
17
11
|
*/
|
|
18
|
-
|
|
12
|
+
const ApplicationErrorHandlerCommon = (FallbackComponent, ApplicationErrorSlot, RendererComponent) => ({ plugins, children }) => {
|
|
19
13
|
const applicationErrors = useSelector((state) => state?.applicationErrors);
|
|
20
14
|
const errors = applicationErrors?.filter((error) => !!plugins.find((plugin) => plugin.name === error?.pluginName));
|
|
21
15
|
const backendError = useSelector(backendErrorSelector);
|
|
22
16
|
const RenderApplicationErrorSlot = (props) => {
|
|
23
|
-
return !!ApplicationErrorSlot ?
|
|
17
|
+
return !!ApplicationErrorSlot ? React__default.createElement(ApplicationErrorSlot, { ...props }) : React__default.createElement(Slot, { ...props });
|
|
24
18
|
};
|
|
25
19
|
if (!!RendererComponent) {
|
|
26
|
-
return
|
|
20
|
+
return React__default.createElement(RendererComponent, { applicationErrors: errors, backendError: backendError });
|
|
27
21
|
}
|
|
28
|
-
return (
|
|
29
|
-
!!backendError ?
|
|
22
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
23
|
+
!!backendError ? React__default.createElement(FallbackComponent, { error: backendError }) : null,
|
|
30
24
|
!!errors?.length
|
|
31
|
-
?
|
|
25
|
+
? React__default.createElement(RenderApplicationErrorSlot, { name: APPLICATION_ERROR_SLOT_FILL, fillProps: { active: true, applicationErrors: errors } })
|
|
32
26
|
: children));
|
|
33
|
-
};
|
|
27
|
+
};export{ApplicationErrorHandlerCommon};//# sourceMappingURL=ApplicationErrorHandlerCommon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApplicationErrorHandlerCommon.js","sources":["../../src/components/ApplicationErrorHandlerCommon.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"oRAUG;AACH;AACE;;AAED;AAED;;;AAGC;AAED;;AAGI,MAAS,6BAAE,GAAA,CAAA,iBAAA,EAAA,oBAAA,EAAA,iBAAA,KAAA,CAAA,EAAA,OAAA,EAAA,QAAA,EAAA,KAAA;UACH,iBAAU,GAAA,WAAA,CAAA,CAAA,KAAA,KAAA,KAAA,EAAA,iBAAA,CAAA,CAAA;UACC,MAAA,GAAA,iBAAuB,EAAA,MAAA,CAAA,CAAA,KAAE,KAAA,CAAA,CAAA,OAAA,CAAA,IAAA,CAAA,CAAA,MAAA,KAAA,MAAA,CAAA,IAAA,KAAA,KAAA,EAAA,UAAA,CAAA,CAAA,CAAA;UAC3C,YAAA,GAAA,WAAA,CAAA,oBAAA,CAAA,CAAA;AACF,IAAA,gCACe,GAAA,CAAA,KAAA,KAAA;AAClB,QAAA,OAAA,CAAA,CAAA,oBAAA,GAAAA,cAAA,CAAA,aAAA,CAAA,oBAAA,EAAA,EAAA,GAAA,KAAA,EAAA,CAAA,GAAAA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAA,GAAA,KAAA,EAAA,CAAA,CAAA;;;;;;;;;;AAUG"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { logger } from '@cdm-logger/client';
|
|
3
|
-
export class ErrorBoundaryCommon extends React.Component {
|
|
1
|
+
import React__default from'react';import {logger}from'@cdm-logger/client';class ErrorBoundaryCommon extends React__default.Component {
|
|
4
2
|
constructor(props) {
|
|
5
3
|
super(props);
|
|
6
4
|
this.state = { hasError: false, error: null };
|
|
@@ -14,8 +12,8 @@ export class ErrorBoundaryCommon extends React.Component {
|
|
|
14
12
|
render() {
|
|
15
13
|
if (this.state.hasError) {
|
|
16
14
|
const FallbackComponent = this.props.fallbackComponent;
|
|
17
|
-
return
|
|
15
|
+
return React__default.createElement(FallbackComponent, { error: this.state.error });
|
|
18
16
|
}
|
|
19
17
|
return this.props.children;
|
|
20
18
|
}
|
|
21
|
-
}
|
|
19
|
+
}export{ErrorBoundaryCommon};//# sourceMappingURL=ErrorBoundaryCommon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorBoundaryCommon.js","sources":["../../src/components/ErrorBoundaryCommon.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"0EAGoC,MAAA,mBAAU,SAAAA,cAAA,CAAA,SAAA,CAAA;AAAC,IAAA,WAAO,CAAK,KAAG,EAAI;QAAG,KAAA,CAAA,KAAA,CAAA,CAAA;AACrE,uBAAuB,QAAG,EAAA,KAAA,EAAA,KAAA,EAAA,IAAA,EAAA,CAAA;KAChB;IACR,OAAiB,wBAAU,CAAA,KAAA,EAAA;QAAE,OAAO,UAAK,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;AAAE,KAAA;IAC3C,iBAAA,CAAA,KAAA,EAAA;AAEF,QAAa,MAAA,CAAA,KAAA,CAAA,KAAA,CAAA,CAAA;AACC,KAAA;AAKZ,IAAA,MAAM,GAAC;;;;SAIU;QAIX,OAAA,IAAA,CAAA,KAAA,CAAA,QAAA,CAAA;AAOP,KAAA;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
const defaultSettings = {
|
|
2
2
|
logo: 'https://cdmbase.s3.ca-central-1.amazonaws.com/favicon-new-128.svg',
|
|
3
3
|
navTheme: 'light',
|
|
4
4
|
primaryColor: '#1890ff',
|
|
@@ -28,4 +28,4 @@ export const defaultSettings = {
|
|
|
28
28
|
menu: undefined,
|
|
29
29
|
splitMenus: false,
|
|
30
30
|
siderMenuType: 'sub'
|
|
31
|
-
};
|
|
31
|
+
};export{defaultSettings};//# sourceMappingURL=defaultSettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultSettings.js","sources":["../../src/config/defaultSettings.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAS,MAAA,eAAmB;AAE5B,IAAA,IAAA,EAAA,mEAA4C;IACxC,iBAAa;IACb,YAAgB,EAAA;IAChB,YAAY,WAAO;IACnB,MAAQ,EAAA;IACR,YAAY,SAAO;IACnB,WAAe,EAAA,IAAE;IACjB,WAAW,EAAE;IACb,eAAe,MAAM;IACrB,SAAc,EAAA,KAAE;IA+BlB,KAAA,EAAA,aAAA;;;;;;;;;;;;;;;;;;;"}
|
package/lib/config/env-config.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { defaultSettings } from './defaultSettings';
|
|
3
|
-
const { json } = envalid;
|
|
1
|
+
import*as envalid from'envalid';import {defaultSettings}from'./defaultSettings.js';const { json } = envalid;
|
|
4
2
|
const env = process.APP_ENV || process.env;
|
|
5
3
|
const preConfig = envalid.cleanEnv(env, {
|
|
6
4
|
LAYOUT_SETTINGS: json({
|
|
@@ -14,5 +12,4 @@ if (env.LAYOUT_SETTINGS) {
|
|
|
14
12
|
}
|
|
15
13
|
else {
|
|
16
14
|
config = preConfig;
|
|
17
|
-
}
|
|
18
|
-
export { config };
|
|
15
|
+
}export{config};//# sourceMappingURL=env-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-config.js","sources":["../../src/config/env-config.ts"],"sourcesContent":[null],"names":[],"mappings":"mFAcA,MAAA,EAAA,IAAI,EAAM,GAAA,OAAA,CAAA;;kCAA0B,CAAA,GAAA,EAAA;AAQpC,IAAO,eAAW,EAAA,IAAA,CAAA;;;;;;;;;;;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const CHANGE_SETTINGS_ACTION = 'settings/changeSetting';
|
|
2
|
+
const CHANGE_LANGUAGE = 'language/changeLanguage';
|
|
3
|
+
const APPLICATION_ERROR_SLOT_FILL = "APPLICATION_ERROR_SLOT_FILL";export{APPLICATION_ERROR_SLOT_FILL,CHANGE_LANGUAGE,CHANGE_SETTINGS_ACTION};//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../src/constants/constants.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAO,MAAA,sBAA4B,GAAA,yBAAA;AAC5B,MAAA,eAAqB,GAAA,0BAAA;AACrB,MAAA,2BAAiC,GAAA"}
|
package/lib/constants/error.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
const BACKEND_ERROR = '@platform/BACKEND_ERROR';
|
|
2
|
+
const DISMISS_APPLICATION_ERROR = '@platform/DISMISS_APPLICATION_ERROR';
|
|
3
|
+
const CLEAR_APPLICATION_ERRORS = '@platform/CLEAR_APPLICATION_ERRORS';
|
|
4
|
+
const RESTORE_APPLICATION_ERRORS = '@platform/RESTORE_APPLICATION_ERRORS';
|
|
5
|
+
const LOG_APPLICATION_ERROR = '@platform/LOG_APPLICATION_ERROR';export{BACKEND_ERROR,CLEAR_APPLICATION_ERRORS,DISMISS_APPLICATION_ERROR,LOG_APPLICATION_ERROR,RESTORE_APPLICATION_ERRORS};//# sourceMappingURL=error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.js","sources":["../../src/constants/error.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAY,MAAA,aAAgB,GAAA,0BAA0B;AACtD,MAAA,yBAA4B,GAAA,sCAA0C;AAE1D,MAAA,wBAAyB,GAAG,qCAAqC;AAC7E,MAAA,0BAAa,GAAA,uCAA6F;AAE9F,MAAA,qBAAA,GAA2B"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { LOG_APPLICATION_ERROR, BACKEND_ERROR } from '../../constants';
|
|
3
|
-
import { serializeError } from 'serialize-error';
|
|
4
|
-
export class ErrorLink {
|
|
1
|
+
import {onError}from'@apollo/client/link/error';import {LOG_APPLICATION_ERROR,BACKEND_ERROR}from'../../constants/error.js';import {serializeError}from'serialize-error';class ErrorLink {
|
|
5
2
|
dispatchErrorAction(container, error) {
|
|
6
3
|
const reduxStore = container.get('ReduxStore');
|
|
7
4
|
let action = {
|
|
@@ -41,6 +38,6 @@ export class ErrorLink {
|
|
|
41
38
|
});
|
|
42
39
|
}
|
|
43
40
|
}
|
|
44
|
-
|
|
41
|
+
const errorReduxLink = (container) => {
|
|
45
42
|
return new ErrorLink().getErrorLink(container);
|
|
46
|
-
};
|
|
43
|
+
};export{ErrorLink,errorReduxLink};//# sourceMappingURL=error-link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-link.js","sources":["../../../src/graphql/link/error-link.ts"],"sourcesContent":[null],"names":[],"mappings":"wKAQA,MAAoB,SAAA,CAAA;IAClB,6BAA2B,EAAA,KAAA,EAAA;AAC5B,QAAA,MAAA,UAAA,GAAA,SAAA,CAAA,GAAA,CAAA,YAAA,CAAA,CAAA;AAED,QAAa,IAAA,MAAA,GAAA;YACJ,WAAQ,EAAA,UAAA,EAAA,UAAA;YAEI,OAAA,EAAA,iBAAY,EAAA,OAAoB;AAkBnD,SAAA,CAAA;AAoBD,QAAA,IAAA,CAAA,MAAA,EAAA,IAAA,EAAA;AAGD,YAAA,SAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export * from './constants';
|
|
3
|
-
export * from './redux';
|
|
4
|
-
export * from './utils';
|
|
5
|
-
export * from './components';
|
|
6
|
-
export * from './graphql';
|
|
7
|
-
export * from './themes';
|
|
1
|
+
export{APPLICATION_ERROR_SLOT_FILL,CHANGE_LANGUAGE,CHANGE_SETTINGS_ACTION}from'./constants/constants.js';export{BACKEND_ERROR,CLEAR_APPLICATION_ERRORS,DISMISS_APPLICATION_ERROR,LOG_APPLICATION_ERROR,RESTORE_APPLICATION_ERRORS}from'./constants/error.js';export{dismissApplicationError,restoreApplicationError,setApplicationError}from'./redux/actions/error-actions.js';export{settingsReducer}from'./redux/settings.js';export{applicationErrors,initialErrorsState}from'./redux/reducers/error.js';export{getMenuSeparation}from'./utils/seperatedMenus.js';export{useComponentSize,useIsomorphicLayoutEffect}from'./utils/componentSize.js';export{ApplicationErrorHandlerCommon}from'./components/ApplicationErrorHandlerCommon.js';export{ErrorBoundaryCommon}from'./components/ErrorBoundaryCommon.js';export{ApplicationErrorFillWrapper}from'./components/ApplicationErrorFillWrapper.js';export{ErrorLink,errorReduxLink}from'./graphql/link/error-link.js';export{systemFont}from'./themes/systemFont/index.js';export{borderRadius,colors,lightLayoutTheme,lightNavigationBarTheme,lightTabBarTheme,shadows,sizes,spacings,textVariants}from'./themes/templates/lightLayoutTheme.js';export{createLayoutTheme}from'./themes/templates/createLayoutTheme.js';export{darkColors,darkLayoutTheme,darkNavigationBarTheme,darkTabBarTheme}from'./themes/templates/darkLayoutTheme.js';//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/lib/index.native.js
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export * from './constants';
|
|
3
|
-
export * from './redux';
|
|
4
|
-
export * from './utils';
|
|
5
|
-
export * from './components';
|
|
6
|
-
export * from './graphql';
|
|
7
|
-
export * from './themes';
|
|
1
|
+
export{APPLICATION_ERROR_SLOT_FILL,CHANGE_LANGUAGE,CHANGE_SETTINGS_ACTION}from'./constants/constants.js';export{BACKEND_ERROR,CLEAR_APPLICATION_ERRORS,DISMISS_APPLICATION_ERROR,LOG_APPLICATION_ERROR,RESTORE_APPLICATION_ERRORS}from'./constants/error.js';export{dismissApplicationError,restoreApplicationError,setApplicationError}from'./redux/actions/error-actions.js';export{settingsReducer}from'./redux/settings.js';export{applicationErrors,initialErrorsState}from'./redux/reducers/error.js';export{getMenuSeparation}from'./utils/seperatedMenus.js';export{useComponentSize,useIsomorphicLayoutEffect}from'./utils/componentSize.js';export{ApplicationErrorHandlerCommon}from'./components/ApplicationErrorHandlerCommon.js';export{ErrorBoundaryCommon}from'./components/ErrorBoundaryCommon.js';export{ApplicationErrorFillWrapper}from'./components/ApplicationErrorFillWrapper.js';export{ErrorLink,errorReduxLink}from'./graphql/link/error-link.js';export{systemFont}from'./themes/systemFont/index.js';export{borderRadius,colors,lightLayoutTheme,lightNavigationBarTheme,lightTabBarTheme,shadows,sizes,spacings,textVariants}from'./themes/templates/lightLayoutTheme.js';export{createLayoutTheme}from'./themes/templates/createLayoutTheme.js';export{darkColors,darkLayoutTheme,darkNavigationBarTheme,darkTabBarTheme}from'./themes/templates/darkLayoutTheme.js';//# sourceMappingURL=index.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.native.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export const setApplicationError = (payload) => {
|
|
1
|
+
import {LOG_APPLICATION_ERROR,DISMISS_APPLICATION_ERROR,RESTORE_APPLICATION_ERRORS}from'../../constants/error.js';const setApplicationError = (payload) => {
|
|
3
2
|
return ({
|
|
4
3
|
type: LOG_APPLICATION_ERROR,
|
|
5
4
|
payload,
|
|
6
5
|
});
|
|
7
6
|
};
|
|
8
|
-
|
|
7
|
+
function dismissApplicationError(dismissByType) {
|
|
9
8
|
return {
|
|
10
9
|
type: DISMISS_APPLICATION_ERROR,
|
|
11
10
|
payload: {
|
|
@@ -13,9 +12,9 @@ export function dismissApplicationError(dismissByType) {
|
|
|
13
12
|
}
|
|
14
13
|
};
|
|
15
14
|
}
|
|
16
|
-
|
|
15
|
+
const restoreApplicationError = (payload) => {
|
|
17
16
|
return ({
|
|
18
17
|
type: RESTORE_APPLICATION_ERRORS,
|
|
19
18
|
payload,
|
|
20
19
|
});
|
|
21
|
-
};
|
|
20
|
+
};export{dismissApplicationError,restoreApplicationError,setApplicationError};//# sourceMappingURL=error-actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-actions.js","sources":["../../../src/redux/actions/error-actions.ts"],"sourcesContent":[null],"names":[],"mappings":"kHAEuB,MAAA,mBACrB,GAAwB,CAAA,OAAA,KAAA;AAM1B,IAAA,QAAA;;;KAKE,EAAA;AAEF,EAAA;;;;;AAOC,YAAA,aAAA;AAED,SAAA;;;AAKE,MAAA,uBAAA,GAAA,CAAA,OAAA,KAAA;AAEF,IAAM,QAAM;QACJ,gCAAwB;AAAC,QAAA,OAAa;KAC1C,EAAA;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export function applicationErrors(errorState = initialErrorsState, action) {
|
|
1
|
+
import {RESTORE_APPLICATION_ERRORS,CLEAR_APPLICATION_ERRORS,DISMISS_APPLICATION_ERROR,LOG_APPLICATION_ERROR}from'../../constants/error.js';const initialErrorsState = [];
|
|
2
|
+
function applicationErrors(errorState = initialErrorsState, action) {
|
|
4
3
|
switch (action?.type) {
|
|
5
4
|
case LOG_APPLICATION_ERROR: {
|
|
6
5
|
const { type: errorType, payload, pluginName, displayable = true } = action?.payload || {};
|
|
@@ -28,4 +27,4 @@ export function applicationErrors(errorState = initialErrorsState, action) {
|
|
|
28
27
|
default:
|
|
29
28
|
return errorState;
|
|
30
29
|
}
|
|
31
|
-
}
|
|
30
|
+
}export{applicationErrors,initialErrorsState};//# sourceMappingURL=error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.js","sources":["../../../src/redux/reducers/error.ts"],"sourcesContent":[null],"names":[],"mappings":"2IAQO,MAAA,kBAAwB,GAAA,GAAA;AAEf,SAAA,iBAAA,CAAA,UAA4B,GAAA,kBAA6B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BACKEND_ERROR } from '../../constants';
|
|
3
|
-
export const backendErrorSelector = createSelector((state) => state.applicationErrors, (applicationErrors) => applicationErrors?.find((error) => error.type === BACKEND_ERROR));
|
|
1
|
+
import {createSelector}from'reselect';import {BACKEND_ERROR}from'../../constants/error.js';const backendErrorSelector = createSelector((state) => state.applicationErrors, (applicationErrors) => applicationErrors?.find((error) => error.type === BACKEND_ERROR));export{backendErrorSelector};//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/redux/selectors/index.ts"],"sourcesContent":[null],"names":[],"mappings":"2FAKmB,MAAA,oBAAuB,GAAA,cAAE,CAAA,CAAA,KAAA,KAAA,KAAA,CAAA,iBAAA,EAAA,CAAA,iBAAA,KAAA,iBAAA,EAAA,IAAA,CAAA,CAAA,KAAA,KAAA,KAAA,CAAA,IAAA,KAAA,aAAA,CAAA"}
|
package/lib/redux/settings.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import {CHANGE_LANGUAGE,CHANGE_SETTINGS_ACTION}from'../constants/constants.js';import {config}from'../config/env-config.js';import {pick,keys}from'lodash';/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
2
2
|
/* eslint-disable no-case-declarations */
|
|
3
|
-
import { CHANGE_SETTINGS_ACTION, CHANGE_LANGUAGE } from '../constants';
|
|
4
|
-
import { config } from '../config';
|
|
5
|
-
import { keys, pick } from 'lodash';
|
|
6
3
|
// Note: We customize reducer part as AntPro uses inbuild way.
|
|
7
4
|
const updateColorWeak = (colorWeak) => {
|
|
8
5
|
// @sri to avoid breaking during SSR, split into to checks
|
|
@@ -40,5 +37,4 @@ const settingsReducer = (state = config.LAYOUT_SETTINGS, { type, payload = {} })
|
|
|
40
37
|
default:
|
|
41
38
|
return state;
|
|
42
39
|
}
|
|
43
|
-
};
|
|
44
|
-
export { settingsReducer };
|
|
40
|
+
};export{settingsReducer};//# sourceMappingURL=settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","sources":["../../src/redux/settings.ts"],"sourcesContent":[null],"names":[],"mappings":"2JAIA;AAmBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA2BE,CAAA;AAEF,QAAO,KAAiB,eAAG;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const systemFont = 'system-ui';export{systemFont};//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/themes/systemFont/index.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAO,MAAA,UAAgB,GAAA"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export function createLayoutTheme(properties, baseTheme = lightLayoutTheme) {
|
|
1
|
+
import {lightLayoutTheme}from'./lightLayoutTheme.js';function createLayoutTheme(properties, baseTheme = lightLayoutTheme) {
|
|
3
2
|
const newTheme = JSON.parse(JSON.stringify(baseTheme));
|
|
4
3
|
const keys = Object.keys(baseTheme);
|
|
5
4
|
keys.forEach((key) => {
|
|
6
5
|
Object.assign(newTheme[key], properties[key]);
|
|
7
6
|
});
|
|
8
7
|
return newTheme;
|
|
9
|
-
}
|
|
8
|
+
}export{createLayoutTheme};//# sourceMappingURL=createLayoutTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createLayoutTheme.js","sources":["../../../src/themes/templates/createLayoutTheme.ts"],"sourcesContent":[null],"names":[],"mappings":"qDACO,SAAE,4BAAmC,EAAC,SAAA,GAAA,gBAAA,EAAA;AAG7C,IAAA,MAAA,QAAA,GAAA,IAAiC,CAAA,KAAA,CAAA,IAAA,CAAA,SAAW,CAAA;;;;;;"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createLayoutTheme } from './createLayoutTheme';
|
|
3
|
-
import { lightNavigationBarTheme, lightTabBarTheme } from './lightLayoutTheme';
|
|
4
|
-
export const darkColors = {
|
|
1
|
+
import {black}from'../../colors/presets/black.js';import {createLayoutTheme}from'./createLayoutTheme.js';import {lightNavigationBarTheme,lightTabBarTheme}from'./lightLayoutTheme.js';const darkColors = {
|
|
5
2
|
background: black.base400,
|
|
6
3
|
foreground: black.base,
|
|
7
4
|
text: black.base900,
|
|
@@ -20,7 +17,7 @@ export const darkColors = {
|
|
|
20
17
|
contentInteractiveColor800: black.base200,
|
|
21
18
|
contentInteractiveColor900: black.base100
|
|
22
19
|
};
|
|
23
|
-
|
|
20
|
+
const darkNavigationBarTheme = {
|
|
24
21
|
...lightNavigationBarTheme,
|
|
25
22
|
title: {
|
|
26
23
|
fontSize: 16,
|
|
@@ -29,14 +26,14 @@ export const darkNavigationBarTheme = {
|
|
|
29
26
|
},
|
|
30
27
|
backgroundColor: black.base
|
|
31
28
|
};
|
|
32
|
-
|
|
29
|
+
const darkTabBarTheme = {
|
|
33
30
|
...lightTabBarTheme,
|
|
34
31
|
backgroundColor: black.base
|
|
35
32
|
};
|
|
36
|
-
|
|
33
|
+
const darkLayoutTheme = createLayoutTheme({
|
|
37
34
|
colors: {
|
|
38
35
|
...darkColors
|
|
39
36
|
},
|
|
40
37
|
navigationBar: darkNavigationBarTheme,
|
|
41
38
|
tabBar: darkTabBarTheme
|
|
42
|
-
});
|
|
39
|
+
});export{darkColors,darkLayoutTheme,darkNavigationBarTheme,darkTabBarTheme};//# sourceMappingURL=darkLayoutTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"darkLayoutTheme.js","sources":["../../../src/themes/templates/darkLayoutTheme.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;IAuBE,0BAAA,EAAA,KAAA,CAAA,OAAA;AAEF,IAAA,0BAAa,EAAA,KAAA,CAAA,OAAwB;AAUrC,IAAA,0BAAa,EAAA,KAAiB,CAAA,OAAA;AAK9B,EAAO;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { systemFont } from '../systemFont';
|
|
3
|
-
export const colors = {
|
|
1
|
+
import {blue}from'../../colors/presets/blue.js';import {green}from'../../colors/presets/green.js';import {orange}from'../../colors/presets/orange.js';import {red}from'../../colors/presets/red.js';import {yellow}from'../../colors/presets/yellow.js';import {white}from'../../colors/presets/white.js';import {systemFont}from'../systemFont/index.js';const colors = {
|
|
4
2
|
background: white.base400,
|
|
5
3
|
foreground: white.base,
|
|
6
4
|
text: white.base900,
|
|
@@ -72,21 +70,21 @@ export const colors = {
|
|
|
72
70
|
contentInteractiveColor800: white.base200,
|
|
73
71
|
contentInteractiveColor900: white.base100
|
|
74
72
|
};
|
|
75
|
-
|
|
73
|
+
const spacings = {
|
|
76
74
|
xs: 8,
|
|
77
75
|
s: 12,
|
|
78
76
|
m: 16,
|
|
79
77
|
lg: 24,
|
|
80
78
|
xl: 32
|
|
81
79
|
};
|
|
82
|
-
|
|
80
|
+
const borderRadius = {
|
|
83
81
|
xs: 4,
|
|
84
82
|
s: 8,
|
|
85
83
|
m: 12,
|
|
86
84
|
lg: 16,
|
|
87
85
|
xl: 20
|
|
88
86
|
};
|
|
89
|
-
|
|
87
|
+
const sizes = {
|
|
90
88
|
interactiveItemHeight: 44,
|
|
91
89
|
loadingComponentHeightForButton: 24,
|
|
92
90
|
textFieldIconSize: 16,
|
|
@@ -99,11 +97,11 @@ export const sizes = {
|
|
|
99
97
|
baseRowHeight: 45,
|
|
100
98
|
colorTabListItemHeight: 44
|
|
101
99
|
};
|
|
102
|
-
|
|
100
|
+
const shadows = {
|
|
103
101
|
mainShadow: '0px 1px 2px rgba(0, 0, 0, 0.05)',
|
|
104
102
|
thumbShadow: '0px 1px 2px rgba(0, 0, 0, 0.25)'
|
|
105
103
|
};
|
|
106
|
-
|
|
104
|
+
const textVariants = {
|
|
107
105
|
normal: {
|
|
108
106
|
fontSize: 17,
|
|
109
107
|
fontWeight: 400,
|
|
@@ -171,7 +169,7 @@ export const textVariants = {
|
|
|
171
169
|
fontFamily: systemFont
|
|
172
170
|
}
|
|
173
171
|
};
|
|
174
|
-
|
|
172
|
+
const lightNavigationBarTheme = {
|
|
175
173
|
title: {
|
|
176
174
|
fontSize: 16,
|
|
177
175
|
fontWeight: 600,
|
|
@@ -188,7 +186,7 @@ export const lightNavigationBarTheme = {
|
|
|
188
186
|
iconButtonSize: 22,
|
|
189
187
|
backgroundColor: white.base
|
|
190
188
|
};
|
|
191
|
-
|
|
189
|
+
const lightTabBarTheme = {
|
|
192
190
|
tabBarItemText: {
|
|
193
191
|
fontSize: 11,
|
|
194
192
|
fontWeight: 500,
|
|
@@ -204,7 +202,7 @@ export const lightTabBarTheme = {
|
|
|
204
202
|
leftPositionShadow: '1px 0px 1px rgba(0, 0, 0, 0.05)',
|
|
205
203
|
rightPositionShadow: '-1px 0px 1px rgba(0, 0, 0, 0.05)'
|
|
206
204
|
};
|
|
207
|
-
|
|
205
|
+
const lightLayoutTheme = {
|
|
208
206
|
colors,
|
|
209
207
|
spacings,
|
|
210
208
|
borderRadius,
|
|
@@ -213,4 +211,4 @@ export const lightLayoutTheme = {
|
|
|
213
211
|
textVariants,
|
|
214
212
|
navigationBar: lightNavigationBarTheme,
|
|
215
213
|
tabBar: lightTabBarTheme
|
|
216
|
-
};
|
|
214
|
+
};export{borderRadius,colors,lightLayoutTheme,lightNavigationBarTheme,lightTabBarTheme,shadows,sizes,spacings,textVariants};//# sourceMappingURL=lightLayoutTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lightLayoutTheme.js","sources":["../../../src/themes/templates/lightLayoutTheme.ts"],"sourcesContent":[null],"names":[],"mappings":"0VAuFA,MAAA,MAAa,GAAA;AAQb,IAAA,UAAA,EAAa,KAAA,CAAA,OAAA;AAQb,IAAA,UAAA,EAAa,KAAA,CAAA,IAAK;AAclB,IAAA,IAAA,EAAA,KAAO,CAAM,OAAA;AAKb,IAAA,SAAA,EAAO,KAAM,CAAA,OAAA;AAqEb,IAAA,WAAO,EAAM,KAAA,CAAA,OAAA;AAkBb,IAAA,KAAA,EAAA,KAAa,CAAA,OAAA;AAiBb,IAAA,SAAA,EAAO,KAAM,CAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
'
|
|
2
|
-
import { useState, useRef, useCallback, useLayoutEffect, useEffect } from 'react';
|
|
3
|
-
export const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;
|
|
1
|
+
import {useLayoutEffect,useEffect,useRef,useState,useCallback}from'react';const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;
|
|
4
2
|
const getSize = (el) => {
|
|
5
3
|
if (!el) {
|
|
6
4
|
return {
|
|
@@ -13,7 +11,7 @@ const getSize = (el) => {
|
|
|
13
11
|
height: el.offsetHeight
|
|
14
12
|
};
|
|
15
13
|
};
|
|
16
|
-
|
|
14
|
+
const useComponentSize = () => {
|
|
17
15
|
let ref = useRef(null);
|
|
18
16
|
const [componentSize, setComponentSize] = useState(getSize(ref ? ref.current : {}));
|
|
19
17
|
const handleResize = useCallback(() => {
|
|
@@ -44,4 +42,4 @@ export const useComponentSize = () => {
|
|
|
44
42
|
}
|
|
45
43
|
}, [ref.current]);
|
|
46
44
|
return { ref, ...componentSize };
|
|
47
|
-
};
|
|
45
|
+
};export{useComponentSize,useIsomorphicLayoutEffect};//# sourceMappingURL=componentSize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"componentSize.js","sources":["../../src/utils/componentSize.ts"],"sourcesContent":[null],"names":[],"mappings":"0EAkBA,MAAA,yBAA6B,GAAA,OAAA,MAAA,KAAA,WAAA,GAAA,eAAA,GAAA,UAAA;;;;YAoC5B,KAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @sri custom function
|
|
2
|
-
|
|
2
|
+
const getMenuSeparation = (menus) => {
|
|
3
3
|
const upperMenus = menus.filter((menu) => menu.position === 'UPPER');
|
|
4
4
|
const middleMenus = menus.filter((menu) => menu.position === 'MIDDLE' ||
|
|
5
5
|
(menu.position !== 'UPPER' && menu.position !== 'LOWER' && menu.position !== 'BOTTOM'));
|
|
@@ -11,4 +11,4 @@ export const getMenuSeparation = (menus) => {
|
|
|
11
11
|
lowerMenus,
|
|
12
12
|
bottomMenus,
|
|
13
13
|
};
|
|
14
|
-
};
|
|
14
|
+
};export{getMenuSeparation};//# sourceMappingURL=seperatedMenus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seperatedMenus.js","sources":["../../src/utils/seperatedMenus.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;AAGY,uBAAkB,GAAG,CAAA,KAAA,KAAA;AAC7B,IAAA,MAAA,UAAyB,GAAA,KAAA,CAAA,MAAG,CAAA,CAAA,IAAA,KAAA,IAAA,CAAA,QAAA,KAAA,OAAA,CAAA,CAAA;AAC5B,IAAA,MAAA,WAA0B,GAAA,KAAA,CAAA,MAAG,CAAA,CAAA,IAAA,KAAA,IAAA,CAAA,QAAA,KAAA,QAAA;AAC7B,SAAA,IAAA,CAAU,QAAe,KAAA,OAAG,IAAA,IAAA,CAAA,QAAA,KAAA,OAAA,IAAA,IAAA,CAAA,QAAA,KAAA,QAAA,CAAA,CAAA,CAAA;AAC5B,IAAA,MAAA,UAA0B,GAAA,KAAA,CAAA,MAAG,CAAA,CAAA,IAAA,KAAA,IAAA,CAAA,QAAA,KAAA,OAAA,CAAA,CAAA;IAC/B,MAAA,WAAA,GAAA,KAAA,CAAA,MAAA,CAAA,CAAA,IAAA,KAAA,IAAA,CAAA,QAAA,KAAA,QAAA,CAAA,CAAA;AAGF,IAAO,OAAA;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@admin-layout/client",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.1-alpha.0",
|
|
4
4
|
"description": "Sample client for higher packages to depend on",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
7
7
|
"main": "lib/index.js",
|
|
8
|
+
"module": "lib/index.js",
|
|
9
|
+
"type": "module",
|
|
8
10
|
"typings": "lib/index.d.ts",
|
|
9
11
|
"react-native": "lib/index.native.js",
|
|
10
12
|
"scripts": {
|
|
11
13
|
"build": "yarn build:clean && yarn build:lib",
|
|
12
14
|
"build:clean": "rimraf lib",
|
|
13
|
-
"build:lib": "
|
|
15
|
+
"build:lib": "rollup -c rollup.config.mjs",
|
|
14
16
|
"build:lib:watch": "yarn build:lib -- --watch",
|
|
15
17
|
"jest": "./node_modules/.bin/jest",
|
|
16
18
|
"prepublish": "yarn build",
|
|
@@ -34,5 +36,5 @@
|
|
|
34
36
|
"typescript": {
|
|
35
37
|
"definition": "lib/index.d.ts"
|
|
36
38
|
},
|
|
37
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "b17c0053f57a6535a66c0381102dba60f55f8e21"
|
|
38
40
|
}
|
package/lib/colors/Color.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/colors/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export * from './blue';
|
|
2
|
-
export * from './brinkPink';
|
|
3
|
-
export * from './cyan';
|
|
4
|
-
export * from './green';
|
|
5
|
-
export * from './lime';
|
|
6
|
-
export * from './orange';
|
|
7
|
-
export * from './pink';
|
|
8
|
-
export * from './purple';
|
|
9
|
-
export * from './red';
|
|
10
|
-
export * from './skyBlue';
|
|
11
|
-
export * from './turquoise';
|
|
12
|
-
export * from './yellow';
|
|
13
|
-
export * from './white';
|
|
14
|
-
export * from './black';
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { configure, mount } from 'enzyme';
|
|
2
|
-
import { ApplicationErrorHandlerCommon } from '../ApplicationErrorHandlerCommon';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
|
|
5
|
-
import configureStore from 'redux-mock-store';
|
|
6
|
-
import { Provider } from 'react-redux';
|
|
7
|
-
const mockStore = configureStore();
|
|
8
|
-
configure({ adapter: new Adapter() });
|
|
9
|
-
const Fallback = () => {
|
|
10
|
-
return React.createElement("div", null, "Fallback");
|
|
11
|
-
};
|
|
12
|
-
const ApplicationHandlerTest = (props) => {
|
|
13
|
-
const { store, plugins } = props;
|
|
14
|
-
const ApplicationErrorHandler = ApplicationErrorHandlerCommon(Fallback);
|
|
15
|
-
return (React.createElement(Provider, { store: store },
|
|
16
|
-
React.createElement(ApplicationErrorHandler, { plugins: plugins },
|
|
17
|
-
React.createElement("div", null, "Children"))));
|
|
18
|
-
};
|
|
19
|
-
describe('Error Handler tests', () => {
|
|
20
|
-
it('should render slot when there is applicationError and fill is registered against error', () => {
|
|
21
|
-
const store = mockStore({
|
|
22
|
-
applicationErrors: [
|
|
23
|
-
{
|
|
24
|
-
type: "TOKEN_VALIDATION_ERROR",
|
|
25
|
-
payload: {
|
|
26
|
-
message: 'Token expired',
|
|
27
|
-
extensions: {
|
|
28
|
-
pluginName: "token-validation-error-fill"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
});
|
|
34
|
-
const component = mount(React.createElement(ApplicationHandlerTest, { store: store, plugins: [{ name: "token-validation-error-fill" }] }));
|
|
35
|
-
console.log(component.debug());
|
|
36
|
-
expect(component.find('Slot')).toHaveLength(1);
|
|
37
|
-
});
|
|
38
|
-
it('should render children when there is applicationError and fill is not registered against error', () => {
|
|
39
|
-
const store = mockStore({
|
|
40
|
-
applicationErrors: [
|
|
41
|
-
{
|
|
42
|
-
type: "TOKEN_VALIDATION_ERROR",
|
|
43
|
-
payload: {
|
|
44
|
-
message: 'Token expired',
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
]
|
|
48
|
-
});
|
|
49
|
-
const component = mount(React.createElement(ApplicationHandlerTest, { store: store, plugins: [{ name: "token-validation-error-fill" }] }));
|
|
50
|
-
console.log(component.debug());
|
|
51
|
-
const childComponent = component.find('div');
|
|
52
|
-
expect(childComponent).toHaveLength(1);
|
|
53
|
-
expect(childComponent.text()).toEqual('Children');
|
|
54
|
-
});
|
|
55
|
-
it('should render Fallback component', () => {
|
|
56
|
-
const store = mockStore({
|
|
57
|
-
applicationErrors: [
|
|
58
|
-
{
|
|
59
|
-
type: "@platform/BACKEND_ERROR",
|
|
60
|
-
payload: {
|
|
61
|
-
message: 'Team id not found',
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
]
|
|
65
|
-
});
|
|
66
|
-
const component = mount(React.createElement(ApplicationHandlerTest, { store: store, plugins: [{ name: "token-validation-error-fill" }] }));
|
|
67
|
-
console.log(component.debug());
|
|
68
|
-
const childComponent = component.find('Fallback');
|
|
69
|
-
expect(childComponent).toHaveLength(1);
|
|
70
|
-
expect(childComponent.text()).toEqual('Fallback');
|
|
71
|
-
});
|
|
72
|
-
it('should render children if there is no applicationError', () => {
|
|
73
|
-
const store = mockStore({
|
|
74
|
-
applicationErrors: []
|
|
75
|
-
});
|
|
76
|
-
const component = mount(React.createElement(ApplicationHandlerTest, { store: store, plugins: [] }));
|
|
77
|
-
console.log(component.debug());
|
|
78
|
-
const childComponent = component.find('div');
|
|
79
|
-
expect(childComponent).toHaveLength(1);
|
|
80
|
-
expect(childComponent.text()).toEqual('Children');
|
|
81
|
-
});
|
|
82
|
-
});
|
package/lib/components/index.js
DELETED
package/lib/config/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './env-config';
|
package/lib/constants/index.js
DELETED
package/lib/graphql/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './link';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './error-link';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/interfaces/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//
|
package/lib/redux/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './error';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/themes/TextStyle.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/themes/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const systemFont = undefined;
|
package/lib/utils/index.js
DELETED