@solidstarters/solid-core-ui 1.1.16 → 1.1.17

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 (167) hide show
  1. package/dist/components/auth/AuthLayout.d.ts +4 -0
  2. package/dist/components/auth/AuthLayout.d.ts.map +1 -0
  3. package/dist/components/auth/AuthLayout.js +80 -0
  4. package/dist/components/auth/AuthLayout.js.map +1 -0
  5. package/dist/components/auth/ForgotPasswordThankYou.d.ts +2 -0
  6. package/dist/components/auth/ForgotPasswordThankYou.d.ts.map +1 -0
  7. package/dist/components/auth/ForgotPasswordThankYou.js +16 -0
  8. package/dist/components/auth/ForgotPasswordThankYou.js.map +1 -0
  9. package/dist/components/auth/GoogleAuthChecking.d.ts +2 -0
  10. package/dist/components/auth/GoogleAuthChecking.d.ts.map +1 -0
  11. package/dist/components/auth/GoogleAuthChecking.js +99 -0
  12. package/dist/components/auth/GoogleAuthChecking.js.map +1 -0
  13. package/dist/components/auth/SolidChangeForcePassword.d.ts.map +1 -1
  14. package/dist/components/auth/SolidChangeForcePassword.js +44 -39
  15. package/dist/components/auth/SolidChangeForcePassword.js.map +1 -1
  16. package/dist/components/auth/SolidForgotPassword.d.ts.map +1 -1
  17. package/dist/components/auth/SolidForgotPassword.js +1 -2
  18. package/dist/components/auth/SolidForgotPassword.js.map +1 -1
  19. package/dist/components/auth/SolidInitialLoginOtp.d.ts +1 -3
  20. package/dist/components/auth/SolidInitialLoginOtp.d.ts.map +1 -1
  21. package/dist/components/auth/SolidInitialLoginOtp.js +16 -12
  22. package/dist/components/auth/SolidInitialLoginOtp.js.map +1 -1
  23. package/dist/components/auth/SolidInitiateRegisterOtp.d.ts +1 -3
  24. package/dist/components/auth/SolidInitiateRegisterOtp.d.ts.map +1 -1
  25. package/dist/components/auth/SolidInitiateRegisterOtp.js +16 -12
  26. package/dist/components/auth/SolidInitiateRegisterOtp.js.map +1 -1
  27. package/dist/components/auth/SolidLogin.d.ts.map +1 -1
  28. package/dist/components/auth/SolidLogin.js +12 -8
  29. package/dist/components/auth/SolidLogin.js.map +1 -1
  30. package/dist/components/auth/SolidRegister.d.ts.map +1 -1
  31. package/dist/components/auth/SolidRegister.js +13 -9
  32. package/dist/components/auth/SolidRegister.js.map +1 -1
  33. package/dist/components/auth/SolidResetPassword.d.ts +1 -4
  34. package/dist/components/auth/SolidResetPassword.d.ts.map +1 -1
  35. package/dist/components/auth/SolidResetPassword.js +14 -10
  36. package/dist/components/auth/SolidResetPassword.js.map +1 -1
  37. package/dist/components/common/GeneralSettings.d.ts +1 -3
  38. package/dist/components/common/GeneralSettings.d.ts.map +1 -1
  39. package/dist/components/common/GeneralSettings.js +21 -18
  40. package/dist/components/common/GeneralSettings.js.map +1 -1
  41. package/dist/components/common/NotFound.d.ts +2 -0
  42. package/dist/components/common/NotFound.d.ts.map +1 -0
  43. package/dist/components/common/NotFound.js +7 -0
  44. package/dist/components/common/NotFound.js.map +1 -0
  45. package/dist/components/common/SocialMediaLogin.d.ts.map +1 -1
  46. package/dist/components/common/SocialMediaLogin.js +3 -2
  47. package/dist/components/common/SocialMediaLogin.js.map +1 -1
  48. package/dist/components/common/SolidAdmin.d.ts +2 -0
  49. package/dist/components/common/SolidAdmin.d.ts.map +1 -0
  50. package/dist/components/common/SolidAdmin.js +5 -0
  51. package/dist/components/common/SolidAdmin.js.map +1 -0
  52. package/dist/components/common/SolidFormStepper.d.ts.map +1 -1
  53. package/dist/components/common/SolidFormStepper.js +8 -1
  54. package/dist/components/common/SolidFormStepper.js.map +1 -1
  55. package/dist/components/common/SolidThemeLink.d.ts +2 -0
  56. package/dist/components/common/SolidThemeLink.d.ts.map +1 -0
  57. package/dist/components/common/SolidThemeLink.js +5 -0
  58. package/dist/components/common/SolidThemeLink.js.map +1 -0
  59. package/dist/components/common/error.d.ts +9 -0
  60. package/dist/components/common/error.d.ts.map +1 -0
  61. package/dist/components/common/error.js +7 -0
  62. package/dist/components/common/error.js.map +1 -0
  63. package/dist/components/core/common/FilterComponent.js +7 -7
  64. package/dist/components/core/common/FilterComponent.js.map +1 -1
  65. package/dist/components/core/common/SolidConfigureLayoutElement.d.ts.map +1 -1
  66. package/dist/components/core/common/SolidConfigureLayoutElement.js +4 -3
  67. package/dist/components/core/common/SolidConfigureLayoutElement.js.map +1 -1
  68. package/dist/components/core/common/SolidGlobalSearchElement.d.ts.map +1 -1
  69. package/dist/components/core/common/SolidGlobalSearchElement.js +35 -15
  70. package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
  71. package/dist/components/core/form/SolidFormLayouts.d.ts +3 -0
  72. package/dist/components/core/form/SolidFormLayouts.d.ts.map +1 -0
  73. package/dist/components/core/form/SolidFormLayouts.js +57 -0
  74. package/dist/components/core/form/SolidFormLayouts.js.map +1 -0
  75. package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
  76. package/dist/components/core/form/SolidFormView.js +13 -1
  77. package/dist/components/core/form/SolidFormView.js.map +1 -1
  78. package/dist/components/core/form/fields/SolidMediaMultipleField.d.ts.map +1 -1
  79. package/dist/components/core/form/fields/SolidMediaMultipleField.js +11 -7
  80. package/dist/components/core/form/fields/SolidMediaMultipleField.js.map +1 -1
  81. package/dist/components/core/form/fields/SolidMediaSingleField.js +3 -2
  82. package/dist/components/core/form/fields/SolidMediaSingleField.js.map +1 -1
  83. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts.map +1 -1
  84. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js +4 -4
  85. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js.map +1 -1
  86. package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js +1 -1
  87. package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js.map +1 -1
  88. package/dist/components/core/kanban/SolidKanbanView.js +2 -2
  89. package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
  90. package/dist/components/core/list/SolidListView.d.ts.map +1 -1
  91. package/dist/components/core/list/SolidListView.js +6 -28
  92. package/dist/components/core/list/SolidListView.js.map +1 -1
  93. package/dist/components/core/model/CreateModel.d.ts.map +1 -1
  94. package/dist/components/core/model/CreateModel.js +12 -1
  95. package/dist/components/core/model/CreateModel.js.map +1 -1
  96. package/dist/components/core/model/FieldMetaData.d.ts.map +1 -1
  97. package/dist/components/core/model/FieldMetaData.js +2 -2
  98. package/dist/components/core/model/FieldMetaData.js.map +1 -1
  99. package/dist/components/core/model/FieldMetaDataForm.js +21 -21
  100. package/dist/components/core/model/FieldMetaDataForm.js.map +1 -1
  101. package/dist/components/core/model/ModelMetaData.js +5 -5
  102. package/dist/components/core/module/CreateModule.d.ts.map +1 -1
  103. package/dist/components/core/module/CreateModule.js +5 -2
  104. package/dist/components/core/module/CreateModule.js.map +1 -1
  105. package/dist/components/core/users/CreateUser.js +2 -2
  106. package/dist/components/layout/AdminLayout.d.ts +4 -0
  107. package/dist/components/layout/AdminLayout.d.ts.map +1 -0
  108. package/dist/components/layout/AdminLayout.js +86 -0
  109. package/dist/components/layout/AdminLayout.js.map +1 -0
  110. package/dist/components/layout/AppConfig.d.ts.map +1 -1
  111. package/dist/components/layout/AppConfig.js +4 -9
  112. package/dist/components/layout/AppConfig.js.map +1 -1
  113. package/dist/components/layout/user-profile-menu.js +1 -1
  114. package/dist/components/layout/user-profile-menu.js.map +1 -1
  115. package/dist/index.d.ts +11 -0
  116. package/dist/index.d.ts.map +1 -1
  117. package/dist/index.js +12 -0
  118. package/dist/index.js.map +1 -1
  119. package/dist/nextAuth/authProviders.d.ts +4 -0
  120. package/dist/nextAuth/authProviders.d.ts.map +1 -0
  121. package/dist/nextAuth/authProviders.js +231 -0
  122. package/dist/nextAuth/authProviders.js.map +1 -0
  123. package/dist/nextAuth/refreshAccessToken.d.ts +2 -0
  124. package/dist/nextAuth/refreshAccessToken.d.ts.map +1 -0
  125. package/dist/nextAuth/refreshAccessToken.js +76 -0
  126. package/dist/nextAuth/refreshAccessToken.js.map +1 -0
  127. package/package.json +1 -1
  128. package/src/components/auth/AuthLayout.tsx +126 -0
  129. package/src/components/auth/ForgotPasswordThankYou.tsx +45 -0
  130. package/src/components/auth/GoogleAuthChecking.tsx +60 -0
  131. package/src/components/auth/SolidChangeForcePassword.tsx +21 -32
  132. package/src/components/auth/SolidForgotPassword.tsx +3 -2
  133. package/src/components/auth/SolidInitialLoginOtp.tsx +16 -8
  134. package/src/components/auth/SolidInitiateRegisterOtp.tsx +17 -9
  135. package/src/components/auth/SolidLogin.tsx +16 -10
  136. package/src/components/auth/SolidRegister.tsx +17 -9
  137. package/src/components/auth/SolidResetPassword.tsx +13 -6
  138. package/src/components/common/GeneralSettings.tsx +7 -2
  139. package/src/components/common/NotFound.tsx +22 -0
  140. package/src/components/common/SocialMediaLogin.tsx +24 -25
  141. package/src/components/common/SolidAdmin.tsx +7 -0
  142. package/src/components/common/SolidFormStepper.tsx +55 -2
  143. package/src/components/common/SolidThemeLink.tsx +5 -0
  144. package/src/components/common/error.tsx +30 -0
  145. package/src/components/core/common/FilterComponent.tsx +70 -70
  146. package/src/components/core/common/SolidConfigureLayoutElement.tsx +6 -1
  147. package/src/components/core/common/SolidGlobalSearchElement.tsx +45 -17
  148. package/src/components/core/form/SolidFormLayouts.tsx +93 -0
  149. package/src/components/core/form/SolidFormView.tsx +64 -3
  150. package/src/components/core/form/fields/SolidMediaMultipleField.tsx +14 -9
  151. package/src/components/core/form/fields/SolidMediaSingleField.tsx +3 -3
  152. package/src/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +25 -23
  153. package/src/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +1 -1
  154. package/src/components/core/kanban/SolidKanbanView.tsx +4 -4
  155. package/src/components/core/list/SolidListView.tsx +4 -61
  156. package/src/components/core/model/CreateModel.tsx +58 -0
  157. package/src/components/core/model/FieldMetaData.tsx +2 -0
  158. package/src/components/core/model/FieldMetaDataForm.tsx +26 -26
  159. package/src/components/core/model/ModelMetaData.tsx +5 -5
  160. package/src/components/core/module/CreateModule.tsx +11 -3
  161. package/src/components/core/users/CreateUser.tsx +2 -2
  162. package/src/components/layout/AdminLayout.tsx +62 -0
  163. package/src/components/layout/AppConfig.tsx +4 -3
  164. package/src/components/layout/user-profile-menu.tsx +1 -1
  165. package/src/index.ts +17 -1
  166. package/src/nextAuth/authProviders.tsx +220 -0
  167. package/src/nextAuth/refreshAccessToken.tsx +27 -0
