@revenexx/studio-shared 0.4.0 → 0.4.2
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 +5 -3
- package/dist/module.json +2 -2
- package/dist/module.mjs +7 -3
- package/dist/runtime/components/Dashboard/DashboardConfirmDialog.vue +1 -1
- package/dist/runtime/components/Dashboard/DashboardGrid.vue +45 -1
- package/dist/runtime/components/Dashboard/DashboardNameDialog.vue +1 -1
- package/dist/runtime/components/Dashboard/DashboardPickerDialog.vue +1 -1
- package/dist/runtime/components/Dashboard/DashboardShareDialog.vue +1 -1
- package/dist/runtime/components/Dashboard/DashboardWidgetConfigDialog.vue +1 -1
- package/dist/runtime/components/Dashboard/DashboardWidgetFrame.d.vue.ts +2 -2
- package/dist/runtime/components/Dashboard/DashboardWidgetFrame.vue +14 -3
- package/dist/runtime/components/Dashboard/DashboardWidgetFrame.vue.d.ts +2 -2
- package/dist/runtime/components/DataTable/DataTable.d.vue.ts +73 -34
- package/dist/runtime/components/DataTable/DataTable.vue +352 -52
- package/dist/runtime/components/DataTable/DataTable.vue.d.ts +73 -34
- package/dist/runtime/components/DataTable/FacetPanel.vue +57 -8
- package/dist/runtime/components/DataTable/FilterMenu.vue +5 -5
- package/dist/runtime/components/DataTable/SavedViewsMenu.vue +61 -12
- package/dist/runtime/components/DataTable/SortMenu.vue +4 -1
- package/dist/runtime/components/DataTable/ToolbarLabelTrigger.d.vue.ts +23 -0
- package/dist/runtime/components/DataTable/ToolbarLabelTrigger.vue +29 -0
- package/dist/runtime/components/DataTable/ToolbarLabelTrigger.vue.d.ts +23 -0
- package/dist/runtime/components/DataTable/types.d.ts +17 -0
- package/dist/runtime/components/Form/FieldGrid.vue +1 -1
- package/dist/runtime/components/Form/SaveBar.d.vue.ts +1 -1
- package/dist/runtime/components/Form/SaveBar.vue.d.ts +1 -1
- package/dist/runtime/components/Media/MediaFolderTree.d.vue.ts +4 -4
- package/dist/runtime/components/Media/MediaFolderTree.vue +1 -2
- package/dist/runtime/components/Media/MediaFolderTree.vue.d.ts +4 -4
- package/dist/runtime/components/Media/MediaPickerDialog.d.vue.ts +11 -0
- package/dist/runtime/components/Media/MediaPickerDialog.vue +206 -54
- package/dist/runtime/components/Media/MediaPickerDialog.vue.d.ts +11 -0
- package/dist/runtime/components/Media/MediaUploader.vue +1 -1
- package/dist/runtime/components/Shared/AppIcon.d.vue.ts +1 -1
- package/dist/runtime/components/Shared/AppIcon.vue.d.ts +1 -1
- package/dist/runtime/components/Shared/CardSizeToggle.d.vue.ts +11 -0
- package/dist/runtime/components/Shared/CardSizeToggle.vue +19 -0
- package/dist/runtime/components/Shared/CardSizeToggle.vue.d.ts +11 -0
- package/dist/runtime/components/Shared/DetailSheet.d.vue.ts +1 -1
- package/dist/runtime/components/Shared/DetailSheet.vue +9 -5
- package/dist/runtime/components/Shared/DetailSheet.vue.d.ts +1 -1
- package/dist/runtime/components/Shared/EmptyNote.d.vue.ts +19 -0
- package/dist/runtime/components/Shared/EmptyNote.vue +25 -0
- package/dist/runtime/components/Shared/EmptyNote.vue.d.ts +19 -0
- package/dist/runtime/components/Shared/KpiTile.d.vue.ts +6 -0
- package/dist/runtime/components/Shared/KpiTile.vue +10 -9
- package/dist/runtime/components/Shared/KpiTile.vue.d.ts +6 -0
- package/dist/runtime/components/Shared/PageHeader.vue +15 -4
- package/dist/runtime/components/Shared/RecordLayout.vue +1 -2
- package/dist/runtime/components/Shared/RecordRailCard.vue +3 -3
- package/dist/runtime/components/Shared/SelectionBar.d.vue.ts +22 -0
- package/dist/runtime/components/Shared/SelectionBar.vue +40 -0
- package/dist/runtime/components/Shared/SelectionBar.vue.d.ts +22 -0
- package/dist/runtime/components/Shared/SidebarNav.d.vue.ts +36 -2
- package/dist/runtime/components/Shared/SidebarNav.vue +74 -25
- package/dist/runtime/components/Shared/SidebarNav.vue.d.ts +36 -2
- package/dist/runtime/components/Shared/SidebarNavAreas.d.vue.ts +7 -0
- package/dist/runtime/components/Shared/SidebarNavAreas.vue +291 -0
- package/dist/runtime/components/Shared/SidebarNavAreas.vue.d.ts +7 -0
- package/dist/runtime/components/Shared/SidebarNavLink.d.vue.ts +1 -9
- package/dist/runtime/components/Shared/SidebarNavLink.vue +31 -5
- package/dist/runtime/components/Shared/SidebarNavLink.vue.d.ts +1 -9
- package/dist/runtime/components/Shared/SortHeader.vue +6 -2
- package/dist/runtime/components/Shared/StateCard.vue +1 -1
- package/dist/runtime/components/Shared/TabBar.vue +6 -7
- package/dist/runtime/components/Shared/Wizard.d.vue.ts +11 -1
- package/dist/runtime/components/Shared/Wizard.vue +9 -5
- package/dist/runtime/components/Shared/Wizard.vue.d.ts +11 -1
- package/dist/runtime/composables/useMediaLibrary.d.ts +12 -0
- package/dist/runtime/composables/useSavedViews.d.ts +11 -1
- package/dist/runtime/composables/useSavedViews.js +4 -4
- package/dist/runtime/composables/useWidgetFigures.d.ts +12 -0
- package/dist/runtime/composables/useWidgetFigures.js +24 -0
- package/dist/runtime/composables/useWidgetHeader.d.ts +15 -0
- package/dist/runtime/composables/useWidgetHeader.js +15 -0
- package/dist/runtime/lib/auditEnvelope.d.ts +43 -0
- package/dist/runtime/lib/auditEnvelope.js +55 -0
- package/dist/runtime/lib/cardSize.d.ts +13 -0
- package/dist/runtime/lib/cardSize.js +20 -0
- package/dist/runtime/lib/dashboardIcons.js +2 -0
- package/dist/runtime/lib/dataTableFilters.d.ts +22 -0
- package/dist/runtime/lib/dataTableFilters.js +5 -0
- package/dist/runtime/lib/facets.d.ts +13 -0
- package/dist/runtime/lib/formLayout.d.ts +74 -4
- package/dist/runtime/lib/formLayout.js +53 -6
- package/dist/runtime/lib/gridTracks.d.ts +14 -1
- package/dist/runtime/lib/gridTracks.js +13 -2
- package/dist/runtime/lib/isoLists.d.ts +37 -2
- package/dist/runtime/lib/isoLists.js +54 -1
- package/dist/runtime/lib/notice.d.ts +14 -0
- package/dist/runtime/lib/notice.js +19 -0
- package/dist/runtime/lib/pageSize.d.ts +15 -0
- package/dist/runtime/lib/pageSize.js +26 -0
- package/dist/runtime/lib/sidebarAreas.d.ts +46 -0
- package/dist/runtime/lib/sidebarAreas.js +25 -0
- package/dist/runtime/lib/sidebarNav.d.ts +39 -2
- package/dist/runtime/lib/sidebarNav.js +30 -4
- package/dist/runtime/lib/solarIconMap.d.ts +2 -1
- package/dist/runtime/lib/solarIconMap.js +50 -4
- package/dist/runtime/lib/swipeToClose.d.ts +25 -0
- package/dist/runtime/lib/swipeToClose.js +118 -0
- package/dist/runtime/lib/tableExport.d.ts +31 -0
- package/dist/runtime/lib/tableExport.js +143 -0
- package/dist/runtime/lib/talkback.d.ts +5 -0
- package/dist/runtime/lib/talkback.js +8 -0
- package/dist/runtime/lib/talkbackTokenBatch.d.ts +35 -0
- package/dist/runtime/lib/talkbackTokenBatch.js +101 -0
- package/dist/runtime/types/nav.d.ts +9 -0
- package/dist/types.d.mts +4 -0
- package/package.json +4 -3
package/dist/module.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { NuxtModule } from '@nuxt/schema';
|
|
2
2
|
export * from '../dist/runtime/components/DataTable/types.js';
|
|
3
3
|
export * from '../dist/runtime/types/storage.js';
|
|
4
4
|
export * from '../dist/runtime/types/dashboard.js';
|
|
@@ -13,10 +13,12 @@ export { WidgetCategory, WidgetCategoryGroup, WidgetConfigField, WidgetDefinitio
|
|
|
13
13
|
export { StickyListView } from '../dist/runtime/composables/useStickyListView.js';
|
|
14
14
|
export { DetailSheetBinding } from '../dist/runtime/composables/useDetailSheet.js';
|
|
15
15
|
export { FloatingPanelDock, FloatingPanelMode, FloatingPanelOptions } from '../dist/runtime/composables/useFloatingPanel.js';
|
|
16
|
+
export { WidgetHeaderStatus } from '../dist/runtime/composables/useWidgetHeader.js';
|
|
17
|
+
export { WidgetFigure } from '../dist/runtime/composables/useWidgetFigures.js';
|
|
16
18
|
export { IsoOption } from '../dist/runtime/lib/isoLists.js';
|
|
17
19
|
export { Translate, TranslateNamed, Translator } from '../dist/runtime/lib/i18nBridge.js';
|
|
18
20
|
export { FieldSpan, FormContextRow, SectionOffset, SpanSource } from '../dist/runtime/lib/formLayout.js';
|
|
19
21
|
|
|
20
|
-
declare const
|
|
22
|
+
declare const studioShared: NuxtModule;
|
|
21
23
|
|
|
22
|
-
export {
|
|
24
|
+
export { studioShared as default };
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { join } from 'node:path';
|
|
2
2
|
import { defineNuxtModule, createResolver, addComponentsDir, addImports } from '@nuxt/kit';
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const studioShared = defineNuxtModule({
|
|
5
5
|
meta: {
|
|
6
6
|
name: "studio-shared",
|
|
7
7
|
configKey: "studioShared"
|
|
@@ -62,7 +62,11 @@ const module$1 = defineNuxtModule({
|
|
|
62
62
|
"useTalkbackPresence"
|
|
63
63
|
].map((name) => ({ name, from: join(runtime, "composables/useTalkbackChannels") })));
|
|
64
64
|
addImports([
|
|
65
|
-
{ name: "useDashboards", from: join(runtime, "composables/useDashboards") }
|
|
65
|
+
{ name: "useDashboards", from: join(runtime, "composables/useDashboards") },
|
|
66
|
+
// A widget's busy status, shown in its frame's header.
|
|
67
|
+
{ name: "useWidgetHeader", from: join(runtime, "composables/useWidgetHeader") },
|
|
68
|
+
// A widget's own figures, preferred over its screen text by readers.
|
|
69
|
+
{ name: "useWidgetFigures", from: join(runtime, "composables/useWidgetFigures") }
|
|
66
70
|
]);
|
|
67
71
|
addImports([
|
|
68
72
|
{ name: "useT", from: join(runtime, "composables/useT") },
|
|
@@ -71,4 +75,4 @@ const module$1 = defineNuxtModule({
|
|
|
71
75
|
}
|
|
72
76
|
});
|
|
73
77
|
|
|
74
|
-
export {
|
|
78
|
+
export { studioShared as default };
|
|
@@ -15,7 +15,7 @@ const t = useT();
|
|
|
15
15
|
<AlertDialog :open="open" @update:open="(o) => {
|
|
16
16
|
if (!o) emit('update:open', false);
|
|
17
17
|
}">
|
|
18
|
-
<AlertDialogContent>
|
|
18
|
+
<AlertDialogContent class="sm:max-w-xl">
|
|
19
19
|
<AlertDialogHeader>
|
|
20
20
|
<AlertDialogTitle>{{ title }}</AlertDialogTitle>
|
|
21
21
|
<AlertDialogDescription v-if="description">{{ description }}</AlertDialogDescription>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { GridItem, GridLayout } from "grid-layout-plus";
|
|
3
|
-
import { computed, ref, watch } from "vue";
|
|
3
|
+
import { computed, onBeforeUnmount, onMounted, ref, watch } from "vue";
|
|
4
4
|
import WidgetFrame from "./DashboardWidgetFrame.vue";
|
|
5
5
|
import WidgetHost from "./DashboardWidgetHost.vue";
|
|
6
6
|
import { useWidgetRegistry } from "../../lib/widgetRegistry";
|
|
@@ -36,6 +36,29 @@ function widgetFor(id) {
|
|
|
36
36
|
return props.widgets.find((w) => w.id === id);
|
|
37
37
|
}
|
|
38
38
|
const placedLayout = computed(() => internalLayout.value.filter((item) => !!widgetFor(item.i)));
|
|
39
|
+
const FLOW_BELOW = 1e3;
|
|
40
|
+
const PHONE_BELOW = 560;
|
|
41
|
+
const hostEl = ref(null);
|
|
42
|
+
const hostWidth = ref(0);
|
|
43
|
+
let hostObserver = null;
|
|
44
|
+
onMounted(() => {
|
|
45
|
+
if (!hostEl.value || typeof ResizeObserver === "undefined") return;
|
|
46
|
+
hostObserver = new ResizeObserver(([entry]) => {
|
|
47
|
+
hostWidth.value = entry?.contentRect.width ?? 0;
|
|
48
|
+
});
|
|
49
|
+
hostObserver.observe(hostEl.value);
|
|
50
|
+
});
|
|
51
|
+
onBeforeUnmount(() => hostObserver?.disconnect());
|
|
52
|
+
const flow = computed(() => !props.editing && hostWidth.value > 0 && hostWidth.value < FLOW_BELOW);
|
|
53
|
+
const flowPhone = computed(() => hostWidth.value < PHONE_BELOW);
|
|
54
|
+
const flowItems = computed(() => placedLayout.value.slice().sort((a, b) => a.y - b.y || a.x - b.x));
|
|
55
|
+
function flowStyle(item) {
|
|
56
|
+
const span = flowPhone.value ? item.w <= 3 ? 1 : 2 : item.w <= 3 ? 2 : item.w <= 6 ? 3 : 6;
|
|
57
|
+
return {
|
|
58
|
+
gridColumn: `span ${span} / span ${span}`,
|
|
59
|
+
minHeight: `${item.h * 20 + (item.h - 1) * 12}px`
|
|
60
|
+
};
|
|
61
|
+
}
|
|
39
62
|
</script>
|
|
40
63
|
|
|
41
64
|
<template>
|
|
@@ -43,7 +66,27 @@ const placedLayout = computed(() => internalLayout.value.filter((item) => !!widg
|
|
|
43
66
|
sides, so without this the widgets sit one gutter inside the page padding
|
|
44
67
|
and one inside the header. Cancelling it on three sides keeps the gaps
|
|
45
68
|
between widgets and drops the duplicated outer one. -->
|
|
69
|
+
<div ref="hostEl">
|
|
70
|
+
<div
|
|
71
|
+
v-if="flow"
|
|
72
|
+
class="grid gap-3"
|
|
73
|
+
:class="flowPhone ? 'grid-cols-2' : 'grid-cols-6'"
|
|
74
|
+
data-testid="dashboard-flow"
|
|
75
|
+
>
|
|
76
|
+
<div v-for="item in flowItems" :key="item.i" class="grid min-w-0 grid-cols-1" :style="flowStyle(item)">
|
|
77
|
+
<WidgetFrame
|
|
78
|
+
:definition="registry.get(widgetFor(item.i).type)"
|
|
79
|
+
:title="widgetFor(item.i).title"
|
|
80
|
+
:configurable="!!registry.get(widgetFor(item.i).type)?.configFields?.length"
|
|
81
|
+
@configure="emit('configure', item.i)"
|
|
82
|
+
@remove="emit('remove', item.i)"
|
|
83
|
+
>
|
|
84
|
+
<WidgetHost :widget="widgetFor(item.i)" />
|
|
85
|
+
</WidgetFrame>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
46
88
|
<GridLayout
|
|
89
|
+
v-else
|
|
47
90
|
v-model:layout="internalLayout"
|
|
48
91
|
class="relative z-0 -mx-3 -mt-3"
|
|
49
92
|
:col-num="12"
|
|
@@ -80,6 +123,7 @@ const placedLayout = computed(() => internalLayout.value.filter((item) => !!widg
|
|
|
80
123
|
</WidgetFrame>
|
|
81
124
|
</GridItem>
|
|
82
125
|
</GridLayout>
|
|
126
|
+
</div>
|
|
83
127
|
</template>
|
|
84
128
|
|
|
85
129
|
<style scoped>
|
|
@@ -30,7 +30,7 @@ function submit() {
|
|
|
30
30
|
|
|
31
31
|
<template>
|
|
32
32
|
<Dialog :open="open" @update:open="emit('update:open', $event)">
|
|
33
|
-
<DialogContent class="max-w-md">
|
|
33
|
+
<DialogContent class="sm:max-w-md">
|
|
34
34
|
<DialogHeader>
|
|
35
35
|
<DialogTitle>{{ title }}</DialogTitle>
|
|
36
36
|
<DialogDescription v-if="description">{{ description }}</DialogDescription>
|
|
@@ -35,7 +35,7 @@ function pick(id) {
|
|
|
35
35
|
|
|
36
36
|
<template>
|
|
37
37
|
<Dialog :open="open" @update:open="emit('update:open', $event)">
|
|
38
|
-
<DialogContent class="max-w-
|
|
38
|
+
<DialogContent class="sm:max-w-3xl">
|
|
39
39
|
<DialogHeader>
|
|
40
40
|
<DialogTitle>{{ t("dashboard.picker.title") }}</DialogTitle>
|
|
41
41
|
<DialogDescription>{{ t("dashboard.picker.description", { count: dashboards.length }) }}</DialogDescription>
|
|
@@ -87,7 +87,7 @@ function apply() {
|
|
|
87
87
|
|
|
88
88
|
<template>
|
|
89
89
|
<Dialog :open="open" @update:open="emit('update:open', $event)">
|
|
90
|
-
<DialogContent class="max-w-
|
|
90
|
+
<DialogContent class="sm:max-w-xl">
|
|
91
91
|
<DialogHeader>
|
|
92
92
|
<DialogTitle>{{ t("dashboard.share.title", { name: dashboard?.name ?? "" }) }}</DialogTitle>
|
|
93
93
|
<DialogDescription>{{ t("dashboard.share.description") }}</DialogDescription>
|
|
@@ -62,7 +62,7 @@ function apply() {
|
|
|
62
62
|
|
|
63
63
|
<template>
|
|
64
64
|
<Dialog :open="open" @update:open="emit('update:open', $event)">
|
|
65
|
-
<DialogContent class="max-w-
|
|
65
|
+
<DialogContent class="sm:max-w-xl">
|
|
66
66
|
<DialogHeader>
|
|
67
67
|
<DialogTitle>{{ heading }}</DialogTitle>
|
|
68
68
|
<DialogDescription>{{ subheading }}</DialogDescription>
|
|
@@ -5,11 +5,11 @@ type __VLS_Props = {
|
|
|
5
5
|
editing?: boolean;
|
|
6
6
|
configurable?: boolean;
|
|
7
7
|
};
|
|
8
|
-
declare var __VLS_1: {},
|
|
8
|
+
declare var __VLS_1: {}, __VLS_13: {};
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
10
|
default?: (props: typeof __VLS_1) => any;
|
|
11
11
|
} & {
|
|
12
|
-
default?: (props: typeof
|
|
12
|
+
default?: (props: typeof __VLS_13) => any;
|
|
13
13
|
};
|
|
14
14
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
15
|
remove: () => any;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { Progress } from "@revenexx/studio";
|
|
2
3
|
import { CloseCircle, MenuDots, Settings } from "#solar-icons";
|
|
3
4
|
import { computed } from "vue";
|
|
4
5
|
import WidgetIcon from "./DashboardWidgetIcon.vue";
|
|
6
|
+
import { provideWidgetHeader } from "../../composables/useWidgetHeader";
|
|
7
|
+
import { figuresText, provideWidgetFigures } from "../../composables/useWidgetFigures";
|
|
5
8
|
import { widgetTitle } from "../../lib/widgetRegistry";
|
|
6
9
|
const props = defineProps({
|
|
7
10
|
definition: { type: Object, required: false },
|
|
@@ -13,14 +16,17 @@ defineEmits(["configure", "remove"]);
|
|
|
13
16
|
const t = useT();
|
|
14
17
|
const heading = computed(() => widgetTitle(props.definition, t, props.title));
|
|
15
18
|
const bare = computed(() => props.definition?.bare === true);
|
|
19
|
+
const status = provideWidgetHeader();
|
|
20
|
+
const figures = provideWidgetFigures();
|
|
21
|
+
const figuresAttr = computed(() => figuresText(figures.value) || void 0);
|
|
16
22
|
</script>
|
|
17
23
|
|
|
18
24
|
<template>
|
|
19
|
-
<div class="relative h-full min-h-0" :class="editing ? 'select-none' : ''">
|
|
25
|
+
<div class="relative h-full min-h-0" :class="editing ? 'select-none' : ''" data-dashboard-widget :data-widget-title="heading" :data-widget-figures="figuresAttr">
|
|
20
26
|
<!-- Bare widgets keep the card surface they already had; the frame stays
|
|
21
27
|
out of the way so the migration is a move, not a redesign. -->
|
|
22
28
|
<template v-if="bare">
|
|
23
|
-
<div class="h-full min-h-0 overflow-hidden">
|
|
29
|
+
<div class="h-full min-h-0 overflow-hidden" data-widget-body>
|
|
24
30
|
<slot />
|
|
25
31
|
</div>
|
|
26
32
|
</template>
|
|
@@ -35,8 +41,13 @@ const bare = computed(() => props.definition?.bare === true);
|
|
|
35
41
|
{{ heading }}
|
|
36
42
|
</h3>
|
|
37
43
|
</div>
|
|
44
|
+
<div v-if="status" class="flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground" aria-live="polite">
|
|
45
|
+
<span class="truncate">{{ status.text }}</span>
|
|
46
|
+
<Progress v-if="status.busy && status.progress != null" :model-value="status.progress" class="h-1 w-16 shrink-0" />
|
|
47
|
+
<span v-else-if="status.busy" class="size-3 shrink-0 animate-spin rounded-full border-2 border-primary/25 border-t-primary" aria-hidden="true" />
|
|
48
|
+
</div>
|
|
38
49
|
</div>
|
|
39
|
-
<div class="min-h-0 flex-1 overflow-auto">
|
|
50
|
+
<div class="min-h-0 flex-1 overflow-auto" data-widget-body>
|
|
40
51
|
<slot />
|
|
41
52
|
</div>
|
|
42
53
|
</div>
|
|
@@ -5,11 +5,11 @@ type __VLS_Props = {
|
|
|
5
5
|
editing?: boolean;
|
|
6
6
|
configurable?: boolean;
|
|
7
7
|
};
|
|
8
|
-
declare var __VLS_1: {},
|
|
8
|
+
declare var __VLS_1: {}, __VLS_13: {};
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
10
|
default?: (props: typeof __VLS_1) => any;
|
|
11
11
|
} & {
|
|
12
|
-
default?: (props: typeof
|
|
12
|
+
default?: (props: typeof __VLS_13) => any;
|
|
13
13
|
};
|
|
14
14
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
15
|
remove: () => any;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Facet, FacetSelection } from '../../lib/facets.js';
|
|
2
|
+
import type { DataTableColumn, DataTableFilter, DataTableRail, DataTableSavedViews, DataTableState, DataTableViewMode, RowKey, SortState } from './types.js';
|
|
2
3
|
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
4
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<({
|
|
4
5
|
data: T[];
|
|
5
|
-
columns:
|
|
6
|
-
rowKey:
|
|
6
|
+
columns: DataTableColumn<T>[];
|
|
7
|
+
rowKey: RowKey<T>;
|
|
7
8
|
/** `label` is the field's accessible name; it defaults to the placeholder
|
|
8
9
|
* where the surface wrote one (see `searchLabel`). */
|
|
9
10
|
search?: boolean | {
|
|
@@ -20,7 +21,7 @@ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_se
|
|
|
20
21
|
};
|
|
21
22
|
/** Built-in status/dimension filter pills (static mode). One dimension, or
|
|
22
23
|
* several (each renders as its own sub-menu). */
|
|
23
|
-
filterTabs?:
|
|
24
|
+
filterTabs?: DataTableFilter<T> | DataTableFilter<T>[];
|
|
24
25
|
/**
|
|
25
26
|
* The surface's declared dimensions, as one facet model (PE-6xx).
|
|
26
27
|
*
|
|
@@ -37,17 +38,17 @@ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_se
|
|
|
37
38
|
* second placement: a tree pinned in a left column beside a panel is two
|
|
38
39
|
* places to look and two commit rules for one question.
|
|
39
40
|
*/
|
|
40
|
-
facets?:
|
|
41
|
+
facets?: Facet[];
|
|
41
42
|
/** Say which facet each chip belongs to (see `FacetChips.showFacet`). */
|
|
42
43
|
chipFacetLabels?: boolean;
|
|
43
44
|
/** Saved views control — the surface supplies snapshot/apply, the table
|
|
44
45
|
* owns the control, the storage and the dialogs. */
|
|
45
|
-
savedViews?:
|
|
46
|
+
savedViews?: DataTableSavedViews | null;
|
|
46
47
|
/** View-mode switch (e.g. List | Gallery). Any mode other than `list`
|
|
47
48
|
* renders the `#view` slot in place of the table body. */
|
|
48
|
-
viewModes?:
|
|
49
|
+
viewModes?: DataTableViewMode[] | null;
|
|
49
50
|
/** Collapse handle for the surface's left rail (see `ListSurface`). */
|
|
50
|
-
rail?: boolean |
|
|
51
|
+
rail?: boolean | DataTableRail;
|
|
51
52
|
/**
|
|
52
53
|
* Scroll the ROWS inside the table instead of the page.
|
|
53
54
|
*
|
|
@@ -73,6 +74,12 @@ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_se
|
|
|
73
74
|
scrollBody?: boolean | "fit" | {
|
|
74
75
|
maxHeight?: string;
|
|
75
76
|
};
|
|
77
|
+
/**
|
|
78
|
+
* Extra room `'fit'` keeps free under the table — for a bar the host floats
|
|
79
|
+
* over the bottom of the list while rows are selected, so it never covers
|
|
80
|
+
* the pagination row (Re-QA 18.10.).
|
|
81
|
+
*/
|
|
82
|
+
reserveBottom?: number;
|
|
76
83
|
pagination?: boolean | {
|
|
77
84
|
pageSize?: number;
|
|
78
85
|
};
|
|
@@ -110,18 +117,51 @@ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_se
|
|
|
110
117
|
* above in the sequence.
|
|
111
118
|
*/
|
|
112
119
|
reorderDisabled?: string | null;
|
|
120
|
+
/**
|
|
121
|
+
* Below 768px every row is drawn as a card — title, status badge, two lines
|
|
122
|
+
* of key facts — instead of a grid two columns of which fit (R4, Charge 2).
|
|
123
|
+
* Off for a table that is already narrow by nature.
|
|
124
|
+
*/
|
|
125
|
+
mobileCards?: boolean;
|
|
126
|
+
/** `localStorage` key the row-height choice is remembered under (D4). */
|
|
127
|
+
densityKey?: string;
|
|
128
|
+
/**
|
|
129
|
+
* Which table the rows-per-page choice is remembered for (PE-1052). Falls
|
|
130
|
+
* back to the saved views' `storageKey`; with neither, the size is not kept.
|
|
131
|
+
*/
|
|
132
|
+
pageSizeKey?: string | null;
|
|
133
|
+
/**
|
|
134
|
+
* A table set INTO a card on a detail page (Michael 14.10.): no frame or
|
|
135
|
+
* corners of its own, the grey head row running edge to edge, and the
|
|
136
|
+
* search row plain white — the tinted toolbar is a list page's chrome, and
|
|
137
|
+
* inside a card it read as a second box with too little contrast.
|
|
138
|
+
*/
|
|
139
|
+
embedded?: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* Draw the control row at all. A detail-page card hides it until the
|
|
142
|
+
* operator asks (the filter toggle in the card head, Michael 14.10.), so a
|
|
143
|
+
* table of three rows is three rows and not a toolbar with a table under it.
|
|
144
|
+
*/
|
|
145
|
+
toolbar?: boolean;
|
|
113
146
|
} & {
|
|
114
|
-
|
|
147
|
+
query?: string;
|
|
148
|
+
sort?: SortState;
|
|
115
149
|
page?: number;
|
|
116
150
|
viewMode?: string;
|
|
117
151
|
railOpen?: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Row height (D4, Charge 2). Standard is 44px with a second line only in the
|
|
154
|
+
* identifying column; compact is 36px and one line everywhere. The reader's
|
|
155
|
+
* choice, remembered across lists — it is about their screen, not one list.
|
|
156
|
+
*/
|
|
157
|
+
density?: "standard" | "compact";
|
|
118
158
|
/**
|
|
119
159
|
* The committed facet selection. Two-way so a chip removed under the toolbar,
|
|
120
160
|
* a facet picked in the surface's pinned rail and the panel's own Apply all
|
|
121
161
|
* write to one place — and so the surface can seed it from a saved view or a
|
|
122
162
|
* URL without this component holding a second copy to drift from.
|
|
123
163
|
*/
|
|
124
|
-
facetSelection?:
|
|
164
|
+
facetSelection?: FacetSelection;
|
|
125
165
|
}) & {
|
|
126
166
|
onRowClick?: ((row: T) => any) | undefined;
|
|
127
167
|
onStateChange?: ((state: DataTableState) => any) | undefined;
|
|
@@ -132,50 +172,49 @@ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_se
|
|
|
132
172
|
to: number;
|
|
133
173
|
keys: (string | number)[];
|
|
134
174
|
}) => any) | undefined;
|
|
175
|
+
"onUpdate:query"?: ((value: string) => any) | undefined;
|
|
135
176
|
"onUpdate:sort"?: ((value: SortState) => any) | undefined;
|
|
136
177
|
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
137
178
|
"onUpdate:viewMode"?: ((value: string) => any) | undefined;
|
|
138
179
|
"onUpdate:railOpen"?: ((value: boolean) => any) | undefined;
|
|
180
|
+
"onUpdate:density"?: ((value: "compact" | "standard") => any) | undefined;
|
|
139
181
|
"onUpdate:facetSelection"?: ((value: FacetSelection) => any) | undefined;
|
|
140
182
|
}> & (typeof globalThis extends {
|
|
141
183
|
__VLS_PROPS_FALLBACK: infer P;
|
|
142
184
|
} ? P : {});
|
|
143
|
-
expose: (exposed: {
|
|
185
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
186
|
+
visibleColumns: any;
|
|
187
|
+
}>) => void;
|
|
144
188
|
attrs: any;
|
|
145
189
|
slots: {
|
|
146
|
-
[
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
'
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
} & {
|
|
156
|
-
'toolbar-left'?: (props: {}) => any;
|
|
157
|
-
} & {
|
|
158
|
-
'toolbar-right'?: (props: {}) => any;
|
|
159
|
-
} & {
|
|
160
|
-
actions?: (props: {}) => any;
|
|
161
|
-
} & {
|
|
190
|
+
[name: `header-${string}`]: (props: Record<string, never>) => unknown;
|
|
191
|
+
[name: `cell-${string}`]: (props: {
|
|
192
|
+
row: T;
|
|
193
|
+
}) => unknown;
|
|
194
|
+
'filter-menu'?: (props: Record<string, never>) => unknown;
|
|
195
|
+
scope?: (props: Record<string, never>) => unknown;
|
|
196
|
+
'toolbar-left'?: (props: Record<string, never>) => unknown;
|
|
197
|
+
'toolbar-right'?: (props: Record<string, never>) => unknown;
|
|
198
|
+
actions?: (props: Record<string, never>) => unknown;
|
|
162
199
|
view?: (props: {
|
|
163
|
-
rows:
|
|
200
|
+
rows: T[];
|
|
164
201
|
loading: boolean;
|
|
165
|
-
}) =>
|
|
166
|
-
} & {
|
|
202
|
+
}) => unknown;
|
|
167
203
|
empty?: (props: {
|
|
168
|
-
query:
|
|
169
|
-
filters:
|
|
204
|
+
query: string;
|
|
205
|
+
filters: {
|
|
206
|
+
label: string;
|
|
207
|
+
values: string[];
|
|
208
|
+
}[];
|
|
170
209
|
clear: () => void;
|
|
171
|
-
}) =>
|
|
210
|
+
}) => unknown;
|
|
172
211
|
};
|
|
173
212
|
emit: (((evt: "rowClick", row: T) => void) & ((evt: "stateChange", state: DataTableState) => void) & ((evt: "orderChange", keys: (string | number)[]) => void) & ((evt: "rowMove", move: {
|
|
174
213
|
key: string | number;
|
|
175
214
|
from: number;
|
|
176
215
|
to: number;
|
|
177
216
|
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));
|
|
217
|
+
}) => void)) & (((event: "update:query", value: string) => 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:density", value: "compact" | "standard") => void) & ((event: "update:facetSelection", value: FacetSelection) => void));
|
|
179
218
|
}>) => import("vue").VNode & {
|
|
180
219
|
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
181
220
|
};
|