@aintela/bi 0.2.3 → 0.2.5
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/{GridLayout-1gWuIKeZ.js → GridLayout-BQcuPzng.js} +2 -2
- package/dist/GridLayout-BQcuPzng.js.map +1 -0
- package/dist/{ScriptDashboardViewerVertical-Rr_4adpH.js → ScriptDashboardViewerVertical-B8Y5LoE4.js} +42 -26
- package/dist/{ScriptDashboardViewerVertical-Rr_4adpH.js.map → ScriptDashboardViewerVertical-B8Y5LoE4.js.map} +1 -1
- package/dist/{biModuleSurface-BdJK7sSL.js → biModuleSurface-zEeRrln5.js} +6 -6
- package/dist/{biModuleSurface-BdJK7sSL.js.map → biModuleSurface-zEeRrln5.js.map} +1 -1
- package/dist/composer/index.d.ts +1 -1
- package/dist/composer/models/utils.d.ts +11 -0
- package/dist/composer.js +33 -32
- package/dist/grid.js +2 -2
- package/dist/{index-DChE_l-p.js → index-C38e4aIE.js} +2 -2
- package/dist/index-C38e4aIE.js.map +1 -0
- package/dist/{index-BzUugG0A.js → index-D6-YxBjl.js} +2 -2
- package/dist/{index-BzUugG0A.js.map → index-D6-YxBjl.js.map} +1 -1
- package/dist/{index-C4_VSDeU.js → index-GTSBsgzP.js} +875 -857
- package/dist/index-GTSBsgzP.js.map +1 -0
- package/dist/index-ZBNoVc5M.js +210 -0
- package/dist/index-ZBNoVc5M.js.map +1 -0
- package/dist/index-zN3LPF6u.js +97 -0
- package/dist/index-zN3LPF6u.js.map +1 -0
- package/dist/index.js +55 -54
- package/dist/inline/Chart.d.ts +0 -9
- package/dist/inline/Metric.d.ts +0 -2
- package/dist/inline/MetricGroup.d.ts +1 -1
- package/dist/inline.js +1 -1
- package/dist/runtime/version.d.ts +1 -1
- package/dist/runtime.js +7 -7
- package/dist/style.css +1 -1
- package/dist/theme.js +1 -1
- package/dist/{version-BTc4ElDG.js → version-oYqU5xJk.js} +6 -6
- package/dist/{version-BTc4ElDG.js.map → version-oYqU5xJk.js.map} +1 -1
- package/dist/viewer.js +1 -1
- package/package.json +1 -1
- package/dist/GridLayout-1gWuIKeZ.js.map +0 -1
- package/dist/index-BYc79sSy.js +0 -131
- package/dist/index-BYc79sSy.js.map +0 -1
- package/dist/index-C4_VSDeU.js.map +0 -1
- package/dist/index-D7Oo_dC-.js +0 -94
- package/dist/index-D7Oo_dC-.js.map +0 -1
- package/dist/index-DChE_l-p.js.map +0 -1
|
@@ -101,7 +101,7 @@ const me = ie(
|
|
|
101
101
|
children: [
|
|
102
102
|
/* @__PURE__ */ N("div", { style: { paddingLeft: `${x * (1 - A)}px`, zoom: A, height: "inherit", width: "inherit", display: "flex", flexDirection: "column" }, children: [
|
|
103
103
|
D && /* @__PURE__ */ s("div", { style: { flexShrink: 0 }, children: D }),
|
|
104
|
-
/* @__PURE__ */ s("div", { className: i, style: { alignItems: "center", flex: 1, minHeight: 0,
|
|
104
|
+
/* @__PURE__ */ s("div", { className: i, style: { alignItems: "center", flex: 1, minHeight: 0, ...z }, children: /* @__PURE__ */ s(de, { value: { naked: u }, children: /* @__PURE__ */ s(J, { fallback: j, children: p }) }) }),
|
|
105
105
|
u && /* @__PURE__ */ s("div", { className: "grid-card-naked-resize-handle", "aria-hidden": "true" })
|
|
106
106
|
] }),
|
|
107
107
|
u && /* @__PURE__ */ s("div", { className: "grid-card-naked-resize-handle", "aria-hidden": "true" })
|
|
@@ -345,4 +345,4 @@ export {
|
|
|
345
345
|
we as d,
|
|
346
346
|
Se as e
|
|
347
347
|
};
|
|
348
|
-
//# sourceMappingURL=GridLayout-
|
|
348
|
+
//# sourceMappingURL=GridLayout-BQcuPzng.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridLayout-BQcuPzng.js","sources":["../src/grid/BiErrorBoundary.tsx","../src/grid/GridCard.tsx","../src/grid/types.ts","../src/grid/GridLayout.tsx"],"sourcesContent":["import React from 'react';\n\nexport interface BiErrorBoundaryProps {\n fallback: (error: Error) => React.ReactNode;\n /** Reset the boundary when this value changes (e.g. the card key or a render generation). */\n resetKey?: unknown;\n onError?: (error: Error, info: React.ErrorInfo) => void;\n children?: React.ReactNode;\n}\n\ninterface State {\n error: Error | null;\n}\n\n/**\n * Minimal error boundary for grid cards. A local copy rather than the chat\n * library's `JsxErrorBoundary`, so `@aintela/bi/grid` has no runtime import\n * from `@aintela/chat` (only `@aintela/bi/runtime` talks to the chat library).\n */\nexport class BiErrorBoundary extends React.Component<BiErrorBoundaryProps, State> {\n state: State = { error: null };\n\n static getDerivedStateFromError(error: Error): State {\n return { error };\n }\n\n componentDidCatch(error: Error, info: React.ErrorInfo): void {\n this.props.onError?.(error, info);\n }\n\n componentDidUpdate(prev: BiErrorBoundaryProps): void {\n if (this.state.error && prev.resetKey !== this.props.resetKey) {\n this.setState({ error: null });\n }\n }\n\n render(): React.ReactNode {\n if (this.state.error) return this.props.fallback(this.state.error);\n return this.props.children;\n }\n}\n\nexport default BiErrorBoundary;\n","import React, { forwardRef } from 'react';\nimport type { HTMLAttributes, ReactNode, CSSProperties } from 'react';\nimport type { SvgIconComponent } from '@mui/icons-material';\nimport type { OverridableComponent } from '@mui/material/OverridableComponent';\nimport type { SvgIconTypeMap } from '@mui/material/SvgIcon';\nimport { useTheme } from '@mui/material/styles';\nimport { alpha } from '@mui/material/styles';\nimport { BiErrorBoundary } from './BiErrorBoundary';\nimport { ChartContextProvider } from './ChartContext';\nimport './GridLayout.css';\n\n/** Header configuration for GridCard */\nexport interface GridCardHeader {\n title: string;\n /** Material Icons ligature name (host loads the font) or an MUI icon component */\n icon?: string | SvgIconComponent;\n}\n\n/** Predefined accent variants for the card */\nexport type GridCardColor = 'kpi' | 'chart' | 'table' | 'info' | 'iframe' | 'details' | 'custom';\n\nexport type GridCardContentDisplay = 'default' | 'grid';\n\n/**\n * - \"Boxed\": default look with header, border accents, etc.\n * - \"Naked\": no header, no border accents, blends with the background; only\n * subtle drag/resize handles on hover.\n */\nexport type GridCardViewType = 'Boxed' | 'Naked';\n\nexport interface GridCardProps extends HTMLAttributes<HTMLDivElement> {\n className?: string;\n variant?: 'default' | 'elevated';\n viewType?: GridCardViewType;\n header?: GridCardHeader;\n /** Custom header render function; overrides the default header. */\n renderHeader?: (header: GridCardHeader) => ReactNode;\n /** Accent variant. */\n color?: GridCardColor;\n /** Custom accent (used when color=\"custom\"): any CSS colour, e.g. a theme token you resolved. */\n customColor?: string;\n contentDisplay?: GridCardContentDisplay;\n contentStyle?: CSSProperties;\n contentClassName?: string;\n noBorder?: boolean;\n /** Raw CSS injected in a `<style>` next to the card (dashboard bundles emit per-card styles). */\n htmlStyle?: string;\n dragLocked?: boolean;\n zoomLevel?: number;\n isResizable?: boolean;\n}\n\n/**\n * GridCard — a card usable directly as a react-grid-layout item. Forwards the\n * ref and the mouse/touch props RGL needs; use it as a direct child of\n * `GridLayout` with a `key`.\n */\nexport const GridCard = forwardRef<HTMLDivElement, GridCardProps>(\n (\n {\n style,\n htmlStyle,\n className,\n onMouseDown,\n onMouseUp,\n onTouchEnd,\n children,\n variant = 'default',\n viewType = 'Boxed',\n header,\n renderHeader,\n dragLocked = false,\n noBorder = false,\n color,\n zoomLevel = 0.9,\n customColor,\n contentDisplay = 'default',\n contentStyle,\n contentClassName,\n isResizable = false,\n ...props\n },\n ref,\n ) => {\n const theme = useTheme();\n const isNaked = viewType === 'Naked';\n const variantClass = variant === 'elevated' ? 'grid-card-elevated' : '';\n const hasHeader = !!header && !isNaked;\n const colorClass = isNaked ? '' : color ? `grid-card-${color}` : '';\n const nakedClass = isNaked ? 'grid-card-naked' : '';\n const displayClass = contentDisplay === 'grid' ? 'grid-card-content-grid' : '';\n\n const HeaderIcon = header?.icon as OverridableComponent<SvgIconTypeMap<{}, 'svg'>>;\n\n const cardStyle: CSSProperties = {\n position: 'relative',\n cursor: dragLocked ? 'pointer' : 'grab',\n border: noBorder ? '0px' : '',\n height: '100%',\n zoom: `${zoomLevel} !important`,\n ...style,\n ...(color === 'custom' && customColor\n ? ({\n '--grid-card-accent': customColor,\n '--grid-card-accent-light': safeAlpha(customColor, 0.4),\n '--grid-card-accent-dark': safeAlpha(customColor, 0.2),\n } as CSSProperties)\n : {}),\n };\n\n const innerWidth = parseInt(String(style?.height ?? '0'));\n\n const headerElement = header && !isNaked ? (\n renderHeader ? (\n renderHeader(header)\n ) : (\n <div className=\"grid-card-header\">\n <h4 className=\"grid-card-title\">{header.title}</h4>\n {header.icon && (\n <div className=\"grid-card-icon\">\n {typeof header.icon === 'string' ? <i className=\"material-icons\">{header.icon}</i> : <HeaderIcon fontSize=\"small\" sx={{ fontSize: '16px' }} />}\n </div>\n )}\n </div>\n )\n ) : null;\n\n const errorFallback = (err: Error) => (\n <div\n className=\"grid-card-error\"\n style={{\n border: `1px solid ${theme.palette.error.main}`,\n borderRadius: 6,\n padding: '12px 16px',\n margin: '8px 0',\n height: '95%',\n backgroundColor: alpha(theme.palette.error.main, 0.06),\n }}\n >\n <div style={{ color: theme.palette.error.main, fontSize: '0.85em', fontWeight: 500, marginBottom: 6 }}>Card render error: {err.message}</div>\n </div>\n );\n\n const contentClasses = [isNaked ? 'grid-card-content-naked' : 'grid-card-content', displayClass, contentClassName].filter(Boolean).join(' ');\n\n return (\n <>\n {htmlStyle && <style>{htmlStyle}</style>}\n\n <div\n ref={ref}\n style={cardStyle}\n className={`${isResizable ? 'grid-card' : 'grid-card-nohandle'} ds-card ${variantClass} ${colorClass} ${nakedClass} ${hasHeader ? 'grid-card-with-header' : ''} ${className ?? ''}`.trim()}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n onTouchEnd={onTouchEnd}\n {...props}\n >\n {/* Flex column: pinned header slot + a content area that owns the scroll boundary\n (`flex: 1; min-height: 0`), so `height: 100%` inside children resolves to the\n content area and not header + content. */}\n <div style={{ paddingLeft: `${innerWidth * (1 - zoomLevel)}px`, zoom: zoomLevel, height: 'inherit', width: 'inherit', display: 'flex', flexDirection: 'column' }}>\n {headerElement && <div style={{ flexShrink: 0 }}>{headerElement}</div>}\n {/*\n No `overflow` here. `.grid-card-with-header .grid-card-content` sets `overflow: auto`\n and the comment beside it explains that `min-height: 0` exists precisely so that\n `auto` can trigger — and then this inline `overflow: 'hidden'` overrode it, because\n an inline style beats a stylesheet at any specificity. The card built a scroll\n boundary and then forbade scrolling, so content that did not fit was cut off with\n nothing to show for it (a metric's comparison line, half a row of text). The class\n owns it now; `contentStyle` still spreads last, so a card that really wants clipping\n can still say so.\n */}\n <div className={contentClasses} style={{ alignItems: 'center', flex: 1, minHeight: 0, ...contentStyle }}>\n <ChartContextProvider value={{ naked: isNaked }}>\n <BiErrorBoundary fallback={errorFallback}>{children}</BiErrorBoundary>\n </ChartContextProvider>\n </div>\n {isNaked && <div className=\"grid-card-naked-resize-handle\" aria-hidden=\"true\" />}\n </div>\n {isNaked && <div className=\"grid-card-naked-resize-handle\" aria-hidden=\"true\" />}\n </div>\n </>\n );\n },\n);\n\nGridCard.displayName = 'GridCard';\n\nfunction safeAlpha(color: string, a: number): string {\n try {\n return alpha(color, a);\n } catch {\n return color;\n }\n}\n\nexport default GridCard;\n","import type { Layout } from 'react-grid-layout';\nimport type { GridConfig } from './gridModels';\n\nexport type { CellConfig, RowConfig, GridConfig } from './gridModels';\n\n/** Breakpoint names supported by the grid */\nexport type BreakpointName = 'lg' | 'md' | 'sm' | 'xs' | 'xxs';\n\n/** Responsive grid configuration — a GridConfig per breakpoint */\nexport interface ResponsiveGridConfig {\n lg?: GridConfig;\n md?: GridConfig;\n sm?: GridConfig;\n xs?: GridConfig;\n xxs?: GridConfig;\n rowMultipler?: number;\n}\n\n/** Responsive layouts (native react-grid-layout format) */\nexport type ResponsiveLayouts = {\n [K in BreakpointName]?: Layout;\n};\n\nexport const DEFAULT_BREAKPOINTS: Record<BreakpointName, number> = {\n lg: 920,\n md: 600,\n sm: 400,\n xs: 400,\n xxs: 0,\n};\n\nexport const DEFAULT_COLS: Record<BreakpointName, number> = { lg: 12, md: 9, sm: 4, xs: 4, xxs: 4 };\n\nexport const DEFAULT_ROW_HEIGHT = 20;\nexport const DEFAULT_ROW_MULTIPLIER = 3;\nexport const DEFAULT_MAX_ROWS = 36;\n","import React, { useCallback, useEffect, useMemo, useRef } from \"react\";\nimport { ReactGridLayout, Responsive, useContainerWidth } from \"react-grid-layout\";\nimport { gridBounds, minMaxSize } from \"react-grid-layout/core\";\nimport type {\n Layout,\n LayoutItem,\n ResponsiveLayouts as RGLResponsiveLayouts,\n} from \"react-grid-layout\";\nimport type { LayoutConstraint } from \"react-grid-layout/core\";\nimport type {\n GridConfig,\n ResponsiveGridConfig,\n ResponsiveLayouts,\n BreakpointName,\n} from \"./types\";\nimport {\n DEFAULT_BREAKPOINTS,\n DEFAULT_COLS,\n DEFAULT_MAX_ROWS,\n DEFAULT_ROW_HEIGHT,\n DEFAULT_ROW_MULTIPLIER,\n} from \"./types\";\nimport type { AutoResponsiveStrategy } from \"./useGridConfigTranslator\";\n\nimport './GridLayout.css';\n\n/**\n * Props for the GridLayout component\n */\nexport interface GridLayoutProps {\n /**\n * Grid configuration abstraction (rows/cells)\n * Used to generate the initial layout\n */\n config?: GridConfig | ResponsiveGridConfig;\n\n /**\n * Optional override layouts (native format)\n * When provided, these are used instead of translating config\n * Use this for persisted user modifications\n */\n layouts?: Layout | ResponsiveLayouts;\n\n /**\n * Whether to automatically generate responsive layouts for different breakpoints.\n * When true (default), a single GridConfig is automatically adapted for all screen sizes.\n * When false, the same layout is used for all breakpoints (only scaled by column count).\n * @default true\n */\n responsive?: boolean;\n\n /**\n * Strategy for auto-responsive layout generation.\n * - \"scale\": Proportionally scale widths (items may become narrow)\n * - \"stack\": Stack items vertically on small screens (full width)\n * - \"hybrid\": Scale for medium screens, stack for small screens (default)\n * Only applies when `responsive` is true and a single GridConfig is provided.\n * @default \"hybrid\"\n */\n autoResponsiveStrategy?: AutoResponsiveStrategy;\n\n dragLocked?: boolean\n\n /**\n * Row height in pixels\n * @default 25\n */\n rowHeight?: number;\n\n /**\n * Row height in pixels\n * @default 50\n */\n rowMultiplier?: number;\n\n /**\n * Breakpoint definitions (name → min-width)\n * @default { lg: 1200, md: 900, sm: 768, xs: 480, xxs: 0 }\n */\n breakpoints?: Record<BreakpointName, number>;\n\n /**\n * Column counts per breakpoint\n * @default { lg: 12, md: 12, sm: 12, xs: 4, xxs: 2 }\n */\n cols?: Record<BreakpointName, number>;\n\n /**\n * Maximum number of rows\n * @default Infinity\n */\n maxRows?: number;\n\n /**\n * Called when layout changes (after drag or resize ends)\n * Only fires when layout actually changed\n */\n onLayoutChange?: (layout: Layout, allLayouts: ResponsiveLayouts) => void;\n\n /**\n * User-driven boundaries. RGL fires these only at the end of a real\n * resize / drag interaction — *not* on prop syncs or layout reflows.\n * Use these (instead of `onLayoutChange`) when the consumer needs a\n * \"the user committed a change\" signal that shouldn't fire when a\n * fresh `layouts` prop comes in from above.\n */\n onResizeStop?: (\n layout: Layout,\n oldItem: LayoutItem | null,\n newItem: LayoutItem | null,\n ) => void;\n onDragStop?: (\n layout: Layout,\n oldItem: LayoutItem | null,\n newItem: LayoutItem | null,\n ) => void;\n\n /**\n * Children components (must have key prop matching cell keys)\n */\n children: React.ReactNode;\n\n zoomLevel?: number;\n\n /**\n * Additional class name for the container\n */\n className?: string;\n\n /**\n * Additional styles for the container\n */\n style?: React.CSSProperties;\n\n onDrop?: (data: any, item?: LayoutItem) => void;\n\n manualWidth?: number\n\n /**\n * Row-aware resize.\n *\n * When configured, dragging a card's resize handle adjusts the height\n * of every \"row sibling\" — items whose top edge (`y`) matches the\n * resized item's `y` — together. The width of the resized item is\n * unaffected, and so are widths/heights of any items NOT in the row.\n *\n * - Pass `true` for the default policy: a modifier (Shift) must be\n * held to opt into row-aware behaviour for a given drag.\n * - Pass an object to invert the default (`defaultOn: true` makes\n * row-aware the no-modifier behaviour and the modifier turns it\n * OFF for that drag) and/or to pick a different modifier key.\n * - Pass `false` (or omit the prop) to disable entirely.\n */\n rowAwareResize?: boolean | RowAwareResizeConfig;\n}\n\nexport interface RowAwareResizeConfig {\n /** Master switch. Defaults to `true` when this object is supplied. */\n enabled?: boolean;\n /**\n * When `true`, row-aware resize is the DEFAULT and holding the\n * modifier inverts it (i.e. the modifier disables row-aware for that\n * drag). When `false` (default), the user must hold the modifier to\n * opt into row-aware for that drag.\n */\n defaultOn?: boolean;\n /** Modifier key that flips the default behaviour. */\n modifierKey?: 'Shift' | 'Alt' | 'Ctrl' | 'Meta';\n}\n\ninterface NormalisedRowAwareResize {\n enabled: boolean;\n defaultOn: boolean;\n modifierKey: 'Shift' | 'Alt' | 'Ctrl' | 'Meta';\n}\n\nfunction normaliseRowAwareResize(\n cfg: boolean | RowAwareResizeConfig | undefined,\n): NormalisedRowAwareResize {\n if (cfg === true) return { enabled: true, defaultOn: false, modifierKey: 'Shift' };\n if (!cfg) return { enabled: false, defaultOn: false, modifierKey: 'Shift' };\n return {\n enabled: cfg.enabled ?? true,\n defaultOn: cfg.defaultOn ?? false,\n modifierKey: cfg.modifierKey ?? 'Shift',\n };\n}\n\n/**\n * Compare two layouts to check if they are equal\n */\nfunction areLayoutsEqual(a: Layout, b: Layout, _rowMultipler: number, _zoomLevel: number): boolean {\n if (a.length !== b.length) return false;\n\n for (let i = 0; i < a.length; i++) {\n const itemA = a[i];\n const itemB = b.find((item: LayoutItem) => item.i === itemA.i);\n if (!itemB) {\n return false\n }\n if (\n itemA.x !== itemB.x ||\n itemA.y !== itemB.y ||\n itemA.w !== itemB.w ||\n itemA.h !== itemB.h\n ) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * GridLayout component\n *\n * A wrapper around react-grid-layout's Responsive component that accepts\n * a simplified row/cell configuration and translates it to the native format.\n *\n * @example\n * ```tsx\n * const config: GridConfig = {\n * rows: [\n * { height: 1, cells: [{ key: \"header\", width: 12 }] },\n * { height: 3, cells: [\n * { key: \"chart1\", width: 6 },\n * { key: \"chart2\", width: 6 }\n * ]}\n * ]\n * };\n *\n * <GridLayout config={config} onLayoutChange={handleChange}>\n * <div key=\"header\">Header</div>\n * <div key=\"chart1\">Chart 1</div>\n * <div key=\"chart2\">Chart 2</div>\n * </GridLayout>\n * ```\n */\nexport const GridLayout: React.FC<GridLayoutProps> = ({\n config,\n layouts,\n responsive = true,\n autoResponsiveStrategy: _autoResponsiveStrategy = \"scale\",\n rowHeight = DEFAULT_ROW_HEIGHT,\n rowMultiplier = DEFAULT_ROW_MULTIPLIER,\n breakpoints = DEFAULT_BREAKPOINTS,\n cols = DEFAULT_COLS,\n zoomLevel = 0.98,\n maxRows = DEFAULT_MAX_ROWS,\n dragLocked = false,\n onLayoutChange,\n \n onResizeStop,\n onDragStop,\n onDrop,\n manualWidth,\n children,\n className,\n rowAwareResize,\n}) => {\n // The two pass-through callbacks come straight from RGL's own\n // resize-stop / drag-stop events. We unwrap RGL's 6-arg signature\n // (oldItem, newItem, placeholder, e, element) into a leaner shape\n // matching `onLayoutChange` so the consumer doesn't have to know\n // RGL's internals.\n const handleResizeStopPassthrough = useCallback(\n (\n layout: Layout,\n oldItem: LayoutItem | null,\n newItem: LayoutItem | null,\n ) => {\n onResizeStop?.(layout, oldItem, newItem);\n },\n [onResizeStop],\n );\n const handleDragStopPassthrough = useCallback(\n (\n layout: Layout,\n oldItem: LayoutItem | null,\n newItem: LayoutItem | null,\n ) => {\n onDragStop?.(layout, oldItem, newItem);\n },\n [onDragStop],\n );\n const rowAwareCfg = normaliseRowAwareResize(rowAwareResize);\n // Modifier-key state is read globally rather than from the RGL\n // resize event because the constraint API doesn't pass the event\n // through. We listen on `window` so the state is fresh by the time\n // RGL invokes our constraint mid-drag.\n const modifierHeldRef = useRef(false);\n useEffect(() => {\n if (!rowAwareCfg.enabled) return;\n const update = (e: { shiftKey?: boolean; altKey?: boolean; ctrlKey?: boolean; metaKey?: boolean }) => {\n switch (rowAwareCfg.modifierKey) {\n case 'Shift': modifierHeldRef.current = !!e.shiftKey; return;\n case 'Alt': modifierHeldRef.current = !!e.altKey; return;\n case 'Ctrl': modifierHeldRef.current = !!e.ctrlKey; return;\n case 'Meta': modifierHeldRef.current = !!e.metaKey; return;\n }\n };\n const h = update as unknown as EventListener;\n window.addEventListener('keydown', h);\n window.addEventListener('keyup', h);\n window.addEventListener('mousemove', h);\n window.addEventListener('mousedown', h);\n return () => {\n window.removeEventListener('keydown', h);\n window.removeEventListener('keyup', h);\n window.removeEventListener('mousemove', h);\n window.removeEventListener('mousedown', h);\n };\n }, [rowAwareCfg.enabled, rowAwareCfg.modifierKey]);\n\n // Custom constraint that mutates the row siblings' `h` directly on\n // RGL's internal `layoutRef.current` (handed to us as\n // `context.layout`). RGL's `onResize` internal handler immediately\n // afterwards does `layout.map(item => item.i === id ? newItem : item)`\n // — siblings are returned by reference, so our mutations flow into\n // the new layout that gets handed to `compactor.compact` (which\n // clones items, baking the new heights into the next state). This is\n // the only path that survives RGL 2.x's prop-sync drag bail-out:\n // we're working WITH RGL's state pipeline, not feeding it from props.\n const rowAwareConstraint = useMemo<LayoutConstraint>(() => ({\n name: 'rowAwareResize',\n constrainSize(item, w, h, _handle, context) {\n if (!rowAwareCfg.enabled) return { w, h };\n const modifierHeld = modifierHeldRef.current;\n const shouldApply = rowAwareCfg.defaultOn ? !modifierHeld : modifierHeld;\n if (!shouldApply) return { w, h };\n const rowY = item.y ?? 0;\n for (const sibling of context.layout) {\n if (sibling.i === item.i) continue;\n if ((sibling.y ?? 0) !== rowY) continue;\n (sibling as { h: number }).h = h;\n }\n // Dragged item itself unchanged — RGL applies our returned\n // (w, h) as-is to it.\n return { w, h };\n },\n }), [rowAwareCfg.enabled, rowAwareCfg.defaultOn]);\n\n // RGL replaces its built-in defaults wholesale when `constraints` is\n // passed, so we explicitly bundle them in. When row-aware is\n // disabled we hand back `undefined` so RGL keeps its own defaults.\n const mergedConstraints = useMemo<LayoutConstraint[] | undefined>(() => {\n if (!rowAwareCfg.enabled) return undefined;\n return [gridBounds, minMaxSize, rowAwareConstraint];\n }, [rowAwareCfg.enabled, rowAwareConstraint]);\n const { width, containerRef, mounted } = useContainerWidth();\n const newWidth = manualWidth ?? (width);\n\n zoomLevel = zoomLevel ? zoomLevel * 0.95 : 0.98 * 0.95;\n\n // Last layouts we handed to RGL / received back from it, in *zoomed*\n // space. We compare incoming `onLayoutChange` payloads against this in\n // the same coordinate space so structurally-identical layouts dedupe\n // cleanly — without this the upward emission and the parent's\n // re-feeding form a loop.\n const lastRGLLayoutRef = useRef<ResponsiveLayouts | null>(null);\n\n if (config)\n config.rowMultipler = rowMultiplier ?? 1;\n\n // Pass-through. We used to multiply `h` by `unZoomLevel` here to\n // reverse the per-item h-scaling done in the effect — but that\n // scaling was redundant (the CSS `zoom: zoomLevel` on the wrapper\n // div already shrinks the rendered grid visually) AND the\n // round-trip was lossy due to rounding:\n // 6 → round(6*0.76)=5 → round(5*1.316)=7\n // so every store write came back with `h=7` instead of `h=6`,\n // which then re-zoomed to `h=5`, and any emit RGL fired (e.g.\n // collision compaction on a second card) ping-ponged forever\n // because the h field was effectively non-deterministic.\n //\n // Returning the layouts unchanged makes the round-trip identity:\n // whatever RGL hands us is what we send to the parent, and the\n // parent's next render feeds the exact same values back. RGL\n // settles in one cycle.\n const unZoomLayout = useCallback((internal: Layout | ResponsiveLayouts): ResponsiveLayouts => {\n const incoming: ResponsiveLayouts = Array.isArray(internal)\n ? ({ lg: internal, md: internal, sm: internal, xs: internal, xxs: internal } as ResponsiveLayouts)\n : (internal as ResponsiveLayouts);\n\n const result: ResponsiveLayouts = {} as ResponsiveLayouts;\n for (const bp of Object.keys(incoming) as BreakpointName[]) {\n const layout = incoming[bp];\n if (!layout) continue;\n // Spread each item so the parent gets a fresh object it can\n // mutate without aliasing back into our refs.\n result[bp] = layout.map((item) => ({ ...item }));\n }\n return result;\n }, []);\n\n\n // Translate config to layouts (memoized)\n // const translatedLayouts = useMemo(() => {\n // if (!config) return;\n\n // // If it's a simple GridConfig (has rows)\n // if (\"rows\" in config) {\n // const gridConfig = config as GridConfig;\n\n // if (responsive) {\n // // Auto-generate responsive layouts for all breakpoints\n // const translated = translateGridConfigAutoResponsive(\n // gridConfig,\n // cols,\n // autoResponsiveStrategy\n // );\n\n // return translated;\n // } else {\n // // Use same layout for all breakpoints (just scaled by cols)\n // return translateResponsiveGridConfig({ lg: gridConfig }, cols);\n // }\n // }\n\n // // Otherwise it's a ResponsiveGridConfig - use as-is\n // return translateResponsiveGridConfig(config as ResponsiveGridConfig, cols);\n // }, [config, cols, responsive, autoResponsiveStrategy]);\n\n if (responsive) {\n if (Array.isArray(layouts)) {\n layouts = {\n \"lg\": [...layouts] as Layout,\n \"md\": [...layouts] as Layout,\n \"sm\": [...layouts] as Layout,\n \"xs\": [...layouts] as Layout,\n \"xxs\": [...layouts] as Layout,\n } as ResponsiveLayouts;\n }\n }\n\n\n\n // Wrap the incoming layouts into a ResponsiveLayouts during render\n // (NOT inside a useEffect that calls setActiveLayouts). The\n // previous implementation lagged by one render: the effect set\n // `activeLayouts` *after* RGL had already rendered with the stale\n // value, so when the parent added a card RGL's children-prop saw\n // the new card while RGL's `propsLayout` was still the previous\n // render's. RGL's `synchronizeLayoutWithChildren` then created a\n // default placeholder ({w:1, h:1}) for the missing item and\n // emitted it back upward, which the parent wrote into the store,\n // which fed back as the new `propsLayout` — but by then RGL's\n // internal state was already (1,1), so it bounced to the new\n // (4,6) on the next render. Forever.\n //\n // Computing this with `useMemo` makes `activeLayouts` available\n // synchronously in the same render as the new `layouts` prop,\n // eliminating the one-render lag.\n const activeLayouts = useMemo<ResponsiveLayouts | null>(() => {\n if (!layouts) return null;\n if (Array.isArray(layouts)) {\n return {\n lg: layouts,\n md: layouts,\n sm: layouts,\n xs: layouts,\n xxs: layouts,\n } as ResponsiveLayouts;\n }\n return layouts as ResponsiveLayouts;\n }, [layouts]);\n\n // Sync the dedup baseline during render — refs can be safely\n // updated here (they don't trigger renders) and this guarantees\n // that when RGL fires `onLayoutChange` from one of its effects,\n // our handler compares against the SAME layout we just handed it,\n // not a stale value from the previous render.\n if (activeLayouts) {\n lastRGLLayoutRef.current = activeLayouts;\n }\n\n const handleDrop = (_layout: Layout, item?: LayoutItem, e?: Event) => {\n if (!onDrop) return;\n\n const dragEvent = e as unknown as React.DragEvent | undefined;\n const strData = dragEvent?.dataTransfer.getData(\"text/json\");\n let objData = null;\n if (strData) {\n objData = JSON.parse(strData);\n }\n onDrop(objData, item)\n }\n\n // Capture row-aware intent at the moment the resize finishes. RGL\n // fires `onResizeStop` BEFORE its `onLayoutChange`, so we record the\n // row's `y` and the new `h` here and apply the cascade to siblings\n // when `handleLayoutChange` runs immediately after.\n //\n // The modifier-key state is read directly off the native event RGL\n // hands us. If row-aware mode is configured as `defaultOn`, holding\n // the modifier *disables* the cascade for that drag; otherwise the\n // modifier is required to enable it. When the active policy doesn't\n // ask for row-aware on this drag, we leave `pendingRowAwareRef` null\n // and the layout flows through unchanged.\n // Handle layout change - only emit when layout actually changed.\n //\n // Comparison is done in *zoomed* (RGL-output) space, against the last\n // zoomed layouts we sent to or received from RGL. This is critical:\n // the previous implementation compared zoomed-vs-unzoomed, so equal\n // layouts always read as different and fed an upward emission on\n // every render — which, when the parent writes back into the store\n // and re-feeds `layouts`, closes a render loop.\n const handleLayoutChange = useCallback(\n (currentLayout: Layout, allLayouts?: RGLResponsiveLayouts<BreakpointName>) => {\n if (!onLayoutChange) return;\n\n // Row-aware cascade is applied INSIDE RGL via the\n // `rowAwareConstraint` above (pluggable constraints API), so\n // the layout RGL hands us here already has every row sibling\n // at the new height. Nothing extra to do at this boundary.\n const incoming: ResponsiveLayouts = (allLayouts ?? { lg: currentLayout }) as ResponsiveLayouts;\n\n const last = lastRGLLayoutRef.current;\n\n // Same-space comparison. If we have a baseline and every\n // breakpoint matches, this is a no-op — bail before touching\n // any state.\n if (last) {\n let hasChanged = false;\n for (const bp of Object.keys(incoming) as BreakpointName[]) {\n const newLayout = incoming[bp];\n const oldLayout = last[bp];\n if (!newLayout || !oldLayout) continue;\n if (!areLayoutsEqual(newLayout, oldLayout, config?.rowMultipler ?? 1, zoomLevel)) {\n hasChanged = true;\n break;\n }\n }\n if (!hasChanged) return;\n }\n\n // Update baseline in zoomed space *before* unzooming, so any\n // re-render triggered by the parent's response sees a\n // consistent ref.\n lastRGLLayoutRef.current = incoming;\n\n // Unzoom for the parent — restores the original `h` values\n // RGL scaled down for the visual zoom.\n const unzoomed = unZoomLayout(incoming);\n onLayoutChange(unzoomed[\"lg\"]!, unzoomed as ResponsiveLayouts);\n },\n [onLayoutChange, unZoomLayout, config?.rowMultipler, zoomLevel]\n );\n\n if (!activeLayouts) return null;\n\n for (const key of Object.keys(activeLayouts) as BreakpointName[]) {\n const bp = activeLayouts[key];\n\n if(bp) {\n bp.forEach(c => {\n c.isDraggable = !dragLocked;\n c.isResizable = !dragLocked;\n });\n }\n }\n\n\n return (\n <div\n ref={containerRef as React.RefObject<HTMLDivElement>}\n className={className}\n style={{ minHeight: \"100%\", paddingBottom: '200px', minWidth: '100%', paddingLeft: `${(1 - (zoomLevel)) / 2 * 100}%`, zoom: zoomLevel, overflow: 'auto' }}\n >\n {mounted &&\n responsive ?\n <Responsive\n onDrop={handleDrop}\n dropConfig={{\n enabled: !dragLocked,\n defaultItem: {\n h: 2,\n w: 2\n },\n }}\n dragConfig={{\n enabled: !dragLocked\n }}\n layouts={{ ...activeLayouts } as ResponsiveLayouts}\n breakpoints={breakpoints}\n cols={cols}\n rowHeight={rowHeight}\n maxRows={(maxRows ?? 24) * (config?.rowMultipler ?? 1)}\n width={newWidth}\n containerPadding={[0, 0]}\n\n onLayoutChange={handleLayoutChange}\n onResizeStop={handleResizeStopPassthrough}\n onDragStop={handleDragStopPassthrough}\n constraints={mergedConstraints}\n >\n {children}\n </Responsive>\n : <ReactGridLayout\n onDrop={handleDrop}\n dropConfig={{\n enabled: !dragLocked,\n defaultItem: {\n h: 1,\n w: 3\n },\n }}\n gridConfig={{ cols: 12, rowHeight: rowHeight, maxRows: 100, containerPadding: [0, 0], margin: [0, 2] }}\n dragConfig={{\n enabled: !dragLocked,\n bounded: true,\n }}\n\n layout={activeLayouts[\"lg\"] as Layout}\n autoSize={true}\n width={newWidth}\n onLayoutChange={handleLayoutChange}\n onResizeStop={handleResizeStopPassthrough}\n onDragStop={handleDragStopPassthrough}\n constraints={mergedConstraints}\n >\n {children}\n </ReactGridLayout>\n\n }\n </div >\n );\n};\n\nexport default GridLayout;\n"],"names":["_BiErrorBoundary","React","__publicField","error","info","_b","_a","prev","__name","BiErrorBoundary","GridCard","forwardRef","style","htmlStyle","className","onMouseDown","onMouseUp","onTouchEnd","children","variant","viewType","header","renderHeader","dragLocked","noBorder","color","zoomLevel","customColor","contentDisplay","contentStyle","contentClassName","isResizable","props","ref","theme","useTheme","isNaked","variantClass","hasHeader","colorClass","nakedClass","displayClass","HeaderIcon","cardStyle","safeAlpha","innerWidth","headerElement","jsxs","jsx","errorFallback","err","alpha","contentClasses","Fragment","ChartContextProvider","a","DEFAULT_BREAKPOINTS","DEFAULT_COLS","DEFAULT_ROW_HEIGHT","DEFAULT_ROW_MULTIPLIER","DEFAULT_MAX_ROWS","normaliseRowAwareResize","cfg","areLayoutsEqual","b","_rowMultipler","_zoomLevel","i","itemA","itemB","item","GridLayout","config","layouts","responsive","_autoResponsiveStrategy","rowHeight","rowMultiplier","breakpoints","cols","maxRows","onLayoutChange","onResizeStop","onDragStop","onDrop","manualWidth","rowAwareResize","handleResizeStopPassthrough","useCallback","layout","oldItem","newItem","handleDragStopPassthrough","rowAwareCfg","modifierHeldRef","useRef","useEffect","h","e","rowAwareConstraint","useMemo","w","_handle","context","modifierHeld","rowY","sibling","mergedConstraints","gridBounds","minMaxSize","width","containerRef","mounted","useContainerWidth","newWidth","lastRGLLayoutRef","unZoomLayout","internal","incoming","result","bp","activeLayouts","handleDrop","_layout","dragEvent","strData","objData","handleLayoutChange","currentLayout","allLayouts","last","hasChanged","newLayout","oldLayout","unzoomed","key","c","Responsive","ReactGridLayout"],"mappings":";;;;;;;;;;AAmBO,MAAMA,IAAN,MAAMA,UAAwBC,GAAM,UAAuC;AAAA,EAA3E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A;AAAA,UAGb,QAAQkG,EAAc;AAAA,UACtB,UAAU;AAAA,UACV,OAAOP;AAAA,UACP,gBAAgBa;AAAA,UAChB,cAAcxC;AAAA,UACd,YAAYK;AAAA,UACZ,aAAae;AAAA,UAEZ,UAAAzF;AAAA,QAAA;AAAA,MAAA;AAAA,IACL;AAAA,EAAA;AAKhB,GArYqD;"}
|
package/dist/{ScriptDashboardViewerVertical-Rr_4adpH.js → ScriptDashboardViewerVertical-B8Y5LoE4.js}
RENAMED
|
@@ -8,7 +8,7 @@ import { RebaseEdit as Be, Schedule as Re, ImportExportOutlined as Le, CloseOutl
|
|
|
8
8
|
import { Stack as k, Box as w, Typography as f, Button as ce, CircularProgress as te, Slider as ze, IconButton as we, Alert as se, Snackbar as Ce, useTheme as Oe, LinearProgress as Fe } from "@mui/material";
|
|
9
9
|
import * as je from "@mui/material/styles";
|
|
10
10
|
import { alpha as Ne } from "@mui/material/styles";
|
|
11
|
-
import { G as De, e as Ae } from "./GridLayout-
|
|
11
|
+
import { G as De, e as Ae } from "./GridLayout-BQcuPzng.js";
|
|
12
12
|
import { a as Se } from "./DashboardParametersContext-Clv--79U.js";
|
|
13
13
|
import { a as Ge } from "./ChartCardDefaultsContext-BDRsVljO.js";
|
|
14
14
|
import { isSubAgentTerminalStatus as ve } from "@aintela/chat/models";
|
|
@@ -52,7 +52,7 @@ async function ke() {
|
|
|
52
52
|
import("@mui/material"),
|
|
53
53
|
import("@mui/icons-material"),
|
|
54
54
|
import("recharts")
|
|
55
|
-
]), { getBiModuleSurface: a } = await import("./biModuleSurface-
|
|
55
|
+
]), { getBiModuleSurface: a } = await import("./biModuleSurface-zEeRrln5.js"), i = a(), d = {
|
|
56
56
|
react: Te,
|
|
57
57
|
"react/jsx-runtime": Ee,
|
|
58
58
|
"react-dom": _e,
|
|
@@ -576,29 +576,45 @@ const rt = /* @__PURE__ */ s(({ subAgent: e }) => {
|
|
|
576
576
|
/* @__PURE__ */ r(te, {}),
|
|
577
577
|
/* @__PURE__ */ r(f, { color: "text.secondary", children: "Loading dashboard..." })
|
|
578
578
|
] }) : null,
|
|
579
|
-
finalContent:
|
|
580
|
-
/*
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
579
|
+
finalContent: (
|
|
580
|
+
/*
|
|
581
|
+
`minHeight: '100%'`, and NO `alignContent`.
|
|
582
|
+
|
|
583
|
+
It was `minHeight: '100vh'` with `alignContent: 'center'`, which put a
|
|
584
|
+
short dashboard in the middle of a viewport-tall box: a large empty band
|
|
585
|
+
above the first card and a scrollbar for space nothing occupies. Two
|
|
586
|
+
separate faults. `100vh` ignores that the viewer is EMBEDDED — there is a
|
|
587
|
+
top bar above it and a prompt below — so it always overruns by that chrome.
|
|
588
|
+
And `alignContent` is what pushed the content down: it did nothing on a
|
|
589
|
+
block container until Chrome 123 shipped block-level box alignment, so the
|
|
590
|
+
declaration sat here inert for as long as it took browsers to catch up, and
|
|
591
|
+
then started centring. Measured in a panel with a definite height: 300px of
|
|
592
|
+
gap with either `100vh` or `100%` while `center` remained, 0 without it.
|
|
593
|
+
*/
|
|
594
|
+
/* @__PURE__ */ c("div", { id: "renderedDashboard", style: { paddingTop: 2, minHeight: "100%", overflow: "auto", width: "100%" }, children: [
|
|
595
|
+
/* @__PURE__ */ r(
|
|
596
|
+
Ae,
|
|
597
|
+
{
|
|
598
|
+
rowAwareResize: { defaultOn: !0 },
|
|
599
|
+
config: { rows: [] },
|
|
600
|
+
cols: { lg: 10, md: 8, sm: 4, xs: 4, xxs: 4 },
|
|
601
|
+
breakpoints: { lg: 920, md: 600, sm: 400, xs: 400, xxs: 0 },
|
|
602
|
+
zoomLevel: Z,
|
|
603
|
+
responsive: !1,
|
|
604
|
+
rowHeight: D ? 18 : 20,
|
|
605
|
+
dragLocked: e.dragLocked ?? !1,
|
|
606
|
+
rowMultiplier: 1,
|
|
607
|
+
maxRows: 200,
|
|
608
|
+
onResizeStop: q,
|
|
609
|
+
onDragStop: q,
|
|
610
|
+
manualWidth: H,
|
|
611
|
+
layouts: N,
|
|
612
|
+
children: U
|
|
613
|
+
}
|
|
614
|
+
),
|
|
615
|
+
n
|
|
616
|
+
] })
|
|
617
|
+
)
|
|
602
618
|
}
|
|
603
619
|
)
|
|
604
620
|
] }),
|
|
@@ -710,4 +726,4 @@ export {
|
|
|
710
726
|
vt as s,
|
|
711
727
|
Pe as u
|
|
712
728
|
};
|
|
713
|
-
//# sourceMappingURL=ScriptDashboardViewerVertical-
|
|
729
|
+
//# sourceMappingURL=ScriptDashboardViewerVertical-B8Y5LoE4.js.map
|