@revenexx/studio-shared 0.3.3 → 0.4.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/dist/module.d.mts +2 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +3 -1
- package/dist/runtime/components/Dashboard/DashboardConfirmDialog.d.vue.ts +2 -1
- package/dist/runtime/components/Dashboard/DashboardConfirmDialog.vue.d.ts +2 -1
- package/dist/runtime/components/Dashboard/DashboardControls.d.vue.ts +8 -7
- package/dist/runtime/components/Dashboard/DashboardControls.vue.d.ts +8 -7
- package/dist/runtime/components/Dashboard/DashboardGrid.d.vue.ts +2 -1
- package/dist/runtime/components/Dashboard/DashboardGrid.vue.d.ts +2 -1
- package/dist/runtime/components/Dashboard/DashboardNameDialog.d.vue.ts +2 -1
- package/dist/runtime/components/Dashboard/DashboardNameDialog.vue.d.ts +2 -1
- package/dist/runtime/components/Dashboard/DashboardPickerDialog.d.vue.ts +2 -1
- package/dist/runtime/components/Dashboard/DashboardPickerDialog.vue.d.ts +2 -1
- package/dist/runtime/components/Dashboard/DashboardShareDialog.d.vue.ts +2 -1
- package/dist/runtime/components/Dashboard/DashboardShareDialog.vue.d.ts +2 -1
- package/dist/runtime/components/Dashboard/DashboardTopBar.d.vue.ts +9 -4
- package/dist/runtime/components/Dashboard/DashboardTopBar.vue.d.ts +9 -4
- package/dist/runtime/components/Dashboard/DashboardWidgetConfigDialog.d.vue.ts +8 -6
- package/dist/runtime/components/Dashboard/DashboardWidgetConfigDialog.vue.d.ts +8 -6
- package/dist/runtime/components/Dashboard/DashboardWidgetFrame.d.vue.ts +5 -4
- package/dist/runtime/components/Dashboard/DashboardWidgetFrame.vue.d.ts +5 -4
- package/dist/runtime/components/Dashboard/DashboardWidgetHost.d.vue.ts +2 -1
- package/dist/runtime/components/Dashboard/DashboardWidgetHost.vue.d.ts +2 -1
- package/dist/runtime/components/Dashboard/DashboardWidgetIcon.d.vue.ts +2 -1
- package/dist/runtime/components/Dashboard/DashboardWidgetIcon.vue.d.ts +2 -1
- package/dist/runtime/components/Dashboard/DashboardWidgetLibrary.d.vue.ts +2 -1
- package/dist/runtime/components/Dashboard/DashboardWidgetLibrary.vue.d.ts +2 -1
- package/dist/runtime/components/Dashboard/DashboardWidgetPreview.d.vue.ts +2 -1
- package/dist/runtime/components/Dashboard/DashboardWidgetPreview.vue.d.ts +2 -1
- package/dist/runtime/components/DataTable/ColumnsMenu.d.vue.ts +2 -1
- package/dist/runtime/components/DataTable/ColumnsMenu.vue.d.ts +2 -1
- package/dist/runtime/components/DataTable/DataTable.d.vue.ts +75 -31
- package/dist/runtime/components/DataTable/DataTable.vue +153 -13
- package/dist/runtime/components/DataTable/DataTable.vue.d.ts +75 -31
- package/dist/runtime/components/DataTable/FacetChips.d.vue.ts +2 -1
- package/dist/runtime/components/DataTable/FacetChips.vue.d.ts +2 -1
- package/dist/runtime/components/DataTable/FacetPanel.d.vue.ts +6 -5
- package/dist/runtime/components/DataTable/FacetPanel.vue.d.ts +6 -5
- package/dist/runtime/components/DataTable/FilterMenu.d.vue.ts +6 -5
- package/dist/runtime/components/DataTable/FilterMenu.vue.d.ts +6 -5
- package/dist/runtime/components/DataTable/SavedViewsMenu.d.vue.ts +2 -1
- package/dist/runtime/components/DataTable/SavedViewsMenu.vue.d.ts +2 -1
- package/dist/runtime/components/DataTable/SortMenu.d.vue.ts +4 -2
- package/dist/runtime/components/DataTable/SortMenu.vue.d.ts +4 -2
- package/dist/runtime/components/DataTable/ViewModeSwitch.d.vue.ts +4 -2
- package/dist/runtime/components/DataTable/ViewModeSwitch.vue.d.ts +4 -2
- package/dist/runtime/components/Form/FieldCell.d.vue.ts +32 -0
- package/dist/runtime/components/Form/FieldCell.vue +46 -0
- package/dist/runtime/components/Form/FieldCell.vue.d.ts +32 -0
- package/dist/runtime/components/Form/FieldGrid.d.vue.ts +13 -0
- package/dist/runtime/components/Form/FieldGrid.vue +11 -0
- package/dist/runtime/components/Form/FieldGrid.vue.d.ts +13 -0
- package/dist/runtime/components/Form/FormContextCard.d.vue.ts +33 -0
- package/dist/runtime/components/Form/FormContextCard.vue +56 -0
- package/dist/runtime/components/Form/FormContextCard.vue.d.ts +33 -0
- package/dist/runtime/components/Form/FormLayout.d.vue.ts +47 -0
- package/dist/runtime/components/Form/FormLayout.vue +169 -0
- package/dist/runtime/components/Form/FormLayout.vue.d.ts +47 -0
- package/dist/runtime/components/Form/FormSection.d.vue.ts +25 -0
- package/dist/runtime/components/Form/FormSection.vue +48 -0
- package/dist/runtime/components/Form/FormSection.vue.d.ts +25 -0
- package/dist/runtime/components/Form/SaveBar.d.vue.ts +44 -0
- package/dist/runtime/components/Form/SaveBar.vue +71 -0
- package/dist/runtime/components/Form/SaveBar.vue.d.ts +44 -0
- package/dist/runtime/components/Media/MediaFolderTree.d.vue.ts +2 -1
- package/dist/runtime/components/Media/MediaFolderTree.vue.d.ts +2 -1
- package/dist/runtime/components/Media/MediaPickerDialog.d.vue.ts +2 -1
- package/dist/runtime/components/Media/MediaPickerDialog.vue.d.ts +2 -1
- package/dist/runtime/components/Media/MediaUploader.d.vue.ts +2 -1
- package/dist/runtime/components/Media/MediaUploader.vue.d.ts +2 -1
- package/dist/runtime/components/Shared/AppIcon.d.vue.ts +21 -0
- package/dist/runtime/components/Shared/AppIcon.vue +47 -0
- package/dist/runtime/components/Shared/AppIcon.vue.d.ts +21 -0
- package/dist/runtime/components/Shared/BuildLogsFlyout.d.vue.ts +2 -1
- package/dist/runtime/components/Shared/BuildLogsFlyout.vue.d.ts +2 -1
- package/dist/runtime/components/Shared/DetailSheet.d.vue.ts +60 -0
- package/dist/runtime/components/Shared/DetailSheet.vue +207 -0
- package/dist/runtime/components/Shared/DetailSheet.vue.d.ts +60 -0
- package/dist/runtime/components/Shared/FloatingPanel.d.vue.ts +7 -6
- package/dist/runtime/components/Shared/FloatingPanel.vue.d.ts +7 -6
- package/dist/runtime/components/Shared/GitDeploymentSettings.d.vue.ts +2 -1
- package/dist/runtime/components/Shared/GitDeploymentSettings.vue.d.ts +2 -1
- package/dist/runtime/components/Shared/KpiTile.d.vue.ts +2 -1
- package/dist/runtime/components/Shared/KpiTile.vue.d.ts +2 -1
- package/dist/runtime/components/Shared/ListSurface.d.vue.ts +3 -2
- package/dist/runtime/components/Shared/ListSurface.vue.d.ts +3 -2
- package/dist/runtime/components/Shared/PageHeader.d.vue.ts +7 -6
- package/dist/runtime/components/Shared/PageHeader.vue.d.ts +7 -6
- package/dist/runtime/components/Shared/RecordLayout.d.vue.ts +8 -7
- package/dist/runtime/components/Shared/RecordLayout.vue.d.ts +8 -7
- package/dist/runtime/components/Shared/RecordRailCard.d.vue.ts +3 -2
- package/dist/runtime/components/Shared/RecordRailCard.vue.d.ts +3 -2
- package/dist/runtime/components/Shared/SidebarNav.d.vue.ts +3 -2
- package/dist/runtime/components/Shared/SidebarNav.vue.d.ts +3 -2
- package/dist/runtime/components/Shared/SidebarNavLink.d.vue.ts +2 -1
- package/dist/runtime/components/Shared/SidebarNavLink.vue.d.ts +2 -1
- package/dist/runtime/components/Shared/SortHeader.d.vue.ts +3 -2
- package/dist/runtime/components/Shared/SortHeader.vue.d.ts +3 -2
- package/dist/runtime/components/Shared/StateCard.d.vue.ts +6 -5
- package/dist/runtime/components/Shared/StateCard.vue.d.ts +6 -5
- package/dist/runtime/components/Shared/StudioCard.d.vue.ts +5 -4
- package/dist/runtime/components/Shared/StudioCard.vue.d.ts +5 -4
- package/dist/runtime/components/Shared/TabBar.d.vue.ts +4 -21
- package/dist/runtime/components/Shared/TabBar.vue +24 -6
- package/dist/runtime/components/Shared/TabBar.vue.d.ts +4 -21
- package/dist/runtime/components/Shared/ViewTab.d.vue.ts +2 -1
- package/dist/runtime/components/Shared/ViewTab.vue.d.ts +2 -1
- package/dist/runtime/components/Shared/Wizard.d.vue.ts +10 -7
- package/dist/runtime/components/Shared/Wizard.vue.d.ts +10 -7
- package/dist/runtime/composables/useDetailSheet.d.ts +20 -0
- package/dist/runtime/composables/useDetailSheet.js +50 -0
- package/dist/runtime/composables/usePlatformTenant.d.ts +6 -0
- package/dist/runtime/lib/activeTenant.d.ts +58 -0
- package/dist/runtime/lib/activeTenant.js +45 -0
- package/dist/runtime/lib/appIcon.d.ts +48 -0
- package/dist/runtime/lib/appIcon.js +27 -0
- package/dist/runtime/lib/detailSheet.d.ts +43 -0
- package/dist/runtime/lib/detailSheet.js +34 -0
- package/dist/runtime/lib/formLayout.d.ts +94 -0
- package/dist/runtime/lib/formLayout.js +70 -0
- package/dist/runtime/lib/formLayoutContext.d.ts +26 -0
- package/dist/runtime/lib/formLayoutContext.js +1 -0
- package/dist/runtime/lib/rowMove.d.ts +38 -0
- package/dist/runtime/lib/rowMove.js +20 -0
- package/dist/runtime/lib/solarIconMap.d.ts +15 -0
- package/dist/runtime/lib/solarIconMap.js +280 -0
- package/dist/runtime/lib/solarIcons.d.ts +37 -0
- package/dist/runtime/lib/solarIcons.js +25 -0
- package/dist/types.d.mts +4 -0
- package/package.json +1 -1
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
|
-
readonly "onUpdate:sort"?: ((value: SortState) => any) | undefined;
|
|
6
|
-
readonly "onUpdate:page"?: ((value: number) => any) | undefined;
|
|
7
|
-
readonly "onUpdate:viewMode"?: ((value: string) => any) | undefined;
|
|
8
|
-
readonly "onUpdate:railOpen"?: ((value: boolean) => any) | undefined;
|
|
9
|
-
readonly "onUpdate:facetSelection"?: ((value: FacetSelection) => any) | undefined;
|
|
10
|
-
readonly onRowClick?: ((row: T) => any) | undefined;
|
|
11
|
-
readonly onStateChange?: ((state: DataTableState) => any) | undefined;
|
|
12
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:sort" | "onUpdate:page" | "onUpdate:viewMode" | "onUpdate:railOpen" | "onUpdate:facetSelection" | "onRowClick" | "onStateChange"> & ({
|
|
1
|
+
import { Eye } from '#solar-icons';
|
|
2
|
+
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<({
|
|
13
4
|
data: T[];
|
|
14
|
-
columns:
|
|
15
|
-
rowKey:
|
|
5
|
+
columns: Eye<T>[];
|
|
6
|
+
rowKey: Eye<T>;
|
|
16
7
|
/** `label` is the field's accessible name; it defaults to the placeholder
|
|
17
8
|
* where the surface wrote one (see `searchLabel`). */
|
|
18
9
|
search?: boolean | {
|
|
@@ -29,7 +20,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
29
20
|
};
|
|
30
21
|
/** Built-in status/dimension filter pills (static mode). One dimension, or
|
|
31
22
|
* several (each renders as its own sub-menu). */
|
|
32
|
-
filterTabs?:
|
|
23
|
+
filterTabs?: Eye<T> | Eye<T>[];
|
|
33
24
|
/**
|
|
34
25
|
* The surface's declared dimensions, as one facet model (PE-6xx).
|
|
35
26
|
*
|
|
@@ -46,17 +37,17 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
46
37
|
* second placement: a tree pinned in a left column beside a panel is two
|
|
47
38
|
* places to look and two commit rules for one question.
|
|
48
39
|
*/
|
|
49
|
-
facets?:
|
|
40
|
+
facets?: Eye[];
|
|
50
41
|
/** Say which facet each chip belongs to (see `FacetChips.showFacet`). */
|
|
51
42
|
chipFacetLabels?: boolean;
|
|
52
43
|
/** Saved views control — the surface supplies snapshot/apply, the table
|
|
53
44
|
* owns the control, the storage and the dialogs. */
|
|
54
|
-
savedViews?:
|
|
45
|
+
savedViews?: Eye | null;
|
|
55
46
|
/** View-mode switch (e.g. List | Gallery). Any mode other than `list`
|
|
56
47
|
* renders the `#view` slot in place of the table body. */
|
|
57
|
-
viewModes?:
|
|
48
|
+
viewModes?: Eye[] | null;
|
|
58
49
|
/** Collapse handle for the surface's left rail (see `ListSurface`). */
|
|
59
|
-
rail?: boolean |
|
|
50
|
+
rail?: boolean | Eye;
|
|
60
51
|
/**
|
|
61
52
|
* Scroll the ROWS inside the table instead of the page.
|
|
62
53
|
*
|
|
@@ -95,8 +86,32 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
95
86
|
emptyText?: string;
|
|
96
87
|
groupBy?: ((row: T) => string[]) | null;
|
|
97
88
|
groupEmptyLabel?: string;
|
|
89
|
+
/** The row whose record is open beside the table (a DetailSheet), marked so
|
|
90
|
+
* reading down the list keeps the place visible (PE-690). */
|
|
91
|
+
activeRowKey?: string | number | null;
|
|
92
|
+
/**
|
|
93
|
+
* A row's own tint — a quantity tier set apart under the SKU it belongs to.
|
|
94
|
+
* Replaces the row's default ground rather than stacking on it: two
|
|
95
|
+
* translucent backgrounds on one element are whichever Tailwind emitted last.
|
|
96
|
+
*/
|
|
97
|
+
rowClass?: ((row: T) => string | null | undefined) | null;
|
|
98
|
+
/**
|
|
99
|
+
* Rows the operator orders by dragging (PE-952). Draws a handle in a leading
|
|
100
|
+
* column; a drop — or the arrow keys on a focused handle — emits `rowMove`
|
|
101
|
+
* with the new order. The table writes nothing: what a position MEANS, and
|
|
102
|
+
* which rows have to be written for it, is the surface's to decide.
|
|
103
|
+
*/
|
|
104
|
+
reorderable?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Why the handles are off right now, or null when they are on. The surface
|
|
107
|
+
* knows the cases this component cannot see — a sort that is not the
|
|
108
|
+
* sequence, a write still in flight. The table adds its own: a search, a
|
|
109
|
+
* filter or a grouping, under any of which "the row above" is not the row
|
|
110
|
+
* above in the sequence.
|
|
111
|
+
*/
|
|
112
|
+
reorderDisabled?: string | null;
|
|
98
113
|
} & {
|
|
99
|
-
sort?:
|
|
114
|
+
sort?: Eye;
|
|
100
115
|
page?: number;
|
|
101
116
|
viewMode?: string;
|
|
102
117
|
railOpen?: boolean;
|
|
@@ -106,14 +121,31 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
106
121
|
* write to one place — and so the surface can seed it from a saved view or a
|
|
107
122
|
* URL without this component holding a second copy to drift from.
|
|
108
123
|
*/
|
|
109
|
-
facetSelection?:
|
|
110
|
-
}) &
|
|
111
|
-
|
|
124
|
+
facetSelection?: Eye;
|
|
125
|
+
}) & {
|
|
126
|
+
onRowClick?: ((row: T) => any) | undefined;
|
|
127
|
+
onStateChange?: ((state: DataTableState) => any) | undefined;
|
|
128
|
+
onOrderChange?: ((keys: (string | number)[]) => any) | undefined;
|
|
129
|
+
onRowMove?: ((move: {
|
|
130
|
+
key: string | number;
|
|
131
|
+
from: number;
|
|
132
|
+
to: number;
|
|
133
|
+
keys: (string | number)[];
|
|
134
|
+
}) => any) | undefined;
|
|
135
|
+
"onUpdate:sort"?: ((value: SortState) => any) | undefined;
|
|
136
|
+
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
137
|
+
"onUpdate:viewMode"?: ((value: string) => any) | undefined;
|
|
138
|
+
"onUpdate:railOpen"?: ((value: boolean) => any) | undefined;
|
|
139
|
+
"onUpdate:facetSelection"?: ((value: FacetSelection) => any) | undefined;
|
|
140
|
+
}> & (typeof globalThis extends {
|
|
141
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
142
|
+
} ? P : {});
|
|
143
|
+
expose: (exposed: {}) => void;
|
|
112
144
|
attrs: any;
|
|
113
145
|
slots: {
|
|
114
|
-
[x:
|
|
146
|
+
[x: `header-${any}`]: ((props: {}) => any) | undefined;
|
|
115
147
|
} & {
|
|
116
|
-
[x:
|
|
148
|
+
[x: `cell-${any}`]: ((props: {
|
|
117
149
|
row: any;
|
|
118
150
|
}) => any) | undefined;
|
|
119
151
|
} & {
|
|
@@ -129,16 +161,28 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
129
161
|
} & {
|
|
130
162
|
view?: (props: {
|
|
131
163
|
rows: any;
|
|
132
|
-
loading:
|
|
164
|
+
loading: boolean;
|
|
133
165
|
}) => any;
|
|
134
166
|
} & {
|
|
135
|
-
empty?: (props: {
|
|
167
|
+
empty?: (props: {
|
|
168
|
+
query: any;
|
|
169
|
+
filters: any;
|
|
170
|
+
clear: () => void;
|
|
171
|
+
}) => any;
|
|
136
172
|
};
|
|
137
|
-
emit: (((evt: "rowClick", row: T) => void) & ((evt: "stateChange", state: DataTableState) => void)
|
|
173
|
+
emit: (((evt: "rowClick", row: T) => void) & ((evt: "stateChange", state: DataTableState) => void) & ((evt: "orderChange", keys: (string | number)[]) => void) & ((evt: "rowMove", move: {
|
|
174
|
+
key: string | number;
|
|
175
|
+
from: number;
|
|
176
|
+
to: number;
|
|
177
|
+
keys: (string | number)[];
|
|
178
|
+
}) => void)) & (((event: "update:sort", value: SortState) => void) & ((event: "update:page", value: number) => void) & ((event: "update:viewMode", value: string) => void) & ((event: "update:railOpen", value: boolean) => void) & ((event: "update:facetSelection", value: FacetSelection) => void));
|
|
138
179
|
}>) => import("vue").VNode & {
|
|
139
|
-
__ctx?: Awaited<typeof __VLS_setup
|
|
180
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
140
181
|
};
|
|
182
|
+
declare const _default: typeof __VLS_export;
|
|
141
183
|
export default _default;
|
|
142
|
-
type __VLS_PrettifyLocal<T> = {
|
|
184
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
143
185
|
[K in keyof T]: T[K];
|
|
144
|
-
}
|
|
186
|
+
} : {
|
|
187
|
+
[K in keyof T as K]: T[K];
|
|
188
|
+
}) & {};
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
Eye,
|
|
4
4
|
EyeClosed,
|
|
5
5
|
Filter,
|
|
6
|
+
HamburgerMenu as DragHandle,
|
|
6
7
|
ListArrowDownMinimalistic,
|
|
7
8
|
Magnifier as Search,
|
|
8
9
|
SidebarMinimalistic,
|
|
@@ -20,6 +21,8 @@ import { orderColumnsBy } from "../../lib/columnOrder";
|
|
|
20
21
|
import { initiallyHidden, visibleColumnsOf } from "../../lib/columnVisibility";
|
|
21
22
|
import { countByValue, matchesFilter } from "../../lib/dataTableFilters";
|
|
22
23
|
import { gridTemplateColumns } from "../../lib/gridTracks";
|
|
24
|
+
const RIGHT_ALIGNED = "text-right pr-4";
|
|
25
|
+
import { dropEdge, dropTargetIndex, moveKey, stepTarget } from "../../lib/rowMove";
|
|
23
26
|
import SortHeader from "../Shared/SortHeader.vue";
|
|
24
27
|
import FacetChips from "./FacetChips.vue";
|
|
25
28
|
import FacetPanel from "./FacetPanel.vue";
|
|
@@ -47,9 +50,13 @@ const props = defineProps({
|
|
|
47
50
|
loading: { type: Boolean, required: false, default: false },
|
|
48
51
|
emptyText: { type: String, required: false },
|
|
49
52
|
groupBy: { type: [Function, null], required: false, default: null },
|
|
50
|
-
groupEmptyLabel: { type: String, required: false }
|
|
53
|
+
groupEmptyLabel: { type: String, required: false },
|
|
54
|
+
activeRowKey: { type: [String, Number, null], required: false },
|
|
55
|
+
rowClass: { type: [Function, null], required: false, default: null },
|
|
56
|
+
reorderable: { type: Boolean, required: false, default: false },
|
|
57
|
+
reorderDisabled: { type: [String, null], required: false, default: null }
|
|
51
58
|
});
|
|
52
|
-
const emit = defineEmits(["rowClick", "stateChange"]);
|
|
59
|
+
const emit = defineEmits(["rowClick", "stateChange", "orderChange", "rowMove"]);
|
|
53
60
|
const t = useT();
|
|
54
61
|
const query = ref("");
|
|
55
62
|
const sort = defineModel("sort", { type: Object, ...{
|
|
@@ -164,9 +171,24 @@ const sorted = computed(() => {
|
|
|
164
171
|
return 0;
|
|
165
172
|
});
|
|
166
173
|
});
|
|
174
|
+
watch(sorted, (rows) => emit("orderChange", rows.map(rowKeyFor)), { immediate: true });
|
|
167
175
|
const totalCount = computed(
|
|
168
176
|
() => props.serverMode ? props.total ?? props.data.length : sorted.value.length
|
|
169
177
|
);
|
|
178
|
+
const activeNarrowing = computed(() => filterDims.value.map((d) => ({
|
|
179
|
+
label: d.label,
|
|
180
|
+
values: (activeFilters.value[d.key] ?? []).map((v) => d.options.find((o) => o.value === v)?.label ?? v)
|
|
181
|
+
})).filter((d) => d.values.length > 0));
|
|
182
|
+
function clearNarrowing() {
|
|
183
|
+
query.value = "";
|
|
184
|
+
activeFilters.value = {};
|
|
185
|
+
facetSelection.value = {};
|
|
186
|
+
}
|
|
187
|
+
const liveStatus = computed(() => {
|
|
188
|
+
if (!showTable.value) return "";
|
|
189
|
+
if (props.loading) return t("shared.datatable.state.loading");
|
|
190
|
+
return totalCount.value === 0 ? t("shared.datatable.footer.noresults") : t("shared.datatable.footer.showing", { start: rangeStart.value, end: rangeEnd.value, total: totalCount.value });
|
|
191
|
+
});
|
|
170
192
|
const paginated = computed(() => {
|
|
171
193
|
if (props.serverMode || !props.pagination) return sorted.value;
|
|
172
194
|
const start = page.value * pageSize.value;
|
|
@@ -240,7 +262,7 @@ function rowKeyFor(row) {
|
|
|
240
262
|
if (typeof props.rowKey === "function") return props.rowKey(row);
|
|
241
263
|
return row[props.rowKey];
|
|
242
264
|
}
|
|
243
|
-
const gridTemplate = computed(() => `grid-template-columns: ${gridTemplateColumns(
|
|
265
|
+
const gridTemplate = computed(() => `grid-template-columns: ${gridTemplateColumns(renderColumns.value.map((c) => c.width))};`);
|
|
244
266
|
const SUBGRID_ROW = "grid-column: 1 / -1; grid-template-columns: subgrid;";
|
|
245
267
|
const placeholder = computed(
|
|
246
268
|
() => typeof props.search === "object" ? props.search.placeholder ?? t("shared.datatable.toolbar.search.placeholder.default") : t("shared.datatable.toolbar.search.placeholder.default")
|
|
@@ -394,6 +416,88 @@ function prevPage() {
|
|
|
394
416
|
function nextPage() {
|
|
395
417
|
if (page.value < lastPage.value) page.value += 1;
|
|
396
418
|
}
|
|
419
|
+
const MOVE_COLUMN = "__move";
|
|
420
|
+
const renderColumns = computed(() => props.reorderable ? [{ key: MOVE_COLUMN, label: "", width: "max-content" }, ...visibleColumns.value] : visibleColumns.value);
|
|
421
|
+
const reorderBlocked = computed(() => {
|
|
422
|
+
if (!props.reorderable) return null;
|
|
423
|
+
if (props.reorderDisabled) return props.reorderDisabled;
|
|
424
|
+
if (!props.serverMode && query.value.trim()) return t("shared.datatable.reorder.blocked.search");
|
|
425
|
+
if (Object.values(activeFilters.value).some((v) => v.length)) return t("shared.datatable.reorder.blocked.filter");
|
|
426
|
+
if (props.groupBy) return t("shared.datatable.reorder.blocked.group");
|
|
427
|
+
return null;
|
|
428
|
+
});
|
|
429
|
+
const dragKey = ref(null);
|
|
430
|
+
const dropAt = ref(null);
|
|
431
|
+
const moveStatus = ref("");
|
|
432
|
+
function orderedKeys() {
|
|
433
|
+
return sorted.value.map(rowKeyFor);
|
|
434
|
+
}
|
|
435
|
+
function commitMove(keys, from, to) {
|
|
436
|
+
emit("rowMove", { key: keys[from], from, to, keys: moveKey(keys, from, to) });
|
|
437
|
+
moveStatus.value = t("shared.datatable.reorder.moved", { position: to + 1, total: keys.length });
|
|
438
|
+
}
|
|
439
|
+
function finishDrag() {
|
|
440
|
+
dragKey.value = null;
|
|
441
|
+
dropAt.value = null;
|
|
442
|
+
}
|
|
443
|
+
function onHandleDragStart(event, row) {
|
|
444
|
+
if (reorderBlocked.value) {
|
|
445
|
+
event.preventDefault();
|
|
446
|
+
return;
|
|
447
|
+
}
|
|
448
|
+
const key = rowKeyFor(row);
|
|
449
|
+
dragKey.value = key;
|
|
450
|
+
if (event.dataTransfer) {
|
|
451
|
+
event.dataTransfer.effectAllowed = "move";
|
|
452
|
+
event.dataTransfer.setData("text/plain", String(key));
|
|
453
|
+
const rowEl = event.target?.closest('[role="row"]');
|
|
454
|
+
if (rowEl) event.dataTransfer.setDragImage(rowEl, 16, 16);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
function onRowDragOver(event, row) {
|
|
458
|
+
if (dragKey.value == null) return;
|
|
459
|
+
event.preventDefault();
|
|
460
|
+
if (event.dataTransfer) event.dataTransfer.dropEffect = "move";
|
|
461
|
+
const rect = event.currentTarget.getBoundingClientRect();
|
|
462
|
+
dropAt.value = { key: rowKeyFor(row), edge: dropEdge(event.clientY, rect.top, rect.height) };
|
|
463
|
+
}
|
|
464
|
+
function onRowDrop(event, row) {
|
|
465
|
+
if (dragKey.value == null) return;
|
|
466
|
+
event.preventDefault();
|
|
467
|
+
const keys = orderedKeys();
|
|
468
|
+
const from = keys.indexOf(dragKey.value);
|
|
469
|
+
const target = keys.indexOf(rowKeyFor(row));
|
|
470
|
+
const edge = dropAt.value?.edge ?? "before";
|
|
471
|
+
finishDrag();
|
|
472
|
+
const to = dropTargetIndex(from, target, edge);
|
|
473
|
+
if (to !== null) commitMove(keys, from, to);
|
|
474
|
+
}
|
|
475
|
+
function onHandleKeydown(event, row) {
|
|
476
|
+
if (event.key !== "ArrowUp" && event.key !== "ArrowDown") return;
|
|
477
|
+
event.preventDefault();
|
|
478
|
+
if (reorderBlocked.value) return;
|
|
479
|
+
const keys = orderedKeys();
|
|
480
|
+
const key = rowKeyFor(row);
|
|
481
|
+
const from = keys.indexOf(key);
|
|
482
|
+
const to = stepTarget(from, event.key === "ArrowUp" ? -1 : 1, keys.length);
|
|
483
|
+
if (to === null) return;
|
|
484
|
+
commitMove(keys, from, to);
|
|
485
|
+
const handle = event.currentTarget;
|
|
486
|
+
const root = handle.closest('[role="table"]');
|
|
487
|
+
void nextTick(() => setTimeout(() => {
|
|
488
|
+
const again = root?.querySelector(`[data-move-key="${CSS.escape(String(key))}"]`);
|
|
489
|
+
again?.focus();
|
|
490
|
+
}, 0));
|
|
491
|
+
}
|
|
492
|
+
function dropClass(row) {
|
|
493
|
+
const at = dropAt.value;
|
|
494
|
+
if (!at || dragKey.value == null || at.key !== rowKeyFor(row)) return "";
|
|
495
|
+
return at.edge === "before" ? "shadow-[inset_0_2px_0_0_var(--color-primary)]" : "shadow-[inset_0_-2px_0_0_var(--color-primary)]";
|
|
496
|
+
}
|
|
497
|
+
function rowGround(row) {
|
|
498
|
+
if (props.activeRowKey != null && rowKeyFor(row) === props.activeRowKey) return "bg-primary/[0.06]";
|
|
499
|
+
return props.rowClass?.(row) || "bg-gray-50";
|
|
500
|
+
}
|
|
397
501
|
function defaultCell(col, row) {
|
|
398
502
|
const v = col.sortGetter ? col.sortGetter(row) : row[col.key];
|
|
399
503
|
if (v == null) return "\u2014";
|
|
@@ -678,6 +782,11 @@ function defaultCell(col, row) {
|
|
|
678
782
|
:class="scrollBody ? 'sticky top-0 z-10' : ''"
|
|
679
783
|
:style="SUBGRID_ROW"
|
|
680
784
|
>
|
|
785
|
+
<!-- The handle column's heading: nothing to see, but a columnheader the
|
|
786
|
+
handles' cells can be named by. -->
|
|
787
|
+
<div v-if="reorderable" role="columnheader" class="w-6">
|
|
788
|
+
<span class="sr-only">{{ t("shared.datatable.reorder.column") }}</span>
|
|
789
|
+
</div>
|
|
681
790
|
<!-- `columnheader` is what names every cell underneath it, so this is
|
|
682
791
|
the half of the fix that does the work. `aria-sort` goes with it:
|
|
683
792
|
a heading that carries a sort button and says nothing about the
|
|
@@ -690,7 +799,7 @@ function defaultCell(col, row) {
|
|
|
690
799
|
:aria-sort="ariaSortFor(col)"
|
|
691
800
|
:title="col.label || void 0"
|
|
692
801
|
class="min-w-0"
|
|
693
|
-
:class="col.alignRight ?
|
|
802
|
+
:class="col.alignRight ? RIGHT_ALIGNED : ''"
|
|
694
803
|
>
|
|
695
804
|
<!-- `#header-<key>` lets a page take over a header cell (e.g. a
|
|
696
805
|
select-all checkbox in a selection column). Default: sortable
|
|
@@ -728,7 +837,7 @@ function defaultCell(col, row) {
|
|
|
728
837
|
<!-- Spans every column like the rows do, so a table wide enough to
|
|
729
838
|
scroll does not show this band stopping short of the rows it
|
|
730
839
|
groups. No subgrid: it holds one cell, not a set of columns. -->
|
|
731
|
-
<div role="cell" :aria-colspan="
|
|
840
|
+
<div role="cell" :aria-colspan="renderColumns.length" class="flex items-center gap-2">
|
|
732
841
|
{{ entry.label }}
|
|
733
842
|
<span class="tabular-nums normal-case text-muted-foreground/70">{{ entry.count }}</span>
|
|
734
843
|
</div>
|
|
@@ -736,16 +845,40 @@ function defaultCell(col, row) {
|
|
|
736
845
|
<div
|
|
737
846
|
v-else
|
|
738
847
|
role="row"
|
|
739
|
-
class="group grid items-center gap-x-2 border-t border-black/[0.04] px-4 py-3 cursor-pointer
|
|
848
|
+
class="group grid items-center gap-x-2 border-t border-black/[0.04] px-4 py-3 cursor-pointer transition-colors"
|
|
849
|
+
:class="[rowGround(entry.row), dropClass(entry.row), dragKey != null && dragKey === rowKeyFor(entry.row) ? 'opacity-50' : '']"
|
|
850
|
+
:aria-current="activeRowKey != null && rowKeyFor(entry.row) === activeRowKey ? 'true' : void 0"
|
|
740
851
|
:style="SUBGRID_ROW"
|
|
741
852
|
@click="emit('rowClick', entry.row)"
|
|
853
|
+
@dragover="onRowDragOver($event, entry.row)"
|
|
854
|
+
@drop="onRowDrop($event, entry.row)"
|
|
742
855
|
>
|
|
856
|
+
<!-- The grip. A button, so it is reachable and the arrow keys can move
|
|
857
|
+
the row; `draggable` on it rather than on the row, so selecting a
|
|
858
|
+
cell's text or clicking an inline input never starts a drag. -->
|
|
859
|
+
<div v-if="reorderable" role="cell" class="flex items-center" @click.stop>
|
|
860
|
+
<button
|
|
861
|
+
type="button"
|
|
862
|
+
:data-move-key="String(rowKeyFor(entry.row))"
|
|
863
|
+
:draggable="!reorderBlocked"
|
|
864
|
+
:aria-disabled="reorderBlocked ? 'true' : void 0"
|
|
865
|
+
:aria-label="t('shared.datatable.reorder.handle')"
|
|
866
|
+
:title="reorderBlocked ?? t('shared.datatable.reorder.hint')"
|
|
867
|
+
class="inline-flex size-6 items-center justify-center rounded-md text-muted-foreground transition-colors"
|
|
868
|
+
:class="reorderBlocked ? 'cursor-not-allowed opacity-30' : 'cursor-grab hover:bg-muted hover:text-primary active:cursor-grabbing'"
|
|
869
|
+
@dragstart="onHandleDragStart($event, entry.row)"
|
|
870
|
+
@dragend="finishDrag"
|
|
871
|
+
@keydown="onHandleKeydown($event, entry.row)"
|
|
872
|
+
>
|
|
873
|
+
<DragHandle :size="14" weight="Linear" />
|
|
874
|
+
</button>
|
|
875
|
+
</div>
|
|
743
876
|
<div
|
|
744
877
|
v-for="col in visibleColumns"
|
|
745
878
|
:key="col.key"
|
|
746
879
|
role="cell"
|
|
747
880
|
class="min-w-0"
|
|
748
|
-
:class="col.alignRight ?
|
|
881
|
+
:class="col.alignRight ? RIGHT_ALIGNED : ''"
|
|
749
882
|
>
|
|
750
883
|
<slot :name="`cell-${col.key}`" :row="entry.row">
|
|
751
884
|
<!-- Primary column: bold record anchor + optional tinted icon tile. -->
|
|
@@ -781,7 +914,7 @@ function defaultCell(col, row) {
|
|
|
781
914
|
:style="SUBGRID_ROW"
|
|
782
915
|
>
|
|
783
916
|
<div
|
|
784
|
-
v-for="col in
|
|
917
|
+
v-for="col in renderColumns"
|
|
785
918
|
:key="col.key"
|
|
786
919
|
:class="col.alignRight ? 'flex justify-end' : ''"
|
|
787
920
|
>
|
|
@@ -799,8 +932,8 @@ function defaultCell(col, row) {
|
|
|
799
932
|
role="row"
|
|
800
933
|
class="col-[1/-1] px-3 py-8 text-center text-sm text-muted-foreground"
|
|
801
934
|
>
|
|
802
|
-
<div role="cell" :aria-colspan="
|
|
803
|
-
<slot name="empty">
|
|
935
|
+
<div role="cell" :aria-colspan="renderColumns.length">
|
|
936
|
+
<slot name="empty" :query="query" :filters="activeNarrowing" :clear="clearNarrowing">
|
|
804
937
|
{{ emptyText ?? t("shared.datatable.empty.default") }}
|
|
805
938
|
</slot>
|
|
806
939
|
</div>
|
|
@@ -829,11 +962,18 @@ function defaultCell(col, row) {
|
|
|
829
962
|
</div>
|
|
830
963
|
</div>
|
|
831
964
|
|
|
965
|
+
<!-- Result count, spoken. Outside the table role: a live region is not
|
|
966
|
+
a row, and the table may own rows only. -->
|
|
967
|
+
<span role="status" class="sr-only">{{ liveStatus }}</span>
|
|
968
|
+
<!-- A move, said once: a reader who stepped a row with the arrow keys
|
|
969
|
+
hears where it landed. -->
|
|
970
|
+
<span v-if="reorderable" role="status" class="sr-only">{{ moveStatus }}</span>
|
|
971
|
+
|
|
832
972
|
<!-- Footer ------------------------------------------------------- -->
|
|
833
973
|
<div
|
|
834
974
|
v-if="showFooter"
|
|
835
975
|
ref="footerEl"
|
|
836
|
-
class="flex items-center justify-between gap-2 border-t border-gray-200 bg-white/55 backdrop-blur-md px-4 py-3 text-sm text-muted-foreground
|
|
976
|
+
class="flex items-center justify-between gap-2 border-t border-gray-200 bg-white/55 backdrop-blur-md px-4 py-3 text-sm text-muted-foreground"
|
|
837
977
|
>
|
|
838
978
|
<div class="flex items-center gap-2.5">
|
|
839
979
|
<span class="tabular-nums">
|
|
@@ -855,7 +995,7 @@ function defaultCell(col, row) {
|
|
|
855
995
|
<Button
|
|
856
996
|
variant="outline"
|
|
857
997
|
size="sm"
|
|
858
|
-
class="h-7 text-sm"
|
|
998
|
+
class="h-7 text-sm disabled:opacity-100 disabled:text-muted-foreground"
|
|
859
999
|
:disabled="page === 0 || loading"
|
|
860
1000
|
@click="prevPage"
|
|
861
1001
|
>
|
|
@@ -867,7 +1007,7 @@ function defaultCell(col, row) {
|
|
|
867
1007
|
<Button
|
|
868
1008
|
variant="outline"
|
|
869
1009
|
size="sm"
|
|
870
|
-
class="h-7 text-sm"
|
|
1010
|
+
class="h-7 text-sm disabled:opacity-100 disabled:text-muted-foreground"
|
|
871
1011
|
:disabled="page >= lastPage || loading"
|
|
872
1012
|
@click="nextPage"
|
|
873
1013
|
>
|
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
|
-
readonly "onUpdate:sort"?: ((value: SortState) => any) | undefined;
|
|
6
|
-
readonly "onUpdate:page"?: ((value: number) => any) | undefined;
|
|
7
|
-
readonly "onUpdate:viewMode"?: ((value: string) => any) | undefined;
|
|
8
|
-
readonly "onUpdate:railOpen"?: ((value: boolean) => any) | undefined;
|
|
9
|
-
readonly "onUpdate:facetSelection"?: ((value: FacetSelection) => any) | undefined;
|
|
10
|
-
readonly onRowClick?: ((row: T) => any) | undefined;
|
|
11
|
-
readonly onStateChange?: ((state: DataTableState) => any) | undefined;
|
|
12
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:sort" | "onUpdate:page" | "onUpdate:viewMode" | "onUpdate:railOpen" | "onUpdate:facetSelection" | "onRowClick" | "onStateChange"> & ({
|
|
1
|
+
import { Eye } from '#solar-icons';
|
|
2
|
+
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<({
|
|
13
4
|
data: T[];
|
|
14
|
-
columns:
|
|
15
|
-
rowKey:
|
|
5
|
+
columns: Eye<T>[];
|
|
6
|
+
rowKey: Eye<T>;
|
|
16
7
|
/** `label` is the field's accessible name; it defaults to the placeholder
|
|
17
8
|
* where the surface wrote one (see `searchLabel`). */
|
|
18
9
|
search?: boolean | {
|
|
@@ -29,7 +20,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
29
20
|
};
|
|
30
21
|
/** Built-in status/dimension filter pills (static mode). One dimension, or
|
|
31
22
|
* several (each renders as its own sub-menu). */
|
|
32
|
-
filterTabs?:
|
|
23
|
+
filterTabs?: Eye<T> | Eye<T>[];
|
|
33
24
|
/**
|
|
34
25
|
* The surface's declared dimensions, as one facet model (PE-6xx).
|
|
35
26
|
*
|
|
@@ -46,17 +37,17 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
46
37
|
* second placement: a tree pinned in a left column beside a panel is two
|
|
47
38
|
* places to look and two commit rules for one question.
|
|
48
39
|
*/
|
|
49
|
-
facets?:
|
|
40
|
+
facets?: Eye[];
|
|
50
41
|
/** Say which facet each chip belongs to (see `FacetChips.showFacet`). */
|
|
51
42
|
chipFacetLabels?: boolean;
|
|
52
43
|
/** Saved views control — the surface supplies snapshot/apply, the table
|
|
53
44
|
* owns the control, the storage and the dialogs. */
|
|
54
|
-
savedViews?:
|
|
45
|
+
savedViews?: Eye | null;
|
|
55
46
|
/** View-mode switch (e.g. List | Gallery). Any mode other than `list`
|
|
56
47
|
* renders the `#view` slot in place of the table body. */
|
|
57
|
-
viewModes?:
|
|
48
|
+
viewModes?: Eye[] | null;
|
|
58
49
|
/** Collapse handle for the surface's left rail (see `ListSurface`). */
|
|
59
|
-
rail?: boolean |
|
|
50
|
+
rail?: boolean | Eye;
|
|
60
51
|
/**
|
|
61
52
|
* Scroll the ROWS inside the table instead of the page.
|
|
62
53
|
*
|
|
@@ -95,8 +86,32 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
95
86
|
emptyText?: string;
|
|
96
87
|
groupBy?: ((row: T) => string[]) | null;
|
|
97
88
|
groupEmptyLabel?: string;
|
|
89
|
+
/** The row whose record is open beside the table (a DetailSheet), marked so
|
|
90
|
+
* reading down the list keeps the place visible (PE-690). */
|
|
91
|
+
activeRowKey?: string | number | null;
|
|
92
|
+
/**
|
|
93
|
+
* A row's own tint — a quantity tier set apart under the SKU it belongs to.
|
|
94
|
+
* Replaces the row's default ground rather than stacking on it: two
|
|
95
|
+
* translucent backgrounds on one element are whichever Tailwind emitted last.
|
|
96
|
+
*/
|
|
97
|
+
rowClass?: ((row: T) => string | null | undefined) | null;
|
|
98
|
+
/**
|
|
99
|
+
* Rows the operator orders by dragging (PE-952). Draws a handle in a leading
|
|
100
|
+
* column; a drop — or the arrow keys on a focused handle — emits `rowMove`
|
|
101
|
+
* with the new order. The table writes nothing: what a position MEANS, and
|
|
102
|
+
* which rows have to be written for it, is the surface's to decide.
|
|
103
|
+
*/
|
|
104
|
+
reorderable?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Why the handles are off right now, or null when they are on. The surface
|
|
107
|
+
* knows the cases this component cannot see — a sort that is not the
|
|
108
|
+
* sequence, a write still in flight. The table adds its own: a search, a
|
|
109
|
+
* filter or a grouping, under any of which "the row above" is not the row
|
|
110
|
+
* above in the sequence.
|
|
111
|
+
*/
|
|
112
|
+
reorderDisabled?: string | null;
|
|
98
113
|
} & {
|
|
99
|
-
sort?:
|
|
114
|
+
sort?: Eye;
|
|
100
115
|
page?: number;
|
|
101
116
|
viewMode?: string;
|
|
102
117
|
railOpen?: boolean;
|
|
@@ -106,14 +121,31 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
106
121
|
* write to one place — and so the surface can seed it from a saved view or a
|
|
107
122
|
* URL without this component holding a second copy to drift from.
|
|
108
123
|
*/
|
|
109
|
-
facetSelection?:
|
|
110
|
-
}) &
|
|
111
|
-
|
|
124
|
+
facetSelection?: Eye;
|
|
125
|
+
}) & {
|
|
126
|
+
onRowClick?: ((row: T) => any) | undefined;
|
|
127
|
+
onStateChange?: ((state: DataTableState) => any) | undefined;
|
|
128
|
+
onOrderChange?: ((keys: (string | number)[]) => any) | undefined;
|
|
129
|
+
onRowMove?: ((move: {
|
|
130
|
+
key: string | number;
|
|
131
|
+
from: number;
|
|
132
|
+
to: number;
|
|
133
|
+
keys: (string | number)[];
|
|
134
|
+
}) => any) | undefined;
|
|
135
|
+
"onUpdate:sort"?: ((value: SortState) => any) | undefined;
|
|
136
|
+
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
137
|
+
"onUpdate:viewMode"?: ((value: string) => any) | undefined;
|
|
138
|
+
"onUpdate:railOpen"?: ((value: boolean) => any) | undefined;
|
|
139
|
+
"onUpdate:facetSelection"?: ((value: FacetSelection) => any) | undefined;
|
|
140
|
+
}> & (typeof globalThis extends {
|
|
141
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
142
|
+
} ? P : {});
|
|
143
|
+
expose: (exposed: {}) => void;
|
|
112
144
|
attrs: any;
|
|
113
145
|
slots: {
|
|
114
|
-
[x:
|
|
146
|
+
[x: `header-${any}`]: ((props: {}) => any) | undefined;
|
|
115
147
|
} & {
|
|
116
|
-
[x:
|
|
148
|
+
[x: `cell-${any}`]: ((props: {
|
|
117
149
|
row: any;
|
|
118
150
|
}) => any) | undefined;
|
|
119
151
|
} & {
|
|
@@ -129,16 +161,28 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
129
161
|
} & {
|
|
130
162
|
view?: (props: {
|
|
131
163
|
rows: any;
|
|
132
|
-
loading:
|
|
164
|
+
loading: boolean;
|
|
133
165
|
}) => any;
|
|
134
166
|
} & {
|
|
135
|
-
empty?: (props: {
|
|
167
|
+
empty?: (props: {
|
|
168
|
+
query: any;
|
|
169
|
+
filters: any;
|
|
170
|
+
clear: () => void;
|
|
171
|
+
}) => any;
|
|
136
172
|
};
|
|
137
|
-
emit: (((evt: "rowClick", row: T) => void) & ((evt: "stateChange", state: DataTableState) => void)
|
|
173
|
+
emit: (((evt: "rowClick", row: T) => void) & ((evt: "stateChange", state: DataTableState) => void) & ((evt: "orderChange", keys: (string | number)[]) => void) & ((evt: "rowMove", move: {
|
|
174
|
+
key: string | number;
|
|
175
|
+
from: number;
|
|
176
|
+
to: number;
|
|
177
|
+
keys: (string | number)[];
|
|
178
|
+
}) => void)) & (((event: "update:sort", value: SortState) => void) & ((event: "update:page", value: number) => void) & ((event: "update:viewMode", value: string) => void) & ((event: "update:railOpen", value: boolean) => void) & ((event: "update:facetSelection", value: FacetSelection) => void));
|
|
138
179
|
}>) => import("vue").VNode & {
|
|
139
|
-
__ctx?: Awaited<typeof __VLS_setup
|
|
180
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
140
181
|
};
|
|
182
|
+
declare const _default: typeof __VLS_export;
|
|
141
183
|
export default _default;
|
|
142
|
-
type __VLS_PrettifyLocal<T> = {
|
|
184
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
143
185
|
[K in keyof T]: T[K];
|
|
144
|
-
}
|
|
186
|
+
} : {
|
|
187
|
+
[K in keyof T as K]: T[K];
|
|
188
|
+
}) & {};
|
|
@@ -8,9 +8,10 @@ type __VLS_Props = {
|
|
|
8
8
|
*/
|
|
9
9
|
showFacet?: boolean;
|
|
10
10
|
};
|
|
11
|
-
declare const
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
12
|
"update:modelValue": (value: FacetSelection) => any;
|
|
13
13
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
14
|
"onUpdate:modelValue"?: ((value: FacetSelection) => any) | undefined;
|
|
15
15
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
16
17
|
export default _default;
|
|
@@ -8,9 +8,10 @@ type __VLS_Props = {
|
|
|
8
8
|
*/
|
|
9
9
|
showFacet?: boolean;
|
|
10
10
|
};
|
|
11
|
-
declare const
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
12
|
"update:modelValue": (value: FacetSelection) => any;
|
|
13
13
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
14
|
"onUpdate:modelValue"?: ((value: FacetSelection) => any) | undefined;
|
|
15
15
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
16
17
|
export default _default;
|
|
@@ -6,15 +6,16 @@ type __VLS_Props = {
|
|
|
6
6
|
modelValue: FacetSelection;
|
|
7
7
|
size?: 'sm' | 'default';
|
|
8
8
|
};
|
|
9
|
-
declare const
|
|
10
|
-
apply: (value: FacetSelection) => any;
|
|
11
|
-
"update:modelValue": (value: FacetSelection) => any;
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
10
|
reset: () => any;
|
|
11
|
+
"update:modelValue": (value: FacetSelection) => any;
|
|
12
|
+
apply: (value: FacetSelection) => any;
|
|
13
13
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
-
onApply?: ((value: FacetSelection) => any) | undefined;
|
|
15
|
-
"onUpdate:modelValue"?: ((value: FacetSelection) => any) | undefined;
|
|
16
14
|
onReset?: (() => any) | undefined;
|
|
15
|
+
"onUpdate:modelValue"?: ((value: FacetSelection) => any) | undefined;
|
|
16
|
+
onApply?: ((value: FacetSelection) => any) | undefined;
|
|
17
17
|
}>, {
|
|
18
18
|
size: "sm" | "default";
|
|
19
19
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
20
21
|
export default _default;
|