@kayak-sj/design 1.0.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/README.md +398 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
- package/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/components/index.d.ts +56 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +91 -0
- package/dist/components/k-button/KButton.d.ts +14 -0
- package/dist/components/k-button/KButton.d.ts.map +1 -0
- package/dist/components/k-button/KButton.js +5 -0
- package/dist/components/k-button/KButton.vue_vue_type_script_setup_true_lang.js +15 -0
- package/dist/components/k-card/KCard.d.ts +18 -0
- package/dist/components/k-card/KCard.d.ts.map +1 -0
- package/dist/components/k-card/KCard.js +5 -0
- package/dist/components/k-card/KCard.vue_vue_type_script_setup_true_lang.js +23 -0
- package/dist/components/k-card/index.d.ts +2 -0
- package/dist/components/k-card/index.d.ts.map +1 -0
- package/dist/components/k-dialog/KDialog.d.ts +66 -0
- package/dist/components/k-dialog/KDialog.d.ts.map +1 -0
- package/dist/components/k-dialog/KDialog.js +5 -0
- package/dist/components/k-dialog/KDialog.vue_vue_type_script_setup_true_lang.js +129 -0
- package/dist/components/k-dialog/KDialogHeader.d.ts +37 -0
- package/dist/components/k-dialog/KDialogHeader.d.ts.map +1 -0
- package/dist/components/k-dialog/KDialogHeader.js +5 -0
- package/dist/components/k-dialog/KDialogHeader.vue_vue_type_script_setup_true_lang.js +42 -0
- package/dist/components/k-dialog/index.d.ts +4 -0
- package/dist/components/k-dialog/index.d.ts.map +1 -0
- package/dist/components/k-dialog/types.d.ts +12 -0
- package/dist/components/k-dialog/types.d.ts.map +1 -0
- package/dist/components/k-echarts/KEcharts.d.ts +75 -0
- package/dist/components/k-echarts/KEcharts.d.ts.map +1 -0
- package/dist/components/k-echarts/KEcharts.js +7 -0
- package/dist/components/k-echarts/KEcharts.vue_vue_type_script_setup_true_lang.js +45 -0
- package/dist/components/k-echarts/KEcharts.vue_vue_type_style_index_0_scoped_d6da558a_lang.css +1 -0
- package/dist/components/k-echarts/composables/useKEcharts.d.ts +27 -0
- package/dist/components/k-echarts/composables/useKEcharts.d.ts.map +1 -0
- package/dist/components/k-echarts/composables/useKEcharts.js +117 -0
- package/dist/components/k-echarts/constants/echartEvents.d.ts +7 -0
- package/dist/components/k-echarts/constants/echartEvents.d.ts.map +1 -0
- package/dist/components/k-echarts/constants/echartEvents.js +4 -0
- package/dist/components/k-echarts/index.d.ts +4 -0
- package/dist/components/k-echarts/index.d.ts.map +1 -0
- package/dist/components/k-echarts/index.js +2 -0
- package/dist/components/k-echarts/map/registerMaps.d.ts +1 -0
- package/dist/components/k-echarts/map/registerMaps.d.ts.map +1 -0
- package/dist/components/k-echarts/themes/customed.d.ts +378 -0
- package/dist/components/k-echarts/themes/customed.d.ts.map +1 -0
- package/dist/components/k-echarts/themes/customed.js +285 -0
- package/dist/components/k-echarts/themes/registerThemes.d.ts +3 -0
- package/dist/components/k-echarts/themes/registerThemes.d.ts.map +1 -0
- package/dist/components/k-echarts/themes/registerThemes.js +7 -0
- package/dist/components/k-echarts/types.d.ts +43 -0
- package/dist/components/k-echarts/types.d.ts.map +1 -0
- package/dist/components/k-echarts/utils/buildChartOptions.d.ts +18 -0
- package/dist/components/k-echarts/utils/buildChartOptions.d.ts.map +1 -0
- package/dist/components/k-echarts/utils/buildChartOptions.js +23 -0
- package/dist/components/k-echarts/utils/createToggleFeature.d.ts +8 -0
- package/dist/components/k-echarts/utils/createToggleFeature.d.ts.map +1 -0
- package/dist/components/k-echarts/utils/createToggleFeature.js +12 -0
- package/dist/components/k-editor/KEditor.d.ts +18 -0
- package/dist/components/k-editor/KEditor.d.ts.map +1 -0
- package/dist/components/k-editor/KEditor.js +7 -0
- package/dist/components/k-editor/KEditor.vue_vue_type_script_setup_true_lang.js +96 -0
- package/dist/components/k-editor/KEditor.vue_vue_type_style_index_0_scoped_b9ef08e0_lang.css +1 -0
- package/dist/components/k-editor/composables/useEditorImageUpload.d.ts +8 -0
- package/dist/components/k-editor/composables/useEditorImageUpload.d.ts.map +1 -0
- package/dist/components/k-editor/composables/useEditorImageUpload.js +60 -0
- package/dist/components/k-editor/composables/useKEditor.d.ts +37 -0
- package/dist/components/k-editor/composables/useKEditor.d.ts.map +1 -0
- package/dist/components/k-editor/composables/useKEditor.js +98 -0
- package/dist/components/k-editor/composables/useKEditorConfig.d.ts +15 -0
- package/dist/components/k-editor/composables/useKEditorConfig.d.ts.map +1 -0
- package/dist/components/k-editor/composables/useKEditorConfig.js +46 -0
- package/dist/components/k-editor/index.d.ts +5 -0
- package/dist/components/k-editor/index.d.ts.map +1 -0
- package/dist/components/k-editor/index.js +3 -0
- package/dist/components/k-editor/types.d.ts +34 -0
- package/dist/components/k-editor/types.d.ts.map +1 -0
- package/dist/components/k-editor/utils/editorValue.d.ts +32 -0
- package/dist/components/k-editor/utils/editorValue.d.ts.map +1 -0
- package/dist/components/k-editor/utils/editorValue.js +37 -0
- package/dist/components/k-editor/utils/registerPreviewMenu.d.ts +13 -0
- package/dist/components/k-editor/utils/registerPreviewMenu.d.ts.map +1 -0
- package/dist/components/k-editor/utils/registerPreviewMenu.js +38 -0
- package/dist/components/k-editor/utils/sanitizePasteHtml.d.ts +6 -0
- package/dist/components/k-editor/utils/sanitizePasteHtml.d.ts.map +1 -0
- package/dist/components/k-editor/utils/sanitizePasteHtml.js +8 -0
- package/dist/components/k-form/KForm.d.ts +110 -0
- package/dist/components/k-form/KForm.d.ts.map +1 -0
- package/dist/components/k-form/KForm.js +5 -0
- package/dist/components/k-form/KForm.vue_vue_type_script_setup_true_lang.js +248 -0
- package/dist/components/k-form/KFormField.d.ts +22 -0
- package/dist/components/k-form/KFormField.d.ts.map +1 -0
- package/dist/components/k-form/KFormField.js +5 -0
- package/dist/components/k-form/KFormField.vue_vue_type_script_setup_true_lang.js +50 -0
- package/dist/components/k-form/composables/useFormSchema.d.ts +33 -0
- package/dist/components/k-form/composables/useFormSchema.d.ts.map +1 -0
- package/dist/components/k-form/composables/useFormSchema.js +36 -0
- package/dist/components/k-form/composables/useKFormFields.d.ts +25 -0
- package/dist/components/k-form/composables/useKFormFields.d.ts.map +1 -0
- package/dist/components/k-form/composables/useKFormFields.js +50 -0
- package/dist/components/k-form/composables/useKFormModel.d.ts +31 -0
- package/dist/components/k-form/composables/useKFormModel.d.ts.map +1 -0
- package/dist/components/k-form/composables/useKFormModel.js +194 -0
- package/dist/components/k-form/composables/useKFormTemplateRef.d.ts +18 -0
- package/dist/components/k-form/composables/useKFormTemplateRef.d.ts.map +1 -0
- package/dist/components/k-form/composables/useKFormTemplateRef.js +7 -0
- package/dist/components/k-form/constants.d.ts +4 -0
- package/dist/components/k-form/constants.d.ts.map +1 -0
- package/dist/components/k-form/constants.js +4 -0
- package/dist/components/k-form/formComponent/Cascader.d.ts +25 -0
- package/dist/components/k-form/formComponent/Cascader.d.ts.map +1 -0
- package/dist/components/k-form/formComponent/Cascader.js +7 -0
- package/dist/components/k-form/formComponent/Cascader.vue_vue_type_script_setup_true_lang.js +45 -0
- package/dist/components/k-form/formComponent/Cascader.vue_vue_type_style_index_0_scoped_ed0da536_lang.css +1 -0
- package/dist/components/k-form/formComponent/CheckBox.d.ts +17 -0
- package/dist/components/k-form/formComponent/CheckBox.d.ts.map +1 -0
- package/dist/components/k-form/formComponent/CheckBox.js +7 -0
- package/dist/components/k-form/formComponent/CheckBox.vue_vue_type_script_setup_true_lang.js +86 -0
- package/dist/components/k-form/formComponent/CheckBox.vue_vue_type_style_index_0_scoped_fca64c11_lang.css +1 -0
- package/dist/components/k-form/formComponent/Complex.d.ts +28 -0
- package/dist/components/k-form/formComponent/Complex.d.ts.map +1 -0
- package/dist/components/k-form/formComponent/DatePicker.d.ts +61 -0
- package/dist/components/k-form/formComponent/DatePicker.d.ts.map +1 -0
- package/dist/components/k-form/formComponent/DatePicker.js +7 -0
- package/dist/components/k-form/formComponent/DatePicker.vue_vue_type_script_setup_true_lang.js +144 -0
- package/dist/components/k-form/formComponent/DatePicker.vue_vue_type_style_index_0_scoped_578e2613_lang.css +1 -0
- package/dist/components/k-form/formComponent/Editor.d.ts +26 -0
- package/dist/components/k-form/formComponent/Editor.d.ts.map +1 -0
- package/dist/components/k-form/formComponent/Editor.js +5 -0
- package/dist/components/k-form/formComponent/Editor.vue_vue_type_script_setup_true_lang.js +46 -0
- package/dist/components/k-form/formComponent/Fallback.d.ts +10 -0
- package/dist/components/k-form/formComponent/Fallback.d.ts.map +1 -0
- package/dist/components/k-form/formComponent/Fallback.js +5 -0
- package/dist/components/k-form/formComponent/Fallback.vue_vue_type_script_setup_true_lang.js +22 -0
- package/dist/components/k-form/formComponent/Input.d.ts +56 -0
- package/dist/components/k-form/formComponent/Input.d.ts.map +1 -0
- package/dist/components/k-form/formComponent/Input.js +5 -0
- package/dist/components/k-form/formComponent/Input.vue_vue_type_script_setup_true_lang.js +93 -0
- package/dist/components/k-form/formComponent/InputMixInput.d.ts +49 -0
- package/dist/components/k-form/formComponent/InputMixInput.d.ts.map +1 -0
- package/dist/components/k-form/formComponent/InputMixInput.js +7 -0
- package/dist/components/k-form/formComponent/InputMixInput.vue_vue_type_script_setup_true_lang.js +108 -0
- package/dist/components/k-form/formComponent/InputMixInput.vue_vue_type_style_index_0_scoped_6fdf6265_lang.css +1 -0
- package/dist/components/k-form/formComponent/InputMixSelect.d.ts +71 -0
- package/dist/components/k-form/formComponent/InputMixSelect.d.ts.map +1 -0
- package/dist/components/k-form/formComponent/InputMixSelect.js +7 -0
- package/dist/components/k-form/formComponent/InputMixSelect.vue_vue_type_script_setup_true_lang.js +185 -0
- package/dist/components/k-form/formComponent/InputMixSelect.vue_vue_type_style_index_0_scoped_1f46ef39_lang.css +1 -0
- package/dist/components/k-form/formComponent/InputNumber.d.ts +29 -0
- package/dist/components/k-form/formComponent/InputNumber.d.ts.map +1 -0
- package/dist/components/k-form/formComponent/InputNumber.js +7 -0
- package/dist/components/k-form/formComponent/InputNumber.vue_vue_type_script_setup_true_lang.js +63 -0
- package/dist/components/k-form/formComponent/InputNumber.vue_vue_type_style_index_0_scoped_acdc4199_lang.css +1 -0
- package/dist/components/k-form/formComponent/Radio.d.ts +17 -0
- package/dist/components/k-form/formComponent/Radio.d.ts.map +1 -0
- package/dist/components/k-form/formComponent/Radio.js +7 -0
- package/dist/components/k-form/formComponent/Radio.vue_vue_type_script_setup_true_lang.js +50 -0
- package/dist/components/k-form/formComponent/Radio.vue_vue_type_style_index_0_scoped_e0ff32b0_lang.css +1 -0
- package/dist/components/k-form/formComponent/RadioInput.d.ts +38 -0
- package/dist/components/k-form/formComponent/RadioInput.d.ts.map +1 -0
- package/dist/components/k-form/formComponent/RadioInput.js +7 -0
- package/dist/components/k-form/formComponent/RadioInput.vue_vue_type_script_setup_true_lang.js +130 -0
- package/dist/components/k-form/formComponent/RadioInput.vue_vue_type_style_index_0_scoped_1543c319_lang.css +1 -0
- package/dist/components/k-form/formComponent/ScrollSelect.d.ts +48 -0
- package/dist/components/k-form/formComponent/ScrollSelect.d.ts.map +1 -0
- package/dist/components/k-form/formComponent/ScrollSelect.js +7 -0
- package/dist/components/k-form/formComponent/ScrollSelect.vue_vue_type_script_setup_true_lang.js +132 -0
- package/dist/components/k-form/formComponent/ScrollSelect.vue_vue_type_style_index_0_scoped_dc0bba37_lang.css +1 -0
- package/dist/components/k-form/formComponent/Select.d.ts +26 -0
- package/dist/components/k-form/formComponent/Select.d.ts.map +1 -0
- package/dist/components/k-form/formComponent/Select.js +7 -0
- package/dist/components/k-form/formComponent/Select.vue_vue_type_script_setup_true_lang.js +81 -0
- package/dist/components/k-form/formComponent/Select.vue_vue_type_style_index_0_scoped_20fc23b7_lang.css +1 -0
- package/dist/components/k-form/formComponent/SelectMultiple.d.ts +21 -0
- package/dist/components/k-form/formComponent/SelectMultiple.d.ts.map +1 -0
- package/dist/components/k-form/formComponent/SelectMultiple.js +7 -0
- package/dist/components/k-form/formComponent/SelectMultiple.vue_vue_type_script_setup_true_lang.js +84 -0
- package/dist/components/k-form/formComponent/SelectMultiple.vue_vue_type_style_index_0_scoped_e6ca06e1_lang.css +1 -0
- package/dist/components/k-form/formComponent/Tag.d.ts +24 -0
- package/dist/components/k-form/formComponent/Tag.d.ts.map +1 -0
- package/dist/components/k-form/formComponent/Tag.js +7 -0
- package/dist/components/k-form/formComponent/Tag.vue_vue_type_script_setup_true_lang.js +86 -0
- package/dist/components/k-form/formComponent/Tag.vue_vue_type_style_index_0_scoped_9961a98a_lang.css +1 -0
- package/dist/components/k-form/formComponent/Text.d.ts +5 -0
- package/dist/components/k-form/formComponent/Text.d.ts.map +1 -0
- package/dist/components/k-form/formComponent/Text.js +7 -0
- package/dist/components/k-form/formComponent/Text.vue_vue_type_script_setup_true_lang.js +19 -0
- package/dist/components/k-form/formComponent/Text.vue_vue_type_style_index_0_scoped_9dc35114_lang.css +1 -0
- package/dist/components/k-form/formComponent/TimePicker.d.ts +51 -0
- package/dist/components/k-form/formComponent/TimePicker.d.ts.map +1 -0
- package/dist/components/k-form/formComponent/TimePicker.js +7 -0
- package/dist/components/k-form/formComponent/TimePicker.vue_vue_type_script_setup_true_lang.js +116 -0
- package/dist/components/k-form/formComponent/TimePicker.vue_vue_type_style_index_0_scoped_8680ec2d_lang.css +1 -0
- package/dist/components/k-form/formComponent/TreeSelect.d.ts +29 -0
- package/dist/components/k-form/formComponent/TreeSelect.d.ts.map +1 -0
- package/dist/components/k-form/formComponent/TreeSelect.js +5 -0
- package/dist/components/k-form/formComponent/TreeSelect.vue_vue_type_script_setup_true_lang.js +57 -0
- package/dist/components/k-form/formComponent/Upload.d.ts +35 -0
- package/dist/components/k-form/formComponent/Upload.d.ts.map +1 -0
- package/dist/components/k-form/formComponent/Upload.js +5 -0
- package/dist/components/k-form/formComponent/Upload.vue_vue_type_script_setup_true_lang.js +64 -0
- package/dist/components/k-form/formComponent/componentRegistry.d.ts +11 -0
- package/dist/components/k-form/formComponent/componentRegistry.d.ts.map +1 -0
- package/dist/components/k-form/formComponent/componentRegistry.js +49 -0
- package/dist/components/k-form/formComponent/index.d.ts +21 -0
- package/dist/components/k-form/formComponent/index.d.ts.map +1 -0
- package/dist/components/k-form/formComponent/types.d.ts +20 -0
- package/dist/components/k-form/formComponent/types.d.ts.map +1 -0
- package/dist/components/k-form/index.d.ts +22 -0
- package/dist/components/k-form/index.d.ts.map +1 -0
- package/dist/components/k-form/types.d.ts +121 -0
- package/dist/components/k-form/types.d.ts.map +1 -0
- package/dist/components/k-form/utils/fieldValue.d.ts +113 -0
- package/dist/components/k-form/utils/fieldValue.d.ts.map +1 -0
- package/dist/components/k-form/utils/fieldValue.js +83 -0
- package/dist/components/k-form/utils/formRules.d.ts +11 -0
- package/dist/components/k-form/utils/formRules.d.ts.map +1 -0
- package/dist/components/k-form/utils/formRules.js +44 -0
- package/dist/components/k-form/utils/resolveFormFieldComponent.d.ts +13 -0
- package/dist/components/k-form/utils/resolveFormFieldComponent.d.ts.map +1 -0
- package/dist/components/k-form/utils/resolveFormFieldComponent.js +13 -0
- package/dist/components/k-handle-page/KHandlePage.d.ts +51 -0
- package/dist/components/k-handle-page/KHandlePage.d.ts.map +1 -0
- package/dist/components/k-handle-page/KHandlePage.js +5 -0
- package/dist/components/k-handle-page/KHandlePage.vue_vue_type_script_setup_true_lang.js +105 -0
- package/dist/components/k-handle-page/index.d.ts +3 -0
- package/dist/components/k-handle-page/index.d.ts.map +1 -0
- package/dist/components/k-handle-page/useHandlePageInit.d.ts +15 -0
- package/dist/components/k-handle-page/useHandlePageInit.d.ts.map +1 -0
- package/dist/components/k-handle-page/useHandlePageInit.js +21 -0
- package/dist/components/k-icon/KIcon.d.ts +13 -0
- package/dist/components/k-icon/KIcon.d.ts.map +1 -0
- package/dist/components/k-icon/KIcon.js +7 -0
- package/dist/components/k-icon/KIcon.vue_vue_type_script_setup_true_lang.js +23 -0
- package/dist/components/k-icon/KIcon.vue_vue_type_style_index_0_scoped_6fd081ab_lang.css +1 -0
- package/dist/components/k-icon/index.d.ts +3 -0
- package/dist/components/k-icon/index.d.ts.map +1 -0
- package/dist/components/k-icon/resolveLucideIcon.d.ts +10 -0
- package/dist/components/k-icon/resolveLucideIcon.d.ts.map +1 -0
- package/dist/components/k-icon/resolveLucideIcon.js +26 -0
- package/dist/components/k-link-button/KLinkButton.d.ts +38 -0
- package/dist/components/k-link-button/KLinkButton.d.ts.map +1 -0
- package/dist/components/k-link-button/KLinkButton.js +5 -0
- package/dist/components/k-link-button/KLinkButton.vue_vue_type_script_setup_true_lang.js +58 -0
- package/dist/components/k-link-button/index.d.ts +3 -0
- package/dist/components/k-link-button/index.d.ts.map +1 -0
- package/dist/components/k-link-button/types.d.ts +15 -0
- package/dist/components/k-link-button/types.d.ts.map +1 -0
- package/dist/components/k-long-page/KLongPage.d.ts +20 -0
- package/dist/components/k-long-page/KLongPage.d.ts.map +1 -0
- package/dist/components/k-long-page/KLongPage.js +7 -0
- package/dist/components/k-long-page/KLongPage.vue_vue_type_script_setup_true_lang.js +72 -0
- package/dist/components/k-long-page/KLongPage.vue_vue_type_style_index_0_scoped_ac934c5d_lang.css +1 -0
- package/dist/components/k-long-page/KLongPagePanel.d.ts +22 -0
- package/dist/components/k-long-page/KLongPagePanel.d.ts.map +1 -0
- package/dist/components/k-long-page/KLongPagePanel.js +7 -0
- package/dist/components/k-long-page/KLongPagePanel.vue_vue_type_script_setup_true_lang.js +18 -0
- package/dist/components/k-long-page/KLongPagePanel.vue_vue_type_style_index_0_scoped_9d6e7832_lang.css +1 -0
- package/dist/components/k-long-page/composables/useLongPageNavDrag.d.ts +10 -0
- package/dist/components/k-long-page/composables/useLongPageNavDrag.d.ts.map +1 -0
- package/dist/components/k-long-page/composables/useLongPageNavDrag.js +32 -0
- package/dist/components/k-long-page/icons/icon-base-2.js +4 -0
- package/dist/components/k-long-page/icons/icon-base.js +4 -0
- package/dist/components/k-long-page/icons/icon-notice-2.js +4 -0
- package/dist/components/k-long-page/icons/icon-notice.js +4 -0
- package/dist/components/k-long-page/icons/icon-price-2.js +4 -0
- package/dist/components/k-long-page/icons/icon-price.js +4 -0
- package/dist/components/k-long-page/icons/icon-restrict-2.js +4 -0
- package/dist/components/k-long-page/icons/icon-restrict.js +4 -0
- package/dist/components/k-long-page/icons/icon-setup-2.js +4 -0
- package/dist/components/k-long-page/icons/icon-setup.js +4 -0
- package/dist/components/k-long-page/index.d.ts +5 -0
- package/dist/components/k-long-page/index.d.ts.map +1 -0
- package/dist/components/k-long-page/navConfigs.d.ts +4 -0
- package/dist/components/k-long-page/navConfigs.d.ts.map +1 -0
- package/dist/components/k-long-page/navConfigs.js +23 -0
- package/dist/components/k-long-page/types.d.ts +7 -0
- package/dist/components/k-long-page/types.d.ts.map +1 -0
- package/dist/components/k-pagination/KPagination.d.ts +20 -0
- package/dist/components/k-pagination/KPagination.d.ts.map +1 -0
- package/dist/components/k-pagination/KPagination.js +5 -0
- package/dist/components/k-pagination/KPagination.vue_vue_type_script_setup_true_lang.js +36 -0
- package/dist/components/k-pagination/index.d.ts +2 -0
- package/dist/components/k-pagination/index.d.ts.map +1 -0
- package/dist/components/k-panel/KPanel.d.ts +32 -0
- package/dist/components/k-panel/KPanel.d.ts.map +1 -0
- package/dist/components/k-panel/KPanel.js +5 -0
- package/dist/components/k-panel/KPanel.vue_vue_type_script_setup_true_lang.js +47 -0
- package/dist/components/k-panel/index.d.ts +2 -0
- package/dist/components/k-panel/index.d.ts.map +1 -0
- package/dist/components/k-panel-query/KPanelQuery.d.ts +30 -0
- package/dist/components/k-panel-query/KPanelQuery.d.ts.map +1 -0
- package/dist/components/k-panel-query/KPanelQuery.js +5 -0
- package/dist/components/k-panel-query/KPanelQuery.vue_vue_type_script_setup_true_lang.js +151 -0
- package/dist/components/k-panel-query/KPanelQueryActions.d.ts +16 -0
- package/dist/components/k-panel-query/KPanelQueryActions.d.ts.map +1 -0
- package/dist/components/k-panel-query/KPanelQueryActions.js +5 -0
- package/dist/components/k-panel-query/KPanelQueryActions.vue_vue_type_script_setup_true_lang.js +45 -0
- package/dist/components/k-panel-query/KPanelQueryForm.d.ts +26 -0
- package/dist/components/k-panel-query/KPanelQueryForm.d.ts.map +1 -0
- package/dist/components/k-panel-query/KPanelQueryForm.js +5 -0
- package/dist/components/k-panel-query/KPanelQueryForm.vue_vue_type_script_setup_true_lang.js +55 -0
- package/dist/components/k-panel-query/KPanelQueryItem.d.ts +26 -0
- package/dist/components/k-panel-query/KPanelQueryItem.d.ts.map +1 -0
- package/dist/components/k-panel-query/KPanelQueryItem.js +5 -0
- package/dist/components/k-panel-query/KPanelQueryItem.vue_vue_type_script_setup_true_lang.js +63 -0
- package/dist/components/k-panel-query/index.d.ts +6 -0
- package/dist/components/k-panel-query/index.d.ts.map +1 -0
- package/dist/components/k-panel-query/types.d.ts +38 -0
- package/dist/components/k-panel-query/types.d.ts.map +1 -0
- package/dist/components/k-table/KTable.d.ts +46 -0
- package/dist/components/k-table/KTable.d.ts.map +1 -0
- package/dist/components/k-table/KTable.js +7 -0
- package/dist/components/k-table/KTable.vue_vue_type_script_setup_true_lang.js +190 -0
- package/dist/components/k-table/KTable.vue_vue_type_style_index_0_scoped_9ecd6487_lang.css +1 -0
- package/dist/components/k-table/KTableColumn.d.ts +39 -0
- package/dist/components/k-table/KTableColumn.d.ts.map +1 -0
- package/dist/components/k-table/KTableColumn.js +7 -0
- package/dist/components/k-table/KTableColumn.vue_vue_type_script_setup_true_lang.js +154 -0
- package/dist/components/k-table/KTableColumn.vue_vue_type_style_index_0_scoped_578909bc_lang.css +1 -0
- package/dist/components/k-table/KTableColumnSelector.d.ts +32 -0
- package/dist/components/k-table/KTableColumnSelector.d.ts.map +1 -0
- package/dist/components/k-table/KTableColumnSelector.js +7 -0
- package/dist/components/k-table/KTableColumnSelector.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/components/k-table/KTableColumnSelector.vue_vue_type_style_index_0_scoped_e0b3cf31_lang.css +1 -0
- package/dist/components/k-table/KTableToolbar.d.ts +32 -0
- package/dist/components/k-table/KTableToolbar.d.ts.map +1 -0
- package/dist/components/k-table/KTableToolbar.js +7 -0
- package/dist/components/k-table/KTableToolbar.vue_vue_type_script_setup_true_lang.js +60 -0
- package/dist/components/k-table/KTableToolbar.vue_vue_type_style_index_0_scoped_bff19ed1_lang.css +1 -0
- package/dist/components/k-table/composables/useColumnDisplay.d.ts +41 -0
- package/dist/components/k-table/composables/useColumnDisplay.d.ts.map +1 -0
- package/dist/components/k-table/composables/useColumnDisplay.js +103 -0
- package/dist/components/k-table/composables/useKTable.d.ts +121 -0
- package/dist/components/k-table/composables/useKTable.d.ts.map +1 -0
- package/dist/components/k-table/composables/useKTable.js +179 -0
- package/dist/components/k-table/composables/useKTableCrossPageSelection.d.ts +32 -0
- package/dist/components/k-table/composables/useKTableCrossPageSelection.d.ts.map +1 -0
- package/dist/components/k-table/composables/useKTableCrossPageSelection.js +58 -0
- package/dist/components/k-table/composables/useKTableTemplateRef.d.ts +10 -0
- package/dist/components/k-table/composables/useKTableTemplateRef.d.ts.map +1 -0
- package/dist/components/k-table/composables/useKTableTemplateRef.js +7 -0
- package/dist/components/k-table/composables/useTableColumns.d.ts +19 -0
- package/dist/components/k-table/composables/useTableColumns.d.ts.map +1 -0
- package/dist/components/k-table/composables/useTableColumns.js +61 -0
- package/dist/components/k-table/composables/useTableData.d.ts +29 -0
- package/dist/components/k-table/composables/useTableData.d.ts.map +1 -0
- package/dist/components/k-table/composables/useTableData.js +47 -0
- package/dist/components/k-table/composables/useTablePagination.d.ts +50 -0
- package/dist/components/k-table/composables/useTablePagination.d.ts.map +1 -0
- package/dist/components/k-table/composables/useTablePagination.js +52 -0
- package/dist/components/k-table/composables/useTableRadio.d.ts +17 -0
- package/dist/components/k-table/composables/useTableRadio.d.ts.map +1 -0
- package/dist/components/k-table/composables/useTableRadio.js +28 -0
- package/dist/components/k-table/composables/useTableRowSort.d.ts +16 -0
- package/dist/components/k-table/composables/useTableRowSort.d.ts.map +1 -0
- package/dist/components/k-table/composables/useTableRowSort.js +35 -0
- package/dist/components/k-table/composables/useTableTreeLoad.d.ts +14 -0
- package/dist/components/k-table/composables/useTableTreeLoad.d.ts.map +1 -0
- package/dist/components/k-table/composables/useTableTreeLoad.js +32 -0
- package/dist/components/k-table/dictOptions.d.ts +9 -0
- package/dist/components/k-table/dictOptions.d.ts.map +1 -0
- package/dist/components/k-table/dictOptions.js +9 -0
- package/dist/components/k-table/index.d.ts +34 -0
- package/dist/components/k-table/index.d.ts.map +1 -0
- package/dist/components/k-table/kTableProps.d.ts +90 -0
- package/dist/components/k-table/kTableProps.d.ts.map +1 -0
- package/dist/components/k-table/kTableProps.js +17 -0
- package/dist/components/k-table/report/convertDownloadCol.d.ts +8 -0
- package/dist/components/k-table/report/convertDownloadCol.d.ts.map +1 -0
- package/dist/components/k-table/report/convertDownloadCol.js +11 -0
- package/dist/components/k-table/report/exportKTableReport.d.ts +25 -0
- package/dist/components/k-table/report/exportKTableReport.d.ts.map +1 -0
- package/dist/components/k-table/report/exportKTableReport.js +19 -0
- package/dist/components/k-table/report/index.d.ts +7 -0
- package/dist/components/k-table/report/index.d.ts.map +1 -0
- package/dist/components/k-table/report/mergeQueryConfig.d.ts +10 -0
- package/dist/components/k-table/report/mergeQueryConfig.d.ts.map +1 -0
- package/dist/components/k-table/report/mergeQueryConfig.js +31 -0
- package/dist/components/k-table/report/pickExportColumns.d.ts +10 -0
- package/dist/components/k-table/report/pickExportColumns.d.ts.map +1 -0
- package/dist/components/k-table/report/pickExportColumns.js +7 -0
- package/dist/components/k-table/report/types.d.ts +8 -0
- package/dist/components/k-table/report/types.d.ts.map +1 -0
- package/dist/components/k-table/report/useExportKTableReport.d.ts +23 -0
- package/dist/components/k-table/report/useExportKTableReport.d.ts.map +1 -0
- package/dist/components/k-table/report/useExportKTableReport.js +29 -0
- package/dist/components/k-table/types.d.ts +173 -0
- package/dist/components/k-table/types.d.ts.map +1 -0
- package/dist/components/k-table/types.js +20 -0
- package/dist/components/k-table/utils/columnIdentity.d.ts +3 -0
- package/dist/components/k-table/utils/columnIdentity.d.ts.map +1 -0
- package/dist/components/k-table/utils/columnIdentity.js +6 -0
- package/dist/components/k-table/utils/formatCellValue.d.ts +8 -0
- package/dist/components/k-table/utils/formatCellValue.d.ts.map +1 -0
- package/dist/components/k-table/utils/formatCellValue.js +30 -0
- package/dist/components/k-table/utils/rowKey.d.ts +9 -0
- package/dist/components/k-table/utils/rowKey.d.ts.map +1 -0
- package/dist/components/k-table/utils/rowKey.js +10 -0
- package/dist/components/k-upload/KUpload.d.ts +72 -0
- package/dist/components/k-upload/KUpload.d.ts.map +1 -0
- package/dist/components/k-upload/KUpload.js +7 -0
- package/dist/components/k-upload/KUpload.vue_vue_type_script_setup_true_lang.js +355 -0
- package/dist/components/k-upload/KUpload.vue_vue_type_style_index_0_scoped_6050c2c6_lang.css +1 -0
- package/dist/components/k-upload/components/ImageCutter.d.ts +21 -0
- package/dist/components/k-upload/components/ImageCutter.d.ts.map +1 -0
- package/dist/components/k-upload/components/ImageCutter.js +7 -0
- package/dist/components/k-upload/components/ImageCutter.vue_vue_type_script_setup_true_lang.js +40 -0
- package/dist/components/k-upload/components/ImageCutter.vue_vue_type_style_index_0_scoped_900b5e3b_lang.css +1 -0
- package/dist/components/k-upload/components/UploadFileItem.d.ts +33 -0
- package/dist/components/k-upload/components/UploadFileItem.d.ts.map +1 -0
- package/dist/components/k-upload/components/UploadFileItem.js +7 -0
- package/dist/components/k-upload/components/UploadFileItem.vue_vue_type_script_setup_true_lang.js +73 -0
- package/dist/components/k-upload/components/UploadFileItem.vue_vue_type_style_index_0_scoped_01959ada_lang.css +1 -0
- package/dist/components/k-upload/components/UploadInlineActions.d.ts +20 -0
- package/dist/components/k-upload/components/UploadInlineActions.d.ts.map +1 -0
- package/dist/components/k-upload/components/UploadInlineActions.js +7 -0
- package/dist/components/k-upload/components/UploadInlineActions.vue_vue_type_script_setup_true_lang.js +39 -0
- package/dist/components/k-upload/components/UploadInlineActions.vue_vue_type_style_index_0_scoped_55d9c320_lang.css +1 -0
- package/dist/components/k-upload/components/UploadMediaDialog.d.ts +17 -0
- package/dist/components/k-upload/components/UploadMediaDialog.d.ts.map +1 -0
- package/dist/components/k-upload/components/UploadMediaDialog.js +7 -0
- package/dist/components/k-upload/components/UploadMediaDialog.vue_vue_type_script_setup_true_lang.js +44 -0
- package/dist/components/k-upload/components/UploadMediaDialog.vue_vue_type_style_index_0_scoped_b9720661_lang.css +1 -0
- package/dist/components/k-upload/components/UploadTipArea.d.ts +15 -0
- package/dist/components/k-upload/components/UploadTipArea.d.ts.map +1 -0
- package/dist/components/k-upload/components/UploadTipArea.js +7 -0
- package/dist/components/k-upload/components/UploadTipArea.vue_vue_type_script_setup_true_lang.js +26 -0
- package/dist/components/k-upload/components/UploadTipArea.vue_vue_type_style_index_0_scoped_f2b7df65_lang.css +1 -0
- package/dist/components/k-upload/composables/useImagePreview.d.ts +13 -0
- package/dist/components/k-upload/composables/useImagePreview.d.ts.map +1 -0
- package/dist/components/k-upload/composables/useImagePreview.js +23 -0
- package/dist/components/k-upload/composables/useMediaPreview.d.ts +13 -0
- package/dist/components/k-upload/composables/useMediaPreview.d.ts.map +1 -0
- package/dist/components/k-upload/composables/useMediaPreview.js +20 -0
- package/dist/components/k-upload/composables/useUploadFileList.d.ts +28 -0
- package/dist/components/k-upload/composables/useUploadFileList.d.ts.map +1 -0
- package/dist/components/k-upload/composables/useUploadFileList.js +46 -0
- package/dist/components/k-upload/composables/useUploadRequest.d.ts +15 -0
- package/dist/components/k-upload/composables/useUploadRequest.d.ts.map +1 -0
- package/dist/components/k-upload/composables/useUploadRequest.js +43 -0
- package/dist/components/k-upload/composables/useUploadValidation.d.ts +19 -0
- package/dist/components/k-upload/composables/useUploadValidation.d.ts.map +1 -0
- package/dist/components/k-upload/composables/useUploadValidation.js +22 -0
- package/dist/components/k-upload/resolveUploadAction.d.ts +5 -0
- package/dist/components/k-upload/resolveUploadAction.d.ts.map +1 -0
- package/dist/components/k-upload/resolveUploadAction.js +13 -0
- package/dist/components/k-upload/types.d.ts +45 -0
- package/dist/components/k-upload/types.d.ts.map +1 -0
- package/dist/components/k-upload/utils/uploadFileValue.d.ts +50 -0
- package/dist/components/k-upload/utils/uploadFileValue.d.ts.map +1 -0
- package/dist/components/k-upload/utils/uploadFileValue.js +44 -0
- package/dist/config/uploadConfig.d.ts +46 -0
- package/dist/config/uploadConfig.d.ts.map +1 -0
- package/dist/config/uploadConfig.js +29 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +46 -0
- package/dist/theme/index.d.ts +21 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +22 -0
- package/dist/utils/createStubComponent.d.ts +8 -0
- package/dist/utils/createStubComponent.d.ts.map +1 -0
- package/dist/utils/createStubComponent.js +43 -0
- package/dist/utils/validators.d.ts +132 -0
- package/dist/utils/validators.d.ts.map +1 -0
- package/dist/utils/validators.js +152 -0
- package/package.json +88 -0
- package/src/styles/base/_utilities.scss +68 -0
- package/src/styles/components/_index.scss +10 -0
- package/src/styles/components/_k-dialog.scss +441 -0
- package/src/styles/components/_k-echarts.scss +3 -0
- package/src/styles/components/_k-editor.scss +6 -0
- package/src/styles/components/_k-form.scss +510 -0
- package/src/styles/components/_k-handle-page.scss +108 -0
- package/src/styles/components/_k-link-button.scss +70 -0
- package/src/styles/components/_k-panel-query.scss +178 -0
- package/src/styles/components/_k-panel.scss +85 -0
- package/src/styles/components/_k-table.scss +85 -0
- package/src/styles/components/_k-upload.scss +268 -0
- package/src/styles/element-plus/_overrides.scss +451 -0
- package/src/styles/element-plus/_theme.scss +127 -0
- package/src/styles/index.scss +16 -0
- package/src/styles/tokens/_colors.scss +39 -0
- package/src/styles/tokens/_css-vars.scss +232 -0
- package/src/styles/tokens/_index.scss +5 -0
- package/src/styles/tokens/_layout.scss +9 -0
- package/src/styles/tokens/_semantic.scss +61 -0
- package/src/styles/tokens/_typography.scss +6 -0
- package/src/types/design-subpaths.d.ts +7 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { DatasetComponentOption, ECharts, EChartsOption, SetOptionOpts } from 'echarts';
|
|
2
|
+
import { EchartEventName } from './constants/echartEvents';
|
|
3
|
+
export interface KEchartsOptionsFactoryContext {
|
|
4
|
+
echarts: typeof import('echarts');
|
|
5
|
+
/** 当前是否处于全屏 toolbox 态 */
|
|
6
|
+
isFullscreen: boolean;
|
|
7
|
+
/** 获取当前 ECharts 实例(对齐 legacy 函数式 options 第二参 this.chart) */
|
|
8
|
+
getChart: () => ECharts | undefined;
|
|
9
|
+
}
|
|
10
|
+
export type KEchartsOptionsInput = EChartsOption | ((ctx: KEchartsOptionsFactoryContext) => EChartsOption | undefined);
|
|
11
|
+
/** props.options 允许在 option 根上挂 opts 字段 */
|
|
12
|
+
export type KEchartsPropsOptions = (EChartsOption & {
|
|
13
|
+
opts?: SetOptionOpts;
|
|
14
|
+
}) | KEchartsOptionsInput | undefined;
|
|
15
|
+
export type KEchartsRenderer = 'canvas' | 'svg';
|
|
16
|
+
export interface KEchartsProps {
|
|
17
|
+
/** ECharts 配置项,或 (echarts, ctx) => option 工厂函数 */
|
|
18
|
+
options?: KEchartsPropsOptions;
|
|
19
|
+
/** 单独传入的 dataset,会合并进 setOption */
|
|
20
|
+
dataset?: DatasetComponentOption | DatasetComponentOption[];
|
|
21
|
+
/** 主题名或自定义主题对象,传入 truthy 时会注册内置 customed 主题 */
|
|
22
|
+
theme?: string | object;
|
|
23
|
+
width?: string;
|
|
24
|
+
height?: string;
|
|
25
|
+
loading?: boolean;
|
|
26
|
+
/** 是否在 toolbox 注入全屏/退出全屏 */
|
|
27
|
+
toggle?: boolean;
|
|
28
|
+
renderer?: KEchartsRenderer;
|
|
29
|
+
}
|
|
30
|
+
/** ECharts 事件 + 初始化完成(legacy on-init-complete) */
|
|
31
|
+
export type KEchartsEmit = {
|
|
32
|
+
(event: 'onInitComplete', chart: ECharts): void;
|
|
33
|
+
(event: EchartEventName, params?: unknown): void;
|
|
34
|
+
};
|
|
35
|
+
export interface KEchartsExpose {
|
|
36
|
+
/** 当前 ECharts 实例 */
|
|
37
|
+
getChart: () => ECharts | undefined;
|
|
38
|
+
/** 手动 setOption */
|
|
39
|
+
setOption: (options?: KEchartsPropsOptions) => void;
|
|
40
|
+
/** 手动 resize */
|
|
41
|
+
resize: () => void;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/k-echarts/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAE/D,MAAM,WAAW,6BAA6B;IAC5C,OAAO,EAAE,cAAc,SAAS,CAAC,CAAA;IACjC,yBAAyB;IACzB,YAAY,EAAE,OAAO,CAAA;IACrB,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,OAAO,GAAG,SAAS,CAAA;CACpC;AAED,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAAG,CAAC,CAAC,GAAG,EAAE,6BAA6B,KAAK,aAAa,GAAG,SAAS,CAAC,CAAA;AAEtH,2CAA2C;AAC3C,MAAM,MAAM,oBAAoB,GAAG,CAAC,aAAa,GAAG;IAAE,IAAI,CAAC,EAAE,aAAa,CAAA;CAAE,CAAC,GAAG,oBAAoB,GAAG,SAAS,CAAA;AAEhH,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,KAAK,CAAA;AAE/C,MAAM,WAAW,aAAa;IAC5B,kDAAkD;IAClD,OAAO,CAAC,EAAE,oBAAoB,CAAA;IAC9B,mCAAmC;IACnC,OAAO,CAAC,EAAE,sBAAsB,GAAG,sBAAsB,EAAE,CAAA;IAC3D,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAGvB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,4BAA4B;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,gBAAgB,CAAA;CAC5B;AAED,kDAAkD;AAClD,MAAM,MAAM,YAAY,GAAG;IACzB,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAA;IAC/C,CAAC,KAAK,EAAE,eAAe,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;CACjD,CAAA;AAED,MAAM,WAAW,cAAc;IAC7B,oBAAoB;IACpB,QAAQ,EAAE,MAAM,OAAO,GAAG,SAAS,CAAA;IACnC,mBAAmB;IACnB,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE,oBAAoB,KAAK,IAAI,CAAA;IACnD,gBAAgB;IAChB,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DatasetComponentOption, EChartsOption, SetOptionOpts } from 'echarts';
|
|
2
|
+
import { KEchartsOptionsFactoryContext, KEchartsPropsOptions } from '../types';
|
|
3
|
+
export interface BuiltChartOptions {
|
|
4
|
+
option: EChartsOption;
|
|
5
|
+
setOptionOpts: SetOptionOpts;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* 合并 options / dataset / toolbox 全屏按钮,并剥离 opts 字段。
|
|
9
|
+
* 对齐 legacy setOption:函数式 options、dataset 并入、toggle 注入 myToggle。
|
|
10
|
+
*/
|
|
11
|
+
export declare function buildChartOptions(options: KEchartsPropsOptions, context: {
|
|
12
|
+
factoryContext: KEchartsOptionsFactoryContext;
|
|
13
|
+
dataset?: DatasetComponentOption | DatasetComponentOption[];
|
|
14
|
+
toggle: boolean;
|
|
15
|
+
isFullscreen: boolean;
|
|
16
|
+
onToggleFullscreen: () => void;
|
|
17
|
+
}): BuiltChartOptions;
|
|
18
|
+
//# sourceMappingURL=buildChartOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildChartOptions.d.ts","sourceRoot":"","sources":["../../../../src/components/k-echarts/utils/buildChartOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAEnF,OAAO,KAAK,EAAE,6BAA6B,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AASnF,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,aAAa,CAAA;IACrB,aAAa,EAAE,aAAa,CAAA;CAC7B;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE;IACP,cAAc,EAAE,6BAA6B,CAAA;IAC7C,OAAO,CAAC,EAAE,sBAAsB,GAAG,sBAAsB,EAAE,CAAA;IAC3D,MAAM,EAAE,OAAO,CAAA;IACf,YAAY,EAAE,OAAO,CAAA;IACrB,kBAAkB,EAAE,MAAM,IAAI,CAAA;CAC/B,GACA,iBAAiB,CA0BnB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createToggleFeature as e } from "./createToggleFeature.js";
|
|
2
|
+
//#region src/components/k-echarts/utils/buildChartOptions.ts
|
|
3
|
+
function t(e) {
|
|
4
|
+
return typeof e == "function";
|
|
5
|
+
}
|
|
6
|
+
function n(n, r) {
|
|
7
|
+
let i = t(n) ? { ...n(r.factoryContext) ?? {} } : { ...n ?? {} };
|
|
8
|
+
if (r.dataset && (i.dataset = r.dataset), r.toggle) {
|
|
9
|
+
i.toolbox ??= {};
|
|
10
|
+
let t = i.toolbox;
|
|
11
|
+
t.feature ??= {}, t.feature.myToggle = e(r.isFullscreen, r.onToggleFullscreen);
|
|
12
|
+
}
|
|
13
|
+
let a = {
|
|
14
|
+
lazyUpdate: !0,
|
|
15
|
+
...i.opts ?? {}
|
|
16
|
+
};
|
|
17
|
+
return delete i.opts, {
|
|
18
|
+
option: i,
|
|
19
|
+
setOptionOpts: a
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { n as buildChartOptions };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface ToolboxToggleFeature {
|
|
2
|
+
show: boolean;
|
|
3
|
+
title: string;
|
|
4
|
+
icon: string;
|
|
5
|
+
onclick: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function createToggleFeature(isFullscreen: boolean, clickHandler: () => void): ToolboxToggleFeature;
|
|
8
|
+
//# sourceMappingURL=createToggleFeature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createToggleFeature.d.ts","sourceRoot":"","sources":["../../../../src/components/k-echarts/utils/createToggleFeature.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,GAAG,oBAAoB,CASzG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
function e(e, t) {
|
|
2
|
+
return {
|
|
3
|
+
show: !0,
|
|
4
|
+
title: e ? "取消全屏" : "全屏",
|
|
5
|
+
icon: e ? "path://M582.6 441.4v-320h50V356l274-274 35.4 35.4-274 274h234.6v50h-320zM117.4 942l274-274v234.6h50v-320h-320v50H356l-274 274 35.4 35.4zM132 132h302V82H82v352h50V132z m760 760H590v50h352V590h-50v302z" : "path://M909 959H780a30 30 0 0 1 0-60h99a20 20 0 0 0 20-20v-99a30 30 0 0 1 60 0v129a50 50 0 0 1-50 50z m20-685a30 30 0 0 1-30-30v-99a20 20 0 0 0-20-20h-99a30 30 0 0 1 0-60h129a50 50 0 0 1 50 50v129a30 30 0 0 1-30 30z m-157 28v420a50 50 0 0 1-50 50H302a50 50 0 0 1-50-50V302a50 50 0 0 1 50-50h420a50 50 0 0 1 50 50z m-60 30a20 20 0 0 0-20-20H332a20 20 0 0 0-20 20v360a20 20 0 0 0 20 20h360a20 20 0 0 0 20-20V332zM244 125h-99a20 20 0 0 0-20 20v99a30 30 0 0 1-60 0V115a50 50 0 0 1 50-50h129a30 30 0 0 1 0 60zM95 750a30 30 0 0 1 30 30v99a20 20 0 0 0 20 20h99a30 30 0 0 1 0 60H115a50 50 0 0 1-50-50V780a30 30 0 0 1 30-30z",
|
|
6
|
+
onclick: () => {
|
|
7
|
+
t();
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { e as createToggleFeature };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { KEditorProps, KEditorValue } from './types';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<KEditorProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
|
+
"update:modelValue": (value: KEditorValue) => any;
|
|
4
|
+
click: () => any;
|
|
5
|
+
}, string, import('vue').PublicProps, Readonly<KEditorProps> & Readonly<{
|
|
6
|
+
"onUpdate:modelValue"?: ((value: KEditorValue) => any) | undefined;
|
|
7
|
+
onClick?: (() => any) | undefined;
|
|
8
|
+
}>, {
|
|
9
|
+
placeholder: string;
|
|
10
|
+
modelValue: string | KEditorValue | null;
|
|
11
|
+
items: string[];
|
|
12
|
+
maxWordCount: number | string;
|
|
13
|
+
config: import('./types').KEditorConfig;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
//# sourceMappingURL=KEditor.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KEditor.vue.d.ts","sourceRoot":"","sources":["../../../src/components/k-editor/KEditor.vue"],"names":[],"mappings":"AA+MA;;;;;;;;;;;GAWG;AACH,OAAO,uCAAuC,CAAA;AAK9C,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAmPzD,QAAA,MAAM,YAAY;;;;;;;;;;;;;6EAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./KEditor.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
import './KEditor.vue_vue_type_style_index_0_scoped_b9ef08e0_lang.css';/* empty css */
|
|
4
|
+
//#region src/components/k-editor/KEditor.vue
|
|
5
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-b9ef08e0"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { ensurePreviewMenuRegistered as e } from "./utils/registerPreviewMenu.js";
|
|
2
|
+
import { useKEditor as t } from "./composables/useKEditor.js";
|
|
3
|
+
import { Fragment as n, computed as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, isRef as u, normalizeStyle as d, openBlock as f, toDisplayString as p, unref as m, withCtx as h } from "vue";
|
|
4
|
+
import { ElDialog as g } from "element-plus";
|
|
5
|
+
import "@wangeditor/editor/dist/css/style.css";
|
|
6
|
+
import { Editor as _, Toolbar as v } from "@wangeditor/editor-for-vue";
|
|
7
|
+
//#region src/components/k-editor/KEditor.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var y = { class: "k-editor__shell" }, b = { class: "k-editor__tips" }, x = ["innerHTML"], S = ["innerHTML"], C = /*@__PURE__*/ l({
|
|
9
|
+
name: "KEditor",
|
|
10
|
+
inheritAttrs: !1,
|
|
11
|
+
__name: "KEditor",
|
|
12
|
+
props: {
|
|
13
|
+
modelValue: { default: "" },
|
|
14
|
+
items: { default: () => [] },
|
|
15
|
+
maxWordCount: { default: 100 },
|
|
16
|
+
maxLength: {},
|
|
17
|
+
config: { default: () => ({}) },
|
|
18
|
+
disabled: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
21
|
+
},
|
|
22
|
+
placeholder: { default: "请输入" }
|
|
23
|
+
},
|
|
24
|
+
emits: ["update:modelValue", "click"],
|
|
25
|
+
setup(l, { emit: C }) {
|
|
26
|
+
let w = l, T = C;
|
|
27
|
+
e();
|
|
28
|
+
let { editorRef: E, toolbarConfig: D, editorConfig: O, mode: k, previewVisible: A, previewHtml: j, wordCount: M, isReadonly: N, displayHtml: P, maxWords: F, handleCreated: I, handleChange: L, handleCustomPaste: R } = t({
|
|
29
|
+
props: w,
|
|
30
|
+
emit: T
|
|
31
|
+
}), z = r(() => {
|
|
32
|
+
let e = w.config?.height;
|
|
33
|
+
return typeof e == "number" && e > 0 ? e : 160;
|
|
34
|
+
}), B = r(() => {
|
|
35
|
+
let e = `${z.value}px`;
|
|
36
|
+
return {
|
|
37
|
+
height: e,
|
|
38
|
+
maxHeight: e,
|
|
39
|
+
minHeight: e
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
function V() {
|
|
43
|
+
let e = E.value;
|
|
44
|
+
!e || e.isDisabled() || e.isFocused() || e.focus();
|
|
45
|
+
}
|
|
46
|
+
return (e, t) => (f(), a("div", {
|
|
47
|
+
class: "k-editor",
|
|
48
|
+
onClick: t[1] ||= (e) => T("click")
|
|
49
|
+
}, [m(N) ? (f(), a("div", {
|
|
50
|
+
key: 1,
|
|
51
|
+
class: "k-editor__readonly",
|
|
52
|
+
style: d({ minHeight: `${z.value}px` }),
|
|
53
|
+
innerHTML: m(P)
|
|
54
|
+
}, null, 12, x)) : (f(), a(n, { key: 0 }, [o("div", y, [c(m(v), {
|
|
55
|
+
class: "k-editor__toolbar",
|
|
56
|
+
editor: m(E),
|
|
57
|
+
"default-config": m(D),
|
|
58
|
+
mode: m(k)
|
|
59
|
+
}, null, 8, [
|
|
60
|
+
"editor",
|
|
61
|
+
"default-config",
|
|
62
|
+
"mode"
|
|
63
|
+
]), c(m(_), {
|
|
64
|
+
class: "k-editor__content",
|
|
65
|
+
style: d(B.value),
|
|
66
|
+
"default-config": m(O),
|
|
67
|
+
mode: m(k),
|
|
68
|
+
onClick: V,
|
|
69
|
+
onOnCreated: m(I),
|
|
70
|
+
onOnChange: m(L),
|
|
71
|
+
onCustomPaste: m(R)
|
|
72
|
+
}, null, 8, [
|
|
73
|
+
"style",
|
|
74
|
+
"default-config",
|
|
75
|
+
"mode",
|
|
76
|
+
"onOnCreated",
|
|
77
|
+
"onOnChange",
|
|
78
|
+
"onCustomPaste"
|
|
79
|
+
])]), o("p", b, [t[2] ||= s(" 字数统计: ", -1), o("span", null, [s(p(m(M)) + " ", 1), m(F) ? (f(), a(n, { key: 0 }, [s("/" + p(m(F)), 1)], 64)) : i("", !0)])])], 64)), c(m(g), {
|
|
80
|
+
modelValue: m(A),
|
|
81
|
+
"onUpdate:modelValue": t[0] ||= (e) => u(A) ? A.value = e : null,
|
|
82
|
+
title: "内容预览",
|
|
83
|
+
width: "720px",
|
|
84
|
+
"append-to-body": "",
|
|
85
|
+
"destroy-on-close": ""
|
|
86
|
+
}, {
|
|
87
|
+
default: h(() => [o("div", {
|
|
88
|
+
class: "k-editor__preview",
|
|
89
|
+
innerHTML: m(j)
|
|
90
|
+
}, null, 8, S)]),
|
|
91
|
+
_: 1
|
|
92
|
+
}, 8, ["modelValue"])]));
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
//#endregion
|
|
96
|
+
export { C as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.k-editor[data-v-b9ef08e0]{width:80%}.k-editor__shell[data-v-b9ef08e0]{border:1px solid var(--el-border-color);background:#fff}.k-editor__shell.w-e-full-screen-container[data-v-b9ef08e0]{z-index:4000;background:#fff}.k-editor__shell.w-e-full-screen-container .k-editor__toolbar[data-v-b9ef08e0]{flex:none}.k-editor__shell.w-e-full-screen-container .k-editor__content[data-v-b9ef08e0]{flex:auto!important;height:auto!important;min-height:0!important;max-height:none!important}.k-editor__toolbar[data-v-b9ef08e0]{border-bottom:1px solid var(--el-border-color)}.k-editor__content[data-v-b9ef08e0]{box-sizing:border-box;word-break:break-all;cursor:text;background:#fff;overflow:hidden}.k-editor__tips[data-v-b9ef08e0]{text-align:right;margin:8px 0 0}.k-editor__tips span[data-v-b9ef08e0]{color:var(--el-color-danger);margin-left:5px}.k-editor__readonly[data-v-b9ef08e0]{color:var(--el-text-color-regular);background:var(--el-fill-color-light);border:1px solid var(--el-border-color);word-break:break-all;border-radius:4px;padding:8px 12px}.k-editor__preview[data-v-b9ef08e0]{word-break:break-all;max-height:60vh;overflow:auto}.k-editor[data-v-b9ef08e0] .w-e-text-container{box-sizing:border-box;position:relative;overflow:hidden;height:100%!important}.k-editor[data-v-b9ef08e0] .w-e-scroll{box-sizing:border-box;-webkit-overflow-scrolling:touch;height:100%!important;max-height:100%!important;overflow-y:auto!important}.k-editor[data-v-b9ef08e0] [data-slate-editor]{min-height:100%!important}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type EditorImageInsertFn = (url: string, alt: string, href: string) => void;
|
|
2
|
+
/**
|
|
3
|
+
* 供 MENU_CONF.uploadImage.customUpload 使用。
|
|
4
|
+
* 成功后将 SHOW_IMG_URL + resource_id 插入编辑器。
|
|
5
|
+
*/
|
|
6
|
+
export declare function createEditorImageUpload(): (file: File, insertFn: EditorImageInsertFn) => Promise<void>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=useEditorImageUpload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEditorImageUpload.d.ts","sourceRoot":"","sources":["../../../../src/components/k-editor/composables/useEditorImageUpload.ts"],"names":[],"mappings":"AAKA,KAAK,mBAAmB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;AA6D3E;;;GAGG;AACH,wBAAgB,uBAAuB,KACvB,MAAM,IAAI,EAAE,UAAU,mBAAmB,mBAYxD"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { getUploadConfig as e } from "../../../config/uploadConfig.js";
|
|
2
|
+
import { ElMessage as t } from "element-plus";
|
|
3
|
+
//#region src/components/k-editor/composables/useEditorImageUpload.ts
|
|
4
|
+
function n(t) {
|
|
5
|
+
let n = e(), r = t.resource_id ?? t.resourceId;
|
|
6
|
+
if (r != null && r !== "") return `${n.urls.SHOW_IMG_URL}${r}`;
|
|
7
|
+
let i = t.url;
|
|
8
|
+
return typeof i == "string" && i ? i : null;
|
|
9
|
+
}
|
|
10
|
+
async function r(t) {
|
|
11
|
+
let n = e();
|
|
12
|
+
if (!n.uploadRequest) throw Error("[KEditor] uploadRequest 未配置");
|
|
13
|
+
let r = await n.uploadRequest({
|
|
14
|
+
file: t,
|
|
15
|
+
action: n.urls.UPLOAD_IMG_URL,
|
|
16
|
+
data: {},
|
|
17
|
+
onProgress: () => {}
|
|
18
|
+
});
|
|
19
|
+
if (String(r[n.responseCode] ?? "") !== n.responseSuccessCode) throw Error(String(r[n.responseMsg] ?? "图片上传失败"));
|
|
20
|
+
return r;
|
|
21
|
+
}
|
|
22
|
+
async function i(t) {
|
|
23
|
+
let n = e();
|
|
24
|
+
return new Promise((e, r) => {
|
|
25
|
+
let i = new FormData();
|
|
26
|
+
i.append("file", t);
|
|
27
|
+
let a = new XMLHttpRequest();
|
|
28
|
+
a.open("POST", n.urls.UPLOAD_IMG_URL), a.onreadystatechange = () => {
|
|
29
|
+
if (a.readyState === 4) {
|
|
30
|
+
if (a.status !== 200) {
|
|
31
|
+
r(/* @__PURE__ */ Error("图片上传失败"));
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
try {
|
|
35
|
+
let t = JSON.parse(a.responseText);
|
|
36
|
+
if (String(t[n.responseCode] ?? "") !== n.responseSuccessCode) {
|
|
37
|
+
r(Error(String(t[n.responseMsg] ?? "图片上传失败")));
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
e(t);
|
|
41
|
+
} catch {
|
|
42
|
+
r(/* @__PURE__ */ Error("图片上传失败"));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}, a.send(i);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function a() {
|
|
49
|
+
return async (a, o) => {
|
|
50
|
+
try {
|
|
51
|
+
let t = e().uploadRequest ? await r(a) : await i(a), s = n(t);
|
|
52
|
+
if (!s) throw Error("图片上传失败");
|
|
53
|
+
o(s, String(t.file_name ?? t.fileName ?? a.name), s);
|
|
54
|
+
} catch (e) {
|
|
55
|
+
t.error(e instanceof Error ? e.message : "图片上传失败");
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
export { a as createEditorImageUpload };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { IDomEditor } from '@wangeditor/editor';
|
|
2
|
+
import { ComputedRef, ShallowRef } from 'vue';
|
|
3
|
+
import { KEditorProps, KEditorValue } from '../types';
|
|
4
|
+
import { useKEditorConfig } from './useKEditorConfig';
|
|
5
|
+
export interface UseKEditorOptions {
|
|
6
|
+
props: KEditorProps;
|
|
7
|
+
emit: {
|
|
8
|
+
(event: 'update:modelValue', value: KEditorValue): void;
|
|
9
|
+
(event: 'click'): void;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export interface UseKEditorReturn {
|
|
13
|
+
/** wangEditor 实例(shallowRef,避免深度代理 Slate 内部状态) */
|
|
14
|
+
editorRef: ShallowRef<IDomEditor | undefined>;
|
|
15
|
+
toolbarConfig: ReturnType<typeof useKEditorConfig>['toolbarConfig'];
|
|
16
|
+
editorConfig: ReturnType<typeof useKEditorConfig>['editorConfig'];
|
|
17
|
+
mode: 'default';
|
|
18
|
+
previewVisible: ShallowRef<boolean>;
|
|
19
|
+
previewHtml: ShallowRef<string>;
|
|
20
|
+
wordCount: ShallowRef<number>;
|
|
21
|
+
isReadonly: ComputedRef<boolean>;
|
|
22
|
+
displayHtml: ComputedRef<string>;
|
|
23
|
+
maxWords: ComputedRef<number | undefined>;
|
|
24
|
+
handleCreated: (editor: IDomEditor) => void;
|
|
25
|
+
handleChange: (editor: IDomEditor) => void;
|
|
26
|
+
handleCustomPaste: (editor: IDomEditor, event: ClipboardEvent, callback: (continueDefault: boolean) => void) => void;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* KEditor 核心逻辑:实例生命周期、v-model 同步、字数限制、预览与粘贴处理。
|
|
30
|
+
*
|
|
31
|
+
* 数据流:
|
|
32
|
+
* - 入参:props.modelValue(string | { html, length })
|
|
33
|
+
* - 出参:emit update:modelValue 始终为 { html, length }
|
|
34
|
+
* - 内部 lastValidHtml 用于超字数回滚与外部回填
|
|
35
|
+
*/
|
|
36
|
+
export declare function useKEditor(options: UseKEditorOptions): UseKEditorReturn;
|
|
37
|
+
//# sourceMappingURL=useKEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useKEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/k-editor/composables/useKEditor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAA2D,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,KAAK,CAAA;AAEhH,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAI1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAmBrD,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,YAAY,CAAA;IACnB,IAAI,EAAE;QACJ,CAAC,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,YAAY,GAAG,IAAI,CAAA;QACvD,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAA;KACvB,CAAA;CACF;AAED,MAAM,WAAW,gBAAgB;IAC/B,kDAAkD;IAClD,SAAS,EAAE,UAAU,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;IAC7C,aAAa,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,eAAe,CAAC,CAAA;IACnE,YAAY,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,cAAc,CAAC,CAAA;IACjE,IAAI,EAAE,SAAS,CAAA;IACf,cAAc,EAAE,UAAU,CAAC,OAAO,CAAC,CAAA;IACnC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC,CAAA;IAC/B,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,CAAA;IAC7B,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAChC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAChC,QAAQ,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACzC,aAAa,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAA;IAC3C,YAAY,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAA;IAC1C,iBAAiB,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC,eAAe,EAAE,OAAO,KAAK,IAAI,KAAK,IAAI,CAAA;CACrH;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,gBAAgB,CA6IvE"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { buildEditorEmitValue as e, countEditorWords as t, getEditorHtml as n, isSameEditorHtml as r, resolveMaxWordCount as i } from "../utils/editorValue.js";
|
|
2
|
+
import { K_EDITOR_PREVIEW_EVENT as a, bindEditorPreviewId as o } from "../utils/registerPreviewMenu.js";
|
|
3
|
+
import { sanitizePasteHtml as s } from "../utils/sanitizePasteHtml.js";
|
|
4
|
+
import { useKEditorConfig as c } from "./useKEditorConfig.js";
|
|
5
|
+
import { computed as l, onBeforeUnmount as u, onMounted as d, shallowRef as f, watch as p } from "vue";
|
|
6
|
+
//#region src/components/k-editor/composables/useKEditor.ts
|
|
7
|
+
var m = !1;
|
|
8
|
+
function h() {
|
|
9
|
+
if (m) return;
|
|
10
|
+
m = !0;
|
|
11
|
+
let e = console.warn.bind(console);
|
|
12
|
+
console.warn = (...t) => {
|
|
13
|
+
let n = t[0];
|
|
14
|
+
typeof n == "string" && (n.includes("编辑区域高度") || n.includes("Textarea height < 300px")) || e(...t);
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function g(m) {
|
|
18
|
+
h();
|
|
19
|
+
let { props: g, emit: _ } = m, v = f(), y = f(!1), b = f(""), x = f(0), S = f(""), C = f(!1), w = f(""), T = l(() => g.disabled === !0), E = l(() => n(g.modelValue)), D = l(() => i(g.maxWordCount, g.maxLength)), { toolbarConfig: O, editorConfig: k } = c({
|
|
20
|
+
config: () => g.config,
|
|
21
|
+
items: () => g.items,
|
|
22
|
+
placeholder: () => g.placeholder,
|
|
23
|
+
disabled: () => g.disabled
|
|
24
|
+
});
|
|
25
|
+
function A(e) {
|
|
26
|
+
let t = e.detail;
|
|
27
|
+
!t || t.editorId !== w.value || (b.value = t.html, y.value = !0);
|
|
28
|
+
}
|
|
29
|
+
d(() => {
|
|
30
|
+
window.addEventListener(a, A);
|
|
31
|
+
});
|
|
32
|
+
function j(e) {
|
|
33
|
+
x.value = t(e.getText());
|
|
34
|
+
}
|
|
35
|
+
function M(n) {
|
|
36
|
+
let r = n.getHtml(), i = t(n.getText());
|
|
37
|
+
x.value = i, S.value = r, _("update:modelValue", e(r, i));
|
|
38
|
+
}
|
|
39
|
+
function N(e, t) {
|
|
40
|
+
C.value = !0, e.setHtml(t), S.value = t, j(e), queueMicrotask(() => {
|
|
41
|
+
C.value = !1;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function P(e) {
|
|
45
|
+
v.value = e, w.value = o(e);
|
|
46
|
+
let t = E.value;
|
|
47
|
+
t ? N(e, t) : j(e);
|
|
48
|
+
}
|
|
49
|
+
function F(n) {
|
|
50
|
+
if (C.value) return;
|
|
51
|
+
let r = t(n.getText());
|
|
52
|
+
if (D.value != null && r > D.value) {
|
|
53
|
+
N(n, S.value), x.value = t(n.getText()), _("update:modelValue", e(S.value, x.value)), queueMicrotask(() => {
|
|
54
|
+
n.isDisabled() || n.focus();
|
|
55
|
+
});
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
M(n);
|
|
59
|
+
}
|
|
60
|
+
function I(e, t, n) {
|
|
61
|
+
let r = t.clipboardData?.getData("text/html");
|
|
62
|
+
if (!r) {
|
|
63
|
+
n(!0);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
t.preventDefault(), e.dangerouslyInsertHtml(s(r)), n(!1);
|
|
67
|
+
}
|
|
68
|
+
return p(() => g.modelValue, (e, t) => {
|
|
69
|
+
if (r(e, t) || T.value) return;
|
|
70
|
+
let i = v.value;
|
|
71
|
+
if (!i) return;
|
|
72
|
+
let a = n(e);
|
|
73
|
+
i.getHtml() !== a && N(i, a);
|
|
74
|
+
}), p(T, (e) => {
|
|
75
|
+
let t = v.value;
|
|
76
|
+
t && (e ? t.disable() : t.enable());
|
|
77
|
+
}, { flush: "post" }), u(() => {
|
|
78
|
+
window.removeEventListener(a, A);
|
|
79
|
+
let e = v.value;
|
|
80
|
+
e && e.destroy();
|
|
81
|
+
}), {
|
|
82
|
+
editorRef: v,
|
|
83
|
+
toolbarConfig: O,
|
|
84
|
+
editorConfig: k,
|
|
85
|
+
mode: "default",
|
|
86
|
+
previewVisible: y,
|
|
87
|
+
previewHtml: b,
|
|
88
|
+
wordCount: x,
|
|
89
|
+
isReadonly: T,
|
|
90
|
+
displayHtml: E,
|
|
91
|
+
maxWords: D,
|
|
92
|
+
handleCreated: P,
|
|
93
|
+
handleChange: F,
|
|
94
|
+
handleCustomPaste: I
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
//#endregion
|
|
98
|
+
export { g as useKEditor };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IEditorConfig, IToolbarConfig } from '@wangeditor/editor';
|
|
2
|
+
import { ComputedRef, MaybeRefOrGetter } from 'vue';
|
|
3
|
+
import { KEditorConfig } from '../types';
|
|
4
|
+
interface UseKEditorConfigOptions {
|
|
5
|
+
config: MaybeRefOrGetter<KEditorConfig | undefined>;
|
|
6
|
+
items: MaybeRefOrGetter<string[] | undefined>;
|
|
7
|
+
placeholder: MaybeRefOrGetter<string | undefined>;
|
|
8
|
+
disabled: MaybeRefOrGetter<boolean | undefined>;
|
|
9
|
+
}
|
|
10
|
+
export declare function useKEditorConfig(options: UseKEditorConfigOptions): {
|
|
11
|
+
toolbarConfig: ComputedRef<Partial<IToolbarConfig>>;
|
|
12
|
+
editorConfig: ComputedRef<Partial<IEditorConfig>>;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=useKEditorConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useKEditorConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/k-editor/composables/useKEditorConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACvE,OAAO,EAAqB,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAEhF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAI7C,UAAU,uBAAuB;IAC/B,MAAM,EAAE,gBAAgB,CAAC,aAAa,GAAG,SAAS,CAAC,CAAA;IACnD,KAAK,EAAE,gBAAgB,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,CAAA;IAC7C,WAAW,EAAE,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACjD,QAAQ,EAAE,gBAAgB,CAAC,OAAO,GAAG,SAAS,CAAC,CAAA;CAChD;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG;IAClE,aAAa,EAAE,WAAW,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAA;IACnD,YAAY,EAAE,WAAW,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAA;CAClD,CA8CA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { K_EDITOR_PREVIEW_MENU_KEY as e } from "../utils/registerPreviewMenu.js";
|
|
2
|
+
import { createEditorImageUpload as t } from "./useEditorImageUpload.js";
|
|
3
|
+
import { computed as n, toValue as r } from "vue";
|
|
4
|
+
//#region src/components/k-editor/composables/useKEditorConfig.ts
|
|
5
|
+
function i(i) {
|
|
6
|
+
let a = t();
|
|
7
|
+
return {
|
|
8
|
+
toolbarConfig: n(() => {
|
|
9
|
+
let t = r(i.config)?.toolbar, n = r(i.items), a = {
|
|
10
|
+
excludeKeys: [
|
|
11
|
+
"emotion",
|
|
12
|
+
"group-video",
|
|
13
|
+
"insertImage"
|
|
14
|
+
],
|
|
15
|
+
insertKeys: {
|
|
16
|
+
index: 0,
|
|
17
|
+
keys: [e]
|
|
18
|
+
},
|
|
19
|
+
...t
|
|
20
|
+
};
|
|
21
|
+
return n?.length ? {
|
|
22
|
+
...a,
|
|
23
|
+
toolbarKeys: n
|
|
24
|
+
} : a;
|
|
25
|
+
}),
|
|
26
|
+
editorConfig: n(() => {
|
|
27
|
+
let { toolbar: e, MENU_CONF: t, height: n, ...o } = r(i.config) ?? {};
|
|
28
|
+
return {
|
|
29
|
+
placeholder: r(i.placeholder) ?? "请输入",
|
|
30
|
+
autoFocus: !1,
|
|
31
|
+
readOnly: r(i.disabled) === !0,
|
|
32
|
+
MENU_CONF: {
|
|
33
|
+
lineHeight: { lineHeightList: ["1"] },
|
|
34
|
+
uploadImage: {
|
|
35
|
+
base64LimitSize: 0,
|
|
36
|
+
customUpload: a
|
|
37
|
+
},
|
|
38
|
+
...t
|
|
39
|
+
},
|
|
40
|
+
...o
|
|
41
|
+
};
|
|
42
|
+
})
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { i as useKEditorConfig };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** KEditor 组件与类型导出入口 */
|
|
2
|
+
export { default as KEditor } from './KEditor';
|
|
3
|
+
export type { KEditorConfig, KEditorModelValue, KEditorProps, KEditorValue } from './types';
|
|
4
|
+
export { buildEditorEmitValue, countEditorHtmlWords, countEditorWords, getEditorHtml, getEditorWordCount, resolveMaxWordCount, stripEditorHtml, toKEditorValue } from './utils/editorValue';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/k-editor/index.ts"],"names":[],"mappings":"AAAA,wBAAwB;AACxB,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAA;AAClD,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3F,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,cAAc,EACf,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { buildEditorEmitValue as e, countEditorHtmlWords as t, countEditorWords as n, getEditorHtml as r, getEditorWordCount as i, resolveMaxWordCount as a, stripEditorHtml as o, toKEditorValue as s } from "./utils/editorValue.js";
|
|
2
|
+
import c from "./KEditor.js";
|
|
3
|
+
export { c as KEditor, e as buildEditorEmitValue, t as countEditorHtmlWords, n as countEditorWords, r as getEditorHtml, i as getEditorWordCount, a as resolveMaxWordCount, o as stripEditorHtml, s as toKEditorValue };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { IEditorConfig, IToolbarConfig } from '@wangeditor/editor';
|
|
2
|
+
/**
|
|
3
|
+
* v-model 对象形态(对齐 legacy k-editor / k-ckeditor 的 input 载荷)。
|
|
4
|
+
* 表单字段通常存此结构,便于同时提交 HTML 与字数。
|
|
5
|
+
*/
|
|
6
|
+
export interface KEditorValue {
|
|
7
|
+
html: string;
|
|
8
|
+
length: number;
|
|
9
|
+
}
|
|
10
|
+
/** 外部可传入 string 或对象,组件内部统一按 html 处理 */
|
|
11
|
+
export type KEditorModelValue = string | KEditorValue | null | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* 透传 wangEditor 配置。
|
|
14
|
+
* toolbar 字段对应 IToolbarConfig,其余字段合并进 IEditorConfig。
|
|
15
|
+
*/
|
|
16
|
+
export interface KEditorConfig extends Partial<IEditorConfig> {
|
|
17
|
+
toolbar?: Partial<IToolbarConfig>;
|
|
18
|
+
/** 编辑区高度(px),对齐 legacy config.height;由组件 style 消费,不透传给 wangEditor */
|
|
19
|
+
height?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface KEditorProps {
|
|
22
|
+
modelValue?: KEditorModelValue;
|
|
23
|
+
/** legacy items:自定义工具栏 menu key 列表(wangEditor toolbarKeys) */
|
|
24
|
+
items?: string[];
|
|
25
|
+
/** 最大字数;与 maxLength 二选一,maxWordCount 优先 */
|
|
26
|
+
maxWordCount?: number | string;
|
|
27
|
+
/** README 兼容别名 */
|
|
28
|
+
maxLength?: number | string;
|
|
29
|
+
config?: KEditorConfig;
|
|
30
|
+
/** true 时销毁编辑器,以 HTML 只读展示 */
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
placeholder?: string;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/k-editor/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAEvE;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACf;AAED,uCAAuC;AACvC,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,YAAY,GAAG,IAAI,GAAG,SAAS,CAAA;AAExE;;;GAGG;AACH,MAAM,WAAW,aAAc,SAAQ,OAAO,CAAC,aAAa,CAAC;IAC3D,OAAO,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;IACjC,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,UAAU,CAAC,EAAE,iBAAiB,CAAA;IAC9B,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,2CAA2C;IAC3C,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC9B,kBAAkB;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { KEditorModelValue, KEditorValue } from '../types';
|
|
2
|
+
/** 从 string / { html } 中取出 HTML,供 setHtml 与只读展示使用 */
|
|
3
|
+
export declare function getEditorHtml(value: KEditorModelValue): string;
|
|
4
|
+
/**
|
|
5
|
+
* HTML → 纯文本(去标签与常见实体),供回填 / 校验字数使用。
|
|
6
|
+
* 与编辑器 getText() 结果对齐的近似实现(无 DOM 依赖,可在 Node/SSR 用)。
|
|
7
|
+
*/
|
|
8
|
+
export declare function stripEditorHtml(html: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* 字数统计(对齐 legacy k-editor)。
|
|
11
|
+
* 去除 、换行与空白后计字符数。入参应为纯文本(如 editor.getText())。
|
|
12
|
+
*/
|
|
13
|
+
export declare function countEditorWords(text: string): number;
|
|
14
|
+
/**
|
|
15
|
+
* 按 HTML 计字:先去标签再走 countEditorWords。
|
|
16
|
+
* 表单校验 / 接口回填 length 请用此方法,勿用 html.length。
|
|
17
|
+
*/
|
|
18
|
+
export declare function countEditorHtmlWords(html: string): number;
|
|
19
|
+
/** 从 v-model 值取字数(string | { html, length });表单 validator 可直接传入 value */
|
|
20
|
+
export declare function getEditorWordCount(value: KEditorModelValue | unknown): number;
|
|
21
|
+
/** 构造 emit 载荷;无内容时 html 归一为 '' */
|
|
22
|
+
export declare function buildEditorEmitValue(html: string, length: number): KEditorValue;
|
|
23
|
+
/**
|
|
24
|
+
* 接口 HTML → KEditor v-model。
|
|
25
|
+
* length 与编辑器字数统计一致,供 setValues / 默认值回填。
|
|
26
|
+
*/
|
|
27
|
+
export declare function toKEditorValue(html?: string | null): KEditorValue;
|
|
28
|
+
/** 解析 maxWordCount / maxLength;无效或非正数返回 undefined(不限制) */
|
|
29
|
+
export declare function resolveMaxWordCount(maxWordCount?: number | string, maxLength?: number | string): number | undefined;
|
|
30
|
+
/** 外部 modelValue 变更时,仅比较 html 避免重复 setHtml */
|
|
31
|
+
export declare function isSameEditorHtml(a: KEditorModelValue, b: KEditorModelValue): boolean;
|
|
32
|
+
//# sourceMappingURL=editorValue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editorValue.d.ts","sourceRoot":"","sources":["../../../../src/components/k-editor/utils/editorValue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAE/D,qDAAqD;AACrD,wBAAgB,aAAa,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAI9D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CASpD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKrD;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,yEAAyE;AACzE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,GAAG,MAAM,CAG7E;AAED,kCAAkC;AAClC,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,YAAY,CAK/E;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,YAAY,CAGjE;AAED,0DAA0D;AAC1D,wBAAgB,mBAAmB,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAKnH;AAED,8CAA8C;AAC9C,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAEpF"}
|