@zango-core/crm-framework 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PageTypeRegistry-Cu_XV_iY.js → PageTypeRegistry-0yDAbJO_.js} +2 -2
- package/dist/{PageTypeRegistry-Cu_XV_iY.js.map → PageTypeRegistry-0yDAbJO_.js.map} +1 -1
- package/dist/{index.framework-Bu5-4Nwj.js → index.framework-C8rWvyqw.js} +4964 -4592
- package/dist/index.framework-C8rWvyqw.js.map +1 -0
- package/dist/zango-crm-framework.js +69 -65
- package/dist/zango-crm-framework.umd.cjs +40 -40
- package/dist/zango-crm-framework.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/dist/index.framework-Bu5-4Nwj.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import n from "react";
|
|
2
|
-
import { N as o, L as r, T as u, C as s, a as l } from "./index.framework-
|
|
2
|
+
import { N as o, L as r, T as u, C as s, a as l } from "./index.framework-C8rWvyqw.js";
|
|
3
3
|
const i = {
|
|
4
4
|
crud: {
|
|
5
5
|
component: s,
|
|
@@ -59,4 +59,4 @@ const i = {
|
|
|
59
59
|
export {
|
|
60
60
|
i as default
|
|
61
61
|
};
|
|
62
|
-
//# sourceMappingURL=PageTypeRegistry-
|
|
62
|
+
//# sourceMappingURL=PageTypeRegistry-0yDAbJO_.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageTypeRegistry-
|
|
1
|
+
{"version":3,"file":"PageTypeRegistry-0yDAbJO_.js","sources":["../src/framework/routing/PageTypeRegistry.ts"],"sourcesContent":["import React from 'react';\nimport CrudPage from '../pages/CrudPage';\nimport TrainingPage from '../pages/TrainingPage';\n// import Profile360 from 'profile360';\n// import 'profile360/dist/index.css';\nimport CustomPageLoader from '../components/CustomPageLoader';\nimport NotFoundPage from '../pages/NotFoundPage';\nimport LoginPage from '../pages/LoginPage';\n\ninterface PageTypeConfig {\n component?: React.ComponentType<any> | null;\n includeBasePath?: boolean;\n standalone?: boolean;\n propsBuilder?: (params: any) => any;\n handler?: (params: any) => React.ReactElement;\n}\n\ninterface PageTypeRegistry {\n [key: string]: PageTypeConfig;\n}\n\n/**\n * Page Type Registry - Centralized configuration for all page types\n * \n * Each page type can have:\n * - component: The React component to render\n * - includeBasePath: Whether to pass basePath prop (defaults to true)\n * - propsBuilder: Function to build additional props\n * - handler: Custom rendering function (overrides component)\n */\nconst pageTypeRegistry: PageTypeRegistry = {\n crud: {\n component: CrudPage,\n includeBasePath: true,\n // standalone:true,\n propsBuilder: ({ matchedRoutePath }) => ({}),\n },\n\n training: {\n component: TrainingPage,\n includeBasePath: true,\n propsBuilder: ({ matchedRoutePath }) => ({}),\n },\n\n login: {\n component: LoginPage,\n includeBasePath: true, // Login needs basePath for sub-routes\n standalone: true, // Render without layout (no sidebar/topbar)\n propsBuilder: ({ matchedRoutePath }) => ({}),\n },\n\n // profile360: {\n // component: Profile360,\n // propsBuilder: ({ apiConfig }) => ({\n // apiConfig: {\n // baseUrl: apiConfig.apiUrl,\n // headers: apiConfig.headers\n // }\n // })\n // },\n\n custom: {\n component: null,\n includeBasePath: false, // Explicitly disable basePath for custom pages\n handler: ({ customPages, customPagePath, location }: any) => {\n const CustomComponent = customPages[customPagePath];\n if (CustomComponent) {\n return React.createElement(CustomComponent);\n }\n // Fallback to CustomPageLoader with component name from route config\n return React.createElement(CustomPageLoader, { componentName: customPagePath });\n },\n },\n\n 404: {\n component: NotFoundPage,\n standalone: true,\n includeBasePath: false, // Explicitly disable basePath for 404\n propsBuilder: () => ({}),\n },\n\n // Default configuration for unknown page types\n default: {\n component: NotFoundPage,\n includeBasePath: false, // Explicitly disable for unknown types\n standalone: true,\n propsBuilder: ({ pageType }) => ({\n message: `Unknown page type: ${pageType}`,\n }),\n },\n};\n\nexport default pageTypeRegistry;"],"names":["pageTypeRegistry","CrudPage","matchedRoutePath","TrainingPage","LoginPage","customPages","customPagePath","location","CustomComponent","React","CustomPageLoader","NotFoundPage","pageType"],"mappings":";;AA8BA,MAAMA,IAAqC;AAAA,EACzC,MAAM;AAAA,IACJ,WAAWC;AAAA,IACX,iBAAiB;AAAA;AAAA,IAEjB,cAAc,CAAC,EAAE,kBAAAC,EAAA,OAAwB,CAAA;AAAA,EAAC;AAAA,EAG5C,UAAU;AAAA,IACR,WAAWC;AAAA,IACX,iBAAiB;AAAA,IACjB,cAAc,CAAC,EAAE,kBAAAD,EAAA,OAAwB,CAAA;AAAA,EAAC;AAAA,EAG5C,OAAO;AAAA,IACL,WAAWE;AAAA,IACX,iBAAiB;AAAA;AAAA,IACjB,YAAY;AAAA;AAAA,IACZ,cAAc,CAAC,EAAE,kBAAAF,EAAA,OAAwB,CAAA;AAAA,EAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAa5C,QAAQ;AAAA,IACN,WAAW;AAAA,IACX,iBAAiB;AAAA;AAAA,IACjB,SAAS,CAAC,EAAE,aAAAG,GAAa,gBAAAC,GAAgB,UAAAC,QAAoB;AAC3D,YAAMC,IAAkBH,EAAYC,CAAc;AAClD,aAAIE,IACKC,EAAM,cAAcD,CAAe,IAGrCC,EAAM,cAAcC,GAAkB,EAAE,eAAeJ,GAAgB;AAAA,IAChF;AAAA,EAAA;AAAA,EAGF,KAAK;AAAA,IACH,WAAWK;AAAA,IACX,YAAY;AAAA,IACZ,iBAAiB;AAAA;AAAA,IACjB,cAAc,OAAO,CAAA;AAAA,EAAC;AAAA;AAAA,EAIxB,SAAS;AAAA,IACP,WAAWA;AAAA,IACX,iBAAiB;AAAA;AAAA,IACjB,YAAY;AAAA,IACZ,cAAc,CAAC,EAAE,UAAAC,SAAgB;AAAA,MAC/B,SAAS,sBAAsBA,CAAQ;AAAA,IAAA;AAAA,EACzC;AAEJ;"}
|