@skyservice-developers/vue-dev-kit 2.11.0 → 2.13.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.
Files changed (47) hide show
  1. package/README.md +229 -39
  2. package/dist/features/data-table/SkyDataTable.vue.d.ts +210 -0
  3. package/dist/features/data-table/SkyDataTableColumnToggle.vue.d.ts +36 -0
  4. package/dist/features/data-table/index.d.ts +2 -0
  5. package/dist/features/index.d.ts +2 -0
  6. package/dist/features/table/TableColumnSettings.vue.d.ts +31 -0
  7. package/dist/features/table/TableMassActions.vue.d.ts +56 -0
  8. package/dist/features/table/TableVirtualBody.vue.d.ts +65 -0
  9. package/dist/features/table/index.d.ts +3 -0
  10. package/dist/index.d.ts +1 -0
  11. package/dist/shared/lib/table/index.d.ts +8 -0
  12. package/dist/shared/lib/table/tableFeatures.d.ts +110 -0
  13. package/dist/shared/lib/table/useColumnVisibility.d.ts +29 -0
  14. package/dist/shared/lib/table/useTableSelection.d.ts +34 -0
  15. package/dist/shared/lib/table/useTableSort.d.ts +28 -0
  16. package/dist/shared/ui/Modal/Modal.vue.d.ts +2 -0
  17. package/dist/shared/ui/SkyDateRangePicker/SkyDateRangePicker.vue.d.ts +749 -0
  18. package/dist/shared/ui/SkyDateRangePicker/index.d.ts +1 -0
  19. package/dist/shared/ui/SkyTable/DynamicScroller.vue.d.ts +2 -2
  20. package/dist/shared/ui/SkyTable/Row.vue.d.ts +2 -2
  21. package/dist/shared/ui/SkyTable/items/itemDefault.vue.d.ts +2 -2
  22. package/dist/shared/ui/SkyTable/items/itemInput.vue.d.ts +1 -1
  23. package/dist/shared/ui/SkyTable/items/itemSelect.vue.d.ts +2 -2
  24. package/dist/shared/ui/SkyTable/items/itemTagEditor.vue.d.ts +2 -2
  25. package/dist/shared/ui/SkyTable/items/itemTags.vue.d.ts +1 -1
  26. package/dist/shared/ui/functional-calendar/components/Arrows.vue.d.ts +49 -0
  27. package/dist/shared/ui/functional-calendar/components/Day.vue.d.ts +81 -0
  28. package/dist/shared/ui/functional-calendar/components/Footer.vue.d.ts +2 -0
  29. package/dist/shared/ui/functional-calendar/components/FunctionalCalendar.vue.d.ts +554 -0
  30. package/dist/shared/ui/functional-calendar/components/MonthYearPicker.vue.d.ts +27 -0
  31. package/dist/shared/ui/functional-calendar/components/PickerInputs.vue.d.ts +41 -0
  32. package/dist/shared/ui/functional-calendar/components/TimePicker.vue.d.ts +23 -0
  33. package/dist/shared/ui/functional-calendar/components/WeekNumbers.vue.d.ts +22 -0
  34. package/dist/shared/ui/index.d.ts +3 -0
  35. package/dist/shared/ui/table/SkyTableBody.vue.d.ts +11 -0
  36. package/dist/shared/ui/table/SkyTableCell.vue.d.ts +45 -0
  37. package/dist/shared/ui/table/SkyTableEmpty.vue.d.ts +39 -0
  38. package/dist/shared/ui/table/SkyTableHead.vue.d.ts +34 -0
  39. package/dist/shared/ui/table/SkyTableHeader.vue.d.ts +40 -0
  40. package/dist/shared/ui/table/SkyTableRoot.vue.d.ts +50 -0
  41. package/dist/shared/ui/table/SkyTableRow.vue.d.ts +49 -0
  42. package/dist/shared/ui/table/index.d.ts +9 -0
  43. package/dist/shared/ui/table/types.d.ts +36 -0
  44. package/dist/style.css +1 -1
  45. package/dist/vue-dev-kit.cjs +14 -12
  46. package/dist/vue-dev-kit.js +11949 -8835
  47. package/package.json +10 -3
