@revenexx/studio-shared 0.3.2 → 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 +6 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +12 -1
- package/dist/runtime/components/Dashboard/DashboardConfirmDialog.d.vue.ts +16 -0
- package/dist/runtime/components/Dashboard/DashboardConfirmDialog.vue +39 -0
- package/dist/runtime/components/Dashboard/DashboardConfirmDialog.vue.d.ts +16 -0
- package/dist/runtime/components/Dashboard/DashboardControls.d.vue.ts +58 -0
- package/dist/runtime/components/Dashboard/DashboardControls.vue +209 -0
- package/dist/runtime/components/Dashboard/DashboardControls.vue.d.ts +58 -0
- package/dist/runtime/components/Dashboard/DashboardGrid.d.vue.ts +17 -0
- package/dist/runtime/components/Dashboard/DashboardGrid.vue +87 -0
- package/dist/runtime/components/Dashboard/DashboardGrid.vue.d.ts +17 -0
- package/dist/runtime/components/Dashboard/DashboardNameDialog.d.vue.ts +19 -0
- package/dist/runtime/components/Dashboard/DashboardNameDialog.vue +61 -0
- package/dist/runtime/components/Dashboard/DashboardNameDialog.vue.d.ts +19 -0
- package/dist/runtime/components/Dashboard/DashboardPickerDialog.d.vue.ts +15 -0
- package/dist/runtime/components/Dashboard/DashboardPickerDialog.vue +100 -0
- package/dist/runtime/components/Dashboard/DashboardPickerDialog.vue.d.ts +15 -0
- package/dist/runtime/components/Dashboard/DashboardShareDialog.d.vue.ts +28 -0
- package/dist/runtime/components/Dashboard/DashboardShareDialog.vue +155 -0
- package/dist/runtime/components/Dashboard/DashboardShareDialog.vue.d.ts +28 -0
- package/dist/runtime/components/Dashboard/DashboardTopBar.d.vue.ts +64 -0
- package/dist/runtime/components/Dashboard/DashboardTopBar.vue +79 -0
- package/dist/runtime/components/Dashboard/DashboardTopBar.vue.d.ts +64 -0
- package/dist/runtime/components/Dashboard/DashboardWidgetConfigDialog.d.vue.ts +44 -0
- package/dist/runtime/components/Dashboard/DashboardWidgetConfigDialog.vue +153 -0
- package/dist/runtime/components/Dashboard/DashboardWidgetConfigDialog.vue.d.ts +44 -0
- package/dist/runtime/components/Dashboard/DashboardWidgetFrame.d.vue.ts +28 -0
- package/dist/runtime/components/Dashboard/DashboardWidgetFrame.vue +80 -0
- package/dist/runtime/components/Dashboard/DashboardWidgetFrame.vue.d.ts +28 -0
- package/dist/runtime/components/Dashboard/DashboardWidgetHost.d.vue.ts +7 -0
- package/dist/runtime/components/Dashboard/DashboardWidgetHost.vue +30 -0
- package/dist/runtime/components/Dashboard/DashboardWidgetHost.vue.d.ts +7 -0
- package/dist/runtime/components/Dashboard/DashboardWidgetIcon.d.vue.ts +9 -0
- package/dist/runtime/components/Dashboard/DashboardWidgetIcon.vue +13 -0
- package/dist/runtime/components/Dashboard/DashboardWidgetIcon.vue.d.ts +9 -0
- package/dist/runtime/components/Dashboard/DashboardWidgetLibrary.d.vue.ts +24 -0
- package/dist/runtime/components/Dashboard/DashboardWidgetLibrary.vue +140 -0
- package/dist/runtime/components/Dashboard/DashboardWidgetLibrary.vue.d.ts +24 -0
- package/dist/runtime/components/Dashboard/DashboardWidgetPreview.d.vue.ts +23 -0
- package/dist/runtime/components/Dashboard/DashboardWidgetPreview.vue +124 -0
- package/dist/runtime/components/Dashboard/DashboardWidgetPreview.vue.d.ts +23 -0
- 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 +105 -28
- package/dist/runtime/components/DataTable/DataTable.vue +403 -38
- package/dist/runtime/components/DataTable/DataTable.vue.d.ts +105 -28
- package/dist/runtime/components/DataTable/FacetChips.d.vue.ts +17 -0
- package/dist/runtime/components/DataTable/FacetChips.vue +72 -0
- package/dist/runtime/components/DataTable/FacetChips.vue.d.ts +17 -0
- package/dist/runtime/components/DataTable/FacetPanel.d.vue.ts +21 -0
- package/dist/runtime/components/DataTable/FacetPanel.vue +359 -0
- package/dist/runtime/components/DataTable/FacetPanel.vue.d.ts +21 -0
- 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 +6 -1
- package/dist/runtime/components/DataTable/SavedViewsMenu.vue +83 -63
- package/dist/runtime/components/DataTable/SavedViewsMenu.vue.d.ts +6 -1
- package/dist/runtime/components/DataTable/SortMenu.d.vue.ts +9 -3
- package/dist/runtime/components/DataTable/SortMenu.vue +40 -12
- package/dist/runtime/components/DataTable/SortMenu.vue.d.ts +9 -3
- 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 +4 -3
- package/dist/runtime/components/Media/MediaPickerDialog.vue.d.ts +4 -3
- package/dist/runtime/components/Media/MediaUploader.d.vue.ts +4 -3
- package/dist/runtime/components/Media/MediaUploader.vue.d.ts +4 -3
- 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 +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.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 +9 -10
- package/dist/runtime/components/Shared/TabBar.vue +26 -7
- package/dist/runtime/components/Shared/TabBar.vue.d.ts +9 -10
- 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/useDashboards.d.ts +27 -0
- package/dist/runtime/composables/useDashboards.js +143 -0
- 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/composables/useSavedViews.d.ts +44 -0
- package/dist/runtime/composables/useSavedViews.js +44 -0
- package/dist/runtime/composables/useStickyListView.d.ts +60 -0
- package/dist/runtime/composables/useStickyListView.js +32 -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/canonicalJson.d.ts +43 -0
- package/dist/runtime/lib/canonicalJson.js +38 -0
- package/dist/runtime/lib/dashboardIcons.d.ts +4 -0
- package/dist/runtime/lib/dashboardIcons.js +50 -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 +200 -0
- package/dist/runtime/lib/facets.js +171 -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/gridTracks.d.ts +55 -0
- package/dist/runtime/lib/gridTracks.js +29 -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/runtime/lib/widgetRegistry.d.ts +124 -0
- package/dist/runtime/lib/widgetRegistry.js +66 -0
- package/dist/runtime/types/dashboard.d.ts +95 -0
- package/dist/runtime/types/dashboard.js +2 -0
- package/dist/types.d.mts +12 -0
- package/package.json +3 -2
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The dashboard contract, shared by every surface that has one (PE-618).
|
|
3
|
+
*
|
|
4
|
+
* It started in the cockpit's `shared/dashboards/types.ts`, where the home
|
|
5
|
+
* screen and its Nitro routes were the only readers. The Commerce Studio now
|
|
6
|
+
* renders the same dashboards from a published module that cannot see the
|
|
7
|
+
* host's `#shared` alias — so the shape moves here, and the cockpit's file
|
|
8
|
+
* re-exports it. One declaration, two consumers, no drift between the rows
|
|
9
|
+
* Nitro writes and the layout the grid reads.
|
|
10
|
+
*
|
|
11
|
+
* The layout vocabulary is deliberately identical to `shared/analytics/types`:
|
|
12
|
+
* two dashboard surfaces in one product must not grow two models of a grid.
|
|
13
|
+
*/
|
|
14
|
+
/** Grid placement on a twelve-column grid. `i` is the widget instance id. */
|
|
15
|
+
export interface DashboardLayoutItem {
|
|
16
|
+
i: string;
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
w: number;
|
|
20
|
+
h: number;
|
|
21
|
+
}
|
|
22
|
+
/** One placed widget. `type` resolves against the surface's widget registry. */
|
|
23
|
+
export interface DashboardWidget {
|
|
24
|
+
id: string;
|
|
25
|
+
type: string;
|
|
26
|
+
/** Operator-set title; falls back to the registry entry's title when unset. */
|
|
27
|
+
title?: string;
|
|
28
|
+
config?: Record<string, unknown>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Which surface a dashboard belongs to.
|
|
32
|
+
*
|
|
33
|
+
* A dashboard is made of the widgets available where it is edited, so it is
|
|
34
|
+
* only meaningful on its own surface: a Commerce dashboard listed in the
|
|
35
|
+
* cockpit's home switcher would open as a grid of widgets that screen cannot
|
|
36
|
+
* render. Stored on the row rather than encoded in the slug, because a
|
|
37
|
+
* convention nothing enforces is one typo away from the wrong surface.
|
|
38
|
+
*/
|
|
39
|
+
export type DashboardScope = 'home' | 'commerce';
|
|
40
|
+
export declare const DASHBOARD_SCOPES: readonly DashboardScope[];
|
|
41
|
+
/** `private` — owner only. `tenant` — anyone in the tenant may see it. */
|
|
42
|
+
export type DashboardVisibility = 'private' | 'tenant';
|
|
43
|
+
/**
|
|
44
|
+
* What a tenant-wide share grants. `view` is the default and the safe one; a
|
|
45
|
+
* dashboard several people can change becomes whatever the last one left
|
|
46
|
+
* behind, so `edit` is a decision the owner makes explicitly.
|
|
47
|
+
*/
|
|
48
|
+
export type DashboardTenantPermission = 'view' | 'edit';
|
|
49
|
+
export interface Dashboard {
|
|
50
|
+
id: string;
|
|
51
|
+
slug: string;
|
|
52
|
+
name: string;
|
|
53
|
+
description?: string | null;
|
|
54
|
+
icon?: string | null;
|
|
55
|
+
/** The surface this dashboard belongs to. Older rows read as `home`. */
|
|
56
|
+
scope: DashboardScope;
|
|
57
|
+
ownerUserId: string;
|
|
58
|
+
/** Display name captured when the dashboard was created. */
|
|
59
|
+
ownerName?: string | null;
|
|
60
|
+
/** Who last saved it, and under what name at that moment. */
|
|
61
|
+
updatedByUserId?: string | null;
|
|
62
|
+
updatedByName?: string | null;
|
|
63
|
+
visibility: DashboardVisibility;
|
|
64
|
+
tenantPermission: DashboardTenantPermission;
|
|
65
|
+
layout: DashboardLayoutItem[];
|
|
66
|
+
widgets: DashboardWidget[];
|
|
67
|
+
version: number;
|
|
68
|
+
createdAt: string;
|
|
69
|
+
updatedAt: string;
|
|
70
|
+
/**
|
|
71
|
+
* Server-derived, per caller. True for the owner, and for anyone in the
|
|
72
|
+
* tenant when the dashboard is shared with `edit`.
|
|
73
|
+
*/
|
|
74
|
+
canEdit: boolean;
|
|
75
|
+
/** Server-derived: this caller created it. Only the owner may share or delete. */
|
|
76
|
+
isOwner: boolean;
|
|
77
|
+
/** Server-derived: true when this is the caller's landing dashboard. */
|
|
78
|
+
isDefault: boolean;
|
|
79
|
+
}
|
|
80
|
+
export interface DashboardListResponse {
|
|
81
|
+
dashboards: Dashboard[];
|
|
82
|
+
defaultDashboardId: string | null;
|
|
83
|
+
}
|
|
84
|
+
export interface DashboardWritePayload {
|
|
85
|
+
name?: string;
|
|
86
|
+
description?: string | null;
|
|
87
|
+
icon?: string | null;
|
|
88
|
+
visibility?: DashboardVisibility;
|
|
89
|
+
tenantPermission?: DashboardTenantPermission;
|
|
90
|
+
layout?: DashboardLayoutItem[];
|
|
91
|
+
widgets?: DashboardWidget[];
|
|
92
|
+
/** Required on update — a stale value is answered with 409, not an overwrite. */
|
|
93
|
+
version?: number;
|
|
94
|
+
}
|
|
95
|
+
export declare const MAX_DASHBOARD_COLUMNS = 12;
|
package/dist/types.d.mts
CHANGED
|
@@ -16,14 +16,26 @@ export { type TalkbackChannel, type TalkbackChannelOptions, type TalkbackMaybeRe
|
|
|
16
16
|
|
|
17
17
|
export { type MediaLibraryClient } from '../dist/runtime/composables/useMediaLibrary.js'
|
|
18
18
|
|
|
19
|
+
export { type SavedViewsStore, type StoredSavedView } from '../dist/runtime/composables/useSavedViews.js'
|
|
20
|
+
|
|
21
|
+
export { type WidgetCategory, type WidgetCategoryGroup, type WidgetConfigField, type WidgetDefinition, type WidgetPreviewShape, type WidgetRegistry } from '../dist/runtime/lib/widgetRegistry.js'
|
|
22
|
+
|
|
23
|
+
export { type StickyListView } from '../dist/runtime/composables/useStickyListView.js'
|
|
24
|
+
|
|
25
|
+
export { type DetailSheetBinding } from '../dist/runtime/composables/useDetailSheet.js'
|
|
26
|
+
|
|
19
27
|
export { type FloatingPanelDock, type FloatingPanelMode, type FloatingPanelOptions } from '../dist/runtime/composables/useFloatingPanel.js'
|
|
20
28
|
|
|
21
29
|
export { type IsoOption } from '../dist/runtime/lib/isoLists.js'
|
|
22
30
|
|
|
23
31
|
export { type Translate, type TranslateNamed, type Translator } from '../dist/runtime/lib/i18nBridge.js'
|
|
24
32
|
|
|
33
|
+
export { type FieldSpan, type FormContextRow, type SectionOffset, type SpanSource } from '../dist/runtime/lib/formLayout.js'
|
|
34
|
+
|
|
25
35
|
export { default } from './module.mjs'
|
|
26
36
|
|
|
27
37
|
export * from '../dist/runtime/components/DataTable/types.js'
|
|
28
38
|
|
|
29
39
|
export * from '../dist/runtime/types/storage.js'
|
|
40
|
+
|
|
41
|
+
export * from '../dist/runtime/types/dashboard.js'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revenexx/studio-shared",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Shared revenexx Studio shell primitives (PageHeader, SidebarNav, StateCard, DataTable, …) + the platform provider contract (usePlatformAuth/usePlatformTenant). A Nuxt module — add it to `modules`.",
|
|
6
6
|
"main": "./dist/module.mjs",
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@nuxt/kit": "^4.0.0"
|
|
28
|
+
"@nuxt/kit": "^4.0.0",
|
|
29
|
+
"grid-layout-plus": "^1.1.1"
|
|
29
30
|
},
|
|
30
31
|
"peerDependencies": {
|
|
31
32
|
"@revenexx/studio": "^0.2.3",
|