@admin-layout/client 10.0.9-alpha.55 → 10.0.9-alpha.59

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.
@@ -1,4 +1,6 @@
1
1
  import { ProSettings, SearchbarSettings } from '../interfaces';
2
+ import { NavigationMode, SideMenuType, SearchBarBehavior } from '../interfaces/settings';
3
+ import { ContentWidth } from '../interfaces/pure-settings';
2
4
  export type ISettings = ProSettings & {
3
5
  logo: string;
4
6
  showSettingPanel: boolean;
@@ -25,6 +27,87 @@ export type ISettings = ProSettings & {
25
27
  verifyFormVisibleFields: string;
26
28
  verifyFormShowSkipButton: boolean;
27
29
  searchbarSettings: SearchbarSettings;
30
+ currentRoute: string;
31
+ routeSettings: Record<string, {
32
+ layout: {
33
+ desktop: {
34
+ navigationMode: NavigationMode;
35
+ sideMenuType: SideMenuType;
36
+ contentWidth: ContentWidth;
37
+ fixedHeader: boolean;
38
+ fixedSidebar: boolean;
39
+ splitMenus: boolean;
40
+ upperMenuDividerName: string;
41
+ middleMenuDividerName: string;
42
+ lowerMenuDividerName: string;
43
+ };
44
+ mobile: {
45
+ navigationMode: NavigationMode;
46
+ sideMenuType: SideMenuType;
47
+ contentWidth: ContentWidth;
48
+ fixedHeader: boolean;
49
+ fixedSidebar: boolean;
50
+ splitMenus: boolean;
51
+ upperMenuDividerName: string;
52
+ middleMenuDividerName: string;
53
+ lowerMenuDividerName: string;
54
+ };
55
+ };
56
+ regions: {
57
+ desktop: {
58
+ header: {
59
+ showLogo: boolean;
60
+ showSearchSlot: boolean;
61
+ showRightContent: boolean;
62
+ showMenuToggle: boolean;
63
+ showBackButton: boolean;
64
+ showPageTitle: boolean;
65
+ showActionButtons: boolean;
66
+ position: string;
67
+ height: string;
68
+ backgroundColor: string;
69
+ elevation: number;
70
+ showHeader: boolean;
71
+ showMenu: boolean;
72
+ menuHeaderRender: boolean;
73
+ searchBarRender: boolean;
74
+ searchBarBehavior: SearchBarBehavior;
75
+ searchBarOverlay: boolean;
76
+ scrollThreshold: number;
77
+ };
78
+ footer: {
79
+ showFooter: boolean;
80
+ };
81
+ };
82
+ mobile: {
83
+ header: {
84
+ showLogo: boolean;
85
+ showSearchSlot: boolean;
86
+ showRightContent: boolean;
87
+ showMenuToggle: boolean;
88
+ showBackButton: boolean;
89
+ showPageTitle: boolean;
90
+ showActionButtons: boolean;
91
+ position: string;
92
+ height: string;
93
+ backgroundColor: string;
94
+ elevation: number;
95
+ showHeader: boolean;
96
+ showMenu: boolean;
97
+ menuHeaderRender: boolean;
98
+ searchBarRender: boolean;
99
+ searchBarBehavior: SearchBarBehavior;
100
+ searchBarOverlay: boolean;
101
+ scrollThreshold: number;
102
+ };
103
+ footer: {
104
+ showFooter: boolean;
105
+ };
106
+ };
107
+ };
108
+ }>;
109
+ components: any[];
110
+ activeComponent: string | null;
28
111
  };
29
112
  export declare const defaultSettings: ISettings;
30
113
  //# sourceMappingURL=defaultSettings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"defaultSettings.d.ts","sourceRoot":"","sources":["../../src/config/defaultSettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,WAAW,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAE1E,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,SA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CACJ,CAAC;IACF,UAAU,EAAE,GAAG,EAAE,CAAC;IAClB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,SA8L7B,CAAC"}
@@ -1,15 +1,14 @@
1
- const defaultSettings = {
1
+ import {SearchBarBehavior}from'../interfaces/settings.js';const defaultSettings = {
2
2
  logo: 'https://cdmbase.s3.ca-central-1.amazonaws.com/favicon-new-128.svg',
3
- themeType: 'light', // 'dark'
3
+ themeType: 'light',
4
4
  theme: 'default',
5
- primaryColor: '#1890ff', // '#1890ff'
6
- colorPrimary: '#1677FF', // '#1890ff'
7
- secondaryColor: '#4A5568', // '#1890ff'
5
+ primaryColor: '#1890ff',
6
+ colorPrimary: '#1677FF',
7
+ secondaryColor: '#4A5568',
8
8
  layout: 'mix',
9
9
  contentWidth: 'Fluid',
10
10
  fixedHeader: true,
11
11
  fixSiderbar: true,
12
- searchBarRender: true,
13
12
  colorWeak: false,
14
13
  title: 'CDMBase LLC',
15
14
  iconfontUrl: '',
@@ -21,18 +20,7 @@ const defaultSettings = {
21
20
  titleHeight: '30px',
22
21
  titleFontSize: '1.8rem',
23
22
  letterSpacings: '1px',
24
- showHeader: true,
25
- showFooter: true,
26
- showMenu: false,
27
- // menuRender: true,
28
23
  headerTheme: undefined,
29
- headerHeight: undefined,
30
- menu: undefined,
31
- splitMenus: false,
32
- siderMenuType: 'sub',
33
- siderBgColor: '#000000',
34
- headerBgColor: '#000000',
35
- textColor: '#a19c9c',
36
24
  loginThemeColor: 'blue',
37
25
  loginFormPosition: 'center',
38
26
  loginSocials: '{"Google":true,"Apple":true,"Facebook":true}',
@@ -42,6 +30,89 @@ const defaultSettings = {
42
30
  verifyFormBackgroundStyle: 'color',
43
31
  verifyFormVisibleFields: '["firstName","lastName","username","companyName","workEmail","phoneNumber","dateOfBirth"]',
44
32
  verifyFormShowSkipButton: false,
33
+ currentRoute: '/',
34
+ routeSettings: {
35
+ '/': {
36
+ layout: {
37
+ desktop: {
38
+ navigationMode: 'mixed',
39
+ sideMenuType: 'expanded',
40
+ contentWidth: 'Fluid',
41
+ fixedHeader: true,
42
+ fixedSidebar: true,
43
+ splitMenus: false,
44
+ upperMenuDividerName: 'Navigation',
45
+ middleMenuDividerName: 'Dashboard',
46
+ lowerMenuDividerName: 'Admin',
47
+ },
48
+ mobile: {
49
+ navigationMode: 'sidebar',
50
+ sideMenuType: 'collapsed',
51
+ contentWidth: 'Fluid',
52
+ fixedHeader: false,
53
+ fixedSidebar: false,
54
+ splitMenus: false,
55
+ upperMenuDividerName: 'Mobile Navigation',
56
+ middleMenuDividerName: 'Mobile Dashboard',
57
+ lowerMenuDividerName: 'Mobile Admin',
58
+ },
59
+ },
60
+ regions: {
61
+ desktop: {
62
+ header: {
63
+ showLogo: true,
64
+ showSearchSlot: true,
65
+ showRightContent: true,
66
+ showMenuToggle: true,
67
+ showBackButton: true,
68
+ showPageTitle: true,
69
+ showActionButtons: true,
70
+ position: 'fixed',
71
+ height: '64px',
72
+ backgroundColor: 'inherit',
73
+ elevation: 2,
74
+ showHeader: true,
75
+ showMenu: true,
76
+ menuHeaderRender: true,
77
+ searchBarRender: true,
78
+ searchBarBehavior: SearchBarBehavior.PERMANENT,
79
+ searchBarOverlay: true,
80
+ scrollThreshold: 50,
81
+ },
82
+ footer: {
83
+ showFooter: true,
84
+ },
85
+ },
86
+ mobile: {
87
+ header: {
88
+ showLogo: true,
89
+ showSearchSlot: false,
90
+ showRightContent: true,
91
+ showMenuToggle: true,
92
+ showBackButton: true,
93
+ showPageTitle: true,
94
+ showActionButtons: true,
95
+ position: 'fixed',
96
+ height: '56px',
97
+ backgroundColor: 'inherit',
98
+ elevation: 2,
99
+ showHeader: true,
100
+ showMenu: true,
101
+ menuHeaderRender: true,
102
+ searchBarRender: true,
103
+ searchBarBehavior: SearchBarBehavior.PERMANENT,
104
+ searchBarOverlay: true,
105
+ scrollThreshold: 50,
106
+ },
107
+ footer: {
108
+ showFooter: true,
109
+ },
110
+ },
111
+ },
112
+ },
113
+ },
114
+ components: [],
115
+ activeComponent: null,
45
116
  searchbarSettings: {
46
117
  enabledSearchBars: {
47
118
  HOTELS: true,
@@ -94,42 +165,18 @@ const defaultSettings = {
94
165
  datasources: true,
95
166
  },
96
167
  amenitiesList: [
97
- {
98
- name: 'WiFi',
99
- },
100
- {
101
- name: 'Pool',
102
- },
103
- {
104
- name: 'Parking',
105
- },
106
- {
107
- name: 'Air Conditioning',
108
- },
109
- {
110
- name: 'Kitchen',
111
- },
112
- {
113
- name: 'Washer',
114
- },
115
- {
116
- name: 'Dryer',
117
- },
118
- {
119
- name: 'TV',
120
- },
121
- {
122
- name: 'Gym',
123
- },
124
- {
125
- name: 'Elevator',
126
- },
127
- {
128
- name: 'Hot Tub',
129
- },
130
- {
131
- name: 'Breakfast',
132
- },
168
+ { name: 'WiFi' },
169
+ { name: 'Pool' },
170
+ { name: 'Parking' },
171
+ { name: 'Air Conditioning' },
172
+ { name: 'Kitchen' },
173
+ { name: 'Washer' },
174
+ { name: 'Dryer' },
175
+ { name: 'TV' },
176
+ { name: 'Gym' },
177
+ { name: 'Elevator' },
178
+ { name: 'Hot Tub' },
179
+ { name: 'Breakfast' },
133
180
  ],
134
181
  },
135
182
  showTypeSelector: true,
@@ -137,4 +184,7 @@ const defaultSettings = {
137
184
  showTravelPlanner: false,
138
185
  showAIAgent: true,
139
186
  },
187
+ siderBgColor: '#000000',
188
+ headerBgColor: '#000000',
189
+ textColor: '#a19c9c',
140
190
  };export{defaultSettings};//# sourceMappingURL=defaultSettings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"defaultSettings.js","sources":["../../src/config/defaultSettings.ts"],"sourcesContent":[null],"names":[],"mappings":"AAA+B,MAAA;AAE/B,IAAA,IAAY,EAAA,mEAA0B;IAClC,kBAAa;IACb,KAAgB,EAAA,SAAA;IAChB,YAAc,EAAA,SAAS;IACvB,YAAY,WAAO;IACnB,gBAAgB,SAAC;IACjB,MAAU,EAAA;IACV,YAAe,EAAA;IACf,WAAW,EAAE;IACb,WAAa,EAAA;IACb,eAAc;IACd,SAAY,EAAA;IACZ,KAAa,EAAA;IACb,WAAW;IACX,gBAAc,EAAA,IAAA;IACd,UAAS,WAAS;IAClB,QAAe,EAAA,OAAE;IACjB,UAAiB,EAAA,qBAAS;IAC1B,sBAAqB;IACrB,WAAoB,EAAA,MAAA;IACpB,aAAgB,EAAA;IAChB,cAAkB,EAAA;IAClB,UAAyB,EAAA,IAAA;IACzB,UAAuB,EAAA,IAAA;IACvB,QAAwB,EAAA,KAAA;;IAE1B,WAAA,EAAA,SAAA;AAEF,IAAA,YAAa,EAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"defaultSettings.js","sources":["../../src/config/defaultSettings.ts"],"sourcesContent":[null],"names":[],"mappings":"+EACyB,GAAA;AACzB,IAAA,IAAS,EAAA,mEAAkD;AAG3D,IAAA,SAAY,EAAA,OAAY;IACpB,KAAI,WAAS;IACb,YAAgB,EAAA;IAChB,YAAc,EAAA,SAAS;IACvB,yBAAmB;IACnB,MAAQ,EAAA;IACR,YAAY,SAAO;IACnB,WAAe,EAAA,IAAE;IACjB,WAAW,EAAE;IACb,SAAa,EAAA;IACb,KAAc,EAAA;IACd,WAAY,EAAA;IACZ,sBAAsB;IACtB,UAAS,WAAS;IAClB,iBAAc;IACd,UAAS,uBAAS;IAClB,eAAe,EAAE;IACjB,WAAiB,EAAA,MAAE;IACnB,aAAY,UAAS;IACrB,cAAoB,EAAA,KAAA;IACpB,WAAgB,EAAA;IAChB,eAAkB,EAAA;IAClB,iBAAyB,EAAA,QAAE;IAC3B,YAAuB,EAAA,8CAAS;IAChC,oBAAwB,EAAA,IAAE;IAC1B,gBAAiB,EAAA;IACjB,oBAAoB,EAAC;AACrB,IAAA,yB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AQ,EAAC,IAAA;wBACR,iBAAU,EAAA,IAAA;wBACZ,iBAAU;wBACF,MAAA,EAAA,MAAE;wBACH,0BAAU;wBACR,SAAA,EAAA,CAAA;wBACD,UAAA,EAAA;wBACD,QAAA,EAAA;wBACjB,gBAAA,EAAA,IAAA;AACF,wBAAQ,eAAA,EAAA,IAAA;wBACM,iBAAU,EAAA,iBAAA,CAAA,SAAA;wBACtB,gBAAA,EAAA,IAAA;wBACJ,eAAA,EAAA,EAAA;qBACJ;AACL,oBACH,MAAA,EAAA;wBACgB,UAAA,EAAA,IAAA;AAClB,qBAAiB;iBACnB;AAEF,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useLayoutSettings.d.ts","sourceRoot":"","sources":["../../src/hooks/useLayoutSettings.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,iBAAiB;;0BAuCP,GAAG;CA2CzB,CAAC"}
1
+ {"version":3,"file":"useLayoutSettings.d.ts","sourceRoot":"","sources":["../../src/hooks/useLayoutSettings.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,iBAAiB;;0BA2CP,GAAG;CA6CzB,CAAC"}
@@ -1,4 +1,4 @@
1
- import {useEffect,useCallback}from'react';import {useDispatch,useSelector}from'react-redux';import {CHANGE_SETTINGS_ACTION}from'../constants/constants.js';const updateColorWeak = (colorWeak) => {
1
+ import {useEffect,useCallback}from'react';import {useDispatch,useSelector}from'react-redux';import {merge,transform,isEqual,isObject}from'lodash-es';import {defaultSettings}from'../config/defaultSettings.js';import {CHANGE_SETTINGS_ACTION}from'../constants/constants.js';const updateColorWeak = (colorWeak) => {
2
2
  // @sri to avoid breaking during SSR, split into to checks
3
3
  if (typeof window !== 'undefined') {
4
4
  const root = document.getElementById('root');
@@ -7,6 +7,13 @@ import {useEffect,useCallback}from'react';import {useDispatch,useSelector}from'r
7
7
  }
8
8
  }
9
9
  };
10
+ const getDifference = (obj1, obj2) => {
11
+ return transform(obj1, (result, value, key) => {
12
+ if (!isEqual(value, obj2[key])) {
13
+ result[key] = isObject(value) && isObject(obj2[key]) ? getDifference(value, obj2[key]) : value;
14
+ }
15
+ });
16
+ };
10
17
  const useLayoutSettings = () => {
11
18
  const dispatch = useDispatch();
12
19
  const settings = useSelector((state) => state.settings);
@@ -33,30 +40,34 @@ const useLayoutSettings = () => {
33
40
  if (!response.ok) {
34
41
  throw new Error('Failed to fetch settings');
35
42
  }
36
- const result = await response.json();
37
- return result;
43
+ const diffSettings = await response.json();
44
+ // Merge the differences with default settings
45
+ const mergedSettings = merge({}, defaultSettings, diffSettings);
46
+ return mergedSettings;
38
47
  }
39
48
  catch (error) {
40
49
  console.error(error);
41
- return null;
50
+ // Return default settings if there's an error
51
+ return defaultSettings;
42
52
  }
43
53
  }, []);
44
54
  const setSettings = useCallback(async (config) => {
45
55
  const { colorWeak, contentWidth } = config;
46
56
  try {
47
- // @sri to avoid breaking during SSR, split into to checks
48
57
  if (settings.contentWidth !== contentWidth) {
49
58
  if (typeof window !== 'undefined') {
50
59
  window.dispatchEvent(new Event('resize'));
51
60
  }
52
61
  }
53
62
  updateColorWeak(!!colorWeak);
63
+ // Get only the differences between the new config and default settings
64
+ const diffConfig = getDifference(config, defaultSettings);
54
65
  const response = await fetch('/resources/settings', {
55
66
  method: 'POST',
56
67
  headers: {
57
68
  'Content-Type': 'application/json',
58
69
  },
59
- body: JSON.stringify({ config }),
70
+ body: JSON.stringify({ config: diffConfig }),
60
71
  });
61
72
  if (!response.ok) {
62
73
  throw new Error('Failed to update settings');
@@ -1 +1 @@
1
- {"version":3,"file":"useLayoutSettings.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"useLayoutSettings.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/lib/index.js CHANGED
@@ -1 +1 @@
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{HEADER_SEARCHBAR_FILL,HEADER_SEARCH_BUTTON_FILL,RIGHT_CONTENT_FILL,SCROLL_END_FILL}from'./constants/layout.js';export{languages}from'./constants/languages.js';export{dismissApplicationError,restoreApplicationError,setApplicationError}from'./redux/actions/error-actions.js';export{applicationErrors,initialErrorsState}from'./redux/reducers/error.js';export{settingsReducer}from'./redux/reducers/settings.js';export{store}from'./redux/store.js';export{useAppDispatch,useAppSelector}from'./redux/hooks.js';export{getMenuSeparation}from'./utils/seperatedMenus.js';export{useComponentSize,useIsomorphicLayoutEffect}from'./utils/componentSize.js';export{matchParentRoute}from'./utils/parentRoute.js';export{addProLayoutParentKeys,filterRoutesWithLocale,menuDataRender,removeUnnecessaryProperties,setLocale,transformData}from'./utils/menuUtils.js';export{getMatchMenuKeys}from'./utils/matchMenuKeys.js';export{getAntdLocale}from'./utils/getAntdLocale.js';export{generateMenuPath}from'./utils/generateMenuLink.js';export{ApplicationErrorHandlerCommon}from'./components/ApplicationErrorHandlerCommon.js';export{ErrorBoundaryCommon}from'./components/ErrorBoundaryCommon.js';export{ApplicationErrorFillWrapper}from'./components/ApplicationErrorFillWrapper.js';export{LayoutCookieProvider}from'./components/LayoutCookieProvider.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';export{config}from'./config/env-config.js';export{defaultSettings}from'./config/defaultSettings.js';export{ThemeProvider,getTheme}from'./antd-themes/ThemeProvider.js';export{airbnbDarkTheme}from'./antd-themes/airbnb-dark-theme.js';export{airbnbLightTheme}from'./antd-themes/airbnb-light-theme.js';export{colorList,getThemeColors}from'./antd-themes/colors.js';export{defaultDarkTheme}from'./antd-themes/default-dark-theme.js';export{defaultLightTheme}from'./antd-themes/default-light-theme.js';export{githubDarkTheme}from'./antd-themes/github-dark-theme.js';export{githubLightTheme}from'./antd-themes/github-light-theme.js';export{slackDarkTheme}from'./antd-themes/slack-dark-theme.js';export{slackLightTheme}from'./antd-themes/slack-light-theme.js';export{spotifyDarkTheme}from'./antd-themes/spotify-dark-theme.js';export{spotifyLightTheme}from'./antd-themes/spotify-light-theme.js';export{themeRegistry}from'./antd-themes/themeRegistry.js';export{useLayoutSettings}from'./hooks/useLayoutSettings.js';export{usePermissionAutoFetch,useSetting,useSettingsLoader}from'@adminide-stack/platform-client';export{ClientOnly}from'./hooks/Client-only.js';//# sourceMappingURL=index.js.map
1
+ export{SearchBarBehavior}from'./interfaces/settings.js';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{HEADER_SEARCHBAR_FILL,HEADER_SEARCH_BUTTON_FILL,RIGHT_CONTENT_FILL,SCROLL_END_FILL}from'./constants/layout.js';export{languages}from'./constants/languages.js';export{dismissApplicationError,restoreApplicationError,setApplicationError}from'./redux/actions/error-actions.js';export{applicationErrors,initialErrorsState}from'./redux/reducers/error.js';export{settingsReducer}from'./redux/reducers/settings.js';export{store}from'./redux/store.js';export{useAppDispatch,useAppSelector}from'./redux/hooks.js';export{getMenuSeparation}from'./utils/seperatedMenus.js';export{useComponentSize,useIsomorphicLayoutEffect}from'./utils/componentSize.js';export{matchParentRoute}from'./utils/parentRoute.js';export{addProLayoutParentKeys,filterRoutesWithLocale,menuDataRender,removeUnnecessaryProperties,setLocale,transformData}from'./utils/menuUtils.js';export{getMatchMenuKeys}from'./utils/matchMenuKeys.js';export{getAntdLocale}from'./utils/getAntdLocale.js';export{generateMenuPath}from'./utils/generateMenuLink.js';export{ApplicationErrorHandlerCommon}from'./components/ApplicationErrorHandlerCommon.js';export{ErrorBoundaryCommon}from'./components/ErrorBoundaryCommon.js';export{ApplicationErrorFillWrapper}from'./components/ApplicationErrorFillWrapper.js';export{LayoutCookieProvider}from'./components/LayoutCookieProvider.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';export{config}from'./config/env-config.js';export{defaultSettings}from'./config/defaultSettings.js';export{ThemeProvider,getTheme}from'./antd-themes/ThemeProvider.js';export{airbnbDarkTheme}from'./antd-themes/airbnb-dark-theme.js';export{airbnbLightTheme}from'./antd-themes/airbnb-light-theme.js';export{colorList,getThemeColors}from'./antd-themes/colors.js';export{defaultDarkTheme}from'./antd-themes/default-dark-theme.js';export{defaultLightTheme}from'./antd-themes/default-light-theme.js';export{githubDarkTheme}from'./antd-themes/github-dark-theme.js';export{githubLightTheme}from'./antd-themes/github-light-theme.js';export{slackDarkTheme}from'./antd-themes/slack-dark-theme.js';export{slackLightTheme}from'./antd-themes/slack-light-theme.js';export{spotifyDarkTheme}from'./antd-themes/spotify-dark-theme.js';export{spotifyLightTheme}from'./antd-themes/spotify-light-theme.js';export{themeRegistry}from'./antd-themes/themeRegistry.js';export{useLayoutSettings}from'./hooks/useLayoutSettings.js';export{usePermissionAutoFetch,useSetting,useSettingsLoader}from'@adminide-stack/platform-client';export{ClientOnly}from'./hooks/Client-only.js';//# sourceMappingURL=index.js.map
@@ -1 +1 @@
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{HEADER_SEARCHBAR_FILL,HEADER_SEARCH_BUTTON_FILL,RIGHT_CONTENT_FILL,SCROLL_END_FILL}from'./constants/layout.js';export{languages}from'./constants/languages.js';export{dismissApplicationError,restoreApplicationError,setApplicationError}from'./redux/actions/error-actions.js';export{applicationErrors,initialErrorsState}from'./redux/reducers/error.js';export{settingsReducer}from'./redux/reducers/settings.js';export{store}from'./redux/store.js';export{useAppDispatch,useAppSelector}from'./redux/hooks.js';export{getMenuSeparation}from'./utils/seperatedMenus.js';export{useComponentSize,useIsomorphicLayoutEffect}from'./utils/componentSize.js';export{matchParentRoute}from'./utils/parentRoute.js';export{addProLayoutParentKeys,filterRoutesWithLocale,menuDataRender,removeUnnecessaryProperties,setLocale,transformData}from'./utils/menuUtils.js';export{getMatchMenuKeys}from'./utils/matchMenuKeys.js';export{getAntdLocale}from'./utils/getAntdLocale.js';export{generateMenuPath}from'./utils/generateMenuLink.js';export{ApplicationErrorHandlerCommon}from'./components/ApplicationErrorHandlerCommon.js';export{ErrorBoundaryCommon}from'./components/ErrorBoundaryCommon.js';export{ApplicationErrorFillWrapper}from'./components/ApplicationErrorFillWrapper.js';export{LayoutCookieProvider}from'./components/LayoutCookieProvider.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';export{config}from'./config/env-config.js';export{defaultSettings}from'./config/defaultSettings.js';//# sourceMappingURL=index.native.js.map
1
+ export{SearchBarBehavior}from'./interfaces/settings.js';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{HEADER_SEARCHBAR_FILL,HEADER_SEARCH_BUTTON_FILL,RIGHT_CONTENT_FILL,SCROLL_END_FILL}from'./constants/layout.js';export{languages}from'./constants/languages.js';export{dismissApplicationError,restoreApplicationError,setApplicationError}from'./redux/actions/error-actions.js';export{applicationErrors,initialErrorsState}from'./redux/reducers/error.js';export{settingsReducer}from'./redux/reducers/settings.js';export{store}from'./redux/store.js';export{useAppDispatch,useAppSelector}from'./redux/hooks.js';export{getMenuSeparation}from'./utils/seperatedMenus.js';export{useComponentSize,useIsomorphicLayoutEffect}from'./utils/componentSize.js';export{matchParentRoute}from'./utils/parentRoute.js';export{addProLayoutParentKeys,filterRoutesWithLocale,menuDataRender,removeUnnecessaryProperties,setLocale,transformData}from'./utils/menuUtils.js';export{getMatchMenuKeys}from'./utils/matchMenuKeys.js';export{getAntdLocale}from'./utils/getAntdLocale.js';export{generateMenuPath}from'./utils/generateMenuLink.js';export{ApplicationErrorHandlerCommon}from'./components/ApplicationErrorHandlerCommon.js';export{ErrorBoundaryCommon}from'./components/ErrorBoundaryCommon.js';export{ApplicationErrorFillWrapper}from'./components/ApplicationErrorFillWrapper.js';export{LayoutCookieProvider}from'./components/LayoutCookieProvider.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';export{config}from'./config/env-config.js';export{defaultSettings}from'./config/defaultSettings.js';//# sourceMappingURL=index.native.js.map
@@ -4,4 +4,5 @@ export * from './typings';
4
4
  export * from './error-state';
5
5
  export * from './layout';
6
6
  export * from './searchbar-settings';
7
+ export * from './settings';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AACA,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AACA,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC"}
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  export type ContentWidth = 'Fluid' | 'Fixed';
2
3
  export type MenuTheme = 'light' | 'dark';
3
4
  export interface RenderSetting {
@@ -53,6 +54,10 @@ export interface PureSettings {
53
54
  * @description Set to false, only pageName is displayed in the layout, not pageName-title
54
55
  */
55
56
  title: string | false;
57
+ /**
58
+ * @name Logo URL for the header
59
+ */
60
+ logo?: string | React.ReactNode;
56
61
  /**
57
62
  * Your custom iconfont Symbol script Url
58
63
  * eg://at.alicdn.com/t/font_1039637_btcrd5co4w.js
@@ -75,7 +80,7 @@ export interface PureSettings {
75
80
  */
76
81
  splitMenus?: boolean;
77
82
  siderMenuType?: string;
78
- regions?: RenderSetting;
83
+ currentRoute?: string;
79
84
  routeSettings?: any;
80
85
  }
81
86
  export type ProSettings = PureSettings;
@@ -1 +1 @@
1
- {"version":3,"file":"pure-settings.d.ts","sourceRoot":"","sources":["../../src/interfaces/pure-settings.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,OAAO,CAAC;AAE7C,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAEzC,MAAM,WAAW,aAAa;IAC1B,UAAU,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC;IAC7B,eAAe,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC;IACzB,UAAU,CAAC,EAAE,KAAK,GAAG,GAAG,CAAC;IACzB,gBAAgB,CAAC,EAAE,KAAK,GAAG,GAAG,CAAC;IAC/B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,YAAY;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IAE9C;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,KAA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C;IAEtB,aAAa,CAAC,EAAE,GAAG,CAAC;CACvB;AAED,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC"}
@@ -0,0 +1,166 @@
1
+ import { ContentWidth } from './pure-settings';
2
+ export type ThemeColor = 'blue' | 'indigo' | 'red' | 'orange' | 'yellow' | 'teal' | 'green' | 'blue' | 'purple';
3
+ export type NavigationMode = 'sidebar' | 'topbar' | 'mixed';
4
+ export type SideMenuType = 'expanded' | 'collapsed';
5
+ export declare enum SearchBarBehavior {
6
+ PERMANENT = "permanent",
7
+ ON_SCROLL = "on-scroll"
8
+ }
9
+ export interface ComponentSettings {
10
+ id: string;
11
+ name: string;
12
+ settings: Record<string, any>;
13
+ }
14
+ export interface SettingsContext {
15
+ navTheme: 'light' | 'dark' | 'realDark';
16
+ primaryColor: string;
17
+ secondaryColor: string;
18
+ theme?: string;
19
+ logo: string;
20
+ showSettingPanel: boolean;
21
+ titleColor: string;
22
+ language: string;
23
+ fontFamily: string;
24
+ titleFontWeight: string;
25
+ titleHeight: string;
26
+ titleFontSize: string;
27
+ letterSpacings: string;
28
+ siderBgColor: string;
29
+ headerBgColor: string;
30
+ textColor: string;
31
+ themeType: string;
32
+ loginThemeColor: string;
33
+ loginFormPosition: string;
34
+ loginSocials: string;
35
+ loginBackgroundImage: string;
36
+ verifyFormLayout: string;
37
+ verifyFormImageUrl: string;
38
+ verifyFormBackgroundStyle: string;
39
+ verifyFormVisibleFields: string;
40
+ verifyFormShowSkipButton: boolean;
41
+ components: ComponentSettings[];
42
+ activeComponent?: string;
43
+ currentRoute?: string;
44
+ routeSettings: Record<string, {
45
+ layout?: {
46
+ desktop: {
47
+ navigationMode: NavigationMode;
48
+ sideMenuType: SideMenuType;
49
+ contentWidth: ContentWidth;
50
+ fixedHeader: boolean;
51
+ fixedSidebar: boolean;
52
+ splitMenus: boolean;
53
+ upperMenuDividerName?: string;
54
+ middleMenuDividerName?: string;
55
+ lowerMenuDividerName?: string;
56
+ };
57
+ mobile: {
58
+ navigationMode: NavigationMode;
59
+ sideMenuType: SideMenuType;
60
+ contentWidth: ContentWidth;
61
+ fixedHeader: boolean;
62
+ fixedSidebar: boolean;
63
+ splitMenus: boolean;
64
+ upperMenuDividerName?: string;
65
+ middleMenuDividerName?: string;
66
+ lowerMenuDividerName?: string;
67
+ };
68
+ };
69
+ regions?: {
70
+ desktop?: {
71
+ header?: {
72
+ showLogo?: boolean;
73
+ showSearchSlot?: boolean;
74
+ showRightContent?: boolean;
75
+ showMenuToggle?: boolean;
76
+ showBackButton?: boolean;
77
+ showPageTitle?: boolean;
78
+ showActionButtons?: boolean;
79
+ position?: 'fixed' | 'static';
80
+ height?: string;
81
+ backgroundColor?: string;
82
+ elevation?: number;
83
+ showHeader?: boolean;
84
+ showMenu?: boolean;
85
+ menuHeaderRender?: boolean;
86
+ searchBarRender?: boolean;
87
+ searchBarBehavior?: SearchBarBehavior;
88
+ searchBarOverlay?: boolean;
89
+ scrollThreshold?: number;
90
+ };
91
+ footer?: {
92
+ showFooter?: boolean;
93
+ };
94
+ };
95
+ mobile?: {
96
+ header?: {
97
+ showLogo?: boolean;
98
+ showSearchSlot?: boolean;
99
+ showRightContent?: boolean;
100
+ showMenuToggle?: boolean;
101
+ showBackButton?: boolean;
102
+ showPageTitle?: boolean;
103
+ showActionButtons?: boolean;
104
+ position?: 'fixed' | 'static';
105
+ height?: string;
106
+ backgroundColor?: string;
107
+ elevation?: number;
108
+ showHeader?: boolean;
109
+ showMenu?: boolean;
110
+ menuHeaderRender?: boolean;
111
+ searchBarRender?: boolean;
112
+ searchBarBehavior?: SearchBarBehavior;
113
+ searchBarOverlay?: boolean;
114
+ scrollThreshold?: number;
115
+ };
116
+ footer?: {
117
+ showFooter?: boolean;
118
+ };
119
+ };
120
+ };
121
+ }>;
122
+ }
123
+ export type UpdateEvent = {
124
+ type: 'UPDATE';
125
+ value?: Partial<SettingsContext>;
126
+ };
127
+ export type ComponentEvent = {
128
+ type: 'REGISTER_COMPONENT';
129
+ component: ComponentSettings;
130
+ } | {
131
+ type: 'UPDATE_COMPONENT_SETTINGS';
132
+ componentId: string;
133
+ settings: Record<string, any>;
134
+ } | {
135
+ type: 'SELECT_COMPONENT';
136
+ componentId: string;
137
+ } | {
138
+ type: 'CLEAR_COMPONENT_SELECTION';
139
+ };
140
+ export type MachineEvent = {
141
+ type: 'UPDATE';
142
+ value: Partial<SettingsContext>;
143
+ } | {
144
+ type: 'REGISTER_COMPONENT';
145
+ component: any;
146
+ } | {
147
+ type: 'UPDATE_COMPONENT_SETTINGS';
148
+ componentId: string;
149
+ settings: any;
150
+ } | {
151
+ type: 'SELECT_COMPONENT';
152
+ componentId: string;
153
+ } | {
154
+ type: 'CLEAR_COMPONENT_SELECTION';
155
+ } | {
156
+ type: 'RESET';
157
+ } | {
158
+ type: 'SAVE';
159
+ } | {
160
+ type: 'ROUTE_CHANGE';
161
+ pathname: string;
162
+ } | {
163
+ type: 'UPDATE_ROUTE_SETTINGS';
164
+ settings: Record<string, Partial<SettingsContext>>;
165
+ };
166
+ //# sourceMappingURL=settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/interfaces/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAChH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAC5D,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,WAAW,CAAC;AAEpD,oBAAY,iBAAiB;IACzB,SAAS,cAAc;IACvB,SAAS,cAAc;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ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,GACpB;IACI,IAAI,EAAE,oBAAoB,CAAC;IAC3B,SAAS,EAAE,iBAAiB,CAAC;CAChC,GACD;IACI,IAAI,EAAE,2BAA2B,CAAC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACjC,GACD;IACI,IAAI,EAAE,kBAAkB,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;CACvB,GACD;IACI,IAAI,EAAE,2BAA2B,CAAC;CACrC,CAAC;AAER,MAAM,MAAM,YAAY,GAClB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;CAAE,GACnD;IAAE,IAAI,EAAE,oBAAoB,CAAC;IAAC,SAAS,EAAE,GAAG,CAAA;CAAE,GAC9C;IAAE,IAAI,EAAE,2BAA2B,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,GAAG,CAAA;CAAE,GACzE;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GACjD;IAAE,IAAI,EAAE,2BAA2B,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GACjB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAC1C;IAAE,IAAI,EAAE,uBAAuB,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC,CAAA;CAAE,CAAC"}
@@ -0,0 +1,5 @@
1
+ var SearchBarBehavior;
2
+ (function (SearchBarBehavior) {
3
+ SearchBarBehavior["PERMANENT"] = "permanent";
4
+ SearchBarBehavior["ON_SCROLL"] = "on-scroll";
5
+ })(SearchBarBehavior || (SearchBarBehavior = {}));export{SearchBarBehavior};//# sourceMappingURL=settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.js","sources":["../../src/interfaces/settings.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAS,IAAA;AAET,CAAM,UAAA,iBAAmB,EAAA;AACzB,IAAM,6BAAuB,CAAA,GAAA,WAAoB;AACjD,IAAA,iBAAwB,CAAA,WAAa,CAAA,GAAA;AAErC,CAAA,EAAA,iBAAY,KAAiB,iBAAA,GAAA,EAAA,CAAA,CAAA"}
@@ -1,4 +1,4 @@
1
- import {CHANGE_LANGUAGE,CHANGE_SETTINGS_ACTION}from'../../constants/constants.js';import {config}from'../../config/env-config.js';import {cloneDeep}from'lodash-es';/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
1
+ import {CHANGE_LANGUAGE,CHANGE_SETTINGS_ACTION}from'../../constants/constants.js';import {config}from'../../config/env-config.js';import'../../config/defaultSettings.js';import {cloneDeep}from'lodash-es';/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
2
2
  /* eslint-disable no-case-declarations */
3
3
  // Note: We customize reducer part as AntPro uses inbuild way.
4
4
  const updateColorWeak = (colorWeak) => {
@@ -1 +1 @@
1
- {"version":3,"file":"settings.js","sources":["../../../src/redux/reducers/settings.ts"],"sourcesContent":[null],"names":[],"mappings":"oKAIA;AAiBA;AA6BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"settings.js","sources":["../../../src/redux/reducers/settings.ts"],"sourcesContent":[null],"names":[],"mappings":"4MAIA;AAiBA;AA6BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import {combineReducers,configureStore}from'@reduxjs/toolkit';import {applicationErrors}from'./reducers/error.js';import'../config/env-config.js';import'lodash-es';// Combine the reducers into an object
1
+ import {combineReducers,configureStore}from'@reduxjs/toolkit';import {applicationErrors}from'./reducers/error.js';import'../config/env-config.js';import'../config/defaultSettings.js';import'lodash-es';// Combine the reducers into an object
2
2
  const rootReducer = combineReducers({
3
3
  applicationErrors: applicationErrors, // Adding applicationErrors reducer
4
4
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@admin-layout/client",
3
- "version": "10.0.9-alpha.55",
3
+ "version": "10.0.9-alpha.59",
4
4
  "description": "Sample client for higher packages to depend on",
5
5
  "license": "ISC",
6
6
  "author": "CDMBase LLC",
@@ -37,7 +37,7 @@
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "75c51f5280d40e30fd0ab42b7790b5611982bc64",
40
+ "gitHead": "0ec2dd288c00e0abcd1b0e9a8738c9d9eb1050da",
41
41
  "typescript": {
42
42
  "definition": "lib/index.d.ts"
43
43
  }