@m4l/components 9.6.0 → 9.6.1-beta-feature-671-shared-reports-viewer-mf.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 (183) hide show
  1. package/components/DynamicForm/DynamicForm.styles.d.ts.map +1 -1
  2. package/components/DynamicForm/constants.js +7 -7
  3. package/components/DynamicForm/dictionary.d.ts +2 -0
  4. package/components/DynamicForm/dictionary.d.ts.map +1 -1
  5. package/components/DynamicForm/dictionary.js +2 -0
  6. package/components/DynamicForm/helpers/applyRequiredValidation/applyRequiredValidation.d.ts +1 -1
  7. package/components/DynamicForm/helpers/applyRequiredValidation/applyRequiredValidation.js +1 -1
  8. package/components/DynamicForm/helpers/createFieldValidationSchema/strategies/baseSchema/baseSchemaStrategies.js +29 -29
  9. package/components/DynamicForm/helpers/createFieldValidationSchema/strategies/validation/validationStrategies.d.ts.map +1 -1
  10. package/components/DynamicForm/helpers/createFieldValidationSchema/strategies/validation/validationStrategies.js +128 -91
  11. package/components/DynamicForm/helpers/createIsOptionEqualToValue/createIsOptionEqualToValue.d.ts +4 -3
  12. package/components/DynamicForm/helpers/createIsOptionEqualToValue/createIsOptionEqualToValue.d.ts.map +1 -1
  13. package/components/DynamicForm/helpers/createIsOptionEqualToValue/createIsOptionEqualToValue.js +9 -3
  14. package/components/DynamicForm/helpers/index.d.ts +4 -0
  15. package/components/DynamicForm/helpers/index.d.ts.map +1 -1
  16. package/components/DynamicForm/helpers/isPositiveInteger.d.ts +7 -0
  17. package/components/DynamicForm/helpers/isPositiveInteger.d.ts.map +1 -0
  18. package/components/DynamicForm/helpers/isPositiveInteger.js +6 -0
  19. package/components/DynamicForm/helpers/isRecord.d.ts +7 -0
  20. package/components/DynamicForm/helpers/isRecord.d.ts.map +1 -0
  21. package/components/DynamicForm/helpers/isRecord.js +6 -0
  22. package/components/DynamicForm/helpers/resolveFieldComponent/helpers/resolveAssetSrcWithBase.d.ts +6 -0
  23. package/components/DynamicForm/helpers/resolveFieldComponent/helpers/resolveAssetSrcWithBase.d.ts.map +1 -0
  24. package/components/DynamicForm/helpers/resolveFieldComponent/helpers/resolveAssetSrcWithBase.js +7 -0
  25. package/components/DynamicForm/helpers/resolveFieldComponent/helpers/resolveRemoteOrAbsoluteAssetSrc.d.ts +6 -0
  26. package/components/DynamicForm/helpers/resolveFieldComponent/helpers/resolveRemoteOrAbsoluteAssetSrc.d.ts.map +1 -0
  27. package/components/DynamicForm/helpers/resolveFieldComponent/helpers/resolveRemoteOrAbsoluteAssetSrc.js +8 -0
  28. package/components/DynamicForm/helpers/resolveFieldComponent/resolveFieldComponent.d.ts +1 -1
  29. package/components/DynamicForm/helpers/resolveFieldComponent/resolveFieldComponent.d.ts.map +1 -1
  30. package/components/DynamicForm/helpers/resolveFieldComponent/resolveFieldComponent.js +8 -17
  31. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/autocompleteStrategy/autocompleteStrategy.d.ts +3 -1
  32. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/autocompleteStrategy/autocompleteStrategy.d.ts.map +1 -1
  33. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/autocompleteStrategy/autocompleteStrategy.js +52 -24
  34. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/autocompleteStrategy/createAutocompleteAsyncOnChangeFilterParms.d.ts +8 -0
  35. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/autocompleteStrategy/createAutocompleteAsyncOnChangeFilterParms.d.ts.map +1 -0
  36. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/autocompleteStrategy/createAutocompleteAsyncOnChangeFilterParms.js +22 -0
  37. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/autocompleteStrategy/normalizeAutocompletePropsFromBackend.d.ts +29 -0
  38. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/autocompleteStrategy/normalizeAutocompletePropsFromBackend.d.ts.map +1 -0
  39. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/autocompleteStrategy/normalizeAutocompletePropsFromBackend.js +52 -0
  40. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/checkableListStrategy.d.ts.map +1 -1
  41. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/checkableListStrategy.js +27 -19
  42. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/helpers/fieldPropsNormalizers/fieldPropNormalizers.d.ts +13 -0
  43. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/helpers/fieldPropsNormalizers/fieldPropNormalizers.d.ts.map +1 -0
  44. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/helpers/fieldPropsNormalizers/fieldPropNormalizers.js +12 -0
  45. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/helpers/groupNormalization/groupNormalization.d.ts +20 -0
  46. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/helpers/groupNormalization/groupNormalization.d.ts.map +1 -0
  47. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/helpers/groupNormalization/groupNormalization.js +49 -0
  48. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/helpers/guards/guards.d.ts +32 -0
  49. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/helpers/guards/guards.d.ts.map +1 -0
  50. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/helpers/guards/guards.js +39 -0
  51. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/helpers/whitelist/propertyNormalizers.d.ts +18 -0
  52. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/helpers/whitelist/propertyNormalizers.d.ts.map +1 -0
  53. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/helpers/whitelist/propertyNormalizers.js +39 -0
  54. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/normalizeCheckableListPropsFromBackend.d.ts +17 -0
  55. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/normalizeCheckableListPropsFromBackend.d.ts.map +1 -0
  56. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/normalizeCheckableListPropsFromBackend.js +16 -0
  57. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/normalizeFieldOptionsForCheckableList.d.ts +7 -0
  58. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/normalizeFieldOptionsForCheckableList.d.ts.map +1 -0
  59. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/normalizeFieldOptionsForCheckableList.js +29 -0
  60. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/types.d.ts +32 -0
  61. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkableListStrategy/types.d.ts.map +1 -0
  62. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkboxStrategy/checkboxStrategy.d.ts.map +1 -1
  63. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkboxStrategy/checkboxStrategy.js +13 -12
  64. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkboxStrategy/normalizeCheckboxPropsFromBackend.d.ts +11 -0
  65. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkboxStrategy/normalizeCheckboxPropsFromBackend.d.ts.map +1 -0
  66. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkboxStrategy/normalizeCheckboxPropsFromBackend.js +15 -0
  67. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkboxStrategy/types.d.ts +5 -0
  68. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/checkboxStrategy/types.d.ts.map +1 -0
  69. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/dateRangePickerStrategy/dateRangePickerStrategy.d.ts.map +1 -1
  70. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/dateRangePickerStrategy/dateRangePickerStrategy.js +15 -14
  71. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/dateRangePickerStrategy/normalizeDateRangePickerPropsFromBackend.d.ts +12 -0
  72. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/dateRangePickerStrategy/normalizeDateRangePickerPropsFromBackend.d.ts.map +1 -0
  73. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/dateRangePickerStrategy/normalizeDateRangePickerPropsFromBackend.js +15 -0
  74. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/dateRangePickerStrategy/types.d.ts +5 -0
  75. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/dateRangePickerStrategy/types.d.ts.map +1 -0
  76. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/daysOfWeekPickerStrategy/daysOfWeekPickerStrategy.d.ts.map +1 -1
  77. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/daysOfWeekPickerStrategy/daysOfWeekPickerStrategy.js +14 -13
  78. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/daysOfWeekPickerStrategy/helpers/normalizeDisabledDays/normalizeDisabledDays.d.ts +6 -0
  79. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/daysOfWeekPickerStrategy/helpers/normalizeDisabledDays/normalizeDisabledDays.d.ts.map +1 -0
  80. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/daysOfWeekPickerStrategy/helpers/normalizeDisabledDays/normalizeDisabledDays.js +11 -0
  81. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/daysOfWeekPickerStrategy/normalizeDaysOfWeekPickerPropsFromBackend.d.ts +12 -0
  82. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/daysOfWeekPickerStrategy/normalizeDaysOfWeekPickerPropsFromBackend.d.ts.map +1 -0
  83. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/daysOfWeekPickerStrategy/normalizeDaysOfWeekPickerPropsFromBackend.js +18 -0
  84. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/daysOfWeekPickerStrategy/types.d.ts +5 -0
  85. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/daysOfWeekPickerStrategy/types.d.ts.map +1 -0
  86. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/normalizeRhfLabelRelatedPropsFromBackend.d.ts +16 -0
  87. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/normalizeRhfLabelRelatedPropsFromBackend.d.ts.map +1 -0
  88. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/numberInputStrategy/helpers/isFiniteNumber/index.d.ts +2 -0
  89. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/numberInputStrategy/helpers/isFiniteNumber/index.d.ts.map +1 -0
  90. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/numberInputStrategy/helpers/isFiniteNumber/isFiniteNumber.d.ts +2 -0
  91. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/numberInputStrategy/helpers/isFiniteNumber/isFiniteNumber.d.ts.map +1 -0
  92. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/numberInputStrategy/helpers/isFiniteNumber/isFiniteNumber.js +6 -0
  93. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/numberInputStrategy/normalizeNumberInputPropsFromBackend.d.ts +12 -0
  94. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/numberInputStrategy/normalizeNumberInputPropsFromBackend.d.ts.map +1 -0
  95. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/numberInputStrategy/normalizeNumberInputPropsFromBackend.js +16 -0
  96. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/numberInputStrategy/numberInputStrategy.d.ts.map +1 -1
  97. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/numberInputStrategy/numberInputStrategy.js +14 -13
  98. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/numberInputStrategy/types.d.ts +5 -0
  99. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/numberInputStrategy/types.d.ts.map +1 -0
  100. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/helpers/buildGetOptionLabel/buildGetOptionLabel.d.ts +7 -0
  101. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/helpers/buildGetOptionLabel/buildGetOptionLabel.d.ts.map +1 -0
  102. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/helpers/buildGetOptionLabel/buildGetOptionLabel.js +12 -0
  103. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/helpers/buildGetOptionLabel/index.d.ts +2 -0
  104. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/helpers/buildGetOptionLabel/index.d.ts.map +1 -0
  105. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/helpers/buildGetOptionValue/buildGetOptionValue.d.ts +7 -0
  106. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/helpers/buildGetOptionValue/buildGetOptionValue.d.ts.map +1 -0
  107. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/helpers/buildGetOptionValue/buildGetOptionValue.js +12 -0
  108. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/helpers/buildGetOptionValue/index.d.ts +2 -0
  109. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/helpers/buildGetOptionValue/index.d.ts.map +1 -0
  110. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/helpers/defaultGetOptionLabel/defaultGetOptionLabel.d.ts +5 -0
  111. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/helpers/defaultGetOptionLabel/defaultGetOptionLabel.d.ts.map +1 -0
  112. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/helpers/defaultGetOptionLabel/defaultGetOptionLabel.js +7 -0
  113. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/helpers/defaultGetOptionLabel/index.d.ts +2 -0
  114. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/helpers/defaultGetOptionLabel/index.d.ts.map +1 -0
  115. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/helpers/defaultGetOptionValue/defaultGetOptionValue.d.ts +5 -0
  116. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/helpers/defaultGetOptionValue/defaultGetOptionValue.d.ts.map +1 -0
  117. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/helpers/defaultGetOptionValue/defaultGetOptionValue.js +7 -0
  118. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/helpers/defaultGetOptionValue/index.d.ts +2 -0
  119. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/helpers/defaultGetOptionValue/index.d.ts.map +1 -0
  120. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/normalizeRadioGroupPropsFromBackend.d.ts +17 -0
  121. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/normalizeRadioGroupPropsFromBackend.d.ts.map +1 -0
  122. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/normalizeRadioGroupPropsFromBackend.js +31 -0
  123. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/radioGroupStrategy.d.ts.map +1 -1
  124. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/radioGroupStrategy.js +17 -18
  125. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/types.d.ts +13 -0
  126. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/radioGroupStrategy/types.d.ts.map +1 -0
  127. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/selectStrategy/helpers/resolveSelectOptionIconSrc/index.d.ts +2 -0
  128. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/selectStrategy/helpers/resolveSelectOptionIconSrc/index.d.ts.map +1 -0
  129. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/selectStrategy/helpers/resolveSelectOptionIconSrc/resolveSelectOptionIconSrc.d.ts +6 -0
  130. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/selectStrategy/helpers/resolveSelectOptionIconSrc/resolveSelectOptionIconSrc.d.ts.map +1 -0
  131. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/selectStrategy/helpers/resolveSelectOptionIconSrc/resolveSelectOptionIconSrc.js +7 -0
  132. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/selectStrategy/normalizeFieldOptionsForSelect.d.ts +8 -0
  133. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/selectStrategy/normalizeFieldOptionsForSelect.d.ts.map +1 -0
  134. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/selectStrategy/normalizeFieldOptionsForSelect.js +43 -0
  135. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/selectStrategy/normalizeSelectPropsFromBackend.d.ts +14 -0
  136. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/selectStrategy/normalizeSelectPropsFromBackend.d.ts.map +1 -0
  137. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/selectStrategy/normalizeSelectPropsFromBackend.js +17 -0
  138. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/selectStrategy/selectStrategy.d.ts.map +1 -1
  139. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/selectStrategy/selectStrategy.js +17 -16
  140. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/selectStrategy/types.d.ts +9 -0
  141. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/selectStrategy/types.d.ts.map +1 -0
  142. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/textFieldStrategy/normalizeTextFieldPropsFromBackend.d.ts +15 -0
  143. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/textFieldStrategy/normalizeTextFieldPropsFromBackend.d.ts.map +1 -0
  144. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/textFieldStrategy/normalizeTextFieldPropsFromBackend.js +29 -0
  145. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/textFieldStrategy/textFieldStrategy.d.ts.map +1 -1
  146. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/textFieldStrategy/textFieldStrategy.js +17 -14
  147. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/textFieldStrategy/types.d.ts +12 -0
  148. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/textFieldStrategy/types.d.ts.map +1 -0
  149. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/types.d.ts +0 -6
  150. package/components/DynamicForm/helpers/resolveFieldComponent/strategies/types.d.ts.map +1 -1
  151. package/components/DynamicForm/helpers/resolveFieldComponent/types.d.ts +7 -0
  152. package/components/DynamicForm/helpers/resolveFieldComponent/types.d.ts.map +1 -1
  153. package/components/DynamicForm/helpers/resolveFieldInputLabel/index.d.ts +2 -0
  154. package/components/DynamicForm/helpers/resolveFieldInputLabel/index.d.ts.map +1 -0
  155. package/components/DynamicForm/helpers/resolveFieldInputLabel/resolveFieldInputLabel.d.ts +9 -0
  156. package/components/DynamicForm/helpers/resolveFieldInputLabel/resolveFieldInputLabel.d.ts.map +1 -0
  157. package/components/DynamicForm/helpers/resolveFieldInputLabel/resolveFieldInputLabel.js +8 -0
  158. package/components/DynamicForm/helpers/resolveInitialValue/resolveInitialValue.d.ts.map +1 -1
  159. package/components/DynamicForm/helpers/resolveInitialValue/resolveInitialValue.js +34 -50
  160. package/components/DynamicForm/helpers/resolveValidationErrorMessage/index.d.ts +2 -0
  161. package/components/DynamicForm/helpers/resolveValidationErrorMessage/index.d.ts.map +1 -0
  162. package/components/DynamicForm/helpers/resolveValidationErrorMessage/resolveValidationErrorMessage.d.ts +10 -0
  163. package/components/DynamicForm/helpers/resolveValidationErrorMessage/resolveValidationErrorMessage.d.ts.map +1 -0
  164. package/components/DynamicForm/helpers/resolveValidationErrorMessage/resolveValidationErrorMessage.js +11 -0
  165. package/components/DynamicForm/hooks/useDynamicForm/useDynamicForm.d.ts.map +1 -1
  166. package/components/DynamicForm/hooks/useDynamicForm/useDynamicForm.js +38 -37
  167. package/components/DynamicForm/hooks/useDynamicFormConditionals/useDynamicFormConditionals.d.ts.map +1 -1
  168. package/components/DynamicForm/hooks/useDynamicFormConditionals/useDynamicFormConditionals.js +15 -14
  169. package/components/DynamicForm/hooks/useDynamicFormCoupled/useDynamicFormCoupled.d.ts +1 -1
  170. package/components/DynamicForm/hooks/useFieldsWithFetchedOptions/normalizeOptionsResponse.d.ts +3 -2
  171. package/components/DynamicForm/hooks/useFieldsWithFetchedOptions/normalizeOptionsResponse.d.ts.map +1 -1
  172. package/components/DynamicForm/hooks/useFieldsWithFetchedOptions/normalizeOptionsResponse.js +9 -16
  173. package/components/DynamicForm/hooks/useFieldsWithFetchedOptions/useFieldsWithFetchedOptions.d.ts +1 -1
  174. package/components/DynamicForm/hooks/useFieldsWithFetchedOptions/useFieldsWithFetchedOptions.js +24 -24
  175. package/components/DynamicForm/subcomponents/DynamicFormContent/DynamicFormContent.d.ts.map +1 -1
  176. package/components/DynamicForm/subcomponents/DynamicFormContent/DynamicFormContent.js +38 -32
  177. package/components/DynamicForm/types.d.ts +148 -50
  178. package/components/DynamicForm/types.d.ts.map +1 -1
  179. package/components/ImageText/ImageText.js +31 -31
  180. package/components/SideBar/subcomponents/ContentComponent/style.js +1 -1
  181. package/components/extended/mui/AutocompleteAsync/hooks/useFetchOptions.d.ts.map +1 -1
  182. package/components/extended/mui/Avatar/styles.js +1 -1
  183. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"DynamicForm.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/DynamicForm/DynamicForm.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,eAAe,EAAE,iBAgF7B,CAAC"}
