@admin-layout/client 12.0.16-alpha.88 → 12.0.16-alpha.90

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":"useLayoutSettings.d.ts","sourceRoot":"","sources":["../../src/hooks/useLayoutSettings.ts"],"names":[],"mappings":"AAOA,wBAAgB,iBAAiB;;0BAgDV,GAAG,0BAA0B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;EA8DtE"}
1
+ {"version":3,"file":"useLayoutSettings.d.ts","sourceRoot":"","sources":["../../src/hooks/useLayoutSettings.ts"],"names":[],"mappings":"AAOA,wBAAgB,iBAAiB;;0BAgDV,GAAG,0BAA0B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;EA+DtE"}
@@ -40,7 +40,7 @@ import {useParams}from'@remix-run/react';import {useCallback}from'react';import
40
40
  try {
41
41
  // 1. Calculate payload first
42
42
  if (!currentChangedSetting || Object.keys(currentChangedSetting).length === 0) {
43
- console.log('⏭️ No changes to persist');
43
+ console.log('No changes to persist');
44
44
  return;
45
45
  }
46
46
  // 2. Apply UI side effects ONLY if relevant settings changed
@@ -49,12 +49,12 @@ import {useParams}from'@remix-run/react';import {useCallback}from'react';import
49
49
  if (contentWidth !== undefined &&
50
50
  settings.contentWidth !== contentWidth &&
51
51
  typeof window !== 'undefined') {
52
- console.log('📐 Content width changed, triggering resize');
52
+ console.log('Content width changed, triggering resize');
53
53
  window.dispatchEvent(new Event('resize'));
54
54
  }
55
55
  // Only update colorWeak if it changed
56
56
  if (colorWeak !== undefined && settings.colorWeak !== colorWeak) {
57
- console.log('🎨 Color weak mode changed');
57
+ console.log('Color weak mode changed');
58
58
  updateColorWeak(!!colorWeak);
59
59
  }
60
60
  // 3. Make API call
@@ -75,13 +75,14 @@ import {useParams}from'@remix-run/react';import {useCallback}from'react';import
75
75
  throw new Error('Failed to update settings');
76
76
  }
77
77
  // 4. update redux
78
+ const [_, changedPublicSetting] = Object.entries(currentChangedSetting)[0];
78
79
  dispatch({
79
80
  type: CHANGE_SETTINGS_ACTION,
80
- payload: config,
81
+ payload: changedPublicSetting,
81
82
  });
82
83
  }
83
84
  catch (error) {
84
- console.error('setSettings error:', error);
85
+ console.error('setSettings error:', error);
85
86
  return null;
86
87
  }
87
88
  }, [dispatch, settings]);
@@ -1 +1 @@
1
- {"version":3,"file":"useLayoutSettings.js","sources":["../../src/hooks/useLayoutSettings.ts"],"sourcesContent":[null],"names":[],"mappings":"uMAqHC,SAAA,iBAAA,GAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"useLayoutSettings.js","sources":["../../src/hooks/useLayoutSettings.ts"],"sourcesContent":[null],"names":[],"mappings":"uMAsHC,SAAA,iBAAA,GAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/redux/reducers/settings.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAanD,QAAA,MAAM,eAAe,GACjB,OAAO,GAAmB,EAC1B,mBAAwB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,eAAe,CAAA;CAAE,QAyBrE,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/redux/reducers/settings.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAanD,QAAA,MAAM,eAAe,GACjB,OAAO,GAAmB,EAC1B,mBAAwB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,eAAe,CAAA;CAAE,QAuBrE,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import {CHANGE_LANGUAGE,CHANGE_SETTINGS_ACTION}from'../../constants/constants.js';import {merge,cloneDeep}from'lodash-es';/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
1
+ import {merge,cloneDeep}from'lodash-es';import {CHANGE_LANGUAGE,CHANGE_SETTINGS_ACTION}from'../../constants/constants.js';/* 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) => {
@@ -21,10 +21,7 @@ const settingsReducer = (state = merge({}, {}), { type, payload = {} }) => {
21
21
  }
22
22
  }
23
23
  updateColorWeak(!!colorWeak);
24
- return {
25
- ...state,
26
- ...cloneDeep(payload),
27
- };
24
+ return merge({}, state, cloneDeep(payload));
28
25
  case CHANGE_LANGUAGE:
29
26
  return {
30
27
  ...state,
@@ -1 +1 @@
1
- {"version":3,"file":"settings.js","sources":["../../../src/redux/reducers/settings.ts"],"sourcesContent":[null],"names":[],"mappings":"0HAGA;AAaA;AAEsE;AA2BtE,MAAA,eAAS,GAAe,CAAA,SAAG,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"settings.js","sources":["../../../src/redux/reducers/settings.ts"],"sourcesContent":[null],"names":[],"mappings":"0HAIA;AAaA;AAEsE;AAyBtE,MAAA,eAAS,GAAe,CAAA,SAAG,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@admin-layout/client",
3
- "version": "12.0.16-alpha.88",
3
+ "version": "12.0.16-alpha.90",
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": "63553231c260d401e80db1d2c96ccd6ecce4a5ea"
47
+ "gitHead": "849c3620442e737e42537608d8ce9fae4f4f9b3a"
48
48
  }