@m4l/components 9.19.0 → 9.20.0

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 (175) hide show
  1. package/components/CheckableList/slots/styled.d.ts +3 -3
  2. package/components/DynamicForm/DynamicForm.d.ts.map +1 -1
  3. package/components/DynamicForm/DynamicForm.js +121 -81
  4. package/components/DynamicForm/DynamicForm.styles.d.ts.map +1 -1
  5. package/components/DynamicForm/DynamicForm.styles.js +104 -20
  6. package/components/DynamicForm/constants.d.ts +1 -1
  7. package/components/DynamicForm/constants.d.ts.map +1 -1
  8. package/components/DynamicForm/constants.js +10 -10
  9. package/components/DynamicForm/dictionary.d.ts +9 -1
  10. package/components/DynamicForm/dictionary.d.ts.map +1 -1
  11. package/components/DynamicForm/dictionary.js +14 -5
  12. package/components/DynamicForm/helpers/applyRequiredValidation/applyRequiredValidation.d.ts.map +1 -1
  13. package/components/DynamicForm/helpers/createFieldValidationSchema/createFieldValidationSchema.d.ts.map +1 -1
  14. package/components/DynamicForm/helpers/createFieldValidationSchema/createFieldValidationSchema.js +24 -22
  15. package/components/DynamicForm/helpers/createFieldValidationSchema/strategies/baseSchema/baseSchemaStrategies.d.ts +7 -0
  16. package/components/DynamicForm/helpers/createFieldValidationSchema/strategies/baseSchema/baseSchemaStrategies.d.ts.map +1 -1
  17. package/components/DynamicForm/helpers/createFieldValidationSchema/strategies/baseSchema/baseSchemaStrategies.js +46 -30
  18. package/components/DynamicForm/helpers/createFieldValidationSchema/strategies/baseSchema/createBaseSchema.d.ts +1 -0
  19. package/components/DynamicForm/helpers/createFieldValidationSchema/strategies/baseSchema/createBaseSchema.d.ts.map +1 -1
  20. package/components/DynamicForm/helpers/createFieldValidationSchema/strategies/baseSchema/createBaseSchema.js +8 -6
  21. package/components/DynamicForm/helpers/createFieldValidationSchema/strategies/validation/validationStrategies.d.ts.map +1 -1
  22. package/components/DynamicForm/helpers/createFieldValidationSchema/strategies/validation/validationStrategies.js +37 -37
  23. package/components/DynamicForm/helpers/filterUnknownFieldsFromSubmit/filterUnknownFieldsFromSubmit.d.ts +14 -0
  24. package/components/DynamicForm/helpers/filterUnknownFieldsFromSubmit/filterUnknownFieldsFromSubmit.d.ts.map +1 -0
  25. package/components/DynamicForm/helpers/filterUnknownFieldsFromSubmit/index.d.ts +2 -0
  26. package/components/DynamicForm/helpers/filterUnknownFieldsFromSubmit/index.d.ts.map +1 -0
  27. package/components/DynamicForm/helpers/getFieldTypeApiKey/getFieldTypeApiKey.d.ts +8 -0
  28. package/components/DynamicForm/helpers/getFieldTypeApiKey/getFieldTypeApiKey.d.ts.map +1 -0
  29. package/components/DynamicForm/helpers/getFieldTypeApiKey/getFieldTypeApiKey.js +24 -0
  30. package/components/DynamicForm/helpers/getFieldTypeApiKey/index.d.ts +2 -0
  31. package/components/DynamicForm/helpers/getFieldTypeApiKey/index.d.ts.map +1 -0
  32. package/components/DynamicForm/helpers/index.d.ts +3 -0
  33. package/components/DynamicForm/helpers/index.d.ts.map +1 -1
  34. package/components/DynamicForm/helpers/isPositiveInteger.d.ts +1 -1
  35. package/components/DynamicForm/helpers/mapImageSelectorValuesForSubmit/index.d.ts +2 -0
  36. package/components/DynamicForm/helpers/mapImageSelectorValuesForSubmit/index.d.ts.map +1 -0
  37. package/components/DynamicForm/helpers/mapImageSelectorValuesForSubmit/mapImageSelectorValuesForSubmit.d.ts +9 -0
  38. package/components/DynamicForm/helpers/mapImageSelectorValuesForSubmit/mapImageSelectorValuesForSubmit.d.ts.map +1 -0
  39. package/components/DynamicForm/helpers/mapImageSelectorValuesForSubmit/mapImageSelectorValuesForSubmit.js +26 -0
  40. package/components/DynamicForm/helpers/resolveFieldComponent/resolveFieldComponent.d.ts +4 -2
  41. package/components/DynamicForm/helpers/resolveFieldComponent/resolveFieldComponent.d.ts.map +1 -1
  42. package/components/DynamicForm/helpers/resolveFieldComponent/resolveFieldComponent.js +10 -9
  43. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/autocompleteStrategy/autocompleteStrategy.d.ts.map +1 -1
  44. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/autocompleteStrategy/autocompleteStrategy.js +36 -37
  45. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/autocompleteStrategy/normalizeAutocompletePropsFromBackend.d.ts +1 -1
  46. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/autocompleteStrategy/normalizeAutocompletePropsFromBackend.d.ts.map +1 -1
  47. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/autocompleteStrategy/normalizeAutocompletePropsFromBackend.js +25 -24
  48. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/checkableListStrategy.d.ts.map +1 -1
  49. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/checkableListStrategy.js +26 -26
  50. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/helpers/whitelist/propertyNormalizers.d.ts +1 -1
  51. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/normalizeCheckableListPropsFromBackend.d.ts +3 -3
  52. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/normalizeCheckableListPropsFromBackend.d.ts.map +1 -1
  53. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/normalizeCheckableListPropsFromBackend.js +10 -9
  54. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/types.d.ts +2 -2
  55. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkboxStrategy/checkboxStrategy.d.ts.map +1 -1
  56. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkboxStrategy/checkboxStrategy.js +13 -13
  57. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkboxStrategy/normalizeCheckboxPropsFromBackend.d.ts +2 -2
  58. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkboxStrategy/normalizeCheckboxPropsFromBackend.d.ts.map +1 -1
  59. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkboxStrategy/normalizeCheckboxPropsFromBackend.js +9 -8
  60. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/dateRangePickerStrategy/dateRangePickerStrategy.d.ts.map +1 -1
  61. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/dateRangePickerStrategy/dateRangePickerStrategy.js +12 -12
  62. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/dateRangePickerStrategy/normalizeDateRangePickerPropsFromBackend.d.ts +4 -4
  63. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/dateRangePickerStrategy/normalizeDateRangePickerPropsFromBackend.d.ts.map +1 -1
  64. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/dateRangePickerStrategy/normalizeDateRangePickerPropsFromBackend.js +7 -6
  65. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/daysOfWeekPickerStrategy/daysOfWeekPickerStrategy.d.ts.map +1 -1
  66. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/daysOfWeekPickerStrategy/daysOfWeekPickerStrategy.js +15 -15
  67. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/daysOfWeekPickerStrategy/normalizeDaysOfWeekPickerPropsFromBackend.d.ts +2 -2
  68. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/daysOfWeekPickerStrategy/normalizeDaysOfWeekPickerPropsFromBackend.d.ts.map +1 -1
  69. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/daysOfWeekPickerStrategy/normalizeDaysOfWeekPickerPropsFromBackend.js +9 -8
  70. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/imageSelectorStrategy/imageSelectorStrategy.d.ts +7 -0
  71. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/imageSelectorStrategy/imageSelectorStrategy.d.ts.map +1 -0
  72. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/imageSelectorStrategy/imageSelectorStrategy.js +41 -0
  73. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/imageSelectorStrategy/normalizeImageSelectorPropsFromBackend.d.ts +10 -0
  74. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/imageSelectorStrategy/normalizeImageSelectorPropsFromBackend.d.ts.map +1 -0
  75. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/imageSelectorStrategy/normalizeImageSelectorPropsFromBackend.js +70 -0
  76. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/imageSelectorStrategy/types.d.ts +9 -0
  77. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/imageSelectorStrategy/types.d.ts.map +1 -0
  78. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/index.d.ts +1 -0
  79. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/index.d.ts.map +1 -1
  80. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/normalizeRhfLabelRelatedPropsFromBackend.d.ts +1 -1
  81. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/numberInputStrategy/normalizeNumberInputPropsFromBackend.d.ts +2 -2
  82. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/numberInputStrategy/normalizeNumberInputPropsFromBackend.d.ts.map +1 -1
  83. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/numberInputStrategy/normalizeNumberInputPropsFromBackend.js +6 -5
  84. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/numberInputStrategy/numberInputStrategy.d.ts.map +1 -1
  85. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/numberInputStrategy/numberInputStrategy.js +15 -15
  86. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/normalizeRadioGroupPropsFromBackend.d.ts +4 -4
  87. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/normalizeRadioGroupPropsFromBackend.d.ts.map +1 -1
  88. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/normalizeRadioGroupPropsFromBackend.js +16 -15
  89. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/radioGroupStrategy.d.ts.map +1 -1
  90. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/radioGroupStrategy.js +16 -16
  91. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/registry.d.ts.map +1 -1
  92. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/registry.js +8 -6
  93. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/selectStrategy/normalizeSelectPropsFromBackend.d.ts +3 -3
  94. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/selectStrategy/normalizeSelectPropsFromBackend.d.ts.map +1 -1
  95. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/selectStrategy/normalizeSelectPropsFromBackend.js +6 -5
  96. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/selectStrategy/selectStrategy.d.ts.map +1 -1
  97. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/selectStrategy/selectStrategy.js +16 -16
  98. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/textFieldStrategy/normalizeTextFieldPropsFromBackend.d.ts +2 -2
  99. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/textFieldStrategy/normalizeTextFieldPropsFromBackend.d.ts.map +1 -1
  100. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/textFieldStrategy/normalizeTextFieldPropsFromBackend.js +13 -12
  101. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/textFieldStrategy/textFieldStrategy.d.ts.map +1 -1
  102. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/textFieldStrategy/textFieldStrategy.js +35 -18
  103. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/types.d.ts +2 -0
  104. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/types.d.ts.map +1 -1
  105. package/components/DynamicForm/helpers/resolveFieldComponent/types.d.ts +16 -1
  106. package/components/DynamicForm/helpers/resolveFieldComponent/types.d.ts.map +1 -1
  107. package/components/DynamicForm/helpers/resolveFieldContractAliases.d.ts +19 -0
  108. package/components/DynamicForm/helpers/resolveFieldContractAliases.d.ts.map +1 -0
  109. package/components/DynamicForm/helpers/resolveFieldContractAliases.js +23 -0
  110. package/components/DynamicForm/helpers/resolveFieldInputLabel/resolveFieldInputLabel.d.ts +1 -1
  111. package/components/DynamicForm/helpers/resolveFieldInputLabel/resolveFieldInputLabel.d.ts.map +1 -1
  112. package/components/DynamicForm/helpers/resolveFieldInputLabel/resolveFieldInputLabel.js +6 -5
  113. package/components/DynamicForm/helpers/resolveInitialValue/resolveInitialValue.d.ts.map +1 -1
  114. package/components/DynamicForm/helpers/resolveInitialValue/resolveInitialValue.js +83 -66
  115. package/components/DynamicForm/helpers/resolveInitialValue/types.d.ts +9 -2
  116. package/components/DynamicForm/helpers/resolveInitialValue/types.d.ts.map +1 -1
  117. package/components/DynamicForm/hooks/useDynamicForm/useDynamicForm.d.ts.map +1 -1
  118. package/components/DynamicForm/hooks/useDynamicForm/useDynamicForm.js +26 -24
  119. package/components/DynamicForm/hooks/useDynamicFormConditionals/useDynamicFormConditionals.js +22 -22
  120. package/components/DynamicForm/hooks/useDynamicFormCoupled/types.d.ts +1 -1
  121. package/components/DynamicForm/hooks/useDynamicFormCoupled/types.d.ts.map +1 -1
  122. package/components/DynamicForm/hooks/useDynamicFormCoupled/useDynamicFormCoupled.d.ts.map +1 -1
  123. package/components/DynamicForm/hooks/useDynamicFormCoupled/useDynamicFormCoupled.js +26 -24
  124. package/components/DynamicForm/hooks/useDynamicFormData/types.d.ts +11 -2
  125. package/components/DynamicForm/hooks/useDynamicFormData/types.d.ts.map +1 -1
  126. package/components/DynamicForm/hooks/useDynamicFormData/useDynamicFormData.d.ts +2 -1
  127. package/components/DynamicForm/hooks/useDynamicFormData/useDynamicFormData.d.ts.map +1 -1
  128. package/components/DynamicForm/hooks/useDynamicFormData/useDynamicFormData.js +72 -50
  129. package/components/DynamicForm/hooks/useFieldsWithFetchedOptions/useFieldsWithFetchedOptions.d.ts.map +1 -1
  130. package/components/DynamicForm/hooks/useFieldsWithFetchedOptions/useFieldsWithFetchedOptions.js +3 -3
  131. package/components/DynamicForm/index.d.ts +1 -0
  132. package/components/DynamicForm/index.d.ts.map +1 -1
  133. package/components/DynamicForm/slots/DynamicFormEnum.d.ts +4 -1
  134. package/components/DynamicForm/slots/DynamicFormEnum.d.ts.map +1 -1
  135. package/components/DynamicForm/slots/DynamicFormEnum.js +2 -2
  136. package/components/DynamicForm/slots/DynamicFormSlots.d.ts +9 -0
  137. package/components/DynamicForm/slots/DynamicFormSlots.d.ts.map +1 -1
  138. package/components/DynamicForm/slots/DynamicFormSlots.js +36 -23
  139. package/components/DynamicForm/subcomponents/DynamicFormContent/DynamicFormContent.d.ts.map +1 -1
  140. package/components/DynamicForm/subcomponents/DynamicFormContent/DynamicFormContent.js +85 -46
  141. package/components/DynamicForm/types.d.ts +127 -34
  142. package/components/DynamicForm/types.d.ts.map +1 -1
  143. package/components/ImageSelector/ImageSelector.d.ts.map +1 -1
  144. package/components/ImageSelector/ImageSelector.js +103 -101
  145. package/components/ImageSelector/hooks/useImageSelector.d.ts +1 -1
  146. package/components/ImageSelector/hooks/useImageSelector.d.ts.map +1 -1
  147. package/components/ImageSelector/hooks/useImageSelector.js +172 -168
  148. package/components/ImageSelector/types.d.ts +12 -4
  149. package/components/ImageSelector/types.d.ts.map +1 -1
  150. package/components/Label/Label.d.ts.map +1 -1
  151. package/components/Label/Label.js +31 -28
  152. package/components/Label/types.d.ts +6 -0
  153. package/components/Label/types.d.ts.map +1 -1
  154. package/components/PropertyValue/PropertyValue.d.ts.map +1 -1
  155. package/components/PropertyValue/PropertyValue.js +39 -37
  156. package/components/extended/mui/Accordion/Accordion.d.ts.map +1 -1
  157. package/components/extended/mui/Accordion/Accordion.js +67 -53
  158. package/components/extended/mui/Accordion/slots/AccordionEnum.d.ts +2 -0
  159. package/components/extended/mui/Accordion/slots/AccordionEnum.d.ts.map +1 -1
  160. package/components/extended/mui/Accordion/slots/AccordionEnum.js +1 -1
  161. package/components/extended/mui/Accordion/slots/AccordionSlots.d.ts +6 -0
  162. package/components/extended/mui/Accordion/slots/AccordionSlots.d.ts.map +1 -1
  163. package/components/extended/mui/Accordion/slots/AccordionSlots.js +22 -14
  164. package/components/extended/mui/Accordion/styles.d.ts.map +1 -1
  165. package/components/extended/mui/Accordion/styles.js +35 -8
  166. package/components/extended/mui/Accordion/types.d.ts +5 -0
  167. package/components/extended/mui/Accordion/types.d.ts.map +1 -1
  168. package/components/extended/mui/Tab/constants.d.ts +1 -1
  169. package/components/hook-form/RHFCheckbox/slots/RHFCheckBoxSlots.d.ts +1 -1
  170. package/components/hook-form/RHFNumberInput/RHFNumberInput.d.ts.map +1 -1
  171. package/components/hook-form/RHFNumberInput/RHFNumberInput.js +38 -36
  172. package/components/hook-form/RHFTextField/RHFTextField.d.ts.map +1 -1
  173. package/components/hook-form/RHFTextField/RHFTextField.js +48 -46
  174. package/index.js +519 -517
  175. package/package.json +6 -6
