@solidstarters/solid-core-ui 1.1.27 → 1.1.29

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 (236) 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/SolidConfigureLayoutElement.d.ts.map +1 -1
  11. package/dist/components/core/common/SolidConfigureLayoutElement.js +0 -1
  12. package/dist/components/core/common/SolidConfigureLayoutElement.js.map +1 -1
  13. package/dist/components/core/common/SolidGlobalSearchElement.js +1 -1
  14. package/dist/components/core/filter/SolidManyToOneFilterElement.d.ts.map +1 -1
  15. package/dist/components/core/filter/SolidManyToOneFilterElement.js +1 -1
  16. package/dist/components/core/filter/SolidManyToOneFilterElement.js.map +1 -1
  17. package/dist/components/core/filter/SolidSelectionDynamicFilterElement.d.ts.map +1 -1
  18. package/dist/components/core/filter/SolidSelectionDynamicFilterElement.js +1 -1
  19. package/dist/components/core/filter/SolidSelectionDynamicFilterElement.js.map +1 -1
  20. package/dist/components/core/filter/SolidSelectionStaticFilterElement.d.ts.map +1 -1
  21. package/dist/components/core/filter/SolidSelectionStaticFilterElement.js +1 -1
  22. package/dist/components/core/filter/SolidSelectionStaticFilterElement.js.map +1 -1
  23. package/dist/components/core/filter/SolidVarInputsFilterElement.d.ts.map +1 -1
  24. package/dist/components/core/filter/SolidVarInputsFilterElement.js +7 -7
  25. package/dist/components/core/filter/SolidVarInputsFilterElement.js.map +1 -1
  26. package/dist/components/core/filter/fields/SolidBooleanField.d.ts.map +1 -1
  27. package/dist/components/core/filter/fields/SolidBooleanField.js +5 -5
  28. package/dist/components/core/filter/fields/SolidBooleanField.js.map +1 -1
  29. package/dist/components/core/filter/fields/SolidDateField.d.ts.map +1 -1
  30. package/dist/components/core/filter/fields/SolidDateField.js +5 -5
  31. package/dist/components/core/filter/fields/SolidDateField.js.map +1 -1
  32. package/dist/components/core/filter/fields/SolidDatetimeField.d.ts.map +1 -1
  33. package/dist/components/core/filter/fields/SolidDatetimeField.js +5 -5
  34. package/dist/components/core/filter/fields/SolidDatetimeField.js.map +1 -1
  35. package/dist/components/core/filter/fields/SolidExternalIdField.d.ts.map +1 -1
  36. package/dist/components/core/filter/fields/SolidExternalIdField.js +5 -5
  37. package/dist/components/core/filter/fields/SolidExternalIdField.js.map +1 -1
  38. package/dist/components/core/filter/fields/SolidIdField.d.ts.map +1 -1
  39. package/dist/components/core/filter/fields/SolidIdField.js +5 -5
  40. package/dist/components/core/filter/fields/SolidIdField.js.map +1 -1
  41. package/dist/components/core/filter/fields/SolidIntField.d.ts.map +1 -1
  42. package/dist/components/core/filter/fields/SolidIntField.js +6 -6
  43. package/dist/components/core/filter/fields/SolidIntField.js.map +1 -1
  44. package/dist/components/core/filter/fields/SolidMediaMultipleField.d.ts.map +1 -1
  45. package/dist/components/core/filter/fields/SolidMediaMultipleField.js +5 -5
  46. package/dist/components/core/filter/fields/SolidMediaMultipleField.js.map +1 -1
  47. package/dist/components/core/filter/fields/SolidMediaSingleField.d.ts.map +1 -1
  48. package/dist/components/core/filter/fields/SolidMediaSingleField.js +5 -5
  49. package/dist/components/core/filter/fields/SolidMediaSingleField.js.map +1 -1
  50. package/dist/components/core/filter/fields/SolidSelectionDynamicField.d.ts.map +1 -1
  51. package/dist/components/core/filter/fields/SolidSelectionDynamicField.js +5 -5
  52. package/dist/components/core/filter/fields/SolidSelectionDynamicField.js.map +1 -1
  53. package/dist/components/core/filter/fields/SolidSelectionStaticField.d.ts.map +1 -1
  54. package/dist/components/core/filter/fields/SolidSelectionStaticField.js +5 -5
  55. package/dist/components/core/filter/fields/SolidSelectionStaticField.js.map +1 -1
  56. package/dist/components/core/filter/fields/SolidShortTextField.d.ts.map +1 -1
  57. package/dist/components/core/filter/fields/SolidShortTextField.js +5 -5
  58. package/dist/components/core/filter/fields/SolidShortTextField.js.map +1 -1
  59. package/dist/components/core/filter/fields/SolidTimeField.d.ts.map +1 -1
  60. package/dist/components/core/filter/fields/SolidTimeField.js +5 -5
  61. package/dist/components/core/filter/fields/SolidTimeField.js.map +1 -1
  62. package/dist/components/core/filter/fields/SolidUuidField.d.ts.map +1 -1
  63. package/dist/components/core/filter/fields/SolidUuidField.js +5 -5
  64. package/dist/components/core/filter/fields/SolidUuidField.js.map +1 -1
  65. package/dist/components/core/filter/fields/relations/SolidRelationManyToOneField.d.ts.map +1 -1
  66. package/dist/components/core/filter/fields/relations/SolidRelationManyToOneField.js +5 -5
  67. package/dist/components/core/filter/fields/relations/SolidRelationManyToOneField.js.map +1 -1
  68. package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
  69. package/dist/components/core/form/SolidFormView.js +23 -14
  70. package/dist/components/core/form/SolidFormView.js.map +1 -1
  71. package/dist/components/core/form/fields/SolidBooleanField.d.ts.map +1 -1
  72. package/dist/components/core/form/fields/SolidBooleanField.js +4 -4
  73. package/dist/components/core/form/fields/SolidBooleanField.js.map +1 -1
  74. package/dist/components/core/form/fields/SolidDateField.d.ts.map +1 -1
  75. package/dist/components/core/form/fields/SolidDateField.js +7 -7
  76. package/dist/components/core/form/fields/SolidDateField.js.map +1 -1
  77. package/dist/components/core/form/fields/SolidDateTimeField.d.ts.map +1 -1
  78. package/dist/components/core/form/fields/SolidDateTimeField.js +7 -7
  79. package/dist/components/core/form/fields/SolidDateTimeField.js.map +1 -1
  80. package/dist/components/core/form/fields/SolidDecimalField.d.ts.map +1 -1
  81. package/dist/components/core/form/fields/SolidDecimalField.js +4 -4
  82. package/dist/components/core/form/fields/SolidDecimalField.js.map +1 -1
  83. package/dist/components/core/form/fields/SolidEmailField.d.ts +11 -0
  84. package/dist/components/core/form/fields/SolidEmailField.d.ts.map +1 -0
  85. package/dist/components/core/form/fields/SolidEmailField.js +75 -0
  86. package/dist/components/core/form/fields/SolidEmailField.js.map +1 -0
  87. package/dist/components/core/form/fields/SolidIntegerField.d.ts.map +1 -1
  88. package/dist/components/core/form/fields/SolidIntegerField.js +4 -4
  89. package/dist/components/core/form/fields/SolidIntegerField.js.map +1 -1
  90. package/dist/components/core/form/fields/SolidJsonField.d.ts.map +1 -1
  91. package/dist/components/core/form/fields/SolidJsonField.js +2 -2
  92. package/dist/components/core/form/fields/SolidJsonField.js.map +1 -1
  93. package/dist/components/core/form/fields/SolidLongTextField.d.ts.map +1 -1
  94. package/dist/components/core/form/fields/SolidLongTextField.js +2 -2
  95. package/dist/components/core/form/fields/SolidLongTextField.js.map +1 -1
  96. package/dist/components/core/form/fields/SolidMediaMultipleField.js +4 -4
  97. package/dist/components/core/form/fields/SolidMediaMultipleField.js.map +1 -1
  98. package/dist/components/core/form/fields/SolidMediaSingleField.js +2 -2
  99. package/dist/components/core/form/fields/SolidMediaSingleField.js.map +1 -1
  100. package/dist/components/core/form/fields/SolidPasswordField.d.ts +11 -0
  101. package/dist/components/core/form/fields/SolidPasswordField.d.ts.map +1 -0
  102. package/dist/components/core/form/fields/SolidPasswordField.js +73 -0
  103. package/dist/components/core/form/fields/SolidPasswordField.js.map +1 -0
  104. package/dist/components/core/form/fields/SolidRichTextField.d.ts.map +1 -1
  105. package/dist/components/core/form/fields/SolidRichTextField.js +2 -2
  106. package/dist/components/core/form/fields/SolidRichTextField.js.map +1 -1
  107. package/dist/components/core/form/fields/SolidSelectionDynamicField.d.ts.map +1 -1
  108. package/dist/components/core/form/fields/SolidSelectionDynamicField.js +4 -4
  109. package/dist/components/core/form/fields/SolidSelectionDynamicField.js.map +1 -1
  110. package/dist/components/core/form/fields/SolidSelectionStaticField.d.ts.map +1 -1
  111. package/dist/components/core/form/fields/SolidSelectionStaticField.js +5 -5
  112. package/dist/components/core/form/fields/SolidSelectionStaticField.js.map +1 -1
  113. package/dist/components/core/form/fields/SolidShortTextField.d.ts.map +1 -1
  114. package/dist/components/core/form/fields/SolidShortTextField.js +4 -4
  115. package/dist/components/core/form/fields/SolidShortTextField.js.map +1 -1
  116. package/dist/components/core/form/fields/SolidTimeField.d.ts.map +1 -1
  117. package/dist/components/core/form/fields/SolidTimeField.js +7 -7
  118. package/dist/components/core/form/fields/SolidTimeField.js.map +1 -1
  119. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts.map +1 -1
  120. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js +3 -3
  121. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js.map +1 -1
  122. package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js +1 -1
  123. package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js.map +1 -1
  124. package/dist/components/core/list/SolidListView.d.ts +2 -0
  125. package/dist/components/core/list/SolidListView.d.ts.map +1 -1
  126. package/dist/components/core/list/SolidListView.js +29 -7
  127. package/dist/components/core/list/SolidListView.js.map +1 -1
  128. package/dist/components/core/list/SolidListViewColumn.d.ts +3 -1
  129. package/dist/components/core/list/SolidListViewColumn.d.ts.map +1 -1
  130. package/dist/components/core/list/SolidListViewColumn.js +3 -3
  131. package/dist/components/core/list/SolidListViewColumn.js.map +1 -1
  132. package/dist/components/core/list/columns/SolidDateColumn.d.ts.map +1 -1
  133. package/dist/components/core/list/columns/SolidDateColumn.js +6 -2
  134. package/dist/components/core/list/columns/SolidDateColumn.js.map +1 -1
  135. package/dist/components/core/list/columns/SolidDatetimeColumn.d.ts.map +1 -1
  136. package/dist/components/core/list/columns/SolidDatetimeColumn.js +6 -2
  137. package/dist/components/core/list/columns/SolidDatetimeColumn.js.map +1 -1
  138. package/dist/components/core/list/columns/SolidExternalIdColumn.d.ts.map +1 -1
  139. package/dist/components/core/list/columns/SolidExternalIdColumn.js +6 -2
  140. package/dist/components/core/list/columns/SolidExternalIdColumn.js.map +1 -1
  141. package/dist/components/core/list/columns/SolidIdColumn.d.ts.map +1 -1
  142. package/dist/components/core/list/columns/SolidIdColumn.js +6 -2
  143. package/dist/components/core/list/columns/SolidIdColumn.js.map +1 -1
  144. package/dist/components/core/list/columns/SolidIntColumn.d.ts.map +1 -1
  145. package/dist/components/core/list/columns/SolidIntColumn.js +6 -2
  146. package/dist/components/core/list/columns/SolidIntColumn.js.map +1 -1
  147. package/dist/components/core/list/columns/SolidMediaMultipleColumn.d.ts +1 -1
  148. package/dist/components/core/list/columns/SolidMediaMultipleColumn.d.ts.map +1 -1
  149. package/dist/components/core/list/columns/SolidMediaMultipleColumn.js +17 -4
  150. package/dist/components/core/list/columns/SolidMediaMultipleColumn.js.map +1 -1
  151. package/dist/components/core/list/columns/SolidMediaSingleColumn.d.ts +1 -1
  152. package/dist/components/core/list/columns/SolidMediaSingleColumn.d.ts.map +1 -1
  153. package/dist/components/core/list/columns/SolidMediaSingleColumn.js +10 -3
  154. package/dist/components/core/list/columns/SolidMediaSingleColumn.js.map +1 -1
  155. package/dist/components/core/list/columns/SolidSelectionDynamicColumn.d.ts.map +1 -1
  156. package/dist/components/core/list/columns/SolidSelectionDynamicColumn.js +6 -2
  157. package/dist/components/core/list/columns/SolidSelectionDynamicColumn.js.map +1 -1
  158. package/dist/components/core/list/columns/SolidSelectionStaticColumn.d.ts.map +1 -1
  159. package/dist/components/core/list/columns/SolidSelectionStaticColumn.js +6 -2
  160. package/dist/components/core/list/columns/SolidSelectionStaticColumn.js.map +1 -1
  161. package/dist/components/core/list/columns/SolidShortTextColumn.d.ts.map +1 -1
  162. package/dist/components/core/list/columns/SolidShortTextColumn.js +6 -2
  163. package/dist/components/core/list/columns/SolidShortTextColumn.js.map +1 -1
  164. package/dist/components/core/list/columns/SolidTimeColumn.d.ts.map +1 -1
  165. package/dist/components/core/list/columns/SolidTimeColumn.js +6 -2
  166. package/dist/components/core/list/columns/SolidTimeColumn.js.map +1 -1
  167. package/dist/components/core/list/columns/SolidUuidColumn.d.ts.map +1 -1
  168. package/dist/components/core/list/columns/SolidUuidColumn.js +6 -2
  169. package/dist/components/core/list/columns/SolidUuidColumn.js.map +1 -1
  170. package/dist/components/core/model/FieldMetaData.js +1 -1
  171. package/dist/components/core/model/FieldMetaData.js.map +1 -1
  172. package/dist/components/core/model/FieldMetaDataForm.d.ts.map +1 -1
  173. package/dist/components/core/model/FieldMetaDataForm.js +5 -5
  174. package/dist/components/core/model/FieldMetaDataForm.js.map +1 -1
  175. package/dist/resources/globals.css +16 -2
  176. package/package.json +6 -2
  177. package/publish.js +16 -0
  178. package/src/components/auth/SolidChangeForcePassword.tsx +3 -3
  179. package/src/components/common/SolidBreadcrumb.tsx +36 -7
  180. package/src/components/core/common/FilterComponent.tsx +8 -6
  181. package/src/components/core/common/SolidConfigureLayoutElement.tsx +0 -1
  182. package/src/components/core/common/SolidGlobalSearchElement.tsx +1 -1
  183. package/src/components/core/filter/SolidManyToOneFilterElement.tsx +8 -7
  184. package/src/components/core/filter/SolidSelectionDynamicFilterElement.tsx +4 -3
  185. package/src/components/core/filter/SolidSelectionStaticFilterElement.tsx +4 -3
  186. package/src/components/core/filter/SolidVarInputsFilterElement.tsx +12 -7
  187. package/src/components/core/filter/fields/SolidBooleanField.tsx +16 -12
  188. package/src/components/core/filter/fields/SolidDateField.tsx +17 -13
  189. package/src/components/core/filter/fields/SolidDatetimeField.tsx +20 -15
  190. package/src/components/core/filter/fields/SolidExternalIdField.tsx +17 -13
  191. package/src/components/core/filter/fields/SolidIdField.tsx +25 -21
  192. package/src/components/core/filter/fields/SolidIntField.tsx +27 -23
  193. package/src/components/core/filter/fields/SolidMediaMultipleField.tsx +17 -14
  194. package/src/components/core/filter/fields/SolidMediaSingleField.tsx +17 -14
  195. package/src/components/core/filter/fields/SolidSelectionDynamicField.tsx +17 -13
  196. package/src/components/core/filter/fields/SolidSelectionStaticField.tsx +17 -13
  197. package/src/components/core/filter/fields/SolidShortTextField.tsx +17 -13
  198. package/src/components/core/filter/fields/SolidTimeField.tsx +17 -12
  199. package/src/components/core/filter/fields/SolidUuidField.tsx +17 -13
  200. package/src/components/core/filter/fields/relations/SolidRelationManyToOneField.tsx +17 -13
  201. package/src/components/core/form/SolidFormView.tsx +14 -1
  202. package/src/components/core/form/fields/SolidBooleanField.tsx +28 -26
  203. package/src/components/core/form/fields/SolidDateField.tsx +28 -26
  204. package/src/components/core/form/fields/SolidDateTimeField.tsx +29 -27
  205. package/src/components/core/form/fields/SolidDecimalField.tsx +20 -18
  206. package/src/components/core/form/fields/SolidEmailField.tsx +113 -0
  207. package/src/components/core/form/fields/SolidIntegerField.tsx +24 -22
  208. package/src/components/core/form/fields/SolidJsonField.tsx +22 -20
  209. package/src/components/core/form/fields/SolidLongTextField.tsx +24 -22
  210. package/src/components/core/form/fields/SolidMediaMultipleField.tsx +6 -6
  211. package/src/components/core/form/fields/SolidMediaSingleField.tsx +2 -2
  212. package/src/components/core/form/fields/SolidPasswordField.tsx +113 -0
  213. package/src/components/core/form/fields/SolidRichTextField.tsx +24 -21
  214. package/src/components/core/form/fields/SolidSelectionDynamicField.tsx +28 -26
  215. package/src/components/core/form/fields/SolidSelectionStaticField.tsx +30 -28
  216. package/src/components/core/form/fields/SolidShortTextField.tsx +25 -23
  217. package/src/components/core/form/fields/SolidTimeField.tsx +29 -27
  218. package/src/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +17 -15
  219. package/src/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +1 -1
  220. package/src/components/core/list/SolidListView.tsx +37 -4
  221. package/src/components/core/list/SolidListViewColumn.tsx +6 -4
  222. package/src/components/core/list/columns/SolidDateColumn.tsx +5 -2
  223. package/src/components/core/list/columns/SolidDatetimeColumn.tsx +5 -2
  224. package/src/components/core/list/columns/SolidExternalIdColumn.tsx +5 -2
  225. package/src/components/core/list/columns/SolidIdColumn.tsx +5 -2
  226. package/src/components/core/list/columns/SolidIntColumn.tsx +5 -2
  227. package/src/components/core/list/columns/SolidMediaMultipleColumn.tsx +38 -10
  228. package/src/components/core/list/columns/SolidMediaSingleColumn.tsx +21 -13
  229. package/src/components/core/list/columns/SolidSelectionDynamicColumn.tsx +5 -2
  230. package/src/components/core/list/columns/SolidSelectionStaticColumn.tsx +5 -2
  231. package/src/components/core/list/columns/SolidShortTextColumn.tsx +5 -2
  232. package/src/components/core/list/columns/SolidTimeColumn.tsx +5 -2
  233. package/src/components/core/list/columns/SolidUuidColumn.tsx +5 -2
  234. package/src/components/core/model/FieldMetaData.tsx +1 -1
  235. package/src/components/core/model/FieldMetaDataForm.tsx +6 -5
  236. package/src/resources/globals.css +16 -2
