@admin-layout/client 10.0.2-alpha.5 → 11.0.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/colors/presets/black.js +0 -3
- package/lib/colors/presets/black.js.map +1 -1
- package/lib/colors/presets/white.js +0 -3
- package/lib/colors/presets/white.js.map +1 -1
- package/lib/components/UpdateSettings/UpdateSettings.server.d.ts +2 -2
- package/lib/components/UpdateSettings/UpdateSettings.server.d.ts.map +1 -1
- package/lib/components/UpdateSettings/UpdateSettings.server.js +7 -5
- package/lib/components/UpdateSettings/UpdateSettings.server.js.map +1 -1
- package/lib/graphql/link/error-link.js +1 -1
- package/lib/utils/menuUtils.js +1 -1
- package/package.json +4 -4
|
@@ -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,MAAa
|
|
1
|
+
{"version":3,"file":"black.js","sources":["../../../src/colors/presets/black.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAS,MAAA,KAAO,GAAA;AAEhB,IAAA,OAAA,EAAA,MAAa;;;;;;"}
|
|
@@ -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,MAAa
|
|
1
|
+
{"version":3,"file":"white.js","sources":["../../../src/colors/presets/white.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAS,MAAA,KAAO,GAAA;AAEhB,IAAA,OAAA,EAAA,MAAa;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const action: ({ request }: {
|
|
2
2
|
request: Request;
|
|
3
|
-
}) => Promise<import("@remix-run/
|
|
3
|
+
}) => Promise<import("@remix-run/router").UNSAFE_DataWithResponseInit<any>>;
|
|
4
4
|
export declare const loader: ({ request }: {
|
|
5
5
|
request: Request;
|
|
6
|
-
}) => Promise<
|
|
6
|
+
}) => Promise<any>;
|
|
7
7
|
//# sourceMappingURL=UpdateSettings.server.d.ts.map
|
|
@@ -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":"AAYA,eAAO,MAAM,MAAM,gBAAuB;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,0EAmB7D,CAAC;AAEF,eAAO,MAAM,MAAM,gBAAuB;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,iBAiB7D,CAAC"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {createCookie
|
|
1
|
+
import {createCookie}from'@remix-run/node';import {data}from'@remix-run/react';import {pick,keys}from'lodash-es';import {config}from'../../config/env-config.js';import {defaultSettings}from'../../config/defaultSettings.js';const settingsCookie = createCookie('settings', {
|
|
2
2
|
maxAge: 60 * 60 * 24 * 30, // 1 month
|
|
3
3
|
httpOnly: true,
|
|
4
4
|
sameSite: 'lax',
|
|
5
5
|
domain: config.isProd ? config.APP_DOMAIN : undefined,
|
|
6
6
|
});
|
|
7
7
|
const action = async ({ request }) => {
|
|
8
|
-
const jsonData = await request.json();
|
|
8
|
+
// const jsonData = await request.json();
|
|
9
|
+
const clonedRequest = request.clone();
|
|
10
|
+
const jsonData = await clonedRequest.json();
|
|
9
11
|
const payload = jsonData?.config;
|
|
10
12
|
const cookieHeader = request.headers.get('Cookie');
|
|
11
13
|
const settings = await settingsCookie.parse(cookieHeader);
|
|
@@ -13,7 +15,7 @@ const action = async ({ request }) => {
|
|
|
13
15
|
...settings,
|
|
14
16
|
...pick(payload, keys(config.LAYOUT_SETTINGS)),
|
|
15
17
|
};
|
|
16
|
-
return
|
|
18
|
+
return data(updatedSettings, {
|
|
17
19
|
headers: {
|
|
18
20
|
'Set-Cookie': await settingsCookie.serialize(updatedSettings),
|
|
19
21
|
},
|
|
@@ -26,11 +28,11 @@ const loader = async ({ request }) => {
|
|
|
26
28
|
const updatedSettings = {
|
|
27
29
|
...defaultSettings,
|
|
28
30
|
};
|
|
29
|
-
return
|
|
31
|
+
return data(updatedSettings, {
|
|
30
32
|
headers: {
|
|
31
33
|
'Set-Cookie': await settingsCookie.serialize(updatedSettings),
|
|
32
34
|
},
|
|
33
35
|
});
|
|
34
36
|
}
|
|
35
|
-
return
|
|
37
|
+
return settings;
|
|
36
38
|
};export{action,loader};//# 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":"qOAiCmD,cAAS,GAAA,YAAA,CAAA,UAAA,EAAA;AAAE,IAAA,MAAA,EAAA,EAAA,GAAA,EAiB5D,GAAA,EAAA,GAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {onError}from'@apollo/client/link/error/index.js';import {LOG_APPLICATION_ERROR
|
|
1
|
+
import {onError}from'@apollo/client/link/error/index.js';import {BACKEND_ERROR,LOG_APPLICATION_ERROR}from'../../constants/error.js';import {serializeError}from'serialize-error';import {ClientTypes}from'@common-stack/client-core';class ErrorLink {
|
|
2
2
|
idToken;
|
|
3
3
|
dispatchErrorAction(container, error) {
|
|
4
4
|
if (container.isBound(ClientTypes.ReduxStore)) {
|
package/lib/utils/menuUtils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {get,sortBy
|
|
1
|
+
import {get,cloneDeep,sortBy}from'lodash-es';import {PermissionType}from'common';import {logger}from'@cdm-logger/client';/**
|
|
2
2
|
* Custom menuDataRender function which will be called on component render
|
|
3
3
|
* to filter out menus from props.menuData on the basis of authorities.
|
|
4
4
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@admin-layout/client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.1-alpha.0",
|
|
4
4
|
"description": "Sample client for higher packages to depend on",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"watch": "yarn build:lib:watch"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@common-stack/client-core": "
|
|
26
|
-
"common": "
|
|
25
|
+
"@common-stack/client-core": "^8.0.1-alpha.0",
|
|
26
|
+
"common": "11.0.1-alpha.0",
|
|
27
27
|
"serialize-error": "^8.0.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"typescript": {
|
|
40
40
|
"definition": "lib/index.d.ts"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "e2156e4f3c7827baeff15a0339acd627eefeed75"
|
|
43
43
|
}
|