@common-stack/generate-plugin 7.1.1-alpha.3 → 7.1.1-alpha.31

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/CHANGELOG.md CHANGED
@@ -3,6 +3,118 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [7.1.1-alpha.31](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.30...v7.1.1-alpha.31) (2025-06-20)
7
+
8
+ **Note:** Version bump only for package @common-stack/generate-plugin
9
+
10
+ ## [7.1.1-alpha.30](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.29...v7.1.1-alpha.30) (2025-06-15)
11
+
12
+ **Note:** Version bump only for package @common-stack/generate-plugin
13
+
14
+ ## [7.1.1-alpha.29](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.28...v7.1.1-alpha.29) (2025-06-14)
15
+
16
+ **Note:** Version bump only for package @common-stack/generate-plugin
17
+
18
+ ## [7.1.1-alpha.28](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.27...v7.1.1-alpha.28) (2025-06-14)
19
+
20
+ **Note:** Version bump only for package @common-stack/generate-plugin
21
+
22
+ ## [7.1.1-alpha.27](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.26...v7.1.1-alpha.27) (2025-06-01)
23
+
24
+ **Note:** Version bump only for package @common-stack/generate-plugin
25
+
26
+ ## [7.1.1-alpha.26](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.25...v7.1.1-alpha.26) (2025-06-01)
27
+
28
+ **Note:** Version bump only for package @common-stack/generate-plugin
29
+
30
+ ## [7.1.1-alpha.25](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.24...v7.1.1-alpha.25) (2025-06-01)
31
+
32
+ **Note:** Version bump only for package @common-stack/generate-plugin
33
+
34
+ ## [7.1.1-alpha.24](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.23...v7.1.1-alpha.24) (2025-05-14)
35
+
36
+ **Note:** Version bump only for package @common-stack/generate-plugin
37
+
38
+ ## [7.1.1-alpha.23](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.22...v7.1.1-alpha.23) (2025-05-13)
39
+
40
+ **Note:** Version bump only for package @common-stack/generate-plugin
41
+
42
+ ## [7.1.1-alpha.22](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.21...v7.1.1-alpha.22) (2025-05-11)
43
+
44
+ **Note:** Version bump only for package @common-stack/generate-plugin
45
+
46
+ ## [7.1.1-alpha.21](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.20...v7.1.1-alpha.21) (2025-05-06)
47
+
48
+ **Note:** Version bump only for package @common-stack/generate-plugin
49
+
50
+ ## [7.1.1-alpha.20](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.19...v7.1.1-alpha.20) (2025-05-05)
51
+
52
+ **Note:** Version bump only for package @common-stack/generate-plugin
53
+
54
+ ## [7.1.1-alpha.19](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.18...v7.1.1-alpha.19) (2025-05-05)
55
+
56
+ **Note:** Version bump only for package @common-stack/generate-plugin
57
+
58
+ ## [7.1.1-alpha.18](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.17...v7.1.1-alpha.18) (2025-05-01)
59
+
60
+ **Note:** Version bump only for package @common-stack/generate-plugin
61
+
62
+ ## [7.1.1-alpha.17](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.16...v7.1.1-alpha.17) (2025-04-22)
63
+
64
+ **Note:** Version bump only for package @common-stack/generate-plugin
65
+
66
+ ## [7.1.1-alpha.16](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.15...v7.1.1-alpha.16) (2025-04-21)
67
+
68
+ **Note:** Version bump only for package @common-stack/generate-plugin
69
+
70
+ ## [7.1.1-alpha.15](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.14...v7.1.1-alpha.15) (2025-04-21)
71
+
72
+ **Note:** Version bump only for package @common-stack/generate-plugin
73
+
74
+ ## [7.1.1-alpha.14](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.13...v7.1.1-alpha.14) (2025-04-20)
75
+
76
+ **Note:** Version bump only for package @common-stack/generate-plugin
77
+
78
+ ## [7.1.1-alpha.13](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.12...v7.1.1-alpha.13) (2025-04-19)
79
+
80
+ **Note:** Version bump only for package @common-stack/generate-plugin
81
+
82
+ ## [7.1.1-alpha.12](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.11...v7.1.1-alpha.12) (2025-04-18)
83
+
84
+ **Note:** Version bump only for package @common-stack/generate-plugin
85
+
86
+ ## [7.1.1-alpha.11](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.10...v7.1.1-alpha.11) (2025-04-18)
87
+
88
+ **Note:** Version bump only for package @common-stack/generate-plugin
89
+
90
+ ## [7.1.1-alpha.10](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.9...v7.1.1-alpha.10) (2025-04-17)
91
+
92
+ **Note:** Version bump only for package @common-stack/generate-plugin
93
+
94
+ ## [7.1.1-alpha.9](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.8...v7.1.1-alpha.9) (2025-04-17)
95
+
96
+ **Note:** Version bump only for package @common-stack/generate-plugin
97
+
98
+ ## [7.1.1-alpha.8](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.7...v7.1.1-alpha.8) (2025-04-17)
99
+
100
+ **Note:** Version bump only for package @common-stack/generate-plugin
101
+
102
+ ## [7.1.1-alpha.7](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.6...v7.1.1-alpha.7) (2025-04-15)
103
+
104
+ **Note:** Version bump only for package @common-stack/generate-plugin
105
+
106
+ ## [7.1.1-alpha.6](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.5...v7.1.1-alpha.6) (2025-04-15)
107
+
108
+ **Note:** Version bump only for package @common-stack/generate-plugin
109
+
110
+ ## [7.1.1-alpha.5](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.4...v7.1.1-alpha.5) (2025-04-14)
111
+
112
+ **Note:** Version bump only for package @common-stack/generate-plugin
113
+
114
+ ## [7.1.1-alpha.4](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.3...v7.1.1-alpha.4) (2025-04-14)
115
+
116
+ **Note:** Version bump only for package @common-stack/generate-plugin
117
+
6
118
  ## [7.1.1-alpha.3](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.2...v7.1.1-alpha.3) (2025-04-13)
