@admin-layout/client 12.0.16-alpha.53 → 12.0.16-alpha.55
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/colors/presets/black.js +3 -0
- package/lib/colors/presets/black.js.map +1 -1
- package/lib/colors/presets/white.js +3 -0
- package/lib/colors/presets/white.js.map +1 -1
- package/lib/components/UpdateSettings/UpdateSettings.server.d.ts.map +1 -1
- package/lib/components/UpdateSettings/UpdateSettings.server.js +3 -5
- package/lib/components/UpdateSettings/UpdateSettings.server.js.map +1 -1
- package/lib/hooks/useLayoutSettings.test.d.ts +2 -0
- package/lib/hooks/useLayoutSettings.test.d.ts.map +1 -0
- package/lib/utils/assignDefaults.test.d.ts +0 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"black.js","sources":["../../../src/colors/presets/black.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAS,MAAA,KAAO,GAAA;AAEhB,IAAA,OAAA,EAAA,MAAO
|
|
1
|
+
{"version":3,"file":"black.js","sources":["../../../src/colors/presets/black.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAS,MAAA,KAAO,GAAA;AAEhB,IAAA,OAAA,EAAA,MAAO;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"white.js","sources":["../../../src/colors/presets/white.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAS,MAAA,KAAO,GAAA;AAEhB,IAAA,OAAA,EAAA,MAAO
|
|
1
|
+
{"version":3,"file":"white.js","sources":["../../../src/colors/presets/white.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAS,MAAA,KAAO,GAAA;AAEhB,IAAA,OAAA,EAAA,MAAO;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateSettings.server.d.ts","sourceRoot":"","sources":["../../../src/components/UpdateSettings/UpdateSettings.server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UpdateSettings.server.d.ts","sourceRoot":"","sources":["../../../src/components/UpdateSettings/UpdateSettings.server.ts"],"names":[],"mappings":"AASA,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;;;GAuIpE"}
|
|
@@ -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 {
|
|
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_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',
|
|
@@ -162,7 +162,6 @@ async function settingsLoaderUtil({ request, context, params }) {
|
|
|
162
162
|
}
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
|
-
assignDefaults(settings, pageDefaultSettings);
|
|
166
165
|
}
|
|
167
166
|
catch (error) {
|
|
168
167
|
settings = null;
|
|
@@ -170,7 +169,6 @@ async function settingsLoaderUtil({ request, context, params }) {
|
|
|
170
169
|
// Generate default settings if no cookie exists
|
|
171
170
|
if (!settings) {
|
|
172
171
|
const fullSettings = merge({}, pageDefaultSettings, config.LAYOUT_SETTINGS);
|
|
173
|
-
assignDefaults(fullSettings, pageDefaultSettings);
|
|
174
172
|
// Only store differences to keep cookie size small
|
|
175
173
|
const diffSettings = await compareAndSaveSettingsDifferences(fullSettings, pageDefaultSettings);
|
|
176
174
|
const cookie = await settingsCookie.serialize(diffSettings);
|
|
@@ -183,8 +181,8 @@ async function settingsLoaderUtil({ request, context, params }) {
|
|
|
183
181
|
numericKeysAfterMerge.forEach((key) => {
|
|
184
182
|
delete fullSettings[key];
|
|
185
183
|
});
|
|
186
|
-
// Refresh the cookie to keep it active
|
|
187
|
-
const cookie = await settingsCookie.serialize(settings
|
|
184
|
+
// Refresh the cookie to keep it active
|
|
185
|
+
const cookie = await settingsCookie.serialize(settings);
|
|
188
186
|
console.log('FULL_SETTINGS', fullSettings);
|
|
189
187
|
return { settings: fullSettings, setCookie: cookie };
|
|
190
188
|
}export{fetchPageSettingsWithFetch,settingsCookie,settingsLoaderUtil};//# sourceMappingURL=UpdateSettings.server.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateSettings.server.js","sources":["../../../src/components/UpdateSettings/UpdateSettings.server.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UpdateSettings.server.js","sources":["../../../src/components/UpdateSettings/UpdateSettings.server.ts"],"sourcesContent":[null],"names":[],"mappings":"wgBAuGqE,MAAA,cAAA,GAAA,YAAA,CAAA,UAAA,EAAA;;;AAuIpE,IAAA,QAAA,EAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLayoutSettings.test.d.ts","sourceRoot":"","sources":["../../src/hooks/useLayoutSettings.test.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@admin-layout/client",
|
|
3
|
-
"version": "12.0.16-alpha.
|
|
3
|
+
"version": "12.0.16-alpha.55",
|
|
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": "
|
|
47
|
+
"gitHead": "e874eab61e1653793929285221297b0aa2761a96"
|
|
48
48
|
}
|