@admin-layout/tailwind-design-pro 12.2.1-alpha.0 → 12.2.1-alpha.2
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/Layout/ProTailwindLayout.js +1 -1
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts +3 -3
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts.map +1 -1
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.js +16 -23
- package/lib/compute.js +1 -7
- package/lib/routes.json +1 -10
- package/package.json +3 -3
|
@@ -122,7 +122,7 @@ const loader = async params => {
|
|
|
122
122
|
throw new Error('ApolloState not found');
|
|
123
123
|
}
|
|
124
124
|
const newMenuData = menuDataRender(routeWithLocale, permissions);
|
|
125
|
-
// returnInfo: {"
|
|
125
|
+
// returnInfo: {"keys":["newMenuData","apolloState"],"hasOptions":false}
|
|
126
126
|
return {
|
|
127
127
|
data: [newMenuData, apolloState]
|
|
128
128
|
};
|
|
@@ -4,14 +4,14 @@ export declare const action: ({ request, context, params, }: {
|
|
|
4
4
|
request: Request;
|
|
5
5
|
context?: IAppLoadContext;
|
|
6
6
|
params?: IResourceParams;
|
|
7
|
-
}) => Promise<import("@remix-run/
|
|
7
|
+
}) => Promise<import("@remix-run/router").UNSAFE_DataWithResponseInit<any>>;
|
|
8
8
|
export declare const loader: ({ request, context, params, }: {
|
|
9
9
|
request: Request;
|
|
10
10
|
context?: IAppLoadContext;
|
|
11
11
|
params?: IResourceParams;
|
|
12
|
-
}) => Promise<import("@remix-run/
|
|
12
|
+
}) => Promise<import("@remix-run/router").UNSAFE_DataWithResponseInit<{
|
|
13
13
|
settings: any;
|
|
14
|
-
}> | import("@remix-run/
|
|
14
|
+
}> | import("@remix-run/router").UNSAFE_DataWithResponseInit<{
|
|
15
15
|
error: string;
|
|
16
16
|
}>>;
|
|
17
17
|
//# sourceMappingURL=UpdateSettingsResource.server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateSettingsResource.server.d.ts","sourceRoot":"","sources":["../../../src/components/UpdateSettingsResource/UpdateSettingsResource.server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UpdateSettingsResource.server.d.ts","sourceRoot":"","sources":["../../../src/components/UpdateSettingsResource/UpdateSettingsResource.server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAMrD,eAAO,MAAM,MAAM,GAAU,+BAI1B;IACC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,MAAM,CAAC,EAAE,eAAe,CAAC;CAC5B,0EAyCA,CAAC;AAEF,eAAO,MAAM,MAAM,GAAU,+BAI1B;IACC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,MAAM,CAAC,EAAE,eAAe,CAAC;CAC5B;;;;GAmBA,CAAC"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { settingsCookie, settingsLoaderUtil } from '@admin-layout/client/lib/components/UpdateSettings/UpdateSettings.server';
|
|
3
|
-
const action = async ({
|
|
1
|
+
import {data}from'@remix-run/node';import {settingsCookie,settingsLoaderUtil}from'@admin-layout/client/lib/components/UpdateSettings/UpdateSettings.server';const action = async ({
|
|
4
2
|
request,
|
|
5
3
|
context,
|
|
6
4
|
params
|
|
@@ -14,7 +12,7 @@ const action = async ({
|
|
|
14
12
|
const cookie = await settingsCookie.serialize({}, {
|
|
15
13
|
maxAge: 0
|
|
16
14
|
});
|
|
17
|
-
return
|
|
15
|
+
return data({
|
|
18
16
|
success: true,
|
|
19
17
|
message: 'Settings cookies cleared successfully'
|
|
20
18
|
}, {
|
|
@@ -24,7 +22,7 @@ const action = async ({
|
|
|
24
22
|
});
|
|
25
23
|
} catch (error) {
|
|
26
24
|
console.error('❌ Error clearing cookies:', error);
|
|
27
|
-
return
|
|
25
|
+
return data({
|
|
28
26
|
success: false,
|
|
29
27
|
error: 'Failed to clear cookies'
|
|
30
28
|
}, {
|
|
@@ -42,7 +40,7 @@ const action = async ({
|
|
|
42
40
|
params
|
|
43
41
|
});
|
|
44
42
|
// Return the full settings as JSON, and set the new cookie in the response headers
|
|
45
|
-
return
|
|
43
|
+
return data(settings, {
|
|
46
44
|
headers: {
|
|
47
45
|
'Set-Cookie': setCookie
|
|
48
46
|
}
|
|
@@ -50,7 +48,7 @@ const action = async ({
|
|
|
50
48
|
} catch (error) {
|
|
51
49
|
// If anything fails, log the error and return a 500 error response
|
|
52
50
|
console.error('Error in action:', error);
|
|
53
|
-
return
|
|
51
|
+
return data({
|
|
54
52
|
error: 'Failed to update settings'
|
|
55
53
|
}, {
|
|
56
54
|
status: 500
|
|
@@ -76,22 +74,17 @@ const loader = async ({
|
|
|
76
74
|
if (setCookie) {
|
|
77
75
|
headers['Set-Cookie'] = setCookie;
|
|
78
76
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
};
|
|
77
|
+
return data({
|
|
78
|
+
settings
|
|
79
|
+
}, {
|
|
80
|
+
headers
|
|
81
|
+
});
|
|
86
82
|
} catch (error) {
|
|
87
83
|
console.error('Error in settings loader:', error);
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
};
|
|
84
|
+
return data({
|
|
85
|
+
error: 'Failed to load settings'
|
|
86
|
+
}, {
|
|
87
|
+
status: 500
|
|
88
|
+
});
|
|
95
89
|
}
|
|
96
|
-
};
|
|
97
|
-
export { action, loader }; //# sourceMappingURL=UpdateSettingsResource.server.js.map
|
|
90
|
+
};export{action,loader};//# sourceMappingURL=UpdateSettingsResource.server.js.map
|
package/lib/compute.js
CHANGED
|
@@ -16,7 +16,6 @@ const tailwindDesignProPage = [{
|
|
|
16
16
|
hasShouldRevalidate: true,
|
|
17
17
|
hasHandle: true,
|
|
18
18
|
loaderReturnInfo: {
|
|
19
|
-
returnType: "json",
|
|
20
19
|
hasOptions: false,
|
|
21
20
|
keys: ["newMenuData", "apolloState"]
|
|
22
21
|
}
|
|
@@ -32,12 +31,7 @@ const tailwindDesignProPage = [{
|
|
|
32
31
|
path: '/resources/settings',
|
|
33
32
|
componentPath: "@admin-layout/tailwind-design-pro/lib/components/UpdateSettingsResource/UpdateSettingsResource.js",
|
|
34
33
|
hasLoader: true,
|
|
35
|
-
hasAction: true
|
|
36
|
-
loaderReturnInfo: {
|
|
37
|
-
returnType: "json",
|
|
38
|
-
hasOptions: true,
|
|
39
|
-
keys: ["settings", "error"]
|
|
40
|
-
}
|
|
34
|
+
hasAction: true
|
|
41
35
|
}];
|
|
42
36
|
// get menus
|
|
43
37
|
getFilteredMenus(tailwindDesignProPage);
|
package/lib/routes.json
CHANGED
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
"hasShouldRevalidate": true,
|
|
18
18
|
"hasHandle": true,
|
|
19
19
|
"loaderReturnInfo": {
|
|
20
|
-
"returnType": "json",
|
|
21
20
|
"hasOptions": false,
|
|
22
21
|
"keys": [
|
|
23
22
|
"newMenuData",
|
|
@@ -36,15 +35,7 @@
|
|
|
36
35
|
"path": "/resources/settings",
|
|
37
36
|
"componentPath": "@admin-layout/tailwind-design-pro/lib/components/UpdateSettingsResource/UpdateSettingsResource.js",
|
|
38
37
|
"hasLoader": true,
|
|
39
|
-
"hasAction": true
|
|
40
|
-
"loaderReturnInfo": {
|
|
41
|
-
"returnType": "json",
|
|
42
|
-
"hasOptions": true,
|
|
43
|
-
"keys": [
|
|
44
|
-
"settings",
|
|
45
|
-
"error"
|
|
46
|
-
]
|
|
47
|
-
}
|
|
38
|
+
"hasAction": true
|
|
48
39
|
}
|
|
49
40
|
}
|
|
50
41
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@admin-layout/tailwind-design-pro",
|
|
3
|
-
"version": "12.2.1-alpha.
|
|
3
|
+
"version": "12.2.1-alpha.2",
|
|
4
4
|
"description": "Sample core for higher packages to depend on",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"react-responsive": "^10.0.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@adminide-stack/extension-api": "^13.0.
|
|
32
|
+
"@adminide-stack/extension-api": "^13.0.2-alpha.0",
|
|
33
33
|
"@tailwindcss/aspect-ratio": "^0.4.2",
|
|
34
34
|
"@tailwindcss/forms": "^0.5.4",
|
|
35
35
|
"@tailwindcss/typography": "^0.5.9",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"typescript": {
|
|
54
54
|
"definition": "lib/index.d.ts"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "9dd326edd5e6ea6dd92c03e7f25232addd928b65"
|
|
57
57
|
}
|