@katlux/toolkit 0.1.0-beta.8 → 0.1.0-beta.81
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/LICENSE +200 -21
- package/README.md +5 -1
- package/dist/compiled/composables/usePresetComponent.mjs +32 -21
- package/dist/compiled/utils/PresetResolver.mjs +18 -12
- package/dist/module.cjs +52 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +52 -1
- package/dist/runtime/components/KButton/KButton.global.d.vue.ts +1 -1
- package/dist/runtime/components/KButton/KButton.global.vue.d.ts +1 -1
- package/dist/runtime/components/KCalendar/KCalendar.global.d.vue.ts +11 -12
- package/dist/runtime/components/KCalendar/KCalendar.global.vue.d.ts +11 -12
- package/dist/runtime/components/KCalendar/KCalendar.logic.d.ts +1 -0
- package/dist/runtime/components/KCalendar/KCalendar.logic.js +25 -10
- package/dist/runtime/components/KCheckbox/KCheckbox.global.d.vue.ts +30 -0
- package/dist/runtime/components/KCheckbox/KCheckbox.global.vue +4 -1
- package/dist/runtime/components/KCheckbox/KCheckbox.global.vue.d.ts +30 -0
- package/dist/runtime/components/KCheckbox/KCheckbox.logic.d.ts +17 -0
- package/dist/runtime/components/KCheckbox/KCheckbox.logic.js +16 -1
- package/dist/runtime/components/KCombobox/KCombobox.global.d.vue.ts +88 -12
- package/dist/runtime/components/KCombobox/KCombobox.global.vue +19 -4
- package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +88 -12
- package/dist/runtime/components/KCombobox/KCombobox.logic.d.ts +47 -4
- package/dist/runtime/components/KCombobox/KCombobox.logic.js +84 -12
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.d.vue.ts +214 -0
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue +55 -0
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue.d.ts +214 -0
- package/dist/runtime/components/KCompositeInput/KCompositeInput.logic.d.ts +187 -0
- package/dist/runtime/components/KCompositeInput/KCompositeInput.logic.js +263 -0
- package/dist/runtime/components/KContextMenu/KContextMenu.global.d.vue.ts +53 -1
- package/dist/runtime/components/KContextMenu/KContextMenu.global.vue +20 -1
- package/dist/runtime/components/KContextMenu/KContextMenu.global.vue.d.ts +53 -1
- package/dist/runtime/components/KContextMenu/KContextMenu.logic.d.ts +53 -2
- package/dist/runtime/components/KContextMenu/KContextMenu.logic.js +167 -3
- package/dist/runtime/components/KDatatable/KDataIterator.global.d.vue.ts +1 -1
- package/dist/runtime/components/KDatatable/KDataIterator.global.vue.d.ts +1 -1
- package/dist/runtime/components/KDatatable/KDatatable.global.d.vue.ts +4 -0
- package/dist/runtime/components/KDatatable/KDatatable.global.vue +6 -2
- package/dist/runtime/components/KDatatable/KDatatable.global.vue.d.ts +4 -0
- package/dist/runtime/components/KDatatable/KDatatable.logic.d.ts +4 -0
- package/dist/runtime/components/KDatatable/KDatatable.logic.js +3 -1
- package/dist/runtime/components/KDatePicker/KDatePicker.global.d.vue.ts +104 -8
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue +28 -3
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue.d.ts +104 -8
- package/dist/runtime/components/KDatePicker/KDatePicker.logic.d.ts +48 -1
- package/dist/runtime/components/KDatePicker/KDatePicker.logic.js +118 -7
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.d.vue.ts +93 -8
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue +27 -3
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue.d.ts +93 -8
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.d.ts +43 -1
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.js +168 -7
- package/dist/runtime/components/KDropdown/KDropdown.global.d.vue.ts +36 -0
- package/dist/runtime/components/KDropdown/KDropdown.global.vue +15 -4
- package/dist/runtime/components/KDropdown/KDropdown.global.vue.d.ts +36 -0
- package/dist/runtime/components/KDropdown/KDropdown.logic.d.ts +58 -1
- package/dist/runtime/components/KDropdown/KDropdown.logic.js +152 -4
- package/dist/runtime/components/KGrid/KGrid.global.d.vue.ts +8 -57
- package/dist/runtime/components/KGrid/KGrid.global.vue +9 -2
- package/dist/runtime/components/KGrid/KGrid.global.vue.d.ts +8 -57
- package/dist/runtime/components/KHourPicker/KHourPicker.global.d.vue.ts +51 -1
- package/dist/runtime/components/KHourPicker/KHourPicker.global.vue +28 -12
- package/dist/runtime/components/KHourPicker/KHourPicker.global.vue.d.ts +51 -1
- package/dist/runtime/components/KHourPicker/KHourPicker.logic.d.ts +31 -3
- package/dist/runtime/components/KHourPicker/KHourPicker.logic.js +38 -10
- package/dist/runtime/components/KHourSelect/KHourSelect.global.d.vue.ts +9 -0
- package/dist/runtime/components/KHourSelect/KHourSelect.global.vue +1 -0
- package/dist/runtime/components/KHourSelect/KHourSelect.global.vue.d.ts +9 -0
- package/dist/runtime/components/KHourSelect/KHourSelect.logic.d.ts +5 -0
- package/dist/runtime/components/KHourSelect/KHourSelect.logic.js +8 -1
- package/dist/runtime/components/KIcon/KIcon.global.d.vue.ts +1 -1
- package/dist/runtime/components/KIcon/KIcon.global.vue.d.ts +1 -1
- package/dist/runtime/components/KIcon/KIcon.logic.d.ts +1 -1
- package/dist/runtime/components/KIcon/KIcon.logic.js +13 -8
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.d.vue.ts +31 -1
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue +5 -2
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue.d.ts +31 -1
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.logic.d.ts +16 -0
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.logic.js +23 -5
- package/dist/runtime/components/KModal/KModal.global.d.vue.ts +14 -2
- package/dist/runtime/components/KModal/KModal.global.vue +6 -1
- package/dist/runtime/components/KModal/KModal.global.vue.d.ts +14 -2
- package/dist/runtime/components/KModal/KModal.logic.d.ts +10 -2
- package/dist/runtime/components/KModal/KModal.logic.js +12 -3
- package/dist/runtime/components/KPanel/KPanel.global.d.vue.ts +5 -28
- package/dist/runtime/components/KPanel/KPanel.global.vue +12 -4
- package/dist/runtime/components/KPanel/KPanel.global.vue.d.ts +5 -28
- package/dist/runtime/components/KPanel/KPanel.logic.d.ts +10 -0
- package/dist/runtime/components/KPanel/KPanel.logic.js +8 -0
- package/dist/runtime/components/KRadiobox/KRadiobox.global.d.vue.ts +21 -0
- package/dist/runtime/components/KRadiobox/KRadiobox.global.vue +3 -1
- package/dist/runtime/components/KRadiobox/KRadiobox.global.vue.d.ts +21 -0
- package/dist/runtime/components/KRadiobox/KRadiobox.logic.d.ts +11 -0
- package/dist/runtime/components/KRadiobox/KRadiobox.logic.js +9 -0
- package/dist/runtime/components/KRangeSlider/KRangeSlider.global.d.vue.ts +9 -0
- package/dist/runtime/components/KRangeSlider/KRangeSlider.global.vue +1 -0
- package/dist/runtime/components/KRangeSlider/KRangeSlider.global.vue.d.ts +9 -0
- package/dist/runtime/components/KRangeSlider/KRangeSlider.logic.d.ts +5 -0
- package/dist/runtime/components/KRangeSlider/KRangeSlider.logic.js +4 -0
- package/dist/runtime/components/KSearchTree/KSearchTree.logic.d.ts +7 -1
- package/dist/runtime/components/KSearchTree/KSearchTree.logic.js +6 -1
- package/dist/runtime/components/KSearchTreeDropdown/KSearchTreeDropdown.logic.d.ts +7 -1
- package/dist/runtime/components/KSearchTreeDropdown/KSearchTreeDropdown.logic.js +6 -1
- package/dist/runtime/components/KSlider/KSlider.global.d.vue.ts +9 -0
- package/dist/runtime/components/KSlider/KSlider.global.vue +1 -0
- package/dist/runtime/components/KSlider/KSlider.global.vue.d.ts +9 -0
- package/dist/runtime/components/KSlider/KSlider.logic.d.ts +5 -0
- package/dist/runtime/components/KSlider/KSlider.logic.js +4 -0
- package/dist/runtime/components/KTextarea/KTextarea.global.d.vue.ts +30 -0
- package/dist/runtime/components/KTextarea/KTextarea.global.vue +4 -1
- package/dist/runtime/components/KTextarea/KTextarea.global.vue.d.ts +30 -0
- package/dist/runtime/components/KTextarea/KTextarea.logic.d.ts +16 -0
- package/dist/runtime/components/KTextarea/KTextarea.logic.js +13 -0
- package/dist/runtime/components/KTextbox/KTextbox.global.d.vue.ts +44 -2
- package/dist/runtime/components/KTextbox/KTextbox.global.vue +8 -4
- package/dist/runtime/components/KTextbox/KTextbox.global.vue.d.ts +44 -2
- package/dist/runtime/components/KTextbox/KTextbox.logic.d.ts +26 -4
- package/dist/runtime/components/KTextbox/KTextbox.logic.js +25 -5
- package/dist/runtime/components/KToast/KToast.global.d.vue.ts +57 -0
- package/dist/runtime/components/KToast/KToast.global.vue +32 -0
- package/dist/runtime/components/KToast/KToast.global.vue.d.ts +57 -0
- package/dist/runtime/components/KToast/KToast.logic.d.ts +34 -0
- package/dist/runtime/components/KToast/KToast.logic.js +47 -0
- package/dist/runtime/components/KTooltip/KTooltip.global.d.vue.ts +31 -1
- package/dist/runtime/components/KTooltip/KTooltip.global.vue +20 -1
- package/dist/runtime/components/KTooltip/KTooltip.global.vue.d.ts +31 -1
- package/dist/runtime/components/KTooltip/KTooltip.logic.d.ts +25 -2
- package/dist/runtime/components/KTooltip/KTooltip.logic.js +81 -3
- package/dist/runtime/components/KTree/KTree.global.d.vue.ts +1 -1
- package/dist/runtime/components/KTree/KTree.global.vue.d.ts +1 -1
- package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +75 -8
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue +16 -3
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +75 -8
- package/dist/runtime/components/KTreePicker/KTreePicker.logic.d.ts +38 -1
- package/dist/runtime/components/KTreePicker/KTreePicker.logic.js +36 -1
- package/dist/runtime/components/MultiTabs/MultiTabs.global.d.vue.ts +23 -0
- package/dist/runtime/components/MultiTabs/MultiTabs.global.vue +27 -0
- package/dist/runtime/components/MultiTabs/MultiTabs.global.vue.d.ts +23 -0
- package/dist/runtime/components/MultiTabs/MultiTabs.logic.d.ts +25 -0
- package/dist/runtime/components/MultiTabs/MultiTabs.logic.js +52 -0
- package/dist/runtime/composables/usePresetComponent.d.ts +16 -0
- package/dist/runtime/composables/usePresetComponent.js +32 -21
- package/dist/runtime/presets/default/assets/scss/css-variables.css +96 -17
- package/dist/runtime/presets/default/assets/scss/css-variables.scss +320 -0
- package/dist/runtime/presets/default/assets/scss/docs.scss +52 -0
- package/dist/runtime/presets/default/assets/scss/index.css +191 -17
- package/dist/runtime/presets/default/assets/scss/index.scss +86 -0
- package/dist/runtime/presets/default/assets/scss/mixins.scss +94 -0
- package/dist/runtime/presets/default/assets/scss/reset.scss +16 -0
- package/dist/runtime/presets/default/assets/svg/arrow-down.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/arrow-left.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/arrow-right.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/arrow-up.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/bell.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/camera.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/clock.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/copy.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/divide.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/download.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/edit.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/external-link.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/eye-off.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/eye.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/hash.svg +6 -0
- package/dist/runtime/presets/default/assets/svg/heart.svg +3 -0
- package/dist/runtime/presets/default/assets/svg/home.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/image.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/info.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/link.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/lock.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/logout.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/mail.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/map-pin.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/menu.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/message-square.svg +3 -0
- package/dist/runtime/presets/default/assets/svg/minus.svg +3 -0
- package/dist/runtime/presets/default/assets/svg/more-vertical.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/multiply.svg +3 -0
- package/dist/runtime/presets/default/assets/svg/phone.svg +3 -0
- package/dist/runtime/presets/default/assets/svg/plus.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/refresh.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/settings.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/share.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/shopping-bag.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/star.svg +3 -0
- package/dist/runtime/presets/default/assets/svg/trash.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/type.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/upload.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/warning.svg +5 -0
- package/dist/runtime/presets/default/components/KAccordion/KAccordion.vue +5 -2
- package/dist/runtime/presets/default/components/KAccordion/KAccordionItem.vue +40 -37
- package/dist/runtime/presets/default/components/KBulkActions/KBulkActions.vue +29 -22
- package/dist/runtime/presets/default/components/KButton/KButton.vue +147 -428
- package/dist/runtime/presets/default/components/KCalendar/KCalendar.vue +69 -53
- package/dist/runtime/presets/default/components/KCalendar/KCalendarMonth.vue +195 -161
- package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.d.vue.ts +3 -0
- package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.vue +59 -42
- package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.vue.d.ts +3 -0
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.d.vue.ts +8 -0
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue +129 -79
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue.d.ts +8 -0
- package/dist/runtime/presets/default/components/KCombobox/KComboboxList.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue +78 -61
- package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.d.vue.ts +34 -0
- package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.vue +234 -0
- package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.vue.d.ts +34 -0
- package/dist/runtime/presets/default/components/KContextMenu/KContextMenu.d.vue.ts +20 -1
- package/dist/runtime/presets/default/components/KContextMenu/KContextMenu.vue +60 -3
- package/dist/runtime/presets/default/components/KContextMenu/KContextMenu.vue.d.ts +20 -1
- package/dist/runtime/presets/default/components/KDataIterator/KDataIterator.vue +40 -31
- package/dist/runtime/presets/default/components/KDatatable/KDatatable.d.vue.ts +2 -0
- package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue +128 -92
- package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue.d.ts +2 -0
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.d.vue.ts +8 -0
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue +60 -25
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue.d.ts +8 -0
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.d.vue.ts +7 -0
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue +85 -52
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue.d.ts +7 -0
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.d.vue.ts +16 -0
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue +104 -25
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue.d.ts +16 -0
- package/dist/runtime/presets/default/components/KGantt/KGantt.vue +337 -241
- package/dist/runtime/presets/default/components/KGantt/KGanttRuler.vue +40 -35
- package/dist/runtime/presets/default/components/KGantt/KGanttTimeline.vue +170 -140
- package/dist/runtime/presets/default/components/KGrid/KGrid.vue +63 -60
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.d.vue.ts +9 -2
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue +50 -28
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue.d.ts +9 -2
- package/dist/runtime/presets/default/components/KHourSelect/KHourSelect.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KHourSelect/KHourSelect.vue +39 -28
- package/dist/runtime/presets/default/components/KHourSelect/KHourSelect.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KIcon/KIcon.d.vue.ts +1 -1
- package/dist/runtime/presets/default/components/KIcon/KIcon.vue +31 -22
- package/dist/runtime/presets/default/components/KIcon/KIcon.vue.d.ts +1 -1
- package/dist/runtime/presets/default/components/KLoader/KLoader.vue +65 -48
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.d.vue.ts +3 -0
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue +119 -84
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue.d.ts +3 -0
- package/dist/runtime/presets/default/components/KModal/KModal.d.vue.ts +2 -0
- package/dist/runtime/presets/default/components/KModal/KModal.vue +85 -35
- package/dist/runtime/presets/default/components/KModal/KModal.vue.d.ts +2 -0
- package/dist/runtime/presets/default/components/KPagination/KPagination.vue +42 -40
- package/dist/runtime/presets/default/components/KPanel/KPanel.d.vue.ts +3 -0
- package/dist/runtime/presets/default/components/KPanel/KPanel.vue +100 -34
- package/dist/runtime/presets/default/components/KPanel/KPanel.vue.d.ts +3 -0
- package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.d.vue.ts +2 -0
- package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.vue +46 -35
- package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.vue.d.ts +2 -0
- package/dist/runtime/presets/default/components/KRangeSlider/KRangeSlider.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KRangeSlider/KRangeSlider.vue +160 -125
- package/dist/runtime/presets/default/components/KRangeSlider/KRangeSlider.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KSearchTree/KSearchTree.d.vue.ts +4 -1
- package/dist/runtime/presets/default/components/KSearchTree/KSearchTree.vue +9 -1
- package/dist/runtime/presets/default/components/KSearchTree/KSearchTree.vue.d.ts +4 -1
- package/dist/runtime/presets/default/components/KSearchTreeDropdown/KSearchTreeDropdown.d.vue.ts +4 -1
- package/dist/runtime/presets/default/components/KSearchTreeDropdown/KSearchTreeDropdown.vue +9 -1
- package/dist/runtime/presets/default/components/KSearchTreeDropdown/KSearchTreeDropdown.vue.d.ts +4 -1
- package/dist/runtime/presets/default/components/KSlider/KSlider.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KSlider/KSlider.vue +125 -100
- package/dist/runtime/presets/default/components/KSlider/KSlider.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KTabs/KTabItem.vue +41 -38
- package/dist/runtime/presets/default/components/KTabs/KTabs.vue +105 -8
- package/dist/runtime/presets/default/components/KTextarea/KTextarea.d.vue.ts +3 -0
- package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue +48 -21
- package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue.d.ts +3 -0
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.d.vue.ts +5 -1
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue +110 -37
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue.d.ts +5 -1
- package/dist/runtime/presets/default/components/KToast/KToast.d.vue.ts +17 -0
- package/dist/runtime/presets/default/components/KToast/KToast.vue +118 -0
- package/dist/runtime/presets/default/components/KToast/KToast.vue.d.ts +17 -0
- package/dist/runtime/presets/default/components/KTooltip/KTooltip.d.vue.ts +14 -1
- package/dist/runtime/presets/default/components/KTooltip/KTooltip.vue +70 -3
- package/dist/runtime/presets/default/components/KTooltip/KTooltip.vue.d.ts +14 -1
- package/dist/runtime/presets/default/components/KTree/KTree.vue +103 -80
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.d.vue.ts +7 -0
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue +92 -55
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue.d.ts +7 -0
- package/dist/runtime/presets/default/components/KTreeView/KTreeCell.vue +31 -30
- package/dist/runtime/presets/default/components/KTreeView/KTreeView.vue +34 -27
- package/dist/runtime/presets/default/components/MultiTabs/MultiTabs.d.vue.ts +9 -0
- package/dist/runtime/presets/default/components/MultiTabs/MultiTabs.vue +61 -0
- package/dist/runtime/presets/default/components/MultiTabs/MultiTabs.vue.d.ts +9 -0
- package/dist/runtime/utils/PresetResolver.d.ts +8 -9
- package/dist/runtime/utils/PresetResolver.js +18 -12
- package/package.json +6 -6
|
@@ -1,5 +1,72 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
.KTooltip
|
|
3
|
-
|
|
2
|
+
.KTooltip-wrapper(
|
|
3
|
+
ref="internalWrapperRef"
|
|
4
|
+
@mouseenter="showTooltip"
|
|
5
|
+
@mouseleave="hideTooltip"
|
|
6
|
+
)
|
|
7
|
+
slot
|
|
8
|
+
Teleport(v-if="isMounted && visible" to="body")
|
|
9
|
+
.KTooltip(
|
|
10
|
+
:style="tooltipStyle"
|
|
11
|
+
:class="[position]"
|
|
12
|
+
)
|
|
13
|
+
slot(name="content")
|
|
14
|
+
span {{ text }}
|
|
4
15
|
</template>
|
|
5
|
-
|
|
16
|
+
|
|
17
|
+
<script lang="ts" setup>
|
|
18
|
+
import { ref, onMounted, watch } from 'vue'
|
|
19
|
+
|
|
20
|
+
const props = defineProps<{
|
|
21
|
+
visible: boolean
|
|
22
|
+
tooltipStyle: Record<string, string>
|
|
23
|
+
showTooltip: () => void
|
|
24
|
+
hideTooltip: () => void
|
|
25
|
+
text: string
|
|
26
|
+
position: 'top' | 'bottom' | 'left' | 'right'
|
|
27
|
+
disabled: boolean
|
|
28
|
+
}>()
|
|
29
|
+
|
|
30
|
+
const emit = defineEmits(['registerWrapperRef'])
|
|
31
|
+
|
|
32
|
+
const internalWrapperRef = ref<HTMLElement | null>(null)
|
|
33
|
+
const isMounted = ref(false)
|
|
34
|
+
|
|
35
|
+
onMounted(() => {
|
|
36
|
+
isMounted.value = true
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
watch(internalWrapperRef, (newVal) => {
|
|
40
|
+
emit('registerWrapperRef', newVal)
|
|
41
|
+
}, { immediate: true })
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<style lang="scss" scoped>
|
|
45
|
+
.KTooltip-wrapper {
|
|
46
|
+
display: inline-block;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.KTooltip {
|
|
50
|
+
background-color: var(--neutral-800, #1f2937);
|
|
51
|
+
color: var(--font-color-light, #ffffff);
|
|
52
|
+
padding: 6px 10px;
|
|
53
|
+
border-radius: var(--border-radius-sm, 4px);
|
|
54
|
+
font-size: 11px;
|
|
55
|
+
line-height: 1.4;
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
|
|
58
|
+
max-width: 250px;
|
|
59
|
+
pointer-events: none;
|
|
60
|
+
opacity: 0;
|
|
61
|
+
animation: tooltip-fade-in 0.15s ease-out forwards;
|
|
62
|
+
|
|
63
|
+
@keyframes tooltip-fade-in {
|
|
64
|
+
from {
|
|
65
|
+
opacity: 0;
|
|
66
|
+
}
|
|
67
|
+
to {
|
|
68
|
+
opacity: 1;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
</style>
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
visible: boolean;
|
|
3
|
+
tooltipStyle: Record<string, string>;
|
|
4
|
+
showTooltip: () => void;
|
|
5
|
+
hideTooltip: () => void;
|
|
6
|
+
text: string;
|
|
7
|
+
position: 'top' | 'bottom' | 'left' | 'right';
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
registerWrapperRef: (...args: any[]) => void;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
onRegisterWrapperRef?: ((...args: any[]) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
2
15
|
declare const _default: typeof __VLS_export;
|
|
3
16
|
export default _default;
|
|
@@ -36,91 +36,114 @@
|
|
|
36
36
|
.default-item
|
|
37
37
|
KIcon(v-if="iconField && row[iconField]" :iconname="row[iconField]" :width="16" :height="16")
|
|
38
38
|
span {{ row[labelField] }}
|
|
39
|
+
|
|
39
40
|
</template>
|
|
40
41
|
|
|
41
|
-
<script setup>
|
|
42
|
-
import { computed } from
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
42
|
+
<script lang="ts" setup>
|
|
43
|
+
import { computed, type Ref } from 'vue'
|
|
44
|
+
|
|
45
|
+
const props = defineProps<{
|
|
46
|
+
visibleRows: any[] // Rows with __treeNode attached
|
|
47
|
+
expandedNodes: Set<string | number>
|
|
48
|
+
labelField: string
|
|
49
|
+
iconField: string
|
|
50
|
+
disabled: boolean
|
|
51
|
+
multiSelect: boolean
|
|
52
|
+
isNodeSelected: (node: any) => boolean
|
|
53
|
+
toggleNode: (id: string | number) => void
|
|
54
|
+
selectable: boolean
|
|
55
|
+
dataProvider?: {
|
|
56
|
+
loading: Ref<boolean>
|
|
57
|
+
initialLoad?: Ref<boolean>
|
|
58
|
+
}
|
|
59
|
+
}>()
|
|
60
|
+
|
|
61
|
+
// Helper to get ID if needed, but we use row[idKey] or row.id in key
|
|
62
|
+
const idKey = 'id' // Simplify for now, or pass as prop if needed. usually id.
|
|
63
|
+
|
|
64
|
+
const emit = defineEmits<{
|
|
65
|
+
(e: 'select', row: any): void
|
|
66
|
+
}>()
|
|
67
|
+
|
|
68
|
+
function onNodeClick(row: any) {
|
|
69
|
+
if (!props.disabled) {
|
|
70
|
+
emit('select', row)
|
|
71
|
+
}
|
|
61
72
|
}
|
|
62
|
-
|
|
73
|
+
|
|
74
|
+
const isLoading = computed(() => props.dataProvider?.loading?.value || props.dataProvider?.initialLoad?.value || false)
|
|
63
75
|
</script>
|
|
64
76
|
|
|
65
|
-
<style scoped>
|
|
77
|
+
<style lang="scss" scoped>
|
|
66
78
|
.KTree {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
.
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
.
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
79
|
+
width: 100%;
|
|
80
|
+
position: relative; // Ensure loader overlay is contained
|
|
81
|
+
|
|
82
|
+
.tree-list {
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.tree-node {
|
|
88
|
+
display: flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
padding: 4px 8px;
|
|
91
|
+
min-height: 32px;
|
|
92
|
+
transition: background-color 0.2s;
|
|
93
|
+
|
|
94
|
+
&:hover {
|
|
95
|
+
background-color: var(--border-color-light);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.node-content {
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
width: 100%;
|
|
102
|
+
gap: 4px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.tree-toggle {
|
|
106
|
+
cursor: pointer;
|
|
107
|
+
display: inline-flex;
|
|
108
|
+
align-items: center;
|
|
109
|
+
justify-content: center;
|
|
110
|
+
width: 20px;
|
|
111
|
+
height: 20px;
|
|
112
|
+
border-radius: 4px;
|
|
113
|
+
flex-shrink: 0;
|
|
114
|
+
|
|
115
|
+
&:hover {
|
|
116
|
+
background-color: var(--neutral-300);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.tree-spacer {
|
|
121
|
+
width: 20px;
|
|
122
|
+
height: 20px;
|
|
123
|
+
flex-shrink: 0;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.node-label {
|
|
127
|
+
flex: 1;
|
|
128
|
+
display: flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
overflow: hidden;
|
|
131
|
+
text-overflow: ellipsis;
|
|
132
|
+
white-space: nowrap;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.selection-control {
|
|
136
|
+
margin-right: 8px;
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.default-item {
|
|
142
|
+
display: flex;
|
|
143
|
+
align-items: center;
|
|
144
|
+
gap: 6px;
|
|
145
|
+
cursor: pointer;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
125
148
|
}
|
|
126
149
|
</style>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
|
+
label?: string;
|
|
2
3
|
dataProvider: any;
|
|
3
4
|
idKey?: string;
|
|
4
5
|
parentKey?: string;
|
|
@@ -8,6 +9,7 @@ type __VLS_Props = {
|
|
|
8
9
|
labelField: string;
|
|
9
10
|
placeholder: string;
|
|
10
11
|
searchbox: boolean;
|
|
12
|
+
searchPlaceholder: string;
|
|
11
13
|
multiSelect: boolean;
|
|
12
14
|
searchtext: string;
|
|
13
15
|
filteredOptions: any[];
|
|
@@ -18,10 +20,15 @@ type __VLS_Props = {
|
|
|
18
20
|
isSelected: (option: any) => boolean;
|
|
19
21
|
loading: boolean;
|
|
20
22
|
closeOnSelect: boolean;
|
|
23
|
+
fullWidth: boolean;
|
|
24
|
+
validation?: 'success' | 'warning' | 'error' | null;
|
|
25
|
+
validationText?: string;
|
|
21
26
|
};
|
|
22
27
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
28
|
+
"update:isOptionsOpen": (value: boolean) => any;
|
|
23
29
|
"update:searchtext": (value: string) => any;
|
|
24
30
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
31
|
+
"onUpdate:isOptionsOpen"?: ((value: boolean) => any) | undefined;
|
|
25
32
|
"onUpdate:searchtext"?: ((value: string) => any) | undefined;
|
|
26
33
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
34
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
KCombobox(
|
|
3
|
+
:label="label"
|
|
4
|
+
:dataProvider="dataProvider"
|
|
3
5
|
:disabled="disabled"
|
|
4
|
-
:isOptionsOpen="
|
|
6
|
+
v-model:isOptionsOpen="isOptionsOpenModel"
|
|
5
7
|
:labelField="labelField"
|
|
6
8
|
:placeholder="placeholder"
|
|
7
9
|
:searchbox="searchbox"
|
|
@@ -13,68 +15,103 @@ KCombobox(
|
|
|
13
15
|
:selectItem="selectItem"
|
|
14
16
|
:isSelected="isSelected"
|
|
15
17
|
:loading="loading"
|
|
18
|
+
:fullWidth="fullWidth"
|
|
19
|
+
:validation="validation"
|
|
20
|
+
:validationText="validationText"
|
|
16
21
|
)
|
|
17
|
-
|
|
18
|
-
.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
showClear
|
|
24
|
-
)
|
|
25
|
-
KTree(
|
|
26
|
-
:dataProvider="dataProvider"
|
|
27
|
-
:idKey="idKey"
|
|
28
|
-
:parentKey="parentKey"
|
|
29
|
-
:labelField="labelField"
|
|
30
|
-
:iconField="iconField"
|
|
31
|
-
:loading="loading"
|
|
32
|
-
:multiSelect="multiSelect"
|
|
33
|
-
:isNodeSelected="isSelected"
|
|
34
|
-
:searchtext="searchtext"
|
|
35
|
-
:selectable="true"
|
|
36
|
-
@select="onTreeSelect"
|
|
22
|
+
.KTreePicker__tree-container
|
|
23
|
+
.KTreePicker__search(v-if="searchbox")
|
|
24
|
+
KTextbox(
|
|
25
|
+
v-model="searchtextModel"
|
|
26
|
+
:placeholder="searchPlaceholder"
|
|
27
|
+
showClear
|
|
37
28
|
)
|
|
29
|
+
KTree(
|
|
30
|
+
:dataProvider="dataProvider"
|
|
31
|
+
:idKey="idKey"
|
|
32
|
+
:parentKey="parentKey"
|
|
33
|
+
:labelField="labelField"
|
|
34
|
+
:iconField="iconField"
|
|
35
|
+
:loading="loading"
|
|
36
|
+
:multiSelect="multiSelect"
|
|
37
|
+
:isNodeSelected="isSelected"
|
|
38
|
+
:searchtext="searchtext"
|
|
39
|
+
:selectable="true"
|
|
40
|
+
@select="onTreeSelect"
|
|
41
|
+
)
|
|
38
42
|
</template>
|
|
39
43
|
|
|
40
|
-
<script setup>
|
|
41
|
-
import { computed } from
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
44
|
+
<script lang="ts" setup>
|
|
45
|
+
import { computed } from 'vue'
|
|
46
|
+
// Props passed from global component (which handles the logic)
|
|
47
|
+
const props = defineProps<{
|
|
48
|
+
label?: string
|
|
49
|
+
// Tree specific
|
|
50
|
+
dataProvider: any
|
|
51
|
+
idKey?: string
|
|
52
|
+
parentKey?: string
|
|
53
|
+
iconField?: string
|
|
54
|
+
|
|
55
|
+
// Combobox Logic Props
|
|
56
|
+
disabled: boolean
|
|
57
|
+
isOptionsOpen: boolean
|
|
58
|
+
labelField: string
|
|
59
|
+
placeholder: string
|
|
60
|
+
searchbox: boolean
|
|
61
|
+
searchPlaceholder: string
|
|
62
|
+
multiSelect: boolean
|
|
63
|
+
searchtext: string
|
|
64
|
+
filteredOptions: any[]
|
|
65
|
+
getSelectedContent: () => any[]
|
|
66
|
+
toggleDropdown: () => void
|
|
67
|
+
closeDropdown: () => void
|
|
68
|
+
selectItem: (option: any) => void
|
|
69
|
+
isSelected: (option: any) => boolean
|
|
70
|
+
loading: boolean
|
|
71
|
+
closeOnSelect: boolean
|
|
72
|
+
fullWidth: boolean
|
|
73
|
+
validation?: 'success' | 'warning' | 'error' | null
|
|
74
|
+
validationText?: string
|
|
75
|
+
}>()
|
|
76
|
+
|
|
77
|
+
const emit = defineEmits<{
|
|
78
|
+
(e: 'update:searchtext', value: string): void
|
|
79
|
+
(e: 'update:isOptionsOpen', value: boolean): void
|
|
80
|
+
}>()
|
|
81
|
+
|
|
64
82
|
const searchtextModel = computed({
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
})
|
|
68
|
-
|
|
69
|
-
|
|
83
|
+
get: () => props.searchtext,
|
|
84
|
+
set: (value) => emit('update:searchtext', value)
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
const isOptionsOpenModel = computed({
|
|
88
|
+
get: () => props.isOptionsOpen,
|
|
89
|
+
set: (value) => emit('update:isOptionsOpen', value)
|
|
90
|
+
})
|
|
91
|
+
|
|
92
|
+
function onTreeSelect(node: any) {
|
|
93
|
+
// Call the selectItem method from logic
|
|
94
|
+
props.selectItem(node)
|
|
95
|
+
|
|
96
|
+
// If closeOnSelect is true, we should close the dropdown
|
|
97
|
+
// but selectItem might have already toggled it if it was a distinct action?
|
|
98
|
+
// In KCombobox.logic.ts: selectItem sets isOptionsOpen = !closeOnSelect
|
|
99
|
+
// So it should be handled there!
|
|
100
|
+
|
|
101
|
+
// However, selectItem expects a ComboboxItem (TDataRow).
|
|
102
|
+
// KTree returns a node object which should be compatible.
|
|
70
103
|
}
|
|
71
104
|
</script>
|
|
72
105
|
|
|
73
|
-
<style scoped>
|
|
106
|
+
<style lang="scss" scoped>
|
|
74
107
|
.KTreePicker__tree-container {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
108
|
+
padding: 10px;
|
|
109
|
+
max-height: 400px;
|
|
110
|
+
overflow-y: auto;
|
|
111
|
+
min-width: 250px;
|
|
112
|
+
background-color: var(--panel-bg-default);
|
|
113
|
+
color: var(--font-color-primary);
|
|
79
114
|
}
|
|
115
|
+
|
|
116
|
+
|
|
80
117
|
</style>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
|
+
label?: string;
|
|
2
3
|
dataProvider: any;
|
|
3
4
|
idKey?: string;
|
|
4
5
|
parentKey?: string;
|
|
@@ -8,6 +9,7 @@ type __VLS_Props = {
|
|
|
8
9
|
labelField: string;
|
|
9
10
|
placeholder: string;
|
|
10
11
|
searchbox: boolean;
|
|
12
|
+
searchPlaceholder: string;
|
|
11
13
|
multiSelect: boolean;
|
|
12
14
|
searchtext: string;
|
|
13
15
|
filteredOptions: any[];
|
|
@@ -18,10 +20,15 @@ type __VLS_Props = {
|
|
|
18
20
|
isSelected: (option: any) => boolean;
|
|
19
21
|
loading: boolean;
|
|
20
22
|
closeOnSelect: boolean;
|
|
23
|
+
fullWidth: boolean;
|
|
24
|
+
validation?: 'success' | 'warning' | 'error' | null;
|
|
25
|
+
validationText?: string;
|
|
21
26
|
};
|
|
22
27
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
28
|
+
"update:isOptionsOpen": (value: boolean) => any;
|
|
23
29
|
"update:searchtext": (value: string) => any;
|
|
24
30
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
31
|
+
"onUpdate:isOptionsOpen"?: ((value: boolean) => any) | undefined;
|
|
25
32
|
"onUpdate:searchtext"?: ((value: string) => any) | undefined;
|
|
26
33
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
34
|
declare const _default: typeof __VLS_export;
|
|
@@ -6,47 +6,48 @@
|
|
|
6
6
|
span.tree-content {{ value }}
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
|
-
<script setup>
|
|
10
|
-
defineProps
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
})
|
|
9
|
+
<script lang="ts" setup>
|
|
10
|
+
defineProps<{
|
|
11
|
+
value: any
|
|
12
|
+
depth: number
|
|
13
|
+
hasChildren: boolean
|
|
14
|
+
isExpanded: boolean
|
|
15
|
+
toggle: () => void
|
|
16
|
+
}>()
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
|
-
<style scoped>
|
|
19
|
+
<style lang="scss" scoped>
|
|
20
20
|
.tree-cell {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: 4px;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.tree-toggle {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
display: inline-flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
width: 20px;
|
|
32
|
+
height: 20px;
|
|
33
|
+
border-radius: 2px;
|
|
34
|
+
flex-shrink: 0;
|
|
35
|
+
|
|
36
|
+
&:hover {
|
|
37
|
+
background-color: var(--hover-light, #e0e0e0);
|
|
38
|
+
}
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
.tree-spacer {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
width: 20px;
|
|
43
|
+
flex-shrink: 0;
|
|
44
|
+
display: inline-block;
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
.tree-content {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
flex: 1;
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
text-overflow: ellipsis;
|
|
51
|
+
white-space: nowrap;
|
|
51
52
|
}
|
|
52
53
|
</style>
|
|
@@ -21,35 +21,42 @@
|
|
|
21
21
|
)
|
|
22
22
|
</template>
|
|
23
23
|
|
|
24
|
-
<script setup>
|
|
25
|
-
import { computed } from
|
|
26
|
-
import KTreeCell from
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
24
|
+
<script lang="ts" setup>
|
|
25
|
+
import { computed } from 'vue'
|
|
26
|
+
import KTreeCell from './KTreeCell.vue'
|
|
27
|
+
import type { ITreeViewColumn, IRowAction } from '../../../../components/KTreeView/KTreeView.logic'
|
|
28
|
+
import type { IKDatatableAction } from '@katlux/providers'
|
|
29
|
+
|
|
30
|
+
const props = defineProps<{
|
|
31
|
+
dataProvider: any
|
|
32
|
+
columns: ITreeViewColumn[]
|
|
33
|
+
treeColumnIndex?: number
|
|
34
|
+
bulkActions?: IKDatatableAction[]
|
|
35
|
+
rowActions?: IRowAction[]
|
|
36
|
+
showCheckboxes: boolean
|
|
37
|
+
selectedRows: any[]
|
|
38
|
+
selectAll: boolean
|
|
39
|
+
expandedNodes: Set<string | number>
|
|
40
|
+
toggleNode: (id: string | number) => void
|
|
41
|
+
toggleRowSelection: (row: any) => void
|
|
42
|
+
toggleSelectAll: () => void
|
|
43
|
+
isRowSelected: (row: any) => boolean
|
|
44
|
+
// Merged cell slots from global (external slots like gantt timeline)
|
|
45
|
+
cellSlots?: Record<string, any>
|
|
46
|
+
headerSlots?: Record<string, any>
|
|
47
|
+
columnHeaders?: Record<string, string>
|
|
48
|
+
columnWidths?: Record<string, string>
|
|
49
|
+
}>()
|
|
50
|
+
|
|
51
|
+
const visibleFields = computed(() => (props.columns as ITreeViewColumn[]).map(col => col.field))
|
|
52
|
+
|
|
53
|
+
// Compute the tree column field and the dynamic slot name
|
|
54
|
+
const treeColumnField = computed(() => (props.columns as ITreeViewColumn[])[props.treeColumnIndex ?? 0]?.field)
|
|
55
|
+
const treeCellSlotName = computed(() => treeColumnField.value ? `cell-${treeColumnField.value}` : null)
|
|
49
56
|
</script>
|
|
50
57
|
|
|
51
|
-
<style scoped>
|
|
58
|
+
<style lang="scss" scoped>
|
|
52
59
|
.KTreeView {
|
|
53
|
-
|
|
60
|
+
width: 100%;
|
|
54
61
|
}
|
|
55
62
|
</style>
|