@solidstarters/solid-core-ui 1.1.5 → 1.1.7

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/components/auth/SolidChangeForcePassword.d.ts.map +1 -1
  2. package/dist/components/auth/SolidChangeForcePassword.js +7 -7
  3. package/dist/components/auth/SolidChangeForcePassword.js.map +1 -1
  4. package/dist/components/auth/SolidForgotPassword.d.ts.map +1 -1
  5. package/dist/components/auth/SolidForgotPassword.js +9 -4
  6. package/dist/components/auth/SolidForgotPassword.js.map +1 -1
  7. package/dist/components/auth/SolidLogin.d.ts.map +1 -1
  8. package/dist/components/auth/SolidLogin.js +14 -7
  9. package/dist/components/auth/SolidLogin.js.map +1 -1
  10. package/dist/components/common/BackButton.d.ts +2 -0
  11. package/dist/components/common/BackButton.d.ts.map +1 -0
  12. package/dist/components/common/BackButton.js +17 -0
  13. package/dist/components/common/BackButton.js.map +1 -0
  14. package/dist/components/common/CancelButton.js +2 -2
  15. package/dist/components/common/CancelButton.js.map +1 -1
  16. package/dist/components/common/DropzonePlaceholder.d.ts.map +1 -1
  17. package/dist/components/common/DropzonePlaceholder.js +2 -1
  18. package/dist/components/common/DropzonePlaceholder.js.map +1 -1
  19. package/dist/components/common/FileReaderExt.d.ts +4 -0
  20. package/dist/components/common/FileReaderExt.d.ts.map +1 -0
  21. package/dist/components/common/FileReaderExt.js +15 -0
  22. package/dist/components/common/FileReaderExt.js.map +1 -0
  23. package/dist/components/common/GeneralSettings.d.ts +4 -0
  24. package/dist/components/common/GeneralSettings.d.ts.map +1 -0
  25. package/dist/components/common/GeneralSettings.js +139 -0
  26. package/dist/components/common/GeneralSettings.js.map +1 -0
  27. package/dist/components/common/SingleSelectAutoCompleteField.d.ts.map +1 -1
  28. package/dist/components/common/SingleSelectAutoCompleteField.js +1 -1
  29. package/dist/components/common/SingleSelectAutoCompleteField.js.map +1 -1
  30. package/dist/components/common/SocialMediaLogin.js +1 -1
  31. package/dist/components/common/SocialMediaLogin.js.map +1 -1
  32. package/dist/components/common/SolidFormStepper.d.ts +2 -0
  33. package/dist/components/common/SolidFormStepper.d.ts.map +1 -0
  34. package/dist/components/common/SolidFormStepper.js +6 -0
  35. package/dist/components/common/SolidFormStepper.js.map +1 -0
  36. package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
  37. package/dist/components/core/form/SolidFormView.js +83 -54
  38. package/dist/components/core/form/SolidFormView.js.map +1 -1
  39. package/dist/components/core/form/fields/SolidBooleanField.d.ts.map +1 -1
  40. package/dist/components/core/form/fields/SolidBooleanField.js +4 -4
  41. package/dist/components/core/form/fields/SolidBooleanField.js.map +1 -1
  42. package/dist/components/core/form/fields/SolidDateField.d.ts.map +1 -1
  43. package/dist/components/core/form/fields/SolidDateField.js +7 -7
  44. package/dist/components/core/form/fields/SolidDateField.js.map +1 -1
  45. package/dist/components/core/form/fields/SolidDateTimeField.d.ts.map +1 -1
  46. package/dist/components/core/form/fields/SolidDateTimeField.js +7 -7
  47. package/dist/components/core/form/fields/SolidDateTimeField.js.map +1 -1
  48. package/dist/components/core/form/fields/SolidDecimalField.d.ts.map +1 -1
  49. package/dist/components/core/form/fields/SolidDecimalField.js +4 -4
  50. package/dist/components/core/form/fields/SolidDecimalField.js.map +1 -1
  51. package/dist/components/core/form/fields/SolidIntegerField.d.ts.map +1 -1
  52. package/dist/components/core/form/fields/SolidIntegerField.js +4 -4
  53. package/dist/components/core/form/fields/SolidIntegerField.js.map +1 -1
  54. package/dist/components/core/form/fields/SolidJsonField.d.ts.map +1 -1
  55. package/dist/components/core/form/fields/SolidJsonField.js +2 -2
  56. package/dist/components/core/form/fields/SolidJsonField.js.map +1 -1
  57. package/dist/components/core/form/fields/SolidLongTextField.d.ts.map +1 -1
  58. package/dist/components/core/form/fields/SolidLongTextField.js +2 -2
  59. package/dist/components/core/form/fields/SolidLongTextField.js.map +1 -1
  60. package/dist/components/core/form/fields/SolidMediaMultipleField.d.ts.map +1 -1
  61. package/dist/components/core/form/fields/SolidMediaMultipleField.js +11 -11
  62. package/dist/components/core/form/fields/SolidMediaMultipleField.js.map +1 -1
  63. package/dist/components/core/form/fields/SolidMediaSingleField.d.ts.map +1 -1
  64. package/dist/components/core/form/fields/SolidMediaSingleField.js +13 -13
  65. package/dist/components/core/form/fields/SolidMediaSingleField.js.map +1 -1
  66. package/dist/components/core/form/fields/SolidRichTextField.d.ts.map +1 -1
  67. package/dist/components/core/form/fields/SolidRichTextField.js +2 -2
  68. package/dist/components/core/form/fields/SolidRichTextField.js.map +1 -1
  69. package/dist/components/core/form/fields/SolidSelectionDynamicField.d.ts.map +1 -1
  70. package/dist/components/core/form/fields/SolidSelectionDynamicField.js +4 -4
  71. package/dist/components/core/form/fields/SolidSelectionDynamicField.js.map +1 -1
  72. package/dist/components/core/form/fields/SolidSelectionStaticField.d.ts.map +1 -1
  73. package/dist/components/core/form/fields/SolidSelectionStaticField.js +4 -4
  74. package/dist/components/core/form/fields/SolidSelectionStaticField.js.map +1 -1
  75. package/dist/components/core/form/fields/SolidShortTextField.d.ts.map +1 -1
  76. package/dist/components/core/form/fields/SolidShortTextField.js +2 -2
  77. package/dist/components/core/form/fields/SolidShortTextField.js.map +1 -1
  78. package/dist/components/core/form/fields/SolidTimeField.d.ts.map +1 -1
  79. package/dist/components/core/form/fields/SolidTimeField.js +7 -7
  80. package/dist/components/core/form/fields/SolidTimeField.js.map +1 -1
  81. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts.map +1 -1
  82. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js +15 -14
  83. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js.map +1 -1
  84. package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.d.ts.map +1 -1
  85. package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js +2 -2
  86. package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js.map +1 -1
  87. package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js +2 -2
  88. package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js.map +1 -1
  89. package/dist/components/core/model/CreateModel.d.ts.map +1 -1
  90. package/dist/components/core/model/CreateModel.js +15 -11
  91. package/dist/components/core/model/CreateModel.js.map +1 -1
  92. package/dist/components/core/model/FieldMetaData.d.ts.map +1 -1
  93. package/dist/components/core/model/FieldMetaData.js +6 -6
  94. package/dist/components/core/model/FieldMetaData.js.map +1 -1
  95. package/dist/components/core/model/FieldMetaDataForm.d.ts.map +1 -1
  96. package/dist/components/core/model/FieldMetaDataForm.js +167 -152
  97. package/dist/components/core/model/FieldMetaDataForm.js.map +1 -1
  98. package/dist/components/core/model/FieldSelector.d.ts.map +1 -1
  99. package/dist/components/core/model/FieldSelector.js +1 -1
  100. package/dist/components/core/model/FieldSelector.js.map +1 -1
  101. package/dist/components/core/model/ModelMetaData.d.ts.map +1 -1
  102. package/dist/components/core/model/ModelMetaData.js +46 -42
  103. package/dist/components/core/model/ModelMetaData.js.map +1 -1
  104. package/dist/components/core/module/CreateModule.d.ts.map +1 -1
  105. package/dist/components/core/module/CreateModule.js +98 -60
  106. package/dist/components/core/module/CreateModule.js.map +1 -1
  107. package/dist/components/core/users/CreateUser.d.ts.map +1 -1
  108. package/dist/components/core/users/CreateUser.js +18 -15
  109. package/dist/components/core/users/CreateUser.js.map +1 -1
  110. package/dist/index.d.ts +5 -0
  111. package/dist/index.d.ts.map +1 -1
  112. package/dist/index.js +5 -0
  113. package/dist/index.js.map +1 -1
  114. package/dist/redux/api/solidSettingsApi.d.ts +9 -0
  115. package/dist/redux/api/solidSettingsApi.d.ts.map +1 -0
  116. package/dist/redux/api/solidSettingsApi.js +40 -0
  117. package/dist/redux/api/solidSettingsApi.js.map +1 -0
  118. package/package.json +1 -1
  119. package/src/components/auth/SolidChangeForcePassword.tsx +2 -3
  120. package/src/components/auth/SolidForgotPassword.tsx +9 -4
  121. package/src/components/auth/SolidLogin.tsx +22 -13
  122. package/src/components/common/BackButton.tsx +27 -0
  123. package/src/components/common/CancelButton.tsx +2 -2
  124. package/src/components/common/DropzonePlaceholder.tsx +11 -3
  125. package/src/components/common/FileReaderExt.tsx +18 -0
  126. package/src/components/common/GeneralSettings.tsx +286 -0
  127. package/src/components/common/SingleSelectAutoCompleteField.tsx +0 -1
  128. package/src/components/common/SocialMediaLogin.tsx +1 -1
  129. package/src/components/common/SolidFormStepper.tsx +12 -0
  130. package/src/components/core/form/SolidFormView.tsx +201 -186
  131. package/src/components/core/form/fields/SolidBooleanField.tsx +3 -7
  132. package/src/components/core/form/fields/SolidDateField.tsx +2 -8
  133. package/src/components/core/form/fields/SolidDateTimeField.tsx +19 -24
  134. package/src/components/core/form/fields/SolidDecimalField.tsx +2 -7
  135. package/src/components/core/form/fields/SolidIntegerField.tsx +17 -22
  136. package/src/components/core/form/fields/SolidJsonField.tsx +15 -19
  137. package/src/components/core/form/fields/SolidLongTextField.tsx +19 -24
  138. package/src/components/core/form/fields/SolidMediaMultipleField.tsx +47 -51
  139. package/src/components/core/form/fields/SolidMediaSingleField.tsx +47 -51
  140. package/src/components/core/form/fields/SolidRichTextField.tsx +3 -7
  141. package/src/components/core/form/fields/SolidSelectionDynamicField.tsx +2 -7
  142. package/src/components/core/form/fields/SolidSelectionStaticField.tsx +20 -25
  143. package/src/components/core/form/fields/SolidShortTextField.tsx +18 -23
  144. package/src/components/core/form/fields/SolidTimeField.tsx +19 -24
  145. package/src/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +51 -52
  146. package/src/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +20 -25
  147. package/src/components/core/form/fields/relations/SolidRelationOneToManyField.tsx +6 -5
  148. package/src/components/core/model/CreateModel.tsx +68 -53
  149. package/src/components/core/model/FieldMetaData.tsx +16 -21
  150. package/src/components/core/model/FieldMetaDataForm.tsx +802 -896
  151. package/src/components/core/model/FieldSelector.tsx +10 -15
  152. package/src/components/core/model/ModelMetaData.tsx +364 -356
  153. package/src/components/core/module/CreateModule.tsx +327 -295
  154. package/src/components/core/users/CreateUser.tsx +175 -167
  155. package/src/index.ts +5 -2
  156. package/src/redux/api/solidSettingsApi.tsx +47 -0
  157. package/solidstarters-solid-core-ui-1.1.2.tgz +0 -0
