@solidstarters/solid-core-ui 1.1.27 → 1.1.28

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 (228) hide show
  1. package/dist/components/auth/SolidChangeForcePassword.js +0 -3
  2. package/dist/components/auth/SolidChangeForcePassword.js.map +1 -1
  3. package/dist/components/common/SolidBreadcrumb.d.ts +6 -1
  4. package/dist/components/common/SolidBreadcrumb.d.ts.map +1 -1
  5. package/dist/components/common/SolidBreadcrumb.js +27 -7
  6. package/dist/components/common/SolidBreadcrumb.js.map +1 -1
  7. package/dist/components/core/common/FilterComponent.d.ts.map +1 -1
  8. package/dist/components/core/common/FilterComponent.js +3 -3
  9. package/dist/components/core/common/FilterComponent.js.map +1 -1
  10. package/dist/components/core/common/SolidGlobalSearchElement.js +1 -1
  11. package/dist/components/core/filter/SolidManyToOneFilterElement.d.ts.map +1 -1
  12. package/dist/components/core/filter/SolidManyToOneFilterElement.js +1 -1
  13. package/dist/components/core/filter/SolidManyToOneFilterElement.js.map +1 -1
  14. package/dist/components/core/filter/SolidSelectionDynamicFilterElement.d.ts.map +1 -1
  15. package/dist/components/core/filter/SolidSelectionDynamicFilterElement.js +1 -1
  16. package/dist/components/core/filter/SolidSelectionDynamicFilterElement.js.map +1 -1
  17. package/dist/components/core/filter/SolidSelectionStaticFilterElement.d.ts.map +1 -1
  18. package/dist/components/core/filter/SolidSelectionStaticFilterElement.js +1 -1
  19. package/dist/components/core/filter/SolidSelectionStaticFilterElement.js.map +1 -1
  20. package/dist/components/core/filter/SolidVarInputsFilterElement.d.ts.map +1 -1
  21. package/dist/components/core/filter/SolidVarInputsFilterElement.js +7 -7
  22. package/dist/components/core/filter/SolidVarInputsFilterElement.js.map +1 -1
  23. package/dist/components/core/filter/fields/SolidBooleanField.d.ts.map +1 -1
  24. package/dist/components/core/filter/fields/SolidBooleanField.js +5 -5
  25. package/dist/components/core/filter/fields/SolidBooleanField.js.map +1 -1
  26. package/dist/components/core/filter/fields/SolidDateField.d.ts.map +1 -1
  27. package/dist/components/core/filter/fields/SolidDateField.js +5 -5
  28. package/dist/components/core/filter/fields/SolidDateField.js.map +1 -1
  29. package/dist/components/core/filter/fields/SolidDatetimeField.d.ts.map +1 -1
  30. package/dist/components/core/filter/fields/SolidDatetimeField.js +5 -5
  31. package/dist/components/core/filter/fields/SolidDatetimeField.js.map +1 -1
  32. package/dist/components/core/filter/fields/SolidExternalIdField.d.ts.map +1 -1
  33. package/dist/components/core/filter/fields/SolidExternalIdField.js +5 -5
  34. package/dist/components/core/filter/fields/SolidExternalIdField.js.map +1 -1
  35. package/dist/components/core/filter/fields/SolidIdField.d.ts.map +1 -1
  36. package/dist/components/core/filter/fields/SolidIdField.js +5 -5
  37. package/dist/components/core/filter/fields/SolidIdField.js.map +1 -1
  38. package/dist/components/core/filter/fields/SolidIntField.d.ts.map +1 -1
  39. package/dist/components/core/filter/fields/SolidIntField.js +6 -6
  40. package/dist/components/core/filter/fields/SolidIntField.js.map +1 -1
  41. package/dist/components/core/filter/fields/SolidMediaMultipleField.d.ts.map +1 -1
  42. package/dist/components/core/filter/fields/SolidMediaMultipleField.js +5 -5
  43. package/dist/components/core/filter/fields/SolidMediaMultipleField.js.map +1 -1
  44. package/dist/components/core/filter/fields/SolidMediaSingleField.d.ts.map +1 -1
  45. package/dist/components/core/filter/fields/SolidMediaSingleField.js +5 -5
  46. package/dist/components/core/filter/fields/SolidMediaSingleField.js.map +1 -1
  47. package/dist/components/core/filter/fields/SolidSelectionDynamicField.d.ts.map +1 -1
  48. package/dist/components/core/filter/fields/SolidSelectionDynamicField.js +5 -5
  49. package/dist/components/core/filter/fields/SolidSelectionDynamicField.js.map +1 -1
  50. package/dist/components/core/filter/fields/SolidSelectionStaticField.d.ts.map +1 -1
  51. package/dist/components/core/filter/fields/SolidSelectionStaticField.js +5 -5
  52. package/dist/components/core/filter/fields/SolidSelectionStaticField.js.map +1 -1
  53. package/dist/components/core/filter/fields/SolidShortTextField.d.ts.map +1 -1
  54. package/dist/components/core/filter/fields/SolidShortTextField.js +5 -5
  55. package/dist/components/core/filter/fields/SolidShortTextField.js.map +1 -1
  56. package/dist/components/core/filter/fields/SolidTimeField.d.ts.map +1 -1
  57. package/dist/components/core/filter/fields/SolidTimeField.js +5 -5
  58. package/dist/components/core/filter/fields/SolidTimeField.js.map +1 -1
  59. package/dist/components/core/filter/fields/SolidUuidField.d.ts.map +1 -1
  60. package/dist/components/core/filter/fields/SolidUuidField.js +5 -5
  61. package/dist/components/core/filter/fields/SolidUuidField.js.map +1 -1
  62. package/dist/components/core/filter/fields/relations/SolidRelationManyToOneField.d.ts.map +1 -1
  63. package/dist/components/core/filter/fields/relations/SolidRelationManyToOneField.js +5 -5
  64. package/dist/components/core/filter/fields/relations/SolidRelationManyToOneField.js.map +1 -1
  65. package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
  66. package/dist/components/core/form/SolidFormView.js +23 -14
  67. package/dist/components/core/form/SolidFormView.js.map +1 -1
  68. package/dist/components/core/form/fields/SolidBooleanField.d.ts.map +1 -1
  69. package/dist/components/core/form/fields/SolidBooleanField.js +4 -4
  70. package/dist/components/core/form/fields/SolidBooleanField.js.map +1 -1
  71. package/dist/components/core/form/fields/SolidDateField.d.ts.map +1 -1
  72. package/dist/components/core/form/fields/SolidDateField.js +7 -7
  73. package/dist/components/core/form/fields/SolidDateField.js.map +1 -1
  74. package/dist/components/core/form/fields/SolidDateTimeField.d.ts.map +1 -1
  75. package/dist/components/core/form/fields/SolidDateTimeField.js +7 -7
  76. package/dist/components/core/form/fields/SolidDateTimeField.js.map +1 -1
  77. package/dist/components/core/form/fields/SolidDecimalField.d.ts.map +1 -1
  78. package/dist/components/core/form/fields/SolidDecimalField.js +4 -4
  79. package/dist/components/core/form/fields/SolidDecimalField.js.map +1 -1
  80. package/dist/components/core/form/fields/SolidEmailField.d.ts +11 -0
  81. package/dist/components/core/form/fields/SolidEmailField.d.ts.map +1 -0
  82. package/dist/components/core/form/fields/SolidEmailField.js +75 -0
  83. package/dist/components/core/form/fields/SolidEmailField.js.map +1 -0
  84. package/dist/components/core/form/fields/SolidIntegerField.d.ts.map +1 -1
  85. package/dist/components/core/form/fields/SolidIntegerField.js +4 -4
  86. package/dist/components/core/form/fields/SolidIntegerField.js.map +1 -1
  87. package/dist/components/core/form/fields/SolidJsonField.d.ts.map +1 -1
  88. package/dist/components/core/form/fields/SolidJsonField.js +2 -2
  89. package/dist/components/core/form/fields/SolidJsonField.js.map +1 -1
  90. package/dist/components/core/form/fields/SolidLongTextField.d.ts.map +1 -1
  91. package/dist/components/core/form/fields/SolidLongTextField.js +2 -2
  92. package/dist/components/core/form/fields/SolidLongTextField.js.map +1 -1
  93. package/dist/components/core/form/fields/SolidMediaMultipleField.js +4 -4
  94. package/dist/components/core/form/fields/SolidMediaMultipleField.js.map +1 -1
  95. package/dist/components/core/form/fields/SolidMediaSingleField.js +2 -2
  96. package/dist/components/core/form/fields/SolidMediaSingleField.js.map +1 -1
  97. package/dist/components/core/form/fields/SolidPasswordField.d.ts +11 -0
  98. package/dist/components/core/form/fields/SolidPasswordField.d.ts.map +1 -0
  99. package/dist/components/core/form/fields/SolidPasswordField.js +73 -0
  100. package/dist/components/core/form/fields/SolidPasswordField.js.map +1 -0
  101. package/dist/components/core/form/fields/SolidRichTextField.d.ts.map +1 -1
  102. package/dist/components/core/form/fields/SolidRichTextField.js +2 -2
  103. package/dist/components/core/form/fields/SolidRichTextField.js.map +1 -1
  104. package/dist/components/core/form/fields/SolidSelectionDynamicField.d.ts.map +1 -1
  105. package/dist/components/core/form/fields/SolidSelectionDynamicField.js +4 -4
  106. package/dist/components/core/form/fields/SolidSelectionDynamicField.js.map +1 -1
  107. package/dist/components/core/form/fields/SolidSelectionStaticField.d.ts.map +1 -1
  108. package/dist/components/core/form/fields/SolidSelectionStaticField.js +5 -5
  109. package/dist/components/core/form/fields/SolidSelectionStaticField.js.map +1 -1
  110. package/dist/components/core/form/fields/SolidShortTextField.d.ts.map +1 -1
  111. package/dist/components/core/form/fields/SolidShortTextField.js +4 -4
  112. package/dist/components/core/form/fields/SolidShortTextField.js.map +1 -1
  113. package/dist/components/core/form/fields/SolidTimeField.d.ts.map +1 -1
  114. package/dist/components/core/form/fields/SolidTimeField.js +7 -7
  115. package/dist/components/core/form/fields/SolidTimeField.js.map +1 -1
  116. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts.map +1 -1
  117. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js +3 -3
  118. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js.map +1 -1
  119. package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js +1 -1
  120. package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js.map +1 -1
  121. package/dist/components/core/list/SolidListView.d.ts +2 -0
  122. package/dist/components/core/list/SolidListView.d.ts.map +1 -1
  123. package/dist/components/core/list/SolidListView.js +29 -7
  124. package/dist/components/core/list/SolidListView.js.map +1 -1
  125. package/dist/components/core/list/SolidListViewColumn.d.ts +3 -1
  126. package/dist/components/core/list/SolidListViewColumn.d.ts.map +1 -1
  127. package/dist/components/core/list/SolidListViewColumn.js +3 -3
  128. package/dist/components/core/list/SolidListViewColumn.js.map +1 -1
  129. package/dist/components/core/list/columns/SolidDateColumn.d.ts.map +1 -1
  130. package/dist/components/core/list/columns/SolidDateColumn.js +6 -2
  131. package/dist/components/core/list/columns/SolidDateColumn.js.map +1 -1
  132. package/dist/components/core/list/columns/SolidDatetimeColumn.d.ts.map +1 -1
  133. package/dist/components/core/list/columns/SolidDatetimeColumn.js +6 -2
  134. package/dist/components/core/list/columns/SolidDatetimeColumn.js.map +1 -1
  135. package/dist/components/core/list/columns/SolidExternalIdColumn.d.ts.map +1 -1
  136. package/dist/components/core/list/columns/SolidExternalIdColumn.js +6 -2
  137. package/dist/components/core/list/columns/SolidExternalIdColumn.js.map +1 -1
  138. package/dist/components/core/list/columns/SolidIdColumn.d.ts.map +1 -1
  139. package/dist/components/core/list/columns/SolidIdColumn.js +6 -2
  140. package/dist/components/core/list/columns/SolidIdColumn.js.map +1 -1
  141. package/dist/components/core/list/columns/SolidIntColumn.d.ts.map +1 -1
  142. package/dist/components/core/list/columns/SolidIntColumn.js +6 -2
  143. package/dist/components/core/list/columns/SolidIntColumn.js.map +1 -1
  144. package/dist/components/core/list/columns/SolidMediaMultipleColumn.d.ts +1 -1
  145. package/dist/components/core/list/columns/SolidMediaMultipleColumn.d.ts.map +1 -1
  146. package/dist/components/core/list/columns/SolidMediaMultipleColumn.js +17 -4
  147. package/dist/components/core/list/columns/SolidMediaMultipleColumn.js.map +1 -1
  148. package/dist/components/core/list/columns/SolidMediaSingleColumn.d.ts +1 -1
  149. package/dist/components/core/list/columns/SolidMediaSingleColumn.d.ts.map +1 -1
  150. package/dist/components/core/list/columns/SolidMediaSingleColumn.js +10 -3
  151. package/dist/components/core/list/columns/SolidMediaSingleColumn.js.map +1 -1
  152. package/dist/components/core/list/columns/SolidSelectionDynamicColumn.d.ts.map +1 -1
  153. package/dist/components/core/list/columns/SolidSelectionDynamicColumn.js +6 -2
  154. package/dist/components/core/list/columns/SolidSelectionDynamicColumn.js.map +1 -1
  155. package/dist/components/core/list/columns/SolidSelectionStaticColumn.d.ts.map +1 -1
  156. package/dist/components/core/list/columns/SolidSelectionStaticColumn.js +6 -2
  157. package/dist/components/core/list/columns/SolidSelectionStaticColumn.js.map +1 -1
  158. package/dist/components/core/list/columns/SolidShortTextColumn.d.ts.map +1 -1
  159. package/dist/components/core/list/columns/SolidShortTextColumn.js +6 -2
  160. package/dist/components/core/list/columns/SolidShortTextColumn.js.map +1 -1
  161. package/dist/components/core/list/columns/SolidTimeColumn.d.ts.map +1 -1
  162. package/dist/components/core/list/columns/SolidTimeColumn.js +6 -2
  163. package/dist/components/core/list/columns/SolidTimeColumn.js.map +1 -1
  164. package/dist/components/core/list/columns/SolidUuidColumn.d.ts.map +1 -1
  165. package/dist/components/core/list/columns/SolidUuidColumn.js +6 -2
  166. package/dist/components/core/list/columns/SolidUuidColumn.js.map +1 -1
  167. package/dist/components/core/model/FieldMetaDataForm.js +1 -1
  168. package/dist/components/core/model/FieldMetaDataForm.js.map +1 -1
  169. package/dist/resources/globals.css +16 -2
  170. package/package.json +6 -2
  171. package/publish.js +16 -0
  172. package/src/components/auth/SolidChangeForcePassword.tsx +3 -3
  173. package/src/components/common/SolidBreadcrumb.tsx +36 -7
  174. package/src/components/core/common/FilterComponent.tsx +8 -6
  175. package/src/components/core/common/SolidGlobalSearchElement.tsx +1 -1
  176. package/src/components/core/filter/SolidManyToOneFilterElement.tsx +8 -7
  177. package/src/components/core/filter/SolidSelectionDynamicFilterElement.tsx +4 -3
  178. package/src/components/core/filter/SolidSelectionStaticFilterElement.tsx +4 -3
  179. package/src/components/core/filter/SolidVarInputsFilterElement.tsx +12 -7
  180. package/src/components/core/filter/fields/SolidBooleanField.tsx +16 -12
  181. package/src/components/core/filter/fields/SolidDateField.tsx +17 -13
  182. package/src/components/core/filter/fields/SolidDatetimeField.tsx +20 -15
  183. package/src/components/core/filter/fields/SolidExternalIdField.tsx +17 -13
  184. package/src/components/core/filter/fields/SolidIdField.tsx +25 -21
  185. package/src/components/core/filter/fields/SolidIntField.tsx +27 -23
  186. package/src/components/core/filter/fields/SolidMediaMultipleField.tsx +17 -14
  187. package/src/components/core/filter/fields/SolidMediaSingleField.tsx +17 -14
  188. package/src/components/core/filter/fields/SolidSelectionDynamicField.tsx +17 -13
  189. package/src/components/core/filter/fields/SolidSelectionStaticField.tsx +17 -13
  190. package/src/components/core/filter/fields/SolidShortTextField.tsx +17 -13
  191. package/src/components/core/filter/fields/SolidTimeField.tsx +17 -12
  192. package/src/components/core/filter/fields/SolidUuidField.tsx +17 -13
  193. package/src/components/core/filter/fields/relations/SolidRelationManyToOneField.tsx +17 -13
  194. package/src/components/core/form/SolidFormView.tsx +14 -1
  195. package/src/components/core/form/fields/SolidBooleanField.tsx +28 -26
  196. package/src/components/core/form/fields/SolidDateField.tsx +28 -26
  197. package/src/components/core/form/fields/SolidDateTimeField.tsx +29 -27
  198. package/src/components/core/form/fields/SolidDecimalField.tsx +20 -18
  199. package/src/components/core/form/fields/SolidEmailField.tsx +113 -0
  200. package/src/components/core/form/fields/SolidIntegerField.tsx +24 -22
  201. package/src/components/core/form/fields/SolidJsonField.tsx +22 -20
  202. package/src/components/core/form/fields/SolidLongTextField.tsx +24 -22
  203. package/src/components/core/form/fields/SolidMediaMultipleField.tsx +6 -6
  204. package/src/components/core/form/fields/SolidMediaSingleField.tsx +2 -2
  205. package/src/components/core/form/fields/SolidPasswordField.tsx +113 -0
  206. package/src/components/core/form/fields/SolidRichTextField.tsx +24 -21
  207. package/src/components/core/form/fields/SolidSelectionDynamicField.tsx +28 -26
  208. package/src/components/core/form/fields/SolidSelectionStaticField.tsx +30 -28
  209. package/src/components/core/form/fields/SolidShortTextField.tsx +25 -23
  210. package/src/components/core/form/fields/SolidTimeField.tsx +29 -27
  211. package/src/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +17 -15
  212. package/src/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +1 -1
  213. package/src/components/core/list/SolidListView.tsx +37 -4
  214. package/src/components/core/list/SolidListViewColumn.tsx +6 -4
  215. package/src/components/core/list/columns/SolidDateColumn.tsx +5 -2
  216. package/src/components/core/list/columns/SolidDatetimeColumn.tsx +5 -2
  217. package/src/components/core/list/columns/SolidExternalIdColumn.tsx +5 -2
  218. package/src/components/core/list/columns/SolidIdColumn.tsx +5 -2
  219. package/src/components/core/list/columns/SolidIntColumn.tsx +5 -2
  220. package/src/components/core/list/columns/SolidMediaMultipleColumn.tsx +38 -10
  221. package/src/components/core/list/columns/SolidMediaSingleColumn.tsx +21 -13
  222. package/src/components/core/list/columns/SolidSelectionDynamicColumn.tsx +5 -2
  223. package/src/components/core/list/columns/SolidSelectionStaticColumn.tsx +5 -2
  224. package/src/components/core/list/columns/SolidShortTextColumn.tsx +5 -2
  225. package/src/components/core/list/columns/SolidTimeColumn.tsx +5 -2
  226. package/src/components/core/list/columns/SolidUuidColumn.tsx +5 -2
  227. package/src/components/core/model/FieldMetaDataForm.tsx +1 -1
  228. package/src/resources/globals.css +16 -2
