@onereach/ui-components 4.2.0-beta.2548.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundled/v2/components/OrCheckboxGroupV3/OrCheckboxGroup.js +145 -0
- package/dist/bundled/v2/components/OrCheckboxGroupV3/OrCheckboxGroup.vue.d.ts +91 -0
- package/dist/bundled/v2/components/OrCheckboxGroupV3/index.d.ts +1 -0
- package/dist/bundled/v2/components/OrCheckboxGroupV3/index.js +31 -0
- package/dist/bundled/v2/components/OrCheckboxTreeV3/OrCheckboxTree.js +226 -0
- package/dist/bundled/v2/components/OrCheckboxTreeV3/OrCheckboxTree.vue.d.ts +91 -0
- package/dist/bundled/v2/components/OrCheckboxTreeV3/index.d.ts +2 -0
- package/dist/bundled/v2/components/OrCheckboxTreeV3/index.js +23 -0
- package/dist/bundled/v2/components/OrCheckboxTreeV3/styles.d.ts +2 -0
- package/dist/bundled/v2/components/OrCheckboxTreeV3/styles.js +10 -0
- package/dist/bundled/v2/components/OrCheckboxTreeV3/types.d.ts +8 -0
- package/dist/bundled/v2/components/OrCheckboxV3/OrCheckbox.js +37 -39
- package/dist/bundled/v2/components/OrCheckboxV3/OrCheckbox.vue.d.ts +18 -16
- package/dist/bundled/v2/components/OrCheckboxV3/index.js +1 -0
- package/dist/bundled/v2/components/OrCode/OrCode.js +3727 -6
- package/dist/bundled/v2/components/OrCode/index.js +2 -6
- package/dist/bundled/v2/components/OrCode/lang.js +3 -3897
- package/dist/bundled/v2/components/OrCode/theme.js +1 -2
- package/dist/bundled/v2/components/OrConfirm/OrConfirm.js +0 -1
- package/dist/bundled/v2/components/OrConfirm/index.js +0 -1
- package/dist/bundled/v2/components/OrFormGroupV3/OrFormGroup.js +127 -0
- package/dist/bundled/v2/components/OrFormGroupV3/OrFormGroup.vue.d.ts +87 -0
- package/dist/bundled/v2/components/OrFormGroupV3/index.d.ts +2 -0
- package/dist/bundled/v2/components/OrFormGroupV3/index.js +12 -0
- package/dist/bundled/v2/components/OrFormGroupV3/props.d.ts +4 -0
- package/dist/bundled/v2/components/OrFormGroupV3/props.js +7 -0
- package/dist/bundled/v2/components/OrFormGroupV3/styles.d.ts +5 -0
- package/dist/bundled/v2/components/OrFormGroupV3/styles.js +17 -0
- package/dist/bundled/v2/components/OrModal/OrModal.js +1266 -3
- package/dist/bundled/v2/components/OrModal/index.js +0 -1
- package/dist/bundled/v2/components/OrRadioGroupV3/OrRadioGroup.js +132 -0
- package/dist/bundled/v2/components/OrRadioGroupV3/OrRadioGroup.vue.d.ts +110 -0
- package/dist/bundled/v2/components/OrRadioGroupV3/index.d.ts +1 -0
- package/dist/bundled/v2/components/OrRadioGroupV3/index.js +19 -0
- package/dist/bundled/v2/components/OrSelectV3/OrSelect.js +1 -1
- package/dist/bundled/v2/components/OrSelectV3/index.js +1 -1
- package/dist/bundled/v2/components/OrTooltipContent/OrTooltipContent.js +2 -2
- package/dist/bundled/v2/components/index.d.ts +0 -1
- package/dist/bundled/v2/components/index.js +2 -15
- package/dist/bundled/v2/{index-f5487f12.js → index-6976c52a.js} +115 -3
- package/dist/bundled/v2/index.d.ts +1 -0
- package/dist/bundled/v2/index.js +8 -20
- package/dist/bundled/v2/{index-70ca38c5.js → lang-02d2bb2d.js} +3965 -73
- package/dist/bundled/v2/utils/functions/flattenDeep.d.ts +2 -0
- package/dist/bundled/v2/utils/functions/flattenDeep.js +5 -0
- package/dist/bundled/v3/{OrAvatar.vue_vue_type_script_lang-29e8ad0e.js → OrAvatar.vue_vue_type_script_lang-6511e348.js} +1 -1
- package/dist/bundled/v3/{OrButton.vue_vue_type_script_lang-a4a16fe5.js → OrButton.vue_vue_type_script_lang-da7f7ed0.js} +1 -1
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-c1d83552.js → OrCardCollection.vue_vue_type_script_lang-7a2e1332.js} +3 -3
- package/dist/bundled/v3/{OrCarousel.vue_vue_type_script_lang-0e87c56b.js → OrCarousel.vue_vue_type_script_lang-6976844a.js} +1 -1
- package/dist/bundled/v3/{OrCheckbox.vue_vue_type_script_lang-6ff51af9.js → OrCheckbox.vue_vue_type_script_lang-11b16d93.js} +1 -1
- package/dist/bundled/v3/{OrCheckbox.vue_vue_type_script_lang-60cefcbd.js → OrCheckbox.vue_vue_type_script_lang-b274a5ee.js} +27 -11
- package/dist/bundled/v3/OrCheckboxTree.vue_vue_type_script_lang-f9807b75.js +115 -0
- package/dist/bundled/v3/{OrChip.vue_vue_type_script_lang-ceebbd82.js → OrChip.vue_vue_type_script_lang-5a390853.js} +1 -1
- package/dist/bundled/v3/{OrChips.vue_vue_type_script_lang-94b456c7.js → OrChips.vue_vue_type_script_lang-d4bb44eb.js} +1 -1
- package/dist/bundled/{v2/index-16aee5bc.js → v3/OrCode.vue_vue_type_script_lang-5397df6a.js} +234 -14
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-36318ca2.js → OrConfirm.vue_vue_type_script_lang-89febea7.js} +2 -2
- package/dist/bundled/v3/{OrDateTimePicker.vue_vue_type_script_lang-5c1a5d4a.js → OrDateTimePicker.vue_vue_type_script_lang-8ff54abd.js} +1 -1
- package/dist/bundled/v3/OrFormGroup.vue_vue_type_script_lang-1c6844d6.js +63 -0
- package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-5d204461.js → OrIconButton.vue_vue_type_script_lang-96cb5b59.js} +2 -2
- package/dist/bundled/v3/{OrInlineTextEdit.vue_vue_type_script_lang-424e2c26.js → OrInlineTextEdit.vue_vue_type_script_lang-45987769.js} +1 -1
- package/dist/bundled/v3/{OrList.vue_vue_type_script_lang-c65271b9.js → OrList.vue_vue_type_script_lang-2c7537cc.js} +3 -3
- package/dist/bundled/v3/{OrListOfInputs.vue_vue_type_script_lang-d3dce7b8.js → OrListOfInputs.vue_vue_type_script_lang-009f62a5.js} +3 -3
- package/dist/bundled/v3/{useFocusTrap-9567b3c8.js → OrModal.vue_vue_type_script_lang-c53617ae.js} +105 -3
- package/dist/bundled/v3/{OrNotification.vue_vue_type_script_lang-ef4f2661.js → OrNotification.vue_vue_type_script_lang-efb05bb2.js} +2 -2
- package/dist/bundled/v3/{OrOverflowMenu.vue_vue_type_script_lang-0c461991.js → OrOverflowMenu.vue_vue_type_script_lang-ba50133f.js} +2 -2
- package/dist/bundled/v3/{OrPassword.vue_vue_type_script_lang-3d308fef.js → OrPassword.vue_vue_type_script_lang-37f52611.js} +1 -1
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-86f4f5c7.js → OrSearch.vue_vue_type_script_lang-bcb935c3.js} +1 -1
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-f7601423.js → OrSelect.vue_vue_type_script_lang-098ea3ab.js} +1 -1
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-d2fecd97.js → OrSelect.vue_vue_type_script_lang-c82d8f58.js} +3 -3
- package/dist/bundled/v3/{OrSlider.vue_vue_type_script_lang-900036a2.js → OrSlider.vue_vue_type_script_lang-45ecddbe.js} +1 -1
- package/dist/bundled/v3/{OrStepper.vue_vue_type_script_lang-2821c496.js → OrStepper.vue_vue_type_script_lang-975a4df6.js} +1 -1
- package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-f06b54a2.js → OrTag.vue_vue_type_script_lang-621e9307.js} +1 -1
- package/dist/bundled/v3/{OrTextbox.vue_vue_type_script_lang-b8d5341b.js → OrTextbox.vue_vue_type_script_lang-812f302d.js} +1 -1
- package/dist/bundled/v3/components/OrAvatar/OrAvatar.js +3 -3
- package/dist/bundled/v3/components/OrAvatar/index.js +2 -2
- package/dist/bundled/v3/components/OrButtonV2/OrButton.js +3 -3
- package/dist/bundled/v3/components/OrButtonV2/index.js +4 -4
- package/dist/bundled/v3/components/OrCardCollection/OrCardCollection.js +6 -6
- package/dist/bundled/v3/components/OrCardCollection/index.js +5 -5
- package/dist/bundled/v3/components/OrCarousel/OrCarousel.js +3 -3
- package/dist/bundled/v3/components/OrCarousel/index.js +2 -2
- package/dist/bundled/v3/components/OrCheckbox/OrCheckbox.js +3 -3
- package/dist/bundled/v3/components/OrCheckbox/index.js +2 -2
- package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.js +121 -0
- package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.vue.d.ts +91 -0
- package/dist/bundled/v3/components/OrCheckboxGroupV3/index.d.ts +1 -0
- package/dist/bundled/v3/components/OrCheckboxGroupV3/index.js +40 -0
- package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.js +90 -0
- package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.vue.d.ts +91 -0
- package/dist/bundled/v3/components/OrCheckboxTreeV3/index.d.ts +2 -0
- package/dist/bundled/v3/components/OrCheckboxTreeV3/index.js +28 -0
- package/dist/bundled/v3/components/OrCheckboxTreeV3/styles.d.ts +2 -0
- package/dist/bundled/v3/components/OrCheckboxTreeV3/styles.js +10 -0
- package/dist/bundled/v3/components/OrCheckboxTreeV3/types.d.ts +8 -0
- package/dist/bundled/v3/components/OrCheckboxV3/OrCheckbox.js +12 -9
- package/dist/bundled/v3/components/OrCheckboxV3/OrCheckbox.vue.d.ts +18 -16
- package/dist/bundled/v3/components/OrCheckboxV3/index.js +2 -1
- package/dist/bundled/v3/components/OrChip/OrChip.js +3 -3
- package/dist/bundled/v3/components/OrChip/index.js +2 -2
- package/dist/bundled/v3/components/OrChips/OrChips.js +4 -4
- package/dist/bundled/v3/components/OrChips/index.js +3 -3
- package/dist/bundled/v3/components/OrCode/OrCode.js +9 -13
- package/dist/bundled/v3/components/OrCode/index.js +7 -11
- package/dist/bundled/v3/components/OrCode/lang.js +3 -3897
- package/dist/bundled/v3/components/OrCode/theme.js +1 -2
- package/dist/bundled/v3/components/OrConfirm/OrConfirm.js +7 -8
- package/dist/bundled/v3/components/OrConfirm/index.js +6 -7
- package/dist/bundled/v3/components/OrDateTimePicker/OrDateTimePicker.js +5 -5
- package/dist/bundled/v3/components/OrDateTimePicker/index.js +4 -4
- package/dist/bundled/v3/components/OrFormGroupV3/OrFormGroup.js +59 -0
- package/dist/bundled/v3/components/OrFormGroupV3/OrFormGroup.vue.d.ts +87 -0
- package/dist/bundled/v3/components/OrFormGroupV3/index.d.ts +2 -0
- package/dist/bundled/v3/components/OrFormGroupV3/index.js +15 -0
- package/dist/bundled/v3/components/OrFormGroupV3/props.d.ts +4 -0
- package/dist/bundled/v3/components/OrFormGroupV3/props.js +7 -0
- package/dist/bundled/v3/components/OrFormGroupV3/styles.d.ts +5 -0
- package/dist/bundled/v3/components/OrFormGroupV3/styles.js +17 -0
- package/dist/bundled/v3/components/OrIcon/OrIcon.js +2 -2
- package/dist/bundled/v3/components/OrIcon/index.js +1 -1
- package/dist/bundled/v3/components/OrIconButtonV2/OrIconButton.js +4 -4
- package/dist/bundled/v3/components/OrIconButtonV2/index.js +3 -3
- package/dist/bundled/v3/components/OrInlineTextEdit/OrInlineTextEdit.js +5 -5
- package/dist/bundled/v3/components/OrInlineTextEdit/index.js +4 -4
- package/dist/bundled/v3/components/OrList/OrList.js +6 -6
- package/dist/bundled/v3/components/OrList/index.js +5 -5
- package/dist/bundled/v3/components/OrListOfInputs/OrListOfInputs.js +7 -7
- package/dist/bundled/v3/components/OrListOfInputs/index.js +6 -6
- package/dist/bundled/v3/components/OrModal/OrModal.js +5 -6
- package/dist/bundled/v3/components/OrModal/index.js +4 -5
- package/dist/bundled/v3/components/OrNotification/OrNotification.js +5 -5
- package/dist/bundled/v3/components/OrNotification/index.js +4 -4
- package/dist/bundled/v3/components/OrOverflowMenu/OrOverflowMenu.js +6 -6
- package/dist/bundled/v3/components/OrOverflowMenu/index.js +5 -5
- package/dist/bundled/v3/components/OrPassword/OrPassword.js +5 -5
- package/dist/bundled/v3/components/OrPassword/index.js +4 -4
- package/dist/bundled/v3/components/OrRadioGroupV3/OrRadioGroup.js +104 -0
- package/dist/bundled/v3/components/OrRadioGroupV3/OrRadioGroup.vue.d.ts +110 -0
- package/dist/bundled/v3/components/OrRadioGroupV3/index.d.ts +1 -0
- package/dist/bundled/v3/components/OrRadioGroupV3/index.js +24 -0
- package/dist/bundled/v3/components/OrSearch/OrSearch.js +5 -5
- package/dist/bundled/v3/components/OrSearch/index.js +4 -4
- package/dist/bundled/v3/components/OrSelect/OrSelect.js +5 -5
- package/dist/bundled/v3/components/OrSelect/index.js +4 -4
- package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +4 -4
- package/dist/bundled/v3/components/OrSelectV3/index.js +3 -3
- package/dist/bundled/v3/components/OrSlider/OrSlider.js +3 -3
- package/dist/bundled/v3/components/OrSlider/index.js +2 -2
- package/dist/bundled/v3/components/OrStepper/OrStepper.js +4 -4
- package/dist/bundled/v3/components/OrStepper/index.js +3 -3
- package/dist/bundled/v3/components/OrTag/OrTag.js +3 -3
- package/dist/bundled/v3/components/OrTag/index.js +2 -2
- package/dist/bundled/v3/components/OrTextbox/OrTextbox.js +5 -5
- package/dist/bundled/v3/components/OrTextbox/index.js +4 -4
- package/dist/bundled/v3/components/OrToast/OrToast.js +3 -3
- package/dist/bundled/v3/components/OrToast/index.js +4 -4
- package/dist/bundled/v3/components/OrToastContainer/OrToastContainer.js +5 -5
- package/dist/bundled/v3/components/OrToastContainer/index.js +4 -4
- package/dist/bundled/v3/components/OrTooltip/OrTooltip.js +2 -2
- package/dist/bundled/v3/components/OrTooltip/index.js +1 -1
- package/dist/bundled/v3/components/OrTooltipContent/OrTooltipContent.js +1 -1
- package/dist/bundled/v3/components/index.d.ts +0 -1
- package/dist/bundled/v3/components/index.js +31 -45
- package/dist/bundled/v3/{index-f5487f12.js → index-6976c52a.js} +115 -3
- package/dist/bundled/v3/index.d.ts +1 -0
- package/dist/bundled/v3/index.js +39 -53
- package/dist/bundled/v3/{index-70ca38c5.js → lang-02d2bb2d.js} +3965 -73
- package/dist/bundled/v3/utils/functions/flattenDeep.d.ts +2 -0
- package/dist/bundled/v3/utils/functions/flattenDeep.js +5 -0
- package/dist/esm/v2/{OrAvatar-da5cba16.js → OrAvatar-7c024521.js} +1 -1
- package/dist/esm/v2/{OrButton-bdddd8d4.js → OrButton-4e532ddb.js} +1 -1
- package/dist/esm/v2/{OrButton.vue_rollup-plugin-vue_styles.0-3dbd90b4.js → OrButton.vue_rollup-plugin-vue_styles.0-48c5883e.js} +2 -2
- package/dist/esm/v2/{OrCardCollection-4e014d25.js → OrCardCollection-9bf513b7.js} +5 -5
- package/dist/esm/v2/{OrCarousel-3c809a13.js → OrCarousel-e0c2e387.js} +1 -1
- package/dist/esm/v2/{OrCheckbox-dc587ec9.js → OrCheckbox-39c94019.js} +37 -40
- package/dist/esm/v2/{OrCheckbox-bf34eb0f.js → OrCheckbox-7b98fc08.js} +1 -1
- package/dist/esm/v2/OrCheckboxTree-7b81e76c.js +220 -0
- package/dist/esm/v2/{OrChip-416e848e.js → OrChip-8a1abfc5.js} +1 -1
- package/dist/esm/v2/{OrChips-77e789e9.js → OrChips-a01d8520.js} +1 -1
- package/dist/esm/v2/{OrChips.vue_rollup-plugin-vue_styles.0-e05c5ca8.js → OrChips.vue_rollup-plugin-vue_styles.0-3cbb0871.js} +1 -1
- package/dist/esm/v2/{OrCode-dcb0132a.js → OrCode-e54e09f7.js} +4 -4
- package/dist/esm/v2/{OrConfirm-497cd260.js → OrConfirm-5d5dd9bc.js} +3 -3
- package/dist/esm/v2/{OrDateTimePicker-c88ca716.js → OrDateTimePicker-6e2853ec.js} +3 -3
- package/dist/esm/v2/OrFormGroup-29a514db.js +141 -0
- package/dist/esm/v2/{OrIcon-8a6d663a.js → OrIcon-a40e60af.js} +2 -2
- package/dist/esm/v2/{OrIconButton-97bfd51d.js → OrIconButton-23972f7d.js} +1 -1
- package/dist/esm/v2/{OrIconButton.vue_rollup-plugin-vue_styles.0-e3806cef.js → OrIconButton.vue_rollup-plugin-vue_styles.0-277ce06c.js} +3 -3
- package/dist/esm/v2/{OrInlineTextEdit-e8414fb6.js → OrInlineTextEdit-9541b625.js} +3 -3
- package/dist/esm/v2/{OrList-a46d6306.js → OrList-61c7b8ea.js} +4 -4
- package/dist/esm/v2/{OrListOfInputs-33a7bf87.js → OrListOfInputs-e1b09290.js} +5 -5
- package/dist/esm/v2/{OrModal-6d84829c.js → OrModal-b9cfb8ec.js} +3 -3
- package/dist/esm/v2/{OrNotification-7945568d.js → OrNotification-fdb88eec.js} +4 -4
- package/dist/esm/v2/{OrOverflowMenu-5ce7171b.js → OrOverflowMenu-83540c76.js} +4 -4
- package/dist/esm/v2/{OrPassword-3597153d.js → OrPassword-022e10fd.js} +3 -3
- package/dist/esm/v2/{OrSearch-49ceaac4.js → OrSearch-620d5d76.js} +3 -3
- package/dist/esm/v2/{OrSelect-40183874.js → OrSelect-1865c781.js} +1 -1
- package/dist/esm/v2/{OrSelect-eb5cc918.js → OrSelect-d887118b.js} +4 -4
- package/dist/esm/v2/{OrSlider-32a14ca4.js → OrSlider-c0a7f9cf.js} +1 -1
- package/dist/esm/v2/{OrStepper-462bc9e6.js → OrStepper-b00f7531.js} +2 -2
- package/dist/esm/v2/{OrTag-a1fff567.js → OrTag-6349049b.js} +1 -1
- package/dist/esm/v2/{OrTextbox-0a89a533.js → OrTextbox-0373bd6a.js} +3 -3
- package/dist/esm/v2/{OrToastContainer-5ce15a5b.js → OrToastContainer-1625b803.js} +3 -3
- package/dist/esm/v2/{OrTooltip-cfb56e8f.js → OrTooltip-97a42707.js} +1 -1
- package/dist/esm/v2/{OrTooltip.vue_rollup-plugin-vue_styles.0-122f7804.js → OrTooltip.vue_rollup-plugin-vue_styles.0-a256ac18.js} +1 -1
- package/dist/esm/v2/{OrTooltipContent-c9540548.js → OrTooltipContent-d85e1071.js} +2 -2
- package/dist/esm/v2/components/index.d.ts +0 -1
- package/dist/esm/v2/components/index.js +34 -58
- package/dist/esm/v2/components/or-avatar/index.js +4 -4
- package/dist/esm/v2/components/or-button-v2/index.js +8 -8
- package/dist/esm/v2/components/or-card-collection/index.js +9 -9
- package/dist/esm/v2/components/or-carousel/index.js +4 -4
- package/dist/esm/v2/components/or-checkbox/index.js +4 -4
- package/dist/esm/v2/components/or-checkbox-group-v3/OrCheckboxGroup.vue.d.ts +91 -0
- package/dist/esm/v2/components/or-checkbox-group-v3/index.d.ts +1 -0
- package/dist/esm/v2/components/or-checkbox-group-v3/index.js +130 -0
- package/dist/esm/v2/components/or-checkbox-tree-v3/OrCheckboxTree.vue.d.ts +91 -0
- package/dist/esm/v2/components/or-checkbox-tree-v3/index.d.ts +2 -0
- package/dist/esm/v2/components/or-checkbox-tree-v3/index.js +12 -0
- package/dist/esm/v2/components/or-checkbox-tree-v3/styles.d.ts +2 -0
- package/dist/esm/v2/components/or-checkbox-tree-v3/types.d.ts +8 -0
- package/dist/esm/v2/components/or-checkbox-v3/OrCheckbox.vue.d.ts +18 -16
- package/dist/esm/v2/components/or-checkbox-v3/index.js +2 -2
- package/dist/esm/v2/components/or-chips/index.js +6 -6
- package/dist/esm/v2/components/or-chips/or-chip/index.js +4 -4
- package/dist/esm/v2/components/or-code/index.js +9 -9
- package/dist/esm/v2/components/or-confirm/index.js +10 -10
- package/dist/esm/v2/components/or-date-time-picker/index.js +8 -8
- package/dist/esm/v2/components/or-form-group-v3/OrFormGroup.vue.d.ts +87 -0
- package/dist/esm/v2/components/or-form-group-v3/index.d.ts +2 -0
- package/dist/esm/v2/components/or-form-group-v3/index.js +6 -0
- package/dist/esm/v2/components/or-form-group-v3/props.d.ts +4 -0
- package/dist/esm/v2/components/or-form-group-v3/styles.d.ts +5 -0
- package/dist/esm/v2/components/or-icon/index.js +3 -3
- package/dist/esm/v2/components/or-icon-button-v2/index.js +6 -6
- package/dist/esm/v2/components/or-inline-text-edit/index.js +8 -8
- package/dist/esm/v2/components/or-list/index.js +9 -9
- package/dist/esm/v2/components/or-list-of-inputs/index.js +10 -10
- package/dist/esm/v2/components/or-modal/index.js +8 -8
- package/dist/esm/v2/components/or-notification/index.js +8 -8
- package/dist/esm/v2/components/or-overflow-menu/index.js +9 -9
- package/dist/esm/v2/components/or-password/index.js +8 -8
- package/dist/esm/v2/components/or-radio-group-v3/OrRadioGroup.vue.d.ts +110 -0
- package/dist/esm/v2/components/or-radio-group-v3/index.d.ts +1 -0
- package/dist/esm/v2/components/or-radio-group-v3/index.js +124 -0
- package/dist/esm/v2/components/or-search/index.js +8 -8
- package/dist/esm/v2/components/or-select/index.js +7 -7
- package/dist/esm/v2/components/or-select-v3/index.js +2 -2
- package/dist/esm/v2/components/or-slider/index.js +4 -4
- package/dist/esm/v2/components/or-stepper/index.js +8 -8
- package/dist/esm/v2/components/or-tag/index.js +4 -4
- package/dist/esm/v2/components/or-textbox/index.js +8 -8
- package/dist/esm/v2/components/or-toast/index.js +8 -8
- package/dist/esm/v2/components/or-toast/or-toast-container/index.js +8 -8
- package/dist/esm/v2/components/or-tooltip/index.js +3 -3
- package/dist/esm/v2/components/or-tooltip/or-tooltip-content/index.js +1 -1
- package/dist/esm/v2/flattenDeep-e7a8b995.js +5 -0
- package/dist/esm/v2/index.d.ts +1 -0
- package/dist/esm/v2/index.js +35 -58
- package/dist/esm/v2/utils/functions/flattenDeep.d.ts +2 -0
- package/dist/esm/v3/{OrAvatar-b18f2208.js → OrAvatar-14a5c5f0.js} +1 -1
- package/dist/esm/v3/{OrButton-170b493f.js → OrButton-f8b10d79.js} +2 -2
- package/dist/esm/v3/{OrCardCollection-dc158967.js → OrCardCollection-ffbb9eda.js} +4 -4
- package/dist/esm/v3/{OrCarousel-8de5d65b.js → OrCarousel-03597740.js} +1 -1
- package/dist/esm/v3/{OrCheckbox-56f849f7.js → OrCheckbox-488b6915.js} +36 -19
- package/dist/esm/v3/{OrCheckbox-c2d9cf53.js → OrCheckbox-7efd5f26.js} +1 -1
- package/dist/esm/v3/OrCheckboxTree-87d0528b.js +182 -0
- package/dist/esm/v3/{OrChip-ccd4b331.js → OrChip-97a85e10.js} +1 -1
- package/dist/esm/v3/{OrChips-9a19aa03.js → OrChips-64b86761.js} +1 -1
- package/dist/esm/v3/{OrCode-b0b514ab.js → OrCode-6f2e4d99.js} +3 -3
- package/dist/esm/v3/{OrConfirm-1ffb7ed6.js → OrConfirm-ab04201f.js} +3 -3
- package/dist/esm/v3/{OrDateTimePicker-02c6de49.js → OrDateTimePicker-014f7819.js} +2 -2
- package/dist/esm/v3/OrFormGroup-9f581536.js +122 -0
- package/dist/esm/v3/{OrIcon-9b3d24cc.js → OrIcon-925c5413.js} +2 -2
- package/dist/esm/v3/{OrIconButton-9d08aa44.js → OrIconButton-5387fd59.js} +3 -3
- package/dist/esm/v3/{OrInlineTextEdit-8cfde85c.js → OrInlineTextEdit-6f97629f.js} +2 -2
- package/dist/esm/v3/{OrList-d3e330be.js → OrList-b8799cf4.js} +3 -3
- package/dist/esm/v3/{OrListOfInputs-3c8eaf97.js → OrListOfInputs-16ba8358.js} +4 -4
- package/dist/esm/v3/{OrModal-f8ae7146.js → OrModal-e6513e8c.js} +2 -2
- package/dist/esm/v3/{OrNotification-24192897.js → OrNotification-4c56f7ea.js} +3 -3
- package/dist/esm/v3/{OrOverflowMenu-a7568f8d.js → OrOverflowMenu-fe77e22c.js} +2 -2
- package/dist/esm/v3/{OrPassword-88a67993.js → OrPassword-9c8a458d.js} +2 -2
- package/dist/esm/v3/{OrSearch-fb2dd591.js → OrSearch-c4caf04e.js} +2 -2
- package/dist/esm/v3/{OrSelect-5502d82d.js → OrSelect-35b41c3f.js} +1 -1
- package/dist/esm/v3/{OrSelect-3d923250.js → OrSelect-d8a78242.js} +4 -4
- package/dist/esm/v3/{OrSlider-ae7b8a11.js → OrSlider-80e0f2e6.js} +1 -1
- package/dist/esm/v3/{OrStepper-446007c5.js → OrStepper-3a586401.js} +2 -2
- package/dist/esm/v3/{OrTag-38d1ba92.js → OrTag-e7adb078.js} +1 -1
- package/dist/esm/v3/{OrTextbox-7de2b10c.js → OrTextbox-f7388a30.js} +2 -2
- package/dist/esm/v3/{OrToastContainer-c3ecb1c8.js → OrToastContainer-94ba2803.js} +2 -2
- package/dist/esm/v3/{OrTooltip-be7209e5.js → OrTooltip-618ce7c9.js} +1 -1
- package/dist/esm/v3/{OrTooltipContent-68c34911.js → OrTooltipContent-37a5f562.js} +1 -1
- package/dist/esm/v3/components/index.d.ts +0 -1
- package/dist/esm/v3/components/index.js +30 -54
- package/dist/esm/v3/components/or-avatar/index.js +4 -4
- package/dist/esm/v3/components/or-button-v2/index.js +5 -5
- package/dist/esm/v3/components/or-card-collection/index.js +7 -7
- package/dist/esm/v3/components/or-carousel/index.js +4 -4
- package/dist/esm/v3/components/or-checkbox/index.js +4 -4
- package/dist/esm/v3/components/or-checkbox-group-v3/OrCheckboxGroup.vue.d.ts +91 -0
- package/dist/esm/v3/components/or-checkbox-group-v3/index.d.ts +1 -0
- package/dist/esm/v3/components/or-checkbox-group-v3/index.js +97 -0
- package/dist/esm/v3/components/or-checkbox-tree-v3/OrCheckboxTree.vue.d.ts +91 -0
- package/dist/esm/v3/components/or-checkbox-tree-v3/index.d.ts +2 -0
- package/dist/esm/v3/components/or-checkbox-tree-v3/index.js +12 -0
- package/dist/esm/v3/components/or-checkbox-tree-v3/styles.d.ts +2 -0
- package/dist/esm/v3/components/or-checkbox-tree-v3/types.d.ts +8 -0
- package/dist/esm/v3/components/or-checkbox-v3/OrCheckbox.vue.d.ts +18 -16
- package/dist/esm/v3/components/or-checkbox-v3/index.js +2 -2
- package/dist/esm/v3/components/or-chips/index.js +5 -5
- package/dist/esm/v3/components/or-chips/or-chip/index.js +4 -4
- package/dist/esm/v3/components/or-code/index.js +7 -7
- package/dist/esm/v3/components/or-confirm/index.js +7 -7
- package/dist/esm/v3/components/or-date-time-picker/index.js +6 -6
- package/dist/esm/v3/components/or-form-group-v3/OrFormGroup.vue.d.ts +87 -0
- package/dist/esm/v3/components/or-form-group-v3/index.d.ts +2 -0
- package/dist/esm/v3/components/or-form-group-v3/index.js +6 -0
- package/dist/esm/v3/components/or-form-group-v3/props.d.ts +4 -0
- package/dist/esm/v3/components/or-form-group-v3/styles.d.ts +5 -0
- package/dist/esm/v3/components/or-icon/index.js +3 -3
- package/dist/esm/v3/components/or-icon-button-v2/index.js +4 -4
- package/dist/esm/v3/components/or-inline-text-edit/index.js +6 -6
- package/dist/esm/v3/components/or-list/index.js +6 -6
- package/dist/esm/v3/components/or-list-of-inputs/index.js +7 -7
- package/dist/esm/v3/components/or-modal/index.js +6 -6
- package/dist/esm/v3/components/or-notification/index.js +6 -6
- package/dist/esm/v3/components/or-overflow-menu/index.js +6 -6
- package/dist/esm/v3/components/or-password/index.js +6 -6
- package/dist/esm/v3/components/or-radio-group-v3/OrRadioGroup.vue.d.ts +110 -0
- package/dist/esm/v3/components/or-radio-group-v3/index.d.ts +1 -0
- package/dist/esm/v3/components/or-radio-group-v3/index.js +91 -0
- package/dist/esm/v3/components/or-search/index.js +6 -6
- package/dist/esm/v3/components/or-select/index.js +7 -7
- package/dist/esm/v3/components/or-select-v3/index.js +2 -2
- package/dist/esm/v3/components/or-slider/index.js +4 -4
- package/dist/esm/v3/components/or-stepper/index.js +6 -6
- package/dist/esm/v3/components/or-tag/index.js +4 -4
- package/dist/esm/v3/components/or-textbox/index.js +6 -6
- package/dist/esm/v3/components/or-toast/index.js +6 -6
- package/dist/esm/v3/components/or-toast/or-toast-container/index.js +6 -6
- package/dist/esm/v3/components/or-tooltip/index.js +2 -2
- package/dist/esm/v3/components/or-tooltip/or-tooltip-content/index.js +1 -1
- package/dist/esm/v3/flattenDeep-e7a8b995.js +5 -0
- package/dist/esm/v3/index.d.ts +1 -0
- package/dist/esm/v3/index.js +31 -54
- package/dist/esm/v3/utils/functions/flattenDeep.d.ts +2 -0
- package/package.json +5 -25
- package/src/components/index.ts +0 -1
- package/src/components/or-checkbox-group-v3/OrCheckboxGroup.docs.mdx +7 -0
- package/src/components/or-checkbox-group-v3/OrCheckboxGroup.stories3.ts +373 -0
- package/src/components/or-checkbox-group-v3/OrCheckboxGroup.vue +80 -0
- package/src/components/or-checkbox-group-v3/index.ts +1 -0
- package/src/components/or-checkbox-tree-v3/OrCheckboxTree.docs.mdx +7 -0
- package/src/components/or-checkbox-tree-v3/OrCheckboxTree.stories3.ts +112 -0
- package/src/components/or-checkbox-tree-v3/OrCheckboxTree.vue +192 -0
- package/src/components/or-checkbox-tree-v3/index.ts +2 -0
- package/src/components/or-checkbox-tree-v3/styles.ts +15 -0
- package/src/components/or-checkbox-tree-v3/types.ts +8 -0
- package/src/components/or-checkbox-v3/OrCheckbox.vue +33 -13
- package/src/components/or-form-group-v3/OrFormGroup.stories3.ts +114 -0
- package/src/components/or-form-group-v3/OrFormGroup.vue +116 -0
- package/src/components/or-form-group-v3/index.ts +2 -0
- package/src/components/or-form-group-v3/props.ts +4 -0
- package/src/components/or-form-group-v3/styles.ts +33 -0
- package/src/components/or-radio-group-v3/OrRadioGroup.stories3.ts +81 -0
- package/src/components/or-radio-group-v3/OrRadioGroup.vue +80 -0
- package/src/components/or-radio-group-v3/index.ts +1 -0
- package/src/components/or-radio-v3/OrRadio.stories3.ts +1 -1
- package/src/components/or-tooltip/or-tooltip-content/OrTooltipContent.vue +0 -1
- package/src/index.ts +1 -0
- package/src/utils/functions/flattenDeep.ts +5 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.js +0 -1990
- package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +0 -170
- package/dist/bundled/v2/components/OrRichTextEditorV3/index.d.ts +0 -1
- package/dist/bundled/v2/components/OrRichTextEditorV3/index.js +0 -68
- package/dist/bundled/v2/components/OrRichTextEditorV3/styles.d.ts +0 -6
- package/dist/bundled/v2/components/OrRichTextEditorV3/styles.js +0 -38
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.d.ts +0 -3
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +0 -45
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.d.ts +0 -27
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +0 -184
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/index.d.ts +0 -1
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/index.js +0 -5
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/theme.d.ts +0 -24
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/theme.js +0 -190
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/types.d.ts +0 -19
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/markdown.d.ts +0 -3
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/markdown.js +0 -5
- package/dist/bundled/v2/index-62c3221b.js +0 -6956
- package/dist/bundled/v2/index.es-3f39f316.js +0 -115
- package/dist/bundled/v2/markdown-516daba9.js +0 -18737
- package/dist/bundled/v2/tiptap-core.esm-f85402b1.js +0 -9360
- package/dist/bundled/v2/useFocusTrap-9567b3c8.js +0 -1268
- package/dist/bundled/v3/OrCode.vue_vue_type_script_lang-f6f74339.js +0 -236
- package/dist/bundled/v3/OrModal.vue_vue_type_script_lang-af0c4288.js +0 -107
- package/dist/bundled/v3/OrRichTextEditor.vue_vue_type_script_lang-fec87993.js +0 -1765
- package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.js +0 -228
- package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +0 -170
- package/dist/bundled/v3/components/OrRichTextEditorV3/index.d.ts +0 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/index.js +0 -84
- package/dist/bundled/v3/components/OrRichTextEditorV3/styles.d.ts +0 -6
- package/dist/bundled/v3/components/OrRichTextEditorV3/styles.js +0 -38
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.d.ts +0 -3
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +0 -45
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.d.ts +0 -27
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +0 -184
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/index.d.ts +0 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/index.js +0 -5
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.d.ts +0 -24
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.js +0 -190
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/types.d.ts +0 -19
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/markdown.d.ts +0 -3
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/markdown.js +0 -5
- package/dist/bundled/v3/index-16aee5bc.js +0 -3740
- package/dist/bundled/v3/index-62c3221b.js +0 -6956
- package/dist/bundled/v3/index.es-3f39f316.js +0 -115
- package/dist/bundled/v3/markdown-516daba9.js +0 -18737
- package/dist/bundled/v3/tiptap-core.esm-f85402b1.js +0 -9360
- package/dist/esm/v2/OrRichTextEditor-e19e74f4.js +0 -724
- package/dist/esm/v2/codemirrorView-be2c7423.js +0 -353
- package/dist/esm/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +0 -170
- package/dist/esm/v2/components/or-rich-text-editor-v3/index.d.ts +0 -1
- package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +0 -59
- package/dist/esm/v2/components/or-rich-text-editor-v3/styles.d.ts +0 -6
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.d.ts +0 -3
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +0 -27
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/index.d.ts +0 -1
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/index.js +0 -7
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/theme.d.ts +0 -24
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/types.d.ts +0 -19
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/markdown.d.ts +0 -3
- package/dist/esm/v3/OrRichTextEditor-f5c54d46.js +0 -687
- package/dist/esm/v3/codemirrorView-be2c7423.js +0 -353
- package/dist/esm/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +0 -170
- package/dist/esm/v3/components/or-rich-text-editor-v3/index.d.ts +0 -1
- package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +0 -57
- package/dist/esm/v3/components/or-rich-text-editor-v3/styles.d.ts +0 -6
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.d.ts +0 -3
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +0 -27
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/index.d.ts +0 -1
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/index.js +0 -7
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/theme.d.ts +0 -24
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/types.d.ts +0 -19
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/markdown.d.ts +0 -3
- package/src/components/or-rich-text-editor-v3/OrRichTextEditor.docs.mdx +0 -7
- package/src/components/or-rich-text-editor-v3/OrRichTextEditor.stories3.ts +0 -102
- package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +0 -624
- package/src/components/or-rich-text-editor-v3/index.ts +0 -1
- package/src/components/or-rich-text-editor-v3/styles.ts +0 -64
- package/src/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.ts +0 -40
- package/src/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.ts +0 -254
- package/src/components/or-rich-text-editor-v3/utils/codemirror/index.ts +0 -1
- package/src/components/or-rich-text-editor-v3/utils/codemirror/theme.ts +0 -213
- package/src/components/or-rich-text-editor-v3/utils/codemirror/types.ts +0 -22
- package/src/components/or-rich-text-editor-v3/utils/markdown.ts +0 -117
- /package/dist/bundled/v2/components/{OrRichTextEditorV3/utils/codemirror → OrCheckboxTreeV3}/types.js +0 -0
- /package/dist/bundled/v3/{OrIcon.vue_vue_type_script_lang-e3152dc5.js → OrIcon.vue_vue_type_script_lang-e5349e49.js} +0 -0
- /package/dist/bundled/v3/{OrToastContainer.vue_vue_type_script_lang-0811fd48.js → OrToastContainer.vue_vue_type_script_lang-70cc38be.js} +0 -0
- /package/dist/bundled/v3/{OrTooltip.vue_vue_type_script_lang-b8594f7e.js → OrTooltip.vue_vue_type_script_lang-76a6b7f4.js} +0 -0
- /package/dist/bundled/v3/components/{OrRichTextEditorV3/utils/codemirror → OrCheckboxTreeV3}/types.js +0 -0
|
@@ -1,687 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, onMounted, onBeforeUnmount, computed, watch } from 'vue-demi';
|
|
2
|
-
import { useFocusTrap } from '@vueuse/integrations/useFocusTrap';
|
|
3
|
-
import { onClickOutside } from '@vueuse/core';
|
|
4
|
-
import { defaultMarkdownSerializer, MarkdownSerializer } from 'prosemirror-markdown';
|
|
5
|
-
import { DOMParser as DOMParser$1 } from 'prosemirror-model';
|
|
6
|
-
import { marked } from 'marked';
|
|
7
|
-
import Paragraph from '@tiptap/extension-paragraph';
|
|
8
|
-
import BulletList from '@tiptap/extension-bullet-list';
|
|
9
|
-
import ListItem from '@tiptap/extension-list-item';
|
|
10
|
-
import OrderedList from '@tiptap/extension-ordered-list';
|
|
11
|
-
import Strike from '@tiptap/extension-strike';
|
|
12
|
-
import Italic from '@tiptap/extension-italic';
|
|
13
|
-
import HardBreak from '@tiptap/extension-hard-break';
|
|
14
|
-
import Bold from '@tiptap/extension-bold';
|
|
15
|
-
import CodeBlock from '@tiptap/extension-code-block';
|
|
16
|
-
import Blockquote from '@tiptap/extension-blockquote';
|
|
17
|
-
import Link from '@tiptap/extension-link';
|
|
18
|
-
import Highlight from '@tiptap/extension-highlight';
|
|
19
|
-
import Underline from '@tiptap/extension-underline';
|
|
20
|
-
import { s as script$1 } from './OrIconButton-786b9346.js';
|
|
21
|
-
import { s as script$2 } from './OrLabel-4da56db0.js';
|
|
22
|
-
import { s as script$4 } from './OrMenu-f8132f3e.js';
|
|
23
|
-
import './OrPopover-d6d82a06.js';
|
|
24
|
-
import { s as script$3 } from './OrMenuItem-dbee450f.js';
|
|
25
|
-
import { s as script$5 } from './OrModal-cb236842.js';
|
|
26
|
-
import { s as script$6 } from './OrInput-a43b53d2.js';
|
|
27
|
-
import { s as script$7 } from './OrButton-8558588c.js';
|
|
28
|
-
import { Node, Editor, mergeAttributes } from '@tiptap/core';
|
|
29
|
-
import StarterKit from '@tiptap/starter-kit';
|
|
30
|
-
import Heading from '@tiptap/extension-heading';
|
|
31
|
-
import Placeholder from '@tiptap/extension-placeholder';
|
|
32
|
-
import { C as CodeMirrorView } from './codemirrorView-be2c7423.js';
|
|
33
|
-
import { minimalSetup } from 'codemirror';
|
|
34
|
-
import { javascript } from '@codemirror/lang-javascript';
|
|
35
|
-
import { resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, withCtx, createTextVNode, toDisplayString, createElementVNode, Fragment, renderList, createBlock, renderSlot, createCommentVNode } from 'vue';
|
|
36
|
-
import { s as styleInject } from './style-inject.es-4c6f2515.js';
|
|
37
|
-
|
|
38
|
-
const serializerNodes = {
|
|
39
|
-
...defaultMarkdownSerializer.nodes,
|
|
40
|
-
[Paragraph.name]: defaultMarkdownSerializer.nodes.paragraph,
|
|
41
|
-
[BulletList.name]: defaultMarkdownSerializer.nodes.bullet_list,
|
|
42
|
-
[ListItem.name]: defaultMarkdownSerializer.nodes.list_item,
|
|
43
|
-
[OrderedList.name]: defaultMarkdownSerializer.nodes.ordered_list,
|
|
44
|
-
[HardBreak.name]: defaultMarkdownSerializer.nodes.hard_break,
|
|
45
|
-
[CodeBlock.name]: defaultMarkdownSerializer.nodes.code_block,
|
|
46
|
-
[Blockquote.name]: defaultMarkdownSerializer.nodes.blockquote
|
|
47
|
-
};
|
|
48
|
-
const serializerMarks = {
|
|
49
|
-
...defaultMarkdownSerializer.marks,
|
|
50
|
-
[Bold.name]: defaultMarkdownSerializer.marks.strong,
|
|
51
|
-
[Strike.name]: {
|
|
52
|
-
open: '~~',
|
|
53
|
-
close: '~~',
|
|
54
|
-
mixable: true,
|
|
55
|
-
expelEnclosingWhitespace: true
|
|
56
|
-
},
|
|
57
|
-
[Italic.name]: {
|
|
58
|
-
open: '_',
|
|
59
|
-
close: '_',
|
|
60
|
-
mixable: true,
|
|
61
|
-
expelEnclosingWhitespace: true
|
|
62
|
-
},
|
|
63
|
-
[Highlight.name]: {
|
|
64
|
-
open: '==',
|
|
65
|
-
close: '==',
|
|
66
|
-
mixable: true,
|
|
67
|
-
expelEnclosingWhitespace: true
|
|
68
|
-
},
|
|
69
|
-
[Underline.name]: {
|
|
70
|
-
open: '',
|
|
71
|
-
close: '',
|
|
72
|
-
mixable: true,
|
|
73
|
-
expelEnclosingWhitespace: true
|
|
74
|
-
},
|
|
75
|
-
[Link.name]: {
|
|
76
|
-
open(state, mark, parent, index) {
|
|
77
|
-
return isPlainURL(mark, parent, index, 1) ? '<' : '[';
|
|
78
|
-
},
|
|
79
|
-
close(state, mark, parent, index) {
|
|
80
|
-
const href = mark.attrs.canonicalSrc || mark.attrs.href;
|
|
81
|
-
return isPlainURL(mark, parent, index, -1) ? '>' : `](${state.esc(href)}${mark.attrs.title ? ` ${state.quote(mark.attrs.title)}` : ''})`;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
const isPlainURL = (link, parent, index, side) => {
|
|
86
|
-
if (link.attrs.title || !/^\w+:/.test(link.attrs.href)) return false;
|
|
87
|
-
const content = parent.child(index + (side < 0 ? -1 : 0));
|
|
88
|
-
if (!content.isText || content.text !== link.attrs.href || content.marks[content.marks.length - 1] !== link) return false;
|
|
89
|
-
if (index === (side < 0 ? 1 : parent.childCount - 1)) return true;
|
|
90
|
-
const next = parent.child(index + (side < 0 ? -2 : 1));
|
|
91
|
-
return !link.isInSet(next.marks);
|
|
92
|
-
};
|
|
93
|
-
const serialize = (schema, content) => {
|
|
94
|
-
const proseMirrorDocument = schema.nodeFromJSON(content);
|
|
95
|
-
const serializer = new MarkdownSerializer(serializerNodes, serializerMarks);
|
|
96
|
-
return serializer.serialize(proseMirrorDocument);
|
|
97
|
-
};
|
|
98
|
-
const deserialize = (schema, content) => {
|
|
99
|
-
if (!content) return null;
|
|
100
|
-
const html = marked.parse(content);
|
|
101
|
-
if (!html) return null;
|
|
102
|
-
const parser = new DOMParser();
|
|
103
|
-
const {
|
|
104
|
-
body
|
|
105
|
-
} = parser.parseFromString(html, 'text/html');
|
|
106
|
-
// append original source as a comment that nodes can access
|
|
107
|
-
body.append(document.createComment(content));
|
|
108
|
-
const state = DOMParser$1.fromSchema(schema).parse(body);
|
|
109
|
-
return state.toJSON();
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
const EditorContainer = [
|
|
113
|
-
// Colors
|
|
114
|
-
'border-outline', 'dark:border-outline-dark', 'focus-within:theme-border-1-primary', 'dark:focus-within:theme-border-1-primary-dark', 'focus-within:bg-primary-opacity-0-08', 'dark:focus-within:bg-primary-opacity-0-08-dark', 'focus-within:theme-outline-primary', 'dark:focus-within:theme-outline-primary-dark',
|
|
115
|
-
// Sizing
|
|
116
|
-
'border-1', 'rounded-md', 'w-full'];
|
|
117
|
-
const ToolbarContainer = [
|
|
118
|
-
// Layout
|
|
119
|
-
'flex',
|
|
120
|
-
//Spacing
|
|
121
|
-
'py-sm',
|
|
122
|
-
//Sizing
|
|
123
|
-
'border-b-1',
|
|
124
|
-
//Colors
|
|
125
|
-
'border-b-outline', 'dark:border-b-outline-dark'];
|
|
126
|
-
const Toolbar = [
|
|
127
|
-
// Layout
|
|
128
|
-
'flex',
|
|
129
|
-
// Spacing
|
|
130
|
-
'px-sm', 'gap-md',
|
|
131
|
-
// Sizing
|
|
132
|
-
'border-r-1',
|
|
133
|
-
//Colors
|
|
134
|
-
'border-r-disabled', 'dark:border-r-outline-dark',
|
|
135
|
-
// Last child
|
|
136
|
-
'last-of-type:border-none'];
|
|
137
|
-
const ToolbarButton = [
|
|
138
|
-
// Typography
|
|
139
|
-
'text-on-disabled', 'dark:text-on-disabled-dark'];
|
|
140
|
-
const ToolbarButtonFocused = [
|
|
141
|
-
// Typography
|
|
142
|
-
'text-outline', 'dark:text-outline-dark'];
|
|
143
|
-
const EditorInput = [
|
|
144
|
-
// Typography
|
|
145
|
-
'typography-body-2-regular', 'text-on-background', 'dark:text-on-background-dark',
|
|
146
|
-
// Sizing
|
|
147
|
-
'min-h-[88px]'];
|
|
148
|
-
|
|
149
|
-
var codemirrorNode = Node.create({
|
|
150
|
-
name: 'codeBlock',
|
|
151
|
-
content: 'text*',
|
|
152
|
-
marks: '',
|
|
153
|
-
group: 'block',
|
|
154
|
-
code: true,
|
|
155
|
-
defining: true,
|
|
156
|
-
isolating: true,
|
|
157
|
-
parseHTML() {
|
|
158
|
-
return [{
|
|
159
|
-
tag: 'pre',
|
|
160
|
-
preserveWhitespace: 'full'
|
|
161
|
-
}];
|
|
162
|
-
},
|
|
163
|
-
renderHTML() {
|
|
164
|
-
return ['pre', ['code', 0]];
|
|
165
|
-
},
|
|
166
|
-
addNodeView() {
|
|
167
|
-
return ({
|
|
168
|
-
node,
|
|
169
|
-
editor,
|
|
170
|
-
getPos
|
|
171
|
-
}) => {
|
|
172
|
-
return new CodeMirrorView({
|
|
173
|
-
node,
|
|
174
|
-
view: editor.view,
|
|
175
|
-
getPos: getPos,
|
|
176
|
-
cmOptions: {
|
|
177
|
-
extensions: [minimalSetup, javascript()]
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
var script = defineComponent({
|
|
185
|
-
name: 'OrRichTextEditor',
|
|
186
|
-
components: {
|
|
187
|
-
OrIconButton: script$1,
|
|
188
|
-
OrLabel: script$2,
|
|
189
|
-
OrMenuItem: script$3,
|
|
190
|
-
OrMenu: script$4,
|
|
191
|
-
OrModal: script$5,
|
|
192
|
-
OrInput: script$6,
|
|
193
|
-
OrButton: script$7
|
|
194
|
-
},
|
|
195
|
-
inheritAttrs: false,
|
|
196
|
-
model: {
|
|
197
|
-
prop: 'modelValue',
|
|
198
|
-
event: 'update:modelValue'
|
|
199
|
-
},
|
|
200
|
-
props: {
|
|
201
|
-
modelValue: {
|
|
202
|
-
type: String,
|
|
203
|
-
default: undefined
|
|
204
|
-
},
|
|
205
|
-
toolbar: {
|
|
206
|
-
type: Array,
|
|
207
|
-
default: () => []
|
|
208
|
-
},
|
|
209
|
-
description: {
|
|
210
|
-
type: String,
|
|
211
|
-
default: ''
|
|
212
|
-
},
|
|
213
|
-
placeholder: {
|
|
214
|
-
type: String,
|
|
215
|
-
default: ''
|
|
216
|
-
},
|
|
217
|
-
autofocus: {
|
|
218
|
-
type: Boolean,
|
|
219
|
-
default: false
|
|
220
|
-
},
|
|
221
|
-
markdownFormat: {
|
|
222
|
-
type: Boolean,
|
|
223
|
-
default: false
|
|
224
|
-
},
|
|
225
|
-
fullHeight: {
|
|
226
|
-
type: Boolean,
|
|
227
|
-
default: false
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
emits: ['update:modelValue', 'input', 'file-upload'],
|
|
231
|
-
expose: ['root'],
|
|
232
|
-
setup(props, context) {
|
|
233
|
-
// Refs
|
|
234
|
-
const root = ref();
|
|
235
|
-
let editor = null;
|
|
236
|
-
const editorRef = ref();
|
|
237
|
-
const containerRef = ref();
|
|
238
|
-
const toolbarButtonRef = ref();
|
|
239
|
-
const menuRef = ref();
|
|
240
|
-
const isActive = ref({});
|
|
241
|
-
const isFocused = ref(props.autofocus);
|
|
242
|
-
const headingLevels = [1, 2, 3, 4];
|
|
243
|
-
const activeHeadingLevel = ref(0);
|
|
244
|
-
const markdownOutput = ref('');
|
|
245
|
-
const isOpenLinkModal = ref(false);
|
|
246
|
-
const text = ref('');
|
|
247
|
-
const link = ref('');
|
|
248
|
-
let trap = useFocusTrap(editorRef, {
|
|
249
|
-
immediate: true,
|
|
250
|
-
fallbackFocus: '.container',
|
|
251
|
-
allowOutsideClick: true
|
|
252
|
-
});
|
|
253
|
-
const iconsEnum = ref({
|
|
254
|
-
bold: 'format_bold',
|
|
255
|
-
italic: 'format_italic',
|
|
256
|
-
underline: 'format_underlined',
|
|
257
|
-
strike: 'format_strikethrough',
|
|
258
|
-
bulletList: 'format_list_bulleted',
|
|
259
|
-
orderedList: 'format_list_numbered',
|
|
260
|
-
link: 'link',
|
|
261
|
-
highlight: 'highlight',
|
|
262
|
-
redo: 'redo',
|
|
263
|
-
undo: 'undo',
|
|
264
|
-
codeBlock: 'code_blocks',
|
|
265
|
-
blockquote: 'format_quote',
|
|
266
|
-
file: 'attach_file'
|
|
267
|
-
});
|
|
268
|
-
const iconTooltipsEnum = ref({
|
|
269
|
-
bold: 'Bold',
|
|
270
|
-
italic: 'Italic',
|
|
271
|
-
underline: 'Underline',
|
|
272
|
-
strike: 'Strike',
|
|
273
|
-
bulletList: 'Bulleted List',
|
|
274
|
-
orderedList: 'Numbered List',
|
|
275
|
-
link: 'Link',
|
|
276
|
-
highlight: 'Highlight',
|
|
277
|
-
redo: 'Redo',
|
|
278
|
-
undo: 'Undo',
|
|
279
|
-
codeBlock: 'Code Block',
|
|
280
|
-
blockquote: 'Quote',
|
|
281
|
-
file: 'File'
|
|
282
|
-
});
|
|
283
|
-
onMounted(() => {
|
|
284
|
-
editor = new Editor({
|
|
285
|
-
onUpdate: ({
|
|
286
|
-
editor
|
|
287
|
-
}) => {
|
|
288
|
-
isFocused.value = true;
|
|
289
|
-
setActiveFormats();
|
|
290
|
-
const html = editor.getHTML();
|
|
291
|
-
const text = editor.getText();
|
|
292
|
-
if (props.markdownFormat) {
|
|
293
|
-
markdownOutput.value = serialize(editor.schema, editor.getJSON());
|
|
294
|
-
proxyModelValue.value = markdownOutput.value;
|
|
295
|
-
} else {
|
|
296
|
-
proxyModelValue.value = text === '' ? text : html;
|
|
297
|
-
}
|
|
298
|
-
},
|
|
299
|
-
onCreate: ({
|
|
300
|
-
editor
|
|
301
|
-
}) => {
|
|
302
|
-
if (props.markdownFormat) {
|
|
303
|
-
const deserialized = deserialize(editor.schema, proxyModelValue.value);
|
|
304
|
-
editor.commands.setContent(deserialized);
|
|
305
|
-
} else {
|
|
306
|
-
editor.commands.setContent(proxyModelValue.value);
|
|
307
|
-
}
|
|
308
|
-
},
|
|
309
|
-
element: editorRef.value,
|
|
310
|
-
autofocus: props.autofocus,
|
|
311
|
-
extensions: [codemirrorNode, StarterKit.configure({
|
|
312
|
-
heading: false,
|
|
313
|
-
codeBlock: false
|
|
314
|
-
}), Heading.configure({
|
|
315
|
-
levels: headingLevels
|
|
316
|
-
}).extend({
|
|
317
|
-
levels: headingLevels,
|
|
318
|
-
renderHTML({
|
|
319
|
-
node,
|
|
320
|
-
HTMLAttributes
|
|
321
|
-
}) {
|
|
322
|
-
return ['h' + node.attrs.level, mergeAttributes(HTMLAttributes, {
|
|
323
|
-
class: `typography-headline-${node.attrs.level}`
|
|
324
|
-
}), 0];
|
|
325
|
-
}
|
|
326
|
-
}), Underline, Link.configure({
|
|
327
|
-
openOnClick: true,
|
|
328
|
-
linkOnPaste: true,
|
|
329
|
-
autolink: false,
|
|
330
|
-
protocols: ['ftp', 'mailto', 'http', 'https'],
|
|
331
|
-
validate: href => /^https?:\/\//.test(href),
|
|
332
|
-
HTMLAttributes: {
|
|
333
|
-
class: 'text-primary cursor-pointer'
|
|
334
|
-
}
|
|
335
|
-
}), Highlight, Placeholder.configure({
|
|
336
|
-
placeholder: props.placeholder,
|
|
337
|
-
emptyEditorClass: 'is-editor-empty text-outline'
|
|
338
|
-
})],
|
|
339
|
-
editorProps: {
|
|
340
|
-
attributes: {
|
|
341
|
-
class: 'focus:outline-none'
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
});
|
|
345
|
-
setActiveFormats();
|
|
346
|
-
trap.activate();
|
|
347
|
-
});
|
|
348
|
-
onBeforeUnmount(() => {
|
|
349
|
-
editor === null || editor === void 0 ? void 0 : editor.destroy();
|
|
350
|
-
});
|
|
351
|
-
onClickOutside(root, () => {
|
|
352
|
-
isFocused.value = false;
|
|
353
|
-
trap.deactivate();
|
|
354
|
-
});
|
|
355
|
-
// Computed
|
|
356
|
-
const proxyModelValue = computed({
|
|
357
|
-
get: () => {
|
|
358
|
-
return props.modelValue;
|
|
359
|
-
},
|
|
360
|
-
set: value => {
|
|
361
|
-
context.emit('input', value);
|
|
362
|
-
context.emit('update:modelValue', value);
|
|
363
|
-
}
|
|
364
|
-
});
|
|
365
|
-
const getIndexOfHeading = computed(() => {
|
|
366
|
-
return props.toolbar.flat().indexOf('heading');
|
|
367
|
-
});
|
|
368
|
-
const headingIcon = computed(() => {
|
|
369
|
-
if (activeHeadingLevel.value && isActive.value.heading) {
|
|
370
|
-
return `format_h${activeHeadingLevel.value}`;
|
|
371
|
-
}
|
|
372
|
-
return 'format_paragraph';
|
|
373
|
-
});
|
|
374
|
-
//Methods
|
|
375
|
-
const handleEditorClick = () => {
|
|
376
|
-
var _a;
|
|
377
|
-
setActiveFormats();
|
|
378
|
-
isFocused.value = true;
|
|
379
|
-
editor === null || editor === void 0 ? void 0 : editor.commands.focus();
|
|
380
|
-
activeHeadingLevel.value = ((_a = editor === null || editor === void 0 ? void 0 : editor.getAttributes('heading')) === null || _a === void 0 ? void 0 : _a.level) || 0;
|
|
381
|
-
};
|
|
382
|
-
const handleToolbarClick = (item, level) => {
|
|
383
|
-
var _a, _b;
|
|
384
|
-
switch (item) {
|
|
385
|
-
case 'bulletList':
|
|
386
|
-
case 'orderedList':
|
|
387
|
-
item === 'bulletList' ? editor === null || editor === void 0 ? void 0 : editor.commands.toggleBulletList() : editor === null || editor === void 0 ? void 0 : editor.commands.toggleOrderedList();
|
|
388
|
-
break;
|
|
389
|
-
case 'link':
|
|
390
|
-
if (editor) {
|
|
391
|
-
const cursorPosition = (editor === null || editor === void 0 ? void 0 : editor.state.selection.$anchor.pos) || 0;
|
|
392
|
-
const {
|
|
393
|
-
from,
|
|
394
|
-
to,
|
|
395
|
-
empty
|
|
396
|
-
} = editor.state.selection;
|
|
397
|
-
const isLink = (_a = editor.view.state.doc.nodeAt(cursorPosition)) === null || _a === void 0 ? void 0 : _a.marks.filter(mark => mark.type.name === 'link');
|
|
398
|
-
const existedText = (isLink === null || isLink === void 0 ? void 0 : isLink.length) ? ((_b = editor.view.state.doc.nodeAt(cursorPosition)) === null || _b === void 0 ? void 0 : _b.text) || '' : '';
|
|
399
|
-
text.value = empty ? existedText : editor.state.doc.textBetween(from, to, ' ');
|
|
400
|
-
link.value = editor.getAttributes('link').href || '';
|
|
401
|
-
}
|
|
402
|
-
isOpenLinkModal.value = !isOpenLinkModal.value;
|
|
403
|
-
break;
|
|
404
|
-
case 'blockquote':
|
|
405
|
-
editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleBlockquote().run();
|
|
406
|
-
break;
|
|
407
|
-
case 'codeBlock':
|
|
408
|
-
if (!isActive.value['codeBlock']) {
|
|
409
|
-
editor === null || editor === void 0 ? void 0 : editor.commands.setNode(item, {
|
|
410
|
-
language: 'javascript'
|
|
411
|
-
});
|
|
412
|
-
} else {
|
|
413
|
-
editor === null || editor === void 0 ? void 0 : editor.commands.setNode('paragraph');
|
|
414
|
-
}
|
|
415
|
-
break;
|
|
416
|
-
case 'heading':
|
|
417
|
-
if (!level) {
|
|
418
|
-
editor === null || editor === void 0 ? void 0 : editor.commands.toggleHeading({
|
|
419
|
-
level: 0
|
|
420
|
-
});
|
|
421
|
-
activeHeadingLevel.value = 0;
|
|
422
|
-
} else {
|
|
423
|
-
activeHeadingLevel.value = level;
|
|
424
|
-
editor === null || editor === void 0 ? void 0 : editor.commands.toggleHeading({
|
|
425
|
-
level: level
|
|
426
|
-
});
|
|
427
|
-
}
|
|
428
|
-
editor === null || editor === void 0 ? void 0 : editor.commands.focus();
|
|
429
|
-
break;
|
|
430
|
-
case 'undo':
|
|
431
|
-
case 'redo':
|
|
432
|
-
item === 'undo' ? editor === null || editor === void 0 ? void 0 : editor.commands.undo() : editor === null || editor === void 0 ? void 0 : editor.commands.redo();
|
|
433
|
-
break;
|
|
434
|
-
case 'file':
|
|
435
|
-
context.emit('file-upload');
|
|
436
|
-
break;
|
|
437
|
-
default:
|
|
438
|
-
editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleMark(item).run();
|
|
439
|
-
break;
|
|
440
|
-
}
|
|
441
|
-
};
|
|
442
|
-
const attachLink = async () => {
|
|
443
|
-
var _a, _b;
|
|
444
|
-
// empty
|
|
445
|
-
if (link.value === '') {
|
|
446
|
-
editor === null || editor === void 0 ? void 0 : editor.chain().focus().extendMarkRange('link').unsetLink().run();
|
|
447
|
-
}
|
|
448
|
-
const isEmptySelection = editor === null || editor === void 0 ? void 0 : editor.state.selection.empty;
|
|
449
|
-
const cursorPosition = (editor === null || editor === void 0 ? void 0 : editor.state.selection.$anchor.pos) || 0;
|
|
450
|
-
const isLink = (_a = editor === null || editor === void 0 ? void 0 : editor.view.state.doc.nodeAt(cursorPosition)) === null || _a === void 0 ? void 0 : _a.marks.filter(mark => mark.type.name === 'link');
|
|
451
|
-
const existedText = (isLink === null || isLink === void 0 ? void 0 : isLink.length) ? (_b = editor === null || editor === void 0 ? void 0 : editor.view.state.doc.nodeAt(cursorPosition)) === null || _b === void 0 ? void 0 : _b.text : '';
|
|
452
|
-
if (link.value && isEmptySelection && !existedText) {
|
|
453
|
-
editor === null || editor === void 0 ? void 0 : editor.chain().focus().setMark('link', {
|
|
454
|
-
href: link.value,
|
|
455
|
-
target: '__blank'
|
|
456
|
-
}).command(({
|
|
457
|
-
tr
|
|
458
|
-
}) => {
|
|
459
|
-
const preparedValue = text.value[text.value.length - 1] === ' ' ? text.value : `${text.value} `;
|
|
460
|
-
tr.insertText(preparedValue);
|
|
461
|
-
return true;
|
|
462
|
-
}).run();
|
|
463
|
-
}
|
|
464
|
-
if (link.value && existedText === text.value && isEmptySelection) {
|
|
465
|
-
editor === null || editor === void 0 ? void 0 : editor.chain().extendMarkRange('link').updateAttributes('link', {
|
|
466
|
-
href: link.value
|
|
467
|
-
}).run();
|
|
468
|
-
}
|
|
469
|
-
if (link.value && !isEmptySelection) {
|
|
470
|
-
editor === null || editor === void 0 ? void 0 : editor.chain().focus().setMark('link', {
|
|
471
|
-
href: link.value,
|
|
472
|
-
target: '__blank'
|
|
473
|
-
}).run();
|
|
474
|
-
}
|
|
475
|
-
text.value = '';
|
|
476
|
-
link.value = '';
|
|
477
|
-
isOpenLinkModal.value = false;
|
|
478
|
-
};
|
|
479
|
-
const discardLink = () => {
|
|
480
|
-
isOpenLinkModal.value = false;
|
|
481
|
-
};
|
|
482
|
-
const setActiveFormats = () => {
|
|
483
|
-
const toolbarList = props.toolbar.flat();
|
|
484
|
-
toolbarList.forEach(item => {
|
|
485
|
-
isActive.value[item] = (editor === null || editor === void 0 ? void 0 : editor.isActive(item)) || false;
|
|
486
|
-
});
|
|
487
|
-
};
|
|
488
|
-
// Styles
|
|
489
|
-
const rootStyles = computed(() => {
|
|
490
|
-
return ['or-rich-text-editor', ...(props.fullHeight ? ['h-full'] : [])];
|
|
491
|
-
});
|
|
492
|
-
const containerStyles = computed(() => {
|
|
493
|
-
return [...EditorContainer, ...(props.fullHeight ? ['h-full'] : [])];
|
|
494
|
-
});
|
|
495
|
-
const toolbarContainerStyles = computed(() => {
|
|
496
|
-
return [...ToolbarContainer];
|
|
497
|
-
});
|
|
498
|
-
const toolbarStyles = computed(() => {
|
|
499
|
-
return [...Toolbar, ...(isFocused.value ? ToolbarButtonFocused : ToolbarButton)];
|
|
500
|
-
});
|
|
501
|
-
const editorInputStyles = computed(() => {
|
|
502
|
-
return ['tiptap-editor', ...(props.fullHeight ? ['h-full overflow-y-auto'] : []), ...EditorInput];
|
|
503
|
-
});
|
|
504
|
-
//Effects
|
|
505
|
-
watch(proxyModelValue, value => {
|
|
506
|
-
if (value !== (editor === null || editor === void 0 ? void 0 : editor.getHTML()) && !props.markdownFormat) {
|
|
507
|
-
editor === null || editor === void 0 ? void 0 : editor.commands.setContent(value);
|
|
508
|
-
}
|
|
509
|
-
if (props.markdownFormat && value !== markdownOutput.value) {
|
|
510
|
-
const deserialized = deserialize(editor === null || editor === void 0 ? void 0 : editor.schema, value);
|
|
511
|
-
editor === null || editor === void 0 ? void 0 : editor.commands.setContent(deserialized);
|
|
512
|
-
}
|
|
513
|
-
});
|
|
514
|
-
return {
|
|
515
|
-
editor,
|
|
516
|
-
editorRef,
|
|
517
|
-
containerRef,
|
|
518
|
-
toolbarButtonRef,
|
|
519
|
-
menuRef,
|
|
520
|
-
iconsEnum,
|
|
521
|
-
handleToolbarClick,
|
|
522
|
-
handleEditorClick,
|
|
523
|
-
isActive,
|
|
524
|
-
iconTooltipsEnum,
|
|
525
|
-
containerStyles,
|
|
526
|
-
toolbarContainerStyles,
|
|
527
|
-
toolbarStyles,
|
|
528
|
-
rootStyles,
|
|
529
|
-
root,
|
|
530
|
-
editorInputStyles,
|
|
531
|
-
getIndexOfHeading,
|
|
532
|
-
headingLevels,
|
|
533
|
-
headingIcon,
|
|
534
|
-
attachLink,
|
|
535
|
-
discardLink,
|
|
536
|
-
isOpenLinkModal,
|
|
537
|
-
text,
|
|
538
|
-
link,
|
|
539
|
-
isFocused
|
|
540
|
-
};
|
|
541
|
-
}
|
|
542
|
-
});
|
|
543
|
-
|
|
544
|
-
const _hoisted_1 = /*#__PURE__*/createElementVNode("p", {
|
|
545
|
-
class: "text-headline-2"
|
|
546
|
-
}, " Add Link ", -1 /* HOISTED */);
|
|
547
|
-
const _hoisted_2 = {
|
|
548
|
-
class: "flex ml-auto gap-md"
|
|
549
|
-
};
|
|
550
|
-
const _hoisted_3 = /*#__PURE__*/createElementVNode("p", null, "Cancel", -1 /* HOISTED */);
|
|
551
|
-
const _hoisted_4 = /*#__PURE__*/createElementVNode("p", null, "Save", -1 /* HOISTED */);
|
|
552
|
-
|
|
553
|
-
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
554
|
-
const _component_or_label = resolveComponent("or-label");
|
|
555
|
-
const _component_or_icon_button = resolveComponent("or-icon-button");
|
|
556
|
-
const _component_or_menu_item = resolveComponent("or-menu-item");
|
|
557
|
-
const _component_or_menu = resolveComponent("or-menu");
|
|
558
|
-
const _component_or_input = resolveComponent("or-input");
|
|
559
|
-
const _component_or_button = resolveComponent("or-button");
|
|
560
|
-
const _component_or_modal = resolveComponent("or-modal");
|
|
561
|
-
return openBlock(), createElementBlock("div", {
|
|
562
|
-
ref: "root",
|
|
563
|
-
class: normalizeClass(_ctx.rootStyles)
|
|
564
|
-
}, [createVNode(_component_or_label, null, {
|
|
565
|
-
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.description), 1 /* TEXT */)]),
|
|
566
|
-
|
|
567
|
-
_: 1 /* STABLE */
|
|
568
|
-
}), createElementVNode("div", {
|
|
569
|
-
ref: "containerRef",
|
|
570
|
-
class: normalizeClass(_ctx.containerStyles),
|
|
571
|
-
onClick: _cache[1] || (_cache[1] = $event => _ctx.handleEditorClick())
|
|
572
|
-
}, [createElementVNode("div", {
|
|
573
|
-
class: normalizeClass(_ctx.toolbarContainerStyles)
|
|
574
|
-
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.toolbar, (tool, index) => {
|
|
575
|
-
return openBlock(), createElementBlock("div", {
|
|
576
|
-
key: index,
|
|
577
|
-
class: normalizeClass(_ctx.toolbarStyles)
|
|
578
|
-
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(tool, item => {
|
|
579
|
-
return openBlock(), createElementBlock("div", {
|
|
580
|
-
key: item,
|
|
581
|
-
class: "flex gap-md"
|
|
582
|
-
}, [item === 'heading' ? (openBlock(), createBlock(_component_or_icon_button, {
|
|
583
|
-
key: 0,
|
|
584
|
-
ref_for: true,
|
|
585
|
-
ref: "toolbarButtonRef",
|
|
586
|
-
selected: _ctx.isActive[item],
|
|
587
|
-
disabled: !_ctx.isFocused,
|
|
588
|
-
tooltip: {
|
|
589
|
-
text: item,
|
|
590
|
-
placement: 'top'
|
|
591
|
-
},
|
|
592
|
-
icon: {
|
|
593
|
-
icon: _ctx.headingIcon,
|
|
594
|
-
variant: 'inherit',
|
|
595
|
-
size: 'm'
|
|
596
|
-
},
|
|
597
|
-
onClick: _cache[0] || (_cache[0] = $event => _ctx.menuRef.open())
|
|
598
|
-
}, null, 8 /* PROPS */, ["selected", "disabled", "tooltip", "icon"])) : (openBlock(), createBlock(_component_or_icon_button, {
|
|
599
|
-
key: 1,
|
|
600
|
-
tooltip: {
|
|
601
|
-
text: _ctx.iconTooltipsEnum[item],
|
|
602
|
-
placement: 'top'
|
|
603
|
-
},
|
|
604
|
-
selected: _ctx.isActive[item],
|
|
605
|
-
disabled: !_ctx.isFocused,
|
|
606
|
-
icon: {
|
|
607
|
-
icon: _ctx.iconsEnum[item],
|
|
608
|
-
variant: 'inherit',
|
|
609
|
-
size: 'm'
|
|
610
|
-
},
|
|
611
|
-
onClick: $event => _ctx.handleToolbarClick(item)
|
|
612
|
-
}, null, 8 /* PROPS */, ["tooltip", "selected", "disabled", "icon", "onClick"]))]);
|
|
613
|
-
}), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */);
|
|
614
|
-
}), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */), createElementVNode("div", {
|
|
615
|
-
class: normalizeClass(['p-sm', {
|
|
616
|
-
'h-[88%]': _ctx.fullHeight
|
|
617
|
-
}])
|
|
618
|
-
}, [createElementVNode("div", {
|
|
619
|
-
ref: "editorRef",
|
|
620
|
-
class: normalizeClass(_ctx.editorInputStyles)
|
|
621
|
-
}, null, 2 /* CLASS */), renderSlot(_ctx.$slots, "files")], 2 /* CLASS */)], 2 /* CLASS */), _ctx.toolbarButtonRef ? (openBlock(), createBlock(_component_or_menu, {
|
|
622
|
-
key: 0,
|
|
623
|
-
ref: "menuRef",
|
|
624
|
-
trigger: _ctx.toolbarButtonRef[_ctx.getIndexOfHeading].root,
|
|
625
|
-
placement: "bottom-start"
|
|
626
|
-
}, {
|
|
627
|
-
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.headingLevels, heading => {
|
|
628
|
-
return openBlock(), createBlock(_component_or_menu_item, {
|
|
629
|
-
key: heading,
|
|
630
|
-
onClick: $event => _ctx.handleToolbarClick('heading', heading)
|
|
631
|
-
}, {
|
|
632
|
-
default: withCtx(() => [createTextVNode(" Heading " + toDisplayString(heading), 1 /* TEXT */)]),
|
|
633
|
-
|
|
634
|
-
_: 2 /* DYNAMIC */
|
|
635
|
-
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"]);
|
|
636
|
-
}), 128 /* KEYED_FRAGMENT */)), createVNode(_component_or_menu_item, {
|
|
637
|
-
onClick: _cache[2] || (_cache[2] = $event => _ctx.handleToolbarClick('heading'))
|
|
638
|
-
}, {
|
|
639
|
-
default: withCtx(() => [createTextVNode(" None ")]),
|
|
640
|
-
_: 1 /* STABLE */
|
|
641
|
-
})]),
|
|
642
|
-
|
|
643
|
-
_: 1 /* STABLE */
|
|
644
|
-
}, 8 /* PROPS */, ["trigger"])) : createCommentVNode("v-if", true), createVNode(_component_or_modal, {
|
|
645
|
-
"is-open": _ctx.isOpenLinkModal,
|
|
646
|
-
size: "s"
|
|
647
|
-
}, {
|
|
648
|
-
header: withCtx(() => [_hoisted_1]),
|
|
649
|
-
footer: withCtx(() => [createElementVNode("div", _hoisted_2, [createVNode(_component_or_button, {
|
|
650
|
-
variant: "outlined",
|
|
651
|
-
onClick: _ctx.discardLink
|
|
652
|
-
}, {
|
|
653
|
-
default: withCtx(() => [_hoisted_3]),
|
|
654
|
-
_: 1 /* STABLE */
|
|
655
|
-
}, 8 /* PROPS */, ["onClick"]), createVNode(_component_or_button, {
|
|
656
|
-
onClick: _ctx.attachLink
|
|
657
|
-
}, {
|
|
658
|
-
default: withCtx(() => [_hoisted_4]),
|
|
659
|
-
_: 1 /* STABLE */
|
|
660
|
-
}, 8 /* PROPS */, ["onClick"])])]),
|
|
661
|
-
default: withCtx(() => [createElementVNode("div", null, [createVNode(_component_or_label, null, {
|
|
662
|
-
default: withCtx(() => [createTextVNode(" Text ")]),
|
|
663
|
-
_: 1 /* STABLE */
|
|
664
|
-
}), createVNode(_component_or_input, {
|
|
665
|
-
modelValue: _ctx.text,
|
|
666
|
-
"onUpdate:modelValue": _cache[3] || (_cache[3] = $event => _ctx.text = $event),
|
|
667
|
-
placeholder: "Placeholder",
|
|
668
|
-
class: "pb-md"
|
|
669
|
-
}, null, 8 /* PROPS */, ["modelValue"]), createVNode(_component_or_label, null, {
|
|
670
|
-
default: withCtx(() => [createTextVNode(" Link ")]),
|
|
671
|
-
_: 1 /* STABLE */
|
|
672
|
-
}), createVNode(_component_or_input, {
|
|
673
|
-
modelValue: _ctx.link,
|
|
674
|
-
"onUpdate:modelValue": _cache[4] || (_cache[4] = $event => _ctx.link = $event),
|
|
675
|
-
placeholder: "Placeholder"
|
|
676
|
-
}, null, 8 /* PROPS */, ["modelValue"])])]),
|
|
677
|
-
_: 1 /* STABLE */
|
|
678
|
-
}, 8 /* PROPS */, ["is-open"])], 2 /* CLASS */);
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
var css_248z = ".tiptap-editor ol {\n margin: 0 24px;\n list-style: decimal;\n}\n.tiptap-editor ul {\n margin: 0 24px;\n list-style: initial;\n}\n.tiptap-editor pre {\n background-color: rgba(186, 209, 236, 0.3);\n padding: 4px 8px;\n margin: 4px 0;\n width: 100%;\n border-radius: 4px;\n}\n.tiptap-editor blockquote {\n margin: 8px 24px;\n padding: 0 24px;\n border-left: 4px solid #bad1ec;\n}\n.tiptap-editor .is-editor-empty::before {\n content: attr(data-placeholder);\n height: 0;\n pointer-events: none;\n float: left;\n}\n.tiptap-editor .cm-editor {\n border: none;\n border-radius: 4px;\n}\n.tiptap-editor .cm-editor .cm-scroller {\n border-radius: 4px;\n}\n.tiptap-editor .cm-editor.cm-focused {\n outline: none;\n}\n.tiptap-editor .cm-editor .cm-gutters {\n background-color: rgba(0, 95, 177, 0.08);\n border: none;\n}\n.tiptap-editor .cm-editor .cm-gutters .cm-gutterElement {\n padding: 0 10px;\n}\n.tiptap-editor .cm-editor .cm-gutters .cm-gutterElement.cm-activeLineGutter {\n background-color: rgba(0, 95, 177, 0.07);\n}";
|
|
682
|
-
styleInject(css_248z);
|
|
683
|
-
|
|
684
|
-
script.render = render;
|
|
685
|
-
script.__file = "src/components/or-rich-text-editor-v3/OrRichTextEditor.vue";
|
|
686
|
-
|
|
687
|
-
export { script as s };
|