@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,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,45 @@
1
+ import { SolidLoadForm, SolidViewLayoutManager } from "@solidxai/core-ui";
2
+
3
+ const onHierarchyImportFormLayoutLoadHandler = async (event: SolidLoadForm) => {
4
+ const { viewMetadata } = event;
5
+
6
+ const layout = viewMetadata.layout;
7
+ const layoutManager = new SolidViewLayoutManager(layout);
8
+
9
+ const currentUrl = window.location.href;
10
+
11
+ const { pathname } = new URL(currentUrl);
12
+ const isNewForm = pathname.endsWith('/new');
13
+
14
+ const urlParams = new URLSearchParams(window.location.search);
15
+ const viewMode = urlParams.get('viewMode');
16
+ const isViewMode = viewMode === 'view';
17
+ const isEditMode = viewMode === 'edit';
18
+
19
+ // Hide errorDetails field when it's a new form
20
+ if (isNewForm) {
21
+ layoutManager.updateNodeAttributes('errorDetails', {
22
+ visible: false
23
+ });
24
+
25
+ layoutManager.updateFormButtonByAction('ImportHierarchyComponent', {
26
+ visible: false
27
+ });
28
+ }
29
+
30
+ if (isEditMode) {
31
+ layoutManager.updateNodeAttributes('errorDetails', {
32
+ visible: true,
33
+ disabled: true
34
+ });
35
+ }
36
+
37
+ return {
38
+ layoutChanged: isNewForm || isViewMode || isEditMode,
39
+ dataChanged: false,
40
+ newLayout: layoutManager.getLayout()
41
+ }
42
+
43
+ }
44
+
45
+ export default onHierarchyImportFormLayoutLoadHandler;
@@ -0,0 +1,57 @@
1
+ import { SolidUiEvent, SolidViewLayoutManager } from '@solidxai/core-ui';
2
+
3
+ const handleVenueMasterFormViewLoad = (event: SolidUiEvent) => {
4
+
5
+ const { viewMetadata } = event;
6
+ console.log("handleVenueMasterFormViewLoad handler", viewMetadata);
7
+
8
+ const layout = viewMetadata.layout;
9
+ const layoutManager = new SolidViewLayoutManager(layout);
10
+
11
+ const currentUrl = window.location.href;
12
+ const isNewForm = currentUrl.endsWith('/new');
13
+
14
+ const urlParams = new URLSearchParams(window.location.search);
15
+ const viewMode = urlParams.get('viewMode');
16
+ const isViewMode = viewMode === 'view';
17
+ const isEditMode = viewMode === 'edit';
18
+
19
+ // Hide leader, regionHead, areaHead, venueManager, manager fields when it's a new form
20
+ if (isNewForm) {
21
+ layoutManager.updateNodeAttributes('leader', { visible: false });
22
+ layoutManager.updateNodeAttributes('regionHead', { visible: false });
23
+ layoutManager.updateNodeAttributes('areaHead', { visible: false });
24
+ layoutManager.updateNodeAttributes('venueManager', { visible: false });
25
+ layoutManager.updateNodeAttributes('manager', { visible: false });
26
+
27
+ if (isEditMode) {
28
+ layoutManager.updateNodeAttributes('leader', {
29
+ visible: true,
30
+ disabled: true
31
+ });
32
+ layoutManager.updateNodeAttributes('regionHead', {
33
+ visible: true,
34
+ disabled: true
35
+ });
36
+ layoutManager.updateNodeAttributes('areaHead', {
37
+ visible: true,
38
+ disabled: true
39
+ });
40
+ layoutManager.updateNodeAttributes('venueManager', {
41
+ visible: true,
42
+ disabled: true
43
+ });
44
+ layoutManager.updateNodeAttributes('manager', {
45
+ visible: true,
46
+ disabled: true
47
+ });
48
+ }
49
+
50
+ return {
51
+ layoutChanged: isNewForm || isViewMode || isEditMode,
52
+ dataChanged: false,
53
+ newLayout: layoutManager.getLayout()
54
+ }
55
+ }
56
+ }
57
+ export default handleVenueMasterFormViewLoad;
@@ -0,0 +1,21 @@
1
+ import { SolidUiEvent, SolidViewLayoutManager } from '@solidxai/core-ui';
2
+
3
+ const handleVenueUserFormViewChange = (event: SolidUiEvent) => {
4
+
5
+ const { modifiedField, modifiedFieldValue, formViewLayout } = event;
6
+
7
+ const layout = formViewLayout;
8
+ const layoutManager = new SolidViewLayoutManager(layout);
9
+
10
+ if (modifiedField === 'code') {
11
+ return {
12
+ layoutChanged: false,
13
+ dataChanged: true,
14
+ newFormData: {
15
+ username: modifiedFieldValue
16
+ },
17
+ newLayout: layoutManager.getLayout(),
18
+ }
19
+ }
20
+ }
21
+ export default handleVenueUserFormViewChange;
@@ -0,0 +1,97 @@
1
+ import { SolidUiEvent, SolidViewLayoutManager } from '@solidxai/core-ui';
2
+
3
+ const handleVenueUserFormViewLoad = (event: SolidUiEvent) => {
4
+ const { viewMetadata } = event;
5
+
6
+ const layout = viewMetadata.layout;
7
+ const layoutManager = new SolidViewLayoutManager(layout);
8
+
9
+ const currentUrl = window.location.href;
10
+
11
+ const { pathname } = new URL(currentUrl);
12
+ const isNewForm = pathname.endsWith('/new');
13
+
14
+ const urlParams = new URLSearchParams(window.location.search);
15
+ const viewMode = urlParams.get('viewMode');
16
+ const isViewMode = viewMode === 'view';
17
+ const isEditMode = viewMode === 'edit';
18
+
19
+ // Hide leader, regionHead, areaHead, venueManager, manager fields when it's a new form
20
+ if (isNewForm) {
21
+ layoutManager.updateNodeAttributes('code', { visible: false });
22
+ layoutManager.updateNodeAttributes('internalExternal', { visible: false });
23
+ layoutManager.updateNodeAttributes('designation', { visible: false });
24
+ layoutManager.updateNodeAttributes('exitStatus', { visible: false });
25
+ layoutManager.updateNodeAttributes('doj', { visible: false });
26
+ layoutManager.updateNodeAttributes('dol', { visible: false });
27
+ layoutManager.updateNodeAttributes('lastImportedOn', { visible: false });
28
+ layoutManager.updateNodeAttributes('leader', { visible: false });
29
+ layoutManager.updateNodeAttributes('regionHead', { visible: false });
30
+ layoutManager.updateNodeAttributes('zonalHead', { visible: false });
31
+ layoutManager.updateNodeAttributes('areaHead', { visible: false });
32
+ layoutManager.updateNodeAttributes('venueManager', { visible: false });
33
+ layoutManager.updateNodeAttributes('manager', { visible: false });
34
+
35
+ if (isEditMode) {
36
+ layoutManager.updateNodeAttributes('code', {
37
+ visible: true,
38
+ disabled: true
39
+ });
40
+ layoutManager.updateNodeAttributes('internalExternal', {
41
+ visible: true,
42
+ disabled: true
43
+ });
44
+ layoutManager.updateNodeAttributes('designation', {
45
+ visible: true,
46
+ disabled: true
47
+ });
48
+ layoutManager.updateNodeAttributes('exitStatus', {
49
+ visible: true,
50
+ disabled: true
51
+ });
52
+ layoutManager.updateNodeAttributes('doj', {
53
+ visible: true,
54
+ disabled: true
55
+ });
56
+ layoutManager.updateNodeAttributes('dol', {
57
+ visible: true,
58
+ disabled: true
59
+ });
60
+ layoutManager.updateNodeAttributes('lastImportedOn', {
61
+ visible: true,
62
+ disabled: true
63
+ });
64
+ layoutManager.updateNodeAttributes('leader', {
65
+ visible: true,
66
+ disabled: true
67
+ });
68
+ layoutManager.updateNodeAttributes('regionHead', {
69
+ visible: true,
70
+ disabled: true
71
+ });
72
+ layoutManager.updateNodeAttributes('zonalHead', {
73
+ visible: true,
74
+ disabled: true
75
+ });
76
+ layoutManager.updateNodeAttributes('areaHead', {
77
+ visible: true,
78
+ disabled: true
79
+ });
80
+ layoutManager.updateNodeAttributes('venueManager', {
81
+ visible: true,
82
+ disabled: true
83
+ });
84
+ layoutManager.updateNodeAttributes('manager', {
85
+ visible: true,
86
+ disabled: true
87
+ });
88
+ }
89
+
90
+ return {
91
+ layoutChanged: isNewForm || isViewMode || isEditMode,
92
+ dataChanged: false,
93
+ newLayout: layoutManager.getLayout()
94
+ }
95
+ }
96
+ }
97
+ export default handleVenueUserFormViewLoad;
@@ -0,0 +1,10 @@
1
+ html,
2
+ body,
3
+ #root {
4
+ height: 100%;
5
+ width: 100%;
6
+ }
7
+
8
+ body {
9
+ margin: 0;
10
+ }
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import ReactDOM from "react-dom/client";
3
+ import App from "./App";
4
+
5
+ ReactDOM.createRoot(document.getElementById("root")!).render(
6
+ <React.StrictMode>
7
+ <App />
8
+ </React.StrictMode>
9
+ );
10
+
@@ -0,0 +1,15 @@
1
+ import { Card } from "primereact/card";
2
+
3
+ export function AdminInfoPage() {
4
+ return (
5
+ <div className="flex align-items-center justify-content-center" style={{ minHeight: "70vh" }}>
6
+ <Card className="w-full" style={{ maxWidth: 520 }}>
7
+ <div className="flex flex-column align-items-center text-center gap-2">
8
+ <i className="pi pi-shield" style={{ fontSize: 28, color: "#22c55e" }} />
9
+ <h2 className="m-0">Admin Message</h2>
10
+ <p className="m-0 text-sm">This is a guarded admin route.</p>
11
+ </div>
12
+ </Card>
13
+ </div>
14
+ );
15
+ }
@@ -0,0 +1,15 @@
1
+ import { Card } from "primereact/card";
2
+
3
+ export function HelloAuthPage() {
4
+ return (
5
+ <div className="flex align-items-center justify-content-center" style={{ minHeight: "70vh" }}>
6
+ <Card className="w-full" style={{ maxWidth: 420 }}>
7
+ <div className="flex flex-column align-items-center text-center gap-3">
8
+ <i className="pi pi-sparkles" style={{ fontSize: 28, color: "#7c3aed" }} />
9
+ <h2 className="m-0">Hello!</h2>
10
+ <p className="m-0 text-sm">This is an unguarded auth route.</p>
11
+ </div>
12
+ </Card>
13
+ </div>
14
+ );
15
+ }
@@ -0,0 +1,10 @@
1
+ import { SolidLogin } from "@solidxai/core-ui";
2
+
3
+ export function VenueAppLoginPage() {
4
+ return (
5
+ <SolidLogin
6
+ signInValidatorLabel="Mobile / SAP Code / Dhan Code"
7
+ signInValidatorPlaceholder="Enter any one of Mobile / SAP Code / Dhan Code"
8
+ />
9
+ );
10
+ }
@@ -0,0 +1,17 @@
1
+ import { Card } from "primereact/card";
2
+
3
+ export function AboutPage() {
4
+ return (
5
+ <div className="flex align-items-center justify-content-center" style={{ minHeight: "70vh" }}>
6
+ <Card className="w-full" style={{ maxWidth: 520 }}>
7
+ <div className="flex flex-column align-items-center text-center gap-2">
8
+ <i className="pi pi-info-circle" style={{ fontSize: 28, color: "#2563eb" }} />
9
+ <h2 className="m-0">About Us</h2>
10
+ <p className="m-0 text-sm">
11
+ This is a public, unguarded route outside the auth layout.
12
+ </p>
13
+ </div>
14
+ </Card>
15
+ </div>
16
+ );
17
+ }
@@ -0,0 +1,28 @@
1
+ import { createApi } from "@reduxjs/toolkit/query/react";
2
+ import { baseQueryWithAuth } from "@solidxai/core-ui";
3
+
4
+ export const hierarchyImportTransactionApi = createApi({
5
+ reducerPath: "hierarchyImportTransactionApi",
6
+ baseQuery: baseQueryWithAuth,
7
+ tagTypes: ["HierarchyImportTransaction"],
8
+ endpoints: (builder) => ({
9
+ validateHierarchyImport: builder.mutation({
10
+ query: ({ id }) => ({
11
+ url: `/hierarchy-import-transaction/${id}/validate-import`,
12
+ method: "POST",
13
+ }),
14
+ }),
15
+ triggerHierarchyImport: builder.mutation({
16
+ query: ({ id }) => ({
17
+ url: `/hierarchy-import-transaction/${id}/trigger-import`,
18
+ method: "POST",
19
+ }),
20
+ invalidatesTags: ["HierarchyImportTransaction"],
21
+ }),
22
+ }),
23
+ });
24
+
25
+ export const {
26
+ useValidateHierarchyImportMutation,
27
+ useTriggerHierarchyImportMutation,
28
+ } = hierarchyImportTransactionApi;
@@ -0,0 +1,34 @@
1
+ import { useRoutes } from "react-router-dom";
2
+ import { getSolidRoutes } from "@solidxai/core-ui";
3
+ import { VenueAppLoginPage } from "../pages/auth/VenueAppLoginPage";
4
+ import { HelloAuthPage } from "../pages/auth/HelloAuthPage";
5
+ import { AboutPage } from "../pages/static/AboutPage";
6
+ import { AdminInfoPage } from "../pages/admin/AdminInfoPage";
7
+
8
+ export function AppRoutes() {
9
+ // Example of overriding and extending the default Solid routes...
10
+ const elementOverrides = {
11
+ login: <VenueAppLoginPage />,
12
+ };
13
+
14
+ // Example of adding an extra route that uses the AuthLayout...
15
+ const extraAuthRoutes = [
16
+ { path: "/auth/hello", element: <HelloAuthPage /> },
17
+ ];
18
+ // Example of adding an extra route that uses the AdminLayout...
19
+ const extraAdminRoutes = [
20
+ { path: "/admin/info", element: <AdminInfoPage /> },
21
+ ];
22
+ // Example of adding an extra route that uses the MainLayout...
23
+ const extraRoutes = [
24
+ { path: "/about", element: <AboutPage /> },
25
+ ]
26
+ const routes = getSolidRoutes({
27
+ elementOverrides,
28
+ extraAuthRoutes,
29
+ extraRoutes,
30
+ extraAdminRoutes,
31
+ });
32
+
33
+ return useRoutes(routes);
34
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "compilerOptions": {
3
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
4
+ "target": "ES2022",
5
+ "useDefineForClassFields": true,
6
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
7
+ "module": "ESNext",
8
+ "types": ["vite/client"],
9
+ "skipLibCheck": true,
10
+ "baseUrl": ".",
11
+
12
+ /* Bundler mode */
13
+ "moduleResolution": "bundler",
14
+ "allowImportingTsExtensions": true,
15
+ "verbatimModuleSyntax": false,
16
+ "moduleDetection": "force",
17
+ "noEmit": true,
18
+ "jsx": "react-jsx",
19
+
20
+ /* Linting */
21
+ "strict": true,
22
+ "noUnusedLocals": false,
23
+ "noUnusedParameters": false,
24
+ "erasableSyntaxOnly": false,
25
+ "noFallthroughCasesInSwitch": true,
26
+ "noUncheckedSideEffectImports": true
27
+ },
28
+ "include": ["src"]
29
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "files": [],
3
+ "references": [
4
+ { "path": "./tsconfig.app.json" },
5
+ { "path": "./tsconfig.node.json" }
6
+ ]
7
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "compilerOptions": {
3
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4
+ "target": "ES2023",
5
+ "lib": ["ES2023"],
6
+ "module": "ESNext",
7
+ "types": ["node"],
8
+ "skipLibCheck": true,
9
+
10
+ /* Bundler mode */
11
+ "moduleResolution": "bundler",
12
+ "allowImportingTsExtensions": true,
13
+ "verbatimModuleSyntax": false,
14
+ "moduleDetection": "force",
15
+ "noEmit": true,
16
+
17
+ /* Linting */
18
+ "strict": true,
19
+ "noUnusedLocals": false,
20
+ "noUnusedParameters": false,
21
+ "erasableSyntaxOnly": true,
22
+ "noFallthroughCasesInSwitch": true,
23
+ "noUncheckedSideEffectImports": true
24
+ },
25
+ "include": ["vite.config.ts"]
26
+ }
@@ -0,0 +1,81 @@
1
+ server {
2
+ listen 80;
3
+ server_name venue-admin.logicloop.io;
4
+
5
+ # Vite build output
6
+ root /opt/gitco/javascript/rnlic-venue-app/new-solid-ui/dist;
7
+ index index.html;
8
+
9
+ # ----------------------------
10
+ # Basic security + hardening
11
+ # ----------------------------
12
+ add_header X-Content-Type-Options "nosniff" always;
13
+ add_header X-Frame-Options "SAMEORIGIN" always;
14
+ add_header Referrer-Policy "strict-origin-when-cross-origin" always;
15
+
16
+ # If you know you don't need cross-origin embedding, keep SAMEORIGIN.
17
+ # If you need stricter CSP later, add it carefully (SPAs can break if too strict).
18
+
19
+ # ----------------------------
20
+ # Compression (blazing fast)
21
+ # ----------------------------
22
+ gzip on;
23
+ gzip_comp_level 5;
24
+ gzip_min_length 1024;
25
+ gzip_vary on;
26
+ gzip_proxied any;
27
+ gzip_types
28
+ text/plain
29
+ text/css
30
+ text/javascript
31
+ application/javascript
32
+ application/json
33
+ application/xml
34
+ application/rss+xml
35
+ application/atom+xml
36
+ image/svg+xml
37
+ font/ttf
38
+ font/otf
39
+ application/vnd.ms-fontobject;
40
+
41
+ # ----------------------------
42
+ # Cache strategy
43
+ # ----------------------------
44
+
45
+ # 1) Hashed build assets (Vite typically outputs /assets/* with content hashes)
46
+ # Cache for a year, immutable.
47
+ location ^~ /assets/ {
48
+ try_files $uri =404;
49
+ expires 365d;
50
+ add_header Cache-Control "public, max-age=31536000, immutable" always;
51
+ access_log off;
52
+ }
53
+
54
+ # 2) Other static files (fonts/images/icons/etc.)
55
+ location ~* \.(?:js|css|png|jpg|jpeg|gif|webp|svg|ico|woff2?|ttf|eot|map)$ {
56
+ try_files $uri =404;
57
+ expires 30d;
58
+ add_header Cache-Control "public, max-age=2592000" always;
59
+ access_log off;
60
+ }
61
+
62
+ # 3) Do NOT cache index.html (so new deployments take effect immediately)
63
+ location = /index.html {
64
+ expires -1;
65
+ add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0" always;
66
+ }
67
+
68
+ # Optional: service worker must not be cached aggressively (if you use one)
69
+ location ~* /(service-worker\.js|sw\.js)$ {
70
+ expires -1;
71
+ add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0" always;
72
+ }
73
+
74
+ # ----------------------------
75
+ # SPA fallback
76
+ # ----------------------------
77
+ location / {
78
+ # Serve file if it exists, otherwise fall back to SPA entry
79
+ try_files $uri $uri/ /index.html;
80
+ }
81
+ }
@@ -0,0 +1,15 @@
1
+ import { defineConfig } from "vite";
2
+ import react from "@vitejs/plugin-react";
3
+ import { fileURLToPath } from "url";
4
+ import { dirname, resolve } from "path";
5
+
6
+ const __dirname = dirname(fileURLToPath(import.meta.url));
7
+
8
+ export default defineConfig(({ mode }) => ({
9
+ plugins: [react()],
10
+ resolve: {
11
+ },
12
+ build: {
13
+ sourcemap: mode !== "production",
14
+ },
15
+ }));
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- require('../dist/main-cli');