@admin-layout/client 12.0.16-alpha.54 → 12.0.16-alpha.56

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 +1 @@
1
- {"version":3,"file":"UpdateSettings.server.d.ts","sourceRoot":"","sources":["../../../src/components/UpdateSettings/UpdateSettings.server.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,cAAc,4CAMzB,CAAC;AAGH,wBAAsB,0BAA0B,CAAC,OAAO,EAAE,OAAO,EAAE,kBAAkB,CAAC,EAAE,MAAM;;GAmF7F;AAED,wBAAsB,kBAAkB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE;;;;CAAA;;;GA0IpE"}
1
+ {"version":3,"file":"UpdateSettings.server.d.ts","sourceRoot":"","sources":["../../../src/components/UpdateSettings/UpdateSettings.server.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,cAAc,4CAMzB,CAAC;AAGH,wBAAsB,0BAA0B,CAAC,OAAO,EAAE,OAAO,EAAE,kBAAkB,CAAC,EAAE,MAAM;;GAoF7F;AAED,wBAAsB,kBAAkB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE;;;;CAAA;;;GAqIpE"}
@@ -1,4 +1,4 @@
1
- import {createCookie}from'@remix-run/node';import {ConfigCollectionName,ConfigFragmentName,ConfigurationSchemaId}from'common';import {GetPageSettingsDocument}from'common/graphql';import {merge}from'lodash-es';import {print}from'graphql';import {config}from'../../config/env-config.js';import'../../config/defaultSettings.js';import'react';import'@cdm-logger/client';import {compareAndSaveSettingsDifferences}from'../../utils/settingsDifference.js';import {assignDefaults}from'../../utils/assignDefaults.js';import {generateCdecodeUri,DEFAULT_TENANT_ID}from'@adminide-stack/core';const settingsCookie = createCookie('settings', {
1
+ import {createCookie}from'@remix-run/node';import {ConfigCollectionName,ConfigFragmentName,ConfigurationSchemaId}from'common';import {GetPageSettingsDocument}from'common/graphql';import {merge}from'lodash-es';import {print}from'graphql';import {config}from'../../config/env-config.js';import'../../config/defaultSettings.js';import'react';import'@cdm-logger/client';import {compareAndSaveSettingsDifferences}from'../../utils/settingsDifference.js';import {generateCdecodeUri,DEFAULT_CONTRIBUTION_TENANT_ID}from'@adminide-stack/core';const settingsCookie = createCookie('settings', {
2
2
  maxAge: 60 * 60 * 24 * 30, // 1 month
3
3
  httpOnly: false, // Allow client-side access
4
4
  sameSite: 'lax',
@@ -7,7 +7,7 @@ import {createCookie}from'@remix-run/node';import {ConfigCollectionName,ConfigFr
7
7
  });
8
8
  // Alternative: Direct fetch-based implementation (for testing/comparison)
9
9
  async function fetchPageSettingsWithFetch(request, overrideIdentifier) {
10
- const resource = generateCdecodeUri(DEFAULT_TENANT_ID, {
10
+ const resource = generateCdecodeUri(DEFAULT_CONTRIBUTION_TENANT_ID, {
11
11
  resourceType: ConfigCollectionName.Applications,
12
12
  resourceId: config.APPLICATION_ID,
13
13
  idField: 'appId',
@@ -19,6 +19,7 @@ async function fetchPageSettingsWithFetch(request, overrideIdentifier) {
19
19
  const options = {
20
20
  schemaId: ConfigurationSchemaId.UiLayout,
21
21
  target: 2 /* ConfigurationTarget.APPLICATION */,
22
+ configKey: 'uilayout',
22
23
  };
23
24
  // Add overrides if provided
24
25
  if (overrideIdentifier) {
@@ -30,7 +31,7 @@ async function fetchPageSettingsWithFetch(request, overrideIdentifier) {
30
31
  const variables = {
31
32
  resourceUri: resource,
32
33
  options,
33
- _timestamp: Date.now(), // Force cache bust
34
+ // _timestamp: Date.now(), // Force cache bust
34
35
  };
35
36
  console.log('🔍 Fetching settings with direct fetch to:', url);
36
37
  console.log('🔍 Query variables:', JSON.stringify(variables, null, 2));
@@ -84,57 +85,46 @@ async function settingsLoaderUtil({ request, context, params }) {
84
85
  // Fetch ALL settings for this device upfront (includes all route overrides)
85
86
  // Pass device-level override to get all route-specific overrides for this device
86
87
  const overrideIdentifier = `[${deviceType}]`;
87
- // Fetch settings with device override - this will include ALL route overrides for this device
88
- // Fetch settings from backend - choose method based on flag
89
- console.log('📡 Using direct fetch to get settings');
90
88
  const result = await fetchPageSettingsWithFetch(request, overrideIdentifier);
91
89
  console.log('RESULT=========>', JSON.stringify(result));
92
90
  const pageSettings = result?.data?.pageSettings?.settings
93
91
  ? JSON.parse(JSON.stringify(result?.data?.pageSettings?.settings))
94
92
  : null;
95
- // pageSettings now contains:
96
- // {
97
- // uilayout: { base config },
98
- // [/dashboard][mobile]: { overrides for /dashboard on mobile },
99
- // [/profile][mobile]: { overrides for /profile on mobile },
100
- // ... etc
101
- // }
102
- // Extract uilayout settings and preserve all other settings
103
- const uilayout = pageSettings?.uilayout;
104
- const hasUilayoutData = uilayout && typeof uilayout === 'object' && Object.keys(uilayout).length > 0;
105
- // Extract bracket pattern overrides (keys that start with [)
106
- const bracketOverrides = {};
107
- // Extract other top-level settings (like organization, etc.)
108
- const otherSettings = {};
109
- Object.keys(pageSettings || {}).forEach((key) => {
110
- if (key.startsWith('[') && key.endsWith(']')) {
111
- bracketOverrides[key] = pageSettings[key];
112
- }
113
- else if (key !== 'uilayout') {
114
- // Preserve other top-level settings like organization
115
- otherSettings[key] = pageSettings[key];
116
- }
117
- });
118
- let pageDefaultSettings = hasUilayoutData ? uilayout : pageSettings || {};
119
- console.log('🔍 DEBUG - bracketOverrides:', JSON.stringify(bracketOverrides, null, 2));
120
- console.log('🔍 DEBUG - otherSettings:', JSON.stringify(otherSettings, null, 2));
121
- // Structure the settings properly for the frontend
122
- // The frontend expects uiSettings.overrides to contain the bracket pattern overrides
123
- pageDefaultSettings = {
124
- ...pageDefaultSettings,
125
- ...otherSettings, // Add other top-level settings like organization
126
- uiSettings: {
127
- ...pageDefaultSettings.uiSettings,
128
- overrides: bracketOverrides, // Put bracket overrides in uiSettings.overrides
129
- },
130
- };
131
- console.log('🔍 DEBUG - final pageDefaultSettings:', JSON.stringify(pageDefaultSettings, null, 2));
93
+ // Object.keys(pageSettings || {}).forEach((key) => {
94
+ // if (key.startsWith('[') && key.endsWith(']')) {
95
+ // bracketOverrides[key] = pageSettings[key];
96
+ // } else if (key !== 'uilayout') {
97
+ // // Preserve other top-level settings like organization
98
+ // otherSettings[key] = pageSettings[key];
99
+ // }
100
+ // });
101
+ // let pageDefaultSettings = hasUilayoutData ? uilayout : pageSettings || {};
102
+ let pageDefaultSettings = pageSettings;
103
+ // console.log('🔍 DEBUG - bracketOverrides:', JSON.stringify(bracketOverrides, null, 2));
104
+ // console.log('🔍 DEBUG - otherSettings:', JSON.stringify(otherSettings, null, 2));
132
105
  // Add required keys that might not be in backend
133
106
  pageDefaultSettings = {
134
107
  ...pageDefaultSettings,
135
108
  hiddenMenuKeys: [],
136
109
  hiddenMenuCategories: [],
137
110
  };
111
+ // Structure the settings properly for the frontend
112
+ // The frontend expects uiSettings.overrides to contain the bracket pattern overrides
113
+ // pageDefaultSettings = {
114
+ // ...pageDefaultSettings,
115
+ // ...otherSettings, // Add other top-level settings like organization
116
+ // uiSettings: {
117
+ // ...pageDefaultSettings.uiSettings,
118
+ // overrides: bracketOverrides, // Put bracket overrides in uiSettings.overrides
119
+ // },
120
+ // };
121
+ console.log('🔍 DEBUG - final pageDefaultSettings:', JSON.stringify(pageDefaultSettings, null, 2));
122
+ // Add required keys that might not be in backend
123
+ // pageDefaultSettings = {
124
+ // ...pageDefaultSettings,
125
+ // hiddenMenuKeys: [],
126
+ // hiddenMenuCategories: [],
127
+ // };
138
128
  // Fallback to config.LAYOUT_SETTINGS if backend returns empty
139
129
  const settingsKeys = Object.keys(pageDefaultSettings);
140
130
  const hasOnlyDefaultKeys = settingsKeys.length === 2 &&
@@ -162,7 +152,6 @@ async function settingsLoaderUtil({ request, context, params }) {
162
152
  }
163
153
  });
164
154
  }
165
- assignDefaults(settings, pageDefaultSettings);
166
155
  }
167
156
  catch (error) {
168
157
  settings = null;
@@ -170,7 +159,6 @@ async function settingsLoaderUtil({ request, context, params }) {
170
159
  // Generate default settings if no cookie exists
171
160
  if (!settings) {
172
161
  const fullSettings = merge({}, pageDefaultSettings, config.LAYOUT_SETTINGS);
173
- assignDefaults(fullSettings, pageDefaultSettings);
174
162
  // Only store differences to keep cookie size small
175
163
  const diffSettings = await compareAndSaveSettingsDifferences(fullSettings, pageDefaultSettings);
176
164
  const cookie = await settingsCookie.serialize(diffSettings);
@@ -178,11 +166,6 @@ async function settingsLoaderUtil({ request, context, params }) {
178
166
  }
179
167
  // Merge settings: backend defaults + config + cookie overrides
180
168
  const fullSettings = merge({}, pageDefaultSettings, config.LAYOUT_SETTINGS, settings);
181
- // Remove any numeric keys that might have appeared during merge
182
- const numericKeysAfterMerge = Object.keys(fullSettings).filter((k) => /^\d+$/.test(k));
183
- numericKeysAfterMerge.forEach((key) => {
184
- delete fullSettings[key];
185
- });
186
169
  // Refresh the cookie to keep it active
187
170
  const cookie = await settingsCookie.serialize(settings);
188
171
  console.log('FULL_SETTINGS', fullSettings);
@@ -1 +1 @@
1
- {"version":3,"file":"UpdateSettings.server.js","sources":["../../../src/components/UpdateSettings/UpdateSettings.server.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAkPC,IAAA,QAAA,EAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"UpdateSettings.server.js","sources":["../../../src/components/UpdateSettings/UpdateSettings.server.ts"],"sourcesContent":[null],"names":[],"mappings":"qhBA+GqE,MAAA,cAAA,GAAA,YAAA,CAAA,UAAA,EAAA;;;AAqIpE,IAAA,QAAA,EAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,9 +2,9 @@ import {cleanEnv,str,json}from'envalid';import {getEnvironment}from'@common-stac
2
2
  const preConfig = cleanEnv(env, {
3
3
  LAYOUT_SETTINGS: json({
4
4
  default: JSON.stringify({
5
- // Empty defaults - all settings come from backend GraphQL query
6
- hiddenMenuKeys: [],
7
- hiddenMenuCategories: [],
5
+ // Empty defaults - all settings come from backend GraphQL query
6
+ // hiddenMenuKeys: [],
7
+ // hiddenMenuCategories: [],
8
8
  }),
9
9
  }),
10
10
  APP_DOMAIN: str({ default: 'cdebase.dev' }),
@@ -1 +1 @@
1
- {"version":3,"file":"useLayoutSettings.d.ts","sourceRoot":"","sources":["../../src/hooks/useLayoutSettings.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,iBAAiB;;0BAoCP,GAAG;;CAgEzB,CAAC"}
1
+ {"version":3,"file":"useLayoutSettings.d.ts","sourceRoot":"","sources":["../../src/hooks/useLayoutSettings.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,iBAAiB;;0BAgDP,GAAG;;CAmEzB,CAAC"}
@@ -9,7 +9,16 @@ import {useCallback}from'react';import {useDispatch,useSelector,shallowEqual}fro
9
9
  };
10
10
  const useLayoutSettings = () => {
11
11
  const dispatch = useDispatch();
12
- const settings = useSelector((state) => state.settings, shallowEqual);
12
+ useSelector((state) => state.settings, shallowEqual);
13
+ // Filter out machine internal state - settings are now flat (no uilayout wrapper)
14
+ const settings = useSelector((state) => {
15
+ const raw = state.settings;
16
+ if (!raw)
17
+ return {};
18
+ // Remove machine internal properties only
19
+ const { configModel, deviceType, currentRoute, changedSettings, ...cleaned } = raw;
20
+ return cleaned;
21
+ }, shallowEqual);
13
22
  const { orgName: orgNameFromParams } = useSelector((state) => ({
14
23
  orgName: state.platform.orgName,
15
24
  }), shallowEqual);
@@ -36,7 +45,9 @@ const useLayoutSettings = () => {
36
45
  }
37
46
  }, []);
38
47
  const setSettings = useCallback(async (config) => {
39
- const { colorWeak, contentWidth } = config;
48
+ // Settings are now flat (no uilayout wrapper)
49
+ const flatConfig = config;
50
+ const { colorWeak, contentWidth } = flatConfig;
40
51
  try {
41
52
  // Handle UI updates for special settings
42
53
  if (settings.contentWidth !== contentWidth) {
@@ -45,7 +56,7 @@ const useLayoutSettings = () => {
45
56
  }
46
57
  }
47
58
  updateColorWeak(!!colorWeak);
48
- const cleanDiffSettings = compareAndSaveSettingsDifferences(config, settings);
59
+ const cleanDiffSettings = compareAndSaveSettingsDifferences(flatConfig, settings);
49
60
  const response = await fetch('/resources/settings', {
50
61
  method: 'POST',
51
62
  headers: {
@@ -73,7 +84,7 @@ const useLayoutSettings = () => {
73
84
  const result = await response.json();
74
85
  const pageDefaultSettings = result;
75
86
  // Merge the full config with default settings before updating the store
76
- const mergedSettings = merge({}, pageDefaultSettings, config);
87
+ const mergedSettings = merge({}, pageDefaultSettings, flatConfig);
77
88
  dispatch({
78
89
  type: CHANGE_SETTINGS_ACTION,
79
90
  payload: mergedSettings,
@@ -1 +1 @@
1
- {"version":3,"file":"useLayoutSettings.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"useLayoutSettings.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=useLayoutSettings.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLayoutSettings.test.d.ts","sourceRoot":"","sources":["../../src/hooks/useLayoutSettings.test.ts"],"names":[],"mappings":""}
package/lib/index.js CHANGED
@@ -1 +1 @@
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{generateMenuPath}from'./utils/generateMenuLink.js';export{compareAndSaveSettingsDifferences}from'./utils/settingsDifference.js';export{assignDefaults}from'./utils/assignDefaults.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{AMENITIES,DEFAULT_HEADER,DEFAULT_LAYOUT,SEARCH_TYPES,SHARED_VIEW_CONFIG}from'./config/defaultSettings.js';export{useLayoutSettings}from'./hooks/useLayoutSettings.js';export{usePermissionAutoFetch,useSetting,useSettingsLoader}from'@adminide-stack/platform-client';export{ClientOnly}from'./hooks/Client-only.js';export{blue}from'./colors/presets/blue.js';export{brinkPink}from'./colors/presets/brinkPink.js';export{cyan}from'./colors/presets/cyan.js';export{green}from'./colors/presets/green.js';export{lime}from'./colors/presets/lime.js';export{orange}from'./colors/presets/orange.js';export{pink}from'./colors/presets/pink.js';export{purple}from'./colors/presets/purple.js';export{red}from'./colors/presets/red.js';export{skyBlue}from'./colors/presets/skyBlue.js';export{turquoise}from'./colors/presets/turquoise.js';export{yellow}from'./colors/presets/yellow.js';export{white}from'./colors/presets/white.js';export{black}from'./colors/presets/black.js';export{colorList,getThemeColors}from'./colors/colorsList.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{generateMenuPath}from'./utils/generateMenuLink.js';export{compareAndSaveSettingsDifferences}from'./utils/settingsDifference.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{AMENITIES,DEFAULT_HEADER,DEFAULT_LAYOUT,SEARCH_TYPES,SHARED_VIEW_CONFIG}from'./config/defaultSettings.js';export{useLayoutSettings}from'./hooks/useLayoutSettings.js';export{usePermissionAutoFetch,useSetting,useSettingsLoader}from'@adminide-stack/platform-client';export{ClientOnly}from'./hooks/Client-only.js';export{blue}from'./colors/presets/blue.js';export{brinkPink}from'./colors/presets/brinkPink.js';export{cyan}from'./colors/presets/cyan.js';export{green}from'./colors/presets/green.js';export{lime}from'./colors/presets/lime.js';export{orange}from'./colors/presets/orange.js';export{pink}from'./colors/presets/pink.js';export{purple}from'./colors/presets/purple.js';export{red}from'./colors/presets/red.js';export{skyBlue}from'./colors/presets/skyBlue.js';export{turquoise}from'./colors/presets/turquoise.js';export{yellow}from'./colors/presets/yellow.js';export{white}from'./colors/presets/white.js';export{black}from'./colors/presets/black.js';export{colorList,getThemeColors}from'./colors/colorsList.js';//# sourceMappingURL=index.js.map
@@ -1 +1 @@
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{generateMenuPath}from'./utils/generateMenuLink.js';export{compareAndSaveSettingsDifferences}from'./utils/settingsDifference.js';export{assignDefaults}from'./utils/assignDefaults.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{AMENITIES,DEFAULT_HEADER,DEFAULT_LAYOUT,SEARCH_TYPES,SHARED_VIEW_CONFIG}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{generateMenuPath}from'./utils/generateMenuLink.js';export{compareAndSaveSettingsDifferences}from'./utils/settingsDifference.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{AMENITIES,DEFAULT_HEADER,DEFAULT_LAYOUT,SEARCH_TYPES,SHARED_VIEW_CONFIG}from'./config/defaultSettings.js';//# sourceMappingURL=index.native.js.map
@@ -122,7 +122,7 @@ export interface SettingsContext {
122
122
  }>;
123
123
  }
124
124
  export type UpdateEvent = {
125
- type: 'UPDATE';
125
+ type: 'UISETTING_UPDATE';
126
126
  value?: Partial<SettingsContext>;
127
127
  };
128
128
  export type ComponentEvent = {
@@ -139,7 +139,7 @@ export type ComponentEvent = {
139
139
  type: 'CLEAR_COMPONENT_SELECTION';
140
140
  };
141
141
  export type MachineEvent = {
142
- type: 'UPDATE';
142
+ type: 'UISETTING_UPDATE';
143
143
  value: Partial<SettingsContext>;
144
144
  } | {
145
145
  type: 'REGISTER_COMPONENT';
@@ -154,14 +154,14 @@ export type MachineEvent = {
154
154
  } | {
155
155
  type: 'CLEAR_COMPONENT_SELECTION';
156
156
  } | {
157
- type: 'RESET';
157
+ type: 'UISETTING_RESET';
158
158
  } | {
159
159
  type: 'SAVE';
160
160
  } | {
161
- type: 'ROUTE_CHANGE';
161
+ type: 'UISETTING_ROUTE_CHANGE';
162
162
  pathname: string;
163
163
  } | {
164
- type: 'UPDATE_ROUTE_SETTINGS';
164
+ type: 'UISETTING_UPDATE_ROUTE_SETTINGS';
165
165
  settings: Record<string, Partial<SettingsContext>>;
166
166
  };
167
167
  //# sourceMappingURL=settings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.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WAAW,EAAE,MAAM,CAAC;CACvB,GACD;IACI,IAAI,EAAE,2BAA2B,CAAC;CACrC,CAAC;AAER,MAAM,MAAM,YAAY,GAClB;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;CAAE,GAC7D;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,iBAAiB,CAAA;CAAE,GAC3B;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,wBAAwB,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACpD;IAAE,IAAI,EAAE,iCAAiC,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC,CAAA;CAAE,CAAC"}
@@ -7,5 +7,4 @@ export interface DefaultsObject {
7
7
  * @param target - The target object to assign defaults to
8
8
  * @param source - The source object containing the structure and default values
9
9
  */
10
- export declare function assignDefaults(target: DefaultsObject, source: DefaultsObject): void;
11
10
  //# sourceMappingURL=assignDefaults.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"assignDefaults.d.ts","sourceRoot":"","sources":["../../src/utils/assignDefaults.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,cAAc,GAAG,IAAI,CA6JnF"}
1
+ {"version":3,"file":"assignDefaults.d.ts","sourceRoot":"","sources":["../../src/utils/assignDefaults.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAED;;;;;GAKG"}
@@ -1,2 +1 @@
1
- export {};
2
1
  //# sourceMappingURL=assignDefaults.test.d.ts.map
@@ -5,5 +5,4 @@ export * from './menuUtils';
5
5
  export * from './matchMenuKeys';
6
6
  export * from './generateMenuLink';
7
7
  export * from './settingsDifference';
8
- export * from './assignDefaults';
9
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@admin-layout/client",
3
- "version": "12.0.16-alpha.54",
3
+ "version": "12.0.16-alpha.56",
4
4
  "description": "Sample client for higher packages to depend on",
5
5
  "license": "ISC",
6
6
  "author": "CDMBase LLC",
@@ -44,5 +44,5 @@
44
44
  "typescript": {
45
45
  "definition": "lib/index.d.ts"
46
46
  },
47
- "gitHead": "a009e644fb9ee783d87c64481421affe38fb6fae"
47
+ "gitHead": "9d608c873fdf63cf3ffd982a8304ecbcad0b92f8"
48
48
  }
@@ -1,166 +0,0 @@
1
- /**
2
- * Recursively assigns default values only for non-existent keys in target object,
3
- * based on source object structure. Does not modify any existing values in target.
4
- * @param target - The target object to assign defaults to
5
- * @param source - The source object containing the structure and default values
6
- */
7
- function assignDefaults(target, source) {
8
- // Special handling for routeSettings to ensure all routes have complete structure
9
- if (source?.routeSettings && target.routeSettings) {
10
- const rootRoute = source.routeSettings['/'];
11
- if (rootRoute) {
12
- Object.keys(target.routeSettings).forEach((route) => {
13
- const currentRoute = target.routeSettings[route];
14
- // Handle layout
15
- if (!currentRoute.layout) {
16
- currentRoute.layout = {
17
- desktop: { ...rootRoute.layout.desktop },
18
- mobile: { ...rootRoute.layout.mobile },
19
- };
20
- }
21
- else {
22
- if (!currentRoute.layout.desktop) {
23
- currentRoute.layout.desktop = { ...rootRoute.layout.desktop };
24
- }
25
- else {
26
- Object.keys(rootRoute.layout.desktop).forEach((key) => {
27
- if (!(key in currentRoute.layout.desktop)) {
28
- currentRoute.layout.desktop[key] = rootRoute.layout.desktop[key];
29
- }
30
- });
31
- }
32
- if (!currentRoute.layout.mobile) {
33
- currentRoute.layout.mobile = { ...rootRoute.layout.mobile };
34
- }
35
- else {
36
- Object.keys(rootRoute.layout.mobile).forEach((key) => {
37
- if (!(key in currentRoute.layout.mobile)) {
38
- currentRoute.layout.mobile[key] = rootRoute.layout.mobile[key];
39
- }
40
- });
41
- }
42
- }
43
- // Handle regions
44
- if (!currentRoute.regions) {
45
- currentRoute.regions = {
46
- desktop: {
47
- header: { ...rootRoute.regions.desktop.header },
48
- background: { ...rootRoute.regions.desktop.background },
49
- footer: { ...rootRoute.regions.desktop.footer },
50
- },
51
- mobile: {
52
- header: { ...rootRoute.regions.mobile.header },
53
- background: { ...rootRoute.regions.mobile.background },
54
- footer: { ...rootRoute.regions.mobile.footer },
55
- },
56
- };
57
- }
58
- else {
59
- // Handle desktop regions
60
- if (!currentRoute.regions.desktop) {
61
- currentRoute.regions.desktop = {
62
- header: { ...rootRoute.regions.desktop.header },
63
- background: { ...rootRoute.regions.desktop.background },
64
- footer: { ...rootRoute.regions.desktop.footer },
65
- };
66
- }
67
- else {
68
- // Handle desktop header
69
- if (!currentRoute.regions.desktop.header) {
70
- currentRoute.regions.desktop.header = { ...rootRoute.regions.desktop.header };
71
- }
72
- else {
73
- Object.keys(rootRoute.regions.desktop.header).forEach((key) => {
74
- if (!(key in currentRoute.regions.desktop.header)) {
75
- currentRoute.regions.desktop.header[key] = rootRoute.regions.desktop.header[key];
76
- }
77
- });
78
- }
79
- // Handle desktop background
80
- if (!currentRoute.regions.desktop.background) {
81
- currentRoute.regions.desktop.background = { ...rootRoute.regions.desktop.background };
82
- }
83
- else {
84
- Object.keys(rootRoute.regions.desktop.background).forEach((key) => {
85
- if (!(key in currentRoute.regions.desktop.background)) {
86
- currentRoute.regions.desktop.background[key] =
87
- rootRoute.regions.desktop.background[key];
88
- }
89
- });
90
- }
91
- // Handle desktop footer
92
- if (!currentRoute.regions.desktop.footer) {
93
- currentRoute.regions.desktop.footer = { ...rootRoute.regions.desktop.footer };
94
- }
95
- else {
96
- Object.keys(rootRoute.regions.desktop.footer).forEach((key) => {
97
- if (!(key in currentRoute.regions.desktop.footer)) {
98
- currentRoute.regions.desktop.footer[key] = rootRoute.regions.desktop.footer[key];
99
- }
100
- });
101
- }
102
- }
103
- // Handle mobile regions
104
- if (!currentRoute.regions.mobile) {
105
- currentRoute.regions.mobile = {
106
- header: { ...rootRoute.regions.mobile.header },
107
- background: { ...rootRoute.regions.mobile.background },
108
- footer: { ...rootRoute.regions.mobile.footer },
109
- };
110
- }
111
- else {
112
- // Handle mobile header
113
- if (!currentRoute.regions.mobile.header) {
114
- currentRoute.regions.mobile.header = { ...rootRoute.regions.mobile.header };
115
- }
116
- else {
117
- Object.keys(rootRoute.regions.mobile.header).forEach((key) => {
118
- if (!(key in currentRoute.regions.mobile.header)) {
119
- currentRoute.regions.mobile.header[key] = rootRoute.regions.mobile.header[key];
120
- }
121
- });
122
- }
123
- // Handle mobile background
124
- if (!currentRoute.regions.mobile.background) {
125
- currentRoute.regions.mobile.background = { ...rootRoute.regions.mobile.background };
126
- }
127
- else {
128
- Object.keys(rootRoute.regions.mobile.background).forEach((key) => {
129
- if (!(key in currentRoute.regions.mobile.background)) {
130
- currentRoute.regions.mobile.background[key] =
131
- rootRoute.regions.mobile.background[key];
132
- }
133
- });
134
- }
135
- // Handle mobile footer
136
- if (!currentRoute.regions.mobile.footer) {
137
- currentRoute.regions.mobile.footer = { ...rootRoute.regions.mobile.footer };
138
- }
139
- else {
140
- Object.keys(rootRoute.regions.mobile.footer).forEach((key) => {
141
- if (!(key in currentRoute.regions.mobile.footer)) {
142
- currentRoute.regions.mobile.footer[key] = rootRoute.regions.mobile.footer[key];
143
- }
144
- });
145
- }
146
- }
147
- }
148
- });
149
- }
150
- }
151
- Object.keys(source).forEach((key) => {
152
- if (!(key in target)) {
153
- // Only assign default if the key doesn't exist
154
- target[key] = source[key];
155
- }
156
- else if (typeof source[key] === 'object' &&
157
- source[key] !== null &&
158
- !Array.isArray(source[key]) &&
159
- typeof target[key] === 'object' &&
160
- target[key] !== null &&
161
- !Array.isArray(target[key])) {
162
- // Recursively assign for nested objects
163
- assignDefaults(target[key], source[key]);
164
- }
165
- });
166
- }export{assignDefaults};//# sourceMappingURL=assignDefaults.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"assignDefaults.js","sources":["../../src/utils/assignDefaults.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACI;AACH;AAED;;;;;AAKG,IAAA,IAAA,MAAA,EAAA,aAAA,IAAA,MAAA,CAAA,aAAA,EAAA;AACH,QAAA,MAAA,SAAA,GAAgB,MAAA,CAAA,aAAqB,CAAE,GAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}