@vc-shell/framework 2.5.0-pr312.a50da73 → 2.5.0-pr313.d5b02dd
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/chunks/{VcScheduler.vue_vue_type_script_setup_true_lang-88mI_UMp.js → VcScheduler.vue_vue_type_script_setup_true_lang-BmlVL_rn.js} +2959 -2935
- package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-BmlVL_rn.js.map +1 -0
- package/dist/chunks/{VcScheduler.vue_vue_type_style_index_0_lang-CjBKWqcN.js → VcScheduler.vue_vue_type_style_index_0_lang-BTg4PjTB.js} +86 -85
- package/dist/chunks/VcScheduler.vue_vue_type_style_index_0_lang-BTg4PjTB.js.map +1 -0
- package/dist/chunks/{dashboard-feed-row.vue_vue_type_script_setup_true_lang-BK6rNhCN.js → dashboard-feed-row.vue_vue_type_script_setup_true_lang-BCsJG_hk.js} +1 -1
- package/dist/chunks/{dashboard-feed-row.vue_vue_type_script_setup_true_lang-BK6rNhCN.js.map → dashboard-feed-row.vue_vue_type_script_setup_true_lang-BCsJG_hk.js.map} +1 -1
- package/dist/core/composables/useSidebarState/index.d.ts +2 -1
- package/dist/core/composables/useSidebarState/index.d.ts.map +1 -1
- package/dist/core/composables/useToolbar/index.d.ts +0 -6
- package/dist/core/composables/useToolbar/index.d.ts.map +1 -1
- package/dist/core/services/global-search-service/index.d.ts +0 -3
- package/dist/core/services/global-search-service/index.d.ts.map +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/framework.js +9 -9
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/organisms/vc-data-table/VcDataTable.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/composables/useDataTableOrchestrator.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/keys.d.ts +10 -0
- package/dist/ui/components/organisms/vc-data-table/keys.d.ts.map +1 -1
- package/dist/ui/index.js +2 -2
- package/package.json +4 -4
- package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-88mI_UMp.js.map +0 -1
- package/dist/chunks/VcScheduler.vue_vue_type_style_index_0_lang-CjBKWqcN.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowRef as he, ref as D, watch as le, nextTick as de, onUnmounted as pe, openBlock as v, createElementBlock as _, createStaticVNode as me, defineComponent as R, inject as fe, computed as se, onMounted as ve, createBlock as Y, withCtx as ge, unref as Z, Fragment as re, renderList as ie, normalizeStyle as ye, normalizeClass as ce, createElementVNode as w, createCommentVNode as B, resolveDynamicComponent as _e, mergeProps as be, toDisplayString as J, renderSlot as O, createVNode as we, withDirectives as ke } from "vue";
|
|
2
|
-
import { q as $e, r as xe, s as Se, l as Le } from "./VcScheduler.vue_vue_type_style_index_0_lang-
|
|
2
|
+
import { q as $e, r as xe, s as Se, l as Le } from "./VcScheduler.vue_vue_type_style_index_0_lang-BTg4PjTB.js";
|
|
3
3
|
import { G as We } from "./vendor-gridstack-Beau2jQ7.js";
|
|
4
4
|
import { M as ze, _ as De } from "./VcAiAgentPanel.vue_vue_type_style_index_0_lang-CZdY18Hq.js";
|
|
5
5
|
import "vee-validate";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-feed-row.vue_vue_type_script_setup_true_lang-BK6rNhCN.js","sources":["../../shell/dashboard/draggable-dashboard/composables/useGridstackAdapter.ts","../../shell/dashboard/draggable-dashboard/composables/useGridstack.ts","../../shell/dashboard/draggable-dashboard/DashboardWidgetSkeleton.vue","../../shell/dashboard/draggable-dashboard/GridstackDashboard.vue","../../shell/dashboard/draggable-dashboard/DraggableDashboard.vue","../../shell/dashboard/draggable-dashboard/index.ts","../../shell/dashboard/dashboard-widget-card/dashboard-widget-card.vue","../../shell/dashboard/dashboard-widget-card/dashboard-stat-item.vue","../../shell/dashboard/dashboard-widget-card/dashboard-feed-list.vue","../../shell/dashboard/dashboard-widget-card/dashboard-feed-row.vue"],"sourcesContent":["/**\r\n * Gridstack Type Adapter\r\n *\r\n * Converts between our IDashboardWidget types and Gridstack's GridStackWidget types.\r\n * Handles localStorage format migration for backwards compatibility.\r\n */\r\n\r\nimport type { GridStackWidget, GridStackNode } from \"gridstack\";\r\nimport type {\r\n IDashboardWidget,\r\n DashboardWidgetPosition,\r\n DashboardWidgetPlacement,\r\n DashboardWidgetSize,\r\n} from \"@shell/dashboard/draggable-dashboard/types\";\r\n\r\n/**\r\n * LocalStorage key for layout persistence\r\n */\r\nexport const LAYOUT_STORAGE_KEY = \"vc-dashboard-layout\";\r\n\r\n/**\r\n * Old localStorage format (Map serialized as object)\r\n */\r\ninterface LegacyLayoutFormat {\r\n [widgetId: string]: DashboardWidgetPosition;\r\n}\r\n\r\n/**\r\n * Converts our widget type to Gridstack widget format\r\n */\r\nexport function toGridstackWidget(widget: IDashboardWidget, placement?: DashboardWidgetPlacement): GridStackWidget {\r\n const pos = placement ?? widget.position;\r\n return {\r\n id: widget.id,\r\n x: pos?.x ?? 0,\r\n y: pos?.y ?? 0,\r\n // A placement size wins over the declared one, so a saved or live resize is\r\n // restored instead of snapping back to the widget's default.\r\n w: placement?.width ?? widget.size.width,\r\n h: placement?.height ?? widget.size.height,\r\n minW: 2,\r\n minH: 2,\r\n };\r\n}\r\n\r\n/**\r\n * Extracts position from Gridstack node\r\n */\r\nexport function fromGridstackNode(node: GridStackNode): {\r\n id: string;\r\n position: DashboardWidgetPosition;\r\n size: DashboardWidgetSize;\r\n} {\r\n return {\r\n id: node.id ?? \"\",\r\n position: {\r\n x: node.x ?? 0,\r\n y: node.y ?? 0,\r\n },\r\n size: {\r\n width: node.w ?? 1,\r\n height: node.h ?? 1,\r\n },\r\n };\r\n}\r\n\r\n/**\r\n * Converts Gridstack nodes array to our layout Map format\r\n */\r\nexport function gridstackNodesToLayoutMap(nodes: GridStackNode[]): Map<string, DashboardWidgetPlacement> {\r\n const layout = new Map<string, DashboardWidgetPlacement>();\r\n\r\n for (const node of nodes) {\r\n if (node.id) {\r\n layout.set(node.id, {\r\n x: node.x ?? 0,\r\n y: node.y ?? 0,\r\n // Size is carried through as well; dropping it here is what used to make\r\n // every resize — mouse or keyboard — invisible to state and to storage.\r\n ...(typeof node.w === \"number\" ? { width: node.w } : {}),\r\n ...(typeof node.h === \"number\" ? { height: node.h } : {}),\r\n });\r\n }\r\n }\r\n\r\n return layout;\r\n}\r\n\r\n/**\r\n * Loads layout from localStorage with legacy format support\r\n */\r\nexport function loadLayoutFromStorage(): Map<string, DashboardWidgetPlacement> | null {\r\n try {\r\n const stored = localStorage.getItem(LAYOUT_STORAGE_KEY);\r\n if (!stored) return null;\r\n\r\n const parsed = JSON.parse(stored);\r\n\r\n // Check if it's the new Gridstack array format\r\n if (Array.isArray(parsed)) {\r\n return gridstackNodesToLayoutMap(parsed as GridStackNode[]);\r\n }\r\n\r\n // Legacy format: object with widget IDs as keys. It never carried a size, so\r\n // those entries stay size-less and fall back to the widget's declared size.\r\n if (typeof parsed === \"object\" && parsed !== null) {\r\n const layout = new Map<string, DashboardWidgetPlacement>();\r\n for (const [id, pos] of Object.entries(parsed as LegacyLayoutFormat)) {\r\n if (pos && typeof pos.x === \"number\" && typeof pos.y === \"number\") {\r\n layout.set(id, { x: pos.x, y: pos.y });\r\n }\r\n }\r\n return layout;\r\n }\r\n\r\n return null;\r\n } catch (error) {\r\n console.warn(\"[GridstackAdapter] Failed to load layout from storage:\", error);\r\n return null;\r\n }\r\n}\r\n\r\n/**\r\n * Saves layout to localStorage in Gridstack format\r\n */\r\nexport function saveLayoutToStorage(widgets: IDashboardWidget[], layout: Map<string, DashboardWidgetPlacement>): void {\r\n try {\r\n const gridstackFormat: GridStackWidget[] = widgets.map((widget) => {\r\n const placement = layout.get(widget.id);\r\n return {\r\n id: widget.id,\r\n x: placement?.x ?? widget.position?.x ?? 0,\r\n y: placement?.y ?? widget.position?.y ?? 0,\r\n // Prefer the live size. Reading `widget.size` unconditionally is what used\r\n // to discard every resize on reload, since that prop is never written back.\r\n w: placement?.width ?? widget.size.width,\r\n h: placement?.height ?? widget.size.height,\r\n };\r\n });\r\n\r\n localStorage.setItem(LAYOUT_STORAGE_KEY, JSON.stringify(gridstackFormat));\r\n } catch (error) {\r\n console.warn(\"[GridstackAdapter] Failed to save layout to storage:\", error);\r\n }\r\n}\r\n\r\n/**\r\n * Clears layout from localStorage\r\n */\r\nexport function clearLayoutStorage(): void {\r\n try {\r\n localStorage.removeItem(LAYOUT_STORAGE_KEY);\r\n } catch (error) {\r\n console.warn(\"[GridstackAdapter] Failed to clear layout storage:\", error);\r\n }\r\n}\r\n\r\n/**\r\n * Auto-arrange widgets in a grid layout\r\n * Places widgets side by side when possible, wrapping to next row\r\n */\r\nfunction autoArrangeWidgets(widgets: IDashboardWidget[], columns: number = 12): Map<string, DashboardWidgetPlacement> {\r\n const layout = new Map<string, DashboardWidgetPlacement>();\r\n\r\n // Track occupied cells in each row\r\n const rowOccupancy: Map<number, number[]> = new Map();\r\n\r\n const isPositionFree = (x: number, y: number, width: number, height: number): boolean => {\r\n for (let row = y; row < y + height; row++) {\r\n const occupied = rowOccupancy.get(row) || [];\r\n for (let col = x; col < x + width; col++) {\r\n if (occupied.includes(col)) return false;\r\n }\r\n }\r\n return true;\r\n };\r\n\r\n const occupyPosition = (x: number, y: number, width: number, height: number): void => {\r\n for (let row = y; row < y + height; row++) {\r\n const occupied = rowOccupancy.get(row) || [];\r\n for (let col = x; col < x + width; col++) {\r\n occupied.push(col);\r\n }\r\n rowOccupancy.set(row, occupied);\r\n }\r\n };\r\n\r\n const findFreePosition = (width: number, height: number): DashboardWidgetPosition => {\r\n let y = 0;\r\n while (true) {\r\n for (let x = 0; x <= columns - width; x++) {\r\n if (isPositionFree(x, y, width, height)) {\r\n return { x, y };\r\n }\r\n }\r\n y++;\r\n // Safety limit\r\n if (y > 100) break;\r\n }\r\n return { x: 0, y };\r\n };\r\n\r\n for (const widget of widgets) {\r\n const position = findFreePosition(widget.size.width, widget.size.height);\r\n layout.set(widget.id, position);\r\n occupyPosition(position.x, position.y, widget.size.width, widget.size.height);\r\n }\r\n\r\n return layout;\r\n}\r\n\r\n/**\r\n * Merges saved layout with widget defaults\r\n * Handles cases where widgets have been added/removed\r\n * Auto-arranges widgets that don't have positions\r\n */\r\nexport function mergeLayoutWithWidgets(\r\n widgets: IDashboardWidget[],\r\n savedLayout: Map<string, DashboardWidgetPlacement> | null,\r\n): Map<string, DashboardWidgetPlacement> {\r\n // If we have a saved layout with positions, use it\r\n if (savedLayout && savedLayout.size > 0) {\r\n const layout = new Map<string, DashboardWidgetPlacement>();\r\n\r\n for (const widget of widgets) {\r\n // Carries the saved size through as well — dropping it here would restore\r\n // the position but snap the widget back to its declared size.\r\n const savedPlacement = savedLayout.get(widget.id);\r\n const builtInPos = widget.position;\r\n const placement = savedPlacement ?? builtInPos ?? { x: 0, y: 0 };\r\n layout.set(widget.id, placement);\r\n }\r\n\r\n return layout;\r\n }\r\n\r\n // Check if all widgets have built-in positions\r\n const allHavePositions = widgets.every((w) => w.position !== undefined);\r\n\r\n if (allHavePositions) {\r\n const layout = new Map<string, DashboardWidgetPlacement>();\r\n for (const widget of widgets) {\r\n layout.set(widget.id, widget.position!);\r\n }\r\n return layout;\r\n }\r\n\r\n // Auto-arrange widgets\r\n return autoArrangeWidgets(widgets);\r\n}\r\n","/**\r\n * Gridstack Integration Composable\r\n *\r\n * Provides Vue 3 integration with Gridstack.js library.\r\n * Handles initialization, event binding, and cleanup.\r\n */\r\n\r\nimport { ref, shallowRef, onUnmounted, watch, nextTick, type Ref, type ShallowRef } from \"vue\";\r\nimport { GridStack, type GridStackOptions, type GridStackNode } from \"gridstack\";\r\nimport type {\r\n IDashboardWidget,\r\n DashboardWidgetPosition,\r\n DashboardWidgetPlacement,\r\n DashboardWidgetSize,\r\n} from \"@shell/dashboard/draggable-dashboard/types\";\r\nimport {\r\n toGridstackWidget,\r\n fromGridstackNode,\r\n loadLayoutFromStorage,\r\n saveLayoutToStorage,\r\n mergeLayoutWithWidgets,\r\n} from \"@shell/dashboard/draggable-dashboard/composables/useGridstackAdapter\";\r\n\r\n/**\r\n * Default Gridstack configuration\r\n */\r\nconst DEFAULT_OPTIONS: GridStackOptions = {\r\n column: 12,\r\n cellHeight: 80,\r\n margin: \"10px\",\r\n float: false,\r\n animate: true,\r\n // Disable responsive column changes - always use 12 columns\r\n columnOpts: {\r\n breakpoints: [{ w: 0, c: 12 }], // Always 12 columns regardless of width\r\n },\r\n draggable: {\r\n handle: \".grid-stack-item-content\",\r\n },\r\n resizable: {\r\n handles: \"se\", // Only bottom-right corner\r\n },\r\n};\r\n\r\n/**\r\n * Options for useGridstack composable\r\n */\r\nexport interface UseGridstackOptions {\r\n /** Gridstack configuration options */\r\n gridOptions?: Partial<GridStackOptions>;\r\n /** Enable widget resizing */\r\n resizable?: boolean;\r\n /** Auto-save layout to localStorage */\r\n autoSave?: boolean;\r\n /** Callback when layout changes */\r\n onLayoutChange?: (layout: Map<string, DashboardWidgetPlacement>) => void;\r\n}\r\n\r\n/**\r\n * Return type for useGridstack composable\r\n */\r\nexport interface UseGridstackReturn {\r\n /** Reference to GridStack instance */\r\n grid: ShallowRef<GridStack | null>;\r\n /** Current layout map: live position and, once known, live size */\r\n layout: Ref<Map<string, DashboardWidgetPlacement>>;\r\n /** Whether grid is initialized */\r\n isInitialized: Ref<boolean>;\r\n /** Initialize grid on element */\r\n initGrid: (element: HTMLElement) => void;\r\n /** Destroy grid instance */\r\n destroyGrid: () => void;\r\n /** Add a widget to the grid */\r\n addWidget: (widget: IDashboardWidget) => void;\r\n /** Remove a widget from the grid */\r\n removeWidget: (widgetId: string) => void;\r\n /** Update widget position */\r\n updateWidgetPosition: (widgetId: string, position: DashboardWidgetPosition) => void;\r\n updateWidgetSize: (widgetId: string, size: DashboardWidgetSize) => void;\r\n /** Save current layout */\r\n saveLayout: () => void;\r\n /** Load layout from storage */\r\n loadLayout: () => void;\r\n /** Reset to built-in positions */\r\n resetToDefaults: () => void;\r\n /** Batch update mode (disable animations) */\r\n batchUpdate: (fn: () => void) => void;\r\n}\r\n\r\n/**\r\n * Vue 3 composable for Gridstack integration\r\n */\r\nexport function useGridstack(widgets: Ref<IDashboardWidget[]>, options: UseGridstackOptions = {}): UseGridstackReturn {\r\n const { gridOptions = {}, resizable = false, autoSave = true, onLayoutChange } = options;\r\n\r\n // State\r\n const grid = shallowRef<GridStack | null>(null);\r\n const layout = ref<Map<string, DashboardWidgetPlacement>>(new Map());\r\n const isInitialized = ref(false);\r\n const isUpdating = ref(false);\r\n\r\n /**\r\n * Merge options with defaults\r\n */\r\n const mergedOptions: GridStackOptions = {\r\n ...DEFAULT_OPTIONS,\r\n ...gridOptions,\r\n disableResize: !resizable,\r\n };\r\n\r\n /**\r\n * Initialize the grid on a DOM element\r\n */\r\n const initGrid = (element: HTMLElement): void => {\r\n if (grid.value) {\r\n console.warn(\"[useGridstack] Grid already initialized\");\r\n return;\r\n }\r\n\r\n // Load saved layout\r\n const savedLayout = loadLayoutFromStorage();\r\n layout.value = mergeLayoutWithWidgets(widgets.value, savedLayout);\r\n\r\n // Initialize Gridstack\r\n grid.value = GridStack.init(mergedOptions, element);\r\n\r\n // Bind event handlers\r\n grid.value.on(\"change\", handleChange);\r\n grid.value.on(\"added\", handleAdded);\r\n grid.value.on(\"removed\", handleRemoved);\r\n\r\n // Explicitly load widgets with their positions to ensure proper layout\r\n // This is needed because Vue renders DOM after Gridstack.init() processes children\r\n const widgetData = widgets.value.map((widget) => {\r\n const position = layout.value.get(widget.id);\r\n return toGridstackWidget(widget, position);\r\n });\r\n\r\n // Use load() to apply positions - this updates existing items\r\n grid.value.load(widgetData);\r\n\r\n isInitialized.value = true;\r\n };\r\n\r\n /**\r\n * Handle grid change events (drag/resize)\r\n */\r\n const handleChange = (_event: Event, nodes: GridStackNode[]): void => {\r\n if (isUpdating.value) return;\r\n\r\n for (const node of nodes) {\r\n const { id, position } = fromGridstackNode(node);\r\n if (id) {\r\n // Size is recorded too, so a mouse resize reaches state and storage. Read\r\n // straight off the node rather than via fromGridstackNode, which defaults\r\n // a missing w/h to 1 — persisting that invented 1 would shrink the widget.\r\n const previous = layout.value.get(id);\r\n const width = typeof node.w === \"number\" ? node.w : previous?.width;\r\n const height = typeof node.h === \"number\" ? node.h : previous?.height;\r\n layout.value.set(id, {\r\n ...position,\r\n ...(typeof width === \"number\" ? { width } : {}),\r\n ...(typeof height === \"number\" ? { height } : {}),\r\n });\r\n }\r\n }\r\n\r\n // Trigger reactivity\r\n layout.value = new Map(layout.value);\r\n\r\n // Notify callback\r\n onLayoutChange?.(layout.value);\r\n\r\n // Auto-save\r\n if (autoSave) {\r\n saveLayout();\r\n }\r\n };\r\n\r\n /**\r\n * Handle widget added event\r\n */\r\n const handleAdded = (_event: Event, nodes: GridStackNode[]): void => {\r\n for (const node of nodes) {\r\n const { id, position } = fromGridstackNode(node);\r\n if (id && !layout.value.has(id)) {\r\n layout.value.set(id, position);\r\n }\r\n }\r\n layout.value = new Map(layout.value);\r\n };\r\n\r\n /**\r\n * Handle widget removed event\r\n */\r\n const handleRemoved = (_event: Event, nodes: GridStackNode[]): void => {\r\n for (const node of nodes) {\r\n if (node.id) {\r\n layout.value.delete(node.id);\r\n }\r\n }\r\n layout.value = new Map(layout.value);\r\n };\r\n\r\n /**\r\n * Destroy the grid instance\r\n */\r\n const destroyGrid = (): void => {\r\n if (grid.value) {\r\n grid.value.off(\"change\");\r\n grid.value.off(\"added\");\r\n grid.value.off(\"removed\");\r\n grid.value.destroy(false); // false = don't remove DOM elements\r\n grid.value = null;\r\n isInitialized.value = false;\r\n }\r\n };\r\n\r\n /**\r\n * Add a widget to the grid\r\n */\r\n const addWidget = (widget: IDashboardWidget): void => {\r\n if (!grid.value) return;\r\n\r\n const position = layout.value.get(widget.id) ?? widget.position;\r\n const gsWidget = toGridstackWidget(widget, position);\r\n\r\n // Find the DOM element for this widget\r\n const element = document.querySelector(`[gs-id=\"${widget.id}\"]`);\r\n if (element) {\r\n grid.value.makeWidget(element as HTMLElement, gsWidget);\r\n }\r\n };\r\n\r\n /**\r\n * Remove a widget from the grid\r\n */\r\n const removeWidget = (widgetId: string): void => {\r\n if (!grid.value) return;\r\n\r\n const element = document.querySelector(`[gs-id=\"${widgetId}\"]`);\r\n if (element) {\r\n grid.value.removeWidget(element as HTMLElement, false);\r\n }\r\n layout.value.delete(widgetId);\r\n };\r\n\r\n /**\r\n * Records where a widget actually ended up after a programmatic update.\r\n *\r\n * Reads the values back off the Gridstack node rather than trusting the ones we\r\n * asked for: Gridstack clamps to the grid edges and compacts the rows, so the\r\n * requested cell and the resulting cell often differ. Writing the requested\r\n * values instead is what made the layout state — and every announcement derived\r\n * from it — disagree with the DOM.\r\n *\r\n * `requested` is the fallback for environments where the node is not exposed\r\n * (notably unit tests with a stubbed grid).\r\n */\r\n const recordPlacementFromNode = (\r\n widgetId: string,\r\n element: Element,\r\n requestedPosition?: DashboardWidgetPosition,\r\n requestedSize?: DashboardWidgetSize,\r\n ): void => {\r\n const node = (element as HTMLElement & { gridstackNode?: GridStackNode }).gridstackNode;\r\n const previous = layout.value.get(widgetId);\r\n\r\n const x = node?.x ?? requestedPosition?.x ?? previous?.x ?? 0;\r\n const y = node?.y ?? requestedPosition?.y ?? previous?.y ?? 0;\r\n const width = node?.w ?? requestedSize?.width ?? previous?.width;\r\n const height = node?.h ?? requestedSize?.height ?? previous?.height;\r\n\r\n layout.value.set(widgetId, {\r\n x,\r\n y,\r\n ...(typeof width === \"number\" ? { width } : {}),\r\n ...(typeof height === \"number\" ? { height } : {}),\r\n });\r\n layout.value = new Map(layout.value);\r\n };\r\n\r\n /**\r\n * Update widget position programmatically\r\n */\r\n const updateWidgetPosition = (widgetId: string, position: DashboardWidgetPosition): void => {\r\n if (!grid.value) return;\r\n\r\n const element = document.querySelector(`[gs-id=\"${widgetId}\"]`);\r\n if (element) {\r\n isUpdating.value = true;\r\n grid.value.update(element as HTMLElement, { x: position.x, y: position.y });\r\n recordPlacementFromNode(widgetId, element, position);\r\n isUpdating.value = false;\r\n }\r\n };\r\n\r\n /**\r\n * Counterpart of updateWidgetPosition for the size axis, so a widget can be\r\n * resized programmatically — keyboard resizing has no drag handle to simulate.\r\n */\r\n const updateWidgetSize = (widgetId: string, size: DashboardWidgetSize): void => {\r\n if (!grid.value) return;\r\n\r\n const element = document.querySelector(`[gs-id=\"${widgetId}\"]`);\r\n if (element) {\r\n isUpdating.value = true;\r\n grid.value.update(element as HTMLElement, { w: size.width, h: size.height });\r\n recordPlacementFromNode(widgetId, element, undefined, size);\r\n isUpdating.value = false;\r\n }\r\n };\r\n\r\n /**\r\n * Save current layout to localStorage\r\n */\r\n const saveLayout = (): void => {\r\n saveLayoutToStorage(widgets.value, layout.value);\r\n };\r\n\r\n /**\r\n * Load layout from localStorage\r\n */\r\n const loadLayout = (): void => {\r\n const savedLayout = loadLayoutFromStorage();\r\n if (savedLayout) {\r\n layout.value = mergeLayoutWithWidgets(widgets.value, savedLayout);\r\n applyLayoutToGrid();\r\n }\r\n };\r\n\r\n /**\r\n * Reset to built-in widget positions\r\n */\r\n const resetToDefaults = (): void => {\r\n layout.value = new Map();\r\n for (const widget of widgets.value) {\r\n if (widget.position) {\r\n layout.value.set(widget.id, { ...widget.position });\r\n }\r\n }\r\n applyLayoutToGrid();\r\n saveLayout();\r\n };\r\n\r\n /**\r\n * Apply current layout to grid\r\n */\r\n const applyLayoutToGrid = (): void => {\r\n if (!grid.value) return;\r\n\r\n isUpdating.value = true;\r\n grid.value.batchUpdate();\r\n\r\n for (const widget of widgets.value) {\r\n const placement = layout.value.get(widget.id);\r\n if (placement) {\r\n const element = document.querySelector(`[gs-id=\"${widget.id}\"]`);\r\n if (element) {\r\n grid.value.update(element as HTMLElement, {\r\n x: placement.x,\r\n y: placement.y,\r\n // Restores a persisted size; omitted when unknown so Gridstack keeps\r\n // whatever the element already declares.\r\n ...(typeof placement.width === \"number\" ? { w: placement.width } : {}),\r\n ...(typeof placement.height === \"number\" ? { h: placement.height } : {}),\r\n });\r\n }\r\n }\r\n }\r\n\r\n grid.value.batchUpdate(false);\r\n isUpdating.value = false;\r\n };\r\n\r\n /**\r\n * Execute function in batch update mode\r\n */\r\n const batchUpdate = (fn: () => void): void => {\r\n if (!grid.value) {\r\n fn();\r\n return;\r\n }\r\n\r\n isUpdating.value = true;\r\n grid.value.batchUpdate();\r\n fn();\r\n grid.value.batchUpdate(false);\r\n isUpdating.value = false;\r\n };\r\n\r\n // Watch for widget changes\r\n watch(\r\n widgets,\r\n async (newWidgets, oldWidgets) => {\r\n if (!grid.value || !isInitialized.value) return;\r\n\r\n await nextTick();\r\n\r\n // Find added widgets\r\n const addedWidgets = newWidgets.filter((w) => !oldWidgets?.some((ow) => ow.id === w.id));\r\n\r\n // Find removed widgets\r\n const removedWidgetIds =\r\n oldWidgets?.filter((w) => !newWidgets.some((nw) => nw.id === w.id)).map((w) => w.id) ?? [];\r\n\r\n // Remove old widgets\r\n for (const id of removedWidgetIds) {\r\n removeWidget(id);\r\n }\r\n\r\n // Add new widgets\r\n for (const widget of addedWidgets) {\r\n addWidget(widget);\r\n }\r\n },\r\n { deep: false },\r\n );\r\n\r\n // Cleanup on unmount\r\n onUnmounted(() => {\r\n destroyGrid();\r\n });\r\n\r\n return {\r\n grid,\r\n layout,\r\n isInitialized,\r\n initGrid,\r\n destroyGrid,\r\n addWidget,\r\n removeWidget,\r\n updateWidgetPosition,\r\n updateWidgetSize,\r\n saveLayout,\r\n loadLayout,\r\n resetToDefaults,\r\n batchUpdate,\r\n };\r\n}\r\n","<template>\n <div\n class=\"dashboard-widget-skeleton\"\n aria-hidden=\"true\"\n >\n <div class=\"dashboard-widget-skeleton__header\">\n <div class=\"dashboard-widget-skeleton__icon\" />\n <div class=\"dashboard-widget-skeleton__title\" />\n </div>\n <div class=\"dashboard-widget-skeleton__stats\">\n <div class=\"dashboard-widget-skeleton__stat\" />\n <div class=\"dashboard-widget-skeleton__stat\" />\n <div class=\"dashboard-widget-skeleton__stat\" />\n </div>\n <div class=\"dashboard-widget-skeleton__body\">\n <div class=\"dashboard-widget-skeleton__line dashboard-widget-skeleton__line--w80\" />\n <div class=\"dashboard-widget-skeleton__line dashboard-widget-skeleton__line--w60\" />\n <div class=\"dashboard-widget-skeleton__line dashboard-widget-skeleton__line--w90\" />\n <div class=\"dashboard-widget-skeleton__line dashboard-widget-skeleton__line--w70\" />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\"></script>\n\n<style lang=\"scss\">\n:root {\n --dashboard-widget-skeleton-bg: var(--dashboard-widget-card-background, var(--additional-50));\n --dashboard-widget-skeleton-border-color: var(--dashboard-widget-card-border-color, var(--neutrals-200));\n --dashboard-widget-skeleton-radius: var(--dashboard-widget-card-border-radius, 8px);\n --dashboard-widget-skeleton-shadow: var(\n --dashboard-widget-card-shadow,\n 0 1px 3px rgba(0, 0, 0, 0.08) 0 1px 2px rgba(0, 0, 0, 0.06)\n );\n --dashboard-widget-skeleton-shimmer-from: var(--neutrals-100);\n --dashboard-widget-skeleton-shimmer-to: var(--neutrals-200);\n}\n\n@keyframes dashboard-widget-skeleton-shimmer {\n 0% {\n background-position: -400px 0;\n }\n 100% {\n background-position: 400px 0;\n }\n}\n\n.dashboard-widget-skeleton {\n @apply tw-overflow-hidden tw-h-full tw-flex tw-flex-col;\n background: var(--dashboard-widget-skeleton-bg);\n border: 1px solid var(--dashboard-widget-skeleton-border-color);\n border-radius: var(--dashboard-widget-skeleton-radius);\n box-shadow: var(--dashboard-widget-skeleton-shadow);\n\n %shimmer {\n background: linear-gradient(\n 90deg,\n var(--dashboard-widget-skeleton-shimmer-from) 0%,\n var(--dashboard-widget-skeleton-shimmer-to) 50%,\n var(--dashboard-widget-skeleton-shimmer-from) 100%\n );\n background-size: 800px 100%;\n animation: dashboard-widget-skeleton-shimmer 1.4s ease-in-out infinite;\n border-radius: 4px;\n }\n\n &__header {\n @apply tw-px-5 tw-py-4 tw-flex tw-items-center tw-gap-3;\n }\n\n &__icon {\n @apply tw-w-9 tw-h-9 tw-rounded-lg tw-flex-shrink-0;\n @extend %shimmer;\n }\n\n &__title {\n @apply tw-h-5 tw-flex-1 tw-max-w-[180px];\n @extend %shimmer;\n }\n\n &__stats {\n @apply tw-px-5 tw-py-3 tw-flex tw-items-center tw-gap-6;\n border-top: 1px solid var(--dashboard-widget-skeleton-border-color);\n border-bottom: 1px solid var(--dashboard-widget-skeleton-border-color);\n }\n\n &__stat {\n @apply tw-h-6 tw-flex-1;\n @extend %shimmer;\n }\n\n &__body {\n @apply tw-flex-1 tw-min-h-0 tw-px-5 tw-py-4 tw-flex tw-flex-col tw-gap-3;\n }\n\n &__line {\n @apply tw-h-3;\n @extend %shimmer;\n\n &--w60 {\n @apply tw-w-3/5;\n }\n &--w70 {\n @apply tw-w-7/12;\n }\n &--w80 {\n @apply tw-w-4/5;\n }\n &--w90 {\n @apply tw-w-11/12;\n }\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .dashboard-widget-skeleton {\n %shimmer {\n animation: none;\n }\n }\n}\n</style>\n","<template>\n <VcContainer\n no-padding\n class=\"vc-gridstack-dashboard\"\n >\n <div\n v-if=\"!modulesReady\"\n class=\"vc-gridstack-dashboard__skeleton-grid\"\n role=\"status\"\n aria-busy=\"true\"\n :aria-label=\"ariaLabel\"\n >\n <DashboardWidgetSkeleton\n v-for=\"(item, index) in skeletonItems\"\n :key=\"`skeleton-${index}`\"\n class=\"vc-gridstack-dashboard__skeleton-item\"\n :style=\"skeletonItemStyle(item)\"\n />\n </div>\n <div\n v-else\n ref=\"gridRef\"\n class=\"grid-stack vc-gridstack-dashboard__grid\"\n role=\"list\"\n :aria-label=\"ariaLabel\"\n >\n <div\n v-for=\"(widget, index) in widgets\"\n :key=\"widget.id\"\n class=\"grid-stack-item\"\n :class=\"{ 'vc-gridstack-dashboard__item--grabbed': grabbedWidgetId === widget.id }\"\n :gs-id=\"widget.id\"\n :gs-x=\"getPosition(widget.id)?.x ?? widget.position?.x ?? 0\"\n :gs-y=\"getPosition(widget.id)?.y ?? widget.position?.y ?? 0\"\n :gs-w=\"sizeOf(widget).width\"\n :gs-h=\"sizeOf(widget).height\"\n :gs-min-w=\"2\"\n :gs-min-h=\"2\"\n role=\"listitem\"\n tabindex=\"0\"\n :aria-label=\"getWidgetAriaLabel(widget, index)\"\n @keydown=\"onWidgetKeydown($event, widget)\"\n >\n <div class=\"grid-stack-item-content\">\n <!-- Drag handle (optional) -->\n <div\n v-if=\"showDragHandles\"\n class=\"vc-gridstack-dashboard__drag-handle\"\n aria-hidden=\"true\"\n >\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"currentColor\"\n >\n <circle\n cx=\"5\"\n cy=\"3\"\n r=\"1.5\"\n />\n <circle\n cx=\"11\"\n cy=\"3\"\n r=\"1.5\"\n />\n <circle\n cx=\"5\"\n cy=\"8\"\n r=\"1.5\"\n />\n <circle\n cx=\"11\"\n cy=\"8\"\n r=\"1.5\"\n />\n <circle\n cx=\"5\"\n cy=\"13\"\n r=\"1.5\"\n />\n <circle\n cx=\"11\"\n cy=\"13\"\n r=\"1.5\"\n />\n </svg>\n </div>\n\n <!-- Widget content -->\n <component\n :is=\"widget.component\"\n v-bind=\"widget.props || {}\"\n class=\"vc-gridstack-dashboard__widget-content\"\n />\n </div>\n </div>\n </div>\n\n <!-- Screen reader announcements -->\n <div\n class=\"vc-gridstack-dashboard__live-region\"\n role=\"status\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n {{ liveAnnouncement }}\n </div>\n </VcContainer>\n</template>\n\n<script setup lang=\"ts\">\n/**\n * GridstackDashboard Component\n *\n * A flexible dashboard powered by Gridstack.js that allows widgets to be\n * dragged and arranged in a grid layout.\n *\n * Features:\n * - Drag and drop interface for arranging widgets\n * - Optional widget resizing\n * - Automatic layout persistence in localStorage\n * - Support for built-in widget positions\n * - Accessibility support\n */\nimport { ref, computed, onMounted, nextTick, inject, watch } from \"vue\";\nimport type {\n IDashboardWidget,\n DashboardWidgetPosition,\n DashboardWidgetSize,\n} from \"@shell/dashboard/draggable-dashboard/types\";\nimport { useDashboard } from \"@core/composables/useDashboard\";\nimport { useGridstack } from \"@shell/dashboard/draggable-dashboard/composables/useGridstack\";\nimport VcContainer from \"@ui/components/atoms/vc-container/vc-container.vue\";\nimport DashboardWidgetSkeleton from \"@shell/dashboard/draggable-dashboard/DashboardWidgetSkeleton.vue\";\nimport { ModulesReadyKey } from \"@framework/injection-keys\";\nimport { LAYOUT_STORAGE_KEY } from \"@shell/dashboard/draggable-dashboard/composables/useGridstackAdapter\";\nimport \"gridstack/dist/gridstack.min.css\";\n\ninterface SkeletonItem {\n x: number;\n y: number;\n w: number;\n h: number;\n}\n\n// Default placeholders shown when there's no persisted layout yet (first visit).\n// 6×6 matches the typical real widget size in vc-shell apps.\nconst DEFAULT_SKELETONS: SkeletonItem[] = [\n { x: 0, y: 0, w: 6, h: 6 },\n { x: 6, y: 0, w: 6, h: 6 },\n { x: 0, y: 6, w: 6, h: 6 },\n { x: 6, y: 6, w: 6, h: 6 },\n];\n\nfunction readPersistedSkeletons(): SkeletonItem[] | null {\n if (typeof window === \"undefined\") return null;\n try {\n const raw = window.localStorage.getItem(LAYOUT_STORAGE_KEY);\n if (!raw) return null;\n const parsed = JSON.parse(raw);\n if (!Array.isArray(parsed)) return null;\n const items = parsed\n .filter(\n (n: unknown): n is SkeletonItem =>\n !!n &&\n typeof n === \"object\" &&\n typeof (n as SkeletonItem).w === \"number\" &&\n typeof (n as SkeletonItem).h === \"number\" &&\n typeof (n as SkeletonItem).x === \"number\" &&\n typeof (n as SkeletonItem).y === \"number\",\n )\n .map((n) => ({ x: n.x, y: n.y, w: n.w, h: n.h }));\n return items.length > 0 ? items : null;\n } catch {\n return null;\n }\n}\n\n// Props\ninterface Props {\n /** Show drag handle icons on widgets */\n showDragHandles?: boolean;\n /** Enable widget resizing */\n resizable?: boolean;\n /** Aria label for the dashboard container */\n ariaLabel?: string;\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n showDragHandles: false,\n resizable: false,\n ariaLabel: \"Dashboard widgets. Drag a widget, or focus one and press Enter to rearrange with the arrow keys.\",\n});\n\n// Refs\nconst gridRef = ref<HTMLElement | null>(null);\nconst liveAnnouncement = ref(\"\");\n\n// Gate dashboard rendering until remote modules finish installing.\n// Without this, widgets preregistered during loadRemote() can mount before\n// their owning module's `defineAppModule.install` runs `mergeLocaleMessage`,\n// causing missing translations. Fallback `ref(true)` keeps tests/stories and\n// hosts without MF working unchanged.\nconst modulesReady = inject(ModulesReadyKey, ref(true));\n\n// Skeleton placeholders shown until modules finish loading. Pulled from the last\n// persisted layout (so returning users see card sizes matching their real dashboard);\n// fallback to a generic 4-card grid on first visit.\nconst skeletonItems = computed<SkeletonItem[]>(() => {\n if (modulesReady.value) return [];\n return readPersistedSkeletons() ?? DEFAULT_SKELETONS;\n});\n\nconst skeletonItemStyle = (item: SkeletonItem): Record<string, string> => ({\n gridColumn: `${item.x + 1} / span ${item.w}`,\n gridRow: `${item.y + 1} / span ${item.h}`,\n});\n\n// Dashboard service\nconst dashboard = useDashboard();\nconst widgets = computed(() => dashboard.getWidgets() as IDashboardWidget[]);\n\n// Gridstack integration\nconst { layout, isInitialized, initGrid, saveLayout, resetToDefaults, updateWidgetPosition, updateWidgetSize } =\n useGridstack(widgets, {\n resizable: props.resizable,\n autoSave: true,\n gridOptions: {\n draggable: {\n handle: props.showDragHandles ? \".vc-gridstack-dashboard__drag-handle\" : \".grid-stack-item-content\",\n },\n },\n onLayoutChange: (newLayout) => {\n // Sync with dashboard service\n for (const [widgetId, position] of newLayout) {\n dashboard.updateWidgetPosition(widgetId, position);\n }\n announceToScreenReader(\"Widget positions updated\");\n },\n });\n\n// Helper to get widget position\nconst getPosition = (widgetId: string): DashboardWidgetPosition | undefined => {\n return layout.value.get(widgetId);\n};\n\n// --- Keyboard reordering (WCAG 2.5.7: dragging must have a non-drag alternative) ---\n//\n// Gridstack only offers pointer dragging, so the widget itself becomes the control:\n// Enter/Space picks it up, arrows move it a cell at a time, Shift+arrows resize,\n// Enter drops, Escape restores the position it was picked up from.\nconst grabbedWidgetId = ref<string | null>(null);\nconst grabbedOrigin = ref<DashboardWidgetPosition | null>(null);\n// Escape has to restore the size too, now that Shift+arrows can change it.\nconst grabbedOriginSize = ref<DashboardWidgetSize | null>(null);\n\n// Mirrors gs-min-w / gs-min-h on the item.\nconst MIN_WIDGET_SPAN = 2;\n\nconst positionOf = (widget: IDashboardWidget): DashboardWidgetPosition =>\n layout.value.get(widget.id) ?? widget.position ?? { x: 0, y: 0 };\n\n// The live size, mirroring positionOf. `widget.size` is only the declared default\n// and is never written back to, so reading it directly made every resize compute\n// from the same baseline instead of from the current size.\nconst sizeOf = (widget: IDashboardWidget): DashboardWidgetSize => {\n const placement = layout.value.get(widget.id);\n return {\n width: placement?.width ?? widget.size.width,\n height: placement?.height ?? widget.size.height,\n };\n};\n\nconst widgetName = (widget: IDashboardWidget): string => widget.name || widget.id;\n\nconst pickUpWidget = (widget: IDashboardWidget): void => {\n grabbedWidgetId.value = widget.id;\n grabbedOrigin.value = { ...positionOf(widget) };\n grabbedOriginSize.value = { ...sizeOf(widget) };\n announceToScreenReader(\n `${widgetName(widget)} picked up. Use arrow keys to move, Shift and arrow keys to resize, Enter to drop, Escape to cancel.`,\n );\n};\n\nconst dropWidget = (widget: IDashboardWidget): void => {\n grabbedWidgetId.value = null;\n grabbedOrigin.value = null;\n grabbedOriginSize.value = null;\n saveLayout();\n const { x, y } = positionOf(widget);\n announceToScreenReader(`${widgetName(widget)} dropped at column ${x + 1}, row ${y + 1}.`);\n};\n\nconst cancelWidgetMove = (widget: IDashboardWidget): void => {\n const origin = grabbedOrigin.value;\n const originSize = grabbedOriginSize.value;\n const current = sizeOf(widget);\n\n if (originSize && (originSize.width !== current.width || originSize.height !== current.height)) {\n updateWidgetSize(widget.id, originSize);\n }\n if (origin) {\n updateWidgetPosition(widget.id, origin);\n }\n\n grabbedWidgetId.value = null;\n grabbedOrigin.value = null;\n grabbedOriginSize.value = null;\n announceToScreenReader(`Move cancelled. ${widgetName(widget)} returned to its original position and size.`);\n};\n\nconst moveWidgetBy = (widget: IDashboardWidget, dx: number, dy: number): void => {\n const current = positionOf(widget);\n const next = { x: current.x + dx, y: current.y + dy };\n // Gridstack clamps silently; refusing the move keeps the announcement honest.\n if (next.x < 0 || next.y < 0) return;\n\n updateWidgetPosition(widget.id, next);\n // Announce where the widget actually landed, not where it was asked to go —\n // Gridstack compacts rows, so the two differ.\n // Announce where the widget actually landed, not where it was asked to go —\n // Gridstack compacts rows, so the two differ.\n const landed = positionOf(widget);\n announceToScreenReader(`${widgetName(widget)} moved to column ${landed.x + 1}, row ${landed.y + 1}.`);\n};\n\nconst resizeWidgetBy = (widget: IDashboardWidget, dw: number, dh: number): void => {\n const current = sizeOf(widget);\n // Only the requested axis changes; sending both would drag the untouched one\n // back to its baseline.\n const width = dw ? Math.max(MIN_WIDGET_SPAN, current.width + dw) : current.width;\n const height = dh ? Math.max(MIN_WIDGET_SPAN, current.height + dh) : current.height;\n if (width === current.width && height === current.height) return;\n\n updateWidgetSize(widget.id, { width, height });\n const applied = sizeOf(widget);\n announceToScreenReader(`${widgetName(widget)} resized to ${applied.width} by ${applied.height} cells.`);\n};\n\nconst onWidgetKeydown = (event: KeyboardEvent, widget: IDashboardWidget): void => {\n if (event.target !== event.currentTarget) return;\n\n const isGrabbed = grabbedWidgetId.value === widget.id;\n\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n if (isGrabbed) dropWidget(widget);\n else {\n // Starting another move cancels the unfinished one so its origin is not lost.\n const grabbedWidget = widgets.value.find((candidate) => candidate.id === grabbedWidgetId.value);\n if (grabbedWidget) cancelWidgetMove(grabbedWidget);\n pickUpWidget(widget);\n }\n return;\n }\n\n if (event.key === \"Escape\" && isGrabbed) {\n event.preventDefault();\n cancelWidgetMove(widget);\n return;\n }\n\n const dx = event.key === \"ArrowLeft\" ? -1 : event.key === \"ArrowRight\" ? 1 : 0;\n const dy = event.key === \"ArrowUp\" ? -1 : event.key === \"ArrowDown\" ? 1 : 0;\n if ((dx === 0 && dy === 0) || !isGrabbed) return;\n\n event.preventDefault();\n if (event.shiftKey) {\n if (props.resizable) resizeWidgetBy(widget, dx, dy);\n } else {\n moveWidgetBy(widget, dx, dy);\n }\n};\n\n// Accessibility helpers\nconst getWidgetAriaLabel = (widget: IDashboardWidget, index: number): string => {\n const name = widget.name || widget.id;\n const state =\n grabbedWidgetId.value === widget.id\n ? \"Picked up. Arrow keys move, Enter drops, Escape cancels.\"\n : \"Press Enter to pick up and rearrange with the arrow keys.\";\n return `${name}, widget ${index + 1} of ${widgets.value.length}. ${state}`;\n};\n\nconst announceToScreenReader = (message: string): void => {\n liveAnnouncement.value = message;\n setTimeout(() => {\n liveAnnouncement.value = \"\";\n }, 1000);\n};\n\nconst tryInitGrid = async (): Promise<void> => {\n await nextTick();\n if (gridRef.value && !isInitialized.value) {\n initGrid(gridRef.value);\n }\n};\n\nonMounted(tryInitGrid);\n\n// When modules finish loading, the v-if mounts gridRef — initialize gridstack then.\nwatch(modulesReady, (ready) => {\n if (ready) tryInitGrid();\n});\n\n// Public methods\nconst rearrangeWidgets = (): void => {\n resetToDefaults();\n};\n\nconst recalculateLayout = (): void => {\n // Gridstack handles this automatically\n};\n\nconst useBuiltInPositions = (): boolean => {\n resetToDefaults();\n return true;\n};\n\n// Expose public methods\ndefineExpose({\n rearrangeWidgets,\n recalculateLayout,\n saveLayout,\n useBuiltInPositions,\n});\n</script>\n\n<style lang=\"scss\">\n@import \"gridstack/dist/gridstack.min.css\";\n\n:root {\n --gridstack-dashboard-background: var(--additional-50);\n --gridstack-widget-background: var(--additional-50);\n --gridstack-widget-border-radius: 8px;\n --gridstack-widget-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);\n --gridstack-widget-shadow-dragging: 0 8px 24px rgba(0, 0, 0, 0.15);\n --gridstack-placeholder-background: rgba(59, 130, 246, 0.1);\n --gridstack-placeholder-border: rgba(59, 130, 246, 0.5);\n --gridstack-drag-handle-color: var(--neutrals-400);\n --gridstack-drag-handle-color-hover: var(--neutrals-600);\n --gridstack-widget-focus-ring-color: var(--primary-500);\n}\n\n.vc-gridstack-dashboard {\n background-color: var(--gridstack-dashboard-background);\n min-height: 100%;\n\n &__grid {\n padding: 24px 18px;\n min-height: calc(80px * 8 + 24px * 2); // 8 rows minimum\n }\n\n // Widgets are focusable so they can be rearranged from the keyboard.\n .grid-stack-item:focus-visible {\n @apply tw-outline-none tw-ring-[3px] tw-ring-[color:var(--gridstack-widget-focus-ring-color)];\n border-radius: var(--gridstack-widget-border-radius);\n }\n\n // Picked up for a keyboard move: the pointer equivalent of \"being dragged\".\n &__item--grabbed {\n z-index: var(--z-local-above);\n\n .grid-stack-item-content {\n box-shadow: var(--gridstack-widget-shadow-dragging);\n outline: 2px dashed var(--gridstack-placeholder-border);\n outline-offset: 2px;\n }\n }\n\n // Skeleton grid mirrors gridstack's 12-column geometry. Row height and gap are\n // tuned so a 6×6 placeholder visually matches a real 6×6 widget rendered by\n // gridstack (which collapses margins differently than a plain CSS grid).\n &__skeleton-grid {\n display: grid;\n grid-template-columns: repeat(12, 1fr);\n grid-auto-rows: 55px;\n gap: 20px;\n padding: 24px 18px;\n min-height: calc(55px * 8 + 24px * 2);\n }\n\n &__skeleton-item {\n min-width: 0;\n min-height: 0;\n }\n\n // Widget item styling\n .grid-stack-item {\n &-content {\n background: var(--gridstack-widget-background);\n border-radius: var(--gridstack-widget-border-radius);\n box-shadow: var(--gridstack-widget-shadow);\n overflow: hidden;\n // Note: Don't set height: 100% - Gridstack uses position: absolute with inset for margins\n transition: box-shadow 0.2s ease;\n }\n\n // Dragging state\n &.ui-draggable-dragging {\n .grid-stack-item-content {\n box-shadow: var(--gridstack-widget-shadow-dragging);\n }\n }\n\n // Resizing state\n &.ui-resizable-resizing {\n .grid-stack-item-content {\n box-shadow: var(--gridstack-widget-shadow-dragging);\n }\n }\n }\n\n // Placeholder styling\n .grid-stack-placeholder {\n > .placeholder-content {\n background: var(--gridstack-placeholder-background);\n border: 2px dashed var(--gridstack-placeholder-border);\n border-radius: var(--gridstack-widget-border-radius);\n }\n }\n\n // Drag handle\n &__drag-handle {\n position: absolute;\n top: 8px;\n right: 8px;\n z-index: var(--z-local-sticky);\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--gridstack-drag-handle-color);\n cursor: grab;\n border-radius: 4px;\n transition:\n color 0.15s ease,\n background-color 0.15s ease;\n\n &:hover {\n color: var(--gridstack-drag-handle-color-hover);\n background-color: rgba(0, 0, 0, 0.05);\n }\n\n &:active {\n cursor: grabbing;\n }\n }\n\n // Widget content\n &__widget-content {\n width: 100%;\n height: 100%;\n }\n\n // Screen reader only\n &__live-region {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n}\n\n// Respect reduced motion preference\n@media (prefers-reduced-motion: reduce) {\n .vc-gridstack-dashboard {\n .grid-stack-item {\n transition: none !important;\n\n &-content {\n transition: none !important;\n }\n }\n }\n\n .grid-stack {\n &.grid-stack-animate {\n .grid-stack-item {\n transition: none !important;\n }\n }\n }\n}\n</style>\n","<template>\n <GridstackDashboard\n ref=\"dashboardRef\"\n :show-drag-handles=\"showDragHandles\"\n :resizable=\"resizable\"\n :aria-label=\"ariaLabel\"\n />\n</template>\n\n<script setup lang=\"ts\">\n/**\n * DraggableDashboard Component\n *\n * A flexible dashboard powered by Gridstack.js that allows widgets to be\n * dragged and arranged in a grid layout.\n *\n * Features:\n * - Drag and drop interface for arranging widgets\n * - Automatic layout persistence in localStorage\n * - Support for built-in widget positions\n * - Accessibility support (a11y)\n * - Optional widget resizing\n */\nimport { ref } from \"vue\";\nimport GridstackDashboard from \"@shell/dashboard/draggable-dashboard/GridstackDashboard.vue\";\n\n// Props\ninterface Props {\n /** Show drag handle icons on widgets */\n showDragHandles?: boolean;\n /** Enable widget resizing */\n resizable?: boolean;\n /** Aria label for the dashboard container */\n ariaLabel?: string;\n}\n\nwithDefaults(defineProps<Props>(), {\n showDragHandles: false,\n resizable: false,\n ariaLabel: \"Dashboard widgets. Drag widgets to rearrange.\",\n});\n\n// State\nconst dashboardRef = ref<InstanceType<typeof GridstackDashboard> | null>(null);\n\n// Public methods (delegated to GridstackDashboard)\nconst rearrangeWidgets = (): void => {\n dashboardRef.value?.rearrangeWidgets?.();\n};\n\nconst recalculateLayout = (): void => {\n dashboardRef.value?.recalculateLayout?.();\n};\n\nconst saveLayout = (): void => {\n dashboardRef.value?.saveLayout?.();\n};\n\nconst useBuiltInPositions = (): boolean => {\n return dashboardRef.value?.useBuiltInPositions?.() ?? false;\n};\n\n// Expose public methods\ndefineExpose({\n rearrangeWidgets,\n recalculateLayout,\n saveLayout,\n useBuiltInPositions,\n});\n</script>\n","// Main component\nexport { default as DraggableDashboard } from \"@shell/dashboard/draggable-dashboard/DraggableDashboard.vue\";\n\n// Types\nexport type {\n IDashboardWidget,\n DashboardWidgetPosition,\n DashboardWidgetSize,\n DashboardDragEvent,\n DashboardGridConfig,\n} from \"@shell/dashboard/draggable-dashboard/types\";\n\n// Gridstack composables (for advanced usage)\nexport { useGridstack } from \"@shell/dashboard/draggable-dashboard/composables/useGridstack\";\nexport type {\n UseGridstackOptions,\n UseGridstackReturn,\n} from \"@shell/dashboard/draggable-dashboard/composables/useGridstack\";\n\n// Import and re-export to avoid Storybook docgen issues with direct re-exports\nimport {\n toGridstackWidget as _toGridstackWidget,\n fromGridstackNode as _fromGridstackNode,\n loadLayoutFromStorage as _loadLayoutFromStorage,\n saveLayoutToStorage as _saveLayoutToStorage,\n mergeLayoutWithWidgets as _mergeLayoutWithWidgets,\n clearLayoutStorage as _clearLayoutStorage,\n LAYOUT_STORAGE_KEY as _LAYOUT_STORAGE_KEY,\n} from \"@shell/dashboard/draggable-dashboard/composables/useGridstackAdapter\";\n\nexport const toGridstackWidget = _toGridstackWidget;\nexport const fromGridstackNode = _fromGridstackNode;\nexport const loadLayoutFromStorage = _loadLayoutFromStorage;\nexport const saveLayoutToStorage = _saveLayoutToStorage;\nexport const mergeLayoutWithWidgets = _mergeLayoutWithWidgets;\nexport const clearLayoutStorage = _clearLayoutStorage;\nexport const LAYOUT_STORAGE_KEY = _LAYOUT_STORAGE_KEY;\n","<template>\n <div class=\"dashboard-widget-card\">\n <div class=\"dashboard-widget-card__header\">\n <slot name=\"header\">\n <div class=\"dashboard-widget-card__header-content\">\n <div\n v-if=\"icon\"\n class=\"dashboard-widget-card__icon-wrapper\"\n >\n <VcIcon\n class=\"dashboard-widget-card__icon\"\n :icon=\"icon\"\n size=\"l\"\n />\n </div>\n <div class=\"dashboard-widget-card__title\">{{ props.header }}</div>\n </div>\n </slot>\n <div\n v-if=\"$slots.actions\"\n class=\"dashboard-widget-card__actions\"\n >\n <slot name=\"actions\"></slot>\n </div>\n </div>\n\n <div\n v-if=\"$slots.stats\"\n class=\"dashboard-widget-card__stats\"\n >\n <slot name=\"stats\"></slot>\n </div>\n\n <div\n v-loading=\"loading\"\n class=\"dashboard-widget-card__body\"\n >\n <slot name=\"content\"></slot>\n </div>\n\n <div\n v-if=\"$slots.footer\"\n class=\"dashboard-widget-card__footer\"\n >\n <slot name=\"footer\"></slot>\n </div>\n </div>\n</template>\n\n<!-- eslint-disable @typescript-eslint/no-explicit-any -->\n<script setup lang=\"ts\">\nexport interface Props {\n header?: string;\n icon?: string;\n loading?: boolean;\n}\n\nimport { VcIcon } from \"@ui/components\";\nimport { vLoading } from \"@core/directives\";\n\nconst props = defineProps<Props>();\n\ndefineSlots<{\n header?: (props: any) => any;\n actions?: (props: any) => any;\n stats?: (props: any) => any;\n content?: (props: any) => any;\n footer?: (props: any) => any;\n}>();\n</script>\n\n<style lang=\"scss\">\n:root {\n // Legacy variables (preserved for backward compat)\n --dashboard-widget-card-header-color: var(--additional-50);\n --dashboard-widget-card-header-text-color: var(--neutrals-950);\n --dashboard-widget-card-icon-color: var(--primary-600);\n --dashboard-widget-card-header-border-color: var(--neutrals-200);\n\n // New variables\n --dashboard-widget-card-background: var(--additional-50);\n --dashboard-widget-card-border-color: var(--neutrals-200);\n --dashboard-widget-card-border-radius: 8px;\n --dashboard-widget-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);\n --dashboard-widget-card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.1);\n --dashboard-widget-card-icon-bg: var(--primary-50);\n --dashboard-widget-card-stats-bg: var(--neutrals-50);\n --dashboard-widget-card-footer-color: var(--primary-700);\n}\n\n.dashboard-widget-card {\n @apply tw-overflow-hidden tw-h-full tw-flex tw-flex-col;\n background: var(--dashboard-widget-card-background);\n border: 1px solid var(--dashboard-widget-card-border-color);\n border-radius: var(--dashboard-widget-card-border-radius);\n box-shadow: var(--dashboard-widget-card-shadow);\n transition: box-shadow 0.2s ease;\n\n &:hover {\n box-shadow: var(--dashboard-widget-card-shadow-hover);\n }\n\n &__header {\n @apply tw-px-5 tw-py-4 tw-flex tw-justify-between tw-items-center tw-gap-3;\n }\n\n &__header-content {\n @apply tw-flex tw-items-center tw-gap-3 tw-min-w-0;\n }\n\n &__icon-wrapper {\n @apply tw-flex tw-items-center tw-justify-center tw-w-9 tw-h-9 tw-rounded-lg tw-flex-shrink-0;\n background: var(--dashboard-widget-card-icon-bg);\n }\n\n &__icon {\n @apply tw-text-[var(--dashboard-widget-card-icon-color)];\n }\n\n &__title {\n @apply tw-text-lg tw-font-semibold tw-truncate;\n color: var(--dashboard-widget-card-header-text-color);\n }\n\n &__actions {\n @apply tw-flex tw-items-center tw-gap-2 tw-flex-shrink-0;\n }\n\n &__stats {\n @apply tw-px-5 tw-py-3 tw-flex tw-items-center tw-gap-6;\n background: var(--dashboard-widget-card-stats-bg);\n border-top: 1px solid var(--dashboard-widget-card-border-color);\n border-bottom: 1px solid var(--dashboard-widget-card-border-color);\n }\n\n &__body {\n @apply tw-flex-1 tw-min-h-0;\n }\n\n &__footer {\n @apply tw-px-5 tw-py-3 tw-text-center;\n border-top: 1px solid var(--dashboard-widget-card-border-color);\n\n a,\n button {\n @apply tw-text-sm tw-font-medium tw-no-underline;\n color: var(--dashboard-widget-card-footer-color);\n transition: opacity 0.15s ease;\n\n &:hover {\n @apply tw-underline;\n opacity: 0.85;\n }\n }\n }\n}\n\n// Shared activity-feed row style for dashboard card content\n.dashboard-feed-row {\n @apply tw-flex tw-items-center tw-justify-between tw-px-5 tw-py-2.5 tw-cursor-pointer tw-transition-colors;\n\n &:hover {\n background: var(--dashboard-widget-card-icon-bg, var(--primary-50));\n }\n}\n</style>\n","<template>\n <div class=\"dashboard-stat-item\">\n <div\n class=\"dashboard-stat-item__value\"\n :class=\"variant ? `dashboard-stat-item__value--${variant}` : ''\"\n >\n {{ value }}\n </div>\n <div class=\"dashboard-stat-item__label\">{{ label }}</div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nexport interface DashboardStatItemProps {\n /** The metric value to display */\n value: string | number;\n /** Descriptive label below the value */\n label: string;\n /** Color variant for the value */\n variant?: \"default\" | \"success\" | \"warning\" | \"danger\";\n}\n\ndefineProps<DashboardStatItemProps>();\n</script>\n\n<style lang=\"scss\">\n:root {\n --dashboard-stat-item-value-color: var(--neutrals-950);\n --dashboard-stat-item-label-color: var(--neutrals-500);\n}\n\n.dashboard-stat-item {\n @apply tw-flex tw-flex-col tw-items-center tw-min-w-0;\n\n &__value {\n @apply tw-text-lg tw-font-semibold tw-leading-tight tw-text-[var(--dashboard-stat-item-value-color)] tw-truncate tw-max-w-full;\n\n &--success {\n @apply tw-text-[var(--success-600)];\n }\n\n &--warning {\n @apply tw-text-[var(--warning-600)];\n }\n\n &--danger {\n @apply tw-text-[var(--danger-600)];\n }\n }\n\n &__label {\n @apply tw-text-xs tw-text-[var(--dashboard-stat-item-label-color)] tw-mt-0.5 tw-truncate tw-max-w-full;\n }\n}\n</style>\n","<!-- eslint-disable @typescript-eslint/no-explicit-any -->\n<template>\n <div class=\"tw-divide-y tw-divide-[var(--neutrals-200)]\">\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\ndefineSlots<{\n default: (props: any) => any;\n}>();\n</script>\n","<!-- eslint-disable @typescript-eslint/no-explicit-any -->\n<template>\n <div\n class=\"dashboard-feed-row\"\n @click=\"$emit('click')\"\n >\n <div class=\"tw-flex tw-items-center tw-gap-2.5 tw-min-w-0\">\n <slot />\n </div>\n <div\n v-if=\"$slots.trailing\"\n class=\"tw-flex tw-items-center tw-gap-3 tw-flex-shrink-0 tw-ml-3\"\n >\n <slot name=\"trailing\" />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\ndefineEmits<{\n click: [];\n}>();\n\ndefineSlots<{\n default: (props: any) => any;\n trailing: (props: any) => any;\n}>();\n</script>\n"],"names":["LAYOUT_STORAGE_KEY","toGridstackWidget","widget","placement","pos","fromGridstackNode","node","gridstackNodesToLayoutMap","nodes","layout","loadLayoutFromStorage","stored","parsed","id","error","saveLayoutToStorage","widgets","gridstackFormat","clearLayoutStorage","autoArrangeWidgets","columns","rowOccupancy","isPositionFree","x","width","height","row","occupied","col","occupyPosition","findFreePosition","y","position","mergeLayoutWithWidgets","savedLayout","savedPlacement","builtInPos","w","DEFAULT_OPTIONS","useGridstack","options","gridOptions","resizable","autoSave","onLayoutChange","grid","shallowRef","ref","isInitialized","isUpdating","mergedOptions","initGrid","element","GridStack","handleChange","handleAdded","handleRemoved","widgetData","_event","previous","saveLayout","destroyGrid","addWidget","gsWidget","removeWidget","widgetId","recordPlacementFromNode","requestedPosition","requestedSize","updateWidgetPosition","updateWidgetSize","size","loadLayout","applyLayoutToGrid","resetToDefaults","batchUpdate","fn","watch","newWidgets","oldWidgets","nextTick","addedWidgets","ow","removedWidgetIds","nw","onUnmounted","_openBlock","_createElementBlock","_hoisted_1","_cache","MIN_WIDGET_SPAN","DEFAULT_SKELETONS","readPersistedSkeletons","raw","items","n","props","__props","gridRef","liveAnnouncement","modulesReady","inject","ModulesReadyKey","skeletonItems","computed","skeletonItemStyle","item","dashboard","useDashboard","newLayout","announceToScreenReader","getPosition","grabbedWidgetId","grabbedOrigin","grabbedOriginSize","positionOf","sizeOf","widgetName","pickUpWidget","dropWidget","cancelWidgetMove","origin","originSize","current","moveWidgetBy","dx","dy","next","landed","resizeWidgetBy","dw","dh","applied","onWidgetKeydown","event","isGrabbed","grabbedWidget","candidate","getWidgetAriaLabel","index","name","state","message","tryInitGrid","onMounted","ready","__expose","_createBlock","VcContainer","_unref","_Fragment","_renderList","$event","_createElementVNode","_hoisted_4","_hoisted_5","_resolveDynamicComponent","_mergeProps","DashboardWidgetSkeleton","_normalizeStyle","_hoisted_6","_toDisplayString","dashboardRef","GridstackDashboard","_toGridstackWidget","_fromGridstackNode","_loadLayoutFromStorage","_saveLayoutToStorage","_mergeLayoutWithWidgets","_clearLayoutStorage","_LAYOUT_STORAGE_KEY","_hoisted_2","_renderSlot","_ctx","_hoisted_3","_createVNode","VcIcon","$slots","_hoisted_7","_withDirectives","_hoisted_8","_hoisted_9","_normalizeClass","$emit"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBO,MAAMA,IAAqB;AAY3B,SAASC,GAAkBC,GAA0BC,GAAuD;AACjH,QAAMC,IAAMD,KAAaD,EAAO;AAChC,SAAO;AAAA,IACL,IAAIA,EAAO;AAAA,IACX,GAAGE,GAAK,KAAK;AAAA,IACb,GAAGA,GAAK,KAAK;AAAA;AAAA;AAAA,IAGb,GAAGD,GAAW,SAASD,EAAO,KAAK;AAAA,IACnC,GAAGC,GAAW,UAAUD,EAAO,KAAK;AAAA,IACpC,MAAM;AAAA,IACN,MAAM;AAAA,EAAA;AAEV;AAKO,SAASG,GAAkBC,GAIhC;AACA,SAAO;AAAA,IACL,IAAIA,EAAK,MAAM;AAAA,IACf,UAAU;AAAA,MACR,GAAGA,EAAK,KAAK;AAAA,MACb,GAAGA,EAAK,KAA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AAA,QAAA;;MAKxBI,EAAAA,OAAO,SADf3F,KAAAC,EAKM,OALN2F,IAKM;AAAA,QADJN,EAA0BC,EAAA,QAAA,OAAA;AAAA,MAAA;MAG5BM,IAAA7F,EAAA,GAAAC,EAKM,OALN6F,IAKM;AAAA,QADJR,EAA4BC,EAAA,QAAA,SAAA;AAAA,MAAA;gBAHjB5E,EAAA,OAAO;AAAA,MAAA;MAOZgF,EAAAA,OAAO,UADf3F,KAAAC,EAKM,OALN8F,IAKM;AAAA,QADJT,EAA2BC,EAAA,QAAA,QAAA;AAAA,MAAA;;;;;;;;;;;sBC3C/BvF,EAAA,GAAAC,EAQM,OARNC,IAQM;AAAA,MAPJiE,EAKM,OAAA;AAAA,QAJJ,OAAK6B,GAAA,CAAC,8BACErF,EAAA,yCAAyCA,EAAA,OAAO,KAAA,EAAA,CAAA;AAAA,MAAA,KAErDA,EAAA,KAAK,GAAA,CAAA;AAAA,MAEVwD,EAAyD,OAAzDkB,IAAyDV,EAAdhE,EAAA,KAAK,GAAA,CAAA;AAAA,IAAA;;;;;sBCNlDX,EAAA,GAAAC,EAEM,OAFNC,IAEM;AAAA,MADJoF,EAAQC,EAAA,QAAA,SAAA;AAAA,IAAA;;;;;;;;;2BCDVtF,EAaM,OAAA;AAAA,MAZJ,OAAM;AAAA,MACL,gCAAOgG,EAAAA,MAAK,OAAA;AAAA,IAAA;MAEb9B,EAEM,OAFNjE,IAEM;AAAA,QADJoF,EAAQC,EAAA,QAAA,SAAA;AAAA,MAAA;MAGFI,EAAAA,OAAO,YADf3F,KAAAC,EAKM,OALNoF,IAKM;AAAA,QADJC,EAAwBC,EAAA,QAAA,UAAA;AAAA,MAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"dashboard-feed-row.vue_vue_type_script_setup_true_lang-BCsJG_hk.js","sources":["../../shell/dashboard/draggable-dashboard/composables/useGridstackAdapter.ts","../../shell/dashboard/draggable-dashboard/composables/useGridstack.ts","../../shell/dashboard/draggable-dashboard/DashboardWidgetSkeleton.vue","../../shell/dashboard/draggable-dashboard/GridstackDashboard.vue","../../shell/dashboard/draggable-dashboard/DraggableDashboard.vue","../../shell/dashboard/draggable-dashboard/index.ts","../../shell/dashboard/dashboard-widget-card/dashboard-widget-card.vue","../../shell/dashboard/dashboard-widget-card/dashboard-stat-item.vue","../../shell/dashboard/dashboard-widget-card/dashboard-feed-list.vue","../../shell/dashboard/dashboard-widget-card/dashboard-feed-row.vue"],"sourcesContent":["/**\r\n * Gridstack Type Adapter\r\n *\r\n * Converts between our IDashboardWidget types and Gridstack's GridStackWidget types.\r\n * Handles localStorage format migration for backwards compatibility.\r\n */\r\n\r\nimport type { GridStackWidget, GridStackNode } from \"gridstack\";\r\nimport type {\r\n IDashboardWidget,\r\n DashboardWidgetPosition,\r\n DashboardWidgetPlacement,\r\n DashboardWidgetSize,\r\n} from \"@shell/dashboard/draggable-dashboard/types\";\r\n\r\n/**\r\n * LocalStorage key for layout persistence\r\n */\r\nexport const LAYOUT_STORAGE_KEY = \"vc-dashboard-layout\";\r\n\r\n/**\r\n * Old localStorage format (Map serialized as object)\r\n */\r\ninterface LegacyLayoutFormat {\r\n [widgetId: string]: DashboardWidgetPosition;\r\n}\r\n\r\n/**\r\n * Converts our widget type to Gridstack widget format\r\n */\r\nexport function toGridstackWidget(widget: IDashboardWidget, placement?: DashboardWidgetPlacement): GridStackWidget {\r\n const pos = placement ?? widget.position;\r\n return {\r\n id: widget.id,\r\n x: pos?.x ?? 0,\r\n y: pos?.y ?? 0,\r\n // A placement size wins over the declared one, so a saved or live resize is\r\n // restored instead of snapping back to the widget's default.\r\n w: placement?.width ?? widget.size.width,\r\n h: placement?.height ?? widget.size.height,\r\n minW: 2,\r\n minH: 2,\r\n };\r\n}\r\n\r\n/**\r\n * Extracts position from Gridstack node\r\n */\r\nexport function fromGridstackNode(node: GridStackNode): {\r\n id: string;\r\n position: DashboardWidgetPosition;\r\n size: DashboardWidgetSize;\r\n} {\r\n return {\r\n id: node.id ?? \"\",\r\n position: {\r\n x: node.x ?? 0,\r\n y: node.y ?? 0,\r\n },\r\n size: {\r\n width: node.w ?? 1,\r\n height: node.h ?? 1,\r\n },\r\n };\r\n}\r\n\r\n/**\r\n * Converts Gridstack nodes array to our layout Map format\r\n */\r\nexport function gridstackNodesToLayoutMap(nodes: GridStackNode[]): Map<string, DashboardWidgetPlacement> {\r\n const layout = new Map<string, DashboardWidgetPlacement>();\r\n\r\n for (const node of nodes) {\r\n if (node.id) {\r\n layout.set(node.id, {\r\n x: node.x ?? 0,\r\n y: node.y ?? 0,\r\n // Size is carried through as well; dropping it here is what used to make\r\n // every resize — mouse or keyboard — invisible to state and to storage.\r\n ...(typeof node.w === \"number\" ? { width: node.w } : {}),\r\n ...(typeof node.h === \"number\" ? { height: node.h } : {}),\r\n });\r\n }\r\n }\r\n\r\n return layout;\r\n}\r\n\r\n/**\r\n * Loads layout from localStorage with legacy format support\r\n */\r\nexport function loadLayoutFromStorage(): Map<string, DashboardWidgetPlacement> | null {\r\n try {\r\n const stored = localStorage.getItem(LAYOUT_STORAGE_KEY);\r\n if (!stored) return null;\r\n\r\n const parsed = JSON.parse(stored);\r\n\r\n // Check if it's the new Gridstack array format\r\n if (Array.isArray(parsed)) {\r\n return gridstackNodesToLayoutMap(parsed as GridStackNode[]);\r\n }\r\n\r\n // Legacy format: object with widget IDs as keys. It never carried a size, so\r\n // those entries stay size-less and fall back to the widget's declared size.\r\n if (typeof parsed === \"object\" && parsed !== null) {\r\n const layout = new Map<string, DashboardWidgetPlacement>();\r\n for (const [id, pos] of Object.entries(parsed as LegacyLayoutFormat)) {\r\n if (pos && typeof pos.x === \"number\" && typeof pos.y === \"number\") {\r\n layout.set(id, { x: pos.x, y: pos.y });\r\n }\r\n }\r\n return layout;\r\n }\r\n\r\n return null;\r\n } catch (error) {\r\n console.warn(\"[GridstackAdapter] Failed to load layout from storage:\", error);\r\n return null;\r\n }\r\n}\r\n\r\n/**\r\n * Saves layout to localStorage in Gridstack format\r\n */\r\nexport function saveLayoutToStorage(widgets: IDashboardWidget[], layout: Map<string, DashboardWidgetPlacement>): void {\r\n try {\r\n const gridstackFormat: GridStackWidget[] = widgets.map((widget) => {\r\n const placement = layout.get(widget.id);\r\n return {\r\n id: widget.id,\r\n x: placement?.x ?? widget.position?.x ?? 0,\r\n y: placement?.y ?? widget.position?.y ?? 0,\r\n // Prefer the live size. Reading `widget.size` unconditionally is what used\r\n // to discard every resize on reload, since that prop is never written back.\r\n w: placement?.width ?? widget.size.width,\r\n h: placement?.height ?? widget.size.height,\r\n };\r\n });\r\n\r\n localStorage.setItem(LAYOUT_STORAGE_KEY, JSON.stringify(gridstackFormat));\r\n } catch (error) {\r\n console.warn(\"[GridstackAdapter] Failed to save layout to storage:\", error);\r\n }\r\n}\r\n\r\n/**\r\n * Clears layout from localStorage\r\n */\r\nexport function clearLayoutStorage(): void {\r\n try {\r\n localStorage.removeItem(LAYOUT_STORAGE_KEY);\r\n } catch (error) {\r\n console.warn(\"[GridstackAdapter] Failed to clear layout storage:\", error);\r\n }\r\n}\r\n\r\n/**\r\n * Auto-arrange widgets in a grid layout\r\n * Places widgets side by side when possible, wrapping to next row\r\n */\r\nfunction autoArrangeWidgets(widgets: IDashboardWidget[], columns: number = 12): Map<string, DashboardWidgetPlacement> {\r\n const layout = new Map<string, DashboardWidgetPlacement>();\r\n\r\n // Track occupied cells in each row\r\n const rowOccupancy: Map<number, number[]> = new Map();\r\n\r\n const isPositionFree = (x: number, y: number, width: number, height: number): boolean => {\r\n for (let row = y; row < y + height; row++) {\r\n const occupied = rowOccupancy.get(row) || [];\r\n for (let col = x; col < x + width; col++) {\r\n if (occupied.includes(col)) return false;\r\n }\r\n }\r\n return true;\r\n };\r\n\r\n const occupyPosition = (x: number, y: number, width: number, height: number): void => {\r\n for (let row = y; row < y + height; row++) {\r\n const occupied = rowOccupancy.get(row) || [];\r\n for (let col = x; col < x + width; col++) {\r\n occupied.push(col);\r\n }\r\n rowOccupancy.set(row, occupied);\r\n }\r\n };\r\n\r\n const findFreePosition = (width: number, height: number): DashboardWidgetPosition => {\r\n let y = 0;\r\n while (true) {\r\n for (let x = 0; x <= columns - width; x++) {\r\n if (isPositionFree(x, y, width, height)) {\r\n return { x, y };\r\n }\r\n }\r\n y++;\r\n // Safety limit\r\n if (y > 100) break;\r\n }\r\n return { x: 0, y };\r\n };\r\n\r\n for (const widget of widgets) {\r\n const position = findFreePosition(widget.size.width, widget.size.height);\r\n layout.set(widget.id, position);\r\n occupyPosition(position.x, position.y, widget.size.width, widget.size.height);\r\n }\r\n\r\n return layout;\r\n}\r\n\r\n/**\r\n * Merges saved layout with widget defaults\r\n * Handles cases where widgets have been added/removed\r\n * Auto-arranges widgets that don't have positions\r\n */\r\nexport function mergeLayoutWithWidgets(\r\n widgets: IDashboardWidget[],\r\n savedLayout: Map<string, DashboardWidgetPlacement> | null,\r\n): Map<string, DashboardWidgetPlacement> {\r\n // If we have a saved layout with positions, use it\r\n if (savedLayout && savedLayout.size > 0) {\r\n const layout = new Map<string, DashboardWidgetPlacement>();\r\n\r\n for (const widget of widgets) {\r\n // Carries the saved size through as well — dropping it here would restore\r\n // the position but snap the widget back to its declared size.\r\n const savedPlacement = savedLayout.get(widget.id);\r\n const builtInPos = widget.position;\r\n const placement = savedPlacement ?? builtInPos ?? { x: 0, y: 0 };\r\n layout.set(widget.id, placement);\r\n }\r\n\r\n return layout;\r\n }\r\n\r\n // Check if all widgets have built-in positions\r\n const allHavePositions = widgets.every((w) => w.position !== undefined);\r\n\r\n if (allHavePositions) {\r\n const layout = new Map<string, DashboardWidgetPlacement>();\r\n for (const widget of widgets) {\r\n layout.set(widget.id, widget.position!);\r\n }\r\n return layout;\r\n }\r\n\r\n // Auto-arrange widgets\r\n return autoArrangeWidgets(widgets);\r\n}\r\n","/**\r\n * Gridstack Integration Composable\r\n *\r\n * Provides Vue 3 integration with Gridstack.js library.\r\n * Handles initialization, event binding, and cleanup.\r\n */\r\n\r\nimport { ref, shallowRef, onUnmounted, watch, nextTick, type Ref, type ShallowRef } from \"vue\";\r\nimport { GridStack, type GridStackOptions, type GridStackNode } from \"gridstack\";\r\nimport type {\r\n IDashboardWidget,\r\n DashboardWidgetPosition,\r\n DashboardWidgetPlacement,\r\n DashboardWidgetSize,\r\n} from \"@shell/dashboard/draggable-dashboard/types\";\r\nimport {\r\n toGridstackWidget,\r\n fromGridstackNode,\r\n loadLayoutFromStorage,\r\n saveLayoutToStorage,\r\n mergeLayoutWithWidgets,\r\n} from \"@shell/dashboard/draggable-dashboard/composables/useGridstackAdapter\";\r\n\r\n/**\r\n * Default Gridstack configuration\r\n */\r\nconst DEFAULT_OPTIONS: GridStackOptions = {\r\n column: 12,\r\n cellHeight: 80,\r\n margin: \"10px\",\r\n float: false,\r\n animate: true,\r\n // Disable responsive column changes - always use 12 columns\r\n columnOpts: {\r\n breakpoints: [{ w: 0, c: 12 }], // Always 12 columns regardless of width\r\n },\r\n draggable: {\r\n handle: \".grid-stack-item-content\",\r\n },\r\n resizable: {\r\n handles: \"se\", // Only bottom-right corner\r\n },\r\n};\r\n\r\n/**\r\n * Options for useGridstack composable\r\n */\r\nexport interface UseGridstackOptions {\r\n /** Gridstack configuration options */\r\n gridOptions?: Partial<GridStackOptions>;\r\n /** Enable widget resizing */\r\n resizable?: boolean;\r\n /** Auto-save layout to localStorage */\r\n autoSave?: boolean;\r\n /** Callback when layout changes */\r\n onLayoutChange?: (layout: Map<string, DashboardWidgetPlacement>) => void;\r\n}\r\n\r\n/**\r\n * Return type for useGridstack composable\r\n */\r\nexport interface UseGridstackReturn {\r\n /** Reference to GridStack instance */\r\n grid: ShallowRef<GridStack | null>;\r\n /** Current layout map: live position and, once known, live size */\r\n layout: Ref<Map<string, DashboardWidgetPlacement>>;\r\n /** Whether grid is initialized */\r\n isInitialized: Ref<boolean>;\r\n /** Initialize grid on element */\r\n initGrid: (element: HTMLElement) => void;\r\n /** Destroy grid instance */\r\n destroyGrid: () => void;\r\n /** Add a widget to the grid */\r\n addWidget: (widget: IDashboardWidget) => void;\r\n /** Remove a widget from the grid */\r\n removeWidget: (widgetId: string) => void;\r\n /** Update widget position */\r\n updateWidgetPosition: (widgetId: string, position: DashboardWidgetPosition) => void;\r\n updateWidgetSize: (widgetId: string, size: DashboardWidgetSize) => void;\r\n /** Save current layout */\r\n saveLayout: () => void;\r\n /** Load layout from storage */\r\n loadLayout: () => void;\r\n /** Reset to built-in positions */\r\n resetToDefaults: () => void;\r\n /** Batch update mode (disable animations) */\r\n batchUpdate: (fn: () => void) => void;\r\n}\r\n\r\n/**\r\n * Vue 3 composable for Gridstack integration\r\n */\r\nexport function useGridstack(widgets: Ref<IDashboardWidget[]>, options: UseGridstackOptions = {}): UseGridstackReturn {\r\n const { gridOptions = {}, resizable = false, autoSave = true, onLayoutChange } = options;\r\n\r\n // State\r\n const grid = shallowRef<GridStack | null>(null);\r\n const layout = ref<Map<string, DashboardWidgetPlacement>>(new Map());\r\n const isInitialized = ref(false);\r\n const isUpdating = ref(false);\r\n\r\n /**\r\n * Merge options with defaults\r\n */\r\n const mergedOptions: GridStackOptions = {\r\n ...DEFAULT_OPTIONS,\r\n ...gridOptions,\r\n disableResize: !resizable,\r\n };\r\n\r\n /**\r\n * Initialize the grid on a DOM element\r\n */\r\n const initGrid = (element: HTMLElement): void => {\r\n if (grid.value) {\r\n console.warn(\"[useGridstack] Grid already initialized\");\r\n return;\r\n }\r\n\r\n // Load saved layout\r\n const savedLayout = loadLayoutFromStorage();\r\n layout.value = mergeLayoutWithWidgets(widgets.value, savedLayout);\r\n\r\n // Initialize Gridstack\r\n grid.value = GridStack.init(mergedOptions, element);\r\n\r\n // Bind event handlers\r\n grid.value.on(\"change\", handleChange);\r\n grid.value.on(\"added\", handleAdded);\r\n grid.value.on(\"removed\", handleRemoved);\r\n\r\n // Explicitly load widgets with their positions to ensure proper layout\r\n // This is needed because Vue renders DOM after Gridstack.init() processes children\r\n const widgetData = widgets.value.map((widget) => {\r\n const position = layout.value.get(widget.id);\r\n return toGridstackWidget(widget, position);\r\n });\r\n\r\n // Use load() to apply positions - this updates existing items\r\n grid.value.load(widgetData);\r\n\r\n isInitialized.value = true;\r\n };\r\n\r\n /**\r\n * Handle grid change events (drag/resize)\r\n */\r\n const handleChange = (_event: Event, nodes: GridStackNode[]): void => {\r\n if (isUpdating.value) return;\r\n\r\n for (const node of nodes) {\r\n const { id, position } = fromGridstackNode(node);\r\n if (id) {\r\n // Size is recorded too, so a mouse resize reaches state and storage. Read\r\n // straight off the node rather than via fromGridstackNode, which defaults\r\n // a missing w/h to 1 — persisting that invented 1 would shrink the widget.\r\n const previous = layout.value.get(id);\r\n const width = typeof node.w === \"number\" ? node.w : previous?.width;\r\n const height = typeof node.h === \"number\" ? node.h : previous?.height;\r\n layout.value.set(id, {\r\n ...position,\r\n ...(typeof width === \"number\" ? { width } : {}),\r\n ...(typeof height === \"number\" ? { height } : {}),\r\n });\r\n }\r\n }\r\n\r\n // Trigger reactivity\r\n layout.value = new Map(layout.value);\r\n\r\n // Notify callback\r\n onLayoutChange?.(layout.value);\r\n\r\n // Auto-save\r\n if (autoSave) {\r\n saveLayout();\r\n }\r\n };\r\n\r\n /**\r\n * Handle widget added event\r\n */\r\n const handleAdded = (_event: Event, nodes: GridStackNode[]): void => {\r\n for (const node of nodes) {\r\n const { id, position } = fromGridstackNode(node);\r\n if (id && !layout.value.has(id)) {\r\n layout.value.set(id, position);\r\n }\r\n }\r\n layout.value = new Map(layout.value);\r\n };\r\n\r\n /**\r\n * Handle widget removed event\r\n */\r\n const handleRemoved = (_event: Event, nodes: GridStackNode[]): void => {\r\n for (const node of nodes) {\r\n if (node.id) {\r\n layout.value.delete(node.id);\r\n }\r\n }\r\n layout.value = new Map(layout.value);\r\n };\r\n\r\n /**\r\n * Destroy the grid instance\r\n */\r\n const destroyGrid = (): void => {\r\n if (grid.value) {\r\n grid.value.off(\"change\");\r\n grid.value.off(\"added\");\r\n grid.value.off(\"removed\");\r\n grid.value.destroy(false); // false = don't remove DOM elements\r\n grid.value = null;\r\n isInitialized.value = false;\r\n }\r\n };\r\n\r\n /**\r\n * Add a widget to the grid\r\n */\r\n const addWidget = (widget: IDashboardWidget): void => {\r\n if (!grid.value) return;\r\n\r\n const position = layout.value.get(widget.id) ?? widget.position;\r\n const gsWidget = toGridstackWidget(widget, position);\r\n\r\n // Find the DOM element for this widget\r\n const element = document.querySelector(`[gs-id=\"${widget.id}\"]`);\r\n if (element) {\r\n grid.value.makeWidget(element as HTMLElement, gsWidget);\r\n }\r\n };\r\n\r\n /**\r\n * Remove a widget from the grid\r\n */\r\n const removeWidget = (widgetId: string): void => {\r\n if (!grid.value) return;\r\n\r\n const element = document.querySelector(`[gs-id=\"${widgetId}\"]`);\r\n if (element) {\r\n grid.value.removeWidget(element as HTMLElement, false);\r\n }\r\n layout.value.delete(widgetId);\r\n };\r\n\r\n /**\r\n * Records where a widget actually ended up after a programmatic update.\r\n *\r\n * Reads the values back off the Gridstack node rather than trusting the ones we\r\n * asked for: Gridstack clamps to the grid edges and compacts the rows, so the\r\n * requested cell and the resulting cell often differ. Writing the requested\r\n * values instead is what made the layout state — and every announcement derived\r\n * from it — disagree with the DOM.\r\n *\r\n * `requested` is the fallback for environments where the node is not exposed\r\n * (notably unit tests with a stubbed grid).\r\n */\r\n const recordPlacementFromNode = (\r\n widgetId: string,\r\n element: Element,\r\n requestedPosition?: DashboardWidgetPosition,\r\n requestedSize?: DashboardWidgetSize,\r\n ): void => {\r\n const node = (element as HTMLElement & { gridstackNode?: GridStackNode }).gridstackNode;\r\n const previous = layout.value.get(widgetId);\r\n\r\n const x = node?.x ?? requestedPosition?.x ?? previous?.x ?? 0;\r\n const y = node?.y ?? requestedPosition?.y ?? previous?.y ?? 0;\r\n const width = node?.w ?? requestedSize?.width ?? previous?.width;\r\n const height = node?.h ?? requestedSize?.height ?? previous?.height;\r\n\r\n layout.value.set(widgetId, {\r\n x,\r\n y,\r\n ...(typeof width === \"number\" ? { width } : {}),\r\n ...(typeof height === \"number\" ? { height } : {}),\r\n });\r\n layout.value = new Map(layout.value);\r\n };\r\n\r\n /**\r\n * Update widget position programmatically\r\n */\r\n const updateWidgetPosition = (widgetId: string, position: DashboardWidgetPosition): void => {\r\n if (!grid.value) return;\r\n\r\n const element = document.querySelector(`[gs-id=\"${widgetId}\"]`);\r\n if (element) {\r\n isUpdating.value = true;\r\n grid.value.update(element as HTMLElement, { x: position.x, y: position.y });\r\n recordPlacementFromNode(widgetId, element, position);\r\n isUpdating.value = false;\r\n }\r\n };\r\n\r\n /**\r\n * Counterpart of updateWidgetPosition for the size axis, so a widget can be\r\n * resized programmatically — keyboard resizing has no drag handle to simulate.\r\n */\r\n const updateWidgetSize = (widgetId: string, size: DashboardWidgetSize): void => {\r\n if (!grid.value) return;\r\n\r\n const element = document.querySelector(`[gs-id=\"${widgetId}\"]`);\r\n if (element) {\r\n isUpdating.value = true;\r\n grid.value.update(element as HTMLElement, { w: size.width, h: size.height });\r\n recordPlacementFromNode(widgetId, element, undefined, size);\r\n isUpdating.value = false;\r\n }\r\n };\r\n\r\n /**\r\n * Save current layout to localStorage\r\n */\r\n const saveLayout = (): void => {\r\n saveLayoutToStorage(widgets.value, layout.value);\r\n };\r\n\r\n /**\r\n * Load layout from localStorage\r\n */\r\n const loadLayout = (): void => {\r\n const savedLayout = loadLayoutFromStorage();\r\n if (savedLayout) {\r\n layout.value = mergeLayoutWithWidgets(widgets.value, savedLayout);\r\n applyLayoutToGrid();\r\n }\r\n };\r\n\r\n /**\r\n * Reset to built-in widget positions\r\n */\r\n const resetToDefaults = (): void => {\r\n layout.value = new Map();\r\n for (const widget of widgets.value) {\r\n if (widget.position) {\r\n layout.value.set(widget.id, { ...widget.position });\r\n }\r\n }\r\n applyLayoutToGrid();\r\n saveLayout();\r\n };\r\n\r\n /**\r\n * Apply current layout to grid\r\n */\r\n const applyLayoutToGrid = (): void => {\r\n if (!grid.value) return;\r\n\r\n isUpdating.value = true;\r\n grid.value.batchUpdate();\r\n\r\n for (const widget of widgets.value) {\r\n const placement = layout.value.get(widget.id);\r\n if (placement) {\r\n const element = document.querySelector(`[gs-id=\"${widget.id}\"]`);\r\n if (element) {\r\n grid.value.update(element as HTMLElement, {\r\n x: placement.x,\r\n y: placement.y,\r\n // Restores a persisted size; omitted when unknown so Gridstack keeps\r\n // whatever the element already declares.\r\n ...(typeof placement.width === \"number\" ? { w: placement.width } : {}),\r\n ...(typeof placement.height === \"number\" ? { h: placement.height } : {}),\r\n });\r\n }\r\n }\r\n }\r\n\r\n grid.value.batchUpdate(false);\r\n isUpdating.value = false;\r\n };\r\n\r\n /**\r\n * Execute function in batch update mode\r\n */\r\n const batchUpdate = (fn: () => void): void => {\r\n if (!grid.value) {\r\n fn();\r\n return;\r\n }\r\n\r\n isUpdating.value = true;\r\n grid.value.batchUpdate();\r\n fn();\r\n grid.value.batchUpdate(false);\r\n isUpdating.value = false;\r\n };\r\n\r\n // Watch for widget changes\r\n watch(\r\n widgets,\r\n async (newWidgets, oldWidgets) => {\r\n if (!grid.value || !isInitialized.value) return;\r\n\r\n await nextTick();\r\n\r\n // Find added widgets\r\n const addedWidgets = newWidgets.filter((w) => !oldWidgets?.some((ow) => ow.id === w.id));\r\n\r\n // Find removed widgets\r\n const removedWidgetIds =\r\n oldWidgets?.filter((w) => !newWidgets.some((nw) => nw.id === w.id)).map((w) => w.id) ?? [];\r\n\r\n // Remove old widgets\r\n for (const id of removedWidgetIds) {\r\n removeWidget(id);\r\n }\r\n\r\n // Add new widgets\r\n for (const widget of addedWidgets) {\r\n addWidget(widget);\r\n }\r\n },\r\n { deep: false },\r\n );\r\n\r\n // Cleanup on unmount\r\n onUnmounted(() => {\r\n destroyGrid();\r\n });\r\n\r\n return {\r\n grid,\r\n layout,\r\n isInitialized,\r\n initGrid,\r\n destroyGrid,\r\n addWidget,\r\n removeWidget,\r\n updateWidgetPosition,\r\n updateWidgetSize,\r\n saveLayout,\r\n loadLayout,\r\n resetToDefaults,\r\n batchUpdate,\r\n };\r\n}\r\n","<template>\n <div\n class=\"dashboard-widget-skeleton\"\n aria-hidden=\"true\"\n >\n <div class=\"dashboard-widget-skeleton__header\">\n <div class=\"dashboard-widget-skeleton__icon\" />\n <div class=\"dashboard-widget-skeleton__title\" />\n </div>\n <div class=\"dashboard-widget-skeleton__stats\">\n <div class=\"dashboard-widget-skeleton__stat\" />\n <div class=\"dashboard-widget-skeleton__stat\" />\n <div class=\"dashboard-widget-skeleton__stat\" />\n </div>\n <div class=\"dashboard-widget-skeleton__body\">\n <div class=\"dashboard-widget-skeleton__line dashboard-widget-skeleton__line--w80\" />\n <div class=\"dashboard-widget-skeleton__line dashboard-widget-skeleton__line--w60\" />\n <div class=\"dashboard-widget-skeleton__line dashboard-widget-skeleton__line--w90\" />\n <div class=\"dashboard-widget-skeleton__line dashboard-widget-skeleton__line--w70\" />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\"></script>\n\n<style lang=\"scss\">\n:root {\n --dashboard-widget-skeleton-bg: var(--dashboard-widget-card-background, var(--additional-50));\n --dashboard-widget-skeleton-border-color: var(--dashboard-widget-card-border-color, var(--neutrals-200));\n --dashboard-widget-skeleton-radius: var(--dashboard-widget-card-border-radius, 8px);\n --dashboard-widget-skeleton-shadow: var(\n --dashboard-widget-card-shadow,\n 0 1px 3px rgba(0, 0, 0, 0.08) 0 1px 2px rgba(0, 0, 0, 0.06)\n );\n --dashboard-widget-skeleton-shimmer-from: var(--neutrals-100);\n --dashboard-widget-skeleton-shimmer-to: var(--neutrals-200);\n}\n\n@keyframes dashboard-widget-skeleton-shimmer {\n 0% {\n background-position: -400px 0;\n }\n 100% {\n background-position: 400px 0;\n }\n}\n\n.dashboard-widget-skeleton {\n @apply tw-overflow-hidden tw-h-full tw-flex tw-flex-col;\n background: var(--dashboard-widget-skeleton-bg);\n border: 1px solid var(--dashboard-widget-skeleton-border-color);\n border-radius: var(--dashboard-widget-skeleton-radius);\n box-shadow: var(--dashboard-widget-skeleton-shadow);\n\n %shimmer {\n background: linear-gradient(\n 90deg,\n var(--dashboard-widget-skeleton-shimmer-from) 0%,\n var(--dashboard-widget-skeleton-shimmer-to) 50%,\n var(--dashboard-widget-skeleton-shimmer-from) 100%\n );\n background-size: 800px 100%;\n animation: dashboard-widget-skeleton-shimmer 1.4s ease-in-out infinite;\n border-radius: 4px;\n }\n\n &__header {\n @apply tw-px-5 tw-py-4 tw-flex tw-items-center tw-gap-3;\n }\n\n &__icon {\n @apply tw-w-9 tw-h-9 tw-rounded-lg tw-flex-shrink-0;\n @extend %shimmer;\n }\n\n &__title {\n @apply tw-h-5 tw-flex-1 tw-max-w-[180px];\n @extend %shimmer;\n }\n\n &__stats {\n @apply tw-px-5 tw-py-3 tw-flex tw-items-center tw-gap-6;\n border-top: 1px solid var(--dashboard-widget-skeleton-border-color);\n border-bottom: 1px solid var(--dashboard-widget-skeleton-border-color);\n }\n\n &__stat {\n @apply tw-h-6 tw-flex-1;\n @extend %shimmer;\n }\n\n &__body {\n @apply tw-flex-1 tw-min-h-0 tw-px-5 tw-py-4 tw-flex tw-flex-col tw-gap-3;\n }\n\n &__line {\n @apply tw-h-3;\n @extend %shimmer;\n\n &--w60 {\n @apply tw-w-3/5;\n }\n &--w70 {\n @apply tw-w-7/12;\n }\n &--w80 {\n @apply tw-w-4/5;\n }\n &--w90 {\n @apply tw-w-11/12;\n }\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .dashboard-widget-skeleton {\n %shimmer {\n animation: none;\n }\n }\n}\n</style>\n","<template>\n <VcContainer\n no-padding\n class=\"vc-gridstack-dashboard\"\n >\n <div\n v-if=\"!modulesReady\"\n class=\"vc-gridstack-dashboard__skeleton-grid\"\n role=\"status\"\n aria-busy=\"true\"\n :aria-label=\"ariaLabel\"\n >\n <DashboardWidgetSkeleton\n v-for=\"(item, index) in skeletonItems\"\n :key=\"`skeleton-${index}`\"\n class=\"vc-gridstack-dashboard__skeleton-item\"\n :style=\"skeletonItemStyle(item)\"\n />\n </div>\n <div\n v-else\n ref=\"gridRef\"\n class=\"grid-stack vc-gridstack-dashboard__grid\"\n role=\"list\"\n :aria-label=\"ariaLabel\"\n >\n <div\n v-for=\"(widget, index) in widgets\"\n :key=\"widget.id\"\n class=\"grid-stack-item\"\n :class=\"{ 'vc-gridstack-dashboard__item--grabbed': grabbedWidgetId === widget.id }\"\n :gs-id=\"widget.id\"\n :gs-x=\"getPosition(widget.id)?.x ?? widget.position?.x ?? 0\"\n :gs-y=\"getPosition(widget.id)?.y ?? widget.position?.y ?? 0\"\n :gs-w=\"sizeOf(widget).width\"\n :gs-h=\"sizeOf(widget).height\"\n :gs-min-w=\"2\"\n :gs-min-h=\"2\"\n role=\"listitem\"\n tabindex=\"0\"\n :aria-label=\"getWidgetAriaLabel(widget, index)\"\n @keydown=\"onWidgetKeydown($event, widget)\"\n >\n <div class=\"grid-stack-item-content\">\n <!-- Drag handle (optional) -->\n <div\n v-if=\"showDragHandles\"\n class=\"vc-gridstack-dashboard__drag-handle\"\n aria-hidden=\"true\"\n >\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"currentColor\"\n >\n <circle\n cx=\"5\"\n cy=\"3\"\n r=\"1.5\"\n />\n <circle\n cx=\"11\"\n cy=\"3\"\n r=\"1.5\"\n />\n <circle\n cx=\"5\"\n cy=\"8\"\n r=\"1.5\"\n />\n <circle\n cx=\"11\"\n cy=\"8\"\n r=\"1.5\"\n />\n <circle\n cx=\"5\"\n cy=\"13\"\n r=\"1.5\"\n />\n <circle\n cx=\"11\"\n cy=\"13\"\n r=\"1.5\"\n />\n </svg>\n </div>\n\n <!-- Widget content -->\n <component\n :is=\"widget.component\"\n v-bind=\"widget.props || {}\"\n class=\"vc-gridstack-dashboard__widget-content\"\n />\n </div>\n </div>\n </div>\n\n <!-- Screen reader announcements -->\n <div\n class=\"vc-gridstack-dashboard__live-region\"\n role=\"status\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n {{ liveAnnouncement }}\n </div>\n </VcContainer>\n</template>\n\n<script setup lang=\"ts\">\n/**\n * GridstackDashboard Component\n *\n * A flexible dashboard powered by Gridstack.js that allows widgets to be\n * dragged and arranged in a grid layout.\n *\n * Features:\n * - Drag and drop interface for arranging widgets\n * - Optional widget resizing\n * - Automatic layout persistence in localStorage\n * - Support for built-in widget positions\n * - Accessibility support\n */\nimport { ref, computed, onMounted, nextTick, inject, watch } from \"vue\";\nimport type {\n IDashboardWidget,\n DashboardWidgetPosition,\n DashboardWidgetSize,\n} from \"@shell/dashboard/draggable-dashboard/types\";\nimport { useDashboard } from \"@core/composables/useDashboard\";\nimport { useGridstack } from \"@shell/dashboard/draggable-dashboard/composables/useGridstack\";\nimport VcContainer from \"@ui/components/atoms/vc-container/vc-container.vue\";\nimport DashboardWidgetSkeleton from \"@shell/dashboard/draggable-dashboard/DashboardWidgetSkeleton.vue\";\nimport { ModulesReadyKey } from \"@framework/injection-keys\";\nimport { LAYOUT_STORAGE_KEY } from \"@shell/dashboard/draggable-dashboard/composables/useGridstackAdapter\";\nimport \"gridstack/dist/gridstack.min.css\";\n\ninterface SkeletonItem {\n x: number;\n y: number;\n w: number;\n h: number;\n}\n\n// Default placeholders shown when there's no persisted layout yet (first visit).\n// 6×6 matches the typical real widget size in vc-shell apps.\nconst DEFAULT_SKELETONS: SkeletonItem[] = [\n { x: 0, y: 0, w: 6, h: 6 },\n { x: 6, y: 0, w: 6, h: 6 },\n { x: 0, y: 6, w: 6, h: 6 },\n { x: 6, y: 6, w: 6, h: 6 },\n];\n\nfunction readPersistedSkeletons(): SkeletonItem[] | null {\n if (typeof window === \"undefined\") return null;\n try {\n const raw = window.localStorage.getItem(LAYOUT_STORAGE_KEY);\n if (!raw) return null;\n const parsed = JSON.parse(raw);\n if (!Array.isArray(parsed)) return null;\n const items = parsed\n .filter(\n (n: unknown): n is SkeletonItem =>\n !!n &&\n typeof n === \"object\" &&\n typeof (n as SkeletonItem).w === \"number\" &&\n typeof (n as SkeletonItem).h === \"number\" &&\n typeof (n as SkeletonItem).x === \"number\" &&\n typeof (n as SkeletonItem).y === \"number\",\n )\n .map((n) => ({ x: n.x, y: n.y, w: n.w, h: n.h }));\n return items.length > 0 ? items : null;\n } catch {\n return null;\n }\n}\n\n// Props\ninterface Props {\n /** Show drag handle icons on widgets */\n showDragHandles?: boolean;\n /** Enable widget resizing */\n resizable?: boolean;\n /** Aria label for the dashboard container */\n ariaLabel?: string;\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n showDragHandles: false,\n resizable: false,\n ariaLabel: \"Dashboard widgets. Drag a widget, or focus one and press Enter to rearrange with the arrow keys.\",\n});\n\n// Refs\nconst gridRef = ref<HTMLElement | null>(null);\nconst liveAnnouncement = ref(\"\");\n\n// Gate dashboard rendering until remote modules finish installing.\n// Without this, widgets preregistered during loadRemote() can mount before\n// their owning module's `defineAppModule.install` runs `mergeLocaleMessage`,\n// causing missing translations. Fallback `ref(true)` keeps tests/stories and\n// hosts without MF working unchanged.\nconst modulesReady = inject(ModulesReadyKey, ref(true));\n\n// Skeleton placeholders shown until modules finish loading. Pulled from the last\n// persisted layout (so returning users see card sizes matching their real dashboard);\n// fallback to a generic 4-card grid on first visit.\nconst skeletonItems = computed<SkeletonItem[]>(() => {\n if (modulesReady.value) return [];\n return readPersistedSkeletons() ?? DEFAULT_SKELETONS;\n});\n\nconst skeletonItemStyle = (item: SkeletonItem): Record<string, string> => ({\n gridColumn: `${item.x + 1} / span ${item.w}`,\n gridRow: `${item.y + 1} / span ${item.h}`,\n});\n\n// Dashboard service\nconst dashboard = useDashboard();\nconst widgets = computed(() => dashboard.getWidgets() as IDashboardWidget[]);\n\n// Gridstack integration\nconst { layout, isInitialized, initGrid, saveLayout, resetToDefaults, updateWidgetPosition, updateWidgetSize } =\n useGridstack(widgets, {\n resizable: props.resizable,\n autoSave: true,\n gridOptions: {\n draggable: {\n handle: props.showDragHandles ? \".vc-gridstack-dashboard__drag-handle\" : \".grid-stack-item-content\",\n },\n },\n onLayoutChange: (newLayout) => {\n // Sync with dashboard service\n for (const [widgetId, position] of newLayout) {\n dashboard.updateWidgetPosition(widgetId, position);\n }\n announceToScreenReader(\"Widget positions updated\");\n },\n });\n\n// Helper to get widget position\nconst getPosition = (widgetId: string): DashboardWidgetPosition | undefined => {\n return layout.value.get(widgetId);\n};\n\n// --- Keyboard reordering (WCAG 2.5.7: dragging must have a non-drag alternative) ---\n//\n// Gridstack only offers pointer dragging, so the widget itself becomes the control:\n// Enter/Space picks it up, arrows move it a cell at a time, Shift+arrows resize,\n// Enter drops, Escape restores the position it was picked up from.\nconst grabbedWidgetId = ref<string | null>(null);\nconst grabbedOrigin = ref<DashboardWidgetPosition | null>(null);\n// Escape has to restore the size too, now that Shift+arrows can change it.\nconst grabbedOriginSize = ref<DashboardWidgetSize | null>(null);\n\n// Mirrors gs-min-w / gs-min-h on the item.\nconst MIN_WIDGET_SPAN = 2;\n\nconst positionOf = (widget: IDashboardWidget): DashboardWidgetPosition =>\n layout.value.get(widget.id) ?? widget.position ?? { x: 0, y: 0 };\n\n// The live size, mirroring positionOf. `widget.size` is only the declared default\n// and is never written back to, so reading it directly made every resize compute\n// from the same baseline instead of from the current size.\nconst sizeOf = (widget: IDashboardWidget): DashboardWidgetSize => {\n const placement = layout.value.get(widget.id);\n return {\n width: placement?.width ?? widget.size.width,\n height: placement?.height ?? widget.size.height,\n };\n};\n\nconst widgetName = (widget: IDashboardWidget): string => widget.name || widget.id;\n\nconst pickUpWidget = (widget: IDashboardWidget): void => {\n grabbedWidgetId.value = widget.id;\n grabbedOrigin.value = { ...positionOf(widget) };\n grabbedOriginSize.value = { ...sizeOf(widget) };\n announceToScreenReader(\n `${widgetName(widget)} picked up. Use arrow keys to move, Shift and arrow keys to resize, Enter to drop, Escape to cancel.`,\n );\n};\n\nconst dropWidget = (widget: IDashboardWidget): void => {\n grabbedWidgetId.value = null;\n grabbedOrigin.value = null;\n grabbedOriginSize.value = null;\n saveLayout();\n const { x, y } = positionOf(widget);\n announceToScreenReader(`${widgetName(widget)} dropped at column ${x + 1}, row ${y + 1}.`);\n};\n\nconst cancelWidgetMove = (widget: IDashboardWidget): void => {\n const origin = grabbedOrigin.value;\n const originSize = grabbedOriginSize.value;\n const current = sizeOf(widget);\n\n if (originSize && (originSize.width !== current.width || originSize.height !== current.height)) {\n updateWidgetSize(widget.id, originSize);\n }\n if (origin) {\n updateWidgetPosition(widget.id, origin);\n }\n\n grabbedWidgetId.value = null;\n grabbedOrigin.value = null;\n grabbedOriginSize.value = null;\n announceToScreenReader(`Move cancelled. ${widgetName(widget)} returned to its original position and size.`);\n};\n\nconst moveWidgetBy = (widget: IDashboardWidget, dx: number, dy: number): void => {\n const current = positionOf(widget);\n const next = { x: current.x + dx, y: current.y + dy };\n // Gridstack clamps silently; refusing the move keeps the announcement honest.\n if (next.x < 0 || next.y < 0) return;\n\n updateWidgetPosition(widget.id, next);\n // Announce where the widget actually landed, not where it was asked to go —\n // Gridstack compacts rows, so the two differ.\n // Announce where the widget actually landed, not where it was asked to go —\n // Gridstack compacts rows, so the two differ.\n const landed = positionOf(widget);\n announceToScreenReader(`${widgetName(widget)} moved to column ${landed.x + 1}, row ${landed.y + 1}.`);\n};\n\nconst resizeWidgetBy = (widget: IDashboardWidget, dw: number, dh: number): void => {\n const current = sizeOf(widget);\n // Only the requested axis changes; sending both would drag the untouched one\n // back to its baseline.\n const width = dw ? Math.max(MIN_WIDGET_SPAN, current.width + dw) : current.width;\n const height = dh ? Math.max(MIN_WIDGET_SPAN, current.height + dh) : current.height;\n if (width === current.width && height === current.height) return;\n\n updateWidgetSize(widget.id, { width, height });\n const applied = sizeOf(widget);\n announceToScreenReader(`${widgetName(widget)} resized to ${applied.width} by ${applied.height} cells.`);\n};\n\nconst onWidgetKeydown = (event: KeyboardEvent, widget: IDashboardWidget): void => {\n if (event.target !== event.currentTarget) return;\n\n const isGrabbed = grabbedWidgetId.value === widget.id;\n\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n if (isGrabbed) dropWidget(widget);\n else {\n // Starting another move cancels the unfinished one so its origin is not lost.\n const grabbedWidget = widgets.value.find((candidate) => candidate.id === grabbedWidgetId.value);\n if (grabbedWidget) cancelWidgetMove(grabbedWidget);\n pickUpWidget(widget);\n }\n return;\n }\n\n if (event.key === \"Escape\" && isGrabbed) {\n event.preventDefault();\n cancelWidgetMove(widget);\n return;\n }\n\n const dx = event.key === \"ArrowLeft\" ? -1 : event.key === \"ArrowRight\" ? 1 : 0;\n const dy = event.key === \"ArrowUp\" ? -1 : event.key === \"ArrowDown\" ? 1 : 0;\n if ((dx === 0 && dy === 0) || !isGrabbed) return;\n\n event.preventDefault();\n if (event.shiftKey) {\n if (props.resizable) resizeWidgetBy(widget, dx, dy);\n } else {\n moveWidgetBy(widget, dx, dy);\n }\n};\n\n// Accessibility helpers\nconst getWidgetAriaLabel = (widget: IDashboardWidget, index: number): string => {\n const name = widget.name || widget.id;\n const state =\n grabbedWidgetId.value === widget.id\n ? \"Picked up. Arrow keys move, Enter drops, Escape cancels.\"\n : \"Press Enter to pick up and rearrange with the arrow keys.\";\n return `${name}, widget ${index + 1} of ${widgets.value.length}. ${state}`;\n};\n\nconst announceToScreenReader = (message: string): void => {\n liveAnnouncement.value = message;\n setTimeout(() => {\n liveAnnouncement.value = \"\";\n }, 1000);\n};\n\nconst tryInitGrid = async (): Promise<void> => {\n await nextTick();\n if (gridRef.value && !isInitialized.value) {\n initGrid(gridRef.value);\n }\n};\n\nonMounted(tryInitGrid);\n\n// When modules finish loading, the v-if mounts gridRef — initialize gridstack then.\nwatch(modulesReady, (ready) => {\n if (ready) tryInitGrid();\n});\n\n// Public methods\nconst rearrangeWidgets = (): void => {\n resetToDefaults();\n};\n\nconst recalculateLayout = (): void => {\n // Gridstack handles this automatically\n};\n\nconst useBuiltInPositions = (): boolean => {\n resetToDefaults();\n return true;\n};\n\n// Expose public methods\ndefineExpose({\n rearrangeWidgets,\n recalculateLayout,\n saveLayout,\n useBuiltInPositions,\n});\n</script>\n\n<style lang=\"scss\">\n@import \"gridstack/dist/gridstack.min.css\";\n\n:root {\n --gridstack-dashboard-background: var(--additional-50);\n --gridstack-widget-background: var(--additional-50);\n --gridstack-widget-border-radius: 8px;\n --gridstack-widget-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);\n --gridstack-widget-shadow-dragging: 0 8px 24px rgba(0, 0, 0, 0.15);\n --gridstack-placeholder-background: rgba(59, 130, 246, 0.1);\n --gridstack-placeholder-border: rgba(59, 130, 246, 0.5);\n --gridstack-drag-handle-color: var(--neutrals-400);\n --gridstack-drag-handle-color-hover: var(--neutrals-600);\n --gridstack-widget-focus-ring-color: var(--primary-500);\n}\n\n.vc-gridstack-dashboard {\n background-color: var(--gridstack-dashboard-background);\n min-height: 100%;\n\n &__grid {\n padding: 24px 18px;\n min-height: calc(80px * 8 + 24px * 2); // 8 rows minimum\n }\n\n // Widgets are focusable so they can be rearranged from the keyboard.\n .grid-stack-item:focus-visible {\n @apply tw-outline-none tw-ring-[3px] tw-ring-[color:var(--gridstack-widget-focus-ring-color)];\n border-radius: var(--gridstack-widget-border-radius);\n }\n\n // Picked up for a keyboard move: the pointer equivalent of \"being dragged\".\n &__item--grabbed {\n z-index: var(--z-local-above);\n\n .grid-stack-item-content {\n box-shadow: var(--gridstack-widget-shadow-dragging);\n outline: 2px dashed var(--gridstack-placeholder-border);\n outline-offset: 2px;\n }\n }\n\n // Skeleton grid mirrors gridstack's 12-column geometry. Row height and gap are\n // tuned so a 6×6 placeholder visually matches a real 6×6 widget rendered by\n // gridstack (which collapses margins differently than a plain CSS grid).\n &__skeleton-grid {\n display: grid;\n grid-template-columns: repeat(12, 1fr);\n grid-auto-rows: 55px;\n gap: 20px;\n padding: 24px 18px;\n min-height: calc(55px * 8 + 24px * 2);\n }\n\n &__skeleton-item {\n min-width: 0;\n min-height: 0;\n }\n\n // Widget item styling\n .grid-stack-item {\n &-content {\n background: var(--gridstack-widget-background);\n border-radius: var(--gridstack-widget-border-radius);\n box-shadow: var(--gridstack-widget-shadow);\n overflow: hidden;\n // Note: Don't set height: 100% - Gridstack uses position: absolute with inset for margins\n transition: box-shadow 0.2s ease;\n }\n\n // Dragging state\n &.ui-draggable-dragging {\n .grid-stack-item-content {\n box-shadow: var(--gridstack-widget-shadow-dragging);\n }\n }\n\n // Resizing state\n &.ui-resizable-resizing {\n .grid-stack-item-content {\n box-shadow: var(--gridstack-widget-shadow-dragging);\n }\n }\n }\n\n // Placeholder styling\n .grid-stack-placeholder {\n > .placeholder-content {\n background: var(--gridstack-placeholder-background);\n border: 2px dashed var(--gridstack-placeholder-border);\n border-radius: var(--gridstack-widget-border-radius);\n }\n }\n\n // Drag handle\n &__drag-handle {\n position: absolute;\n top: 8px;\n right: 8px;\n z-index: var(--z-local-sticky);\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--gridstack-drag-handle-color);\n cursor: grab;\n border-radius: 4px;\n transition:\n color 0.15s ease,\n background-color 0.15s ease;\n\n &:hover {\n color: var(--gridstack-drag-handle-color-hover);\n background-color: rgba(0, 0, 0, 0.05);\n }\n\n &:active {\n cursor: grabbing;\n }\n }\n\n // Widget content\n &__widget-content {\n width: 100%;\n height: 100%;\n }\n\n // Screen reader only\n &__live-region {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n}\n\n// Respect reduced motion preference\n@media (prefers-reduced-motion: reduce) {\n .vc-gridstack-dashboard {\n .grid-stack-item {\n transition: none !important;\n\n &-content {\n transition: none !important;\n }\n }\n }\n\n .grid-stack {\n &.grid-stack-animate {\n .grid-stack-item {\n transition: none !important;\n }\n }\n }\n}\n</style>\n","<template>\n <GridstackDashboard\n ref=\"dashboardRef\"\n :show-drag-handles=\"showDragHandles\"\n :resizable=\"resizable\"\n :aria-label=\"ariaLabel\"\n />\n</template>\n\n<script setup lang=\"ts\">\n/**\n * DraggableDashboard Component\n *\n * A flexible dashboard powered by Gridstack.js that allows widgets to be\n * dragged and arranged in a grid layout.\n *\n * Features:\n * - Drag and drop interface for arranging widgets\n * - Automatic layout persistence in localStorage\n * - Support for built-in widget positions\n * - Accessibility support (a11y)\n * - Optional widget resizing\n */\nimport { ref } from \"vue\";\nimport GridstackDashboard from \"@shell/dashboard/draggable-dashboard/GridstackDashboard.vue\";\n\n// Props\ninterface Props {\n /** Show drag handle icons on widgets */\n showDragHandles?: boolean;\n /** Enable widget resizing */\n resizable?: boolean;\n /** Aria label for the dashboard container */\n ariaLabel?: string;\n}\n\nwithDefaults(defineProps<Props>(), {\n showDragHandles: false,\n resizable: false,\n ariaLabel: \"Dashboard widgets. Drag widgets to rearrange.\",\n});\n\n// State\nconst dashboardRef = ref<InstanceType<typeof GridstackDashboard> | null>(null);\n\n// Public methods (delegated to GridstackDashboard)\nconst rearrangeWidgets = (): void => {\n dashboardRef.value?.rearrangeWidgets?.();\n};\n\nconst recalculateLayout = (): void => {\n dashboardRef.value?.recalculateLayout?.();\n};\n\nconst saveLayout = (): void => {\n dashboardRef.value?.saveLayout?.();\n};\n\nconst useBuiltInPositions = (): boolean => {\n return dashboardRef.value?.useBuiltInPositions?.() ?? false;\n};\n\n// Expose public methods\ndefineExpose({\n rearrangeWidgets,\n recalculateLayout,\n saveLayout,\n useBuiltInPositions,\n});\n</script>\n","// Main component\nexport { default as DraggableDashboard } from \"@shell/dashboard/draggable-dashboard/DraggableDashboard.vue\";\n\n// Types\nexport type {\n IDashboardWidget,\n DashboardWidgetPosition,\n DashboardWidgetSize,\n DashboardDragEvent,\n DashboardGridConfig,\n} from \"@shell/dashboard/draggable-dashboard/types\";\n\n// Gridstack composables (for advanced usage)\nexport { useGridstack } from \"@shell/dashboard/draggable-dashboard/composables/useGridstack\";\nexport type {\n UseGridstackOptions,\n UseGridstackReturn,\n} from \"@shell/dashboard/draggable-dashboard/composables/useGridstack\";\n\n// Import and re-export to avoid Storybook docgen issues with direct re-exports\nimport {\n toGridstackWidget as _toGridstackWidget,\n fromGridstackNode as _fromGridstackNode,\n loadLayoutFromStorage as _loadLayoutFromStorage,\n saveLayoutToStorage as _saveLayoutToStorage,\n mergeLayoutWithWidgets as _mergeLayoutWithWidgets,\n clearLayoutStorage as _clearLayoutStorage,\n LAYOUT_STORAGE_KEY as _LAYOUT_STORAGE_KEY,\n} from \"@shell/dashboard/draggable-dashboard/composables/useGridstackAdapter\";\n\nexport const toGridstackWidget = _toGridstackWidget;\nexport const fromGridstackNode = _fromGridstackNode;\nexport const loadLayoutFromStorage = _loadLayoutFromStorage;\nexport const saveLayoutToStorage = _saveLayoutToStorage;\nexport const mergeLayoutWithWidgets = _mergeLayoutWithWidgets;\nexport const clearLayoutStorage = _clearLayoutStorage;\nexport const LAYOUT_STORAGE_KEY = _LAYOUT_STORAGE_KEY;\n","<template>\n <div class=\"dashboard-widget-card\">\n <div class=\"dashboard-widget-card__header\">\n <slot name=\"header\">\n <div class=\"dashboard-widget-card__header-content\">\n <div\n v-if=\"icon\"\n class=\"dashboard-widget-card__icon-wrapper\"\n >\n <VcIcon\n class=\"dashboard-widget-card__icon\"\n :icon=\"icon\"\n size=\"l\"\n />\n </div>\n <div class=\"dashboard-widget-card__title\">{{ props.header }}</div>\n </div>\n </slot>\n <div\n v-if=\"$slots.actions\"\n class=\"dashboard-widget-card__actions\"\n >\n <slot name=\"actions\"></slot>\n </div>\n </div>\n\n <div\n v-if=\"$slots.stats\"\n class=\"dashboard-widget-card__stats\"\n >\n <slot name=\"stats\"></slot>\n </div>\n\n <div\n v-loading=\"loading\"\n class=\"dashboard-widget-card__body\"\n >\n <slot name=\"content\"></slot>\n </div>\n\n <div\n v-if=\"$slots.footer\"\n class=\"dashboard-widget-card__footer\"\n >\n <slot name=\"footer\"></slot>\n </div>\n </div>\n</template>\n\n<!-- eslint-disable @typescript-eslint/no-explicit-any -->\n<script setup lang=\"ts\">\nexport interface Props {\n header?: string;\n icon?: string;\n loading?: boolean;\n}\n\nimport { VcIcon } from \"@ui/components\";\nimport { vLoading } from \"@core/directives\";\n\nconst props = defineProps<Props>();\n\ndefineSlots<{\n header?: (props: any) => any;\n actions?: (props: any) => any;\n stats?: (props: any) => any;\n content?: (props: any) => any;\n footer?: (props: any) => any;\n}>();\n</script>\n\n<style lang=\"scss\">\n:root {\n // Legacy variables (preserved for backward compat)\n --dashboard-widget-card-header-color: var(--additional-50);\n --dashboard-widget-card-header-text-color: var(--neutrals-950);\n --dashboard-widget-card-icon-color: var(--primary-600);\n --dashboard-widget-card-header-border-color: var(--neutrals-200);\n\n // New variables\n --dashboard-widget-card-background: var(--additional-50);\n --dashboard-widget-card-border-color: var(--neutrals-200);\n --dashboard-widget-card-border-radius: 8px;\n --dashboard-widget-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);\n --dashboard-widget-card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.1);\n --dashboard-widget-card-icon-bg: var(--primary-50);\n --dashboard-widget-card-stats-bg: var(--neutrals-50);\n --dashboard-widget-card-footer-color: var(--primary-700);\n}\n\n.dashboard-widget-card {\n @apply tw-overflow-hidden tw-h-full tw-flex tw-flex-col;\n background: var(--dashboard-widget-card-background);\n border: 1px solid var(--dashboard-widget-card-border-color);\n border-radius: var(--dashboard-widget-card-border-radius);\n box-shadow: var(--dashboard-widget-card-shadow);\n transition: box-shadow 0.2s ease;\n\n &:hover {\n box-shadow: var(--dashboard-widget-card-shadow-hover);\n }\n\n &__header {\n @apply tw-px-5 tw-py-4 tw-flex tw-justify-between tw-items-center tw-gap-3;\n }\n\n &__header-content {\n @apply tw-flex tw-items-center tw-gap-3 tw-min-w-0;\n }\n\n &__icon-wrapper {\n @apply tw-flex tw-items-center tw-justify-center tw-w-9 tw-h-9 tw-rounded-lg tw-flex-shrink-0;\n background: var(--dashboard-widget-card-icon-bg);\n }\n\n &__icon {\n @apply tw-text-[var(--dashboard-widget-card-icon-color)];\n }\n\n &__title {\n @apply tw-text-lg tw-font-semibold tw-truncate;\n color: var(--dashboard-widget-card-header-text-color);\n }\n\n &__actions {\n @apply tw-flex tw-items-center tw-gap-2 tw-flex-shrink-0;\n }\n\n &__stats {\n @apply tw-px-5 tw-py-3 tw-flex tw-items-center tw-gap-6;\n background: var(--dashboard-widget-card-stats-bg);\n border-top: 1px solid var(--dashboard-widget-card-border-color);\n border-bottom: 1px solid var(--dashboard-widget-card-border-color);\n }\n\n &__body {\n @apply tw-flex-1 tw-min-h-0;\n }\n\n &__footer {\n @apply tw-px-5 tw-py-3 tw-text-center;\n border-top: 1px solid var(--dashboard-widget-card-border-color);\n\n a,\n button {\n @apply tw-text-sm tw-font-medium tw-no-underline;\n color: var(--dashboard-widget-card-footer-color);\n transition: opacity 0.15s ease;\n\n &:hover {\n @apply tw-underline;\n opacity: 0.85;\n }\n }\n }\n}\n\n// Shared activity-feed row style for dashboard card content\n.dashboard-feed-row {\n @apply tw-flex tw-items-center tw-justify-between tw-px-5 tw-py-2.5 tw-cursor-pointer tw-transition-colors;\n\n &:hover {\n background: var(--dashboard-widget-card-icon-bg, var(--primary-50));\n }\n}\n</style>\n","<template>\n <div class=\"dashboard-stat-item\">\n <div\n class=\"dashboard-stat-item__value\"\n :class=\"variant ? `dashboard-stat-item__value--${variant}` : ''\"\n >\n {{ value }}\n </div>\n <div class=\"dashboard-stat-item__label\">{{ label }}</div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nexport interface DashboardStatItemProps {\n /** The metric value to display */\n value: string | number;\n /** Descriptive label below the value */\n label: string;\n /** Color variant for the value */\n variant?: \"default\" | \"success\" | \"warning\" | \"danger\";\n}\n\ndefineProps<DashboardStatItemProps>();\n</script>\n\n<style lang=\"scss\">\n:root {\n --dashboard-stat-item-value-color: var(--neutrals-950);\n --dashboard-stat-item-label-color: var(--neutrals-500);\n}\n\n.dashboard-stat-item {\n @apply tw-flex tw-flex-col tw-items-center tw-min-w-0;\n\n &__value {\n @apply tw-text-lg tw-font-semibold tw-leading-tight tw-text-[var(--dashboard-stat-item-value-color)] tw-truncate tw-max-w-full;\n\n &--success {\n @apply tw-text-[var(--success-600)];\n }\n\n &--warning {\n @apply tw-text-[var(--warning-600)];\n }\n\n &--danger {\n @apply tw-text-[var(--danger-600)];\n }\n }\n\n &__label {\n @apply tw-text-xs tw-text-[var(--dashboard-stat-item-label-color)] tw-mt-0.5 tw-truncate tw-max-w-full;\n }\n}\n</style>\n","<!-- eslint-disable @typescript-eslint/no-explicit-any -->\n<template>\n <div class=\"tw-divide-y tw-divide-[var(--neutrals-200)]\">\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\ndefineSlots<{\n default: (props: any) => any;\n}>();\n</script>\n","<!-- eslint-disable @typescript-eslint/no-explicit-any -->\n<template>\n <div\n class=\"dashboard-feed-row\"\n @click=\"$emit('click')\"\n >\n <div class=\"tw-flex tw-items-center tw-gap-2.5 tw-min-w-0\">\n <slot />\n </div>\n <div\n v-if=\"$slots.trailing\"\n class=\"tw-flex tw-items-center tw-gap-3 tw-flex-shrink-0 tw-ml-3\"\n >\n <slot name=\"trailing\" />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\ndefineEmits<{\n click: [];\n}>();\n\ndefineSlots<{\n default: (props: any) => any;\n trailing: (props: any) => any;\n}>();\n</script>\n"],"names":["LAYOUT_STORAGE_KEY","toGridstackWidget","widget","placement","pos","fromGridstackNode","node","gridstackNodesToLayoutMap","nodes","layout","loadLayoutFromStorage","stored","parsed","id","error","saveLayoutToStorage","widgets","gridstackFormat","clearLayoutStorage","autoArrangeWidgets","columns","rowOccupancy","isPositionFree","x","width","height","row","occupied","col","occupyPosition","findFreePosition","y","position","mergeLayoutWithWidgets","savedLayout","savedPlacement","builtInPos","w","DEFAULT_OPTIONS","useGridstack","options","gridOptions","resizable","autoSave","onLayoutChange","grid","shallowRef","ref","isInitialized","isUpdating","mergedOptions","initGrid","element","GridStack","handleChange","handleAdded","handleRemoved","widgetData","_event","previous","saveLayout","destroyGrid","addWidget","gsWidget","removeWidget","widgetId","recordPlacementFromNode","requestedPosition","requestedSize","updateWidgetPosition","updateWidgetSize","size","loadLayout","applyLayoutToGrid","resetToDefaults","batchUpdate","fn","watch","newWidgets","oldWidgets","nextTick","addedWidgets","ow","removedWidgetIds","nw","onUnmounted","_openBlock","_createElementBlock","_hoisted_1","_cache","MIN_WIDGET_SPAN","DEFAULT_SKELETONS","readPersistedSkeletons","raw","items","n","props","__props","gridRef","liveAnnouncement","modulesReady","inject","ModulesReadyKey","skeletonItems","computed","skeletonItemStyle","item","dashboard","useDashboard","newLayout","announceToScreenReader","getPosition","grabbedWidgetId","grabbedOrigin","grabbedOriginSize","positionOf","sizeOf","widgetName","pickUpWidget","dropWidget","cancelWidgetMove","origin","originSize","current","moveWidgetBy","dx","dy","next","landed","resizeWidgetBy","dw","dh","applied","onWidgetKeydown","event","isGrabbed","grabbedWidget","candidate","getWidgetAriaLabel","index","name","state","message","tryInitGrid","onMounted","ready","__expose","_createBlock","VcContainer","_unref","_Fragment","_renderList","$event","_createElementVNode","_hoisted_4","_hoisted_5","_resolveDynamicComponent","_mergeProps","DashboardWidgetSkeleton","_normalizeStyle","_hoisted_6","_toDisplayString","dashboardRef","GridstackDashboard","_toGridstackWidget","_fromGridstackNode","_loadLayoutFromStorage","_saveLayoutToStorage","_mergeLayoutWithWidgets","_clearLayoutStorage","_LAYOUT_STORAGE_KEY","_hoisted_2","_renderSlot","_ctx","_hoisted_3","_createVNode","VcIcon","$slots","_hoisted_7","_withDirectives","_hoisted_8","_hoisted_9","_normalizeClass","$emit"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBO,MAAMA,IAAqB;AAY3B,SAASC,GAAkBC,GAA0BC,GAAuD;AACjH,QAAMC,IAAMD,KAAaD,EAAO;AAChC,SAAO;AAAA,IACL,IAAIA,EAAO;AAAA,IACX,GAAGE,GAAK,KAAK;AAAA,IACb,GAAGA,GAAK,KAAK;AAAA;AAAA;AAA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O,YADf3F,KAAAC,EAKM,OALNoF,IAKM;AAAA,QADJC,EAAwBC,EAAA,QAAA,UAAA;AAAA,MAAA;;;;"}
|
|
@@ -25,7 +25,8 @@ export type SidebarStateReturn = UseSidebarStateReturn;
|
|
|
25
25
|
/**
|
|
26
26
|
* Provides sidebar state to the component tree. Must be called once in VcApp setup.
|
|
27
27
|
* Idempotent: returns existing instance if already provided in the current tree.
|
|
28
|
-
* Internally delegates to useMenuExpanded()
|
|
28
|
+
* Internally delegates to useMenuExpanded() for shared reactive state,
|
|
29
|
+
* ensuring UserDropdownButton (which uses useMenuExpanded directly) stays in sync.
|
|
29
30
|
*/
|
|
30
31
|
export declare function provideSidebarState(): UseSidebarStateReturn;
|
|
31
32
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useSidebarState/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAgB,MAAM,KAAK,CAAC;AAG1D,MAAM,WAAW,YAAY;IAC3B,iEAAiE;IACjE,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACvB,oEAAoE;IACpE,eAAe,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAC9B,qCAAqC;IACrC,UAAU,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACzB,kFAAkF;IAClF,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,cAAc;IAC7B,yDAAyD;IACzD,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,uDAAuD;IACvD,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,4CAA4C;IAC5C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,6CAA6C;IAC7C,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,MAAM,qBAAqB,GAAG,YAAY,GAAG,cAAc,CAAC;AAElE,oDAAoD;AACpD,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,CAAC;AAIvD
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useSidebarState/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAgB,MAAM,KAAK,CAAC;AAG1D,MAAM,WAAW,YAAY;IAC3B,iEAAiE;IACjE,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACvB,oEAAoE;IACpE,eAAe,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAC9B,qCAAqC;IACrC,UAAU,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACzB,kFAAkF;IAClF,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,cAAc;IAC7B,yDAAyD;IACzD,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,uDAAuD;IACvD,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,4CAA4C;IAC5C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,6CAA6C;IAC7C,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,MAAM,qBAAqB,GAAG,YAAY,GAAG,cAAc,CAAC;AAElE,oDAAoD;AACpD,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,CAAC;AAIvD;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,qBAAqB,CAoC3D;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI,qBAAqB,CAMvD"}
|
|
@@ -15,12 +15,6 @@ export interface UseToolbarReturn {
|
|
|
15
15
|
isToolbarItemRegistered: IToolbarService["isToolbarItemRegistered"];
|
|
16
16
|
registeredToolbarItems: IToolbarService["registeredToolbarItems"];
|
|
17
17
|
}
|
|
18
|
-
/**
|
|
19
|
-
* @deprecated Redundant inside a shell app: `VirtoShellFramework` already provides the
|
|
20
|
-
* toolbar service via `createAndProvideServices`, so this returns the existing instance.
|
|
21
|
-
* Still meaningful when bootstrapping an isolated tree (stories, tests) that has not
|
|
22
|
-
* installed the framework.
|
|
23
|
-
*/
|
|
24
18
|
export declare function provideToolbarService(): IToolbarService;
|
|
25
19
|
/**
|
|
26
20
|
* Composable for working with the toolbar
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useToolbar/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAoC,MAAM,gCAAgC,CAAC;AAQjH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,mBAAmB,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,aAAa,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACjF,qBAAqB,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/E,iBAAiB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,aAAa,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpG,eAAe,EAAE,CAAC,aAAa,CAAC,EAAE,MAAM,KAAK,YAAY,EAAE,CAAC;IAC5D,sBAAsB,EAAE,CAAC,aAAa,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,uBAAuB,EAAE,eAAe,CAAC,yBAAyB,CAAC,CAAC;IACpE,sBAAsB,EAAE,eAAe,CAAC,wBAAwB,CAAC,CAAC;CACnE;AASD
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useToolbar/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAoC,MAAM,gCAAgC,CAAC;AAQjH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,mBAAmB,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,aAAa,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACjF,qBAAqB,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/E,iBAAiB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,aAAa,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpG,eAAe,EAAE,CAAC,aAAa,CAAC,EAAE,MAAM,KAAK,YAAY,EAAE,CAAC;IAC5D,sBAAsB,EAAE,CAAC,aAAa,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,uBAAuB,EAAE,eAAe,CAAC,yBAAyB,CAAC,CAAC;IACpE,sBAAsB,EAAE,eAAe,CAAC,wBAAwB,CAAC,CAAC;CACnE;AASD,wBAAgB,qBAAqB,IAAI,eAAe,CAEvD;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,OAAO,GAAE,iBAAsB,GAAG,gBAAgB,CAoE5E"}
|
|
@@ -6,8 +6,5 @@ export interface GlobalSearchState {
|
|
|
6
6
|
setSearchQuery: (bladeId: string, query: string) => void;
|
|
7
7
|
closeSearch: (bladeId: string) => void;
|
|
8
8
|
}
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated Unused; will be removed in the next major. No replacement.
|
|
11
|
-
*/
|
|
12
9
|
export declare function createGlobalSearchService(): GlobalSearchState;
|
|
13
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/services/global-search-service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAO,MAAM,KAAK,CAAC;AAE/B,MAAM,WAAW,iBAAiB;IAChC,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC9C,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACzC,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/services/global-search-service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAO,MAAM,KAAK,CAAC;AAE/B,MAAM,WAAW,iBAAiB;IAChC,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC9C,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACzC,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED,wBAAgB,yBAAyB,sBAyBxC"}
|
package/dist/dashboard/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as o, a as t, b as e, c as r, d, L as g, e as i, f as b, l as L, m as h, s as m, t as u, u as D } from "../chunks/dashboard-feed-row.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { _ as o, a as t, b as e, c as r, d, L as g, e as i, f as b, l as L, m as h, s as m, t as u, u as D } from "../chunks/dashboard-feed-row.vue_vue_type_script_setup_true_lang-BCsJG_hk.js";
|
|
2
2
|
export {
|
|
3
3
|
o as DashboardFeedList,
|
|
4
4
|
t as DashboardFeedRow,
|
package/dist/framework.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { b as Da, c as ya } from "./chunks/vendor-vueuse-core-BFa9je5E.js";
|
|
2
|
-
import { t as nt, v as oe, w as q, x as X, _ as $, y as be, z as Ba, I as Dt, d as K, b as Ae, l as Ma, A as ka, C as Va, D as Ua, V as Ee, E as Fa, F as Wa, G as Ha, H as Ga, J as xa, K as $a, L as Ka, M as za, N as qa } from "./chunks/VcScheduler.vue_vue_type_style_index_0_lang-
|
|
3
|
-
import { O as Kl, B as zl, P as ql, Q as Yl, R as jl, S as Zl, T as Xl, U as Jl, W as Ql, a as eu, c as tu, e as au, f as nu, g as su, h as ou, i as ru, j as iu, X as lu, Y as uu, Z as du, $ as cu, a0 as Eu, a1 as fu, a2 as mu, a3 as gu, a4 as Su, a5 as pu, a6 as Au, a7 as Tu, a8 as hu, a9 as Lu, aa as Ou, ab as Ru, p as _u, ac as Iu, ad as vu, ae as wu, af as Cu, ag as bu, ah as Pu, ai as Nu, aj as Du, ak as yu, al as Bu, am as Mu, u as ku, k as Vu, r as Uu, an as Fu, m as Wu, n as Hu, ao as Gu, o as xu, ap as $u, aq as Ku, ar as zu } from "./chunks/VcScheduler.vue_vue_type_style_index_0_lang-
|
|
2
|
+
import { t as nt, v as oe, w as q, x as X, _ as $, y as be, z as Ba, I as Dt, d as K, b as Ae, l as Ma, A as ka, C as Va, D as Ua, V as Ee, E as Fa, F as Wa, G as Ha, H as Ga, J as xa, K as $a, L as Ka, M as za, N as qa } from "./chunks/VcScheduler.vue_vue_type_style_index_0_lang-BTg4PjTB.js";
|
|
3
|
+
import { O as Kl, B as zl, P as ql, Q as Yl, R as jl, S as Zl, T as Xl, U as Jl, W as Ql, a as eu, c as tu, e as au, f as nu, g as su, h as ou, i as ru, j as iu, X as lu, Y as uu, Z as du, $ as cu, a0 as Eu, a1 as fu, a2 as mu, a3 as gu, a4 as Su, a5 as pu, a6 as Au, a7 as Tu, a8 as hu, a9 as Lu, aa as Ou, ab as Ru, p as _u, ac as Iu, ad as vu, ae as wu, af as Cu, ag as bu, ah as Pu, ai as Nu, aj as Du, ak as yu, al as Bu, am as Mu, u as ku, k as Vu, r as Uu, an as Fu, m as Wu, n as Hu, ao as Gu, o as xu, ap as $u, aq as Ku, ar as zu } from "./chunks/VcScheduler.vue_vue_type_style_index_0_lang-BTg4PjTB.js";
|
|
4
4
|
import { getCurrentScope as st, onScopeDispose as ot, computed as w, inject as Q, watch as ne, defineComponent as G, openBlock as C, createBlock as D, createSlots as Oe, withCtx as A, renderSlot as Y, createElementVNode as V, normalizeClass as Ya, createElementBlock as H, Fragment as se, createVNode as _, unref as i, createTextVNode as k, toDisplayString as B, shallowReactive as ja, ref as b, readonly as Me, onMounted as Re, onBeforeMount as Za, onBeforeUnmount as Xa, onUnmounted as Ja, provide as yt, toValue as Bt, isRef as Mt, normalizeStyle as kt, createCommentVNode as z, withDirectives as Qa, withModifiers as He, reactive as le, createApp as en, nextTick as Pe, renderList as Fe, withKeys as rt, mergeProps as ie, getCurrentInstance as tn, warn as an, h as te, toRaw as nn } from "vue";
|
|
5
|
-
import { b5 as me, b6 as sn, b7 as on, b8 as Vt, b9 as Ge, ba as rn, bb as ln, ao as un, bc as xe, bd as dn, be as cn, bf as Ut, Q as Ft, $ as En, a8 as ge, aa as it, a6 as $e, aB as fn, a0 as mn, av as gn, N as _e, ag as Wt, P as Sn, bg as pn, aC as ft, bh as An, bi as Tn } from "./chunks/VcScheduler.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { _ as Yu, a as ju, b as Zu, c as Xu, d as Ju, e as Qu, f as ed, g as td, h as ad, i as nd, j as sd, bj as od, bk as rd, C as id, bl as ld, bm as ud, bn as dd, k as cd, bo as Ed, bp as fd, S as md, bq as gd, br as Sd, l as pd, m as Ad, n as Td, o as hd, p as Ld, q as Od, T as Rd, r as _d, s as Id, t as vd, u as wd, v as Cd, w as bd, x as Pd, bs as Nd, bt as Dd, V as yd, y as Bd, z as Md, A as kd, B as Vd, D as Ud, E as Fd, F as Wd, G as Hd, H as Gd, I as xd, J as $d, K as Kd, L as zd, M as qd, O as Yd, bu as jd, bu as Zd, bv as Xd, R as Jd, U as Qd, W as ec, X as tc, Y as ac, Z as nc, a1 as sc, a2 as oc, a3 as rc, a4 as ic, a5 as lc, a7 as uc, a9 as dc, ab as cc, ac as Ec, ad as fc, ae as mc, af as gc, ah as Sc, ai as pc, aj as Ac, ak as Tc, al as hc, am as Lc, an as Oc, ap as Rc, aq as _c, ar as Ic, as as vc, at as wc, au as Cc, aw as bc, ax as Pc, ay as Nc, az as Dc, aA as yc, aD as Bc, aE as Mc, bw as kc, aF as Vc, bx as Uc, by as Fc, bz as Wc, bA as Hc, bB as Gc, bC as xc, bD as $c, bE as Kc, bF as zc, bG as qc, bH as Yc, bI as jc, bJ as Zc, bK as Xc, bL as Jc, bM as Qc, bN as eE, aG as tE, aH as aE, aI as nE, bO as sE, aJ as oE, aK as rE, bP as iE, bQ as lE, aL as uE, aM as dE, aN as cE, aO as EE, bR as fE, aP as mE, aQ as gE, aR as SE, bS as pE, aS as AE, bT as TE, aT as hE, aU as LE, aV as OE, bU as RE, aW as _E, aX as IE, aY as vE, aZ as wE, a_ as CE, a$ as bE, b0 as PE, b1 as NE, b2 as DE, b3 as yE, b4 as BE, aF as ME } from "./chunks/VcScheduler.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { b5 as me, b6 as sn, b7 as on, b8 as Vt, b9 as Ge, ba as rn, bb as ln, ao as un, bc as xe, bd as dn, be as cn, bf as Ut, Q as Ft, $ as En, a8 as ge, aa as it, a6 as $e, aB as fn, a0 as mn, av as gn, N as _e, ag as Wt, P as Sn, bg as pn, aC as ft, bh as An, bi as Tn } from "./chunks/VcScheduler.vue_vue_type_script_setup_true_lang-BmlVL_rn.js";
|
|
6
|
+
import { _ as Yu, a as ju, b as Zu, c as Xu, d as Ju, e as Qu, f as ed, g as td, h as ad, i as nd, j as sd, bj as od, bk as rd, C as id, bl as ld, bm as ud, bn as dd, k as cd, bo as Ed, bp as fd, S as md, bq as gd, br as Sd, l as pd, m as Ad, n as Td, o as hd, p as Ld, q as Od, T as Rd, r as _d, s as Id, t as vd, u as wd, v as Cd, w as bd, x as Pd, bs as Nd, bt as Dd, V as yd, y as Bd, z as Md, A as kd, B as Vd, D as Ud, E as Fd, F as Wd, G as Hd, H as Gd, I as xd, J as $d, K as Kd, L as zd, M as qd, O as Yd, bu as jd, bu as Zd, bv as Xd, R as Jd, U as Qd, W as ec, X as tc, Y as ac, Z as nc, a1 as sc, a2 as oc, a3 as rc, a4 as ic, a5 as lc, a7 as uc, a9 as dc, ab as cc, ac as Ec, ad as fc, ae as mc, af as gc, ah as Sc, ai as pc, aj as Ac, ak as Tc, al as hc, am as Lc, an as Oc, ap as Rc, aq as _c, ar as Ic, as as vc, at as wc, au as Cc, aw as bc, ax as Pc, ay as Nc, az as Dc, aA as yc, aD as Bc, aE as Mc, bw as kc, aF as Vc, bx as Uc, by as Fc, bz as Wc, bA as Hc, bB as Gc, bC as xc, bD as $c, bE as Kc, bF as zc, bG as qc, bH as Yc, bI as jc, bJ as Zc, bK as Xc, bL as Jc, bM as Qc, bN as eE, aG as tE, aH as aE, aI as nE, bO as sE, aJ as oE, aK as rE, bP as iE, bQ as lE, aL as uE, aM as dE, aN as cE, aO as EE, bR as fE, aP as mE, aQ as gE, aR as SE, bS as pE, aS as AE, bT as TE, aT as hE, aU as LE, aV as OE, bU as RE, aW as _E, aX as IE, aY as vE, aZ as wE, a_ as CE, a$ as bE, b0 as PE, b1 as NE, b2 as DE, b3 as yE, b4 as BE, aF as ME } from "./chunks/VcScheduler.vue_vue_type_script_setup_true_lang-BmlVL_rn.js";
|
|
7
7
|
import { _ as hn } from "./chunks/vendor-cypress-signalr-mock-itnm2wpA.js";
|
|
8
8
|
import { c as U, b as Ln, d as On, i as Qe, S as Rn, W as Ht, B as Gt, h as _n, j as xt, m as In, k as vn, l as $t, n as wn, _ as Cn, L as bn, I as Pn, o as Nn, p as Dn, q as yn, r as Bn, s as Mn, T as kn, t as Vn, v as Un, w as Fn, N as Wn } from "./chunks/VcAiAgentPanel.vue_vue_type_style_index_0_lang-CZdY18Hq.js";
|
|
9
9
|
import { A as VE, x as UE, y as FE, z as WE, C as HE, D as GE, F as xE, G as $E, H as KE, J as zE, e as qE, f as YE, K as jE, O as ZE, P as XE, Q as JE, R as QE, U as ef, V as tf, X as af, Y as nf, Z as sf, $ as of, E as rf, a0 as lf, a1 as uf, a2 as df, a3 as cf, a4 as Ef, a5 as ff, a6 as mf, a7 as gf, M as Sf, a8 as pf, a9 as Af, aa as Tf, ab as hf, ac as Lf, ad as Of, ae as Rf, af as _f, a as If, ag as vf, ah as wf, ai as Cf, aj as bf, u as Pf, g as Nf } from "./chunks/VcAiAgentPanel.vue_vue_type_style_index_0_lang-CZdY18Hq.js";
|
|
@@ -93,7 +93,7 @@ import "./chunks/vendor-truncate-html-ChA1T5zy.js";
|
|
|
93
93
|
import "./chunks/vendor-sortablejs-Bsvu-FKn.js";
|
|
94
94
|
import { v as ns } from "./chunks/vendor-vue3-touch-events-DqysuuWh.js";
|
|
95
95
|
import "./chunks/vendor-gridstack-Beau2jQ7.js";
|
|
96
|
-
import { _ as Jf, a as Qf, b as em, c as tm, d as am, L as nm, e as sm, f as om, l as rm, m as im, s as lm, t as um, u as dm } from "./chunks/dashboard-feed-row.vue_vue_type_script_setup_true_lang-
|
|
96
|
+
import { _ as Jf, a as Qf, b as em, c as tm, d as am, L as nm, e as sm, f as om, l as rm, m as im, s as lm, t as um, u as dm } from "./chunks/dashboard-feed-row.vue_vue_type_script_setup_true_lang-BCsJG_hk.js";
|
|
97
97
|
import { _ as Em, a as fm, b as mm, c as gm, d as Sm, e as pm } from "./chunks/DashboardDonutChart.vue_vue_type_script_setup_true_lang-hTcM33bM.js";
|
|
98
98
|
import { A as ss, u as os } from "./chunks/vendor-vue3-application-insights-CAgbt8pk.js";
|
|
99
99
|
import { o as rs, c as J, d as is, i as ls } from "./chunks/vendor-lodash-es-D2n90GJy.js";
|
|
@@ -672,7 +672,7 @@ function Zt(e, t) {
|
|
|
672
672
|
const E = be(u);
|
|
673
673
|
if (n.value = E, Bs.error("Async action failed:", u), s && !Qe() && u && typeof u == "object") {
|
|
674
674
|
const g = `async-error-${E.message.slice(0, 80)}`, f = setTimeout(async () => {
|
|
675
|
-
ze || (ze = (await import("./chunks/VcScheduler.vue_vue_type_style_index_0_lang-
|
|
675
|
+
ze || (ze = (await import("./chunks/VcScheduler.vue_vue_type_style_index_0_lang-BTg4PjTB.js").then((S) => S.aE)).notification), ze.error(E.message, {
|
|
676
676
|
timeout: o,
|
|
677
677
|
notificationId: g
|
|
678
678
|
});
|
|
@@ -2095,12 +2095,12 @@ function Go() {
|
|
|
2095
2095
|
hasNotification: (t) => e.hasNotification(t)
|
|
2096
2096
|
});
|
|
2097
2097
|
}
|
|
2098
|
-
const xo = "2.5.0-
|
|
2098
|
+
const xo = "2.5.0-pr313.d5b02dd";
|
|
2099
2099
|
function $o() {
|
|
2100
2100
|
return {
|
|
2101
2101
|
version: xo,
|
|
2102
|
-
buildDate: "2026-08-
|
|
2103
|
-
gitHash: "
|
|
2102
|
+
buildDate: "2026-08-25T11:24:51.460Z",
|
|
2103
|
+
gitHash: "d5b02dd62"
|
|
2104
2104
|
};
|
|
2105
2105
|
}
|
|
2106
2106
|
function Ko(e = $o()) {
|