yuyeon 0.3.1-rc.6 → 0.3.2-rc.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/yuyeon.js +459 -458
- package/dist/yuyeon.umd.cjs +2 -2
- package/lib/abstract/items.js +20 -0
- package/lib/abstract/items.js.map +1 -0
- package/lib/components/alert/YAlert.js +83 -0
- package/lib/components/alert/YAlert.js.map +1 -0
- package/lib/components/alert/index.js +2 -0
- package/lib/components/alert/index.js.map +1 -0
- package/lib/components/app/YApp.js +21 -0
- package/lib/components/app/YApp.js.map +1 -0
- package/lib/components/app/index.js +2 -0
- package/lib/components/app/index.js.map +1 -0
- package/lib/components/badge/YBadge.js +83 -0
- package/lib/components/badge/YBadge.js.map +1 -0
- package/lib/components/badge/index.js +2 -0
- package/lib/components/badge/index.js.map +1 -0
- package/lib/components/bench/YBench.js +43 -0
- package/lib/components/bench/YBench.js.map +1 -0
- package/lib/components/bench/index.js +2 -0
- package/lib/components/bench/index.js.map +1 -0
- package/lib/components/button/YButton.js +169 -0
- package/lib/components/button/YButton.js.map +1 -0
- package/lib/components/button/index.js +2 -0
- package/lib/components/button/index.js.map +1 -0
- package/lib/components/card/YCard.js +28 -0
- package/lib/components/card/YCard.js.map +1 -0
- package/lib/components/card/YCardBody.js +11 -0
- package/lib/components/card/YCardBody.js.map +1 -0
- package/lib/components/card/YCardFooter.js +11 -0
- package/lib/components/card/YCardFooter.js.map +1 -0
- package/lib/components/card/YCardHeader.js +11 -0
- package/lib/components/card/YCardHeader.js.map +1 -0
- package/lib/components/card/index.js +5 -0
- package/lib/components/card/index.js.map +1 -0
- package/lib/components/checkbox/YCheckbox.js +160 -0
- package/lib/components/checkbox/YCheckbox.js.map +1 -0
- package/lib/components/checkbox/YInputCheckbox.js +114 -0
- package/lib/components/checkbox/YInputCheckbox.js.map +1 -0
- package/lib/components/checkbox/index.js +4 -0
- package/lib/components/checkbox/index.js.map +1 -0
- package/lib/components/chip/YChip.js +39 -0
- package/lib/components/chip/YChip.js.map +1 -0
- package/lib/components/chip/index.js +2 -0
- package/lib/components/chip/index.js.map +1 -0
- package/lib/components/date-picker/YDateCalendar.js +243 -0
- package/lib/components/date-picker/YDateCalendar.js.map +1 -0
- package/lib/components/date-picker/YDatePicker.js +132 -0
- package/lib/components/date-picker/YDatePicker.js.map +1 -0
- package/lib/components/date-picker/YDatePickerControl.js +107 -0
- package/lib/components/date-picker/YDatePickerControl.js.map +1 -0
- package/lib/components/date-picker/YMonthPicker.js +64 -0
- package/lib/components/date-picker/YMonthPicker.js.map +1 -0
- package/lib/components/date-picker/YYearPicker.js +87 -0
- package/lib/components/date-picker/YYearPicker.js.map +1 -0
- package/lib/components/date-picker/index.js +4 -0
- package/lib/components/date-picker/index.js.map +1 -0
- package/lib/components/default-provider/YDefaultProvider.js +2 -0
- package/lib/components/default-provider/YDefaultProvider.js.map +1 -0
- package/lib/components/default-provider/index.js +2 -0
- package/lib/components/default-provider/index.js.map +1 -0
- package/lib/components/dialog/YDialog.js +213 -0
- package/lib/components/dialog/YDialog.js.map +1 -0
- package/lib/components/dialog/index.js +2 -0
- package/lib/components/dialog/index.js.map +1 -0
- package/lib/components/divider/YDivider.js +20 -0
- package/lib/components/divider/YDivider.js.map +1 -0
- package/lib/components/divider/index.js +2 -0
- package/lib/components/divider/index.js.map +1 -0
- package/lib/components/draggable/YDraggable.js +95 -0
- package/lib/components/draggable/YDraggable.js.map +1 -0
- package/lib/components/dropdown/YDropdown.js +109 -0
- package/lib/components/dropdown/YDropdown.js.map +1 -0
- package/lib/components/dropdown/index.js +2 -0
- package/lib/components/dropdown/index.js.map +1 -0
- package/lib/components/field-input/YFieldInput.js +229 -0
- package/lib/components/field-input/YFieldInput.js.map +1 -0
- package/lib/components/field-input/index.js +2 -0
- package/lib/components/field-input/index.js.map +1 -0
- package/lib/components/form/YForm.js +65 -0
- package/lib/components/form/YForm.js.map +1 -0
- package/lib/components/form/index.js +2 -0
- package/lib/components/form/index.js.map +1 -0
- package/lib/components/hover/YHover.js +54 -0
- package/lib/components/hover/YHover.js.map +1 -0
- package/lib/components/hover/index.js +2 -0
- package/lib/components/hover/index.js.map +1 -0
- package/lib/components/icon/YIcon.js +63 -0
- package/lib/components/icon/YIcon.js.map +1 -0
- package/lib/components/icon/index.js +2 -0
- package/lib/components/icon/index.js.map +1 -0
- package/lib/components/icons/YIconCheckbox.js +32 -0
- package/lib/components/icons/YIconCheckbox.js.map +1 -0
- package/lib/components/icons/YIconClear.js +16 -0
- package/lib/components/icons/YIconClear.js.map +1 -0
- package/lib/components/icons/YIconDropdown.js +16 -0
- package/lib/components/icons/YIconDropdown.js.map +1 -0
- package/lib/components/icons/YIconExpand.js +20 -0
- package/lib/components/icons/YIconExpand.js.map +1 -0
- package/lib/components/icons/YIconPageControl.js +32 -0
- package/lib/components/icons/YIconPageControl.js.map +1 -0
- package/lib/components/icons/YIconSort.js +45 -0
- package/lib/components/icons/YIconSort.js.map +1 -0
- package/lib/components/icons/index.js +32 -0
- package/lib/components/icons/index.js.map +1 -0
- package/lib/components/img/YImg.js +173 -0
- package/lib/components/img/YImg.js.map +1 -0
- package/lib/components/img/index.js +2 -0
- package/lib/components/img/index.js.map +1 -0
- package/lib/components/index.js +39 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/input/YInput.js +258 -0
- package/lib/components/input/YInput.js.map +1 -0
- package/lib/components/input/index.js +2 -0
- package/lib/components/input/index.js.map +1 -0
- package/lib/components/ip-field/YIpv4Field.js +297 -0
- package/lib/components/ip-field/YIpv4Field.js.map +1 -0
- package/lib/components/ip-field/index.js +2 -0
- package/lib/components/ip-field/index.js.map +1 -0
- package/lib/components/layer/YLayer.js +326 -0
- package/lib/components/layer/YLayer.js.map +1 -0
- package/lib/components/layer/active-delay.js +28 -0
- package/lib/components/layer/active-delay.js.map +1 -0
- package/lib/components/layer/active-stack.js +52 -0
- package/lib/components/layer/active-stack.js.map +1 -0
- package/lib/components/layer/base.js +87 -0
- package/lib/components/layer/base.js.map +1 -0
- package/lib/components/layer/content.js +22 -0
- package/lib/components/layer/content.js.map +1 -0
- package/lib/components/layer/index.js +2 -0
- package/lib/components/layer/index.js.map +1 -0
- package/lib/components/layer/scroll-strategies.js +132 -0
- package/lib/components/layer/scroll-strategies.js.map +1 -0
- package/lib/components/list/YList.js +55 -0
- package/lib/components/list/YList.js.map +1 -0
- package/lib/components/list/YListItem.js +59 -0
- package/lib/components/list/YListItem.js.map +1 -0
- package/lib/components/list/index.js +3 -0
- package/lib/components/list/index.js.map +1 -0
- package/lib/components/loading/YSpinnerRing.js +25 -0
- package/lib/components/loading/YSpinnerRing.js.map +1 -0
- package/lib/components/loading/index.js +2 -0
- package/lib/components/loading/index.js.map +1 -0
- package/lib/components/menu/YMenu.js +211 -0
- package/lib/components/menu/YMenu.js.map +1 -0
- package/lib/components/menu/index.js +2 -0
- package/lib/components/menu/index.js.map +1 -0
- package/lib/components/navigation/YNavigation.js +18 -0
- package/lib/components/navigation/YNavigation.js.map +1 -0
- package/lib/components/navigation/index.js +2 -0
- package/lib/components/navigation/index.js.map +1 -0
- package/lib/components/pagination/YPagination.js +288 -0
- package/lib/components/pagination/YPagination.js.map +1 -0
- package/lib/components/pagination/index.js +2 -0
- package/lib/components/pagination/index.js.map +1 -0
- package/lib/components/panel/YDividePanel.js +90 -0
- package/lib/components/panel/YDividePanel.js.map +1 -0
- package/lib/components/panel/index.js +2 -0
- package/lib/components/panel/index.js.map +1 -0
- package/lib/components/plate/YPlate.js +28 -0
- package/lib/components/plate/YPlate.js.map +1 -0
- package/lib/components/plate/index.js +2 -0
- package/lib/components/plate/index.js.map +1 -0
- package/lib/components/progress-bar/YProgressBar.js +117 -0
- package/lib/components/progress-bar/YProgressBar.js.map +1 -0
- package/lib/components/progress-bar/index.js +2 -0
- package/lib/components/progress-bar/index.js.map +1 -0
- package/lib/components/progress-ring/YProgressRing.js +128 -0
- package/lib/components/progress-ring/YProgressRing.js.map +1 -0
- package/lib/components/progress-ring/index.js +2 -0
- package/lib/components/progress-ring/index.js.map +1 -0
- package/lib/components/select/YSelect.js +344 -0
- package/lib/components/select/YSelect.js.map +1 -0
- package/lib/components/select/index.js +2 -0
- package/lib/components/select/index.js.map +1 -0
- package/lib/components/slider/YSlider.js +26 -0
- package/lib/components/slider/YSlider.js.map +1 -0
- package/lib/components/slider/index.js +2 -0
- package/lib/components/slider/index.js.map +1 -0
- package/lib/components/snackbar/YSnackbar.js +209 -0
- package/lib/components/snackbar/YSnackbar.js.map +1 -0
- package/lib/components/snackbar/index.js +2 -0
- package/lib/components/snackbar/index.js.map +1 -0
- package/lib/components/switch/YSwitch.js +184 -0
- package/lib/components/switch/YSwitch.js.map +1 -0
- package/lib/components/switch/index.js +2 -0
- package/lib/components/switch/index.js.map +1 -0
- package/lib/components/tab/YTab.js +64 -0
- package/lib/components/tab/YTab.js.map +1 -0
- package/lib/components/tab/YTabs.js +86 -0
- package/lib/components/tab/YTabs.js.map +1 -0
- package/lib/components/tab/index.js +4 -0
- package/lib/components/tab/index.js.map +1 -0
- package/lib/components/tab/shared.js +2 -0
- package/lib/components/tab/shared.js.map +1 -0
- package/lib/components/tab/types.js +2 -0
- package/lib/components/tab/types.js.map +1 -0
- package/lib/components/table/YDataTable.js +182 -0
- package/lib/components/table/YDataTable.js.map +1 -0
- package/lib/components/table/YDataTableBody.js +131 -0
- package/lib/components/table/YDataTableBody.js.map +1 -0
- package/lib/components/table/YDataTableCell.js +78 -0
- package/lib/components/table/YDataTableCell.js.map +1 -0
- package/lib/components/table/YDataTableControl.js +46 -0
- package/lib/components/table/YDataTableControl.js.map +1 -0
- package/lib/components/table/YDataTableHead.js +172 -0
- package/lib/components/table/YDataTableHead.js.map +1 -0
- package/lib/components/table/YDataTableLayer.js +29 -0
- package/lib/components/table/YDataTableLayer.js.map +1 -0
- package/lib/components/table/YDataTableRow.js +150 -0
- package/lib/components/table/YDataTableRow.js.map +1 -0
- package/lib/components/table/YDataTableServer.js +173 -0
- package/lib/components/table/YDataTableServer.js.map +1 -0
- package/lib/components/table/YTable.js +77 -0
- package/lib/components/table/YTable.js.map +1 -0
- package/lib/components/table/composibles/header.js +127 -0
- package/lib/components/table/composibles/header.js.map +1 -0
- package/lib/components/table/composibles/items.js +52 -0
- package/lib/components/table/composibles/items.js.map +1 -0
- package/lib/components/table/composibles/measure.js +39 -0
- package/lib/components/table/composibles/measure.js.map +1 -0
- package/lib/components/table/composibles/options.js +33 -0
- package/lib/components/table/composibles/options.js.map +1 -0
- package/lib/components/table/composibles/pagination.js +99 -0
- package/lib/components/table/composibles/pagination.js.map +1 -0
- package/lib/components/table/composibles/selection.js +196 -0
- package/lib/components/table/composibles/selection.js.map +1 -0
- package/lib/components/table/composibles/sorted-items.js +50 -0
- package/lib/components/table/composibles/sorted-items.js.map +1 -0
- package/lib/components/table/composibles/sorting.js +73 -0
- package/lib/components/table/composibles/sorting.js.map +1 -0
- package/lib/components/table/index.js +9 -0
- package/lib/components/table/index.js.map +1 -0
- package/lib/components/table/types/common.js +2 -0
- package/lib/components/table/types/common.js.map +1 -0
- package/lib/components/table/types/header.js +2 -0
- package/lib/components/table/types/header.js.map +1 -0
- package/lib/components/table/types/index.js +2 -0
- package/lib/components/table/types/index.js.map +1 -0
- package/lib/components/table/types/item.js +2 -0
- package/lib/components/table/types/item.js.map +1 -0
- package/lib/components/table/types/row.js +2 -0
- package/lib/components/table/types/row.js.map +1 -0
- package/lib/components/text-ellipsis/YTextEllipsis.js +66 -0
- package/lib/components/text-ellipsis/YTextEllipsis.js.map +1 -0
- package/lib/components/text-ellipsis/index.js +2 -0
- package/lib/components/text-ellipsis/index.js.map +1 -0
- package/lib/components/text-highlighter/YTextHighlighter.js +95 -0
- package/lib/components/text-highlighter/YTextHighlighter.js.map +1 -0
- package/lib/components/text-highlighter/index.js +2 -0
- package/lib/components/text-highlighter/index.js.map +1 -0
- package/lib/components/text-interpolation/YTi.js +47 -0
- package/lib/components/text-interpolation/YTi.js.map +1 -0
- package/lib/components/text-interpolation/index.js +2 -0
- package/lib/components/text-interpolation/index.js.map +1 -0
- package/lib/components/textarea/YTextarea.js +157 -0
- package/lib/components/textarea/YTextarea.js.map +1 -0
- package/lib/components/textarea/index.js +2 -0
- package/lib/components/textarea/index.js.map +1 -0
- package/lib/components/toggle-button/YToggleButton.js +2 -0
- package/lib/components/toggle-button/YToggleButton.js.map +1 -0
- package/lib/components/toggle-button/index.js +2 -0
- package/lib/components/toggle-button/index.js.map +1 -0
- package/lib/components/tooltip/YTooltip.js +157 -0
- package/lib/components/tooltip/YTooltip.js.map +1 -0
- package/lib/components/tooltip/index.js +2 -0
- package/lib/components/tooltip/index.js.map +1 -0
- package/lib/components/transitions/expand-transition.js +109 -0
- package/lib/components/transitions/expand-transition.js.map +1 -0
- package/lib/components/transitions/index.js +4 -0
- package/lib/components/transitions/index.js.map +1 -0
- package/lib/components/tree-view/YTreeView.js +290 -0
- package/lib/components/tree-view/YTreeView.js.map +1 -0
- package/lib/components/tree-view/YTreeViewNode.js +250 -0
- package/lib/components/tree-view/YTreeViewNode.js.map +1 -0
- package/lib/components/tree-view/index.js +3 -0
- package/lib/components/tree-view/index.js.map +1 -0
- package/lib/components/tree-view/tree-view.js +179 -0
- package/lib/components/tree-view/tree-view.js.map +1 -0
- package/lib/components/tree-view/types.js +2 -0
- package/lib/components/tree-view/types.js.map +1 -0
- package/lib/components/tree-view/util.js +40 -0
- package/lib/components/tree-view/util.js.map +1 -0
- package/lib/composables/choice-link.js +13 -0
- package/lib/composables/choice-link.js.map +1 -0
- package/lib/composables/choice.js +187 -0
- package/lib/composables/choice.js.map +1 -0
- package/lib/composables/communication.js +55 -0
- package/lib/composables/communication.js.map +1 -0
- package/lib/composables/component.js +8 -0
- package/lib/composables/component.js.map +1 -0
- package/lib/composables/coordinate/arrangement.js +14 -0
- package/lib/composables/coordinate/arrangement.js.map +1 -0
- package/lib/composables/coordinate/index.js +67 -0
- package/lib/composables/coordinate/index.js.map +1 -0
- package/lib/composables/coordinate/levitation.js +315 -0
- package/lib/composables/coordinate/levitation.js.map +1 -0
- package/lib/composables/coordinate/types.js +2 -0
- package/lib/composables/coordinate/types.js.map +1 -0
- package/lib/composables/coordinate/utils/point.js +55 -0
- package/lib/composables/coordinate/utils/point.js.map +1 -0
- package/lib/composables/date/factory.js +12 -0
- package/lib/composables/date/factory.js.map +1 -0
- package/lib/composables/date/index.js +20 -0
- package/lib/composables/date/index.js.map +1 -0
- package/lib/composables/date/setting.js +11 -0
- package/lib/composables/date/setting.js.map +1 -0
- package/lib/composables/date/types.js +2 -0
- package/lib/composables/date/types.js.map +1 -0
- package/lib/composables/defaults/index.js +99 -0
- package/lib/composables/defaults/index.js.map +1 -0
- package/lib/composables/defaults/share.js +2 -0
- package/lib/composables/defaults/share.js.map +1 -0
- package/lib/composables/defaults/types.js +2 -0
- package/lib/composables/defaults/types.js.map +1 -0
- package/lib/composables/dimension.js +26 -0
- package/lib/composables/dimension.js.map +1 -0
- package/lib/composables/focus.js +29 -0
- package/lib/composables/focus.js.map +1 -0
- package/lib/composables/form.js +100 -0
- package/lib/composables/form.js.map +1 -0
- package/lib/composables/i18n/index.js +30 -0
- package/lib/composables/i18n/index.js.map +1 -0
- package/lib/composables/i18n/locale.js +5 -0
- package/lib/composables/i18n/locale.js.map +1 -0
- package/lib/composables/i18n/rtl.js +34 -0
- package/lib/composables/i18n/rtl.js.map +1 -0
- package/lib/composables/i18n/share.js +2 -0
- package/lib/composables/i18n/share.js.map +1 -0
- package/lib/composables/icon.js +164 -0
- package/lib/composables/icon.js.map +1 -0
- package/lib/composables/index.js +11 -0
- package/lib/composables/index.js.map +1 -0
- package/lib/composables/layer-group.js +66 -0
- package/lib/composables/layer-group.js.map +1 -0
- package/lib/composables/layout.js +13 -0
- package/lib/composables/layout.js.map +1 -0
- package/lib/composables/list-items.js +66 -0
- package/lib/composables/list-items.js.map +1 -0
- package/lib/composables/progress.js +26 -0
- package/lib/composables/progress.js.map +1 -0
- package/lib/composables/ref.js +13 -0
- package/lib/composables/ref.js.map +1 -0
- package/lib/composables/resize-observer.js +33 -0
- package/lib/composables/resize-observer.js.map +1 -0
- package/lib/composables/scope.js +26 -0
- package/lib/composables/scope.js.map +1 -0
- package/lib/composables/style-color.js +37 -0
- package/lib/composables/style-color.js.map +1 -0
- package/lib/composables/theme/factory.js +47 -0
- package/lib/composables/theme/factory.js.map +1 -0
- package/lib/composables/theme/helper.js +14 -0
- package/lib/composables/theme/helper.js.map +1 -0
- package/lib/composables/theme/index.js +187 -0
- package/lib/composables/theme/index.js.map +1 -0
- package/lib/composables/theme/setting.js +113 -0
- package/lib/composables/theme/setting.js.map +1 -0
- package/lib/composables/theme/types.js +2 -0
- package/lib/composables/theme/types.js.map +1 -0
- package/lib/composables/timing.js +102 -0
- package/lib/composables/timing.js.map +1 -0
- package/lib/composables/transition.js +51 -0
- package/lib/composables/transition.js.map +1 -0
- package/lib/composables/validation.js +126 -0
- package/lib/composables/validation.js.map +1 -0
- package/lib/composables/vue-router.js +32 -0
- package/lib/composables/vue-router.js.map +1 -0
- package/lib/directives/complement-click/index.js +78 -0
- package/lib/directives/complement-click/index.js.map +1 -0
- package/lib/directives/plate-wave/index.js +100 -0
- package/lib/directives/plate-wave/index.js.map +1 -0
- package/lib/directives/theme-class.js +24 -0
- package/lib/directives/theme-class.js.map +1 -0
- package/lib/etc/index.js +6 -0
- package/lib/etc/index.js.map +1 -0
- package/lib/i18n/built-in.js +77 -0
- package/lib/i18n/built-in.js.map +1 -0
- package/lib/i18n/config.js +82 -0
- package/lib/i18n/config.js.map +1 -0
- package/lib/i18n/types.js +2 -0
- package/lib/i18n/types.js.map +1 -0
- package/lib/index.js +103 -0
- package/lib/index.js.map +1 -0
- package/lib/locales/en.js +6 -0
- package/lib/locales/en.js.map +1 -0
- package/lib/locales/index.js +3 -0
- package/lib/locales/index.js.map +1 -0
- package/lib/locales/ko.js +6 -0
- package/lib/locales/ko.js.map +1 -0
- package/lib/mixins/di.js +19 -0
- package/lib/mixins/di.js.map +1 -0
- package/lib/mixins/rebind-attrs.js +37 -0
- package/lib/mixins/rebind-attrs.js.map +1 -0
- package/lib/types/index.js +2 -0
- package/lib/types/index.js.map +1 -0
- package/lib/util/anchor.js +53 -0
- package/lib/util/anchor.js.map +1 -0
- package/lib/util/array.js +13 -0
- package/lib/util/array.js.map +1 -0
- package/lib/util/collection.js +10 -0
- package/lib/util/collection.js.map +1 -0
- package/lib/util/color/apca.js +201 -0
- package/lib/util/color/apca.js.map +1 -0
- package/lib/util/color/const.js +6 -0
- package/lib/util/color/const.js.map +1 -0
- package/lib/util/color/contrast/contrast.js +149 -0
- package/lib/util/color/contrast/contrast.js.map +1 -0
- package/lib/util/color/conversion.js +310 -0
- package/lib/util/color/conversion.js.map +1 -0
- package/lib/util/color/hct/cam16.js +349 -0
- package/lib/util/color/hct/cam16.js.map +1 -0
- package/lib/util/color/hct/hct-solver.js +389 -0
- package/lib/util/color/hct/hct-solver.js.map +1 -0
- package/lib/util/color/hct/hct.js +153 -0
- package/lib/util/color/hct/hct.js.map +1 -0
- package/lib/util/color/hct/viewing-conditions.js +110 -0
- package/lib/util/color/hct/viewing-conditions.js.map +1 -0
- package/lib/util/color/index.js +40 -0
- package/lib/util/color/index.js.map +1 -0
- package/lib/util/color/palettes/core-palette.js +99 -0
- package/lib/util/color/palettes/core-palette.js.map +1 -0
- package/lib/util/color/palettes/tonal-palette.js +112 -0
- package/lib/util/color/palettes/tonal-palette.js.map +1 -0
- package/lib/util/color/types.js +2 -0
- package/lib/util/color/types.js.map +1 -0
- package/lib/util/color/utils/math-utils.js +139 -0
- package/lib/util/color/utils/math-utils.js.map +1 -0
- package/lib/util/common.js +107 -0
- package/lib/util/common.js.map +1 -0
- package/lib/util/component/component.js +26 -0
- package/lib/util/component/component.js.map +1 -0
- package/lib/util/component/index.js +65 -0
- package/lib/util/component/index.js.map +1 -0
- package/lib/util/component/inject-self.js +10 -0
- package/lib/util/component/inject-self.js.map +1 -0
- package/lib/util/component/props.js +41 -0
- package/lib/util/component/props.js.map +1 -0
- package/lib/util/component/types.js +2 -0
- package/lib/util/component/types.js.map +1 -0
- package/lib/util/date/adapters/yuyeon-date-adapter.js +111 -0
- package/lib/util/date/adapters/yuyeon-date-adapter.js.map +1 -0
- package/lib/util/date/built-in.js +416 -0
- package/lib/util/date/built-in.js.map +1 -0
- package/lib/util/date/index.js +4 -0
- package/lib/util/date/index.js.map +1 -0
- package/lib/util/date/types.js +2 -0
- package/lib/util/date/types.js.map +1 -0
- package/lib/util/debounce.js +114 -0
- package/lib/util/debounce.js.map +1 -0
- package/lib/util/dom.js +23 -0
- package/lib/util/dom.js.map +1 -0
- package/lib/util/environments.js +8 -0
- package/lib/util/environments.js.map +1 -0
- package/lib/util/frame-scheduler.js +29 -0
- package/lib/util/frame-scheduler.js.map +1 -0
- package/lib/util/index.js +17 -0
- package/lib/util/index.js.map +1 -0
- package/lib/util/reactivity.js +19 -0
- package/lib/util/reactivity.js.map +1 -0
- package/lib/util/rect.js +39 -0
- package/lib/util/rect.js.map +1 -0
- package/lib/util/scroll.js +28 -0
- package/lib/util/scroll.js.map +1 -0
- package/lib/util/string.js +69 -0
- package/lib/util/string.js.map +1 -0
- package/lib/util/ui.js +60 -0
- package/lib/util/ui.js.map +1 -0
- package/lib/util/validation.js +5 -0
- package/lib/util/validation.js.map +1 -0
- package/package.json +12 -12
- package/types/components/tree-view/YTreeView.d.ts +1 -0
- package/types/composables/theme/setting.d.ts +1 -0
- package/lib/abstract/items.mjs +0 -20
- package/lib/abstract/items.mjs.map +0 -1
- package/lib/components/alert/YAlert.mjs +0 -83
- package/lib/components/alert/YAlert.mjs.map +0 -1
- package/lib/components/alert/index.mjs +0 -2
- package/lib/components/alert/index.mjs.map +0 -1
- package/lib/components/app/YApp.mjs +0 -21
- package/lib/components/app/YApp.mjs.map +0 -1
- package/lib/components/app/index.mjs +0 -2
- package/lib/components/app/index.mjs.map +0 -1
- package/lib/components/badge/YBadge.mjs +0 -83
- package/lib/components/badge/YBadge.mjs.map +0 -1
- package/lib/components/badge/index.mjs +0 -2
- package/lib/components/badge/index.mjs.map +0 -1
- package/lib/components/bench/YBench.mjs +0 -43
- package/lib/components/bench/YBench.mjs.map +0 -1
- package/lib/components/bench/index.mjs +0 -2
- package/lib/components/bench/index.mjs.map +0 -1
- package/lib/components/button/YButton.mjs +0 -169
- package/lib/components/button/YButton.mjs.map +0 -1
- package/lib/components/button/index.mjs +0 -2
- package/lib/components/button/index.mjs.map +0 -1
- package/lib/components/card/YCard.mjs +0 -28
- package/lib/components/card/YCard.mjs.map +0 -1
- package/lib/components/card/YCardBody.mjs +0 -11
- package/lib/components/card/YCardBody.mjs.map +0 -1
- package/lib/components/card/YCardFooter.mjs +0 -11
- package/lib/components/card/YCardFooter.mjs.map +0 -1
- package/lib/components/card/YCardHeader.mjs +0 -11
- package/lib/components/card/YCardHeader.mjs.map +0 -1
- package/lib/components/card/index.mjs +0 -5
- package/lib/components/card/index.mjs.map +0 -1
- package/lib/components/checkbox/YCheckbox.mjs +0 -160
- package/lib/components/checkbox/YCheckbox.mjs.map +0 -1
- package/lib/components/checkbox/YInputCheckbox.mjs +0 -114
- package/lib/components/checkbox/YInputCheckbox.mjs.map +0 -1
- package/lib/components/checkbox/index.mjs +0 -4
- package/lib/components/checkbox/index.mjs.map +0 -1
- package/lib/components/chip/YChip.mjs +0 -39
- package/lib/components/chip/YChip.mjs.map +0 -1
- package/lib/components/chip/index.mjs +0 -2
- package/lib/components/chip/index.mjs.map +0 -1
- package/lib/components/date-picker/YDateCalendar.mjs +0 -243
- package/lib/components/date-picker/YDateCalendar.mjs.map +0 -1
- package/lib/components/date-picker/YDatePicker.mjs +0 -132
- package/lib/components/date-picker/YDatePicker.mjs.map +0 -1
- package/lib/components/date-picker/YDatePickerControl.mjs +0 -107
- package/lib/components/date-picker/YDatePickerControl.mjs.map +0 -1
- package/lib/components/date-picker/YMonthPicker.mjs +0 -64
- package/lib/components/date-picker/YMonthPicker.mjs.map +0 -1
- package/lib/components/date-picker/YYearPicker.mjs +0 -87
- package/lib/components/date-picker/YYearPicker.mjs.map +0 -1
- package/lib/components/date-picker/index.mjs +0 -4
- package/lib/components/date-picker/index.mjs.map +0 -1
- package/lib/components/default-provider/YDefaultProvider.mjs +0 -2
- package/lib/components/default-provider/YDefaultProvider.mjs.map +0 -1
- package/lib/components/default-provider/index.mjs +0 -2
- package/lib/components/default-provider/index.mjs.map +0 -1
- package/lib/components/dialog/YDialog.mjs +0 -213
- package/lib/components/dialog/YDialog.mjs.map +0 -1
- package/lib/components/dialog/index.mjs +0 -2
- package/lib/components/dialog/index.mjs.map +0 -1
- package/lib/components/divider/YDivider.mjs +0 -20
- package/lib/components/divider/YDivider.mjs.map +0 -1
- package/lib/components/divider/index.mjs +0 -2
- package/lib/components/divider/index.mjs.map +0 -1
- package/lib/components/draggable/YDraggable.mjs +0 -95
- package/lib/components/draggable/YDraggable.mjs.map +0 -1
- package/lib/components/dropdown/YDropdown.mjs +0 -109
- package/lib/components/dropdown/YDropdown.mjs.map +0 -1
- package/lib/components/dropdown/index.mjs +0 -2
- package/lib/components/dropdown/index.mjs.map +0 -1
- package/lib/components/field-input/YFieldInput.mjs +0 -229
- package/lib/components/field-input/YFieldInput.mjs.map +0 -1
- package/lib/components/field-input/index.mjs +0 -2
- package/lib/components/field-input/index.mjs.map +0 -1
- package/lib/components/form/YForm.mjs +0 -65
- package/lib/components/form/YForm.mjs.map +0 -1
- package/lib/components/form/index.mjs +0 -2
- package/lib/components/form/index.mjs.map +0 -1
- package/lib/components/hover/YHover.mjs +0 -54
- package/lib/components/hover/YHover.mjs.map +0 -1
- package/lib/components/hover/index.mjs +0 -2
- package/lib/components/hover/index.mjs.map +0 -1
- package/lib/components/icon/YIcon.mjs +0 -63
- package/lib/components/icon/YIcon.mjs.map +0 -1
- package/lib/components/icon/index.mjs +0 -2
- package/lib/components/icon/index.mjs.map +0 -1
- package/lib/components/icon/poly.mjs +0 -57
- package/lib/components/icon/poly.mjs.map +0 -1
- package/lib/components/icons/YIconCheckbox.mjs +0 -32
- package/lib/components/icons/YIconCheckbox.mjs.map +0 -1
- package/lib/components/icons/YIconClear.mjs +0 -16
- package/lib/components/icons/YIconClear.mjs.map +0 -1
- package/lib/components/icons/YIconDropdown.mjs +0 -16
- package/lib/components/icons/YIconDropdown.mjs.map +0 -1
- package/lib/components/icons/YIconExpand.mjs +0 -20
- package/lib/components/icons/YIconExpand.mjs.map +0 -1
- package/lib/components/icons/YIconPageControl.mjs +0 -32
- package/lib/components/icons/YIconPageControl.mjs.map +0 -1
- package/lib/components/icons/YIconSort.mjs +0 -45
- package/lib/components/icons/YIconSort.mjs.map +0 -1
- package/lib/components/icons/index.mjs +0 -32
- package/lib/components/icons/index.mjs.map +0 -1
- package/lib/components/img/YImg.mjs +0 -173
- package/lib/components/img/YImg.mjs.map +0 -1
- package/lib/components/img/index.mjs +0 -2
- package/lib/components/img/index.mjs.map +0 -1
- package/lib/components/index.mjs +0 -39
- package/lib/components/index.mjs.map +0 -1
- package/lib/components/input/YInput.mjs +0 -258
- package/lib/components/input/YInput.mjs.map +0 -1
- package/lib/components/input/index.mjs +0 -2
- package/lib/components/input/index.mjs.map +0 -1
- package/lib/components/ip-field/YIpv4Field.mjs +0 -297
- package/lib/components/ip-field/YIpv4Field.mjs.map +0 -1
- package/lib/components/ip-field/index.mjs +0 -2
- package/lib/components/ip-field/index.mjs.map +0 -1
- package/lib/components/layer/YLayer.mjs +0 -326
- package/lib/components/layer/YLayer.mjs.map +0 -1
- package/lib/components/layer/active-delay.mjs +0 -28
- package/lib/components/layer/active-delay.mjs.map +0 -1
- package/lib/components/layer/active-stack.mjs +0 -52
- package/lib/components/layer/active-stack.mjs.map +0 -1
- package/lib/components/layer/base.mjs +0 -87
- package/lib/components/layer/base.mjs.map +0 -1
- package/lib/components/layer/content.mjs +0 -22
- package/lib/components/layer/content.mjs.map +0 -1
- package/lib/components/layer/index.mjs +0 -2
- package/lib/components/layer/index.mjs.map +0 -1
- package/lib/components/layer/scroll-strategies.mjs +0 -132
- package/lib/components/layer/scroll-strategies.mjs.map +0 -1
- package/lib/components/list/YList.mjs +0 -55
- package/lib/components/list/YList.mjs.map +0 -1
- package/lib/components/list/YListItem.mjs +0 -59
- package/lib/components/list/YListItem.mjs.map +0 -1
- package/lib/components/list/index.mjs +0 -3
- package/lib/components/list/index.mjs.map +0 -1
- package/lib/components/loading/YSpinnerRing.mjs +0 -25
- package/lib/components/loading/YSpinnerRing.mjs.map +0 -1
- package/lib/components/loading/index.mjs +0 -2
- package/lib/components/loading/index.mjs.map +0 -1
- package/lib/components/menu/YMenu.mjs +0 -211
- package/lib/components/menu/YMenu.mjs.map +0 -1
- package/lib/components/menu/index.mjs +0 -2
- package/lib/components/menu/index.mjs.map +0 -1
- package/lib/components/navigation/YNavigation.mjs +0 -18
- package/lib/components/navigation/YNavigation.mjs.map +0 -1
- package/lib/components/navigation/index.mjs +0 -2
- package/lib/components/navigation/index.mjs.map +0 -1
- package/lib/components/pagination/YPagination.mjs +0 -288
- package/lib/components/pagination/YPagination.mjs.map +0 -1
- package/lib/components/pagination/index.mjs +0 -2
- package/lib/components/pagination/index.mjs.map +0 -1
- package/lib/components/panel/YDividePanel.mjs +0 -90
- package/lib/components/panel/YDividePanel.mjs.map +0 -1
- package/lib/components/panel/index.mjs +0 -2
- package/lib/components/panel/index.mjs.map +0 -1
- package/lib/components/plate/YPlate.mjs +0 -28
- package/lib/components/plate/YPlate.mjs.map +0 -1
- package/lib/components/plate/index.mjs +0 -2
- package/lib/components/plate/index.mjs.map +0 -1
- package/lib/components/progress-bar/YProgressBar.mjs +0 -117
- package/lib/components/progress-bar/YProgressBar.mjs.map +0 -1
- package/lib/components/progress-bar/index.mjs +0 -2
- package/lib/components/progress-bar/index.mjs.map +0 -1
- package/lib/components/progress-ring/YProgressRing.mjs +0 -128
- package/lib/components/progress-ring/YProgressRing.mjs.map +0 -1
- package/lib/components/progress-ring/index.mjs +0 -2
- package/lib/components/progress-ring/index.mjs.map +0 -1
- package/lib/components/select/YSelect.mjs +0 -344
- package/lib/components/select/YSelect.mjs.map +0 -1
- package/lib/components/select/index.mjs +0 -2
- package/lib/components/select/index.mjs.map +0 -1
- package/lib/components/slider/YSlider.mjs +0 -26
- package/lib/components/slider/YSlider.mjs.map +0 -1
- package/lib/components/slider/index.mjs +0 -2
- package/lib/components/slider/index.mjs.map +0 -1
- package/lib/components/snackbar/YSnackbar.mjs +0 -209
- package/lib/components/snackbar/YSnackbar.mjs.map +0 -1
- package/lib/components/snackbar/index.mjs +0 -2
- package/lib/components/snackbar/index.mjs.map +0 -1
- package/lib/components/switch/YSwitch.mjs +0 -184
- package/lib/components/switch/YSwitch.mjs.map +0 -1
- package/lib/components/switch/index.mjs +0 -2
- package/lib/components/switch/index.mjs.map +0 -1
- package/lib/components/tab/YTab.mjs +0 -64
- package/lib/components/tab/YTab.mjs.map +0 -1
- package/lib/components/tab/YTabs.mjs +0 -86
- package/lib/components/tab/YTabs.mjs.map +0 -1
- package/lib/components/tab/index.mjs +0 -4
- package/lib/components/tab/index.mjs.map +0 -1
- package/lib/components/tab/shared.mjs +0 -2
- package/lib/components/tab/shared.mjs.map +0 -1
- package/lib/components/tab/types.mjs +0 -2
- package/lib/components/tab/types.mjs.map +0 -1
- package/lib/components/table/YDataTable.mjs +0 -182
- package/lib/components/table/YDataTable.mjs.map +0 -1
- package/lib/components/table/YDataTableBody.mjs +0 -131
- package/lib/components/table/YDataTableBody.mjs.map +0 -1
- package/lib/components/table/YDataTableCell.mjs +0 -78
- package/lib/components/table/YDataTableCell.mjs.map +0 -1
- package/lib/components/table/YDataTableControl.mjs +0 -46
- package/lib/components/table/YDataTableControl.mjs.map +0 -1
- package/lib/components/table/YDataTableHead.mjs +0 -172
- package/lib/components/table/YDataTableHead.mjs.map +0 -1
- package/lib/components/table/YDataTableLayer.mjs +0 -29
- package/lib/components/table/YDataTableLayer.mjs.map +0 -1
- package/lib/components/table/YDataTableRow.mjs +0 -150
- package/lib/components/table/YDataTableRow.mjs.map +0 -1
- package/lib/components/table/YDataTableServer.mjs +0 -173
- package/lib/components/table/YDataTableServer.mjs.map +0 -1
- package/lib/components/table/YTable.mjs +0 -77
- package/lib/components/table/YTable.mjs.map +0 -1
- package/lib/components/table/composibles/header.mjs +0 -127
- package/lib/components/table/composibles/header.mjs.map +0 -1
- package/lib/components/table/composibles/items.mjs +0 -52
- package/lib/components/table/composibles/items.mjs.map +0 -1
- package/lib/components/table/composibles/measure.mjs +0 -39
- package/lib/components/table/composibles/measure.mjs.map +0 -1
- package/lib/components/table/composibles/options.mjs +0 -33
- package/lib/components/table/composibles/options.mjs.map +0 -1
- package/lib/components/table/composibles/pagination.mjs +0 -99
- package/lib/components/table/composibles/pagination.mjs.map +0 -1
- package/lib/components/table/composibles/selection.mjs +0 -196
- package/lib/components/table/composibles/selection.mjs.map +0 -1
- package/lib/components/table/composibles/sorted-items.mjs +0 -50
- package/lib/components/table/composibles/sorted-items.mjs.map +0 -1
- package/lib/components/table/composibles/sorting.mjs +0 -73
- package/lib/components/table/composibles/sorting.mjs.map +0 -1
- package/lib/components/table/index.mjs +0 -9
- package/lib/components/table/index.mjs.map +0 -1
- package/lib/components/table/types/common.mjs +0 -2
- package/lib/components/table/types/common.mjs.map +0 -1
- package/lib/components/table/types/header.mjs +0 -2
- package/lib/components/table/types/header.mjs.map +0 -1
- package/lib/components/table/types/index.mjs +0 -2
- package/lib/components/table/types/index.mjs.map +0 -1
- package/lib/components/table/types/item.mjs +0 -2
- package/lib/components/table/types/item.mjs.map +0 -1
- package/lib/components/table/types/row.mjs +0 -2
- package/lib/components/table/types/row.mjs.map +0 -1
- package/lib/components/text-ellipsis/YTextEllipsis.mjs +0 -66
- package/lib/components/text-ellipsis/YTextEllipsis.mjs.map +0 -1
- package/lib/components/text-ellipsis/index.mjs +0 -2
- package/lib/components/text-ellipsis/index.mjs.map +0 -1
- package/lib/components/text-highlighter/YTextHighlighter.mjs +0 -95
- package/lib/components/text-highlighter/YTextHighlighter.mjs.map +0 -1
- package/lib/components/text-highlighter/index.mjs +0 -2
- package/lib/components/text-highlighter/index.mjs.map +0 -1
- package/lib/components/text-interpolation/YTi.mjs +0 -47
- package/lib/components/text-interpolation/YTi.mjs.map +0 -1
- package/lib/components/text-interpolation/index.mjs +0 -2
- package/lib/components/text-interpolation/index.mjs.map +0 -1
- package/lib/components/textarea/YTextarea.mjs +0 -157
- package/lib/components/textarea/YTextarea.mjs.map +0 -1
- package/lib/components/textarea/index.mjs +0 -2
- package/lib/components/textarea/index.mjs.map +0 -1
- package/lib/components/toggle-button/YToggleButton.mjs +0 -2
- package/lib/components/toggle-button/YToggleButton.mjs.map +0 -1
- package/lib/components/toggle-button/index.mjs +0 -2
- package/lib/components/toggle-button/index.mjs.map +0 -1
- package/lib/components/tooltip/YTooltip.mjs +0 -157
- package/lib/components/tooltip/YTooltip.mjs.map +0 -1
- package/lib/components/tooltip/index.mjs +0 -2
- package/lib/components/tooltip/index.mjs.map +0 -1
- package/lib/components/transitions/expand-transition.mjs +0 -109
- package/lib/components/transitions/expand-transition.mjs.map +0 -1
- package/lib/components/transitions/index.mjs +0 -4
- package/lib/components/transitions/index.mjs.map +0 -1
- package/lib/components/tree-view/YTreeView.mjs +0 -289
- package/lib/components/tree-view/YTreeView.mjs.map +0 -1
- package/lib/components/tree-view/YTreeViewNode.mjs +0 -250
- package/lib/components/tree-view/YTreeViewNode.mjs.map +0 -1
- package/lib/components/tree-view/index.mjs +0 -3
- package/lib/components/tree-view/index.mjs.map +0 -1
- package/lib/components/tree-view/tree-view.mjs +0 -179
- package/lib/components/tree-view/tree-view.mjs.map +0 -1
- package/lib/components/tree-view/types.mjs +0 -2
- package/lib/components/tree-view/types.mjs.map +0 -1
- package/lib/components/tree-view/util.mjs +0 -40
- package/lib/components/tree-view/util.mjs.map +0 -1
- package/lib/composables/choice-link.mjs +0 -13
- package/lib/composables/choice-link.mjs.map +0 -1
- package/lib/composables/choice.mjs +0 -187
- package/lib/composables/choice.mjs.map +0 -1
- package/lib/composables/communication.mjs +0 -55
- package/lib/composables/communication.mjs.map +0 -1
- package/lib/composables/component.mjs +0 -8
- package/lib/composables/component.mjs.map +0 -1
- package/lib/composables/coordinate/arrangement.mjs +0 -14
- package/lib/composables/coordinate/arrangement.mjs.map +0 -1
- package/lib/composables/coordinate/index.mjs +0 -67
- package/lib/composables/coordinate/index.mjs.map +0 -1
- package/lib/composables/coordinate/levitation.mjs +0 -315
- package/lib/composables/coordinate/levitation.mjs.map +0 -1
- package/lib/composables/coordinate/types.mjs +0 -2
- package/lib/composables/coordinate/types.mjs.map +0 -1
- package/lib/composables/coordinate/utils/point.mjs +0 -55
- package/lib/composables/coordinate/utils/point.mjs.map +0 -1
- package/lib/composables/date/factory.mjs +0 -12
- package/lib/composables/date/factory.mjs.map +0 -1
- package/lib/composables/date/index.mjs +0 -20
- package/lib/composables/date/index.mjs.map +0 -1
- package/lib/composables/date/setting.mjs +0 -11
- package/lib/composables/date/setting.mjs.map +0 -1
- package/lib/composables/date/types.mjs +0 -2
- package/lib/composables/date/types.mjs.map +0 -1
- package/lib/composables/defaults/index.mjs +0 -99
- package/lib/composables/defaults/index.mjs.map +0 -1
- package/lib/composables/defaults/share.mjs +0 -2
- package/lib/composables/defaults/share.mjs.map +0 -1
- package/lib/composables/defaults/types.mjs +0 -2
- package/lib/composables/defaults/types.mjs.map +0 -1
- package/lib/composables/dimension.mjs +0 -26
- package/lib/composables/dimension.mjs.map +0 -1
- package/lib/composables/focus.mjs +0 -29
- package/lib/composables/focus.mjs.map +0 -1
- package/lib/composables/form.mjs +0 -100
- package/lib/composables/form.mjs.map +0 -1
- package/lib/composables/group.mjs +0 -194
- package/lib/composables/group.mjs.map +0 -1
- package/lib/composables/i18n/index.mjs +0 -30
- package/lib/composables/i18n/index.mjs.map +0 -1
- package/lib/composables/i18n/locale.mjs +0 -5
- package/lib/composables/i18n/locale.mjs.map +0 -1
- package/lib/composables/i18n/rtl.mjs +0 -34
- package/lib/composables/i18n/rtl.mjs.map +0 -1
- package/lib/composables/i18n/share.mjs +0 -2
- package/lib/composables/i18n/share.mjs.map +0 -1
- package/lib/composables/icon.mjs +0 -164
- package/lib/composables/icon.mjs.map +0 -1
- package/lib/composables/index.mjs +0 -11
- package/lib/composables/index.mjs.map +0 -1
- package/lib/composables/layer-group.mjs +0 -66
- package/lib/composables/layer-group.mjs.map +0 -1
- package/lib/composables/layout.mjs +0 -13
- package/lib/composables/layout.mjs.map +0 -1
- package/lib/composables/list-items.mjs +0 -66
- package/lib/composables/list-items.mjs.map +0 -1
- package/lib/composables/progress.mjs +0 -26
- package/lib/composables/progress.mjs.map +0 -1
- package/lib/composables/ref.mjs +0 -13
- package/lib/composables/ref.mjs.map +0 -1
- package/lib/composables/resize-observer.mjs +0 -33
- package/lib/composables/resize-observer.mjs.map +0 -1
- package/lib/composables/scope.mjs +0 -26
- package/lib/composables/scope.mjs.map +0 -1
- package/lib/composables/style-color.mjs +0 -37
- package/lib/composables/style-color.mjs.map +0 -1
- package/lib/composables/theme/factory.mjs +0 -47
- package/lib/composables/theme/factory.mjs.map +0 -1
- package/lib/composables/theme/helper.mjs +0 -14
- package/lib/composables/theme/helper.mjs.map +0 -1
- package/lib/composables/theme/index.mjs +0 -187
- package/lib/composables/theme/index.mjs.map +0 -1
- package/lib/composables/theme/setting.mjs +0 -112
- package/lib/composables/theme/setting.mjs.map +0 -1
- package/lib/composables/theme/types.mjs +0 -2
- package/lib/composables/theme/types.mjs.map +0 -1
- package/lib/composables/timing.mjs +0 -102
- package/lib/composables/timing.mjs.map +0 -1
- package/lib/composables/transition.mjs +0 -51
- package/lib/composables/transition.mjs.map +0 -1
- package/lib/composables/validation.mjs +0 -126
- package/lib/composables/validation.mjs.map +0 -1
- package/lib/composables/vue-router.mjs +0 -32
- package/lib/composables/vue-router.mjs.map +0 -1
- package/lib/directives/complement-click/index.mjs +0 -78
- package/lib/directives/complement-click/index.mjs.map +0 -1
- package/lib/directives/plate-wave/index.mjs +0 -100
- package/lib/directives/plate-wave/index.mjs.map +0 -1
- package/lib/directives/theme-class.mjs +0 -24
- package/lib/directives/theme-class.mjs.map +0 -1
- package/lib/etc/index.mjs +0 -6
- package/lib/etc/index.mjs.map +0 -1
- package/lib/i18n/built-in.mjs +0 -77
- package/lib/i18n/built-in.mjs.map +0 -1
- package/lib/i18n/config.mjs +0 -82
- package/lib/i18n/config.mjs.map +0 -1
- package/lib/i18n/types.mjs +0 -2
- package/lib/i18n/types.mjs.map +0 -1
- package/lib/index.mjs +0 -103
- package/lib/index.mjs.map +0 -1
- package/lib/locales/en.mjs +0 -6
- package/lib/locales/en.mjs.map +0 -1
- package/lib/locales/index.mjs +0 -3
- package/lib/locales/index.mjs.map +0 -1
- package/lib/locales/ko.mjs +0 -6
- package/lib/locales/ko.mjs.map +0 -1
- package/lib/mixins/di.mjs +0 -19
- package/lib/mixins/di.mjs.map +0 -1
- package/lib/mixins/rebind-attrs.mjs +0 -37
- package/lib/mixins/rebind-attrs.mjs.map +0 -1
- package/lib/types/index.mjs +0 -2
- package/lib/types/index.mjs.map +0 -1
- package/lib/util/anchor.mjs +0 -53
- package/lib/util/anchor.mjs.map +0 -1
- package/lib/util/array.mjs +0 -13
- package/lib/util/array.mjs.map +0 -1
- package/lib/util/collection.mjs +0 -10
- package/lib/util/collection.mjs.map +0 -1
- package/lib/util/color/apca.mjs +0 -201
- package/lib/util/color/apca.mjs.map +0 -1
- package/lib/util/color/const.mjs +0 -6
- package/lib/util/color/const.mjs.map +0 -1
- package/lib/util/color/contrast/contrast.mjs +0 -149
- package/lib/util/color/contrast/contrast.mjs.map +0 -1
- package/lib/util/color/conversion.mjs +0 -310
- package/lib/util/color/conversion.mjs.map +0 -1
- package/lib/util/color/hct/cam16.mjs +0 -349
- package/lib/util/color/hct/cam16.mjs.map +0 -1
- package/lib/util/color/hct/hct-solver.mjs +0 -389
- package/lib/util/color/hct/hct-solver.mjs.map +0 -1
- package/lib/util/color/hct/hct.mjs +0 -153
- package/lib/util/color/hct/hct.mjs.map +0 -1
- package/lib/util/color/hct/viewing-conditions.mjs +0 -110
- package/lib/util/color/hct/viewing-conditions.mjs.map +0 -1
- package/lib/util/color/index.mjs +0 -40
- package/lib/util/color/index.mjs.map +0 -1
- package/lib/util/color/palettes/core-palette.mjs +0 -99
- package/lib/util/color/palettes/core-palette.mjs.map +0 -1
- package/lib/util/color/palettes/tonal-palette.mjs +0 -112
- package/lib/util/color/palettes/tonal-palette.mjs.map +0 -1
- package/lib/util/color/types.mjs +0 -2
- package/lib/util/color/types.mjs.map +0 -1
- package/lib/util/color/utils/math-utils.mjs +0 -139
- package/lib/util/color/utils/math-utils.mjs.map +0 -1
- package/lib/util/common.mjs +0 -107
- package/lib/util/common.mjs.map +0 -1
- package/lib/util/component/component.mjs +0 -26
- package/lib/util/component/component.mjs.map +0 -1
- package/lib/util/component/index.mjs +0 -65
- package/lib/util/component/index.mjs.map +0 -1
- package/lib/util/component/inject-self.mjs +0 -10
- package/lib/util/component/inject-self.mjs.map +0 -1
- package/lib/util/component/props.mjs +0 -41
- package/lib/util/component/props.mjs.map +0 -1
- package/lib/util/component/types.mjs +0 -2
- package/lib/util/component/types.mjs.map +0 -1
- package/lib/util/date/adapters/yuyeon-date-adapter.mjs +0 -111
- package/lib/util/date/adapters/yuyeon-date-adapter.mjs.map +0 -1
- package/lib/util/date/built-in.mjs +0 -416
- package/lib/util/date/built-in.mjs.map +0 -1
- package/lib/util/date/index.mjs +0 -4
- package/lib/util/date/index.mjs.map +0 -1
- package/lib/util/date/types.mjs +0 -2
- package/lib/util/date/types.mjs.map +0 -1
- package/lib/util/debounce.mjs +0 -114
- package/lib/util/debounce.mjs.map +0 -1
- package/lib/util/dom.mjs +0 -23
- package/lib/util/dom.mjs.map +0 -1
- package/lib/util/environments.mjs +0 -8
- package/lib/util/environments.mjs.map +0 -1
- package/lib/util/frame-scheduler.mjs +0 -29
- package/lib/util/frame-scheduler.mjs.map +0 -1
- package/lib/util/index.mjs +0 -17
- package/lib/util/index.mjs.map +0 -1
- package/lib/util/parser.mjs +0 -31
- package/lib/util/parser.mjs.map +0 -1
- package/lib/util/reactivity.mjs +0 -19
- package/lib/util/reactivity.mjs.map +0 -1
- package/lib/util/rect.mjs +0 -39
- package/lib/util/rect.mjs.map +0 -1
- package/lib/util/scroll.mjs +0 -28
- package/lib/util/scroll.mjs.map +0 -1
- package/lib/util/string.mjs +0 -69
- package/lib/util/string.mjs.map +0 -1
- package/lib/util/ui.mjs +0 -60
- package/lib/util/ui.mjs.map +0 -1
- package/lib/util/validation.mjs +0 -5
- package/lib/util/validation.mjs.map +0 -1
- package/lib/util/vue-component/index.mjs +0 -63
- package/lib/util/vue-component/index.mjs.map +0 -1
- package/lib/util/vue-component/props.mjs +0 -37
- package/lib/util/vue-component/props.mjs.map +0 -1
- package/lib/util/vue-component/types.mjs +0 -2
- package/lib/util/vue-component/types.mjs.map +0 -1
- package/lib/util/vue-component.mjs +0 -102
- package/lib/util/vue-component.mjs.map +0 -1
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
import { mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
|
|
2
|
-
import { computed, getCurrentInstance, mergeProps, onBeforeMount, ref, resolveComponent } from 'vue';
|
|
3
|
-
import { pressItemsPropsOptions } from "../../abstract/items.mjs";
|
|
4
|
-
import { useTreeView } from "./tree-view.mjs";
|
|
5
|
-
import { useRender } from "../../composables/component.mjs";
|
|
6
|
-
import { getObjectValueByPath } from "../../util/common.mjs";
|
|
7
|
-
import { defineComponent } from "../../util/component/index.mjs";
|
|
8
|
-
import { propsFactory } from "../../util/component/index.mjs";
|
|
9
|
-
import { YButton } from "../button/index.mjs";
|
|
10
|
-
import { YIconCheckbox, YIconExpand } from "../icons/index.mjs";
|
|
11
|
-
import { YPlate } from "../plate/index.mjs";
|
|
12
|
-
import { YTextHighlighter } from "../text-highlighter/YTextHighlighter.mjs";
|
|
13
|
-
import { YExpandVTransition } from "../transitions/index.mjs";
|
|
14
|
-
export const pressYTreeViewNodeProps = propsFactory({
|
|
15
|
-
search: String,
|
|
16
|
-
disableTransition: Boolean,
|
|
17
|
-
enableActive: Boolean,
|
|
18
|
-
activeClass: [String, Array],
|
|
19
|
-
activeSingleModifier: String,
|
|
20
|
-
requiredActive: Boolean,
|
|
21
|
-
activeColor: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: 'primary'
|
|
24
|
-
},
|
|
25
|
-
enableSelect: Boolean,
|
|
26
|
-
onMouseenterContainer: Function,
|
|
27
|
-
onMouseleaveContainer: Function,
|
|
28
|
-
onMousemoveContainer: Function,
|
|
29
|
-
...pressItemsPropsOptions({
|
|
30
|
-
itemKey: 'id'
|
|
31
|
-
})
|
|
32
|
-
}, 'YTreeViewNode');
|
|
33
|
-
export const YTreeViewNode = defineComponent({
|
|
34
|
-
name: 'YTreeNode',
|
|
35
|
-
components: {
|
|
36
|
-
YButton,
|
|
37
|
-
YIconExpand,
|
|
38
|
-
YPlate,
|
|
39
|
-
YIconCheckbox
|
|
40
|
-
},
|
|
41
|
-
props: {
|
|
42
|
-
item: {
|
|
43
|
-
type: Object
|
|
44
|
-
},
|
|
45
|
-
level: {
|
|
46
|
-
type: Number,
|
|
47
|
-
default: 0
|
|
48
|
-
},
|
|
49
|
-
...pressYTreeViewNodeProps()
|
|
50
|
-
},
|
|
51
|
-
slots: Object,
|
|
52
|
-
setup(props, _ref) {
|
|
53
|
-
let {
|
|
54
|
-
slots,
|
|
55
|
-
expose
|
|
56
|
-
} = _ref;
|
|
57
|
-
const YTreeNode = resolveComponent('YTreeViewNode', true);
|
|
58
|
-
const vm = getCurrentInstance();
|
|
59
|
-
const treeView = useTreeView();
|
|
60
|
-
const container$ = ref();
|
|
61
|
-
const expanded = ref(false);
|
|
62
|
-
const active = ref(false);
|
|
63
|
-
const selected = ref(false);
|
|
64
|
-
const immediate = ref(false);
|
|
65
|
-
const children = computed(() => {
|
|
66
|
-
return (getObjectValueByPath(props.item, props.itemChildren) ?? []).slice();
|
|
67
|
-
});
|
|
68
|
-
const imLeaf = computed(() => children.value.length < 1);
|
|
69
|
-
const classes = computed(() => {
|
|
70
|
-
return {
|
|
71
|
-
'y-tree-view-node': true,
|
|
72
|
-
'y-tree-view-node--leaf': imLeaf.value,
|
|
73
|
-
'y-tree-view-node--expanded': expanded.value,
|
|
74
|
-
'y-tree-view-node--active': active.value
|
|
75
|
-
};
|
|
76
|
-
});
|
|
77
|
-
const styles = computed(() => {
|
|
78
|
-
return {
|
|
79
|
-
'--tree-view-node--level': props.level
|
|
80
|
-
};
|
|
81
|
-
});
|
|
82
|
-
const contentText = computed(() => {
|
|
83
|
-
return getObjectValueByPath(props.item, props.itemText) ?? '';
|
|
84
|
-
});
|
|
85
|
-
const slotProps = computed(() => {
|
|
86
|
-
return {
|
|
87
|
-
level: props.level,
|
|
88
|
-
imLeaf: imLeaf.value
|
|
89
|
-
};
|
|
90
|
-
});
|
|
91
|
-
const searchLoading = computed(() => {
|
|
92
|
-
return treeView.searchLoading.value;
|
|
93
|
-
});
|
|
94
|
-
const leaves = computed(() => {
|
|
95
|
-
return children.value.filter(leaf => {
|
|
96
|
-
return !treeView.isExcluded(getObjectValueByPath(leaf, props.itemKey));
|
|
97
|
-
});
|
|
98
|
-
});
|
|
99
|
-
function onClick(e) {
|
|
100
|
-
const to = !active.value;
|
|
101
|
-
active.value = to;
|
|
102
|
-
treeView.updateActive(myKey.value, to, e);
|
|
103
|
-
treeView.emitActive();
|
|
104
|
-
}
|
|
105
|
-
function onClickExpand(e) {
|
|
106
|
-
e.stopPropagation();
|
|
107
|
-
const to = !expanded.value;
|
|
108
|
-
expanded.value = to;
|
|
109
|
-
treeView.updateExpanded(myKey.value, to);
|
|
110
|
-
treeView.emitExpanded();
|
|
111
|
-
}
|
|
112
|
-
function onClickSelect(e) {
|
|
113
|
-
e.stopPropagation();
|
|
114
|
-
const to = !selected.value;
|
|
115
|
-
selected.value = to;
|
|
116
|
-
treeView.updateSelected(myKey.value, to);
|
|
117
|
-
treeView.emitSelected();
|
|
118
|
-
}
|
|
119
|
-
function onMouseenterContainer(e) {
|
|
120
|
-
props.onMouseenterContainer?.(e, {
|
|
121
|
-
...slotProps.value,
|
|
122
|
-
item: props.item
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
function onMouseleaveContainer(e) {
|
|
126
|
-
props.onMouseleaveContainer?.(e, {
|
|
127
|
-
...slotProps.value,
|
|
128
|
-
item: props.item
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
function onMousemoveContainer(e) {
|
|
132
|
-
props.onMousemoveContainer?.(e, {
|
|
133
|
-
...slotProps.value,
|
|
134
|
-
item: props.item
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
useRender(() => {
|
|
138
|
-
const indentSpacer = [];
|
|
139
|
-
for (let i = 0; i < props.level; i += 1) {
|
|
140
|
-
indentSpacer.push(_createVNode("div", {
|
|
141
|
-
"class": 'y-tree-view-node__indent-spacer'
|
|
142
|
-
}, null));
|
|
143
|
-
}
|
|
144
|
-
return _createVNode("div", {
|
|
145
|
-
"class": classes.value,
|
|
146
|
-
"style": styles.value,
|
|
147
|
-
"role": "treeitem",
|
|
148
|
-
"data-level": props.level
|
|
149
|
-
}, [_createVNode("div", {
|
|
150
|
-
"ref": container$,
|
|
151
|
-
"class": 'y-tree-view-node__container',
|
|
152
|
-
"onClick": e => props.enableActive ? onClick(e) : void 0,
|
|
153
|
-
"onMouseenter": props.onMouseenterContainer && onMouseenterContainer,
|
|
154
|
-
"onMouseleave": props.onMouseleaveContainer && onMouseleaveContainer,
|
|
155
|
-
"onMousemove": props.onMousemoveContainer && onMousemoveContainer
|
|
156
|
-
}, [_createVNode(YPlate, null, null), _createVNode("div", {
|
|
157
|
-
"class": 'y-tree-view-node__indents'
|
|
158
|
-
}, [indentSpacer]), !imLeaf.value && leaves.value.length > 0 ? _createVNode(YButton, {
|
|
159
|
-
"class": 'y-tree-view-node__expand-icon',
|
|
160
|
-
"variation": 'icon',
|
|
161
|
-
"onClick": onClickExpand
|
|
162
|
-
}, {
|
|
163
|
-
default: () => [slots['expand-icon'] ? slots['expand-icon']() : _createVNode(YIconExpand, null, null)]
|
|
164
|
-
}) : _createVNode("i", {
|
|
165
|
-
"class": 'y-tree-view-node__no-expand-icon'
|
|
166
|
-
}, null), props.enableSelect && _createVNode("div", {
|
|
167
|
-
"class": 'y-tree-view-node__select',
|
|
168
|
-
"onClick": onClickSelect
|
|
169
|
-
}, [_createVNode(YIconCheckbox, {
|
|
170
|
-
"checked": selected.value
|
|
171
|
-
}, null)]), _createVNode("div", {
|
|
172
|
-
"class": 'y-tree-view-node__content'
|
|
173
|
-
}, [slots.leading && _createVNode("div", {
|
|
174
|
-
"class": 'y-tree-view-node__leading'
|
|
175
|
-
}, [slots.leading(slotProps.value)]), _createVNode("div", {
|
|
176
|
-
"class": 'y-tree-view-node__text'
|
|
177
|
-
}, [slots.default ? slots.default?.({
|
|
178
|
-
text: contentText.value,
|
|
179
|
-
item: props.item,
|
|
180
|
-
...slotProps.value
|
|
181
|
-
}) : props.search && !searchLoading.value ? _createVNode(YTextHighlighter, {
|
|
182
|
-
"text": contentText.value,
|
|
183
|
-
"keyword": props.search
|
|
184
|
-
}, null) : contentText.value]), slots.trailing && _createVNode("div", {
|
|
185
|
-
"class": 'y-tree-view-node__trailing'
|
|
186
|
-
}, [slots.trailing(slotProps.value)])])]), children.value.length > 0 && _createVNode(YExpandVTransition, {
|
|
187
|
-
"disabled": props.disableTransition
|
|
188
|
-
}, {
|
|
189
|
-
default: () => [expanded.value && _createVNode("div", {
|
|
190
|
-
"class": ['y-tree-view-node__leaves'],
|
|
191
|
-
"role": "tree"
|
|
192
|
-
}, [leaves.value.map(item => {
|
|
193
|
-
return _createVNode(YTreeNode, _mergeProps(mergeProps(props), {
|
|
194
|
-
"key": getObjectValueByPath(item, props.itemKey),
|
|
195
|
-
"level": (props.level ?? 0) + 1,
|
|
196
|
-
"item": item
|
|
197
|
-
}), {
|
|
198
|
-
default: slots.default && function () {
|
|
199
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
200
|
-
args[_key] = arguments[_key];
|
|
201
|
-
}
|
|
202
|
-
return slots.default?.(...args);
|
|
203
|
-
},
|
|
204
|
-
'expand-icon': slots['expand-icon'] && function () {
|
|
205
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
206
|
-
args[_key2] = arguments[_key2];
|
|
207
|
-
}
|
|
208
|
-
return slots['expand-icon']?.(...args);
|
|
209
|
-
},
|
|
210
|
-
leading: slots.leading && function () {
|
|
211
|
-
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
212
|
-
args[_key3] = arguments[_key3];
|
|
213
|
-
}
|
|
214
|
-
return slots.leading?.(...args);
|
|
215
|
-
},
|
|
216
|
-
trailing: slots.trailing && function () {
|
|
217
|
-
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
218
|
-
args[_key4] = arguments[_key4];
|
|
219
|
-
}
|
|
220
|
-
return slots.trailing?.(...args);
|
|
221
|
-
}
|
|
222
|
-
});
|
|
223
|
-
})])]
|
|
224
|
-
})]);
|
|
225
|
-
});
|
|
226
|
-
const myKey = computed(() => {
|
|
227
|
-
return getObjectValueByPath(props.item, props.itemKey);
|
|
228
|
-
});
|
|
229
|
-
const nodeState = {
|
|
230
|
-
myKey,
|
|
231
|
-
expanded,
|
|
232
|
-
active,
|
|
233
|
-
selected,
|
|
234
|
-
immediate
|
|
235
|
-
};
|
|
236
|
-
expose(nodeState);
|
|
237
|
-
onBeforeMount(() => {
|
|
238
|
-
treeView?.register?.(myKey.value, nodeState);
|
|
239
|
-
});
|
|
240
|
-
return {
|
|
241
|
-
treeView,
|
|
242
|
-
myKey,
|
|
243
|
-
expanded,
|
|
244
|
-
active,
|
|
245
|
-
selected,
|
|
246
|
-
immediate
|
|
247
|
-
};
|
|
248
|
-
}
|
|
249
|
-
});
|
|
250
|
-
//# sourceMappingURL=YTreeViewNode.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"YTreeViewNode.mjs","names":["computed","getCurrentInstance","mergeProps","onBeforeMount","ref","resolveComponent","pressItemsPropsOptions","useTreeView","useRender","getObjectValueByPath","defineComponent","propsFactory","YButton","YIconCheckbox","YIconExpand","YPlate","YTextHighlighter","YExpandVTransition","pressYTreeViewNodeProps","search","String","disableTransition","Boolean","enableActive","activeClass","Array","activeSingleModifier","requiredActive","activeColor","type","default","enableSelect","onMouseenterContainer","Function","onMouseleaveContainer","onMousemoveContainer","itemKey","YTreeViewNode","name","components","props","item","Object","level","Number","slots","setup","_ref","expose","YTreeNode","vm","treeView","container$","expanded","active","selected","immediate","children","itemChildren","slice","imLeaf","value","length","classes","styles","contentText","itemText","slotProps","searchLoading","leaves","filter","leaf","isExcluded","onClick","e","to","updateActive","myKey","emitActive","onClickExpand","stopPropagation","updateExpanded","emitExpanded","onClickSelect","updateSelected","emitSelected","indentSpacer","i","push","_createVNode","leading","text","trailing","map","_mergeProps","_len","arguments","args","_key","_len2","_key2","_len3","_key3","_len4","_key4","nodeState","register"],"sources":["../../../src/components/tree-view/YTreeViewNode.tsx"],"sourcesContent":["import {\n type PropType,\n type SlotsType,\n type VNodeArrayChildren,\n computed,\n getCurrentInstance,\n mergeProps,\n onBeforeMount,\n ref,\n resolveComponent,\n} from 'vue';\n\nimport { pressItemsPropsOptions } from '@/abstract/items';\nimport { useTreeView } from '@/components/tree-view/tree-view';\nimport { useRender } from '@/composables/component';\nimport { getObjectValueByPath } from '@/util/common';\nimport { defineComponent } from '@/util/component';\nimport { propsFactory } from '@/util/component';\n\nimport { YButton } from '../button';\nimport { YIconCheckbox, YIconExpand } from '../icons';\nimport { YPlate } from '../plate';\nimport { YTextHighlighter } from '../text-highlighter/YTextHighlighter';\nimport { YExpandVTransition } from '../transitions';\n\nexport const pressYTreeViewNodeProps = propsFactory(\n {\n search: String,\n disableTransition: Boolean,\n enableActive: Boolean,\n activeClass: [String, Array],\n activeSingleModifier: String,\n requiredActive: Boolean,\n activeColor: {\n type: String,\n default: 'primary',\n },\n enableSelect: Boolean,\n onMouseenterContainer: Function,\n onMouseleaveContainer: Function,\n onMousemoveContainer: Function,\n ...pressItemsPropsOptions({\n itemKey: 'id',\n }),\n },\n 'YTreeViewNode',\n);\n\nexport const YTreeViewNode = defineComponent({\n name: 'YTreeNode',\n components: {\n YButton,\n YIconExpand,\n YPlate,\n YIconCheckbox,\n },\n props: {\n item: {\n type: Object as PropType<any>,\n },\n level: {\n type: Number as PropType<number>,\n default: 0,\n },\n ...pressYTreeViewNodeProps(),\n },\n slots: Object as SlotsType<{\n default: any;\n 'expand-icon': any;\n leading: any;\n trailing: any;\n }>,\n setup(props, { slots, expose }) {\n const YTreeNode = resolveComponent('YTreeViewNode', true) as any;\n const vm = getCurrentInstance();\n const treeView = useTreeView();\n const container$ = ref<HTMLElement>();\n\n const expanded = ref(false);\n const active = ref(false);\n const selected = ref(false);\n const immediate = ref(false);\n\n const children = computed(() => {\n return (\n getObjectValueByPath(props.item, props.itemChildren as string) ?? []\n ).slice();\n });\n\n const imLeaf = computed(() => children.value.length < 1);\n\n const classes = computed(() => {\n return {\n 'y-tree-view-node': true,\n 'y-tree-view-node--leaf': imLeaf.value,\n 'y-tree-view-node--expanded': expanded.value,\n 'y-tree-view-node--active': active.value,\n };\n });\n\n const styles = computed(() => {\n return {\n '--tree-view-node--level': props.level,\n };\n });\n\n const contentText = computed(() => {\n return getObjectValueByPath(props.item, props.itemText) ?? '';\n });\n\n const slotProps = computed(() => {\n return {\n level: props.level,\n imLeaf: imLeaf.value,\n };\n });\n\n const searchLoading = computed(() => {\n return treeView.searchLoading.value;\n });\n\n const leaves = computed(() => {\n return children.value.filter((leaf: any) => {\n return !treeView.isExcluded(getObjectValueByPath(leaf, props.itemKey));\n });\n });\n\n function onClick(e: MouseEvent) {\n const to = !active.value;\n active.value = to;\n treeView.updateActive(myKey.value, to, e);\n treeView.emitActive();\n }\n\n function onClickExpand(e: MouseEvent) {\n e.stopPropagation();\n const to = !expanded.value;\n expanded.value = to;\n treeView.updateExpanded(myKey.value, to);\n treeView.emitExpanded();\n }\n\n function onClickSelect(e: MouseEvent) {\n e.stopPropagation();\n const to = !selected.value;\n selected.value = to;\n treeView.updateSelected(myKey.value, to);\n treeView.emitSelected();\n }\n\n function onMouseenterContainer(e: MouseEvent) {\n props.onMouseenterContainer?.(e, {\n ...slotProps.value,\n item: props.item,\n });\n }\n\n function onMouseleaveContainer(e: MouseEvent) {\n props.onMouseleaveContainer?.(e, {\n ...slotProps.value,\n item: props.item,\n });\n }\n\n function onMousemoveContainer(e: MouseEvent) {\n props.onMousemoveContainer?.(e, { ...slotProps.value, item: props.item });\n }\n\n useRender(() => {\n const indentSpacer: VNodeArrayChildren = [];\n for (let i = 0; i < props.level; i += 1) {\n indentSpacer.push(\n <div class={'y-tree-view-node__indent-spacer'}></div>,\n );\n }\n\n return (\n <div\n class={classes.value}\n style={styles.value}\n role=\"treeitem\"\n data-level={props.level}\n >\n <div\n ref={container$}\n class={'y-tree-view-node__container'}\n onClick={(e: MouseEvent) =>\n props.enableActive ? onClick(e) : void 0\n }\n onMouseenter={props.onMouseenterContainer && onMouseenterContainer}\n onMouseleave={props.onMouseleaveContainer && onMouseleaveContainer}\n onMousemove={props.onMousemoveContainer && onMousemoveContainer}\n >\n <YPlate />\n <div class={'y-tree-view-node__indents'}>{indentSpacer}</div>\n {/* EXPAND */}\n {!imLeaf.value && leaves.value.length > 0 ? (\n <YButton\n class={'y-tree-view-node__expand-icon'}\n variation={'icon'}\n onClick={onClickExpand}\n >\n {slots['expand-icon'] ? (\n slots['expand-icon']()\n ) : (\n <YIconExpand></YIconExpand>\n )}\n </YButton>\n ) : (\n <i class={'y-tree-view-node__no-expand-icon'}></i>\n )}\n {/* SELECT */}\n {props.enableSelect && (\n <div class={'y-tree-view-node__select'} onClick={onClickSelect}>\n <YIconCheckbox checked={selected.value}></YIconCheckbox>\n </div>\n )}\n {/* CONTENT */}\n <div class={'y-tree-view-node__content'}>\n {slots.leading && (\n <div class={'y-tree-view-node__leading'}>\n {slots.leading(slotProps.value)}\n </div>\n )}\n <div class={'y-tree-view-node__text'}>\n {slots.default ? (\n slots.default?.({\n text: contentText.value,\n item: props.item,\n ...slotProps.value,\n })\n ) : props.search && !searchLoading.value ? (\n <YTextHighlighter\n text={contentText.value}\n keyword={props.search}\n ></YTextHighlighter>\n ) : (\n contentText.value\n )}\n </div>\n {slots.trailing && (\n <div class={'y-tree-view-node__trailing'}>\n {slots.trailing(slotProps.value)}\n </div>\n )}\n </div>\n </div>\n {/* CHILDREN */}\n {children.value.length > 0 && (\n <YExpandVTransition disabled={props.disableTransition}>\n {expanded.value && (\n <div class={['y-tree-view-node__leaves']} role=\"tree\">\n {leaves.value.map((item: any) => {\n return (\n <YTreeNode\n {...mergeProps(props)}\n key={getObjectValueByPath(item, props.itemKey)}\n level={(props.level ?? 0) + 1}\n item={item}\n >\n {{\n default:\n slots.default &&\n ((...args: any[]) => slots.default?.(...args)),\n 'expand-icon':\n slots['expand-icon'] &&\n ((...args: any[]) =>\n slots['expand-icon']?.(...args)),\n leading:\n slots.leading &&\n ((...args: any[]) => slots.leading?.(...args)),\n trailing:\n slots.trailing &&\n ((...args: any[]) => slots.trailing?.(...args)),\n }}\n </YTreeNode>\n );\n })}\n </div>\n )}\n </YExpandVTransition>\n )}\n </div>\n );\n });\n\n const myKey = computed(() => {\n return getObjectValueByPath(props.item, props.itemKey);\n });\n\n const nodeState = {\n myKey,\n expanded,\n active,\n selected,\n immediate,\n };\n\n expose(nodeState);\n\n onBeforeMount(() => {\n treeView?.register?.(myKey.value, nodeState);\n });\n\n return {\n treeView,\n myKey,\n expanded,\n active,\n selected,\n immediate,\n };\n },\n});\n\nexport type YTreeNode = InstanceType<typeof YTreeViewNode>;\n"],"mappings":";AAAA,SAIEA,QAAQ,EACRC,kBAAkB,EAClBC,UAAU,EACVC,aAAa,EACbC,GAAG,EACHC,gBA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;MACLxB,QAAQ;MACRC,MAAM;MACNC,QAAQ;MACRC;IACF,CAAC;EACH;AACF,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/components/tree-view/index.ts"],"sourcesContent":["export * from './YTreeViewNode';\nexport * from './YTreeView';\n"],"mappings":""}
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import { inject, provide, ref, shallowRef } from 'vue';
|
|
2
|
-
import { useModelDuplex } from "../../composables/index.mjs";
|
|
3
|
-
import { getObjectValueByPath } from "../../util/index.mjs";
|
|
4
|
-
export const Y_TREE_VIEW = Symbol.for('YTreeView');
|
|
5
|
-
|
|
6
|
-
// TODO: props type
|
|
7
|
-
export function provideTreeView(props) {
|
|
8
|
-
const nodes = ref({});
|
|
9
|
-
const expanded = useModelDuplex(props, 'expanded');
|
|
10
|
-
const active = useModelDuplex(props, 'active');
|
|
11
|
-
const selected = useModelDuplex(props, 'selected');
|
|
12
|
-
const expandedSet = ref(new Set());
|
|
13
|
-
const selectedSet = ref(new Set());
|
|
14
|
-
const activeSet = ref(new Set());
|
|
15
|
-
const searchLoading = shallowRef(false);
|
|
16
|
-
const excludedSet = ref(new Set());
|
|
17
|
-
|
|
18
|
-
// Utils
|
|
19
|
-
function getDescendants(key) {
|
|
20
|
-
const descendants = [];
|
|
21
|
-
const {
|
|
22
|
-
childKeys
|
|
23
|
-
} = nodes.value[key];
|
|
24
|
-
descendants.push(...childKeys);
|
|
25
|
-
const remains = childKeys.slice();
|
|
26
|
-
while (remains.length > 0) {
|
|
27
|
-
const childKey = remains.splice(0, 1)[0];
|
|
28
|
-
const item = nodes.value[childKey];
|
|
29
|
-
if (item) {
|
|
30
|
-
descendants.push(...item.childKeys);
|
|
31
|
-
remains.push(...item.childKeys);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return descendants;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// Search
|
|
38
|
-
function isExcluded(key) {
|
|
39
|
-
return !!props.search && excludedSet.value.has(key);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
//
|
|
43
|
-
function issueVnodeState(key) {
|
|
44
|
-
const node = nodes.value[key];
|
|
45
|
-
if (node?.vnode) {
|
|
46
|
-
node.vnode.active = node.active;
|
|
47
|
-
node.vnode.selected = node.selected;
|
|
48
|
-
node.vnode.indeterminate = node.indeterminate;
|
|
49
|
-
node.vnode.expanded = node.expanded;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// Update
|
|
54
|
-
function updateExpanded(key, to) {
|
|
55
|
-
if (!(key in nodes.value)) return;
|
|
56
|
-
const node = nodes.value[key];
|
|
57
|
-
const children = getObjectValueByPath(node.item, props.itemChildren);
|
|
58
|
-
if (Array.isArray(children) && children.length > 0) {
|
|
59
|
-
to ? expandedSet.value.add(key) : expandedSet.value.delete(key);
|
|
60
|
-
node.expanded = to;
|
|
61
|
-
issueVnodeState(key);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
function updateActive(key, to, event) {
|
|
65
|
-
if (!(key in nodes.value)) return;
|
|
66
|
-
const node = nodes.value[key];
|
|
67
|
-
let inactiveKey = !to ? key : '';
|
|
68
|
-
if (!props.multipleActive && to && !activeSet.value.has(key)) {
|
|
69
|
-
[inactiveKey] = [...activeSet.value];
|
|
70
|
-
}
|
|
71
|
-
if (to) {
|
|
72
|
-
activeSet.value.add(key);
|
|
73
|
-
node.active = true;
|
|
74
|
-
issueVnodeState(key);
|
|
75
|
-
} else {
|
|
76
|
-
if (props.requiredActive && activeSet.value.size === 1 && key === inactiveKey) {
|
|
77
|
-
issueVnodeState(key);
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
if (inactiveKey && inactiveKey in nodes.value) {
|
|
82
|
-
activeSet.value.delete(inactiveKey);
|
|
83
|
-
nodes.value[inactiveKey].active = false;
|
|
84
|
-
issueVnodeState(inactiveKey);
|
|
85
|
-
}
|
|
86
|
-
if (props.activeSingleModifier && event?.getModifierState(props.activeSingleModifier)) {
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
if (props.multipleActive && props.activeStrategy === 'cascade') {
|
|
90
|
-
for (const descendant of getDescendants(key)) {
|
|
91
|
-
if (descendant in nodes.value) {
|
|
92
|
-
to ? activeSet.value.add(descendant) : activeSet.value.delete(descendant);
|
|
93
|
-
nodes.value[descendant].active = to;
|
|
94
|
-
issueVnodeState(descendant);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
function updateSelected(key, to) {
|
|
100
|
-
if (!(key in nodes.value)) return;
|
|
101
|
-
const node = nodes.value[key];
|
|
102
|
-
if (to) {
|
|
103
|
-
selectedSet.value.add(key);
|
|
104
|
-
node.selected = true;
|
|
105
|
-
}
|
|
106
|
-
if (!to && key in nodes.value) {
|
|
107
|
-
selectedSet.value.delete(key);
|
|
108
|
-
nodes.value[key].selected = false;
|
|
109
|
-
issueVnodeState(key);
|
|
110
|
-
}
|
|
111
|
-
if (props.selectStrategy === 'cascade') {
|
|
112
|
-
for (const descendant of getDescendants(key)) {
|
|
113
|
-
if (descendant in nodes.value) {
|
|
114
|
-
to ? selectedSet.value.add(descendant) : selectedSet.value.delete(descendant);
|
|
115
|
-
nodes.value[descendant].selected = to;
|
|
116
|
-
issueVnodeState(descendant);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// Emit
|
|
123
|
-
function emitExpanded() {
|
|
124
|
-
const arr = [...expandedSet.value];
|
|
125
|
-
expanded.value = props.returnItem ? arr.map(key => nodes.value[key].item) : arr;
|
|
126
|
-
}
|
|
127
|
-
function emitActive() {
|
|
128
|
-
const arr = [...activeSet.value];
|
|
129
|
-
active.value = props.returnItem ? arr.map(key => nodes.value[key].item) : arr;
|
|
130
|
-
}
|
|
131
|
-
function emitSelected() {
|
|
132
|
-
const arr = [...selectedSet.value];
|
|
133
|
-
selected.value = props.returnItem ? arr.map(key => nodes.value[key].item) : arr;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
// Inject
|
|
137
|
-
function register(key, vnode) {
|
|
138
|
-
if (nodes.value[key]) {
|
|
139
|
-
nodes.value[key].vnode = vnode;
|
|
140
|
-
}
|
|
141
|
-
issueVnodeState(key);
|
|
142
|
-
}
|
|
143
|
-
provide(Y_TREE_VIEW, {
|
|
144
|
-
register,
|
|
145
|
-
updateExpanded,
|
|
146
|
-
updateActive,
|
|
147
|
-
updateSelected,
|
|
148
|
-
searchLoading,
|
|
149
|
-
isExcluded,
|
|
150
|
-
emitExpanded,
|
|
151
|
-
emitActive,
|
|
152
|
-
emitSelected
|
|
153
|
-
});
|
|
154
|
-
return {
|
|
155
|
-
nodes,
|
|
156
|
-
expanded,
|
|
157
|
-
active,
|
|
158
|
-
selected,
|
|
159
|
-
issueVnodeState,
|
|
160
|
-
updateExpanded,
|
|
161
|
-
updateActive,
|
|
162
|
-
updateSelected,
|
|
163
|
-
emitExpanded,
|
|
164
|
-
emitActive,
|
|
165
|
-
emitSelected,
|
|
166
|
-
expandedSet,
|
|
167
|
-
selectedSet,
|
|
168
|
-
activeSet,
|
|
169
|
-
searchLoading,
|
|
170
|
-
excludedSet,
|
|
171
|
-
isExcluded
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
export function useTreeView() {
|
|
175
|
-
const instance = inject(Y_TREE_VIEW);
|
|
176
|
-
if (!instance) throw new Error('Not found provided YTreeView');
|
|
177
|
-
return instance;
|
|
178
|
-
}
|
|
179
|
-
//# sourceMappingURL=tree-view.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tree-view.mjs","names":["inject","provide","ref","shallowRef","useModelDuplex","getObjectValueByPath","Y_TREE_VIEW","Symbol","for","provideTreeView","props","nodes","expanded","active","selected","expandedSet","Set","selectedSet","activeSet","searchLoading","excludedSet","getDescendants","key","descendants","childKeys","value","push","remains","slice","length","childKey","splice","item","isExcluded","search","has","issueVnodeState","node","vnode","indeterminate","updateExpanded","to","children","itemChildren","Array","isArray","add","delete","updateActive","event","inactiveKey","multipleActive","requiredActive","size","activeSingleModifier","getModifierState","activeStrategy","descendant","updateSelected","selectStrategy","emitExpanded","arr","returnItem","map","emitActive","emitSelected","register","useTreeView","instance","Error"],"sources":["../../../src/components/tree-view/tree-view.ts"],"sourcesContent":["import {\n InjectionKey,\n Ref,\n inject,\n provide,\n ref,\n shallowRef,\n} from 'vue';\n\nimport { useModelDuplex } from '@/composables';\nimport { CandidateKey } from '@/types';\nimport { getObjectValueByPath } from '@/util';\n\nexport const Y_TREE_VIEW: InjectionKey<{\n register: (key: CandidateKey, vnode: any) => void;\n updateExpanded: (key: CandidateKey, to: boolean) => void;\n updateActive: (key: CandidateKey, to: boolean, event?: MouseEvent) => void;\n updateSelected: (key: CandidateKey, to: boolean) => void;\n searchLoading: Ref<boolean>;\n isExcluded: (key: CandidateKey) => boolean;\n emitExpanded: () => void;\n emitActive: () => void;\n emitSelected: () => void;\n}> = Symbol.for('YTreeView');\n\n// TODO: props type\nexport function provideTreeView(props: any) {\n const nodes = ref<Record<CandidateKey, any>>({});\n const expanded = useModelDuplex(props, 'expanded');\n const active = useModelDuplex(props, 'active');\n const selected = useModelDuplex(props, 'selected');\n\n const expandedSet = ref(new Set<CandidateKey>());\n const selectedSet = ref(new Set<CandidateKey>());\n const activeSet = ref(new Set<CandidateKey>());\n const searchLoading = shallowRef(false);\n const excludedSet = ref(new Set<CandidateKey>());\n\n // Utils\n function getDescendants(key: CandidateKey) {\n const descendants: CandidateKey[] = [];\n const { childKeys } = nodes.value[key];\n descendants.push(...childKeys);\n const remains: CandidateKey[] = childKeys.slice();\n\n while (remains.length > 0) {\n const childKey: CandidateKey = remains.splice(0, 1)[0];\n const item = nodes.value[childKey];\n if (item) {\n descendants.push(...item.childKeys);\n remains.push(...item.childKeys);\n }\n }\n\n return descendants;\n }\n\n // Search\n function isExcluded(key: CandidateKey) {\n return !!props.search && excludedSet.value.has(key);\n }\n\n //\n function issueVnodeState(key: CandidateKey) {\n const node = nodes.value[key];\n if (node?.vnode) {\n node.vnode.active = node.active;\n node.vnode.selected = node.selected;\n node.vnode.indeterminate = node.indeterminate;\n node.vnode.expanded = node.expanded;\n }\n }\n\n // Update\n function updateExpanded(key: CandidateKey, to: boolean) {\n if (!(key in nodes.value)) return;\n const node = nodes.value[key];\n const children = getObjectValueByPath(\n node.item,\n props.itemChildren as string,\n );\n if (Array.isArray(children) && children.length > 0) {\n to ? expandedSet.value.add(key) : expandedSet.value.delete(key);\n node.expanded = to;\n issueVnodeState(key);\n }\n }\n\n function updateActive(key: CandidateKey, to: boolean, event?: MouseEvent) {\n if (!(key in nodes.value)) return;\n const node = nodes.value[key];\n let inactiveKey = !to ? key : '';\n if (!props.multipleActive && to && !activeSet.value.has(key)) {\n [inactiveKey] = [...activeSet.value];\n }\n if (to) {\n activeSet.value.add(key);\n node.active = true;\n issueVnodeState(key);\n } else {\n if (\n props.requiredActive &&\n activeSet.value.size === 1 &&\n key === inactiveKey\n ) {\n issueVnodeState(key);\n return;\n }\n }\n if (inactiveKey && inactiveKey in nodes.value) {\n activeSet.value.delete(inactiveKey);\n nodes.value[inactiveKey].active = false;\n issueVnodeState(inactiveKey);\n }\n\n if (\n props.activeSingleModifier &&\n event?.getModifierState(props.activeSingleModifier)\n ) {\n return;\n }\n\n if (props.multipleActive && props.activeStrategy === 'cascade') {\n for (const descendant of getDescendants(key)) {\n if (descendant in nodes.value) {\n to\n ? activeSet.value.add(descendant)\n : activeSet.value.delete(descendant);\n nodes.value[descendant].active = to;\n issueVnodeState(descendant);\n }\n }\n }\n }\n\n function updateSelected(key: CandidateKey, to: boolean) {\n if (!(key in nodes.value)) return;\n const node = nodes.value[key];\n\n if (to) {\n selectedSet.value.add(key);\n node.selected = true;\n }\n\n if (!to && key in nodes.value) {\n selectedSet.value.delete(key);\n nodes.value[key].selected = false;\n issueVnodeState(key);\n }\n\n if (props.selectStrategy === 'cascade') {\n for (const descendant of getDescendants(key)) {\n if (descendant in nodes.value) {\n to\n ? selectedSet.value.add(descendant)\n : selectedSet.value.delete(descendant);\n nodes.value[descendant].selected = to;\n issueVnodeState(descendant);\n }\n }\n }\n }\n\n // Emit\n function emitExpanded() {\n const arr = [...expandedSet.value];\n expanded.value = props.returnItem\n ? arr.map((key) => nodes.value[key].item)\n : arr;\n }\n\n function emitActive() {\n const arr = [...activeSet.value];\n active.value = props.returnItem\n ? arr.map((key) => nodes.value[key].item)\n : arr;\n }\n\n function emitSelected() {\n const arr = [...selectedSet.value];\n selected.value = props.returnItem\n ? arr.map((key) => nodes.value[key].item)\n : arr;\n }\n\n // Inject\n function register(key: CandidateKey, vnode: any) {\n if (nodes.value[key]) {\n nodes.value[key].vnode = vnode;\n }\n\n issueVnodeState(key);\n }\n\n provide(Y_TREE_VIEW, {\n register,\n updateExpanded,\n updateActive,\n updateSelected,\n searchLoading,\n isExcluded,\n emitExpanded,\n emitActive,\n emitSelected,\n });\n\n return {\n nodes,\n expanded,\n active,\n selected,\n issueVnodeState,\n updateExpanded,\n updateActive,\n updateSelected,\n emitExpanded,\n emitActive,\n emitSelected,\n expandedSet,\n selectedSet,\n activeSet,\n searchLoading,\n excludedSet,\n isExcluded,\n };\n}\n\nexport function useTreeView() {\n const instance = inject(Y_TREE_VIEW);\n if (!instance) throw new Error('Not found provided YTreeView');\n return instance;\n}\n"],"mappings":"AAAA,SAGEA,MAAM,EACNC,OAAO,EACPC,GAAG,EACHC,UAAU,QACL,KAAK;AAAC,SAEJC,cAAc;AAAA,SAEdC,oBAAoB;AAE7B,OAAO,MAAMC,WAUX,GAAGC,MAAM,CAACC,GAAG,CAAC,WAAW,CAAC;;AAE5B;AACA,OAAO,SAASC,eAAeA,CAACC,KAAU,EAAE;EAC1C,MAAMC,KAAK,GAAGT,GAAG,CAA4B,CAAC,CAAC,CAAC;EAChD,MAAMU,QAA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O;IACLtD,KAAK;IACLC,QAAQ;IACRC,MAAM;IACNC,QAAQ;IACRsB,eAAe;IACfI,cAAc;IACdQ,YAAY;IACZU,cAAc;IACdE,YAAY;IACZI,UAAU;IACVC,YAAY;IACZlD,WAAW;IACXE,WAAW;IACXC,SAAS;IACTC,aAAa;IACbC,WAAW;IACXa;EACF,CAAC;AACH;AAEA,OAAO,SAASkC,WAAWA,CAAA,EAAG;EAC5B,MAAMC,QAAQ,GAAGpE,MAAM,CAACM,WAAW,CAAC;EACpC,IAAI,CAAC8D,QAAQ,EAAE,MAAM,IAAIC,KAAK,CAAC,8BAA8B,CAAC;EAC9D,OAAOD,QAAQ;AACjB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","names":[],"sources":["../../../src/components/tree-view/types.ts"],"sourcesContent":["import { type ComponentPublicInstance } from 'vue';\r\n\r\nimport type { CandidateKey } from '@/types';\r\n\r\nexport interface NodeState {\r\n childKeys: CandidateKey[];\r\n item: any;\r\n parentKey: null | CandidateKey;\r\n vnode: null | ComponentPublicInstance;\r\n level: number;\r\n //\r\n selected: false;\r\n indeterminate: false;\r\n active: false;\r\n expanded: false;\r\n}\r\n\r\nexport type TreeviewFilterFn = (\r\n item: any,\r\n search: string,\r\n itemText: string,\r\n) => boolean;\r\n"],"mappings":""}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { getObjectValueByPath } from "../../util/common.mjs";
|
|
2
|
-
export function getKeys(items, itemKey, childrenKey) {
|
|
3
|
-
const keys = [];
|
|
4
|
-
const remains = items.slice();
|
|
5
|
-
while (remains.length > 0) {
|
|
6
|
-
const item = remains.splice(0, 1);
|
|
7
|
-
const key = getObjectValueByPath(item, itemKey);
|
|
8
|
-
keys.push(key);
|
|
9
|
-
const children = getObjectValueByPath(item, childrenKey);
|
|
10
|
-
if (Array.isArray(children)) {
|
|
11
|
-
remains.push(...children);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
return keys;
|
|
15
|
-
}
|
|
16
|
-
export function filterTreeItem(item, search, textKey) {
|
|
17
|
-
const text = getObjectValueByPath(item, textKey);
|
|
18
|
-
return text?.toLocaleLowerCase().indexOf(search.toLocaleLowerCase()) > -1;
|
|
19
|
-
}
|
|
20
|
-
export function filterTreeItems(filter, item, search, idKey, textKey, childrenKey, excluded) {
|
|
21
|
-
const children = getObjectValueByPath(item, childrenKey);
|
|
22
|
-
if (children) {
|
|
23
|
-
let match = false;
|
|
24
|
-
for (let i = 0; i < children.length; i++) {
|
|
25
|
-
if (filterTreeItems(filter, children[i], search, idKey, textKey, childrenKey, excluded)) {
|
|
26
|
-
match = true;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
if (match) {
|
|
30
|
-
return true;
|
|
31
|
-
} else if (filter(item, search, textKey)) {
|
|
32
|
-
return true;
|
|
33
|
-
}
|
|
34
|
-
} else if (filter(item, search, textKey)) {
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
excluded.add(getObjectValueByPath(item, idKey));
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=util.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"util.mjs","names":["getObjectValueByPath","getKeys","items","itemKey","childrenKey","keys","remains","slice","length","item","splice","key","push","children","Array","isArray","filterTreeItem","search","textKey","text","toLocaleLowerCase","indexOf","filterTreeItems","filter","idKey","excluded","match","i","add"],"sources":["../../../src/components/tree-view/util.ts"],"sourcesContent":["import { CandidateKey } from '../../types';\r\nimport { getObjectValueByPath } from '../../util/common';\r\nimport { TreeviewFilterFn } from './types';\r\n\r\nexport function getKeys(items: any[], itemKey: string, childrenKey: string) {\r\n const keys: CandidateKey[] = [];\r\n const remains: any[] = items.slice();\r\n\r\n while (remains.length > 0) {\r\n const item = remains.splice(0, 1);\r\n const key = getObjectValueByPath(item, itemKey);\r\n keys.push(key);\r\n const children = getObjectValueByPath(item, childrenKey);\r\n if (Array.isArray(children)) {\r\n remains.push(...children);\r\n }\r\n }\r\n\r\n return keys;\r\n}\r\n\r\nexport function filterTreeItem(\r\n item: object,\r\n search: string,\r\n textKey: string,\r\n): boolean {\r\n const text = getObjectValueByPath(item, textKey);\r\n\r\n return text?.toLocaleLowerCase().indexOf(search.toLocaleLowerCase()) > -1;\r\n}\r\n\r\nexport function filterTreeItems(\r\n filter: TreeviewFilterFn,\r\n item: any,\r\n search: string,\r\n idKey: string,\r\n textKey: string,\r\n childrenKey: string,\r\n excluded: Set<CandidateKey>,\r\n): boolean {\r\n const children = getObjectValueByPath(item, childrenKey);\r\n\r\n if (children) {\r\n let match = false;\r\n for (let i = 0; i < children.length; i++) {\r\n if (\r\n filterTreeItems(\r\n filter,\r\n children[i],\r\n search,\r\n idKey,\r\n textKey,\r\n childrenKey,\r\n excluded,\r\n )\r\n ) {\r\n match = true;\r\n }\r\n }\r\n\r\n if (match) {\r\n return true;\r\n } else if (filter(item, search, textKey)) {\r\n return true;\r\n }\r\n } else if (filter(item, search, textKey)) {\r\n return true;\r\n }\r\n\r\n excluded.add(getObjectValueByPath(item, idKey));\r\n\r\n return false;\r\n}\r\n"],"mappings":"SACSA,oBAAoB;AAG7B,OAAO,SAASC,OAAOA,CAACC,KAAY,EAAEC,OAAe,EAAEC,WAAmB,EAAE;EAC1E,MAAMC,IAAoB,GAAG,EAAE;EAC/B,MAAMC,OAAc,GAAGJ,KAAK,CAACK,KAAK,CAAC,CAAC;EAEpC,OAAOD,OAAO,CAACE,MAAM,GAAG,CAAC,EAAE;IACzB,MAAMC,IAAI,GAAGH,OAAO,CAACI,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;IACjC,MAAMC,GAAG,GAAGX,oBAAoB,CAACS,IAAI,EAAEN,OAAO,CAAC;IAC/CE,IAAI,CAACO,IAAI,CAACD,GAAG,CAAC;IACd,MAAME,QAAQ,GAAGb,oBAAoB,CAACS,IAAI,EAAEL,WAAW,CAAC;IACxD,IAAIU,KAAK,CAACC,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,CAAC;EAE/C,OAAO,KAAK;AACd"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { nextTick, watch } from 'vue';
|
|
2
|
-
export function useChoiceByLink(link, select) {
|
|
3
|
-
watch(() => link.isActive?.value, neo => {
|
|
4
|
-
if (link.isLink.value && neo && select) {
|
|
5
|
-
nextTick(() => {
|
|
6
|
-
select(true);
|
|
7
|
-
});
|
|
8
|
-
}
|
|
9
|
-
}, {
|
|
10
|
-
immediate: true
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=choice-link.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"choice-link.mjs","names":["nextTick","watch","useChoiceByLink","link","select","isActive","value","neo","isLink","immediate"],"sources":["../../src/composables/choice-link.ts"],"sourcesContent":["import { nextTick, watch } from 'vue';\n\nimport type { UseLink } from './vue-router';\n\nexport function useChoiceByLink(\n link: UseLink,\n select?: (value: boolean, event?: Event) => void,\n) {\n watch(\n () => link.isActive?.value,\n (neo) => {\n if (link.isLink.value && neo && select) {\n nextTick(() => {\n select(true);\n });\n }\n },\n { immediate: true },\n );\n}\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,KAAK,QAAQ,KAAK;AAIrC,OAAO,SAASC,eAAeA,CAC7BC,IAAa,EACbC,MAAgD,EAChD;EACAH,KAAK,CACH,MAAME,IAAI,CAACE,QAAQ,EAAEC,KAAK,EACzBC,GAAG,IAAK;IACP,IAAIJ,IAAI,CAACK,MAAM,CAACF,KAAK,IAAIC,GAAG,IAAIH,MAAM,EAAE;MACtCJ,QAAQ,CAAC,MAAM;QACbI,MAAM,CAAC,IAAI,CAAC;MACd,CAAC,CAAC;IACJ;EACF,CAAC,EACD;IAAEK,SAAS,EAAE;EAAK,CACpB,CAAC;AACH"}
|