@common-stack/client-react 8.0.2-alpha.0 → 8.1.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/LICENSE CHANGED
@@ -1,21 +1,34 @@
1
- The MIT License
2
-
3
- Copyright (c) 2017 CDMBase LLC.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ PROPRIETARY LICENSE
2
+
3
+ Copyright (c) 2017-2025 CDMBase LLC. All Rights Reserved.
4
+
5
+ This software and associated documentation files (the "Software") are the
6
+ proprietary and confidential information of CDMBase LLC ("Confidential Information").
7
+
8
+ NOTICE: All information contained herein is, and remains the property of
9
+ CDMBase LLC. The intellectual and technical concepts contained herein are
10
+ proprietary to CDMBase LLC and may be covered by U.S. and Foreign Patents,
11
+ patents in process, and are protected by trade secret or copyright law.
12
+
13
+ Dissemination of this information or reproduction of this material is strictly
14
+ forbidden unless prior written permission is obtained from CDMBase LLC.
15
+
16
+ NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL
17
+ PROPERTY RIGHTS ARE GRANTED BY THIS DOCUMENT.
18
+
19
+ RESTRICTIONS:
20
+ 1. You may NOT use, copy, modify, merge, publish, distribute, sublicense,
21
+ and/or sell copies of the Software without explicit written permission
22
+ from CDMBase LLC.
23
+ 2. You may NOT reverse engineer, decompile, or disassemble the Software.
24
+ 3. You may NOT remove or alter any proprietary notices or labels on the Software.
25
+ 4. The Software is licensed, not sold.
26
+
27
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
30
+ CDMBASE LLC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
31
+ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
32
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33
+
34
+ For licensing inquiries, please contact: legal@cdmbase.com
@@ -47,7 +47,12 @@ export declare abstract class BaseFeature extends AbstractFeature implements IRe
47
47
  getDataRoot(root: any): any;
48
48
  registerLanguages(monaco: any): void;
49
49
  private registerComponentFillPlugins;
50
- getComponentFillPlugins(): import("../plugin-area").WorbenchExtension[];
50
+ getComponentFillPlugins(): {
51
+ index: number;
52
+ name: string;
53
+ icon: string | React.ComponentElement<any, any> | Function;
54
+ render: React.FC | any;
55
+ }[];
51
56
  private sortMenusByPriority;
52
57
  private sortMenus;
53
58
  }