@@ -0,0 +1,31 @@
1
+ import { SkyTableColumn } from '../../shared/ui/table/types';
2
+
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
4
+ columns: SkyTableColumn[];
5
+ /** Мапа `name → показувати` з useColumnVisibility. */
6
+ modelValue: Record<string, boolean>;
7
+ title?: string;
8
+ resetLabel?: string;
9
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
10
+ "update:modelValue": (value: Record<string, boolean>) => void;
11
+ reset: () => void;
12
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
13
+ columns: SkyTableColumn[];
14
+ /** Мапа `name → показувати` з useColumnVisibility. */
15
+ modelValue: Record<string, boolean>;
16
+ title?: string;
17
+ resetLabel?: string;
18
+ }>>> & Readonly<{
19
+ "onUpdate:modelValue"?: ((value: Record<string, boolean>) => any) | undefined;
20
+ onReset?: (() => any) | undefined;
21
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
22
+ export default _default;
23
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
24
+ type __VLS_TypePropsToRuntimeProps<T> = {
25
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
26
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
27
+ } : {
28
+ type: import('vue').PropType<T[K]>;
29
+ required: true;
30
+ };
31
+ };
@@ -0,0 +1,56 @@
1
+ declare function __VLS_template(): {
2
+ default?(_: {}): any;
3
+ };
4
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
5
+ /** Скільки рядків обрано. При 0 панель не рендериться. */
6
+ count: number;
7
+ /** Доступні масові дії. */
8
+ actions: {
9
+ value: string;
10
+ title: string;
11
+ }[];
12
+ placeholder?: string;
13
+ }>, {
14
+ placeholder: string;
15
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
16
+ action: (value: string) => void;
17
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
18
+ /** Скільки рядків обрано. При 0 панель не рендериться. */
19
+ count: number;
20
+ /** Доступні масові дії. */
21
+ actions: {
22
+ value: string;
23
+ title: string;
24
+ }[];
25
+ placeholder?: string;
26
+ }>, {
27
+ placeholder: string;
28
+ }>>> & Readonly<{
29
+ onAction?: ((value: string) => any) | undefined;
30
+ }>, {
31
+ placeholder: string;
32
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
33
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
34
+ export default _default;
35
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
36
+ type __VLS_TypePropsToRuntimeProps<T> = {
37
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
38
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
39
+ } : {
40
+ type: import('vue').PropType<T[K]>;
41
+ required: true;
42
+ };
43
+ };
44
+ type __VLS_WithDefaults<P, D> = {
45
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
46
+ default: D[K];
47
+ }> : P[K];
48
+ };
49
+ type __VLS_Prettify<T> = {
50
+ [K in keyof T]: T[K];
51
+ } & {};
52
+ type __VLS_WithTemplateSlots<T, S> = T & {
53
+ new (): {
54
+ $slots: S;
55
+ };
56
+ };
@@ -0,0 +1,65 @@
1
+
2
+ declare function __VLS_template(): {
3
+ default?(_: {
4
+ item: any;
5
+ index: any;
6
+ active: any;
7
+ }): any;
8
+ };
9
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
10
+ items: any[];
11
+ /** Ключ ідентифікатора рядка. */
12
+ keyField?: string;
13
+ /** Очікувана мінімальна висота рядка — база для розрахунку вікна. */
14
+ minItemSize?: number;
15
+ /** Поля, зміна яких змінює висоту рядка (розкриті модифікації, теги). */
16
+ sizeDependencies?: (row: any) => unknown[];
17
+ }>, {
18
+ keyField: string;
19
+ minItemSize: number;
20
+ sizeDependencies: undefined;
21
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
22
+ "reach-end": () => void;
23
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
24
+ items: any[];
25
+ /** Ключ ідентифікатора рядка. */
26
+ keyField?: string;
27
+ /** Очікувана мінімальна висота рядка — база для розрахунку вікна. */
28
+ minItemSize?: number;
29
+ /** Поля, зміна яких змінює висоту рядка (розкриті модифікації, теги). */
30
+ sizeDependencies?: (row: any) => unknown[];
31
+ }>, {
32
+ keyField: string;
33
+ minItemSize: number;
34
+ sizeDependencies: undefined;
35
+ }>>> & Readonly<{
36
+ "onReach-end"?: (() => any) | undefined;
37
+ }>, {
38
+ keyField: string;
39
+ minItemSize: number;
40
+ sizeDependencies: (row: any) => unknown[];
41
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
42
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
43
+ export default _default;
44
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
45
+ type __VLS_TypePropsToRuntimeProps<T> = {
46
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
47
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
48
+ } : {
49
+ type: import('vue').PropType<T[K]>;
50
+ required: true;
51
+ };
52
+ };
53
+ type __VLS_WithDefaults<P, D> = {
54
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
55
+ default: D[K];
56
+ }> : P[K];
57
+ };
58
+ type __VLS_Prettify<T> = {
59
+ [K in keyof T]: T[K];
60
+ } & {};
61
+ type __VLS_WithTemplateSlots<T, S> = T & {
62
+ new (): {
63
+ $slots: S;
64
+ };
65
+ };
@@ -0,0 +1,3 @@
1
+ export { default as TableMassActions } from './TableMassActions.vue';
2
+ export { default as TableColumnSettings } from './TableColumnSettings.vue';
3
+ export { default as TableVirtualBody } from './TableVirtualBody.vue';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
 