@@ -32,6 +32,8 @@ import { SolidSelectionDynamicField } from "./fields/SolidSelectionDynamicField"
32
32
  import { SolidSelectionStaticField } from "./fields/SolidSelectionStaticField";
33
33
  import { SolidShortTextField } from "./fields/SolidShortTextField";
34
34
  import { SolidTimeField } from "./fields/SolidTimeField";
35
+ import { BackButton } from "@/components/common/BackButton";
36
+ import { SolidFormStepper } from "@/components/common/SolidFormStepper";
35
37
 
36
38
  export type SolidFormViewProps = {
37
39
  moduleName: string;
@@ -149,14 +151,17 @@ const SolidGroup = ({ children, attrs }: any) => {
149
151
  const className = attrs.className;
150
152
 
151
153
  return (
152
- <div className={className}>
153
- <div className="s_group">
154
- <fieldset>
155
- {attrs.label && <p className="s_group_heading">{attrs.label}</p>}
156
- <div className="grid">{children}</div>
157
- </fieldset>
158
- </div>
159
-
154
+ // <div className={className}>
155
+ // <div className="s_group">
156
+ // <fieldset>
157
+ // {attrs.label && <p className="s_group_heading">{attrs.label}</p>}
158
+ // <div className="grid">{children}</div>
159
+ // </fieldset>
160
+ // </div>
161
+
162
+ // </div>
163
+ <div className="formgrid grid">
164
+ {children}
160
165
  </div>
161
166
  );
162
167
  };
@@ -166,54 +171,57 @@ const SolidRow = ({ children, attrs }: any) => {
166
171
  const className = attrs.className;
167
172
 
168
173
  return (
169
- <div className={`row ${className}`}>
174
+ // <div className={`row ${className}`}>
170
175
 
171
- <div className="s_group">
172
- <fieldset>
173
- {attrs.label && <p className="s_group_heading">{attrs.label}</p>}
174
- <div className="grid">{children}</div>
175
- </fieldset>
176
- </div>
176
+ // <div className="s_group">
177
+ // <fieldset>
178
+ // {attrs.label && <p className="s_group_heading">{attrs.label}</p>}
179
+ // <div className="grid">{children}</div>
180
+ // </fieldset>
181
+ // </div>
177
182
 
178
- </div>
183
+ // </div>
184
+ <div>{children}</div>
179
185
  );
180
186
  };
181
187
  const SolidColumn = ({ children, attrs }: any) => {
182
188
  const className = attrs.className;
183
189
 
184
190
  return (
185
- <div className={`${className}`}>
186
- <div className="s_group">
187
- <fieldset>
188
- {attrs.label && <p className="s_group_heading">{attrs.label}</p>}
189
- <div className="grid">{children}</div>
190
- </fieldset>
191
- </div>
192
-
191
+ // <div className={`${className}`}>
192
+ // <div className="s_group">
193
+ // <fieldset>
194
+ // {attrs.label && <p className="s_group_heading">{attrs.label}</p>}
195
+ // <div className="grid">{children}</div>
196
+ // </fieldset>
197
+ // </div>
198
+
199
+ // </div>
200
+ <div className="formgrid grid">
201
+ {children}
193
202
  </div>
194
203
  );
195
204
  };
196
205
 
197
206
  const SolidSheet = ({ children }: any) => (
198
207
 
199
- <div className="p-fluid p-grid">
208
+ <div>
200
209
  {children}
201
210
  </div>
202
211
  );
203
212
  const SolidNotebook = ({ children }: any) => {
204
213
 
205
- return (<div className="solid-tab-view">
214
+ return (
206
215
  <TabView>
207
216
  {children}
208
217
  </TabView>
209
- </div>
210
218
  )
211
219
  };
212
220
 
213
221
 
214
222
  const SolidPage = ({ attrs, children, key }: any) => (
215
- <TabPanel key={key} header={attrs.label} className="solid-tab-panel">
216
- <div className="p-fluid">{children}</div>
223
+ <TabPanel key={key} header={attrs.label} >
224
+ <div>{children}</div>
217
225
  </TabPanel>
218
226
  );
219
227
 
@@ -500,17 +508,16 @@ const SolidFormView = (params: SolidFormViewProps) => {
500
508
  const {
501
509
  data: solidFormViewData,
502
510
  isLoading: solidFormViewDataIsLoading,
503
- } = useGetSolidEntityByIdQuery({ id: params.id, qs: formViewDataQs },
504
- { skip: !solidFormViewMetaData || params.id === 'new', refetchOnMountOrArgChange: true, });
511
+ } = useGetSolidEntityByIdQuery({ id: params.id, qs: formViewDataQs }, { skip: !solidFormViewMetaData || params.id === 'new' });
505
512
  useEffect(() => {
506
513
  if (solidFormViewData) {
507
514
  console.log(`DATA: `, solidFormViewData);
508
515
  setInitialEntityData(solidFormViewData.data);
509
516
  }
510
- }, [solidFormViewData, params]);
517
+ }, [solidFormViewData]);
511
518
 