@@ -78,29 +78,31 @@ export class SolidLongTextField implements ISolidField {
78
78
 
79
79
  return (
80
80
  <div className={className}>
81
- <div className="flex flex-column gap-2 mt-4">
82
- {showFieldLabel != false &&
83
- <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
84
- {fieldMetadata.required && <span className="text-red-500"> *</span>}
85
- {/* &nbsp; {fieldDescription && <span>({fieldDescription}) </span>} */}
86
- </label>
87
- }
88
- <InputTextarea
89
- readOnly={formReadonly || fieldReadonly || readOnlyPermission}
90
- disabled={formDisabled || fieldDisabled}
91
- id={fieldLayoutInfo.attrs.name}
92
- aria-describedby={`${fieldLayoutInfo.attrs.name}-help`}
93
- onChange={formik.handleChange}
94
- value={formik.values[fieldLayoutInfo.attrs.name] || ''}
95
- rows={5}
96
- cols={30}
97
- />
98
- </div>
99
- {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
100
- <div className="absolute mt-1">
101
- <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
81
+ <div className="relative">
82
+ <div className="flex flex-column gap-2 mt-4">
83
+ {showFieldLabel != false &&
84
+ <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
85
+ {fieldMetadata.required && <span className="text-red-500"> *</span>}
86
+ {/* &nbsp; {fieldDescription && <span>({fieldDescription}) </span>} */}
87
+ </label>
88
+ }
89
+ <InputTextarea
90
+ readOnly={formReadonly || fieldReadonly || readOnlyPermission}
91
+ disabled={formDisabled || fieldDisabled}
92
+ id={fieldLayoutInfo.attrs.name}
93
+ aria-describedby={`${fieldLayoutInfo.attrs.name}-help`}
94
+ onChange={formik.handleChange}
95
+ value={formik.values[fieldLayoutInfo.attrs.name] || ''}
96
+ rows={5}
97
+ cols={30}
98
+ />
102
99
  </div>
103
- )}
100
+ {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
101
+ <div className="absolute mt-1">
102
+ <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
103
+ </div>
104
+ )}
105
+ </div>
104
106
  </div>
