@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
|
@@ -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;
|
|
@@ -19,12 +19,12 @@ const slots = useSlots()
|
|
|
19
19
|
const props = withDefaults(defineProps<{
|
|
20
20
|
scrollMode?: 'window' | 'container'
|
|
21
21
|
}>(), {
|
|
22
|
-
scrollMode: '
|
|
22
|
+
scrollMode: 'window'
|
|
23
23
|
})
|
|
24
24
|
|
|
25
25
|
const layoutClasses = computed(() => [
|
|
26
26
|
{ 'has-aside': Boolean(slots.aside) },
|
|
27
|
-
`is-scroll-${props.scrollMode || '
|
|
27
|
+
`is-scroll-${props.scrollMode || 'window'}`
|
|
28
28
|
])
|
|
29
29
|
</script>
|
|
30
30
|
|
|
@@ -2,6 +2,7 @@ type __VLS_Props = {
|
|
|
2
2
|
loading: boolean;
|
|
3
3
|
overlay?: boolean;
|
|
4
4
|
size?: 'small' | 'medium' | 'large';
|
|
5
|
+
label?: string;
|
|
5
6
|
loaderClasses?: any;
|
|
6
7
|
};
|
|
7
8
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
.KLoader(:class="computedClasses")
|
|
2
|
+
.KLoader(:class="computedClasses" role="status" :aria-live="props.loading ? 'polite' : undefined")
|
|
3
3
|
.KLoader__spinner
|
|
4
|
-
|
|
4
|
+
.KLoader__label(v-if="props.label || $slots.default")
|
|
5
|
+
slot {{ props.label }}
|
|
5
6
|
</template>
|
|
6
7
|
|
|
7
8
|
<script lang="ts" setup>
|
|
@@ -10,6 +11,7 @@ const props = defineProps<{
|
|
|
10
11
|
loading: boolean
|
|
11
12
|
overlay?: boolean
|
|
12
13
|
size?: 'small' | 'medium' | 'large'
|
|
14
|
+
label?: string
|
|
13
15
|
loaderClasses?: any
|
|
14
16
|
}>()
|
|
15
17
|
|
|
@@ -33,8 +35,17 @@ const computedClasses = computed(() => {
|
|
|
33
35
|
|
|
34
36
|
&.is-loading {
|
|
35
37
|
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
36
39
|
justify-content: center;
|
|
37
40
|
align-items: center;
|
|
41
|
+
gap: var(--gap-sm);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&__label {
|
|
45
|
+
font-size: var(--font-size-sm);
|
|
46
|
+
font-weight: var(--font-weight-medium);
|
|
47
|
+
color: var(--font-color-primary);
|
|
48
|
+
text-align: center;
|
|
38
49
|
}
|
|
39
50
|
|
|
40
51
|
&.is-overlay {
|
|
@@ -2,6 +2,7 @@ type __VLS_Props = {
|
|
|
2
2
|
loading: boolean;
|
|
3
3
|
overlay?: boolean;
|
|
4
4
|
size?: 'small' | 'medium' | 'large';
|
|
5
|
+
label?: string;
|
|
5
6
|
loaderClasses?: any;
|
|
6
7
|
};
|
|
7
8
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -10,14 +10,11 @@
|
|
|
10
10
|
:validation="validation"
|
|
11
11
|
:validationText="validationText"
|
|
12
12
|
@update:modelValue="handleUpdate"
|
|
13
|
-
@beforeinput="handleBeforeInput"
|
|
14
13
|
)
|
|
15
14
|
</template>
|
|
16
15
|
|
|
17
16
|
<script lang="ts" setup>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const props = defineProps<{
|
|
17
|
+
defineProps<{
|
|
21
18
|
label?: string
|
|
22
19
|
maskedValue: string
|
|
23
20
|
placeholder: string
|
|
@@ -32,96 +29,6 @@ const emit = defineEmits<{
|
|
|
32
29
|
(e: 'clear'): void
|
|
33
30
|
}>()
|
|
34
31
|
|
|
35
|
-
// Use beforeinput for better validation (fires before input is accepted)
|
|
36
|
-
const handleBeforeInput = (event: InputEvent) => {
|
|
37
|
-
if (!event.data || event.inputType !== 'insertText') {
|
|
38
|
-
return // Allow deletions, etc.
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const char = event.data
|
|
42
|
-
if (!/[0-9]/.test(char)) {
|
|
43
|
-
return // Not a digit, let through for other patterns
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const target = event.target as HTMLInputElement
|
|
47
|
-
const cursorPos = target.selectionStart || 0
|
|
48
|
-
const currentValue = target.value
|
|
49
|
-
|
|
50
|
-
// Find the mask pattern at cursor position
|
|
51
|
-
let maskIdx = 0
|
|
52
|
-
let valIdx = 0
|
|
53
|
-
|
|
54
|
-
// Walk through to find where we are in the mask
|
|
55
|
-
while (valIdx < cursorPos && maskIdx < props.mask.length) {
|
|
56
|
-
const def = getMaskPatternDef(props.mask, maskIdx)
|
|
57
|
-
if (def) {
|
|
58
|
-
// Pattern - check how many chars it uses in value
|
|
59
|
-
let consumed = 0
|
|
60
|
-
while (consumed < def.length && valIdx < currentValue.length) {
|
|
61
|
-
if (def.pattern.test(currentValue[valIdx])) {
|
|
62
|
-
consumed++
|
|
63
|
-
}
|
|
64
|
-
valIdx++
|
|
65
|
-
if (valIdx >= cursorPos) break
|
|
66
|
-
}
|
|
67
|
-
maskIdx += def.length
|
|
68
|
-
} else {
|
|
69
|
-
// Literal
|
|
70
|
-
valIdx++
|
|
71
|
-
maskIdx++
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// Get pattern at current position
|
|
76
|
-
const patternType = props.mask.substring(maskIdx, maskIdx + 4)
|
|
77
|
-
const digit = parseInt(char, 10)
|
|
78
|
-
|
|
79
|
-
// Find how many digits already entered for this specific pattern instance
|
|
80
|
-
let digitsInPattern = 0
|
|
81
|
-
let scanIdx = cursorPos
|
|
82
|
-
|
|
83
|
-
// Count backwards to start of this pattern
|
|
84
|
-
while (scanIdx > 0 && digitsInPattern < 10) {
|
|
85
|
-
scanIdx--
|
|
86
|
-
const ch = currentValue[scanIdx]
|
|
87
|
-
if (/[0-9]/.test(ch)) {
|
|
88
|
-
digitsInPattern++
|
|
89
|
-
} else {
|
|
90
|
-
break // Hit a literal, stop
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// Validate based on pattern
|
|
95
|
-
if (patternType.startsWith('DD')) {
|
|
96
|
-
if (digitsInPattern === 0) {
|
|
97
|
-
if (digit > 3) event.preventDefault()
|
|
98
|
-
} else if (digitsInPattern === 1) {
|
|
99
|
-
const firstDigit = parseInt(currentValue[cursorPos - 1], 10)
|
|
100
|
-
if (firstDigit === 0 && digit === 0) event.preventDefault()
|
|
101
|
-
if (firstDigit === 3 && digit > 1) event.preventDefault()
|
|
102
|
-
}
|
|
103
|
-
} else if (patternType.startsWith('MM')) {
|
|
104
|
-
if (digitsInPattern === 0) {
|
|
105
|
-
if (digit > 1) event.preventDefault()
|
|
106
|
-
} else if (digitsInPattern === 1) {
|
|
107
|
-
const firstDigit = parseInt(currentValue[cursorPos - 1], 10)
|
|
108
|
-
if (firstDigit === 0 && digit === 0) event.preventDefault()
|
|
109
|
-
if (firstDigit === 1 && digit > 2) event.preventDefault()
|
|
110
|
-
}
|
|
111
|
-
} else if (patternType.startsWith('HH')) {
|
|
112
|
-
if (digitsInPattern === 0) {
|
|
113
|
-
if (digit > 2) event.preventDefault()
|
|
114
|
-
} else if (digitsInPattern === 1) {
|
|
115
|
-
const firstDigit = parseInt(currentValue[cursorPos - 1], 10)
|
|
116
|
-
if (firstDigit === 2 && digit > 3) event.preventDefault()
|
|
117
|
-
}
|
|
118
|
-
} else if (patternType.startsWith('mm') || patternType.startsWith('ss')) {
|
|
119
|
-
if (digitsInPattern === 0) {
|
|
120
|
-
if (digit > 5) event.preventDefault()
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
32
|
const handleUpdate = (value: string) => {
|
|
126
33
|
emit('update:maskedValue', value)
|
|
127
34
|
}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
KGrid.k-multi-tabs(direction="row" align="stretch" flexChild)
|
|
2
|
+
KGrid.k-multi-tabs(direction="row" align="stretch" flexChild :noGap="true")
|
|
3
3
|
template(v-for="(group, groupIndex) in groups" :key="group.id || groupIndex")
|
|
4
|
+
.k-multi-tabs-pane(:class="{ 'has-divider': groupIndex > 0 }")
|
|
4
5
|
KTabs.k-multi-tabs-tabs(v-if="group.tabs && group.tabs.length > 0")
|
|
5
6
|
KTabItem(v-for="tab in group.tabs" :key="tab.id" :title="tab.title" :isOpen="tab.isOpen")
|
|
6
7
|
.k-multi-tabs-tab-content
|
|
7
8
|
slot(:name="tab.slotName || tab.id" :tab="tab")
|
|
8
9
|
component(v-if="tab.component" :is="tab.component" v-bind="tab.props")
|
|
10
|
+
.default-tab-content(v-else)
|
|
11
|
+
h3.default-tab-title {{ tab.title }}
|
|
12
|
+
p.default-tab-desc {{ tab.content || t('Content for') + ' ' + tab.title }}
|
|
9
13
|
.k-multi-tabs-empty(v-else)
|
|
10
14
|
slot(name="empty" :group="group")
|
|
11
15
|
span {{ t('No tabs open') }}
|
|
@@ -32,6 +36,19 @@ const { t } = useKatluxI18n()
|
|
|
32
36
|
overflow: hidden;
|
|
33
37
|
}
|
|
34
38
|
|
|
39
|
+
.k-multi-tabs-pane {
|
|
40
|
+
flex: 1 1 0%;
|
|
41
|
+
min-width: 0;
|
|
42
|
+
height: 100%;
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
box-sizing: border-box;
|
|
46
|
+
|
|
47
|
+
&.has-divider {
|
|
48
|
+
border-left: 1px solid var(--border-color-light, #e2e8f0);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
35
52
|
.k-multi-tabs-empty {
|
|
36
53
|
display: flex;
|
|
37
54
|
align-items: center;
|
|
@@ -40,27 +57,75 @@ const { t } = useKatluxI18n()
|
|
|
40
57
|
flex: 1 1 0%;
|
|
41
58
|
min-width: 0;
|
|
42
59
|
}
|
|
60
|
+
|
|
43
61
|
.k-multi-tabs-tabs {
|
|
44
62
|
box-sizing: border-box;
|
|
45
|
-
|
|
46
63
|
flex: 1 1 0%;
|
|
47
64
|
min-width: 0;
|
|
48
65
|
display: flex;
|
|
49
66
|
flex-direction: column;
|
|
50
|
-
|
|
67
|
+
height: 100%;
|
|
68
|
+
|
|
69
|
+
:deep(.KTab) {
|
|
51
70
|
height: 100%;
|
|
52
|
-
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: column;
|
|
73
|
+
max-width: 100%;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:deep(.KPanel) {
|
|
77
|
+
height: 100%;
|
|
78
|
+
border: none;
|
|
79
|
+
border-radius: 0;
|
|
80
|
+
box-shadow: none;
|
|
81
|
+
background: transparent;
|
|
82
|
+
display: flex;
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
:deep(.KPanel--header) {
|
|
87
|
+
background: var(--bg-surface-secondary, var(--panel-header-bg-default, #f8fafc));
|
|
88
|
+
border-bottom: 1px solid var(--border-color-light, #e2e8f0);
|
|
89
|
+
padding: 0.35rem 0.5rem;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
:deep(.KPanel--content) {
|
|
93
|
+
flex: 1 1 auto;
|
|
94
|
+
overflow: auto;
|
|
95
|
+
padding: 0;
|
|
53
96
|
}
|
|
54
97
|
}
|
|
98
|
+
|
|
55
99
|
.k-multi-tabs-tab-content {
|
|
56
100
|
display: flex;
|
|
57
101
|
flex-direction: column;
|
|
58
102
|
height: 100%;
|
|
59
103
|
overflow: auto;
|
|
104
|
+
padding: 1.25rem;
|
|
105
|
+
box-sizing: border-box;
|
|
60
106
|
|
|
61
107
|
> * {
|
|
62
108
|
flex: 1 1 auto;
|
|
63
109
|
height: 100%;
|
|
64
110
|
}
|
|
65
111
|
}
|
|
112
|
+
|
|
113
|
+
.default-tab-content {
|
|
114
|
+
display: flex;
|
|
115
|
+
flex-direction: column;
|
|
116
|
+
gap: 0.5rem;
|
|
117
|
+
|
|
118
|
+
.default-tab-title {
|
|
119
|
+
font-size: 1.25rem;
|
|
120
|
+
font-weight: 700;
|
|
121
|
+
color: var(--font-color-primary, #0f172a);
|
|
122
|
+
margin: 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.default-tab-desc {
|
|
126
|
+
color: var(--font-color-secondary, #64748b);
|
|
127
|
+
font-size: 0.95rem;
|
|
128
|
+
margin: 0;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
66
131
|
</style>
|
|
@@ -1,26 +1,24 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
.KRangeSlider(:class="{ disabled: isDisabled }")
|
|
3
3
|
label.k-input-label(v-if="label") {{ label }}
|
|
4
|
-
.slider-container
|
|
4
|
+
.slider-container
|
|
5
5
|
.slider-track
|
|
6
6
|
.slider-range(:style="{ '--range-start': minPercent + '%', '--range-width': (maxPercent - minPercent) + '%' }")
|
|
7
7
|
input.slider-input.slider-min(
|
|
8
|
+
v-model.number="minInputValue"
|
|
8
9
|
type="range"
|
|
9
10
|
:min="rangeMin"
|
|
10
11
|
:max="rangeMax"
|
|
11
12
|
:step="rangeStep"
|
|
12
|
-
:value="currentMinValue"
|
|
13
13
|
:disabled="isDisabled"
|
|
14
|
-
@input="updateMinValue"
|
|
15
14
|
)
|
|
16
15
|
input.slider-input.slider-max(
|
|
16
|
+
v-model.number="maxInputValue"
|
|
17
17
|
type="range"
|
|
18
18
|
:min="rangeMin"
|
|
19
19
|
:max="rangeMax"
|
|
20
20
|
:step="rangeStep"
|
|
21
|
-
:value="currentMaxValue"
|
|
22
21
|
:disabled="isDisabled"
|
|
23
|
-
@input="updateMaxValue"
|
|
24
22
|
)
|
|
25
23
|
</template>
|
|
26
24
|
|
|
@@ -45,51 +43,25 @@ const emit = defineEmits<{
|
|
|
45
43
|
(e: 'update:maxValue', value: number): void
|
|
46
44
|
}>()
|
|
47
45
|
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const updateMaxValue = (event: Event) => {
|
|
57
|
-
const value = parseFloat((event.target as HTMLInputElement).value)
|
|
58
|
-
// Ensure max doesn't go below min
|
|
59
|
-
if (value >= props.currentMinValue) {
|
|
60
|
-
emit('update:maxValue', value)
|
|
46
|
+
const minInputValue = computed({
|
|
47
|
+
get: () => props.currentMinValue,
|
|
48
|
+
set: (val: number) => {
|
|
49
|
+
const numeric = Number(val)
|
|
50
|
+
if (!Number.isNaN(numeric) && numeric <= props.currentMaxValue) {
|
|
51
|
+
emit('update:minValue', numeric)
|
|
52
|
+
}
|
|
61
53
|
}
|
|
62
|
-
}
|
|
54
|
+
})
|
|
63
55
|
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const percentage = clickX / rect.width
|
|
71
|
-
const rawValue = props.rangeMin + (percentage * (props.rangeMax - props.rangeMin))
|
|
72
|
-
|
|
73
|
-
// Round to step
|
|
74
|
-
const steppedValue = Math.round(rawValue / props.rangeStep) * props.rangeStep
|
|
75
|
-
const value = Math.max(props.rangeMin, Math.min(props.rangeMax, steppedValue))
|
|
76
|
-
|
|
77
|
-
// Determine which handle is closer
|
|
78
|
-
const distanceToMin = Math.abs(value - props.currentMinValue)
|
|
79
|
-
const distanceToMax = Math.abs(value - props.currentMaxValue)
|
|
80
|
-
|
|
81
|
-
if (distanceToMin < distanceToMax) {
|
|
82
|
-
// Move min handle
|
|
83
|
-
if (value <= props.currentMaxValue) {
|
|
84
|
-
emit('update:minValue', value)
|
|
85
|
-
}
|
|
86
|
-
} else {
|
|
87
|
-
// Move max handle
|
|
88
|
-
if (value >= props.currentMinValue) {
|
|
89
|
-
emit('update:maxValue', value)
|
|
56
|
+
const maxInputValue = computed({
|
|
57
|
+
get: () => props.currentMaxValue,
|
|
58
|
+
set: (val: number) => {
|
|
59
|
+
const numeric = Number(val)
|
|
60
|
+
if (!Number.isNaN(numeric) && numeric >= props.currentMinValue) {
|
|
61
|
+
emit('update:maxValue', numeric)
|
|
90
62
|
}
|
|
91
63
|
}
|
|
92
|
-
}
|
|
64
|
+
})
|
|
93
65
|
</script>
|
|
94
66
|
|
|
95
67
|
<style lang="scss" scoped>
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
.KSlider(:class="{ disabled: isDisabled }")
|
|
3
3
|
label.k-input-label(v-if="label") {{ label }}
|
|
4
|
-
.slider-container
|
|
4
|
+
.slider-container
|
|
5
5
|
.slider-track
|
|
6
6
|
.slider-fill(:style="{ '--slider-fill': valuePercent + '%' }")
|
|
7
7
|
input.slider-input(
|
|
8
|
+
v-model.number="sliderValue"
|
|
8
9
|
type="range"
|
|
9
10
|
:min="rangeMin"
|
|
10
11
|
:max="rangeMax"
|
|
11
12
|
:step="rangeStep"
|
|
12
|
-
:value="currentValue"
|
|
13
13
|
:disabled="isDisabled"
|
|
14
|
-
@input="updateValue"
|
|
15
14
|
)
|
|
16
15
|
</template>
|
|
17
16
|
|
|
@@ -33,26 +32,15 @@ const emit = defineEmits<{
|
|
|
33
32
|
(e: 'update:value', value: number): void
|
|
34
33
|
}>()
|
|
35
34
|
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const rect = target.getBoundingClientRect()
|
|
46
|
-
const clickX = event.clientX - rect.left
|
|
47
|
-
const percentage = clickX / rect.width
|
|
48
|
-
const rawValue = props.rangeMin + (percentage * (props.rangeMax - props.rangeMin))
|
|
49
|
-
|
|
50
|
-
// Round to step
|
|
51
|
-
const steppedValue = Math.round(rawValue / props.rangeStep) * props.rangeStep
|
|
52
|
-
const value = Math.max(props.rangeMin, Math.min(props.rangeMax, steppedValue))
|
|
53
|
-
|
|
54
|
-
emit('update:value', value)
|
|
55
|
-
}
|
|
35
|
+
const sliderValue = computed({
|
|
36
|
+
get: () => props.currentValue,
|
|
37
|
+
set: (val: number) => {
|
|
38
|
+
const numeric = Number(val)
|
|
39
|
+
if (!Number.isNaN(numeric)) {
|
|
40
|
+
emit('update:value', Math.max(props.rangeMin, Math.min(props.rangeMax, numeric)))
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
})
|
|
56
44
|
</script>
|
|
57
45
|
|
|
58
46
|
<style lang="scss" scoped>
|
|
@@ -3,12 +3,15 @@ type __VLS_Props = {
|
|
|
3
3
|
text: string;
|
|
4
4
|
showClear: boolean;
|
|
5
5
|
clear: () => void;
|
|
6
|
+
loading?: boolean;
|
|
6
7
|
placeholder: string;
|
|
7
8
|
type: string;
|
|
8
9
|
validation?: 'success' | 'warning' | 'error' | null;
|
|
9
10
|
validationText?: string;
|
|
10
11
|
};
|
|
11
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
12
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
13
|
+
focus: () => void | undefined;
|
|
14
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
12
15
|
"update:text": (value: string) => any;
|
|
13
16
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
17
|
"onUpdate:text"?: ((value: string) => any) | undefined;
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
.KTextbox-wrapper(:class="$attrs.class" :style="$attrs.style")
|
|
3
3
|
label.k-input-label(v-if="label" :for="inputId") {{ label }}
|
|
4
|
-
.KTextbox(:class="validation ? `is-${validation}` : ''")
|
|
5
|
-
input(:id="inputId" v-bind="inputAttrs" :type="props.type" v-model="text" :placeholder="placeholder")
|
|
6
|
-
|
|
4
|
+
.KTextbox(:class="[validation ? `is-${validation}` : '', { 'is-loading': loading }]")
|
|
5
|
+
input(ref="inputRef" :id="inputId" v-bind="inputAttrs" :type="props.type" v-model="text" :placeholder="placeholder" :aria-busy="loading ? 'true' : undefined")
|
|
6
|
+
.KTextbox__actions(v-if="loading || showClear")
|
|
7
|
+
KLoader.KTextbox__loader(v-if="loading" :loading="loading" size="small")
|
|
8
|
+
KIcon(v-if="showClear" @click.stop="clear" @mousedown.stop iconname="close" width="10" height="10" role="button" :aria-label="t('Clear input')").closeIcon
|
|
7
9
|
span.validation-text(v-if="validation && ['success', 'warning', 'error'].includes(validation) && validationText" :class="`is-${validation}`") {{ validationText }}
|
|
8
10
|
</template>
|
|
9
11
|
|
|
10
12
|
<script lang="ts" setup>
|
|
11
|
-
import { computed, useAttrs, useId } from 'vue'
|
|
13
|
+
import { computed, ref, useAttrs, useId } from 'vue'
|
|
12
14
|
import { useKatluxI18n } from '#toolkit/composables/useKatluxI18n'
|
|
13
15
|
|
|
14
16
|
const { t } = useKatluxI18n()
|
|
15
17
|
const generatedId = useId()
|
|
18
|
+
const inputRef = ref<{ focus?: () => void } | null>(null)
|
|
19
|
+
|
|
20
|
+
defineExpose({
|
|
21
|
+
focus: () => inputRef.value?.focus?.()
|
|
22
|
+
})
|
|
16
23
|
|
|
17
24
|
defineOptions({
|
|
18
25
|
inheritAttrs: false
|
|
@@ -24,6 +31,7 @@ const props = defineProps<{
|
|
|
24
31
|
text: string
|
|
25
32
|
showClear: boolean
|
|
26
33
|
clear: () => void
|
|
34
|
+
loading?: boolean
|
|
27
35
|
placeholder: string
|
|
28
36
|
type: string
|
|
29
37
|
validation?: 'success' | 'warning' | 'error' | null
|
|
@@ -106,11 +114,19 @@ const inputAttrs = computed(() => {
|
|
|
106
114
|
}
|
|
107
115
|
}
|
|
108
116
|
|
|
117
|
+
.KTextbox__actions {
|
|
118
|
+
display: flex;
|
|
119
|
+
align-items: center;
|
|
120
|
+
gap: var(--gap-sm);
|
|
121
|
+
padding-right: var(--component-gap);
|
|
122
|
+
flex-shrink: 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.KTextbox__loader {
|
|
126
|
+
flex-shrink: 0;
|
|
127
|
+
}
|
|
128
|
+
|
|
109
129
|
.closeIcon {
|
|
110
|
-
position: absolute;
|
|
111
|
-
right: var(--component-gap);
|
|
112
|
-
top: 50%;
|
|
113
|
-
transform: translateY(-50%);
|
|
114
130
|
color: var(--icon-color-medium);
|
|
115
131
|
cursor: pointer;
|
|
116
132
|
flex-shrink: 0;
|
|
@@ -3,12 +3,15 @@ type __VLS_Props = {
|
|
|
3
3
|
text: string;
|
|
4
4
|
showClear: boolean;
|
|
5
5
|
clear: () => void;
|
|
6
|
+
loading?: boolean;
|
|
6
7
|
placeholder: string;
|
|
7
8
|
type: string;
|
|
8
9
|
validation?: 'success' | 'warning' | 'error' | null;
|
|
9
10
|
validationText?: string;
|
|
10
11
|
};
|
|
11
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
12
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
13
|
+
focus: () => void | undefined;
|
|
14
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
12
15
|
"update:text": (value: string) => any;
|
|
13
16
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
17
|
"onUpdate:text"?: ((value: string) => any) | undefined;
|
|
@@ -16,7 +16,7 @@ type __VLS_Props = {
|
|
|
16
16
|
modelValue?: any;
|
|
17
17
|
selectedNode?: any;
|
|
18
18
|
virtualScroll?: boolean;
|
|
19
|
-
itemHeight?: number;
|
|
19
|
+
itemHeight?: number | ((node: any, index: number) => number);
|
|
20
20
|
viewportHeight?: number;
|
|
21
21
|
buffer?: number;
|
|
22
22
|
loading?: boolean;
|
|
@@ -28,13 +28,13 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
28
28
|
}>, {
|
|
29
29
|
disabled: boolean;
|
|
30
30
|
loading: boolean;
|
|
31
|
+
idKey: string;
|
|
31
32
|
searchtext: string;
|
|
32
33
|
virtualScroll: boolean;
|
|
33
|
-
itemHeight: number;
|
|
34
|
+
itemHeight: number | ((node: any, index: number) => number);
|
|
34
35
|
buffer: number;
|
|
35
36
|
labelField: string;
|
|
36
37
|
multiSelect: boolean;
|
|
37
|
-
idKey: string;
|
|
38
38
|
viewportHeight: number;
|
|
39
39
|
iconField: string;
|
|
40
40
|
selectable: boolean;
|