@katlux/toolkit 0.1.1-alpha.145 → 0.1.1-alpha.147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -22
- package/bin/ai-init.mjs +575 -0
- package/bin/ai-tokens/adapters/antigravityAdapter.mjs +22 -0
- package/bin/ai-tokens/adapters/claudeCodeAdapter.mjs +192 -0
- package/bin/ai-tokens/adapters/codexAdapter.mjs +176 -0
- package/bin/ai-tokens/adapters/cursorAdapter.mjs +202 -0
- package/bin/ai-tokens/adapters/index.mjs +30 -0
- package/bin/ai-tokens/cliViews.mjs +301 -0
- package/bin/ai-tokens/formatAndDates.mjs +89 -0
- package/bin/ai-tokens/reportGenerator.mjs +232 -0
- package/bin/ai-tokens/transcriptParser.mjs +299 -0
- package/bin/ai-tokens.mjs +38 -872
- package/bin/cli.mjs +81 -48
- package/bin/create-preset.mjs +1 -0
- package/bin/preset-contracts.json +2997 -0
- package/dist/compiled/composables/locales/asianAndPacific.mjs +296 -0
- package/dist/compiled/composables/locales/northernAndEasternEuropean.mjs +342 -0
- package/dist/compiled/composables/locales/westernEuropean.mjs +268 -0
- package/dist/compiled/composables/locales.mjs +32 -720
- package/dist/compiled/composables/useDataProvider.mjs +39 -26
- package/dist/compiled/composables/useFilterLogic.mjs +10 -2
- package/dist/compiled/composables/useKatluxForm.mjs +13 -11
- package/dist/compiled/composables/usePresetComponent.mjs +2 -0
- package/dist/compiled/composables/useRequestQueue.mjs +3 -1
- package/dist/compiled/composables/useVirtualDataset.mjs +657 -0
- package/dist/compiled/composables/useVirtualScroll.mjs +93 -66
- package/dist/compiled/composables/virtualDataset/cacheStateHelpers.mjs +76 -0
- package/dist/compiled/composables/virtualDataset/keyboardNavHelpers.mjs +60 -0
- package/dist/compiled/composables/virtualDataset/treeSelectionHelpers.mjs +103 -0
- package/dist/compiled/composables/virtualDataset/types.mjs +0 -0
- package/dist/compiled/utils/deprecation.mjs +44 -0
- package/dist/compiled/utils/dom.mjs +124 -0
- package/dist/module.cjs +58 -77
- package/dist/module.d.cts +5 -0
- package/dist/module.d.mts +4 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +54 -77
- package/dist/runtime/app.config.d.ts +3 -0
- package/dist/runtime/components/KAccordion/KAccordion.global.d.vue.ts +1 -1
- package/dist/runtime/components/KAccordion/KAccordion.global.vue.d.ts +1 -1
- package/dist/runtime/components/KBulkActions/KBulkActions.global.d.vue.ts +7 -3
- package/dist/runtime/components/KBulkActions/KBulkActions.global.vue +4 -1
- package/dist/runtime/components/KBulkActions/KBulkActions.global.vue.d.ts +7 -3
- package/dist/runtime/components/KBulkActions/KBulkActions.logic.d.ts +12 -2
- package/dist/runtime/components/KBulkActions/KBulkActions.logic.js +40 -41
- 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/KButton/KButton.logic.d.ts +1 -1
- package/dist/runtime/components/KCalendar/KCalendar.global.d.vue.ts +19 -10
- package/dist/runtime/components/KCalendar/KCalendar.global.vue +7 -2
- package/dist/runtime/components/KCalendar/KCalendar.global.vue.d.ts +19 -10
- package/dist/runtime/components/KCalendar/KCalendar.logic.d.ts +14 -201
- package/dist/runtime/components/KCalendar/KCalendar.logic.js +67 -14
- package/dist/runtime/components/KCalendar/KCalendarMonth.global.d.vue.ts +25 -5
- package/dist/runtime/components/KCalendar/KCalendarMonth.global.vue +15 -1
- package/dist/runtime/components/KCalendar/KCalendarMonth.global.vue.d.ts +25 -5
- package/dist/runtime/components/KCalendar/KCalendarMonth.logic.d.ts +21 -3
- package/dist/runtime/components/KCalendar/KCalendarMonth.logic.js +136 -7
- package/dist/runtime/components/KCalendar/recurringUtils.js +6 -5
- package/dist/runtime/components/KCheckbox/KCheckbox.global.d.vue.ts +2 -2
- package/dist/runtime/components/KCheckbox/KCheckbox.global.vue.d.ts +2 -2
- package/dist/runtime/components/KCombobox/KCombobox.global.d.vue.ts +18 -3
- package/dist/runtime/components/KCombobox/KCombobox.global.vue +9 -4
- package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +18 -3
- package/dist/runtime/components/KCombobox/KCombobox.logic.d.ts +16 -2
- package/dist/runtime/components/KCombobox/KCombobox.logic.js +32 -13
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.d.vue.ts +8 -8
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue.d.ts +8 -8
- package/dist/runtime/components/KCompositeInput/KCompositeInput.logic.d.ts +3 -3
- package/dist/runtime/components/KContextMenu/KContextMenu.global.d.vue.ts +3 -3
- package/dist/runtime/components/KContextMenu/KContextMenu.global.vue +4 -1
- package/dist/runtime/components/KContextMenu/KContextMenu.global.vue.d.ts +3 -3
- package/dist/runtime/components/KContextMenu/KContextMenu.logic.d.ts +24 -4
- package/dist/runtime/components/KContextMenu/KContextMenu.logic.js +43 -22
- package/dist/runtime/components/KDatatable/KDataIterator.global.d.vue.ts +38 -11
- package/dist/runtime/components/KDatatable/KDataIterator.global.vue +39 -20
- package/dist/runtime/components/KDatatable/KDataIterator.global.vue.d.ts +38 -11
- package/dist/runtime/components/KDatatable/KDataIterator.logic.d.ts +31 -8
- package/dist/runtime/components/KDatatable/KDataIterator.logic.js +69 -24
- package/dist/runtime/components/KDatatable/KDatatable.global.d.vue.ts +10 -14
- package/dist/runtime/components/KDatatable/KDatatable.global.vue +6 -5
- package/dist/runtime/components/KDatatable/KDatatable.global.vue.d.ts +10 -14
- package/dist/runtime/components/KDatatable/KDatatable.logic.d.ts +4 -6
- package/dist/runtime/components/KDatatable/KDatatable.logic.js +32 -24
- package/dist/runtime/components/KDatePicker/KDatePicker.global.d.vue.ts +33 -15
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue +60 -16
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue.d.ts +33 -15
- package/dist/runtime/components/KDatePicker/KDatePicker.logic.d.ts +30 -6
- package/dist/runtime/components/KDatePicker/KDatePicker.logic.js +249 -59
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.d.vue.ts +2 -2
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue.d.ts +2 -2
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.js +2 -0
- package/dist/runtime/components/KDropdown/KDropdown.global.d.vue.ts +4 -4
- package/dist/runtime/components/KDropdown/KDropdown.global.vue.d.ts +4 -4
- package/dist/runtime/components/KDropdown/KDropdown.logic.d.ts +3 -2
- package/dist/runtime/components/KDropdown/KDropdown.logic.js +14 -13
- package/dist/runtime/components/KGantt/KGantt.global.d.vue.ts +55 -4
- package/dist/runtime/components/KGantt/KGantt.global.vue +18 -3
- package/dist/runtime/components/KGantt/KGantt.global.vue.d.ts +55 -4
- package/dist/runtime/components/KGantt/KGantt.logic.d.ts +33 -5
- package/dist/runtime/components/KGantt/KGantt.logic.js +39 -6
- package/dist/runtime/components/KGrid/KGrid.global.d.vue.ts +1 -1
- package/dist/runtime/components/KGrid/KGrid.global.vue.d.ts +1 -1
- package/dist/runtime/components/KHourPicker/KHourPicker.global.d.vue.ts +2 -2
- package/dist/runtime/components/KHourPicker/KHourPicker.global.vue.d.ts +2 -2
- 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/KLayout/KLayout.global.d.vue.ts +4 -1
- package/dist/runtime/components/KLayout/KLayout.global.vue +4 -1
- package/dist/runtime/components/KLayout/KLayout.global.vue.d.ts +4 -1
- package/dist/runtime/components/KLoader/KLoader.global.d.vue.ts +9 -0
- package/dist/runtime/components/KLoader/KLoader.global.vue +3 -0
- package/dist/runtime/components/KLoader/KLoader.global.vue.d.ts +9 -0
- package/dist/runtime/components/KLoader/KLoader.logic.d.ts +5 -0
- package/dist/runtime/components/KLoader/KLoader.logic.js +4 -0
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.d.vue.ts +2 -2
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue.d.ts +2 -2
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.logic.js +30 -7
- package/dist/runtime/components/KMultiTabs/KMultiTabs.logic.d.ts +1 -0
- package/dist/runtime/components/KMultiTabs/MultiTabs.global.d.vue.ts +23 -0
- package/dist/runtime/components/KMultiTabs/MultiTabs.global.vue +24 -0
- package/dist/runtime/components/KMultiTabs/MultiTabs.global.vue.d.ts +23 -0
- package/dist/runtime/components/KPagination/KPagination.global.d.vue.ts +3 -1
- package/dist/runtime/components/KPagination/KPagination.global.vue +2 -1
- package/dist/runtime/components/KPagination/KPagination.global.vue.d.ts +3 -1
- package/dist/runtime/components/KPagination/KPagination.logic.d.ts +2 -1
- package/dist/runtime/components/KPagination/KPagination.logic.js +74 -14
- package/dist/runtime/components/KRadiobox/KRadiobox.global.d.vue.ts +1 -1
- package/dist/runtime/components/KRadiobox/KRadiobox.global.vue.d.ts +1 -1
- package/dist/runtime/components/KTabs/KTabs.logic.js +33 -11
- package/dist/runtime/components/KTextarea/KTextarea.global.d.vue.ts +2 -2
- package/dist/runtime/components/KTextarea/KTextarea.global.vue.d.ts +2 -2
- package/dist/runtime/components/KTextbox/KTextbox.global.d.vue.ts +15 -4
- package/dist/runtime/components/KTextbox/KTextbox.global.vue +8 -2
- package/dist/runtime/components/KTextbox/KTextbox.global.vue.d.ts +15 -4
- package/dist/runtime/components/KTextbox/KTextbox.logic.d.ts +5 -0
- package/dist/runtime/components/KTextbox/KTextbox.logic.js +4 -0
- package/dist/runtime/components/KTooltip/KTooltip.logic.d.ts +11 -2
- package/dist/runtime/components/KTooltip/KTooltip.logic.js +7 -5
- package/dist/runtime/components/KTree/KTree.global.d.vue.ts +4 -4
- package/dist/runtime/components/KTree/KTree.global.vue.d.ts +4 -4
- package/dist/runtime/components/KTree/KTree.logic.d.ts +2 -2
- package/dist/runtime/components/KTree/KTree.logic.js +37 -13
- package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +7 -5
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue +4 -6
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +7 -5
- package/dist/runtime/components/KTreePicker/KTreePicker.logic.d.ts +3 -2
- package/dist/runtime/components/KTreePicker/KTreePicker.logic.js +10 -1
- package/dist/runtime/components/KTreeView/KTreeView.global.d.vue.ts +40 -6
- package/dist/runtime/components/KTreeView/KTreeView.global.vue +19 -1
- package/dist/runtime/components/KTreeView/KTreeView.global.vue.d.ts +40 -6
- package/dist/runtime/components/KTreeView/KTreeView.logic.d.ts +24 -4
- package/dist/runtime/components/KTreeView/KTreeView.logic.js +105 -11
- package/dist/runtime/composables/locales/asianAndPacific.d.ts +11 -0
- package/dist/runtime/composables/locales/asianAndPacific.js +296 -0
- package/dist/runtime/composables/locales/northernAndEasternEuropean.d.ts +12 -0
- package/dist/runtime/composables/locales/northernAndEasternEuropean.js +342 -0
- package/dist/runtime/composables/locales/westernEuropean.d.ts +10 -0
- package/dist/runtime/composables/locales/westernEuropean.js +268 -0
- package/dist/runtime/composables/locales.d.ts +4 -24
- package/dist/runtime/composables/locales.js +32 -720
- package/dist/runtime/composables/useDataProvider.d.ts +5 -3
- package/dist/runtime/composables/useDataProvider.js +39 -26
- package/dist/runtime/composables/useFilterLogic.d.ts +16 -4
- package/dist/runtime/composables/useFilterLogic.js +10 -2
- package/dist/runtime/composables/useKatluxForm.d.ts +4 -4
- package/dist/runtime/composables/useKatluxForm.js +13 -11
- package/dist/runtime/composables/usePresetComponent.js +2 -0
- package/dist/runtime/composables/useRequestQueue.d.ts +2 -0
- package/dist/runtime/composables/useRequestQueue.js +3 -1
- package/dist/runtime/composables/useSortLogic.d.ts +1 -1
- package/dist/runtime/composables/useVirtualDataset.d.ts +9 -0
- package/dist/runtime/composables/useVirtualDataset.js +657 -0
- package/dist/runtime/composables/useVirtualScroll.d.ts +14 -10
- package/dist/runtime/composables/useVirtualScroll.js +93 -66
- package/dist/runtime/composables/virtualDataset/cacheStateHelpers.d.ts +49 -0
- package/dist/runtime/composables/virtualDataset/cacheStateHelpers.js +76 -0
- package/dist/runtime/composables/virtualDataset/keyboardNavHelpers.d.ts +26 -0
- package/dist/runtime/composables/virtualDataset/keyboardNavHelpers.js +60 -0
- package/dist/runtime/composables/virtualDataset/treeSelectionHelpers.d.ts +24 -0
- package/dist/runtime/composables/virtualDataset/treeSelectionHelpers.js +103 -0
- package/dist/runtime/composables/virtualDataset/types.d.ts +113 -0
- package/dist/runtime/composables/virtualDataset/types.js +0 -0
- package/dist/runtime/directives/clickOutside.d.ts +1 -1
- package/dist/runtime/directives/clickOutside.js +41 -13
- package/dist/runtime/plugins/nuxtCompatPlugin.d.ts +2 -1
- package/dist/runtime/plugins/nuxtCompatPlugin.js +16 -1
- package/dist/runtime/plugins/toastPlugin.client.js +2 -2
- package/dist/runtime/presets/default/assets/scss/css-variables.css +3 -0
- package/dist/runtime/presets/default/assets/scss/css-variables.scss +6 -1
- package/dist/runtime/presets/default/assets/scss/index.css +3 -0
- package/dist/runtime/presets/default/assets/svg/katlux-logo.svg +7 -0
- package/dist/runtime/presets/default/assets/svg/katlux.svg +6 -0
- package/dist/runtime/presets/default/components/KBulkActions/KBulkActions.d.vue.ts +3 -2
- package/dist/runtime/presets/default/components/KBulkActions/KBulkActions.vue +31 -3
- package/dist/runtime/presets/default/components/KBulkActions/KBulkActions.vue.d.ts +3 -2
- package/dist/runtime/presets/default/components/KCalendar/KCalendar.d.vue.ts +3 -0
- package/dist/runtime/presets/default/components/KCalendar/KCalendar.vue +6 -0
- package/dist/runtime/presets/default/components/KCalendar/KCalendar.vue.d.ts +3 -0
- package/dist/runtime/presets/default/components/KCalendar/KCalendarMonth.d.vue.ts +7 -0
- package/dist/runtime/presets/default/components/KCalendar/KCalendarMonth.vue +57 -2
- package/dist/runtime/presets/default/components/KCalendar/KCalendarMonth.vue.d.ts +7 -0
- package/dist/runtime/presets/default/components/KCalendar/KCalendarWeek.vue +6 -5
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.d.vue.ts +4 -1
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue +27 -17
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue.d.ts +4 -1
- package/dist/runtime/presets/default/components/KCombobox/KComboboxList.d.vue.ts +1 -1
- package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue +10 -10
- package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue.d.ts +1 -1
- package/dist/runtime/presets/default/components/KContextMenu/KContextMenu.d.vue.ts +2 -0
- package/dist/runtime/presets/default/components/KContextMenu/KContextMenu.vue +67 -22
- package/dist/runtime/presets/default/components/KContextMenu/KContextMenu.vue.d.ts +2 -0
- package/dist/runtime/presets/default/components/KDataIterator/KDataIterator.d.vue.ts +41 -8
- package/dist/runtime/presets/default/components/KDataIterator/KDataIterator.vue +184 -174
- package/dist/runtime/presets/default/components/KDataIterator/KDataIterator.vue.d.ts +41 -8
- package/dist/runtime/presets/default/components/KDatatable/KDatatable.d.vue.ts +17 -10
- package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue +113 -394
- package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue.d.ts +17 -10
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.d.vue.ts +6 -0
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue +71 -4
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue.d.ts +6 -0
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.d.vue.ts +5 -2
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue +15 -12
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue.d.ts +5 -2
- package/dist/runtime/presets/default/components/KGantt/KGantt.d.vue.ts +11 -2
- package/dist/runtime/presets/default/components/KGantt/KGantt.vue +46 -29
- package/dist/runtime/presets/default/components/KGantt/KGantt.vue.d.ts +11 -2
- package/dist/runtime/presets/default/components/KGantt/KGanttTimeline.d.vue.ts +6 -2
- package/dist/runtime/presets/default/components/KGantt/KGanttTimeline.vue +23 -8
- package/dist/runtime/presets/default/components/KGantt/KGanttTimeline.vue.d.ts +6 -2
- package/dist/runtime/presets/default/components/KLayout/KLayout.vue +2 -2
- package/dist/runtime/presets/default/components/KLoader/KLoader.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KLoader/KLoader.vue +13 -2
- package/dist/runtime/presets/default/components/KLoader/KLoader.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue +1 -94
- package/dist/runtime/presets/default/components/KMultiTabs/KMultiTabs.vue +69 -4
- package/dist/runtime/presets/default/components/KRangeSlider/KRangeSlider.vue +18 -46
- package/dist/runtime/presets/default/components/KSlider/KSlider.vue +11 -23
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.d.vue.ts +4 -1
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue +24 -8
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue.d.ts +4 -1
- package/dist/runtime/presets/default/components/KTree/KTree.d.vue.ts +3 -3
- package/dist/runtime/presets/default/components/KTree/KTree.vue +61 -56
- package/dist/runtime/presets/default/components/KTree/KTree.vue.d.ts +3 -3
- package/dist/runtime/presets/default/components/KTree/KTreeNodeItem.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KTree/KTreeNodeItem.vue +12 -2
- package/dist/runtime/presets/default/components/KTree/KTreeNodeItem.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KTreeView/KTreeView.d.vue.ts +11 -2
- package/dist/runtime/presets/default/components/KTreeView/KTreeView.vue +14 -2
- package/dist/runtime/presets/default/components/KTreeView/KTreeView.vue.d.ts +11 -2
- package/dist/runtime/server/middleware/session.js +7 -0
- package/dist/runtime/utils/deprecation.d.ts +14 -0
- package/dist/runtime/utils/deprecation.js +44 -0
- package/dist/runtime/utils/dom.d.ts +31 -0
- package/dist/runtime/utils/dom.js +124 -0
- package/dist/skills/KATLUX_INDEX.md +18 -19
- package/dist/skills/katlux-components/SKILL.md +2 -0
- package/dist/skills/katlux-components/components/KBulkActions.md +26 -2
- package/dist/skills/katlux-components/components/KCombobox.md +2 -2
- package/dist/skills/katlux-components/components/KDataIterator.md +17 -4
- package/dist/skills/katlux-components/components/KDatatable.md +38 -0
- package/dist/skills/katlux-components/components/KDatePicker.md +3 -1
- package/dist/skills/katlux-components/components/KGantt.md +9 -0
- package/dist/skills/katlux-components/components/KIcon.md +1 -1
- package/dist/skills/katlux-components/components/KLayout.md +4 -0
- package/dist/skills/katlux-components/components/KLineChart.md +3 -0
- package/dist/skills/katlux-components/components/KLoader.md +3 -0
- package/dist/skills/katlux-components/components/KProductList.md +0 -1
- package/dist/skills/katlux-components/components/KScatterChart.md +3 -0
- package/dist/skills/katlux-components/components/KTextbox.md +1 -0
- package/dist/skills/katlux-components/components/KTreePicker.md +2 -1
- package/dist/skills/katlux-components/components/KTreeView.md +12 -0
- package/dist/skills/katlux-config/SKILL.md +27 -8
- package/dist/skills/katlux-presets/SKILL.md +163 -3
- package/dist/skills/katlux-presets/creating-a-preset.md +67 -0
- package/dist/skills/katlux-providers/SKILL.md +19 -5
- package/dist/skills/katlux-providers/providers/ADataProvider.md +17 -9
- package/dist/skills/katlux-providers/providers/CAPIFlatClientDataProvider.md +27 -3
- package/dist/skills/katlux-providers/providers/CAPIFlatServerDataProvider.md +11 -1
- package/dist/skills/katlux-providers/providers/CAPITreeServerDataProvider.md +13 -0
- package/dist/skills/katlux-providers/providers/CFlatClientDataProvider.md +19 -4
- package/dist/skills/katlux-providers/providers/CFlatServerDataProvider.md +4 -2
- package/dist/skills/katlux-providers/providers/CTreeClientDataProvider.md +2 -2
- package/dist/skills/katlux-providers/providers/RequestProvider.md +10 -0
- package/dist/skills/katlux-providers/providers/encryption-field-level.md +67 -20
- package/dist/skills/katlux-providers/providers/encryption-key-management.md +23 -2
- package/dist/skills/katlux-providers/providers/encryption-key-pinning.md +25 -11
- package/dist/skills/katlux-providers/providers/encryption-searchable.md +341 -0
- package/dist/skills/katlux-providers/providers/encryption-symmetric.md +29 -2
- package/dist/skills/katlux-providers/providers/encryption-threat-model.md +70 -1
- package/dist/skills/katlux-providers/providers/encryption.md +26 -1
- package/dist/skills/katlux-providers/providers/types.md +3 -1
- package/dist/skills/katlux-providers/providers/useDataProvider.md +2 -1
- package/dist/skills/katlux-providers/providers/useVirtualDataset.md +154 -0
- package/dist/skills/katlux-tokens/SKILL.md +2 -1
- package/dist/types.d.mts +1 -1
- package/package.json +7 -3
- package/bin/add-ai-reference.mjs +0 -259
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IMarkedDay, IDefinedDay } from '#toolkit/components/KCalendar/types';
|
|
2
|
+
import type { IDatePickerQuickPreset } from '#toolkit/components/KDatePicker/KDatePicker.logic';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
label?: string;
|
|
4
5
|
maskedModel: string;
|
|
@@ -6,6 +7,7 @@ type __VLS_Props = {
|
|
|
6
7
|
_date: any;
|
|
7
8
|
calendarDay: Date | string;
|
|
8
9
|
format: string;
|
|
10
|
+
effectiveMask?: string;
|
|
9
11
|
showClear: boolean;
|
|
10
12
|
definedDays?: IDefinedDay[];
|
|
11
13
|
markedDays?: IMarkedDay[];
|
|
@@ -17,6 +19,10 @@ type __VLS_Props = {
|
|
|
17
19
|
validation?: 'success' | 'warning' | null | 'error';
|
|
18
20
|
validationText?: string;
|
|
19
21
|
align?: 'left' | 'right';
|
|
22
|
+
range?: boolean;
|
|
23
|
+
viewCount?: number;
|
|
24
|
+
quickPresets?: IDatePickerQuickPreset[];
|
|
25
|
+
applyQuickPreset?: (id: string) => void;
|
|
20
26
|
};
|
|
21
27
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
22
28
|
blur: (event: FocusEvent) => any;
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
KMaskTextbox(
|
|
5
5
|
v-model="maskedModel"
|
|
6
6
|
:key="maskedModel"
|
|
7
|
-
:mask="format"
|
|
8
|
-
:placeholder="placeholder || format"
|
|
7
|
+
:mask="effectiveMask || format"
|
|
8
|
+
:placeholder="placeholder || (effectiveMask || format)"
|
|
9
9
|
@click.stop="textboxClicked"
|
|
10
10
|
:showClear="showClear"
|
|
11
11
|
@clear="onClear"
|
|
@@ -14,16 +14,38 @@
|
|
|
14
14
|
:validationText="validationText"
|
|
15
15
|
)
|
|
16
16
|
KDropdown(v-model:isOpen="calendarShow" :anchorEl="activatorRef" :teleportTo="teleportTo" :align="align")
|
|
17
|
-
|
|
17
|
+
.k-datepicker-dropdown-content(:class="{ 'is-range': range }")
|
|
18
|
+
.k-datepicker-presets(v-if="range && quickPresets && quickPresets.length > 0")
|
|
19
|
+
button.k-datepicker-preset-btn(
|
|
20
|
+
v-for="preset in quickPresets"
|
|
21
|
+
:key="preset.id"
|
|
22
|
+
type="button"
|
|
23
|
+
@click="applyQuickPreset ? applyQuickPreset(preset.id) : null"
|
|
24
|
+
) {{ t(preset.label) }}
|
|
25
|
+
.k-datepicker-calendar
|
|
26
|
+
KCalendar(
|
|
27
|
+
view="month"
|
|
28
|
+
:viewCount="viewCount || 1"
|
|
29
|
+
:day="calendarDay"
|
|
30
|
+
:selectedDay="_date"
|
|
31
|
+
:range="range"
|
|
32
|
+
@dayClicked="dateSelected"
|
|
33
|
+
:definedDays="definedDays"
|
|
34
|
+
:markedDays="markedDays"
|
|
35
|
+
)
|
|
18
36
|
</template>
|
|
19
37
|
|
|
20
38
|
<script lang="ts" setup>
|
|
21
39
|
import { computed, watch, ref } from 'vue'
|
|
22
|
-
|
|
40
|
+
import { useKatluxI18n } from '#toolkit/composables/useKatluxI18n'
|
|
23
41
|
import type {
|
|
24
42
|
IMarkedDay,
|
|
25
43
|
IDefinedDay,
|
|
26
44
|
} from '#toolkit/components/KCalendar/types'
|
|
45
|
+
import type { IDatePickerQuickPreset } from '#toolkit/components/KDatePicker/KDatePicker.logic'
|
|
46
|
+
|
|
47
|
+
const { t } = useKatluxI18n()
|
|
48
|
+
const activatorRef = ref<HTMLElement | null>(null)
|
|
27
49
|
|
|
28
50
|
const props = defineProps<{
|
|
29
51
|
label?: string
|
|
@@ -32,6 +54,7 @@ const props = defineProps<{
|
|
|
32
54
|
_date: any
|
|
33
55
|
calendarDay: Date | string
|
|
34
56
|
format: string
|
|
57
|
+
effectiveMask?: string
|
|
35
58
|
showClear: boolean
|
|
36
59
|
definedDays?: IDefinedDay[]
|
|
37
60
|
markedDays?: IMarkedDay[]
|
|
@@ -43,6 +66,10 @@ const props = defineProps<{
|
|
|
43
66
|
validation?: 'success' | 'warning' | null | 'error'
|
|
44
67
|
validationText?: string
|
|
45
68
|
align?: 'left' | 'right'
|
|
69
|
+
range?: boolean
|
|
70
|
+
viewCount?: number
|
|
71
|
+
quickPresets?: IDatePickerQuickPreset[]
|
|
72
|
+
applyQuickPreset?: (id: string) => void
|
|
46
73
|
}>()
|
|
47
74
|
|
|
48
75
|
const emit = defineEmits<{
|
|
@@ -67,4 +94,44 @@ watch(() => props.maskedModel, (newVal) => {
|
|
|
67
94
|
</script>
|
|
68
95
|
|
|
69
96
|
<style lang="scss" scoped>
|
|
97
|
+
.k-datepicker-dropdown-content {
|
|
98
|
+
display: flex;
|
|
99
|
+
flex-direction: row;
|
|
100
|
+
|
|
101
|
+
&.is-range {
|
|
102
|
+
gap: var(--grid-gap, 16px);
|
|
103
|
+
padding: var(--gap-sm, 8px);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.k-datepicker-presets {
|
|
107
|
+
display: flex;
|
|
108
|
+
flex-direction: column;
|
|
109
|
+
gap: 4px;
|
|
110
|
+
border-right: 1px solid var(--border-color-light);
|
|
111
|
+
padding-right: var(--gap-sm, 8px);
|
|
112
|
+
min-width: 110px;
|
|
113
|
+
|
|
114
|
+
.k-datepicker-preset-btn {
|
|
115
|
+
background: transparent;
|
|
116
|
+
border: none;
|
|
117
|
+
padding: 6px 10px;
|
|
118
|
+
text-align: left;
|
|
119
|
+
font-size: var(--font-size-sm, 13px);
|
|
120
|
+
color: var(--font-color-primary);
|
|
121
|
+
border-radius: var(--border-radius-sm, 4px);
|
|
122
|
+
cursor: pointer;
|
|
123
|
+
transition: all 0.2s ease;
|
|
124
|
+
white-space: nowrap;
|
|
125
|
+
|
|
126
|
+
&:hover {
|
|
127
|
+
background-color: var(--border-color-light);
|
|
128
|
+
color: var(--font-color-heading);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&:focus-visible {
|
|
132
|
+
outline: 2px solid var(--primary-500);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
70
137
|
</style>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IMarkedDay, IDefinedDay } from '#toolkit/components/KCalendar/types';
|
|
2
|
+
import type { IDatePickerQuickPreset } from '#toolkit/components/KDatePicker/KDatePicker.logic';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
label?: string;
|
|
4
5
|
maskedModel: string;
|
|
@@ -6,6 +7,7 @@ type __VLS_Props = {
|
|
|
6
7
|
_date: any;
|
|
7
8
|
calendarDay: Date | string;
|
|
8
9
|
format: string;
|
|
10
|
+
effectiveMask?: string;
|
|
9
11
|
showClear: boolean;
|
|
10
12
|
definedDays?: IDefinedDay[];
|
|
11
13
|
markedDays?: IMarkedDay[];
|
|
@@ -17,6 +19,10 @@ type __VLS_Props = {
|
|
|
17
19
|
validation?: 'success' | 'warning' | null | 'error';
|
|
18
20
|
validationText?: string;
|
|
19
21
|
align?: 'left' | 'right';
|
|
22
|
+
range?: boolean;
|
|
23
|
+
viewCount?: number;
|
|
24
|
+
quickPresets?: IDatePickerQuickPreset[];
|
|
25
|
+
applyQuickPreset?: (id: string) => void;
|
|
20
26
|
};
|
|
21
27
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
22
28
|
blur: (event: FocusEvent) => any;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { DomTargetLike } from '#toolkit/utils/dom';
|
|
1
2
|
type __VLS_Props = {
|
|
2
3
|
open: boolean;
|
|
3
4
|
fullWidth: boolean;
|
|
4
|
-
anchorEl?:
|
|
5
|
+
anchorEl?: DomTargetLike;
|
|
5
6
|
dropdownRect: {
|
|
6
7
|
top: number;
|
|
7
8
|
left: number;
|
|
@@ -20,6 +21,8 @@ type __VLS_Props = {
|
|
|
20
21
|
direction?: string;
|
|
21
22
|
updatePosition?: () => void;
|
|
22
23
|
};
|
|
23
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
24
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
25
|
+
dropdownEl: import("vue").Ref<Element | null, Element | null>;
|
|
26
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
27
|
declare const _default: typeof __VLS_export;
|
|
25
28
|
export default _default;
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
<script lang="ts" setup>
|
|
11
11
|
import { computed, ref, onMounted, onBeforeUnmount, watch, nextTick } from 'vue'
|
|
12
|
+
import type { DomTargetLike } from '#toolkit/utils/dom'
|
|
12
13
|
|
|
13
14
|
defineOptions({
|
|
14
15
|
inheritAttrs: false
|
|
@@ -17,7 +18,7 @@ defineOptions({
|
|
|
17
18
|
const props = defineProps<{
|
|
18
19
|
open: boolean
|
|
19
20
|
fullWidth: boolean
|
|
20
|
-
anchorEl?:
|
|
21
|
+
anchorEl?: DomTargetLike
|
|
21
22
|
dropdownRect: {
|
|
22
23
|
top: number
|
|
23
24
|
left: number
|
|
@@ -38,9 +39,13 @@ const props = defineProps<{
|
|
|
38
39
|
}>()
|
|
39
40
|
|
|
40
41
|
const isMounted = ref(false)
|
|
41
|
-
const dropdownEl = ref<
|
|
42
|
+
const dropdownEl = ref<Element | null>(null)
|
|
42
43
|
let resizeObserver: ResizeObserver | null = null
|
|
43
44
|
|
|
45
|
+
defineExpose({
|
|
46
|
+
dropdownEl
|
|
47
|
+
})
|
|
48
|
+
|
|
44
49
|
onMounted(() => {
|
|
45
50
|
isMounted.value = true
|
|
46
51
|
})
|
|
@@ -148,16 +153,14 @@ const contentStyle = computed(() => ({
|
|
|
148
153
|
overflow: hidden;
|
|
149
154
|
background-color: var(--panel-bg-default);
|
|
150
155
|
color: var(--font-color-primary);
|
|
151
|
-
:deep {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
flex: 1;
|
|
160
|
-
}
|
|
156
|
+
:deep(.KPanel--content) {
|
|
157
|
+
padding: var(--component-gap);
|
|
158
|
+
background-color: var(--panel-bg-default);
|
|
159
|
+
color: var(--font-color-primary);
|
|
160
|
+
display: flex;
|
|
161
|
+
flex-direction: column;
|
|
162
|
+
min-height: 0;
|
|
163
|
+
flex: 1;
|
|
161
164
|
}
|
|
162
165
|
}
|
|
163
166
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { DomTargetLike } from '#toolkit/utils/dom';
|
|
1
2
|
type __VLS_Props = {
|
|
2
3
|
open: boolean;
|
|
3
4
|
fullWidth: boolean;
|
|
4
|
-
anchorEl?:
|
|
5
|
+
anchorEl?: DomTargetLike;
|
|
5
6
|
dropdownRect: {
|
|
6
7
|
top: number;
|
|
7
8
|
left: number;
|
|
@@ -20,6 +21,8 @@ type __VLS_Props = {
|
|
|
20
21
|
direction?: string;
|
|
21
22
|
updatePosition?: () => void;
|
|
22
23
|
};
|
|
23
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
24
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
25
|
+
dropdownEl: import("vue").Ref<Element | null, Element | null>;
|
|
26
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
27
|
declare const _default: typeof __VLS_export;
|
|
25
28
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ITreeViewColumn } from '#toolkit/components/KTreeView/KTreeView.logic';
|
|
2
|
-
import type { IKDatatableAction } from '@katlux/providers';
|
|
2
|
+
import type { IKDatatableAction, IDataFilter } from '@katlux/providers';
|
|
3
3
|
import type { IGanttTask } from '#toolkit/components/KGantt/KGantt.logic';
|
|
4
4
|
type __VLS_Props = {
|
|
5
5
|
dataProvider: any;
|
|
@@ -21,13 +21,16 @@ type __VLS_Props = {
|
|
|
21
21
|
taskTypeField?: string;
|
|
22
22
|
selectedRows?: any[];
|
|
23
23
|
selectAll?: boolean;
|
|
24
|
+
selectAllScope?: 'page' | 'dataset';
|
|
25
|
+
unselectedRows?: any[];
|
|
26
|
+
filter?: IDataFilter | null;
|
|
24
27
|
cellSlots?: any;
|
|
25
28
|
headerSlots?: any;
|
|
26
29
|
endingPoint?: Date | string | number;
|
|
27
30
|
mode?: 'date' | 'numeric';
|
|
28
31
|
inclusiveEndDate?: boolean;
|
|
29
32
|
virtualScroll?: boolean;
|
|
30
|
-
itemHeight?: number;
|
|
33
|
+
itemHeight?: number | ((row: any, index: number) => number);
|
|
31
34
|
viewportHeight?: number;
|
|
32
35
|
buffer?: number;
|
|
33
36
|
moveTime?: (amount: number) => void;
|
|
@@ -36,6 +39,9 @@ type __VLS_Props = {
|
|
|
36
39
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
37
40
|
"update:selectedRows": (value: any[]) => any;
|
|
38
41
|
"update:selectAll": (value: boolean) => any;
|
|
42
|
+
"update:selectAllScope": (value: "page" | "dataset") => any;
|
|
43
|
+
"update:unselectedRows": (value: any[]) => any;
|
|
44
|
+
"update:filter": (value: IDataFilter | null) => any;
|
|
39
45
|
"task-click": (payload: {
|
|
40
46
|
task: IGanttTask;
|
|
41
47
|
row: any;
|
|
@@ -59,6 +65,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
59
65
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
60
66
|
"onUpdate:selectedRows"?: ((value: any[]) => any) | undefined;
|
|
61
67
|
"onUpdate:selectAll"?: ((value: boolean) => any) | undefined;
|
|
68
|
+
"onUpdate:selectAllScope"?: ((value: "page" | "dataset") => any) | undefined;
|
|
69
|
+
"onUpdate:unselectedRows"?: ((value: any[]) => any) | undefined;
|
|
70
|
+
"onUpdate:filter"?: ((value: IDataFilter | null) => any) | undefined;
|
|
62
71
|
"onTask-click"?: ((payload: {
|
|
63
72
|
task: IGanttTask;
|
|
64
73
|
row: any;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
.KGantt__scroll-container(
|
|
4
4
|
ref="scrollContainer"
|
|
5
5
|
@wheel="onWheel"
|
|
6
|
-
@mousedown="onMouseDown"
|
|
7
6
|
)
|
|
8
7
|
.KGantt__inner
|
|
9
8
|
KTreeView(
|
|
@@ -16,12 +15,18 @@
|
|
|
16
15
|
:headerSlots="headerSlots"
|
|
17
16
|
:selectedRows="selectedRows"
|
|
18
17
|
:selectAll="selectAll"
|
|
18
|
+
:selectAllScope="selectAllScope"
|
|
19
|
+
:unselectedRows="unselectedRows"
|
|
20
|
+
:filter="filter"
|
|
19
21
|
:virtualScroll="virtualScroll"
|
|
20
22
|
:itemHeight="itemHeight"
|
|
21
23
|
:viewportHeight="viewportHeight"
|
|
22
24
|
:buffer="buffer"
|
|
23
25
|
@update:selectedRows="$emit('update:selectedRows', $event)"
|
|
24
26
|
@update:selectAll="$emit('update:selectAll', $event)"
|
|
27
|
+
@update:selectAllScope="$emit('update:selectAllScope', $event)"
|
|
28
|
+
@update:unselectedRows="$emit('update:unselectedRows', $event)"
|
|
29
|
+
@update:filter="$emit('update:filter', $event)"
|
|
25
30
|
)
|
|
26
31
|
template(#cell-_ganttActions="{ row }")
|
|
27
32
|
.gantt-actions
|
|
@@ -52,6 +57,7 @@
|
|
|
52
57
|
:resourceTypeField="resourceTypeField"
|
|
53
58
|
:resolvedMapping="resolvedMapping"
|
|
54
59
|
:activeDrag="activeDragState && activeDragState.sourceRowId === row?.id ? activeDragState : null"
|
|
60
|
+
@timeline-panstart="onTimelinePanStart"
|
|
55
61
|
@task-dragstart="onTaskDragStart($event, row)"
|
|
56
62
|
@cell-mouseenter="onCellMouseEnter($event, row)"
|
|
57
63
|
@task-click="onTaskClick"
|
|
@@ -66,7 +72,7 @@ import { computed, ref, onBeforeUnmount } from 'vue'
|
|
|
66
72
|
import KGanttRuler from './KGanttRuler.vue'
|
|
67
73
|
import KGanttTimeline from './KGanttTimeline.vue'
|
|
68
74
|
import type { ITreeViewColumn } from '#toolkit/components/KTreeView/KTreeView.logic'
|
|
69
|
-
import type { IKDatatableAction } from '@katlux/providers'
|
|
75
|
+
import type { IKDatatableAction, IDataFilter } from '@katlux/providers'
|
|
70
76
|
import type { IGanttTask } from '#toolkit/components/KGantt/KGantt.logic'
|
|
71
77
|
import { getSnapMs, isTaskOverlapping, calculateGanttMinWidth } from '#toolkit/components/KGantt/KGantt.logic'
|
|
72
78
|
|
|
@@ -90,6 +96,9 @@ const props = defineProps<{
|
|
|
90
96
|
|
|
91
97
|
selectedRows?: any[]
|
|
92
98
|
selectAll?: boolean
|
|
99
|
+
selectAllScope?: 'page' | 'dataset'
|
|
100
|
+
unselectedRows?: any[]
|
|
101
|
+
filter?: IDataFilter | null
|
|
93
102
|
cellSlots?: any
|
|
94
103
|
headerSlots?: any
|
|
95
104
|
|
|
@@ -98,7 +107,7 @@ const props = defineProps<{
|
|
|
98
107
|
inclusiveEndDate?: boolean
|
|
99
108
|
|
|
100
109
|
virtualScroll?: boolean
|
|
101
|
-
itemHeight?: number
|
|
110
|
+
itemHeight?: number | ((row: any, index: number) => number)
|
|
102
111
|
viewportHeight?: number
|
|
103
112
|
buffer?: number
|
|
104
113
|
|
|
@@ -111,6 +120,9 @@ const emit = defineEmits<{
|
|
|
111
120
|
(e: 'task-change', payload: { task: IGanttTask; sourceRow: any; targetRow?: any }): void
|
|
112
121
|
(e: 'update:selectedRows', value: any[]): void
|
|
113
122
|
(e: 'update:selectAll', value: boolean): void
|
|
123
|
+
(e: 'update:selectAllScope', value: 'page' | 'dataset'): void
|
|
124
|
+
(e: 'update:unselectedRows', value: any[]): void
|
|
125
|
+
(e: 'update:filter', value: IDataFilter | null): void
|
|
114
126
|
(e: 'task-click', payload: { task: IGanttTask; row: any }): void
|
|
115
127
|
(e: 'task-dblclick', payload: { task: IGanttTask; row: any }): void
|
|
116
128
|
(e: 'task-contextmenu', payload: any): void
|
|
@@ -135,20 +147,14 @@ interface ActiveDrag {
|
|
|
135
147
|
}
|
|
136
148
|
|
|
137
149
|
const activeDragState = ref<ActiveDrag | null>(null)
|
|
138
|
-
const scrollContainer = ref<
|
|
150
|
+
const scrollContainer = ref<{ clientWidth?: number } | null>(null)
|
|
139
151
|
|
|
140
152
|
// ── Drag to pan state ─────────────
|
|
141
153
|
const isDraggingGantt = ref(false)
|
|
142
154
|
let ganttDragStartX = 0
|
|
143
155
|
|
|
144
|
-
const
|
|
145
|
-
// Only initiate drag if left button and target is not a task bar or its resize handles
|
|
156
|
+
const onTimelinePanStart = (e: MouseEvent) => {
|
|
146
157
|
if (e.button !== 0) return
|
|
147
|
-
const target = e.target as HTMLElement
|
|
148
|
-
if (target.closest('.gantt-bar')) return
|
|
149
|
-
|
|
150
|
-
// MUST be inside the timeline cell to start panning
|
|
151
|
-
if (!target.closest('[data-field="ganttTimeline"]')) return
|
|
152
158
|
|
|
153
159
|
isDraggingGantt.value = true
|
|
154
160
|
ganttDragStartX = e.clientX
|
|
@@ -199,10 +205,21 @@ const onWheel = (e: WheelEvent) => {
|
|
|
199
205
|
}
|
|
200
206
|
|
|
201
207
|
let wasDragging = false
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
208
|
+
let draggedTaskIdForClick: string | number | null = null
|
|
209
|
+
let captureClickTimer: ReturnType<typeof setTimeout> | null = null
|
|
210
|
+
|
|
211
|
+
const onTaskClick = (payload: { task: IGanttTask; row: any; event?: MouseEvent }) => {
|
|
212
|
+
if (wasDragging && draggedTaskIdForClick !== null && payload.task?.id === draggedTaskIdForClick) {
|
|
213
|
+
payload.event?.preventDefault()
|
|
214
|
+
if (captureClickTimer) {
|
|
215
|
+
clearTimeout(captureClickTimer)
|
|
216
|
+
captureClickTimer = null
|
|
217
|
+
}
|
|
218
|
+
wasDragging = false
|
|
219
|
+
draggedTaskIdForClick = null
|
|
220
|
+
return
|
|
221
|
+
}
|
|
222
|
+
emit('task-click', { task: payload.task, row: payload.row })
|
|
206
223
|
}
|
|
207
224
|
|
|
208
225
|
function formatTaskDate(originalValue: any, ms: number, mode?: 'date' | 'numeric') {
|
|
@@ -222,16 +239,14 @@ function formatTaskDate(originalValue: any, ms: number, mode?: 'date' | 'numeric
|
|
|
222
239
|
}
|
|
223
240
|
|
|
224
241
|
const onTaskDragStart = (
|
|
225
|
-
{ event, task, rowId, mode,
|
|
242
|
+
{ event, task, rowId, mode, wrapperWidth }: { event: MouseEvent; task: IGanttTask; rowId: any; mode: string; wrapperWidth: number },
|
|
226
243
|
row: any
|
|
227
244
|
) => {
|
|
228
245
|
wasDragging = false
|
|
246
|
+
draggedTaskIdForClick = null
|
|
229
247
|
if (!props.editable || event.button !== 0) { return }
|
|
230
248
|
event.preventDefault()
|
|
231
249
|
|
|
232
|
-
const wrapperRect = wrapperEl?.getBoundingClientRect()
|
|
233
|
-
const wrapperWidth = wrapperRect?.width ?? 1000
|
|
234
|
-
|
|
235
250
|
const startField = props.resolvedMapping?.startDate ?? 'startDate'
|
|
236
251
|
const endField = props.resolvedMapping?.endDate ?? 'endDate'
|
|
237
252
|
const originalStartMs = new Date(task[startField]).getTime()
|
|
@@ -246,7 +261,7 @@ const onTaskDragStart = (
|
|
|
246
261
|
mode: mode as ActiveDrag['mode'],
|
|
247
262
|
startX: event.clientX,
|
|
248
263
|
startY: event.clientY,
|
|
249
|
-
wrapperWidth,
|
|
264
|
+
wrapperWidth: wrapperWidth || 1000,
|
|
250
265
|
originalStartMs,
|
|
251
266
|
originalEndMs,
|
|
252
267
|
currentStartMs: originalStartMs,
|
|
@@ -316,17 +331,15 @@ const onMouseUp = () => {
|
|
|
316
331
|
|
|
317
332
|
if (hasMoved || wasDragging) {
|
|
318
333
|
wasDragging = true
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
e.preventDefault()
|
|
324
|
-
window.removeEventListener('click', captureClick, true)
|
|
334
|
+
draggedTaskIdForClick = state.taskId
|
|
335
|
+
if (captureClickTimer) {
|
|
336
|
+
clearTimeout(captureClickTimer)
|
|
337
|
+
captureClickTimer = null
|
|
325
338
|
}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
window.removeEventListener('click', captureClick, true)
|
|
339
|
+
captureClickTimer = setTimeout(() => {
|
|
340
|
+
captureClickTimer = null
|
|
329
341
|
wasDragging = false
|
|
342
|
+
draggedTaskIdForClick = null
|
|
330
343
|
}, 100)
|
|
331
344
|
}
|
|
332
345
|
|
|
@@ -410,6 +423,10 @@ onBeforeUnmount(() => {
|
|
|
410
423
|
window.removeEventListener('mousemove', onGanttMouseMove)
|
|
411
424
|
window.removeEventListener('mouseup', onGanttMouseUp)
|
|
412
425
|
}
|
|
426
|
+
if (captureClickTimer) {
|
|
427
|
+
clearTimeout(captureClickTimer)
|
|
428
|
+
captureClickTimer = null
|
|
429
|
+
}
|
|
413
430
|
})
|
|
414
431
|
|
|
415
432
|
const ganttColumns = computed(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ITreeViewColumn } from '#toolkit/components/KTreeView/KTreeView.logic';
|
|
2
|
-
import type { IKDatatableAction } from '@katlux/providers';
|
|
2
|
+
import type { IKDatatableAction, IDataFilter } from '@katlux/providers';
|
|
3
3
|
import type { IGanttTask } from '#toolkit/components/KGantt/KGantt.logic';
|
|
4
4
|
type __VLS_Props = {
|
|
5
5
|
dataProvider: any;
|
|
@@ -21,13 +21,16 @@ type __VLS_Props = {
|
|
|
21
21
|
taskTypeField?: string;
|
|
22
22
|
selectedRows?: any[];
|
|
23
23
|
selectAll?: boolean;
|
|
24
|
+
selectAllScope?: 'page' | 'dataset';
|
|
25
|
+
unselectedRows?: any[];
|
|
26
|
+
filter?: IDataFilter | null;
|
|
24
27
|
cellSlots?: any;
|
|
25
28
|
headerSlots?: any;
|
|
26
29
|
endingPoint?: Date | string | number;
|
|
27
30
|
mode?: 'date' | 'numeric';
|
|
28
31
|
inclusiveEndDate?: boolean;
|
|
29
32
|
virtualScroll?: boolean;
|
|
30
|
-
itemHeight?: number;
|
|
33
|
+
itemHeight?: number | ((row: any, index: number) => number);
|
|
31
34
|
viewportHeight?: number;
|
|
32
35
|
buffer?: number;
|
|
33
36
|
moveTime?: (amount: number) => void;
|
|
@@ -36,6 +39,9 @@ type __VLS_Props = {
|
|
|
36
39
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
37
40
|
"update:selectedRows": (value: any[]) => any;
|
|
38
41
|
"update:selectAll": (value: boolean) => any;
|
|
42
|
+
"update:selectAllScope": (value: "page" | "dataset") => any;
|
|
43
|
+
"update:unselectedRows": (value: any[]) => any;
|
|
44
|
+
"update:filter": (value: IDataFilter | null) => any;
|
|
39
45
|
"task-click": (payload: {
|
|
40
46
|
task: IGanttTask;
|
|
41
47
|
row: any;
|
|
@@ -59,6 +65,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
59
65
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
60
66
|
"onUpdate:selectedRows"?: ((value: any[]) => any) | undefined;
|
|
61
67
|
"onUpdate:selectAll"?: ((value: boolean) => any) | undefined;
|
|
68
|
+
"onUpdate:selectAllScope"?: ((value: "page" | "dataset") => any) | undefined;
|
|
69
|
+
"onUpdate:unselectedRows"?: ((value: any[]) => any) | undefined;
|
|
70
|
+
"onUpdate:filter"?: ((value: IDataFilter | null) => any) | undefined;
|
|
62
71
|
"onTask-click"?: ((payload: {
|
|
63
72
|
task: IGanttTask;
|
|
64
73
|
row: any;
|
|
@@ -19,17 +19,19 @@ type __VLS_Props = {
|
|
|
19
19
|
mode?: 'date' | 'numeric';
|
|
20
20
|
};
|
|
21
21
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
22
|
+
"timeline-panstart": (event: MouseEvent) => any;
|
|
22
23
|
"task-dragstart": (payload: {
|
|
23
24
|
event: MouseEvent;
|
|
24
25
|
task: IGanttTask;
|
|
25
26
|
rowId: any;
|
|
26
27
|
mode: string;
|
|
27
|
-
|
|
28
|
+
wrapperWidth: number;
|
|
28
29
|
}) => any;
|
|
29
30
|
"cell-mouseenter": (rowId: any) => any;
|
|
30
31
|
"task-click": (payload: {
|
|
31
32
|
task: IGanttTask;
|
|
32
33
|
row: any;
|
|
34
|
+
event?: MouseEvent;
|
|
33
35
|
}) => any;
|
|
34
36
|
"task-dblclick": (payload: {
|
|
35
37
|
task: IGanttTask;
|
|
@@ -58,17 +60,19 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
58
60
|
clientY: number;
|
|
59
61
|
}) => any;
|
|
60
62
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
63
|
+
"onTimeline-panstart"?: ((event: MouseEvent) => any) | undefined;
|
|
61
64
|
"onTask-dragstart"?: ((payload: {
|
|
62
65
|
event: MouseEvent;
|
|
63
66
|
task: IGanttTask;
|
|
64
67
|
rowId: any;
|
|
65
68
|
mode: string;
|
|
66
|
-
|
|
69
|
+
wrapperWidth: number;
|
|
67
70
|
}) => any) | undefined;
|
|
68
71
|
"onCell-mouseenter"?: ((rowId: any) => any) | undefined;
|
|
69
72
|
"onTask-click"?: ((payload: {
|
|
70
73
|
task: IGanttTask;
|
|
71
74
|
row: any;
|
|
75
|
+
event?: MouseEvent;
|
|
72
76
|
}) => any) | undefined;
|
|
73
77
|
"onTask-dblclick"?: ((payload: {
|
|
74
78
|
task: IGanttTask;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
.gantt-cell(
|
|
3
3
|
:data-row-id="row?.id ?? ''"
|
|
4
4
|
@mouseenter="onCellMouseEnter"
|
|
5
|
+
@mousedown.left="emit('timeline-panstart', $event)"
|
|
5
6
|
)
|
|
6
7
|
.gantt-bar-wrapper(ref="wrapperRef")
|
|
7
8
|
//- Month grid lines behind bars
|
|
@@ -14,23 +15,24 @@
|
|
|
14
15
|
.gantt-bar(
|
|
15
16
|
v-for="task in displayTasks"
|
|
16
17
|
:key="task.id"
|
|
18
|
+
:data-task-id="task.id"
|
|
17
19
|
:style="getBarStyle(task)"
|
|
18
20
|
:title="task[titleField] || ''"
|
|
19
21
|
:class="[{ 'is-dragging': isDraggingThisTask(task.id) }, 'gantt-bar--' + getTaskAppearance(task)]"
|
|
20
|
-
@mousedown.left="
|
|
21
|
-
@click.left.stop="
|
|
22
|
+
@mousedown.left.stop="onBarMouseDown($event, task, 'move')"
|
|
23
|
+
@click.left.stop="emit('task-click', { task, row, event: $event })"
|
|
22
24
|
@dblclick.left.stop="$emit('task-dblclick', { task, row })"
|
|
23
25
|
@contextmenu.stop="onContextMenu($event, task)"
|
|
24
26
|
)
|
|
25
27
|
.gantt-resize-handle.left(
|
|
26
28
|
v-if="editable"
|
|
27
|
-
@mousedown.left.stop="
|
|
29
|
+
@mousedown.left.stop="onBarMouseDown($event, task, 'resize-left')"
|
|
28
30
|
@click.stop
|
|
29
31
|
)
|
|
30
32
|
span.gantt-title {{ task[titleField] || '' }}
|
|
31
33
|
.gantt-resize-handle.right(
|
|
32
34
|
v-if="editable"
|
|
33
|
-
@mousedown.left.stop="
|
|
35
|
+
@mousedown.left.stop="onBarMouseDown($event, task, 'resize-right')"
|
|
34
36
|
@click.stop
|
|
35
37
|
)
|
|
36
38
|
</template>
|
|
@@ -61,14 +63,29 @@ const props = defineProps<{
|
|
|
61
63
|
}>()
|
|
62
64
|
|
|
63
65
|
const emit = defineEmits<{
|
|
64
|
-
(e: '
|
|
66
|
+
(e: 'timeline-panstart', event: MouseEvent): void
|
|
67
|
+
(e: 'task-dragstart', payload: { event: MouseEvent; task: IGanttTask; rowId: any; mode: string; wrapperWidth: number }): void
|
|
65
68
|
(e: 'cell-mouseenter', rowId: any): void
|
|
66
|
-
(e: 'task-click', payload: { task: IGanttTask; row: any }): void
|
|
69
|
+
(e: 'task-click', payload: { task: IGanttTask; row: any; event?: MouseEvent }): void
|
|
67
70
|
(e: 'task-dblclick', payload: { task: IGanttTask; row: any }): void
|
|
68
71
|
(e: 'task-contextmenu', payload: { event: MouseEvent; task: IGanttTask; row: any; ctrlKey: boolean; shiftKey: boolean; altKey: boolean; metaKey: boolean; clientX: number; clientY: number }): void
|
|
69
72
|
(e: 'task-rightclick', payload: { event: MouseEvent; task: IGanttTask; row: any; ctrlKey: boolean; shiftKey: boolean; altKey: boolean; metaKey: boolean; clientX: number; clientY: number }): void
|
|
70
73
|
}>()
|
|
71
74
|
|
|
75
|
+
const wrapperRef = ref<{ clientWidth?: number; getBoundingClientRect?: () => { width: number } } | null>(null)
|
|
76
|
+
|
|
77
|
+
const onBarMouseDown = (event: MouseEvent, task: IGanttTask, mode: 'move' | 'resize-left' | 'resize-right') => {
|
|
78
|
+
if (!props.editable) return
|
|
79
|
+
const wrapperWidth = wrapperRef.value?.getBoundingClientRect?.().width || wrapperRef.value?.clientWidth || 1000
|
|
80
|
+
emit('task-dragstart', {
|
|
81
|
+
event,
|
|
82
|
+
task,
|
|
83
|
+
rowId: props.row?.id,
|
|
84
|
+
mode,
|
|
85
|
+
wrapperWidth
|
|
86
|
+
})
|
|
87
|
+
}
|
|
88
|
+
|
|
72
89
|
const onContextMenu = (event: MouseEvent, task: IGanttTask) => {
|
|
73
90
|
const payload = {
|
|
74
91
|
event,
|
|
@@ -85,8 +102,6 @@ const onContextMenu = (event: MouseEvent, task: IGanttTask) => {
|
|
|
85
102
|
emit('task-rightclick', payload)
|
|
86
103
|
}
|
|
87
104
|
|
|
88
|
-
const wrapperRef = ref<HTMLElement | null>(null)
|
|
89
|
-
|
|
90
105
|
const onCellMouseEnter = () => {
|
|
91
106
|
emit('cell-mouseenter', props.row?.id)
|
|
92
107
|
}
|