@solidxai/solidctl 0.1.1 → 0.1.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.
Files changed (157) hide show
  1. package/dist/commands/create-app/create-app.command.js +14 -13
  2. package/dist/commands/create-app/create-app.command.js.map +1 -1
  3. package/dist/commands/create-app/helpers.d.ts +7 -14
  4. package/dist/commands/create-app/helpers.js +9 -17
  5. package/dist/commands/create-app/helpers.js.map +1 -1
  6. package/dist/tsconfig.build.tsbuildinfo +1 -1
  7. package/package.json +1 -1
  8. package/templates/api-template/dot-templates/dot.gitignore.template +82 -0
  9. package/templates/{nest-template → api-template}/package.json +3 -3
  10. package/templates/{nest-template → api-template}/test/app.e2e-spec.ts +1 -1
  11. package/templates/ui-template/README.md +73 -0
  12. package/templates/ui-template/dist/assets/Footerbg-8Co6YRm2.png +0 -0
  13. package/templates/ui-template/dist/assets/SF-Pro-Display-Black-85SZiFK-.otf +0 -0
  14. package/templates/ui-template/dist/assets/SF-Pro-Display-Bold-CkqE-6tD.otf +0 -0
  15. package/templates/ui-template/dist/assets/SF-Pro-Display-Heavy-Cj-4znqf.otf +0 -0
  16. package/templates/ui-template/dist/assets/SF-Pro-Display-Light-aDlMluiV.otf +0 -0
  17. package/templates/ui-template/dist/assets/SF-Pro-Display-Medium-DSttQARu.otf +0 -0
  18. package/templates/ui-template/dist/assets/SF-Pro-Display-Regular-DF_3XEGl.otf +0 -0
  19. package/templates/ui-template/dist/assets/SF-Pro-Display-Semibold-Dg2-djaL.otf +0 -0
  20. package/templates/ui-template/dist/assets/SF-Pro-Display-Thin-Dlj_0ZL0.otf +0 -0
  21. package/templates/ui-template/dist/assets/SF-Pro-Display-Ultralight-Dvb4Y4p6.otf +0 -0
  22. package/templates/ui-template/dist/assets/index-ByqcKjdb.js +3912 -0
  23. package/templates/ui-template/dist/assets/index-wnEWlFcj.css +1 -0
  24. package/templates/ui-template/dist/assets/primeicons-C6QP2o4f.woff2 +0 -0
  25. package/templates/ui-template/dist/assets/primeicons-DMOk5skT.eot +0 -0
  26. package/templates/ui-template/dist/assets/primeicons-Dr5RGzOO.svg +345 -0
  27. package/templates/ui-template/dist/assets/primeicons-MpK4pl85.ttf +0 -0
  28. package/templates/ui-template/dist/assets/primeicons-WjwUDZjB.woff +0 -0
  29. package/templates/ui-template/dist/assets/quill-DooZuM6F.js +49 -0
  30. package/templates/ui-template/dist/assets/solid-left-layout-bg-CTFSpGKh.png +0 -0
  31. package/templates/ui-template/dist/assets/solid-right-layout-bg-HyBzctm7.png +0 -0
  32. package/templates/ui-template/dist/index.html +19 -0
  33. package/templates/{next-template/public → ui-template/dist}/themes/solid-dark-purple/theme.css +7 -2
  34. package/templates/ui-template/dist/themes/solid-light-purple/solid-login-light.png +0 -0
  35. package/templates/{next-template/public → ui-template/dist}/themes/solid-light-purple/theme.css +10 -3
  36. package/templates/ui-template/dist/vite.svg +1 -0
  37. package/templates/ui-template/dot-templates/dot.gitignore.template +83 -0
  38. package/templates/ui-template/eslint.config.js +23 -0
  39. package/templates/ui-template/index.html +18 -0
  40. package/templates/ui-template/package-lock.json +11931 -0
  41. package/templates/ui-template/package.json +42 -0
  42. package/templates/ui-template/public/themes/solid-dark-purple/theme.css +6208 -0
  43. package/templates/ui-template/public/themes/solid-light-purple/solid-login-light.png +0 -0
  44. package/templates/ui-template/public/themes/solid-light-purple/theme.css +6263 -0
  45. package/templates/ui-template/public/vite.svg +1 -0
  46. package/templates/ui-template/src/App.css +42 -0
  47. package/templates/ui-template/src/App.tsx +44 -0
  48. package/templates/ui-template/src/assets/react.svg +1 -0
  49. package/templates/ui-template/src/extensions/solid-extensions.ts +82 -0
  50. package/templates/ui-template/src/extensions/venue/call-log/custom-widgets/.gitkeep +0 -0
  51. package/templates/ui-template/src/extensions/venue/call-log/form-buttons/.gitkeep +0 -0
  52. package/templates/ui-template/src/extensions/venue/call-log/form-event-listeners/.gitkeep +0 -0
  53. package/templates/ui-template/src/extensions/venue/call-log/form-event-listeners/callLogsDispositionHandler.ts +47 -0
  54. package/templates/ui-template/src/extensions/venue/call-log/list-buttons/.gitkeep +0 -0
  55. package/templates/ui-template/src/extensions/venue/call-log/list-event-listeners/.gitkeep +0 -0
  56. package/templates/ui-template/src/extensions/venue/call-log/row-buttons/.gitkeep +0 -0
  57. package/templates/ui-template/src/extensions/venue/hierarchy-import-transaction/custom-widgets/.gitkeep +0 -0
  58. package/templates/ui-template/src/extensions/venue/hierarchy-import-transaction/form-buttons/.gitkeep +0 -0
  59. package/templates/ui-template/src/extensions/venue/hierarchy-import-transaction/form-buttons/ImportHierarchyComponent.tsx +377 -0
  60. package/templates/ui-template/src/extensions/venue/hierarchy-import-transaction/form-buttons/SolidCustomImportHeader.tsx +14 -0
  61. package/templates/ui-template/src/extensions/venue/hierarchy-import-transaction/form-event-listeners/.gitkeep +0 -0
  62. package/templates/ui-template/src/extensions/venue/hierarchy-import-transaction/form-event-listeners/CallLogsDispositionHandler.ts +47 -0
  63. package/templates/ui-template/src/extensions/venue/hierarchy-import-transaction/form-event-listeners/onHierarchyImportFormLoadHandler.ts +45 -0
  64. package/templates/ui-template/src/extensions/venue/hierarchy-import-transaction/list-buttons/.gitkeep +0 -0
  65. package/templates/ui-template/src/extensions/venue/hierarchy-import-transaction/list-event-listeners/.gitkeep +0 -0
  66. package/templates/ui-template/src/extensions/venue/hierarchy-import-transaction/row-buttons/.gitkeep +0 -0
  67. package/templates/ui-template/src/extensions/venue/venue-master/custom-widgets/.gitkeep +0 -0
  68. package/templates/ui-template/src/extensions/venue/venue-master/form-buttons/.gitkeep +0 -0
  69. package/templates/ui-template/src/extensions/venue/venue-master/form-event-listeners/.gitkeep +0 -0
  70. package/templates/ui-template/src/extensions/venue/venue-master/form-event-listeners/venueMasterFormViewLoadHandler.ts +57 -0
  71. package/templates/ui-template/src/extensions/venue/venue-master/list-buttons/.gitkeep +0 -0
  72. package/templates/ui-template/src/extensions/venue/venue-master/list-event-listeners/.gitkeep +0 -0
  73. package/templates/ui-template/src/extensions/venue/venue-master/row-buttons/.gitkeep +0 -0
  74. package/templates/ui-template/src/extensions/venue/venue-user/custom-widgets/.gitkeep +0 -0
  75. package/templates/ui-template/src/extensions/venue/venue-user/form-buttons/.gitkeep +0 -0
  76. package/templates/ui-template/src/extensions/venue/venue-user/form-event-listeners/.gitkeep +0 -0
  77. package/templates/ui-template/src/extensions/venue/venue-user/form-event-listeners/venueUserFormViewChangeHandler.ts +21 -0
  78. package/templates/ui-template/src/extensions/venue/venue-user/form-event-listeners/venueUserFormViewLoadHandler.ts +97 -0
  79. package/templates/ui-template/src/extensions/venue/venue-user/list-buttons/.gitkeep +0 -0
  80. package/templates/ui-template/src/extensions/venue/venue-user/list-event-listeners/.gitkeep +0 -0
  81. package/templates/ui-template/src/extensions/venue/venue-user/row-buttons/.gitkeep +0 -0
  82. package/templates/ui-template/src/index.css +10 -0
  83. package/templates/ui-template/src/main.tsx +10 -0
  84. package/templates/ui-template/src/pages/admin/AdminInfoPage.tsx +15 -0
  85. package/templates/ui-template/src/pages/auth/HelloAuthPage.tsx +15 -0
  86. package/templates/ui-template/src/pages/auth/VenueAppLoginPage.tsx +10 -0
  87. package/templates/ui-template/src/pages/static/AboutPage.tsx +17 -0
  88. package/templates/ui-template/src/redux/hierarchyImportTransactionApi.tsx +28 -0
  89. package/templates/ui-template/src/routes/AppRoutes.tsx +34 -0
  90. package/templates/ui-template/tsconfig.app.json +29 -0
  91. package/templates/ui-template/tsconfig.json +7 -0
  92. package/templates/ui-template/tsconfig.node.json +26 -0
  93. package/templates/ui-template/venue-admin.logicloop.io.conf +81 -0
  94. package/templates/ui-template/vite.config.ts +15 -0
  95. package/templates/nest-template/bin/solid +0 -2
  96. package/templates/nest-template/dot-templates/dot.gitignore.template +0 -56
  97. package/templates/next-template/README.md +0 -36
  98. package/templates/next-template/app/GlobalProvider.tsx +0 -23
  99. package/templates/next-template/app/admin/core/[moduleName]/[modelName]/form/[id]/page.tsx +0 -19
  100. package/templates/next-template/app/admin/core/[moduleName]/[modelName]/kanban/page.tsx +0 -18
  101. package/templates/next-template/app/admin/core/[moduleName]/[modelName]/list/page.tsx +0 -18
  102. package/templates/next-template/app/admin/core/[moduleName]/home/page.tsx +0 -15
  103. package/templates/next-template/app/admin/core/[moduleName]/settings/[settings]/page.tsx +0 -11
  104. package/templates/next-template/app/admin/layout.tsx +0 -11
  105. package/templates/next-template/app/admin/loading.tsx +0 -8
  106. package/templates/next-template/app/admin/page.tsx +0 -10
  107. package/templates/next-template/app/api/auth/[...nextauth]/route.ts +0 -6
  108. package/templates/next-template/app/auth/confirm-forgot-password/page.tsx +0 -12
  109. package/templates/next-template/app/auth/forgot-password/page.tsx +0 -11
  110. package/templates/next-template/app/auth/initiate-forgot-password/page.tsx +0 -11
  111. package/templates/next-template/app/auth/initiate-forgot-password-thank-you/page.tsx +0 -11
  112. package/templates/next-template/app/auth/initiate-google-oauth/page.tsx +0 -9
  113. package/templates/next-template/app/auth/initiate-login/page.tsx +0 -13
  114. package/templates/next-template/app/auth/initiate-register/page.tsx +0 -14
  115. package/templates/next-template/app/auth/layout.tsx +0 -10
  116. package/templates/next-template/app/auth/login/page.tsx +0 -12
  117. package/templates/next-template/app/auth/otp-verify/page.tsx +0 -12
  118. package/templates/next-template/app/auth/register/page.tsx +0 -12
  119. package/templates/next-template/app/auth/reset-password/page.tsx +0 -13
  120. package/templates/next-template/app/auth/sso/page.tsx +0 -80
  121. package/templates/next-template/app/layout.tsx +0 -56
  122. package/templates/next-template/app/solid-extensions.ts +0 -8
  123. package/templates/next-template/dot-templates/dot.gitignore.template +0 -44
  124. package/templates/next-template/eslint.config.mjs +0 -16
  125. package/templates/next-template/middleware.ts +0 -23
  126. package/templates/next-template/next-env.d.ts +0 -5
  127. package/templates/next-template/next-solidx-run.js +0 -18
  128. package/templates/next-template/next.config.js +0 -47
  129. package/templates/next-template/package.json +0 -79
  130. package/templates/next-template/public/favicon.ico +0 -0
  131. package/templates/next-template/public/file.svg +0 -1
  132. package/templates/next-template/public/globe.svg +0 -1
  133. package/templates/next-template/public/next.svg +0 -1
  134. package/templates/next-template/public/vercel.svg +0 -1
  135. package/templates/next-template/public/window.svg +0 -1
  136. package/templates/next-template/redux/store.ts +0 -52
  137. package/templates/next-template/tsconfig.json +0 -33
  138. package/templates/next-template/types/index.d.ts +0 -7
  139. package/templates/next-template/types/layout.d.ts +0 -94
  140. package/templates/next-template/types/next.d.ts +0 -46
  141. /package/templates/{nest-template → api-template}/README.md +0 -0
  142. /package/templates/{nest-template → api-template}/dot-templates/dot.dockerignore.template +0 -0
  143. /package/templates/{nest-template → api-template}/dot-templates/dot.eslintrc.template.js +0 -0
  144. /package/templates/{nest-template → api-template}/dot-templates/dot.prettierrc.template +0 -0
  145. /package/templates/{nest-template → api-template}/nest-cli.json +0 -0
  146. /package/templates/{nest-template → api-template}/nodemon.json +0 -0
  147. /package/templates/{nest-template → api-template}/src/app-default-database.module.ts +0 -0
  148. /package/templates/{nest-template → api-template}/src/app.controller.spec.ts +0 -0
  149. /package/templates/{nest-template → api-template}/src/app.module.ts +0 -0
  150. /package/templates/{nest-template → api-template}/src/app.service.ts +0 -0
  151. /package/templates/{nest-template → api-template}/src/database.utils.ts +0 -0
  152. /package/templates/{nest-template → api-template}/src/main-cli.ts +0 -0
  153. /package/templates/{nest-template → api-template}/src/main.ts +0 -0
  154. /package/templates/{nest-template → api-template}/test/jest-e2e.json +0 -0
  155. /package/templates/{nest-template → api-template}/tsconfig.build.json +0 -0
  156. /package/templates/{nest-template → api-template}/tsconfig.json +0 -0
  157. /package/templates/{next-template/public/themes/solid-light-purple/solid-login-light.png → ui-template/dist/assets/solid-login-light-C-F0ch5x.png} +0 -0
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
@@ -0,0 +1,42 @@
1
+ #root {
2
+ max-width: 1280px;
3
+ margin: 0 auto;
4
+ padding: 2rem;
5
+ text-align: center;
6
+ }
7
+
8
+ .logo {
9
+ height: 6em;
10
+ padding: 1.5em;
11
+ will-change: filter;
12
+ transition: filter 300ms;
13
+ }
14
+ .logo:hover {
15
+ filter: drop-shadow(0 0 2em #646cffaa);
16
+ }
17
+ .logo.react:hover {
18
+ filter: drop-shadow(0 0 2em #61dafbaa);
19
+ }
20
+
21
+ @keyframes logo-spin {
22
+ from {
23
+ transform: rotate(0deg);
24
+ }
25
+ to {
26
+ transform: rotate(360deg);
27
+ }
28
+ }
29
+
30
+ @media (prefers-reduced-motion: no-preference) {
31
+ a:nth-of-type(2) .logo {
32
+ animation: logo-spin infinite 20s linear;
33
+ }
34
+ }
35
+
36
+ .card {
37
+ padding: 2em;
38
+ }
39
+
40
+ .read-the-docs {
41
+ color: #888;
42
+ }
@@ -0,0 +1,44 @@
1
+ import "@solidxai/core-ui";
2
+ import "primeicons/primeicons.css";
3
+ import "primeflex/primeflex.css";
4
+
5
+ import { useMemo } from "react";
6
+ import { BrowserRouter } from "react-router-dom";
7
+ import { PrimeReactProvider } from "primereact/api";
8
+ import { LayoutProvider, SolidThemeProvider, StoreProvider, AppEventListener } from "@solidxai/core-ui";
9
+ import { hierarchyImportTransactionApi } from "./redux/hierarchyImportTransactionApi";
10
+
11
+ import { AppRoutes } from "./routes/AppRoutes";
12
+ import "./extensions/solid-extensions";
13
+ import "./index.css";
14
+
15
+ function App() {
16
+
17
+ // custom reducers and middlewares can be added to the StoreProvider
18
+ const venueReducers = useMemo(
19
+ () => ({
20
+ [hierarchyImportTransactionApi.reducerPath]: hierarchyImportTransactionApi.reducer,
21
+ }),
22
+ []
23
+ );
24
+ const venueMiddlewares = useMemo(
25
+ () => [hierarchyImportTransactionApi.middleware],
26
+ []
27
+ );
28
+
29
+ return (
30
+ <BrowserRouter>
31
+ <StoreProvider reducers={venueReducers} middlewares={venueMiddlewares}>
32
+ <PrimeReactProvider>
33
+ <LayoutProvider>
34
+ <SolidThemeProvider />
35
+ <AppEventListener />
36
+ <AppRoutes />
37
+ </LayoutProvider>
38
+ </PrimeReactProvider>
39
+ </StoreProvider>
40
+ </BrowserRouter>
41
+ );
42
+ }
43
+
44
+ export default App;
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
@@ -0,0 +1,82 @@
1
+ import { registerExtensionComponent, registerExtensionFunction } from "@solidxai/core-ui";
2
+ import callLogsDispositionHandler from "./venue/call-log/form-event-listeners/callLogsDispositionHandler";
3
+ import { ImportHierarchyComponent } from "./venue/hierarchy-import-transaction/form-buttons/ImportHierarchyComponent";
4
+ import onHierarchyImportFormLayoutLoadHandler from "./venue/hierarchy-import-transaction/form-event-listeners/onHierarchyImportFormLoadHandler";
5
+ import handleVenueUserFormViewChange from "./venue/venue-user/form-event-listeners/venueUserFormViewChangeHandler";
6
+ import handleVenueUserFormViewLoad from "./venue/venue-user/form-event-listeners/venueUserFormViewLoadHandler";
7
+
8
+ // Module - venue
9
+
10
+ // - - - - - - - - - - - - - - - - - - - -
11
+ // Model - call-log
12
+ // - - - - - - - - - - - - - - - - - - - -
13
+
14
+ // custom-widgets
15
+
16
+ // form-buttons
17
+
18
+ // form-event-listeners (onFormLayoutLoad, onFormDataLoad, onFormLoad)
19
+ registerExtensionFunction('callLogsDispositionHandler', callLogsDispositionHandler);
20
+
21
+ // list-buttons
22
+
23
+ // list-event-listeners (onListLoad, onBeforeListDataLoad)
24
+
25
+ // row-buttons
26
+
27
+
28
+
29
+ // - - - - - - - - - - - - - - - - - - - -
30
+ // Model - hierarchy-import-transaction
31
+ // - - - - - - - - - - - - - - - - - - - -
32
+
33
+ // custom-widgets
34
+
35
+ // form-buttons
36
+ registerExtensionComponent('ImportHierarchyComponent', ImportHierarchyComponent);
37
+
38
+ // form-event-listeners (onFormLayoutLoad, onFormDataLoad, onFormLoad)
39
+ registerExtensionFunction('onHierarchyImportFormLayoutLoadHandler', onHierarchyImportFormLayoutLoadHandler);
40
+
41
+ // list-buttons
42
+
43
+ // list-event-listeners (onListLoad, onBeforeListDataLoad)
44
+
45
+ // row-buttons
46
+
47
+
48
+
49
+ // - - - - - - - - - - - - - - - - - - - -
50
+ // Model - venue-user
51
+ // - - - - - - - - - - - - - - - - - - - -
52
+
53
+ // custom-widgets
54
+
55
+ // form-buttons
56
+
57
+ // form-event-listeners (onFormLayoutLoad, onFormDataLoad, onFormLoad)
58
+ registerExtensionFunction('venueUserFormViewChangeHandler', handleVenueUserFormViewChange);
59
+
60
+ // list-buttons
61
+
62
+ // list-event-listeners (onListLoad, onBeforeListDataLoad)
63
+
64
+ // row-buttons
65
+
66
+
67
+ // - - - - - - - - - - - - - - - - - - - -
68
+ // Model - venue-master
69
+ // - - - - - - - - - - - - - - - - - - - -
70
+
71
+ // custom-widgets
72
+
73
+ // form-buttons
74
+
75
+ // form-event-listeners (onFormLayoutLoad, onFormDataLoad, onFormLoad)
76
+ registerExtensionFunction('venueUserFormViewLoadHandler', handleVenueUserFormViewLoad);
77
+
78
+ // list-buttons
79
+
80
+ // list-event-listeners (onListLoad, onBeforeListDataLoad)
81
+
82
+ // row-buttons
@@ -0,0 +1,47 @@
1
+ import { SolidUiEvent, SolidViewLayoutManager } from "@solidxai/core-ui";
2
+
3
+ const callLogsDispositionHandler = async (event: SolidUiEvent) => {
4
+ const { modifiedField, modifiedFieldValue, formViewLayout } = event;
5
+
6
+ const layout = formViewLayout;
7
+ const layoutManager = new SolidViewLayoutManager(layout);
8
+
9
+ if (modifiedField === 'category') {
10
+ const dispositionWhereClause = {
11
+ category: {
12
+ id: { $eq: modifiedFieldValue?.id }
13
+ }
14
+ };
15
+
16
+
17
+ layoutManager.updateNodeAttributes('disposition', {
18
+ "whereClause": JSON.stringify(dispositionWhereClause)
19
+ });
20
+
21
+ return {
22
+ layoutChanged: true,
23
+ dataChanged: false,
24
+ newLayout: layoutManager.getLayout(),
25
+ }
26
+ }
27
+
28
+ if (modifiedField === 'disposition') {
29
+ const subDispositionWhereClause = {
30
+ disposition: {
31
+ id: { $eq: modifiedFieldValue?.id }
32
+ }
33
+ };
34
+
35
+ layoutManager.updateNodeAttributes('subDisposition', {
36
+ "whereClause": JSON.stringify(subDispositionWhereClause)
37
+ });
38
+
39
+ return {
40
+ layoutChanged: true,
41
+ dataChanged: false,
42
+ newLayout: layoutManager.getLayout(),
43
+ }
44
+ }
45
+ }
46
+
47
+ export default callLogsDispositionHandler;
@@ -0,0 +1,377 @@
1
+ "use client"
2
+ import { DataTable } from "primereact/datatable";
3
+ import { Column } from "primereact/column";
4
+ import React, { useEffect, useRef, useState } from 'react'
5
+ import { SolidCustomImportHeader } from './SolidCustomImportHeader';
6
+ import { useDispatch } from 'react-redux';
7
+ import { ProgressSpinner } from 'primereact/progressspinner';
8
+ import { Message } from 'primereact/message';
9
+ import { Button } from 'primereact/button';
10
+ import { closePopup } from "@solidxai/core-ui";
11
+ import { useTriggerHierarchyImportMutation, useValidateHierarchyImportMutation } from "../../../../redux/hierarchyImportTransactionApi";
12
+
13
+ interface VenueConflict {
14
+ venueName: string;
15
+ combinations: {
16
+ leader: string;
17
+ regionalHead: string;
18
+ areaManager: string;
19
+ venueManager: string;
20
+ manager: string;
21
+ }[];
22
+ }
23
+
24
+ export interface RowError {
25
+ rowNumber: number;
26
+ field: string;
27
+ value: string;
28
+ message: string;
29
+ }
30
+
31
+ interface ValidationResult {
32
+
33
+ canProceed: boolean;
34
+
35
+ headerValidation: any;
36
+
37
+ newVenuesCount: number;
38
+ venuesWithHierarchyConflictCount: number;
39
+
40
+ newVenues: string[];
41
+ venuesWithHierarchyConflict: VenueConflict[];
42
+
43
+ rowErrors?: RowError[];
44
+
45
+ }
46
+
47
+ export const ImportHierarchyComponent = (e: any): React.JSX.Element => {
48
+ console.log("form data", e);
49
+
50
+ // const { formData } = props;
51
+ const dispatch = useDispatch();
52
+
53
+ const [validationResult, setValidationResult] = useState<ValidationResult | null>(null);
54
+
55
+ const [validateImport, { isLoading: isValidating }] = useValidateHierarchyImportMutation();
56
+ const [triggerImport, { isLoading: isTriggering }] = useTriggerHierarchyImportMutation();
57
+
58
+ const hasValidatedRef = useRef(false);
59
+
60
+ // Auto-trigger validation when component mounts
61
+ useEffect(() => {
62
+ console.log(`Timepass...`);
63
+
64
+ if (e.params?.id && !hasValidatedRef.current) {
65
+ hasValidatedRef.current = true;
66
+ runValidation();
67
+ }
68
+ }, [e.params?.id]);
69
+
70
+ const runValidation = async () => {
71
+ try {
72
+ const result = await validateImport({ id: e.params?.id }).unwrap();
73
+ setValidationResult(result?.data);
74
+ } catch (error: any) {
75
+ console.error('Validation failed:', error);
76
+ setValidationResult({
77
+ canProceed: false,
78
+ headerValidation: {},
79
+ newVenuesCount: 0,
80
+ venuesWithHierarchyConflictCount: 0,
81
+ newVenues: [],
82
+ venuesWithHierarchyConflict: [],
83
+ });
84
+ }
85
+ };
86
+
87
+ const handleContinueImport = async () => {
88
+ if (!e.params?.id) return;
89
+
90
+ try {
91
+ await triggerImport({ id: e.params?.id }).unwrap();
92
+ dispatch(closePopup());
93
+ // You can add success toast notification here
94
+ // toast.success('Import job has been queued successfully');
95
+ } catch (error: any) {
96
+ console.error('Import failed:', error);
97
+ // You can add error toast notification here
98
+ // toast.error('Failed to trigger import');
99
+ }
100
+ };
101
+
102
+ const getUniqueCombinations = (combinations: any[]) => {
103
+ const uniqueMap = new Map();
104
+ combinations.forEach(combo => {
105
+ const key = `${combo.leader}-${combo.regionalHead}-${combo.areaManager}-${combo.venueManager}`;
106
+ if (!uniqueMap.has(key)) {
107
+ uniqueMap.set(key, combo);
108
+ }
109
+ });
110
+ return Array.from(uniqueMap.values());
111
+ };
112
+
113
+ console.log("validationResult", validationResult);
114
+ return (
115
+ <div>
116
+ <SolidCustomImportHeader />
117
+
118
+ <div className="p-4">
119
+
120
+ {/* Loading State */}
121
+ {isValidating && (
122
+ <div className="flex flex-column align-items-center justify-content-center py-6">
123
+ <ProgressSpinner style={{ width: '50px', height: '50px' }} />
124
+ <p className="mt-3 text-600">Validating import data...</p>
125
+ </div>
126
+ )}
127
+
128
+ {/* Validation Results */}
129
+ {!isValidating && validationResult && (
130
+ <div className="flex flex-column gap-3">
131
+ {/* Errors Section (STOP) */}
132
+ {/* Errors Section (STOP) - excluding conflict errors if no actual conflicts */}
133
+ {!validationResult?.canProceed && !validationResult?.headerValidation?.ok && (
134
+ <div className='overflow-x-auto py-3'>
135
+ <div className="px-3 py-2 bg-red-50 border-round mb-1 flex align-items-center gap-1">
136
+ <i className="pi pi-times-circle text-red-500 mr-2"></i>
137
+ <span className="text-red-500">{validationResult?.headerValidation?.note}</span>
138
+ </div>
139
+
140
+ {validationResult?.headerValidation?.expectedHeaders?.length > 0 && (
141
+ <div className='mt-3'>
142
+ <div className="font-bold white-space-nowrap">Expected Headers:</div>
143
+ <div className='flex mt-2'>
144
+ {validationResult?.headerValidation?.expectedHeaders.map((header: string, idx: number) => (
145
+ <div key={idx} className={`px-2 py-1 flex-shrink-0 border border-right-1 border-top-1 border-bottom-1 border-gray-300 ${idx === 0 ? 'border-left-1' : ''}`}>
146
+ <span className="text-sm white-space-nowrap">{header}</span>
147
+ </div>
148
+ ))}
149
+ </div>
150
+ </div>
151
+ )}
152
+ {/*
153
+ {validationResult?.headerValidation?.actualHeaders?.length > 0 && (
154
+ <div className='mt-3'>
155
+ <div className="font-bold white-space-nowrap">Actual Headers:</div>
156
+ <div className='flex mt-2'>
157
+ {validationResult?.headerValidation?.actualHeaders.map((header: string, idx: number) => (
158
+ <div key={idx} className={`px-2 py-1 flex-shrink-0 border border-right-1 border-top-1 border-bottom-1 border-gray-300 ${idx === 0 ? 'border-left-1' : ''}`}>
159
+ <span className="text-sm white-space-nowrap">{header}</span>
160
+ </div>
161
+ ))}
162
+ </div>
163
+ </div>
164
+ )} */}
165
+
166
+ {validationResult?.headerValidation?.missingHeaders?.length > 0 && (
167
+ <div className='mt-3'>
168
+ <div className="font-bold white-space-nowrap">Missing Headers:</div>
169
+ <div className='flex mt-2'>
170
+ {validationResult?.headerValidation?.missingHeaders.map((header: string, idx: number) => (
171
+ <div key={idx} className={`px-2 py-1 flex-shrink-0 border border-right-1 border-top-1 border-bottom-1 border-gray-300 ${idx === 0 ? 'border-left-1' : ''}`}>
172
+ <span className="text-sm white-space-nowrap">{header}</span>
173
+ </div>
174
+ ))}
175
+ </div>
176
+ </div>
177
+ )}
178
+
179
+ {validationResult?.headerValidation?.unexpectedHeaders?.length > 0 && (
180
+ <div className='mt-3'>
181
+ <div className="font-bold white-space-nowrap">Unexpected Headers:</div>
182
+ <div className='flex mt-2'>
183
+ {validationResult?.headerValidation?.unexpectedHeaders.map((header: string, idx: number) => (
184
+ <div key={idx} className={`px-2 py-1 flex-shrink-0 border border-right-1 border-top-1 border-bottom-1 border-gray-300 ${idx === 0 ? 'border-left-1' : ''}`}>
185
+ <span className="text-sm white-space-nowrap">{header}</span>
186
+ </div>
187
+ ))}
188
+ </div>
189
+ </div>
190
+ )}
191
+
192
+ {/* Only show non-conflict errors, or conflict errors with actual unique conflicts */}
193
+ {/* {validationResult.errors.filter(error =>
194
+ !error.includes('hierarchy combinations') ||
195
+ (validationResult.conflicts && validationResult.conflicts.some(c => getUniqueCombinations(c.combinations).length > 1))
196
+ ).length > 0 && (
197
+ <>
198
+ <Message severity="error" text="❌ Errors - Import cannot proceed" className="w-full mb-2" />
199
+ {validationResult.errors.filter(error =>
200
+ !error.includes('hierarchy combinations') ||
201
+ (validationResult.conflicts && validationResult.conflicts.some(c => getUniqueCombinations(c.combinations).length > 1))
202
+ ).map((error, idx) => (
203
+ <div key={idx} className="p-2 bg-red-50 border-round mb-1">
204
+ <i className="pi pi-times-circle text-red-500 mr-2"></i>
205
+ <span className="text-sm">{error}</span>
206
+ </div>
207
+ ))}
208
+ </>
209
+ )} */}
210
+ </div>
211
+ )}
212
+
213
+ {validationResult?.canProceed && (
214
+ <div className='overflow-x-auto py-3'>
215
+ <div className="px-3 py-2 bg-green-50 border-round mb-1 flex align-items-center gap-1">
216
+ <i className="pi pi-check-circle text-green-500 mr-2"></i>
217
+ <span className="text-green-500">{validationResult?.headerValidation?.note}</span>
218
+ </div>
219
+ </div>
220
+ )}
221
+
222
+ {/* Conflicts Section (STOP) - only show if there are actual unique conflicts */}
223
+ {/* {validationResult.conflicts && validationResult.conflicts.length > 0 && (
224
+ <div>
225
+ {validationResult.conflicts.filter(conflict => getUniqueCombinations(conflict.combinations).length > 1).length > 0 && (
226
+ <>
227
+ <Message
228
+ severity="error"
229
+ text={`❌ STOP: ${validationResult.conflicts.filter(c => getUniqueCombinations(c.combinations).length > 1).length} venue(s) with multiple hierarchy combinations`}
230
+ className="w-full mb-2"
231
+ />
232
+ <div className="max-h-20rem overflow-auto">
233
+ {validationResult.conflicts
234
+ .filter(conflict => getUniqueCombinations(conflict.combinations).length > 1)
235
+ .map((conflict, idx) => {
236
+ const uniqueCombos = getUniqueCombinations(conflict.combinations);
237
+ return (
238
+ <div key={idx} className="p-3 bg-red-50 border-round mb-2">
239
+ <div className="font-semibold text-red-700 mb-2">
240
+ 📍 Venue: {conflict.venueName}
241
+ </div>
242
+ <div className="text-sm">
243
+ <strong>Multiple hierarchy combinations found:</strong>
244
+ {uniqueCombos.map((combo, cIdx) => (
245
+ <div key={cIdx} className="ml-3 mt-1 p-2 bg-white border-round">
246
+ <div><strong>Combination #{cIdx + 1}</strong></div>
247
+ <div>• Leader: {combo.leader || 'N/A'}</div>
248
+ <div>• Regional Head: {combo.regionalHead || 'N/A'}</div>
249
+ <div>• Area Manager: {combo.areaManager || 'N/A'}</div>
250
+ <div>• Venue Manager: {combo.venueManager || 'N/A'}</div>
251
+ </div>
252
+ ))}
253
+ </div>
254
+ </div>
255
+ );
256
+ })}
257
+ </div>
258
+ </>
259
+ )}
260
+ </div>
261
+ )} */}
262
+
263
+ {/* Warnings Section (WARNING) */}
264
+ {/* {validationResult.warnings && validationResult.warnings.length > 0 && (
265
+ <div>
266
+ <Message severity="warn" text="⚠️ Warnings" className="w-full mb-2" />
267
+ {validationResult.warnings.map((warning, idx) => (
268
+ <div key={idx} className="p-2 bg-yellow-50 border-round mb-1">
269
+ <i className="pi pi-exclamation-triangle text-yellow-600 mr-2"></i>
270
+ <span className="text-sm">{warning}</span>
271
+ </div>
272
+ ))}
273
+ </div>
274
+ )} */}
275
+
276
+ {/* New Venues Section (WARNING) */}
277
+ {validationResult.newVenuesCount > 0 && (
278
+ <div>
279
+ <Message
280
+ severity="warn"
281
+ text={`⚠️ WARNING: ${validationResult.newVenuesCount} new venue(s) will be created`}
282
+ className="w-full mb-2"
283
+ />
284
+ <div className="max-h-15rem overflow-auto p-3 bg-yellow-50 border-round">
285
+ <div className="font-semibold mb-2">New Venues:</div>
286
+ {validationResult.newVenues.map((venue, idx) => (
287
+ <div key={idx} className="text-sm py-1 pl-2">
288
+ <i className="pi pi-plus-circle text-yellow-600 mr-2"></i>
289
+ {venue}
290
+ </div>
291
+ ))}
292
+ </div>
293
+ </div>
294
+ )}
295
+ {/*
296
+ <div className="px-3 py-2 bg-red-50 border-round mb-1 flex align-items-center gap-1">
297
+ <i className="pi pi-times-circle text-red-500 mr-2"></i>
298
+ <span className="text-red-500">{validationResult?.headerValidation?.note}</span>
299
+ </div> */}
300
+
301
+ {validationResult.rowErrors && (
302
+ <div className="w-full">
303
+ <Message
304
+ severity="error"
305
+ text={`⚠️ ERROR: ${validationResult.rowErrors.length} row errors`}
306
+ className="w-full mb-2"
307
+ />
308
+
309
+ <div className="p-2 bg-red-50 border-round border-1 border-red-200">
310
+ {/* <div className="font-semibold mb-2">Invalid Dates:</div> */}
311
+
312
+ <DataTable
313
+ value={validationResult.rowErrors}
314
+ size="small"
315
+ stripedRows
316
+ showGridlines
317
+ scrollable
318
+ scrollHeight="240px" // vertical scroll
319
+ className="p-datatable-sm"
320
+ tableStyle={{ minWidth: "70rem" }} // forces horizontal scroll
321
+ emptyMessage="No date errors"
322
+ >
323
+ <Column field="rowNumber" header="Row" style={{ width: "6rem", whiteSpace: "nowrap" }} />
324
+ <Column field="field" header="Field" style={{ width: "8rem", whiteSpace: "nowrap" }} />
325
+ <Column field="value" header="Value" style={{ minWidth: "22rem" }} />
326
+ <Column field="message" header="Message" style={{ minWidth: "24rem" }} />
327
+ </DataTable>
328
+
329
+ </div>
330
+ </div>
331
+ )}
332
+ {/* Success Message */}
333
+ {/* {(validationResult.canProceed ||
334
+ (validationResult.conflicts && validationResult.conflicts.every(c => getUniqueCombinations(c.combinations).length <= 1))) &&
335
+ validationResult.errors.filter(error => !error.includes('hierarchy combinations')).length === 0 && (
336
+ <Message
337
+ severity="success"
338
+ text="✅ Validation passed. You can proceed with the import."
339
+ className="w-full"
340
+ />
341
+ )} */}
342
+
343
+ {/* Action Buttons */}
344
+ <div className="flex justify-content-end gap-2 pt-3 border-top-1 surface-border">
345
+ <Button
346
+ label="Cancel"
347
+ icon="pi pi-times"
348
+ onClick={() => dispatch(closePopup())}
349
+ severity="secondary"
350
+ outlined
351
+ size='small'
352
+ />
353
+ <Button
354
+ label="Continue Import"
355
+ icon="pi pi-check"
356
+ onClick={handleContinueImport}
357
+ disabled={!validationResult.canProceed || isTriggering}
358
+ loading={isTriggering}
359
+ severity="success"
360
+ size='small'
361
+ />
362
+ </div>
363
+
364
+ {/* Helper Text */}
365
+ {!validationResult.canProceed && (
366
+ <div className="text-center text-sm text-600 mt-2">
367
+ <i className="pi pi-info-circle mr-2"></i>
368
+ Please resolve the errors above before continuing with the import.
369
+ </div>
370
+ )}
371
+ </div>
372
+ )}
373
+ </div>
374
+
375
+ </div>
376
+ )
377
+ }
@@ -0,0 +1,14 @@
1
+ import { closePopup } from '@solidxai/core-ui';
2
+ import { Button } from 'primereact/button'
3
+ import React from 'react'
4
+ import { useDispatch } from 'react-redux';
5
+
6
+ export const SolidCustomImportHeader = () => {
7
+ const dispatch = useDispatch();
8
+ return (
9
+ <div className='px-4 py-2 secondary-border-bottom flex align-items-center justify-content-between'>
10
+ <h5 className='m-0'>Import Hierarchy</h5>
11
+ <Button icon="pi pi-times" onClick={() => dispatch(closePopup())} size='small' severity='secondary' text style={{ height: 30, width: 30 }} />
12
+ </div>
13
+ )
14
+ }