@@ -1,5 +1,5 @@
1
- const _ = "dynamic_form", e = {
2
- /** Shown when `field.fieldLabel` is missing or blank; use `$1` for the field id (e.g. "Label not found $1"). */
1
+ const _ = "dynamic_form", e = () => [_], E = {
2
+ /** Shown when `field.label` is missing or blank; use `$1` for the field id (e.g. "Label not found $1"). */
3
3
  LABEL_NOT_FOUND_MESSAGE: `${_}.label_not_found_message`,
4
4
  IS_REQUIRED_MESSAGE: `${_}.is_required_message`,
5
5
  DATE_RANGE_REQUIRED_MESSAGE: `${_}.date_range_required_message`,
@@ -10,9 +10,18 @@ const _ = "dynamic_form", e = {
10
10
  EMAIL_INVALID_MESSAGE: `${_}.email_invalid_message`,
11
11
  URL_INVALID_MESSAGE: `${_}.url_invalid_message`,
12
12
  PATTERN_INVALID_MESSAGE: `${_}.pattern_invalid_message`,
13
- CUSTOM_VALIDATION_MESSAGE: `${_}.custom_validation_message`
13
+ CUSTOM_VALIDATION_MESSAGE: `${_}.custom_validation_message`,
14
+ /** Shown in the Chip when a field uses an unknown/unregistered componentId. */
15
+ UNKNOWN_COMPONENT_MESSAGE: `${_}.unknown_component_message`,
16
+ /** Replaces the original helperMessage when the field is rendered as fallback. */
17
+ FIELD_LOAD_ERROR_MESSAGE: `${_}.field_load_error_message`,
18
+ /** Shown when the last decoupled DynamicForm submit completes successfully. */
19
+ SUBMIT_SUCCESS_MESSAGE: `${_}.submit_success_message`,
20
+ /** Shown when the last decoupled DynamicForm submit fails. */
21
+ SUBMIT_ERROR_MESSAGE: `${_}.submit_error_message`
14
22
  };
15
23
  export {
16
- e as DYNAMIC_FORM_DICTIONARY,
17
- _ as DYNAMIC_FORM_DICTIONARY_KEY
24
+ E as DYNAMIC_FORM_DICTIONARY,
25
+ _ as DYNAMIC_FORM_DICTIONARY_KEY,
26
+ e as getDynamicFormComponentsDictionary
18
27
  };
@@ -1 +1 @@
1
- {"version":3,"file":"applyRequiredValidation.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/DynamicForm/helpers/applyRequiredValidation/applyRequiredValidation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,cAAc,EACtB,UAAU,EAAE,cAAc,EAC1B,YAAY,EAAE,MAAM,GACnB,cAAc,CA4ChB"}
1
+ {"version":3,"file":"applyRequiredValidation.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/DynamicForm/helpers/applyRequiredValidation/applyRequiredValidation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,cAAc,EACtB,UAAU,EAAE,cAAc,EAC1B,YAAY,EAAE,MAAM,GACnB,cAAc,CA4ChB"}
@@ -1 +1 @@
1
- {"version":3,"file":"createFieldValidationSchema.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/DynamicForm/helpers/createFieldValidationSchema/createFieldValidationSchema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAKzC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAI3D;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,YAAY,GACrB,2BAA2B,CA0D7B"}
1
+ {"version":3,"file":"createFieldValidationSchema.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/DynamicForm/helpers/createFieldValidationSchema/createFieldValidationSchema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAKzC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAK3D;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,YAAY,GACrB,2BAA2B,CA4D7B"}
@@ -1,35 +1,37 @@
1
1
  import * as p from "yup";
2
- import { DYNAMIC_FORM_DICTIONARY as l } from "../../dictionary.js";
2
+ import { DYNAMIC_FORM_DICTIONARY as m } from "../../dictionary.js";
3
3
  import { createBaseSchema as c } from "./strategies/baseSchema/createBaseSchema.js";
4
- import { VALIDATION_STRATEGY_REGISTRY as m } from "./strategies/validation/validationStrategies.js";
5
- import { normalizeValidation as u } from "../normalizeValidation/normalizeValidation.js";
6
- import { applyRequiredValidation as v } from "../applyRequiredValidation/applyRequiredValidation.js";
7
- function I(i, r) {
8
- if ((!i.validations || i.validations.length === 0) && !i.isRequired)
4
+ import { VALIDATION_STRATEGY_REGISTRY as v } from "./strategies/validation/validationStrategies.js";
5
+ import { resolveFieldMandatory as y } from "../resolveFieldContractAliases.js";
6
+ import { normalizeValidation as f } from "../normalizeValidation/normalizeValidation.js";
7
+ import { applyRequiredValidation as u } from "../applyRequiredValidation/applyRequiredValidation.js";
8
+ function _(t, n) {
9
+ const r = y(t);
10
+ if ((!t.validations || t.validations.length === 0) && !r)
9
11
  return;
10
- const e = c(i), n = i.validations ? i.validations.filter((a) => a.isActive).map(u).sort((a, o) => a.displayOrder - o.displayOrder) : [];
11
- let t = e;
12
- for (const a of n) {
13
- const o = a.validationType || a.type;
12
+ const e = c(t), s = t.validations ? t.validations.filter((i) => i.isActive).map(f).sort((i, o) => i.displayOrder - o.displayOrder) : [];
13
+ let a = e;
14
+ for (const i of s) {
15
+ const o = i.validationType || i.type;
14
16
  if (!o)
15
17
  continue;
16
- const s = m[o.id];
17
- s !== void 0 ? t = s.apply({
18
- field: i,
19
- getLabel: r,
18
+ const d = v[o.id];
19
+ d !== void 0 ? a = d.apply({
20
+ field: t,
21
+ getLabel: n,
20
22
  baseSchema: e,
21
- schema: t,
22
- validation: a
23
+ schema: a,
24
+ validation: i
23
25
  }) : console.warn(`Unsupported validation type: ${o.id}`);
24
26
  }
25
- const d = n.some((a) => (a.validationType || a.type)?.id === "fvl_required");
26
- return i.isRequired && !d && (t = v(
27
- i,
27
+ const l = s.some((i) => (i.validationType || i.type)?.id === "fvl_required");
28
+ return r && !l && (a = u(
28
29
  t,
30
+ a,
29
31
  e,
30
- r(l.IS_REQUIRED_MESSAGE)
31
- )), i.isRequired || (e instanceof p.ArraySchema ? t = t.default([]) : t = t.nullable()), t;
32
+ n(m.IS_REQUIRED_MESSAGE)
33
+ )), r || (e instanceof p.ArraySchema ? a = a.default([]) : a = a.nullable()), a;
32
34
  }
33
35
  export {
34
- I as createFieldValidationSchema
36
+ _ as createFieldValidationSchema
35
37
  };
@@ -31,6 +31,13 @@ export declare const selectBaseSchemaStrategy: BaseSchemaStrategy;
31
31
  * Base schema strategy for RHFAutoComplete fields.
32
32
  */
33
33
  export declare const autocompleteBaseSchemaStrategy: BaseSchemaStrategy;
34
+ /**
35
+ * Image selector: single option object (resolved from the comparable id) or null.
36
+ * Form state stores the full option row, so the schema must accept an object —
37
+ * the default string schema made mandatory image selectors fail even with a selection.
38
+ * Base schema strategy for RHFImageSelector fields.
39
+ */
40
+ export declare const imageSelectorBaseSchemaStrategy: BaseSchemaStrategy;
34
41
  /** Text field: explicit RHFTextField */
35
42
  export declare const textFieldBaseSchemaStrategy: BaseSchemaStrategy;
36
43
  /** Default: string (covers any other field type) */
@@ -1 +1 @@
1
- {"version":3,"file":"baseSchemaStrategies.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/components/src/components/DynamicForm/helpers/createFieldValidationSchema/strategies/baseSchema/baseSchemaStrategies.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAoB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAmBpE,gEAAgE;AAChE,eAAO,MAAM,2BAA2B,EAAE,kBAYzC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,+BAA+B,EAAE,kBAkB7C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,kBAmBtC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,kBAkBvC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAE,kBAa1C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,kBAetC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,8BAA8B,EAAE,kBAiB5C,CAAC;AAEF,wCAAwC;AACxC,eAAO,MAAM,2BAA2B,EAAE,kBAOzC,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,+BAA+B,EAAE,kBAO7C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,kBAAkB,EAUtD,CAAC"}
1
+ {"version":3,"file":"baseSchemaStrategies.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/components/src/components/DynamicForm/helpers/createFieldValidationSchema/strategies/baseSchema/baseSchemaStrategies.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAoB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAoBpE,gEAAgE;AAChE,eAAO,MAAM,2BAA2B,EAAE,kBAYzC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,+BAA+B,EAAE,kBAkB7C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,kBAmBtC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,kBAkBvC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAE,kBAa1C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,kBAetC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,8BAA8B,EAAE,kBAiB5C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,EAAE,kBAa7C,CAAC;AAEF,wCAAwC;AACxC,eAAO,MAAM,2BAA2B,EAAE,kBAOzC,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,+BAA+B,EAAE,kBAO7C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,kBAAkB,EAWtD,CAAC"}
@@ -1,19 +1,20 @@
1
1
  import * as t from "yup";
2
- import { isDynamicFormDateRangeField as n } from "../../../isDateRangeField.js";
3
- const o = () => t.object().shape({
2
+ import { isDynamicFormDateRangeField as c } from "../../../isDateRangeField.js";
3
+ import { resolveFieldTypeComponentProps as a } from "../../../resolveFieldContractAliases.js";
4
+ const p = () => t.object().shape({
4
5
  startDate: t.date().nullable(),
5
6
  endDate: t.date().nullable()
6
- }).nullable(), a = () => t.array().of(t.mixed()), c = {
7
+ }).nullable(), n = () => t.array().of(t.mixed()), l = {
7
8
  /**
8
9
  * Returns true if this strategy applies to the field (i.e. field is a date range).
9
10
  * @param field - Form field to check (uses fieldType.componentId and fieldType.id).
10
11
  * @returns True if the field is a date range field.
11
12
  */
12
13
  applies(e) {
13
- return n(e);
14
+ return c(e);
14
15
  },
15
16
  create() {
16
- return o();
17
+ return p();
17
18
  }
18
19
  }, i = {
19
20
  /**
@@ -27,9 +28,9 @@ const o = () => t.object().shape({
27
28
  },
28
29
  /** Returns a Yup array-of-mixed schema for the field. */
29
30
  create() {
30
- return a();
31
+ return n();
31
32
  }
32
- }, l = {
33
+ }, s = {
33
34
  /**
34
35
  * Returns true if this strategy applies to the field (number/integer/double type).
35
36
  * @param field - Form field to check.
@@ -43,7 +44,7 @@ const o = () => t.object().shape({
43
44
  create() {
44
45
  return t.number();
45
46
  }
46
- }, p = {
47
+ }, m = {
47
48
  /**
48
49
  * Returns true if this strategy applies to the field (checkbox/boolean type).
49
50
  * @param field - Form field to check (uses fieldType.componentId and fieldType.id).
@@ -57,7 +58,7 @@ const o = () => t.object().shape({
57
58
  create() {
58
59
  return t.boolean();
59
60
  }
60
- }, s = {
61
+ }, u = {
61
62
  /**
62
63
  * Returns true if this strategy applies to the field (RHFRadioGroup).
63
64
  * @param field - Form field to check.
@@ -70,7 +71,7 @@ const o = () => t.object().shape({
70
71
  create() {
71
72
  return t.mixed();
72
73
  }
73
- }, u = {
74
+ }, d = {
74
75
  /**
75
76
  * Returns true if this strategy applies to the field (RHFSelect).
76
77
  * @param field - Form field to check.
@@ -81,9 +82,9 @@ const o = () => t.object().shape({
81
82
  },
82
83
  /** Returns a Yup string or array schema depending on isMultiple. */
83
84
  create(e) {
84
- return e.fieldType.rhfComponentProps?.isMultiple === !0 ? a() : t.string();
85
+ return a(e.fieldType)?.isMultiple === !0 ? n() : t.string();
85
86
  }
86
- }, d = {
87
+ }, f = {
87
88
  /**
88
89
  * Returns true if this strategy applies to the field (RHFAutoComplete).
89
90
  * @param field - Form field to check.
@@ -94,42 +95,57 @@ const o = () => t.object().shape({
94
95
  },
95
96
  /** Returns a Yup mixed/array schema depending on isMultiple. */
96
97
  create(e) {
97
- return e.fieldType.rhfComponentProps?.isMultiple === !0 ? t.array().of(t.mixed()) : t.mixed().nullable();
98
+ return a(e.fieldType)?.isMultiple === !0 ? t.array().of(t.mixed()) : t.mixed().nullable();
98
99
  }
99
- }, m = {
100
+ }, S = {
101
+ /**
102
+ * Returns true if this strategy applies to the field (RHFImageSelector).
103
+ * @param field - Form field to check.
104
+ * @returns True if the field is RHFImageSelector.
105
+ */
106
+ applies(e) {
107
+ return e.fieldType.componentId === "RHFImageSelector";
108
+ },
109
+ /** Returns a Yup mixed schema for the selected option object (nullable). */
110
+ create() {
111
+ return t.mixed().nullable();
112
+ }
113
+ }, y = {
100
114
  applies(e) {
101
115
  return e.fieldType.componentId === "RHFTextField";
102
116
  },
103
117
  create() {
104
118
  return t.string();
105
119
  }
106
- }, f = {
120
+ }, g = {
107
121
  applies() {
108
122
  return !0;
109
123
  },
110
124
  create() {
111
125
  return t.string();
112
126
  }
113
- }, S = [
114
- c,
115
- i,
127
+ }, T = [
116
128
  l,
117
- p,
129
+ i,
118
130
  s,
131
+ m,
119
132
  u,
120
133
  d,
121
- m,
122
- f
134
+ f,
135
+ S,
136
+ y,
137
+ g
123
138
  ];
124
139
  export {
125
- S as BASE_SCHEMA_STRATEGIES,
126
- d as autocompleteBaseSchemaStrategy,
127
- p as booleanBaseSchemaStrategy,
140
+ T as BASE_SCHEMA_STRATEGIES,
141
+ f as autocompleteBaseSchemaStrategy,
142
+ m as booleanBaseSchemaStrategy,
128
143
  i as checkableListBaseSchemaStrategy,
129
- c as dateRangeBaseSchemaStrategy,
130
- f as defaultStringBaseSchemaStrategy,
131
- l as numberBaseSchemaStrategy,
132
- s as radioGroupBaseSchemaStrategy,
133
- u as selectBaseSchemaStrategy,
134
- m as textFieldBaseSchemaStrategy
144
+ l as dateRangeBaseSchemaStrategy,
145
+ g as defaultStringBaseSchemaStrategy,
146
+ S as imageSelectorBaseSchemaStrategy,
147
+ s as numberBaseSchemaStrategy,
148
+ u as radioGroupBaseSchemaStrategy,
149
+ d as selectBaseSchemaStrategy,
150
+ y as textFieldBaseSchemaStrategy
135
151
  };
@@ -2,6 +2,7 @@ import { Field } from '../../../../types';
2
2
  import { BaseSchemaResult } from './types';
3
3
  /**
4
4
  * Creates the base Yup schema for a field using the first matching base schema strategy.
5
+ * When the field type is missing, defaults to a string schema so validation can still proceed.
5
6
  */
6
7
  export declare function createBaseSchema(field: Field): BaseSchemaResult;
7
8
  //# sourceMappingURL=createBaseSchema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createBaseSchema.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/components/src/components/DynamicForm/helpers/createFieldValidationSchema/strategies/baseSchema/createBaseSchema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,gBAAgB,CAG/D"}
1
+ {"version":3,"file":"createBaseSchema.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/components/src/components/DynamicForm/helpers/createFieldValidationSchema/strategies/baseSchema/createBaseSchema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,gBAAgB,CAM/D"}
@@ -1,9 +1,11 @@
1
- import * as a from "yup";
2
- import { BASE_SCHEMA_STRATEGIES as o } from "./baseSchemaStrategies.js";
3
- function p(r) {
4
- const t = o.find((e) => e.applies(r));
5
- return t ? t.create(r) : a.string();
1
+ import * as e from "yup";
2
+ import { BASE_SCHEMA_STRATEGIES as a } from "./baseSchemaStrategies.js";
3
+ function o(r) {
4
+ if (!r.fieldType)
5
+ return e.string();
6
+ const t = a.find((n) => n.applies(r));
7
+ return t ? t.create(r) : e.string();
6
8
  }
7
9
  export {
8
- p as createBaseSchema
10
+ o as createBaseSchema
9
11
  };
@@ -1 +1 @@
1
- {"version":3,"file":"validationStrategies.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/components/src/components/DynamicForm/helpers/createFieldValidationSchema/strategies/validation/validationStrategies.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,oGAAoG;AACpG,eAAO,MAAM,0BAA0B,EAAE,kBAsBxC,CAAC;AAEF,2BAA2B;AAC3B,eAAO,MAAM,2BAA2B,EAAE,kBAwBzC,CAAC;AAEF,2BAA2B;AAC3B,eAAO,MAAM,2BAA2B,EAAE,kBAwBzC,CAAC;AAEF,0BAA0B;AAC1B,eAAO,MAAM,qBAAqB,EAAE,kBAwBnC,CAAC;AAEF,0BAA0B;AAC1B,eAAO,MAAM,qBAAqB,EAAE,kBAwBnC,CAAC;AAEF,6BAA6B;AAC7B,eAAO,MAAM,uBAAuB,EAAE,kBAmBrC,CAAC;AAEF,2BAA2B;AAC3B,eAAO,MAAM,qBAAqB,EAAE,kBAmBnC,CAAC;AAEF,8BAA8B;AAC9B,eAAO,MAAM,yBAAyB,EAAE,kBA2BvC,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,wBAAwB,EAAE,kBAmEtC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAU3E,CAAC"}
1
+ {"version":3,"file":"validationStrategies.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/components/src/components/DynamicForm/helpers/createFieldValidationSchema/strategies/validation/validationStrategies.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAGlD,oGAAoG;AACpG,eAAO,MAAM,0BAA0B,EAAE,kBAyBxC,CAAC;AAEF,2BAA2B;AAC3B,eAAO,MAAM,2BAA2B,EAAE,kBAwBzC,CAAC;AAEF,2BAA2B;AAC3B,eAAO,MAAM,2BAA2B,EAAE,kBAwBzC,CAAC;AAEF,0BAA0B;AAC1B,eAAO,MAAM,qBAAqB,EAAE,kBAwBnC,CAAC;AAEF,0BAA0B;AAC1B,eAAO,MAAM,qBAAqB,EAAE,kBAwBnC,CAAC;AAEF,6BAA6B;AAC7B,eAAO,MAAM,uBAAuB,EAAE,kBAmBrC,CAAC;AAEF,2BAA2B;AAC3B,eAAO,MAAM,qBAAqB,EAAE,kBAmBnC,CAAC;AAEF,8BAA8B;AAC9B,eAAO,MAAM,yBAAyB,EAAE,kBA2BvC,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,wBAAwB,EAAE,kBAmEtC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAU3E,CAAC"}
@@ -1,8 +1,8 @@
1
- import * as m from "yup";
1
+ import * as d from "yup";
2
2
  import { DYNAMIC_FORM_DICTIONARY as c } from "../../../../dictionary.js";
3
- import { isDynamicFormDateRangeField as E } from "../../../isDateRangeField.js";
3
+ import { resolveFieldMandatory as _, resolveFieldHelperMessage as A } from "../../../resolveFieldContractAliases.js";
4
4
  import { resolveValidationErrorMessage as u } from "../../../resolveValidationErrorMessage/resolveValidationErrorMessage.js";
5
- import { applyRequiredValidation as _ } from "../../../applyRequiredValidation/applyRequiredValidation.js";
5
+ import { applyRequiredValidation as M } from "../../../applyRequiredValidation/applyRequiredValidation.js";
6
6
  const p = {
7
7
  validationTypeId: "fvl_required",
8
8
  /**
@@ -11,11 +11,11 @@ const p = {
11
11
  * @returns Schema with required validation applied, or unchanged schema
12
12
  */
13
13
  apply(r) {
14
- const { field: e, getLabel: a, baseSchema: i, schema: t, validation: s } = r;
15
- if (!e.isRequired)
14
+ const { field: e, getLabel: a, baseSchema: i, schema: t, validation: l } = r;
15
+ if (!_(e))
16
16
  return t;
17
- const n = E(e), o = n && e.helperText ? e.helperText : a(n ? c.DATE_RANGE_REQUIRED_MESSAGE : c.IS_REQUIRED_MESSAGE), l = u(s, a, o);
18
- return _(e, t, i, l);
17
+ const o = e.fieldType.componentId === "RHFDateRangePicker", s = A(e), m = o && s ? s : a(o ? c.DATE_RANGE_REQUIRED_MESSAGE : c.IS_REQUIRED_MESSAGE), h = u(l, a, m);
18
+ return M(e, t, i, h);
19
19
  }
20
20
  }, v = {
21
21
  validationTypeId: "fvl_max_length",
@@ -26,7 +26,7 @@ const p = {
26
26
  */
27
27
  apply(r) {
28
28
  const { validation: e, getLabel: a, baseSchema: i, schema: t } = r;
29
- if (!(e.validationType || e.type)?.requiresValue || !e.value || !(i instanceof m.StringSchema))
29
+ if (!(e.validationType || e.type)?.requiresValue || !e.value || !(i instanceof d.StringSchema))
30
30
  return t;
31
31
  const n = parseInt(e.value, 10);
32
32
  if (isNaN(n))
@@ -47,7 +47,7 @@ const p = {
47
47
  */
48
48
  apply(r) {
49
49
  const { validation: e, getLabel: a, baseSchema: i, schema: t } = r;
50
- if (!(e.validationType || e.type)?.requiresValue || !e.value || !(i instanceof m.StringSchema))
50
+ if (!(e.validationType || e.type)?.requiresValue || !e.value || !(i instanceof d.StringSchema))
51
51
  return t;
52
52
  const n = parseInt(e.value, 10);
53
53
  if (isNaN(n))
@@ -68,7 +68,7 @@ const p = {
68
68
  */
69
69
  apply(r) {
70
70
  const { validation: e, getLabel: a, baseSchema: i, schema: t } = r;
71
- if (!(e.validationType || e.type)?.requiresValue || !e.value || !(i instanceof m.NumberSchema))
71
+ if (!(e.validationType || e.type)?.requiresValue || !e.value || !(i instanceof d.NumberSchema))
72
72
  return t;
73
73
  const n = parseFloat(e.value);
74
74
  if (isNaN(n))
@@ -89,7 +89,7 @@ const p = {
89
89
  */
90
90
  apply(r) {
91
91
  const { validation: e, getLabel: a, baseSchema: i, schema: t } = r;
92
- if (!(e.validationType || e.type)?.requiresValue || !e.value || !(i instanceof m.NumberSchema))
92
+ if (!(e.validationType || e.type)?.requiresValue || !e.value || !(i instanceof d.NumberSchema))
93
93
  return t;
94
94
  const n = parseFloat(e.value);
95
95
  if (isNaN(n))
@@ -110,14 +110,14 @@ const p = {
110
110
  */
111
111
  apply(r) {
112
112
  const { validation: e, getLabel: a, baseSchema: i, schema: t } = r;
113
- if (!(i instanceof m.StringSchema))
113
+ if (!(i instanceof d.StringSchema))
114
114
  return t;
115
- const s = u(
115
+ const l = u(
116
116
  e,
117
117
  a,
118
118
  a(c.EMAIL_INVALID_MESSAGE)
119
119
  );
120
- return t.email(s);
120
+ return t.email(l);
121
121
  }
122
122
  }, I = {
123
123
  validationTypeId: "fvl_url",
@@ -128,16 +128,16 @@ const p = {
128
128
  */
129
129
  apply(r) {
130
130
  const { validation: e, getLabel: a, baseSchema: i, schema: t } = r;
131
- if (!(i instanceof m.StringSchema))
131
+ if (!(i instanceof d.StringSchema))
132
132
  return t;
133
- const s = u(
133
+ const l = u(
134
134
  e,
135
135
  a,
136
136
  a(c.URL_INVALID_MESSAGE)
137
137
  );
138
- return t.url(s);
138
+ return t.url(l);
139
139
  }
140
- }, T = {
140
+ }, E = {
141
141
  validationTypeId: "fvl_pattern",
142
142
  /**
143
143
  * Applies regex pattern validation to string schema when validation value is present.
@@ -147,7 +147,7 @@ const p = {
147
147
  */
148
148
  apply(r) {
149
149
  const { validation: e, getLabel: a, baseSchema: i, schema: t } = r;
150
- if (!(e.validationType || e.type)?.requiresValue || !e.value || !(i instanceof m.StringSchema))
150
+ if (!(e.validationType || e.type)?.requiresValue || !e.value || !(i instanceof d.StringSchema))
151
151
  return t;
152
152
  try {
153
153
  const n = new RegExp(e.value), o = u(
@@ -160,7 +160,7 @@ const p = {
160
160
  return console.warn(`Invalid regex pattern: ${e.value}`, n), t;
161
161
  }
162
162
  }
163
- }, h = {
163
+ }, T = {
164
164
  validationTypeId: "fvl_custom",
165
165
  /**
166
166
  * Applies custom validation: for string, regex or exact match; for number, exact value match.
@@ -170,7 +170,7 @@ const p = {
170
170
  */
171
171
  apply(r) {
172
172
  const { validation: e, getLabel: a, baseSchema: i, schema: t } = r, n = (e.validationType || e.type)?.requiresValue && e.value;
173
- if (i instanceof m.StringSchema) {
173
+ if (i instanceof d.StringSchema) {
174
174
  const o = u(
175
175
  e,
176
176
  a,
@@ -179,22 +179,22 @@ const p = {
179
179
  return n ? t.test(
180
180
  "custom",
181
181
  o,
182
- (l) => {
183
- if (!l)
182
+ (s) => {
183
+ if (!s)
184
184
  return !0;
185
185
  try {
186
- return new RegExp(e.value).test(l);
186
+ return new RegExp(e.value).test(s);
187
187
  } catch {
188
- return l === e.value;
188
+ return s === e.value;
189
189
  }
190
190
  }
191
191
  ) : t.test(
192
192
  "custom",
193
193
  o,
194
- (l) => !l || !0
194
+ (s) => !s || !0
195
195
  );
196
196
  }
197
- if (i instanceof m.NumberSchema && n) {
197
+ if (i instanceof d.NumberSchema && n) {
198
198
  const o = u(
199
199
  e,
200
200
  a,
@@ -203,17 +203,17 @@ const p = {
203
203
  return t.test(
204
204
  "custom",
205
205
  o,
206
- (l) => {
207
- if (l == null)
206
+ (s) => {
207
+ if (s == null)
208
208
  return !0;
209
- const d = parseFloat(e.value);
210
- return isNaN(d) ? !0 : l === d;
209
+ const m = parseFloat(e.value);
210
+ return isNaN(m) ? !0 : s === m;
211
211
  }
212
212
  );
213
213
  }
214
214
  return t;
215
215
  }
216
- }, M = {
216
+ }, R = {
217
217
  [p.validationTypeId]: p,
218
218
  [v.validationTypeId]: v,
219
219
  [S.validationTypeId]: S,
@@ -221,18 +221,18 @@ const p = {
221
221
  [g.validationTypeId]: g,
222
222
  [f.validationTypeId]: f,
223
223
  [I.validationTypeId]: I,
224
- [T.validationTypeId]: T,
225
- [h.validationTypeId]: h
224
+ [E.validationTypeId]: E,
225
+ [T.validationTypeId]: T
226
226
  };
227
227
  export {
228
- M as VALIDATION_STRATEGY_REGISTRY,
229
- h as customValidationStrategy,
228
+ R as VALIDATION_STRATEGY_REGISTRY,
229
+ T as customValidationStrategy,
230
230
  f as emailValidationStrategy,
231
231
  v as maxLengthValidationStrategy,
232
232
  y as maxValidationStrategy,
233
233
  S as minLengthValidationStrategy,
234
234
  g as minValidationStrategy,
235
- T as patternValidationStrategy,
235
+ E as patternValidationStrategy,
236
236
  p as requiredValidationStrategy,
237
237
  I as urlValidationStrategy
238
238
  };
@@ -0,0 +1,14 @@
1
+ import { Field } from '../../types';
2
+ /**
3
+ * Check whether the field's componentId is registered in the field component strategy registry.
4
+ */
5
+ export declare function isKnownFieldComponent(field: Field): boolean;
6
+ /**
7
+ * Collect the names of fields whose component is not registered, ignoring empty names.
8
+ */
9
+ export declare function getUnknownFieldNames(fields: Field[]): Set<string>;
10
+ /**
11
+ * Remove entries from the submit payload that belong to fields with unknown components.
12
+ */
13
+ export declare function filterUnknownFieldsFromSubmit(data: Record<string, unknown>, fields: Field[]): Record<string, unknown>;
14
+ //# sourceMappingURL=filterUnknownFieldsFromSubmit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filterUnknownFieldsFromSubmit.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/DynamicForm/helpers/filterUnknownFieldsFromSubmit/filterUnknownFieldsFromSubmit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGpC;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAM3D;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAOjE;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,MAAM,EAAE,KAAK,EAAE,GACd,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASzB"}
@@ -0,0 +1,2 @@
1
+ export { filterUnknownFieldsFromSubmit, getUnknownFieldNames, isKnownFieldComponent } from './filterUnknownFieldsFromSubmit';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/DynamicForm/helpers/filterUnknownFieldsFromSubmit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Field } from '../../types';
2
+ /**
3
+ * Maps a field's backend type (`fieldType.id`) to the API contract key used
4
+ * in the per-field submit request body. Defaults to `'value'` when the type
5
+ * is unknown or not explicitly mapped.
6
+ */
7
+ export declare function getFieldTypeApiKey(field: Field): string;
8
+ //# sourceMappingURL=getFieldTypeApiKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFieldTypeApiKey.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/DynamicForm/helpers/getFieldTypeApiKey/getFieldTypeApiKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAsBvD"}
@@ -0,0 +1,24 @@
1
+ function a(e) {
2
+ switch (e.fieldType?.id) {
3
+ case "fft_text":
4
+ case "fft_texto":
5
+ return "value_string";
6
+ case "fft_integer":
7
+ return "value_integer";
8
+ case "fft_double":
9
+ return "value_double";
10
+ case "fft_boolean":
11
+ case "fft_checkbox":
12
+ return "value_boolean";
13
+ case "fft_datetime":
14
+ case "fft_date_range":
15
+ return "value_timestamp";
16
+ case "fft_number":
17
+ return "value_integer";
18
+ default:
19
+ return "value";
20
+ }
21
+ }
22
+ export {
23
+ a as getFieldTypeApiKey
24
+ };
@@ -0,0 +1,2 @@
1
+ export * from './getFieldTypeApiKey';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/DynamicForm/helpers/getFieldTypeApiKey/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
@@ -10,4 +10,7 @@ export * from './resolveFieldComponent';
10
10
  export * from './resolveFieldInputLabel';
11
11
  export * from './resolveInitialValue';
12
12
  export * from './stringifyJsonFieldsForSubmit';
13
+ export * from './getFieldTypeApiKey';
14
+ export * from './filterUnknownFieldsFromSubmit';
15
+ export * from './mapImageSelectorValuesForSubmit';
13
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/DynamicForm/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/DynamicForm/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Whether `value` is a finite integer ≥ 1 (e.g. row counts, positive dimensions from the API).
3
- * @param value - Unknown input from `rhfComponentProps` or similar.
3
+ * @param value - Unknown input from `componentProps` or similar.
4
4
  * @returns True if `value` is a positive integer.
5
5
  */
6
6
  export declare function isPositiveInteger(value: unknown): value is number;
@@ -0,0 +1,2 @@
1
+ export * from './mapImageSelectorValuesForSubmit';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/DynamicForm/helpers/mapImageSelectorValuesForSubmit/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { Field } from '../../types';
2
+ /**
3
+ * Replace RHFImageSelector option objects in the submit payload with their comparable
4
+ * primitive value (`equalToValuePath`, default `id`), so the API receives the same key
5
+ * it provided in `currentValue` / `defaultValue`. Values that are already primitive,
6
+ * null, or whose compare path does not resolve to a string/number are left untouched.
7
+ */
8
+ export declare function mapImageSelectorValuesForSubmit(data: Record<string, unknown>, fields: Field[]): Record<string, unknown>;
9
+ //# sourceMappingURL=mapImageSelectorValuesForSubmit.d.ts.map