@admin-layout/tailwind-design-pro 12.2.4-alpha.0 → 12.2.4-alpha.12
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/README.md +80 -0
- package/lib/components/LanguageMenu/LanguageMenu.d.ts.map +1 -1
- package/lib/components/LanguageMenu/LanguageMenu.js +6 -2
- package/lib/components/LanguageMenu/LanguageMenu.js.map +1 -1
- package/lib/components/Layout/BasicLayout/index.d.ts +1 -1
- package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/index.js +6 -5
- package/lib/components/Layout/BasicLayout/index.js.map +1 -1
- package/lib/components/Layout/BasicLayout/utils.js +1 -1
- package/lib/components/Layout/BasicLayout/utils.js.map +1 -1
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js +1 -1
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.js +1 -1
- package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.d.ts +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/SearchBar.js +1 -1
- package/lib/components/Layout/ProTailwindLayout.d.ts +19 -8
- package/lib/components/Layout/ProTailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/ProTailwindLayout.js +232 -77
- package/lib/components/Layout/ProTailwindLayout.js.map +1 -1
- package/lib/components/Layout/Sidebar/BottomMenu.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/BottomMenu.js +4 -4
- package/lib/components/Layout/Sidebar/BottomMenu.js.map +1 -1
- package/lib/components/Layout/Sidebar/MainSidebar.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/MainSidebar.js +8 -6
- package/lib/components/Layout/Sidebar/MainSidebar.js.map +1 -1
- package/lib/components/Layout/Sidebar/PerplexSidebar.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/PerplexSidebar.js +16 -15
- package/lib/components/Layout/Sidebar/PerplexSidebar.js.map +1 -1
- package/lib/components/Layout/Sidebar/PerplexSidebarMenu.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/PerplexSidebarMenu.js +53 -14
- package/lib/components/Layout/Sidebar/PerplexSidebarMenu.js.map +1 -1
- package/lib/components/Layout/TailwindLayout.d.ts +1 -1
- package/lib/components/Layout/TailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/TailwindLayout.js +19 -2
- package/lib/components/Layout/TailwindLayout.js.map +1 -1
- package/lib/components/Layout/defaultPermissions.d.ts +134 -0
- package/lib/components/Layout/defaultPermissions.d.ts.map +1 -0
- package/lib/components/Layout/defaultPermissions.js +134 -0
- package/lib/components/Layout/defaultPermissions.js.map +1 -0
- package/lib/components/SettingDrawer/SettingDrawer.js +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -1
- package/lib/components/SettingDrawer/hooks/useSettingsOperations.d.ts.map +1 -1
- package/lib/components/SettingDrawer/hooks/useSettingsOperations.js +11 -8
- package/lib/components/SettingDrawer/hooks/useSettingsOperations.js.map +1 -1
- package/lib/components/SettingDrawer/utils/transformers.d.ts +16 -0
- package/lib/components/SettingDrawer/utils/transformers.d.ts.map +1 -1
- package/lib/components/SettingDrawer/utils/transformers.js +39 -2
- package/lib/components/SettingDrawer/utils/transformers.js.map +1 -1
- package/lib/compute.js +1 -0
- package/lib/hooks/useScrollThreshold.d.ts +1 -2
- package/lib/hooks/useScrollThreshold.d.ts.map +1 -1
- package/lib/routes.json +1 -0
- package/package.json +7 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import isBrowser from'../../../utils/isBrowser/index.js';/**
|
|
1
|
+
import {isSpaMode,settingsStorage}from'@admin-layout/client/lib/utils/settingsStorage.js';import isBrowser from'../../../utils/isBrowser/index.js';/**
|
|
2
2
|
* Transform changed settings to wrap in uilayout structure for backend API
|
|
3
3
|
* Converts keys like "[desktop].theme" to "[desktop].uilayout.theme"
|
|
4
4
|
*/
|
|
@@ -52,6 +52,43 @@ function getCookieSettings() {
|
|
|
52
52
|
return null;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Get stored settings based on current mode (SPA vs SSR)
|
|
57
|
+
* - SPA mode: Returns settings from localStorage
|
|
58
|
+
* - SSR mode: Returns settings from cookies
|
|
59
|
+
*
|
|
60
|
+
* @returns Stored settings or null if not found
|
|
61
|
+
*/
|
|
62
|
+
function getStoredSettings() {
|
|
63
|
+
if (!isBrowser()) return null;
|
|
64
|
+
if (isSpaMode()) {
|
|
65
|
+
// SPA mode: use localStorage
|
|
66
|
+
const localStorageSettings = settingsStorage.get();
|
|
67
|
+
if (localStorageSettings) {
|
|
68
|
+
console.log('Settings from localStorage:', localStorageSettings);
|
|
69
|
+
}
|
|
70
|
+
return localStorageSettings;
|
|
71
|
+
}
|
|
72
|
+
// SSR mode: use cookies
|
|
73
|
+
return getCookieSettings();
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Clear settings storage based on current mode (SPA vs SSR)
|
|
77
|
+
* - SPA mode: Clears localStorage
|
|
78
|
+
* - SSR mode: Sends DELETE request to clear cookies
|
|
79
|
+
*
|
|
80
|
+
* @returns true if successful
|
|
81
|
+
*/
|
|
82
|
+
async function clearSettingsStorage() {
|
|
83
|
+
if (!isBrowser()) return false;
|
|
84
|
+
if (isSpaMode()) {
|
|
85
|
+
// SPA mode: clear localStorage
|
|
86
|
+
settingsStorage.clear();
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
// SSR mode: clear cookies via server
|
|
90
|
+
return clearSettingsCookies();
|
|
91
|
+
}
|
|
55
92
|
/**
|
|
56
93
|
* Clear settings cookies by sending DELETE request to server
|
|
57
94
|
*/
|
|
@@ -70,4 +107,4 @@ async function clearSettingsCookies() {
|
|
|
70
107
|
console.error('⚠️ Failed to clear cookies:', err);
|
|
71
108
|
return false;
|
|
72
109
|
}
|
|
73
|
-
}export{clearSettingsCookies,getCookieSettings,transformSettingsForBackend};//# sourceMappingURL=transformers.js.map
|
|
110
|
+
}export{clearSettingsCookies,clearSettingsStorage,getCookieSettings,getStoredSettings,transformSettingsForBackend};//# sourceMappingURL=transformers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformers.js","sources":["../../../../src/components/SettingDrawer/utils/transformers.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transformers.js","sources":["../../../../src/components/SettingDrawer/utils/transformers.ts"],"sourcesContent":[null],"names":[],"mappings":"mJAGA;;;AAGG;AACG,SAAU,2BAA2B,CAAC,eAAoC,EAAA;QAC5E,eAAM,GAAe,EAAwB;AAE7C,EAAA,SAAA,cAAS,CAAA,GAAe,EAAwB,WAAmB,EAAE;UACjE,CAAA,IAAO,CAAA,GAAI,CAAC,CAAA,OAAK,CAAA,GAAO,IAAE;AACtB,MAAA,MAAA,KAAA,MAAW,CAAA,GAAG,CAAA;AACd,MAAA,MAAA,OAAM,GAAA,MAAU,GAAA,CAAA,EAAM,MAAM,CAAA,CAAA,EAAA,GAAM,CAAA,CAAA,MAAS;AAE3C,MAAA,IAAA,iBAAW,QAAU,IAAA,KAAQ,SAAS,IAAK,CAAA,KAAQ,CAAC,OAAM,CAAA,KAAO,CAAC,EAAA;;AAE9D,QAAA,cAAA,CAAA,KAAA,EAAc,OAAM,CAAE;aACzB;;2BACG,GAAA,MAAA,CAAA,KAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACA,QAAA,MAAA,WAAM,GAAA,OAAa,CAAA,OAAG,CAAM,CAAC,EAAA,aAAe,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA;AAC5C,QAAA,eAAM,CAAA,CAAA,EAAA,aAAc,CAAA,UAAe,EAAC,WAAG,CAAA,CAAA,CAAA,GAAa,KAAO;;;AAGnE,EAAA;QACH,CAAA,IAAA,CAAA,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BAAA,CAAA;;AAEd,IAAA,OAAA;;AAEI;SACH,iBAAA,EAAA;AACD;;;;AAKR;AAEA;;;;;;AAMG;AACH,IAAA,eAAY,CAAA,KAAU,EAAA;IAClB;AAAkB,EAAA;;SAGd,oBAAA,EAAA;;AAEA;;;AAIJ,eAAO,oBAAuB,GAAA;AAClC,EAAC,IAAA,CAAA,SAAA,EAAA,EAAA,OAAA,KAAA;AAED,EAAA,IAAA;;AAEG,MAAA,MAAA,EAAA,QAAA;AACH,MAAM,OAAM,EAAA;QACJ,cAAY,EAAA;AAAE;AAElB,KAAA,CAAA;AACI,IAAA,MAAA,eAAiB,QAAM,CAAA;AACnB,IAAA,OAAA,IAAA;AACA,EAAA,CAAA,CAAA,OAAA,GAAA,EAAA;AACI,IAAA,OAAA,CAAA,KAAA,CAAA,6BAAgB,EAAA,GAAkB,CAAA;AACrC,IAAA,OAAA,KAAA;AACJ,EAAA;AAED"}
|
package/lib/compute.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { MutableRefObject } from 'react';
|
|
2
1
|
interface ScrollThresholdConfig {
|
|
3
2
|
threshold: number;
|
|
4
3
|
id: string;
|
|
5
4
|
useWindowScroll?: boolean;
|
|
6
5
|
}
|
|
7
6
|
export declare const useScrollThreshold: (configs: ScrollThresholdConfig[]) => {
|
|
8
|
-
containerRef:
|
|
7
|
+
containerRef: import("react").RefObject<HTMLDivElement>;
|
|
9
8
|
componentVisibility: Record<string, boolean>;
|
|
10
9
|
};
|
|
11
10
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScrollThreshold.d.ts","sourceRoot":"","sources":["../../src/hooks/useScrollThreshold.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useScrollThreshold.d.ts","sourceRoot":"","sources":["../../src/hooks/useScrollThreshold.ts"],"names":[],"mappings":"AAEA,UAAU,qBAAqB;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AAYD,eAAO,MAAM,kBAAkB,GAAI,SAAS,qBAAqB,EAAE;;;CA4DlE,CAAC"}
|
package/lib/routes.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@admin-layout/tailwind-design-pro",
|
|
3
|
-
"version": "12.2.4-alpha.
|
|
3
|
+
"version": "12.2.4-alpha.12",
|
|
4
4
|
"description": "Sample core for higher packages to depend on",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
@@ -21,21 +21,22 @@
|
|
|
21
21
|
"watch": "yarn build:lib:watch"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@admin-layout/assets": "12.2.4-alpha.
|
|
25
|
-
"@admin-layout/client": "12.2.4-alpha.
|
|
26
|
-
"@admin-layout/tailwind-ui": "12.2.4-alpha.
|
|
24
|
+
"@admin-layout/assets": "12.2.4-alpha.6",
|
|
25
|
+
"@admin-layout/client": "12.2.4-alpha.12",
|
|
26
|
+
"@admin-layout/tailwind-ui": "12.2.4-alpha.12",
|
|
27
27
|
"react-favicon": "^0.0.23",
|
|
28
28
|
"react-intl": "^6.1.1",
|
|
29
29
|
"react-responsive": "^10.0.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@adminide-stack/extension-api": "13.
|
|
32
|
+
"@adminide-stack/extension-api": "13.2.1-alpha.81",
|
|
33
33
|
"@tailwindcss/aspect-ratio": "^0.4.2",
|
|
34
34
|
"@tailwindcss/forms": "^0.5.4",
|
|
35
35
|
"@tailwindcss/typography": "^0.5.9",
|
|
36
36
|
"tailwindcss": "^3.3.3"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
+
"@adminide-stack/extension-api": "*",
|
|
39
40
|
"inversify": "*"
|
|
40
41
|
},
|
|
41
42
|
"publishConfig": {
|
|
@@ -53,5 +54,5 @@
|
|
|
53
54
|
"typescript": {
|
|
54
55
|
"definition": "lib/index.d.ts"
|
|
55
56
|
},
|
|
56
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "ebc266babcf79ef46a60363f21c68edf3d2dd1c0"
|
|
57
58
|
}
|