@micromerce/formbuilder-react 1.0.651 → 1.0.656
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.
- package/dist/components/Checkbox/Checkbox.module.scss +10 -0
- package/dist/components/FormBuilder/FormBuilder.module.scss +94 -0
- package/dist/components/FormFooter/FormFooter.module.scss +65 -0
- package/dist/components/FormGroup/FormGroup.module.scss +69 -0
- package/dist/components/FormList/FormList.module.scss +173 -0
- package/dist/components/Group/Group.module.scss +28 -0
- package/dist/components/Input/Input.module.scss +3 -0
- package/dist/components/InputFreeSolo/InputFreeSolo.module.scss +29 -0
- package/dist/components/MrnInput/MrnInput.module.scss +31 -0
- package/dist/components/MultiSelect/MultiSelect.module.scss +13 -0
- package/dist/components/PasswordInput/PasswordInput.module.scss +26 -0
- package/dist/components/Select/Select.module.scss +15 -0
- package/dist/components/Textarea/Textarea.module.scss +14 -0
- package/dist/components/addressGroup/AddressGroup.module.scss +72 -0
- package/dist/src/assets/icons/error/Error.d.ts +2 -0
- package/dist/src/assets/icons/error/Error.js +6 -0
- package/dist/src/assets/icons/error/Error.js.map +1 -0
- package/dist/src/components/Checkbox/Checkbox.d.ts +10 -0
- package/dist/src/components/Checkbox/Checkbox.js +37 -0
- package/dist/src/components/Checkbox/Checkbox.js.map +1 -0
- package/dist/src/components/Checkbox/index.d.ts +1 -0
- package/dist/src/components/Checkbox/index.js +2 -0
- package/dist/src/components/Checkbox/index.js.map +1 -0
- package/dist/src/components/ControlWrapper/ControlWrapper.d.ts +11 -0
- package/dist/src/components/ControlWrapper/ControlWrapper.js +37 -0
- package/dist/src/components/ControlWrapper/ControlWrapper.js.map +1 -0
- package/dist/src/components/ControlWrapper/index.d.ts +1 -0
- package/dist/src/components/ControlWrapper/index.js +2 -0
- package/dist/src/components/ControlWrapper/index.js.map +1 -0
- package/dist/src/components/DateRangeGroup/DateRangeGroup.d.ts +10 -0
- package/dist/src/components/DateRangeGroup/DateRangeGroup.js +69 -0
- package/dist/src/components/DateRangeGroup/DateRangeGroup.js.map +1 -0
- package/dist/src/components/DateRangeGroup/DateRangeGroup.styles.d.ts +3 -0
- package/dist/src/components/DateRangeGroup/DateRangeGroup.styles.js +59 -0
- package/dist/src/components/DateRangeGroup/DateRangeGroup.styles.js.map +1 -0
- package/dist/src/components/DateRangeGroup/components/CalendarModal.d.ts +14 -0
- package/dist/src/components/DateRangeGroup/components/CalendarModal.js +90 -0
- package/dist/src/components/DateRangeGroup/components/CalendarModal.js.map +1 -0
- package/dist/src/components/DateRangeGroup/index.d.ts +1 -0
- package/dist/src/components/DateRangeGroup/index.js +2 -0
- package/dist/src/components/DateRangeGroup/index.js.map +1 -0
- package/dist/src/components/ErrorBoundary/ErrorBoundary.d.ts +14 -0
- package/dist/src/components/ErrorBoundary/ErrorBoundary.js +22 -0
- package/dist/src/components/ErrorBoundary/ErrorBoundary.js.map +1 -0
- package/dist/src/components/FileUploader/FileUploader.d.ts +9 -0
- package/dist/src/components/FileUploader/FileUploader.js +30 -0
- package/dist/src/components/FileUploader/FileUploader.js.map +1 -0
- package/dist/src/components/FileUploader/index.d.ts +1 -0
- package/dist/src/components/FileUploader/index.js +2 -0
- package/dist/src/components/FileUploader/index.js.map +1 -0
- package/dist/src/components/FormBuilder/FormBuilder.d.ts +25 -0
- package/dist/src/components/FormBuilder/FormBuilder.js +74 -0
- package/dist/src/components/FormBuilder/FormBuilder.js.map +1 -0
- package/dist/src/components/FormBuilder/index.d.ts +1 -0
- package/dist/src/components/FormBuilder/index.js +2 -0
- package/dist/src/components/FormBuilder/index.js.map +1 -0
- package/dist/src/components/FormBuilder/utils/extractFormControlValues/extractFormControlValues.d.ts +6 -0
- package/dist/src/components/FormBuilder/utils/extractFormControlValues/extractFormControlValues.js +50 -0
- package/dist/src/components/FormBuilder/utils/extractFormControlValues/extractFormControlValues.js.map +1 -0
- package/dist/src/components/FormBuilder/utils/extractFormControlValues/index.d.ts +1 -0
- package/dist/src/components/FormBuilder/utils/extractFormControlValues/index.js +2 -0
- package/dist/src/components/FormBuilder/utils/extractFormControlValues/index.js.map +1 -0
- package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/index.d.ts +1 -0
- package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/index.js +2 -0
- package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/index.js.map +1 -0
- package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/jsonToUrlEncoded.d.ts +5 -0
- package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/jsonToUrlEncoded.js +15 -0
- package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/jsonToUrlEncoded.js.map +1 -0
- package/dist/src/components/FormFooter/FormFooter.d.ts +15 -0
- package/dist/src/components/FormFooter/FormFooter.js +46 -0
- package/dist/src/components/FormFooter/FormFooter.js.map +1 -0
- package/dist/src/components/FormFooter/components/Switch.d.ts +1 -0
- package/dist/src/components/FormFooter/components/Switch.js +15 -0
- package/dist/src/components/FormFooter/components/Switch.js.map +1 -0
- package/dist/src/components/FormFooter/index.d.ts +1 -0
- package/dist/src/components/FormFooter/index.js +2 -0
- package/dist/src/components/FormFooter/index.js.map +1 -0
- package/dist/src/components/FormGroup/FormGroup.d.ts +15 -0
- package/dist/src/components/FormGroup/FormGroup.js +18 -0
- package/dist/src/components/FormGroup/FormGroup.js.map +1 -0
- package/dist/src/components/FormGroup/index.d.ts +1 -0
- package/dist/src/components/FormGroup/index.js +2 -0
- package/dist/src/components/FormGroup/index.js.map +1 -0
- package/dist/src/components/FormList/FormList.d.ts +11 -0
- package/dist/src/components/FormList/FormList.js +66 -0
- package/dist/src/components/FormList/FormList.js.map +1 -0
- package/dist/src/components/FormList/index.d.ts +1 -0
- package/dist/src/components/FormList/index.js +2 -0
- package/dist/src/components/FormList/index.js.map +1 -0
- package/dist/src/components/GeneralFormGroup/GeneralFormGroup.d.ts +5 -0
- package/dist/src/components/GeneralFormGroup/GeneralFormGroup.js +4 -0
- package/dist/src/components/GeneralFormGroup/GeneralFormGroup.js.map +1 -0
- package/dist/src/components/GeneralFormGroup/index.d.ts +1 -0
- package/dist/src/components/GeneralFormGroup/index.js +2 -0
- package/dist/src/components/GeneralFormGroup/index.js.map +1 -0
- package/dist/src/components/Group/Group.d.ts +12 -0
- package/dist/src/components/Group/Group.js +32 -0
- package/dist/src/components/Group/Group.js.map +1 -0
- package/dist/src/components/Group/index.d.ts +1 -0
- package/dist/src/components/Group/index.js +2 -0
- package/dist/src/components/Group/index.js.map +1 -0
- package/dist/src/components/Input/Input.d.ts +14 -0
- package/dist/src/components/Input/Input.js +57 -0
- package/dist/src/components/Input/Input.js.map +1 -0
- package/dist/src/components/Input/index.d.ts +1 -0
- package/dist/src/components/Input/index.js +2 -0
- package/dist/src/components/Input/index.js.map +1 -0
- package/dist/src/components/Input/input.styles.d.ts +9 -0
- package/dist/src/components/Input/input.styles.js +24 -0
- package/dist/src/components/Input/input.styles.js.map +1 -0
- package/dist/src/components/InputFreeSolo/InputFreeSolo.d.ts +10 -0
- package/dist/src/components/InputFreeSolo/InputFreeSolo.js +67 -0
- package/dist/src/components/InputFreeSolo/InputFreeSolo.js.map +1 -0
- package/dist/src/components/InputFreeSolo/index.d.ts +1 -0
- package/dist/src/components/InputFreeSolo/index.js +2 -0
- package/dist/src/components/InputFreeSolo/index.js.map +1 -0
- package/dist/src/components/MrnInput/MrnInput.d.ts +11 -0
- package/dist/src/components/MrnInput/MrnInput.js +64 -0
- package/dist/src/components/MrnInput/MrnInput.js.map +1 -0
- package/dist/src/components/MrnInput/hooks/useMrn.d.ts +21 -0
- package/dist/src/components/MrnInput/hooks/useMrn.js +92 -0
- package/dist/src/components/MrnInput/hooks/useMrn.js.map +1 -0
- package/dist/src/components/MrnInput/index.d.ts +1 -0
- package/dist/src/components/MrnInput/index.js +2 -0
- package/dist/src/components/MrnInput/index.js.map +1 -0
- package/dist/src/components/MrnInput/services/fetchMrn.d.ts +3 -0
- package/dist/src/components/MrnInput/services/fetchMrn.js +30 -0
- package/dist/src/components/MrnInput/services/fetchMrn.js.map +1 -0
- package/dist/src/components/MrnInput/ui-helper/Link/Link.d.ts +3 -0
- package/dist/src/components/MrnInput/ui-helper/Link/Link.js +15 -0
- package/dist/src/components/MrnInput/ui-helper/Link/Link.js.map +1 -0
- package/dist/src/components/MrnInput/utils/mrnUtils/mrnUtils.d.ts +8 -0
- package/dist/src/components/MrnInput/utils/mrnUtils/mrnUtils.js +35 -0
- package/dist/src/components/MrnInput/utils/mrnUtils/mrnUtils.js.map +1 -0
- package/dist/src/components/MrnInput/utils/resolveMrnLinks/resolveMrnLink.d.ts +2 -0
- package/dist/src/components/MrnInput/utils/resolveMrnLinks/resolveMrnLink.js +11 -0
- package/dist/src/components/MrnInput/utils/resolveMrnLinks/resolveMrnLink.js.map +1 -0
- package/dist/src/components/MrnInput/utils/resolveNestedQueryLink/resolveNestedQueryLink.d.ts +2 -0
- package/dist/src/components/MrnInput/utils/resolveNestedQueryLink/resolveNestedQueryLink.js +19 -0
- package/dist/src/components/MrnInput/utils/resolveNestedQueryLink/resolveNestedQueryLink.js.map +1 -0
- package/dist/src/components/MrnInput/utils/urlSearchParam/urlSearchParam.d.ts +1 -0
- package/dist/src/components/MrnInput/utils/urlSearchParam/urlSearchParam.js +8 -0
- package/dist/src/components/MrnInput/utils/urlSearchParam/urlSearchParam.js.map +1 -0
- package/dist/src/components/MultiSelect/MultiSelect.d.ts +17 -0
- package/dist/src/components/MultiSelect/MultiSelect.js +61 -0
- package/dist/src/components/MultiSelect/MultiSelect.js.map +1 -0
- package/dist/src/components/MultiSelect/index.d.ts +1 -0
- package/dist/src/components/MultiSelect/index.js +2 -0
- package/dist/src/components/MultiSelect/index.js.map +1 -0
- package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/extractSelectedOptionValues.d.ts +24 -0
- package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/extractSelectedOptionValues.js +21 -0
- package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/extractSelectedOptionValues.js.map +1 -0
- package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/index.d.ts +1 -0
- package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/index.js +2 -0
- package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/index.js.map +1 -0
- package/dist/src/components/PasswordInput/PasswordInput.d.ts +12 -0
- package/dist/src/components/PasswordInput/PasswordInput.js +21 -0
- package/dist/src/components/PasswordInput/PasswordInput.js.map +1 -0
- package/dist/src/components/PasswordInput/index.d.ts +1 -0
- package/dist/src/components/PasswordInput/index.js +2 -0
- package/dist/src/components/PasswordInput/index.js.map +1 -0
- package/dist/src/components/QueryControl/QueryControl.d.ts +13 -0
- package/dist/src/components/QueryControl/QueryControl.js +95 -0
- package/dist/src/components/QueryControl/QueryControl.js.map +1 -0
- package/dist/src/components/QueryControl/data/defaultControls.d.ts +9 -0
- package/dist/src/components/QueryControl/data/defaultControls.js +95 -0
- package/dist/src/components/QueryControl/data/defaultControls.js.map +1 -0
- package/dist/src/components/QueryControl/index.d.ts +1 -0
- package/dist/src/components/QueryControl/index.js +2 -0
- package/dist/src/components/QueryControl/index.js.map +1 -0
- package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.d.ts +8 -0
- package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.js +8 -0
- package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.js.map +1 -0
- package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.styles.d.ts +6 -0
- package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.styles.js +14 -0
- package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.styles.js.map +1 -0
- package/dist/src/components/QueryControl/ui-helper/Wrapper/index.d.ts +1 -0
- package/dist/src/components/QueryControl/ui-helper/Wrapper/index.js +2 -0
- package/dist/src/components/QueryControl/ui-helper/Wrapper/index.js.map +1 -0
- package/dist/src/components/QueryControl/utils/allControlsHidden/allControlsHidden.d.ts +3 -0
- package/dist/src/components/QueryControl/utils/allControlsHidden/allControlsHidden.js +39 -0
- package/dist/src/components/QueryControl/utils/allControlsHidden/allControlsHidden.js.map +1 -0
- package/dist/src/components/QueryControl/utils/allControlsHidden/index.d.ts +1 -0
- package/dist/src/components/QueryControl/utils/allControlsHidden/index.js +2 -0
- package/dist/src/components/QueryControl/utils/allControlsHidden/index.js.map +1 -0
- package/dist/src/components/QueryControl/utils/getMatchingControls.d.ts +9 -0
- package/dist/src/components/QueryControl/utils/getMatchingControls.js +19 -0
- package/dist/src/components/QueryControl/utils/getMatchingControls.js.map +1 -0
- package/dist/src/components/QueryControl/utils/hasExpertControl/hasExpertControl.d.ts +3 -0
- package/dist/src/components/QueryControl/utils/hasExpertControl/hasExpertControl.js +38 -0
- package/dist/src/components/QueryControl/utils/hasExpertControl/hasExpertControl.js.map +1 -0
- package/dist/src/components/QueryControl/utils/hasExpertControl/index.d.ts +1 -0
- package/dist/src/components/QueryControl/utils/hasExpertControl/index.js +2 -0
- package/dist/src/components/QueryControl/utils/hasExpertControl/index.js.map +1 -0
- package/dist/src/components/QueryControl/utils/hideGroup/hideGroup.d.ts +3 -0
- package/dist/src/components/QueryControl/utils/hideGroup/hideGroup.js +9 -0
- package/dist/src/components/QueryControl/utils/hideGroup/hideGroup.js.map +1 -0
- package/dist/src/components/QueryControl/utils/hideGroup/index.d.ts +1 -0
- package/dist/src/components/QueryControl/utils/hideGroup/index.js +2 -0
- package/dist/src/components/QueryControl/utils/hideGroup/index.js.map +1 -0
- package/dist/src/components/Select/Select.d.ts +12 -0
- package/dist/src/components/Select/Select.js +67 -0
- package/dist/src/components/Select/Select.js.map +1 -0
- package/dist/src/components/Select/index.d.ts +1 -0
- package/dist/src/components/Select/index.js +2 -0
- package/dist/src/components/Select/index.js.map +1 -0
- package/dist/src/components/Select/utils/getSelectedOption.d.ts +3 -0
- package/dist/src/components/Select/utils/getSelectedOption.js +8 -0
- package/dist/src/components/Select/utils/getSelectedOption.js.map +1 -0
- package/dist/src/components/Textarea/Textarea.d.ts +10 -0
- package/dist/src/components/Textarea/Textarea.js +55 -0
- package/dist/src/components/Textarea/Textarea.js.map +1 -0
- package/dist/src/components/Textarea/Textarea.types.d.ts +12 -0
- package/dist/src/components/Textarea/Textarea.types.js +2 -0
- package/dist/src/components/Textarea/Textarea.types.js.map +1 -0
- package/dist/src/components/Textarea/aiWrapper/aiAction.d.ts +12 -0
- package/dist/src/components/Textarea/aiWrapper/aiAction.js +21 -0
- package/dist/src/components/Textarea/aiWrapper/aiAction.js.map +1 -0
- package/dist/src/components/Textarea/aiWrapper/aiLayout.d.ts +10 -0
- package/dist/src/components/Textarea/aiWrapper/aiLayout.js +21 -0
- package/dist/src/components/Textarea/aiWrapper/aiLayout.js.map +1 -0
- package/dist/src/components/Textarea/aiWrapper/index.d.ts +11 -0
- package/dist/src/components/Textarea/aiWrapper/index.js +29 -0
- package/dist/src/components/Textarea/aiWrapper/index.js.map +1 -0
- package/dist/src/components/Textarea/aiWrapper/useAi.d.ts +21 -0
- package/dist/src/components/Textarea/aiWrapper/useAi.js +74 -0
- package/dist/src/components/Textarea/aiWrapper/useAi.js.map +1 -0
- package/dist/src/components/Textarea/editors/Default.d.ts +13 -0
- package/dist/src/components/Textarea/editors/Default.js +26 -0
- package/dist/src/components/Textarea/editors/Default.js.map +1 -0
- package/dist/src/components/Textarea/editors/Html.d.ts +10 -0
- package/dist/src/components/Textarea/editors/Html.js +9 -0
- package/dist/src/components/Textarea/editors/Html.js.map +1 -0
- package/dist/src/components/Textarea/editors/Json.d.ts +10 -0
- package/dist/src/components/Textarea/editors/Json.js +9 -0
- package/dist/src/components/Textarea/editors/Json.js.map +1 -0
- package/dist/src/components/Textarea/editors/Markdown.d.ts +10 -0
- package/dist/src/components/Textarea/editors/Markdown.js +20 -0
- package/dist/src/components/Textarea/editors/Markdown.js.map +1 -0
- package/dist/src/components/Textarea/editors/Richtext.d.ts +12 -0
- package/dist/src/components/Textarea/editors/Richtext.js +13 -0
- package/dist/src/components/Textarea/editors/Richtext.js.map +1 -0
- package/dist/src/components/Textarea/index.d.ts +1 -0
- package/dist/src/components/Textarea/index.js +2 -0
- package/dist/src/components/Textarea/index.js.map +1 -0
- package/dist/src/components/addressGroup/AddressGroup.d.ts +12 -0
- package/dist/src/components/addressGroup/AddressGroup.js +39 -0
- package/dist/src/components/addressGroup/AddressGroup.js.map +1 -0
- package/dist/src/components/addressGroup/index.d.ts +1 -0
- package/dist/src/components/addressGroup/index.js +2 -0
- package/dist/src/components/addressGroup/index.js.map +1 -0
- package/dist/src/components/addressGroup/utils/Countries.d.ts +3 -0
- package/dist/src/components/addressGroup/utils/Countries.js +1249 -0
- package/dist/src/components/addressGroup/utils/Countries.js.map +1 -0
- package/dist/src/components/plate/PlateEditor.d.ts +10 -0
- package/dist/src/components/plate/PlateEditor.js +38 -0
- package/dist/src/components/plate/PlateEditor.js.map +1 -0
- package/dist/src/components/plate/PlateEditorContent.d.ts +24 -0
- package/dist/src/components/plate/PlateEditorContent.js +45 -0
- package/dist/src/components/plate/PlateEditorContent.js.map +1 -0
- package/dist/src/components/plate/components/align-dropdown-menu.d.ts +2 -0
- package/dist/src/components/plate/components/align-dropdown-menu.js +33 -0
- package/dist/src/components/plate/components/align-dropdown-menu.js.map +1 -0
- package/dist/src/components/plate/components/blockquote-element.d.ts +21 -0
- package/dist/src/components/plate/components/blockquote-element.js +8 -0
- package/dist/src/components/plate/components/blockquote-element.js.map +1 -0
- package/dist/src/components/plate/components/button.d.ts +14 -0
- package/dist/src/components/plate/components/button.js +38 -0
- package/dist/src/components/plate/components/button.js.map +1 -0
- package/dist/src/components/plate/components/caption.d.ts +43 -0
- package/dist/src/components/plate/components/caption.js +25 -0
- package/dist/src/components/plate/components/caption.js.map +1 -0
- package/dist/src/components/plate/components/checkbox.d.ts +3 -0
- package/dist/src/components/plate/components/checkbox.js +7 -0
- package/dist/src/components/plate/components/checkbox.js.map +1 -0
- package/dist/src/components/plate/components/code-block-combobox.d.ts +48 -0
- package/dist/src/components/plate/components/code-block-combobox.js +131 -0
- package/dist/src/components/plate/components/code-block-combobox.js.map +1 -0
- package/dist/src/components/plate/components/code-block-element.d.ts +22 -0
- package/dist/src/components/plate/components/code-block-element.js +13 -0
- package/dist/src/components/plate/components/code-block-element.js.map +1 -0
- package/dist/src/components/plate/components/code-leaf.d.ts +19 -0
- package/dist/src/components/plate/components/code-leaf.js +8 -0
- package/dist/src/components/plate/components/code-leaf.js.map +1 -0
- package/dist/src/components/plate/components/code-line-element.d.ts +21 -0
- package/dist/src/components/plate/components/code-line-element.js +6 -0
- package/dist/src/components/plate/components/code-line-element.js.map +1 -0
- package/dist/src/components/plate/components/code-syntax-leaf.d.ts +19 -0
- package/dist/src/components/plate/components/code-syntax-leaf.js +11 -0
- package/dist/src/components/plate/components/code-syntax-leaf.js.map +1 -0
- package/dist/src/components/plate/components/color-constants.d.ts +10 -0
- package/dist/src/components/plate/components/color-constants.js +430 -0
- package/dist/src/components/plate/components/color-constants.js.map +1 -0
- package/dist/src/components/plate/components/color-dropdown-menu-items.d.ts +18 -0
- package/dist/src/components/plate/components/color-dropdown-menu-items.js +21 -0
- package/dist/src/components/plate/components/color-dropdown-menu-items.js.map +1 -0
- package/dist/src/components/plate/components/color-dropdown-menu.d.ts +12 -0
- package/dist/src/components/plate/components/color-dropdown-menu.js +18 -0
- package/dist/src/components/plate/components/color-dropdown-menu.js.map +1 -0
- package/dist/src/components/plate/components/color-input.d.ts +2 -0
- package/dist/src/components/plate/components/color-input.js +15 -0
- package/dist/src/components/plate/components/color-input.js.map +1 -0
- package/dist/src/components/plate/components/color-picker.d.ts +18 -0
- package/dist/src/components/plate/components/color-picker.js +19 -0
- package/dist/src/components/plate/components/color-picker.js.map +1 -0
- package/dist/src/components/plate/components/colors-custom.d.ts +10 -0
- package/dist/src/components/plate/components/colors-custom.js +21 -0
- package/dist/src/components/plate/components/colors-custom.js.map +1 -0
- package/dist/src/components/plate/components/command.d.ts +76 -0
- package/dist/src/components/plate/components/command.js +18 -0
- package/dist/src/components/plate/components/command.js.map +1 -0
- package/dist/src/components/plate/components/comment-leaf.d.ts +3 -0
- package/dist/src/components/plate/components/comment-leaf.js +23 -0
- package/dist/src/components/plate/components/comment-leaf.js.map +1 -0
- package/dist/src/components/plate/components/dialog.d.ts +12 -0
- package/dist/src/components/plate/components/dialog.js +16 -0
- package/dist/src/components/plate/components/dialog.js.map +1 -0
- package/dist/src/components/plate/components/dropdown-menu.d.ts +29 -0
- package/dist/src/components/plate/components/dropdown-menu.js +51 -0
- package/dist/src/components/plate/components/dropdown-menu.js.map +1 -0
- package/dist/src/components/plate/components/excalidraw-element.d.ts +21 -0
- package/dist/src/components/plate/components/excalidraw-element.js +12 -0
- package/dist/src/components/plate/components/excalidraw-element.js.map +1 -0
- package/dist/src/components/plate/components/fixed-toolbar-buttons.d.ts +1 -0
- package/dist/src/components/plate/components/fixed-toolbar-buttons.js +25 -0
- package/dist/src/components/plate/components/fixed-toolbar-buttons.js.map +1 -0
- package/dist/src/components/plate/components/fixed-toolbar.d.ts +1 -0
- package/dist/src/components/plate/components/fixed-toolbar.js +4 -0
- package/dist/src/components/plate/components/fixed-toolbar.js.map +1 -0
- package/dist/src/components/plate/components/heading-element.d.ts +24 -0
- package/dist/src/components/plate/components/heading-element.js +30 -0
- package/dist/src/components/plate/components/heading-element.js.map +1 -0
- package/dist/src/components/plate/components/highlight-leaf.d.ts +19 -0
- package/dist/src/components/plate/components/highlight-leaf.js +5 -0
- package/dist/src/components/plate/components/highlight-leaf.js.map +1 -0
- package/dist/src/components/plate/components/hr-element.d.ts +21 -0
- package/dist/src/components/plate/components/hr-element.js +11 -0
- package/dist/src/components/plate/components/hr-element.js.map +1 -0
- package/dist/src/components/plate/components/image-element.d.ts +21 -0
- package/dist/src/components/plate/components/image-element.js +19 -0
- package/dist/src/components/plate/components/image-element.js.map +1 -0
- package/dist/src/components/plate/components/indent-list-toolbar-button.d.ts +18 -0
- package/dist/src/components/plate/components/indent-list-toolbar-button.js +12 -0
- package/dist/src/components/plate/components/indent-list-toolbar-button.js.map +1 -0
- package/dist/src/components/plate/components/indent-todo-marker-component.d.ts +3 -0
- package/dist/src/components/plate/components/indent-todo-marker-component.js +14 -0
- package/dist/src/components/plate/components/indent-todo-marker-component.js.map +1 -0
- package/dist/src/components/plate/components/indent-todo-toolbar-button.d.ts +15 -0
- package/dist/src/components/plate/components/indent-todo-toolbar-button.js +11 -0
- package/dist/src/components/plate/components/indent-todo-toolbar-button.js.map +1 -0
- package/dist/src/components/plate/components/indent-toolbar-button.d.ts +15 -0
- package/dist/src/components/plate/components/indent-toolbar-button.js +10 -0
- package/dist/src/components/plate/components/indent-toolbar-button.js.map +1 -0
- package/dist/src/components/plate/components/inline-combobox.d.ts +29 -0
- package/dist/src/components/plate/components/inline-combobox.js +156 -0
- package/dist/src/components/plate/components/inline-combobox.js.map +1 -0
- package/dist/src/components/plate/components/input.d.ts +8 -0
- package/dist/src/components/plate/components/input.js +20 -0
- package/dist/src/components/plate/components/input.js.map +1 -0
- package/dist/src/components/plate/components/insert-dropdown-menu.d.ts +12 -0
- package/dist/src/components/plate/components/insert-dropdown-menu.js +179 -0
- package/dist/src/components/plate/components/insert-dropdown-menu.js.map +1 -0
- package/dist/src/components/plate/components/kbd-leaf.d.ts +19 -0
- package/dist/src/components/plate/components/kbd-leaf.js +5 -0
- package/dist/src/components/plate/components/kbd-leaf.js.map +1 -0
- package/dist/src/components/plate/components/line-height-dropdown-menu.d.ts +2 -0
- package/dist/src/components/plate/components/line-height-dropdown-menu.js +12 -0
- package/dist/src/components/plate/components/line-height-dropdown-menu.js.map +1 -0
- package/dist/src/components/plate/components/link-element.d.ts +21 -0
- package/dist/src/components/plate/components/link-element.js +10 -0
- package/dist/src/components/plate/components/link-element.js.map +1 -0
- package/dist/src/components/plate/components/link-floating-toolbar.d.ts +5 -0
- package/dist/src/components/plate/components/link-floating-toolbar.js +54 -0
- package/dist/src/components/plate/components/link-floating-toolbar.js.map +1 -0
- package/dist/src/components/plate/components/link-toolbar-button.d.ts +15 -0
- package/dist/src/components/plate/components/link-toolbar-button.js +11 -0
- package/dist/src/components/plate/components/link-toolbar-button.js.map +1 -0
- package/dist/src/components/plate/components/mark-toolbar-button.d.ts +18 -0
- package/dist/src/components/plate/components/mark-toolbar-button.js +11 -0
- package/dist/src/components/plate/components/mark-toolbar-button.js.map +1 -0
- package/dist/src/components/plate/components/media-embed-element.d.ts +21 -0
- package/dist/src/components/plate/components/media-embed-element.js +23 -0
- package/dist/src/components/plate/components/media-embed-element.js.map +1 -0
- package/dist/src/components/plate/components/media-popover.d.ts +7 -0
- package/dist/src/components/plate/components/media-popover.js +30 -0
- package/dist/src/components/plate/components/media-popover.js.map +1 -0
- package/dist/src/components/plate/components/mention-element.d.ts +26 -0
- package/dist/src/components/plate/components/mention-element.js +12 -0
- package/dist/src/components/plate/components/mention-element.js.map +1 -0
- package/dist/src/components/plate/components/mention-input-element.d.ts +25 -0
- package/dist/src/components/plate/components/mention-input-element.js +89 -0
- package/dist/src/components/plate/components/mention-input-element.js.map +1 -0
- package/dist/src/components/plate/components/outdent-toolbar-button.d.ts +15 -0
- package/dist/src/components/plate/components/outdent-toolbar-button.js +10 -0
- package/dist/src/components/plate/components/outdent-toolbar-button.js.map +1 -0
- package/dist/src/components/plate/components/paragraph-element.d.ts +20 -0
- package/dist/src/components/plate/components/paragraph-element.js +4 -0
- package/dist/src/components/plate/components/paragraph-element.js.map +1 -0
- package/dist/src/components/plate/components/placeholder.d.ts +6 -0
- package/dist/src/components/plate/components/placeholder.js +37 -0
- package/dist/src/components/plate/components/placeholder.js.map +1 -0
- package/dist/src/components/plate/components/popover.d.ts +7 -0
- package/dist/src/components/plate/components/popover.js +11 -0
- package/dist/src/components/plate/components/popover.js.map +1 -0
- package/dist/src/components/plate/components/resizable.d.ts +40 -0
- package/dist/src/components/plate/components/resizable.js +38 -0
- package/dist/src/components/plate/components/resizable.js.map +1 -0
- package/dist/src/components/plate/components/separator.d.ts +4 -0
- package/dist/src/components/plate/components/separator.js +20 -0
- package/dist/src/components/plate/components/separator.js.map +1 -0
- package/dist/src/components/plate/components/slash-input-element.d.ts +22 -0
- package/dist/src/components/plate/components/slash-input-element.js +64 -0
- package/dist/src/components/plate/components/slash-input-element.js.map +1 -0
- package/dist/src/components/plate/components/table-cell-element.d.ts +47 -0
- package/dist/src/components/plate/components/table-cell-element.js +35 -0
- package/dist/src/components/plate/components/table-cell-element.js.map +1 -0
- package/dist/src/components/plate/components/table-element.d.ts +24 -0
- package/dist/src/components/plate/components/table-element.js +46 -0
- package/dist/src/components/plate/components/table-element.js.map +1 -0
- package/dist/src/components/plate/components/table-row-element.d.ts +23 -0
- package/dist/src/components/plate/components/table-row-element.js +7 -0
- package/dist/src/components/plate/components/table-row-element.js.map +1 -0
- package/dist/src/components/plate/components/todo-list-element.d.ts +21 -0
- package/dist/src/components/plate/components/todo-list-element.js +12 -0
- package/dist/src/components/plate/components/todo-list-element.js.map +1 -0
- package/dist/src/components/plate/components/toolbar.d.ts +29 -0
- package/dist/src/components/plate/components/toolbar.js +51 -0
- package/dist/src/components/plate/components/toolbar.js.map +1 -0
- package/dist/src/components/plate/components/tooltip.d.ts +12 -0
- package/dist/src/components/plate/components/tooltip.js +26 -0
- package/dist/src/components/plate/components/tooltip.js.map +1 -0
- package/dist/src/components/plate/components/turn-into-dropdown-menu.d.ts +2 -0
- package/dist/src/components/plate/components/turn-into-dropdown-menu.js +93 -0
- package/dist/src/components/plate/components/turn-into-dropdown-menu.js.map +1 -0
- package/dist/src/components/plate/icons.d.ts +85 -0
- package/dist/src/components/plate/icons.js +101 -0
- package/dist/src/components/plate/icons.js.map +1 -0
- package/dist/src/components/plate/lib/autoformat-rules.d.ts +10 -0
- package/dist/src/components/plate/lib/autoformat-rules.js +271 -0
- package/dist/src/components/plate/lib/autoformat-rules.js.map +1 -0
- package/dist/src/components/plate/usePlateEditor.d.ts +4 -0
- package/dist/src/components/plate/usePlateEditor.js +384 -0
- package/dist/src/components/plate/usePlateEditor.js.map +1 -0
- package/dist/src/components/states/error/index.d.ts +5 -0
- package/dist/src/components/states/error/index.js +15 -0
- package/dist/src/components/states/error/index.js.map +1 -0
- package/dist/src/context/FormData.d.ts +33 -0
- package/dist/src/context/FormData.js +109 -0
- package/dist/src/context/FormData.js.map +1 -0
- package/dist/src/hooks/useDependent/enhanced/useInputDependent/useInputDependent.d.ts +12 -0
- package/dist/src/hooks/useDependent/enhanced/useInputDependent/useInputDependent.js +36 -0
- package/dist/src/hooks/useDependent/enhanced/useInputDependent/useInputDependent.js.map +1 -0
- package/dist/src/hooks/useDependent/enhanced/useOptionsGenerator/useOptionsGenerator.d.ts +15 -0
- package/dist/src/hooks/useDependent/enhanced/useOptionsGenerator/useOptionsGenerator.js +16 -0
- package/dist/src/hooks/useDependent/enhanced/useOptionsGenerator/useOptionsGenerator.js.map +1 -0
- package/dist/src/hooks/useDependent/useDependent.d.ts +11 -0
- package/dist/src/hooks/useDependent/useDependent.js +86 -0
- package/dist/src/hooks/useDependent/useDependent.js.map +1 -0
- package/dist/src/hooks/useValueGenerator/useValueGenerator.d.ts +18 -0
- package/dist/src/hooks/useValueGenerator/useValueGenerator.js +99 -0
- package/dist/src/hooks/useValueGenerator/useValueGenerator.js.map +1 -0
- package/dist/src/index.d.ts +18 -0
- package/dist/src/index.js +19 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/styles/Hidden.styles.d.ts +7 -0
- package/dist/src/styles/Hidden.styles.js +16 -0
- package/dist/src/styles/Hidden.styles.js.map +1 -0
- package/dist/src/styles/Skeleton.d.ts +7 -0
- package/dist/src/styles/Skeleton.js +40 -0
- package/dist/src/styles/Skeleton.js.map +1 -0
- package/dist/src/styles/Textfield.styles.d.ts +5 -0
- package/dist/src/styles/Textfield.styles.js +34 -0
- package/dist/src/styles/Textfield.styles.js.map +1 -0
- package/dist/src/testutils.d.ts +14 -0
- package/dist/src/testutils.js +22 -0
- package/dist/src/testutils.js.map +1 -0
- package/dist/src/types/controlProps.d.ts +70 -0
- package/dist/src/types/controlProps.js +2 -0
- package/dist/src/types/controlProps.js.map +1 -0
- package/dist/src/types/index.d.ts +166 -0
- package/dist/src/types/index.js +2 -0
- package/dist/src/types/index.js.map +1 -0
- package/dist/src/ui/menu/hooks/useMenu.d.ts +13 -0
- package/dist/src/ui/menu/hooks/useMenu.js +41 -0
- package/dist/src/ui/menu/hooks/useMenu.js.map +1 -0
- package/dist/src/ui/menu/index.d.ts +13 -0
- package/dist/src/ui/menu/index.js +13 -0
- package/dist/src/ui/menu/index.js.map +1 -0
- package/dist/src/ui/menu/test/createControl.d.ts +15 -0
- package/dist/src/ui/menu/test/createControl.js +30 -0
- package/dist/src/ui/menu/test/createControl.js.map +1 -0
- package/dist/src/ui/menu/utils/detemineSubmenuTabs/index.d.ts +14 -0
- package/dist/src/ui/menu/utils/detemineSubmenuTabs/index.js +82 -0
- package/dist/src/ui/menu/utils/detemineSubmenuTabs/index.js.map +1 -0
- package/dist/src/ui-helper/HeaderCollapseButton/index.d.ts +7 -0
- package/dist/src/ui-helper/HeaderCollapseButton/index.js +9 -0
- package/dist/src/ui-helper/HeaderCollapseButton/index.js.map +1 -0
- package/dist/src/ui-helper/notifications/Error.d.ts +6 -0
- package/dist/src/ui-helper/notifications/Error.js +77 -0
- package/dist/src/ui-helper/notifications/Error.js.map +1 -0
- package/dist/src/ui-helper/notifications/images/background.d.ts +2 -0
- package/dist/src/ui-helper/notifications/images/background.js +7 -0
- package/dist/src/ui-helper/notifications/images/background.js.map +1 -0
- package/dist/src/ui-helper/notifications/images/spinner.d.ts +2 -0
- package/dist/src/ui-helper/notifications/images/spinner.js +6 -0
- package/dist/src/ui-helper/notifications/images/spinner.js.map +1 -0
- package/dist/src/ui-helper/notifications/images/under-improvement.d.ts +2 -0
- package/dist/src/ui-helper/notifications/images/under-improvement.js +6 -0
- package/dist/src/ui-helper/notifications/images/under-improvement.js.map +1 -0
- package/dist/src/utils/findFormControlError/index.d.ts +4 -0
- package/dist/src/utils/findFormControlError/index.js +24 -0
- package/dist/src/utils/findFormControlError/index.js.map +1 -0
- package/dist/src/utils/hasGroupRequiredFieldsWithValues/index.d.ts +6 -0
- package/dist/src/utils/hasGroupRequiredFieldsWithValues/index.js +22 -0
- package/dist/src/utils/hasGroupRequiredFieldsWithValues/index.js.map +1 -0
- package/dist/styles/formControl.module.scss +59 -0
- package/dist/tailwind.config.d.ts +1 -0
- package/dist/tailwind.config.js +17 -0
- package/dist/tailwind.config.js.map +1 -0
- package/dist/webpack.common.d.ts +63 -0
- package/dist/webpack.common.js +76 -0
- package/dist/webpack.common.js.map +1 -0
- package/dist/webpack.dev.d.ts +65 -0
- package/dist/webpack.dev.js +11 -0
- package/dist/webpack.dev.js.map +1 -0
- package/dist/webpack.prod.d.ts +65 -0
- package/dist/webpack.prod.js +10 -0
- package/dist/webpack.prod.js.map +1 -0
- package/package.json +39 -2
- package/dist/formbuilder.js +0 -521
- package/dist/formbuilder.js.LICENSE.txt +0 -60
- package/dist/formbuilder.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePlateEditor.js","sourceRoot":"","sources":["../../../../src/components/plate/usePlateEditor.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAIb,UAAU;AACV,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,eAAe,GAChB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EACL,gBAAgB,EAChB,2BAA2B,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EAAE,EAAE,KAAK,EAAE,CAAC;gBAC1D,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC,SAAS,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC;gBAC5D,CAAC,eAAe,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC,SAAS,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC;gBACxD,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,OAAO;gBACxB,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,WAAW;gBACjC,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE,iBAAiB;gBACzC,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC,SAAS,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;gBACpD,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC,SAAS,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;gBAC5D,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC,SAAS,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;aAC7D,CAAC;SACH;QACD,KAAK,EAAE,KAAK;KACb,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { FaChevronDown } from "@react-icons/all-files/fa/FaChevronDown";
|
|
3
|
+
import { FaChevronUp } from "@react-icons/all-files/fa/FaChevronUp";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
import ErrorIcon from "../../../assets/icons/error/Error";
|
|
6
|
+
import * as styles from "./index.module.scss";
|
|
7
|
+
const ErrorState = ({ error }) => {
|
|
8
|
+
const [isStateErrorMessageOpen, setIsStateErrorMessageOpen] = useState(false);
|
|
9
|
+
const handleToggleErrorMessageOpen = () => {
|
|
10
|
+
setIsStateErrorMessageOpen((prev) => !prev);
|
|
11
|
+
};
|
|
12
|
+
return (_jsxs("div", { className: styles.errorContainer, "data-testid": "form-general-error-container", children: [_jsx("div", { className: styles.iconWrapper, children: _jsx(ErrorIcon, {}) }), _jsx("p", { className: `${styles.errorMessage} ${isStateErrorMessageOpen ? "" : styles.closed}`, "data-testid": "form-general-error-message", children: error }), _jsx("div", { className: styles.errorMessageToggleButtonContainer, children: _jsx("button", { type: "button", onClick: handleToggleErrorMessageOpen, children: isStateErrorMessageOpen ? (_jsx(FaChevronDown, { "data-testid": "form-list__sort-down-button", color: "#B01F14" })) : (_jsx(FaChevronUp, { "data-testid": "form-list__sort-up-button", color: "#B01F14" })) }) })] }));
|
|
13
|
+
};
|
|
14
|
+
export default ErrorState;
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/states/error/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,SAAS,MAAM,mCAAmC,CAAC;AAC1D,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAM9C,MAAM,UAAU,GAAG,CAAC,EAAE,KAAK,EAAmB,EAAE,EAAE;IAChD,MAAM,CAAC,uBAAuB,EAAE,0BAA0B,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9E,MAAM,4BAA4B,GAAG,GAAG,EAAE;QACxC,0BAA0B,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC,CAAC;IAEF,OAAO,CACL,eACE,SAAS,EAAE,MAAM,CAAC,cAAc,iBACpB,8BAA8B,aAE1C,cAAK,SAAS,EAAE,MAAM,CAAC,WAAW,YAChC,KAAC,SAAS,KAAG,GACT,EACN,YACE,SAAS,EAAE,GAAG,MAAM,CAAC,YAAY,IAC/B,uBAAuB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,MACxC,EAAE,iBACU,4BAA4B,YAEvC,KAAK,GACJ,EACJ,cAAK,SAAS,EAAE,MAAM,CAAC,iCAAiC,YACtD,iBAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,4BAA4B,YACxD,uBAAuB,CAAC,CAAC,CAAC,CACzB,KAAC,aAAa,mBACA,6BAA6B,EACzC,KAAK,EAAC,SAAS,GACf,CACH,CAAC,CAAC,CAAC,CACF,KAAC,WAAW,mBACE,2BAA2B,EACvC,KAAK,EAAC,SAAS,GACf,CACH,GACM,GACL,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React, { FC } from "react";
|
|
2
|
+
import type { PostMessageProps, PostMessageResponse } from "../types";
|
|
3
|
+
import { FileUploaderConfig, FormControl, FormControls, resolveUrl } from "../types";
|
|
4
|
+
interface ContextProps {
|
|
5
|
+
formControls: FormControls;
|
|
6
|
+
fileUploaderConfig: FileUploaderConfig;
|
|
7
|
+
hasExpertMode: boolean;
|
|
8
|
+
isExpertMode: boolean;
|
|
9
|
+
enableExpertMode: () => void;
|
|
10
|
+
toggleExpertMode: () => void;
|
|
11
|
+
resolveUrl: resolveUrl;
|
|
12
|
+
updateControl: (id: string, control: FormControl) => void;
|
|
13
|
+
addListItem: (listName: string) => void;
|
|
14
|
+
addFileUploaderConfig: (endpoints: FileUploaderConfig) => void;
|
|
15
|
+
moveListItemUp: (listName: string, index: number) => void;
|
|
16
|
+
moveListItemDown: (listName: string, index: number) => void;
|
|
17
|
+
removeListItem: (listName: string, index: number) => void;
|
|
18
|
+
getControlByObjectPath: (path: string) => FormControl;
|
|
19
|
+
toggleRerendered: boolean;
|
|
20
|
+
postGenAiMessage?: ({ message, profile, }: PostMessageProps) => Promise<PostMessageResponse>;
|
|
21
|
+
}
|
|
22
|
+
export declare const FormDataContext: React.Context<Partial<ContextProps>>;
|
|
23
|
+
export declare const getControlByPath: (formControls: FormControls, path: string) => FormControl;
|
|
24
|
+
export interface ProviderProps {
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
controls: FormControls;
|
|
27
|
+
fileUploaderConfig?: FileUploaderConfig;
|
|
28
|
+
resolveUrl?: resolveUrl;
|
|
29
|
+
postGenAiMessage?: ({ message, profile, }: PostMessageProps) => Promise<PostMessageResponse>;
|
|
30
|
+
}
|
|
31
|
+
export declare const getEnhancedControls: (controls: FormControls) => FormControls;
|
|
32
|
+
export declare const FormDataProvider: FC<ProviderProps>;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import get from "lodash/get";
|
|
3
|
+
import isEqual from "lodash/isEqual";
|
|
4
|
+
import merge from "lodash/merge";
|
|
5
|
+
import set from "lodash/set";
|
|
6
|
+
import { createContext, useEffect, useState } from "react";
|
|
7
|
+
import { v4 as uuidv4 } from "uuid";
|
|
8
|
+
import findFormControlError from "../utils/findFormControlError";
|
|
9
|
+
const defaultContextProps = {
|
|
10
|
+
formControls: {},
|
|
11
|
+
fileUploaderConfig: {},
|
|
12
|
+
hasExpertMode: false,
|
|
13
|
+
isExpertMode: false,
|
|
14
|
+
};
|
|
15
|
+
export const FormDataContext = createContext(defaultContextProps);
|
|
16
|
+
export const getControlByPath = (formControls, path) => {
|
|
17
|
+
return get(formControls, path);
|
|
18
|
+
};
|
|
19
|
+
export const getEnhancedControls = (controls) => {
|
|
20
|
+
return Object.entries(controls)
|
|
21
|
+
.map(([name, control]) => ({ [name]: merge(control, { key: uuidv4() }) }))
|
|
22
|
+
.reduce((prev, cur) => merge(prev, cur), {});
|
|
23
|
+
};
|
|
24
|
+
export const FormDataProvider = ({ children, controls, fileUploaderConfig, resolveUrl, postGenAiMessage, }) => {
|
|
25
|
+
const [formControls, setFormControls] = useState(controls || defaultContextProps.formControls);
|
|
26
|
+
const [hasExpertMode, setHasExpertMode] = useState(defaultContextProps.hasExpertMode);
|
|
27
|
+
const [isExpertMode, setIsExpertMode] = useState(defaultContextProps.isExpertMode);
|
|
28
|
+
const [toggleRerendered, setToggleRerendered] = useState(false);
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
if (!isEqual(controls, formControls)) {
|
|
31
|
+
setFormControls(controls);
|
|
32
|
+
}
|
|
33
|
+
// used for textarea convert when submit failed and we get the converted value from backend
|
|
34
|
+
setToggleRerendered((prev) => !prev);
|
|
35
|
+
//* enable expert mode when control with expert mode has error
|
|
36
|
+
if (findFormControlError(controls, "expert")) {
|
|
37
|
+
setIsExpertMode(true);
|
|
38
|
+
}
|
|
39
|
+
}, [controls]);
|
|
40
|
+
const updateControl = (objectPathId, control) => {
|
|
41
|
+
setFormControls((formControls) => {
|
|
42
|
+
const existingErrors = get(formControls, `${objectPathId}.error`, null);
|
|
43
|
+
const updatedControl = existingErrors
|
|
44
|
+
? { ...control, error: existingErrors } // keep existing errors (DEV-6411)
|
|
45
|
+
: control;
|
|
46
|
+
return merge({}, set(formControls, objectPathId, updatedControl));
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
const addListItem = (objectPathId) => {
|
|
50
|
+
setFormControls((formControls) => {
|
|
51
|
+
const templateObjectPathId = objectPathId.replace(/items.\[\d+\]/g, "template");
|
|
52
|
+
const currentControl = (get(formControls, objectPathId) ||
|
|
53
|
+
get(formControls, templateObjectPathId));
|
|
54
|
+
const template = currentControl.template;
|
|
55
|
+
const newItem = getEnhancedControls(merge({}, template));
|
|
56
|
+
return merge({}, set(formControls, `${objectPathId}.items`, [newItem].concat(currentControl.items || [])));
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
const removeListItem = (objectPathId, index) => {
|
|
60
|
+
setFormControls((formControls) => {
|
|
61
|
+
const currentControl = get(formControls, objectPathId);
|
|
62
|
+
const updatedItems = currentControl.items.filter((_, i) => i !== index);
|
|
63
|
+
return merge({}, set(formControls, `${objectPathId}.items`, updatedItems));
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
const moveListItemUp = (objectPathId, index) => {
|
|
67
|
+
setFormControls((formControls) => {
|
|
68
|
+
const currentControl = get(formControls, objectPathId);
|
|
69
|
+
const items = currentControl.items;
|
|
70
|
+
const item1 = items[index];
|
|
71
|
+
items[index] = items[index - 1];
|
|
72
|
+
items[index - 1] = item1;
|
|
73
|
+
return merge({}, set(formControls, `${objectPathId}.items`, currentControl.items));
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
const moveListItemDown = (objectPathId, index) => {
|
|
77
|
+
setFormControls((formControls) => {
|
|
78
|
+
const currentControl = get(formControls, objectPathId);
|
|
79
|
+
const items = currentControl.items;
|
|
80
|
+
const item1 = items[index];
|
|
81
|
+
items[index] = items[index + 1];
|
|
82
|
+
items[index + 1] = item1;
|
|
83
|
+
return merge({}, set(formControls, `${objectPathId}.items`, currentControl.items));
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
const getControlByObjectPath = (path) => {
|
|
87
|
+
return getControlByPath(formControls, path);
|
|
88
|
+
};
|
|
89
|
+
const enableExpertMode = () => setHasExpertMode(true);
|
|
90
|
+
const toggleExpertMode = () => setIsExpertMode((isExpertMode) => !isExpertMode);
|
|
91
|
+
return (_jsx(FormDataContext.Provider, { value: {
|
|
92
|
+
formControls,
|
|
93
|
+
fileUploaderConfig,
|
|
94
|
+
hasExpertMode,
|
|
95
|
+
isExpertMode,
|
|
96
|
+
enableExpertMode,
|
|
97
|
+
toggleExpertMode,
|
|
98
|
+
resolveUrl,
|
|
99
|
+
updateControl,
|
|
100
|
+
addListItem,
|
|
101
|
+
moveListItemUp,
|
|
102
|
+
moveListItemDown,
|
|
103
|
+
removeListItem,
|
|
104
|
+
getControlByObjectPath,
|
|
105
|
+
toggleRerendered,
|
|
106
|
+
postGenAiMessage,
|
|
107
|
+
}, children: children }));
|
|
108
|
+
};
|
|
109
|
+
//# sourceMappingURL=FormData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormData.js","sourceRoot":"","sources":["../../../src/context/FormData.tsx"],"names":[],"mappings":";AAAA,OAAO,GAAG,MAAM,YAAY,CAAC;AAC7B,OAAO,OAAO,MAAM,gBAAgB,CAAC;AACrC,OAAO,KAAK,MAAM,cAAc,CAAC;AACjC,OAAO,GAAG,MAAM,YAAY,CAAC;AAC7B,OAAc,EAAE,aAAa,EAAM,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AASpC,OAAO,oBAAoB,MAAM,+BAA+B,CAAC;AAwBjE,MAAM,mBAAmB,GAA0B;IACjD,YAAY,EAAE,EAAE;IAChB,kBAAkB,EAAE,EAAE;IACtB,aAAa,EAAE,KAAK;IACpB,YAAY,EAAE,KAAK;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAC1B,aAAa,CAAwB,mBAAmB,CAAC,CAAC;AAE5D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,YAA0B,EAAE,IAAY,EAAE,EAAE;IAC3E,OAAO,GAAG,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;AACjC,CAAC,CAAC;AAaF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,QAAsB,EAAgB,EAAE;IAC1E,OAAO,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC;SAC5B,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,CAA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AAY,EAAE,GAAG,YAAY,QAAQ,EAAE,cAAc,CAAC,KAAK,CAAC,CACjE,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,MAAM,sBAAsB,GAAG,CAAC,IAAY,EAAE,EAAE;QAC9C,OAAO,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IAC9C,CAAC,CAAC;IAEF,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACtD,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAC5B,eAAe,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC;IAEnD,OAAO,CACL,KAAC,eAAe,CAAC,QAAQ,IACvB,KAAK,EAAE;YACL,YAAY;YACZ,kBAAkB;YAClB,aAAa;YACb,YAAY;YACZ,gBAAgB;YAChB,gBAAgB;YAChB,UAAU;YACV,aAAa;YACb,WAAW;YACX,cAAc;YACd,gBAAgB;YAChB,cAAc;YACd,sBAAsB;YACtB,gBAAgB;YAChB,gBAAgB;SACjB,YAEA,QAAQ,GACgB,CAC5B,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ControlCommons, OnChangeValueType } from "../../../../types";
|
|
2
|
+
interface IUseInputDependentProps {
|
|
3
|
+
onChangeValue: (newProperties: OnChangeValueType, customizer?: (...args: any) => any) => void;
|
|
4
|
+
query: string;
|
|
5
|
+
objectPathId: string;
|
|
6
|
+
value: string;
|
|
7
|
+
hasEdited?: ControlCommons["hasEdited"];
|
|
8
|
+
}
|
|
9
|
+
declare const useInputDependent: ({ onChangeValue, query, objectPathId, value, hasEdited, }: IUseInputDependentProps) => {
|
|
10
|
+
textColor: string;
|
|
11
|
+
};
|
|
12
|
+
export default useInputDependent;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
import useDependent from "../../useDependent";
|
|
3
|
+
const COLOR_DEFAULT = "rgb(85, 85, 85)";
|
|
4
|
+
const COLOR_SYNC = "rgba(85, 85, 85, 0.6)";
|
|
5
|
+
const useInputDependent = ({ onChangeValue, query, objectPathId, value, hasEdited, }) => {
|
|
6
|
+
if (!query)
|
|
7
|
+
return { textColor: COLOR_DEFAULT };
|
|
8
|
+
const { resolvedQuery, mrnEntriesLoaded } = useDependent({
|
|
9
|
+
query,
|
|
10
|
+
objectPathId,
|
|
11
|
+
});
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
// initial
|
|
14
|
+
if (!hasEdited && resolvedQuery) {
|
|
15
|
+
if (value.length === 0 && !!resolvedQuery) {
|
|
16
|
+
onChangeValue({ value: resolvedQuery, hasEdited: "not-edited" });
|
|
17
|
+
}
|
|
18
|
+
else if (value === resolvedQuery) {
|
|
19
|
+
onChangeValue({ value: resolvedQuery, hasEdited: "not-edited" });
|
|
20
|
+
}
|
|
21
|
+
else if (value !== resolvedQuery) {
|
|
22
|
+
onChangeValue({ value, hasEdited: "edited" });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (hasEdited) {
|
|
26
|
+
const newValue = hasEdited === "not-edited" ? resolvedQuery : value;
|
|
27
|
+
onChangeValue({ value: newValue });
|
|
28
|
+
}
|
|
29
|
+
}, [resolvedQuery]);
|
|
30
|
+
const textColor = (!hasEdited || hasEdited === "not-edited") && value?.length > 0
|
|
31
|
+
? COLOR_SYNC
|
|
32
|
+
: COLOR_DEFAULT;
|
|
33
|
+
return { textColor: mrnEntriesLoaded ? textColor : COLOR_DEFAULT };
|
|
34
|
+
};
|
|
35
|
+
export default useInputDependent;
|
|
36
|
+
//# sourceMappingURL=useInputDependent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInputDependent.js","sourceRoot":"","sources":["../../../../../../src/hooks/useDependent/enhanced/useInputDependent/useInputDependent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OA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CAAC,SAAS,IAAI,SAAS,KAAK,YAAY,CAAC,IAAI,KAAK,EAAE,MAAM,GAAG,CAAC;QAC7D,CAAC,CAAC,UAAU;QACZ,CAAC,CAAC,aAAa,CAAC;IAEpB,OAAO,EAAE,SAAS,EAAE,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC;AACrE,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { SelectFormControlOption } from "../../../../types";
|
|
2
|
+
interface IUseOptionsGeneratorProps {
|
|
3
|
+
query: string;
|
|
4
|
+
controlKey: string;
|
|
5
|
+
objectPathId: string;
|
|
6
|
+
options: SelectFormControlOption[];
|
|
7
|
+
}
|
|
8
|
+
declare const useOptionsGenerator: ({ query, controlKey, objectPathId, options, }: IUseOptionsGeneratorProps) => {
|
|
9
|
+
options: SelectFormControlOption[];
|
|
10
|
+
mrnEntriesLoaded?: undefined;
|
|
11
|
+
} | {
|
|
12
|
+
options: any;
|
|
13
|
+
mrnEntriesLoaded: boolean;
|
|
14
|
+
};
|
|
15
|
+
export default useOptionsGenerator;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import useDependent from "../../useDependent";
|
|
2
|
+
const useOptionsGenerator = ({ query, controlKey, objectPathId, options, }) => {
|
|
3
|
+
if (!query)
|
|
4
|
+
return { options };
|
|
5
|
+
const optionsRegexValue = `#{${controlKey}.options}`;
|
|
6
|
+
const queryWithSelectOptions = query.replaceAll(optionsRegexValue, JSON.stringify(options));
|
|
7
|
+
const { resolvedQuery, mrnEntriesLoaded } = useDependent({
|
|
8
|
+
query: queryWithSelectOptions,
|
|
9
|
+
objectPathId,
|
|
10
|
+
});
|
|
11
|
+
// eslint-disable-next-line no-eval
|
|
12
|
+
const resolvedQueryOptions = eval(resolvedQuery);
|
|
13
|
+
return { options: resolvedQueryOptions, mrnEntriesLoaded };
|
|
14
|
+
};
|
|
15
|
+
export default useOptionsGenerator;
|
|
16
|
+
//# sourceMappingURL=useOptionsGenerator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOptionsGenerator.js","sourceRoot":"","sources":["../../../../../../src/hooks/useDependent/enhanced/useOptionsGenerator/useOptionsGenerator.tsx"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAS9C,MAAM,mBAAmB,GAAG,CAAC,EAC3B,KAAK,EACL,UAAU,EACV,YAAY,EACZ,OAAO,GACmB,EAAE,EAAE;IAC9B,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,OAAO,EAAE,CAAC;IAE/B,MAAM,iBAAiB,GAAG,KAAK,UAAU,WAAW,CAAC;IACrD,MAAM,sBAAsB,GAAG,KAAK,CAAC,UAAU,CAC7C,iBAAiB,EACjB,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CACxB,CAAC;IAEF,MAAM,EAAE,aAAa,EAAE,gBAAgB,EAAE,GAAG,YAAY,CAAC;QACvD,KAAK,EAAE,sBAAsB;QAC7B,YAAY;KACb,CAAC,CAAC;IAEH,mCAAmC;IACnC,MAAM,oBAAoB,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC;IAEjD,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,CAAC;AAC7D,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface IUseDependentProps {
|
|
2
|
+
query: string | null;
|
|
3
|
+
objectPathId: string | null;
|
|
4
|
+
}
|
|
5
|
+
declare const useDependent: ({ query, objectPathId }: IUseDependentProps) => {
|
|
6
|
+
dependentControls: string[];
|
|
7
|
+
resolvedQuery: string;
|
|
8
|
+
isDisabled: boolean;
|
|
9
|
+
mrnEntriesLoaded: boolean;
|
|
10
|
+
};
|
|
11
|
+
export default useDependent;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import get from "lodash/get";
|
|
2
|
+
import { useContext } from "react";
|
|
3
|
+
import resolveNestedQueryLink from "../../components/MrnInput/utils/resolveNestedQueryLink/resolveNestedQueryLink";
|
|
4
|
+
import { FormDataContext } from "../../context/FormData";
|
|
5
|
+
const useDependent = ({ query, objectPathId }) => {
|
|
6
|
+
let mrnEntriesLoaded = true;
|
|
7
|
+
if (!query) {
|
|
8
|
+
return {
|
|
9
|
+
dependentControls: [],
|
|
10
|
+
resolvedQuery: "",
|
|
11
|
+
isDisabled: false,
|
|
12
|
+
mrnEntriesLoaded,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
const { getControlByObjectPath } = useContext(FormDataContext);
|
|
16
|
+
const dependentControls = [];
|
|
17
|
+
let isDisabled = false;
|
|
18
|
+
let currentDependentQuery = query;
|
|
19
|
+
let hasDependentQuery = true;
|
|
20
|
+
// loops over query till there is no dependent control
|
|
21
|
+
while (hasDependentQuery) {
|
|
22
|
+
// gets next dependent control path
|
|
23
|
+
let queryValue = currentDependentQuery.match(/#{(.*?)\}/)?.[1];
|
|
24
|
+
// if there is no dependent control left exit
|
|
25
|
+
if (!queryValue) {
|
|
26
|
+
hasDependentQuery = false;
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
// default attribute key
|
|
30
|
+
let attributeKey = "value";
|
|
31
|
+
// checks if there is a specific attribute key for mrns
|
|
32
|
+
const isMrnAttributeQuery = queryValue.includes("@");
|
|
33
|
+
if (isMrnAttributeQuery) {
|
|
34
|
+
attributeKey = queryValue.split(".@")[1];
|
|
35
|
+
queryValue = queryValue.replace(`.@${attributeKey}`, "");
|
|
36
|
+
}
|
|
37
|
+
// resolve groups in QueryValue
|
|
38
|
+
const splittedQueryIdPaths = queryValue.split(".");
|
|
39
|
+
let resolvedQueryValueWithControlPaths = queryValue;
|
|
40
|
+
if (splittedQueryIdPaths.length > 1) {
|
|
41
|
+
resolvedQueryValueWithControlPaths = splittedQueryIdPaths
|
|
42
|
+
.map((query, index) => {
|
|
43
|
+
if (!query.includes("[*]") &&
|
|
44
|
+
index !== splittedQueryIdPaths.length - 1) {
|
|
45
|
+
return `${query}.controls`;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
return query;
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
.join(".");
|
|
52
|
+
}
|
|
53
|
+
// build control path to dependent control
|
|
54
|
+
const resolvedQueryValue = resolveNestedQueryLink(objectPathId, resolvedQueryValueWithControlPaths);
|
|
55
|
+
// gets dependent control
|
|
56
|
+
const dependentControl = getControlByObjectPath(resolvedQueryValue);
|
|
57
|
+
// check if dependent control has value
|
|
58
|
+
const isDepenentControlFilled = dependentControl?.value;
|
|
59
|
+
if (!isDepenentControlFilled)
|
|
60
|
+
isDisabled = true;
|
|
61
|
+
// gets dependent control value
|
|
62
|
+
let dependentControlValue = isMrnAttributeQuery
|
|
63
|
+
? get(dependentControl?.mrnEntries, attributeKey)
|
|
64
|
+
: dependentControl?.value;
|
|
65
|
+
// break if value is empty
|
|
66
|
+
if (!dependentControlValue) {
|
|
67
|
+
dependentControlValue = "";
|
|
68
|
+
// edge case for mrn input with value but no mrnEntries
|
|
69
|
+
if (dependentControl?.value && !dependentControl?.mrnEntries) {
|
|
70
|
+
mrnEntriesLoaded = false;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const dependentControlDisplayName = dependentControl?.displayName;
|
|
74
|
+
dependentControls.push(dependentControlDisplayName);
|
|
75
|
+
// replace query regex part in current query
|
|
76
|
+
currentDependentQuery = currentDependentQuery.replace(`#{${isMrnAttributeQuery ? `${queryValue}.@${attributeKey}` : queryValue}}`, dependentControlValue);
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
dependentControls,
|
|
80
|
+
resolvedQuery: currentDependentQuery,
|
|
81
|
+
isDisabled,
|
|
82
|
+
mrnEntriesLoaded,
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export default useDependent;
|
|
86
|
+
//# sourceMappingURL=useDependent.js.map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BAAqB,GAAG,EAAE,CAAC;YAE3B,uDAAuD;YACvD,IAAI,gBAAgB,EAAE,KAAK,IAAI,CAAC,gBAAgB,EAAE,UAAU,EAAE,CAAC;gBAC7D,gBAAgB,GAAG,KAAK,CAAC;YAC3B,CAAC;QACH,CAAC;QAED,MAAM,2BAA2B,GAAG,gBAAgB,EAAE,WAAW,CAAC;QAClE,iBAAiB,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;QAEpD,4CAA4C;QAC5C,qBAAqB,GAAG,qBAAqB,CAAC,OAAO,CACnD,KACE,mBAAmB,CAAC,CAAC,CAAC,GAAG,UAAU,KAAK,YAAY,EAAE,CAAC,CAAC,CAAC,UAC3D,GAAG,EACH,qBAAqB,CACtB,CAAC;IACJ,CAAC;IAED,OAAO;QACL,iBAAiB;QACjB,aAAa,EAAE,qBAAqB;QACpC,UAAU;QACV,gBAAgB;KACjB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { FormControls } from "../../types";
|
|
2
|
+
interface IUseValueGeneratorProps {
|
|
3
|
+
query: string | null;
|
|
4
|
+
objectPathId: string | null;
|
|
5
|
+
}
|
|
6
|
+
interface IUseValueGeneratorWithContextProps extends IUseValueGeneratorProps {
|
|
7
|
+
formControls: FormControls;
|
|
8
|
+
}
|
|
9
|
+
declare const useValueGenerator: ({ query, formControls, objectPathId, }: IUseValueGeneratorWithContextProps) => {
|
|
10
|
+
value: any;
|
|
11
|
+
hasQuery: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare const useValueGeneratorWithContext: ({ query, objectPathId, }: IUseValueGeneratorProps) => {
|
|
14
|
+
value: any;
|
|
15
|
+
hasQuery: boolean;
|
|
16
|
+
};
|
|
17
|
+
export { useValueGenerator, useValueGeneratorWithContext };
|
|
18
|
+
export default useValueGeneratorWithContext;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import extractFormControlValues from "../../components/FormBuilder/utils/extractFormControlValues";
|
|
3
|
+
import getSelectedOption from "../../components/Select/utils/getSelectedOption";
|
|
4
|
+
import { FormDataContext, getControlByPath } from "../../context/FormData";
|
|
5
|
+
const REGEX_QUERY_CONTROL_PATH = /(\$|_)(\.[\w]+)+(?!\w*\()/g;
|
|
6
|
+
const useValueGenerator = ({ query, formControls, objectPathId, }) => {
|
|
7
|
+
try {
|
|
8
|
+
if (!query)
|
|
9
|
+
return { value: "", hasQuery: false };
|
|
10
|
+
let currentDependentQuery = query;
|
|
11
|
+
let hasDependentQuery = true;
|
|
12
|
+
while (hasDependentQuery) {
|
|
13
|
+
const queryControlPath = currentDependentQuery.match(REGEX_QUERY_CONTROL_PATH)?.[0];
|
|
14
|
+
if (!queryControlPath) {
|
|
15
|
+
hasDependentQuery = false;
|
|
16
|
+
break;
|
|
17
|
+
}
|
|
18
|
+
const splittedQueryControlPath = queryControlPath.split(".");
|
|
19
|
+
const queryControlPathWithoutOperator = splittedQueryControlPath
|
|
20
|
+
.slice(1)
|
|
21
|
+
.join(".");
|
|
22
|
+
const splittedQueryControlPathWithoutOperator = queryControlPathWithoutOperator.split(".");
|
|
23
|
+
// add controls path for group controls to query
|
|
24
|
+
let queryControlPathWithoutOperatorWithControls = splittedQueryControlPathWithoutOperator
|
|
25
|
+
.map((query, index) => {
|
|
26
|
+
if (index !== splittedQueryControlPathWithoutOperator.length - 1) {
|
|
27
|
+
return `${query}.controls`;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
return query;
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
.join(".");
|
|
34
|
+
if (queryControlPath.includes("$.")) {
|
|
35
|
+
if (objectPathId?.includes(".")) {
|
|
36
|
+
queryControlPathWithoutOperatorWithControls = `${objectPathId
|
|
37
|
+
.split(".")
|
|
38
|
+
.slice(0, -1)
|
|
39
|
+
.join(".")}.${queryControlPathWithoutOperatorWithControls}`;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
// get control value
|
|
43
|
+
const control = getControlByPath(formControls, queryControlPathWithoutOperatorWithControls.trim());
|
|
44
|
+
if (!control)
|
|
45
|
+
return { value: "", hasQuery: false };
|
|
46
|
+
const isList = control?.control === "list";
|
|
47
|
+
const isGroup = control?.control === "group";
|
|
48
|
+
const isSelect = control?.control === "select";
|
|
49
|
+
let controlValue;
|
|
50
|
+
if (isList) {
|
|
51
|
+
controlValue = control.items;
|
|
52
|
+
}
|
|
53
|
+
else if (isGroup) {
|
|
54
|
+
controlValue = control.controls;
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
controlValue = control.value;
|
|
58
|
+
}
|
|
59
|
+
if (isList) {
|
|
60
|
+
controlValue = JSON.stringify(extractFormControlValues({ key: control }).key);
|
|
61
|
+
}
|
|
62
|
+
else if (isSelect && !controlValue) {
|
|
63
|
+
controlValue = getSelectedOption(control.options, "")?.value;
|
|
64
|
+
}
|
|
65
|
+
// controlValue can be a number or string
|
|
66
|
+
const isNumber = control?.control === "input" && control?.type === "number";
|
|
67
|
+
if (!isNumber && !isList && controlValue) {
|
|
68
|
+
controlValue = `"${controlValue}"`;
|
|
69
|
+
}
|
|
70
|
+
if (!controlValue) {
|
|
71
|
+
controlValue = "''";
|
|
72
|
+
}
|
|
73
|
+
// replace query with control value
|
|
74
|
+
currentDependentQuery = currentDependentQuery.replace(queryControlPath.trim(), controlValue);
|
|
75
|
+
}
|
|
76
|
+
// eslint-disable-next-line no-eval
|
|
77
|
+
const value = eval(currentDependentQuery);
|
|
78
|
+
return { value, hasQuery: true };
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
console.error("Error in useValueGenerator", error);
|
|
82
|
+
return { value: "", hasQuery: false };
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
const useValueGeneratorWithContext = ({ query, objectPathId, }) => {
|
|
86
|
+
try {
|
|
87
|
+
if (!query)
|
|
88
|
+
return { value: "", hasQuery: false };
|
|
89
|
+
const { formControls } = useContext(FormDataContext);
|
|
90
|
+
return useValueGenerator({ query, formControls, objectPathId });
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
console.error("Error in useValueGenerator", error);
|
|
94
|
+
return { value: "", hasQuery: false };
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
export { useValueGenerator, useValueGeneratorWithContext };
|
|
98
|
+
export default useValueGeneratorWithContext;
|
|
99
|
+
//# sourceMappingURL=useValueGenerator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useValueGenerator.js","sourceRoot":"","sources":["../../../../src/hooks/useValueGenerator/useValueGenerator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,wBAAwB,MAAM,6DAA6D,CAAC;AACnG,OAAO,iBAAiB,MAAM,iDAAiD,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAY3E,MAAM,wBAAwB,GAAG,4BAA4B,CAAC;AAE9D,MAAM,iBAAiB,GAAG,CAAC,EACzB,KAAK,EACL,YAAY,EACZ,YAAY,GACuB,EAAE,EAAE;IACvC,IAAI,CAAC;QACH,IAAI,CAAC,KAAK;YAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;QAElD,IAAI,qBAAqB,GAAG,KAAK,CAAC;QAClC,IAAI,iBAAiB,GAAG,IAAI,CAAC;QAE7B,OAAO,iBAAiB,EAAE,CAAC;YACzB,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,KAAK,CAClD,wBAAwB,CACzB,EAAE,CAAC,CAAC,CAAC,CAAC;YAEP,IAAI,CAAC,gBAAgB,EAAE,CAAC;gBACtB,iBAAiB,GAAG,KAAK,CAAC;gBAC1B,MAAM;YACR,CAAC;YAED,MAAM,wBAAwB,GAAG,gBAAgB,CAAC,KAAK,CAAC,GAA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,KAAK,CAAC,CAAC;QACnD,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACxC,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,4BAA4B,GAAG,CAAC,EACpC,KAAK,EACL,YAAY,GACY,EAAE,EAAE;IAC5B,IAAI,CAAC;QACH,IAAI,CAAC,KAAK;YAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;QAClD,MAAM,EAAE,YAAY,EAAE,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC;QACrD,OAAO,iBAAiB,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC,CAAC;IAClE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;QACnD,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACxC,CAAC;AACH,CAAC,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,CAAC;AAE3D,eAAe,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import FormBuilder from "./components/FormBuilder/";
|
|
2
|
+
import Select from "./components/Select/";
|
|
3
|
+
import MultiSelect from "./components/MultiSelect/";
|
|
4
|
+
import Checkbox from "./components/Checkbox/";
|
|
5
|
+
import ControlWrapper from "./components/ControlWrapper/";
|
|
6
|
+
import FormFooter from "./components/FormFooter/";
|
|
7
|
+
import Input from "./components/Input/";
|
|
8
|
+
import InputFreeSolo from "./components/InputFreeSolo/";
|
|
9
|
+
import FormList from "./components/FormList/";
|
|
10
|
+
import FormGroup from "./components/FormGroup/";
|
|
11
|
+
import MrnInput from "./components/MrnInput/";
|
|
12
|
+
import PasswordInput from "./components/PasswordInput/";
|
|
13
|
+
import Textarea from "./components/Textarea/";
|
|
14
|
+
import PlateEditor from "./components/plate/PlateEditor";
|
|
15
|
+
import { useValueGenerator } from "./hooks/useValueGenerator/useValueGenerator";
|
|
16
|
+
import "../src/styles/index.css";
|
|
17
|
+
export { FormBuilder, Select, MultiSelect, Checkbox, ControlWrapper, FormFooter, Input, InputFreeSolo, FormList, FormGroup, MrnInput, PasswordInput, Textarea, PlateEditor, useValueGenerator };
|
|
18
|
+
export default FormBuilder;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import FormBuilder from "./components/FormBuilder/";
|
|
2
|
+
import Select from "./components/Select/";
|
|
3
|
+
import MultiSelect from "./components/MultiSelect/";
|
|
4
|
+
import Checkbox from "./components/Checkbox/";
|
|
5
|
+
import ControlWrapper from "./components/ControlWrapper/";
|
|
6
|
+
import FormFooter from "./components/FormFooter/";
|
|
7
|
+
import Input from "./components/Input/";
|
|
8
|
+
import InputFreeSolo from "./components/InputFreeSolo/";
|
|
9
|
+
import FormList from "./components/FormList/";
|
|
10
|
+
import FormGroup from "./components/FormGroup/";
|
|
11
|
+
import MrnInput from "./components/MrnInput/";
|
|
12
|
+
import PasswordInput from "./components/PasswordInput/";
|
|
13
|
+
import Textarea from "./components/Textarea/";
|
|
14
|
+
import PlateEditor from "./components/plate/PlateEditor";
|
|
15
|
+
import { useValueGenerator } from "./hooks/useValueGenerator/useValueGenerator";
|
|
16
|
+
import "../src/styles/index.css";
|
|
17
|
+
export { FormBuilder, Select, MultiSelect, Checkbox, ControlWrapper, FormFooter, Input, InputFreeSolo, FormList, FormGroup, MrnInput, PasswordInput, Textarea, PlateEditor, useValueGenerator };
|
|
18
|
+
export default FormBuilder;
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAC1D,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,aAAa,MAAM,6BAA6B,CAAC;AACxD,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,aAAa,MAAM,6BAA6B,CAAC;AACxD,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,WAAW,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAChF,OAAO,yBAAyB,CAAC;AAEjC,OAAO,EACL,WAAW,EACX,MAAM,EACN,WAAW,EACX,QAAQ,EACR,cAAc,EACd,UAAU,EACV,KAAK,EACL,aAAa,EACb,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,WAAW,EACX,iBAAiB,EAClB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface StyledVisibilityContainerProps {
|
|
2
|
+
visible: boolean;
|
|
3
|
+
error?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const StyledVisibilityContainer: import("styled-components").StyledComponent<"div", any, StyledVisibilityContainerProps, never>;
|
|
6
|
+
export declare const StyledVisibilityContainerProgress: import("styled-components").StyledComponent<"progress", any, StyledVisibilityContainerProps, never>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
|
+
export const StyledVisibilityContainer = styled.div `
|
|
3
|
+
${(props) => !props.visible &&
|
|
4
|
+
css `
|
|
5
|
+
display: none !important;
|
|
6
|
+
visibility: hidden !important;
|
|
7
|
+
`}
|
|
8
|
+
`;
|
|
9
|
+
export const StyledVisibilityContainerProgress = styled.progress `
|
|
10
|
+
${(props) => !props.visible &&
|
|
11
|
+
css `
|
|
12
|
+
display: none !important;
|
|
13
|
+
visibility: hidden !important;
|
|
14
|
+
`}
|
|
15
|
+
`;
|
|
16
|
+
//# sourceMappingURL=Hidden.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Hidden.styles.js","sourceRoot":"","sources":["../../../src/styles/Hidden.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAOhD,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,GAAG,CAAgC;IAC/E,CAAC,KAAK,EAAE,EAAE,CACV,CAAC,KAAK,CAAC,OAAO;IACd,GAAG,CAAA;;;KAGF;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAAG,MAAM,CAAC,QAAQ,CAAgC;IAC5F,CAAC,KAAK,EAAE,EAAE,CACV,CAAC,KAAK,CAAC,OAAO;IACd,GAAG,CAAA;;;KAGF;CACJ,CAAC"}
|