@@ -13,7 +13,7 @@ const SolidUuidField = ({ fieldMetadata, onChange, index, rule }: SolidFilterFie
13
13
  const numberOfInputs = getNumberOfInputs(rule.matchMode);
14
14
 
15
15
  return (
16
- <>
16
+ <div className='flex align-items-start gap-3 w-full'>
17
17
  <Dropdown
18
18
  value={rule.matchMode}
19
19
  onChange={(e: any) => {
@@ -22,18 +22,22 @@ const SolidUuidField = ({ fieldMetadata, onChange, index, rule }: SolidFilterFie
22
22
  options={filterMatchModeOptions}
23
23
  optionLabel='label'
24
24
  optionValue='value'
25
- placeholder="Select Operator" className="w-full md:w-14rem" />
26
- <SolidVarInputsFilterElement
27
- values={rule.value}
28
- onChange={(e: any) => {
29
- onChange(rule.id, 'value', e)
30
- }}
31
- numberOfInputs={numberOfInputs}
32
- inputType={InputTypes.Text}
33
- fieldMetadata={fieldMetadata}
34
- >
35
- </SolidVarInputsFilterElement>
36
- </>
25
+ placeholder="Select Operator"
26
+ className="w-full p-inputtext-sm"
27
+ />
28
+ <div className='flex flex-column gap-2 w-full'>
29
+ <SolidVarInputsFilterElement
30
+ values={rule.value}
31
+ onChange={(e: any) => {
32
+ onChange(rule.id, 'value', e)
33
+ }}
34
+ numberOfInputs={numberOfInputs}
35
+ inputType={InputTypes.Text}
36
+ fieldMetadata={fieldMetadata}
37
+ >
38
+ </SolidVarInputsFilterElement>
39
+ </div>
40
+ </div>
37
41
  );
38
42
 
39
43
  };
@@ -48,7 +48,7 @@ const SolidRelationManyToOneField = ({ fieldMetadata, onChange, index, rule }: S
48
48
  // const header = column.attrs.label ?? fieldMetadata.displayName;
49
49
 
50
50
  return (
51
- <>
51
+ <div className='flex align-items-start gap-3 w-full'>
52
52
  <Dropdown
53
53
  value={rule.matchMode}
54
54
  onChange={(e: any) => {
@@ -57,18 +57,22 @@ const SolidRelationManyToOneField = ({ fieldMetadata, onChange, index, rule }: S
57
57
  options={filterMatchModeOptions}
58
58
  optionLabel='label'
59
59
  optionValue='value'
60
- placeholder="Select Operator" className="w-full md:w-14rem" />
61
- <SolidVarInputsFilterElement
62
- values={rule.value}
63
- onChange={(e: any) => {
64
- onChange(index, 'value', e)
65
- }}
66
- numberOfInputs={numberOfInputs}
67
- inputType={InputTypes.RelationManyToOne}
68
- fieldMetadata={fieldMetadata}
69
- >
70
- </SolidVarInputsFilterElement>
71
- </>
60
+ placeholder="Select Operator"
61
+ className="w-full p-inputtext-sm"
62
+ />
63
+ <div className='flex flex-column gap-2 w-full'>
64
+ <SolidVarInputsFilterElement
65
+ values={rule.value}
66
+ onChange={(e: any) => {
67
+ onChange(index, 'value', e)
68
+ }}
69
+ numberOfInputs={numberOfInputs}
70
+ inputType={InputTypes.RelationManyToOne}
71
+ fieldMetadata={fieldMetadata}
72
+ >
73
+ </SolidVarInputsFilterElement>
74
+ </div>
75
+ </div>
72
76
  );
73
77
 
74
78
  };
@@ -38,6 +38,8 @@ import { SolidBreadcrumb } from "@/components/common/SolidBreadcrumb";
38
38
  import { SolidUiEvent } from "@/types";
39
39
  import { getExtensionComponent, getExtensionFunction } from "@/helpers/registry";
40
40
  import { SolidFormWidgetProps } from "@/types/solid-core";
41
+ import { SolidPasswordField } from "./fields/SolidPasswordField";
42
+ import { SolidEmailField } from "./fields/SolidEmailField";
41
43
 
42
44
  export type SolidFormViewProps = {
43
45
  moduleName: string;
@@ -129,6 +131,12 @@ const fieldFactory = (type: string, fieldContext: SolidFieldProps): ISolidField
129
131
  if (type === 'mediaMultiple') {
130
132
  return new SolidMediaMultipleField(fieldContext);
131
133
  }
134
+ if (type === 'password') {
135
+ return new SolidPasswordField(fieldContext);
136
+ }
137
+ if (type === 'email') {
138
+ return new SolidEmailField(fieldContext);
139
+ }
132
140
  return null;
133
141
  }
134
142
 
@@ -1095,7 +1103,12 @@ const SolidFormView = (params: SolidFormViewProps) => {
1095
1103
  </>
1096
1104
  )}
1097
1105
  </div>
1098
- <SolidBreadcrumb />
1106
+ {params.embeded !== true &&
1107
+ <SolidBreadcrumb
1108
+ solidViewData={solidFormViewMetaData?.data?.solidView?.model}
1109
+ initialEntityData={initialEntityData}
1110
+ />
1111
+ }
1099
1112
  {/* {params.embeded !== true &&
1100
1113
  <div className="solid-form-stepper">
1101
1114
  <SolidFormStepper />
@@ -84,39 +84,41 @@ export class SolidBooleanField implements ISolidField {
84
84
 
85
85
  return (
86
86
  <div className={className}>
87
- <div className="flex flex-column gap-2 mt-4">
88
- {showFieldLabel != false &&
89
- <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
90
- {fieldMetadata.required && <span className="text-red-500"> *</span>}
91
- {/* &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
92
- </label>
93
- }
94
- {/* <InputText
87
+ <div className="relative">
88
+ <div className="flex flex-column gap-2 mt-4">
89
+ {showFieldLabel != false &&
90
+ <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
91
+ {fieldMetadata.required && <span className="text-red-500"> *</span>}
92
+ {/* &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
93
+ </label>
94
+ }
95
+ {/* <InputText
95
96
  id={fieldLayoutInfo.attrs.name}
96
97
  className="small-input"
97
98
  aria-describedby={`${fieldLayoutInfo.attrs.name}-help`}
98
99
  onChange={formik.handleChange}
99
100
  value={formik.values[fieldLayoutInfo.attrs.name] || ''}
100
101
  /> */}
101
- <SelectButton
102
- readOnly={formReadonly || fieldReadonly || readOnlyPermission}
103
- disabled={formDisabled || fieldDisabled}
104
- id={fieldLayoutInfo.attrs.name}
105
- aria-describedby={`${fieldLayoutInfo.attrs.name}-help`}
106
- onChange={(e) => formik.setFieldValue(fieldLayoutInfo.attrs.name, e.value)} // Custom handling for boolean input
107
- value={formik.values[fieldLayoutInfo.attrs.name] ? formik.values[fieldLayoutInfo.attrs.name].toString() : "false"}
108
- options={booleanOptions}
109
- className={classNames("", {
110
- "p-invalid": isFormFieldValid(formik, "defaultValue"),
111
- })}
112
-
113
- />
114
- </div>
115
- {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
116
- <div className="absolute mt-1">
117
- <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
102
+ <SelectButton
103
+ readOnly={formReadonly || fieldReadonly || readOnlyPermission}
104
+ disabled={formDisabled || fieldDisabled}
105
+ id={fieldLayoutInfo.attrs.name}
106
+ aria-describedby={`${fieldLayoutInfo.attrs.name}-help`}
107
+ onChange={(e) => formik.setFieldValue(fieldLayoutInfo.attrs.name, e.value)} // Custom handling for boolean input
108
+ value={formik.values[fieldLayoutInfo.attrs.name] ? formik.values[fieldLayoutInfo.attrs.name].toString() : "false"}
109
+ options={booleanOptions}
110
+ className={classNames("", {
111
+ "p-invalid": isFormFieldValid(formik, "defaultValue"),
112
+ })}
113
+
114
+ />
118
115
  </div>
119
- )}
116
+ {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
117
+ <div className="absolute mt-1">
118
+ <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
119
+ </div>
120
+ )}
121
+ </div>
120
122
  </div>
121
123
  );
122
124
  }
@@ -63,33 +63,35 @@ export class SolidDateField implements ISolidField {
63
63
 
64
64
  return (
65
65
  <div className={className}>
66
- <div className="flex flex-column gap-2 mt-4">
67
- {showFieldLabel != false &&
68
- <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
69
- {fieldMetadata.required && <span className="text-red-500"> *</span>}
70
- {/* &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
71
- </label>
72
- }
73
- <Calendar
74
- disabled={formDisabled || fieldDisabled || readOnlyPermission}
75
- ref={calendarRef} // Attach ref to Calendar
76
- id={fieldLayoutInfo.attrs.name}
77
- aria-describedby={`${fieldLayoutInfo.attrs.name}-help`}
78
- onChange={formik.handleChange}
79
- //@ts-ignore
80
- value={formik.values[fieldLayoutInfo.attrs.name] ? new Date(formik.values[fieldLayoutInfo.attrs.name]) : Date()}
81
- // dateFormat="mm/dd/yy"
82
- // placeholder="mm/dd/yyyy hh:mm"
83
- mask="99/99/9999 99:99"
84
- hideOnDateTimeSelect
85
- className=""
86
- />
87
- </div>
88
- {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
89
- <div className="absolute mt-1">
90
- <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
66
+ <div className="relative">
67
+ <div className="flex flex-column gap-2 mt-4">
68
+ {showFieldLabel != false &&
69
+ <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
70
+ {fieldMetadata.required && <span className="text-red-500"> *</span>}
71
+ {/* &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
72
+ </label>
73
+ }
74
+ <Calendar
75
+ disabled={formDisabled || fieldDisabled || readOnlyPermission}
76
+ ref={calendarRef} // Attach ref to Calendar
77
+ id={fieldLayoutInfo.attrs.name}
78
+ aria-describedby={`${fieldLayoutInfo.attrs.name}-help`}
79
+ onChange={formik.handleChange}
80
+ //@ts-ignore
81
+ value={formik.values[fieldLayoutInfo.attrs.name] ? new Date(formik.values[fieldLayoutInfo.attrs.name]) : Date()}
82
+ // dateFormat="mm/dd/yy"
83
+ // placeholder="mm/dd/yyyy hh:mm"
84
+ mask="99/99/9999 99:99"
85
+ hideOnDateTimeSelect
86
+ className=""
87
+ />
91
88
  </div>
92
- )}
89
+ {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
90
+ <div className="absolute mt-1">
91
+ <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
92
+ </div>
93
+ )}
94
+ </div>
93
95
  </div>
94
96
  );
95
97
  }
@@ -61,35 +61,37 @@ export class SolidDateTimeField implements ISolidField {
61
61
 
62
62
  return (
63
63
  <div className={className}>
64
- <div className="flex flex-column gap-2 mt-4">
65
- {showFieldLabel != false &&
66
- <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
67
- {fieldMetadata.required && <span className="text-red-500"> *</span>}
68
- {/* &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
69
- </label>
70
- }
71
- <Calendar
72
- disabled={formDisabled || fieldDisabled || readOnlyPermission}
73
- ref={calendarRef} // Attach ref to Calendar
74
- id={fieldLayoutInfo.attrs.name}
75
- aria-describedby={`${fieldLayoutInfo.attrs.name}-help`}
76
- onChange={formik.handleChange}
77
- //@ts-ignore
78
- value={formik.values[fieldLayoutInfo.attrs.name] ? new Date(formik.values[fieldLayoutInfo.attrs.name]) : Date()}
79
- // dateFormat="mm/dd/yy"
80
- // placeholder="mm/dd/yyyy hh:mm"
81
- mask="99/99/9999 99:99"
82
- hideOnDateTimeSelect
83
- showTime className=""
84
- hourFormat="24"
64
+ <div className="relative">
65
+ <div className="flex flex-column gap-2 mt-4">
66
+ {showFieldLabel != false &&
67
+ <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
68
+ {fieldMetadata.required && <span className="text-red-500"> *</span>}
69
+ {/* &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
70
+ </label>
71
+ }
72
+ <Calendar
73
+ disabled={formDisabled || fieldDisabled || readOnlyPermission}
74
+ ref={calendarRef} // Attach ref to Calendar
75
+ id={fieldLayoutInfo.attrs.name}
76
+ aria-describedby={`${fieldLayoutInfo.attrs.name}-help`}
77
+ onChange={formik.handleChange}
78
+ //@ts-ignore
79
+ value={formik.values[fieldLayoutInfo.attrs.name] ? new Date(formik.values[fieldLayoutInfo.attrs.name]) : Date()}
80
+ // dateFormat="mm/dd/yy"
81
+ // placeholder="mm/dd/yyyy hh:mm"
82
+ mask="99/99/9999 99:99"
83
+ hideOnDateTimeSelect
84
+ showTime className=""
85
+ hourFormat="24"
85
86
 
86
- />
87
- </div>
88
- {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
89
- <div className="absolute mt-1">
90
- <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
87
+ />
91
88
  </div>
92
- )}
89
+ {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
90
+ <div className="absolute mt-1">
91
+ <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
92
+ </div>
93
+ )}
94
+ </div>
93
95
  </div>
94
96
  );
95
97
  }
@@ -72,24 +72,26 @@ export class SolidDecimalField implements ISolidField {
72
72
 
73
73
  return (
74
74
  <div className={className}>
75
- <div className="flex flex-column gap-2 mt-4">
76
- {showFieldLabel != false &&
77
- <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
78
- {fieldMetadata.required && <span className="text-red-500"> *</span>}
79
- {/* &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
80
- </label>
81
- }
82
- <InputNumber
83
- readOnly={formReadonly || fieldReadonly || readOnlyPermission}
84
- disabled={formDisabled || fieldDisabled}
85
- id={fieldLayoutInfo.attrs.name}
86
- minFractionDigits={2}
87
- aria-describedby={`${fieldLayoutInfo.attrs.name}-help`}
88
- onChange={(e: any) => {
89
- formik.setFieldValue(fieldLayoutInfo.attrs.name, e.value)
90
- }}
91
- value={formik.values[fieldLayoutInfo.attrs.name] || ''}
92
- />
75
+ <div className="relative">
76
+ <div className="flex flex-column gap-2 mt-4">
77
+ {showFieldLabel != false &&
78
+ <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
79
+ {fieldMetadata.required && <span className="text-red-500"> *</span>}
80
+ {/* &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
81
+ </label>
82
+ }
83
+ <InputNumber
84
+ readOnly={formReadonly || fieldReadonly || readOnlyPermission}
85
+ disabled={formDisabled || fieldDisabled}
86
+ id={fieldLayoutInfo.attrs.name}
87
+ minFractionDigits={2}
88
+ aria-describedby={`${fieldLayoutInfo.attrs.name}-help`}
89
+ onChange={(e: any) => {
90
+ formik.setFieldValue(fieldLayoutInfo.attrs.name, e.value)
91
+ }}
92
+ value={formik.values[fieldLayoutInfo.attrs.name] || ''}
93
+ />
94
+ </div>
93
95
  {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
94
96
  <div className="absolute mt-1">
95
97
  <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
@@ -0,0 +1,113 @@
1
+ 'use client';
2
+ import { InputText } from "primereact/inputtext";
3
+ import { Message } from "primereact/message";
4
+ import * as Yup from 'yup';
5
+ import { Schema } from "yup";
6
+ import { FormikObject, ISolidField, SolidFieldProps } from "./ISolidField";
7
+
8
+ export class SolidEmailField implements ISolidField {
9
+
10
+ private fieldContext: SolidFieldProps;
11
+
12
+ constructor(fieldContext: SolidFieldProps) {
13
+ this.fieldContext = fieldContext;
14
+ }
15
+
16
+ updateFormData(value: any, formData: FormData): any {
17
+ const fieldLayoutInfo = this.fieldContext.field;
18
+ if (value) {
19
+ formData.append(fieldLayoutInfo.attrs.name, value);
20
+ }
21
+ }
22
+
23
+ initialValue(): any {
24
+ const fieldName = this.fieldContext.field.attrs.name;
25
+ const fieldDefaultValue = this.fieldContext?.fieldMetadata?.defaultValue;
26
+
27
+ const existingValue = this.fieldContext.data[fieldName];
28
+
29
+ return existingValue !== undefined && existingValue !== null ? existingValue : fieldDefaultValue || '';
30
+ }
31
+
32
+ validationSchema(): Schema {
33
+ let schema: Yup.StringSchema<string | null | undefined> = Yup.string();
34
+
35
+ const fieldMetadata = this.fieldContext.fieldMetadata;
36
+ const fieldLayoutInfo = this.fieldContext.field;
37
+ const fieldLabel = fieldLayoutInfo.attrs.label ?? fieldMetadata.displayName;
38
+
39
+ // 1. required
40
+ // 1. required
41
+ if (fieldMetadata.required) {
42
+ schema = schema.required(`${fieldLabel} is required.`);
43
+ } else {
44
+ schema = schema.nullable(); // Allow null when not required
45
+ }
46
+
47
+ // 2. length (min/max)
48
+ if (fieldMetadata.min && fieldMetadata.min > 0) {
49
+ schema = schema.min(fieldMetadata.min, `${fieldLabel} should be at-least ${fieldMetadata.min} characters long.`);
50
+ }
51
+ if (fieldMetadata.max && fieldMetadata.max > 0) {
52
+ schema = schema.max(fieldMetadata.max, `${fieldLabel} should not be more than ${fieldMetadata.max} characters long.`);
53
+ }
54
+ // 3. regular expression
55
+ if (fieldMetadata.regexPattern) {
56
+ const regexPatternNotMatchingErrorMsg = fieldMetadata.regexPatternNotMatchingErrorMsg ?? `${fieldLabel} has invalid data.`
57
+ schema = schema.matches(fieldMetadata.regexPattern, regexPatternNotMatchingErrorMsg);
58
+ }
59
+
60
+ return schema;
61
+ }
62
+
63
+ render(formik: FormikObject) {
64
+ const fieldMetadata = this.fieldContext.fieldMetadata;
65
+ const fieldLayoutInfo = this.fieldContext.field;
66
+ const className = fieldLayoutInfo.attrs?.className || 'field col-12';
67
+ const fieldLabel = fieldLayoutInfo.attrs.label ?? fieldMetadata.displayName;
68
+ const fieldDescription = fieldLayoutInfo.attrs.description ?? fieldMetadata.description;
69
+ const solidFormViewMetaData = this.fieldContext.solidFormViewMetaData;
70
+ const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
71
+ const readOnlyPermission = this.fieldContext.readOnly;
72
+
73
+ const isFormFieldValid = (formik: any, fieldName: string) => formik.touched[fieldName] && formik.errors[fieldName];
74
+
75
+ const fieldDisabled = fieldLayoutInfo.attrs?.disabled;
76
+ const fieldReadonly = fieldLayoutInfo.attrs?.readonly;
77
+
78
+ const formDisabled = solidFormViewMetaData.data.solidView?.layout?.attrs?.disabled;
79
+ const formReadonly = solidFormViewMetaData.data.solidView?.layout?.attrs?.readonly;
80
+
81
+ return (
82
+ <div className={className}>
83
+ <div className="relative">
84
+ <div className="flex flex-column gap-2 mt-4">
85
+ {showFieldLabel != false &&
86
+ <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">
87
+ {fieldLabel}
88
+ {fieldMetadata.required && <span className="text-red-500"> *</span>}
89
+ {/* &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
90
+ </label>
91
+ }
92
+ <InputText
93
+ readOnly={formReadonly || fieldReadonly || readOnlyPermission}
94
+ disabled={formDisabled || fieldDisabled}
95
+ id={fieldLayoutInfo.attrs.name}
96
+ name={fieldMetadata.name}
97
+ aria-describedby={`${fieldLayoutInfo.attrs.name}-help`}
98
+ // onChange={formik.handleChange}
99
+ onChange={(e) => this.fieldContext.onChange(e, 'onFieldChange')}
100
+ onBlur={(e) => this.fieldContext.onBlur(e, 'onFieldBlur')}
101
+ value={formik.values[fieldLayoutInfo.attrs.name] || ''}
102
+ />
103
+ </div>
104
+ {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
105
+ <div className="absolute mt-1">
106
+ <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
107
+ </div>
108
+ )}
109
+ </div>
110
+ </div>
111
+ );
112
+ }
113
+ }
@@ -73,29 +73,31 @@ export class SolidIntegerField implements ISolidField {
73
73
 
74
74
  return (
75
75
  <div className={className}>
76
- <div className="flex flex-column gap-2 mt-4">
77
- {showFieldLabel != false &&
78
- <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
79
- {fieldMetadata.required && <span className="text-red-500"> *</span>}
80
- {/* &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
81
- </label>
82
- }
83
- <InputNumber
84
- readOnly={formReadonly || fieldReadonly || readOnlyPermission}
85
- disabled={formDisabled || fieldDisabled}
86
- id={fieldLayoutInfo.attrs.name}
87
- aria-describedby={`${fieldLayoutInfo.attrs.name}-help`}
88
- onChange={(e: any) => {
89
- formik.setFieldValue(fieldLayoutInfo.attrs.name, e.value)
90
- }}
91
- value={formik.values[fieldLayoutInfo.attrs.name] || ''}
92
- />
93
- </div>
94
- {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
95
- <div className="absolute mt-1">
96
- <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
76
+ <div className="relative">
77
+ <div className="flex flex-column gap-2 mt-4">
78
+ {showFieldLabel != false &&
79
+ <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
80
+ {fieldMetadata.required && <span className="text-red-500"> *</span>}
81
+ {/* &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
82
+ </label>
83
+ }
84
+ <InputNumber
85
+ readOnly={formReadonly || fieldReadonly || readOnlyPermission}
86
+ disabled={formDisabled || fieldDisabled}
87
+ id={fieldLayoutInfo.attrs.name}
88
+ aria-describedby={`${fieldLayoutInfo.attrs.name}-help`}
89
+ onChange={(e: any) => {
90
+ formik.setFieldValue(fieldLayoutInfo.attrs.name, e.value)
91
+ }}
92
+ value={formik.values[fieldLayoutInfo.attrs.name] || ''}
93
+ />
97
94
  </div>
98
- )}
95
+ {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
96
+ <div className="absolute mt-1">
97
+ <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
98
+ </div>
99
+ )}
100
+ </div>
99
101
  </div>
100
102
  );
101
103
  }
@@ -57,27 +57,29 @@ export class SolidJsonField implements ISolidField {
57
57
 
58
58
  return (
59
59
  <div className={className}>
60
- <div className="flex flex-column gap-2 mt-4">
61
- {showFieldLabel != false &&
62
- <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
63
- {fieldMetadata.required && <span className="text-red-500"> *</span>}
64
- {/* &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
65
- </label>
66
- }
67
- <CodeEditor
68
- formik={formik}
69
- field={fieldLayoutInfo.attrs.name}
70
- height={fieldLayoutInfo.attrs?.height}
71
- fontSize={fieldLayoutInfo.attrs?.fontSize}
72
- readOnly={formReadonly || fieldReadonly || readOnlyPermission}
73
- >
74
- </CodeEditor>
75
- </div>
76
- {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
77
- <div className="absolute mt-1">
78
- <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
60
+ <div className="relative">
61
+ <div className="flex flex-column gap-2 mt-4">
62
+ {showFieldLabel != false &&
63
+ <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
64
+ {fieldMetadata.required && <span className="text-red-500"> *</span>}
65
+ {/* &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
66
+ </label>
67
+ }
68
+ <CodeEditor
69
+ formik={formik}
70
+ field={fieldLayoutInfo.attrs.name}
71
+ height={fieldLayoutInfo.attrs?.height}
72
+ fontSize={fieldLayoutInfo.attrs?.fontSize}
73
+ readOnly={formReadonly || fieldReadonly || readOnlyPermission}
74
+ >
75
+ </CodeEditor>
79
76
  </div>
80
- )}
77
+ {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
78
+ <div className="absolute mt-1">
79
+ <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
80
+ </div>
81
+ )}
82
+ </div>
81
83
  </div>
82
84
  );
83
85
  }