@common-stack/client-react 0.6.1-alpha.4 → 1.0.1-alpha.1
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/__tests__/fill-register-test.js +16 -41
- package/lib/__tests__/fill-register-test.js.map +1 -1
- package/lib/__tests__/helpers/sample-menu.js +1 -4
- package/lib/__tests__/helpers/sample-menu.js.map +1 -1
- package/lib/__tests__/integrated-routes.test.js +17 -44
- package/lib/__tests__/integrated-routes.test.js.map +1 -1
- package/lib/__tests__/router-render.test.js +14 -57
- package/lib/__tests__/router-render.test.js.map +1 -1
- package/lib/connector/base-connector.d.ts +53 -0
- package/lib/connector/base-connector.js +129 -0
- package/lib/connector/base-connector.js.map +1 -0
- package/lib/connector/connector.d.ts +9 -0
- package/lib/connector/connector.js +14 -0
- package/lib/connector/connector.js.map +1 -0
- package/lib/connector/connector.native.d.ts +9 -0
- package/lib/connector/connector.native.js +15 -0
- package/lib/connector/connector.native.js.map +1 -0
- package/lib/connector/connector.test.js +11 -0
- package/lib/connector/connector.test.js.map +1 -0
- package/lib/connector/index.d.ts +1 -0
- package/lib/connector/index.js +2 -0
- package/lib/connector/index.js.map +1 -0
- package/lib/index.d.ts +1 -2
- package/lib/index.js +10 -29
- package/lib/index.js.map +1 -1
- package/lib/index.native.d.ts +1 -1
- package/lib/index.native.js +10 -28
- package/lib/index.native.js.map +1 -1
- package/lib/interfaces/extended-feature.d.ts +50 -0
- package/lib/interfaces/extended-feature.js +1 -56
- package/lib/interfaces/extended-feature.js.map +1 -1
- package/lib/interfaces/feature.d.ts +13 -0
- package/lib/interfaces/feature.js +2 -0
- package/lib/interfaces/feature.js.map +1 -0
- package/lib/interfaces/index.d.ts +2 -0
- package/lib/interfaces/index.js +5 -20
- package/lib/interfaces/index.js.map +1 -1
- package/lib/interfaces/menu.js +2 -5
- package/lib/interfaces/menu.js.map +1 -1
- package/lib/interfaces/new-router.js +1 -2
- package/lib/interfaces/router.js +1 -2
- package/lib/inversify/InversifyContext.d.ts +3 -3
- package/lib/inversify/InversifyContext.js +6 -34
- package/lib/inversify/InversifyContext.js.map +1 -1
- package/lib/inversify/index.js +1 -17
- package/lib/inversify/index.js.map +1 -1
- package/lib/plugin-area/__tests__/higher-order-component-util.test.js +13 -38
- package/lib/plugin-area/__tests__/higher-order-component-util.test.js.map +1 -1
- package/lib/plugin-area/__tests__/plugin-api.test.js +11 -13
- package/lib/plugin-area/__tests__/plugin-api.test.js.map +1 -1
- package/lib/plugin-area/base-plugin-area.js +18 -39
- package/lib/plugin-area/base-plugin-area.js.map +1 -1
- package/lib/plugin-area/higher-order-component-util.js +3 -7
- package/lib/plugin-area/higher-order-component-util.js.map +1 -1
- package/lib/plugin-area/index.js +5 -35
- package/lib/plugin-area/index.js.map +1 -1
- package/lib/plugin-area/index.native.js +7 -37
- package/lib/plugin-area/index.native.js.map +1 -1
- package/lib/plugin-area/plugin-api.js +15 -18
- package/lib/plugin-area/plugin-api.js.map +1 -1
- package/lib/plugin-area/plugin-context.js +5 -32
- package/lib/plugin-area/plugin-context.js.map +1 -1
- package/lib/route/__tests__/admin-new-routes.test.js +11 -45
- package/lib/route/__tests__/admin-new-routes.test.js.map +1 -1
- package/lib/route/__tests__/getFlatMenus.test.js +5 -7
- package/lib/route/__tests__/getFlatMenus.test.js.map +1 -1
- package/lib/route/__tests__/render-routes-config.test.js +6 -18
- package/lib/route/__tests__/render-routes-config.test.js.map +1 -1
- package/lib/route/__tests__/route-type.test.js +1 -2
- package/lib/route/__tests__/route-type.test.js.map +1 -1
- package/lib/route/get-routes.js +22 -29
- package/lib/route/get-routes.js.map +1 -1
- package/lib/route/get-routes.test.js +6 -17
- package/lib/route/get-routes.test.js.map +1 -1
- package/lib/route/index.js +2 -18
- package/lib/route/index.js.map +1 -1
- package/lib/route/index.native.js +1 -17
- package/lib/route/index.native.js.map +1 -1
- package/lib/route/old/__tests__/config-sidebar-menu.test.d.ts +1 -0
- package/lib/route/old/__tests__/config-sidebar-menu.test.js +199 -198
- package/lib/route/old/__tests__/config-sidebar-menu.test.js.map +1 -1
- package/lib/route/old/get-menus.js +14 -21
- package/lib/route/old/get-menus.js.map +1 -1
- package/lib/route/old/get-routes-notused.js +14 -12
- package/lib/route/old/get-routes-notused.js.map +1 -1
- package/lib/route/old/render.js +4 -31
- package/lib/route/old/render.js.map +1 -1
- package/lib/route/react-navigation/get-navigation-utils.js +35 -40
- package/lib/route/react-navigation/get-navigation-utils.js.map +1 -1
- package/lib/route/react-navigation/get-navigation-utils.test.js +19 -21
- package/lib/route/react-navigation/get-navigation-utils.test.js.map +1 -1
- package/lib/route/react-navigation/index.js +2 -18
- package/lib/route/react-navigation/index.js.map +1 -1
- package/lib/route/react-navigation/react-native.sample.test.js +8 -22
- package/lib/route/react-navigation/react-native.sample.test.js.map +1 -1
- package/lib/route/react-navigation/react-native.sample1.test.js +14 -48
- package/lib/route/react-navigation/react-native.sample1.test.js.map +1 -1
- package/lib/route/react-navigation/react-navigation-render.js +16 -31
- package/lib/route/react-navigation/react-navigation-render.js.map +1 -1
- package/lib/route/react-navigation/react-navigation-render.test.js +23 -37
- package/lib/route/react-navigation/react-navigation-render.test.js.map +1 -1
- package/lib/route/react-navigation/root-navigation.js +5 -9
- package/lib/route/react-navigation/root-navigation.js.map +1 -1
- package/lib/route/react-navigation/routes.js +1 -2
- package/lib/route/react-navigation/types.js +1 -5
- package/lib/route/react-navigation/types.js.map +1 -1
- package/lib/route/render-routes.js +33 -66
- package/lib/route/render-routes.js.map +1 -1
- package/lib/route/render-routes.native.js +33 -66
- package/lib/route/render-routes.native.js.map +1 -1
- package/lib/route/render-routes.test.js +112 -126
- package/lib/route/render-routes.test.js.map +1 -1
- package/lib/route/root-navigation.js +3 -7
- package/lib/route/root-navigation.js.map +1 -1
- package/lib/route-based-plugin-area/__tests__/higher-order-component-util.test.js +13 -38
- package/lib/route-based-plugin-area/__tests__/higher-order-component-util.test.js.map +1 -1
- package/lib/route-based-plugin-area/__tests__/plugin-api.test.js +11 -13
- package/lib/route-based-plugin-area/__tests__/plugin-api.test.js.map +1 -1
- package/lib/route-based-plugin-area/higher-order-component-util.js +3 -7
- package/lib/route-based-plugin-area/higher-order-component-util.js.map +1 -1
- package/lib/route-based-plugin-area/index.js +2 -18
- package/lib/route-based-plugin-area/index.js.map +1 -1
- package/lib/route-based-plugin-area/plugin-api.js +15 -18
- package/lib/route-based-plugin-area/plugin-api.js.map +1 -1
- package/lib/route-based-plugin-area/plugin-context.js +5 -32
- package/lib/route-based-plugin-area/plugin-context.js.map +1 -1
- package/lib/route-based-plugin-area/route-based-plugin-area.js +12 -39
- package/lib/route-based-plugin-area/route-based-plugin-area.js.map +1 -1
- package/lib/router-factory/index.d.ts +1 -1
- package/lib/router-factory/index.js +6 -32
- package/lib/router-factory/index.js.map +1 -1
- package/lib/router-factory/index.native.d.ts +1 -1
- package/lib/router-factory/index.native.js +6 -32
- package/lib/router-factory/index.native.js.map +1 -1
- package/lib/utils/before-ssr.d.ts +5 -0
- package/lib/utils/before-ssr.js +9 -0
- package/lib/utils/before-ssr.js.map +1 -0
- package/lib/utils/combine.d.ts +1 -0
- package/lib/utils/combine.js +3 -0
- package/lib/utils/combine.js.map +1 -0
- package/lib/utils/hydrate.d.ts +4 -0
- package/lib/utils/hydrate.js +14 -0
- package/lib/utils/hydrate.js.map +1 -0
- package/lib/utils/index.d.ts +3 -0
- package/lib/utils/index.js +5 -18
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/sort-keys.js +3 -10
- package/lib/utils/sort-keys.js.map +1 -1
- package/lib/utils/sort-keys.test.js +2 -4
- package/lib/utils/sort-keys.test.js.map +1 -1
- package/lib/utils/utils.js +1 -5
- package/lib/utils/utils.js.map +1 -1
- package/package.json +6 -5
- package/lib/application/__tests__/react-client.test.d.ts +0 -1
- package/lib/application/__tests__/react-client.test.js +0 -23
- package/lib/application/__tests__/react-client.test.js.map +0 -1
- package/lib/application/base-apollo-client.d.ts +0 -21
- package/lib/application/base-apollo-client.js +0 -161
- package/lib/application/base-apollo-client.js.map +0 -1
- package/lib/application/base-redux-config.d.ts +0 -22
- package/lib/application/base-redux-config.js +0 -58
- package/lib/application/base-redux-config.js.map +0 -1
- package/lib/application/config.d.ts +0 -4
- package/lib/application/config.js +0 -38
- package/lib/application/config.js.map +0 -1
- package/lib/application/react-client.d.ts +0 -7
- package/lib/application/react-client.js +0 -152
- package/lib/application/react-client.js.map +0 -1
- package/lib/connector/base-react-client-feature.d.ts +0 -31
- package/lib/connector/base-react-client-feature.js +0 -102
- package/lib/connector/base-react-client-feature.js.map +0 -1
- package/lib/connector/monaco-connector.d.ts +0 -19
- package/lib/connector/monaco-connector.js +0 -76
- package/lib/connector/monaco-connector.js.map +0 -1
- package/lib/connector/react-client-feature.d.ts +0 -7
- package/lib/connector/react-client-feature.js +0 -15
- package/lib/connector/react-client-feature.js.map +0 -1
- package/lib/connector/react-client-feature.native.d.ts +0 -7
- package/lib/connector/react-client-feature.native.js +0 -18
- package/lib/connector/react-client-feature.native.js.map +0 -1
- package/lib/connector/react-client-feature.test.js +0 -10
- package/lib/connector/react-client-feature.test.js.map +0 -1
- package/lib/interfaces/monaco-feature.d.ts +0 -46
- package/lib/interfaces/monaco-feature.js +0 -3
- package/lib/interfaces/monaco-feature.js.map +0 -1
- package/lib/interfaces/react-client-feature.d.ts +0 -77
- package/lib/interfaces/react-client-feature.js +0 -3
- package/lib/interfaces/react-client-feature.js.map +0 -1
- /package/lib/connector/{react-client-feature.test.d.ts → connector.test.d.ts} +0 -0
|
@@ -1,38 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.BasePluginArea = void 0;
|
|
27
|
-
const lodash_1 = require("lodash");
|
|
28
|
-
const React = __importStar(require("react"));
|
|
29
|
-
const hooks_1 = require("@wordpress/hooks");
|
|
30
|
-
const plugin_context_1 = require("./plugin-context");
|
|
31
|
-
const plugin_api_1 = require("./plugin-api");
|
|
1
|
+
import { map } from 'lodash-es';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { addAction, removeAction } from '@wordpress/hooks';
|
|
4
|
+
import { PluginContextProvider } from './plugin-context';
|
|
5
|
+
import { getPlugins } from './plugin-api';
|
|
32
6
|
/**
|
|
33
7
|
* A component that renders all plugin fills in a hidden div.
|
|
34
8
|
*/
|
|
35
|
-
class BasePluginArea extends React.Component {
|
|
9
|
+
export class BasePluginArea extends React.Component {
|
|
36
10
|
constructor(args) {
|
|
37
11
|
super(args);
|
|
38
12
|
this.setPlugins = this.setPlugins.bind(this);
|
|
@@ -40,7 +14,7 @@ class BasePluginArea extends React.Component {
|
|
|
40
14
|
}
|
|
41
15
|
getCurrentPluginsState() {
|
|
42
16
|
return {
|
|
43
|
-
plugins:
|
|
17
|
+
plugins: map(getPlugins(), ({ icon, name, render }) => {
|
|
44
18
|
return {
|
|
45
19
|
Plugin: render,
|
|
46
20
|
context: {
|
|
@@ -52,21 +26,26 @@ class BasePluginArea extends React.Component {
|
|
|
52
26
|
};
|
|
53
27
|
}
|
|
54
28
|
componentDidMount() {
|
|
55
|
-
|
|
56
|
-
|
|
29
|
+
addAction('plugins.pluginRegistered', 'core/plugins/plugin-area/plugins-registered', this.setPlugins);
|
|
30
|
+
addAction('plugins.pluginUnregistered', 'core/plugins/plugin-area/plugins-unregistered', this.setPlugins);
|
|
57
31
|
this.setPlugins();
|
|
58
32
|
}
|
|
59
33
|
componentWillUnMount() {
|
|
60
|
-
|
|
61
|
-
|
|
34
|
+
removeAction('plugins.pluginRegistered', 'core/plugins/plugin-area/plugins-registered');
|
|
35
|
+
removeAction('plugins.pluginUnregistered', 'core/plugins/plugin-area/plugins-unregistered');
|
|
62
36
|
}
|
|
63
37
|
setPlugins() {
|
|
64
38
|
this.setState(this.getCurrentPluginsState);
|
|
65
39
|
}
|
|
66
40
|
render() {
|
|
67
|
-
|
|
41
|
+
let { plugins } = this.state;
|
|
42
|
+
if (typeof window === 'undefined') {
|
|
43
|
+
// When server mode, setPlugins() will not be run, so should call manually.
|
|
44
|
+
const pluginsState = this.getCurrentPluginsState();
|
|
45
|
+
plugins = pluginsState.plugins;
|
|
46
|
+
}
|
|
47
|
+
return (React.createElement(React.Fragment, null, map(plugins, ({ context, Plugin }) => (React.createElement(PluginContextProvider, { key: context.name, value: context },
|
|
68
48
|
React.createElement(Plugin, null))))));
|
|
69
49
|
}
|
|
70
50
|
}
|
|
71
|
-
exports.BasePluginArea = BasePluginArea;
|
|
72
51
|
//# sourceMappingURL=base-plugin-area.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-plugin-area.js","sourceRoot":"","sources":["../../src/plugin-area/base-plugin-area.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base-plugin-area.js","sourceRoot":"","sources":["../../src/plugin-area/base-plugin-area.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,W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AAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAC7B,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;YACjC,2EAA2E;YAC3E,MAAM,YAAY,GAAG,IAAI,CAAC,sBAAsB,EAAE,CAAC;YACnD,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC;SAChC;QACD,OAAO,CACL,0CACG,GAAG,CAAC,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CACrC,oBAAC,qBAAqB,IACpB,GAAG,EAAE,OAAO,CAAC,IAAI,EACjB,KAAK,EAAE,OAAO;YAEd,oBAAC,MAAM,OAAG,CACY,CACzB,CAAC,CACD,CACJ,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createHigherOrderComponent = void 0;
|
|
4
|
-
const lodash_1 = require("lodash");
|
|
1
|
+
import { camelCase, upperFirst } from 'lodash-es';
|
|
5
2
|
/**
|
|
6
3
|
* Given a function mapping a component to an enhanced component and modifier
|
|
7
4
|
* name, returns the enhanced component augmented with a generated displayName.
|
|
@@ -11,13 +8,12 @@ const lodash_1 = require("lodash");
|
|
|
11
8
|
*
|
|
12
9
|
* @return Component class with generated display name assigned.
|
|
13
10
|
*/
|
|
14
|
-
function createHigherOrderComponent(mapComponentToEnhancedComponent, modifierName) {
|
|
11
|
+
export function createHigherOrderComponent(mapComponentToEnhancedComponent, modifierName) {
|
|
15
12
|
return (OriginalComponent) => {
|
|
16
13
|
const EnhancedComponent = mapComponentToEnhancedComponent(OriginalComponent);
|
|
17
14
|
const { displayName = OriginalComponent.name || 'Component', } = OriginalComponent;
|
|
18
|
-
EnhancedComponent.displayName = `${
|
|
15
|
+
EnhancedComponent.displayName = `${upperFirst(camelCase(modifierName))}(${displayName})`;
|
|
19
16
|
return EnhancedComponent;
|
|
20
17
|
};
|
|
21
18
|
}
|
|
22
|
-
exports.createHigherOrderComponent = createHigherOrderComponent;
|
|
23
19
|
//# sourceMappingURL=higher-order-component-util.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"higher-order-component-util.js","sourceRoot":"","sources":["../../src/plugin-area/higher-order-component-util.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"higher-order-component-util.js","sourceRoot":"","sources":["../../src/plugin-area/higher-order-component-util.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAElD;;;;;;;;GAQG;AACH,MAAM,UAAU,0BAA0B,CACtC,+BAA+B,EAC/B,YAAY;IAEZ,OAAO,CAAE,iBAAiB,EAAG,EAAE;QAC3B,MAAM,iBAAiB,GAAG,+BAA+B,CACrD,iBAAiB,CACpB,CAAC;QACF,MAAM,EACF,WAAW,GAAG,iBAAiB,CAAC,IAAI,IAAI,WAAW,GACtD,GAAG,iBAAiB,CAAC;QACtB,iBAAiB,CAAC,WAAW,GAAG,GAAI,UAAU,CAC1C,SAAS,CAAC,YAAY,CAAC,CAC1B,IAAI,WAAW,GAAG,CAAC;QAEpB,OAAO,iBAAiB,CAAC;IAC7B,CAAC,CAAA;AACL,CAAC"}
|
package/lib/plugin-area/index.js
CHANGED
|
@@ -1,38 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.PluginArea = void 0;
|
|
30
|
-
const React = __importStar(require("react"));
|
|
31
|
-
const base_plugin_area_1 = require("./base-plugin-area");
|
|
32
|
-
__exportStar(require("./plugin-api"), exports);
|
|
33
|
-
const PluginArea = () => {
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { BasePluginArea } from './base-plugin-area';
|
|
3
|
+
export * from './plugin-api';
|
|
4
|
+
export const PluginArea = () => {
|
|
34
5
|
return React.createElement("div", { style: { display: "none" } },
|
|
35
|
-
React.createElement(
|
|
6
|
+
React.createElement(BasePluginArea, null));
|
|
36
7
|
};
|
|
37
|
-
exports.PluginArea = PluginArea;
|
|
38
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugin-area/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugin-area/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,cAAc,cAAc,CAAC;AAE7B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,OAAO,6BAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACpC,oBAAC,cAAc,OAAG,CACd,CAAA;AACR,CAAC,CAAA"}
|
|
@@ -1,39 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
1
|
+
import { View } from 'native-base';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { BasePluginArea } from './base-plugin-area';
|
|
4
|
+
export * from './plugin-api';
|
|
5
|
+
export const PluginArea = () => {
|
|
6
|
+
return (React.createElement(View, { style: { display: "none" } },
|
|
7
|
+
React.createElement(BasePluginArea, null)));
|
|
24
8
|
};
|
|
25
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.PluginArea = void 0;
|
|
30
|
-
const native_base_1 = require("native-base");
|
|
31
|
-
const React = __importStar(require("react"));
|
|
32
|
-
const base_plugin_area_1 = require("./base-plugin-area");
|
|
33
|
-
__exportStar(require("./plugin-api"), exports);
|
|
34
|
-
const PluginArea = () => {
|
|
35
|
-
return (React.createElement(native_base_1.View, { style: { display: "none" } },
|
|
36
|
-
React.createElement(base_plugin_area_1.BasePluginArea, null)));
|
|
37
|
-
};
|
|
38
|
-
exports.PluginArea = PluginArea;
|
|
39
9
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../src/plugin-area/index.native.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../src/plugin-area/index.native.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,cAAc,cAAc,CAAC;AAE7B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC3B,OAAO,CACH,oBAAC,IAAI,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAC5B,oBAAC,cAAc,OAAG,CACf,CACV,CAAA;AACL,CAAC,CAAA"}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.getPlugins = exports.getPlugin = exports.unregisterPlugin = exports.registerPlugin = void 0;
|
|
4
|
-
const lodash_1 = require("lodash");
|
|
5
|
-
const hooks_1 = require("@wordpress/hooks");
|
|
1
|
+
import { isFunction } from 'lodash-es';
|
|
2
|
+
import { applyFilters, doAction } from '@wordpress/hooks';
|
|
6
3
|
/**
|
|
7
4
|
* Plugin definitions keyed by plugin name.
|
|
8
5
|
*/
|
|
@@ -13,7 +10,7 @@ const plugins = {};
|
|
|
13
10
|
* @param name A string identifying the plugin. Must be unique across all registered plugins.
|
|
14
11
|
* @param settings The settings for this plugin.
|
|
15
12
|
*/
|
|
16
|
-
function registerPlugin(name, settings) {
|
|
13
|
+
export function registerPlugin(name, settings) {
|
|
17
14
|
if (typeof settings !== 'object') {
|
|
18
15
|
console.error('No settings object provided!');
|
|
19
16
|
return null;
|
|
@@ -29,33 +26,35 @@ function registerPlugin(name, settings) {
|
|
|
29
26
|
if (plugins[name]) {
|
|
30
27
|
console.error(`Plugin "${name}" is alread registered.`);
|
|
31
28
|
}
|
|
32
|
-
settings =
|
|
33
|
-
if (!
|
|
29
|
+
settings = applyFilters('plugins.registerPlugin', settings, name);
|
|
30
|
+
if (!isFunction(settings.render)) {
|
|
34
31
|
console.error('The "render" property must be specified and must be a valid function.');
|
|
35
32
|
return null;
|
|
36
33
|
}
|
|
37
|
-
plugins[name] =
|
|
38
|
-
|
|
34
|
+
plugins[name] = {
|
|
35
|
+
name,
|
|
36
|
+
icon: 'admin-plugins',
|
|
37
|
+
...settings,
|
|
38
|
+
};
|
|
39
|
+
doAction('plugins.pluginRegistered', settings, name);
|
|
39
40
|
return settings;
|
|
40
41
|
}
|
|
41
|
-
exports.registerPlugin = registerPlugin;
|
|
42
42
|
/**
|
|
43
43
|
* Unregisteres a plugin by name.
|
|
44
44
|
* @param name Plugin name.
|
|
45
45
|
*
|
|
46
46
|
* @return The previous plugin settings object, if it has been successfully unregistered; otherwise `undefined`.
|
|
47
47
|
*/
|
|
48
|
-
function unregisterPlugin(name) {
|
|
48
|
+
export function unregisterPlugin(name) {
|
|
49
49
|
if (!plugins[name]) {
|
|
50
50
|
console.error('Plugin "' + name + '" is not registered.');
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
53
|
const oldPlugin = plugins[name];
|
|
54
54
|
delete plugins[name];
|
|
55
|
-
|
|
55
|
+
doAction('plugin.pluginUnregistered', oldPlugin, name);
|
|
56
56
|
return oldPlugin;
|
|
57
57
|
}
|
|
58
|
-
exports.unregisterPlugin = unregisterPlugin;
|
|
59
58
|
/**
|
|
60
59
|
* Returns a registered plugin settings.
|
|
61
60
|
*
|
|
@@ -63,17 +62,15 @@ exports.unregisterPlugin = unregisterPlugin;
|
|
|
63
62
|
*
|
|
64
63
|
* @returns Plugin setting.
|
|
65
64
|
*/
|
|
66
|
-
function getPlugin(name) {
|
|
65
|
+
export function getPlugin(name) {
|
|
67
66
|
return plugins[name];
|
|
68
67
|
}
|
|
69
|
-
exports.getPlugin = getPlugin;
|
|
70
68
|
/**
|
|
71
69
|
* Return all registered plugins.
|
|
72
70
|
*
|
|
73
71
|
* @return Plugin settings.
|
|
74
72
|
*/
|
|
75
|
-
function getPlugins() {
|
|
73
|
+
export function getPlugins() {
|
|
76
74
|
return Object.values(plugins);
|
|
77
75
|
}
|
|
78
|
-
exports.getPlugins = getPlugins;
|
|
79
76
|
//# sourceMappingURL=plugin-api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-api.js","sourceRoot":"","sources":["../../src/plugin-area/plugin-api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-api.js","sourceRoot":"","sources":["../../src/plugin-area/plugin-api.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAe1D;;GAEG;AACH,MAAM,OAAO,GAAyC,EAAE,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,IAAI,EAAE,QAAQ;IACzC,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;QAC9B,OAAO,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAC9C,OAAO,IAAI,CAAC;KACf;IACD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC1B,OAAO,CAAC,KAAK,CAAC,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ACH,MAAM,UAAU,UAAU;IACtB,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -1,37 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.withPluginContext = exports.PluginContextProvider = void 0;
|
|
27
|
-
const React = __importStar(require("react"));
|
|
28
|
-
const higher_order_component_util_1 = require("./higher-order-component-util");
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createHigherOrderComponent } from './higher-order-component-util';
|
|
29
3
|
const { createContext } = React;
|
|
30
4
|
const { Consumer, Provider } = createContext({
|
|
31
5
|
name: null,
|
|
32
6
|
icon: null,
|
|
33
7
|
});
|
|
34
|
-
|
|
8
|
+
export { Provider as PluginContextProvider };
|
|
35
9
|
/**
|
|
36
10
|
* A Higher Order Component used to inject Plugin context to the
|
|
37
11
|
* wrapped component.
|
|
@@ -41,8 +15,7 @@ exports.PluginContextProvider = Provider;
|
|
|
41
15
|
*
|
|
42
16
|
* @return Enhanced component with injected context as props.
|
|
43
17
|
*/
|
|
44
|
-
const withPluginContext = (mapContextToProps) =>
|
|
45
|
-
return (props) => (React.createElement(Consumer, null, (context) => (React.createElement(OriginalComponent,
|
|
18
|
+
export const withPluginContext = (mapContextToProps) => createHigherOrderComponent((OriginalComponent) => {
|
|
19
|
+
return (props) => (React.createElement(Consumer, null, (context) => (React.createElement(OriginalComponent, { ...props, ...mapContextToProps(context, props) }))));
|
|
46
20
|
}, 'withPluginContext');
|
|
47
|
-
exports.withPluginContext = withPluginContext;
|
|
48
21
|
//# sourceMappingURL=plugin-context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-context.js","sourceRoot":"","sources":["../../src/plugin-area/plugin-context.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-context.js","sourceRoot":"","sources":["../../src/plugin-area/plugin-context.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAE3E,MAAO,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;AACjC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,aAAa,CAAC;IACzC,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;CACb,CAAC,CAAC;AAEH,OAAO,EAAE,QAAQ,IAAI,qBAAqB,EAAE,CAAC;AAG7C;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,iBAAiB,EAAE,EAAE,CACnD,0BAA0B,CAAC,CAAC,iBAAiB,EAAE,EAAE;IAC7C,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CACd,oBAAC,QAAQ,QACJ,CAAC,OAAO,EAAE,EAAE,CAAC,CACV,oBAAC,iBAAiB,OACV,KAAK,KACL,iBAAiB,CAAC,OAAO,EAAE,KAAK,CAAC,GACvC,CACL,CACM,CACd,CAAC;AACN,CAAC,EAAE,mBAAmB,CAAC,CAAC"}
|
|
@@ -1,42 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
const React = __importStar(require("react"));
|
|
36
|
-
const get_routes_1 = require("../get-routes");
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { getRoutes } from '../get-routes';
|
|
37
3
|
const sortKeys = require('sort-keys');
|
|
38
|
-
|
|
39
|
-
|
|
4
|
+
import { renderRoutes2 as renderRoutes } from '../render-routes';
|
|
5
|
+
import 'jest';
|
|
40
6
|
function MyComponent(props) {
|
|
41
7
|
return React.createElement("div", null,
|
|
42
8
|
"MyComponent ",
|
|
@@ -153,7 +119,7 @@ function notStartWithColon(str) {
|
|
|
153
119
|
return !str.match(/^\/:.*/);
|
|
154
120
|
}
|
|
155
121
|
describe('new getRoutes utility with basic routes', () => {
|
|
156
|
-
xtest('with /a', () =>
|
|
122
|
+
xtest('with /a', async () => {
|
|
157
123
|
const result = {
|
|
158
124
|
// component: any,
|
|
159
125
|
routes: [{
|
|
@@ -163,17 +129,17 @@ describe('new getRoutes utility with basic routes', () => {
|
|
|
163
129
|
{ path: '/ab/2/1', exact: true }],
|
|
164
130
|
}],
|
|
165
131
|
};
|
|
166
|
-
const routes1 =
|
|
132
|
+
const routes1 = getRoutes('/', sortKeys(routerConfig1));
|
|
167
133
|
// const routes = getRoutes(/^\/.*/, sortKeys(routerConfig, { compare }));
|
|
168
134
|
expect(routes1).toMatchSnapshot();
|
|
169
135
|
// expect(routes).toMatchSnapshot();
|
|
170
|
-
})
|
|
171
|
-
test('with org', () =>
|
|
172
|
-
const routes1 =
|
|
173
|
-
const renderedRoutes = (
|
|
136
|
+
});
|
|
137
|
+
test('with org', async () => {
|
|
138
|
+
const routes1 = getRoutes('/', sortKeys(routerConfig1));
|
|
139
|
+
const renderedRoutes = renderRoutes({
|
|
174
140
|
routes: routes1,
|
|
175
141
|
});
|
|
176
142
|
expect(renderedRoutes).toMatchSnapshot();
|
|
177
|
-
})
|
|
143
|
+
});
|
|
178
144
|
});
|
|
179
145
|
//# sourceMappingURL=admin-new-routes.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-new-routes.test.js","sourceRoot":"","sources":["../../../src/route/__tests__/admin-new-routes.test.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"admin-new-routes.test.js","sourceRoot":"","sources":["../../../src/route/__tests__/admin-new-routes.test.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AACtC,OAAO,EAAE,aAAa,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,MAAM,CAAC;AAEd,SAAS,WAAW,CAAC,KAAK;IACtB,OAAO;;QAAkB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAO,CAAC;AAC1D,CAAC;AAED,MAAM,aAAa,GAAG;IAClB,CAAC,GAAG,CAAC,EAAE;QACH,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,WAAW;KACzB;IACD,CAAC,IAAI,CAAC,EAAE;QACJ,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,WAAW;KACzB;IACD,CAAC,KAAK,CAAC,EAAE;QACL,SAAS,EAAE,WAAW;KACzB;IACD,CAAC,MAAM,CAAC,EAAE;QACN,SAAS,EAAE,WAAW;KACzB;IACD,CAAC,OAAO,CAAC,EAAE;QACP,SAAS,EAAE,WAAW;KACzB;IACD,CAAC,SAAS,CAAC,EAAE;QACT,SAAS,EAAE,WAAW;KACzB;IACD,CAAC,SAAS,CAAC,EAAE;QACT,KAAK,EA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AAe,EAAE,CAAC;IAG7C,CAAC,CAAC,CAAC;AAEP,CAAC,CAAC,CAAC"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const route_utils_1 = require("@umijs/route-utils");
|
|
1
|
+
import { getFlatMenus, transformRoute } from '@umijs/route-utils';
|
|
4
2
|
const routes = [
|
|
5
3
|
{
|
|
6
4
|
path: '/welcome',
|
|
@@ -35,7 +33,7 @@ const routes = [
|
|
|
35
33
|
},
|
|
36
34
|
{ path: '/', redirect: '/welcome', exact: true, unaccessible: false },
|
|
37
35
|
];
|
|
38
|
-
const { menuData } =
|
|
36
|
+
const { menuData } = transformRoute(routes, true, ({ id }) => {
|
|
39
37
|
if (id === 'menu.list.table-list')
|
|
40
38
|
return 'query table';
|
|
41
39
|
if (id === 'menu.list.table.result')
|
|
@@ -51,10 +49,10 @@ const { menuData } = (0, route_utils_1.transformRoute)(routes, true, ({ id }) =>
|
|
|
51
49
|
console.log('---Menu Data', menuData);
|
|
52
50
|
describe('getFlatMenus', () => {
|
|
53
51
|
it('normal', () => {
|
|
54
|
-
const flatMenus =
|
|
52
|
+
const flatMenus = getFlatMenus(menuData);
|
|
55
53
|
console.log('--flatMenus', flatMenus);
|
|
56
54
|
expect(Object.keys(flatMenus).length).toEqual(5);
|
|
57
|
-
expect(flatMenus['/list'].name).toEqual('
|
|
55
|
+
expect(flatMenus['/list'].name).toEqual('Inquiry Form');
|
|
58
56
|
expect(flatMenus).toMatchSnapshot();
|
|
59
57
|
});
|
|
60
58
|
it('no has ket', () => {
|
|
@@ -89,7 +87,7 @@ describe('getFlatMenus', () => {
|
|
|
89
87
|
pro_layout_parentKeys: [],
|
|
90
88
|
},
|
|
91
89
|
];
|
|
92
|
-
const flatMenus =
|
|
90
|
+
const flatMenus = getFlatMenus(noHasKeyData);
|
|
93
91
|
expect(Object.keys(flatMenus).length).toEqual(2);
|
|
94
92
|
});
|
|
95
93
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFlatMenus.test.js","sourceRoot":"","sources":["../../../src/route/__tests__/getFlatMenus.test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getFlatMenus.test.js","sourceRoot":"","sources":["../../../src/route/__tests__/getFlatMenus.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAEjE,MAAM,MAAM,GAAG;IACX;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,IAAI;QACX,YAAY,EAAE,KAAK;KACpB;IACD;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,UAAU;QAClB,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,iBAAiB;gBACvB,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,IAAI;gBACX,YAAY,EAAE,KAAK;aACpB;SACF;KACF;IACD;QACE,IAAI,EAAE,mBAAmB;QACzB,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,IAAI;QACX,YAAY,EAAE,KAAK;KACpB;IACD;QACE,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,IAAI;QACX,YAAY,EAAE,KAAK;KACpB;IACD,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE;CACtE,CAAC;AAEF,MAAM,EAAC,QAAQ,EAAC,GAAG,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;IACzD,IAAI,EAAE,KAAI,sBAAsB;QAAE,OAAM,aAAa,CAAC;IACtD,IAAI,EAAE,KAAI,wBAAwB;QAAE,OAAM,cAAc,CAAC;IACzD,IAAI,EAAE,KAAI,YAAY;QAAE,OAAM,YA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aACpB;YACD;gBACE,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,KAAK;gBACX,MAAM,EAAE,UAAU;gBAClB,MAAM,EAAE,IAAI;gBACZ,MAAM,EAAE,YAAY;gBACpB,qBAAqB,EAAE,EAAE;aAC1B;SACF,CAAC;QACF,MAAM,SAAS,GAAG,YAAY,CAAC,YAAY,CAAC,CAAC;QAC7C,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,22 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.logger = void 0;
|
|
13
|
-
const server_1 = require("@cdm-logger/server");
|
|
14
|
-
const get_routes_1 = require("../get-routes");
|
|
15
|
-
exports.logger = server_1.ConsoleLogger.create('test', { level: 'trace' });
|
|
1
|
+
import { ConsoleLogger } from '@cdm-logger/server';
|
|
2
|
+
import { getRoutes } from '../get-routes';
|
|
3
|
+
export const logger = ConsoleLogger.create('test', { level: 'trace' });
|
|
16
4
|
function MyComponent(props) {
|
|
17
5
|
return {};
|
|
18
6
|
}
|
|
19
|
-
test('loading success', () =>
|
|
7
|
+
test('loading success', async () => {
|
|
20
8
|
const routerConfig = (namespace = '') => ({
|
|
21
9
|
[namespace + '/a']: {
|
|
22
10
|
component: () => MyComponent,
|
|
@@ -64,6 +52,6 @@ test('loading success', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
64
52
|
component: () => MyComponent,
|
|
65
53
|
},
|
|
66
54
|
});
|
|
67
|
-
console.log(
|
|
68
|
-
})
|
|
55
|
+
console.log(getRoutes('/', routerConfig('@test'), null));
|
|
56
|
+
});
|
|
69
57
|
//# sourceMappingURL=render-routes-config.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-routes-config.test.js","sourceRoot":"","sources":["../../../src/route/__tests__/render-routes-config.test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"render-routes-config.test.js","sourceRoot":"","sources":["../../../src/route/__tests__/render-routes-config.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,MAAM,CAAC,MAAM,MAAM,GAAsB,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;AAE1F,SAAS,WAAW,CAAC,KAAK;IACtB,OAAO,EAAE,CAAA;AACb,CAAC;AAED,IAAI,CAAC,iBAAiB,EAAE,KAAK,IAAI,EAAE;IAC/B,MAAM,YAAY,GAAG,CAAC,SAAS,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;QACtC,CAAC,SAAS,GAAG,IAAI,CAAC,EAAE;YAChB,SAAS,EAAE,GAAG,EAAE,CAAC,WAAW;SAC/B;QACD,CAAC,IAAI,CAAC,EAAE;YACJ,SAAS,EAAE,GAAG,EAAE,CAAC,WAAW;SAC/B;QACD,CAAC,MAAM,CAAC,EAAE;YACN,SAAS,EAAE,GAAG,EAAE,CAAC,WAAW;SAC/B;QACD,CAAC,QAAQ,CAAC,EAAE;YACR,SAAS,EAAE,GAAG,EAAE,CAAC,WAAW;SAC/B;QACD,CAAC,IAAI,CAAC,EAAE;YACJ,SAAS,EAAE,GAAG,EAAE,CAAC,WAAW;SAC/B;QACD,CAAC,MAAM,CAAC,EAAE;YACN,SAAS,EAAE,GAAG,EAAE,CAAC,WAAW;SAC/B;QACD,CAAC,QAAQ,CAAC,EAAE;YACR,SAAS,EAAE,GAAG,EAAE,CAAC,WAAW;SAC/B;QACD,CAAC,UAAU,CAAC,EAAE;YACV,SAAS,EAAE,GAAG,EAAE,CAAC,WAAW;SAC/B;QACD,CAAC,YAAY,CAAC,EAAE;YACZ,SAAS,EAAE,GAAG,EAAE,CAAC,WAAW;SAC/B;QACD,CAAC,SAAS,GAAG,MAAM,CAAC,EAAE;YAClB,SAAS,EAAE,GAAG,EAAE,CAAC,WAAW;SAC/B;QACD,CAAC,SAAS,GAAG,MAAM,CAAC,EAAE;YAClB,SAAS,EAAE,GAAG,EAAE,CAAC,WAAW;SAC/B;QACD,CAAC,SAAS,GAAG,QAAQ,CAAC,EAAE;YACpB,SAAS,EAAE,GAAG,EAAE,CAAC,WAAW;SAC/B;QACD,CAAC,SAAS,GAAG,SAAS,CAAC,EAAE;YACrB,SAAS,EAAE,GAAG,EAAE,CAAC,WAAW;SAC/B;QACD,CAAC,SAAS,GAAG,MAAM,CAAC,EAAE;YAClB,SAAS,EAAE,GAAG,EAAE,CAAC,WAAW;SAC/B;QACD,CAAC,SAAS,GAAG,QAAQ,CAAC,EAAE;YACpB,SAAS,EAAE,GAAG,EAAE,CAAC,WAAW;SAC/B;KACJ,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AAC7D,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-type.test.js","sourceRoot":"","sources":["../../../src/route/__tests__/route-type.test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"route-type.test.js","sourceRoot":"","sources":["../../../src/route/__tests__/route-type.test.ts"],"names":[],"mappings":"AAMA,MAAM,KAAK,GAA6B;IACvC,CAAC,OAAO,CAAC,EAAE;QACR,QAAQ,EAAE,KAAK;QACf,SAAS,EAAE,CAAC,MAAM,CAAC;KAErB;CACD,CAAA"}
|