@zango-core/crm-framework 0.2.2 → 1.0.11

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.
@@ -0,0 +1,26 @@
1
+ import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
+ const d = () => /* @__PURE__ */ s("div", { className: "p-6", children: [
3
+ /* @__PURE__ */ e("h1", { className: "text-3xl font-bold mb-4", children: "Welcome to Zango CRM Dashboard" }),
4
+ /* @__PURE__ */ s("p", { className: "text-gray-600", children: [
5
+ "This is your custom dashboard page. You can modify this file at:",
6
+ /* @__PURE__ */ e("code", { className: "bg-gray-100 px-2 py-1 rounded ml-2", children: "src/custom/pages/Dashboard.js" })
7
+ ] }),
8
+ /* @__PURE__ */ s("div", { className: "mt-8 grid grid-cols-1 md:grid-cols-3 gap-6", children: [
9
+ /* @__PURE__ */ s("div", { className: "bg-white p-6 rounded-lg shadow", children: [
10
+ /* @__PURE__ */ e("h2", { className: "text-xl font-semibold mb-2", children: "Custom Pages" }),
11
+ /* @__PURE__ */ e("p", { className: "text-gray-600", children: "Create custom pages in the src/custom/pages directory" })
12
+ ] }),
13
+ /* @__PURE__ */ s("div", { className: "bg-white p-6 rounded-lg shadow", children: [
14
+ /* @__PURE__ */ e("h2", { className: "text-xl font-semibold mb-2", children: "CRUD Operations" }),
15
+ /* @__PURE__ */ e("p", { className: "text-gray-600", children: "Automatic CRUD pages based on API configuration" })
16
+ ] }),
17
+ /* @__PURE__ */ s("div", { className: "bg-white p-6 rounded-lg shadow", children: [
18
+ /* @__PURE__ */ e("h2", { className: "text-xl font-semibold mb-2", children: "Profile360" }),
19
+ /* @__PURE__ */ e("p", { className: "text-gray-600", children: "Comprehensive entity profile pages" })
20
+ ] })
21
+ ] })
22
+ ] });
23
+ export {
24
+ d as default
25
+ };
26
+ //# sourceMappingURL=Dashboard-D1EiE6qN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dashboard-D1EiE6qN.js","sources":["../src/custom/pages/Dashboard.js"],"sourcesContent":["import React from 'react';\n\nconst Dashboard = () => {\n return (\n <div className=\"p-6\">\n <h1 className=\"text-3xl font-bold mb-4\">\n Welcome to Zango CRM Dashboard\n </h1>\n <p className=\"text-gray-600\">\n This is your custom dashboard page. You can modify this file at:\n <code className=\"bg-gray-100 px-2 py-1 rounded ml-2\">\n src/custom/pages/Dashboard.js\n </code>\n </p>\n\n <div className=\"mt-8 grid grid-cols-1 md:grid-cols-3 gap-6\">\n <div className=\"bg-white p-6 rounded-lg shadow\">\n <h2 className=\"text-xl font-semibold mb-2\">Custom Pages</h2>\n <p className=\"text-gray-600\">\n Create custom pages in the src/custom/pages directory\n </p>\n </div>\n\n <div className=\"bg-white p-6 rounded-lg shadow\">\n <h2 className=\"text-xl font-semibold mb-2\">CRUD Operations</h2>\n <p className=\"text-gray-600\">\n Automatic CRUD pages based on API configuration\n </p>\n </div>\n\n <div className=\"bg-white p-6 rounded-lg shadow\">\n <h2 className=\"text-xl font-semibold mb-2\">Profile360</h2>\n <p className=\"text-gray-600\">Comprehensive entity profile pages</p>\n </div>\n </div>\n </div>\n );\n};\n\nexport default Dashboard;"],"names":["Dashboard","jsxs","jsx"],"mappings":";AAEA,MAAMA,IAAY,MAEd,gBAAAC,EAAC,OAAA,EAAI,WAAU,OACb,UAAA;AAAA,EAAA,gBAAAC,EAAC,MAAA,EAAG,WAAU,2BAA0B,UAAA,kCAExC;AAAA,EACA,gBAAAD,EAAC,KAAA,EAAE,WAAU,iBAAgB,UAAA;AAAA,IAAA;AAAA,IAE3B,gBAAAC,EAAC,QAAA,EAAK,WAAU,sCAAqC,UAAA,gCAAA,CAErD;AAAA,EAAA,GACF;AAAA,EAEA,gBAAAD,EAAC,OAAA,EAAI,WAAU,8CACb,UAAA;AAAA,IAAA,gBAAAA,EAAC,OAAA,EAAI,WAAU,kCACb,UAAA;AAAA,MAAA,gBAAAC,EAAC,MAAA,EAAG,WAAU,8BAA6B,UAAA,gBAAY;AAAA,MACvD,gBAAAA,EAAC,KAAA,EAAE,WAAU,iBAAgB,UAAA,wDAAA,CAE7B;AAAA,IAAA,GACF;AAAA,IAEA,gBAAAD,EAAC,OAAA,EAAI,WAAU,kCACb,UAAA;AAAA,MAAA,gBAAAC,EAAC,MAAA,EAAG,WAAU,8BAA6B,UAAA,mBAAe;AAAA,MAC1D,gBAAAA,EAAC,KAAA,EAAE,WAAU,iBAAgB,UAAA,kDAAA,CAE7B;AAAA,IAAA,GACF;AAAA,IAEA,gBAAAD,EAAC,OAAA,EAAI,WAAU,kCACb,UAAA;AAAA,MAAA,gBAAAC,EAAC,MAAA,EAAG,WAAU,8BAA6B,UAAA,cAAU;AAAA,MACrD,gBAAAA,EAAC,KAAA,EAAE,WAAU,iBAAgB,UAAA,qCAAA,CAAkC;AAAA,IAAA,EAAA,CACjE;AAAA,EAAA,EAAA,CACF;AAAA,GACF;"}
@@ -0,0 +1,62 @@
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";
3
+ const i = {
4
+ crud: {
5
+ component: s,
6
+ includeBasePath: !0,
7
+ // standalone:true,
8
+ propsBuilder: ({ matchedRoutePath: e }) => ({})
9
+ },
10
+ training: {
11
+ component: u,
12
+ includeBasePath: !0,
13
+ propsBuilder: ({ matchedRoutePath: e }) => ({})
14
+ },
15
+ login: {
16
+ component: r,
17
+ includeBasePath: !0,
18
+ // Login needs basePath for sub-routes
19
+ standalone: !0,
20
+ // Render without layout (no sidebar/topbar)
21
+ propsBuilder: ({ matchedRoutePath: e }) => ({})
22
+ },
23
+ // profile360: {
24
+ // component: Profile360,
25
+ // propsBuilder: ({ apiConfig }) => ({
26
+ // apiConfig: {
27
+ // baseUrl: apiConfig.apiUrl,
28
+ // headers: apiConfig.headers
29
+ // }
30
+ // })
31
+ // },
32
+ custom: {
33
+ component: null,
34
+ includeBasePath: !1,
35
+ // Explicitly disable basePath for custom pages
36
+ handler: ({ customPages: e, customPagePath: t, location: d }) => {
37
+ const a = e[t];
38
+ return a ? n.createElement(a) : n.createElement(l, { componentName: t });
39
+ }
40
+ },
41
+ 404: {
42
+ component: o,
43
+ standalone: !0,
44
+ includeBasePath: !1,
45
+ // Explicitly disable basePath for 404
46
+ propsBuilder: () => ({})
47
+ },
48
+ // Default configuration for unknown page types
49
+ default: {
50
+ component: o,
51
+ includeBasePath: !1,
52
+ // Explicitly disable for unknown types
53
+ standalone: !0,
54
+ propsBuilder: ({ pageType: e }) => ({
55
+ message: `Unknown page type: ${e}`
56
+ })
57
+ }
58
+ };
59
+ export {
60
+ i as default
61
+ };
62
+ //# sourceMappingURL=PageTypeRegistry-DocXEd-Y.js.map
@@ -0,0 +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;"}
@@ -0,0 +1,5 @@
1
+ import { default as r } from "./Dashboard-D1EiE6qN.js";
2
+ export {
3
+ r as Dashboard
4
+ };
5
+ //# sourceMappingURL=index-CxRN1-6b.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-CxRN1-6b.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}