@revenexx/studio-shared 0.3.3 → 0.4.1
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 +7 -3
- package/dist/module.json +2 -2
- package/dist/module.mjs +10 -4
- package/dist/runtime/components/Dashboard/DashboardConfirmDialog.d.vue.ts +2 -1
- package/dist/runtime/components/Dashboard/DashboardConfirmDialog.vue +1 -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 +45 -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 +1 -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 +1 -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 +1 -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 +1 -1
- 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 +14 -3
- 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 +120 -37
- package/dist/runtime/components/DataTable/DataTable.vue +493 -53
- package/dist/runtime/components/DataTable/DataTable.vue.d.ts +120 -37
- 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 +57 -8
- 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 +5 -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 +61 -12
- 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 +4 -1
- package/dist/runtime/components/DataTable/SortMenu.vue.d.ts +4 -2
- 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/ViewModeSwitch.d.vue.ts +4 -2
- package/dist/runtime/components/DataTable/ViewModeSwitch.vue.d.ts +4 -2
- package/dist/runtime/components/DataTable/types.d.ts +17 -0
- 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 +6 -5
- package/dist/runtime/components/Media/MediaFolderTree.vue +1 -2
- package/dist/runtime/components/Media/MediaFolderTree.vue.d.ts +6 -5
- package/dist/runtime/components/Media/MediaPickerDialog.d.vue.ts +13 -1
- package/dist/runtime/components/Media/MediaPickerDialog.vue +206 -54
- package/dist/runtime/components/Media/MediaPickerDialog.vue.d.ts +13 -1
- package/dist/runtime/components/Media/MediaUploader.d.vue.ts +2 -1
- package/dist/runtime/components/Media/MediaUploader.vue +1 -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/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 +60 -0
- package/dist/runtime/components/Shared/DetailSheet.vue +211 -0
- package/dist/runtime/components/Shared/DetailSheet.vue.d.ts +60 -0
- 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/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 +8 -1
- package/dist/runtime/components/Shared/KpiTile.vue +10 -9
- package/dist/runtime/components/Shared/KpiTile.vue.d.ts +8 -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 +15 -4
- 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 +1 -2
- 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 +3 -3
- package/dist/runtime/components/Shared/RecordRailCard.vue.d.ts +3 -2
- 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 +39 -4
- package/dist/runtime/components/Shared/SidebarNav.vue +71 -25
- package/dist/runtime/components/Shared/SidebarNav.vue.d.ts +39 -4
- 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 +3 -10
- package/dist/runtime/components/Shared/SidebarNavLink.vue +31 -5
- package/dist/runtime/components/Shared/SidebarNavLink.vue.d.ts +3 -10
- package/dist/runtime/components/Shared/SortHeader.d.vue.ts +3 -2
- package/dist/runtime/components/Shared/SortHeader.vue +6 -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 +1 -1
- 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 +30 -13
- 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 +20 -7
- package/dist/runtime/components/Shared/Wizard.vue +9 -5
- package/dist/runtime/components/Shared/Wizard.vue.d.ts +20 -7
- package/dist/runtime/composables/useDetailSheet.d.ts +20 -0
- package/dist/runtime/composables/useDetailSheet.js +50 -0
- package/dist/runtime/composables/useMediaLibrary.d.ts +12 -0
- package/dist/runtime/composables/usePlatformTenant.d.ts +6 -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/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/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/detailSheet.d.ts +43 -0
- package/dist/runtime/lib/detailSheet.js +34 -0
- package/dist/runtime/lib/facets.d.ts +13 -0
- package/dist/runtime/lib/formLayout.d.ts +164 -0
- package/dist/runtime/lib/formLayout.js +117 -0
- package/dist/runtime/lib/formLayoutContext.d.ts +26 -0
- package/dist/runtime/lib/formLayoutContext.js +1 -0
- 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/rowMove.d.ts +38 -0
- package/dist/runtime/lib/rowMove.js +20 -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 +21 -2
- package/dist/runtime/lib/sidebarNav.js +23 -4
- package/dist/runtime/lib/solarIconMap.d.ts +16 -0
- package/dist/runtime/lib/solarIconMap.js +326 -0
- package/dist/runtime/lib/solarIcons.d.ts +37 -0
- package/dist/runtime/lib/solarIcons.js +25 -0
- 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 +8 -0
- package/package.json +4 -3
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import type { Facet, FacetSelection } from '../../lib/facets.js';
|
|
2
2
|
import type { DataTableColumn, DataTableFilter, DataTableRail, DataTableSavedViews, DataTableState, DataTableViewMode, RowKey, SortState } from './types.js';
|
|
3
|
-
declare const
|
|
4
|
-
props:
|
|
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"> & ({
|
|
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<{
|
|
4
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<({
|
|
13
5
|
data: T[];
|
|
14
6
|
columns: DataTableColumn<T>[];
|
|
15
7
|
rowKey: RowKey<T>;
|
|
@@ -82,6 +74,12 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
82
74
|
scrollBody?: boolean | "fit" | {
|
|
83
75
|
maxHeight?: string;
|
|
84
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;
|
|
85
83
|
pagination?: boolean | {
|
|
86
84
|
pageSize?: number;
|
|
87
85
|
};
|
|
@@ -95,11 +93,68 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
95
93
|
emptyText?: string;
|
|
96
94
|
groupBy?: ((row: T) => string[]) | null;
|
|
97
95
|
groupEmptyLabel?: string;
|
|
96
|
+
/** The row whose record is open beside the table (a DetailSheet), marked so
|
|
97
|
+
* reading down the list keeps the place visible (PE-690). */
|
|
98
|
+
activeRowKey?: string | number | null;
|
|
99
|
+
/**
|
|
100
|
+
* A row's own tint — a quantity tier set apart under the SKU it belongs to.
|
|
101
|
+
* Replaces the row's default ground rather than stacking on it: two
|
|
102
|
+
* translucent backgrounds on one element are whichever Tailwind emitted last.
|
|
103
|
+
*/
|
|
104
|
+
rowClass?: ((row: T) => string | null | undefined) | null;
|
|
105
|
+
/**
|
|
106
|
+
* Rows the operator orders by dragging (PE-952). Draws a handle in a leading
|
|
107
|
+
* column; a drop — or the arrow keys on a focused handle — emits `rowMove`
|
|
108
|
+
* with the new order. The table writes nothing: what a position MEANS, and
|
|
109
|
+
* which rows have to be written for it, is the surface's to decide.
|
|
110
|
+
*/
|
|
111
|
+
reorderable?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Why the handles are off right now, or null when they are on. The surface
|
|
114
|
+
* knows the cases this component cannot see — a sort that is not the
|
|
115
|
+
* sequence, a write still in flight. The table adds its own: a search, a
|
|
116
|
+
* filter or a grouping, under any of which "the row above" is not the row
|
|
117
|
+
* above in the sequence.
|
|
118
|
+
*/
|
|
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;
|
|
98
146
|
} & {
|
|
147
|
+
query?: string;
|
|
99
148
|
sort?: SortState;
|
|
100
149
|
page?: number;
|
|
101
150
|
viewMode?: string;
|
|
102
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";
|
|
103
158
|
/**
|
|
104
159
|
* The committed facet selection. Two-way so a chip removed under the toolbar,
|
|
105
160
|
* a facet picked in the surface's pinned rail and the panel's own Apply all
|
|
@@ -107,38 +162,66 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
107
162
|
* URL without this component holding a second copy to drift from.
|
|
108
163
|
*/
|
|
109
164
|
facetSelection?: FacetSelection;
|
|
110
|
-
}) &
|
|
111
|
-
|
|
165
|
+
}) & {
|
|
166
|
+
onRowClick?: ((row: T) => any) | undefined;
|
|
167
|
+
onStateChange?: ((state: DataTableState) => any) | undefined;
|
|
168
|
+
onOrderChange?: ((keys: (string | number)[]) => any) | undefined;
|
|
169
|
+
onRowMove?: ((move: {
|
|
170
|
+
key: string | number;
|
|
171
|
+
from: number;
|
|
172
|
+
to: number;
|
|
173
|
+
keys: (string | number)[];
|
|
174
|
+
}) => any) | undefined;
|
|
175
|
+
"onUpdate:query"?: ((value: string) => any) | undefined;
|
|
176
|
+
"onUpdate:sort"?: ((value: SortState) => any) | undefined;
|
|
177
|
+
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
178
|
+
"onUpdate:viewMode"?: ((value: string) => any) | undefined;
|
|
179
|
+
"onUpdate:railOpen"?: ((value: boolean) => any) | undefined;
|
|
180
|
+
"onUpdate:density"?: ((value: "compact" | "standard") => any) | undefined;
|
|
181
|
+
"onUpdate:facetSelection"?: ((value: FacetSelection) => any) | undefined;
|
|
182
|
+
}> & (typeof globalThis extends {
|
|
183
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
184
|
+
} ? P : {});
|
|
185
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
186
|
+
visibleColumns: any;
|
|
187
|
+
}>) => void;
|
|
112
188
|
attrs: any;
|
|
113
189
|
slots: {
|
|
114
|
-
[
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
'
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
} & {
|
|
124
|
-
'toolbar-left'?: (props: {}) => any;
|
|
125
|
-
} & {
|
|
126
|
-
'toolbar-right'?: (props: {}) => any;
|
|
127
|
-
} & {
|
|
128
|
-
actions?: (props: {}) => any;
|
|
129
|
-
} & {
|
|
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;
|
|
130
199
|
view?: (props: {
|
|
131
|
-
rows:
|
|
132
|
-
loading:
|
|
133
|
-
}) =>
|
|
134
|
-
|
|
135
|
-
|
|
200
|
+
rows: T[];
|
|
201
|
+
loading: boolean;
|
|
202
|
+
}) => unknown;
|
|
203
|
+
empty?: (props: {
|
|
204
|
+
query: string;
|
|
205
|
+
filters: {
|
|
206
|
+
label: string;
|
|
207
|
+
values: string[];
|
|
208
|
+
}[];
|
|
209
|
+
clear: () => void;
|
|
210
|
+
}) => unknown;
|
|
136
211
|
};
|
|
137
|
-
emit: (((evt: "rowClick", row: T) => void) & ((evt: "stateChange", state: DataTableState) => void)
|
|
212
|
+
emit: (((evt: "rowClick", row: T) => void) & ((evt: "stateChange", state: DataTableState) => void) & ((evt: "orderChange", keys: (string | number)[]) => void) & ((evt: "rowMove", move: {
|
|
213
|
+
key: string | number;
|
|
214
|
+
from: number;
|
|
215
|
+
to: number;
|
|
216
|
+
keys: (string | number)[];
|
|
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));
|
|
138
218
|
}>) => import("vue").VNode & {
|
|
139
|
-
__ctx?: Awaited<typeof __VLS_setup
|
|
219
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
140
220
|
};
|
|
221
|
+
declare const _default: typeof __VLS_export;
|
|
141
222
|
export default _default;
|
|
142
|
-
type __VLS_PrettifyLocal<T> = {
|
|
223
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
143
224
|
[K in keyof T]: T[K];
|
|
144
|
-
}
|
|
225
|
+
} : {
|
|
226
|
+
[K in keyof T as K]: T[K];
|
|
227
|
+
}) & {};
|
|
@@ -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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { computed, ref, watch } from "vue";
|
|
2
|
+
import { computed, onBeforeUnmount, ref, watch } from "vue";
|
|
3
3
|
import { AltArrowDown, AltArrowRight, Filter, Magnifier } from "#solar-icons";
|
|
4
4
|
import {
|
|
5
5
|
Button,
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
Input,
|
|
8
8
|
Popover,
|
|
9
9
|
PopoverContent,
|
|
10
|
-
PopoverTrigger
|
|
11
|
-
ToolbarFilterTrigger
|
|
10
|
+
PopoverTrigger
|
|
12
11
|
} from "@revenexx/studio";
|
|
12
|
+
import ToolbarLabelTrigger from "./ToolbarLabelTrigger.vue";
|
|
13
13
|
import {
|
|
14
14
|
allNodes,
|
|
15
15
|
copySelection,
|
|
@@ -57,12 +57,54 @@ function matches(facet, label) {
|
|
|
57
57
|
return label.toLowerCase().includes(query.value);
|
|
58
58
|
}
|
|
59
59
|
function visibleOptions(facet) {
|
|
60
|
+
if (facet.search) return searchedOptions(facet);
|
|
60
61
|
return (facet.options ?? []).filter((option) => matches(facet, option.label));
|
|
61
62
|
}
|
|
63
|
+
const remote = ref({});
|
|
64
|
+
const pickedHits = ref({});
|
|
65
|
+
let remoteTimer = null;
|
|
66
|
+
let remoteSeq = 0;
|
|
67
|
+
onBeforeUnmount(() => {
|
|
68
|
+
if (remoteTimer) clearTimeout(remoteTimer);
|
|
69
|
+
});
|
|
70
|
+
function remoteTerm(facet) {
|
|
71
|
+
return !query.value || facet.label.toLowerCase().includes(query.value) ? "" : search.value.trim();
|
|
72
|
+
}
|
|
73
|
+
async function runRemote(facet) {
|
|
74
|
+
if (!facet.search) return;
|
|
75
|
+
const mine = ++remoteSeq;
|
|
76
|
+
remote.value = { ...remote.value, [facet.key]: { options: remote.value[facet.key]?.options ?? [], busy: true } };
|
|
77
|
+
let options = [];
|
|
78
|
+
try {
|
|
79
|
+
options = await facet.search(remoteTerm(facet));
|
|
80
|
+
} catch {
|
|
81
|
+
options = [];
|
|
82
|
+
}
|
|
83
|
+
if (mine !== remoteSeq) return;
|
|
84
|
+
remote.value = { ...remote.value, [facet.key]: { options, busy: false } };
|
|
85
|
+
}
|
|
86
|
+
watch([() => activeFacet.value?.key, query, open], () => {
|
|
87
|
+
const facet = activeFacet.value;
|
|
88
|
+
if (!open.value || !facet?.search) return;
|
|
89
|
+
if (remoteTimer) clearTimeout(remoteTimer);
|
|
90
|
+
remoteTimer = setTimeout(() => {
|
|
91
|
+
void runRemote(facet);
|
|
92
|
+
}, 250);
|
|
93
|
+
}, { immediate: true });
|
|
94
|
+
function searchedOptions(facet) {
|
|
95
|
+
const ticked = draft.value[facet.key];
|
|
96
|
+
const values = Array.isArray(ticked) ? ticked : [];
|
|
97
|
+
const named = new Map((facet.options ?? []).map((o) => [o.value, o]));
|
|
98
|
+
for (const [value, option] of Object.entries(pickedHits.value[facet.key] ?? {})) named.set(value, option);
|
|
99
|
+
const head = values.map((value) => named.get(value) ?? { value, label: value });
|
|
100
|
+
const seen = new Set(values);
|
|
101
|
+
return [...head, ...(remote.value[facet.key]?.options ?? []).filter((o) => !seen.has(o.value))];
|
|
102
|
+
}
|
|
62
103
|
const visibleFacets = computed(() => {
|
|
63
104
|
if (!query.value) return panelFacets.value;
|
|
64
105
|
return panelFacets.value.filter((facet) => {
|
|
65
106
|
if (facet.label.toLowerCase().includes(query.value)) return true;
|
|
107
|
+
if (facet.search) return true;
|
|
66
108
|
if (facet.kind === "check") return visibleOptions(facet).length > 0;
|
|
67
109
|
if (facet.kind === "tree") return visibleNodes(facet).length > 0;
|
|
68
110
|
return false;
|
|
@@ -73,6 +115,8 @@ function isTicked(key, value) {
|
|
|
73
115
|
return Array.isArray(current) && current.includes(value);
|
|
74
116
|
}
|
|
75
117
|
function tick(key, value, on) {
|
|
118
|
+
const hit = remote.value[key]?.options.find((o) => o.value === value);
|
|
119
|
+
if (on && hit) pickedHits.value = { ...pickedHits.value, [key]: { ...pickedHits.value[key] ?? {}, [value]: hit } };
|
|
76
120
|
const single = props.facets.find((f) => f.key === key)?.single;
|
|
77
121
|
draft.value = toggleFacetValue(draft.value, key, value, on, { single });
|
|
78
122
|
}
|
|
@@ -138,8 +182,7 @@ const nothingToReset = computed(() => Object.keys(draft.value).every((key) => is
|
|
|
138
182
|
<template>
|
|
139
183
|
<Popover v-model:open="open">
|
|
140
184
|
<PopoverTrigger as-child>
|
|
141
|
-
<
|
|
142
|
-
icon-only
|
|
185
|
+
<ToolbarLabelTrigger
|
|
143
186
|
:active="appliedCount > 0"
|
|
144
187
|
:count="appliedCount"
|
|
145
188
|
:label="t('shared.facetpanel.trigger.label')"
|
|
@@ -148,7 +191,7 @@ const nothingToReset = computed(() => Object.keys(draft.value).every((key) => is
|
|
|
148
191
|
<template #icon>
|
|
149
192
|
<Filter :size="14" weight="BoldDuotone" />
|
|
150
193
|
</template>
|
|
151
|
-
</
|
|
194
|
+
</ToolbarLabelTrigger>
|
|
152
195
|
</PopoverTrigger>
|
|
153
196
|
|
|
154
197
|
<PopoverContent
|
|
@@ -229,13 +272,19 @@ const nothingToReset = computed(() => Object.keys(draft.value).every((key) => is
|
|
|
229
272
|
<!-- Wraps rather than truncates: a label reading "Net 30 days,
|
|
230
273
|
2% early settlement" is unusable cut off, and the pane cannot
|
|
231
274
|
grow to fit it without becoming the layout it replaced. -->
|
|
232
|
-
<span class="min-w-0 flex-1">
|
|
275
|
+
<span class="min-w-0 flex-1">
|
|
276
|
+
{{ option.label }}
|
|
277
|
+
<span v-if="option.description" class="block text-xs text-muted-foreground">{{ option.description }}</span>
|
|
278
|
+
</span>
|
|
233
279
|
<span
|
|
234
280
|
v-if="option.count !== void 0"
|
|
235
281
|
class="shrink-0 tabular-nums text-muted-foreground"
|
|
236
282
|
>{{ option.count }}</span>
|
|
237
283
|
</label>
|
|
238
|
-
<
|
|
284
|
+
<div v-if="activeFacet.search && remote[activeFacet.key]?.busy && !visibleOptions(activeFacet).length" class="space-y-1.5 p-1">
|
|
285
|
+
<div v-for="i in 4" :key="i" class="h-6 animate-pulse rounded-md bg-muted" />
|
|
286
|
+
</div>
|
|
287
|
+
<p v-else-if="!visibleOptions(activeFacet).length" class="px-1.5 py-6 text-center text-sm text-muted-foreground">
|
|
239
288
|
{{ query ? t("shared.facetpanel.empty.noMatch", { query: search }) : t("shared.facetpanel.empty.noOption") }}
|
|
240
289
|
</p>
|
|
241
290
|
</div>
|
|
@@ -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;
|
|
@@ -6,15 +6,16 @@ type __VLS_Props = {
|
|
|
6
6
|
/** How many are set, for the badge. */
|
|
7
7
|
count?: number;
|
|
8
8
|
};
|
|
9
|
-
declare var
|
|
9
|
+
declare var __VLS_32: {};
|
|
10
10
|
type __VLS_Slots = {} & {
|
|
11
|
-
default?: (props: typeof
|
|
11
|
+
default?: (props: typeof __VLS_32) => any;
|
|
12
12
|
};
|
|
13
|
-
declare const
|
|
14
|
-
active: boolean;
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
14
|
width: string;
|
|
15
|
+
active: boolean;
|
|
16
16
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
-
declare const
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
18
19
|
export default _default;
|
|
19
20
|
type __VLS_WithSlots<T, S> = T & {
|
|
20
21
|
new (): {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { Filter } from "#solar-icons";
|
|
3
|
-
import { Popover, PopoverContent, PopoverTrigger
|
|
3
|
+
import { Popover, PopoverContent, PopoverTrigger } from "@revenexx/studio";
|
|
4
|
+
import ToolbarLabelTrigger from "./ToolbarLabelTrigger.vue";
|
|
4
5
|
defineProps({
|
|
5
6
|
width: { type: String, required: false, default: "w-72" },
|
|
6
7
|
active: { type: Boolean, required: false, default: false },
|
|
@@ -12,16 +13,15 @@ const t = useT();
|
|
|
12
13
|
<template>
|
|
13
14
|
<Popover>
|
|
14
15
|
<PopoverTrigger as-child>
|
|
15
|
-
<
|
|
16
|
-
icon-only
|
|
16
|
+
<ToolbarLabelTrigger
|
|
17
17
|
:active="active"
|
|
18
18
|
:count="count"
|
|
19
|
-
:label="t('shared.datatable.
|
|
19
|
+
:label="t('shared.datatable.toolbar.filter.action')"
|
|
20
20
|
>
|
|
21
21
|
<template #icon>
|
|
22
22
|
<Filter :size="14" weight="BoldDuotone" />
|
|
23
23
|
</template>
|
|
24
|
-
</
|
|
24
|
+
</ToolbarLabelTrigger>
|
|
25
25
|
</PopoverTrigger>
|
|
26
26
|
|
|
27
27
|
<PopoverContent align="start" :class="['p-0', width]">
|
|
@@ -6,15 +6,16 @@ type __VLS_Props = {
|
|
|
6
6
|
/** How many are set, for the badge. */
|
|
7
7
|
count?: number;
|
|
8
8
|
};
|
|
9
|
-
declare var
|
|
9
|
+
declare var __VLS_32: {};
|
|
10
10
|
type __VLS_Slots = {} & {
|
|
11
|
-
default?: (props: typeof
|
|
11
|
+
default?: (props: typeof __VLS_32) => any;
|
|
12
12
|
};
|
|
13
|
-
declare const
|
|
14
|
-
active: boolean;
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
14
|
width: string;
|
|
15
|
+
active: boolean;
|
|
16
16
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
-
declare const
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
18
19
|
export default _default;
|
|
19
20
|
type __VLS_WithSlots<T, S> = T & {
|
|
20
21
|
new (): {
|
|
@@ -4,7 +4,8 @@ type __VLS_Props = {
|
|
|
4
4
|
/** Matches the row it sits in; `sm` is the 32px square its neighbours are. */
|
|
5
5
|
size?: 'sm' | 'default';
|
|
6
6
|
};
|
|
7
|
-
declare const
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
8
8
|
size: "sm" | "default";
|
|
9
9
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
10
11
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { Bookmark, CheckCircle, Diskette, TrashBinMinimalistic } from "#solar-icons";
|
|
2
|
+
import { Bookmark, CheckCircle, Diskette, TrashBinMinimalistic, UsersGroupRounded } from "#solar-icons";
|
|
3
3
|
import {
|
|
4
4
|
Button,
|
|
5
5
|
Dialog,
|
|
@@ -14,7 +14,8 @@ import {
|
|
|
14
14
|
DropdownMenuLabel,
|
|
15
15
|
DropdownMenuSeparator,
|
|
16
16
|
DropdownMenuTrigger,
|
|
17
|
-
Input
|
|
17
|
+
Input,
|
|
18
|
+
Switch
|
|
18
19
|
} from "@revenexx/studio";
|
|
19
20
|
import { sameJson } from "../../lib/canonicalJson";
|
|
20
21
|
const props = defineProps({
|
|
@@ -46,11 +47,17 @@ function applyDefault() {
|
|
|
46
47
|
function applyView(v) {
|
|
47
48
|
props.config.apply(v.snapshot);
|
|
48
49
|
}
|
|
50
|
+
const isMine = (v) => v.mine !== false;
|
|
51
|
+
const myViews = computed(() => views.value.filter(isMine));
|
|
52
|
+
const sharedViews = computed(() => views.value.filter((v) => !isMine(v)));
|
|
49
53
|
const saveOpen = ref(false);
|
|
50
54
|
const saveName = ref("");
|
|
55
|
+
const saveShared = ref(false);
|
|
51
56
|
const saving = ref(false);
|
|
52
57
|
function openSave() {
|
|
53
|
-
|
|
58
|
+
const own = appliedView.value && isMine(appliedView.value) ? appliedView.value : null;
|
|
59
|
+
saveName.value = own?.name ?? "";
|
|
60
|
+
saveShared.value = own?.shared === true;
|
|
54
61
|
saveOpen.value = true;
|
|
55
62
|
}
|
|
56
63
|
async function save() {
|
|
@@ -58,8 +65,8 @@ async function save() {
|
|
|
58
65
|
if (!name || saving.value) return;
|
|
59
66
|
saving.value = true;
|
|
60
67
|
try {
|
|
61
|
-
const entry = await store.save(props.config.storageKey, name, props.config.snapshot());
|
|
62
|
-
const at = views.value.findIndex((v) => v.name === name);
|
|
68
|
+
const entry = await store.save(props.config.storageKey, name, props.config.snapshot(), { shared: saveShared.value });
|
|
69
|
+
const at = views.value.findIndex((v) => v.name === name && isMine(v));
|
|
63
70
|
if (at >= 0) views.value.splice(at, 1, entry);
|
|
64
71
|
else views.value = [...views.value, entry].sort((a, b) => a.name.localeCompare(b.name));
|
|
65
72
|
saveOpen.value = false;
|
|
@@ -82,7 +89,8 @@ async function remove() {
|
|
|
82
89
|
<DropdownMenuTrigger as-child>
|
|
83
90
|
<Button
|
|
84
91
|
:variant="hasAppliedView ? 'default' : 'outline'"
|
|
85
|
-
:size="size
|
|
92
|
+
:size="size"
|
|
93
|
+
class="size-8 gap-1.5 px-0"
|
|
86
94
|
:data-active="hasAppliedView"
|
|
87
95
|
:aria-label="t('shared.datatable.savedviews.trigger.aria', { name: activeLabel })"
|
|
88
96
|
:title="t('shared.datatable.savedviews.trigger.aria', { name: activeLabel })"
|
|
@@ -97,6 +105,8 @@ async function remove() {
|
|
|
97
105
|
<span class="flex shrink-0 items-center" :class="hasAppliedView ? '' : 'text-primary'">
|
|
98
106
|
<Bookmark :class="size === 'sm' ? 'size-3.5' : 'size-4'" weight="BoldDuotone" />
|
|
99
107
|
</span>
|
|
108
|
+
<!-- Icon only, the word for screen readers (Michael 12.10.). -->
|
|
109
|
+
<span class="sr-only">{{ t("shared.datatable.savedviews.heading") }}</span>
|
|
100
110
|
</Button>
|
|
101
111
|
</DropdownMenuTrigger>
|
|
102
112
|
<!--
|
|
@@ -105,7 +115,7 @@ async function remove() {
|
|
|
105
115
|
market switcher's and the column picker's grew right — a menu that opens
|
|
106
116
|
the other way is one a reader has to re-find every time.
|
|
107
117
|
-->
|
|
108
|
-
<DropdownMenuContent align="start" class="w-
|
|
118
|
+
<DropdownMenuContent align="start" class="w-80">
|
|
109
119
|
<!-- Named, like the market switcher's "Showing" and the column picker's
|
|
110
120
|
"Columns": a menu of bare rows does not say what it is a menu OF. -->
|
|
111
121
|
<DropdownMenuLabel>{{ t("shared.datatable.savedviews.heading") }}</DropdownMenuLabel>
|
|
@@ -118,16 +128,27 @@ async function remove() {
|
|
|
118
128
|
<span class="flex-1 truncate" :class="isDefault ? 'font-medium text-primary' : ''">{{ allLabel }}</span>
|
|
119
129
|
<CheckCircle v-if="isDefault" :size="14" weight="Bold" class="shrink-0 text-primary" />
|
|
120
130
|
</DropdownMenuItem>
|
|
121
|
-
<template v-if="
|
|
131
|
+
<template v-if="myViews.length">
|
|
122
132
|
<DropdownMenuSeparator />
|
|
133
|
+
<DropdownMenuLabel v-if="sharedViews.length" class="text-xs font-medium text-muted-foreground">
|
|
134
|
+
{{ t("shared.datatable.savedviews.group.mine") }}
|
|
135
|
+
</DropdownMenuLabel>
|
|
123
136
|
<DropdownMenuItem
|
|
124
|
-
v-for="v in
|
|
137
|
+
v-for="v in myViews"
|
|
125
138
|
:key="v.id"
|
|
126
139
|
class="gap-2"
|
|
127
140
|
:aria-current="isActive(v) ? 'true' : void 0"
|
|
128
141
|
@select="applyView(v)"
|
|
129
142
|
>
|
|
130
143
|
<span class="min-w-0 flex-1 truncate" :class="isActive(v) ? 'font-medium text-primary' : ''">{{ v.name }}</span>
|
|
144
|
+
<span
|
|
145
|
+
v-if="v.shared"
|
|
146
|
+
class="inline-flex shrink-0 items-center gap-0.5 rounded border border-primary/20 bg-primary/[0.06] px-1 text-[10.5px] font-medium text-primary"
|
|
147
|
+
:title="t('shared.datatable.savedviews.savedialog.field.shared.label')"
|
|
148
|
+
>
|
|
149
|
+
<UsersGroupRounded :size="11" weight="Bold" />
|
|
150
|
+
{{ t("shared.datatable.savedviews.badge.shared") }}
|
|
151
|
+
</span>
|
|
131
152
|
<CheckCircle v-if="isActive(v)" :size="14" weight="Bold" class="shrink-0 text-primary" />
|
|
132
153
|
<span
|
|
133
154
|
role="button"
|
|
@@ -140,6 +161,26 @@ async function remove() {
|
|
|
140
161
|
</span>
|
|
141
162
|
</DropdownMenuItem>
|
|
142
163
|
</template>
|
|
164
|
+
<template v-if="sharedViews.length">
|
|
165
|
+
<DropdownMenuSeparator />
|
|
166
|
+
<DropdownMenuLabel class="text-xs font-medium text-muted-foreground">
|
|
167
|
+
{{ t("shared.datatable.savedviews.group.shared") }}
|
|
168
|
+
</DropdownMenuLabel>
|
|
169
|
+
<DropdownMenuItem
|
|
170
|
+
v-for="v in sharedViews"
|
|
171
|
+
:key="v.id"
|
|
172
|
+
class="gap-2"
|
|
173
|
+
:aria-current="isActive(v) ? 'true' : void 0"
|
|
174
|
+
@select="applyView(v)"
|
|
175
|
+
>
|
|
176
|
+
<UsersGroupRounded :size="13" weight="Bold" class="shrink-0 text-primary/70" />
|
|
177
|
+
<span class="min-w-0 flex-1 truncate" :class="isActive(v) ? 'font-medium text-primary' : ''">{{ v.name }}</span>
|
|
178
|
+
<span v-if="v.ownerName" class="max-w-24 shrink-0 truncate text-xs text-muted-foreground">
|
|
179
|
+
{{ t("shared.datatable.savedviews.owner", { name: v.ownerName }) }}
|
|
180
|
+
</span>
|
|
181
|
+
<CheckCircle v-if="isActive(v)" :size="14" weight="Bold" class="shrink-0 text-primary" />
|
|
182
|
+
</DropdownMenuItem>
|
|
183
|
+
</template>
|
|
143
184
|
<DropdownMenuSeparator />
|
|
144
185
|
<DropdownMenuItem class="gap-2" @select="openSave">
|
|
145
186
|
<Diskette :size="14" class="shrink-0 text-muted-foreground" />
|
|
@@ -160,7 +201,7 @@ async function remove() {
|
|
|
160
201
|
<Dialog :open="saveOpen" @update:open="(v2) => {
|
|
161
202
|
if (!v2) saveOpen = false;
|
|
162
203
|
}">
|
|
163
|
-
<DialogContent>
|
|
204
|
+
<DialogContent class="sm:max-w-xl">
|
|
164
205
|
<DialogHeader>
|
|
165
206
|
<DialogTitle>{{ t("shared.datatable.savedviews.savedialog.title") }}</DialogTitle>
|
|
166
207
|
<DialogDescription>{{ t("shared.datatable.savedviews.savedialog.description") }}</DialogDescription>
|
|
@@ -174,6 +215,14 @@ async function remove() {
|
|
|
174
215
|
@keydown.enter="save"
|
|
175
216
|
/>
|
|
176
217
|
</div>
|
|
218
|
+
<!-- PE-1052: private by default; the owner may share it with the tenant. -->
|
|
219
|
+
<div class="flex items-start justify-between gap-4 rounded-md border border-black/[0.06] px-3 py-2.5">
|
|
220
|
+
<div class="min-w-0">
|
|
221
|
+
<label for="saved-view-shared" class="text-sm font-medium">{{ t("shared.datatable.savedviews.savedialog.field.shared.label") }}</label>
|
|
222
|
+
<p class="mt-0.5 text-xs text-muted-foreground">{{ t("shared.datatable.savedviews.savedialog.field.shared.hint") }}</p>
|
|
223
|
+
</div>
|
|
224
|
+
<Switch id="saved-view-shared" v-model="saveShared" class="mt-0.5 shrink-0" />
|
|
225
|
+
</div>
|
|
177
226
|
<DialogFooter>
|
|
178
227
|
<Button variant="outline" @click="saveOpen = false">
|
|
179
228
|
{{ t("shared.datatable.savedviews.savedialog.action.cancel") }}
|
|
@@ -189,9 +238,9 @@ async function remove() {
|
|
|
189
238
|
<Dialog :open="deleteTarget !== null" @update:open="(v2) => {
|
|
190
239
|
if (!v2) deleteTarget = null;
|
|
191
240
|
}">
|
|
192
|
-
<DialogContent>
|
|
241
|
+
<DialogContent class="sm:max-w-xl">
|
|
193
242
|
<DialogHeader>
|
|
194
|
-
<DialogTitle>{{ t("shared.datatable.savedviews.deletedialog.title") }}</DialogTitle>
|
|
243
|
+
<DialogTitle>{{ t("shared.datatable.savedviews.deletedialog.title", { name: deleteTarget?.name ?? "" }) }}</DialogTitle>
|
|
195
244
|
<DialogDescription>
|
|
196
245
|
{{ t("shared.datatable.savedviews.deletedialog.description", { name: deleteTarget?.name ?? "" }) }}
|
|
197
246
|
</DialogDescription>
|