@katlux/toolkit 0.1.0-beta.0 → 0.1.0-beta.11
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/compiled/composables/useDebounce.mjs +11 -0
- package/dist/compiled/composables/useFilterLogic.mjs +170 -0
- package/dist/compiled/composables/usePresetComponent.mjs +36 -0
- package/dist/compiled/composables/useRemainingTime.mjs +17 -0
- package/dist/compiled/composables/useSortLogic.mjs +55 -0
- package/dist/compiled/composables/useTemplate.mjs +70 -0
- package/dist/compiled/utils/PresetResolver.mjs +100 -0
- package/dist/module.cjs +32 -0
- package/dist/module.d.cts +5 -0
- package/dist/module.d.mts +5 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +29 -0
- package/dist/runtime/components/KAccordion/KAccordion.global.d.vue.ts +13 -0
- package/dist/runtime/components/KAccordion/KAccordion.global.vue +15 -0
- package/dist/runtime/components/KAccordion/KAccordion.global.vue.d.ts +13 -0
- package/dist/runtime/components/KAccordion/KAccordion.logic.d.ts +9 -0
- package/dist/runtime/components/KAccordion/KAccordion.logic.js +38 -0
- package/dist/runtime/components/KAccordion/KAccordionItem.global.d.vue.ts +21 -0
- package/dist/runtime/components/KAccordion/KAccordionItem.global.vue +20 -0
- package/dist/runtime/components/KAccordion/KAccordionItem.global.vue.d.ts +21 -0
- package/dist/runtime/components/KAccordion/KAccordionItem.logic.d.ts +17 -0
- package/dist/runtime/components/KAccordion/KAccordionItem.logic.js +59 -0
- package/dist/runtime/components/KAlert/KAlert.global.d.vue.ts +3 -0
- package/dist/runtime/components/KAlert/KAlert.global.vue +9 -0
- package/dist/runtime/components/KAlert/KAlert.global.vue.d.ts +3 -0
- package/dist/runtime/components/KAlert/KAlert.logic.d.ts +4 -0
- package/dist/runtime/components/KAlert/KAlert.logic.js +4 -0
- package/dist/runtime/components/KBulkActions/KBulkActions.global.d.vue.ts +9 -0
- package/dist/runtime/components/KBulkActions/KBulkActions.global.vue +32 -0
- package/dist/runtime/components/KBulkActions/KBulkActions.global.vue.d.ts +9 -0
- package/dist/runtime/components/KBulkActions/KBulkActions.logic.d.ts +19 -0
- package/dist/runtime/components/KBulkActions/KBulkActions.logic.js +24 -0
- package/dist/runtime/components/KButton/KButton.global.d.vue.ts +56 -0
- package/dist/runtime/components/KButton/KButton.global.vue +24 -0
- package/dist/runtime/components/KButton/KButton.global.vue.d.ts +56 -0
- package/dist/runtime/components/KButton/KButton.logic.d.ts +54 -0
- package/dist/runtime/components/KButton/KButton.logic.js +42 -0
- package/dist/runtime/components/KCalendar/KCalendar.global.d.vue.ts +68 -0
- package/dist/runtime/components/KCalendar/KCalendar.global.vue +39 -0
- package/dist/runtime/components/KCalendar/KCalendar.global.vue.d.ts +68 -0
- package/dist/runtime/components/KCalendar/KCalendar.logic.d.ts +246 -0
- package/dist/runtime/components/KCalendar/KCalendar.logic.js +166 -0
- package/dist/runtime/components/KCalendar/KCalendarMonth.global.d.vue.ts +74 -0
- package/dist/runtime/components/KCalendar/KCalendarMonth.global.vue +33 -0
- package/dist/runtime/components/KCalendar/KCalendarMonth.global.vue.d.ts +74 -0
- package/dist/runtime/components/KCalendar/KCalendarMonth.logic.d.ts +54 -0
- package/dist/runtime/components/KCalendar/KCalendarMonth.logic.js +122 -0
- package/dist/runtime/components/KCalendar/KCalendarWeek.global.d.vue.ts +3 -0
- package/dist/runtime/components/KCalendar/KCalendarWeek.global.vue +9 -0
- package/dist/runtime/components/KCalendar/KCalendarWeek.global.vue.d.ts +3 -0
- package/dist/runtime/components/KCalendar/KCalendarWeek.logic.d.ts +4 -0
- package/dist/runtime/components/KCalendar/KCalendarWeek.logic.js +4 -0
- package/dist/runtime/components/KCalendar/recurringUtils.d.ts +11 -0
- package/dist/runtime/components/KCalendar/recurringUtils.js +191 -0
- package/dist/runtime/components/KCalendar/types.d.ts +38 -0
- package/dist/runtime/components/KCalendar/types.js +1 -0
- package/dist/runtime/components/KCheckbox/KCheckbox.global.d.vue.ts +34 -0
- package/dist/runtime/components/KCheckbox/KCheckbox.global.vue +21 -0
- package/dist/runtime/components/KCheckbox/KCheckbox.global.vue.d.ts +34 -0
- package/dist/runtime/components/KCheckbox/KCheckbox.logic.d.ts +28 -0
- package/dist/runtime/components/KCheckbox/KCheckbox.logic.js +20 -0
- package/dist/runtime/components/KCombobox/KCombobox.global.d.vue.ts +99 -0
- package/dist/runtime/components/KCombobox/KCombobox.global.vue +43 -0
- package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +99 -0
- package/dist/runtime/components/KCombobox/KCombobox.logic.d.ts +72 -0
- package/dist/runtime/components/KCombobox/KCombobox.logic.js +140 -0
- package/dist/runtime/components/KContextMenu/KContextMenu.global.d.vue.ts +3 -0
- package/dist/runtime/components/KContextMenu/KContextMenu.global.vue +9 -0
- package/dist/runtime/components/KContextMenu/KContextMenu.global.vue.d.ts +3 -0
- package/dist/runtime/components/KContextMenu/KContextMenu.logic.d.ts +4 -0
- package/dist/runtime/components/KContextMenu/KContextMenu.logic.js +4 -0
- package/dist/runtime/components/KDatatable/KDataIterator.global.d.vue.ts +23 -0
- package/dist/runtime/components/KDatatable/KDataIterator.global.vue +53 -0
- package/dist/runtime/components/KDatatable/KDataIterator.global.vue.d.ts +23 -0
- package/dist/runtime/components/KDatatable/KDataIterator.logic.d.ts +20 -0
- package/dist/runtime/components/KDatatable/KDataIterator.logic.js +37 -0
- package/dist/runtime/components/KDatatable/KDatatable.global.d.vue.ts +23 -0
- package/dist/runtime/components/KDatatable/KDatatable.global.vue +46 -0
- package/dist/runtime/components/KDatatable/KDatatable.global.vue.d.ts +23 -0
- package/dist/runtime/components/KDatatable/KDatatable.logic.d.ts +12 -0
- package/dist/runtime/components/KDatatable/KDatatable.logic.js +19 -0
- package/dist/runtime/components/KDatePicker/KDatePicker.global.d.vue.ts +42 -0
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue +45 -0
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue.d.ts +42 -0
- package/dist/runtime/components/KDatePicker/KDatePicker.logic.d.ts +33 -0
- package/dist/runtime/components/KDatePicker/KDatePicker.logic.js +63 -0
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.d.vue.ts +60 -0
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue +48 -0
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue.d.ts +60 -0
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.d.ts +45 -0
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.js +77 -0
- package/dist/runtime/components/KDropdown/KDropdown.global.d.vue.ts +28 -0
- package/dist/runtime/components/KDropdown/KDropdown.global.vue +21 -0
- package/dist/runtime/components/KDropdown/KDropdown.global.vue.d.ts +28 -0
- package/dist/runtime/components/KDropdown/KDropdown.logic.d.ts +21 -0
- package/dist/runtime/components/KDropdown/KDropdown.logic.js +31 -0
- package/dist/runtime/components/KGantt/KGantt.global.d.vue.ts +172 -0
- package/dist/runtime/components/KGantt/KGantt.global.vue +73 -0
- package/dist/runtime/components/KGantt/KGantt.global.vue.d.ts +172 -0
- package/dist/runtime/components/KGantt/KGantt.logic.d.ts +190 -0
- package/dist/runtime/components/KGantt/KGantt.logic.js +310 -0
- package/dist/runtime/components/KGrid/KGrid.global.d.vue.ts +60 -0
- package/dist/runtime/components/KGrid/KGrid.global.vue +18 -0
- package/dist/runtime/components/KGrid/KGrid.global.vue.d.ts +60 -0
- package/dist/runtime/components/KGrid/KGrid.logic.d.ts +37 -0
- package/dist/runtime/components/KGrid/KGrid.logic.js +53 -0
- package/dist/runtime/components/KHourPicker/KHourPicker.global.d.vue.ts +73 -0
- package/dist/runtime/components/KHourPicker/KHourPicker.global.vue +40 -0
- package/dist/runtime/components/KHourPicker/KHourPicker.global.vue.d.ts +73 -0
- package/dist/runtime/components/KHourPicker/KHourPicker.logic.d.ts +46 -0
- package/dist/runtime/components/KHourPicker/KHourPicker.logic.js +58 -0
- package/dist/runtime/components/KHourSelect/KHourSelect.global.d.vue.ts +55 -0
- package/dist/runtime/components/KHourSelect/KHourSelect.global.vue +30 -0
- package/dist/runtime/components/KHourSelect/KHourSelect.global.vue.d.ts +55 -0
- package/dist/runtime/components/KHourSelect/KHourSelect.logic.d.ts +34 -0
- package/dist/runtime/components/KHourSelect/KHourSelect.logic.js +69 -0
- package/dist/runtime/components/KIcon/KIcon.global.d.vue.ts +41 -0
- package/dist/runtime/components/KIcon/KIcon.global.vue +19 -0
- package/dist/runtime/components/KIcon/KIcon.global.vue.d.ts +41 -0
- package/dist/runtime/components/KIcon/KIcon.logic.d.ts +29 -0
- package/dist/runtime/components/KIcon/KIcon.logic.js +41 -0
- package/dist/runtime/components/KLoader/KLoader.global.d.vue.ts +33 -0
- package/dist/runtime/components/KLoader/KLoader.global.vue +22 -0
- package/dist/runtime/components/KLoader/KLoader.global.vue.d.ts +33 -0
- package/dist/runtime/components/KLoader/KLoader.logic.d.ts +29 -0
- package/dist/runtime/components/KLoader/KLoader.logic.js +25 -0
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.d.vue.ts +45 -0
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue +25 -0
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue.d.ts +45 -0
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.logic.d.ts +66 -0
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.logic.js +186 -0
- package/dist/runtime/components/KModal/KModal.global.d.vue.ts +6 -0
- package/dist/runtime/components/KModal/KModal.global.vue +23 -0
- package/dist/runtime/components/KModal/KModal.global.vue.d.ts +6 -0
- package/dist/runtime/components/KModal/KModal.logic.d.ts +8 -0
- package/dist/runtime/components/KModal/KModal.logic.js +16 -0
- package/dist/runtime/components/KPagination/KPagination.global.d.vue.ts +7 -0
- package/dist/runtime/components/KPagination/KPagination.global.vue +45 -0
- package/dist/runtime/components/KPagination/KPagination.global.vue.d.ts +7 -0
- package/dist/runtime/components/KPagination/KPagination.logic.d.ts +20 -0
- package/dist/runtime/components/KPagination/KPagination.logic.js +73 -0
- package/dist/runtime/components/KPanel/KPanel.global.d.vue.ts +33 -0
- package/dist/runtime/components/KPanel/KPanel.global.vue +19 -0
- package/dist/runtime/components/KPanel/KPanel.global.vue.d.ts +33 -0
- package/dist/runtime/components/KPanel/KPanel.logic.d.ts +20 -0
- package/dist/runtime/components/KPanel/KPanel.logic.js +17 -0
- package/dist/runtime/components/KRadiobox/KRadiobox.global.d.vue.ts +37 -0
- package/dist/runtime/components/KRadiobox/KRadiobox.global.vue +22 -0
- package/dist/runtime/components/KRadiobox/KRadiobox.global.vue.d.ts +37 -0
- package/dist/runtime/components/KRadiobox/KRadiobox.logic.d.ts +22 -0
- package/dist/runtime/components/KRadiobox/KRadiobox.logic.js +20 -0
- package/dist/runtime/components/KRangeSlider/KRangeSlider.global.d.vue.ts +66 -0
- package/dist/runtime/components/KRangeSlider/KRangeSlider.global.vue +36 -0
- package/dist/runtime/components/KRangeSlider/KRangeSlider.global.vue.d.ts +66 -0
- package/dist/runtime/components/KRangeSlider/KRangeSlider.logic.d.ts +52 -0
- package/dist/runtime/components/KRangeSlider/KRangeSlider.logic.js +65 -0
- package/dist/runtime/components/KSearchTree/KSearchTree.global.d.vue.ts +3 -0
- package/dist/runtime/components/KSearchTree/KSearchTree.global.vue +9 -0
- package/dist/runtime/components/KSearchTree/KSearchTree.global.vue.d.ts +3 -0
- package/dist/runtime/components/KSearchTree/KSearchTree.logic.d.ts +4 -0
- package/dist/runtime/components/KSearchTree/KSearchTree.logic.js +4 -0
- package/dist/runtime/components/KSearchTreeDropdown/KSearchTreeDropdown.global.d.vue.ts +3 -0
- package/dist/runtime/components/KSearchTreeDropdown/KSearchTreeDropdown.global.vue +9 -0
- package/dist/runtime/components/KSearchTreeDropdown/KSearchTreeDropdown.global.vue.d.ts +3 -0
- package/dist/runtime/components/KSearchTreeDropdown/KSearchTreeDropdown.logic.d.ts +4 -0
- package/dist/runtime/components/KSearchTreeDropdown/KSearchTreeDropdown.logic.js +4 -0
- package/dist/runtime/components/KSlider/KSlider.global.d.vue.ts +55 -0
- package/dist/runtime/components/KSlider/KSlider.global.vue +31 -0
- package/dist/runtime/components/KSlider/KSlider.global.vue.d.ts +55 -0
- package/dist/runtime/components/KSlider/KSlider.logic.d.ts +45 -0
- package/dist/runtime/components/KSlider/KSlider.logic.js +45 -0
- package/dist/runtime/components/KTabs/KTabItem.global.d.vue.ts +21 -0
- package/dist/runtime/components/KTabs/KTabItem.global.vue +20 -0
- package/dist/runtime/components/KTabs/KTabItem.global.vue.d.ts +21 -0
- package/dist/runtime/components/KTabs/KTabItem.logic.d.ts +17 -0
- package/dist/runtime/components/KTabs/KTabItem.logic.js +37 -0
- package/dist/runtime/components/KTabs/KTabs.global.d.vue.ts +3 -0
- package/dist/runtime/components/KTabs/KTabs.global.vue +20 -0
- package/dist/runtime/components/KTabs/KTabs.global.vue.d.ts +3 -0
- package/dist/runtime/components/KTabs/KTabs.logic.d.ts +8 -0
- package/dist/runtime/components/KTabs/KTabs.logic.js +49 -0
- package/dist/runtime/components/KTextarea/KTextarea.global.d.vue.ts +36 -0
- package/dist/runtime/components/KTextarea/KTextarea.global.vue +19 -0
- package/dist/runtime/components/KTextarea/KTextarea.global.vue.d.ts +36 -0
- package/dist/runtime/components/KTextarea/KTextarea.logic.d.ts +31 -0
- package/dist/runtime/components/KTextarea/KTextarea.logic.js +24 -0
- package/dist/runtime/components/KTextbox/KTextbox.global.d.vue.ts +36 -0
- package/dist/runtime/components/KTextbox/KTextbox.global.vue +20 -0
- package/dist/runtime/components/KTextbox/KTextbox.global.vue.d.ts +36 -0
- package/dist/runtime/components/KTextbox/KTextbox.logic.d.ts +33 -0
- package/dist/runtime/components/KTextbox/KTextbox.logic.js +32 -0
- package/dist/runtime/components/KThree/KThree.global.d.vue.ts +3 -0
- package/dist/runtime/components/KThree/KThree.global.vue +7 -0
- package/dist/runtime/components/KThree/KThree.global.vue.d.ts +3 -0
- package/dist/runtime/components/KTooltip/KTooltip.global.d.vue.ts +3 -0
- package/dist/runtime/components/KTooltip/KTooltip.global.vue +9 -0
- package/dist/runtime/components/KTooltip/KTooltip.global.vue.d.ts +3 -0
- package/dist/runtime/components/KTooltip/KTooltip.logic.d.ts +4 -0
- package/dist/runtime/components/KTooltip/KTooltip.logic.js +4 -0
- package/dist/runtime/components/KTree/KTree.global.d.vue.ts +77 -0
- package/dist/runtime/components/KTree/KTree.global.vue +36 -0
- package/dist/runtime/components/KTree/KTree.global.vue.d.ts +77 -0
- package/dist/runtime/components/KTree/KTree.logic.d.ts +51 -0
- package/dist/runtime/components/KTree/KTree.logic.js +65 -0
- package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +119 -0
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue +66 -0
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +119 -0
- package/dist/runtime/components/KTreePicker/KTreePicker.logic.d.ts +77 -0
- package/dist/runtime/components/KTreePicker/KTreePicker.logic.js +58 -0
- package/dist/runtime/components/KTreeView/KTreeView.global.d.vue.ts +94 -0
- package/dist/runtime/components/KTreeView/KTreeView.global.vue +69 -0
- package/dist/runtime/components/KTreeView/KTreeView.global.vue.d.ts +94 -0
- package/dist/runtime/components/KTreeView/KTreeView.logic.d.ts +80 -0
- package/dist/runtime/components/KTreeView/KTreeView.logic.js +90 -0
- package/dist/runtime/composables/useDebounce.d.ts +7 -0
- package/dist/runtime/composables/useDebounce.js +11 -0
- package/dist/runtime/composables/useFilterLogic.d.ts +20 -0
- package/dist/runtime/composables/useFilterLogic.js +170 -0
- package/dist/runtime/composables/usePresetComponent.d.ts +2 -0
- package/dist/runtime/composables/usePresetComponent.js +36 -0
- package/dist/runtime/composables/useRemainingTime.d.ts +3 -0
- package/dist/runtime/composables/useRemainingTime.js +17 -0
- package/dist/runtime/composables/useSortLogic.d.ts +4 -0
- package/dist/runtime/composables/useSortLogic.js +55 -0
- package/dist/runtime/composables/useTemplate.d.ts +47 -0
- package/dist/runtime/composables/useTemplate.js +70 -0
- package/dist/runtime/directives/clickOutside.d.ts +7 -0
- package/dist/runtime/directives/clickOutside.js +45 -0
- package/dist/runtime/directives/index.d.ts +1 -0
- package/dist/runtime/directives/index.js +1 -0
- package/dist/runtime/plugins/PresetPlugin.d.ts +11 -0
- package/dist/runtime/plugins/PresetPlugin.js +34 -0
- package/dist/runtime/plugins/registerDirectives.d.ts +2 -0
- package/dist/runtime/plugins/registerDirectives.js +5 -0
- package/dist/runtime/presets/default/assets/scss/css-variables.css +151 -0
- package/dist/runtime/presets/default/assets/scss/docs.css +42 -0
- package/dist/runtime/presets/default/assets/scss/index.css +211 -0
- package/dist/runtime/presets/default/assets/scss/mixins.css +0 -0
- package/dist/runtime/presets/default/assets/scss/reset.css +16 -0
- package/dist/runtime/presets/default/components/KAccordion/KAccordion.d.vue.ts +3 -0
- package/{src → dist}/runtime/presets/default/components/KAccordion/KAccordion.vue +2 -5
- package/dist/runtime/presets/default/components/KAccordion/KAccordion.vue.d.ts +3 -0
- package/dist/runtime/presets/default/components/KAccordion/KAccordionItem.d.vue.ts +8 -0
- package/dist/runtime/presets/default/components/KAccordion/KAccordionItem.vue +50 -0
- package/dist/runtime/presets/default/components/KAccordion/KAccordionItem.vue.d.ts +8 -0
- package/dist/runtime/presets/default/components/KAlert/KAlert.d.vue.ts +3 -0
- package/dist/runtime/presets/default/components/KAlert/KAlert.vue.d.ts +3 -0
- package/dist/runtime/presets/default/components/KBulkActions/KBulkActions.d.vue.ts +17 -0
- package/{src → dist}/runtime/presets/default/components/KBulkActions/KBulkActions.vue +22 -29
- package/dist/runtime/presets/default/components/KBulkActions/KBulkActions.vue.d.ts +17 -0
- package/dist/runtime/presets/default/components/KButton/KButton.d.vue.ts +11 -0
- package/dist/runtime/presets/default/components/KButton/KButton.vue +444 -0
- package/dist/runtime/presets/default/components/KButton/KButton.vue.d.ts +11 -0
- package/dist/runtime/presets/default/components/KCalendar/KCalendar.d.vue.ts +18 -0
- package/dist/runtime/presets/default/components/KCalendar/KCalendar.vue +80 -0
- package/dist/runtime/presets/default/components/KCalendar/KCalendar.vue.d.ts +18 -0
- package/dist/runtime/presets/default/components/KCalendar/KCalendarMonth.d.vue.ts +15 -0
- package/dist/runtime/presets/default/components/KCalendar/KCalendarMonth.vue +189 -0
- package/dist/runtime/presets/default/components/KCalendar/KCalendarMonth.vue.d.ts +15 -0
- package/dist/runtime/presets/default/components/KCalendar/KCalendarWeek.d.vue.ts +3 -0
- package/dist/runtime/presets/default/components/KCalendar/KCalendarWeek.vue.d.ts +3 -0
- package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.d.vue.ts +12 -0
- package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.vue +51 -0
- package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.vue.d.ts +12 -0
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.d.vue.ts +23 -0
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue +97 -0
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue.d.ts +23 -0
- package/dist/runtime/presets/default/components/KCombobox/KComboboxList.d.vue.ts +17 -0
- package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue +83 -0
- package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue.d.ts +17 -0
- package/dist/runtime/presets/default/components/KContextMenu/KContextMenu.d.vue.ts +3 -0
- package/dist/runtime/presets/default/components/KContextMenu/KContextMenu.vue.d.ts +3 -0
- package/dist/runtime/presets/default/components/KDataIterator/KDataIterator.d.vue.ts +24 -0
- package/dist/runtime/presets/default/components/KDataIterator/KDataIterator.vue +57 -0
- package/dist/runtime/presets/default/components/KDataIterator/KDataIterator.vue.d.ts +24 -0
- package/dist/runtime/presets/default/components/KDatatable/KDatatable.d.vue.ts +23 -0
- package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue +138 -0
- package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue.d.ts +23 -0
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.d.vue.ts +21 -0
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue +33 -0
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue.d.ts +21 -0
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.d.vue.ts +25 -0
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue +66 -0
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue.d.ts +25 -0
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.d.vue.ts +8 -0
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue +33 -0
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue.d.ts +8 -0
- package/dist/runtime/presets/default/components/KGantt/KGantt.d.vue.ts +49 -0
- package/dist/runtime/presets/default/components/KGantt/KGantt.vue +304 -0
- package/dist/runtime/presets/default/components/KGantt/KGantt.vue.d.ts +49 -0
- package/dist/runtime/presets/default/components/KGantt/KGanttRuler.d.vue.ts +8 -0
- package/dist/runtime/presets/default/components/KGantt/KGanttRuler.vue +51 -0
- package/dist/runtime/presets/default/components/KGantt/KGanttRuler.vue.d.ts +8 -0
- package/dist/runtime/presets/default/components/KGantt/KGanttTimeline.d.vue.ts +41 -0
- package/dist/runtime/presets/default/components/KGantt/KGanttTimeline.vue +188 -0
- package/dist/runtime/presets/default/components/KGantt/KGanttTimeline.vue.d.ts +41 -0
- package/dist/runtime/presets/default/components/KGrid/KGrid.d.vue.ts +6 -0
- package/dist/runtime/presets/default/components/KGrid/KGrid.vue +70 -0
- package/dist/runtime/presets/default/components/KGrid/KGrid.vue.d.ts +6 -0
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.d.vue.ts +20 -0
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue +51 -0
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue.d.ts +20 -0
- package/dist/runtime/presets/default/components/KHourSelect/KHourSelect.d.vue.ts +8 -0
- package/dist/runtime/presets/default/components/KHourSelect/KHourSelect.vue +43 -0
- package/dist/runtime/presets/default/components/KHourSelect/KHourSelect.vue.d.ts +8 -0
- package/dist/runtime/presets/default/components/KIcon/KIcon.d.vue.ts +9 -0
- package/dist/runtime/presets/default/components/KIcon/KIcon.vue +30 -0
- package/dist/runtime/presets/default/components/KIcon/KIcon.vue.d.ts +9 -0
- package/dist/runtime/presets/default/components/KLoader/KLoader.d.vue.ts +9 -0
- package/dist/runtime/presets/default/components/KLoader/KLoader.vue +60 -0
- package/dist/runtime/presets/default/components/KLoader/KLoader.vue.d.ts +9 -0
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.d.vue.ts +15 -0
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue +101 -0
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue.d.ts +15 -0
- package/dist/runtime/presets/default/components/KModal/KModal.d.vue.ts +7 -0
- package/dist/runtime/presets/default/components/KModal/KModal.vue +42 -0
- package/dist/runtime/presets/default/components/KModal/KModal.vue.d.ts +7 -0
- package/dist/runtime/presets/default/components/KPagination/KPagination.d.vue.ts +18 -0
- package/dist/runtime/presets/default/components/KPagination/KPagination.vue +70 -0
- package/dist/runtime/presets/default/components/KPagination/KPagination.vue.d.ts +18 -0
- package/dist/runtime/presets/default/components/KPanel/KPanel.d.vue.ts +12 -0
- package/dist/runtime/presets/default/components/KPanel/KPanel.vue +47 -0
- package/dist/runtime/presets/default/components/KPanel/KPanel.vue.d.ts +12 -0
- package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.d.vue.ts +17 -0
- package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.vue +43 -0
- package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.vue.d.ts +17 -0
- package/dist/runtime/presets/default/components/KRangeSlider/KRangeSlider.d.vue.ts +19 -0
- package/dist/runtime/presets/default/components/KRangeSlider/KRangeSlider.vue +156 -0
- package/dist/runtime/presets/default/components/KRangeSlider/KRangeSlider.vue.d.ts +19 -0
- package/dist/runtime/presets/default/components/KSearchTree/KSearchTree.d.vue.ts +3 -0
- package/dist/runtime/presets/default/components/KSearchTree/KSearchTree.vue.d.ts +3 -0
- package/dist/runtime/presets/default/components/KSearchTreeDropdown/KSearchTreeDropdown.d.vue.ts +3 -0
- package/dist/runtime/presets/default/components/KSearchTreeDropdown/KSearchTreeDropdown.vue.d.ts +3 -0
- package/dist/runtime/presets/default/components/KSlider/KSlider.d.vue.ts +15 -0
- package/dist/runtime/presets/default/components/KSlider/KSlider.vue +121 -0
- package/dist/runtime/presets/default/components/KSlider/KSlider.vue.d.ts +15 -0
- package/dist/runtime/presets/default/components/KTabs/KTabItem.d.vue.ts +8 -0
- package/dist/runtime/presets/default/components/KTabs/KTabItem.vue +46 -0
- package/dist/runtime/presets/default/components/KTabs/KTabItem.vue.d.ts +8 -0
- package/dist/runtime/presets/default/components/KTabs/KTabs.d.vue.ts +8 -0
- package/{src → dist}/runtime/presets/default/components/KTabs/KTabs.vue +6 -9
- package/dist/runtime/presets/default/components/KTabs/KTabs.vue.d.ts +8 -0
- package/dist/runtime/presets/default/components/KTextarea/KTextarea.d.vue.ts +15 -0
- package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue +29 -0
- package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue.d.ts +15 -0
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.d.vue.ts +13 -0
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue +46 -0
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue.d.ts +13 -0
- package/dist/runtime/presets/default/components/KTooltip/KTooltip.d.vue.ts +3 -0
- package/dist/runtime/presets/default/components/KTooltip/KTooltip.vue.d.ts +3 -0
- package/dist/runtime/presets/default/components/KTree/KTree.d.vue.ts +23 -0
- package/dist/runtime/presets/default/components/KTree/KTree.vue +126 -0
- package/dist/runtime/presets/default/components/KTree/KTree.vue.d.ts +23 -0
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.d.vue.ts +28 -0
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue +80 -0
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue.d.ts +28 -0
- package/dist/runtime/presets/default/components/KTreeView/KTreeCell.d.vue.ts +10 -0
- package/dist/runtime/presets/default/components/KTreeView/KTreeCell.vue +52 -0
- package/dist/runtime/presets/default/components/KTreeView/KTreeCell.vue.d.ts +10 -0
- package/dist/runtime/presets/default/components/KTreeView/KTreeView.d.vue.ts +24 -0
- package/dist/runtime/presets/default/components/KTreeView/KTreeView.vue +55 -0
- package/dist/runtime/presets/default/components/KTreeView/KTreeView.vue.d.ts +24 -0
- package/dist/runtime/utils/PresetResolver.d.ts +64 -0
- package/dist/runtime/utils/PresetResolver.js +100 -0
- package/dist/types.d.mts +7 -0
- package/package.json +10 -6
- package/ARCHITECTURE.md +0 -70
- package/PRESET_NAMING.md +0 -63
- package/PRESET_SYSTEM.md +0 -204
- package/build.config.ts +0 -3
- package/nuxt.config.ts +0 -9
- package/src/module.ts +0 -36
- package/src/runtime/components/KAccordion/KAccordion.global.vue +0 -18
- package/src/runtime/components/KAccordion/KAccordion.logic.ts +0 -49
- package/src/runtime/components/KAccordion/KAccordionItem.global.vue +0 -24
- package/src/runtime/components/KAccordion/KAccordionItem.logic.ts +0 -72
- package/src/runtime/components/KAlert/KAlert.global.vue +0 -10
- package/src/runtime/components/KAlert/KAlert.logic.ts +0 -3
- package/src/runtime/components/KBulkActions/KBulkActions.global.vue +0 -37
- package/src/runtime/components/KBulkActions/KBulkActions.logic.ts +0 -36
- package/src/runtime/components/KButton/KButton.global.vue +0 -37
- package/src/runtime/components/KButton/KButton.logic.ts +0 -75
- package/src/runtime/components/KCalendar/KCalendar.global.vue +0 -43
- package/src/runtime/components/KCalendar/KCalendar.logic.ts +0 -197
- package/src/runtime/components/KCalendar/KCalendarMonth.global.vue +0 -37
- package/src/runtime/components/KCalendar/KCalendarMonth.logic.ts +0 -175
- package/src/runtime/components/KCalendar/KCalendarWeek.global.vue +0 -10
- package/src/runtime/components/KCalendar/KCalendarWeek.logic.ts +0 -3
- package/src/runtime/components/KCalendar/recurringUtils.ts +0 -270
- package/src/runtime/components/KCalendar/types.ts +0 -54
- package/src/runtime/components/KCheckbox/KCheckbox.global.vue +0 -28
- package/src/runtime/components/KCheckbox/KCheckbox.logic.ts +0 -36
- package/src/runtime/components/KCombobox/KCombobox.global.vue +0 -51
- package/src/runtime/components/KCombobox/KCombobox.logic.ts +0 -194
- package/src/runtime/components/KContextMenu/KContextMenu.global.vue +0 -10
- package/src/runtime/components/KContextMenu/KContextMenu.logic.ts +0 -3
- package/src/runtime/components/KDatatable/KDataIterator.global.vue +0 -65
- package/src/runtime/components/KDatatable/KDataIterator.logic.ts +0 -59
- package/src/runtime/components/KDatatable/KDatatable.global.vue +0 -60
- package/src/runtime/components/KDatatable/KDatatable.logic.ts +0 -29
- package/src/runtime/components/KDatePicker/KDatePicker.global.vue +0 -52
- package/src/runtime/components/KDatePicker/KDatePicker.logic.ts +0 -87
- package/src/runtime/components/KDateTimePicker/KDateTimePicker.global.vue +0 -53
- package/src/runtime/components/KDateTimePicker/KDateTimePicker.logic.ts +0 -103
- package/src/runtime/components/KDropdown/KDropdown.global.vue +0 -25
- package/src/runtime/components/KDropdown/KDropdown.logic.ts +0 -46
- package/src/runtime/components/KGantt/KGantt.global.vue +0 -82
- package/src/runtime/components/KGantt/KGantt.logic.ts +0 -439
- package/src/runtime/components/KGrid/KGrid.global.vue +0 -22
- package/src/runtime/components/KGrid/KGrid.logic.ts +0 -67
- package/src/runtime/components/KHourPicker/KHourPicker.global.vue +0 -47
- package/src/runtime/components/KHourPicker/KHourPicker.logic.ts +0 -74
- package/src/runtime/components/KHourSelect/KHourSelect.global.vue +0 -41
- package/src/runtime/components/KHourSelect/KHourSelect.logic.ts +0 -92
- package/src/runtime/components/KIcon/KIcon.global.vue +0 -23
- package/src/runtime/components/KIcon/KIcon.logic.ts +0 -62
- package/src/runtime/components/KLoader/KLoader.global.vue +0 -27
- package/src/runtime/components/KLoader/KLoader.logic.ts +0 -34
- package/src/runtime/components/KMaskTextbox/KMaskTextbox.global.vue +0 -32
- package/src/runtime/components/KMaskTextbox/KMaskTextbox.logic.ts +0 -290
- package/src/runtime/components/KModal/KModal.global.vue +0 -28
- package/src/runtime/components/KModal/KModal.logic.ts +0 -20
- package/src/runtime/components/KPagination/KPagination.global.vue +0 -50
- package/src/runtime/components/KPagination/KPagination.logic.ts +0 -99
- package/src/runtime/components/KPanel/KPanel.global.vue +0 -22
- package/src/runtime/components/KPanel/KPanel.logic.ts +0 -24
- package/src/runtime/components/KRadiobox/KRadiobox.global.vue +0 -29
- package/src/runtime/components/KRadiobox/KRadiobox.logic.ts +0 -27
- package/src/runtime/components/KRangeSlider/KRangeSlider.global.vue +0 -43
- package/src/runtime/components/KRangeSlider/KRangeSlider.logic.ts +0 -94
- package/src/runtime/components/KSearchTree/KSearchTree.global.vue +0 -10
- package/src/runtime/components/KSearchTree/KSearchTree.logic.ts +0 -3
- package/src/runtime/components/KSearchTreeDropdown/KSearchTreeDropdown.global.vue +0 -10
- package/src/runtime/components/KSearchTreeDropdown/KSearchTreeDropdown.logic.ts +0 -3
- package/src/runtime/components/KSlider/KSlider.global.vue +0 -38
- package/src/runtime/components/KSlider/KSlider.logic.ts +0 -69
- package/src/runtime/components/KTabs/KTabItem.global.vue +0 -24
- package/src/runtime/components/KTabs/KTabItem.logic.ts +0 -48
- package/src/runtime/components/KTabs/KTabs.global.vue +0 -24
- package/src/runtime/components/KTabs/KTabs.logic.ts +0 -60
- package/src/runtime/components/KTextarea/KTextarea.global.vue +0 -26
- package/src/runtime/components/KTextarea/KTextarea.logic.ts +0 -43
- package/src/runtime/components/KTextbox/KTextbox.global.vue +0 -27
- package/src/runtime/components/KTextbox/KTextbox.logic.ts +0 -53
- package/src/runtime/components/KThree/KThree.global.vue +0 -13
- package/src/runtime/components/KTooltip/KTooltip.global.vue +0 -10
- package/src/runtime/components/KTooltip/KTooltip.logic.ts +0 -3
- package/src/runtime/components/KTree/KTree.global.vue +0 -41
- package/src/runtime/components/KTree/KTree.logic.ts +0 -92
- package/src/runtime/components/KTreePicker/KTreePicker.global.vue +0 -80
- package/src/runtime/components/KTreePicker/KTreePicker.logic.ts +0 -85
- package/src/runtime/components/KTreeView/KTreeView.global.vue +0 -81
- package/src/runtime/components/KTreeView/KTreeView.logic.ts +0 -146
- package/src/runtime/composables/useDebounce.ts +0 -33
- package/src/runtime/composables/useFilterLogic.ts +0 -245
- package/src/runtime/composables/usePresetComponent.ts +0 -69
- package/src/runtime/composables/useRemainingTime.ts +0 -28
- package/src/runtime/composables/useSortLogic.ts +0 -82
- package/src/runtime/composables/useTemplate.ts +0 -135
- package/src/runtime/directives/clickOutside.ts +0 -75
- package/src/runtime/directives/index.ts +0 -1
- package/src/runtime/plugins/PresetPlugin.ts +0 -59
- package/src/runtime/plugins/registerDirectives.ts +0 -6
- package/src/runtime/presets/default/assets/scss/css-variables.scss +0 -216
- package/src/runtime/presets/default/assets/scss/docs.scss +0 -52
- package/src/runtime/presets/default/assets/scss/index.scss +0 -4
- package/src/runtime/presets/default/assets/scss/mixins.scss +0 -94
- package/src/runtime/presets/default/assets/scss/reset.scss +0 -16
- package/src/runtime/presets/default/components/KAccordion/KAccordionItem.vue +0 -53
- package/src/runtime/presets/default/components/KButton/KButton.vue +0 -163
- package/src/runtime/presets/default/components/KCalendar/KCalendar.vue +0 -84
- package/src/runtime/presets/default/components/KCalendar/KCalendarMonth.vue +0 -217
- package/src/runtime/presets/default/components/KCheckbox/KCheckbox.vue +0 -61
- package/src/runtime/presets/default/components/KCombobox/KCombobox.vue +0 -106
- package/src/runtime/presets/default/components/KCombobox/KComboboxList.vue +0 -94
- package/src/runtime/presets/default/components/KDataIterator/KDataIterator.vue +0 -66
- package/src/runtime/presets/default/components/KDatatable/KDatatable.vue +0 -155
- package/src/runtime/presets/default/components/KDatePicker/KDatePicker.vue +0 -49
- package/src/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue +0 -84
- package/src/runtime/presets/default/components/KDropdown/KDropdown.vue +0 -38
- package/src/runtime/presets/default/components/KGantt/KGantt.vue +0 -400
- package/src/runtime/presets/default/components/KGantt/KGanttRuler.vue +0 -56
- package/src/runtime/presets/default/components/KGantt/KGanttTimeline.vue +0 -218
- package/src/runtime/presets/default/components/KGrid/KGrid.vue +0 -72
- package/src/runtime/presets/default/components/KHourPicker/KHourPicker.vue +0 -55
- package/src/runtime/presets/default/components/KHourSelect/KHourSelect.vue +0 -49
- package/src/runtime/presets/default/components/KIcon/KIcon.vue +0 -30
- package/src/runtime/presets/default/components/KLoader/KLoader.vue +0 -66
- package/src/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue +0 -125
- package/src/runtime/presets/default/components/KModal/KModal.vue +0 -45
- package/src/runtime/presets/default/components/KPagination/KPagination.vue +0 -72
- package/src/runtime/presets/default/components/KPanel/KPanel.vue +0 -55
- package/src/runtime/presets/default/components/KRadiobox/KRadiobox.vue +0 -44
- package/src/runtime/presets/default/components/KRangeSlider/KRangeSlider.vue +0 -189
- package/src/runtime/presets/default/components/KSlider/KSlider.vue +0 -144
- package/src/runtime/presets/default/components/KTabs/KTabItem.vue +0 -49
- package/src/runtime/presets/default/components/KTextarea/KTextarea.vue +0 -32
- package/src/runtime/presets/default/components/KTextbox/KTextbox.vue +0 -53
- package/src/runtime/presets/default/components/KTree/KTree.vue +0 -148
- package/src/runtime/presets/default/components/KTreePicker/KTreePicker.vue +0 -100
- package/src/runtime/presets/default/components/KTreeView/KTreeCell.vue +0 -53
- package/src/runtime/presets/default/components/KTreeView/KTreeView.vue +0 -62
- package/src/runtime/utils/PresetResolver.ts +0 -158
- package/tsconfig.json +0 -20
- /package/{src → dist}/runtime/app.config.d.ts +0 -0
- /package/{src → dist}/runtime/presets/default/assets/svg/calendar.svg +0 -0
- /package/{src → dist}/runtime/presets/default/assets/svg/check.svg +0 -0
- /package/{src → dist}/runtime/presets/default/assets/svg/chevron.svg +0 -0
- /package/{src → dist}/runtime/presets/default/assets/svg/close.svg +0 -0
- /package/{src → dist}/runtime/presets/default/assets/svg/file.svg +0 -0
- /package/{src → dist}/runtime/presets/default/assets/svg/folder.svg +0 -0
- /package/{src → dist}/runtime/presets/default/assets/svg/search.svg +0 -0
- /package/{src → dist}/runtime/presets/default/assets/svg/user.svg +0 -0
- /package/{src → dist}/runtime/presets/default/components/KAlert/KAlert.vue +0 -0
- /package/{src → dist}/runtime/presets/default/components/KCalendar/KCalendarWeek.vue +0 -0
- /package/{src → dist}/runtime/presets/default/components/KContextMenu/KContextMenu.vue +0 -0
- /package/{src → dist}/runtime/presets/default/components/KSearchTree/KSearchTree.vue +0 -0
- /package/{src → dist}/runtime/presets/default/components/KSearchTreeDropdown/KSearchTreeDropdown.vue +0 -0
- /package/{src → dist}/runtime/presets/default/components/KTooltip/KTooltip.vue +0 -0
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
export const KGanttDefaultProps = {
|
|
3
|
+
dataProvider: {
|
|
4
|
+
type: Object,
|
|
5
|
+
required: true
|
|
6
|
+
},
|
|
7
|
+
columns: {
|
|
8
|
+
type: Array,
|
|
9
|
+
required: true
|
|
10
|
+
},
|
|
11
|
+
treeColumnIndex: {
|
|
12
|
+
type: Number,
|
|
13
|
+
default: 0
|
|
14
|
+
},
|
|
15
|
+
bulkActions: {
|
|
16
|
+
type: Array,
|
|
17
|
+
default: () => []
|
|
18
|
+
},
|
|
19
|
+
rowActions: {
|
|
20
|
+
type: Array,
|
|
21
|
+
default: () => []
|
|
22
|
+
},
|
|
23
|
+
startDate: {
|
|
24
|
+
type: [Date, String, Number],
|
|
25
|
+
default: null
|
|
26
|
+
},
|
|
27
|
+
endDate: {
|
|
28
|
+
type: [Date, String, Number],
|
|
29
|
+
default: null
|
|
30
|
+
},
|
|
31
|
+
startingPoint: {
|
|
32
|
+
type: [Date, String, Number],
|
|
33
|
+
default: null
|
|
34
|
+
},
|
|
35
|
+
endingPoint: {
|
|
36
|
+
type: [Date, String, Number],
|
|
37
|
+
default: null
|
|
38
|
+
},
|
|
39
|
+
taskMapping: {
|
|
40
|
+
type: Object,
|
|
41
|
+
default: () => ({
|
|
42
|
+
tasksField: "tasks",
|
|
43
|
+
startDate: "startDate",
|
|
44
|
+
endDate: "endDate",
|
|
45
|
+
color: "color",
|
|
46
|
+
title: "title",
|
|
47
|
+
taskTypeField: "type",
|
|
48
|
+
appearanceField: "appearance"
|
|
49
|
+
})
|
|
50
|
+
},
|
|
51
|
+
editable: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: false
|
|
54
|
+
},
|
|
55
|
+
snapTo: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: "day"
|
|
58
|
+
// '15m', '30m', 'hour', 'day', 'week'
|
|
59
|
+
},
|
|
60
|
+
resourceTypeField: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: "type"
|
|
63
|
+
},
|
|
64
|
+
taskTypeField: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: "type"
|
|
67
|
+
},
|
|
68
|
+
mode: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: "date"
|
|
71
|
+
// 'date' | 'numeric'
|
|
72
|
+
},
|
|
73
|
+
cellSlots: {
|
|
74
|
+
type: Object,
|
|
75
|
+
default: () => ({})
|
|
76
|
+
},
|
|
77
|
+
headerSlots: {
|
|
78
|
+
type: Object,
|
|
79
|
+
default: () => ({})
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
export function useKGanttLogic(props) {
|
|
83
|
+
const globalDateRange = computed(() => {
|
|
84
|
+
const now = Date.now();
|
|
85
|
+
const msInDay = 24 * 60 * 60 * 1e3;
|
|
86
|
+
const start = props.startingPoint !== null && props.startingPoint !== void 0 ? props.startingPoint : props.startDate;
|
|
87
|
+
const end = props.endingPoint !== null && props.endingPoint !== void 0 ? props.endingPoint : props.endDate;
|
|
88
|
+
return {
|
|
89
|
+
start: start !== null && start !== void 0 ? new Date(start).getTime() : now - 15 * msInDay,
|
|
90
|
+
end: end !== null && end !== void 0 ? new Date(end).getTime() : now + 45 * msInDay
|
|
91
|
+
};
|
|
92
|
+
});
|
|
93
|
+
const totalDuration = computed(() => {
|
|
94
|
+
return globalDateRange.value.end - globalDateRange.value.start;
|
|
95
|
+
});
|
|
96
|
+
const resolvedMapping = computed(() => ({
|
|
97
|
+
tasksField: "tasks",
|
|
98
|
+
startDate: "startDate",
|
|
99
|
+
endDate: "endDate",
|
|
100
|
+
color: "color",
|
|
101
|
+
title: "title",
|
|
102
|
+
taskTypeField: "type",
|
|
103
|
+
appearanceField: "appearance",
|
|
104
|
+
...props.taskMapping || {}
|
|
105
|
+
}));
|
|
106
|
+
const getTasksForRow = (row) => {
|
|
107
|
+
const field = resolvedMapping.value.tasksField;
|
|
108
|
+
return Array.isArray(row[field]) ? row[field] : [];
|
|
109
|
+
};
|
|
110
|
+
const getTaskStyle = (task) => {
|
|
111
|
+
const m = resolvedMapping.value;
|
|
112
|
+
const taskStartVal = task[m.startDate];
|
|
113
|
+
const taskEndVal = task[m.endDate];
|
|
114
|
+
const toMs = (val) => {
|
|
115
|
+
if (val === null || val === void 0 || val === "") return NaN;
|
|
116
|
+
if (typeof val === "number") return val;
|
|
117
|
+
if (val instanceof Date) return val.getTime();
|
|
118
|
+
return new Date(val).getTime();
|
|
119
|
+
};
|
|
120
|
+
const tStart = toMs(taskStartVal);
|
|
121
|
+
const tEnd = toMs(taskEndVal);
|
|
122
|
+
if (isNaN(tStart) || isNaN(tEnd)) return { display: "none" };
|
|
123
|
+
const gStart = globalDateRange.value.start;
|
|
124
|
+
const duration = totalDuration.value;
|
|
125
|
+
if (duration <= 0) return { display: "none" };
|
|
126
|
+
let leftPct = (tStart - gStart) / duration * 100;
|
|
127
|
+
let widthPct = (tEnd - tStart) / duration * 100;
|
|
128
|
+
if (leftPct < 0) {
|
|
129
|
+
widthPct += leftPct;
|
|
130
|
+
leftPct = 0;
|
|
131
|
+
}
|
|
132
|
+
if (leftPct + widthPct > 100) {
|
|
133
|
+
widthPct = 100 - leftPct;
|
|
134
|
+
}
|
|
135
|
+
if (widthPct <= 0 || leftPct >= 100) return { display: "none" };
|
|
136
|
+
return {
|
|
137
|
+
left: `${leftPct}%`,
|
|
138
|
+
width: `calc(${widthPct}% - 1px)`,
|
|
139
|
+
"--task-color": task[m.color] || "var(--primary-color, #3b82f6)"
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
const moveTime = (delta, startingPoint, endingPoint) => {
|
|
143
|
+
const isDate = props.mode === "date";
|
|
144
|
+
if (isDate) {
|
|
145
|
+
const newStart = new Date(new Date(startingPoint).getTime() + delta).toISOString();
|
|
146
|
+
const newEnd = new Date(new Date(endingPoint).getTime() + delta).toISOString();
|
|
147
|
+
return { startingPoint: newStart, endingPoint: newEnd };
|
|
148
|
+
} else {
|
|
149
|
+
const newStart = Number(startingPoint) + delta;
|
|
150
|
+
const newEnd = Number(endingPoint) + delta;
|
|
151
|
+
return { startingPoint: newStart, endingPoint: newEnd };
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
const zoom = (factor, startingPoint, endingPoint) => {
|
|
155
|
+
const isDate = props.mode === "date";
|
|
156
|
+
const start = isDate ? new Date(startingPoint).getTime() : Number(startingPoint);
|
|
157
|
+
const end = isDate ? new Date(endingPoint).getTime() : Number(endingPoint);
|
|
158
|
+
const duration = end - start;
|
|
159
|
+
const change = duration * factor;
|
|
160
|
+
const newStart = start + change;
|
|
161
|
+
const newEnd = end - change;
|
|
162
|
+
const newDuration = newEnd - newStart;
|
|
163
|
+
const minDuration = isDate ? 1e3 : 1;
|
|
164
|
+
const maxDuration = isDate ? 10 * 365 * 24 * 60 * 60 * 1e3 : 1e6;
|
|
165
|
+
if (factor > 0 && newDuration < minDuration) return null;
|
|
166
|
+
if (factor < 0 && newDuration > maxDuration) return null;
|
|
167
|
+
if (isDate) {
|
|
168
|
+
return {
|
|
169
|
+
startingPoint: new Date(newStart).toISOString(),
|
|
170
|
+
endingPoint: newEnd > 0 ? new Date(newEnd).toISOString() : (/* @__PURE__ */ new Date(0)).toISOString()
|
|
171
|
+
};
|
|
172
|
+
} else {
|
|
173
|
+
return {
|
|
174
|
+
startingPoint: newStart,
|
|
175
|
+
endingPoint: newEnd
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
const selectedRows = props.dataProvider.selectedRows;
|
|
180
|
+
const selectAll = props.dataProvider.selectAll;
|
|
181
|
+
return {
|
|
182
|
+
globalDateRange,
|
|
183
|
+
totalDuration,
|
|
184
|
+
resolvedMapping,
|
|
185
|
+
getTasksForRow,
|
|
186
|
+
getTaskStyle,
|
|
187
|
+
moveTime,
|
|
188
|
+
zoom,
|
|
189
|
+
selectedRows,
|
|
190
|
+
selectAll
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
export function getGanttMarkers(start, end, mode = "date") {
|
|
194
|
+
const duration = end - start;
|
|
195
|
+
if (duration <= 0) return [];
|
|
196
|
+
const result = [];
|
|
197
|
+
if (mode === "numeric") {
|
|
198
|
+
const idealSteps = 10;
|
|
199
|
+
let stepSize = duration / idealSteps;
|
|
200
|
+
const magnitude = Math.pow(10, Math.floor(Math.log10(stepSize)));
|
|
201
|
+
const normalized = stepSize / magnitude;
|
|
202
|
+
if (normalized < 1.5) stepSize = magnitude;
|
|
203
|
+
else if (normalized < 3) stepSize = 2 * magnitude;
|
|
204
|
+
else if (normalized < 7) stepSize = 5 * magnitude;
|
|
205
|
+
else stepSize = 10 * magnitude;
|
|
206
|
+
let current = Math.ceil(start / stepSize) * stepSize;
|
|
207
|
+
while (current < end) {
|
|
208
|
+
result.push({
|
|
209
|
+
label: current.toString(),
|
|
210
|
+
position: (current - start) / duration * 100
|
|
211
|
+
});
|
|
212
|
+
current += stepSize;
|
|
213
|
+
}
|
|
214
|
+
return result;
|
|
215
|
+
}
|
|
216
|
+
const durationDays = duration / (1e3 * 60 * 60 * 24);
|
|
217
|
+
const durationHours = duration / (1e3 * 60 * 60);
|
|
218
|
+
const durationMinutes = duration / (1e3 * 60);
|
|
219
|
+
const d = new Date(start);
|
|
220
|
+
let stepUnit = "month";
|
|
221
|
+
if (durationMinutes <= 2) {
|
|
222
|
+
stepUnit = "second";
|
|
223
|
+
d.setMilliseconds(0);
|
|
224
|
+
} else if (durationHours <= 1) {
|
|
225
|
+
stepUnit = "minute";
|
|
226
|
+
d.setSeconds(0, 0);
|
|
227
|
+
} else if (durationDays <= 1) {
|
|
228
|
+
stepUnit = "hour";
|
|
229
|
+
d.setMinutes(0, 0, 0);
|
|
230
|
+
} else if (durationDays <= 31) {
|
|
231
|
+
stepUnit = "day";
|
|
232
|
+
d.setHours(0, 0, 0, 0);
|
|
233
|
+
} else if (durationDays <= 180) {
|
|
234
|
+
stepUnit = "week";
|
|
235
|
+
d.setHours(0, 0, 0, 0);
|
|
236
|
+
d.setDate(d.getDate() - d.getDay());
|
|
237
|
+
} else {
|
|
238
|
+
stepUnit = "month";
|
|
239
|
+
d.setHours(0, 0, 0, 0);
|
|
240
|
+
d.setDate(1);
|
|
241
|
+
}
|
|
242
|
+
while (d.getTime() < end) {
|
|
243
|
+
const pct = (d.getTime() - start) / duration * 100;
|
|
244
|
+
if (pct >= 0 && pct <= 100) {
|
|
245
|
+
let label = "";
|
|
246
|
+
const options = {};
|
|
247
|
+
if (stepUnit === "second") {
|
|
248
|
+
label = d.toLocaleTimeString("en", { hour12: false, hour: "2-digit", minute: "2-digit", second: "2-digit" });
|
|
249
|
+
} else if (stepUnit === "minute") {
|
|
250
|
+
label = d.toLocaleTimeString("en", { hour12: false, hour: "2-digit", minute: "2-digit" });
|
|
251
|
+
} else if (stepUnit === "hour") {
|
|
252
|
+
label = d.toLocaleTimeString("en", { hour12: false, hour: "2-digit", minute: "2-digit" });
|
|
253
|
+
} else if (stepUnit === "day" || stepUnit === "week") {
|
|
254
|
+
label = d.toLocaleDateString("en", { month: "short", day: "numeric" });
|
|
255
|
+
} else {
|
|
256
|
+
label = d.toLocaleDateString("en", { month: "short", year: "2-digit" });
|
|
257
|
+
}
|
|
258
|
+
result.push({ label, position: pct });
|
|
259
|
+
}
|
|
260
|
+
if (stepUnit === "second") d.setSeconds(d.getSeconds() + 1);
|
|
261
|
+
else if (stepUnit === "minute") d.setMinutes(d.getMinutes() + 1);
|
|
262
|
+
else if (stepUnit === "hour") d.setHours(d.getHours() + 1);
|
|
263
|
+
else if (stepUnit === "day") d.setDate(d.getDate() + 1);
|
|
264
|
+
else if (stepUnit === "week") d.setDate(d.getDate() + 7);
|
|
265
|
+
else d.setMonth(d.getMonth() + 1);
|
|
266
|
+
if (result.length > 1e3) break;
|
|
267
|
+
}
|
|
268
|
+
return result;
|
|
269
|
+
}
|
|
270
|
+
export function calculateGanttMinWidth(startMs, endMs, minMarkerWidth = 80, mode = "date") {
|
|
271
|
+
const markers = getGanttMarkers(startMs, endMs, mode);
|
|
272
|
+
if (markers.length <= 1) return "100%";
|
|
273
|
+
const minWidthPx = markers.length * minMarkerWidth;
|
|
274
|
+
return `${minWidthPx}px`;
|
|
275
|
+
}
|
|
276
|
+
export function getSnapMs(snapTo) {
|
|
277
|
+
const min = 60 * 1e3;
|
|
278
|
+
const hr = 60 * min;
|
|
279
|
+
const day = 24 * hr;
|
|
280
|
+
switch (snapTo) {
|
|
281
|
+
case "second":
|
|
282
|
+
return 1e3;
|
|
283
|
+
case "minute":
|
|
284
|
+
return min;
|
|
285
|
+
case "15m":
|
|
286
|
+
return 15 * min;
|
|
287
|
+
case "30m":
|
|
288
|
+
return 30 * min;
|
|
289
|
+
case "hour":
|
|
290
|
+
return hr;
|
|
291
|
+
case "day":
|
|
292
|
+
return day;
|
|
293
|
+
case "week":
|
|
294
|
+
return 7 * day;
|
|
295
|
+
case "none":
|
|
296
|
+
return 1e-3;
|
|
297
|
+
default:
|
|
298
|
+
return 1;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
export function isTaskOverlapping(task, tasks, startDateField, endDateField) {
|
|
302
|
+
const tStart = new Date(task[startDateField]).getTime();
|
|
303
|
+
const tEnd = new Date(task[endDateField]).getTime();
|
|
304
|
+
return tasks.some((other) => {
|
|
305
|
+
if (other.id === task.id) return false;
|
|
306
|
+
const oStart = new Date(other[startDateField]).getTime();
|
|
307
|
+
const oEnd = new Date(other[endDateField]).getTime();
|
|
308
|
+
return tStart < oEnd && tEnd > oStart;
|
|
309
|
+
});
|
|
310
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
direction: {
|
|
3
|
+
type: PropType<"row" | "column">;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
wrap: {
|
|
7
|
+
type: PropType<"wrap" | "nowrap">;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
flexChild: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
align: {
|
|
15
|
+
type: PropType<"start" | "center" | "end" | "stretch" | "baseline">;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
justify: {
|
|
19
|
+
type: PropType<"start" | "center" | "end" | "space-between" | "around" | "evenly">;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
noGap: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
27
|
+
direction: {
|
|
28
|
+
type: PropType<"row" | "column">;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
31
|
+
wrap: {
|
|
32
|
+
type: PropType<"wrap" | "nowrap">;
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
35
|
+
flexChild: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
align: {
|
|
40
|
+
type: PropType<"start" | "center" | "end" | "stretch" | "baseline">;
|
|
41
|
+
default: string;
|
|
42
|
+
};
|
|
43
|
+
justify: {
|
|
44
|
+
type: PropType<"start" | "center" | "end" | "space-between" | "around" | "evenly">;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
noGap: {
|
|
48
|
+
type: BooleanConstructor;
|
|
49
|
+
default: boolean;
|
|
50
|
+
};
|
|
51
|
+
}>> & Readonly<{}>, {
|
|
52
|
+
wrap: any;
|
|
53
|
+
direction: any;
|
|
54
|
+
flexChild: boolean;
|
|
55
|
+
align: any;
|
|
56
|
+
justify: any;
|
|
57
|
+
noGap: boolean;
|
|
58
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
59
|
+
declare const _default: typeof __VLS_export;
|
|
60
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useKGridLogic, KGridDefaultProps } from "./KGrid.logic";
|
|
3
|
+
import { usePresetComponent } from "../../composables/usePresetComponent";
|
|
4
|
+
import { computed } from "vue";
|
|
5
|
+
import KGridDefault from "../../presets/default/components/KGrid/KGrid.vue";
|
|
6
|
+
const props = defineProps(KGridDefaultProps);
|
|
7
|
+
const { classes } = useKGridLogic(props);
|
|
8
|
+
const presetComponent = usePresetComponent("KGrid", KGridDefault);
|
|
9
|
+
const templateProps = computed(() => ({
|
|
10
|
+
classes: classes.value
|
|
11
|
+
}));
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template lang="pug">
|
|
15
|
+
component(:is="presetComponent" v-bind="templateProps")
|
|
16
|
+
template(v-for="(_, slot) in $slots" #[slot]="scope")
|
|
17
|
+
slot(:name="slot" v-bind="scope")
|
|
18
|
+
</template>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
direction: {
|
|
3
|
+
type: PropType<"row" | "column">;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
wrap: {
|
|
7
|
+
type: PropType<"wrap" | "nowrap">;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
flexChild: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
align: {
|
|
15
|
+
type: PropType<"start" | "center" | "end" | "stretch" | "baseline">;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
justify: {
|
|
19
|
+
type: PropType<"start" | "center" | "end" | "space-between" | "around" | "evenly">;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
noGap: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
27
|
+
direction: {
|
|
28
|
+
type: PropType<"row" | "column">;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
31
|
+
wrap: {
|
|
32
|
+
type: PropType<"wrap" | "nowrap">;
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
35
|
+
flexChild: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
align: {
|
|
40
|
+
type: PropType<"start" | "center" | "end" | "stretch" | "baseline">;
|
|
41
|
+
default: string;
|
|
42
|
+
};
|
|
43
|
+
justify: {
|
|
44
|
+
type: PropType<"start" | "center" | "end" | "space-between" | "around" | "evenly">;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
noGap: {
|
|
48
|
+
type: BooleanConstructor;
|
|
49
|
+
default: boolean;
|
|
50
|
+
};
|
|
51
|
+
}>> & Readonly<{}>, {
|
|
52
|
+
wrap: any;
|
|
53
|
+
direction: any;
|
|
54
|
+
flexChild: boolean;
|
|
55
|
+
align: any;
|
|
56
|
+
justify: any;
|
|
57
|
+
noGap: boolean;
|
|
58
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
59
|
+
declare const _default: typeof __VLS_export;
|
|
60
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface KGridProps {
|
|
2
|
+
direction?: 'row' | 'column';
|
|
3
|
+
wrap?: 'wrap' | 'nowrap';
|
|
4
|
+
flexChild?: boolean;
|
|
5
|
+
align?: 'start' | 'center' | 'end' | 'stretch' | 'baseline';
|
|
6
|
+
justify?: 'start' | 'center' | 'end' | 'space-between' | 'around' | 'evenly';
|
|
7
|
+
noGap?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const KGridDefaultProps: {
|
|
10
|
+
direction: {
|
|
11
|
+
type: PropType<"row" | "column">;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
wrap: {
|
|
15
|
+
type: PropType<"wrap" | "nowrap">;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
flexChild: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
align: {
|
|
23
|
+
type: PropType<"start" | "center" | "end" | "stretch" | "baseline">;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
justify: {
|
|
27
|
+
type: PropType<"start" | "center" | "end" | "space-between" | "around" | "evenly">;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
noGap: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export declare function useKGridLogic(props: KGridProps): {
|
|
36
|
+
classes: import("vue").ComputedRef<string>;
|
|
37
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
export const KGridDefaultProps = {
|
|
3
|
+
direction: {
|
|
4
|
+
type: String,
|
|
5
|
+
default: "row"
|
|
6
|
+
},
|
|
7
|
+
wrap: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: "wrap"
|
|
10
|
+
},
|
|
11
|
+
flexChild: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: false
|
|
14
|
+
},
|
|
15
|
+
align: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: "start"
|
|
18
|
+
},
|
|
19
|
+
justify: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: "start"
|
|
22
|
+
},
|
|
23
|
+
noGap: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: false
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
export function useKGridLogic(props) {
|
|
29
|
+
const classes = computed(() => {
|
|
30
|
+
const classesList = [];
|
|
31
|
+
if (props.direction == "row") classesList.push("direction-row");
|
|
32
|
+
if (props.direction == "column") classesList.push("direction-column");
|
|
33
|
+
if (props.wrap == "wrap") classesList.push("wrap");
|
|
34
|
+
if (props.wrap == "nowrap") classesList.push("nowrap");
|
|
35
|
+
if (props.flexChild) classesList.push("flex-child");
|
|
36
|
+
if (props.align == "start") classesList.push("flex-align-start");
|
|
37
|
+
if (props.align == "center") classesList.push("flex-align-center");
|
|
38
|
+
if (props.align == "end") classesList.push("flex-align-end");
|
|
39
|
+
if (props.align == "baseline") classesList.push("flex-align-baseline");
|
|
40
|
+
if (props.align == "stretch") classesList.push("flex-align-stretch");
|
|
41
|
+
if (props.justify === "start") classesList.push("justify-start");
|
|
42
|
+
if (props.justify === "center") classesList.push("justify-center");
|
|
43
|
+
if (props.justify === "end") classesList.push("justify-end");
|
|
44
|
+
if (props.justify === "space-between") classesList.push("justify-between");
|
|
45
|
+
if (props.justify === "around") classesList.push("justify-around");
|
|
46
|
+
if (props.justify === "evenly") classesList.push("justify-evenly");
|
|
47
|
+
if (props.noGap) classesList.push("no-gap");
|
|
48
|
+
return classesList.join(" ");
|
|
49
|
+
});
|
|
50
|
+
return {
|
|
51
|
+
classes
|
|
52
|
+
};
|
|
53
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
step: {
|
|
3
|
+
type: NumberConstructor;
|
|
4
|
+
default: number;
|
|
5
|
+
};
|
|
6
|
+
format: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
startHour: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
endHour: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: undefined;
|
|
17
|
+
};
|
|
18
|
+
modelValue: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
placeholder: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
disabled: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
30
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
31
|
+
"update:modelValue": (value: string) => any;
|
|
32
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
33
|
+
step: {
|
|
34
|
+
type: NumberConstructor;
|
|
35
|
+
default: number;
|
|
36
|
+
};
|
|
37
|
+
format: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
startHour: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
45
|
+
endHour: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
default: undefined;
|
|
48
|
+
};
|
|
49
|
+
modelValue: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
placeholder: {
|
|
54
|
+
type: StringConstructor;
|
|
55
|
+
default: string;
|
|
56
|
+
};
|
|
57
|
+
disabled: {
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
default: boolean;
|
|
60
|
+
};
|
|
61
|
+
}>> & Readonly<{
|
|
62
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
63
|
+
}>, {
|
|
64
|
+
disabled: boolean;
|
|
65
|
+
modelValue: string;
|
|
66
|
+
placeholder: string;
|
|
67
|
+
format: string;
|
|
68
|
+
step: number;
|
|
69
|
+
startHour: string;
|
|
70
|
+
endHour: string;
|
|
71
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
72
|
+
declare const _default: typeof __VLS_export;
|
|
73
|
+
export default _default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useKHourPickerLogic, KHourPickerDefaultProps } from "./KHourPicker.logic";
|
|
4
|
+
import { usePresetComponent } from "../../composables/usePresetComponent";
|
|
5
|
+
import KHourPickerDefault from "../../presets/default/components/KHourPicker/KHourPicker.vue";
|
|
6
|
+
const props = defineProps(KHourPickerDefaultProps);
|
|
7
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
8
|
+
const {
|
|
9
|
+
isOpen,
|
|
10
|
+
inputValue,
|
|
11
|
+
toggleDropdown,
|
|
12
|
+
closeDropdown,
|
|
13
|
+
onTimeSelect
|
|
14
|
+
} = useKHourPickerLogic(props, emit);
|
|
15
|
+
const presetComponent = usePresetComponent("KHourPicker", KHourPickerDefault);
|
|
16
|
+
const templateProps = computed(() => ({
|
|
17
|
+
modelValue: inputValue.value,
|
|
18
|
+
isOpen: isOpen.value,
|
|
19
|
+
step: props.step,
|
|
20
|
+
format: props.format,
|
|
21
|
+
startHour: props.startHour,
|
|
22
|
+
endHour: props.endHour,
|
|
23
|
+
placeholder: props.placeholder,
|
|
24
|
+
disabled: props.disabled,
|
|
25
|
+
toggleDropdown,
|
|
26
|
+
closeDropdown,
|
|
27
|
+
onTimeSelect
|
|
28
|
+
}));
|
|
29
|
+
const handleUpdateIsOpen = (val) => {
|
|
30
|
+
isOpen.value = val;
|
|
31
|
+
};
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<template lang="pug">
|
|
35
|
+
component(
|
|
36
|
+
:is="presetComponent"
|
|
37
|
+
v-bind="templateProps"
|
|
38
|
+
@update:isOpen="handleUpdateIsOpen"
|
|
39
|
+
)
|
|
40
|
+
</template>
|