@zango-core/crm-framework 1.0.11 → 1.0.12

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.
@@ -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-BpnUT9fo.js";
2
+ import { N as o, L as r, T as u, C as s, a as l } from "./index.framework-CmcZiUOr.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-DocXEd-Y.js.map
62
+ //# sourceMappingURL=PageTypeRegistry-DCEjBIBb.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PageTypeRegistry-DocXEd-Y.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;"}
1
+ {"version":3,"file":"PageTypeRegistry-DCEjBIBb.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;"}
@@ -1597,7 +1597,7 @@ export default App;`, g = `mkdir -p ${l}`, m = {
1597
1597
  }
1598
1598
  (async () => {
1599
1599
  try {
1600
- const c = /* @__PURE__ */ Object.assign({ "../../custom/pages/Dashboard.js": () => import("./Dashboard-D1EiE6qN.js"), "../../custom/pages/index.js": () => import("./index-CxRN1-6b.js") }), u = `../../custom/pages/${e}.${n}`;
1600
+ const c = /* @__PURE__ */ Object.assign({}), u = `../../custom/pages/${e}.${n}`;
1601
1601
  if (c[u]) {
1602
1602
  const f = await c[u]();
1603
1603
  a(() => f.default);
@@ -9000,7 +9000,7 @@ const qe = () => {
9000
9000
  return (async () => {
9001
9001
  if (!f && c) {
9002
9002
  if (c.is_user_anonymous) {
9003
- const { default: E } = await import("./PageTypeRegistry-DocXEd-Y.js");
9003
+ const { default: E } = await import("./PageTypeRegistry-DCEjBIBb.js");
9004
9004
  if (c.routes && c.routes.length > 0)
9005
9005
  try {
9006
9006
  P || F(!0);
@@ -13274,4 +13274,4 @@ export {
13274
13274
  Eh as y,
13275
13275
  Rh as z
13276
13276
  };
13277
- //# sourceMappingURL=index.framework-BpnUT9fo.js.map
13277
+ //# sourceMappingURL=index.framework-CmcZiUOr.js.map