@sdata/web-vue 4.4.3 → 4.5.1
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/sd.css +74 -9
- package/dist/sd.min.css +2 -2
- package/es/_components/auto-tooltip/auto-tooltip.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/client-only.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/feedback-icon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/icon-hover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/input-label/input-label.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/picker/input-range.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/picker/input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/resize-observer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/resize-trigger.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/select-view/select-view.vue.d.ts +1 -1
- package/es/_components/select-view/select-view.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/_components/transition/expand-transition.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/virtual-list/virtual-list.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/_hooks/use-component-ref.d.ts +1 -1
- package/es/_hooks/use-responsive.js +6 -1
- package/es/_hooks/use-scrollbar.js +1 -1
- package/es/_utils/color.js +1 -1
- package/es/_utils/date.d.ts +1 -1
- package/es/_utils/date.js +6 -3
- package/es/_utils/debounce.d.ts +4 -1
- package/es/_utils/debounce.js +8 -1
- package/es/_utils/get-value-by-path.d.ts +1 -0
- package/es/_utils/get-value-by-path.js +9 -9
- package/es/_utils/global-config.js +1 -1
- package/es/_utils/omit.js +1 -1
- package/es/_utils/responsive-observe.js +1 -1
- package/es/_utils/virtual-dropdown.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/asyncToGenerator.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/defineProperty.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/extends.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/objectDestructuringEmpty.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/objectSpread2.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/objectWithoutProperties.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/objectWithoutPropertiesLoose.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/toPrimitive.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/toPropertyKey.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/typeof.js +1 -1
- package/es/affix/affix.vue_vue_type_script_setup_true_lang.js +3 -2
- package/es/alert/alert.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/anchor/anchor-link.vue_vue_type_script_setup_true_lang.js +8 -4
- package/es/anchor/anchor.vue_vue_type_script_setup_true_lang.js +18 -5
- package/es/anchor/utils.d.ts +1 -1
- package/es/anchor/utils.js +4 -2
- package/es/auto-complete/auto-complete.vue.d.ts +4 -4
- package/es/auto-complete/auto-complete.vue_vue_type_script_setup_true_lang.js +22 -9
- package/es/avatar/avatar-group.vue_vue_type_script_setup_true_lang.js +16 -23
- package/es/avatar/avatar.vue_vue_type_script_setup_true_lang.js +36 -20
- package/es/avatar/style/index.css +4 -0
- package/es/avatar/style/index.scss +5 -0
- package/es/back-top/back-top.vue_vue_type_script_setup_true_lang.js +24 -13
- package/es/badge/badge.vue_vue_type_script_setup_true_lang.js +5 -5
- package/es/basic-crud-table/basic-crud-modal.vue.d.ts +1 -1
- package/es/basic-crud-table/basic-crud-modal.vue_vue_type_script_setup_true_lang.js +24 -15
- package/es/basic-crud-table/basic-crud-table.vue.d.ts +4 -4
- package/es/basic-crud-table/basic-crud-table.vue_vue_type_script_setup_true_lang.js +58 -37
- package/es/basic-crud-table/index.d.ts +12 -12
- package/es/bloom-menu/bloom-menu.vue_vue_type_script_setup_true_lang.js +3 -2
- package/es/border-beam/border-beam.vue_vue_type_script_setup_true_lang.js +64 -22
- package/es/border-beam/styles.js +20 -7
- package/es/breadcrumb/breadcrumb-item.vue_vue_type_script_setup_true_lang.js +9 -3
- package/es/breadcrumb/breadcrumb.vue_vue_type_script_setup_true_lang.js +6 -4
- package/es/button/button-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/button/button.vue_vue_type_script_setup_true_lang.js +19 -13
- package/es/button/index.d.ts +3 -3
- package/es/calendar/__test__/real-transitions.js +10 -0
- package/es/calendar/components/cell.vue_vue_type_script_setup_true_lang.js +7 -3
- package/es/calendar/components/event.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/calendar/components/header.vue_vue_type_script_setup_true_lang.js +9 -3
- package/es/calendar/components/index.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/calendar/core/config.js +17 -20
- package/es/calendar/core/events.js +59 -41
- package/es/calendar/core/i18n.d.ts +1 -1
- package/es/calendar/core/i18n.js +2 -2
- package/es/calendar/core/index.d.ts +6 -6
- package/es/calendar/core/index.js +1 -1
- package/es/calendar/core/view.js +10 -7
- package/es/calendar/modules/drag-and-drop.js +80 -30
- package/es/calendar/utils/date.d.ts +4 -4
- package/es/calendar/utils/date.js +20 -11
- package/es/card/card-actions.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/card/card-grid.vue_vue_type_script_setup_true_lang.js +6 -3
- package/es/card/card-meta.vue_vue_type_script_setup_true_lang.js +13 -10
- package/es/card/card.vue_vue_type_script_setup_true_lang.js +17 -11
- package/es/card/context.d.ts +2 -0
- package/es/carousel/carousel-arrow.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/carousel/carousel-indicator.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/carousel/carousel-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/carousel/carousel.vue_vue_type_script_setup_true_lang.js +13 -10
- package/es/cascader/base-cascader-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/cascader/cascader-column.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/cascader/cascader-option.vue_vue_type_script_setup_true_lang.js +8 -21
- package/es/cascader/cascader-panel.vue_vue_type_script_setup_true_lang.js +27 -12
- package/es/cascader/cascader-search-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/cascader/cascader.vue.d.ts +1 -1
- package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +37 -17
- package/es/cascader/context.d.ts +2 -2
- package/es/cascader/hooks/use-lazy-load.d.ts +6 -0
- package/es/cascader/hooks/use-lazy-load.js +35 -0
- package/es/cascader/interface.d.ts +4 -0
- package/es/cascader/utils.d.ts +2 -2
- package/es/cascader/utils.js +10 -8
- package/es/checkbox/checkbox-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/checkbox/checkbox.vue_vue_type_script_setup_true_lang.js +2 -1
- package/es/checkbox/icon-check.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/collapse/collapse-item.vue_vue_type_script_setup_true_lang.js +17 -2
- package/es/collapse/collapse.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/color-picker/color-picker.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/color-picker/control-bar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/color-picker/gradient-thumb.vue_vue_type_script_setup_true_lang.js +6 -2
- package/es/color-picker/hooks/use-control-block.js +5 -1
- package/es/color-picker/palette.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/color-picker/panel.vue_vue_type_script_setup_true_lang.js +31 -12
- package/es/color-picker/utils.js +1 -1
- package/es/comment/comment.vue_vue_type_script_setup_true_lang.js +7 -15
- package/es/config-provider/config-provider.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/config-provider/context.d.ts +5 -1
- package/es/config-provider/context.js +2 -1
- package/es/config-provider/global-theme.d.ts +3 -0
- package/es/config-provider/global-theme.js +49 -0
- package/es/config-provider/theme-provider.vue_vue_type_script_setup_true_lang.js +39 -37
- package/es/config-provider/theme.d.ts +1 -0
- package/es/config-provider/theme.js +5 -3
- package/es/copy/copy.vue_vue_type_script_setup_true_lang.js +33 -25
- package/es/cropper/cropper.vue_vue_type_script_setup_true_lang.js +38 -6
- package/es/date-picker/hooks/use-is-disabled-date.d.ts +2 -2
- package/es/date-picker/hooks/use-is-disabled-date.js +4 -5
- package/es/date-picker/hooks/use-range-time-picker-value.js +1 -1
- package/es/date-picker/index.d.ts +28 -0
- package/es/date-picker/panels/body.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/date/index.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/date-picker/panels/footer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/header.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/month/index.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/date-picker/panels/quarter/index.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/shortcuts.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/week/index.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/week-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/year/index.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/picker-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/picker.vue_vue_type_script_setup_true_lang.js +11 -3
- package/es/date-picker/pickers/date-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/pickers/month-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/pickers/quarter-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/pickers/week-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/pickers/year-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/range-picker-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/range-picker.vue.d.ts +28 -0
- package/es/date-picker/range-picker.vue_vue_type_script_setup_true_lang.js +24 -3
- package/es/descriptions/descriptions-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/descriptions/descriptions.vue_vue_type_script_setup_true_lang.js +10 -9
- package/es/descriptions/interface.d.ts +1 -0
- package/es/divider/divider.vue_vue_type_script_setup_true_lang.js +5 -3
- package/es/drawer/drawer.vue_vue_type_script_setup_true_lang.js +28 -24
- package/es/drawer/index.js +2 -2
- package/es/dropdown/dropdown-button.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/dropdown/dropdown-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/dropdown/dropdown-option.vue_vue_type_script_setup_true_lang.js +3 -6
- package/es/dropdown/dropdown-panel.vue_vue_type_script_setup_true_lang.js +15 -13
- package/es/dropdown/dropdown-submenu.vue_vue_type_script_setup_true_lang.js +17 -13
- package/es/dropdown/dropdown.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/ellipsis/ellipsis.vue.d.ts +2 -0
- package/es/ellipsis/ellipsis.vue_vue_type_script_setup_true_lang.js +23 -8
- package/es/ellipsis/index.d.ts +3 -0
- package/es/ellipsis/performant-ellipsis.vue_vue_type_script_setup_true_lang.js +24 -9
- package/es/empty/empty.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/file-previewer/file-previewer.vue_vue_type_script_setup_true_lang.js +34 -18
- package/es/file-previewer/pdfjs-worker.min.mjs +4 -4
- package/es/file-previewer/use-pdf-js.js +57 -38
- package/es/form/form-item-label.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/form/form-item-message.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/form/form-item.vue_vue_type_script_setup_true_lang.js +54 -15
- package/es/form/form.vue_vue_type_script_setup_true_lang.js +11 -8
- package/es/grid/context.d.ts +2 -2
- package/es/grid/grid-col.vue_vue_type_script_setup_true_lang.js +8 -7
- package/es/grid/grid-item.vue_vue_type_script_setup_true_lang.js +5 -4
- package/es/grid/grid-row.vue_vue_type_script_setup_true_lang.js +2 -1
- package/es/grid/grid.vue_vue_type_script_setup_true_lang.js +11 -12
- package/es/grid/style/col.scss +2 -2
- package/es/grid/style/index.css +42 -0
- package/es/grid/utils/index.js +5 -2
- package/es/icon/icon-arrow-up/icon-arrow-up.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-calendar/icon-calendar.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-caret-down/icon-caret-down.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-caret-left/icon-caret-left.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-caret-right/icon-caret-right.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-caret-up/icon-caret-up.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-check/icon-check.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-check-circle-fill/icon-check-circle-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-clock-circle/icon-clock-circle.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-close/icon-close.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-close-circle-fill/icon-close-circle-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-copy/icon-copy.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-delete/icon-delete.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-double-left/icon-double-left.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-double-right/icon-double-right.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-down/icon-down.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-drag-dot/icon-drag-dot.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-drag-dot-vertical/icon-drag-dot-vertical.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-edit/icon-edit.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-empty/icon-empty.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-exclamation/icon-exclamation.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-exclamation-circle-fill/icon-exclamation-circle-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-eye/icon-eye.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-eye-invisible/icon-eye-invisible.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-face-frown-fill/icon-face-frown-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-face-meh-fill/icon-face-meh-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-face-smile-fill/icon-face-smile-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-file/icon-file.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-file-audio/icon-file-audio.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-file-image/icon-file-image.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-file-pdf/icon-file-pdf.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-file-video/icon-file-video.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-filter/icon-filter.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-fullscreen/icon-fullscreen.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-image-close/icon-image-close.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-info/icon-info.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-info-circle-fill/icon-info-circle-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-left/icon-left.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-link/icon-link.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-list/icon-list.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-loading/icon-loading.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-menu/icon-menu.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-menu-fold/icon-menu-fold.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-menu-unfold/icon-menu-unfold.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-minus/icon-minus.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-more/icon-more.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-mute/icon-mute.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-oblique-line/icon-oblique-line.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-original-size/icon-original-size.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-pause/icon-pause.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-play-arrow-fill/icon-play-arrow-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-plus/icon-plus.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-question-circle/icon-question-circle.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-right/icon-right.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-rotate-left/icon-rotate-left.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-rotate-right/icon-rotate-right.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-search/icon-search.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-star-fill/icon-star-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-to-top/icon-to-top.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-up/icon-up.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-upload/icon-upload.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-voice/icon-voice.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-zoom-in/icon-zoom-in.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-zoom-out/icon-zoom-out.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon-component/add-from-icon-font-cn.js +5 -1
- package/es/icon-component/icon-font.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon-component/icon.vue_vue_type_script_setup_true_lang.js +6 -3
- package/es/icon.js +292 -292
- package/es/image/hooks/use-image-drag.js +4 -2
- package/es/image/image-footer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/image.vue_vue_type_script_setup_true_lang.js +14 -10
- package/es/image/preview-action.vue.d.ts +6 -2
- package/es/image/preview-action.vue_vue_type_script_setup_true_lang.js +12 -3
- package/es/image/preview-arrow.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/preview-group.vue_vue_type_script_setup_true_lang.js +7 -9
- package/es/image/preview-toolbar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/preview.vue_vue_type_script_setup_true_lang.js +17 -22
- package/es/index.css +74 -9
- package/es/index.d.ts +6 -6
- package/es/input/index.d.ts +3 -3
- package/es/input/input-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/input/input-password.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/input/input-search.vue.d.ts +1 -1
- package/es/input/input-search.vue_vue_type_script_setup_true_lang.js +3 -2
- package/es/input/input.vue_vue_type_script_setup_true_lang.js +7 -8
- package/es/input-mask/input-mask.vue_vue_type_script_setup_true_lang.js +14 -7
- package/es/input-mask/mask-engine.js +1 -1
- package/es/input-number/decimal.d.ts +3 -0
- package/es/input-number/decimal.js +49 -0
- package/es/input-number/input-number.vue_vue_type_script_setup_true_lang.js +60 -27
- package/es/input-tag/input-tag.vue_vue_type_script_setup_true_lang.js +34 -16
- package/es/input-tag/utils.js +1 -1
- package/es/json-form/json-form-component.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/json-form/json-form-item.vue_vue_type_script_setup_true_lang.js +6 -3
- package/es/json-form/json-form.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/json-form/utils.js +4 -2
- package/es/kv-list/kv-list-row.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/kv-list/kv-list.vue_vue_type_script_setup_true_lang.js +2 -1
- package/es/layout/content.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/layout/footer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/layout/header.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/layout/layout.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/layout/sider.vue_vue_type_script_setup_true_lang.js +6 -1
- package/es/link/link.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/list/index.d.ts +3 -3
- package/es/list/list-item-meta.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/list/list-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/list/list.vue.d.ts +1 -1
- package/es/list/list.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/locale/interface.d.ts +4 -0
- package/es/locale/lang/en-us.js +4 -0
- package/es/locale/lang/zh-cn.js +4 -0
- package/es/mention/mention.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/base-menu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/indent.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/item-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/menu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/overflow-wrap.vue_vue_type_script_setup_true_lang.js +13 -3
- package/es/menu/sub-menu-inline.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/sub-menu-pop.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/sub-menu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/message/index.js +2 -1
- package/es/message/message-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/message/message.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/modal/hooks/use-draggable.js +3 -1
- package/es/modal/index.js +2 -2
- package/es/modal/modal.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/model-selector/model-selector-content.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-dialog.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-empty.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-logo-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-logo.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-name.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-separator.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-shortcut.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-trigger.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/notification/index.js +5 -2
- package/es/notification/notification-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/notification/notification.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/number-flow/number-flow-group.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/number-flow/number-flow.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/page-header/page-header.vue_vue_type_script_setup_true_lang.js +5 -5
- package/es/pagination/interface.d.ts +1 -0
- package/es/pagination/page-item-ellipsis.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/page-item-step.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/page-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/page-jumper.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/page-options.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/pagination.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/popconfirm/popconfirm.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/popover/popover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/progress/circle.vue_vue_type_script_setup_true_lang.js +5 -5
- package/es/progress/line.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/progress/progress.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/progress/steps.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +23 -12
- package/es/radio/radio-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/radio/radio.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/rate/rate.vue_vue_type_script_setup_true_lang.js +9 -7
- package/es/regex-vis/layout.js +1 -1
- package/es/regex-vis/parser/parser.js +1 -1
- package/es/regex-vis/regex-vis.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/resize-box/resize-box.vue_vue_type_script_setup_true_lang.js +7 -3
- package/es/result/403.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/result/404.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/result/500.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/result/index.d.ts +7 -6
- package/es/result/result.vue.d.ts +2 -2
- package/es/result/result.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/rich-text-editor/nodes/inline-component-node.js +1 -1
- package/es/rich-text-editor/rich-text-editor.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/rich-text-editor/rich-text-node-renderer.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/scrollbar/scrollbar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sd-vue.js +1 -1
- package/es/secret/index.d.ts +4 -15
- package/es/secret/interface.d.ts +6 -0
- package/es/secret/secret.vue.d.ts +1 -5
- package/es/secret/secret.vue_vue_type_script_setup_true_lang.js +5 -4
- package/es/select/hooks/use-options.js +1 -1
- package/es/select/index.d.ts +3 -3
- package/es/select/interface.d.ts +5 -0
- package/es/select/select-dropdown.vue.d.ts +3 -1
- package/es/select/select-dropdown.vue_vue_type_script_setup_true_lang.js +9 -5
- package/es/select/select.vue.d.ts +1 -1
- package/es/select/select.vue_vue_type_script_setup_true_lang.js +3 -2
- package/es/select/utils.js +1 -1
- package/es/selectable-card/index.d.ts +4 -52
- package/es/selectable-card/selectable-card.vue.d.ts +3 -20
- package/es/selectable-card/selectable-card.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/selectable-card/types.d.ts +17 -0
- package/es/sender/sender-header.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender-recording-icon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender-skill-tag.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender-stop-loading-icon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender-switch.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/skeleton/index.d.ts +1 -0
- package/es/skeleton/interface.d.ts +14 -0
- package/es/skeleton/line.vue_vue_type_script_setup_true_lang.js +6 -8
- package/es/skeleton/shape.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/skeleton/skeleton.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider-button.vue_vue_type_script_setup_true_lang.js +9 -4
- package/es/slider/slider-dots.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider-input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider-marks.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider-ticks.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/space/space.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/spin/dot-loading.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/spin/spin.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/split/index.d.ts +1 -0
- package/es/split/interface.d.ts +7 -7
- package/es/split/split.vue_vue_type_script_setup_true_lang.js +8 -4
- package/es/statistic/countdown.vue_vue_type_script_setup_true_lang.js +2 -1
- package/es/statistic/statistic.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/steps/index.d.ts +2 -0
- package/es/steps/step.vue_vue_type_script_setup_true_lang.js +7 -2
- package/es/steps/steps.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/switch/index.d.ts +4 -3
- package/es/switch/switch.vue.d.ts +1 -1
- package/es/switch/switch.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/table/index.d.ts +3 -3
- package/es/table/table-column.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-operation-td.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-operation-th.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-tbody.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-td.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-th.vue_vue_type_script_setup_true_lang.js +14 -3
- package/es/table/table-thead.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-tr.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table.vue.d.ts +1 -1
- package/es/table/table.vue_vue_type_script_setup_true_lang.js +14 -5
- package/es/table/utils.js +1 -1
- package/es/tabs/index.d.ts +19 -57
- package/es/tabs/style/index.css +17 -1
- package/es/tabs/style/index.scss +17 -1
- package/es/tabs/tab-pane.vue.d.ts +1 -13
- package/es/tabs/tab-pane.vue_vue_type_script_setup_true_lang.js +26 -5
- package/es/tabs/tabs-button.vue_vue_type_script_setup_true_lang.js +9 -3
- package/es/tabs/tabs-nav-ink.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tabs/tabs-nav.vue_vue_type_script_setup_true_lang.js +10 -5
- package/es/tabs/tabs-tab.vue_vue_type_script_setup_true_lang.js +10 -5
- package/es/tabs/tabs.vue_vue_type_script_setup_true_lang.js +8 -7
- package/es/tag/index.d.ts +10 -10
- package/es/tag/tag.vue.d.ts +4 -4
- package/es/tag/tag.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/tag-group/tag-group.vue_vue_type_script_setup_true_lang.js +6 -2
- package/es/textarea/index.d.ts +1 -0
- package/es/textarea/style/index.css +2 -2
- package/es/textarea/style/index.scss +3 -2
- package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +4 -4
- package/es/theme-provider/index.d.ts +1 -0
- package/es/thinking-orb/engine/profiles.js +1 -1
- package/es/thinking-orb/presets.js +1 -1
- package/es/thinking-orb/thinking-orb.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/index.d.ts +1 -0
- package/es/time-picker/panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/range-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/time-column.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/time-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/timeline/index.d.ts +2 -0
- package/es/timeline/item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/timeline/timeline.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/toolbar/toolbar.vue_vue_type_script_setup_true_lang.js +8 -2
- package/es/tooltip/tooltip.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/tour/tour.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/transfer/index.d.ts +1 -0
- package/es/transfer/transfer-list-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/transfer/transfer-view.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/transfer/transfer.vue_vue_type_script_setup_true_lang.js +3 -5
- package/es/tree/base-node.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/expand-transition.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/node-switcher.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/node.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/transition-node-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/tree.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/tree/utils/tree-data.js +1 -1
- package/es/tree-select/hooks/use-filter-tree-node.js +2 -1
- package/es/tree-select/hooks/use-selected-state.js +1 -1
- package/es/tree-select/panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree-select/tree-select.vue.d.ts +1 -1
- package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/trigger/interface.d.ts +4 -1
- package/es/trigger/trigger.vue_vue_type_script_setup_true_lang.js +11 -5
- package/es/typography/base.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/edit-content.vue_vue_type_script_setup_true_lang.js +5 -2
- package/es/typography/operations.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/typography/paragraph.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/text.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/title.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/typography-content.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/typography-operations.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/typography.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/utils/inner-text-renderer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/upload/style/index.css +9 -6
- package/es/upload/style/index.scss +12 -6
- package/es/upload/upload-button.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/upload/upload-list-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/upload/upload-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/upload/upload-picture-item.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/upload/upload-progress.vue_vue_type_script_setup_true_lang.js +42 -11
- package/es/upload/upload.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/verification-code/index.d.ts +1 -0
- package/es/verification-code/verification-code.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/watermark/hooks/use-mutation-observer.js +1 -1
- package/es/watermark/index.d.ts +5 -3
- package/es/watermark/watermark.vue_vue_type_script_setup_true_lang.js +4 -1
- package/json/vetur-attributes.json +4 -0
- package/json/vetur-tags.json +2 -1
- package/json/web-types.json +9 -1
- package/package.json +9 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useFormItem } from "../_hooks/use-form-item.js";
|
|
2
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
4
|
import { isFunction, isNull, isObject, isUndefined } from "../_utils/is.js";
|
|
5
5
|
import icon_hover_default from "../_components/icon-hover.js";
|
|
@@ -124,9 +124,6 @@ var input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
124
124
|
watch(toRef(props, "modelValue"), (value) => {
|
|
125
125
|
if (isUndefined(value) || isNull(value)) innerValue.value = "";
|
|
126
126
|
});
|
|
127
|
-
watch(computedValue, (_value, oldValue) => {
|
|
128
|
-
previousValue = oldValue;
|
|
129
|
-
});
|
|
130
127
|
const focused = ref(false);
|
|
131
128
|
const showClearBtn = computed(() => mergedAllowClear.value && !props.readonly && !mergedDisabled.value && Boolean(computedValue.value));
|
|
132
129
|
const isComposition = ref(false);
|
|
@@ -155,6 +152,7 @@ var input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
155
152
|
}
|
|
156
153
|
innerValue.value = nextValue;
|
|
157
154
|
emit("update:modelValue", nextValue);
|
|
155
|
+
return nextValue;
|
|
158
156
|
};
|
|
159
157
|
const handleMousedown = (event) => {
|
|
160
158
|
if (inputRef.value && event.target !== inputRef.value) {
|
|
@@ -172,6 +170,7 @@ var input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
172
170
|
};
|
|
173
171
|
const handleFocus = (event) => {
|
|
174
172
|
var _eventHandlers$value2, _eventHandlers$value3;
|
|
173
|
+
previousValue = computedValue.value;
|
|
175
174
|
focused.value = true;
|
|
176
175
|
emit("focus", event);
|
|
177
176
|
(_eventHandlers$value2 = eventHandlers.value) === null || _eventHandlers$value2 === void 0 || (_eventHandlers$value3 = _eventHandlers$value2.onFocus) === null || _eventHandlers$value3 === void 0 || _eventHandlers$value3.call(_eventHandlers$value2, event);
|
|
@@ -202,8 +201,8 @@ var input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
202
201
|
keepControl();
|
|
203
202
|
return;
|
|
204
203
|
}
|
|
205
|
-
updateValue(value);
|
|
206
|
-
emit("input",
|
|
204
|
+
const nextValue = updateValue(value);
|
|
205
|
+
emit("input", nextValue, event);
|
|
207
206
|
(_eventHandlers$value6 = eventHandlers.value) === null || _eventHandlers$value6 === void 0 || (_eventHandlers$value7 = _eventHandlers$value6.onInput) === null || _eventHandlers$value7 === void 0 || _eventHandlers$value7.call(_eventHandlers$value6, event);
|
|
208
207
|
keepControl();
|
|
209
208
|
} else {
|
|
@@ -220,8 +219,8 @@ var input_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
220
219
|
keepControl();
|
|
221
220
|
return;
|
|
222
221
|
}
|
|
223
|
-
updateValue(value);
|
|
224
|
-
emit("input",
|
|
222
|
+
const nextValue = updateValue(value);
|
|
223
|
+
emit("input", nextValue, event);
|
|
225
224
|
(_eventHandlers$value8 = eventHandlers.value) === null || _eventHandlers$value8 === void 0 || (_eventHandlers$value9 = _eventHandlers$value8.onInput) === null || _eventHandlers$value9 === void 0 || _eventHandlers$value9.call(_eventHandlers$value8, event);
|
|
226
225
|
keepControl();
|
|
227
226
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
|
+
import { splitGraphemes } from "../_utils/grapheme.js";
|
|
3
4
|
import Input from "../input/index.js";
|
|
4
5
|
import { formatInputMask, resolveDeletion, stripMaskPlaceholders } from "./mask-engine.js";
|
|
5
6
|
import { inputMaskPresets } from "./presets.js";
|
|
@@ -89,9 +90,9 @@ var input_mask_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
89
90
|
return _objectSpread2(_objectSpread2({}, (_presetDefinition$val2 = presetDefinition.value) === null || _presetDefinition$val2 === void 0 ? void 0 : _presetDefinition$val2.formatChars), props.formatChars);
|
|
90
91
|
});
|
|
91
92
|
const effectiveMaskChar = computed(() => {
|
|
92
|
-
var
|
|
93
|
+
var _splitGraphemes$;
|
|
93
94
|
if (props.maskChar === null) return null;
|
|
94
|
-
return (
|
|
95
|
+
return (_splitGraphemes$ = splitGraphemes(props.maskChar)[0]) !== null && _splitGraphemes$ !== void 0 ? _splitGraphemes$ : "_";
|
|
95
96
|
});
|
|
96
97
|
const lengthManaged = computed(() => Boolean(effectiveMask.value) || Boolean(props.preset));
|
|
97
98
|
const normalizePresetValue = (value, previousValue) => {
|
|
@@ -124,7 +125,7 @@ var input_mask_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
124
125
|
if (!effectiveMask.value) return innerValue.value;
|
|
125
126
|
return formatInputMask(innerValue.value, null, effectiveMask.value, {
|
|
126
127
|
maskChar: effectiveMaskChar.value,
|
|
127
|
-
showMask: focused.value || props.alwaysShowMask ||
|
|
128
|
+
showMask: focused.value || props.alwaysShowMask || hasValue.value,
|
|
128
129
|
formatChars: effectiveFormatChars.value
|
|
129
130
|
}).value;
|
|
130
131
|
});
|
|
@@ -155,6 +156,7 @@ var input_mask_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
155
156
|
formatChars: effectiveFormatChars.value
|
|
156
157
|
});
|
|
157
158
|
};
|
|
159
|
+
const hasValue = computed(() => Boolean(toCommittedValue(innerValue.value)));
|
|
158
160
|
const commitValue = (rawValue) => {
|
|
159
161
|
var _input$selectionStart, _props$beforeMaskedVa, _props$beforeMaskedVa2;
|
|
160
162
|
const input = getInputElement();
|
|
@@ -201,6 +203,7 @@ var input_mask_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
201
203
|
};
|
|
202
204
|
}
|
|
203
205
|
nextState = (_props$beforeMaskedVa = (_props$beforeMaskedVa2 = props.beforeMaskedValueChange) === null || _props$beforeMaskedVa2 === void 0 ? void 0 : _props$beforeMaskedVa2.call(props, nextState, previousState)) !== null && _props$beforeMaskedVa !== void 0 ? _props$beforeMaskedVa : nextState;
|
|
206
|
+
if (props.beforeMaskedValueChange) nextComplete = applyNormalization(nextState.value).complete;
|
|
204
207
|
innerValue.value = nextState.value;
|
|
205
208
|
lastSelection.value = nextState.selection;
|
|
206
209
|
const committedValue = toCommittedValue(nextState.value);
|
|
@@ -266,8 +269,12 @@ var input_mask_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
266
269
|
presetDefinition,
|
|
267
270
|
effectiveMaskChar,
|
|
268
271
|
effectiveFormatChars
|
|
269
|
-
], () => {
|
|
270
|
-
const
|
|
272
|
+
], (_, [oldMask, , oldMaskChar, oldFormatChars]) => {
|
|
273
|
+
const value = oldMask ? stripMaskPlaceholders(innerValue.value, oldMask, {
|
|
274
|
+
maskChar: oldMaskChar,
|
|
275
|
+
formatChars: oldFormatChars
|
|
276
|
+
}) : innerValue.value;
|
|
277
|
+
const { value: next, complete: nextComplete } = applyNormalization(value);
|
|
271
278
|
const changed = next !== innerValue.value;
|
|
272
279
|
innerValue.value = next;
|
|
273
280
|
if (changed) emit("update:modelValue", toCommittedValue(next));
|
|
@@ -293,7 +300,7 @@ var input_mask_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
293
300
|
}, forwardedAttrs.value, {
|
|
294
301
|
"model-value": displayValue.value,
|
|
295
302
|
size: __props.size,
|
|
296
|
-
"allow-clear": __props.allowClear &&
|
|
303
|
+
"allow-clear": __props.allowClear && hasValue.value,
|
|
297
304
|
disabled: __props.disabled,
|
|
298
305
|
readonly: __props.readonly,
|
|
299
306
|
error: __props.error,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { codeUnitToGraphemeIndex, graphemeIndexToCodeUnit, splitGraphemes } from "../_utils/grapheme.js";
|
|
3
3
|
//#region components/input-mask/mask-engine.ts
|
|
4
4
|
var defaultInputMaskFormatChars = {
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
//#region components/input-number/decimal.ts
|
|
2
|
+
function addDecimal(value, step, subtract) {
|
|
3
|
+
const parts = (text) => {
|
|
4
|
+
const [coefficient, exponent = "0"] = text.toLowerCase().split("e");
|
|
5
|
+
const [integer, fraction = ""] = coefficient.split(".");
|
|
6
|
+
const scale = fraction.length - Number(exponent);
|
|
7
|
+
return {
|
|
8
|
+
digits: `${integer}${fraction}`.replace(/^[+-]/, "") + "0".repeat(Math.max(0, -scale)),
|
|
9
|
+
negative: text.startsWith("-"),
|
|
10
|
+
scale: Math.max(0, scale)
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
let left = parts(value);
|
|
14
|
+
let right = parts(String(step));
|
|
15
|
+
right.negative = right.negative !== subtract;
|
|
16
|
+
const scale = Math.max(left.scale, right.scale);
|
|
17
|
+
for (const part of [left, right]) part.digits = (part.digits + "0".repeat(scale - part.scale)).replace(/^0+/, "") || "0";
|
|
18
|
+
const adding = left.negative === right.negative;
|
|
19
|
+
if (!adding && (left.digits.length < right.digits.length || left.digits.length === right.digits.length && left.digits < right.digits)) [left, right] = [right, left];
|
|
20
|
+
let digits = "";
|
|
21
|
+
let carry = 0;
|
|
22
|
+
for (let index = 1; index <= Math.max(left.digits.length, right.digits.length); index++) {
|
|
23
|
+
var _left$digits, _right$digits;
|
|
24
|
+
const a = Number((_left$digits = left.digits[left.digits.length - index]) !== null && _left$digits !== void 0 ? _left$digits : 0);
|
|
25
|
+
const b = Number((_right$digits = right.digits[right.digits.length - index]) !== null && _right$digits !== void 0 ? _right$digits : 0);
|
|
26
|
+
const total = a + (adding ? b : -b) + carry;
|
|
27
|
+
carry = Math.floor(total / 10);
|
|
28
|
+
digits = String((total + 10) % 10) + digits;
|
|
29
|
+
}
|
|
30
|
+
if (carry > 0) digits = String(carry) + digits;
|
|
31
|
+
digits = (digits.replace(/^0+/, "") || "0").padStart(scale + 1, "0");
|
|
32
|
+
const sign = left.negative && /[1-9]/.test(digits) ? "-" : "";
|
|
33
|
+
return scale ? `${sign}${digits.slice(0, -scale)}.${digits.slice(-scale)}` : `${sign}${digits}`;
|
|
34
|
+
}
|
|
35
|
+
function compareDecimal(value, boundary) {
|
|
36
|
+
const difference = addDecimal(value, boundary, true);
|
|
37
|
+
if (!/[1-9]/.test(difference)) return 0;
|
|
38
|
+
return difference.startsWith("-") ? -1 : 1;
|
|
39
|
+
}
|
|
40
|
+
function roundDecimal(value, precision) {
|
|
41
|
+
const negative = value.startsWith("-");
|
|
42
|
+
const [integer, fraction = ""] = value.replace(/^[+-]/, "").split(".");
|
|
43
|
+
if (fraction.length <= precision) return value;
|
|
44
|
+
let rounded = `${integer || "0"}${precision ? `.${fraction.slice(0, precision)}` : ""}`;
|
|
45
|
+
if (Number(fraction[precision]) >= 5) rounded = addDecimal(rounded, Number(`1e-${precision}`), false);
|
|
46
|
+
return negative && /[1-9]/.test(rounded) ? `-${rounded}` : rounded;
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { addDecimal, compareDecimal, roundDecimal };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useFormItem } from "../_hooks/use-form-item.js";
|
|
2
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
4
|
import { isNumber, isUndefined } from "../_utils/is.js";
|
|
5
5
|
import { KEYBOARD_KEY, getKeyDownHandler } from "../_utils/keyboard.js";
|
|
@@ -12,6 +12,7 @@ import IconMinus from "../icon/icon-minus/index.js";
|
|
|
12
12
|
import IconPlus from "../icon/icon-plus/index.js";
|
|
13
13
|
import IconDown from "../icon/icon-down/index.js";
|
|
14
14
|
import IconUp from "../icon/icon-up/index.js";
|
|
15
|
+
import { addDecimal, compareDecimal, roundDecimal } from "./decimal.js";
|
|
15
16
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, normalizeClass, openBlock, ref, renderSlot, toRef, unref, useSlots, watch, withCtx } from "vue";
|
|
16
17
|
import NP from "number-precision";
|
|
17
18
|
//#region components/input-number/input-number.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -114,10 +115,7 @@ var input_number_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
114
115
|
const { mergedAllowClear } = useAllowClear(toRef(props, "allowClear"));
|
|
115
116
|
const valueMode = ref(props.stringMode || typeof ((_props$modelValue = props.modelValue) !== null && _props$modelValue !== void 0 ? _props$modelValue : props.defaultValue) === "string" ? "string" : "number");
|
|
116
117
|
const mergedPrecision = computed(() => {
|
|
117
|
-
if (isNumber(props.precision))
|
|
118
|
-
const decimal = `${props.step}`.split(".")[1];
|
|
119
|
-
return Math.max((decimal === null || decimal === void 0 ? void 0 : decimal.length) || 0, props.precision);
|
|
120
|
-
}
|
|
118
|
+
if (isNumber(props.precision)) return Math.max(NP.digitLength(props.step), props.precision);
|
|
121
119
|
});
|
|
122
120
|
const getNumberValue = (value) => {
|
|
123
121
|
var _props$parser, _props$parser2;
|
|
@@ -130,7 +128,10 @@ var input_number_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
130
128
|
};
|
|
131
129
|
const toPlainString = (number) => {
|
|
132
130
|
if (!isNumber(number)) return "";
|
|
133
|
-
|
|
131
|
+
const precision = mergedPrecision.value;
|
|
132
|
+
if (!precision) return String(number);
|
|
133
|
+
const displayPrecision = number === props.min || number === props.max ? Math.max(precision, NP.digitLength(number)) : precision;
|
|
134
|
+
return number.toFixed(displayPrecision);
|
|
134
135
|
};
|
|
135
136
|
const getStringValue = (number) => {
|
|
136
137
|
var _props$formatter, _props$formatter2;
|
|
@@ -152,8 +153,9 @@ var input_number_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
152
153
|
const innerValue = ref(getDisplayValue((_props$modelValue2 = props.modelValue) !== null && _props$modelValue2 !== void 0 ? _props$modelValue2 : props.defaultValue));
|
|
153
154
|
const rawText = ref(DECIMAL_PATTERN.test(innerValue.value) ? innerValue.value : "");
|
|
154
155
|
const valueNumber = computed(() => getNumberValue(innerValue.value));
|
|
155
|
-
const
|
|
156
|
-
const
|
|
156
|
+
const compareToBoundary = (value, boundary) => props.stringMode && DECIMAL_PATTERN.test(rawText.value) && Number.isFinite(boundary) ? compareDecimal(rawText.value, boundary) : (value !== null && value !== void 0 ? value : NaN) - boundary;
|
|
157
|
+
const isMin = ref(compareToBoundary(valueNumber.value, props.min) <= 0);
|
|
158
|
+
const isMax = ref(compareToBoundary(valueNumber.value, props.max) >= 0);
|
|
157
159
|
let repeatTimer = 0;
|
|
158
160
|
const clearRepeatTimer = () => {
|
|
159
161
|
if (repeatTimer) {
|
|
@@ -163,38 +165,59 @@ var input_number_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
163
165
|
};
|
|
164
166
|
const getLegalValue = (value) => {
|
|
165
167
|
if (isUndefined(value)) return void 0;
|
|
168
|
+
if (isNumber(mergedPrecision.value)) value = NP.round(value, mergedPrecision.value);
|
|
166
169
|
if (isNumber(props.min) && value < props.min) value = props.min;
|
|
167
170
|
if (isNumber(props.max) && value > props.max) value = props.max;
|
|
168
|
-
return
|
|
171
|
+
return value;
|
|
169
172
|
};
|
|
170
173
|
const updateNumberStatus = (number) => {
|
|
171
|
-
isMin.value =
|
|
172
|
-
isMax.value =
|
|
174
|
+
isMin.value = compareToBoundary(number, props.min) <= 0;
|
|
175
|
+
isMax.value = compareToBoundary(number, props.max) >= 0;
|
|
176
|
+
};
|
|
177
|
+
const getLegalString = (value) => {
|
|
178
|
+
if (isNumber(mergedPrecision.value)) value = roundDecimal(value, mergedPrecision.value);
|
|
179
|
+
if (Number.isFinite(props.min) && compareDecimal(value, props.min) < 0) value = addDecimal("0", props.min, false);
|
|
180
|
+
if (Number.isFinite(props.max) && compareDecimal(value, props.max) > 0) value = addDecimal("0", props.max, false);
|
|
181
|
+
return value;
|
|
173
182
|
};
|
|
174
183
|
const handleExceedRange = () => {
|
|
175
184
|
const finalValue = getLegalValue(valueNumber.value);
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
185
|
+
const useString = props.stringMode && DECIMAL_PATTERN.test(rawText.value);
|
|
186
|
+
if (useString) {
|
|
187
|
+
var _props$formatter3, _props$formatter4;
|
|
188
|
+
rawText.value = getLegalString(rawText.value);
|
|
189
|
+
innerValue.value = (_props$formatter3 = (_props$formatter4 = props.formatter) === null || _props$formatter4 === void 0 ? void 0 : _props$formatter4.call(props, rawText.value)) !== null && _props$formatter3 !== void 0 ? _props$formatter3 : rawText.value;
|
|
190
|
+
} else {
|
|
191
|
+
innerValue.value = getStringValue(finalValue);
|
|
181
192
|
rawText.value = isNumber(finalValue) ? toPlainString(finalValue) : "";
|
|
182
193
|
}
|
|
183
|
-
|
|
194
|
+
updateNumberStatus(valueNumber.value);
|
|
195
|
+
const emitted = useString ? rawText.value : getModelValue(finalValue);
|
|
196
|
+
committedValue = emitted;
|
|
184
197
|
emit("update:modelValue", emitted);
|
|
185
198
|
return emitted;
|
|
186
199
|
};
|
|
200
|
+
watch([() => props.formatter, () => props.parser], ([formatter], [, previousParser]) => {
|
|
201
|
+
var _previousParser, _formatter;
|
|
202
|
+
const rawValue = DECIMAL_PATTERN.test(rawText.value) ? rawText.value : (_previousParser = previousParser === null || previousParser === void 0 ? void 0 : previousParser(innerValue.value)) !== null && _previousParser !== void 0 ? _previousParser : innerValue.value;
|
|
203
|
+
rawText.value = String(rawValue);
|
|
204
|
+
innerValue.value = (_formatter = formatter === null || formatter === void 0 ? void 0 : formatter(rawValue)) !== null && _formatter !== void 0 ? _formatter : rawText.value;
|
|
205
|
+
updateNumberStatus(valueNumber.value);
|
|
206
|
+
});
|
|
187
207
|
watch(() => [props.max, props.min], () => {
|
|
188
208
|
handleExceedRange();
|
|
189
209
|
updateNumberStatus(valueNumber.value);
|
|
190
210
|
});
|
|
191
211
|
const nextStep = (method, event) => {
|
|
212
|
+
var _props$formatter5, _props$formatter6;
|
|
192
213
|
if (mergedDisabled.value || method === "plus" && isMax.value || method === "minus" && isMin.value) return;
|
|
193
|
-
const
|
|
194
|
-
|
|
195
|
-
rawText.value = toPlainString(nextValue);
|
|
214
|
+
const steppedText = props.stringMode && DECIMAL_PATTERN.test(rawText.value) && Number.isFinite(props.step) ? getLegalString(addDecimal(rawText.value, props.step, method === "minus")) : void 0;
|
|
215
|
+
const nextValue = steppedText !== void 0 ? Number(steppedText) : isNumber(valueNumber.value) ? getLegalValue(NP[method](valueNumber.value, props.step)) : getLegalValue(props.min === -Infinity ? 0 : props.min);
|
|
216
|
+
rawText.value = steppedText !== null && steppedText !== void 0 ? steppedText : toPlainString(nextValue);
|
|
217
|
+
innerValue.value = steppedText !== void 0 ? (_props$formatter5 = (_props$formatter6 = props.formatter) === null || _props$formatter6 === void 0 ? void 0 : _props$formatter6.call(props, rawText.value)) !== null && _props$formatter5 !== void 0 ? _props$formatter5 : rawText.value : getStringValue(nextValue);
|
|
196
218
|
updateNumberStatus(nextValue);
|
|
197
|
-
const emittedValue = getModelValue(nextValue);
|
|
219
|
+
const emittedValue = steppedText !== null && steppedText !== void 0 ? steppedText : getModelValue(nextValue);
|
|
220
|
+
committedValue = emittedValue;
|
|
198
221
|
emit("update:modelValue", emittedValue);
|
|
199
222
|
emit("change", emittedValue, event);
|
|
200
223
|
};
|
|
@@ -212,13 +235,14 @@ var input_number_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
212
235
|
const normalizedValue = value.trim().replace(/。/g, ".");
|
|
213
236
|
const parsedValue = (_props$parser3 = (_props$parser4 = props.parser) === null || _props$parser4 === void 0 ? void 0 : _props$parser4.call(props, normalizedValue)) !== null && _props$parser3 !== void 0 ? _props$parser3 : normalizedValue;
|
|
214
237
|
if (parsedValue === "" || Number.isFinite(Number(parsedValue)) || /^[-.]$/.test(String(parsedValue))) {
|
|
215
|
-
var _props$
|
|
238
|
+
var _props$formatter7, _props$formatter8;
|
|
216
239
|
rawText.value = String(parsedValue);
|
|
217
|
-
innerValue.value = (_props$
|
|
240
|
+
innerValue.value = (_props$formatter7 = (_props$formatter8 = props.formatter) === null || _props$formatter8 === void 0 ? void 0 : _props$formatter8.call(props, parsedValue)) !== null && _props$formatter7 !== void 0 ? _props$formatter7 : String(parsedValue);
|
|
218
241
|
updateNumberStatus(valueNumber.value);
|
|
219
242
|
const emittedValue = getEmittedValue();
|
|
220
243
|
emit("input", emittedValue, innerValue.value, event);
|
|
221
244
|
if (props.modelEvent === "input") {
|
|
245
|
+
committedValue = emittedValue;
|
|
222
246
|
emit("update:modelValue", emittedValue);
|
|
223
247
|
emit("change", emittedValue, event);
|
|
224
248
|
}
|
|
@@ -228,18 +252,25 @@ var input_number_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
228
252
|
if (props.stringMode && DECIMAL_PATTERN.test(rawText.value)) return rawText.value;
|
|
229
253
|
return getModelValue(valueNumber.value);
|
|
230
254
|
};
|
|
255
|
+
let committedValue = getEmittedValue();
|
|
231
256
|
const handleFocus = (event) => emit("focus", event);
|
|
232
257
|
const handleChange = (value, event) => {
|
|
233
258
|
if (event instanceof MouseEvent && !value) return;
|
|
259
|
+
const previousValue = committedValue;
|
|
234
260
|
const emitted = handleExceedRange();
|
|
235
|
-
emit("change", emitted, event);
|
|
261
|
+
if (emitted !== previousValue) emit("change", emitted, event);
|
|
262
|
+
};
|
|
263
|
+
const handleBlur = (event) => {
|
|
264
|
+
if (getEmittedValue() !== committedValue) handleChange(innerValue.value, event);
|
|
265
|
+
emit("blur", event);
|
|
236
266
|
};
|
|
237
|
-
const handleBlur = (event) => emit("blur", event);
|
|
238
267
|
const handleClear = (event) => {
|
|
239
268
|
var _eventHandlers$value, _eventHandlers$value$;
|
|
240
269
|
innerValue.value = "";
|
|
241
270
|
rawText.value = "";
|
|
271
|
+
updateNumberStatus(void 0);
|
|
242
272
|
const emittedValue = getModelValue(void 0);
|
|
273
|
+
committedValue = emittedValue;
|
|
243
274
|
emit("update:modelValue", emittedValue);
|
|
244
275
|
emit("change", emittedValue, event);
|
|
245
276
|
(_eventHandlers$value = eventHandlers.value) === null || _eventHandlers$value === void 0 || (_eventHandlers$value$ = _eventHandlers$value.onChange) === null || _eventHandlers$value$ === void 0 || _eventHandlers$value$.call(_eventHandlers$value, event);
|
|
@@ -261,7 +292,7 @@ var input_number_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
261
292
|
else if (typeof value === "string") valueMode.value = "string";
|
|
262
293
|
else if (typeof value === "number") valueMode.value = "number";
|
|
263
294
|
const nextNumberValue = getNumberValue(value);
|
|
264
|
-
if (value !== innerValue.value && nextNumberValue !== valueNumber.value) {
|
|
295
|
+
if (value !== innerValue.value && (props.stringMode || nextNumberValue !== valueNumber.value)) {
|
|
265
296
|
innerValue.value = getDisplayValue(value);
|
|
266
297
|
rawText.value = DECIMAL_PATTERN.test(innerValue.value) ? innerValue.value : "";
|
|
267
298
|
updateNumberStatus(nextNumberValue);
|
|
@@ -270,6 +301,7 @@ var input_number_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
270
301
|
rawText.value = "";
|
|
271
302
|
updateNumberStatus(void 0);
|
|
272
303
|
}
|
|
304
|
+
committedValue = getEmittedValue();
|
|
273
305
|
});
|
|
274
306
|
const cls = computed(() => [
|
|
275
307
|
prefixCls,
|
|
@@ -311,7 +343,8 @@ var input_number_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
311
343
|
"role": "spinbutton",
|
|
312
344
|
"aria-valuemax": props.max,
|
|
313
345
|
"aria-valuemin": props.min,
|
|
314
|
-
"aria-valuenow":
|
|
346
|
+
"aria-valuenow": getEmittedValue() === "" ? void 0 : getEmittedValue(),
|
|
347
|
+
"aria-valuetext": props.formatter && !unref(isUndefined)(valueNumber.value) ? innerValue.value : void 0
|
|
315
348
|
}, props.inputAttrs),
|
|
316
349
|
onInput: handleInput,
|
|
317
350
|
onFocus: handleFocus,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useFormItem } from "../_hooks/use-form-item.js";
|
|
2
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
4
|
import { isNull, isObject, isUndefined } from "../_utils/is.js";
|
|
5
5
|
import resize_observer_default from "../_components/resize-observer.js";
|
|
@@ -151,6 +151,16 @@ var input_tag_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
151
151
|
});
|
|
152
152
|
const mergedFocused = computed(() => props.focused || innerFocused.value);
|
|
153
153
|
const isResponsiveMaxTagCount = computed(() => props.maxTagCount === "responsive");
|
|
154
|
+
let replacingInput = false;
|
|
155
|
+
watch(isResponsiveMaxTagCount, () => {
|
|
156
|
+
const restoreFocus = innerFocused.value;
|
|
157
|
+
replacingInput = true;
|
|
158
|
+
nextTick(() => {
|
|
159
|
+
var _inputRef$value;
|
|
160
|
+
replacingInput = false;
|
|
161
|
+
if (restoreFocus) (_inputRef$value = inputRef.value) === null || _inputRef$value === void 0 || _inputRef$value.focus();
|
|
162
|
+
});
|
|
163
|
+
});
|
|
154
164
|
const computedValue = computed(() => {
|
|
155
165
|
var _props$modelValue;
|
|
156
166
|
return (_props$modelValue = props.modelValue) !== null && _props$modelValue !== void 0 ? _props$modelValue : innerValue.value;
|
|
@@ -225,7 +235,7 @@ var input_tag_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
225
235
|
});
|
|
226
236
|
const isClosableTag = (item) => {
|
|
227
237
|
var _item$tagProps$closab, _item$tagProps;
|
|
228
|
-
return Boolean((_item$tagProps$closab = (_item$tagProps = item.tagProps) === null || _item$tagProps === void 0 ? void 0 : _item$tagProps.closable) !== null && _item$tagProps$closab !== void 0 ? _item$tagProps$closab :
|
|
238
|
+
return !mergedDisabled.value && !props.readonly && Boolean((_item$tagProps$closab = (_item$tagProps = item.tagProps) === null || _item$tagProps === void 0 ? void 0 : _item$tagProps.closable) !== null && _item$tagProps$closab !== void 0 ? _item$tagProps$closab : item.closable);
|
|
229
239
|
};
|
|
230
240
|
const getSlotData = (item) => item.raw;
|
|
231
241
|
const updateValue = (value, event) => {
|
|
@@ -237,6 +247,8 @@ var input_tag_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
237
247
|
};
|
|
238
248
|
const handleRemove = (value, index, event) => {
|
|
239
249
|
var _computedValue$value;
|
|
250
|
+
const item = valueData.value[index];
|
|
251
|
+
if (!item || !isClosableTag(item)) return;
|
|
240
252
|
updateValue((_computedValue$value = computedValue.value) === null || _computedValue$value === void 0 ? void 0 : _computedValue$value.filter((_, itemIndex) => itemIndex !== index), event);
|
|
241
253
|
emit("remove", value, event);
|
|
242
254
|
};
|
|
@@ -246,10 +258,9 @@ var input_tag_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
246
258
|
};
|
|
247
259
|
const showClearBtn = computed(() => !mergedDisabled.value && !props.readonly && mergedAllowClear.value && Boolean(computedValue.value.length));
|
|
248
260
|
const handlePressEnter = (event) => {
|
|
249
|
-
var _computedValue$value2;
|
|
250
261
|
if (!computedInputValue.value) return;
|
|
251
262
|
event.preventDefault();
|
|
252
|
-
if (props.uniqueValue && ((
|
|
263
|
+
if (props.uniqueValue && valueData.value.some((item) => item.value === computedInputValue.value)) {
|
|
253
264
|
emit("pressEnter", computedInputValue.value, event);
|
|
254
265
|
return;
|
|
255
266
|
}
|
|
@@ -266,12 +277,12 @@ var input_tag_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
266
277
|
const handleBlur = (event) => {
|
|
267
278
|
var _eventHandlers$value4, _eventHandlers$value5;
|
|
268
279
|
innerFocused.value = false;
|
|
269
|
-
if (!retainInputValue.value.blur && computedInputValue.value) updateInputValue("", event);
|
|
280
|
+
if (!replacingInput && !retainInputValue.value.blur && computedInputValue.value) updateInputValue("", event);
|
|
270
281
|
emit("blur", event);
|
|
271
282
|
(_eventHandlers$value4 = eventHandlers.value) === null || _eventHandlers$value4 === void 0 || (_eventHandlers$value5 = _eventHandlers$value4.onBlur) === null || _eventHandlers$value5 === void 0 || _eventHandlers$value5.call(_eventHandlers$value4, event);
|
|
272
283
|
};
|
|
273
284
|
const getLastClosableIndex = () => {
|
|
274
|
-
for (let index = valueData.value.length - 1; index >= 0; index -= 1) if (valueData.value[index]
|
|
285
|
+
for (let index = valueData.value.length - 1; index >= 0; index -= 1) if (isClosableTag(valueData.value[index])) return index;
|
|
275
286
|
return -1;
|
|
276
287
|
};
|
|
277
288
|
const handleKeyDown = (event) => {
|
|
@@ -296,6 +307,9 @@ var input_tag_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
296
307
|
watch(computedInputValue, (value) => {
|
|
297
308
|
if (inputRef.value && !isComposition.value && value !== inputRef.value.value) inputRef.value.value = value;
|
|
298
309
|
});
|
|
310
|
+
watch(inputRef, (input) => {
|
|
311
|
+
if (input) input.value = computedInputValue.value;
|
|
312
|
+
});
|
|
299
313
|
const cls = computed(() => [
|
|
300
314
|
prefixCls,
|
|
301
315
|
`${prefixCls}-size-${mergedSize.value}`,
|
|
@@ -329,12 +343,12 @@ var input_tag_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
329
343
|
}) : _objectSpread2(_objectSpread2({}, inputStyle), {}, { width });
|
|
330
344
|
});
|
|
331
345
|
const focus = () => {
|
|
332
|
-
var _inputRef$
|
|
333
|
-
return (_inputRef$
|
|
346
|
+
var _inputRef$value2;
|
|
347
|
+
return (_inputRef$value2 = inputRef.value) === null || _inputRef$value2 === void 0 ? void 0 : _inputRef$value2.focus();
|
|
334
348
|
};
|
|
335
349
|
const blur = () => {
|
|
336
|
-
var _inputRef$
|
|
337
|
-
return (_inputRef$
|
|
350
|
+
var _inputRef$value3;
|
|
351
|
+
return (_inputRef$value3 = inputRef.value) === null || _inputRef$value3 === void 0 ? void 0 : _inputRef$value3.blur();
|
|
338
352
|
};
|
|
339
353
|
__expose({
|
|
340
354
|
inputRef,
|
|
@@ -388,11 +402,13 @@ var input_tag_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
388
402
|
default: withCtx(() => [(openBlock(), createBlock(unref(Tag), mergeProps({
|
|
389
403
|
key: `tag-${item.value}`,
|
|
390
404
|
class: `${unref(prefixCls)}-tag`,
|
|
391
|
-
closable: isClosableTag(item),
|
|
392
405
|
visible: "",
|
|
393
406
|
nowrap: "",
|
|
394
407
|
ellipsis: !_ctx.$slots.tag
|
|
395
|
-
}, item.tagProps, {
|
|
408
|
+
}, item.tagProps, {
|
|
409
|
+
closable: isClosableTag(item),
|
|
410
|
+
onClose: ($event) => handleRemove(item.value, index, $event)
|
|
411
|
+
}), {
|
|
396
412
|
default: withCtx(() => [createVNode(unref(ReuseTagContent), {
|
|
397
413
|
item,
|
|
398
414
|
index,
|
|
@@ -401,8 +417,8 @@ var input_tag_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
401
417
|
_: 2
|
|
402
418
|
}, 1040, [
|
|
403
419
|
"class",
|
|
404
|
-
"closable",
|
|
405
420
|
"ellipsis",
|
|
421
|
+
"closable",
|
|
406
422
|
"onClose"
|
|
407
423
|
]))]),
|
|
408
424
|
_: 2
|
|
@@ -449,11 +465,13 @@ var input_tag_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
449
465
|
return openBlock(), createBlock(unref(Tag), mergeProps({
|
|
450
466
|
key: `tag-${item.value}`,
|
|
451
467
|
class: [`${unref(prefixCls)}-tag`, { [`${unref(prefixCls)}-tag-counter`]: isOverflowCounterTag(item.value) }],
|
|
452
|
-
closable: isClosableTag(item),
|
|
453
468
|
visible: "",
|
|
454
469
|
ellipsis: !_ctx.$slots.tag,
|
|
455
470
|
nowrap: props.tagNowrap || isResponsiveMaxTagCount.value
|
|
456
|
-
}, { ref_for: true }, item.tagProps, {
|
|
471
|
+
}, { ref_for: true }, item.tagProps, {
|
|
472
|
+
closable: isClosableTag(item),
|
|
473
|
+
onClose: ($event) => handleRemove(item.value, index, $event)
|
|
474
|
+
}), {
|
|
457
475
|
default: withCtx(() => [createVNode(unref(ReuseTagContent), {
|
|
458
476
|
item,
|
|
459
477
|
index,
|
|
@@ -462,9 +480,9 @@ var input_tag_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
462
480
|
_: 2
|
|
463
481
|
}, 1040, [
|
|
464
482
|
"class",
|
|
465
|
-
"closable",
|
|
466
483
|
"ellipsis",
|
|
467
484
|
"nowrap",
|
|
485
|
+
"closable",
|
|
468
486
|
"onClose"
|
|
469
487
|
]);
|
|
470
488
|
}), 128)), createElementVNode("input", mergeProps({
|
package/es/input-tag/utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { isNumber, isObject } from "../_utils/is.js";
|
|
3
3
|
//#region components/input-tag/utils.ts
|
|
4
4
|
var getValueData = (value, fieldNames) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { JSON_FORM_COMPONENT_TYPES } from "./types.js";
|
|
3
3
|
import { mergeJsonFormClassName, shouldStretchJsonFormControl } from "./utils.js";
|
|
4
4
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createSlots, createTextVNode, defineComponent, guardReactiveProps, mergeModels, mergeProps, normalizeProps, openBlock, renderList, renderSlot, resolveDynamicComponent, toDisplayString, toHandlers, useModel, useSlots, withCtx } from "vue";
|
|
@@ -47,7 +47,7 @@ var json_form_component_vue_vue_type_script_setup_true_lang_default = /*@__PURE_
|
|
|
47
47
|
});
|
|
48
48
|
const mergedComponentProps = computed(() => {
|
|
49
49
|
const componentProps = _objectSpread2({}, props.schema.componentProps);
|
|
50
|
-
if (
|
|
50
|
+
if (componentProps.placeholder === void 0 && defaultPlaceholder.value) componentProps.placeholder = defaultPlaceholder.value;
|
|
51
51
|
componentProps.class = mergeJsonFormClassName(componentProps.class, shouldStretchJsonFormControl(props.schema.type) ? `${props.prefixCls}-control` : `${props.prefixCls}-control--inline`);
|
|
52
52
|
return componentProps;
|
|
53
53
|
});
|
|
@@ -72,7 +72,7 @@ var json_form_component_vue_vue_type_script_setup_true_lang_default = /*@__PURE_
|
|
|
72
72
|
}, mergedComponentProps.value, toHandlers((_props$schema$compone3 = __props.schema.componentEvents) !== null && _props$schema$compone3 !== void 0 ? _props$schema$compone3 : {})), createSlots({
|
|
73
73
|
default: withCtx(() => [showCheckboxLabel.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(checkboxLabel.value), 1)], 64)) : createCommentVNode("", true)]),
|
|
74
74
|
_: 2
|
|
75
|
-
}, [renderList(forwardedSlotNames.value, (
|
|
75
|
+
}, [renderList(forwardedSlotNames.value, (name) => {
|
|
76
76
|
return {
|
|
77
77
|
name,
|
|
78
78
|
fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps)))])
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import grid_col_default from "../grid/grid-col.js";
|
|
3
3
|
import grid_row_default from "../grid/grid-row.js";
|
|
4
4
|
import form_item_default from "../form/form-item.js";
|
|
5
5
|
import { JSON_FORM_COMPONENT_TYPES } from "./types.js";
|
|
6
|
-
import { getJsonFormValue, setJsonFormValue } from "./utils.js";
|
|
6
|
+
import { getJsonFormValue, parseJsonFormPath, setJsonFormValue } from "./utils.js";
|
|
7
7
|
import json_form_component_default from "./json-form-component.js";
|
|
8
8
|
import { Fragment, computed, createBlock, createElementBlock, createSlots, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderList, renderSlot, resolveComponent, resolveDynamicComponent, toHandlers, unref, useSlots, withCtx } from "vue";
|
|
9
9
|
//#region components/json-form/json-form-item.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -33,7 +33,10 @@ var json_form_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
33
33
|
const props = __props;
|
|
34
34
|
const emit = __emit;
|
|
35
35
|
const normalizedField = computed(() => {
|
|
36
|
-
|
|
36
|
+
if (props.adapter !== "a2ui-0.9.1") return props.schema.field;
|
|
37
|
+
const segments = parseJsonFormPath(props.schema.field, props.adapter);
|
|
38
|
+
if (segments.some((segment) => !segment || /[.[\]]/.test(segment))) return segments.map((segment) => `["${segment.replaceAll("\\", "\\\\").replaceAll("\"", "\\\"")}"]`).join("");
|
|
39
|
+
return segments.join(".");
|
|
37
40
|
});
|
|
38
41
|
const fieldModel = computed({
|
|
39
42
|
get() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { configProviderInjectionKey } from "../config-provider/context.js";
|
|
2
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
4
|
import form_default from "../form/form.js";
|
|
5
5
|
import { JSON_FORM_ADAPTERS } from "./types.js";
|
package/es/json-form/utils.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import input_password_default from "../input/input-password.js";
|
|
4
4
|
import input_search_default from "../input/input-search.js";
|
|
5
5
|
import Input from "../input/index.js";
|
|
6
6
|
import AutoComplete from "../auto-complete/index.js";
|
|
7
|
+
import { hasUnsafePathSegment } from "../_utils/get-value-by-path.js";
|
|
7
8
|
import checkbox_group_default from "../checkbox/checkbox-group.js";
|
|
8
9
|
import Checkbox from "../checkbox/index.js";
|
|
9
10
|
import radio_group_default from "../radio/radio-group.js";
|
|
@@ -86,6 +87,7 @@ function parseJsonFormPath(path, adapter = "default") {
|
|
|
86
87
|
}
|
|
87
88
|
function getJsonFormValue(model, path, adapter = "default") {
|
|
88
89
|
const segments = parseJsonFormPath(path, adapter);
|
|
90
|
+
if (hasUnsafePathSegment(segments)) return void 0;
|
|
89
91
|
let current = model;
|
|
90
92
|
for (const segment of segments) {
|
|
91
93
|
if (!isPlainObject(current) && !Array.isArray(current)) return;
|
|
@@ -96,7 +98,7 @@ function getJsonFormValue(model, path, adapter = "default") {
|
|
|
96
98
|
function setJsonFormValue(model, path, value, adapter = "default") {
|
|
97
99
|
if (!model) return;
|
|
98
100
|
const segments = parseJsonFormPath(path, adapter);
|
|
99
|
-
if (segments.length === 0) return;
|
|
101
|
+
if (segments.length === 0 || hasUnsafePathSegment(segments)) return;
|
|
100
102
|
let current = model;
|
|
101
103
|
for (const segment of segments.slice(0, -1)) {
|
|
102
104
|
const nextValue = current[segment];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { useI18n } from "../locale/index.js";
|
|
4
4
|
import input_password_default from "../input/input-password.js";
|