@openedx/frontend-app-admin-console 1.0.0-alpha.3 → 1.0.0-alpha.4
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/routes.d.ts +3 -1
- package/dist/routes.js +15 -3
- package/dist/routes.js.map +1 -1
- package/package.json +1 -1
package/dist/routes.d.ts
CHANGED
|
@@ -3,7 +3,9 @@ declare const routes: {
|
|
|
3
3
|
id: string;
|
|
4
4
|
path: string;
|
|
5
5
|
loader: typeof authenticatedLoader;
|
|
6
|
-
|
|
6
|
+
lazy(): Promise<{
|
|
7
|
+
Component: () => import("react").JSX.Element;
|
|
8
|
+
}>;
|
|
7
9
|
handle: {
|
|
8
10
|
roles: string[];
|
|
9
11
|
};
|
package/dist/routes.js
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
2
10
|
import { authenticatedLoader } from '@openedx/frontend-base';
|
|
3
11
|
import { AUTHZ_HOME_PATH } from './authz-module/constants';
|
|
4
|
-
const Main = lazy(() => import('./Main'));
|
|
5
12
|
const routes = [
|
|
6
13
|
{
|
|
7
14
|
id: 'org.openedx.frontend.route.adminConsole.main',
|
|
8
15
|
path: `${AUTHZ_HOME_PATH}/*`,
|
|
9
16
|
loader: authenticatedLoader,
|
|
10
|
-
|
|
17
|
+
lazy() {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
const { default: Main } = yield import('./Main');
|
|
20
|
+
return { Component: Main };
|
|
21
|
+
});
|
|
22
|
+
},
|
|
11
23
|
handle: {
|
|
12
24
|
roles: ['org.openedx.frontend.role.adminConsole'],
|
|
13
25
|
},
|
package/dist/routes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../src/routes.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../src/routes.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,MAAM,MAAM,GAAG;IACb;QACE,EAAE,EAAE,8CAA8C;QAClD,IAAI,EAAE,GAAG,eAAe,IAAI;QAC5B,MAAM,EAAE,mBAAmB;QACrB,IAAI;;gBACR,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC;gBACjD,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;YAC7B,CAAC;SAAA;QACD,MAAM,EAAE;YACN,KAAK,EAAE,CAAC,wCAAwC,CAAC;SAClD;KACF;CACF,CAAC;AAEF,eAAe,MAAM,CAAC","sourcesContent":["import { authenticatedLoader } from '@openedx/frontend-base';\n\nimport { AUTHZ_HOME_PATH } from './authz-module/constants';\n\nconst routes = [\n {\n id: 'org.openedx.frontend.route.adminConsole.main',\n path: `${AUTHZ_HOME_PATH}/*`,\n loader: authenticatedLoader,\n async lazy() {\n const { default: Main } = await import('./Main');\n return { Component: Main };\n },\n handle: {\n roles: ['org.openedx.frontend.role.adminConsole'],\n },\n },\n];\n\nexport default routes;\n"]}
|