@openedx/frontend-base 1.0.0-alpha.24 → 1.0.0-alpha.25
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/dist/shell/site.js +14 -3
- package/dist/shell/site.js.map +1 -1
- package/package.json +2 -1
package/dist/shell/site.js
CHANGED
|
@@ -7,8 +7,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
import { StrictMode } from 'react';
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { lazy, StrictMode, Suspense } from 'react';
|
|
12
12
|
import { createRoot } from 'react-dom/client';
|
|
13
13
|
import { RouterProvider } from 'react-router-dom';
|
|
14
14
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
@@ -16,12 +16,23 @@ import { SITE_INIT_ERROR, SITE_READY, initialize, subscribe } from '../runtime';
|
|
|
16
16
|
import { addAppConfigs } from '../runtime/config';
|
|
17
17
|
import messages from 'site.i18n';
|
|
18
18
|
import createRouter from './router/createRouter';
|
|
19
|
+
/*
|
|
20
|
+
* Use a dynamic import guarded by process.env.NODE_ENV so that webpack
|
|
21
|
+
* places the devtools in a separate async chunk that is only requested
|
|
22
|
+
* in development. In production the ternary resolves to null and the
|
|
23
|
+
* chunk is never loaded.
|
|
24
|
+
*/
|
|
25
|
+
const ReactQueryDevtools = process.env.NODE_ENV === 'development'
|
|
26
|
+
? lazy(() => import('@tanstack/react-query-devtools')
|
|
27
|
+
.then((m) => ({ default: m.ReactQueryDevtools }))
|
|
28
|
+
.catch(() => ({ default: () => null })))
|
|
29
|
+
: null;
|
|
19
30
|
subscribe(SITE_READY, () => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
31
|
const queryClient = new QueryClient();
|
|
21
32
|
const router = createRouter();
|
|
22
33
|
addAppConfigs();
|
|
23
34
|
const root = createRoot(document.getElementById('root'));
|
|
24
|
-
root.render(_jsx(StrictMode, { children:
|
|
35
|
+
root.render(_jsx(StrictMode, { children: _jsxs(QueryClientProvider, { client: queryClient, children: [_jsx(RouterProvider, { router: router }), ReactQueryDevtools && (_jsx(Suspense, { fallback: null, children: _jsx(ReactQueryDevtools, { initialIsOpen: false }) }))] }) }));
|
|
25
36
|
}));
|
|
26
37
|
subscribe(SITE_INIT_ERROR, (error) => {
|
|
27
38
|
const root = createRoot(document.getElementById('root'));
|
package/dist/shell/site.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site.js","sourceRoot":"","sources":["../../shell/site.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"site.js","sourceRoot":"","sources":["../../shell/site.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EACL,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,EACV,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,YAAY,MAAM,uBAAuB,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,kBAAkB,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa;IAC/D,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,gCAAgC,CAAC;SAClD,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,kBAAkB,EAAE,CAAC,CAAC;SAChD,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAC1C,CAAC,CAAC,IAAI,CAAC;AAET,SAAS,CAAC,UAAU,EAAE,GAAS,EAAE;IAC/B,MAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC;IACtC,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;IAE9B,aAAa,EAAE,CAAC;IAEhB,MAAM,IAAI,GAAG,UAAU,CAAC,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAgB,CAAC,CAAC;IACxE,IAAI,CAAC,MAAM,CACT,KAAC,UAAU,cACT,MAAC,mBAAmB,IAAC,MAAM,EAAE,WAAW,aACtC,KAAC,cAAc,IAAC,MAAM,EAAE,MAAM,GAAI,EACjC,kBAAkB,IAAI,CACrB,KAAC,QAAQ,IAAC,QAAQ,EAAE,IAAI,YACtB,KAAC,kBAAkB,IAAC,aAAa,EAAE,KAAK,GAAI,GACnC,CACZ,IACmB,GACX,CACd,CAAC;AACJ,CAAC,CAAA,CAAC,CAAC;AAEH,SAAS,CAAC,eAAe,EAAE,CAAC,KAAK,EAAE,EAAE;IACnC,MAAM,IAAI,GAAG,UAAU,CAAC,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAgB,CAAC,CAAC;IACxE,IAAI,CAAC,MAAM,CAAC,wBAAM,KAAK,CAAC,OAAO,GAAO,CAAC,CAAC;AAC1C,CAAC,CAAC,CAAC;AAEH,UAAU,CAAC;IACT,QAAQ;CACT,CAAC,CAAC","sourcesContent":["import { lazy, StrictMode, Suspense } from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { RouterProvider } from 'react-router-dom';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\n\nimport {\n SITE_INIT_ERROR,\n SITE_READY,\n initialize,\n subscribe\n} from '../runtime';\nimport { addAppConfigs } from '../runtime/config';\nimport messages from 'site.i18n';\nimport createRouter from './router/createRouter';\n\n/*\n * Use a dynamic import guarded by process.env.NODE_ENV so that webpack\n * places the devtools in a separate async chunk that is only requested\n * in development. In production the ternary resolves to null and the\n * chunk is never loaded.\n */\nconst ReactQueryDevtools = process.env.NODE_ENV === 'development'\n ? lazy(() => import('@tanstack/react-query-devtools')\n .then((m) => ({ default: m.ReactQueryDevtools }))\n .catch(() => ({ default: () => null })))\n : null;\n\nsubscribe(SITE_READY, async () => {\n const queryClient = new QueryClient();\n const router = createRouter();\n\n addAppConfigs();\n\n const root = createRoot(document.getElementById('root') as HTMLElement);\n root.render(\n <StrictMode>\n <QueryClientProvider client={queryClient}>\n <RouterProvider router={router} />\n {ReactQueryDevtools && (\n <Suspense fallback={null}>\n <ReactQueryDevtools initialIsOpen={false} />\n </Suspense>\n )}\n </QueryClientProvider>\n </StrictMode>\n );\n});\n\nsubscribe(SITE_INIT_ERROR, (error) => {\n const root = createRoot(document.getElementById('root') as HTMLElement);\n root.render(<div>{error.message}</div>);\n});\n\ninitialize({\n messages,\n});\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openedx/frontend-base",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.25",
|
|
4
4
|
"description": "Build tools, setup and config for frontend apps",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
"@formatjs/ts-transformer": "^3.13.14",
|
|
69
69
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
|
|
70
70
|
"@stylistic/eslint-plugin": "^2.9.0",
|
|
71
|
+
"@tanstack/react-query-devtools": "^5.99.0",
|
|
71
72
|
"@types/eslint__js": "^8.42.3",
|
|
72
73
|
"@types/gradient-string": "^1.1.6",
|
|
73
74
|
"@types/lodash.keyby": "^4.6.9",
|