@zango-core/crm-framework 1.0.16-rc.2 → 1.0.16-rc.3

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 r from "react";
2
- import { N as u, L as l, T as p, C as d, a as c } from "./index.framework-CkpC2U5b.js";
2
+ import { N as u, L as l, T as p, C as d, a as c } from "./index.framework-Dw12z476.js";
3
3
  const g = {
4
4
  crud: {
5
5
  component: d,
@@ -59,4 +59,4 @@ const g = {
59
59
  export {
60
60
  g as default
61
61
  };
62
- //# sourceMappingURL=PageTypeRegistry-K-HAJFaw.js.map
62
+ //# sourceMappingURL=PageTypeRegistry-BxYYYBLB.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PageTypeRegistry-K-HAJFaw.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 PageComponentProps {\n basePath?: string;\n matchedRoutePath?: string;\n pageType?: string;\n apiConfig?: {\n apiUrl?: string;\n headers?: Record<string, string>;\n };\n [key: string]: unknown;\n}\n\ninterface CustomPageHandlerParams {\n customPages: Record<string, React.ComponentType<Record<string, unknown>>>;\n customPagePath: string;\n location: Location;\n matchedRoute?: { path: string | null; component?: string; [key: string]: unknown } | null;\n [key: string]: unknown;\n}\n\ninterface PageTypeConfig {\n component?: React.ComponentType<PageComponentProps> | null;\n includeBasePath?: boolean;\n standalone?: boolean;\n propsBuilder?: (params: PageComponentProps) => Record<string, unknown>;\n handler?: (params: CustomPageHandlerParams) => 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, matchedRoute }: CustomPageHandlerParams) => {\n const routeConfig = matchedRoute || (customPagePath && { path: null, component: customPagePath });\n const CustomComponent = customPages[customPagePath];\n if (CustomComponent) {\n return React.createElement(CustomComponent, { routeConfig, location });\n }\n // Fallback to CustomPageLoader with component name from route config\n return React.createElement(CustomPageLoader, { componentName: customPagePath, routeConfig, location });\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","matchedRoute","routeConfig","CustomComponent","React","CustomPageLoader","NotFoundPage","pageType"],"mappings":";;AAiDA,MAAMA,IAAqC;AAAA,EACzC,MAA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BLB.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 PageComponentProps {\n basePath?: string;\n matchedRoutePath?: string;\n pageType?: string;\n apiConfig?: {\n apiUrl?: string;\n headers?: Record<string, string>;\n };\n [key: string]: unknown;\n}\n\ninterface CustomPageHandlerParams {\n customPages: Record<string, React.ComponentType<Record<string, unknown>>>;\n customPagePath: string;\n location: Location;\n matchedRoute?: { path: string | null; component?: string; [key: string]: unknown } | null;\n [key: string]: unknown;\n}\n\ninterface PageTypeConfig {\n component?: React.ComponentType<PageComponentProps> | null;\n includeBasePath?: boolean;\n standalone?: boolean;\n propsBuilder?: (params: PageComponentProps) => Record<string, unknown>;\n handler?: (params: CustomPageHandlerParams) => 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, matchedRoute }: CustomPageHandlerParams) => {\n const routeConfig = matchedRoute || (customPagePath && { path: null, component: customPagePath });\n const CustomComponent = customPages[customPagePath];\n if (CustomComponent) {\n return React.createElement(CustomComponent, { routeConfig, location });\n }\n // Fallback to CustomPageLoader with component name from route config\n return React.createElement(CustomPageLoader, { componentName: customPagePath, routeConfig, location });\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","matchedRoute","routeConfig","CustomComponent","React","CustomPageLoader","NotFoundPage","pageType"],"mappings":";;AAiDA,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,GAAU,cAAAC,QAA4C;AAC7F,YAAMC,IAAcD,KAAiBF,KAAkB,EAAE,MAAM,MAAM,WAAWA,EAAA,GAC1EI,IAAkBL,EAAYC,CAAc;AAClD,aAAII,IACKC,EAAM,cAAcD,GAAiB,EAAE,aAAAD,GAAa,UAAAF,GAAU,IAGhEI,EAAM,cAAcC,GAAkB,EAAE,eAAeN,GAAgB,aAAAG,GAAa,UAAAF,GAAU;AAAA,IACvG;AAAA,EAAA;AAAA,EAGF,KAAK;AAAA,IACH,WAAWM;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;"}
@@ -13113,7 +13113,7 @@ function PS({ className: e, ...t }) {
13113
13113
  {
13114
13114
  "data-slot": "sidebar-footer",
13115
13115
  "data-sidebar": "footer",
13116
- className: fe("flex flex-col gap-2 p-2", e),
13116
+ className: fe("flex flex-col", e),
13117
13117
  ...t
13118
13118
  }
13119
13119
  );
@@ -14457,18 +14457,18 @@ function q6(e) {
14457
14457
  };
14458
14458
  }
14459
14459
  const Qn = (e) => ({
14460
- 25: Z.mix(e, "#FFFFFF", 95).toHexString(),
14461
- 50: Z.mix(e, "#FFFFFF", 90).toHexString(),
14462
- 100: Z.mix(e, "#FFFFFF", 80).toHexString(),
14463
- 200: Z.mix(e, "#FFFFFF", 65).toHexString(),
14464
- 300: Z.mix(e, "#FFFFFF", 50).toHexString(),
14465
- 400: Z.mix(e, "#FFFFFF", 30).toHexString(),
14460
+ 25: Z.mix(e, "#FFFFFF", 100).toHexString(),
14461
+ 50: Z.mix(e, "#FFFFFF", 95).toHexString(),
14462
+ 100: Z.mix(e, "#FFFFFF", 85).toHexString(),
14463
+ 200: Z.mix(e, "#FFFFFF", 70).toHexString(),
14464
+ 300: Z.mix(e, "#FFFFFF", 55).toHexString(),
14465
+ 400: Z.mix(e, "#FFFFFF", 35).toHexString(),
14466
14466
  500: Z(e).toHexString(),
14467
- 600: Z.mix(e, "#000000", 10).toHexString(),
14468
- 700: Z.mix(e, "#000000", 20).toHexString(),
14469
- 800: Z.mix(e, "#000000", 30).toHexString(),
14470
- 900: Z.mix(e, "#000000", 45).toHexString(),
14471
- 950: Z.mix(e, "#000000", 60).toHexString()
14467
+ 600: Z.mix(e, "#000000", 15).toHexString(),
14468
+ 700: Z.mix(e, "#000000", 25).toHexString(),
14469
+ 800: Z.mix(e, "#000000", 35).toHexString(),
14470
+ 900: Z.mix(e, "#000000", 50).toHexString(),
14471
+ 950: Z.mix(e, "#000000", 65).toHexString()
14472
14472
  }), ka = (e) => {
14473
14473
  let t = "";
14474
14474
  const n = {
@@ -22627,7 +22627,7 @@ const { Header: uA, Content: Zl } = Ee, DT = ({
22627
22627
  return (async () => {
22628
22628
  if (!p && d) {
22629
22629
  if (d.is_user_anonymous) {
22630
- const { default: A } = await import("./PageTypeRegistry-K-HAJFaw.js");
22630
+ const { default: A } = await import("./PageTypeRegistry-BxYYYBLB.js");
22631
22631
  if (d.routes && d.routes.length > 0)
22632
22632
  try {
22633
22633
  N || T(!0);
@@ -26046,4 +26046,4 @@ export {
26046
26046
  G6 as y,
26047
26047
  zl as z
26048
26048
  };
26049
- //# sourceMappingURL=index.framework-CkpC2U5b.js.map
26049
+ //# sourceMappingURL=index.framework-Dw12z476.js.map