@admin-layout/client 12.0.16-alpha.91 → 12.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/components/ApplicationErrorFillWrapper.d.ts +2 -1
- package/lib/components/ApplicationErrorFillWrapper.d.ts.map +1 -1
- package/lib/components/ApplicationErrorFillWrapper.js +2 -2
- package/lib/components/ApplicationErrorHandlerCommon.js +8 -6
- package/lib/components/ApplicationErrorHandlerCommon.js.map +1 -1
- package/lib/components/ErrorBoundaryCommon.d.ts +1 -1
- package/lib/components/ErrorBoundaryCommon.js +2 -2
- package/lib/components/ErrorBoundaryCommon.js.map +1 -1
- package/lib/components/LayoutCookieProvider.js +2 -2
- package/lib/components/LayoutCookieProvider.js.map +1 -1
- package/lib/components/UpdateSettings/UpdateSettings.server.d.ts +1 -1
- package/lib/components/UpdateSettings/UpdateSettings.server.d.ts.map +1 -1
- package/lib/hooks/Client-only.d.ts +1 -1
- package/lib/hooks/Client-only.d.ts.map +1 -1
- package/lib/hooks/Client-only.js +2 -2
- package/lib/hooks/Client-only.js.map +1 -1
- package/lib/hooks/useLayoutSettings.d.ts.map +1 -1
- package/lib/hooks/useLayoutSettings.js +0 -3
- package/lib/hooks/useLayoutSettings.js.map +1 -1
- package/lib/themes/templates/darkLayoutTheme.d.ts +1 -1
- package/lib/themes/templates/darkLayoutTheme.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const ApplicationErrorFillWrapper: (props: any) => React.JSX.Element;
|
|
2
3
|
//# sourceMappingURL=ApplicationErrorFillWrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationErrorFillWrapper.d.ts","sourceRoot":"","sources":["../../src/components/ApplicationErrorFillWrapper.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApplicationErrorFillWrapper.d.ts","sourceRoot":"","sources":["../../src/components/ApplicationErrorFillWrapper.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,eAAO,MAAM,2BAA2B,GAAI,UAAK,sBAEhD,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
return
|
|
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) => {
|
|
2
|
+
return React.createElement(Fill, { ...props, name: APPLICATION_ERROR_SLOT_FILL });
|
|
3
3
|
};export{ApplicationErrorFillWrapper};//# sourceMappingURL=ApplicationErrorFillWrapper.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
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';/**
|
|
2
2
|
* ApplicationErrorSlot is needed for mobile. Since for mobile
|
|
3
3
|
* we import Slot from @common-stack/react-mobile. The default
|
|
4
4
|
* Slot under RenderApplicationErrorSlot works for browser
|
|
@@ -14,12 +14,14 @@ const ApplicationErrorHandlerCommon = (FallbackComponent, ApplicationErrorSlot,
|
|
|
14
14
|
const errors = applicationErrors?.filter((error) => !!plugins.find((plugin) => plugin.name === error?.pluginName));
|
|
15
15
|
const backendError = useSelector(backendErrorSelector);
|
|
16
16
|
const RenderApplicationErrorSlot = (props) => {
|
|
17
|
-
return !!ApplicationErrorSlot ?
|
|
17
|
+
return !!ApplicationErrorSlot ? React__default.createElement(ApplicationErrorSlot, { ...props }) : React__default.createElement(Slot, { ...props });
|
|
18
18
|
};
|
|
19
19
|
if (!!RendererComponent) {
|
|
20
|
-
return
|
|
20
|
+
return React__default.createElement(RendererComponent, { applicationErrors: errors, backendError: backendError });
|
|
21
21
|
}
|
|
22
|
-
return (
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
23
|
+
!!backendError ? React__default.createElement(FallbackComponent, { error: backendError }) : null,
|
|
24
|
+
!!errors?.length
|
|
25
|
+
? React__default.createElement(RenderApplicationErrorSlot, { name: APPLICATION_ERROR_SLOT_FILL, fillProps: { active: true, applicationErrors: errors } })
|
|
26
|
+
: children));
|
|
25
27
|
};export{ApplicationErrorHandlerCommon};//# sourceMappingURL=ApplicationErrorHandlerCommon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationErrorHandlerCommon.js","sources":["../../src/components/ApplicationErrorHandlerCommon.tsx"],"sourcesContent":[null],"names":["
|
|
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;UACT,iBAAgB,GAAA,WAAA,CAAA,CAAA,KAAA,KAAA,KAAA,EAAA,iBAAA,CAAA;UAChB,MAAA,GAAA,iBAAmB,EAAA,MAAA,CAAA,CAAA,KAAuB,KAAA,CAAA,CAAA,OAAA,CAAA,IAAA,CAAA,CAAA,MAAA,KAAA,MAAA,CAAA,IAAA,KAAA,KAAA,EAAA,UAAA,CAAA,CAAA;UAC3C,YAAA,GAAA,WAAA,CAAA,oBAAA,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;;;;;;;;;;AAUG"}
|
|
@@ -18,7 +18,7 @@ export declare class ErrorBoundaryCommon extends React.Component<IErrorBoundryPr
|
|
|
18
18
|
};
|
|
19
19
|
componentDidCatch(error: Error): void;
|
|
20
20
|
componentDidUpdate(prevProps: Readonly<IErrorBoundryProps>, prevState: Readonly<IErrorBoundryState>): void;
|
|
21
|
-
render():
|
|
21
|
+
render(): React.JSX.Element;
|
|
22
22
|
}
|
|
23
23
|
export {};
|
|
24
24
|
//# sourceMappingURL=ErrorBoundaryCommon.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from'react';import {logger}from'@cdm-logger/client';class ErrorBoundaryCommon extends React__default.Component {
|
|
2
2
|
constructor(props) {
|
|
3
3
|
super(props);
|
|
4
4
|
this.state = { hasError: false, error: null };
|
|
@@ -17,7 +17,7 @@ import {jsx}from'react/jsx-runtime';import React from'react';import {logger}from
|
|
|
17
17
|
render() {
|
|
18
18
|
if (this.state.hasError) {
|
|
19
19
|
const FallbackComponent = this.props.fallbackComponent;
|
|
20
|
-
return
|
|
20
|
+
return React__default.createElement(FallbackComponent, { error: this.state.error });
|
|
21
21
|
}
|
|
22
22
|
return this.props.children;
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundaryCommon.js","sources":["../../src/components/ErrorBoundaryCommon.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorBoundaryCommon.js","sources":["../../src/components/ErrorBoundaryCommon.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"0EAG4B,MAAQ,mBAAU,SAAAA,cAAA,CAAA,SAAA,CAAA;AAAC,IAAA,WAAO,CAAK,KAAG,EAAI;QAAG,KAAA,CAAA,KAAA,CAAA;AACrE,uBAAuB,QAAG,EAAA,KAAA,EAAA,KAAA,EAAA,IAAA,EAAA;IACtB;IACA,OAAA,wBAAuB,CAAA,KAAA,EAAA;QACvB,OAAA,EAAA,QAAoB,EAAA,IAAO,EAAA,KAAA,EAAA;;AAAgB,IAAA,kBAAiB,KAAC,EAAA;QAC/D,MAAA,CAAA,KAAA,CAAA,KAAA,CAAA;AAEF,IAAA;AACgB,IAAA,mBAAO,SAAA,EAAA,SAAkB,EAAA;AAKrC,QAAA,IAAO,SAAA,EAAA,QAAA,KAAyB,IAAA,CAAK,KAAE,EAAK,QAAA,EAAA;;;;IAI5C,MAAA,GAAA;AAIA,QAAA,IAAA,IAAA,CAAA,KAAkB,CAAC,QAAA,EAAS;YAMtB,MAAA,iBAAA,GAAA,IAAA,CAAA,KAAA,CAAA,iBAAA;AAOT,YAAA,OAAAA,cAAA,CAAA,aAAA,CAAA,iBAAA,EAAA,EAAA,KAAA,EAAA,IAAA,CAAA,KAAA,CAAA,KAAA,EAAA,CAAA;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {useRouteLoaderData}from'@remix-run/react';import React__default,{useRef,useEffect}from'react';import {useDispatch}from'react-redux';import {CHANGE_SETTINGS_ACTION}from'../constants/constants.js';function LayoutCookieProvider({ children }) {
|
|
2
2
|
const routeData = useRouteLoaderData('root');
|
|
3
3
|
const settings = routeData?.settings?.settings || routeData?.settings;
|
|
4
4
|
const dispatch = useDispatch();
|
|
@@ -21,5 +21,5 @@ import {jsx,Fragment}from'react/jsx-runtime';import {useRouteLoaderData}from'@re
|
|
|
21
21
|
});
|
|
22
22
|
hasDispatched.current = true;
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return React__default.createElement(React__default.Fragment, null, children);
|
|
25
25
|
}export{LayoutCookieProvider};//# sourceMappingURL=LayoutCookieProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutCookieProvider.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"LayoutCookieProvider.js","sources":["../../src/components/LayoutCookieProvider.tsx"],"sourcesContent":[null],"names":[],"mappings":"2MASA,SAAA,oBAAgB,CAAA,EAAA,QAAuB,EAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* - Client-side accessible for dynamic UI updates
|
|
5
5
|
* - Domain-scoped in production for subdomain sharing
|
|
6
6
|
*/
|
|
7
|
-
export declare const settingsCookie: import("@remix-run/
|
|
7
|
+
export declare const settingsCookie: import("@remix-run/node").Cookie;
|
|
8
8
|
/**
|
|
9
9
|
* Fetches page settings from GraphQL backend with device/route-specific overrides
|
|
10
10
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateSettings.server.d.ts","sourceRoot":"","sources":["../../../src/components/UpdateSettings/UpdateSettings.server.ts"],"names":[],"mappings":"AAgBA;;;;;GAKG;AACH,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"UpdateSettings.server.d.ts","sourceRoot":"","sources":["../../../src/components/UpdateSettings/UpdateSettings.server.ts"],"names":[],"mappings":"AAgBA;;;;;GAKG;AACH,eAAO,MAAM,cAAc,kCAMzB,CAAC;AAEH;;;;;;;;;;;GAWG;AACH,wBAAsB,0BAA0B,CAAC,OAAO,EAAE,OAAO,EAAE,kBAAkB,CAAC,EAAE,MAAM;;GAuF7F;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAsB,kBAAkB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE;;;;CAAA;;;GA8GpE;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAQrE"}
|
|
@@ -23,6 +23,6 @@ type Props = {
|
|
|
23
23
|
* );
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
|
-
export declare function ClientOnly({ children, fallback }: Props):
|
|
26
|
+
export declare function ClientOnly({ children, fallback }: Props): React.JSX.Element;
|
|
27
27
|
export {};
|
|
28
28
|
//# sourceMappingURL=Client-only.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client-only.d.ts","sourceRoot":"","sources":["../../src/hooks/Client-only.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,KAAK,GAAG;IACT;;;;OAIG;IACH,QAAQ,IAAI,KAAK,CAAC,SAAS,CAAC;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,QAAe,EAAE,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"Client-only.d.ts","sourceRoot":"","sources":["../../src/hooks/Client-only.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,KAAK,GAAG;IACT;;;;OAIG;IACH,QAAQ,IAAI,KAAK,CAAC,SAAS,CAAC;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,QAAe,EAAE,EAAE,KAAK,qBAE9D"}
|
package/lib/hooks/Client-only.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as React from'react';import {useHydrated}from'./use-hydrated.js';/**
|
|
2
2
|
* Render the children only after the JS has loaded client-side. Use an optional
|
|
3
3
|
* fallback component if the JS is not yet loaded.
|
|
4
4
|
*
|
|
@@ -14,5 +14,5 @@ import {jsx,Fragment}from'react/jsx-runtime';import {useHydrated}from'./use-hydr
|
|
|
14
14
|
* ```
|
|
15
15
|
*/
|
|
16
16
|
function ClientOnly({ children, fallback = null }) {
|
|
17
|
-
return useHydrated() ?
|
|
17
|
+
return useHydrated() ? React.createElement(React.Fragment, null, children()) : React.createElement(React.Fragment, null, fallback);
|
|
18
18
|
}export{ClientOnly};//# sourceMappingURL=Client-only.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client-only.js","sources":["../../src/hooks/Client-only.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Client-only.js","sources":["../../src/hooks/Client-only.tsx"],"sourcesContent":[null],"names":[],"mappings":"wEAII;;;;AAIG;AACH;AACA;;AAGJ;;;;;;;;;"}
|
|
@@ -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;;
|
|
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;;EA2DtE"}
|
|
@@ -36,7 +36,6 @@ import {useParams}from'@remix-run/react';import {useCallback}from'react';import
|
|
|
36
36
|
}
|
|
37
37
|
}, []);
|
|
38
38
|
const setSettings = useCallback(async (config, currentChangedSetting) => {
|
|
39
|
-
console.log('3️⃣ setSetting called', { config, currentChangedSetting });
|
|
40
39
|
try {
|
|
41
40
|
// 1. Calculate payload first
|
|
42
41
|
if (!currentChangedSetting || Object.keys(currentChangedSetting).length === 0) {
|
|
@@ -49,12 +48,10 @@ import {useParams}from'@remix-run/react';import {useCallback}from'react';import
|
|
|
49
48
|
if (contentWidth !== undefined &&
|
|
50
49
|
settings.contentWidth !== contentWidth &&
|
|
51
50
|
typeof window !== 'undefined') {
|
|
52
|
-
console.log('Content width changed, triggering resize');
|
|
53
51
|
window.dispatchEvent(new Event('resize'));
|
|
54
52
|
}
|
|
55
53
|
// Only update colorWeak if it changed
|
|
56
54
|
if (colorWeak !== undefined && settings.colorWeak !== colorWeak) {
|
|
57
|
-
console.log('Color weak mode changed');
|
|
58
55
|
updateColorWeak(!!colorWeak);
|
|
59
56
|
}
|
|
60
57
|
// 3. Make API call
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLayoutSettings.js","sources":["../../src/hooks/useLayoutSettings.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLayoutSettings.js","sources":["../../src/hooks/useLayoutSettings.ts"],"sourcesContent":[null],"names":[],"mappings":"uMAkHC,SAAA,iBAAA,GAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -19,5 +19,5 @@ export declare const darkColors: {
|
|
|
19
19
|
};
|
|
20
20
|
export declare const darkNavigationBarTheme: LayoutThemeNavigationBar;
|
|
21
21
|
export declare const darkTabBarTheme: LayoutThemeTabBar;
|
|
22
|
-
export declare const darkLayoutTheme: import("
|
|
22
|
+
export declare const darkLayoutTheme: import("../LayoutTheme").LayoutTheme;
|
|
23
23
|
//# sourceMappingURL=darkLayoutTheme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"darkLayoutTheme.d.ts","sourceRoot":"","sources":["../../../src/themes/templates/darkLayoutTheme.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAI7E,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;CAkBtB,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,wBAQpC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,iBAG7B,CAAC;AAEF,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"darkLayoutTheme.d.ts","sourceRoot":"","sources":["../../../src/themes/templates/darkLayoutTheme.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAI7E,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;CAkBtB,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,wBAQpC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,iBAG7B,CAAC;AAEF,eAAO,MAAM,eAAe,sCAM1B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@admin-layout/client",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.2.1-alpha.0",
|
|
4
4
|
"description": "Sample client for higher packages to depend on",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"serialize-error": "^8.0.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"common": "12.
|
|
29
|
+
"common": "12.2.1-alpha.0",
|
|
30
30
|
"rc-menu": "^9.16.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"typescript": {
|
|
45
45
|
"definition": "lib/index.d.ts"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "12c777dbbb799cf12206b2c6d89fd8fc0e671efb"
|
|
48
48
|
}
|