1
+ {"version":3,"file":"DynamicForm.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/DynamicForm/DynamicForm.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,eAAe,EAAE,iBAiF7B,CAAC"}
@@ -1,16 +1,16 @@
1
1
  import { getComponentClasses as o } from "../../utils/getComponentSlotRoot.js";
2
2
  import { DynamicFormSlots as e } from "./slots/DynamicFormEnum.js";
3
- const n = "M4LDynamicForm", t = o(
4
- n,
3
+ const r = "M4LDynamicForm", i = o(
4
+ r,
5
5
  e
6
- ), s = {
7
- form: { id: 0, name: "", version: 0, nameDictionaryId: 0, descriptionDictionaryId: 0 },
6
+ ), m = {
7
+ form: { id: 0, name: "", version: 0, labelForm: "", descriptionForm: "" },
8
8
  fields: [],
9
9
  instance: { id: 0, name: null, createdAt: "", updatedAt: "", resourceTypeId: "", resourceSerialId: "" },
10
10
  conditionalRules: []
11
11
  };
12
12
  export {
13
- t as DYNAMIC_FORM_CLASSES,
14
- n as DYNAMIC_FORM_KEY_COMPONENT,
15
- s as EMPTY_DATA
13
+ i as DYNAMIC_FORM_CLASSES,
14
+ r as DYNAMIC_FORM_KEY_COMPONENT,
15
+ m as EMPTY_DATA
16
16
  };
@@ -1,6 +1,8 @@
1
1
  export declare const DYNAMIC_FORM_DICTIONARY_KEY = "dynamic_form";
2
2
  export declare const getDynamicFormComponentsDictionary: () => string[];
3
3
  export declare const DYNAMIC_FORM_DICTIONARY: {
4
+ /** Shown when `field.fieldLabel` is missing or blank; use `$1` for the field id (e.g. "Label not found $1"). */
5
+ LABEL_NOT_FOUND_MESSAGE: string;
4
6
  IS_REQUIRED_MESSAGE: string;
5
7
  DATE_RANGE_REQUIRED_MESSAGE: string;
6
8
  MAX_LENGTH_MESSAGE: string;
@@ -1 +1 @@
1
- {"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/DynamicForm/dictionary.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,iBAAiB,CAAC;AAE1D,eAAO,MAAM,kCAAkC,gBAE9C,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;CAWnC,CAAC"}
1
+ {"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/DynamicForm/dictionary.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,iBAAiB,CAAC;AAE1D,eAAO,MAAM,kCAAkC,gBAE9C,CAAC;AAEF,eAAO,MAAM,uBAAuB;IAClC,gHAAgH;;;;;;;;;;;;CAYjH,CAAC"}
@@ -1,4 +1,6 @@
1
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"). */
3
+ LABEL_NOT_FOUND_MESSAGE: `${_}.label_not_found_message`,
2
4
  IS_REQUIRED_MESSAGE: `${_}.is_required_message`,
3
5
  DATE_RANGE_REQUIRED_MESSAGE: `${_}.date_range_required_message`,
4
6
  MAX_LENGTH_MESSAGE: `${_}.max_length_message`,
@@ -3,7 +3,7 @@ import { YupFieldSchema } from './types';
3
3
  /**
4
4
  * Applies "required" validation to a Yup schema based on component type and base schema type.
5
5
  * Component type takes precedence for array/object semantics (e.g. date range = length 2, checkable list = min 1).
6
- * @param field - Field with fieldType.rhfComponent and fieldType.id
6
+ * @param field - Field with fieldType.componentId and fieldType.id
7
7
  * @param schema - Current Yup schema to mutate
8
8
  * @param baseSchema - Base schema used to determine primitive/array/object type
9
9
  * @param errorMessage - Custom error message or default
@@ -1,6 +1,6 @@
1
1
  import * as r from "yup";
2
2
  function l(o, t, i, n) {
3
- const c = o.fieldType.rhfComponent;
3
+ const c = o.fieldType.componentId;
4
4
  if (i instanceof r.ArraySchema)
5
5
  return t.required(n).min(1, n);
6
6
  if (i instanceof r.ObjectSchema) {
@@ -5,30 +5,30 @@ const n = () => t.object().shape({
5
5
  }).nullable(), a = () => t.array().of(t.mixed()), o = {
6
6
  /**
7
7
  * Returns true if this strategy applies to the field (i.e. field is a date range).
8
- * @param field - Form field to check (uses fieldType.rhfComponent and fieldType.id).
8
+ * @param field - Form field to check (uses fieldType.componentId and fieldType.id).
9
9
  * @returns True if the field is a date range field (RHFDateRangePicker or fft_date_range).
10
10
  */
11
11
  applies(e) {
12
- return e.fieldType.rhfComponent === "RHFDateRangePicker" || e.fieldType.id === "fft_date_range";
12
+ return e.fieldType.componentId === "RHFDateRangePicker" || e.fieldType.id === "fft_date_range";
13
13
  },
14
14
  create() {
15
15
  return n();
16
16
  }
17
- }, p = {
17
+ }, c = {
18
18
  /**
19
19
  * Returns true if this strategy applies to the field (checkable list or days of week).
20
20
  * @param field - Form field to check.
21
21
  * @returns True if the field is RHFCheckableList, RHFDaysOfWeekPicker, or fft_checkable_list.
22
22
  */
23
23
  applies(e) {
24
- const r = e.fieldType.rhfComponent;
24
+ const r = e.fieldType.componentId;
25
25
  return r === "RHFCheckableList" || r === "RHFDaysOfWeekPicker" || e.fieldType.id === "fft_checkable_list";
26
26
  },
27
27
  /** Returns a Yup array-of-mixed schema for the field. */
28
28
  create() {
29
29
  return a();
30
30
  }
31
- }, l = {
31
+ }, p = {
32
32
  /**
33
33
  * Returns true if this strategy applies to the field (number/integer/double type).
34
34
  * @param field - Form field to check.
@@ -36,47 +36,47 @@ const n = () => t.object().shape({
36
36
  */
37
37
  applies(e) {
38
38
  const r = e.fieldType.id;
39
- return e.fieldType.rhfComponent === "RHFNumberInput" || r === "fft_number" || r === "fft_integer" || r === "fft_double";
39
+ return e.fieldType.componentId === "RHFNumberInput" || r === "fft_number" || r === "fft_integer" || r === "fft_double";
40
40
  },
41
41
  /** Returns a Yup number schema for the field. */
42
42
  create() {
43
43
  return t.number();
44
44
  }
45
- }, i = {
45
+ }, l = {
46
46
  /**
47
47
  * Returns true if this strategy applies to the field (checkbox/boolean type).
48
- * @param field - Form field to check (uses fieldType.rhfComponent and fieldType.id).
48
+ * @param field - Form field to check (uses fieldType.componentId and fieldType.id).
49
49
  * @returns True if the field is RHFCheckbox or fft_boolean or fft_checkbox.
50
50
  */
51
51
  applies(e) {
52
52
  const r = e.fieldType.id;
53
- return e.fieldType.rhfComponent === "RHFCheckbox" || r === "fft_boolean" || r === "fft_checkbox";
53
+ return e.fieldType.componentId === "RHFCheckbox" || r === "fft_boolean" || r === "fft_checkbox";
54
54
  },
55
55
  /** Returns a Yup boolean schema for the field. */
56
56
  create() {
57
57
  return t.boolean();
58
58
  }
59
- }, s = {
59
+ }, i = {
60
60
  /**
61
61
  * Returns true if this strategy applies to the field (RHFRadioGroup).
62
62
  * @param field - Form field to check.
63
63
  * @returns True if the field is RHFRadioGroup.
64
64
  */
65
65
  applies(e) {
66
- return e.fieldType.rhfComponent === "RHFRadioGroup";
66
+ return e.fieldType.componentId === "RHFRadioGroup";
67
67
  },
68
68
  /** Returns a Yup mixed schema for string or number (selected option value). */
69
69
  create() {
70
70
  return t.mixed();
71
71
  }
72
- }, c = {
72
+ }, s = {
73
73
  /**
74
74
  * Returns true if this strategy applies to the field (RHFSelect).
75
75
  * @param field - Form field to check.
76
76
  * @returns True if the field is RHFSelect.
77
77
  */
78
78
  applies(e) {
79
- return e.fieldType.rhfComponent === "RHFSelect";
79
+ return e.fieldType.componentId === "RHFSelect";
80
80
  },
81
81
  /** Returns a Yup string or array schema depending on isMultiple. */
82
82
  create(e) {
@@ -89,46 +89,46 @@ const n = () => t.object().shape({
89
89
  * @returns True if the field is RHFAutoComplete.
90
90
  */
91
91
  applies(e) {
92
- return e.fieldType.rhfComponent === "RHFAutoComplete";
92
+ return e.fieldType.componentId === "RHFAutoComplete";
93
93
  },
94
94
  /** Returns a Yup mixed/array schema depending on isMultiple. */
95
95
  create(e) {
96
96
  return e.fieldType.rhfComponentProps?.isMultiple === !0 ? t.array().of(t.mixed()) : t.mixed().nullable();
97
97
  }
98
- }, f = {
98
+ }, d = {
99
99
  applies(e) {
100
- return e.fieldType.rhfComponent === "RHFTextField";
100
+ return e.fieldType.componentId === "RHFTextField";
101
101
  },
102
102
  create() {
103
103
  return t.string();
104
104
  }
105
- }, d = {
105
+ }, m = {
106
106
  applies() {
107
107
  return !0;
108
108
  },
109
109
  create() {
110
110
  return t.string();
111
111
  }
112
- }, m = [
112
+ }, f = [
113
113
  o,
114
+ c,
114
115
  p,
115
116
  l,
116
117
  i,
117
118
  s,
118
- c,
119
119
  u,
120
- f,
121
- d
120
+ d,
121
+ m
122
122
  ];
123
123
  export {
124
- m as BASE_SCHEMA_STRATEGIES,
124
+ f as BASE_SCHEMA_STRATEGIES,
125
125
  u as autocompleteBaseSchemaStrategy,
126
- i as booleanBaseSchemaStrategy,
127
- p as checkableListBaseSchemaStrategy,
126
+ l as booleanBaseSchemaStrategy,
127
+ c as checkableListBaseSchemaStrategy,
128
128
  o as dateRangeBaseSchemaStrategy,
129
- d as defaultStringBaseSchemaStrategy,
130
- l as numberBaseSchemaStrategy,
131
- s as radioGroupBaseSchemaStrategy,
132
- c as selectBaseSchemaStrategy,
133
- f as textFieldBaseSchemaStrategy
129
+ m as defaultStringBaseSchemaStrategy,
130
+ p as numberBaseSchemaStrategy,
131
+ i as radioGroupBaseSchemaStrategy,
132
+ s as selectBaseSchemaStrategy,
133
+ d as textFieldBaseSchemaStrategy
134
134
  };
@@ -1 +1 @@
1
- {"version":3,"file":"validationStrategies.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/components/src/components/DynamicForm/helpers/createFieldValidationSchema/strategies/validation/validationStrategies.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,oGAAoG;AACpG,eAAO,MAAM,0BAA0B,EAAE,kBAuBxC,CAAC;AAEF,2BAA2B;AAC3B,eAAO,MAAM,2BAA2B,EAAE,kBAoBzC,CAAC;AAEF,2BAA2B;AAC3B,eAAO,MAAM,2BAA2B,EAAE,kBAoBzC,CAAC;AAEF,0BAA0B;AAC1B,eAAO,MAAM,qBAAqB,EAAE,kBAoBnC,CAAC;AAEF,0BAA0B;AAC1B,eAAO,MAAM,qBAAqB,EAAE,kBAoBnC,CAAC;AAEF,6BAA6B;AAC7B,eAAO,MAAM,uBAAuB,EAAE,kBAerC,CAAC;AAEF,2BAA2B;AAC3B,eAAO,MAAM,qBAAqB,EAAE,kBAenC,CAAC;AAEF,8BAA8B;AAC9B,eAAO,MAAM,yBAAyB,EAAE,kBAuBvC,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,wBAAwB,EAAE,kBA6DtC,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;AAElD,oGAAoG;AACpG,eAAO,MAAM,0BAA0B,EAAE,kBAuBxC,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,70 +1,83 @@
1
- import * as u from "yup";
2
- import { DYNAMIC_FORM_DICTIONARY as l } from "../../../../dictionary.js";
3
- import { applyRequiredValidation as h } from "../../../applyRequiredValidation/applyRequiredValidation.js";
4
- const d = {
1
+ import * as m from "yup";
2
+ import { DYNAMIC_FORM_DICTIONARY as c } from "../../../../dictionary.js";
3
+ import { resolveValidationErrorMessage as u } from "../../../resolveValidationErrorMessage/resolveValidationErrorMessage.js";
4
+ import { applyRequiredValidation as E } from "../../../applyRequiredValidation/applyRequiredValidation.js";
5
+ const p = {
5
6
  validationTypeId: "fvl_required",
6
7
  /**
7
8
  * Applies required validation when the field is required; otherwise returns the schema unchanged.
8
9
  * @param ctx - Context with field, getLabel, baseSchema, schema, and validation
9
10
  * @returns Schema with required validation applied, or unchanged schema
10
11
  */
11
- apply(i) {
12
- const { field: e, getLabel: n, baseSchema: r, schema: t, validation: o } = i;
12
+ apply(r) {
13
+ const { field: e, getLabel: a, baseSchema: i, schema: t, validation: s } = r;
13
14
  if (!e.isRequired)
14
15
  return t;
15
- const a = e.fieldType.rhfComponent === "RHFDateRangePicker" || e.fieldType.id === "fft_date_range", s = o.errorMessage || (a && e.helperText ? e.helperText : n(a ? l.DATE_RANGE_REQUIRED_MESSAGE : l.IS_REQUIRED_MESSAGE));
16
- return h(e, t, r, s);
16
+ const n = e.fieldType.componentId === "RHFDateRangePicker", o = n && e.helperText ? e.helperText : a(n ? c.DATE_RANGE_REQUIRED_MESSAGE : c.IS_REQUIRED_MESSAGE), l = u(s, a, o);
17
+ return E(e, t, i, l);
17
18
  }
18
- }, p = {
19
+ }, v = {
19
20
  validationTypeId: "fvl_max_length",
20
21
  /**
21
22
  * Applies max length constraint to string schema when validation value is present.
22
23
  * @param ctx - Context with field, getLabel, baseSchema, schema, and validation
23
24
  * @returns Schema with `.max(length)` applied, or unchanged schema if not applicable
24
25
  */
25
- apply(i) {
26
- const { validation: e, getLabel: n, baseSchema: r, schema: t } = i;
27
- if (!(e.validationType || e.type)?.requiresValue || !e.value || !(r instanceof u.StringSchema))
26
+ apply(r) {
27
+ const { validation: e, getLabel: a, baseSchema: i, schema: t } = r;
28
+ if (!(e.validationType || e.type)?.requiresValue || !e.value || !(i instanceof m.StringSchema))
28
29
  return t;
29
- const a = parseInt(e.value, 10);
30
- if (isNaN(a))
30
+ const n = parseInt(e.value, 10);
31
+ if (isNaN(n))
31
32
  return t;
32
- const s = e.errorMessage || n(l.MAX_LENGTH_MESSAGE, a);
33
- return t.max(a, s);
33
+ const o = u(
34
+ e,
35
+ a,
36
+ a(c.MAX_LENGTH_MESSAGE, n)
37
+ );
38
+ return t.max(n, o);
34
39
  }
35
- }, v = {
40
+ }, S = {
36
41
  validationTypeId: "fvl_min_length",
37
42
  /**
38
43
  * Applies min length constraint to string schema when validation value is present.
39
44
  * @param ctx - Context with field, getLabel, baseSchema, schema, and validation
40
45
  * @returns Schema with `.min(length)` applied, or unchanged schema if not applicable
41
46
  */
42
- apply(i) {
43
- const { validation: e, getLabel: n, baseSchema: r, schema: t } = i;
44
- if (!(e.validationType || e.type)?.requiresValue || !e.value || !(r instanceof u.StringSchema))
47
+ apply(r) {
48
+ const { validation: e, getLabel: a, baseSchema: i, schema: t } = r;
49
+ if (!(e.validationType || e.type)?.requiresValue || !e.value || !(i instanceof m.StringSchema))
45
50
  return t;
46
- const a = parseInt(e.value, 10);
47
- if (isNaN(a))
51
+ const n = parseInt(e.value, 10);
52
+ if (isNaN(n))
48
53
  return t;
49
- const s = e.errorMessage || n(l.MIN_LENGTH_MESSAGE, a);
50
- return t.min(a, s);
54
+ const o = u(
55
+ e,
56
+ a,
57
+ a(c.MIN_LENGTH_MESSAGE, n)
58
+ );
59
+ return t.min(n, o);
51
60
  }
52
- }, S = {
61
+ }, y = {
53
62
  validationTypeId: "fvl_max",
54
63
  /**
55
64
  * Applies maximum numeric value constraint when validation value is present.
56
65
  * @param ctx - Context with field, getLabel, baseSchema, schema, and validation
57
66
  * @returns Schema with `.max(value)` applied, or unchanged schema if not applicable
58
67
  */
59
- apply(i) {
60
- const { validation: e, getLabel: n, baseSchema: r, schema: t } = i;
61
- if (!(e.validationType || e.type)?.requiresValue || !e.value || !(r instanceof u.NumberSchema))
68
+ apply(r) {
69
+ const { validation: e, getLabel: a, baseSchema: i, schema: t } = r;
70
+ if (!(e.validationType || e.type)?.requiresValue || !e.value || !(i instanceof m.NumberSchema))
62
71
  return t;
63
- const a = parseFloat(e.value);
64
- if (isNaN(a))
72
+ const n = parseFloat(e.value);
73
+ if (isNaN(n))
65
74
  return t;
66
- const s = e.errorMessage || n(l.MAX_VALUE_MESSAGE, a);
67
- return t.max(a, s);
75
+ const o = u(
76
+ e,
77
+ a,
78
+ a(c.MAX_VALUE_MESSAGE, n)
79
+ );
80
+ return t.max(n, o);
68
81
  }
69
82
  }, g = {
70
83
  validationTypeId: "fvl_min",
@@ -73,29 +86,37 @@ const d = {
73
86
  * @param ctx - Context with field, getLabel, baseSchema, schema, and validation
74
87
  * @returns Schema with `.min(value)` applied, or unchanged schema if not applicable
75
88
  */
76
- apply(i) {
77
- const { validation: e, getLabel: n, baseSchema: r, schema: t } = i;
78
- if (!(e.validationType || e.type)?.requiresValue || !e.value || !(r instanceof u.NumberSchema))
89
+ apply(r) {
90
+ const { validation: e, getLabel: a, baseSchema: i, schema: t } = r;
91
+ if (!(e.validationType || e.type)?.requiresValue || !e.value || !(i instanceof m.NumberSchema))
79
92
  return t;
80
- const a = parseFloat(e.value);
81
- if (isNaN(a))
93
+ const n = parseFloat(e.value);
94
+ if (isNaN(n))
82
95
  return t;
83
- const s = e.errorMessage || n(l.MIN_VALUE_MESSAGE, a);
84
- return t.min(a, s);
96
+ const o = u(
97
+ e,
98
+ a,
99
+ a(c.MIN_VALUE_MESSAGE, n)
100
+ );
101
+ return t.min(n, o);
85
102
  }
86
- }, y = {
103
+ }, I = {
87
104
  validationTypeId: "fvl_email",
88
105
  /**
89
106
  * Applies email format validation to string schema.
90
107
  * @param ctx - Context with field, getLabel, baseSchema, schema, and validation
91
108
  * @returns Schema with `.email()` applied, or unchanged schema if base is not string
92
109
  */
93
- apply(i) {
94
- const { validation: e, getLabel: n, baseSchema: r, schema: t } = i;
95
- if (!(r instanceof u.StringSchema))
110
+ apply(r) {
111
+ const { validation: e, getLabel: a, baseSchema: i, schema: t } = r;
112
+ if (!(i instanceof m.StringSchema))
96
113
  return t;
97
- const o = e.errorMessage || n(l.EMAIL_INVALID_MESSAGE);
98
- return t.email(o);
114
+ const s = u(
115
+ e,
116
+ a,
117
+ a(c.EMAIL_INVALID_MESSAGE)
118
+ );
119
+ return t.email(s);
99
120
  }
100
121
  }, f = {
101
122
  validationTypeId: "fvl_url",
@@ -104,14 +125,18 @@ const d = {
104
125
  * @param ctx - Context with field, getLabel, baseSchema, schema, and validation
105
126
  * @returns Schema with `.url()` applied, or unchanged schema if base is not string
106
127
  */
107
- apply(i) {
108
- const { validation: e, getLabel: n, baseSchema: r, schema: t } = i;
109
- if (!(r instanceof u.StringSchema))
128
+ apply(r) {
129
+ const { validation: e, getLabel: a, baseSchema: i, schema: t } = r;
130
+ if (!(i instanceof m.StringSchema))
110
131
  return t;
111
- const o = e.errorMessage || n(l.URL_INVALID_MESSAGE);
112
- return t.url(o);
132
+ const s = u(
133
+ e,
134
+ a,
135
+ a(c.URL_INVALID_MESSAGE)
136
+ );
137
+ return t.url(s);
113
138
  }
114
- }, I = {
139
+ }, T = {
115
140
  validationTypeId: "fvl_pattern",
116
141
  /**
117
142
  * Applies regex pattern validation to string schema when validation value is present.
@@ -119,18 +144,22 @@ const d = {
119
144
  * @param ctx - Context with field, getLabel, baseSchema, schema, and validation
120
145
  * @returns Schema with `.matches(regex)` applied, or unchanged schema if not applicable
121
146
  */
122
- apply(i) {
123
- const { validation: e, getLabel: n, baseSchema: r, schema: t } = i;
124
- if (!(e.validationType || e.type)?.requiresValue || !e.value || !(r instanceof u.StringSchema))
147
+ apply(r) {
148
+ const { validation: e, getLabel: a, baseSchema: i, schema: t } = r;
149
+ if (!(e.validationType || e.type)?.requiresValue || !e.value || !(i instanceof m.StringSchema))
125
150
  return t;
126
151
  try {
127
- const a = new RegExp(e.value), s = e.errorMessage || n(l.PATTERN_INVALID_MESSAGE);
128
- return t.matches(a, s);
129
- } catch (a) {
130
- return console.warn(`Invalid regex pattern: ${e.value}`, a), t;
152
+ const n = new RegExp(e.value), o = u(
153
+ e,
154
+ a,
155
+ a(c.PATTERN_INVALID_MESSAGE)
156
+ );
157
+ return t.matches(n, o);
158
+ } catch (n) {
159
+ return console.warn(`Invalid regex pattern: ${e.value}`, n), t;
131
160
  }
132
161
  }
133
- }, T = {
162
+ }, h = {
134
163
  validationTypeId: "fvl_custom",
135
164
  /**
136
165
  * Applies custom validation: for string, regex or exact match; for number, exact value match.
@@ -138,63 +167,71 @@ const d = {
138
167
  * @param ctx - Context with field, getLabel, baseSchema, schema, and validation
139
168
  * @returns Schema with custom `.test()` applied, or unchanged schema if base type not supported
140
169
  */
141
- apply(i) {
142
- const { validation: e, getLabel: n, baseSchema: r, schema: t } = i, a = (e.validationType || e.type)?.requiresValue && e.value;
143
- if (r instanceof u.StringSchema) {
144
- const s = e.errorMessage || n(l.CUSTOM_VALIDATION_MESSAGE);
145
- return a ? t.test(
170
+ apply(r) {
171
+ const { validation: e, getLabel: a, baseSchema: i, schema: t } = r, n = (e.validationType || e.type)?.requiresValue && e.value;
172
+ if (i instanceof m.StringSchema) {
173
+ const o = u(
174
+ e,
175
+ a,
176
+ a(c.CUSTOM_VALIDATION_MESSAGE)
177
+ );
178
+ return n ? t.test(
146
179
  "custom",
147
- s,
148
- (c) => {
149
- if (!c)
180
+ o,
181
+ (l) => {
182
+ if (!l)
150
183
  return !0;
151
184
  try {
152
- return new RegExp(e.value).test(c);
185
+ return new RegExp(e.value).test(l);
153
186
  } catch {
154
- return c === e.value;
187
+ return l === e.value;
155
188
  }
156
189
  }
157
190
  ) : t.test(
158
191
  "custom",
159
- s,
160
- (c) => !c || !0
192
+ o,
193
+ (l) => !l || !0
161
194
  );
162
195
  }
163
- if (r instanceof u.NumberSchema && a) {
164
- const s = e.errorMessage || n(l.CUSTOM_VALIDATION_MESSAGE);
196
+ if (i instanceof m.NumberSchema && n) {
197
+ const o = u(
198
+ e,
199
+ a,
200
+ a(c.CUSTOM_VALIDATION_MESSAGE)
201
+ );
165
202
  return t.test(
166
203
  "custom",
167
- s,
168
- (c) => {
169
- if (c == null)
204
+ o,
205
+ (l) => {
206
+ if (l == null)
170
207
  return !0;
171
- const m = parseFloat(e.value);
172
- return isNaN(m) ? !0 : c === m;
208
+ const d = parseFloat(e.value);
209
+ return isNaN(d) ? !0 : l === d;
173
210
  }
174
211
  );
175
212
  }
176
213
  return t;
177
214
  }
178
- }, M = {
179
- [d.validationTypeId]: d,
215
+ }, N = {
180
216
  [p.validationTypeId]: p,
181
217
  [v.validationTypeId]: v,
182
218
  [S.validationTypeId]: S,
183
- [g.validationTypeId]: g,
184
219
  [y.validationTypeId]: y,
185
- [f.validationTypeId]: f,
220
+ [g.validationTypeId]: g,
186
221
  [I.validationTypeId]: I,
187
- [T.validationTypeId]: T
222
+ [f.validationTypeId]: f,
223
+ [T.validationTypeId]: T,
224
+ [h.validationTypeId]: h
188
225
  };
189
226
  export {
190
- M as VALIDATION_STRATEGY_REGISTRY,
191
- T as customValidationStrategy,
192
- y as emailValidationStrategy,
193
- p as maxLengthValidationStrategy,
194
- S as maxValidationStrategy,
195
- v as minLengthValidationStrategy,
227
+ N as VALIDATION_STRATEGY_REGISTRY,
228
+ h as customValidationStrategy,
229
+ I as emailValidationStrategy,
230
+ v as maxLengthValidationStrategy,
231
+ y as maxValidationStrategy,
232
+ S as minLengthValidationStrategy,
196
233
  g as minValidationStrategy,
197
- I as patternValidationStrategy,
198
- d as requiredValidationStrategy,
234
+ T as patternValidationStrategy,
235
+ p as requiredValidationStrategy,
199
236
  f as urlValidationStrategy
200
237
  };
@@ -1,7 +1,8 @@
1
1
  /**
2
- * Creates isOptionEqualToValue comparator for RHFAutocomplete given the field key to compare.
3
- * @param compareField - Key of T to compare (e.g. "id")
2
+ * Creates isOptionEqualToValue comparator for RHFAutocomplete given a property path to compare.
3
+ * Supports dot-separated paths (e.g. "id", "user.id") via getPropertyByString.
4
+ * @param comparePath - Property path on T (top-level key or nested, e.g. "user.name")
4
5
  * @returns Comparator (option, value) => boolean
5
6
  */
6
- export declare function createIsOptionEqualToValue<T extends Record<string, unknown>>(compareField: keyof T): (option: T | T[], value: T | null) => boolean;
7
+ export declare function createIsOptionEqualToValue<T extends Record<string, unknown>>(comparePath: string): (option: T | T[], value: T | null) => boolean;
7
8
  //# sourceMappingURL=createIsOptionEqualToValue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createIsOptionEqualToValue.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/DynamicForm/helpers/createIsOptionEqualToValue/createIsOptionEqualToValue.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1E,YAAY,EAAE,MAAM,CAAC,GACpB,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,KAAK,OAAO,CAU/C"}
1
+ {"version":3,"file":"createIsOptionEqualToValue.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/DynamicForm/helpers/createIsOptionEqualToValue/createIsOptionEqualToValue.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1E,WAAW,EAAE,MAAM,GAClB,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,KAAK,OAAO,CAW/C"}
@@ -1,6 +1,12 @@
1
- function f(r) {
2
- return (t, n) => n == null ? !1 : Array.isArray(t) ? t.some((u) => u[r] === n[r]) : t[r] === n[r];
1
+ import { getPropertyByString as n } from "@m4l/core";
2
+ function o(r) {
3
+ return (e, t) => {
4
+ if (t == null)
5
+ return !1;
6
+ const u = n(t, r);
7
+ return Array.isArray(e) ? e.some((i) => n(i, r) === u) : n(e, r) === u;
8
+ };
3
9
  }
4
10
  export {
5
- f as createIsOptionEqualToValue
11
+ o as createIsOptionEqualToValue
6
12
  };
@@ -2,8 +2,12 @@ export * from './applyRequiredValidation';
2
2
  export * from './createFieldValidationSchema';
3
3
  export * from './createIsOptionEqualToValue';
4
4
  export * from './evaluateConditionalRule';
5
+ export * from './isPositiveInteger';
6
+ export * from './isRecord';
5
7
  export * from './normalizeValidation';
8
+ export * from './resolveValidationErrorMessage';
6
9
  export * from './resolveFieldComponent';
10
+ export * from './resolveFieldInputLabel';
7
11
  export * from './resolveInitialValue';
8
12
  export * from './stringifyJsonFieldsForSubmit';
9
13
  //# 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,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,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"}
@@ -0,0 +1,7 @@
1
+ /**
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.
4
+ * @returns True if `value` is a positive integer.
5
+ */
6
+ export declare function isPositiveInteger(value: unknown): value is number;
7
+ //# sourceMappingURL=isPositiveInteger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isPositiveInteger.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/DynamicForm/helpers/isPositiveInteger.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAEjE"}
@@ -0,0 +1,6 @@
1
+ function i(e) {
2
+ return typeof e == "number" && Number.isInteger(e) && Number.isFinite(e) && e >= 1;
3
+ }
4
+ export {
5
+ i as isPositiveInteger
6
+ };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Whether `value` is a non-null plain object (not an array).
3
+ * @param value - Unknown input from the API or form metadata.
4
+ * @returns True if `value` is a plain object record.
5
+ */
6
+ export declare function isRecord(value: unknown): value is Record<string, unknown>;
7
+ //# sourceMappingURL=isRecord.d.ts.map