@@ -34,6 +34,7 @@ import { SolidShortTextField } from "./fields/SolidShortTextField";
34
34
  import { SolidTimeField } from "./fields/SolidTimeField";
35
35
  import { BackButton } from "@/components/common/BackButton";
36
36
  import { SolidFormStepper } from "@/components/common/SolidFormStepper";
37
+ import { OverlayPanel } from "primereact/overlaypanel";
37
38
 
38
39
  export type SolidFormViewProps = {
39
40
  moduleName: string;
@@ -297,6 +298,8 @@ const SolidFormView = (params: SolidFormViewProps) => {
297
298
  const errorFields: string[] = [];
298
299
 
299
300
  const [triggerCheckIfPermissionExists] = useLazyCheckIfPermissionExistsQuery();
301
+ const op = useRef(null);
302
+
300
303
  useEffect(() => {
301
304
 
302
305
  const fetchPermissions = async () => {
@@ -678,6 +681,61 @@ const SolidFormView = (params: SolidFormViewProps) => {
678
681
  setDeleteDialogVisible(false);
679
682
  }
680
683
 
684
+ const formActionDropdown = () => {
685
+ return (
686
+ <div>
687
+ <Button
688
+ outlined
689
+ severity="secondary"
690
+ type="button"
691
+ icon={
692
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
693
+ <path d="M6 14C5.45 14 4.97917 13.8042 4.5875 13.4125C4.19583 13.0208 4 12.55 4 12C4 11.45 4.19583 10.9792 4.5875 10.5875C4.97917 10.1958 5.45 10 6 10C6.55 10 7.02083 10.1958 7.4125 10.5875C7.80417 10.9792 8 11.45 8 12C8 12.55 7.80417 13.0208 7.4125 13.4125C7.02083 13.8042 6.55 14 6 14ZM12 14C11.45 14 10.9792 13.8042 10.5875 13.4125C10.1958 13.0208 10 12.55 10 12C10 11.45 10.1958 10.9792 10.5875 10.5875C10.9792 10.1958 11.45 10 12 10C12.55 10 13.0208 10.1958 13.4125 10.5875C13.8042 10.9792 14 11.45 14 12C14 12.55 13.8042 13.0208 13.4125 13.4125C13.0208 13.8042 12.55 14 12 14ZM18 14C17.45 14 16.9792 13.8042 16.5875 13.4125C16.1958 13.0208 16 12.55 16 12C16 11.45 16.1958 10.9792 16.5875 10.5875C16.9792 10.1958 17.45 10 18 10C18.55 10 19.0208 10.1958 19.4125 10.5875C19.8042 10.9792 20 11.45 20 12C20 12.55 19.8042 13.0208 19.4125 13.4125C19.0208 13.8042 18.55 14 18 14Z" fill="#4B4D52" />
694
+ </svg>
695
+ }
696
+ size="small"
697
+ className="bg-primary-reverse p-0"
698
+ style={{
699
+ height: 32,
700
+ width: 32
701
+ }}
702
+ onClick={(e) =>
703
+ // @ts-ignore
704
+ op.current.toggle(e)
705
+ }
706
+ />
707
+ <OverlayPanel ref={op} className="solid-custom-overlay">
708
+ <div className="flex flex-column gap-1 p-1">
709
+ <Button
710
+ text
711
+ type="button"
712
+ className="w-8rem text-left gap-2 text-color"
713
+ label="Duplicate"
714
+ size="small"
715
+ iconPos="left"
716
+ icon={<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
717
+ <path d="M6 11.9997C5.63333 11.9997 5.31944 11.8691 5.05833 11.608C4.79722 11.3469 4.66667 11.033 4.66667 10.6663V2.66634C4.66667 2.29967 4.79722 1.98579 5.05833 1.72467C5.31944 1.46356 5.63333 1.33301 6 1.33301H12C12.3667 1.33301 12.6806 1.46356 12.9417 1.72467C13.2028 1.98579 13.3333 2.29967 13.3333 2.66634V10.6663C13.3333 11.033 13.2028 11.3469 12.9417 11.608C12.6806 11.8691 12.3667 11.9997 12 11.9997H6ZM6 10.6663H12V2.66634H6V10.6663ZM3.33333 14.6663C2.96667 14.6663 2.65278 14.5358 2.39167 14.2747C2.13056 14.0136 2 13.6997 2 13.333V3.99967H3.33333V13.333H10.6667V14.6663H3.33333Z" fill="black" fill-opacity="0.88" />
718
+ </svg>}
719
+ />
720
+ <Button
721
+ text
722
+ type="button"
723
+ className="w-8rem text-left gap-2 text-color"
724
+ label="Delete"
725
+ size="small"
726
+ iconPos="left"
727
+ icon={<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
728
+ <path d="M4.66666 14C4.29999 14 3.9861 13.8694 3.72499 13.6083C3.46388 13.3472 3.33332 13.0333 3.33332 12.6667V4H2.66666V2.66667H5.99999V2H9.99999V2.66667H13.3333V4H12.6667V12.6667C12.6667 13.0333 12.5361 13.3472 12.275 13.6083C12.0139 13.8694 11.7 14 11.3333 14H4.66666ZM11.3333 4H4.66666V12.6667H11.3333V4ZM5.99999 11.3333H7.33332V5.33333H5.99999V11.3333ZM8.66666 11.3333H9.99999V5.33333H8.66666V11.3333Z" fill="#4B4D52" />
729
+ </svg>
730
+ }
731
+ onClick={() => setDeleteDialogVisible(true)}
732
+ />
733
+ </div>
734
+ </OverlayPanel>
735
+ </div>
736
+ )
737
+ }
738
+
681
739
  return (
682
740
  <div className="solid-form-wrapper">
683
741
  <Toast ref={toast} />
@@ -830,13 +888,16 @@ const SolidFormView = (params: SolidFormViewProps) => {
830
888
  {params.embeded !== true &&
831
889
  <SolidCancelButton />
832
890
  }
891
+ {formActionDropdown()}
833
892
  </div>
834
893
  </>
835
894
  )}
836
895
  </div>
837
- <div className="solid-form-stepper">
838
- <SolidFormStepper />
839
- </div>
896
+ {params.embeded !== true &&
897
+ <div className="solid-form-stepper">
898
+ <SolidFormStepper />
899
+ </div>
900
+ }
840
901
  <div className="p-4 solid-form-content">
841
902
  {renderFormDynamically(formViewMetaData)}
842
903
  </div>
@@ -99,7 +99,7 @@ export class SolidMediaMultipleField implements ISolidField {
99
99
  const [imageToBeDeletedData, setImageToBeDeletedData] = useState<any>();
100
100
  const [uploadProgress, setUploadProgress] = useState<Record<string, number>>({});
101
101
  const [uploadCompleted, setUploadCompleted] = useState<Record<string, boolean>>({});
102
- const [fileDetails, setFileDetails] = useState<{ name: string; type: string; size: number }[]>([]);
102
+ const [fileDetails, setFileDetails] = useState<{ name: string; type: string; size: number, id: number }[]>([]);
103
103
  const [uploadedSize, setUploadedSize] = useState<Record<string, string>>({});
104
104
  const [totalSize, setTotalSize] = useState<Record<string, string>>({});
105
105
  const [selectedFileId, setSelectedFileId] = useState<string | null>(null);
@@ -118,7 +118,7 @@ export class SolidMediaMultipleField implements ISolidField {
118
118
  const fieldValue = formik?.values[fieldLayoutInfo.attrs.name];
119
119
  if (Array.isArray(fieldValue) && fieldValue.length > 0) {
120
120
  const urls: string[] = [];
121
- const details: { name: string; type: string; size: number }[] = [];
121
+ const details: { name: string; type: string; size: number, id: any }[] = [];
122
122
  const progress: Record<string, number> = {};
123
123
  const completed: Record<string, boolean> = {};
124
124
 
@@ -126,13 +126,14 @@ export class SolidMediaMultipleField implements ISolidField {
126
126
  if (file instanceof File) {
127
127
  // New file (from local upload)
128
128
  urls.push(URL.createObjectURL(file));
129
- details.push({ name: file.name, type: file.type, size: file.size });
129
+ details.push({ name: file.name, type: file.type, size: file.size, id: `${file.name}-${file.size}`, });
130
130
  } else if (typeof file === "object" && file._full_url) {
131
131
  urls.push(file._full_url);
132
132
  details.push({
133
133
  name: file.relativeUri || "Unknown", // Use relativeUri or fallback
134
134
  type: file.mediaStorageProviderMetadata?.type || "Unknown", // Extract type if available
135
135
  size: 0, // API doesn't provide size, set 0 or fetch from metadata if available
136
+ id: file.id
136
137
  });
137
138
  }
138
139
  });
@@ -147,7 +148,7 @@ export class SolidMediaMultipleField implements ISolidField {
147
148
  }
148
149
  }, [formik.values, fieldLayoutInfo.attrs.name]);
149
150
 
150
- const handleDropImages = (acceptedFiles: File[]) => {
151
+ const handleDropImages = (acceptedFiles: any[]) => {
151
152
  if (!acceptedFiles.length) return;
152
153
 
153
154
  const newFileDetails = [...fileDetails];
@@ -159,7 +160,7 @@ export class SolidMediaMultipleField implements ISolidField {
159
160
  acceptedFiles.forEach((file) => {
160
161
  const fileId = `${file.name}-${file.size}`; // Unique identifier for tracking each file
161
162
 
162
- newFileDetails.push({ name: file.name, type: file.type, size: file.size });
163
+ newFileDetails.push({ name: file.name, type: file.type, size: file.size, id: file.id });
163
164
  newUploadProgress[fileId] = 0;
164
165
  newUploadedSize[fileId] = "0 KB";
165
166
  newTotalSize[fileId] = formatFileSize(file.size);
@@ -224,18 +225,22 @@ export class SolidMediaMultipleField implements ISolidField {
224
225
  formik.setFieldValue(fieldLayoutInfo.attrs.name, fileDetails.filter((file) => `${file.name}-${file.size}` !== fileId));
225
226
  };
226
227
 
227
- const confirmDeleteFile = (fileId: any) => {
228
+ const confirmDeleteFile = (fileId: any, deleteId: number) => {
228
229
  setSelectedFileId(fileId);
229
230
  setDeleteImageDialogVisible(true);
231
+ setImageToBeDeletedData(deleteId)
230
232
  };
231
233
 
232
234
  const deleteFile = () => {
233
- if (selectedFileId) {
235
+ if (selectedFileId && imageToBeDeletedData) {
234
236
  handleCancelUpload(selectedFileId);
237
+ deleteMedia(imageToBeDeletedData);
235
238
  setDeleteImageDialogVisible(false);
239
+ setShowAllFiles(false)
236
240
  setSelectedFileId(null);
237
241
  }
238
242
  };
243
+
239
244
  const {
240
245
  getRootProps,
241
246
  getInputProps,
@@ -290,7 +295,7 @@ export class SolidMediaMultipleField implements ISolidField {
290
295
  <div className="font-bold">{fileDetails[0].name}</div>
291
296
  <div
292
297
  className="cancel-upload-button"
293
- onClick={() => confirmDeleteFile(`${fileDetails[0].name}-${fileDetails[0].size}`)}
298
+ onClick={() => confirmDeleteFile(`${fileDetails[0].name}-${fileDetails[0].size}`, fileDetails[0].id)}
294
299
  >
295
300
  <svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" viewBox="0 0 6 6" fill="none">
296
301
  <path d="M0.6 6L0 5.4L2.4 3L0 0.6L0.6 0L3 2.4L5.4 0L6 0.6L3.6 3L6 5.4L5.4 6L3 3.6L0.6 6Z" fill="#4B4D52" />
@@ -355,7 +360,7 @@ export class SolidMediaMultipleField implements ISolidField {
355
360
  <div className="font-bold">{file.name}</div>
356
361
  <div
357
362
  className="cancel-upload-button"
358
- onClick={() => confirmDeleteFile(fileId)}
363
+ onClick={() => confirmDeleteFile(fileId, file?.id)}
359
364
  >
360
365
  <svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" viewBox="0 0 6 6" fill="none">
361
366
  <path d="M0.6 6L0 5.4L2.4 3L0 0.6L0.6 0L3 2.4L5.4 0L6 0.6L3.6 3L6 5.4L5.4 6L3 3.6L0.6 6Z" fill="#4B4D52" />
@@ -115,8 +115,8 @@ export class SolidMediaSingleField implements ISolidField {
115
115
  };
116
116
  const handleCancelUpload = (e: React.MouseEvent) => {
117
117
  e.stopPropagation();
118
- if (imageToBeDeletedData?.imagesPreview.id) {
119
- deleteMedia(imageToBeDeletedData.imagesPreview.id);
118
+ if (imageToBeDeletedData) {
119
+ deleteMedia(imageToBeDeletedData);
120
120
  }
121
121
  e.stopPropagation();
122
122
  setUploadProgress(0);
@@ -191,7 +191,7 @@ export class SolidMediaSingleField implements ISolidField {
191
191
  // Set upload progress
192
192
  setUploadProgress(100);
193
193
  setUploadCompleted(true);
194
-
194
+ setImageToBeDeletedData(fieldValue.id)
195
195
  // Ensure Formik has the existing file URL
196
196
  formik.setFieldValue(fieldLayoutInfo.attrs.name, fieldValue);
197
197
  }
@@ -289,7 +289,7 @@ export class SolidRelationManyToManyField implements ISolidField {
289
289
  renderAutoCompleteMode(formik: FormikObject, visibleCreateRelationEntity: any, setvisibleCreateRelationEntity: any) {
290
290
  const fieldMetadata = this.fieldContext.fieldMetadata;
291
291
  const fieldLayoutInfo = this.fieldContext.field;
292
- const className = fieldLayoutInfo.attrs?.className || 'field col-6 flex flex-column gap-2 mt-4';
292
+ const className = fieldLayoutInfo.attrs?.className || 'field col-12';
293
293
  const fieldLabel = fieldLayoutInfo.attrs.label ?? fieldMetadata.displayName;
294
294
 
295
295
  // auto complete specific code.
@@ -358,27 +358,29 @@ export class SolidRelationManyToManyField implements ISolidField {
358
358
 
359
359
  return (
360
360
  <div className={className}>
361
- <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
362
-
363
- </label>
364
- <div className="flex align-items-center gap-3">
365
- <AutoComplete
366
- readOnly={readOnly}
367
- disabled={disabled}
368
- multiple
369
- {...formik.getFieldProps(fieldLayoutInfo.attrs.name)}
370
- id={fieldLayoutInfo.attrs.name}
371
- field="label"
372
- value={formik.values[fieldLayoutInfo.attrs.name] || ''}
373
- dropdown
374
- suggestions={autoCompleteItems}
375
- completeMethod={autoCompleteSearch}
376
- onChange={formik.handleChange}
377
- className="solid-standard-autocomplete w-full"
378
- />
379
- {fieldLayoutInfo.attrs.inlineCreate === "true" &&
380
- this.renderSolidFormEmbededView(formik, customCreateHandler, visibleCreateRelationEntity, setvisibleCreateRelationEntity)
381
- }
361
+ <div className="flex flex-column gap-2 mt-4">
362
+ <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
363
+
364
+ </label>
365
+ <div className="flex align-items-center gap-3">
366
+ <AutoComplete
367
+ readOnly={readOnly}
368
+ disabled={disabled}
369
+ multiple
370
+ {...formik.getFieldProps(fieldLayoutInfo.attrs.name)}
371
+ id={fieldLayoutInfo.attrs.name}
372
+ field="label"
373
+ value={formik.values[fieldLayoutInfo.attrs.name] || ''}
374
+ dropdown
375
+ suggestions={autoCompleteItems}
376
+ completeMethod={autoCompleteSearch}
377
+ onChange={formik.handleChange}
378
+ className="solid-standard-autocomplete w-full"
379
+ />
380
+ {fieldLayoutInfo.attrs.inlineCreate === "true" &&
381
+ this.renderSolidFormEmbededView(formik, customCreateHandler, visibleCreateRelationEntity, setvisibleCreateRelationEntity)
382
+ }
383
+ </div>
382
384
  </div>
383
385
  </div>
384
386
  );
@@ -388,7 +390,7 @@ export class SolidRelationManyToManyField implements ISolidField {
388
390
 
389
391
  const fieldMetadata = this.fieldContext.fieldMetadata;
390
392
  const fieldLayoutInfo = this.fieldContext.field;
391
- const className = fieldLayoutInfo.attrs?.className || 'field col-6 flex flex-column gap-2 mt-4';
393
+ const className = fieldLayoutInfo.attrs?.className || 'field col-12';
392
394
  const fieldLabel = fieldLayoutInfo.attrs.label ?? fieldMetadata.displayName;
393
395
 
394
396
  const params = {
@@ -122,7 +122,7 @@ export class SolidRelationManyToOneField implements ISolidField {
122
122
  suggestions={autoCompleteItems}
123
123
  completeMethod={autoCompleteSearch}
124
124
  onChange={formik.handleChange}
125
- className="solid-standard-autocomplete"
125
+ className="w-full solid-standard-autocomplete"
126
126
  />
127
127
  </div>
128
128
  {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
@@ -237,7 +237,7 @@ export const SolidKanbanView = (params: SolidKanbanViewParams) => {
237
237
  groupFilter: {
238
238
  limit: kanbanViewMetaData?.data?.solidView?.layout?.attrs?.recordsCount,
239
239
  offset: 0,
240
- filters:filters
240
+ filters: filters
241
241
  }
242
242
  // sort: [`id:desc`],
243
243
  };
@@ -258,7 +258,7 @@ export const SolidKanbanView = (params: SolidKanbanViewParams) => {
258
258
 
259
259
  // clear Filter
260
260
 
261
- const clearFilter = async() => {
261
+ const clearFilter = async () => {
262
262
  if (solidKanbanViewMetaData) {
263
263
  // initialFilterMethod()
264
264
  }
@@ -553,7 +553,7 @@ export const SolidKanbanView = (params: SolidKanbanViewParams) => {
553
553
 
554
554
 
555
555
  return (
556
- <>
556
+ <div className="page-parent-wrapper">
557
557
  <div className="flex gap-3 mb-4 align-items-center justify-content-between kanban-view">
558
558
  <div className="flex gap-3 mb-4 align-items-center" >
559
559
 
@@ -610,7 +610,7 @@ export const SolidKanbanView = (params: SolidKanbanViewParams) => {
610
610
  >
611
611
  <p>Are you sure you want to delete the selected records?</p>
612
612
  </Dialog>
613
- </>
613
+ </div>
614
614
  );
615
615
  };
616
616
 
@@ -450,7 +450,6 @@ export const SolidListView = (params: SolidListViewParams) => {
450
450
  const op = useRef(null)
451
451
  const [deleteEntity, setDeleteEntity] = useState(false);
452
452
 
453
-
454
453
  // clickable link allowing one to open the detail / form view.
455
454
  const detailsBodyTemplate = (solidViewData: any) => {
456
455
  return (
@@ -472,62 +471,6 @@ export const SolidListView = (params: SolidListViewParams) => {
472
471
  <path d="M4 14C4 14.55 3.80417 15.0208 3.4125 15.4125C3.02083 15.8042 2.55 16 2 16C1.45 16 0.979167 15.8042 0.5875 15.4125C0.195833 15.0208 0 14.55 0 14C0 13.45 0.195833 12.9792 0.5875 12.5875C0.979167 12.1958 1.45 12 2 12C2.55 12 3.02083 12.1958 3.4125 12.5875C3.80417 12.9792 4 13.45 4 14ZM4 8C4 8.55 3.80417 9.02083 3.4125 9.4125C3.02083 9.80417 2.55 10 2 10C1.45 10 0.979167 9.80417 0.5875 9.4125C0.195833 9.02083 0 8.55 0 8C0 7.45 0.195833 6.97917 0.5875 6.5875C0.979167 6.19583 1.45 6 2 6C2.55 6 3.02083 6.19583 3.4125 6.5875C3.80417 6.97917 4 7.45 4 8ZM4 2C4 2.55 3.80417 3.02083 3.4125 3.4125C3.02083 3.80417 2.55 4 2 4C1.45 4 0.979167 3.80417 0.5875 3.4125C0.195833 3.02083 0 2.55 0 2C0 1.45 0.195833 0.979166 0.5875 0.5875C0.979167 0.195833 1.45 0 2 0C2.55 0 3.02083 0.195833 3.4125 0.5875C3.80417 0.979166 4 1.45 4 2Z" fill="#666666" />
473
472
  </svg>
474
473
  </Button>
475
- <OverlayPanel ref={op} className="solid-custom-overlay" style={{ top: 10 }}>
476
- <div className="flex flex-column gap-1 p-1">
477
- <Button
478
- className="w-8rem text-left gap-2"
479
- label="Edit"
480
- size="small"
481
- iconPos="left"
482
- icon={<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
483
- <path d="M3.33333 12.6667H4.28333L10.8 6.15L9.85 5.2L3.33333 11.7167V12.6667ZM2 14V11.1667L10.8 2.38333C10.9333 2.26111 11.0806 2.16667 11.2417 2.1C11.4028 2.03333 11.5722 2 11.75 2C11.9278 2 12.1 2.03333 12.2667 2.1C12.4333 2.16667 12.5778 2.26667 12.7 2.4L13.6167 3.33333C13.75 3.45556 13.8472 3.6 13.9083 3.76667C13.9694 3.93333 14 4.1 14 4.26667C14 4.44444 13.9694 4.61389 13.9083 4.775C13.8472 4.93611 13.75 5.08333 13.6167 5.21667L4.83333 14H2ZM10.3167 5.68333L9.85 5.2L10.8 6.15L10.3167 5.68333Z" fill="#F9F0FF" />
484
- </svg>}
485
- onClick={() => {
486
- console.log("solidViewData.id", solidViewData.id);
487
-
488
- if (params.embeded == true) {
489
- params.handlePopUpOpen(solidsolidViewDataId);
490
- } else {
491
- router.push(`${editButtonUrl}/${solidsolidViewDataId}`)
492
- }
493
- }}
494
- />
495
- <Button
496
- text
497
- className="w-8rem text-left gap-2"
498
- label="Delete"
499
- size="small"
500
- iconPos="left"
501
- severity="secondary"
502
- icon={<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
503
- <path d="M4.66666 14C4.29999 14 3.9861 13.8694 3.72499 13.6083C3.46388 13.3472 3.33332 13.0333 3.33332 12.6667V4H2.66666V2.66667H5.99999V2H9.99999V2.66667H13.3333V4H12.6667V12.6667C12.6667 13.0333 12.5361 13.3472 12.275 13.6083C12.0139 13.8694 11.7 14 11.3333 14H4.66666ZM11.3333 4H4.66666V12.6667H11.3333V4ZM5.99999 11.3333H7.33332V5.33333H5.99999V11.3333ZM8.66666 11.3333H9.99999V5.33333H8.66666V11.3333Z" fill="#4B4D52" />
504
- </svg>}
505
- onClick={() => setDeleteEntity(true)}
506
- />
507
- {solidListViewMetaData?.data?.solidView?.layout?.attrs?.rowButtons &&
508
- solidListViewMetaData?.data?.solidView?.layout?.attrs?.rowButtons.map((rowAction: any) => {
509
- return (
510
- <Button
511
- text
512
- size="small"
513
- icon={rowAction?.attrs?.className ? rowAction?.attrs?.className : "pi pi-pencil"}
514
- onClick={() => {
515
- setListRowActionData({
516
- modelName: params.modelName,
517
- moduleName: params.moduleName,
518
- rowAction: rowAction,
519
- rowData: solidViewData,
520
- closeListViewRowActionPopup: closeListViewRowActionPopup
521
-
522
- });
523
- setListViewRowActionPopupState(true)
524
- }
525
- }
526
- />
527
- );
528
- })}
529
- </div>
530
- </OverlayPanel>
531
474
  </div>
532
475
  // <a onClick={() => {
533
476
  // if (params.embeded == true) {
@@ -673,7 +616,7 @@ export const SolidListView = (params: SolidListViewParams) => {
673
616
  const [view, setView] = useState<string | any>(viewModes[0].value);
674
617
 
675
618
  return (
676
- <>
619
+ <div className="page-parent-wrapper">
677
620
  <div className="page-header">
678
621
  <Toast ref={toast} />
679
622
  <div className="flex gap-3 align-items-center">
@@ -898,12 +841,12 @@ export const SolidListView = (params: SolidListViewParams) => {
898
841
  </p>
899
842
  <p className="" style={{ color: 'var{--solid-grey-500}' }}>{selectedSolidViewData?.singularName}</p>
900
843
  <div className="flex align-items-center gap-2 mt-3">
901
- <Button label="Delete" size="small" onClick={() => { deleteSolidSingleEntiry(solidsolidViewDataId); setDeleteEntity(false); }} />
902
- <Button label="Cancel" size="small" onClick={() => setDeleteEntity(false)} outlined />
844
+ <Button label="Delete" size="small" onClick={() => { deleteSolidSingleEntiry(selectedSolidViewData?.id); setDeleteEntity(false); }} />
845
+ <Button label="Cancel" size="small" onClick={() => setDeleteEntity(false)} outlined className='bg-primary-reverse' />
903
846
  </div>
904
847
  </div>
905
848
  </Dialog>
906
- </>
849
+ </div>
907
850
  );
908
851
  };
909
852
 
@@ -17,6 +17,7 @@ import { BackButton } from "@/components/common/BackButton";
17
17
  import { SolidFormStepper } from "@/components/common/SolidFormStepper";
18
18
  import { Dialog } from "primereact/dialog";
19
19
  import { Divider } from "primereact/divider";
20
+ import { OverlayPanel } from "primereact/overlaypanel";
20
21
 
21
22
  interface ErrorResponseData {
22
23
  message: string;
@@ -303,6 +304,62 @@ const CreateModel = ({ data, params }: any) => {
303
304
  }
304
305
 
305
306
  }, [isCreateModelError, isDeleteModelError, isUpdateModelError])
307
+ const op = useRef(null);
308
+
309
+ const formActionDropdown = () => {
310
+ return (
311
+ <div>
312
+ <Button
313
+ outlined
314
+ severity="secondary"
315
+ type="button"
316
+ icon={
317
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
318
+ <path d="M6 14C5.45 14 4.97917 13.8042 4.5875 13.4125C4.19583 13.0208 4 12.55 4 12C4 11.45 4.19583 10.9792 4.5875 10.5875C4.97917 10.1958 5.45 10 6 10C6.55 10 7.02083 10.1958 7.4125 10.5875C7.80417 10.9792 8 11.45 8 12C8 12.55 7.80417 13.0208 7.4125 13.4125C7.02083 13.8042 6.55 14 6 14ZM12 14C11.45 14 10.9792 13.8042 10.5875 13.4125C10.1958 13.0208 10 12.55 10 12C10 11.45 10.1958 10.9792 10.5875 10.5875C10.9792 10.1958 11.45 10 12 10C12.55 10 13.0208 10.1958 13.4125 10.5875C13.8042 10.9792 14 11.45 14 12C14 12.55 13.8042 13.0208 13.4125 13.4125C13.0208 13.8042 12.55 14 12 14ZM18 14C17.45 14 16.9792 13.8042 16.5875 13.4125C16.1958 13.0208 16 12.55 16 12C16 11.45 16.1958 10.9792 16.5875 10.5875C16.9792 10.1958 17.45 10 18 10C18.55 10 19.0208 10.1958 19.4125 10.5875C19.8042 10.9792 20 11.45 20 12C20 12.55 19.8042 13.0208 19.4125 13.4125C19.0208 13.8042 18.55 14 18 14Z" fill="#4B4D52" />
319
+ </svg>
320
+ }
321
+ size="small"
322
+ className="bg-primary-reverse p-0"
323
+ style={{
324
+ height: 32,
325
+ width: 32
326
+ }}
327
+ onClick={(e) =>
328
+ // @ts-ignore
329
+ op.current.toggle(e)
330
+ }
331
+ />
332
+ <OverlayPanel ref={op} className="solid-custom-overlay">
333
+ <div className="flex flex-column gap-1 p-1">
334
+ <Button
335
+ text
336
+ type="button"
337
+ className="w-8rem text-left gap-2 text-color"
338
+ label="Duplicate"
339
+ size="small"
340
+ iconPos="left"
341
+ icon={<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
342
+ <path d="M6 11.9997C5.63333 11.9997 5.31944 11.8691 5.05833 11.608C4.79722 11.3469 4.66667 11.033 4.66667 10.6663V2.66634C4.66667 2.29967 4.79722 1.98579 5.05833 1.72467C5.31944 1.46356 5.63333 1.33301 6 1.33301H12C12.3667 1.33301 12.6806 1.46356 12.9417 1.72467C13.2028 1.98579 13.3333 2.29967 13.3333 2.66634V10.6663C13.3333 11.033 13.2028 11.3469 12.9417 11.608C12.6806 11.8691 12.3667 11.9997 12 11.9997H6ZM6 10.6663H12V2.66634H6V10.6663ZM3.33333 14.6663C2.96667 14.6663 2.65278 14.5358 2.39167 14.2747C2.13056 14.0136 2 13.6997 2 13.333V3.99967H3.33333V13.333H10.6667V14.6663H3.33333Z" fill="black" fill-opacity="0.88" />
343
+ </svg>}
344
+ />
345
+ <Button
346
+ text
347
+ type="button"
348
+ className="w-8rem text-left gap-2 text-color"
349
+ label="Delete"
350
+ size="small"
351
+ iconPos="left"
352
+ icon={<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
353
+ <path d="M4.66666 14C4.29999 14 3.9861 13.8694 3.72499 13.6083C3.46388 13.3472 3.33332 13.0333 3.33332 12.6667V4H2.66666V2.66667H5.99999V2H9.99999V2.66667H13.3333V4H12.6667V12.6667C12.6667 13.0333 12.5361 13.3472 12.275 13.6083C12.0139 13.8694 11.7 14 11.3333 14H4.66666ZM11.3333 4H4.66666V12.6667H11.3333V4ZM5.99999 11.3333H7.33332V5.33333H5.99999V11.3333ZM8.66666 11.3333H9.99999V5.33333H8.66666V11.3333Z" fill="#4B4D52" />
354
+ </svg>
355
+ }
356
+ onClick={() => setDeleteEntity(true)}
357
+ />
358
+ </div>
359
+ </OverlayPanel>
360
+ </div>
361
+ )
362
+ }
306
363
 
307
364
  return (
308
365
  <div className="solid-form-wrapper">
@@ -338,6 +395,7 @@ const CreateModel = ({ data, params }: any) => {
338
395
  </>
339
396
  }
340
397
  <CancelButton />
398
+ {formActionDropdown()}
341
399
  </div>
342
400
  </>
343
401
  }
@@ -124,6 +124,7 @@ const FieldMetaData = ({ modelMetaData, fieldMetaData, setFieldMetaData, deleteM
124
124
  header=""
125
125
  visible={visiblePopup}
126
126
  style={{ width: "40vw" }}
127
+ className="solid-dialog"
127
128
  onHide={() => {
128
129
  if (!visiblePopup) return;
129
130
 
@@ -149,6 +150,7 @@ const FieldMetaData = ({ modelMetaData, fieldMetaData, setFieldMetaData, deleteM
149
150
  </div>
150
151
  )}
151
152
  onHide={() => setIsRequiredPopUp(false)}
153
+ className="solid-dialog"
152
154
  >
153
155
  <p>If there is data against this model this operation might not work and manual intervention will be required</p>
154
156
  </Dialog>