hys-ui 0.6.0 → 0.8.0
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/CHANGELOG.md +15 -0
- package/LICENSE +19 -0
- package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
- package/dist/components/HysDataGrid/HysDataGrid2.vue.js +1055 -753
- package/dist/components/HysDataGrid/gridColumnLayout.js +46 -0
- package/dist/components/HysDataGrid/gridPresentation.js +17 -0
- package/dist/components/HysDataGrid/useGridContextMenu.js +33 -0
- package/dist/components/HysDatePicker/HysDatePicker.vue.js +102 -48
- package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +2 -2
- package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +874 -532
- package/dist/components/HysDatePicker/HysDatePickerPanel.vue.js +2 -2
- package/dist/components/HysDatePicker/HysDatePickerPanel2.vue.js +209 -168
- package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +102 -48
- package/dist/components/HysDescriptions/HysDescriptions.vue.js +7 -0
- package/dist/components/HysDescriptions/HysDescriptions2.vue.js +146 -0
- package/dist/components/HysForm/HysForm2.vue.js +9 -8
- package/dist/components/HysIcon/HysIcon.vue.js +373 -0
- package/dist/components/HysIcon/HysIcon2.vue.js +5 -0
- package/dist/components/HysIcon/IconGraphic/IconGraphic.vue.js +147 -0
- package/dist/components/HysIcon/IconGraphic/IconGraphic2.vue.js +4 -0
- package/dist/components/HysIcon/IconPickerPanel/IconPickerPanel.vue.js +7 -0
- package/dist/components/HysIcon/IconPickerPanel/IconPickerPanel2.vue.js +440 -0
- package/dist/components/HysIcon/IconReferenceGraphic/IconReferenceGraphic.vue.js +29 -0
- package/dist/components/HysIcon/IconReferenceGraphic/IconReferenceGraphic2.vue.js +4 -0
- package/dist/components/HysIcon/IconTooltip/IconTooltip.vue.js +19 -0
- package/dist/components/HysIcon/IconTooltip/IconTooltip2.vue.js +4 -0
- package/dist/components/HysIcon/builtins/access.js +180 -0
- package/dist/components/HysIcon/builtins/actions.js +327 -0
- package/dist/components/HysIcon/builtins/business.js +364 -0
- package/dist/components/HysIcon/builtins/catalog/access-1.json.js +51 -0
- package/dist/components/HysIcon/builtins/catalog/access-2.json.js +35 -0
- package/dist/components/HysIcon/builtins/catalog/accessibility.json.js +26 -0
- package/dist/components/HysIcon/builtins/catalog/arrows-1.json.js +45 -0
- package/dist/components/HysIcon/builtins/catalog/arrows-2.json.js +46 -0
- package/dist/components/HysIcon/builtins/catalog/arrows-3.json.js +42 -0
- package/dist/components/HysIcon/builtins/catalog/charts-1.json.js +50 -0
- package/dist/components/HysIcon/builtins/catalog/charts-2.json.js +13 -0
- package/dist/components/HysIcon/builtins/catalog/commerce.json.js +43 -0
- package/dist/components/HysIcon/builtins/catalog/communication-1.json.js +49 -0
- package/dist/components/HysIcon/builtins/catalog/communication-2.json.js +37 -0
- package/dist/components/HysIcon/builtins/catalog/design-1.json.js +61 -0
- package/dist/components/HysIcon/builtins/catalog/design-2.json.js +27 -0
- package/dist/components/HysIcon/builtins/catalog/development-1.json.js +58 -0
- package/dist/components/HysIcon/builtins/catalog/development-2.json.js +60 -0
- package/dist/components/HysIcon/builtins/catalog/development-3.json.js +25 -0
- package/dist/components/HysIcon/builtins/catalog/devices-1.json.js +52 -0
- package/dist/components/HysIcon/builtins/catalog/devices-2.json.js +55 -0
- package/dist/components/HysIcon/builtins/catalog/devices-3.json.js +23 -0
- package/dist/components/HysIcon/builtins/catalog/education.json.js +34 -0
- package/dist/components/HysIcon/builtins/catalog/emoji.json.js +24 -0
- package/dist/components/HysIcon/builtins/catalog/files-1.json.js +45 -0
- package/dist/components/HysIcon/builtins/catalog/files-2.json.js +47 -0
- package/dist/components/HysIcon/builtins/catalog/files-3.json.js +8 -0
- package/dist/components/HysIcon/builtins/catalog/food-1.json.js +67 -0
- package/dist/components/HysIcon/builtins/catalog/food-2.json.js +40 -0
- package/dist/components/HysIcon/builtins/catalog/home.json.js +36 -0
- package/dist/components/HysIcon/builtins/catalog/layout-1.json.js +46 -0
- package/dist/components/HysIcon/builtins/catalog/layout-2.json.js +45 -0
- package/dist/components/HysIcon/builtins/catalog/manifest.json.js +4 -0
- package/dist/components/HysIcon/builtins/catalog/maps-1.json.js +61 -0
- package/dist/components/HysIcon/builtins/catalog/maps-2.json.js +24 -0
- package/dist/components/HysIcon/builtins/catalog/media-1.json.js +57 -0
- package/dist/components/HysIcon/builtins/catalog/media-2.json.js +13 -0
- package/dist/components/HysIcon/builtins/catalog/medical.json.js +30 -0
- package/dist/components/HysIcon/builtins/catalog/nature.json.js +54 -0
- package/dist/components/HysIcon/builtins/catalog/recreation.json.js +51 -0
- package/dist/components/HysIcon/builtins/catalog/shapes.json.js +54 -0
- package/dist/components/HysIcon/builtins/catalog/text-1.json.js +52 -0
- package/dist/components/HysIcon/builtins/catalog/text-2.json.js +54 -0
- package/dist/components/HysIcon/builtins/catalog/text-3.json.js +58 -0
- package/dist/components/HysIcon/builtins/catalog/text-4.json.js +41 -0
- package/dist/components/HysIcon/builtins/catalog/time.json.js +39 -0
- package/dist/components/HysIcon/builtins/catalog/transport-1.json.js +57 -0
- package/dist/components/HysIcon/builtins/catalog/transport-2.json.js +7 -0
- package/dist/components/HysIcon/builtins/catalog/weather.json.js +46 -0
- package/dist/components/HysIcon/builtins/communication.js +314 -0
- package/dist/components/HysIcon/builtins/documents.js +315 -0
- package/dist/components/HysIcon/builtins/extendedCatalog.js +75 -0
- package/dist/components/HysIcon/builtins/iconInCategory.js +11 -0
- package/dist/components/HysIcon/builtins/media.js +255 -0
- package/dist/components/HysIcon/builtins/navigation.js +276 -0
- package/dist/components/HysIcon/builtins/technology.js +189 -0
- package/dist/components/HysIcon/iconBuiltins.js +228 -0
- package/dist/components/HysIcon/iconConfig.js +30 -0
- package/dist/components/HysIcon/iconRegistry.js +183 -0
- package/dist/components/HysIcon/iconSafety.js +191 -0
- package/dist/components/HysIcon/iconStyle.js +70 -0
- package/dist/components/HysIcon/useIconResource.js +75 -0
- package/dist/components/HysPopconfirm/HysPopconfirm.vue.js +7 -0
- package/dist/components/HysPopconfirm/HysPopconfirm2.vue.js +346 -0
- package/dist/components/HysPopconfirm/usePopconfirmAction.js +32 -0
- package/dist/components/HysResult/HysResult.vue.js +7 -0
- package/dist/components/HysResult/HysResult2.vue.js +124 -0
- package/dist/components/HysSpace/HysSpace.vue.js +7 -0
- package/dist/components/HysSpace/HysSpace2.vue.js +79 -0
- package/dist/components/HysSpace/spaceItems.js +17 -0
- package/dist/components/HysSpin/HysSpin.vue.js +7 -0
- package/dist/components/HysSpin/HysSpin2.vue.js +427 -0
- package/dist/components/HysSpin/SpinGlyph/SpinGlyph.vue.js +334 -0
- package/dist/components/HysSpin/SpinGlyph/SpinGlyph2.vue.js +5 -0
- package/dist/components/HysSpin/SpinPortal/SpinPortal.vue.js +7 -0
- package/dist/components/HysSpin/SpinPortal/SpinPortal2.vue.js +66 -0
- package/dist/components/HysSpin/SpinPortal/spinTarget.js +57 -0
- package/dist/components/HysSpin/spinCatalog.js +35 -0
- package/dist/components/HysSpin/spinConfig.js +32 -0
- package/dist/components/HysSpin/spinService.js +160 -0
- package/dist/components/HysSpin/spinStyle.js +39 -0
- package/dist/components/HysSpin/useHysSpinTask.js +92 -0
- package/dist/components/HysSpin/useSpinFullscreen.js +60 -0
- package/dist/components/HysSpin/useSpinVisibility.js +59 -0
- package/dist/components/HysSplitPane/HysSplitPane.vue.js +285 -204
- package/dist/components/HysSplitPane/splitPaneResize.js +75 -0
- package/dist/components/HysTabPane/HysTabPane.vue.js +49 -0
- package/dist/components/HysTabPane/HysTabPane2.vue.js +4 -0
- package/dist/components/HysTable/HysTable.vue.js +3 -3
- package/dist/components/HysTable/HysTable2.vue.js +412 -383
- package/dist/components/HysTable/tableSearch.js +24 -0
- package/dist/components/HysTabs/HysTabs.vue.js +172 -5
- package/dist/components/HysTabs/HysTabs2.vue.js +2 -275
- package/dist/components/HysTabs/TabsMore/TabsMore.vue.js +7 -0
- package/dist/components/HysTabs/TabsMore/TabsMore2.vue.js +133 -0
- package/dist/components/HysTabs/TabsPanels/TabsPanels.vue.js +161 -0
- package/dist/components/HysTabs/TabsPanels/TabsPanels2.vue.js +4 -0
- package/dist/components/HysTabs/TabsPrompts/TabsPrompts.vue.js +4 -0
- package/dist/components/HysTabs/TabsPrompts/TabsPrompts2.vue.js +88 -0
- package/dist/components/HysTabs/TabsSlot/TabsSlot.js +13 -0
- package/dist/components/HysTabs/TabsWorkbench/TabsWorkbench.vue.js +7 -0
- package/dist/components/HysTabs/TabsWorkbench/TabsWorkbench2.vue.js +687 -0
- package/dist/components/HysTabs/tabsConfig.js +35 -0
- package/dist/components/HysTabs/tabsItems.js +79 -0
- package/dist/components/HysTabs/tabsPersistence.js +118 -0
- package/dist/components/HysTabs/useHysRouteTabs.js +77 -0
- package/dist/components/HysTabs/useTabsDragGhost.js +47 -0
- package/dist/components/HysTabs/useTabsNav.js +127 -0
- package/dist/components/HysTabs/useTabsOverlays.js +52 -0
- package/dist/components/HysTabs/useTabsPanels.js +101 -0
- package/dist/components/HysTabs/useTabsPointer.js +131 -0
- package/dist/components/HysTabs/useTabsState.js +263 -0
- package/dist/composables/datePicker.js +153 -94
- package/dist/composables/datePickerModel.js +156 -0
- package/dist/composables/datePickerPanels.js +78 -0
- package/dist/composables/datePickerRules.js +166 -0
- package/dist/composables/floatingPosition.js +32 -13
- package/dist/composables/formLayout.js +20 -42
- package/dist/composables/popupSurfaceStyle.js +30 -0
- package/dist/composables/useContainerWidth.js +24 -0
- package/dist/composables/useDatePicker.js +274 -381
- package/dist/composables/useFloating.js +42 -41
- package/dist/composables/usePageVisibility.js +19 -0
- package/dist/composables/usePopupSurface.js +153 -162
- package/dist/composables/usePopupSurfaceInteractions.js +91 -90
- package/dist/composables/useSplitPaneDrag.js +29 -26
- package/dist/composables/useSvgInstanceId.js +15 -0
- package/dist/composables/useTable.js +321 -306
- package/dist/composables/useTabularRowNavigation.js +46 -0
- package/dist/index.js +229 -185
- package/dist/internal/MultiSplitPane.vue.js +246 -205
- package/dist/internal/PopupSurfacePanel.vue.js +2 -2
- package/dist/internal/PopupSurfacePanel2.vue.js +35 -30
- package/dist/style.css +1 -1
- package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +40 -2
- package/dist/types/components/HysDataGrid/gridColumnLayout.d.ts +22 -0
- package/dist/types/components/HysDataGrid/gridPresentation.d.ts +47 -0
- package/dist/types/components/HysDataGrid/useGridContextMenu.d.ts +14 -0
- package/dist/types/components/HysDatePicker/HysDatePicker.vue.d.ts +6 -9
- package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +12 -0
- package/dist/types/components/HysDatePicker/HysDatePickerPanel.vue.d.ts +6 -0
- package/dist/types/components/HysDateRangePicker/HysDateRangePicker.vue.d.ts +6 -9
- package/dist/types/components/HysDescriptions/HysDescriptions.vue.d.ts +20 -0
- package/dist/types/components/HysDescriptions/descriptionsTypes.d.ts +54 -0
- package/dist/types/components/HysForm/HysForm.vue.d.ts +1 -1
- package/dist/types/components/HysFormItem/HysFormItem.vue.d.ts +1 -1
- package/dist/types/components/HysIcon/HysIcon.vue.d.ts +76 -0
- package/dist/types/components/HysIcon/IconGraphic/IconGraphic.vue.d.ts +43 -0
- package/dist/types/components/HysIcon/IconPickerPanel/IconPickerPanel.vue.d.ts +17 -0
- package/dist/types/components/HysIcon/IconReferenceGraphic/IconReferenceGraphic.vue.d.ts +10 -0
- package/dist/types/components/HysIcon/IconTooltip/IconTooltip.vue.d.ts +11 -0
- package/dist/types/components/HysIcon/builtins/access.d.ts +15 -0
- package/dist/types/components/HysIcon/builtins/actions.d.ts +30 -0
- package/dist/types/components/HysIcon/builtins/business.d.ts +31 -0
- package/dist/types/components/HysIcon/builtins/communication.d.ts +27 -0
- package/dist/types/components/HysIcon/builtins/documents.d.ts +29 -0
- package/dist/types/components/HysIcon/builtins/extendedCatalog.d.ts +2 -0
- package/dist/types/components/HysIcon/builtins/iconInCategory.d.ts +2 -0
- package/dist/types/components/HysIcon/builtins/media.d.ts +24 -0
- package/dist/types/components/HysIcon/builtins/navigation.d.ts +30 -0
- package/dist/types/components/HysIcon/builtins/technology.d.ts +18 -0
- package/dist/types/components/HysIcon/iconBuiltins.d.ts +2 -0
- package/dist/types/components/HysIcon/iconConfig.d.ts +10 -0
- package/dist/types/components/HysIcon/iconRegistry.d.ts +5 -0
- package/dist/types/components/HysIcon/iconSafety.d.ts +8 -0
- package/dist/types/components/HysIcon/iconStyle.d.ts +6 -0
- package/dist/types/components/HysIcon/iconTypes.d.ts +192 -0
- package/dist/types/components/HysIcon/useIconResource.d.ts +14 -0
- package/dist/types/components/HysPopconfirm/HysPopconfirm.vue.d.ts +85 -0
- package/dist/types/components/HysPopconfirm/popconfirmTypes.d.ts +72 -0
- package/dist/types/components/HysPopconfirm/usePopconfirmAction.d.ts +6 -0
- package/dist/types/components/HysProgress/HysProgress.vue.d.ts +1 -1
- package/dist/types/components/HysResult/HysResult.vue.d.ts +22 -0
- package/dist/types/components/HysResult/resultTypes.d.ts +32 -0
- package/dist/types/components/HysSpace/HysSpace.vue.d.ts +15 -0
- package/dist/types/components/HysSpace/spaceItems.d.ts +9 -0
- package/dist/types/components/HysSpace/spaceTypes.d.ts +20 -0
- package/dist/types/components/HysSpin/HysSpin.vue.d.ts +84 -0
- package/dist/types/components/HysSpin/SpinGlyph/SpinGlyph.vue.d.ts +16 -0
- package/dist/types/components/HysSpin/SpinPortal/SpinPortal.vue.d.ts +21 -0
- package/dist/types/components/HysSpin/SpinPortal/spinTarget.d.ts +3 -0
- package/dist/types/components/HysSpin/spinCatalog.d.ts +122 -0
- package/dist/types/components/HysSpin/spinConfig.d.ts +10 -0
- package/dist/types/components/HysSpin/spinService.d.ts +7 -0
- package/dist/types/components/HysSpin/spinStyle.d.ts +5 -0
- package/dist/types/components/HysSpin/spinTypes.d.ts +133 -0
- package/dist/types/components/HysSpin/useHysSpinTask.d.ts +4 -0
- package/dist/types/components/HysSpin/useSpinFullscreen.d.ts +17 -0
- package/dist/types/components/HysSpin/useSpinVisibility.d.ts +10 -0
- package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +25 -2
- package/dist/types/components/HysSplitPane/splitPaneResize.d.ts +17 -0
- package/dist/types/components/HysTabPane/HysTabPane.vue.d.ts +11 -0
- package/dist/types/components/HysTable/HysTable.vue.d.ts +16 -10
- package/dist/types/components/HysTable/tableSearch.d.ts +2 -0
- package/dist/types/components/HysTabs/HysTabs.vue.d.ts +83 -74
- package/dist/types/components/HysTabs/TabsMore/TabsMore.vue.d.ts +14 -0
- package/dist/types/components/HysTabs/TabsPanels/TabsPanels.vue.d.ts +17 -0
- package/dist/types/components/HysTabs/TabsPrompts/TabsPrompts.vue.d.ts +7 -0
- package/dist/types/components/HysTabs/TabsSlot/TabsSlot.d.ts +9 -0
- package/dist/types/components/HysTabs/TabsWorkbench/TabsWorkbench.vue.d.ts +32 -0
- package/dist/types/components/HysTabs/tabsConfig.d.ts +4 -0
- package/dist/types/components/HysTabs/tabsItems.d.ts +14 -0
- package/dist/types/components/HysTabs/tabsPersistence.d.ts +6 -0
- package/dist/types/components/HysTabs/tabsTypes.d.ts +236 -0
- package/dist/types/components/HysTabs/useHysRouteTabs.d.ts +22 -0
- package/dist/types/components/HysTabs/useTabsDragGhost.d.ts +22 -0
- package/dist/types/components/HysTabs/useTabsNav.d.ts +20 -0
- package/dist/types/components/HysTabs/useTabsOverlays.d.ts +54 -0
- package/dist/types/components/HysTabs/useTabsPanels.d.ts +14 -0
- package/dist/types/components/HysTabs/useTabsPointer.d.ts +30 -0
- package/dist/types/components/HysTabs/useTabsState.d.ts +32 -0
- package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +2 -2
- package/dist/types/components/HysToast/toastPresentation.d.ts +1 -1
- package/dist/types/components/HysVirtualTable/HysVirtualTable.vue.d.ts +2 -2
- package/dist/types/composables/dataGrid.d.ts +34 -0
- package/dist/types/composables/datePicker.d.ts +14 -214
- package/dist/types/composables/datePickerModel.d.ts +63 -0
- package/dist/types/composables/datePickerPanels.d.ts +23 -0
- package/dist/types/composables/datePickerRules.d.ts +31 -0
- package/dist/types/composables/datePickerTypes.d.ts +277 -0
- package/dist/types/composables/floatingPosition.d.ts +1 -1
- package/dist/types/composables/formLayout.d.ts +1 -2
- package/dist/types/composables/popupSurfaceStyle.d.ts +7 -0
- package/dist/types/composables/table.d.ts +10 -1
- package/dist/types/composables/toastQueue.d.ts +4 -4
- package/dist/types/composables/toastQueueModel.d.ts +2 -2
- package/dist/types/composables/useColorPicker.d.ts +2 -4
- package/dist/types/composables/useContainerWidth.d.ts +2 -0
- package/dist/types/composables/useContextMenu.d.ts +2 -4
- package/dist/types/composables/useDatePicker.d.ts +20 -11
- package/dist/types/composables/useFloating.d.ts +4 -5
- package/dist/types/composables/usePageVisibility.d.ts +1 -0
- package/dist/types/composables/usePopupSurface.d.ts +9 -3
- package/dist/types/composables/usePopupSurfaceInteractions.d.ts +4 -2
- package/dist/types/composables/useSplitPaneDrag.d.ts +2 -2
- package/dist/types/composables/useSvgInstanceId.d.ts +1 -0
- package/dist/types/composables/useTable.d.ts +2 -0
- package/dist/types/composables/useTabularRowNavigation.d.ts +18 -0
- package/dist/types/index.d.ts +31 -3
- package/dist/types/internal/MultiSplitPane.vue.d.ts +10 -1
- package/dist/types/internal/PopupSurfacePanel.vue.d.ts +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { HysTabItem } from "./tabsTypes";
|
|
2
|
+
interface Point {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function useTabsDragGhost(): {
|
|
7
|
+
ghost: import("vue").ShallowRef<{
|
|
8
|
+
label: string;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
} | undefined, {
|
|
12
|
+
label: string;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
} | undefined>;
|
|
16
|
+
element: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
17
|
+
show: (item: HysTabItem, box: DOMRect, pointer: Point) => void;
|
|
18
|
+
move: (x: number, y: number) => void;
|
|
19
|
+
land: (commit: Promise<boolean> | undefined, target: () => HTMLElement | null | undefined, duration: number, easing: string) => Promise<void>;
|
|
20
|
+
clear: () => void;
|
|
21
|
+
};
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type CSSProperties } from "vue";
|
|
2
|
+
import type { HysTabItem, HysTabsProps, HysTabValue } from "./tabsTypes";
|
|
3
|
+
export declare function useTabsNav(props: () => HysTabsProps, items: () => readonly HysTabItem[], active: () => HysTabValue, vertical: () => boolean, motion: () => boolean, switchTab: (step: number, source: "wheel") => void): {
|
|
4
|
+
nav: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
5
|
+
track: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
6
|
+
before: import("vue").Ref<boolean, boolean>;
|
|
7
|
+
after: import("vue").Ref<boolean, boolean>;
|
|
8
|
+
hasOverflow: import("vue").ComputedRef<boolean>;
|
|
9
|
+
overflowed: import("vue").ShallowRef<HysTabValue[], HysTabValue[]>;
|
|
10
|
+
indicator: import("vue").ShallowRef<CSSProperties, CSSProperties>;
|
|
11
|
+
setButton: (value: HysTabValue, element: HTMLButtonElement | null) => void;
|
|
12
|
+
button: (value: HysTabValue) => HTMLButtonElement | undefined;
|
|
13
|
+
rtl: () => boolean;
|
|
14
|
+
scroll: (direction: number) => void;
|
|
15
|
+
scrollTo: (value?: HysTabValue) => void;
|
|
16
|
+
scrollPixels: (distance: number, smooth?: boolean) => void;
|
|
17
|
+
focus: (value: HysTabValue) => void;
|
|
18
|
+
wheel: (event: WheelEvent) => void;
|
|
19
|
+
schedule: () => void;
|
|
20
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type Component } from "vue";
|
|
2
|
+
import type { HysContextMenuInstance } from "../../composables/menu";
|
|
3
|
+
import type { TabsEmit } from "./tabsTypes";
|
|
4
|
+
export declare function useTabsOverlays(emit: TabsEmit): {
|
|
5
|
+
menu: import("vue").Ref<HysContextMenuInstance<import("../..").HysContextMenuItem> | undefined, HysContextMenuInstance<import("../..").HysContextMenuItem> | undefined>;
|
|
6
|
+
prompts: import("vue").Ref<import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {
|
|
7
|
+
confirm: (items: import("./tabsTypes").HysTabItem[], signal: AbortSignal) => Promise<boolean>;
|
|
8
|
+
rename: (item: import("./tabsTypes").HysTabItem) => Promise<string | boolean>;
|
|
9
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
10
|
+
P: {};
|
|
11
|
+
B: {};
|
|
12
|
+
D: {};
|
|
13
|
+
C: {};
|
|
14
|
+
M: {};
|
|
15
|
+
Defaults: {};
|
|
16
|
+
}, Readonly<{}> & Readonly<{}>, {
|
|
17
|
+
confirm: (items: import("./tabsTypes").HysTabItem[], signal: AbortSignal) => Promise<boolean>;
|
|
18
|
+
rename: (item: import("./tabsTypes").HysTabItem) => Promise<string | boolean>;
|
|
19
|
+
}, {}, {}, {}, {}> | undefined, import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {
|
|
20
|
+
confirm: (items: import("./tabsTypes").HysTabItem[], signal: AbortSignal) => Promise<boolean>;
|
|
21
|
+
rename: (item: import("./tabsTypes").HysTabItem) => Promise<string | boolean>;
|
|
22
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
23
|
+
P: {};
|
|
24
|
+
B: {};
|
|
25
|
+
D: {};
|
|
26
|
+
C: {};
|
|
27
|
+
M: {};
|
|
28
|
+
Defaults: {};
|
|
29
|
+
}, Readonly<{}> & Readonly<{}>, {
|
|
30
|
+
confirm: (items: import("./tabsTypes").HysTabItem[], signal: AbortSignal) => Promise<boolean>;
|
|
31
|
+
rename: (item: import("./tabsTypes").HysTabItem) => Promise<string | boolean>;
|
|
32
|
+
}, {}, {}, {}, {}> | undefined>;
|
|
33
|
+
menuComponent: import("vue").ShallowRef<Component | undefined, Component | undefined>;
|
|
34
|
+
promptComponent: import("vue").ShallowRef<Component | undefined, Component | undefined>;
|
|
35
|
+
showMenu: (point: {
|
|
36
|
+
x: number;
|
|
37
|
+
y: number;
|
|
38
|
+
}) => Promise<void>;
|
|
39
|
+
closeMenu: () => void;
|
|
40
|
+
prompt: () => Promise<import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {
|
|
41
|
+
confirm: (items: import("./tabsTypes").HysTabItem[], signal: AbortSignal) => Promise<boolean>;
|
|
42
|
+
rename: (item: import("./tabsTypes").HysTabItem) => Promise<string | boolean>;
|
|
43
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
44
|
+
P: {};
|
|
45
|
+
B: {};
|
|
46
|
+
D: {};
|
|
47
|
+
C: {};
|
|
48
|
+
M: {};
|
|
49
|
+
Defaults: {};
|
|
50
|
+
}, Readonly<{}> & Readonly<{}>, {
|
|
51
|
+
confirm: (items: import("./tabsTypes").HysTabItem[], signal: AbortSignal) => Promise<boolean>;
|
|
52
|
+
rename: (item: import("./tabsTypes").HysTabItem) => Promise<string | boolean>;
|
|
53
|
+
}, {}, {}, {}, {}> | undefined>;
|
|
54
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { HysTabContent, HysTabItem, HysTabValue, HysTabsProps, TabsEmit } from "./tabsTypes";
|
|
2
|
+
interface Resource {
|
|
3
|
+
state: "loading" | "ready" | "error";
|
|
4
|
+
content?: HysTabContent;
|
|
5
|
+
error?: unknown;
|
|
6
|
+
}
|
|
7
|
+
export declare function useTabsPanels(props: () => HysTabsProps, items: () => readonly HysTabItem[], active: () => HysTabValue, emit: TabsEmit): {
|
|
8
|
+
loaded: import("vue").ShallowReactive<Map<HysTabValue, Resource>>;
|
|
9
|
+
versions: import("vue").Reactive<Map<HysTabValue, number>>;
|
|
10
|
+
render: (item: HysTabItem) => boolean;
|
|
11
|
+
preload: (value: HysTabValue) => Promise<boolean>;
|
|
12
|
+
reload: (value?: HysTabValue) => Promise<boolean>;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { HysTabItem, HysTabsProps, HysTabValue } from "./tabsTypes";
|
|
2
|
+
import type { useTabsNav } from "./useTabsNav";
|
|
3
|
+
export declare function useTabsPointer(props: () => HysTabsProps, nav: ReturnType<typeof useTabsNav>, itemByToken: (token: string) => HysTabItem | undefined, canMove: (item: HysTabItem) => boolean, move: (value: HysTabValue, target: HysTabValue, after: boolean) => Promise<boolean>, isVertical: () => boolean, longpress: (item: HysTabItem, event: PointerEvent) => void, swipe: (step: number) => void, animated: () => boolean): {
|
|
4
|
+
dragging: import("vue").Ref<HysTabValue | undefined, HysTabValue | undefined>;
|
|
5
|
+
drop: import("vue").Ref<{
|
|
6
|
+
value: HysTabValue;
|
|
7
|
+
after: boolean;
|
|
8
|
+
} | undefined, {
|
|
9
|
+
value: HysTabValue;
|
|
10
|
+
after: boolean;
|
|
11
|
+
} | undefined>;
|
|
12
|
+
ghost: import("vue").ShallowRef<{
|
|
13
|
+
label: string;
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
} | undefined, {
|
|
17
|
+
label: string;
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
} | undefined>;
|
|
21
|
+
ghostElement: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
22
|
+
down: (event: PointerEvent) => void;
|
|
23
|
+
motion: (event: PointerEvent) => void;
|
|
24
|
+
finish: (event?: PointerEvent, cancelled?: boolean) => void;
|
|
25
|
+
cancel: (event: PointerEvent) => void;
|
|
26
|
+
clickCapture: (event: MouseEvent) => void;
|
|
27
|
+
swipeDown: (event: PointerEvent) => void;
|
|
28
|
+
swipeUp: (event: PointerEvent) => void;
|
|
29
|
+
cancelSwipe: () => void;
|
|
30
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { HysTabCloseScope, HysTabItem, HysTabSource, HysTabsProps, HysTabValue, TabsEmit } from "./tabsTypes";
|
|
2
|
+
type Options = () => HysTabsProps;
|
|
3
|
+
export interface ClosedTab {
|
|
4
|
+
item: HysTabItem;
|
|
5
|
+
index: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function useTabsState(props: Options, declared: () => readonly HysTabItem[], declarative: () => boolean, emit: TabsEmit, confirmDirty: (items: HysTabItem[], signal: AbortSignal) => Promise<boolean>): {
|
|
8
|
+
all: import("vue").ComputedRef<HysTabItem[]>;
|
|
9
|
+
visible: import("vue").ComputedRef<HysTabItem[]>;
|
|
10
|
+
byKey: import("vue").ComputedRef<Map<HysTabValue, HysTabItem>>;
|
|
11
|
+
enabled: import("vue").ComputedRef<HysTabItem[]>;
|
|
12
|
+
active: import("vue").ComputedRef<HysTabValue>;
|
|
13
|
+
current: import("vue").Ref<HysTabValue | undefined, HysTabValue | undefined>;
|
|
14
|
+
pending: import("vue").Ref<boolean, boolean>;
|
|
15
|
+
closing: import("vue").Reactive<Set<HysTabValue>>;
|
|
16
|
+
recent: import("vue").ShallowRef<HysTabValue[], HysTabValue[]>;
|
|
17
|
+
closed: import("vue").ShallowRef<ClosedTab[], ClosedTab[]>;
|
|
18
|
+
select: (value: HysTabValue, source?: HysTabSource) => Promise<boolean>;
|
|
19
|
+
add: (item?: HysTabItem) => Promise<boolean>;
|
|
20
|
+
write: (items: HysTabItem[]) => void;
|
|
21
|
+
canClose: (item: HysTabItem | undefined) => boolean;
|
|
22
|
+
canMove: (item: HysTabItem | undefined) => boolean;
|
|
23
|
+
canEdit: () => boolean;
|
|
24
|
+
rename: (value: HysTabValue, name: string) => Promise<boolean>;
|
|
25
|
+
pin: (value: HysTabValue, pinned?: boolean) => Promise<boolean>;
|
|
26
|
+
favorite: (value: HysTabValue, favorite?: boolean) => Promise<boolean>;
|
|
27
|
+
move: (value: HysTabValue, target: HysTabValue, after?: boolean) => Promise<boolean>;
|
|
28
|
+
restore: () => Promise<boolean>;
|
|
29
|
+
closeMany: (scope: HysTabCloseScope | readonly HysTabValue[], anchor?: HysTabValue) => Promise<HysTabValue[]>;
|
|
30
|
+
close: (value?: HysTabValue) => Promise<boolean>;
|
|
31
|
+
};
|
|
32
|
+
export {};
|
|
@@ -25,8 +25,8 @@ declare const __VLS_base: import("vue").DefineComponent<HysTagInputProps, {
|
|
|
25
25
|
invalid: (info: HysTagInputInvalid) => any;
|
|
26
26
|
reject: (value: string) => any;
|
|
27
27
|
remove: (value: string) => any;
|
|
28
|
-
acceptedChange: (values: string[]) => any;
|
|
29
28
|
reorder: (from: number, to: number, values: string[]) => any;
|
|
29
|
+
acceptedChange: (values: string[]) => any;
|
|
30
30
|
}, string, import("vue").PublicProps, Readonly<HysTagInputProps> & Readonly<{
|
|
31
31
|
onChange?: ((values: string[]) => any) | undefined;
|
|
32
32
|
"onUpdate:modelValue"?: ((values: string[]) => any) | undefined;
|
|
@@ -39,8 +39,8 @@ declare const __VLS_base: import("vue").DefineComponent<HysTagInputProps, {
|
|
|
39
39
|
onInvalid?: ((info: HysTagInputInvalid) => any) | undefined;
|
|
40
40
|
onReject?: ((value: string) => any) | undefined;
|
|
41
41
|
onRemove?: ((value: string) => any) | undefined;
|
|
42
|
-
onAcceptedChange?: ((values: string[]) => any) | undefined;
|
|
43
42
|
onReorder?: ((from: number, to: number, values: string[]) => any) | undefined;
|
|
43
|
+
onAcceptedChange?: ((values: string[]) => any) | undefined;
|
|
44
44
|
}>, {
|
|
45
45
|
modelValue: readonly string[];
|
|
46
46
|
trim: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CSSProperties } from "vue";
|
|
2
2
|
import type { HysToastLocale, HysToastPosition, HysToastPresentation } from "./toastTypes";
|
|
3
3
|
export declare const toastLocale: HysToastLocale;
|
|
4
|
-
export declare function normalizeToastPosition(position?: HysToastPosition): "center" | "top-right" | "top-left" | "bottom-right" | "bottom-left" | "
|
|
4
|
+
export declare function normalizeToastPosition(position?: HysToastPosition): "center" | "top-right" | "top-left" | "bottom-right" | "bottom-left" | "custom" | "top-center" | "bottom-center";
|
|
5
5
|
export declare const finite: (value: number | undefined, fallback: number) => number;
|
|
6
6
|
export declare const toastDuration: (options: HysToastPresentation) => number;
|
|
7
7
|
export declare function toastPlacement(options: HysToastPresentation): CSSProperties;
|
|
@@ -5,11 +5,11 @@ declare const __VLS_export: <T extends object = Record<string, unknown>>(__VLS_p
|
|
|
5
5
|
onSelectionChange?: ((keys: HysVirtualTableKey[], rows: T[]) => any) | undefined;
|
|
6
6
|
onRowClick?: ((row: T, index: number, event: MouseEvent) => any) | undefined;
|
|
7
7
|
"onUpdate:selectedRowKeys"?: ((keys: HysVirtualTableKey[]) => any) | undefined;
|
|
8
|
-
onSortChange?: ((sort: HysVirtualTableSort | null) => any) | undefined;
|
|
9
8
|
"onUpdate:currentRowKey"?: ((key: HysVirtualTableKey | null) => any) | undefined;
|
|
10
9
|
onCurrentChange?: ((row: T | null, key: HysVirtualTableKey | null) => any) | undefined;
|
|
11
10
|
onRowDblclick?: ((row: T, index: number, event: MouseEvent) => any) | undefined;
|
|
12
11
|
onCellClick?: ((context: HysVirtualTableCell<T>, event: MouseEvent) => any) | undefined;
|
|
12
|
+
onSortChange?: ((sort: HysVirtualTableSort | null) => any) | undefined;
|
|
13
13
|
"onUpdate:sortState"?: ((sort: HysVirtualTableSort | null) => any) | undefined;
|
|
14
14
|
onRangeChange?: ((range: HysVirtualTableRange) => any) | undefined;
|
|
15
15
|
onEndReached?: ((info: {
|
|
@@ -60,7 +60,7 @@ declare const __VLS_export: <T extends object = Record<string, unknown>>(__VLS_p
|
|
|
60
60
|
selectedRowKeys: HysVirtualTableKey[];
|
|
61
61
|
}): any;
|
|
62
62
|
};
|
|
63
|
-
emit: ((evt: "scroll", state: HysVirtualTableScroll) => void) & ((evt: "selectionChange", keys: HysVirtualTableKey[], rows: T[]) => void) & ((evt: "rowClick", row: T, index: number, event: MouseEvent) => void) & ((evt: "update:selectedRowKeys", keys: HysVirtualTableKey[]) => void) & ((evt: "
|
|
63
|
+
emit: ((evt: "scroll", state: HysVirtualTableScroll) => void) & ((evt: "selectionChange", keys: HysVirtualTableKey[], rows: T[]) => void) & ((evt: "rowClick", row: T, index: number, event: MouseEvent) => void) & ((evt: "update:selectedRowKeys", keys: HysVirtualTableKey[]) => void) & ((evt: "update:currentRowKey", key: HysVirtualTableKey | null) => void) & ((evt: "currentChange", row: T | null, key: HysVirtualTableKey | null) => void) & ((evt: "rowDblclick", row: T, index: number, event: MouseEvent) => void) & ((evt: "cellClick", context: HysVirtualTableCell<T>, event: MouseEvent) => void) & ((evt: "sortChange", sort: HysVirtualTableSort | null) => void) & ((evt: "update:sortState", sort: HysVirtualTableSort | null) => void) & ((evt: "rangeChange", range: HysVirtualTableRange) => void) & ((evt: "endReached", info: {
|
|
64
64
|
distance: number;
|
|
65
65
|
total: number;
|
|
66
66
|
}) => void);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { HysPopupMotionProps } from "../motion/popup";
|
|
2
|
+
import type { HysDataGridColumnLayout, HysDataGridColumnLayoutSnapshot } from "../components/HysDataGrid/gridColumnLayout";
|
|
3
|
+
import type { HysDataGridCellContext, HysDataGridClass, HysDataGridContextMenu, HysDataGridHeaderContext, HysDataGridHeaderGroup, HysDataGridPin, HysDataGridRowContext, HysDataGridStyle } from "../components/HysDataGrid/gridPresentation";
|
|
2
4
|
export type HysDataGridKey = string | number;
|
|
3
5
|
export type HysDataGridSort = {
|
|
4
6
|
key: string;
|
|
@@ -26,7 +28,11 @@ export interface GridColumn<T extends object = Record<string, unknown>> {
|
|
|
26
28
|
resizable?: boolean;
|
|
27
29
|
reorderable?: boolean;
|
|
28
30
|
pinned?: "left" | "right";
|
|
31
|
+
pinnable?: boolean;
|
|
29
32
|
align?: "left" | "center" | "right";
|
|
33
|
+
headerAlign?: "left" | "center" | "right";
|
|
34
|
+
headerWrap?: boolean;
|
|
35
|
+
group?: HysDataGridHeaderGroup;
|
|
30
36
|
summary?: "sum" | "avg" | "min" | "max" | "count";
|
|
31
37
|
editable?: boolean;
|
|
32
38
|
}
|
|
@@ -64,14 +70,35 @@ export interface HysDataGridProps<T extends object> extends HysPopupMotionProps
|
|
|
64
70
|
maxHeight?: number | string;
|
|
65
71
|
scrollToTopOnQuery?: boolean;
|
|
66
72
|
groupable?: boolean;
|
|
73
|
+
groupBy?: string;
|
|
74
|
+
defaultGroupBy?: string;
|
|
75
|
+
groupSummary?: boolean;
|
|
67
76
|
showSummary?: boolean;
|
|
77
|
+
summaryScope?: "filtered" | "page" | "selected";
|
|
68
78
|
summaryMethod?: (column: GridColumn<T>, rows: readonly T[]) => string | number;
|
|
69
79
|
treeMode?: boolean;
|
|
70
80
|
parentKey?: string;
|
|
71
81
|
editable?: boolean;
|
|
82
|
+
keyboardNavigation?: boolean;
|
|
83
|
+
caption?: string;
|
|
84
|
+
striped?: boolean;
|
|
85
|
+
highlightCurrentRow?: boolean;
|
|
86
|
+
currentRowKey?: HysDataGridKey | null;
|
|
87
|
+
defaultCurrentRowKey?: HysDataGridKey;
|
|
88
|
+
rowClassName?: HysDataGridClass<HysDataGridRowContext<T>>;
|
|
89
|
+
rowStyle?: HysDataGridStyle<HysDataGridRowContext<T>>;
|
|
90
|
+
cellClassName?: HysDataGridClass<HysDataGridCellContext<T>>;
|
|
91
|
+
cellStyle?: HysDataGridStyle<HysDataGridCellContext<T>>;
|
|
92
|
+
headerClassName?: HysDataGridClass<HysDataGridHeaderContext<T>>;
|
|
93
|
+
headerStyle?: HysDataGridStyle<HysDataGridHeaderContext<T>>;
|
|
94
|
+
contextMenu?: HysDataGridContextMenu<T>;
|
|
72
95
|
}
|
|
73
96
|
export interface HysDataGridInstance {
|
|
74
97
|
resetColumns(): void;
|
|
98
|
+
getColumnLayout(): HysDataGridColumnLayoutSnapshot;
|
|
99
|
+
applyColumnLayout(layout: HysDataGridColumnLayout): void;
|
|
100
|
+
setGroupBy(key: string): void;
|
|
101
|
+
setGroupsExpanded(expanded: boolean): void;
|
|
75
102
|
getQuery(): HysDataGridQuery;
|
|
76
103
|
setQuery(query: Partial<HysDataGridQuery>): void;
|
|
77
104
|
resetQuery(): void;
|
|
@@ -81,6 +108,13 @@ export interface HysDataGridInstance {
|
|
|
81
108
|
toggleRowSelection(key: HysDataGridKey, checked?: boolean): void;
|
|
82
109
|
scrollTo(options: ScrollToOptions): void;
|
|
83
110
|
scrollToRow(key: HysDataGridKey): boolean;
|
|
111
|
+
focusRow(key: HysDataGridKey): boolean;
|
|
112
|
+
getCurrentRowKey(): HysDataGridKey | null;
|
|
113
|
+
setCurrentRow(key: HysDataGridKey | null): void;
|
|
114
|
+
setColumnVisibility(key: string, visible: boolean): boolean;
|
|
115
|
+
pinColumn(key: string, side: HysDataGridPin | null): boolean;
|
|
116
|
+
resizeColumn(key: string, width: number): boolean;
|
|
117
|
+
resetColumnWidth(key: string): boolean;
|
|
84
118
|
}
|
|
85
119
|
export type GridRow<T extends object> = {
|
|
86
120
|
row: T;
|
|
@@ -1,218 +1,16 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
import type { Placement } from "./useFloating";
|
|
4
|
-
export type HysDateScalar = string | Date | number;
|
|
5
|
-
export type HysDatePickerValue = HysDateScalar | readonly (HysDateScalar | null)[] | null;
|
|
6
|
-
export type HysDateRangeValue = readonly [HysDateScalar | null, HysDateScalar | null] | null;
|
|
7
|
-
export type HysDatePickerType = "date" | "dates" | "week" | "weeks" | "month" | "months" | "quarter" | "quarters" | "year" | "years" | "datetime";
|
|
8
|
-
export type HysDatePickerView = "date" | "month" | "quarter" | "year";
|
|
9
|
-
export type HysDatePickerUnit = "date" | "week" | "month" | "quarter" | "year";
|
|
10
|
-
export interface HysDatePoint {
|
|
11
|
-
day: number;
|
|
12
|
-
second: number;
|
|
13
|
-
}
|
|
14
|
-
export interface HysDatePickerContext {
|
|
15
|
-
range: "start" | "end";
|
|
16
|
-
from: Date | null;
|
|
17
|
-
iso: string;
|
|
18
|
-
}
|
|
19
|
-
export interface HysDateDisabledTime {
|
|
20
|
-
hours?: readonly number[];
|
|
21
|
-
minutes?: (hour: number) => readonly number[];
|
|
22
|
-
seconds?: (hour: number, minute: number) => readonly number[];
|
|
23
|
-
}
|
|
24
|
-
export interface HysDateShortcut {
|
|
25
|
-
label: string;
|
|
26
|
-
value: HysDatePickerValue | (() => HysDatePickerValue);
|
|
27
|
-
disabled?: boolean;
|
|
28
|
-
}
|
|
29
|
-
export interface HysDatePickerCell {
|
|
30
|
-
date: Date;
|
|
31
|
-
iso: string;
|
|
32
|
-
value: number;
|
|
33
|
-
end: number;
|
|
34
|
-
text: string;
|
|
35
|
-
type: HysDatePickerView;
|
|
36
|
-
outside: boolean;
|
|
37
|
-
disabled: boolean;
|
|
38
|
-
selected: boolean;
|
|
39
|
-
inRange: boolean;
|
|
40
|
-
today: boolean;
|
|
41
|
-
week: number;
|
|
42
|
-
weekYear: number;
|
|
43
|
-
weekStart: string;
|
|
44
|
-
weekEnd: string;
|
|
45
|
-
}
|
|
46
|
-
export interface HysDatePickerWeek {
|
|
47
|
-
year: number;
|
|
48
|
-
week: number;
|
|
49
|
-
start: string;
|
|
50
|
-
end: string;
|
|
51
|
-
dates: readonly string[];
|
|
52
|
-
}
|
|
53
|
-
export interface HysDatePickerChange {
|
|
54
|
-
source: "date" | "time" | "input" | "shortcut" | "clear" | "confirm" | "api";
|
|
55
|
-
dates: readonly (Date | null)[];
|
|
56
|
-
formatted: readonly string[];
|
|
57
|
-
weeks?: readonly (HysDatePickerWeek | null)[];
|
|
58
|
-
}
|
|
59
|
-
export interface HysDatePickerLocale {
|
|
60
|
-
today: string;
|
|
61
|
-
now: string;
|
|
62
|
-
clear: string;
|
|
63
|
-
cancel: string;
|
|
64
|
-
close: string;
|
|
65
|
-
confirm: string;
|
|
66
|
-
start: string;
|
|
67
|
-
end: string;
|
|
68
|
-
chooseStart: string;
|
|
69
|
-
chooseEnd: string;
|
|
70
|
-
invalid: string;
|
|
71
|
-
week: string;
|
|
72
|
-
year: string;
|
|
73
|
-
month: string;
|
|
74
|
-
back: string;
|
|
75
|
-
prevMonth: string;
|
|
76
|
-
nextMonth: string;
|
|
77
|
-
prevYear: string;
|
|
78
|
-
nextYear: string;
|
|
79
|
-
hour: string;
|
|
80
|
-
minute: string;
|
|
81
|
-
second: string;
|
|
82
|
-
empty: string;
|
|
83
|
-
limit: string;
|
|
84
|
-
}
|
|
85
|
-
export interface HysDatePickerProps<V extends HysDatePickerValue = HysDatePickerValue> {
|
|
86
|
-
popupTransition?: HysPopupTransition;
|
|
87
|
-
popupTransitionDuration?: number;
|
|
88
|
-
modelValue?: V;
|
|
89
|
-
defaultValue?: V;
|
|
90
|
-
clearValue?: V;
|
|
91
|
-
type?: HysDatePickerType;
|
|
92
|
-
valueType?: "string" | "date" | "timestamp";
|
|
93
|
-
valueFormat?: string;
|
|
94
|
-
format?: string;
|
|
95
|
-
inputFormats?: readonly string[];
|
|
96
|
-
disabled?: boolean | readonly [boolean, boolean];
|
|
97
|
-
readonly?: boolean;
|
|
98
|
-
size?: "sm" | "md" | "lg";
|
|
99
|
-
status?: "error" | "warning" | "success";
|
|
100
|
-
bordered?: boolean;
|
|
101
|
-
placeholder?: string;
|
|
102
|
-
label?: string;
|
|
103
|
-
ariaLabel?: string;
|
|
104
|
-
name?: string | readonly [string, string];
|
|
105
|
-
form?: string;
|
|
106
|
-
autofocus?: boolean;
|
|
107
|
-
min?: HysDateScalar;
|
|
108
|
-
max?: HysDateScalar;
|
|
109
|
-
disabledDate?: (date: Date, context: HysDatePickerContext) => boolean;
|
|
110
|
-
disabledTime?: (date: Date, context: HysDatePickerContext) => HysDateDisabledTime;
|
|
111
|
-
firstDayOfWeek?: number;
|
|
112
|
-
firstWeekContainsDate?: number;
|
|
113
|
-
weekNumberFormatter?: (week: HysDatePickerWeek) => string;
|
|
114
|
-
disabledWeek?: (week: HysDatePickerWeek) => boolean;
|
|
115
|
-
weekValidation?: "any" | "full";
|
|
116
|
-
locale?: string;
|
|
117
|
-
messages?: Partial<HysDatePickerLocale>;
|
|
118
|
-
showWeekNumbers?: boolean;
|
|
119
|
-
showAdjacentDays?: boolean;
|
|
120
|
-
defaultPickerValue?: HysDateScalar;
|
|
121
|
-
panelValue?: HysDateScalar;
|
|
122
|
-
mode?: HysDatePickerView;
|
|
123
|
-
defaultMode?: HysDatePickerView;
|
|
124
|
-
shortcuts?: readonly HysDateShortcut[];
|
|
125
|
-
clearable?: boolean;
|
|
126
|
-
editable?: boolean;
|
|
127
|
-
inputReadonly?: boolean;
|
|
128
|
-
showOnFocus?: boolean;
|
|
129
|
-
showToday?: boolean;
|
|
130
|
-
showNow?: boolean;
|
|
131
|
-
showFooter?: boolean;
|
|
132
|
-
showConfirm?: boolean;
|
|
133
|
-
showTime?: boolean;
|
|
134
|
-
defaultTime?: string | readonly [string, string];
|
|
135
|
-
hourStep?: number;
|
|
136
|
-
minuteStep?: number;
|
|
137
|
-
secondStep?: number;
|
|
138
|
-
showSeconds?: boolean;
|
|
139
|
-
rangeSeparator?: string;
|
|
140
|
-
startPlaceholder?: string;
|
|
141
|
-
endPlaceholder?: string;
|
|
142
|
-
allowEmpty?: readonly [boolean, boolean];
|
|
143
|
-
singlePanel?: boolean;
|
|
144
|
-
unlinkPanels?: boolean;
|
|
145
|
-
minRangeDays?: number;
|
|
146
|
-
maxRangeDays?: number;
|
|
147
|
-
rangeValidation?: "endpoints" | "continuous";
|
|
148
|
-
maxDates?: number;
|
|
149
|
-
open?: boolean;
|
|
150
|
-
defaultOpen?: boolean;
|
|
151
|
-
inline?: boolean;
|
|
152
|
-
placement?: Placement;
|
|
153
|
-
appendTo?: string | HTMLElement | false;
|
|
154
|
-
popupWidth?: number | string;
|
|
155
|
-
popupClass?: string;
|
|
156
|
-
popupStyle?: CSSProperties;
|
|
157
|
-
validateEvent?: boolean;
|
|
158
|
-
cellClassName?: (cell: HysDatePickerCell) => string;
|
|
159
|
-
}
|
|
160
|
-
export interface HysDateRangePickerProps<V extends HysDatePickerValue = HysDateRangeValue> extends HysDatePickerProps<V> {
|
|
161
|
-
}
|
|
162
|
-
export interface HysDatePickerInstance<V extends HysDatePickerValue = HysDatePickerValue> {
|
|
163
|
-
readonly element: HTMLElement | undefined;
|
|
164
|
-
readonly open: boolean;
|
|
165
|
-
readonly value: V;
|
|
166
|
-
readonly draft: readonly (Date | null)[];
|
|
167
|
-
focus: () => void;
|
|
168
|
-
blur: () => void;
|
|
169
|
-
show: () => Promise<boolean>;
|
|
170
|
-
hide: (restoreFocus?: boolean) => void;
|
|
171
|
-
handleOpen: () => Promise<boolean>;
|
|
172
|
-
handleClose: () => void;
|
|
173
|
-
clear: () => Promise<boolean>;
|
|
174
|
-
setValue: (value: V) => Promise<boolean>;
|
|
175
|
-
confirm: () => Promise<boolean>;
|
|
176
|
-
cancel: () => void;
|
|
177
|
-
showMonth: (value: HysDateScalar) => Promise<boolean>;
|
|
178
|
-
setMode: (view: HysDatePickerView) => boolean;
|
|
179
|
-
}
|
|
180
|
-
export interface HysDatePickerSlots {
|
|
181
|
-
"week-number"?: (week: HysDatePickerWeek & {
|
|
182
|
-
selected: boolean;
|
|
183
|
-
disabled: boolean;
|
|
184
|
-
}) => any;
|
|
185
|
-
default?: (cell: HysDatePickerCell) => any;
|
|
186
|
-
cell?: (cell: HysDatePickerCell) => any;
|
|
187
|
-
prefix?: () => any;
|
|
188
|
-
suffix?: () => any;
|
|
189
|
-
"clear-icon"?: () => any;
|
|
190
|
-
"prev-month"?: () => any;
|
|
191
|
-
"next-month"?: () => any;
|
|
192
|
-
"prev-year"?: () => any;
|
|
193
|
-
"next-year"?: () => any;
|
|
194
|
-
header?: (context: {
|
|
195
|
-
dates: readonly (Date | null)[];
|
|
196
|
-
view: HysDatePickerView;
|
|
197
|
-
}) => any;
|
|
198
|
-
footer?: (context: {
|
|
199
|
-
dates: readonly (Date | null)[];
|
|
200
|
-
confirm: () => Promise<boolean>;
|
|
201
|
-
cancel: () => void;
|
|
202
|
-
clear: () => Promise<boolean>;
|
|
203
|
-
}) => any;
|
|
204
|
-
shortcut?: (context: {
|
|
205
|
-
shortcut: HysDateShortcut;
|
|
206
|
-
index: number;
|
|
207
|
-
}) => any;
|
|
208
|
-
"range-separator"?: () => any;
|
|
209
|
-
}
|
|
210
|
-
export type HysDateRangePickerInstance<V extends HysDatePickerValue = HysDateRangeValue> = HysDatePickerInstance<V>;
|
|
1
|
+
import type { HysDatePickerLocale, HysDatePickerUnit, HysDatePickerValue, HysDatePickerWeek, HysDatePoint } from "./datePickerTypes";
|
|
2
|
+
export type * from "./datePickerTypes";
|
|
211
3
|
export declare const datePickerDefaults: {
|
|
212
4
|
readonly open: undefined;
|
|
213
5
|
readonly showConfirm: undefined;
|
|
214
6
|
readonly type: "date";
|
|
215
7
|
readonly clearable: false;
|
|
8
|
+
readonly allowClear: undefined;
|
|
9
|
+
readonly automaticDropdown: undefined;
|
|
10
|
+
readonly showWeekNumber: undefined;
|
|
11
|
+
readonly use12Hours: undefined;
|
|
12
|
+
readonly hideDisabledOptions: undefined;
|
|
13
|
+
readonly teleported: undefined;
|
|
216
14
|
readonly editable: false;
|
|
217
15
|
readonly bordered: true;
|
|
218
16
|
readonly firstDayOfWeek: 1;
|
|
@@ -234,15 +32,17 @@ export declare const datePickerDefaults: {
|
|
|
234
32
|
export declare const datePickerWords: HysDatePickerLocale;
|
|
235
33
|
export declare const datePickerEnglish: HysDatePickerLocale;
|
|
236
34
|
export declare const DATE_MIN: number, DATE_MAX: number;
|
|
237
|
-
export declare const
|
|
35
|
+
export declare const dateRange: (type: string | undefined) => boolean;
|
|
36
|
+
export declare function dateUnit(type: string | undefined): HysDatePickerUnit;
|
|
238
37
|
export declare const dateMultiple: (type: string | undefined) => boolean;
|
|
239
38
|
export declare function datePattern(type: string | undefined, time?: boolean): "YYYY-MM-DD" | "YYYY" | "YYYY-MM-DD HH:mm:ss" | "YYYY-MM" | "YYYY-[Q]Q";
|
|
240
39
|
export declare function datePeriod(day: number, unit: HysDatePickerUnit, first?: number): [number, number];
|
|
241
40
|
export declare function dateTimeString(second: number): string;
|
|
242
|
-
export declare function dateTimeSeconds(value: string | undefined): number;
|
|
41
|
+
export declare function dateTimeSeconds(value: string | Date | undefined): number;
|
|
243
42
|
export declare function dateWeek(day: number, first?: number, contains?: number): HysDatePickerWeek;
|
|
244
|
-
export declare function dateFormat(point: HysDatePoint, pattern: string, first?: number, contains?: number): string;
|
|
245
|
-
export declare function datePoint(value: unknown, pattern?: string, first?: number, contains?: number): HysDatePoint | undefined;
|
|
43
|
+
export declare function dateFormat(point: HysDatePoint, pattern: string, first?: number, contains?: number, locale?: string): string;
|
|
44
|
+
export declare function datePoint(value: unknown, pattern?: string, first?: number, contains?: number, locale?: string): HysDatePoint | undefined;
|
|
45
|
+
export declare function dateClockPoint(value: string, format: string): HysDatePoint | undefined;
|
|
246
46
|
export declare function dateNative(point: HysDatePoint): Date;
|
|
247
47
|
export declare function dateEqual(a: HysDatePickerValue | undefined, b: HysDatePickerValue | undefined): boolean;
|
|
248
48
|
export declare function dateClone<V extends HysDatePickerValue>(value: V): V;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { type ComputedRef } from "vue";
|
|
2
|
+
import { type HysDateDisplayFormat, type HysDatePickerProps, type HysDatePickerValue, type HysDatePoint } from "./datePicker";
|
|
3
|
+
export declare function useDatePickerModel(props: HysDatePickerProps, range: ComputedRef<boolean>): {
|
|
4
|
+
time: ComputedRef<boolean>;
|
|
5
|
+
rangeDefaultTime: ComputedRef<boolean>;
|
|
6
|
+
unit: ComputedRef<import("./datePickerTypes").HysDatePickerUnit>;
|
|
7
|
+
multiple: ComputedRef<boolean>;
|
|
8
|
+
first: ComputedRef<number>;
|
|
9
|
+
weekContains: ComputedRef<number>;
|
|
10
|
+
pattern: ComputedRef<string>;
|
|
11
|
+
displayPattern: ComputedRef<HysDateDisplayFormat>;
|
|
12
|
+
words: ComputedRef<{
|
|
13
|
+
today: string;
|
|
14
|
+
now: string;
|
|
15
|
+
clear: string;
|
|
16
|
+
cancel: string;
|
|
17
|
+
close: string;
|
|
18
|
+
confirm: string;
|
|
19
|
+
start: string;
|
|
20
|
+
end: string;
|
|
21
|
+
chooseStart: string;
|
|
22
|
+
chooseEnd: string;
|
|
23
|
+
invalid: string;
|
|
24
|
+
week: string;
|
|
25
|
+
year: string;
|
|
26
|
+
month: string;
|
|
27
|
+
back: string;
|
|
28
|
+
prevMonth: string;
|
|
29
|
+
nextMonth: string;
|
|
30
|
+
prevYear: string;
|
|
31
|
+
nextYear: string;
|
|
32
|
+
hour: string;
|
|
33
|
+
minute: string;
|
|
34
|
+
second: string;
|
|
35
|
+
empty: string;
|
|
36
|
+
limit: string;
|
|
37
|
+
}>;
|
|
38
|
+
model: {
|
|
39
|
+
current: ComputedRef<HysDatePickerValue>;
|
|
40
|
+
commit: (value: HysDatePickerValue, update: (value: HysDatePickerValue) => void, change: (value: HysDatePickerValue) => void, notifyOnRequest?: boolean) => Promise<boolean>;
|
|
41
|
+
reset: () => void;
|
|
42
|
+
invalidate: () => void;
|
|
43
|
+
isLive: () => boolean;
|
|
44
|
+
};
|
|
45
|
+
current: ComputedRef<HysDatePickerValue>;
|
|
46
|
+
outputType: ComputedRef<"string" | "date" | "timestamp">;
|
|
47
|
+
parse: (value: unknown) => HysDatePoint | undefined;
|
|
48
|
+
boundary: (value: unknown) => HysDatePoint | undefined;
|
|
49
|
+
normalize: (point: HysDatePoint) => {
|
|
50
|
+
day: number;
|
|
51
|
+
second: number;
|
|
52
|
+
};
|
|
53
|
+
isEmpty: (value: HysDatePickerValue | undefined) => boolean;
|
|
54
|
+
points: (value?: HysDatePickerValue | undefined) => (HysDatePoint | null)[];
|
|
55
|
+
selected: ComputedRef<(HysDatePoint | null)[]>;
|
|
56
|
+
minPoint: ComputedRef<HysDatePoint | undefined>;
|
|
57
|
+
maxPoint: ComputedRef<HysDatePoint | undefined>;
|
|
58
|
+
encodePoint: (point: HysDatePoint) => string | number | Date;
|
|
59
|
+
encode: (list: readonly (HysDatePoint | null)[]) => HysDatePickerValue;
|
|
60
|
+
empty: () => HysDatePickerValue;
|
|
61
|
+
describe: (list?: (HysDatePoint | null)[]) => string[];
|
|
62
|
+
markClear: (value: HysDatePickerValue) => void;
|
|
63
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
import { type HysDatePickerProps, type HysDatePickerUnit, type HysDatePickerView, type HysDatePoint } from "./datePicker";
|
|
3
|
+
interface DatePickerPanels {
|
|
4
|
+
props: HysDatePickerProps;
|
|
5
|
+
unit: Readonly<Ref<HysDatePickerUnit>>;
|
|
6
|
+
range: Readonly<Ref<boolean>>;
|
|
7
|
+
time: Readonly<Ref<boolean>>;
|
|
8
|
+
selected: Readonly<Ref<readonly (HysDatePoint | null)[]>>;
|
|
9
|
+
minPoint: Readonly<Ref<HysDatePoint | undefined>>;
|
|
10
|
+
maxPoint: Readonly<Ref<HysDatePoint | undefined>>;
|
|
11
|
+
boundary: (value: unknown) => HysDatePoint | undefined;
|
|
12
|
+
encodePoint: (point: HysDatePoint) => string | number | Date;
|
|
13
|
+
emit: (name: string, ...args: any[]) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function useDatePickerPanels({ props, unit, range, time, selected, minPoint, maxPoint, boundary, encodePoint, emit, }: DatePickerPanels): {
|
|
16
|
+
currentView: import("vue").ComputedRef<HysDatePickerView>;
|
|
17
|
+
rightView: Ref<HysDatePickerView, HysDatePickerView>;
|
|
18
|
+
panels: import("vue").ComputedRef<number[]>;
|
|
19
|
+
resetPanels: (today: number) => void;
|
|
20
|
+
setPanel: (day: number, index?: number) => boolean;
|
|
21
|
+
setMode: (mode: HysDatePickerView, index?: number) => boolean;
|
|
22
|
+
};
|
|
23
|
+
export {};
|