@micromerce/formbuilder-react 1.0.656 → 1.0.659
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/{src/index.d.ts → index.d.ts} +1 -3
- package/package.json +6 -4
- package/dist/components/Checkbox/Checkbox.module.scss +0 -10
- package/dist/components/FormBuilder/FormBuilder.module.scss +0 -94
- package/dist/components/FormFooter/FormFooter.module.scss +0 -65
- package/dist/components/FormGroup/FormGroup.module.scss +0 -69
- package/dist/components/FormList/FormList.module.scss +0 -173
- package/dist/components/Group/Group.module.scss +0 -28
- package/dist/components/Input/Input.module.scss +0 -3
- package/dist/components/InputFreeSolo/InputFreeSolo.module.scss +0 -29
- package/dist/components/MrnInput/MrnInput.module.scss +0 -31
- package/dist/components/MultiSelect/MultiSelect.module.scss +0 -13
- package/dist/components/PasswordInput/PasswordInput.module.scss +0 -26
- package/dist/components/Select/Select.module.scss +0 -15
- package/dist/components/Textarea/Textarea.module.scss +0 -14
- package/dist/components/addressGroup/AddressGroup.module.scss +0 -72
- package/dist/src/assets/icons/error/Error.js +0 -6
- package/dist/src/assets/icons/error/Error.js.map +0 -1
- package/dist/src/components/Checkbox/Checkbox.js +0 -37
- package/dist/src/components/Checkbox/Checkbox.js.map +0 -1
- package/dist/src/components/Checkbox/index.js +0 -2
- package/dist/src/components/Checkbox/index.js.map +0 -1
- package/dist/src/components/ControlWrapper/ControlWrapper.js +0 -37
- package/dist/src/components/ControlWrapper/ControlWrapper.js.map +0 -1
- package/dist/src/components/ControlWrapper/index.js +0 -2
- package/dist/src/components/ControlWrapper/index.js.map +0 -1
- package/dist/src/components/DateRangeGroup/DateRangeGroup.js +0 -69
- package/dist/src/components/DateRangeGroup/DateRangeGroup.js.map +0 -1
- package/dist/src/components/DateRangeGroup/DateRangeGroup.styles.js +0 -59
- package/dist/src/components/DateRangeGroup/DateRangeGroup.styles.js.map +0 -1
- package/dist/src/components/DateRangeGroup/components/CalendarModal.js +0 -90
- package/dist/src/components/DateRangeGroup/components/CalendarModal.js.map +0 -1
- package/dist/src/components/DateRangeGroup/index.js +0 -2
- package/dist/src/components/DateRangeGroup/index.js.map +0 -1
- package/dist/src/components/ErrorBoundary/ErrorBoundary.js +0 -22
- package/dist/src/components/ErrorBoundary/ErrorBoundary.js.map +0 -1
- package/dist/src/components/FileUploader/FileUploader.js +0 -30
- package/dist/src/components/FileUploader/FileUploader.js.map +0 -1
- package/dist/src/components/FileUploader/index.js +0 -2
- package/dist/src/components/FileUploader/index.js.map +0 -1
- package/dist/src/components/FormBuilder/FormBuilder.js +0 -74
- package/dist/src/components/FormBuilder/FormBuilder.js.map +0 -1
- package/dist/src/components/FormBuilder/index.js +0 -2
- package/dist/src/components/FormBuilder/index.js.map +0 -1
- package/dist/src/components/FormBuilder/utils/extractFormControlValues/extractFormControlValues.js +0 -50
- package/dist/src/components/FormBuilder/utils/extractFormControlValues/extractFormControlValues.js.map +0 -1
- package/dist/src/components/FormBuilder/utils/extractFormControlValues/index.js +0 -2
- package/dist/src/components/FormBuilder/utils/extractFormControlValues/index.js.map +0 -1
- package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/index.js +0 -2
- package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/index.js.map +0 -1
- package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/jsonToUrlEncoded.js +0 -15
- package/dist/src/components/FormBuilder/utils/jsonToUrlEncoded/jsonToUrlEncoded.js.map +0 -1
- package/dist/src/components/FormFooter/FormFooter.js +0 -46
- package/dist/src/components/FormFooter/FormFooter.js.map +0 -1
- package/dist/src/components/FormFooter/components/Switch.js +0 -15
- package/dist/src/components/FormFooter/components/Switch.js.map +0 -1
- package/dist/src/components/FormFooter/index.js +0 -2
- package/dist/src/components/FormFooter/index.js.map +0 -1
- package/dist/src/components/FormGroup/FormGroup.js +0 -18
- package/dist/src/components/FormGroup/FormGroup.js.map +0 -1
- package/dist/src/components/FormGroup/index.js +0 -2
- package/dist/src/components/FormGroup/index.js.map +0 -1
- package/dist/src/components/FormList/FormList.js +0 -66
- package/dist/src/components/FormList/FormList.js.map +0 -1
- package/dist/src/components/FormList/index.js +0 -2
- package/dist/src/components/FormList/index.js.map +0 -1
- package/dist/src/components/GeneralFormGroup/GeneralFormGroup.js +0 -4
- package/dist/src/components/GeneralFormGroup/GeneralFormGroup.js.map +0 -1
- package/dist/src/components/GeneralFormGroup/index.js +0 -2
- package/dist/src/components/GeneralFormGroup/index.js.map +0 -1
- package/dist/src/components/Group/Group.js +0 -32
- package/dist/src/components/Group/Group.js.map +0 -1
- package/dist/src/components/Group/index.js +0 -2
- package/dist/src/components/Group/index.js.map +0 -1
- package/dist/src/components/Input/Input.js +0 -57
- package/dist/src/components/Input/Input.js.map +0 -1
- package/dist/src/components/Input/index.js +0 -2
- package/dist/src/components/Input/index.js.map +0 -1
- package/dist/src/components/Input/input.styles.js +0 -24
- package/dist/src/components/Input/input.styles.js.map +0 -1
- package/dist/src/components/InputFreeSolo/InputFreeSolo.js +0 -67
- package/dist/src/components/InputFreeSolo/InputFreeSolo.js.map +0 -1
- package/dist/src/components/InputFreeSolo/index.js +0 -2
- package/dist/src/components/InputFreeSolo/index.js.map +0 -1
- package/dist/src/components/MrnInput/MrnInput.js +0 -64
- package/dist/src/components/MrnInput/MrnInput.js.map +0 -1
- package/dist/src/components/MrnInput/hooks/useMrn.js +0 -92
- package/dist/src/components/MrnInput/hooks/useMrn.js.map +0 -1
- package/dist/src/components/MrnInput/index.js +0 -2
- package/dist/src/components/MrnInput/index.js.map +0 -1
- package/dist/src/components/MrnInput/services/fetchMrn.js +0 -30
- package/dist/src/components/MrnInput/services/fetchMrn.js.map +0 -1
- package/dist/src/components/MrnInput/ui-helper/Link/Link.js +0 -15
- package/dist/src/components/MrnInput/ui-helper/Link/Link.js.map +0 -1
- package/dist/src/components/MrnInput/utils/mrnUtils/mrnUtils.js +0 -35
- package/dist/src/components/MrnInput/utils/mrnUtils/mrnUtils.js.map +0 -1
- package/dist/src/components/MrnInput/utils/resolveMrnLinks/resolveMrnLink.js +0 -11
- package/dist/src/components/MrnInput/utils/resolveMrnLinks/resolveMrnLink.js.map +0 -1
- package/dist/src/components/MrnInput/utils/resolveNestedQueryLink/resolveNestedQueryLink.js +0 -19
- package/dist/src/components/MrnInput/utils/resolveNestedQueryLink/resolveNestedQueryLink.js.map +0 -1
- package/dist/src/components/MrnInput/utils/urlSearchParam/urlSearchParam.js +0 -8
- package/dist/src/components/MrnInput/utils/urlSearchParam/urlSearchParam.js.map +0 -1
- package/dist/src/components/MultiSelect/MultiSelect.js +0 -61
- package/dist/src/components/MultiSelect/MultiSelect.js.map +0 -1
- package/dist/src/components/MultiSelect/index.js +0 -2
- package/dist/src/components/MultiSelect/index.js.map +0 -1
- package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/extractSelectedOptionValues.js +0 -21
- package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/extractSelectedOptionValues.js.map +0 -1
- package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/index.js +0 -2
- package/dist/src/components/MultiSelect/utils/extractSelectedOptionValues/index.js.map +0 -1
- package/dist/src/components/PasswordInput/PasswordInput.js +0 -21
- package/dist/src/components/PasswordInput/PasswordInput.js.map +0 -1
- package/dist/src/components/PasswordInput/index.js +0 -2
- package/dist/src/components/PasswordInput/index.js.map +0 -1
- package/dist/src/components/QueryControl/QueryControl.js +0 -95
- package/dist/src/components/QueryControl/QueryControl.js.map +0 -1
- package/dist/src/components/QueryControl/data/defaultControls.js +0 -95
- package/dist/src/components/QueryControl/data/defaultControls.js.map +0 -1
- package/dist/src/components/QueryControl/index.js +0 -2
- package/dist/src/components/QueryControl/index.js.map +0 -1
- package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.js +0 -8
- package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.js.map +0 -1
- package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.styles.js +0 -14
- package/dist/src/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.styles.js.map +0 -1
- package/dist/src/components/QueryControl/ui-helper/Wrapper/index.js +0 -2
- package/dist/src/components/QueryControl/ui-helper/Wrapper/index.js.map +0 -1
- package/dist/src/components/QueryControl/utils/allControlsHidden/allControlsHidden.js +0 -39
- package/dist/src/components/QueryControl/utils/allControlsHidden/allControlsHidden.js.map +0 -1
- package/dist/src/components/QueryControl/utils/allControlsHidden/index.js +0 -2
- package/dist/src/components/QueryControl/utils/allControlsHidden/index.js.map +0 -1
- package/dist/src/components/QueryControl/utils/getMatchingControls.js +0 -19
- package/dist/src/components/QueryControl/utils/getMatchingControls.js.map +0 -1
- package/dist/src/components/QueryControl/utils/hasExpertControl/hasExpertControl.js +0 -38
- package/dist/src/components/QueryControl/utils/hasExpertControl/hasExpertControl.js.map +0 -1
- package/dist/src/components/QueryControl/utils/hasExpertControl/index.js +0 -2
- package/dist/src/components/QueryControl/utils/hasExpertControl/index.js.map +0 -1
- package/dist/src/components/QueryControl/utils/hideGroup/hideGroup.js +0 -9
- package/dist/src/components/QueryControl/utils/hideGroup/hideGroup.js.map +0 -1
- package/dist/src/components/QueryControl/utils/hideGroup/index.js +0 -2
- package/dist/src/components/QueryControl/utils/hideGroup/index.js.map +0 -1
- package/dist/src/components/Select/Select.js +0 -67
- package/dist/src/components/Select/Select.js.map +0 -1
- package/dist/src/components/Select/index.js +0 -2
- package/dist/src/components/Select/index.js.map +0 -1
- package/dist/src/components/Select/utils/getSelectedOption.js +0 -8
- package/dist/src/components/Select/utils/getSelectedOption.js.map +0 -1
- package/dist/src/components/Textarea/Textarea.js +0 -55
- package/dist/src/components/Textarea/Textarea.js.map +0 -1
- package/dist/src/components/Textarea/Textarea.types.js +0 -2
- package/dist/src/components/Textarea/Textarea.types.js.map +0 -1
- package/dist/src/components/Textarea/aiWrapper/aiAction.js +0 -21
- package/dist/src/components/Textarea/aiWrapper/aiAction.js.map +0 -1
- package/dist/src/components/Textarea/aiWrapper/aiLayout.js +0 -21
- package/dist/src/components/Textarea/aiWrapper/aiLayout.js.map +0 -1
- package/dist/src/components/Textarea/aiWrapper/index.js +0 -29
- package/dist/src/components/Textarea/aiWrapper/index.js.map +0 -1
- package/dist/src/components/Textarea/aiWrapper/useAi.js +0 -74
- package/dist/src/components/Textarea/aiWrapper/useAi.js.map +0 -1
- package/dist/src/components/Textarea/editors/Default.js +0 -26
- package/dist/src/components/Textarea/editors/Default.js.map +0 -1
- package/dist/src/components/Textarea/editors/Html.js +0 -9
- package/dist/src/components/Textarea/editors/Html.js.map +0 -1
- package/dist/src/components/Textarea/editors/Json.js +0 -9
- package/dist/src/components/Textarea/editors/Json.js.map +0 -1
- package/dist/src/components/Textarea/editors/Markdown.js +0 -20
- package/dist/src/components/Textarea/editors/Markdown.js.map +0 -1
- package/dist/src/components/Textarea/editors/Richtext.js +0 -13
- package/dist/src/components/Textarea/editors/Richtext.js.map +0 -1
- package/dist/src/components/Textarea/index.js +0 -2
- package/dist/src/components/Textarea/index.js.map +0 -1
- package/dist/src/components/addressGroup/AddressGroup.js +0 -39
- package/dist/src/components/addressGroup/AddressGroup.js.map +0 -1
- package/dist/src/components/addressGroup/index.js +0 -2
- package/dist/src/components/addressGroup/index.js.map +0 -1
- package/dist/src/components/addressGroup/utils/Countries.js +0 -1249
- package/dist/src/components/addressGroup/utils/Countries.js.map +0 -1
- package/dist/src/components/plate/PlateEditor.d.ts +0 -10
- package/dist/src/components/plate/PlateEditor.js +0 -38
- package/dist/src/components/plate/PlateEditor.js.map +0 -1
- package/dist/src/components/plate/PlateEditorContent.d.ts +0 -24
- package/dist/src/components/plate/PlateEditorContent.js +0 -45
- package/dist/src/components/plate/PlateEditorContent.js.map +0 -1
- package/dist/src/components/plate/components/align-dropdown-menu.d.ts +0 -2
- package/dist/src/components/plate/components/align-dropdown-menu.js +0 -33
- package/dist/src/components/plate/components/align-dropdown-menu.js.map +0 -1
- package/dist/src/components/plate/components/blockquote-element.d.ts +0 -21
- package/dist/src/components/plate/components/blockquote-element.js +0 -8
- package/dist/src/components/plate/components/blockquote-element.js.map +0 -1
- package/dist/src/components/plate/components/button.d.ts +0 -14
- package/dist/src/components/plate/components/button.js +0 -38
- package/dist/src/components/plate/components/button.js.map +0 -1
- package/dist/src/components/plate/components/caption.d.ts +0 -43
- package/dist/src/components/plate/components/caption.js +0 -25
- package/dist/src/components/plate/components/caption.js.map +0 -1
- package/dist/src/components/plate/components/checkbox.d.ts +0 -3
- package/dist/src/components/plate/components/checkbox.js +0 -7
- package/dist/src/components/plate/components/checkbox.js.map +0 -1
- package/dist/src/components/plate/components/code-block-combobox.d.ts +0 -48
- package/dist/src/components/plate/components/code-block-combobox.js +0 -131
- package/dist/src/components/plate/components/code-block-combobox.js.map +0 -1
- package/dist/src/components/plate/components/code-block-element.d.ts +0 -22
- package/dist/src/components/plate/components/code-block-element.js +0 -13
- package/dist/src/components/plate/components/code-block-element.js.map +0 -1
- package/dist/src/components/plate/components/code-leaf.d.ts +0 -19
- package/dist/src/components/plate/components/code-leaf.js +0 -8
- package/dist/src/components/plate/components/code-leaf.js.map +0 -1
- package/dist/src/components/plate/components/code-line-element.d.ts +0 -21
- package/dist/src/components/plate/components/code-line-element.js +0 -6
- package/dist/src/components/plate/components/code-line-element.js.map +0 -1
- package/dist/src/components/plate/components/code-syntax-leaf.d.ts +0 -19
- package/dist/src/components/plate/components/code-syntax-leaf.js +0 -11
- package/dist/src/components/plate/components/code-syntax-leaf.js.map +0 -1
- package/dist/src/components/plate/components/color-constants.d.ts +0 -10
- package/dist/src/components/plate/components/color-constants.js +0 -430
- package/dist/src/components/plate/components/color-constants.js.map +0 -1
- package/dist/src/components/plate/components/color-dropdown-menu-items.d.ts +0 -18
- package/dist/src/components/plate/components/color-dropdown-menu-items.js +0 -21
- package/dist/src/components/plate/components/color-dropdown-menu-items.js.map +0 -1
- package/dist/src/components/plate/components/color-dropdown-menu.d.ts +0 -12
- package/dist/src/components/plate/components/color-dropdown-menu.js +0 -18
- package/dist/src/components/plate/components/color-dropdown-menu.js.map +0 -1
- package/dist/src/components/plate/components/color-input.d.ts +0 -2
- package/dist/src/components/plate/components/color-input.js +0 -15
- package/dist/src/components/plate/components/color-input.js.map +0 -1
- package/dist/src/components/plate/components/color-picker.d.ts +0 -18
- package/dist/src/components/plate/components/color-picker.js +0 -19
- package/dist/src/components/plate/components/color-picker.js.map +0 -1
- package/dist/src/components/plate/components/colors-custom.d.ts +0 -10
- package/dist/src/components/plate/components/colors-custom.js +0 -21
- package/dist/src/components/plate/components/colors-custom.js.map +0 -1
- package/dist/src/components/plate/components/command.d.ts +0 -76
- package/dist/src/components/plate/components/command.js +0 -18
- package/dist/src/components/plate/components/command.js.map +0 -1
- package/dist/src/components/plate/components/comment-leaf.d.ts +0 -3
- package/dist/src/components/plate/components/comment-leaf.js +0 -23
- package/dist/src/components/plate/components/comment-leaf.js.map +0 -1
- package/dist/src/components/plate/components/dialog.d.ts +0 -12
- package/dist/src/components/plate/components/dialog.js +0 -16
- package/dist/src/components/plate/components/dialog.js.map +0 -1
- package/dist/src/components/plate/components/dropdown-menu.d.ts +0 -29
- package/dist/src/components/plate/components/dropdown-menu.js +0 -51
- package/dist/src/components/plate/components/dropdown-menu.js.map +0 -1
- package/dist/src/components/plate/components/excalidraw-element.d.ts +0 -21
- package/dist/src/components/plate/components/excalidraw-element.js +0 -12
- package/dist/src/components/plate/components/excalidraw-element.js.map +0 -1
- package/dist/src/components/plate/components/fixed-toolbar-buttons.d.ts +0 -1
- package/dist/src/components/plate/components/fixed-toolbar-buttons.js +0 -25
- package/dist/src/components/plate/components/fixed-toolbar-buttons.js.map +0 -1
- package/dist/src/components/plate/components/fixed-toolbar.d.ts +0 -1
- package/dist/src/components/plate/components/fixed-toolbar.js +0 -4
- package/dist/src/components/plate/components/fixed-toolbar.js.map +0 -1
- package/dist/src/components/plate/components/heading-element.d.ts +0 -24
- package/dist/src/components/plate/components/heading-element.js +0 -30
- package/dist/src/components/plate/components/heading-element.js.map +0 -1
- package/dist/src/components/plate/components/highlight-leaf.d.ts +0 -19
- package/dist/src/components/plate/components/highlight-leaf.js +0 -5
- package/dist/src/components/plate/components/highlight-leaf.js.map +0 -1
- package/dist/src/components/plate/components/hr-element.d.ts +0 -21
- package/dist/src/components/plate/components/hr-element.js +0 -11
- package/dist/src/components/plate/components/hr-element.js.map +0 -1
- package/dist/src/components/plate/components/image-element.d.ts +0 -21
- package/dist/src/components/plate/components/image-element.js +0 -19
- package/dist/src/components/plate/components/image-element.js.map +0 -1
- package/dist/src/components/plate/components/indent-list-toolbar-button.d.ts +0 -18
- package/dist/src/components/plate/components/indent-list-toolbar-button.js +0 -12
- package/dist/src/components/plate/components/indent-list-toolbar-button.js.map +0 -1
- package/dist/src/components/plate/components/indent-todo-marker-component.d.ts +0 -3
- package/dist/src/components/plate/components/indent-todo-marker-component.js +0 -14
- package/dist/src/components/plate/components/indent-todo-marker-component.js.map +0 -1
- package/dist/src/components/plate/components/indent-todo-toolbar-button.d.ts +0 -15
- package/dist/src/components/plate/components/indent-todo-toolbar-button.js +0 -11
- package/dist/src/components/plate/components/indent-todo-toolbar-button.js.map +0 -1
- package/dist/src/components/plate/components/indent-toolbar-button.d.ts +0 -15
- package/dist/src/components/plate/components/indent-toolbar-button.js +0 -10
- package/dist/src/components/plate/components/indent-toolbar-button.js.map +0 -1
- package/dist/src/components/plate/components/inline-combobox.d.ts +0 -29
- package/dist/src/components/plate/components/inline-combobox.js +0 -156
- package/dist/src/components/plate/components/inline-combobox.js.map +0 -1
- package/dist/src/components/plate/components/input.d.ts +0 -8
- package/dist/src/components/plate/components/input.js +0 -20
- package/dist/src/components/plate/components/input.js.map +0 -1
- package/dist/src/components/plate/components/insert-dropdown-menu.d.ts +0 -12
- package/dist/src/components/plate/components/insert-dropdown-menu.js +0 -179
- package/dist/src/components/plate/components/insert-dropdown-menu.js.map +0 -1
- package/dist/src/components/plate/components/kbd-leaf.d.ts +0 -19
- package/dist/src/components/plate/components/kbd-leaf.js +0 -5
- package/dist/src/components/plate/components/kbd-leaf.js.map +0 -1
- package/dist/src/components/plate/components/line-height-dropdown-menu.d.ts +0 -2
- package/dist/src/components/plate/components/line-height-dropdown-menu.js +0 -12
- package/dist/src/components/plate/components/line-height-dropdown-menu.js.map +0 -1
- package/dist/src/components/plate/components/link-element.d.ts +0 -21
- package/dist/src/components/plate/components/link-element.js +0 -10
- package/dist/src/components/plate/components/link-element.js.map +0 -1
- package/dist/src/components/plate/components/link-floating-toolbar.d.ts +0 -5
- package/dist/src/components/plate/components/link-floating-toolbar.js +0 -54
- package/dist/src/components/plate/components/link-floating-toolbar.js.map +0 -1
- package/dist/src/components/plate/components/link-toolbar-button.d.ts +0 -15
- package/dist/src/components/plate/components/link-toolbar-button.js +0 -11
- package/dist/src/components/plate/components/link-toolbar-button.js.map +0 -1
- package/dist/src/components/plate/components/mark-toolbar-button.d.ts +0 -18
- package/dist/src/components/plate/components/mark-toolbar-button.js +0 -11
- package/dist/src/components/plate/components/mark-toolbar-button.js.map +0 -1
- package/dist/src/components/plate/components/media-embed-element.d.ts +0 -21
- package/dist/src/components/plate/components/media-embed-element.js +0 -23
- package/dist/src/components/plate/components/media-embed-element.js.map +0 -1
- package/dist/src/components/plate/components/media-popover.d.ts +0 -7
- package/dist/src/components/plate/components/media-popover.js +0 -30
- package/dist/src/components/plate/components/media-popover.js.map +0 -1
- package/dist/src/components/plate/components/mention-element.d.ts +0 -26
- package/dist/src/components/plate/components/mention-element.js +0 -12
- package/dist/src/components/plate/components/mention-element.js.map +0 -1
- package/dist/src/components/plate/components/mention-input-element.d.ts +0 -25
- package/dist/src/components/plate/components/mention-input-element.js +0 -89
- package/dist/src/components/plate/components/mention-input-element.js.map +0 -1
- package/dist/src/components/plate/components/outdent-toolbar-button.d.ts +0 -15
- package/dist/src/components/plate/components/outdent-toolbar-button.js +0 -10
- package/dist/src/components/plate/components/outdent-toolbar-button.js.map +0 -1
- package/dist/src/components/plate/components/paragraph-element.d.ts +0 -20
- package/dist/src/components/plate/components/paragraph-element.js +0 -4
- package/dist/src/components/plate/components/paragraph-element.js.map +0 -1
- package/dist/src/components/plate/components/placeholder.d.ts +0 -6
- package/dist/src/components/plate/components/placeholder.js +0 -37
- package/dist/src/components/plate/components/placeholder.js.map +0 -1
- package/dist/src/components/plate/components/popover.d.ts +0 -7
- package/dist/src/components/plate/components/popover.js +0 -11
- package/dist/src/components/plate/components/popover.js.map +0 -1
- package/dist/src/components/plate/components/resizable.d.ts +0 -40
- package/dist/src/components/plate/components/resizable.js +0 -38
- package/dist/src/components/plate/components/resizable.js.map +0 -1
- package/dist/src/components/plate/components/separator.d.ts +0 -4
- package/dist/src/components/plate/components/separator.js +0 -20
- package/dist/src/components/plate/components/separator.js.map +0 -1
- package/dist/src/components/plate/components/slash-input-element.d.ts +0 -22
- package/dist/src/components/plate/components/slash-input-element.js +0 -64
- package/dist/src/components/plate/components/slash-input-element.js.map +0 -1
- package/dist/src/components/plate/components/table-cell-element.d.ts +0 -47
- package/dist/src/components/plate/components/table-cell-element.js +0 -35
- package/dist/src/components/plate/components/table-cell-element.js.map +0 -1
- package/dist/src/components/plate/components/table-element.d.ts +0 -24
- package/dist/src/components/plate/components/table-element.js +0 -46
- package/dist/src/components/plate/components/table-element.js.map +0 -1
- package/dist/src/components/plate/components/table-row-element.d.ts +0 -23
- package/dist/src/components/plate/components/table-row-element.js +0 -7
- package/dist/src/components/plate/components/table-row-element.js.map +0 -1
- package/dist/src/components/plate/components/todo-list-element.d.ts +0 -21
- package/dist/src/components/plate/components/todo-list-element.js +0 -12
- package/dist/src/components/plate/components/todo-list-element.js.map +0 -1
- package/dist/src/components/plate/components/toolbar.d.ts +0 -29
- package/dist/src/components/plate/components/toolbar.js +0 -51
- package/dist/src/components/plate/components/toolbar.js.map +0 -1
- package/dist/src/components/plate/components/tooltip.d.ts +0 -12
- package/dist/src/components/plate/components/tooltip.js +0 -26
- package/dist/src/components/plate/components/tooltip.js.map +0 -1
- package/dist/src/components/plate/components/turn-into-dropdown-menu.d.ts +0 -2
- package/dist/src/components/plate/components/turn-into-dropdown-menu.js +0 -93
- package/dist/src/components/plate/components/turn-into-dropdown-menu.js.map +0 -1
- package/dist/src/components/plate/icons.d.ts +0 -85
- package/dist/src/components/plate/icons.js +0 -101
- package/dist/src/components/plate/icons.js.map +0 -1
- package/dist/src/components/plate/lib/autoformat-rules.d.ts +0 -10
- package/dist/src/components/plate/lib/autoformat-rules.js +0 -271
- package/dist/src/components/plate/lib/autoformat-rules.js.map +0 -1
- package/dist/src/components/plate/usePlateEditor.d.ts +0 -4
- package/dist/src/components/plate/usePlateEditor.js +0 -384
- package/dist/src/components/plate/usePlateEditor.js.map +0 -1
- package/dist/src/components/states/error/index.js +0 -15
- package/dist/src/components/states/error/index.js.map +0 -1
- package/dist/src/context/FormData.js +0 -109
- package/dist/src/context/FormData.js.map +0 -1
- package/dist/src/hooks/useDependent/enhanced/useInputDependent/useInputDependent.js +0 -36
- package/dist/src/hooks/useDependent/enhanced/useInputDependent/useInputDependent.js.map +0 -1
- package/dist/src/hooks/useDependent/enhanced/useOptionsGenerator/useOptionsGenerator.js +0 -16
- package/dist/src/hooks/useDependent/enhanced/useOptionsGenerator/useOptionsGenerator.js.map +0 -1
- package/dist/src/hooks/useDependent/useDependent.js +0 -86
- package/dist/src/hooks/useDependent/useDependent.js.map +0 -1
- package/dist/src/hooks/useValueGenerator/useValueGenerator.js +0 -99
- package/dist/src/hooks/useValueGenerator/useValueGenerator.js.map +0 -1
- package/dist/src/index.js +0 -19
- package/dist/src/index.js.map +0 -1
- package/dist/src/styles/Hidden.styles.js +0 -16
- package/dist/src/styles/Hidden.styles.js.map +0 -1
- package/dist/src/styles/Skeleton.js +0 -40
- package/dist/src/styles/Skeleton.js.map +0 -1
- package/dist/src/styles/Textfield.styles.js +0 -34
- package/dist/src/styles/Textfield.styles.js.map +0 -1
- package/dist/src/testutils.js +0 -22
- package/dist/src/testutils.js.map +0 -1
- package/dist/src/types/controlProps.js +0 -2
- package/dist/src/types/controlProps.js.map +0 -1
- package/dist/src/types/index.js +0 -2
- package/dist/src/types/index.js.map +0 -1
- package/dist/src/ui/menu/hooks/useMenu.js +0 -41
- package/dist/src/ui/menu/hooks/useMenu.js.map +0 -1
- package/dist/src/ui/menu/index.js +0 -13
- package/dist/src/ui/menu/index.js.map +0 -1
- package/dist/src/ui/menu/test/createControl.js +0 -30
- package/dist/src/ui/menu/test/createControl.js.map +0 -1
- package/dist/src/ui/menu/utils/detemineSubmenuTabs/index.js +0 -82
- package/dist/src/ui/menu/utils/detemineSubmenuTabs/index.js.map +0 -1
- package/dist/src/ui-helper/HeaderCollapseButton/index.js +0 -9
- package/dist/src/ui-helper/HeaderCollapseButton/index.js.map +0 -1
- package/dist/src/ui-helper/notifications/Error.js +0 -77
- package/dist/src/ui-helper/notifications/Error.js.map +0 -1
- package/dist/src/ui-helper/notifications/images/background.js +0 -7
- package/dist/src/ui-helper/notifications/images/background.js.map +0 -1
- package/dist/src/ui-helper/notifications/images/spinner.js +0 -6
- package/dist/src/ui-helper/notifications/images/spinner.js.map +0 -1
- package/dist/src/ui-helper/notifications/images/under-improvement.js +0 -6
- package/dist/src/ui-helper/notifications/images/under-improvement.js.map +0 -1
- package/dist/src/utils/findFormControlError/index.js +0 -24
- package/dist/src/utils/findFormControlError/index.js.map +0 -1
- package/dist/src/utils/hasGroupRequiredFieldsWithValues/index.js +0 -22
- package/dist/src/utils/hasGroupRequiredFieldsWithValues/index.js.map +0 -1
- package/dist/styles/formControl.module.scss +0 -59
- package/dist/tailwind.config.d.ts +0 -1
- package/dist/tailwind.config.js +0 -17
- package/dist/tailwind.config.js.map +0 -1
- package/dist/webpack.common.d.ts +0 -63
- package/dist/webpack.common.js +0 -76
- package/dist/webpack.common.js.map +0 -1
- package/dist/webpack.dev.d.ts +0 -65
- package/dist/webpack.dev.js +0 -11
- package/dist/webpack.dev.js.map +0 -1
- package/dist/webpack.prod.d.ts +0 -65
- package/dist/webpack.prod.js +0 -10
- package/dist/webpack.prod.js.map +0 -1
- /package/dist/{src/assets → assets}/icons/error/Error.d.ts +0 -0
- /package/dist/{src/components → components}/Checkbox/Checkbox.d.ts +0 -0
- /package/dist/{src/components → components}/Checkbox/index.d.ts +0 -0
- /package/dist/{src/components → components}/ControlWrapper/ControlWrapper.d.ts +0 -0
- /package/dist/{src/components → components}/ControlWrapper/index.d.ts +0 -0
- /package/dist/{src/components → components}/DateRangeGroup/DateRangeGroup.d.ts +0 -0
- /package/dist/{src/components → components}/DateRangeGroup/DateRangeGroup.styles.d.ts +0 -0
- /package/dist/{src/components → components}/DateRangeGroup/components/CalendarModal.d.ts +0 -0
- /package/dist/{src/components → components}/DateRangeGroup/index.d.ts +0 -0
- /package/dist/{src/components → components}/ErrorBoundary/ErrorBoundary.d.ts +0 -0
- /package/dist/{src/components → components}/FileUploader/FileUploader.d.ts +0 -0
- /package/dist/{src/components → components}/FileUploader/index.d.ts +0 -0
- /package/dist/{src/components → components}/FormBuilder/FormBuilder.d.ts +0 -0
- /package/dist/{src/components → components}/FormBuilder/index.d.ts +0 -0
- /package/dist/{src/components → components}/FormBuilder/utils/extractFormControlValues/extractFormControlValues.d.ts +0 -0
- /package/dist/{src/components → components}/FormBuilder/utils/extractFormControlValues/index.d.ts +0 -0
- /package/dist/{src/components → components}/FormBuilder/utils/jsonToUrlEncoded/index.d.ts +0 -0
- /package/dist/{src/components → components}/FormBuilder/utils/jsonToUrlEncoded/jsonToUrlEncoded.d.ts +0 -0
- /package/dist/{src/components → components}/FormFooter/FormFooter.d.ts +0 -0
- /package/dist/{src/components → components}/FormFooter/components/Switch.d.ts +0 -0
- /package/dist/{src/components → components}/FormFooter/index.d.ts +0 -0
- /package/dist/{src/components → components}/FormGroup/FormGroup.d.ts +0 -0
- /package/dist/{src/components → components}/FormGroup/index.d.ts +0 -0
- /package/dist/{src/components → components}/FormList/FormList.d.ts +0 -0
- /package/dist/{src/components → components}/FormList/index.d.ts +0 -0
- /package/dist/{src/components → components}/GeneralFormGroup/GeneralFormGroup.d.ts +0 -0
- /package/dist/{src/components → components}/GeneralFormGroup/index.d.ts +0 -0
- /package/dist/{src/components → components}/Group/Group.d.ts +0 -0
- /package/dist/{src/components → components}/Group/index.d.ts +0 -0
- /package/dist/{src/components → components}/Input/Input.d.ts +0 -0
- /package/dist/{src/components → components}/Input/index.d.ts +0 -0
- /package/dist/{src/components → components}/Input/input.styles.d.ts +0 -0
- /package/dist/{src/components → components}/InputFreeSolo/InputFreeSolo.d.ts +0 -0
- /package/dist/{src/components → components}/InputFreeSolo/index.d.ts +0 -0
- /package/dist/{src/components → components}/MrnInput/MrnInput.d.ts +0 -0
- /package/dist/{src/components → components}/MrnInput/hooks/useMrn.d.ts +0 -0
- /package/dist/{src/components → components}/MrnInput/index.d.ts +0 -0
- /package/dist/{src/components → components}/MrnInput/services/fetchMrn.d.ts +0 -0
- /package/dist/{src/components → components}/MrnInput/ui-helper/Link/Link.d.ts +0 -0
- /package/dist/{src/components → components}/MrnInput/utils/mrnUtils/mrnUtils.d.ts +0 -0
- /package/dist/{src/components → components}/MrnInput/utils/resolveMrnLinks/resolveMrnLink.d.ts +0 -0
- /package/dist/{src/components → components}/MrnInput/utils/resolveNestedQueryLink/resolveNestedQueryLink.d.ts +0 -0
- /package/dist/{src/components → components}/MrnInput/utils/urlSearchParam/urlSearchParam.d.ts +0 -0
- /package/dist/{src/components → components}/MultiSelect/MultiSelect.d.ts +0 -0
- /package/dist/{src/components → components}/MultiSelect/index.d.ts +0 -0
- /package/dist/{src/components → components}/MultiSelect/utils/extractSelectedOptionValues/extractSelectedOptionValues.d.ts +0 -0
- /package/dist/{src/components → components}/MultiSelect/utils/extractSelectedOptionValues/index.d.ts +0 -0
- /package/dist/{src/components → components}/PasswordInput/PasswordInput.d.ts +0 -0
- /package/dist/{src/components → components}/PasswordInput/index.d.ts +0 -0
- /package/dist/{src/components → components}/QueryControl/QueryControl.d.ts +0 -0
- /package/dist/{src/components → components}/QueryControl/data/defaultControls.d.ts +0 -0
- /package/dist/{src/components → components}/QueryControl/index.d.ts +0 -0
- /package/dist/{src/components → components}/QueryControl/ui-helper/Wrapper/QueryControlWrapper.d.ts +0 -0
- /package/dist/{src/components → components}/QueryControl/ui-helper/Wrapper/QueryControlWrapper.styles.d.ts +0 -0
- /package/dist/{src/components → components}/QueryControl/ui-helper/Wrapper/index.d.ts +0 -0
- /package/dist/{src/components → components}/QueryControl/utils/allControlsHidden/allControlsHidden.d.ts +0 -0
- /package/dist/{src/components → components}/QueryControl/utils/allControlsHidden/index.d.ts +0 -0
- /package/dist/{src/components → components}/QueryControl/utils/getMatchingControls.d.ts +0 -0
- /package/dist/{src/components → components}/QueryControl/utils/hasExpertControl/hasExpertControl.d.ts +0 -0
- /package/dist/{src/components → components}/QueryControl/utils/hasExpertControl/index.d.ts +0 -0
- /package/dist/{src/components → components}/QueryControl/utils/hideGroup/hideGroup.d.ts +0 -0
- /package/dist/{src/components → components}/QueryControl/utils/hideGroup/index.d.ts +0 -0
- /package/dist/{src/components → components}/Select/Select.d.ts +0 -0
- /package/dist/{src/components → components}/Select/index.d.ts +0 -0
- /package/dist/{src/components → components}/Select/utils/getSelectedOption.d.ts +0 -0
- /package/dist/{src/components → components}/Textarea/Textarea.d.ts +0 -0
- /package/dist/{src/components → components}/Textarea/Textarea.types.d.ts +0 -0
- /package/dist/{src/components → components}/Textarea/aiWrapper/aiAction.d.ts +0 -0
- /package/dist/{src/components → components}/Textarea/aiWrapper/aiLayout.d.ts +0 -0
- /package/dist/{src/components → components}/Textarea/aiWrapper/index.d.ts +0 -0
- /package/dist/{src/components → components}/Textarea/aiWrapper/useAi.d.ts +0 -0
- /package/dist/{src/components → components}/Textarea/editors/Default.d.ts +0 -0
- /package/dist/{src/components → components}/Textarea/editors/Html.d.ts +0 -0
- /package/dist/{src/components → components}/Textarea/editors/Json.d.ts +0 -0
- /package/dist/{src/components → components}/Textarea/editors/Markdown.d.ts +0 -0
- /package/dist/{src/components → components}/Textarea/editors/Richtext.d.ts +0 -0
- /package/dist/{src/components → components}/Textarea/index.d.ts +0 -0
- /package/dist/{src/components → components}/addressGroup/AddressGroup.d.ts +0 -0
- /package/dist/{src/components → components}/addressGroup/index.d.ts +0 -0
- /package/dist/{src/components → components}/addressGroup/utils/Countries.d.ts +0 -0
- /package/dist/{src/components → components}/states/error/index.d.ts +0 -0
- /package/dist/{src/context → context}/FormData.d.ts +0 -0
- /package/dist/{src/hooks → hooks}/useDependent/enhanced/useInputDependent/useInputDependent.d.ts +0 -0
- /package/dist/{src/hooks → hooks}/useDependent/enhanced/useOptionsGenerator/useOptionsGenerator.d.ts +0 -0
- /package/dist/{src/hooks → hooks}/useDependent/useDependent.d.ts +0 -0
- /package/dist/{src/hooks → hooks}/useValueGenerator/useValueGenerator.d.ts +0 -0
- /package/dist/{src/styles → styles}/Hidden.styles.d.ts +0 -0
- /package/dist/{src/styles → styles}/Skeleton.d.ts +0 -0
- /package/dist/{src/styles → styles}/Textfield.styles.d.ts +0 -0
- /package/dist/{src/testutils.d.ts → testutils.d.ts} +0 -0
- /package/dist/{src/types → types}/controlProps.d.ts +0 -0
- /package/dist/{src/types → types}/index.d.ts +0 -0
- /package/dist/{src/ui → ui}/menu/hooks/useMenu.d.ts +0 -0
- /package/dist/{src/ui → ui}/menu/index.d.ts +0 -0
- /package/dist/{src/ui → ui}/menu/test/createControl.d.ts +0 -0
- /package/dist/{src/ui → ui}/menu/utils/detemineSubmenuTabs/index.d.ts +0 -0
- /package/dist/{src/ui-helper → ui-helper}/HeaderCollapseButton/index.d.ts +0 -0
- /package/dist/{src/ui-helper → ui-helper}/notifications/Error.d.ts +0 -0
- /package/dist/{src/ui-helper → ui-helper}/notifications/images/background.d.ts +0 -0
- /package/dist/{src/ui-helper → ui-helper}/notifications/images/spinner.d.ts +0 -0
- /package/dist/{src/ui-helper → ui-helper}/notifications/images/under-improvement.d.ts +0 -0
- /package/dist/{src/utils → utils}/findFormControlError/index.d.ts +0 -0
- /package/dist/{src/utils → utils}/hasGroupRequiredFieldsWithValues/index.d.ts +0 -0
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { AutoformatBlockRule, AutoformatRule } from "@udecode/plate-autoformat";
|
|
2
|
-
import type { SlateEditor } from "@udecode/plate-common";
|
|
3
|
-
export declare const preFormat: AutoformatBlockRule["preFormat"];
|
|
4
|
-
export declare const format: (editor: SlateEditor, customFormatting: any) => void;
|
|
5
|
-
export declare const formatList: (editor: SlateEditor, elementType: string) => void;
|
|
6
|
-
export declare const autoformatMarks: AutoformatRule[];
|
|
7
|
-
export declare const autoformatBlocks: AutoformatRule[];
|
|
8
|
-
export declare const autoformatLists: AutoformatRule[];
|
|
9
|
-
export declare const autoformatIndentLists: AutoformatRule[];
|
|
10
|
-
export declare const autoformatRules: AutoformatRule[];
|
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
import { autoformatArrow, autoformatLegal, autoformatLegalHtml, autoformatMath, autoformatPunctuation, autoformatSmartQuotes, } from "@udecode/plate-autoformat";
|
|
2
|
-
import { BoldPlugin, CodePlugin, ItalicPlugin, StrikethroughPlugin, SubscriptPlugin, SuperscriptPlugin, UnderlinePlugin, } from "@udecode/plate-basic-marks/react";
|
|
3
|
-
import { BlockquotePlugin } from "@udecode/plate-block-quote/react";
|
|
4
|
-
import { insertEmptyCodeBlock } from "@udecode/plate-code-block";
|
|
5
|
-
import { CodeBlockPlugin, CodeLinePlugin, } from "@udecode/plate-code-block/react";
|
|
6
|
-
import { getParentNode, insertNodes, isBlock, isElement, isType, setNodes, } from "@udecode/plate-common";
|
|
7
|
-
import { ParagraphPlugin } from "@udecode/plate-common/react";
|
|
8
|
-
import { HEADING_KEYS } from "@udecode/plate-heading";
|
|
9
|
-
import { HighlightPlugin } from "@udecode/plate-highlight/react";
|
|
10
|
-
import { HorizontalRulePlugin } from "@udecode/plate-horizontal-rule/react";
|
|
11
|
-
import { INDENT_LIST_KEYS, ListStyleType, toggleIndentList, } from "@udecode/plate-indent-list";
|
|
12
|
-
import { toggleList, unwrapList } from "@udecode/plate-list";
|
|
13
|
-
import { BulletedListPlugin, ListItemPlugin, NumberedListPlugin, TodoListPlugin, } from "@udecode/plate-list/react";
|
|
14
|
-
import { openNextToggles, TogglePlugin } from "@udecode/plate-toggle/react";
|
|
15
|
-
export const preFormat = (editor) => unwrapList(editor);
|
|
16
|
-
export const format = (editor, customFormatting) => {
|
|
17
|
-
if (editor.selection) {
|
|
18
|
-
const parentEntry = getParentNode(editor, editor.selection);
|
|
19
|
-
if (!parentEntry)
|
|
20
|
-
return;
|
|
21
|
-
const [node] = parentEntry;
|
|
22
|
-
if (isElement(node) &&
|
|
23
|
-
!isType(editor, node, CodeBlockPlugin.key) &&
|
|
24
|
-
!isType(editor, node, CodeLinePlugin.key)) {
|
|
25
|
-
customFormatting();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
export const formatList = (editor, elementType) => {
|
|
30
|
-
format(editor, () => toggleList(editor, {
|
|
31
|
-
type: elementType,
|
|
32
|
-
}));
|
|
33
|
-
};
|
|
34
|
-
export const autoformatMarks = [
|
|
35
|
-
{
|
|
36
|
-
match: "***",
|
|
37
|
-
mode: "mark",
|
|
38
|
-
type: [BoldPlugin.key, ItalicPlugin.key],
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
match: "__*",
|
|
42
|
-
mode: "mark",
|
|
43
|
-
type: [UnderlinePlugin.key, ItalicPlugin.key],
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
match: "__**",
|
|
47
|
-
mode: "mark",
|
|
48
|
-
type: [UnderlinePlugin.key, BoldPlugin.key],
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
match: "___***",
|
|
52
|
-
mode: "mark",
|
|
53
|
-
type: [UnderlinePlugin.key, BoldPlugin.key, ItalicPlugin.key],
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
match: "**",
|
|
57
|
-
mode: "mark",
|
|
58
|
-
type: BoldPlugin.key,
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
match: "__",
|
|
62
|
-
mode: "mark",
|
|
63
|
-
type: UnderlinePlugin.key,
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
match: "*",
|
|
67
|
-
mode: "mark",
|
|
68
|
-
type: ItalicPlugin.key,
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
match: "_",
|
|
72
|
-
mode: "mark",
|
|
73
|
-
type: ItalicPlugin.key,
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
match: "~~",
|
|
77
|
-
mode: "mark",
|
|
78
|
-
type: StrikethroughPlugin.key,
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
match: "^",
|
|
82
|
-
mode: "mark",
|
|
83
|
-
type: SuperscriptPlugin.key,
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
match: "~",
|
|
87
|
-
mode: "mark",
|
|
88
|
-
type: SubscriptPlugin.key,
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
match: "==",
|
|
92
|
-
mode: "mark",
|
|
93
|
-
type: HighlightPlugin.key,
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
match: "≡",
|
|
97
|
-
mode: "mark",
|
|
98
|
-
type: HighlightPlugin.key,
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
match: "`",
|
|
102
|
-
mode: "mark",
|
|
103
|
-
type: CodePlugin.key,
|
|
104
|
-
},
|
|
105
|
-
];
|
|
106
|
-
export const autoformatBlocks = [
|
|
107
|
-
{
|
|
108
|
-
match: "# ",
|
|
109
|
-
mode: "block",
|
|
110
|
-
preFormat,
|
|
111
|
-
type: HEADING_KEYS.h1,
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
match: "## ",
|
|
115
|
-
mode: "block",
|
|
116
|
-
preFormat,
|
|
117
|
-
type: HEADING_KEYS.h2,
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
match: "### ",
|
|
121
|
-
mode: "block",
|
|
122
|
-
preFormat,
|
|
123
|
-
type: HEADING_KEYS.h3,
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
match: "#### ",
|
|
127
|
-
mode: "block",
|
|
128
|
-
preFormat,
|
|
129
|
-
type: HEADING_KEYS.h4,
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
match: "##### ",
|
|
133
|
-
mode: "block",
|
|
134
|
-
preFormat,
|
|
135
|
-
type: HEADING_KEYS.h5,
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
match: "###### ",
|
|
139
|
-
mode: "block",
|
|
140
|
-
preFormat,
|
|
141
|
-
type: HEADING_KEYS.h6,
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
match: "> ",
|
|
145
|
-
mode: "block",
|
|
146
|
-
preFormat,
|
|
147
|
-
type: BlockquotePlugin.key,
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
format: (editor) => {
|
|
151
|
-
insertEmptyCodeBlock(editor, {
|
|
152
|
-
defaultType: ParagraphPlugin.key,
|
|
153
|
-
insertNodesOptions: { select: true },
|
|
154
|
-
});
|
|
155
|
-
},
|
|
156
|
-
match: "```",
|
|
157
|
-
mode: "block",
|
|
158
|
-
preFormat,
|
|
159
|
-
triggerAtBlockStart: false,
|
|
160
|
-
type: CodeBlockPlugin.key,
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
match: "+ ",
|
|
164
|
-
mode: "block",
|
|
165
|
-
preFormat: openNextToggles,
|
|
166
|
-
type: TogglePlugin.key,
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
format: (editor) => {
|
|
170
|
-
setNodes(editor, { type: HorizontalRulePlugin.key });
|
|
171
|
-
insertNodes(editor, {
|
|
172
|
-
children: [{ text: "" }],
|
|
173
|
-
type: ParagraphPlugin.key,
|
|
174
|
-
});
|
|
175
|
-
},
|
|
176
|
-
match: ["---", "—-", "___ "],
|
|
177
|
-
mode: "block",
|
|
178
|
-
type: HorizontalRulePlugin.key,
|
|
179
|
-
},
|
|
180
|
-
];
|
|
181
|
-
export const autoformatLists = [
|
|
182
|
-
{
|
|
183
|
-
format: (editor) => formatList(editor, BulletedListPlugin.key),
|
|
184
|
-
match: ["* ", "- "],
|
|
185
|
-
mode: "block",
|
|
186
|
-
preFormat,
|
|
187
|
-
type: ListItemPlugin.key,
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
format: (editor) => formatList(editor, NumberedListPlugin.key),
|
|
191
|
-
match: ["^\\d+\\.$ ", "^\\d+\\)$ "],
|
|
192
|
-
matchByRegex: true,
|
|
193
|
-
mode: "block",
|
|
194
|
-
preFormat,
|
|
195
|
-
type: ListItemPlugin.key,
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
match: "[] ",
|
|
199
|
-
mode: "block",
|
|
200
|
-
type: TodoListPlugin.key,
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
format: (editor) => setNodes(editor, { checked: true, type: TodoListPlugin.key }, {
|
|
204
|
-
match: (n) => isBlock(editor, n),
|
|
205
|
-
}),
|
|
206
|
-
match: "[x] ",
|
|
207
|
-
mode: "block",
|
|
208
|
-
type: TodoListPlugin.key,
|
|
209
|
-
},
|
|
210
|
-
];
|
|
211
|
-
export const autoformatIndentLists = [
|
|
212
|
-
{
|
|
213
|
-
format: (editor) => {
|
|
214
|
-
toggleIndentList(editor, {
|
|
215
|
-
listStyleType: ListStyleType.Disc,
|
|
216
|
-
});
|
|
217
|
-
},
|
|
218
|
-
match: ["* ", "- "],
|
|
219
|
-
mode: "block",
|
|
220
|
-
type: "list",
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
format: (editor) => toggleIndentList(editor, {
|
|
224
|
-
listStyleType: ListStyleType.Decimal,
|
|
225
|
-
}),
|
|
226
|
-
match: ["^\\d+\\.$ ", "^\\d+\\)$ "],
|
|
227
|
-
matchByRegex: true,
|
|
228
|
-
mode: "block",
|
|
229
|
-
type: "list",
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
format: (editor) => {
|
|
233
|
-
toggleIndentList(editor, {
|
|
234
|
-
listStyleType: INDENT_LIST_KEYS.todo,
|
|
235
|
-
});
|
|
236
|
-
setNodes(editor, {
|
|
237
|
-
checked: false,
|
|
238
|
-
listStyleType: INDENT_LIST_KEYS.todo,
|
|
239
|
-
});
|
|
240
|
-
},
|
|
241
|
-
match: ["[] "],
|
|
242
|
-
mode: "block",
|
|
243
|
-
type: "list",
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
format: (editor) => {
|
|
247
|
-
toggleIndentList(editor, {
|
|
248
|
-
listStyleType: INDENT_LIST_KEYS.todo,
|
|
249
|
-
});
|
|
250
|
-
setNodes(editor, {
|
|
251
|
-
checked: true,
|
|
252
|
-
listStyleType: INDENT_LIST_KEYS.todo,
|
|
253
|
-
});
|
|
254
|
-
},
|
|
255
|
-
match: ["[x] "],
|
|
256
|
-
mode: "block",
|
|
257
|
-
type: "list",
|
|
258
|
-
},
|
|
259
|
-
];
|
|
260
|
-
export const autoformatRules = [
|
|
261
|
-
...autoformatBlocks,
|
|
262
|
-
...autoformatMarks,
|
|
263
|
-
...autoformatSmartQuotes,
|
|
264
|
-
...autoformatPunctuation,
|
|
265
|
-
...autoformatLegal,
|
|
266
|
-
...autoformatLegalHtml,
|
|
267
|
-
...autoformatArrow,
|
|
268
|
-
...autoformatMath,
|
|
269
|
-
...autoformatIndentLists,
|
|
270
|
-
];
|
|
271
|
-
//# sourceMappingURL=autoformat-rules.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"autoformat-rules.js","sourceRoot":"","sources":["../../../../../src/components/plate/lib/autoformat-rules.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,UAAU,EACV,UAAU,EACV,YAAY,EACZ,mBAAmB,EACnB,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from "@udecode/plate-alignment/react";
|
|
5
|
-
import { AutoformatPlugin } from "@udecode/plate-autoformat/react";
|
|
6
|
-
import { BasicMarksPlugin, BoldPlugin, CodePlugin, ItalicPlugin, StrikethroughPlugin, SubscriptPlugin, SuperscriptPlugin, UnderlinePlugin, } from "@udecode/plate-basic-marks/react";
|
|
7
|
-
import { BlockquotePlugin } from "@udecode/plate-block-quote/react";
|
|
8
|
-
import { ExitBreakPlugin, SoftBreakPlugin } from "@udecode/plate-break/react";
|
|
9
|
-
import { CaptionPlugin } from "@udecode/plate-caption/react";
|
|
10
|
-
import { isCodeBlockEmpty, isSelectionAtCodeBlockStart, unwrapCodeBlock, } from "@udecode/plate-code-block";
|
|
11
|
-
import { CodeBlockPlugin, CodeLinePlugin, CodeSyntaxPlugin, } from "@udecode/plate-code-block/react";
|
|
12
|
-
import { CommentsPlugin } from "@udecode/plate-comments/react";
|
|
13
|
-
import { isBlockAboveEmpty, isSelectionAtBlockStart, someNode, } from "@udecode/plate-common";
|
|
14
|
-
import { createPlateEditor, ParagraphPlugin, PlateLeaf, } from "@udecode/plate-common/react";
|
|
15
|
-
import { EmojiPlugin } from "@udecode/plate-emoji/react";
|
|
16
|
-
import { ExcalidrawPlugin } from "@udecode/plate-excalidraw/react";
|
|
17
|
-
import { FontBackgroundColorPlugin, FontColorPlugin, FontSizePlugin, } from "@udecode/plate-font/react";
|
|
18
|
-
import { HEADING_KEYS, HEADING_LEVELS } from "@udecode/plate-heading";
|
|
19
|
-
import { HeadingPlugin } from "@udecode/plate-heading/react";
|
|
20
|
-
import { HighlightPlugin } from "@udecode/plate-highlight/react";
|
|
21
|
-
import { HorizontalRulePlugin } from "@udecode/plate-horizontal-rule/react";
|
|
22
|
-
import { IndentListPlugin } from "@udecode/plate-indent-list/react";
|
|
23
|
-
import { IndentPlugin } from "@udecode/plate-indent/react";
|
|
24
|
-
import { KbdPlugin } from "@udecode/plate-kbd/react";
|
|
25
|
-
import { LineHeightPlugin } from "@udecode/plate-line-height/react";
|
|
26
|
-
import { LinkPlugin } from "@udecode/plate-link/react";
|
|
27
|
-
import { BulletedListPlugin, ListPlugin, NumberedListPlugin, TodoListPlugin, } from "@udecode/plate-list/react";
|
|
28
|
-
import { ImagePlugin, MediaEmbedPlugin } from "@udecode/plate-media/react";
|
|
29
|
-
import { MentionInputPlugin, MentionPlugin, } from "@udecode/plate-mention/react";
|
|
30
|
-
import { NodeIdPlugin } from "@udecode/plate-node-id";
|
|
31
|
-
import { ResetNodePlugin } from "@udecode/plate-reset-node/react";
|
|
32
|
-
import { SelectOnBackspacePlugin } from "@udecode/plate-select";
|
|
33
|
-
import { BlockSelectionPlugin } from "@udecode/plate-selection/react";
|
|
34
|
-
import { SlashInputPlugin, SlashPlugin, } from "@udecode/plate-slash-command/react";
|
|
35
|
-
import { TabbablePlugin } from "@udecode/plate-tabbable/react";
|
|
36
|
-
import { TableCellHeaderPlugin, TableCellPlugin, TablePlugin, TableRowPlugin, } from "@udecode/plate-table/react";
|
|
37
|
-
import { TogglePlugin } from "@udecode/plate-toggle/react";
|
|
38
|
-
import { TrailingBlockPlugin } from "@udecode/plate-trailing-block";
|
|
39
|
-
// import { DragOverCursorPlugin } from "./components/cursor-overlay";
|
|
40
|
-
// COMPONENTS
|
|
41
|
-
import { BlockquoteElement } from "./components/blockquote-element";
|
|
42
|
-
import { CodeBlockElement } from "./components/code-block-element";
|
|
43
|
-
import { CodeLeaf } from "./components/code-leaf";
|
|
44
|
-
import { CodeLineElement } from "./components/code-line-element";
|
|
45
|
-
import { CodeSyntaxLeaf } from "./components/code-syntax-leaf";
|
|
46
|
-
import { CommentLeaf } from "./components/comment-leaf";
|
|
47
|
-
import { ExcalidrawElement } from "./components/excalidraw-element";
|
|
48
|
-
import { HeadingElement } from "./components/heading-element";
|
|
49
|
-
import { HighlightLeaf } from "./components/highlight-leaf";
|
|
50
|
-
import { HrElement } from "./components/hr-element";
|
|
51
|
-
import { ImageElement } from "./components/image-element";
|
|
52
|
-
import { TodoLi, TodoMarker } from "./components/indent-todo-marker-component";
|
|
53
|
-
import { KbdLeaf } from "./components/kbd-leaf";
|
|
54
|
-
import { LinkElement } from "./components/link-element";
|
|
55
|
-
import { LinkFloatingToolbar } from "./components/link-floating-toolbar";
|
|
56
|
-
import { MediaEmbedElement } from "./components/media-embed-element";
|
|
57
|
-
import { MentionElement } from "./components/mention-element";
|
|
58
|
-
import { MentionInputElement } from "./components/mention-input-element";
|
|
59
|
-
import { ParagraphElement } from "./components/paragraph-element";
|
|
60
|
-
import { withPlaceholders } from "./components/placeholder";
|
|
61
|
-
import { SlashInputElement } from "./components/slash-input-element";
|
|
62
|
-
import { TableCellElement, TableCellHeaderElement, } from "./components/table-cell-element";
|
|
63
|
-
import { TableElement } from "./components/table-element";
|
|
64
|
-
import { TableRowElement } from "./components/table-row-element";
|
|
65
|
-
import { TodoListElement } from "./components/todo-list-element";
|
|
66
|
-
// UTILS
|
|
67
|
-
import { withProps } from "@udecode/cn";
|
|
68
|
-
import { autoformatRules } from "./lib/autoformat-rules";
|
|
69
|
-
const usePlateEditor = ({ value = [] }) => {
|
|
70
|
-
const editor = createPlateEditor({
|
|
71
|
-
plugins: [
|
|
72
|
-
HeadingPlugin,
|
|
73
|
-
BlockquotePlugin,
|
|
74
|
-
CodeBlockPlugin,
|
|
75
|
-
CodeLinePlugin,
|
|
76
|
-
CodeSyntaxPlugin,
|
|
77
|
-
HorizontalRulePlugin,
|
|
78
|
-
BasicMarksPlugin,
|
|
79
|
-
TodoListPlugin,
|
|
80
|
-
// Nodes
|
|
81
|
-
HeadingPlugin,
|
|
82
|
-
BlockquotePlugin,
|
|
83
|
-
CodeBlockPlugin,
|
|
84
|
-
CodeLinePlugin,
|
|
85
|
-
CodeSyntaxPlugin,
|
|
86
|
-
HorizontalRulePlugin,
|
|
87
|
-
TogglePlugin,
|
|
88
|
-
LinkPlugin.configure({
|
|
89
|
-
render: { afterEditable: () => _jsx(LinkFloatingToolbar, {}) },
|
|
90
|
-
}),
|
|
91
|
-
ImagePlugin,
|
|
92
|
-
MediaEmbedPlugin,
|
|
93
|
-
CaptionPlugin.configure({
|
|
94
|
-
options: { plugins: [ImagePlugin, MediaEmbedPlugin] },
|
|
95
|
-
}),
|
|
96
|
-
MentionPlugin,
|
|
97
|
-
MentionInputPlugin,
|
|
98
|
-
TablePlugin,
|
|
99
|
-
TableRowPlugin,
|
|
100
|
-
TableCellPlugin,
|
|
101
|
-
TableCellHeaderPlugin,
|
|
102
|
-
TodoListPlugin,
|
|
103
|
-
ExcalidrawPlugin,
|
|
104
|
-
// Marks
|
|
105
|
-
BoldPlugin,
|
|
106
|
-
ItalicPlugin,
|
|
107
|
-
UnderlinePlugin,
|
|
108
|
-
StrikethroughPlugin,
|
|
109
|
-
CodePlugin,
|
|
110
|
-
SubscriptPlugin,
|
|
111
|
-
SuperscriptPlugin,
|
|
112
|
-
FontColorPlugin,
|
|
113
|
-
FontBackgroundColorPlugin,
|
|
114
|
-
FontSizePlugin,
|
|
115
|
-
HighlightPlugin,
|
|
116
|
-
KbdPlugin,
|
|
117
|
-
// Block Style
|
|
118
|
-
AlignPlugin.configure({
|
|
119
|
-
inject: {
|
|
120
|
-
targetPlugins: [ParagraphPlugin.key, ...HEADING_LEVELS],
|
|
121
|
-
},
|
|
122
|
-
}),
|
|
123
|
-
IndentPlugin.configure({
|
|
124
|
-
inject: {
|
|
125
|
-
targetPlugins: [
|
|
126
|
-
ParagraphPlugin.key,
|
|
127
|
-
BlockquotePlugin.key,
|
|
128
|
-
CodeBlockPlugin.key,
|
|
129
|
-
TogglePlugin.key,
|
|
130
|
-
...HEADING_LEVELS,
|
|
131
|
-
],
|
|
132
|
-
},
|
|
133
|
-
}),
|
|
134
|
-
IndentListPlugin.configure({
|
|
135
|
-
inject: {
|
|
136
|
-
targetPlugins: [
|
|
137
|
-
ParagraphPlugin.key,
|
|
138
|
-
BlockquotePlugin.key,
|
|
139
|
-
CodeBlockPlugin.key,
|
|
140
|
-
TogglePlugin.key,
|
|
141
|
-
...HEADING_LEVELS,
|
|
142
|
-
],
|
|
143
|
-
},
|
|
144
|
-
options: {
|
|
145
|
-
listStyleTypes: {
|
|
146
|
-
todo: {
|
|
147
|
-
liComponent: TodoLi,
|
|
148
|
-
markerComponent: TodoMarker,
|
|
149
|
-
type: "todo",
|
|
150
|
-
},
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
}),
|
|
154
|
-
LineHeightPlugin.configure({
|
|
155
|
-
inject: {
|
|
156
|
-
nodeProps: {
|
|
157
|
-
defaultNodeValue: 1.5,
|
|
158
|
-
validNodeValues: [1, 1.2, 1.5, 2, 3],
|
|
159
|
-
},
|
|
160
|
-
targetPlugins: [ParagraphPlugin.key, ...HEADING_LEVELS],
|
|
161
|
-
},
|
|
162
|
-
}),
|
|
163
|
-
ListPlugin,
|
|
164
|
-
BulletedListPlugin,
|
|
165
|
-
NumberedListPlugin,
|
|
166
|
-
// TABLE
|
|
167
|
-
TablePlugin,
|
|
168
|
-
TableRowPlugin,
|
|
169
|
-
TableCellPlugin,
|
|
170
|
-
TableCellHeaderPlugin,
|
|
171
|
-
TabbablePlugin.configure(({ editor }) => ({
|
|
172
|
-
options: {
|
|
173
|
-
query: () => {
|
|
174
|
-
if (isSelectionAtBlockStart(editor))
|
|
175
|
-
return false;
|
|
176
|
-
return !someNode(editor, {
|
|
177
|
-
match: (n) => {
|
|
178
|
-
return !!(n.type &&
|
|
179
|
-
([
|
|
180
|
-
TablePlugin.key,
|
|
181
|
-
TodoListPlugin.key,
|
|
182
|
-
CodeBlockPlugin.key,
|
|
183
|
-
].includes(n.type) ||
|
|
184
|
-
n.listStyleType));
|
|
185
|
-
},
|
|
186
|
-
});
|
|
187
|
-
},
|
|
188
|
-
},
|
|
189
|
-
})),
|
|
190
|
-
ResetNodePlugin.configure({
|
|
191
|
-
options: {
|
|
192
|
-
rules: [
|
|
193
|
-
{
|
|
194
|
-
types: [BlockquotePlugin.key, TodoListPlugin.key],
|
|
195
|
-
defaultType: ParagraphPlugin.key,
|
|
196
|
-
hotkey: "Enter",
|
|
197
|
-
predicate: isBlockAboveEmpty,
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
types: [BlockquotePlugin.key, TodoListPlugin.key],
|
|
201
|
-
defaultType: ParagraphPlugin.key,
|
|
202
|
-
hotkey: "Backspace",
|
|
203
|
-
predicate: isSelectionAtBlockStart,
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
types: [CodeBlockPlugin.key],
|
|
207
|
-
defaultType: ParagraphPlugin.key,
|
|
208
|
-
onReset: unwrapCodeBlock,
|
|
209
|
-
hotkey: "Enter",
|
|
210
|
-
predicate: isCodeBlockEmpty,
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
types: [CodeBlockPlugin.key],
|
|
214
|
-
defaultType: ParagraphPlugin.key,
|
|
215
|
-
onReset: unwrapCodeBlock,
|
|
216
|
-
hotkey: "Backspace",
|
|
217
|
-
predicate: isSelectionAtCodeBlockStart,
|
|
218
|
-
},
|
|
219
|
-
],
|
|
220
|
-
},
|
|
221
|
-
}),
|
|
222
|
-
// Functionality
|
|
223
|
-
SlashPlugin,
|
|
224
|
-
SlashInputPlugin,
|
|
225
|
-
AutoformatPlugin.configure({
|
|
226
|
-
options: {
|
|
227
|
-
rules: autoformatRules,
|
|
228
|
-
enableUndoOnDelete: true,
|
|
229
|
-
},
|
|
230
|
-
}),
|
|
231
|
-
BlockSelectionPlugin,
|
|
232
|
-
EmojiPlugin,
|
|
233
|
-
ExitBreakPlugin.configure({
|
|
234
|
-
options: {
|
|
235
|
-
rules: [
|
|
236
|
-
{
|
|
237
|
-
hotkey: "mod+enter",
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
hotkey: "mod+shift+enter",
|
|
241
|
-
before: true,
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
hotkey: "enter",
|
|
245
|
-
query: {
|
|
246
|
-
start: true,
|
|
247
|
-
end: true,
|
|
248
|
-
allow: HEADING_LEVELS,
|
|
249
|
-
},
|
|
250
|
-
relative: true,
|
|
251
|
-
level: 1,
|
|
252
|
-
},
|
|
253
|
-
],
|
|
254
|
-
},
|
|
255
|
-
}),
|
|
256
|
-
NodeIdPlugin,
|
|
257
|
-
ResetNodePlugin.configure({
|
|
258
|
-
options: {
|
|
259
|
-
rules: [
|
|
260
|
-
{
|
|
261
|
-
types: [BlockquotePlugin.key, TodoListPlugin.key],
|
|
262
|
-
defaultType: ParagraphPlugin.key,
|
|
263
|
-
hotkey: "Enter",
|
|
264
|
-
predicate: isBlockAboveEmpty,
|
|
265
|
-
},
|
|
266
|
-
{
|
|
267
|
-
types: [BlockquotePlugin.key, TodoListPlugin.key],
|
|
268
|
-
defaultType: ParagraphPlugin.key,
|
|
269
|
-
hotkey: "Backspace",
|
|
270
|
-
predicate: isSelectionAtBlockStart,
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
types: [CodeBlockPlugin.key],
|
|
274
|
-
defaultType: ParagraphPlugin.key,
|
|
275
|
-
onReset: unwrapCodeBlock,
|
|
276
|
-
hotkey: "Enter",
|
|
277
|
-
predicate: isCodeBlockEmpty,
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
types: [CodeBlockPlugin.key],
|
|
281
|
-
defaultType: ParagraphPlugin.key,
|
|
282
|
-
onReset: unwrapCodeBlock,
|
|
283
|
-
hotkey: "Backspace",
|
|
284
|
-
predicate: isSelectionAtCodeBlockStart,
|
|
285
|
-
},
|
|
286
|
-
],
|
|
287
|
-
},
|
|
288
|
-
}),
|
|
289
|
-
SelectOnBackspacePlugin.configure({
|
|
290
|
-
options: {
|
|
291
|
-
query: {
|
|
292
|
-
allow: [ImagePlugin.key, HorizontalRulePlugin.key],
|
|
293
|
-
},
|
|
294
|
-
},
|
|
295
|
-
}),
|
|
296
|
-
SoftBreakPlugin.configure({
|
|
297
|
-
options: {
|
|
298
|
-
rules: [
|
|
299
|
-
{ hotkey: "shift+enter" },
|
|
300
|
-
{
|
|
301
|
-
hotkey: "enter",
|
|
302
|
-
query: {
|
|
303
|
-
allow: [
|
|
304
|
-
CodeBlockPlugin.key,
|
|
305
|
-
BlockquotePlugin.key,
|
|
306
|
-
TableCellPlugin.key,
|
|
307
|
-
TableCellHeaderPlugin.key,
|
|
308
|
-
],
|
|
309
|
-
},
|
|
310
|
-
},
|
|
311
|
-
],
|
|
312
|
-
},
|
|
313
|
-
}),
|
|
314
|
-
TabbablePlugin.configure(({ editor }) => ({
|
|
315
|
-
options: {
|
|
316
|
-
query: () => {
|
|
317
|
-
if (isSelectionAtBlockStart(editor))
|
|
318
|
-
return false;
|
|
319
|
-
return !someNode(editor, {
|
|
320
|
-
match: (n) => {
|
|
321
|
-
return !!(n.type &&
|
|
322
|
-
([
|
|
323
|
-
TablePlugin.key,
|
|
324
|
-
TodoListPlugin.key,
|
|
325
|
-
CodeBlockPlugin.key,
|
|
326
|
-
].includes(n.type) ||
|
|
327
|
-
n.listStyleType));
|
|
328
|
-
},
|
|
329
|
-
});
|
|
330
|
-
},
|
|
331
|
-
},
|
|
332
|
-
})),
|
|
333
|
-
TrailingBlockPlugin.configure({
|
|
334
|
-
options: { type: ParagraphPlugin.key },
|
|
335
|
-
}),
|
|
336
|
-
// DragOverCursorPlugin,
|
|
337
|
-
],
|
|
338
|
-
override: {
|
|
339
|
-
components: withPlaceholders({
|
|
340
|
-
[BlockquotePlugin.key]: BlockquoteElement,
|
|
341
|
-
[CodeBlockPlugin.key]: CodeBlockElement,
|
|
342
|
-
[CodeLinePlugin.key]: CodeLineElement,
|
|
343
|
-
[CodeSyntaxPlugin.key]: CodeSyntaxLeaf,
|
|
344
|
-
[HorizontalRulePlugin.key]: HrElement,
|
|
345
|
-
[HEADING_KEYS.h1]: withProps(HeadingElement, { variant: "h1" }),
|
|
346
|
-
[HEADING_KEYS.h2]: withProps(HeadingElement, { variant: "h2" }),
|
|
347
|
-
[HEADING_KEYS.h3]: withProps(HeadingElement, { variant: "h3" }),
|
|
348
|
-
[HEADING_KEYS.h4]: withProps(HeadingElement, { variant: "h4" }),
|
|
349
|
-
[HEADING_KEYS.h5]: withProps(HeadingElement, { variant: "h5" }),
|
|
350
|
-
[HEADING_KEYS.h6]: withProps(HeadingElement, { variant: "h6" }),
|
|
351
|
-
[ImagePlugin.key]: ImageElement,
|
|
352
|
-
[LinkPlugin.key]: LinkElement,
|
|
353
|
-
[MediaEmbedPlugin.key]: MediaEmbedElement,
|
|
354
|
-
[MentionPlugin.key]: MentionElement,
|
|
355
|
-
[MentionInputPlugin.key]: MentionInputElement,
|
|
356
|
-
[ParagraphPlugin.key]: ParagraphElement,
|
|
357
|
-
[TablePlugin.key]: TableElement,
|
|
358
|
-
[TableRowPlugin.key]: TableRowElement,
|
|
359
|
-
[TableCellPlugin.key]: TableCellElement,
|
|
360
|
-
[TableCellHeaderPlugin.key]: TableCellHeaderElement,
|
|
361
|
-
[TodoListPlugin.key]: TodoListElement,
|
|
362
|
-
[ExcalidrawPlugin.key]: ExcalidrawElement,
|
|
363
|
-
[HighlightPlugin.key]: HighlightLeaf,
|
|
364
|
-
[BoldPlugin.key]: withProps(PlateLeaf, { as: "strong" }),
|
|
365
|
-
[CodePlugin.key]: CodeLeaf,
|
|
366
|
-
[ItalicPlugin.key]: withProps(PlateLeaf, { as: "em" }),
|
|
367
|
-
[StrikethroughPlugin.key]: withProps(PlateLeaf, { as: "s" }),
|
|
368
|
-
[SubscriptPlugin.key]: withProps(PlateLeaf, { as: "sub" }),
|
|
369
|
-
[SuperscriptPlugin.key]: withProps(PlateLeaf, { as: "sup" }),
|
|
370
|
-
[UnderlinePlugin.key]: withProps(PlateLeaf, { as: "u" }),
|
|
371
|
-
[KbdPlugin.key]: KbdLeaf,
|
|
372
|
-
[CommentsPlugin.key]: CommentLeaf,
|
|
373
|
-
[SlashInputPlugin.key]: SlashInputElement,
|
|
374
|
-
[ListPlugin.key]: withProps(PlateLeaf, { as: "ul" }),
|
|
375
|
-
[BulletedListPlugin.key]: withProps(PlateLeaf, { as: "ul" }),
|
|
376
|
-
[NumberedListPlugin.key]: withProps(PlateLeaf, { as: "ol" }),
|
|
377
|
-
}),
|
|
378
|
-
},
|
|
379
|
-
value: value,
|
|
380
|
-
});
|
|
381
|
-
return editor;
|
|
382
|
-
};
|
|
383
|
-
export default usePlateEditor;
|
|
384
|
-
//# sourceMappingURL=usePlateEditor.js.map
|