@@ -1,4 +1,4 @@
1
- import*as React from'react';import {AbstractFeature}from'@common-stack/client-core';import {merge,sortBy,find}from'lodash-es';import'@wordpress/hooks';import'../plugin-area/plugin-context.js';import {getPlugin,registerPlugin,getPlugins}from'../plugin-area/plugin-api.js';import'sort-keys';import {combine}from'../utils/combine.js';import {hydrate}from'../utils/hydrate.js';import {beforeSSR}from'../utils/before-ssr.js';const getFirst = (features, extractor) => extractor(find(features, (res) => extractor(res)) || {});
1
+ import*as React from'react';import {AbstractFeature}from'@common-stack/client-core';import {merge,sortBy,find}from'lodash-es';import'@wordpress/hooks';import'@common-stack/components-pro';import'../plugin-area/plugin-context.js';import {getPlugin,registerPlugin,getPlugins}from'../plugin-area/plugin-api.js';import'sort-keys';import {combine}from'../utils/combine.js';import {hydrate}from'../utils/hydrate.js';import {beforeSSR}from'../utils/before-ssr.js';const getFirst = (features, extractor) => extractor(find(features, (res) => extractor(res)) || {});
2
2
  class BaseFeature extends AbstractFeature {
3
3
  // private logger;
4
4
  componentFillPlugins;
@@ -1 +1 @@
1
- {"version":3,"file":"base-connector.js","sources":["../../src/connector/base-connector.tsx"],"sourcesContent":[null],"names":[],"mappings":"oaAOA,MAAM,QAAQ,GAAG,CAAC,QAAQ,EAAE,SAAS,KAAK,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,GAAG,KAAK,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AAE7F,MAAgB,WAAY,SAAQ,eAAe,CAAA;;AAE9C,IAAA,oBAAoB,CAAC;AAErB,IAAA,OAAO,CAA0B;AACjC,IAAA,SAAS,CAA4B;;;AAGrC,IAAA,WAAW,CAAuB;AAClC,IAAA,WAAW,CAAM;AACjB,IAAA,UAAU,CAAM;AAChB,IAAA,WAAW,CAAgE;AAElF,IAAA,WAAA,CACI,OAAsB;;AAEtB,IAAA,GAAG,QAAwB,EAAA;AAE3B,QAAA,KAAK,CAAC,OAAO,EAAE,GAAG,QAAQ,CAAC,CAAC;;;AAI5B,QAAA,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,GAAiB,KAAK,GAAG,CAAC,aAAa,CAAC;aAC5E,KAAK,CAAC,CAAC,CAAC,CAAC;AACT,aAAA,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AAC,cAAc,EAAE,KAAK,KAAI;QAC1C,IAAI,cAAc,EAAE;YAChB,MAAM,QAAQ,GAAG,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;AACjD,YAAA,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,KAAI;gBACzB,OAAO;AACH,oBAAA,GAAG,IAAI;AACP,oBAAA,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE,IAAI,CAAC,QAAQ,CAAC;iBAC3E,CAAC;AACN,aAAC,CAAC,CAAC;SACN;aAAM;AACH,YAAA,OAAO,KAAK,CAAC;SAChB;AACL,KAAC,CAAC;AACL"}
@@ -1,8 +1,27 @@
1
1
  import { IReactFeature } from '../interfaces';
2
2
  import { BaseFeature } from './base-connector';
3
+ import { IModuleStateMachine } from '@common-stack/client-core';
3
4
  export declare class Feature extends BaseFeature implements IReactFeature {
4
5
  protected renderRoutes: any;
5
6
  protected renderRoutes2: any;
6
7
  protected getSortedRoutes: (path: string, routeData: import("packages/common-core/lib/component/interfaces/routeJson").IComputedRoutesArray, authWrapper?: (ele: React.ReactElement, props: Record<string, any>) => void) => any;
7
8
  protected getSortedRoutes2: (path: string, routeData: import("packages/common-core/lib/component/interfaces/routeJson").IComputedRoutesArray, authWrapper?: (ele: React.ReactElement, props: Record<string, any>) => void) => any;
9
+ /**
10
+ * Register an XState machine for this feature
11
+ * All registered machines are managed centrally via @common-stack/client-core
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const feature = new Feature([...routes]);
16
+ * feature.registerXState({
17
+ * key: 'chat-completion',
18
+ * name: 'Chat Completion',
19
+ * machine: completionMachine,
20
+ * inputs: [{ key: 'message', description: 'User message' }],
21
+ * outputs: [{ key: 'response', description: 'AI response' }],
22
+ * priority: 10
23
+ * });
24
+ * ```
25
+ */
26
+ registerXState(config: IModuleStateMachine): void;
8
27
  }
@@ -1,6 +1,26 @@
1
- import {BaseFeature}from'./base-connector.js';import {getSortedRoutes}from'../route/get-routes.js';class Feature extends BaseFeature {
1
+ import {BaseFeature}from'./base-connector.js';import {getSortedRoutes}from'../route/get-routes.js';import {stateMachineRegistry}from'@common-stack/client-core';class Feature extends BaseFeature {
2
2
  renderRoutes = null;
3
3
  renderRoutes2 = null;
4
4
  getSortedRoutes = getSortedRoutes;
5
5
  getSortedRoutes2 = getSortedRoutes;
6
+ /**
7
+ * Register an XState machine for this feature
8
+ * All registered machines are managed centrally via @common-stack/client-core
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const feature = new Feature([...routes]);
13
+ * feature.registerXState({
14
+ * key: 'chat-completion',
15
+ * name: 'Chat Completion',
16
+ * machine: completionMachine,
17
+ * inputs: [{ key: 'message', description: 'User message' }],
18
+ * outputs: [{ key: 'response', description: 'AI response' }],
19
+ * priority: 10
20
+ * });
21
+ * ```
22
+ */
23
+ registerXState(config) {
24
+ stateMachineRegistry.register(config);
25
+ }
6
26
  }export{Feature};//# sourceMappingURL=connector.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"connector.js","sources":["../../src/connector/connector.tsx"],"sourcesContent":[null],"names":[],"mappings":"mGAIM,MAAO,OAAQ,SAAQ,WAAW,CAAA;IAC1B,YAAY,GAAG,IAAI,CAAC;IACpB,aAAa,GAAG,IAAI,CAAC;IACrB,eAAe,GAAG,eAAe,CAAC;IAClC,gBAAgB,GAAG,eAAe,CAAC;AAChD"}
1
+ {"version":3,"file":"connector.js","sources":["../../src/connector/connector.tsx"],"sourcesContent":[null],"names":[],"mappings":"gKAKM,MAAO,OAAQ,SAAQ,WAAW,CAAA;IAC1B,YAAY,GAAG,IAAI,CAAC;IACpB,aAAa,GAAG,IAAI,CAAC;IACrB,eAAe,GAAG,eAAe,CAAC;IAClC,gBAAgB,GAAG,eAAe,CAAC;AAE7C;;;;;;;;;;;;;;;;AAgBG;AACI,IAAA,cAAc,CAAC,MAA2B,EAAA;AAC7C,QAAA,oBAAoB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;KACzC;AACJ"}
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- export{ClientTypes}from'@common-stack/client-core';export{Feature}from'./connector/connector.js';export{FeatureWithRouterFactory}from'./router-factory/index.js';export{default as resolveRootRoute}from'./route/react-navigation/react-navigation-render.js';export{getNavigation,getSortedNavigations}from'./route/react-navigation/get-navigation-utils.js';export{navigate,navigationRef}from'./route/root-navigation.js';export{sortByPaths,sortKeys}from'./utils/sort-keys.js';export{formatSlash}from'./utils/utils.js';export{combine}from'./utils/combine.js';export{hydrate}from'./utils/hydrate.js';export{beforeSSR}from'./utils/before-ssr.js';export{getFilteredMenus,getFilteredRoutes,getFilteredTabs}from'./utils/filteredRoutes.js';export{IMenuPosition}from'@common-stack/core/lib/component/interfaces/menu.js';export{PluginArea}from'./plugin-area/index.js';export{RouteBasedPluginArea}from'./route-based-plugin-area/route-based-plugin-area.js';export{getRouteBasePlugin,getRouteBasePlugins,registerRouteBasePlugin,unregisterRouteBasePlugin}from'./route-based-plugin-area/plugin-api.js';export{InversifyContext,InversifyProvider,useInjection}from'./inversify/InversifyContext.js';export{getPlugin,getPlugins,registerPlugin,unregisterPlugin}from'./plugin-area/plugin-api.js';//# sourceMappingURL=index.js.map
1
+ export{ClientTypes}from'@common-stack/client-core';export{Feature}from'./connector/connector.js';export{FeatureWithRouterFactory}from'./router-factory/index.js';export{default as resolveRootRoute}from'./route/react-navigation/react-navigation-render.js';export{getNavigation,getSortedNavigations}from'./route/react-navigation/get-navigation-utils.js';export{navigate,navigationRef}from'./route/root-navigation.js';export{sortByPaths,sortKeys}from'./utils/sort-keys.js';export{formatSlash}from'./utils/utils.js';export{combine}from'./utils/combine.js';export{hydrate}from'./utils/hydrate.js';export{beforeSSR}from'./utils/before-ssr.js';export{getAvailableCategories,getAvailableSubCategories,getFilteredMenus,getFilteredRoutes,getFilteredTabs,getMenusByAdvancedFilter,getMenusByCategory,getMenusByCategoryAndSubCategory,getMenusBySubCategory,getMenusBySystemType,getMenusByUserRole,getRoutesByAdvancedFilter,getRoutesByCategory,getRoutesByCategoryAndSubCategory,getRoutesBySubCategory,getRoutesBySystemType,getRoutesByUserRole,getTabsBySystemType,groupRoutesByCategory,groupRoutesByCategoryAndSubCategory}from'./utils/filteredRoutes.js';export{IMenuPosition}from'@common-stack/core/lib/component/interfaces/menu.js';export{PluginArea}from'./plugin-area/index.js';export{RouteBasedPluginArea}from'./route-based-plugin-area/route-based-plugin-area.js';export{getRouteBasePlugin,getRouteBasePlugins,registerRouteBasePlugin,unregisterRouteBasePlugin}from'./route-based-plugin-area/plugin-api.js';export{InversifyContext,InversifyProvider,useInjection}from'./inversify/InversifyContext.js';export{getPlugin,getPlugins,registerPlugin,unregisterPlugin}from'./plugin-area/plugin-api.js';//# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- export{ClientTypes}from'@common-stack/client-core';export{Feature}from'./connector/connector.native.js';export{FeatureWithRouterFactory}from'./router-factory/index.native.js';export{navigate,navigationRef}from'./route/react-navigation/root-navigation.js';export{sortByPaths,sortKeys}from'./utils/sort-keys.js';export{formatSlash}from'./utils/utils.js';export{combine}from'./utils/combine.js';export{hydrate}from'./utils/hydrate.js';export{beforeSSR}from'./utils/before-ssr.js';export{getFilteredMenus,getFilteredRoutes,getFilteredTabs}from'./utils/filteredRoutes.js';export{IMenuPosition}from'@common-stack/core/lib/component/interfaces/menu.js';export{PluginArea}from'./plugin-area/index.native.js';export{RouteBasedPluginArea}from'./route-based-plugin-area/route-based-plugin-area.js';export{getRouteBasePlugin,getRouteBasePlugins,registerRouteBasePlugin,unregisterRouteBasePlugin}from'./route-based-plugin-area/plugin-api.js';export{InversifyContext,InversifyProvider,useInjection}from'./inversify/InversifyContext.js';export{getPlugin,getPlugins,registerPlugin,unregisterPlugin}from'./plugin-area/plugin-api.js';//# sourceMappingURL=index.native.js.map
1
+ export{ClientTypes}from'@common-stack/client-core';export{Feature}from'./connector/connector.native.js';export{FeatureWithRouterFactory}from'./router-factory/index.native.js';export{navigate,navigationRef}from'./route/react-navigation/root-navigation.js';export{sortByPaths,sortKeys}from'./utils/sort-keys.js';export{formatSlash}from'./utils/utils.js';export{combine}from'./utils/combine.js';export{hydrate}from'./utils/hydrate.js';export{beforeSSR}from'./utils/before-ssr.js';export{getAvailableCategories,getAvailableSubCategories,getFilteredMenus,getFilteredRoutes,getFilteredTabs,getMenusByAdvancedFilter,getMenusByCategory,getMenusByCategoryAndSubCategory,getMenusBySubCategory,getMenusBySystemType,getMenusByUserRole,getRoutesByAdvancedFilter,getRoutesByCategory,getRoutesByCategoryAndSubCategory,getRoutesBySubCategory,getRoutesBySystemType,getRoutesByUserRole,getTabsBySystemType,groupRoutesByCategory,groupRoutesByCategoryAndSubCategory}from'./utils/filteredRoutes.js';export{IMenuPosition}from'@common-stack/core/lib/component/interfaces/menu.js';export{PluginArea}from'./plugin-area/index.native.js';export{RouteBasedPluginArea}from'./route-based-plugin-area/route-based-plugin-area.js';export{getRouteBasePlugin,getRouteBasePlugins,registerRouteBasePlugin,unregisterRouteBasePlugin}from'./route-based-plugin-area/plugin-api.js';export{InversifyContext,InversifyProvider,useInjection}from'./inversify/InversifyContext.js';export{getPlugin,getPlugins,registerPlugin,unregisterPlugin}from'./plugin-area/plugin-api.js';//# sourceMappingURL=index.native.js.map
@@ -1,15 +1,10 @@
1
1
  import * as React from 'react';
2
- import { IFeature } from '@common-stack/client-core';
3
- import { ComponentElement } from 'react';
2
+ import { IFeature, IPlugin } from '@common-stack/client-core';
4
3
  import { IMenuData } from './menu';
5
4
  import { IComputedRoutesArray } from './route';
6
- export interface IPlugin {
7
- name: string;
8
- icon?: string | ComponentElement<any, any> | Function;
9
- render: React.FC<any>;
10
- }
11
5
  export interface IReduxConfig {
12
6
  ignoredActions?: string[];
7
+ ignoredPaths?: string[];
13
8
  }
14
9
  export type IReactModuleShape = {
15
10
  /**
@@ -11,9 +11,14 @@ export declare class BasePluginArea extends React.Component<{}, {
11
11
  getCurrentPluginsState(): {
12
12
  plugins: {
13
13
  Plugin: any;
14
+ props: {
15
+ index: any;
16
+ name: any;
17
+ renderImporter: any;
18
+ };
14
19
  context: {
15
- name: string;
16
- icon: string | Function | React.ComponentElement<any, any>;
20
+ name: any;
21
+ icon: any;
17
22
  };
18
23
  }[];
19
24
  };
@@ -1,4 +1,4 @@
1
- import {map}from'lodash-es';import*as React from'react';import {addAction,removeAction}from'@wordpress/hooks';import {PluginContextProvider as Provider}from'./plugin-context.js';import {getPlugins}from'./plugin-api.js';/**
1
+ import {map}from'lodash-es';import*as React from'react';import {addAction,removeAction}from'@wordpress/hooks';import {Fill}from'@common-stack/components-pro';import {PluginContextProvider as Provider}from'./plugin-context.js';import {getPlugins}from'./plugin-api.js';/**
2
2
  * A component that renders all plugin fills in a hidden div.
3
3
  */
4
4
  class BasePluginArea extends React.Component {
@@ -9,9 +9,14 @@ class BasePluginArea extends React.Component {
9
9
  }
10
10
  getCurrentPluginsState() {
11
11
  return {
12
- plugins: map(getPlugins(), ({ icon, name, render }) => {
12
+ plugins: map(getPlugins(), ({ icon, name, render, renderImporter, index }) => {
13
13
  return {
14
14
  Plugin: render,
15
+ props: {
16
+ index, // index of the plugin to match with the loader data
17
+ name,
18
+ renderImporter,
19
+ },
15
20
  context: {
16
21
  name,
17
22
  icon,
@@ -39,7 +44,6 @@ class BasePluginArea extends React.Component {
39
44
  const pluginsState = this.getCurrentPluginsState();
40
45
  plugins = pluginsState.plugins;
41
46
  }
42
- return (React.createElement(React.Fragment, null, map(plugins, ({ context, Plugin }) => (React.createElement(Provider, { key: context.name, value: context },
43
- React.createElement(Plugin, null))))));
47
+ return (React.createElement(React.Fragment, null, map(plugins, ({ context, Plugin, props }) => (React.createElement(Provider, { key: context.name, value: context }, Plugin ? React.createElement(Plugin, null) : React.createElement(Fill, { ...props }))))));
44
48
  }
45
49
  }export{BasePluginArea};//# sourceMappingURL=base-plugin-area.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-plugin-area.js","sources":["../../src/plugin-area/base-plug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AA,MAAM,YAAY,GAAG,IAAI,CAAC,sBAAsB,EAAE,CAAC;AACnD,YAAA,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC;SAChC;QACD,QACE,KACG,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EAAA,GAAG,CAAC,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,MAChC,KAAA,CAAA,aAAA,CAACA,QAAqB,EAAA,EACpB,GAAG,EAAE,OAAO,CAAC,IAAI,EACjB,KAAK,EAAE,OAAO,EAAA;AAEd,YAAA,KAAA,CAAA,aAAA,CAAC,MAAM,EAAG,IAAA,CAAA,CACY,CACzB,CAAC,CACD,EACH;KACH;AACF"}
1
+ {"version":3,"file":"base-plugin-area.js","sources":["../../src/plugin-area/base-plugin-area.tsx"],"sourcesContent":[null],"names":["PluginContextProvider"],"mappings":"2QAOA;;AAEG;AAEU,MAAA,cAAe,SAAQ,KAAK,CAAC,SAAkD,CAAA;AACxF,IAAA,WAAA,CAAY,IAAI,EAAA;QACZ,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,KAAK,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;KAChC;IAEM,sBAAsB,GAAA;QACzB,OAAO;AACH,YAAA,OAAO,EAAE,GAAG,CAAC,UAAU,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,EAAO,KAAI;gBAC9E,OAAO;AACH,oBAAA,MAAM,EAAE,MAAM;AACd,oBAAA,KAAK,EAAE;AACH,wBAAA,KAAK;wBACL,IAAI;wBACJ,cAAc;AACjB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,IAAI;wBACJ,IAAI;AACP,qBAAA;iBACJ,CAAC;AACN,aAAC,CAAC;SACL,CAAC;KACL;IAEM,iBAAiB,GAAA;QACpB,SAAS,CAAC,0BAA0B,EAAE,6CAA6C,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACtG,SAAS,CAAC,4BAA4B,EAAE,+CAA+C,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAC1G,IAAI,CAAC,UAAU,EAAE,CAAC;KACrB;IAEM,oBAAoB,GAAA;AACvB,QAAA,YAAY,CAAC,0BAA0B,EAAE,6CAA6C,CAAC,CAAC;AACxF,QAAA,YAAY,CAAC,4BAA4B,EAAE,+CAA+C,CAAC,CAAC;KAC/F;IAEM,UAAU,GAAA;AACb,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;KAC9C;IAEM,MAAM,GAAA;AACT,QAAA,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;AAC7B,QAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;;AAE/B,YAAA,MAAM,YAAY,GAAG,IAAI,CAAC,sBAAsB,EAAE,CAAC;AACnD,YAAA,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC;SAClC;QACD,QACI,0CACK,GAAG,CAAC,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MACrC,oBAACA,QAAqB,EAAA,EAAC,GAAG,EAAE,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EACnD,EAAA,MAAM,GAAG,KAAC,CAAA,aAAA,CAAA,MAAM,EAAG,IAAA,CAAA,GAAG,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EAAA,GAAK,KAAK,EAAA,CAAI,CACtB,CAC3B,CAAC,CACH,EACL;KACL;AACJ"}
@@ -38,4 +38,9 @@ export declare function getPlugin(name: any): WorbenchExtension;
38
38
  *
39
39
  * @return Plugin settings.
40
40
  */
41
- export declare function getPlugins(): WorbenchExtension[];
41
+ export declare function getPlugins(): {
42
+ index: number;
43
+ name: string;
44
+ icon: string | ComponentElement<any, any> | Function;
45
+ render: React.FC | any;
46
+ }[];
@@ -25,8 +25,12 @@ function registerPlugin(name, settings) {
25
25
  console.error(`Plugin "${name}" is alread registered.`);
26
26
  }
27
27
  settings = applyFilters('plugins.registerPlugin', settings, name);
28
- if (!isFunction(settings.render)) {
29
- console.error('The "render" property must be specified and must be a valid function.');
28
+ if (!settings.render && !settings.renderImporter) {
29
+ console.error('Plugin must have either a "render" or "renderImporter" property.');
30
+ return null;
31
+ }
32
+ if (settings.render && !isFunction(settings.render)) {
33
+ console.error('The "render" property must be a valid function.');
30
34
  return null;
31
35
  }
32
36
  plugins[name] = {
@@ -69,5 +73,5 @@ function getPlugin(name) {
69
73
  * @return Plugin settings.
70
74
  */
71
75
  function getPlugins() {
72
- return Object.values(plugins);
76
+ return Object.values(plugins).map((plugin, index) => ({ ...plugin, index }));
73
77
  }export{getPlugin,getPlugins,registerPlugin,unregisterPlugin};//# sourceMappingURL=plugin-api.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-api.js","sources":["../../src/plugin-area/plugin-api.ts"],"sourcesContent":[null],"names":[],"mappings":"wFAkBA;;AAEG;AACH,MAAM,OAAO,GAAyC,EAAE,CAAC;AAEzD;;;;;AAKG;AACa,SAAA,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAA;AACzC,IAAA,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;AAC9B,QAAA,OAAO,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAC9C,QAAA,OAAO,IAAI,CAAC;KACf;AACD,IAAA,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;AAC1B,QAAA,OAAO,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;AAC/C,QAAA,OAAO,IAAI,CAAC;KACf;IACD,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;AAClC,QAAA,OAAO,CAAC,KAAK,CACT,0IAA0I,CAC7I,CAAC;AACF,QAAA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AI,CAAC,GAAG;QACZ,IAAI;AACJ,QAAA,IAAI,EAAE,eAAe;AACrB,QAAA,GAAG,QAAQ;KACd,CAAC;AAEF,IAAA,QAAQ,CAAC,0BAA0B,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;AAErD,IAAA,OAAO,QAAQ,CAAC;AACpB,CAAC;AAED;;;;;AAKG;AACG,SAAU,gBAAgB,CAAC,IAAI,EAAA;AACjC,IAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QAChB,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,IAAI,GAAG,sBAAsB,CAAC,CAAC;QAC1D,OAAO;KACV;AACD,IAAA,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAChC,IAAA,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;AAErB,IAAA,QAAQ,CAAC,2BAA2B,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;AAEvD,IAAA,OAAO,SAAS,CAAC;AACrB,CAAC;AAED;;;;;;AAMG;AACG,SAAU,SAAS,CAAC,IAAI,EAAA;AAC1B,IAAA,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED;;;;AAIG;SACa,UAAU,GAAA;IACtB,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,MAAM,EAAE,GAAG,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;AACjF"}
@@ -25,8 +25,12 @@ function registerRouteBasePlugin(name, settings) {
25
25
  console.error(`Plugin "${name}" is alread registered.`);
26
26
  }
27
27
  settings = applyFilters('plugins.registerPlugin', settings, name);
28
- if (!isFunction(settings.render)) {
29
- console.error('The "render" property must be specified and must be a valid function.');
28
+ if (!settings.render && !settings.renderImporter) {
29
+ console.error('Plugin must have either a "render" or "renderImporter" property.');
30
+ return null;
31
+ }
32
+ if (settings.render && !isFunction(settings.render)) {
33
+ console.error('The "render" property must be a valid function.');
30
34
  return null;
31
35
  }
32
36
  plugins[name] = {
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-api.js","sources":["../../src/route-based-plugin-area/plugin-api.ts"],"sourcesContent":[null],"names":[],"mappings":"wFAmBA;;AAEG;AACH,MAAM,OAAO,GAAyC,EAAE,CAAC;AAEzD;;;;;AAKG;AACa,SAAA,uBAAuB,CAAC,IAAI,EAAE,QAAQ,EAAA;AAClD,IAAA,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;AAC9B,QAAA,OAAO,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAC9C,QAAA,OAAO,IAAI,CAAC;KACf;AACD,IAAA,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;AAC1B,QAAA,OAAO,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;AAC/C,QAAA,OAAO,IAAI,CAAC;KACf;IACD,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;AACjC,QAAA,OAAO,CAAC,KAAK,CACT,2HAA2H,CAC9H,CAAC;AACF,QAAA,OAAO,IAAI,CAAC;KACf;AACD,IAAA,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE;AACf,QAAA,OAAO,CAAC,KAAK,CAAC,WAAW,IAAI,CAAA,uBAAA,CAAyB,CAAC,CAAC;KAC3D;IACD,QAAQ,GAAG,YAAY,CAAC,wBAAwB,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;IAElE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;AAC9B,QAAA,OAAO,CAAC,KAAK,CACT,uEAAuE,CAC1E,CAAC;AACF,QAAA,OAAO,IAAI,CAAC;KACf;IACD,OAAO,CAAC,IAAI,CAAC,GAAG;QACZ,IAAI;AACJ,QAAA,IAAI,EAAE,eAAe;AACrB,QAAA,GAAG,QAAQ;KACd,CAAC;AAEF,IAAA,QAAQ,CAAC,0BAA0B,EAAE,QAAQ,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,CAAC,2BAA2B,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;AAEvD,IAAA,OAAO,SAAS,CAAC;AACrB,CAAC;AAED;;;;;;AAMG;AACG,SAAU,kBAAkB,CAAC,IAAI,EAAA;AACnC,IAAA,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED;;;;AAIG;SACa,mBAAmB,GAAA;AAC/B,IAAA,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAClC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -3,4 +3,132 @@ type SelectedType = '*' | string[];
3
3
  export declare const getFilteredMenus: (accountPageStore: IRouteModule[], selectedMenu?: SelectedType) => IRouteMap[];
4
4
  export declare const getFilteredRoutes: (accountPageStore: IRouteModule[], selectedRoutes?: SelectedType) => IRouteMap[];
5
5
  export declare const getFilteredTabs: (accountPageStore: IRouteModule[], selectedTabs?: SelectedType) => Omit<IRouteModule, "component">[];
6
+ /**
7
+ * Filter routes by system type (admin vs user visibility)
8
+ * @param accountPageStore - Array of route modules
9
+ * @param systemType - System type to filter by ('system' for admin only, 'user' for common users/owners)
10
+ * @returns Filtered routes based on system type
11
+ */
12
+ export declare const getRoutesBySystemType: (accountPageStore: IRouteModule[], systemType: "system" | "user") => IRouteMap[];
13
+ /**
14
+ * Filter menus by system type (admin vs user visibility)
15
+ * @param accountPageStore - Array of route modules
16
+ * @param systemType - System type to filter by ('system' for admin only, 'user' for common users/owners)
17
+ * @returns Filtered menus based on system type
18
+ */
19
+ export declare const getMenusBySystemType: (accountPageStore: IRouteModule[], systemType: "system" | "user") => IRouteMap[];
20
+ /**
21
+ * Filter tabs by system type (admin vs user visibility)
22
+ * @param accountPageStore - Array of route modules
23
+ * @param systemType - System type to filter by ('system' for admin only, 'user' for common users/owners)
24
+ * @returns Filtered tabs based on system type
25
+ */
26
+ export declare const getTabsBySystemType: (accountPageStore: IRouteModule[], systemType: "system" | "user") => Omit<IRouteModule, "component">[];
27
+ /**
28
+ * Get routes that are accessible by user role (combines system and user types)
29
+ * @param accountPageStore - Array of route modules
30
+ * @param userRole - User role ('admin' sees all, 'user' sees only user type)
31
+ * @returns Routes accessible by the user role
32
+ */
33
+ export declare const getRoutesByUserRole: (accountPageStore: IRouteModule[], userRole: "admin" | "user") => IRouteMap[];
34
+ /**
35
+ * Get menus that are accessible by user role (combines system and user types)
36
+ * @param accountPageStore - Array of route modules
37
+ * @param userRole - User role ('admin' sees all, 'user' sees only user type)
38
+ * @returns Menus accessible by the user role
39
+ */
40
+ export declare const getMenusByUserRole: (accountPageStore: IRouteModule[], userRole: "admin" | "user") => IRouteMap[];
41
+ /**
42
+ * Filter routes by category
43
+ * @param accountPageStore - Array of route modules
44
+ * @param categories - Category name(s) to filter by. Use '*' for all categories or array of category names
45
+ * @returns Filtered routes by category
46
+ */
47
+ export declare const getRoutesByCategory: (accountPageStore: IRouteModule[], categories?: SelectedType) => IRouteMap[];
48
+ /**
49
+ * Filter routes by sub-category
50
+ * @param accountPageStore - Array of route modules
51
+ * @param subCategories - Sub-category name(s) to filter by. Use '*' for all sub-categories or array of sub-category names
52
+ * @returns Filtered routes by sub-category
53
+ */
54
+ export declare const getRoutesBySubCategory: (accountPageStore: IRouteModule[], subCategories?: SelectedType) => IRouteMap[];
55
+ /**
56
+ * Filter routes by both category and sub-category
57
+ * @param accountPageStore - Array of route modules
58
+ * @param categories - Category name(s) to filter by. Use '*' for all categories or array of category names
59
+ * @param subCategories - Sub-category name(s) to filter by. Use '*' for all sub-categories or array of sub-category names
60
+ * @returns Filtered routes by both category and sub-category
61
+ */
62
+ export declare const getRoutesByCategoryAndSubCategory: (accountPageStore: IRouteModule[], categories?: SelectedType, subCategories?: SelectedType) => IRouteMap[];
63
+ /**
64
+ * Filter menus by category
65
+ * @param accountPageStore - Array of route modules
66
+ * @param categories - Category name(s) to filter by. Use '*' for all categories or array of category names
67
+ * @returns Filtered menus by category
68
+ */
69
+ export declare const getMenusByCategory: (accountPageStore: IRouteModule[], categories?: SelectedType) => IRouteMap[];
70
+ /**
71
+ * Filter menus by sub-category
72
+ * @param accountPageStore - Array of route modules
73
+ * @param subCategories - Sub-category name(s) to filter by. Use '*' for all sub-categories or array of sub-category names
74
+ * @returns Filtered menus by sub-category
75
+ */
76
+ export declare const getMenusBySubCategory: (accountPageStore: IRouteModule[], subCategories?: SelectedType) => IRouteMap[];
77
+ /**
78
+ * Filter menus by both category and sub-category
79
+ * @param accountPageStore - Array of route modules
80
+ * @param categories - Category name(s) to filter by. Use '*' for all categories or array of category names
81
+ * @param subCategories - Sub-category name(s) to filter by. Use '*' for all sub-categories or array of sub-category names
82
+ * @returns Filtered menus by both category and sub-category
83
+ */
84
+ export declare const getMenusByCategoryAndSubCategory: (accountPageStore: IRouteModule[], categories?: SelectedType, subCategories?: SelectedType) => IRouteMap[];
85
+ /**
86
+ * Get all unique category names from routes
87
+ * @param accountPageStore - Array of route modules
88
+ * @returns Array of unique category names
89
+ */
90
+ export declare const getAvailableCategories: (accountPageStore: IRouteModule[]) => string[];
91
+ /**
92
+ * Get all unique sub-category names from routes
93
+ * @param accountPageStore - Array of route modules
94
+ * @param filterByCategory - Optional category to filter sub-categories by
95
+ * @returns Array of unique sub-category names
96
+ */
97
+ export declare const getAvailableSubCategories: (accountPageStore: IRouteModule[], filterByCategory?: string) => string[];
98
+ /**
99
+ * Group routes by category
100
+ * @param accountPageStore - Array of route modules
101
+ * @returns Object with category names as keys and arrays of routes as values
102
+ */
103
+ export declare const groupRoutesByCategory: (accountPageStore: IRouteModule[]) => Record<string, IRouteModule[]>;
104
+ /**
105
+ * Group routes by sub-category within categories
106
+ * @param accountPageStore - Array of route modules
107
+ * @returns Nested object with category -> sub-category -> routes structure
108
+ */
109
+ export declare const groupRoutesByCategoryAndSubCategory: (accountPageStore: IRouteModule[]) => Record<string, Record<string, IRouteModule[]>>;
110
+ /**
111
+ * Advanced filtering combining systemType, category, and subCategory
112
+ * @param accountPageStore - Array of route modules
113
+ * @param filters - Object containing all filter criteria
114
+ * @returns Filtered routes matching all specified criteria
115
+ */
116
+ export declare const getRoutesByAdvancedFilter: (accountPageStore: IRouteModule[], filters: {
117
+ systemType?: "system" | "user" | "*";
118
+ categories?: "*" | string[];
119
+ subCategories?: "*" | string[];
120
+ userRole?: "admin" | "user";
121
+ }) => IRouteMap[];
122
+ /**
123
+ * Advanced menu filtering combining systemType, category, and subCategory
124
+ * @param accountPageStore - Array of route modules
125
+ * @param filters - Object containing all filter criteria
126
+ * @returns Filtered menus matching all specified criteria
127
+ */
128
+ export declare const getMenusByAdvancedFilter: (accountPageStore: IRouteModule[], filters: {
129
+ systemType?: "system" | "user" | "*";
130
+ categories?: "*" | string[];
131
+ subCategories?: "*" | string[];
132
+ userRole?: "admin" | "user";
133
+ }) => IRouteMap[];
6
134
  export {};
@@ -28,4 +28,334 @@ const getFilteredTabs = (accountPageStore, selectedTabs = '*') => accountPageSto
28
28
  }
29
29
  return null;
30
30
  })
31
- .filter((valid) => valid);export{getFilteredMenus,getFilteredRoutes,getFilteredTabs};//# sourceMappingURL=filteredRoutes.js.map
31
+ .filter((valid) => valid);
32
+ /**
33
+ * Filter routes by system type (admin vs user visibility)
34
+ * @param accountPageStore - Array of route modules
35
+ * @param systemType - System type to filter by ('system' for admin only, 'user' for common users/owners)
36
+ * @returns Filtered routes based on system type
37
+ */
38
+ const getRoutesBySystemType = (accountPageStore, systemType) => accountPageStore
39
+ .map((item) => {
40
+ // If no systemType is specified, treat as 'user' (default visibility)
41
+ const itemSystemType = item.systemType || 'user';
42
+ if (itemSystemType === systemType) {
43
+ const { path } = item;
44
+ return {
45
+ [path]: item,
46
+ };
47
+ }
48
+ return null;
49
+ })
50
+ .filter((valid) => valid);
51
+ /**
52
+ * Filter menus by system type (admin vs user visibility)
53
+ * @param accountPageStore - Array of route modules
54
+ * @param systemType - System type to filter by ('system' for admin only, 'user' for common users/owners)
55
+ * @returns Filtered menus based on system type
56
+ */
57
+ const getMenusBySystemType = (accountPageStore, systemType) => accountPageStore
58
+ .map((item) => {
59
+ // If no systemType is specified, treat as 'user' (default visibility)
60
+ const itemSystemType = item.systemType || 'user';
61
+ if (itemSystemType === systemType) {
62
+ const { path, component, ...rest } = item;
63
+ return {
64
+ [path]: { name: rest.tab, ...rest },
65
+ };
66
+ }
67
+ return null;
68
+ })
69
+ .filter((valid) => valid);
70
+ /**
71
+ * Filter tabs by system type (admin vs user visibility)
72
+ * @param accountPageStore - Array of route modules
73
+ * @param systemType - System type to filter by ('system' for admin only, 'user' for common users/owners)
74
+ * @returns Filtered tabs based on system type
75
+ */
76
+ const getTabsBySystemType = (accountPageStore, systemType) => accountPageStore
77
+ .map((item) => {
78
+ // If no systemType is specified, treat as 'user' (default visibility)
79
+ const itemSystemType = item.systemType || 'user';
80
+ if (itemSystemType === systemType) {
81
+ const { component, ...rest } = item;
82
+ return rest;
83
+ }
84
+ return null;
85
+ })
86
+ .filter((valid) => valid);
87
+ /**
88
+ * Get routes that are accessible by user role (combines system and user types)
89
+ * @param accountPageStore - Array of route modules
90
+ * @param userRole - User role ('admin' sees all, 'user' sees only user type)
91
+ * @returns Routes accessible by the user role
92
+ */
93
+ const getRoutesByUserRole = (accountPageStore, userRole) => {
94
+ if (userRole === 'admin') {
95
+ // Admin can see all routes (both system and user)
96
+ return getFilteredRoutes(accountPageStore);
97
+ }
98
+ else {
99
+ // Regular users can only see 'user' type routes
100
+ return getRoutesBySystemType(accountPageStore, 'user');
101
+ }
102
+ };
103
+ /**
104
+ * Get menus that are accessible by user role (combines system and user types)
105
+ * @param accountPageStore - Array of route modules
106
+ * @param userRole - User role ('admin' sees all, 'user' sees only user type)
107
+ * @returns Menus accessible by the user role
108
+ */
109
+ const getMenusByUserRole = (accountPageStore, userRole) => {
110
+ if (userRole === 'admin') {
111
+ // Admin can see all menus (both system and user)
112
+ return getFilteredMenus(accountPageStore);
113
+ }
114
+ else {
115
+ // Regular users can only see 'user' type menus
116
+ return getMenusBySystemType(accountPageStore, 'user');
117
+ }
118
+ };
119
+ /**
120
+ * Filter routes by category
121
+ * @param accountPageStore - Array of route modules
122
+ * @param categories - Category name(s) to filter by. Use '*' for all categories or array of category names
123
+ * @returns Filtered routes by category
124
+ */
125
+ const getRoutesByCategory = (accountPageStore, categories = '*') => accountPageStore
126
+ .map((item) => {
127
+ if (categories === '*' || (item.category && categories.includes(item.category))) {
128
+ const { path } = item;
129
+ return {
130
+ [path]: item,
131
+ };
132
+ }
133
+ return null;
134
+ })
135
+ .filter((valid) => valid);
136
+ /**
137
+ * Filter routes by sub-category
138
+ * @param accountPageStore - Array of route modules
139
+ * @param subCategories - Sub-category name(s) to filter by. Use '*' for all sub-categories or array of sub-category names
140
+ * @returns Filtered routes by sub-category
141
+ */
142
+ const getRoutesBySubCategory = (accountPageStore, subCategories = '*') => accountPageStore
143
+ .map((item) => {
144
+ if (subCategories === '*' || (item.subCategory && subCategories.includes(item.subCategory))) {
145
+ const { path } = item;
146
+ return {
147
+ [path]: item,
148
+ };
149
+ }
150
+ return null;
151
+ })
152
+ .filter((valid) => valid);
153
+ /**
154
+ * Filter routes by both category and sub-category
155
+ * @param accountPageStore - Array of route modules
156
+ * @param categories - Category name(s) to filter by. Use '*' for all categories or array of category names
157
+ * @param subCategories - Sub-category name(s) to filter by. Use '*' for all sub-categories or array of sub-category names
158
+ * @returns Filtered routes by both category and sub-category
159
+ */
160
+ const getRoutesByCategoryAndSubCategory = (accountPageStore, categories = '*', subCategories = '*') => accountPageStore
161
+ .map((item) => {
162
+ const categoryMatch = categories === '*' || (item.category && categories.includes(item.category));
163
+ const subCategoryMatch = subCategories === '*' || (item.subCategory && subCategories.includes(item.subCategory));
164
+ if (categoryMatch && subCategoryMatch) {
165
+ const { path } = item;
166
+ return {
167
+ [path]: item,
168
+ };
169
+ }
170
+ return null;
171
+ })
172
+ .filter((valid) => valid);
173
+ /**
174
+ * Filter menus by category
175
+ * @param accountPageStore - Array of route modules
176
+ * @param categories - Category name(s) to filter by. Use '*' for all categories or array of category names
177
+ * @returns Filtered menus by category
178
+ */
179
+ const getMenusByCategory = (accountPageStore, categories = '*') => accountPageStore
180
+ .map((item) => {
181
+ if (categories === '*' || (item.category && categories.includes(item.category))) {
182
+ const { path, component, ...rest } = item;
183
+ return {
184
+ [path]: { name: rest.tab, ...rest },
185
+ };
186
+ }
187
+ return null;
188
+ })
189
+ .filter((valid) => valid);
190
+ /**
191
+ * Filter menus by sub-category
192
+ * @param accountPageStore - Array of route modules
193
+ * @param subCategories - Sub-category name(s) to filter by. Use '*' for all sub-categories or array of sub-category names
194
+ * @returns Filtered menus by sub-category
195
+ */
196
+ const getMenusBySubCategory = (accountPageStore, subCategories = '*') => accountPageStore
197
+ .map((item) => {
198
+ if (subCategories === '*' || (item.subCategory && subCategories.includes(item.subCategory))) {
199
+ const { path, component, ...rest } = item;
200
+ return {
201
+ [path]: { name: rest.tab, ...rest },
202
+ };
203
+ }
204
+ return null;
205
+ })
206
+ .filter((valid) => valid);
207
+ /**
208
+ * Filter menus by both category and sub-category
209
+ * @param accountPageStore - Array of route modules
210
+ * @param categories - Category name(s) to filter by. Use '*' for all categories or array of category names
211
+ * @param subCategories - Sub-category name(s) to filter by. Use '*' for all sub-categories or array of sub-category names
212
+ * @returns Filtered menus by both category and sub-category
213
+ */
214
+ const getMenusByCategoryAndSubCategory = (accountPageStore, categories = '*', subCategories = '*') => accountPageStore
215
+ .map((item) => {
216
+ const categoryMatch = categories === '*' || (item.category && categories.includes(item.category));
217
+ const subCategoryMatch = subCategories === '*' || (item.subCategory && subCategories.includes(item.subCategory));
218
+ if (categoryMatch && subCategoryMatch) {
219
+ const { path, component, ...rest } = item;
220
+ return {
221
+ [path]: { name: rest.tab, ...rest },
222
+ };
223
+ }
224
+ return null;
225
+ })
226
+ .filter((valid) => valid);
227
+ /**
228
+ * Get all unique category names from routes
229
+ * @param accountPageStore - Array of route modules
230
+ * @returns Array of unique category names
231
+ */
232
+ const getAvailableCategories = (accountPageStore) => {
233
+ const categories = accountPageStore
234
+ .map((item) => item.category)
235
+ .filter((category) => Boolean(category));
236
+ return [...new Set(categories)].sort();
237
+ };
238
+ /**
239
+ * Get all unique sub-category names from routes
240
+ * @param accountPageStore - Array of route modules
241
+ * @param filterByCategory - Optional category to filter sub-categories by
242
+ * @returns Array of unique sub-category names
243
+ */
244
+ const getAvailableSubCategories = (accountPageStore, filterByCategory) => {
245
+ let filteredRoutes = accountPageStore;
246
+ if (filterByCategory) {
247
+ filteredRoutes = accountPageStore.filter((item) => item.category === filterByCategory);
248
+ }
249
+ const subCategories = filteredRoutes
250
+ .map((item) => item.subCategory)
251
+ .filter((subCategory) => Boolean(subCategory));
252
+ return [...new Set(subCategories)].sort();
253
+ };
254
+ /**
255
+ * Group routes by category
256
+ * @param accountPageStore - Array of route modules
257
+ * @returns Object with category names as keys and arrays of routes as values
258
+ */
259
+ const groupRoutesByCategory = (accountPageStore) => {
260
+ const grouped = {};
261
+ accountPageStore.forEach((item) => {
262
+ const category = item.category || 'default';
263
+ if (!grouped[category]) {
264
+ grouped[category] = [];
265
+ }
266
+ grouped[category].push(item);
267
+ });
268
+ return grouped;
269
+ };
270
+ /**
271
+ * Group routes by sub-category within categories
272
+ * @param accountPageStore - Array of route modules
273
+ * @returns Nested object with category -> sub-category -> routes structure
274
+ */
275
+ const groupRoutesByCategoryAndSubCategory = (accountPageStore) => {
276
+ const grouped = {};
277
+ accountPageStore.forEach((item) => {
278
+ const category = item.category || 'default';
279
+ const subCategory = item.subCategory || 'default';
280
+ if (!grouped[category]) {
281
+ grouped[category] = {};
282
+ }
283
+ if (!grouped[category][subCategory]) {
284
+ grouped[category][subCategory] = [];
285
+ }
286
+ grouped[category][subCategory].push(item);
287
+ });
288
+ return grouped;
289
+ };
290
+ /**
291
+ * Advanced filtering combining systemType, category, and subCategory
292
+ * @param accountPageStore - Array of route modules
293
+ * @param filters - Object containing all filter criteria
294
+ * @returns Filtered routes matching all specified criteria
295
+ */
296
+ const getRoutesByAdvancedFilter = (accountPageStore, filters) => {
297
+ return accountPageStore
298
+ .map((item) => {
299
+ // Handle systemType filter
300
+ const systemTypeMatch = !filters.systemType || filters.systemType === '*' || (item.systemType || 'user') === filters.systemType;
301
+ // Handle categories filter
302
+ const categoryMatch = !filters.categories ||
303
+ filters.categories === '*' ||
304
+ (item.category && filters.categories.includes(item.category));
305
+ // Handle subCategories filter
306
+ const subCategoryMatch = !filters.subCategories ||
307
+ filters.subCategories === '*' ||
308
+ (item.subCategory && filters.subCategories.includes(item.subCategory));
309
+ // Handle userRole filter (overrides systemType if set)
310
+ let roleMatch = true;
311
+ if (filters.userRole) {
312
+ if (filters.userRole === 'admin') {
313
+ roleMatch = true; // Admins see all
314
+ }
315
+ else {
316
+ roleMatch = (item.systemType || 'user') === 'user';
317
+ }
318
+ }
319
+ // Combine all matches
320
+ if (systemTypeMatch && categoryMatch && subCategoryMatch && roleMatch) {
321
+ // Return the route in IRouteMap format (assuming path as key)
322
+ return { [item.path]: item };
323
+ }
324
+ return null;
325
+ })
326
+ .filter((valid) => valid !== null);
327
+ };
328
+ /**
329
+ * Advanced menu filtering combining systemType, category, and subCategory
330
+ * @param accountPageStore - Array of route modules
331
+ * @param filters - Object containing all filter criteria
332
+ * @returns Filtered menus matching all specified criteria
333
+ */
334
+ const getMenusByAdvancedFilter = (accountPageStore, filters) => {
335
+ return accountPageStore
336
+ .map((item) => {
337
+ const itemSystemType = item.systemType || 'user';
338
+ // System type filter
339
+ const systemTypeMatch = !filters.systemType || itemSystemType === filters.systemType;
340
+ // User role filter (overrides systemType)
341
+ const userRoleMatch = !filters.userRole ||
342
+ filters.userRole === 'admin' ||
343
+ (filters.userRole === 'user' && itemSystemType === 'user');
344
+ // Category filter
345
+ const categoryMatch = !filters.categories ||
346
+ filters.categories === '*' ||
347
+ (item.category && filters.categories.includes(item.category));
348
+ // Sub-category filter
349
+ const subCategoryMatch = !filters.subCategories ||
350
+ filters.subCategories === '*' ||
351
+ (item.subCategory && filters.subCategories.includes(item.subCategory));
352
+ if (systemTypeMatch && userRoleMatch && categoryMatch && subCategoryMatch) {
353
+ const { path, component, ...rest } = item;
354
+ return {
355
+ [path]: { name: rest.tab, ...rest },
356
+ };
357
+ }
358
+ return null;
359
+ })
360
+ .filter((valid) => valid);
361
+ };export{getAvailableCategories,getAvailableSubCategories,getFilteredMenus,getFilteredRoutes,getFilteredTabs,getMenusByAdvancedFilter,getMenusByCategory,getMenusByCategoryAndSubCategory,getMenusBySubCategory,getMenusBySystemType,getMenusByUserRole,getRoutesByAdvancedFilter,getRoutesByCategory,getRoutesByCategoryAndSubCategory,getRoutesBySubCategory,getRoutesBySystemType,getRoutesByUserRole,getTabsBySystemType,groupRoutesByCategory,groupRoutesByCategoryAndSubCategory};//# sourceMappingURL=filteredRoutes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"filteredRoutes.js","sources":["../../src/utils/filteredRoutes.ts"],"sourcesContent":[null],"names":[],"mappings":"AAKO,MAAM,gBAAgB,GAAG,CAAC,gBAAgC,EAAE,YAAA,GAAe,GAAmB,KACjG,gBAAgB;AACX,KAAA,GAAG,CAAC,CAAC,IAAI,KAAI;AACV,IAAA,IAAI,YAAY,KAAK,GAAG,IAAI,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QACzD,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;QAC1C,OAAO;AACH,YAAA,CAAC,IAAI,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,EAAE;SACtC,CAAC;KACL;AACD,IAAA,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC;KACD,MAAM,CAAC,CAAC,KAAK,KAAK,KAAK,EAAE;AAE3B,MAAM,iBAAiB,GAAG,CAC7B,gBAAgC,EAChC,cAAA,GAAiB,GAAmB,KAEpC,gBAAgB;AACX,KAAA,GAAG,CAAC,CAAC,IAAI,KAAI;AACV,IAAA,IAAI,cAAc,KAAK,GAAG,IAAI,cAAc,CAAC,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AAc,KAAK,OAAO,CAAC,UAAU,CAAC;;AAGrF,QAAA,MAAM,aAAa,GACf,CAAC,OAAO,CAAC,QAAQ;YACjB,OAAO,CAAC,QAAQ,KAAK,OAAO;aAC3B,OAAO,CAAC,QAAQ,KAAK,MAAM,IAAI,cAAc,KAAK,MAAM,CAAC,CAAC;;AAG/D,QAAA,MAAM,aAAa,GACf,CAAC,OAAO,CAAC,UAAU;YACnB,OAAO,CAAC,UAAU,KAAK,GAAG;AAC1B,aAAC,IAAI,CAAC,QAAQ,IAAI,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;;AAGlE,QAAA,MAAM,gBAAgB,GAClB,CAAC,OAAO,CAAC,aAAa;YACtB,OAAO,CAAC,aAAa,KAAK,GAAG;AAC7B,aAAC,IAAI,CAAC,WAAW,IAAI,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;QAE3E,IAAI,eAAe,IAAI,aAAa,IAAI,aAAa,IAAI,gBAAgB,EAAE;YACvE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;YAC1C,OAAO;AACH,gBAAA,CAAC,IAAI,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,EAAE;aACtC,CAAC;SACL;AACD,QAAA,OAAO,IAAI,CAAC;AAChB,KAAC,CAAC;SACD,MAAM,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;AAClC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@common-stack/client-react",
3
- "version": "8.0.2-alpha.0",
3
+ "version": "8.1.1-alpha.0",
4
4
  "description": "Client Module for react app",
5
5
  "homepage": "https://github.com/cdmbase/fullstack-pro#readme",
6
6
  "bugs": {
@@ -10,7 +10,7 @@
10
10
  "type": "git",
11
11
  "url": "git+https://github.com/cdmbase/fullstack-pro.git"
12
12
  },
13
- "license": "MIT",
13
+ "license": "UNLICENSED",
14
14
  "author": "CDMBase LLC",
15
15
  "type": "module",
16
16
  "main": "lib/index.js",
@@ -31,8 +31,8 @@
31
31
  "watch": "npm run build:lib:watch"
32
32
  },
33
33
  "dependencies": {
34
- "@common-stack/client-core": "8.0.2-alpha.0",
35
- "@common-stack/core": "8.0.2-alpha.0",
34
+ "@common-stack/client-core": "8.1.1-alpha.0",
35
+ "@common-stack/core": "8.1.1-alpha.0",
36
36
  "@wordpress/hooks": "^3.53.0",
37
37
  "browser-bunyan": "^1.6.3",
38
38
  "history-with-query": "^4.10.4",
@@ -60,5 +60,5 @@
60
60
  "typescript": {
61
61
  "definition": "lib/index.d.ts"
62
62
  },
63
- "gitHead": "d45864ba7429065d7b67e573e909ecf762ffc150"
63
+ "gitHead": "7fc661e44322b602d561e42de8cb121048ef444f"
64
64
  }