7
119
 
8
120
  ### Features
@@ -64,7 +64,7 @@
64
64
  "dependencies": {
65
65
  "@apollo/client": "^3.9.0",
66
66
  "@babel/runtime": "^7.20.1",
67
- "@common-stack/server-stack": "7.1.1-alpha.2",
67
+ "@common-stack/server-stack": "7.1.1-alpha.30",
68
68
  "@remix-run/node": "~2.10.1",
69
69
  "lodash": "^4.17.15",
70
70
  "react": "18.2.0"
@@ -1,6 +1,7 @@
1
1
  import 'reflect-metadata';
2
2
  import * as React from 'react';
3
3
  import { Links, Meta, Outlet, Scripts, ScrollRestoration, useRouteLoaderData, useRouteError } from '@remix-run/react';
4
+ import { json } from '@remix-run/node';
4
5
  import { PluginArea } from '@common-stack/client-react';
5
6
  import { subscribeReduxRouter } from '@common-stack/remix-router-redux';
6
7
  import { ApplicationErrorHandler } from '@admin-layout/ant-ui';
@@ -10,10 +11,40 @@ import clientModules, { plugins } from '@app/frontend-stack-react/modules.js';
10
11
  // @ts-ignore
11
12
  import { useChangeLanguage } from 'remix-i18next/react';
12
13
  import { useTranslation } from 'react-i18next';
14
+ import { LayoutCookieProvider } from '@admin-layout/client';
15
+ import { settingsLoaderUtil } from '@admin-layout/client/lib/components/UpdateSettings/UpdateSettings.server';
16
+ import { IAppLoadContext, IResourceParams } from '@common-stack/client-core';
17
+ import { FillRenderProvider, PluginsLoader } from '@common-stack/components-pro';
13
18
  // @ts-ignore
14
19
  import { ErrorBoundary } from '@app/frontend-stack-react/entries/antui/components/ErrorBoundary';
15
20
  import { LocaleContext } from './context';
16
21
 
22
+ export const loader = async ({
23
+ request,
24
+ context,
25
+ params,
26
+ }: {
27
+ request: Request;
28
+ context: IAppLoadContext;
29
+ params: IResourceParams;
30
+ }) => {
31
+ const settingsResponse = await settingsLoaderUtil({ request });
32
+ const loadedPlugins = await PluginsLoader(plugins, { request, context, params });
33
+
34
+ return json(
35
+ {
36
+ settings: settingsResponse?.settings,
37
+ loadedPlugins,
38
+ },
39
+ {
40
+ headers: [
41
+ ['Cache-Control', 'max-age=300, s-maxage=600'],
42
+ ['Set-Cookie', settingsResponse?.setCookie],
43
+ ],
44
+ },
45
+ );
46
+ };
47
+
17
48
  export const handle = {
18
49
  i18n: 'common',
19
50
  };
@@ -77,7 +108,9 @@ export function Layout({ children }: { children: React.ReactNode }) {
77
108
  </head>
78
109
  <body>
79
110
  <PluginArea />
80
- {clientModules.getWrappedRoot(children)}
111
+ <FillRenderProvider>
112
+ {clientModules.getWrappedRoot(children)}
113
+ </FillRenderProvider>
81
114
  <ScrollRestoration />
82
115
  <Scripts />
83
116
  {getConstants()}
@@ -90,7 +123,9 @@ export default function App() {
90
123
  return (
91
124
  <ApplicationErrorHandler plugins={plugins}>
92
125
  <ConfigProvider>
93
- <Outlet />
126
+ <LayoutCookieProvider>
127
+ <Outlet />
128
+ </LayoutCookieProvider>
94
129
  </ConfigProvider>
95
130
  </ApplicationErrorHandler>
96
131
  );
@@ -14,9 +14,41 @@ import { useContext } from 'react';
14
14
  import { ServerStyleContext, ClientStyleContext, LocaleContext } from './context';
15
15
  import { withEmotionCache } from '@emotion/react';
16
16
  import { useChangeLanguage } from 'remix-i18next/react';
17
+ import { LayoutCookieProvider } from '@admin-layout/client';
18
+ import { settingsLoaderUtil } from '@admin-layout/client/lib/components/UpdateSettings/UpdateSettings.server';
19
+ import { IAppLoadContext, IResourceParams } from '@common-stack/client-core';
20
+ import { FillRenderProvider, PluginsLoader } from '@common-stack/components-pro';
21
+ // @ts-ignore
17
22
  import { i18nextInstance as i18next } from '@app/frontend-stack-react/i18n-localization/i18next.server.js';
23
+ // @ts-ignore
18
24
  import { ErrorBoundary } from '@app/frontend-stack-react/entries/chakraui/components/ErrorBoundary.js';
19
25
 
26
+ export const loader = async ({
27
+ request,
28
+ context,
29
+ params,
30
+ }: {
31
+ request: Request;
32
+ context: IAppLoadContext;
33
+ params: IResourceParams;
34
+ }) => {
35
+ const settingsResponse = await settingsLoaderUtil({ request });
36
+ const loadedPlugins = await PluginsLoader(plugins, { request, context, params });
37
+
38
+ return json(
39
+ {
40
+ settings: settingsResponse?.settings,
41
+ loadedPlugins,
42
+ },
43
+ {
44
+ headers: [
45
+ ['Cache-Control', 'max-age=300, s-maxage=600'],
46
+ ['Set-Cookie', settingsResponse?.setCookie],
47
+ ],
48
+ },
49
+ );
50
+ };
51
+
20
52
  interface DocumentProps {
21
53
  children: React.ReactNode;
22
54
  }
@@ -67,12 +99,7 @@ export const Document = withEmotionCache(({ children }: DocumentProps, emotionCa
67
99
  </>
68
100
  );
69
101
  });
70
- /*
71
- export let loader = async ({ request }) => {
72
- let locale = await i18next.getLocale(request);
73
- return json({ locale });
74
- };
75
- */
102
+
76
103
  export let handle = {
77
104
  i18n: 'common',
78
105
  };
@@ -94,7 +121,11 @@ export default function App() {
94
121
 
95
122
  return (
96
123
  <ApplicationErrorHandler plugins={plugins}>
97
- <Document>{clientModules.getWrappedRoot(<Outlet />)}</Document>
124
+ <Document>
125
+ <FillRenderProvider>
126
+ {clientModules.getWrappedRoot(<LayoutCookieProvider><Outlet /></LayoutCookieProvider>)}
127
+ </FillRenderProvider>
128
+ </Document>
98
129
  </ApplicationErrorHandler>
99
130
  );
100
131
  }
@@ -11,6 +11,10 @@ import clientModules, { plugins } from '@app/frontend-stack-react/modules.js';
11
11
  // @ts-ignore
12
12
  import { useChangeLanguage } from 'remix-i18next/react';
13
13
  import { useTranslation } from 'react-i18next';
14
+ import { LayoutCookieProvider } from '@admin-layout/client';
15
+ import { settingsLoaderUtil } from '@admin-layout/client/lib/components/UpdateSettings/UpdateSettings.server';
16
+ import { IAppLoadContext, IResourceParams } from '@common-stack/client-core';
17
+ import { FillRenderProvider, PluginsLoader } from '@common-stack/components-pro';
14
18
  // @ts-ignore
15
19
  import { i18nextInstance as i18next } from '@app/frontend-stack-react/i18n-localization/i18next.server.js';
16
20
  import stylesheet from "./tailwind.css?url";
@@ -19,12 +23,33 @@ export const links: LinksFunction = () => [
19
23
  { rel: "stylesheet", href: stylesheet },
20
24
  ];
21
25
 
22
- export const loader = async ({ request }) => {
26
+ export const loader = async ({
27
+ request,
28
+ context,
29
+ params,
30
+ }: {
31
+ request: Request;
32
+ context: IAppLoadContext;
33
+ params: IResourceParams;
34
+ }) => {
23
35
  const locale = await i18next.getLocale(request);
24
- return json({
25
- __ENV__: publicEnv,
26
- locale,
27
- });
36
+ const settingsResponse = await settingsLoaderUtil({ request });
37
+ const loadedPlugins = await PluginsLoader(plugins, { request, context, params });
38
+
39
+ return json(
40
+ {
41
+ __ENV__: publicEnv,
42
+ locale,
43
+ settings: settingsResponse?.settings,
44
+ loadedPlugins,
45
+ },
46
+ {
47
+ headers: [
48
+ ['Cache-Control', 'max-age=300, s-maxage=600'],
49
+ ['Set-Cookie', settingsResponse?.setCookie],
50
+ ],
51
+ },
52
+ );
28
53
  };
29
54
 
30
55
  export const handle = {
@@ -87,7 +112,9 @@ export function Layout({ children }: { children: React.ReactNode }) {
87
112
  </head>
88
113
  <body>
89
114
  <PluginArea />
90
- {clientModules.getWrappedRoot(children)}
115
+ <FillRenderProvider>
116
+ {clientModules.getWrappedRoot(children)}
117
+ </FillRenderProvider>
91
118
  <ScrollRestoration />
92
119
  <Scripts />
93
120
  {getConstants()}
@@ -109,8 +136,10 @@ const TestComponent = () => {
109
136
 
110
137
  export default function App() {
111
138
  return (
112
- // <Outlet />
113
- <TestComponent />
139
+ <LayoutCookieProvider>
140
+ {/* <Outlet /> */}
141
+ <TestComponent />
142
+ </LayoutCookieProvider>
114
143
  );
115
144
  }
116
145
 
@@ -56,7 +56,7 @@
56
56
  "common": "link:./common"
57
57
  },
58
58
  "dependencies": {
59
- "@common-stack/frontend-stack-react": "7.1.1-alpha.2",
59
+ "@common-stack/frontend-stack-react": "7.1.1-alpha.30",
60
60
  "@react-icons/all-files": "^4.1.0",
61
61
  "classnames": "^2.2.6",
62
62
  "compression": "^1.7.4",
@@ -81,7 +81,7 @@
81
81
  },
82
82
  "devDependencies": {
83
83
  "@cdmbase/vite-plugin-i18next-loader": "^2.0.12",
84
- "@common-stack/rollup-vite-utils": "7.1.1-alpha.2",
84
+ "@common-stack/rollup-vite-utils": "7.1.1-alpha.30",
85
85
  "@remix-run/dev": "~2.10.1",
86
86
  "@remix-run/serve": "~2.10.1",
87
87
  "cross-env": "^7.0.3",
@@ -140,9 +140,9 @@
140
140
  "@babel/preset-typescript": "^7.18.6",
141
141
  "@babel/register": "^7.18.9",
142
142
  "@babel/runtime": "^7.20.1",
143
- "@common-stack/env-list-loader": "7.0.4-alpha.0",
144
- "@common-stack/generate-plugin": "7.1.1-alpha.2",
145
- "@common-stack/rollup-vite-utils": "7.1.1-alpha.2",
143
+ "@common-stack/env-list-loader": "7.1.1-alpha.30",
144
+ "@common-stack/generate-plugin": "7.1.1-alpha.30",
145
+ "@common-stack/rollup-vite-utils": "7.1.1-alpha.30",
146
146
  "@emotion/babel-plugin": "^11.11.0",
147
147
  "@graphql-codegen/add": "^5.0.3",
148
148
  "@graphql-codegen/cli": "^5.0.4",
@@ -29,11 +29,11 @@
29
29
  "common": "link:./common"
30
30
  },
31
31
  "dependencies": {
32
- "@common-stack/client-core": "7.1.1-alpha.2",
33
- "@common-stack/core": "7.0.4-alpha.17",
34
- "@common-stack/server-core": "7.0.4-alpha.17",
35
- "@common-stack/server-stack": "7.1.1-alpha.2",
36
- "@common-stack/store-mongo": "7.0.4-alpha.17",
32
+ "@common-stack/client-core": "7.1.1-alpha.29",
33
+ "@common-stack/core": "7.1.1-alpha.29",
34
+ "@common-stack/server-core": "7.1.1-alpha.30",
35
+ "@common-stack/server-stack": "7.1.1-alpha.30",
36
+ "@common-stack/store-mongo": "7.1.1-alpha.30",
37
37
  "@container-stack/mailing-api": "5.2.1-alpha.1",
38
38
  "helmet": "^3.21.2",
39
39
  "react": "18.2.0",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@cdm-logger/client": "*",
32
- "@common-stack/client-react": "7.1.1-alpha.2",
32
+ "@common-stack/client-react": "7.1.1-alpha.29",
33
33
  "@remix-run/react": "*",
34
34
  "antd": ">=5.1.6",
35
35
  "lodash": "*",
@@ -62,9 +62,9 @@
62
62
  "peerDependencies": {
63
63
  "@apollo/client": ">=3.0.0",
64
64
  "@cdm-logger/server": ">=9.0.3",
65
- "@common-stack/core": "7.0.4-alpha.17",
66
- "@common-stack/server-core": "7.0.4-alpha.17",
67
- "@common-stack/store-mongo": "7.0.4-alpha.17",
65
+ "@common-stack/core": "7.1.1-alpha.29",
66
+ "@common-stack/server-core": "7.1.1-alpha.30",
67
+ "@common-stack/store-mongo": "7.1.1-alpha.30",
68
68
  "@container-stack/mailing-api": ">=0.0.35-alpha.1",
69
69
  "@vscode-alt/monaco-editor": "^0.21.4",
70
70
  "inversify": "^5.0.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@common-stack/generate-plugin",
3
- "version": "7.1.1-alpha.3",
3
+ "version": "7.1.1-alpha.31",
4
4
  "type": "module",
5
5
  "main": "./lib/index.mjs",
6
6
  "typings": "./lib/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "watch": "yarn build:lib:watch"
19
19
  },
20
20
  "dependencies": {
21
- "@common-stack/rollup-vite-utils": "7.1.1-alpha.3",
21
+ "@common-stack/rollup-vite-utils": "7.1.1-alpha.30",
22
22
  "tslib": "^2.3.0"
23
23
  },
24
24
  "publishConfig": {
@@ -26,5 +26,5 @@
26
26
  },
27
27
  "executors": "./executors.json",
28
28
  "generators": "./generators.json",
29
- "gitHead": "957549af03185aa8c04c216f68db9ab6251f2d0d"
29
+ "gitHead": "1a0f275e1c74dcdb9631a65884908ff050bce51d"
30
30
  }
@@ -64,7 +64,7 @@
64
64
  "dependencies": {
65
65
  "@apollo/client": "^3.9.0",
66
66
  "@babel/runtime": "^7.20.1",
67
- "@common-stack/server-stack": "7.1.1-alpha.2",
67
+ "@common-stack/server-stack": "7.1.1-alpha.30",
68
68
  "@remix-run/node": "~2.10.1",
69
69
  "lodash": "^4.17.15",
70
70
  "react": "18.2.0"
@@ -1,6 +1,7 @@
1
1
  import 'reflect-metadata';
2
2
  import * as React from 'react';
3
3
  import { Links, Meta, Outlet, Scripts, ScrollRestoration, useRouteLoaderData, useRouteError } from '@remix-run/react';
4
+ import { json } from '@remix-run/node';
4
5
  import { PluginArea } from '@common-stack/client-react';
5
6
  import { subscribeReduxRouter } from '@common-stack/remix-router-redux';
6
7
  import { ApplicationErrorHandler } from '@admin-layout/ant-ui';
@@ -10,10 +11,40 @@ import clientModules, { plugins } from '@app/frontend-stack-react/modules.js';
10
11
  // @ts-ignore
11
12
  import { useChangeLanguage } from 'remix-i18next/react';
12
13
  import { useTranslation } from 'react-i18next';
14
+ import { LayoutCookieProvider } from '@admin-layout/client';
15
+ import { settingsLoaderUtil } from '@admin-layout/client/lib/components/UpdateSettings/UpdateSettings.server';
16
+ import { IAppLoadContext, IResourceParams } from '@common-stack/client-core';
17
+ import { FillRenderProvider, PluginsLoader } from '@common-stack/components-pro';
13
18
  // @ts-ignore
14
19
  import { ErrorBoundary } from '@app/frontend-stack-react/entries/antui/components/ErrorBoundary';
15
20
  import { LocaleContext } from './context';
16
21
 
22
+ export const loader = async ({
23
+ request,
24
+ context,
25
+ params,
26
+ }: {
27
+ request: Request;
28
+ context: IAppLoadContext;
29
+ params: IResourceParams;
30
+ }) => {
31
+ const settingsResponse = await settingsLoaderUtil({ request });
32
+ const loadedPlugins = await PluginsLoader(plugins, { request, context, params });
33
+
34
+ return json(
35
+ {
36
+ settings: settingsResponse?.settings,
37
+ loadedPlugins,
38
+ },
39
+ {
40
+ headers: [
41
+ ['Cache-Control', 'max-age=300, s-maxage=600'],
42
+ ['Set-Cookie', settingsResponse?.setCookie],
43
+ ],
44
+ },
45
+ );
46
+ };
47
+
17
48
  export const handle = {
18
49
  i18n: 'common',
19
50
  };
@@ -77,7 +108,9 @@ export function Layout({ children }: { children: React.ReactNode }) {
77
108
  </head>
78
109
  <body>
79
110
  <PluginArea />
80
- {clientModules.getWrappedRoot(children)}
111
+ <FillRenderProvider>
112
+ {clientModules.getWrappedRoot(children)}
113
+ </FillRenderProvider>
81
114
  <ScrollRestoration />
82
115
  <Scripts />
83
116
  {getConstants()}
@@ -90,7 +123,9 @@ export default function App() {
90
123
  return (
91
124
  <ApplicationErrorHandler plugins={plugins}>
92
125
  <ConfigProvider>
93
- <Outlet />
126
+ <LayoutCookieProvider>
127
+ <Outlet />
128
+ </LayoutCookieProvider>
94
129
  </ConfigProvider>
95
130
  </ApplicationErrorHandler>
96
131
  );
@@ -14,9 +14,41 @@ import { useContext } from 'react';
14
14
  import { ServerStyleContext, ClientStyleContext, LocaleContext } from './context';
15
15
  import { withEmotionCache } from '@emotion/react';
16
16
  import { useChangeLanguage } from 'remix-i18next/react';
17
+ import { LayoutCookieProvider } from '@admin-layout/client';
18
+ import { settingsLoaderUtil } from '@admin-layout/client/lib/components/UpdateSettings/UpdateSettings.server';
19
+ import { IAppLoadContext, IResourceParams } from '@common-stack/client-core';
20
+ import { FillRenderProvider, PluginsLoader } from '@common-stack/components-pro';
21
+ // @ts-ignore
17
22
  import { i18nextInstance as i18next } from '@app/frontend-stack-react/i18n-localization/i18next.server.js';
23
+ // @ts-ignore
18
24
  import { ErrorBoundary } from '@app/frontend-stack-react/entries/chakraui/components/ErrorBoundary.js';
19
25
 
26
+ export const loader = async ({
27
+ request,
28
+ context,
29
+ params,
30
+ }: {
31
+ request: Request;
32
+ context: IAppLoadContext;
33
+ params: IResourceParams;
34
+ }) => {
35
+ const settingsResponse = await settingsLoaderUtil({ request });
36
+ const loadedPlugins = await PluginsLoader(plugins, { request, context, params });
37
+
38
+ return json(
39
+ {
40
+ settings: settingsResponse?.settings,
41
+ loadedPlugins,
42
+ },
43
+ {
44
+ headers: [
45
+ ['Cache-Control', 'max-age=300, s-maxage=600'],
46
+ ['Set-Cookie', settingsResponse?.setCookie],
47
+ ],
48
+ },
49
+ );
50
+ };
51
+
20
52
  interface DocumentProps {
21
53
  children: React.ReactNode;
22
54
  }
@@ -67,12 +99,7 @@ export const Document = withEmotionCache(({ children }: DocumentProps, emotionCa
67
99
  </>
68
100
  );
69
101
  });
70
- /*
71
- export let loader = async ({ request }) => {
72
- let locale = await i18next.getLocale(request);
73
- return json({ locale });
74
- };
75
- */
102
+
76
103
  export let handle = {
77
104
  i18n: 'common',
78
105
  };
@@ -94,7 +121,11 @@ export default function App() {
94
121
 
95
122
  return (
96
123
  <ApplicationErrorHandler plugins={plugins}>
97
- <Document>{clientModules.getWrappedRoot(<Outlet />)}</Document>
124
+ <Document>
125
+ <FillRenderProvider>
126
+ {clientModules.getWrappedRoot(<LayoutCookieProvider><Outlet /></LayoutCookieProvider>)}
127
+ </FillRenderProvider>
128
+ </Document>
98
129
  </ApplicationErrorHandler>
99
130
  );
100
131
  }
@@ -11,6 +11,10 @@ import clientModules, { plugins } from '@app/frontend-stack-react/modules.js';
11
11
  // @ts-ignore
12
12
  import { useChangeLanguage } from 'remix-i18next/react';
13
13
  import { useTranslation } from 'react-i18next';
14
+ import { LayoutCookieProvider } from '@admin-layout/client';
15
+ import { settingsLoaderUtil } from '@admin-layout/client/lib/components/UpdateSettings/UpdateSettings.server';
16
+ import { IAppLoadContext, IResourceParams } from '@common-stack/client-core';
17
+ import { FillRenderProvider, PluginsLoader } from '@common-stack/components-pro';
14
18
  // @ts-ignore
15
19
  import { i18nextInstance as i18next } from '@app/frontend-stack-react/i18n-localization/i18next.server.js';
16
20
  import stylesheet from "./tailwind.css?url";
@@ -19,12 +23,33 @@ export const links: LinksFunction = () => [
19
23
  { rel: "stylesheet", href: stylesheet },
20
24
  ];
21
25
 
22
- export const loader = async ({ request }) => {
26
+ export const loader = async ({
27
+ request,
28
+ context,
29
+ params,
30
+ }: {
31
+ request: Request;
32
+ context: IAppLoadContext;
33
+ params: IResourceParams;
34
+ }) => {
23
35
  const locale = await i18next.getLocale(request);
24
- return json({
25
- __ENV__: publicEnv,
26
- locale,
27
- });
36
+ const settingsResponse = await settingsLoaderUtil({ request });
37
+ const loadedPlugins = await PluginsLoader(plugins, { request, context, params });
38
+
39
+ return json(
40
+ {
41
+ __ENV__: publicEnv,
42
+ locale,
43
+ settings: settingsResponse?.settings,
44
+ loadedPlugins,
45
+ },
46
+ {
47
+ headers: [
48
+ ['Cache-Control', 'max-age=300, s-maxage=600'],
49
+ ['Set-Cookie', settingsResponse?.setCookie],
50
+ ],
51
+ },
52
+ );
28
53
  };
29
54
 
30
55
  export const handle = {
@@ -87,7 +112,9 @@ export function Layout({ children }: { children: React.ReactNode }) {
87
112
  </head>
88
113
  <body>
89
114
  <PluginArea />
90
- {clientModules.getWrappedRoot(children)}
115
+ <FillRenderProvider>
116
+ {clientModules.getWrappedRoot(children)}
117
+ </FillRenderProvider>
91
118
  <ScrollRestoration />
92
119
  <Scripts />
93
120
  {getConstants()}
@@ -109,8 +136,10 @@ const TestComponent = () => {
109
136
 
110
137
  export default function App() {
111
138
  return (
112
- // <Outlet />
113
- <TestComponent />
139
+ <LayoutCookieProvider>
140
+ {/* <Outlet /> */}
141
+ <TestComponent />
142
+ </LayoutCookieProvider>
114
143
  );
115
144
  }
116
145
 
@@ -56,7 +56,7 @@
56
56
  "common": "link:./common"
57
57
  },
58
58
  "dependencies": {
59
- "@common-stack/frontend-stack-react": "7.1.1-alpha.2",
59
+ "@common-stack/frontend-stack-react": "7.1.1-alpha.30",
60
60
  "@react-icons/all-files": "^4.1.0",
61
61
  "classnames": "^2.2.6",
62
62
  "compression": "^1.7.4",
@@ -81,7 +81,7 @@
81
81
  },
82
82
  "devDependencies": {
83
83
  "@cdmbase/vite-plugin-i18next-loader": "^2.0.12",
84
- "@common-stack/rollup-vite-utils": "7.1.1-alpha.2",
84
+ "@common-stack/rollup-vite-utils": "7.1.1-alpha.30",
85
85
  "@remix-run/dev": "~2.10.1",
86
86
  "@remix-run/serve": "~2.10.1",
87
87
  "cross-env": "^7.0.3",
@@ -140,9 +140,9 @@
140
140
  "@babel/preset-typescript": "^7.18.6",
141
141
  "@babel/register": "^7.18.9",
142
142
  "@babel/runtime": "^7.20.1",
143
- "@common-stack/env-list-loader": "7.0.4-alpha.0",
144
- "@common-stack/generate-plugin": "7.1.1-alpha.2",
145
- "@common-stack/rollup-vite-utils": "7.1.1-alpha.2",
143
+ "@common-stack/env-list-loader": "7.1.1-alpha.30",
144
+ "@common-stack/generate-plugin": "7.1.1-alpha.30",
145
+ "@common-stack/rollup-vite-utils": "7.1.1-alpha.30",
146
146
  "@emotion/babel-plugin": "^11.11.0",
147
147
  "@graphql-codegen/add": "^5.0.3",
148
148
  "@graphql-codegen/cli": "^5.0.4",
@@ -29,11 +29,11 @@
29
29
  "common": "link:./common"
30
30
  },
31
31
  "dependencies": {
32
- "@common-stack/client-core": "7.1.1-alpha.2",
33
- "@common-stack/core": "7.0.4-alpha.17",
34
- "@common-stack/server-core": "7.0.4-alpha.17",
35
- "@common-stack/server-stack": "7.1.1-alpha.2",
36
- "@common-stack/store-mongo": "7.0.4-alpha.17",
32
+ "@common-stack/client-core": "7.1.1-alpha.29",
33
+ "@common-stack/core": "7.1.1-alpha.29",
34
+ "@common-stack/server-core": "7.1.1-alpha.30",
35
+ "@common-stack/server-stack": "7.1.1-alpha.30",
36
+ "@common-stack/store-mongo": "7.1.1-alpha.30",
37
37
  "@container-stack/mailing-api": "5.2.1-alpha.1",
38
38
  "helmet": "^3.21.2",
39
39
  "react": "18.2.0",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@cdm-logger/client": "*",
32
- "@common-stack/client-react": "7.1.1-alpha.2",
32
+ "@common-stack/client-react": "7.1.1-alpha.29",
33
33
  "@remix-run/react": "*",
34
34
  "antd": ">=5.1.6",
35
35
  "lodash": "*",
@@ -62,9 +62,9 @@
62
62
  "peerDependencies": {
63
63
  "@apollo/client": ">=3.0.0",
64
64
  "@cdm-logger/server": ">=9.0.3",
65
- "@common-stack/core": "7.0.4-alpha.17",
66
- "@common-stack/server-core": "7.0.4-alpha.17",
67
- "@common-stack/store-mongo": "7.0.4-alpha.17",
65
+ "@common-stack/core": "7.1.1-alpha.29",
66
+ "@common-stack/server-core": "7.1.1-alpha.30",
67
+ "@common-stack/store-mongo": "7.1.1-alpha.30",
68
68
  "@container-stack/mailing-api": ">=0.0.35-alpha.1",
69
69
  "@vscode-alt/monaco-editor": "^0.21.4",
70
70
  "inversify": "^5.0.1",