512
519
  let formik: FormikObject;
513
-
520
+
514
521
  if (solidFormViewMetaDataIsLoading || solidFormViewDataIsLoading || !formViewLayout) {
515
522
  formik = useFormik({
516
523
  initialValues: {},
@@ -641,164 +648,172 @@ const SolidFormView = (params: SolidFormViewProps) => {
641
648
  console.log("params.embeded", params.embeded);
642
649
 
643
650
  return (
644
- <>
651
+ <div className="solid-form-wrapper">
645
652
  <Toast ref={toast} />
646
653
 
647
654
  <form onSubmit={formik.handleSubmit}>
655
+ <div className="solid-form-header">
656
+ {params.id === "new" ? (
657
+ <>
658
+ <div className="flex align-items-center gap-3">
659
+ <BackButton />
660
+ <div className="form-wrapper-title"> {createHeaderTitle}</div>
661
+ </div>
662
+ <div className="gap-3 flex">
663
+ {params.embeded !== true &&
664
+ actionsAllowed.includes(`${createPermission(params.modelName)}`) &&
665
+ !formViewLayout.attrs.readonly &&
666
+ !formViewLayout.attrs.readonly &&
667
+ <div>
668
+ <Button
669
+ label="Save"
670
+ size="small"
671
+ onClick={() => showError()}
672
+ type="submit"
673
+ />
674
+ </div>
675
+ }
676
+ {params.embeded !== true &&
677
+ actionsAllowed.includes(`${createPermission(params.modelName)}`) &&
678
+ !formViewLayout.attrs.readonly &&
679
+ !formViewLayout.attrs.readonly &&
680
+ <div>
681
+ <Button
682
+ label="Save & Close"
683
+ size="small"
684
+ onClick={() => {
685
+ setRedirectToList(true);
686
+ showError()
687
+ }}
688
+ type="submit"
689
+ />
690
+ </div>
691
+ }
692
+ {params.embeded == true &&
693
+ actionsAllowed.includes(`${createPermission(params.modelName)}`) &&
694
+ !formViewLayout.attrs.readonly &&
695
+ !formViewLayout.attrs.readonly &&
696
+ <div>
697
+ <Button
698
+ label="Save"
699
+ size="small"
700
+ onClick={() => {
701
+ setRedirectToList(false);
702
+ showError()
703
+ }}
704
+ type="submit"
705
+ />
706
+ </div>
707
+ }
708
+ {params.embeded == true &&
709
+ <Button outlined size="small" type="button" label="Cancel" severity="danger" onClick={() => params.handlePopupClose()} />
710
+
711
+ }
712
+ {params.embeded !== true &&
713
+ <SolidCancelButton />
714
+ }
648
715
 
649
- {params.id === "new" ? (
650
- <div className="flex gap-3 justify-content-between mb-3 align-items-baseline">
651
- <div className="form-wrapper-title"> {createHeaderTitle}</div>
652
- <div className="gap-1 flex">
653
- {params.embeded !== true &&
654
- actionsAllowed.includes(`${createPermission(params.modelName)}`) &&
655
- !formViewLayout.attrs.readonly &&
656
- !formViewLayout.attrs.readonly &&
657
- <div>
658
- <Button
659
- label="Save"
660
- size="small"
661
- onClick={() => showError()}
662
- type="submit"
663
- className="small-button"
664
- />
665
- </div>
666
- }
667
- {params.embeded !== true &&
668
- actionsAllowed.includes(`${createPermission(params.modelName)}`) &&
669
- !formViewLayout.attrs.readonly &&
670
- !formViewLayout.attrs.readonly &&
671
- <div>
672
- <Button
673
- label="Save & Close"
674
- size="small"
675
- onClick={() => {
676
- setRedirectToList(true);
677
- showError()
678
- }}
679
- type="submit"
680
- className="small-button"
681
- />
682
- </div>
683
- }
684
- {params.embeded == true &&
685
- actionsAllowed.includes(`${createPermission(params.modelName)}`) &&
686
- !formViewLayout.attrs.readonly &&
687
- !formViewLayout.attrs.readonly &&
688
- <div>
689
- <Button
690
- label="Save"
691
- size="small"
692
- onClick={() => {
693
- setRedirectToList(false);
694
- showError()
695
- }}
696
- type="submit"
697
- className="small-button"
698
- />
699
- </div>
700
- }
701
- {params.embeded == true &&
702
- <Button outlined size="small" type="button" label="Cancel" severity="danger" onClick={() => params.handlePopupClose()} className='small-button' />
703
-
704
- }
705
- {params.embeded !== true &&
706
- <SolidCancelButton />
707
- }
708
-
709
- </div>
710
- </div>
711
- ) : (
712
- <div className="flex gap-3 justify-content-between mb-3">
713
- <div className="form-wrapper-title"> {editHeaderTitle}</div>
714
- <div className="gap-3 flex">
715
- {params.embeded !== true &&
716
- actionsAllowed.includes(`${updatePermission(params.modelName)}`) &&
717
- !formViewLayout.attrs.readonly &&
718
- !formViewLayout.attrs.readonly &&
719
- <div>
720
- <Button
721
- label="Save"
722
- size="small"
723
- onClick={() => showError()}
724
- type="submit"
725
- className="small-button"
726
- />
727
- </div>
728
- }
729
- {params.embeded == true &&
730
- actionsAllowed.includes(`${updatePermission(params.modelName)}`) &&
731
- !formViewLayout.attrs.readonly &&
732
- !formViewLayout.attrs.readonly &&
733
- <div>
734
- <Button
735
- label="Save"
736
- size="small"
737
- onClick={() => showError()}
738
- type="submit"
739
- className="small-button"
740
- />
741
- </div>
742
- }
743
- {params.embeded !== true &&
744
- actionsAllowed.includes(`${updatePermission(params.modelName)}`) &&
745
- !formViewLayout.attrs.readonly &&
746
- !formViewLayout.attrs.readonly &&
747
- <div>
748
- <Button
749
- label="Save & Close"
750
- size="small"
751
- onClick={() => {
752
- setRedirectToList(true);
753
- showError()
754
- }}
755
- type="submit"
756
- className="small-button"
757
- />
758
- </div>
759
- }
760
- {params.embeded !== true &&
761
- actionsAllowed.includes(`${deletePermission(params.modelName)}`) &&
762
- !formViewLayout.attrs.readonly &&
763
- !formViewLayout.attrs.readonly &&
764
- <div>
765
- <Button
766
- size="small"
767
- type="button"
768
- label="Delete"
769
- severity="danger"
770
- onClick={() => setDeleteDialogVisible(true)}
771
- className="small-button"
772
- />
773
- </div>
774
- }
775
- {params.embeded == true &&
776
- actionsAllowed.includes(`${deletePermission(params.modelName)}`) &&
777
- !formViewLayout.attrs.readonly &&
778
- !formViewLayout.attrs.readonly &&
779
- <div>
780
- <Button
781
- size="small"
782
- type="button"
783
- label="Delete"
784
- severity="danger"
785
- onClick={() => setDeleteDialogVisible(true)}
786
- className="small-button"
787
- />
788
- </div>
789
- }
790
- {params.embeded == true &&
791
- <Button outlined size="small" type="button" label="Cancel" severity="danger" onClick={() => params.handlePopupClose()} className='small-button' />
792
-
793
- }
794
- {params.embeded !== true &&
795
- <SolidCancelButton />
796
- }
716
+ </div>
717
+ </>
718
+ ) : (
719
+ <>
720
+ <div className="flex align-items-center gap-3">
721
+ <BackButton />
722
+ <div className="form-wrapper-title"> {editHeaderTitle}</div>
723
+ </div>
724
+ <div className="gap-3 flex">
725
+ {params.embeded !== true &&
726
+ actionsAllowed.includes(`${updatePermission(params.modelName)}`) &&
727
+ !formViewLayout.attrs.readonly &&
728
+ !formViewLayout.attrs.readonly &&
729
+ <div>
730
+ <Button
731
+ label="Save"
732
+ size="small"
733
+ onClick={() => showError()}
734
+ type="submit"
735
+ />
736
+ </div>
737
+ }
738
+ {params.embeded == true &&
739
+ actionsAllowed.includes(`${updatePermission(params.modelName)}`) &&
740
+ !formViewLayout.attrs.readonly &&
741
+ !formViewLayout.attrs.readonly &&
742
+ <div>
743
+ <Button
744
+ label="Save"
745
+ size="small"
746
+ onClick={() => showError()}
747
+ type="submit"
748
+ />
749
+ </div>
750
+ }
751
+ {params.embeded !== true &&
752
+ actionsAllowed.includes(`${updatePermission(params.modelName)}`) &&
753
+ !formViewLayout.attrs.readonly &&
754
+ !formViewLayout.attrs.readonly &&
755
+ <div>
756
+ <Button
757
+ label="Save & Close"
758
+ size="small"
759
+ onClick={() => {
760
+ setRedirectToList(true);
761
+ showError()
762
+ }}
763
+ type="submit"
764
+ />
765
+ </div>
766
+ }
767
+ {params.embeded !== true &&
768
+ actionsAllowed.includes(`${deletePermission(params.modelName)}`) &&
769
+ !formViewLayout.attrs.readonly &&
770
+ !formViewLayout.attrs.readonly &&
771
+ <div>
772
+ <Button
773
+ size="small"
774
+ type="button"
775
+ label="Delete"
776
+ severity="danger"
777
+ onClick={() => setDeleteDialogVisible(true)}
778
+ />
779
+ </div>
780
+ }
781
+ {params.embeded == true &&
782
+ actionsAllowed.includes(`${deletePermission(params.modelName)}`) &&
783
+ !formViewLayout.attrs.readonly &&
784
+ !formViewLayout.attrs.readonly &&
785
+ <div>
786
+ <Button
787
+ size="small"
788
+ type="button"
789
+ label="Delete"
790
+ severity="danger"
791
+ onClick={() => setDeleteDialogVisible(true)}
792
+ />
793
+ </div>
794
+ }
795
+ {params.embeded == true &&
796
+ <Button outlined size="small" type="button" label="Cancel" onClick={() => params.handlePopupClose()} className='bg-primary-reverse' />
797
+
798
+ }
799
+ {params.embeded !== true &&
800
+ <SolidCancelButton />
801
+ }
802
+ </div>
803
+ </>
804
+ )}
805
+ </div>
806
+ <div className="solid-form-stepper">
807
+ <SolidFormStepper />
808
+ </div>
809
+ <div className="p-4 solid-form-content">
810
+ <div className="grid">
811
+ <div className="col-8 mx-auto">
812
+ {renderFormDynamically(formViewMetaData)}
797
813
  </div>
798
814
  </div>
799
- )}
800
- {renderFormDynamically(formViewMetaData)}
801
- </form>
815
+ </div>
816
+ </form >
802
817
  <Dialog
803
818
  visible={isDeleteDialogVisible}
804
819
  header="Confirm Delete"
@@ -813,7 +828,7 @@ const SolidFormView = (params: SolidFormViewProps) => {
813
828
  >
814
829
  <p>Are you sure you want to delete?</p>
815
830
  </Dialog>
816
- </>
831
+ </div >
817
832
  );
818
833
 
819
834
  }
@@ -59,7 +59,7 @@ export class SolidBooleanField implements ISolidField {
59
59
 
60
60
  const fieldMetadata = this.fieldContext.fieldMetadata;
61
61
  const fieldLayoutInfo = this.fieldContext.field;
62
- const className = fieldLayoutInfo.attrs?.className || 'col-12 s-field';
62
+ const className = fieldLayoutInfo.attrs?.className || 'field col-6 flex flex-column gap-2 mt-4';
63
63
  const fieldLabel = fieldLayoutInfo.attrs.label ?? fieldMetadata.displayName;
64
64
  const fieldDescription = fieldLayoutInfo.attrs.description ?? fieldMetadata.description;
65
65
  const booleanOptions = ["false", "true"];
@@ -77,12 +77,9 @@ export class SolidBooleanField implements ISolidField {
77
77
 
78
78
  return (
79
79
  <div className={className}>
80
- <div className="justify-content-center align-items-center">
81
- <label htmlFor={fieldLayoutInfo.attrs.name}>{fieldLabel}
80
+ <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
82
81
  &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>}
83
82
  </label>
84
- </div>
85
- <div className="s-input">
86
83
  {/* <InputText
87
84
  id={fieldLayoutInfo.attrs.name}
88
85
  className="small-input"
@@ -98,7 +95,7 @@ export class SolidBooleanField implements ISolidField {
98
95
  onChange={(e) => formik.setFieldValue(fieldLayoutInfo.attrs.name, e.value)} // Custom handling for boolean input
99
96
  value={formik.values[fieldLayoutInfo.attrs.name] ? formik.values[fieldLayoutInfo.attrs.name].toString() : "false"}
100
97
  options={booleanOptions}
101
- className={classNames("p-inputtext-sm w-full small-input flex boolean-switch", {
98
+ className={classNames("", {
102
99
  "p-invalid": isFormFieldValid(formik, "defaultValue"),
103
100
  })}
104
101
 
@@ -106,7 +103,6 @@ export class SolidBooleanField implements ISolidField {
106
103
  {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
107
104
  <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
108
105
  )}
109
- </div>
110
106
  </div>
111
107
  );
112
108
  }
@@ -41,7 +41,7 @@ export class SolidDateField implements ISolidField {
41
41
  render(formik: FormikObject) {
42
42
  const fieldMetadata = this.fieldContext.fieldMetadata;
43
43
  const fieldLayoutInfo = this.fieldContext.field;
44
- const className = fieldLayoutInfo.attrs?.className || 'col-12 s-field';
44
+ const className = fieldLayoutInfo.attrs?.className || 'field col-6 flex flex-column gap-2 mt-4';
45
45
  const fieldLabel = fieldLayoutInfo.attrs.label ?? fieldMetadata.displayName;
46
46
  const calendarRef = useRef<any>(null); // Reference for the Calendar component
47
47
  const fieldDescription = fieldLayoutInfo.attrs.description ?? fieldMetadata.description;
@@ -56,13 +56,10 @@ export class SolidDateField implements ISolidField {
56
56
 
57
57
  return (
58
58
  <div className={className}>
59
- <div className="justify-content-center align-items-center">
60
- <label htmlFor={fieldLayoutInfo.attrs.name}>{fieldLabel}
59
+ <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
61
60
 
62
61
  &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>}
63
62
  </label>
64
- </div>
65
- <div className="flex-auto">
66
63
  <Calendar
67
64
  disabled={formDisabled || fieldDisabled}
68
65
  ref={calendarRef} // Attach ref to Calendar
@@ -76,10 +73,7 @@ export class SolidDateField implements ISolidField {
76
73
  mask="99/99/9999 99:99"
77
74
  hideOnDateTimeSelect
78
75
  className=""
79
-
80
-
81
76
  />
82
- </div>
83
77
 
84
78
  {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
85
79
  <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
@@ -41,7 +41,7 @@ export class SolidDateTimeField implements ISolidField {
41
41
  render(formik: FormikObject) {
42
42
  const fieldMetadata = this.fieldContext.fieldMetadata;
43
43
  const fieldLayoutInfo = this.fieldContext.field;
44
- const className = fieldLayoutInfo.attrs?.className || 'col-12 s-field';
44
+ const className = fieldLayoutInfo.attrs?.className || 'field col-6 flex flex-column gap-2 mt-4';
45
45
  const fieldLabel = fieldLayoutInfo.attrs.label ?? fieldMetadata.displayName;
46
46
  const calendarRef = useRef<any>(null); // Reference for the Calendar component
47
47
  const fieldDescription = fieldLayoutInfo.attrs.description ?? fieldMetadata.description;
@@ -54,31 +54,26 @@ export class SolidDateTimeField implements ISolidField {
54
54
 
55
55
  return (
56
56
  <div className={className}>
57
- <div className="justify-content-center align-items-center">
58
- <label htmlFor={fieldLayoutInfo.attrs.name}>{fieldLabel}
57
+ <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
59
58
 
60
- &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>}
61
- </label>
62
- </div>
63
- <div className="flex-auto">
64
- <Calendar
65
- disabled={formDisabled || fieldDisabled}
66
- ref={calendarRef} // Attach ref to Calendar
67
- id={fieldLayoutInfo.attrs.name}
68
- aria-describedby={`${fieldLayoutInfo.attrs.name}-help`}
69
- onChange={formik.handleChange}
70
- //@ts-ignore
71
- value={formik.values[fieldLayoutInfo.attrs.name] ? new Date(formik.values[fieldLayoutInfo.attrs.name]) : Date()}
72
- // dateFormat="mm/dd/yy"
73
- // placeholder="mm/dd/yyyy hh:mm"
74
- mask="99/99/9999 99:99"
75
- hideOnDateTimeSelect
76
- showTime className=""
77
- hourFormat="24"
78
-
79
- />
80
- </div>
59
+ &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>}
60
+ </label>
61
+ <Calendar
62
+ disabled={formDisabled || fieldDisabled}
63
+ ref={calendarRef} // Attach ref to Calendar
64
+ id={fieldLayoutInfo.attrs.name}
65
+ aria-describedby={`${fieldLayoutInfo.attrs.name}-help`}
66
+ onChange={formik.handleChange}
67
+ //@ts-ignore
68
+ value={formik.values[fieldLayoutInfo.attrs.name] ? new Date(formik.values[fieldLayoutInfo.attrs.name]) : Date()}
69
+ // dateFormat="mm/dd/yy"
70
+ // placeholder="mm/dd/yyyy hh:mm"
71
+ mask="99/99/9999 99:99"
72
+ hideOnDateTimeSelect
73
+ showTime className=""
74
+ hourFormat="24"
81
75
 
76
+ />
82
77
  {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
83
78
  <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
84
79
  )}