@common-stack/client-react 0.5.1-alpha.4 → 0.6.1-alpha.0
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 +14 -14
- package/lib/__tests__/fill-register-test.js.map +1 -1
- package/lib/__tests__/integrated-routes.test.js +6 -7
- package/lib/__tests__/integrated-routes.test.js.map +1 -1
- package/lib/__tests__/router-render.test.js +2 -2
- package/lib/__tests__/router-render.test.js.map +1 -1
- package/lib/connector/base-react-client-feature.d.ts +31 -0
- package/lib/connector/{base-connector.js → base-react-client-feature.js} +23 -79
- package/lib/connector/base-react-client-feature.js.map +1 -0
- package/lib/connector/monaco-connector.d.ts +19 -0
- package/lib/connector/monaco-connector.js +76 -0
- package/lib/connector/monaco-connector.js.map +1 -0
- package/lib/connector/react-client-feature.d.ts +7 -0
- package/lib/connector/react-client-feature.js +15 -0
- package/lib/connector/react-client-feature.js.map +1 -0
- package/lib/connector/react-client-feature.native.d.ts +7 -0
- package/lib/connector/react-client-feature.native.js +18 -0
- package/lib/connector/react-client-feature.native.js.map +1 -0
- package/lib/connector/{connector.test.d.ts → react-client-feature.test.d.ts} +0 -0
- package/lib/connector/react-client-feature.test.js +10 -0
- package/lib/connector/react-client-feature.test.js.map +1 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/index.native.d.ts +1 -1
- package/lib/index.native.js +1 -1
- package/lib/index.native.js.map +1 -1
- package/lib/interfaces/extended-feature.d.ts +0 -50
- package/lib/interfaces/extended-feature.js +56 -2
- package/lib/interfaces/extended-feature.js.map +1 -1
- package/lib/interfaces/index.d.ts +0 -1
- package/lib/interfaces/index.js +1 -1
- package/lib/interfaces/index.js.map +1 -1
- package/lib/interfaces/monaco-feature.d.ts +46 -0
- package/lib/interfaces/monaco-feature.js +3 -0
- package/lib/interfaces/monaco-feature.js.map +1 -0
- package/lib/interfaces/react-client-feature.d.ts +77 -0
- package/lib/interfaces/react-client-feature.js +3 -0
- package/lib/interfaces/react-client-feature.js.map +1 -0
- package/lib/inversify/InversifyContext.d.ts +3 -3
- package/lib/inversify/InversifyContext.js.map +1 -1
- package/lib/plugin-area/__tests__/higher-order-component-util.test.js +1 -1
- package/lib/plugin-area/__tests__/higher-order-component-util.test.js.map +1 -1
- package/lib/route/__tests__/getFlatMenus.test.js +1 -1
- package/lib/route/__tests__/getFlatMenus.test.js.map +1 -1
- package/lib/route/old/__tests__/config-sidebar-menu.test.d.ts +0 -1
- package/lib/route/old/__tests__/config-sidebar-menu.test.js +198 -197
- package/lib/route/old/__tests__/config-sidebar-menu.test.js.map +1 -1
- package/lib/route/react-navigation/get-navigation-utils.test.js +6 -6
- package/lib/route/react-navigation/get-navigation-utils.test.js.map +1 -1
- package/lib/route/react-navigation/react-navigation-render.test.d.ts +1 -1
- package/lib/route/react-navigation/react-navigation-render.test.js +42 -9
- package/lib/route/react-navigation/react-navigation-render.test.js.map +1 -1
- package/lib/route-based-plugin-area/__tests__/higher-order-component-util.test.js +1 -1
- package/lib/route-based-plugin-area/__tests__/higher-order-component-util.test.js.map +1 -1
- package/lib/router-factory/index.d.ts +1 -1
- package/lib/router-factory/index.js +4 -4
- 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 +4 -4
- package/lib/router-factory/index.native.js.map +1 -1
- package/package.json +4 -4
- package/lib/connector/base-connector.d.ts +0 -53
- package/lib/connector/base-connector.js.map +0 -1
- package/lib/connector/connector.d.ts +0 -9
- package/lib/connector/connector.js +0 -18
- package/lib/connector/connector.js.map +0 -1
- package/lib/connector/connector.native.d.ts +0 -9
- package/lib/connector/connector.native.js +0 -22
- package/lib/connector/connector.native.js.map +0 -1
- package/lib/connector/connector.test.js +0 -36
- package/lib/connector/connector.test.js.map +0 -1
- package/lib/connector/index.d.ts +0 -1
- package/lib/connector/index.js +0 -18
- package/lib/connector/index.js.map +0 -1
|
@@ -1,3 +1,57 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// import * as React from 'react';
|
|
2
|
+
// import { IFeature } from '@common-stack/client-core';
|
|
3
|
+
// import { IMappedData, IRouteData } from './router';
|
|
4
|
+
// import { IMenuData } from './menu';
|
|
5
|
+
// import { ComponentElement } from 'react';
|
|
6
|
+
// export interface IPlugin {
|
|
7
|
+
// name: string;
|
|
8
|
+
// icon?: string | ComponentElement<any, any> | Function;
|
|
9
|
+
// render: React.FC<any>;
|
|
10
|
+
// }
|
|
11
|
+
// export type IReactFeature = IFeature & IReactModuleShape & {
|
|
12
|
+
// readonly getRouter;
|
|
13
|
+
// /**
|
|
14
|
+
// * @returns client-side React route components list
|
|
15
|
+
// */
|
|
16
|
+
// readonly getRoutes;
|
|
17
|
+
// readonly getConfiguredRoutes;
|
|
18
|
+
// readonly getMenus;
|
|
19
|
+
// readonly getConfiguredMenus;
|
|
20
|
+
// readonly routeConfig: IRouteData;
|
|
21
|
+
// readonly menuConfig: IMappedData;
|
|
22
|
+
// // Related to React Slot Fill
|
|
23
|
+
// componentFillPlugins: IPlugin[];
|
|
24
|
+
// /**
|
|
25
|
+
// * React component of all fill of each plugin.
|
|
26
|
+
// */
|
|
27
|
+
// getComponentFillPlugins(): IPlugin[];
|
|
28
|
+
// /**
|
|
29
|
+
// * Authentication Wrapper for secured routes
|
|
30
|
+
// */
|
|
31
|
+
// readonly authWrapper?: (
|
|
32
|
+
// ele: React.ReactElement,
|
|
33
|
+
// props: Record<string, any>) => void
|
|
34
|
+
// };
|
|
35
|
+
// export type IReactModuleShape = {
|
|
36
|
+
// /**
|
|
37
|
+
// * @param route Route list
|
|
38
|
+
// */
|
|
39
|
+
// readonly route?: any;
|
|
40
|
+
// /**
|
|
41
|
+
// * @param routeConfig Custom route data to create React Routers
|
|
42
|
+
// */
|
|
43
|
+
// readonly routeConfig?: IRouteData | IRouteData[];
|
|
44
|
+
// /**
|
|
45
|
+
// * @param menuConfig Menu data to create side menu
|
|
46
|
+
// */
|
|
47
|
+
// readonly menuConfig?: IMenuData | IMenuData[];
|
|
48
|
+
// // Related to React Slot Fill
|
|
49
|
+
// readonly componentFillPlugins?: IPlugin[];
|
|
50
|
+
// /**
|
|
51
|
+
// * Authentication Wrapper for secured routes
|
|
52
|
+
// */
|
|
53
|
+
// readonly authWrapper?: (
|
|
54
|
+
// ele: React.ReactElement,
|
|
55
|
+
// props: Record<string, any>) => void
|
|
56
|
+
// };
|
|
3
57
|
//# sourceMappingURL=extended-feature.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extended-feature.js","sourceRoot":"","sources":["../../src/interfaces/extended-feature.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"extended-feature.js","sourceRoot":"","sources":["../../src/interfaces/extended-feature.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,wDAAwD;AACxD,sDAAsD;AACtD,sCAAsC;AACtC,4CAA4C;AAE5C,6BAA6B;AAC7B,oBAAoB;AACpB,6DAA6D;AAC7D,6BAA6B;AAC7B,IAAI;AAEJ,+DAA+D;AAE/D,0BAA0B;AAC1B,UAAU;AACV,0DAA0D;AAC1D,UAAU;AACV,0BAA0B;AAC1B,oCAAoC;AAEpC,yBAAyB;AACzB,mCAAmC;AAEnC,wCAAwC;AACxC,wCAAwC;AAExC,oCAAoC;AACpC,uCAAuC;AACvC,UAAU;AACV,qDAAqD;AACrD,UAAU;AACV,4CAA4C;AAE5C,UAAU;AACV,mDAAmD;AACnD,UAAU;AACV,+BAA+B;AAC/B,mCAAmC;AACnC,8CAA8C;AAC9C,KAAK;AAEL,oCAAoC;AACpC,UAAU;AACV,iCAAiC;AACjC,UAAU;AACV,4BAA4B;AAC5B,UAAU;AACV,sEAAsE;AACtE,UAAU;AACV,wDAAwD;AAExD,UAAU;AACV,yDAAyD;AACzD,UAAU;AACV,qDAAqD;AACrD,oCAAoC;AACpC,iDAAiD;AAEjD,UAAU;AACV,mDAAmD;AACnD,UAAU;AACV,+BAA+B;AAC/B,mCAAmC;AACnC,8CAA8C;AAE9C,KAAK"}
|
package/lib/interfaces/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./router"), exports);
|
|
18
|
-
|
|
18
|
+
// export * from './extended-feature';
|
|
19
19
|
__exportStar(require("./menu"), exports);
|
|
20
20
|
__exportStar(require("./new-router"), exports);
|
|
21
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,sCAAsC;AACtC,yCAAuB;AACvB,+CAA6B"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { IApolloClientFeature } from "@common-stack/client-core";
|
|
2
|
+
export interface IMonacoClientFeatureShape extends IApolloClientFeature {
|
|
3
|
+
/**
|
|
4
|
+
* @param languagesFuncs To register languages for monaco editor. Used for extensions
|
|
5
|
+
*/
|
|
6
|
+
languagesFuncs?: any;
|
|
7
|
+
/**
|
|
8
|
+
* @param leftMainPanelItems Components that will be placed left panel.
|
|
9
|
+
*/
|
|
10
|
+
leftMainPanelItems?: any;
|
|
11
|
+
/**
|
|
12
|
+
* @param middleMainPanelItems Components that will be placed middle center panel
|
|
13
|
+
*/
|
|
14
|
+
middleMainPanelItems?: any;
|
|
15
|
+
/**
|
|
16
|
+
* @param middleMainPanelItemsProps Props of the component that will be placed middle center panel
|
|
17
|
+
*/
|
|
18
|
+
middleMainPanelItemsProps?: any;
|
|
19
|
+
/**
|
|
20
|
+
* @param leftFooterItems Components that will be placed left footer panel
|
|
21
|
+
*/
|
|
22
|
+
leftFooterItems?: any;
|
|
23
|
+
/**
|
|
24
|
+
* @param rightFooterItems Components that will be placed right footer panel
|
|
25
|
+
*/
|
|
26
|
+
rightFooterItems?: any;
|
|
27
|
+
/**
|
|
28
|
+
* @param middleLowerPanelItems Components that will be placed below middle panel
|
|
29
|
+
*/
|
|
30
|
+
middleLowerPanelItems?: any;
|
|
31
|
+
}
|
|
32
|
+
export interface IMonacoClientFeature extends IMonacoClientFeatureShape {
|
|
33
|
+
readonly languagesFuncs?: any;
|
|
34
|
+
readonly leftMainPanelItems?: any;
|
|
35
|
+
readonly middleMainPanelItems?: any;
|
|
36
|
+
readonly middleMainPanelItemsProps?: any;
|
|
37
|
+
readonly leftFooterItems?: any;
|
|
38
|
+
readonly rightFooterItems?: any;
|
|
39
|
+
readonly middleLowerPanelItems?: any;
|
|
40
|
+
readonly leftMainPanel: any;
|
|
41
|
+
readonly middleMainPanel: any;
|
|
42
|
+
readonly leftFooter: any;
|
|
43
|
+
readonly rightFooter: any;
|
|
44
|
+
readonly middleLowerPanel: any;
|
|
45
|
+
registerLanguages(monaco: any): void;
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monaco-feature.js","sourceRoot":"","sources":["../../src/interfaces/monaco-feature.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IBaseClientFeatureShape } from '@common-stack/client-core';
|
|
3
|
+
import { IMenuData } from './menu';
|
|
4
|
+
import { IRouteData } from './router';
|
|
5
|
+
/**
|
|
6
|
+
* A function that creates React Element that wraps root element of a React tree
|
|
7
|
+
*/
|
|
8
|
+
export declare type RootComponentFactory = (req: Request) => React.ReactElement<any>;
|
|
9
|
+
export interface IPlugin {
|
|
10
|
+
name: string;
|
|
11
|
+
icon?: string | React.ComponentElement<any, any> | Function;
|
|
12
|
+
render: React.FC<any>;
|
|
13
|
+
}
|
|
14
|
+
export interface IReactClientFeatureShape extends IBaseClientFeatureShape {
|
|
15
|
+
sidebarSegmentsIn?: any[];
|
|
16
|
+
routerFactoryIn?: any[];
|
|
17
|
+
/**
|
|
18
|
+
* @param route Route list
|
|
19
|
+
*/
|
|
20
|
+
routeConfigIn?: IRouteData[];
|
|
21
|
+
/**
|
|
22
|
+
* @param stylesInsert URL list to 3rd party css scripts
|
|
23
|
+
*/
|
|
24
|
+
stylesIn?: string[];
|
|
25
|
+
/**
|
|
26
|
+
* @param scriptsInsert URL list to 3rd party js scripts
|
|
27
|
+
*/
|
|
28
|
+
scriptsIn?: string[];
|
|
29
|
+
/**
|
|
30
|
+
* @param rootComponentFactory Root component factory list
|
|
31
|
+
*/
|
|
32
|
+
rootComponentFactoryIn?: RootComponentFactory[];
|
|
33
|
+
/**
|
|
34
|
+
* @param dataRootComponent Data root React elements list (data root elements wraps data fetching react subtree root)
|
|
35
|
+
*/
|
|
36
|
+
dataRootComponentIn?: React.ComponentType[];
|
|
37
|
+
/**
|
|
38
|
+
* @param navItem Top left navigation links
|
|
39
|
+
*/
|
|
40
|
+
navItemIn?: React.ReactElement<any>[];
|
|
41
|
+
/**
|
|
42
|
+
* @param navItemRightTop right navigation links
|
|
43
|
+
*/
|
|
44
|
+
navItemRightIn?: React.ReactElement<any>[];
|
|
45
|
+
/**
|
|
46
|
+
* @param menuConfig Menu data to create side menu
|
|
47
|
+
* @deprecated
|
|
48
|
+
*/
|
|
49
|
+
readonly menuConfigIn?: IMenuData[];
|
|
50
|
+
readonly componentFillPluginIn?: IPlugin[];
|
|
51
|
+
/**
|
|
52
|
+
* Authentication Wrapper for secured routes
|
|
53
|
+
*/
|
|
54
|
+
readonly authWrapperIn?: (ele: React.ReactElement, props: Record<string, any>) => void;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Base module ancestor for React and React Native feature modules.
|
|
58
|
+
*/
|
|
59
|
+
export interface IReactClientFeature extends IReactClientFeatureShape {
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @param root React tree data root component (first React root components which is used for fetching data)
|
|
63
|
+
*
|
|
64
|
+
* @returns React tree data root component wrapped up by data root components exposed by this module
|
|
65
|
+
*/
|
|
66
|
+
getDataRoot(root: React.ReactElement<any>): any;
|
|
67
|
+
/**
|
|
68
|
+
* @arguments root React tree root component
|
|
69
|
+
* @arguments req Http Request
|
|
70
|
+
* @returns React tree root component wrapped up by root components exposed by this module
|
|
71
|
+
*/
|
|
72
|
+
getWrappedRoot(root: React.ReactElement<any>, req?: Request): any;
|
|
73
|
+
getRoutes(searchPath: string, searchName?: string): any;
|
|
74
|
+
getMenus(sortByPriority?: boolean): any;
|
|
75
|
+
getConfiguredRoutes(searchPath?: string): any;
|
|
76
|
+
getComponentFillPlugins(): any;
|
|
77
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-client-feature.js","sourceRoot":"","sources":["../../src/interfaces/react-client-feature.ts"],"names":[],"mappings":""}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { interfaces } from 'inversify';
|
|
3
|
-
import {
|
|
3
|
+
import { IBaseClientFeature } from '@common-stack/client-core';
|
|
4
4
|
export declare const InversifyContext: React.Context<{
|
|
5
5
|
container: interfaces.Container | null;
|
|
6
|
-
modules:
|
|
6
|
+
modules: IBaseClientFeature;
|
|
7
7
|
}>;
|
|
8
8
|
declare type Props = {
|
|
9
9
|
container: interfaces.Container;
|
|
10
|
-
modules:
|
|
10
|
+
modules: IBaseClientFeature;
|
|
11
11
|
children: React.ReactNode;
|
|
12
12
|
};
|
|
13
13
|
export declare const InversifyProvider: React.FC<Props>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InversifyContext.js","sourceRoot":"","sources":["../../src/inversify/InversifyContext.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAIlB,QAAA,gBAAgB,GAAG,KAAK,CAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"InversifyContext.js","sourceRoot":"","sources":["../../src/inversify/InversifyContext.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAIlB,QAAA,gBAAgB,GAAG,KAAK,CAAC,aAAa,CAAyE,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AASzJ,MAAM,iBAAiB,GAAoB,CAAC,KAAK,EAAE,EAAE;IACxD,OAAO,CACH,oBAAC,wBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAC,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,IAClF,KAAK,CAAC,QAAQ,CACS,CAC/B,CAAC;AACN,CAAC,CAAC;AANW,QAAA,iBAAiB,qBAM5B;AAEF,SAAgB,YAAY,CAAI,UAA2C;IACvE,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,wBAAgB,CAAC,CAAC;IACzD,IAAI,CAAC,SAAS,EAAE;QACZ,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;KACxC;IACD,OAAO,SAAS,CAAC,GAAG,CAAI,UAAU,CAAC,CAAC;AACxC,CAAC;AAND,oCAMC"}
|
|
@@ -28,7 +28,7 @@ const higher_order_component_util_1 = require("../higher-order-component-util");
|
|
|
28
28
|
describe('createHigherOrderComponent', () => {
|
|
29
29
|
it('should use default name for anonymous function', () => {
|
|
30
30
|
const TestComponent = (0, higher_order_component_util_1.createHigherOrderComponent)((OriginalComponent) => OriginalComponent, 'withTest')(() => react_1.default.createElement("div", null));
|
|
31
|
-
expect(TestComponent.displayName).toBe('WithTest(Component');
|
|
31
|
+
expect(TestComponent.displayName).toBe('WithTest(Component)');
|
|
32
32
|
});
|
|
33
33
|
it('should use camel case starting with upper for wrapper prefix ', () => {
|
|
34
34
|
const TestComponent = (0, higher_order_component_util_1.createHigherOrderComponent)((OriginalComponent) => OriginalComponent, 'with-one-two_threeFOUR')(() => react_1.default.createElement("div", null));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"higher-order-component-util.test.js","sourceRoot":"","sources":["../../../src/plugin-area/__tests__/higher-order-component-util.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAyC;AAGzC,gFAA4E;AAE5E,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;IACxC,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;QACtD,MAAM,aAAa,GAAG,IAAA,wDAA0B,EAC5C,CAAC,iBAAiB,EAAE,EAAE,CAAC,iBAAiB,EACxC,UAAU,CACb,CAAE,GAAG,EAAE,CAAC,0CAAO,CAAE,CAAC;QAEnB,MAAM,CAAE,aAAa,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"higher-order-component-util.test.js","sourceRoot":"","sources":["../../../src/plugin-area/__tests__/higher-order-component-util.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAyC;AAGzC,gFAA4E;AAE5E,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;IACxC,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;QACtD,MAAM,aAAa,GAAG,IAAA,wDAA0B,EAC5C,CAAC,iBAAiB,EAAE,EAAE,CAAC,iBAAiB,EACxC,UAAU,CACb,CAAE,GAAG,EAAE,CAAC,0CAAO,CAAE,CAAC;QAEnB,MAAM,CAAE,aAAa,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAE,+DAA+D,EAAE,GAAG,EAAE;QAC5E,MAAM,aAAa,GAAG,IAAA,wDAA0B,EAC/C,CAAE,iBAAiB,EAAG,EAAE,CAAC,iBA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CAAE,CAAC,IAAI,CACvC,6BAA6B,CAC7B,CAAC;IACH,CAAC,CAAE,CAAC;AACL,CAAC,CAAC,CAAA"}
|
|
@@ -54,7 +54,7 @@ describe('getFlatMenus', () => {
|
|
|
54
54
|
const flatMenus = (0, route_utils_1.getFlatMenus)(menuData);
|
|
55
55
|
console.log('--flatMenus', flatMenus);
|
|
56
56
|
expect(Object.keys(flatMenus).length).toEqual(5);
|
|
57
|
-
expect(flatMenus['/list'].name).toEqual('
|
|
57
|
+
expect(flatMenus['/list'].name).toEqual('query table');
|
|
58
58
|
expect(flatMenus).toMatchSnapshot();
|
|
59
59
|
});
|
|
60
60
|
it('no has ket', () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFlatMenus.test.js","sourceRoot":"","sources":["../../../src/route/__tests__/getFlatMenus.test.ts"],"names":[],"mappings":";;AAAA,oDAAiE;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;AA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