2
2
  export * from './shared/ui';
3
+ export * from './shared/lib/table';
3
4
  export * from './features';
4
5
  export * from './sdk';
5
6
  export * from 'sky-service-ui-components';
@@ -0,0 +1,8 @@
1
+ export { skyTableFeatures, createSkyColumnHelper } from './tableFeatures';
2
+ export type { SkyTableFeatures } from './tableFeatures';
3
+ export { useTableSort } from './useTableSort';
4
+ export { useTableSelection } from './useTableSelection';
5
+ export { useColumnVisibility } from './useColumnVisibility';
6
+ export type { UseTableSortOptions, UseTableSortReturn } from './useTableSort';
7
+ export type { UseTableSelectionOptions, UseTableSelectionReturn, } from './useTableSelection';
8
+ export type { UseColumnVisibilityOptions, UseColumnVisibilityReturn, } from './useColumnVisibility';
@@ -0,0 +1,110 @@
1
+ import { RowData } from '@tanstack/vue-table';
2
+
3
+ /**
4
+ * Стабільний набір фіч для гріда — визначається один раз статично, поза
5
+ * компонентом, як і радить TanStack v9. Сюди входять лише ті плагіни, що
6
+ * реально потрібні продукту: сортування, вибір рядків, видимість колонок,
7
+ * пагінація і фільтрація (колонкова + глобальний пошук).
8
+ *
9
+ * Разом із плагінами тут же живуть слоти row-моделей і реєстри функцій
10
+ * (`sortFns` / `filterFns`) — їхні ключі стають валідними значеннями для
11
+ * `sortFn` та `filterFn` у визначеннях колонок, з повним виведенням типів.
12
+ *
13
+ * Потрібно щось поза цим набором (групування, пінінг, розгортання рядків) —
14
+ * зберіть власний обʼєкт через `tableFeatures()` і передайте в `SkyDataTable`
15
+ * пропом `features`: те, чого немає в наборі, не потрапляє ні в типи, ні в бандл.
16
+ */
17
+ export declare const skyTableFeatures: {
18
+ columnFilteringFeature: import('@tanstack/table-core').TableFeature;
19
+ columnSizingFeature: import('@tanstack/table-core').TableFeature;
20
+ columnVisibilityFeature: import('@tanstack/table-core').TableFeature;
21
+ globalFilteringFeature: import('@tanstack/table-core').TableFeature;
22
+ rowPaginationFeature: import('@tanstack/table-core').TableFeature;
23
+ rowSelectionFeature: import('@tanstack/table-core').TableFeature;
24
+ rowSortingFeature: import('@tanstack/table-core').TableFeature;
25
+ coreRowModel: (table: import('@tanstack/table-core').Table<any, any>) => () => import('@tanstack/table-core').RowModel<any, any>;
26
+ filteredRowModel: (table: import('@tanstack/table-core').Table<any, any>) => () => import('@tanstack/table-core').RowModel<any, any>;
27
+ sortedRowModel: (table: import('@tanstack/table-core').Table<any, any>) => () => import('@tanstack/table-core').RowModel<any, any>;
28
+ paginatedRowModel: (table: import('@tanstack/table-core').Table<any, any>) => () => import('@tanstack/table-core').RowModel<any, any>;
29
+ sortFns: {
30
+ alphanumeric: import('@tanstack/table-core').CreatedSortFn<any, any>;
31
+ alphanumericCaseSensitive: import('@tanstack/table-core').CreatedSortFn<any, any>;
32
+ basic: import('@tanstack/table-core').CreatedSortFn<any, any>;
33
+ datetime: import('@tanstack/table-core').CreatedSortFn<any, any>;
34
+ text: import('@tanstack/table-core').CreatedSortFn<any, any>;
35
+ textCaseSensitive: import('@tanstack/table-core').CreatedSortFn<any, any>;
36
+ };
37
+ filterFns: {
38
+ arrIncludes: import('@tanstack/table-core').CreatedFilterFn<any, any>;
39
+ arrIncludesAll: import('@tanstack/table-core').CreatedFilterFn<any, any>;
40
+ arrHas: import('@tanstack/table-core').CreatedFilterFn<any, any>;
41
+ arrIncludesSome: import('@tanstack/table-core').CreatedFilterFn<any, any>;
42
+ between: import('@tanstack/table-core').CreatedFilterFn<any, any>;
43
+ betweenInclusive: import('@tanstack/table-core').CreatedFilterFn<any, any>;
44
+ empty: import('@tanstack/table-core').CreatedFilterFn<any, any>;
45
+ endsWith: import('@tanstack/table-core').CreatedFilterFn<any, any>;
46
+ equals: import('@tanstack/table-core').CreatedFilterFn<any, any>;
47
+ equalsString: import('@tanstack/table-core').CreatedFilterFn<any, any>;
48
+ equalsStringSensitive: import('@tanstack/table-core').CreatedFilterFn<any, any>;
49
+ inDateRange: import('@tanstack/table-core').CreatedFilterFn<any, any>;
50
+ inNumberRange: import('@tanstack/table-core').CreatedFilterFn<any, any>;
51
+ includesString: import('@tanstack/table-core').CreatedFilterFn<any, any>;
52
+ includesStringSensitive: import('@tanstack/table-core').CreatedFilterFn<any, any>;
53
+ notEmpty: import('@tanstack/table-core').CreatedFilterFn<any, any>;
54
+ startsWith: import('@tanstack/table-core').CreatedFilterFn<any, any>;
55
+ weakEquals: import('@tanstack/table-core').CreatedFilterFn<any, any>;
56
+ };
57
+ };
58
+ export type SkyTableFeatures = typeof skyTableFeatures;
59
+ /**
60
+ * Типізований помічник для опису колонок під наш набір фіч.
61
+ *
62
+ * ```ts
63
+ * const column = createSkyColumnHelper<Product>()
64
+ * const columns = [
65
+ * column.accessor('name', { header: 'Назва' }),
66
+ * column.display({ id: 'actions', cell: ({ row }) => h(RowActions, { row }) }),
67
+ * ]
68
+ * ```
69
+ */
70
+ export declare function createSkyColumnHelper<TData extends RowData>(): import('@tanstack/table-core').ColumnHelper<{
71
+ columnFilteringFeature: import('@tanstack/table-core').TableFeature;
72
+ columnSizingFeature: import('@tanstack/table-core').TableFeature;
73
+ columnVisibilityFeature: import('@tanstack/table-core').TableFeature;
74
+ globalFilteringFeature: import('@tanstack/table-core').TableFeature;
75
+ rowPaginationFeature: import('@tanstack/table-core').TableFeature;
76
+ rowSelectionFeature: import('@tanstack/table-core').TableFeature;
77
+ rowSortingFeature: import('@tanstack/table-core').TableFeature;
78
+ coreRowModel: (table: import('@tanstack/table-core').Table<any, any>) => () => import('@tanstack/table-core').RowModel<any, any>;
79
+ filteredRowModel: (table: import('@tanstack/table-core').Table<any, any>) => () => import('@tanstack/table-core').RowModel<any, any>;
80
+ sortedRowModel: (table: import('@tanstack/table-core').Table<any, any>) => () => import('@tanstack/table-core').RowModel<any, any>;
81
+ paginatedRowModel: (table: import('@tanstack/table-core').Table<any, any>) => () => import('@tanstack/table-core').RowModel<any, any>;
82
+ sortFns: {
83
+ alphanumeric: import('@tanstack/table-core').CreatedSortFn<any, any>;
84
+ alphanumericCaseSensitive: import('@tanstack/table-core').CreatedSortFn<any, any>;
85
+ basic: import('@tanstack/table-core').CreatedSortFn<any, any>;
86
+ datetime: import('@tanstack/table-core').CreatedSortFn<any, any>;
87
+ text: import('@tanstack/table-core').CreatedSortFn<any, any>;
88
+ textCaseSensitive: import('@tanstack/table-core').CreatedSortFn<any, any>;
89
+ };
90
+ filterFns: {
91
+ arrIncludes: import('@tanstack/table-core').CreatedFilterFn<any, any>;
92
+ arrIncludesAll: import('@tanstack/table-core').CreatedFilterFn<any, any>;
93
+ arrHas: import('@tanstack/table-core').CreatedFilterFn<any, any>;
94
+ arrIncludesSome: import('@tanstack/table-core').CreatedFilterFn<any, any>;
95
+ between: import('@tanstack/table-core').CreatedFilterFn<any, any>;
96
+ betweenInclusive: import('@tanstack/table-core').CreatedFilterFn<any, any>;
97
+ empty: import('@tanstack/table-core').CreatedFilterFn<any, any>;
98
+ endsWith: import('@tanstack/table-core').CreatedFilterFn<any, any>;
99
+ equals: import('@tanstack/table-core').CreatedFilterFn<any, any>;
100
+ equalsString: import('@tanstack/table-core').CreatedFilterFn<any, any>;
101
+ equalsStringSensitive: import('@tanstack/table-core').CreatedFilterFn<any, any>;
102
+ inDateRange: import('@tanstack/table-core').CreatedFilterFn<any, any>;
103
+ inNumberRange: import('@tanstack/table-core').CreatedFilterFn<any, any>;
104
+ includesString: import('@tanstack/table-core').CreatedFilterFn<any, any>;
105
+ includesStringSensitive: import('@tanstack/table-core').CreatedFilterFn<any, any>;
106
+ notEmpty: import('@tanstack/table-core').CreatedFilterFn<any, any>;
107
+ startsWith: import('@tanstack/table-core').CreatedFilterFn<any, any>;
108
+ weakEquals: import('@tanstack/table-core').CreatedFilterFn<any, any>;
109
+ };
110
+ }, TData>;
@@ -0,0 +1,29 @@
1
+ import { ComputedRef, Ref } from 'vue';
2
+ import { SkyTableColumn } from '../../ui/table/types';
3
+
4
+ type MaybeRef<T> = T | Ref<T> | ComputedRef<T>;
5
+ export interface UseColumnVisibilityOptions {
6
+ /**
7
+ * Ключ у localStorage для збереження вибору користувача. Без нього
8
+ * налаштування живуть лише до перезавантаження сторінки.
9
+ */
10
+ storageKey?: string;
11
+ /** Колонки, приховані за замовчуванням. */
12
+ hidden?: string[];
13
+ }
14
+ export interface UseColumnVisibilityReturn {
15
+ /** Мапа `name → показувати`. Придатна для v-model у налаштуваннях колонок. */
16
+ visibility: Ref<Record<string, boolean>>;
17
+ /** Колонки, які треба віддати в SkyTableRoot. */
18
+ visibleColumns: ComputedRef<SkyTableColumn[]>;
19
+ toggle: (name: string) => void;
20
+ reset: () => void;
21
+ }
22
+ /**
23
+ * Видимість колонок із опційним збереженням у localStorage.
24
+ *
25
+ * Стара таблиця тримала це у внутрішньому стані й дублювала в `header[].enable`,
26
+ * тож зовні дізнатись про вибір користувача було нічим.
27
+ */
28
+ export declare function useColumnVisibility(columns: MaybeRef<SkyTableColumn[]>, options?: UseColumnVisibilityOptions): UseColumnVisibilityReturn;
29
+ export {};
@@ -0,0 +1,34 @@
1
+ import { ComputedRef, Ref } from 'vue';
2
+
3
+ type MaybeRef<T> = T | Ref<T> | ComputedRef<T>;
4
+ export interface UseTableSelectionOptions<T> {
5
+ /** Ключ ідентифікатора рядка або функція, що його дістає. */
6
+ rowId?: string | ((row: T) => string | number);
7
+ /** Рядки, які не можна обрати (напр. вкладені модифікації). */
8
+ selectable?: (row: T) => boolean;
9
+ }
10
+ export interface UseTableSelectionReturn<T> {
11
+ selected: Ref<T[]>;
12
+ selectedIds: ComputedRef<(string | number)[]>;
13
+ isSelected: (row: T) => boolean;
14
+ /** Усі доступні для вибору рядки обрані. */
15
+ allSelected: ComputedRef<boolean>;
16
+ /** Обрано частину — для indeterminate-стану чекбокса в шапці. */
17
+ someSelected: ComputedRef<boolean>;
18
+ /** Перемкнути рядок. `shift: true` виділяє діапазон від попереднього кліку. */
19
+ toggle: (row: T, index: number, options?: {
20
+ shift?: boolean;
21
+ }) => void;
22
+ toggleAll: () => void;
23
+ clear: () => void;
24
+ /** Прибрати рядок із вибору за id — напр. після видалення. */
25
+ remove: (id: string | number) => void;
26
+ }
27
+ /**
28
+ * Вибір рядків: одиночний, shift-діапазон і select-all.
29
+ *
30
+ * На відміну від старої таблиці, нічого не мутує в чужих пропсах — стан живе
31
+ * тут, а назовні віддається через `selected`.
32
+ */
33
+ export declare function useTableSelection<T extends Record<string, any>>(rows: MaybeRef<T[]>, options?: UseTableSelectionOptions<T>): UseTableSelectionReturn<T>;
34
+ export {};
@@ -0,0 +1,28 @@
1
+ import { Ref } from 'vue';
2
+ import { SortState, SortDirection } from '../../ui/table/types';
3
+
4
+ export interface UseTableSortOptions {
5
+ /** Початковий стан сортування. */
6
+ initial?: Partial<SortState>;
7
+ /**
8
+ * Чи проходити через стан «без сортування» на третьому кліку.
9
+ * За замовчуванням `false` — клік лише перемикає asc ⇄ desc, як у старій таблиці.
10
+ */
11
+ tristate?: boolean;
12
+ }
13
+ export interface UseTableSortReturn {
14
+ sort: Ref<SortState>;
15
+ /** Перемкнути сортування за полем. Повертає новий стан — зручно для запиту. */
16
+ toggle: (field: string) => SortState;
17
+ /** Напрям для конкретного поля (`''`, якщо сортуємо не за ним). */
18
+ directionOf: (field: string) => SortDirection;
19
+ reset: () => void;
20
+ }
21
+ /**
22
+ * Стан сортування без будь-якої прив'язки до розмітки.
23
+ *
24
+ * Сортування тут *не виконується* — композабл лише тримає `{ of, ot }`.
25
+ * Дані сортує сервер (або застосунок), як і в старій таблиці: на кожен toggle
26
+ * ви робите запит із новим станом.
27
+ */
28
+ export declare function useTableSort(options?: UseTableSortOptions): UseTableSortReturn;
@@ -13,6 +13,7 @@ declare const __VLS_component: import('vue').DefineComponent<{}, {
13
13
  closeOnEsc: boolean;
14
14
  closeTitle: string;
15
15
  closeOnOverlay: boolean;
16
+ borderRadius: string;
16
17
  $props: {
17
18
  readonly modelValue?: boolean | undefined;
18
19
  readonly title?: string | undefined;
@@ -22,6 +23,7 @@ declare const __VLS_component: import('vue').DefineComponent<{}, {
22
23
  readonly closeOnEsc?: boolean | undefined;
23
24
  readonly closeTitle?: string | undefined;
24
25
  readonly closeOnOverlay?: boolean | undefined;
26
+ readonly borderRadius?: string | undefined;
25
27
  };
26
28
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
27
29
  declare function __VLS_template(): {