105
107
  );
106
108
  }
@@ -208,7 +208,7 @@ export class SolidMediaMultipleField implements ISolidField {
208
208
  const [isShowAllFiles, setShowAllFiles] = useState(false);
209
209
  return (
210
210
  <div className={className} style={readOnlyPermission === true ? { filter: 'opacity(50%)', pointerEvents: 'none' } : {}}>
211
- <div className="flex flex-column gap-2 mt-4">
211
+ <div className="flex flex-column gap-2 mt-4 relative">
212
212
  {showFieldLabel != false &&
213
213
  <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
214
214
  {fieldMetadata.required && <span className="text-red-500"> *</span>}
@@ -225,6 +225,11 @@ export class SolidMediaMultipleField implements ISolidField {
225
225
  mediaMaxSizeKb={fieldMetadata.mediaMaxSizeKb}
226
226
  />
227
227
  </div>
228
+ {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
229
+ <div className="absolute mt-1">
230
+ <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
231
+ </div>
232
+ )}
228
233
  </div>
229
234
  {fileDetails.length > 0 &&
230
235
  <div className="solid-file-upload-wrapper">
@@ -341,11 +346,6 @@ export class SolidMediaMultipleField implements ISolidField {
341
346
  })
342
347
  }
343
348
  </Dialog>
344
- {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
345
- <div className="absolute mt-1">
346
- <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
347
- </div>
348
- )}
349
349
  <Dialog
350
350
  visible={isDeleteImageDialogVisible}
351
351
  header="Confirm Delete"
@@ -203,7 +203,7 @@ export class SolidMediaSingleField implements ISolidField {
203
203
 
204
204
  return (
205
205
  <div className={className} style={readOnlyPermission === true ? { filter: 'opacity(50%)', pointerEvents: 'none' } : {}}>
206
- <div className="flex flex-column gap-2 mt-4">
206
+ <div className="flex flex-column gap-2 mt-4 relative">
207
207
  {showFieldLabel != false &&
208
208
  <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
209
209
  {fieldMetadata.required && <span className="text-red-500"> *</span>}
@@ -226,7 +226,7 @@ export class SolidMediaSingleField implements ISolidField {
226
226
  </div>
227
227
  )}
228
228
  {fileDetails && (
229
- <div className="solid-file-upload-wrapper">
229
+ <div className="solid-file-upload-wrapper mt-4">
230
230
  <div className="flex align-items-center gap-2">
231
231
  <FileReaderExt fileDetails={fileDetails} />
232
232
  <div className="w-full flex flex-column gap-1">
@@ -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
+ import { Password } from "primereact/password";
8
+
9
+ export class SolidPasswordField implements ISolidField {
10
+
11
+ private fieldContext: SolidFieldProps;
12
+
13
+ constructor(fieldContext: SolidFieldProps) {
14
+ this.fieldContext = fieldContext;
15
+ }
16
+
17
+ updateFormData(value: any, formData: FormData): any {
18
+ const fieldLayoutInfo = this.fieldContext.field;
19
+ if (value) {
20
+ formData.append(fieldLayoutInfo.attrs.name, value);
21
+ }
22
+ }
23
+
24
+ initialValue(): any {
25
+ const fieldName = this.fieldContext.field.attrs.name;
26
+ const fieldDefaultValue = this.fieldContext?.fieldMetadata?.defaultValue;
27
+
28
+ const existingValue = this.fieldContext.data[fieldName];
29
+
30
+ return existingValue !== undefined && existingValue !== null ? existingValue : fieldDefaultValue || '';
31
+ }
32
+
33
+ validationSchema(): Schema {
34
+ let schema: Yup.StringSchema<string | null | undefined> = Yup.string();
35
+
36
+ const fieldMetadata = this.fieldContext.fieldMetadata;
37
+ const fieldLayoutInfo = this.fieldContext.field;
38
+ const fieldLabel = fieldLayoutInfo.attrs.label ?? fieldMetadata.displayName;
39
+
40
+ // 1. required
41
+ // 1. required
42
+ if (fieldMetadata.required) {
43
+ schema = schema.required(`${fieldLabel} is required.`);
44
+ } else {
45
+ schema = schema.nullable(); // Allow null when not required
46
+ }
47
+
48
+ // 2. length (min/max)
49
+ if (fieldMetadata.min && fieldMetadata.min > 0) {
50
+ schema = schema.min(fieldMetadata.min, `${fieldLabel} should be at-least ${fieldMetadata.min} characters long.`);
51
+ }
52
+ if (fieldMetadata.max && fieldMetadata.max > 0) {
53
+ schema = schema.max(fieldMetadata.max, `${fieldLabel} should not be more than ${fieldMetadata.max} characters long.`);
54
+ }
55
+ // 3. regular expression
56
+ if (fieldMetadata.regexPattern) {
57
+ const regexPatternNotMatchingErrorMsg = fieldMetadata.regexPatternNotMatchingErrorMsg ?? `${fieldLabel} has invalid data.`
58
+ schema = schema.matches(fieldMetadata.regexPattern, regexPatternNotMatchingErrorMsg);
59
+ }
60
+
61
+ return schema;
62
+ }
63
+
64
+ render(formik: FormikObject) {
65
+ const fieldMetadata = this.fieldContext.fieldMetadata;
66
+ const fieldLayoutInfo = this.fieldContext.field;
67
+ const className = fieldLayoutInfo.attrs?.className || 'field col-12';
68
+ const fieldLabel = fieldLayoutInfo.attrs.label ?? fieldMetadata.displayName;
69
+ const fieldDescription = fieldLayoutInfo.attrs.description ?? fieldMetadata.description;
70
+ const solidFormViewMetaData = this.fieldContext.solidFormViewMetaData;
71
+ const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
72
+ const readOnlyPermission = this.fieldContext.readOnly;
73
+
74
+ const isFormFieldValid = (formik: any, fieldName: string) => formik.touched[fieldName] && formik.errors[fieldName];
75
+
76
+ const fieldDisabled = fieldLayoutInfo.attrs?.disabled;
77
+ const fieldReadonly = fieldLayoutInfo.attrs?.readonly;
78
+
79
+ const formDisabled = solidFormViewMetaData.data.solidView?.layout?.attrs?.disabled;
80
+ const formReadonly = solidFormViewMetaData.data.solidView?.layout?.attrs?.readonly;
81
+
82
+ return (
83
+ <div className={className}>
84
+ <div className="relative">
85
+ <div className="flex flex-column gap-2 mt-4">
86
+ {showFieldLabel != false &&
87
+ <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">
88
+ {fieldLabel}
89
+ {fieldMetadata.required && <span className="text-red-500"> *</span>}
90
+ </label>
91
+ }
92
+ <Password
93
+ id={fieldLayoutInfo.attrs.name}
94
+ name={fieldMetadata.name}
95
+ value={formik.values[fieldLayoutInfo.attrs.name] || ''}
96
+ onChange={(e) => this.fieldContext.onChange(e, 'onFieldChange')}
97
+ onBlur={(e) => this.fieldContext.onBlur(e, 'onFieldBlur')}
98
+ readOnly={formReadonly || fieldReadonly || readOnlyPermission}
99
+ disabled={formDisabled || fieldDisabled}
100
+ toggleMask
101
+ />
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
+ }
@@ -76,28 +76,31 @@ export class SolidRichTextField implements ISolidField {
76
76
 
77
77
  return (
78
78
  <div className={className}>
79
- <div className="flex flex-column gap-2 mt-4">
80
- {showFieldLabel != false &&
81
- <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
82
- {fieldMetadata.required && <span className="text-red-500"> *</span>}
83
- {/* &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
84
- </label>
85
- }
86
- <Editor
87
- readOnly={formReadonly || fieldReadonly || readOnlyPermission}
88
- disabled={formDisabled || fieldDisabled}
89
- key={fieldLayoutInfo.attrs.name} // React will re-render the component whenever this value changes
90
- id={fieldLayoutInfo.attrs.name}
91
- value={formik.values[fieldLayoutInfo.attrs.name]}
92
- onTextChange={e => formik.setFieldValue(fieldLayoutInfo.attrs.name, e.htmlValue)}
93
- style={{ height: "320px" }}
94
- />
95
- </div>
96
- {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
97
- <div className="absolute mt-1">
98
- <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
79
+ <div className="relative">
80
+ <div className="flex flex-column gap-2 mt-4">
81
+ {showFieldLabel != false &&
82
+ <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
83
+ {fieldMetadata.required && <span className="text-red-500"> *</span>}
84
+ {/* &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
85
+ </label>
86
+ }
87
+ <Editor
88
+ readOnly={formReadonly || fieldReadonly || readOnlyPermission}
89
+ disabled={formDisabled || fieldDisabled}
90
+ key={fieldLayoutInfo.attrs.name} // React will re-render the component whenever this value changes
91
+ id={fieldLayoutInfo.attrs.name}
92
+ value={formik.values[fieldLayoutInfo.attrs.name]}
93
+ onTextChange={e => formik.setFieldValue(fieldLayoutInfo.attrs.name, e.htmlValue)}
94
+ style={{ height: "320px" }}
95
+ className="solid-custom-editor"
96
+ />
99
97
  </div>
100
- )}
98
+ {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
99
+ <div className="absolute mt-1">
100
+ <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
101
+ </div>
102
+ )}
103
+ </div>
101
104
  </div>
102
105
  );
103
106
  }
@@ -95,33 +95,35 @@ export class SolidSelectionDynamicField implements ISolidField {
95
95
 
96
96
  return (
97
97
  <div className={className}>
98
- <div className="flex flex-column gap-2 mt-4">
99
- {showFieldLabel != false &&
100
- <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
101
- {fieldMetadata.required && <span className="text-red-500"> *</span>}
102
- {/* &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
103
- </label>
104
- }
105
- <AutoComplete
106
- readOnly={formReadonly || fieldReadonly || readOnlyPermission}
107
- disabled={formDisabled || fieldDisabled}
108
- {...formik.getFieldProps(fieldLayoutInfo.attrs.name)}
109
- id={fieldLayoutInfo.attrs.name}
110
- field="label"
111
- value={formik.values[fieldLayoutInfo.attrs.name] || ''}
112
- dropdown
113
- suggestions={selectionDynamicItems}
114
- completeMethod={selectionDynamicSearch}
115
- // onChange={(e) => updateInputs(index, e.value)} />
116
- onChange={formik.handleChange}
117
- className="solid-standard-autocomplete"
118
- />
119
- </div>
120
- {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
121
- <div className="absolute mt-1">
122
- <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
98
+ <div className="relative">
99
+ <div className="flex flex-column gap-2 mt-4">
100
+ {showFieldLabel != false &&
101
+ <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
102
+ {fieldMetadata.required && <span className="text-red-500"> *</span>}
103
+ {/* &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
104
+ </label>
105
+ }
106
+ <AutoComplete
107
+ readOnly={formReadonly || fieldReadonly || readOnlyPermission}
108
+ disabled={formDisabled || fieldDisabled}
109
+ {...formik.getFieldProps(fieldLayoutInfo.attrs.name)}
110
+ id={fieldLayoutInfo.attrs.name}
111
+ field="label"
112
+ value={formik.values[fieldLayoutInfo.attrs.name] || ''}
113
+ dropdown
114
+ suggestions={selectionDynamicItems}
115
+ completeMethod={selectionDynamicSearch}
116
+ // onChange={(e) => updateInputs(index, e.value)} />
117
+ onChange={formik.handleChange}
118
+ className="solid-standard-autocomplete"
119
+ />
123
120
  </div>
124
- )}
121
+ {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
122
+ <div className="absolute mt-1">
123
+ <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
124
+ </div>
125
+ )}
126
+ </div>
125
127
  </div>
126
128
  );
127
129
  }
@@ -100,35 +100,37 @@ export class SolidSelectionStaticField implements ISolidField {
100
100
 
101
101
  return (
102
102
  <div className={className}>
103
- <div className="flex flex-column gap-2 mt-4">
104
- {showFieldLabel != false &&
105
- <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
106
- {fieldMetadata.required && <span className="text-red-500"> *</span>}
107
- {/* &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
108
- </label>
109
- }
110
- <AutoComplete
111
- readOnly={formReadonly || fieldReadonly || readOnlyPermission}
112
- disabled={formDisabled || fieldDisabled}
113
- {...formik.getFieldProps(fieldLayoutInfo.attrs.name)}
114
- id={fieldLayoutInfo.attrs.name}
115
- name={fieldLayoutInfo.attrs.name}
116
- field="label"
117
- value={formik.values[fieldLayoutInfo.attrs.name] || ''}
118
- dropdown
119
- suggestions={selectionStaticItems}
120
- completeMethod={selectionStaticSearch}
121
- // onChange={(e) => updateInputs(index, e.value)} />
122
- // onChange={formik.handleChange}
123
- onChange={(e) => this.fieldContext.onChange(e, 'onFieldChange')}
124
- className="solid-standard-autocomplete"
125
- />
126
- </div>
127
- {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
128
- <div className="absolute mt-1">
129
- <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
103
+ <div className="relative">
104
+ <div className="flex flex-column gap-2 mt-4">
105
+ {showFieldLabel != false &&
106
+ <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
107
+ {fieldMetadata.required && <span className="text-red-500"> *</span>}
108
+ {/* &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
109
+ </label>
110
+ }
111
+ <AutoComplete
112
+ readOnly={formReadonly || fieldReadonly || readOnlyPermission}
113
+ disabled={formDisabled || fieldDisabled}
114
+ {...formik.getFieldProps(fieldLayoutInfo.attrs.name)}
115
+ id={fieldLayoutInfo.attrs.name}
116
+ name={fieldLayoutInfo.attrs.name}
117
+ field="label"
118
+ value={formik.values[fieldLayoutInfo.attrs.name] || ''}
119
+ dropdown
120
+ suggestions={selectionStaticItems}
121
+ completeMethod={selectionStaticSearch}
122
+ // onChange={(e) => updateInputs(index, e.value)} />
123
+ // onChange={formik.handleChange}
124
+ onChange={(e) => this.fieldContext.onChange(e, 'onFieldChange')}
125
+ className="solid-standard-autocomplete"
126
+ />
130
127
  </div>
131
- )}
128
+ {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
129
+ <div className="absolute mt-1">
130
+ <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
131
+ </div>
132
+ )}
133
+ </div>
132
134
  </div>
133
135
  );
134
136
  }
@@ -82,30 +82,32 @@ export class SolidShortTextField implements ISolidField {
82
82
  return (
83
83
  <>
84
84
  {includeWrapper === 'yes' && <div className={className}>
85
- <div className="flex flex-column gap-2 mt-4">
86
- {showFieldLabel != false &&
87
- <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{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()} />
85
+ <div className="relative">
86
+ <div className="flex flex-column gap-2 mt-4">
87
+ {showFieldLabel != false &&
88
+ <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
89
+ {fieldMetadata.required && <span className="text-red-500"> *</span>}
90
+ {/* &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
91
+ </label>
92
+ }
93
+ <InputText
94
+ readOnly={formReadonly || fieldReadonly || readOnlyPermission}
95
+ disabled={formDisabled || fieldDisabled}
96
+ id={fieldLayoutInfo.attrs.name}
97
+ name={fieldMetadata.name}
98
+ aria-describedby={`${fieldLayoutInfo.attrs.name}-help`}
99
+ // onChange={formik.handleChange}
100
+ onChange={(e) => this.fieldContext.onChange(e, 'onFieldChange')}
101
+ onBlur={(e) => this.fieldContext.onBlur(e, 'onFieldBlur')}
102
+ value={formik.values[fieldLayoutInfo.attrs.name] || ''}
103
+ />
107
104
  </div>
108
- )}
105
+ {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
106
+ <div className="absolute mt-1">
107
+ <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
108
+ </div>
109
+ )}
110
+ </div>
109
111
  </div>}
110
112
  {includeWrapper === 'no' &&
111
113
  <>
@@ -61,35 +61,37 @@ export class SolidTimeField 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] ? formik.values[fieldLayoutInfo.attrs.name] : Date()}
79
- // dateFormat="mm/dd/yy"
80
- // placeholder="mm/dd/yyyy hh:mm"
81
- hideOnDateTimeSelect
82
- timeOnly
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] ? formik.values[fieldLayoutInfo.attrs.name] : Date()}
80
+ // dateFormat="mm/dd/yy"
81
+ // placeholder="mm/dd/yyyy hh:mm"
82
+ hideOnDateTimeSelect
83
+ timeOnly
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
  }
@@ -242,28 +242,30 @@ export class SolidRelationManyToManyField implements ISolidField {
242
242
 
243
243
  return (
244
244
  <div className={className}>
245
- <div className="flex align-items-center gap-3">
246
- {showFieldLabel != false &&
247
- <label className="form-field-label">
248
- {capitalize(fieldLayoutInfo.attrs.name)}
249
- {fieldMetadata.required && <span className="text-red-500"> *</span>}
250
- </label>
251
- }
252
- {fieldLayoutInfo.attrs.inlineCreate === "true" &&
253
- this.renderSolidFormEmbededView(formik, customCreateHandler, visibleCreateRelationEntity, setvisibleCreateRelationEntity)
254
- }
255
- <div className="many-to-many-add" >
256
- {/* <Button icon="pi pi-plus"
245
+ <div className="relative">
246
+ <div className="flex align-items-center gap-3">
247
+ {showFieldLabel != false &&
248
+ <label className="form-field-label">
249
+ {capitalize(fieldLayoutInfo.attrs.name)}
250
+ {fieldMetadata.required && <span className="text-red-500"> *</span>}
251
+ </label>
252
+ }
253
+ {fieldLayoutInfo.attrs.inlineCreate === "true" &&
254
+ this.renderSolidFormEmbededView(formik, customCreateHandler, visibleCreateRelationEntity, setvisibleCreateRelationEntity)
255
+ }
256
+ <div className="many-to-many-add" >
257
+ {/* <Button icon="pi pi-plus"
257
258
  rounded
258
259
  outlined
259
260
  aria-label="Filter"
260
261
  type="button"
261
262
  onClick={() => autoCompleteSearch()}
262
263
  /> */}
264
+ </div>
265
+ </div>
266
+ <div>
267
+ {options.togglerElement}
263
268
  </div>
264
- </div>
265
- <div>
266
- {options.togglerElement}
267
269
  </div>
268
270
  </div>
269
271
  );
@@ -137,7 +137,7 @@ export class SolidRelationManyToOneField implements ISolidField {
137
137
  }
138
138
  return (
139
139
  <div className={className}>
140
- <div className="mt-4">
140
+ <div className="mt-4 relative">
141
141
  {showFieldLabel != false &&
142
142
  <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">
143
143
  {fieldLabel}