@dashspec/renderer 0.1.25 → 0.1.27
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/CHANGELOG.md +16 -0
- package/dist/{chunk-CAQDGXIF.js → chunk-4OUWLEBB.js} +2 -2
- package/dist/{chunk-CAQDGXIF.js.map → chunk-4OUWLEBB.js.map} +1 -1
- package/dist/{core-CckPNnHH.d.ts → core-BHAqRR6L.d.ts} +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/index.d.ts +30 -5
- package/dist/index.js +147 -5
- package/dist/index.js.map +1 -1
- package/docs/styling-hooks.md +19 -0
- package/package.json +1 -1
|
@@ -7553,7 +7553,7 @@ declare class TransformError extends Error {
|
|
|
7553
7553
|
declare function applyTransform(data: unknown, steps: readonly Step[], root: Scope, opts?: TransformOptions): unknown;
|
|
7554
7554
|
|
|
7555
7555
|
/** This package's version. A test keeps it equal to package.json's; bump both together. */
|
|
7556
|
-
declare const RENDERER_VERSION = "0.1.
|
|
7556
|
+
declare const RENDERER_VERSION = "0.1.27";
|
|
7557
7557
|
/**
|
|
7558
7558
|
* Whether `version` satisfies `range`. Supports what documents need: "1.2.3" (that or newer within the major, like
|
|
7559
7559
|
* "^"), ">=1.2", ">1.2.3", "<2", "<=2.1", "^1.2", "~1.2.3", and several of them separated by spaces (all must hold).
|
package/dist/core.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { f as ACTION_KINDS, g as ACTION_SCHEMAS, h as API_VERSION, i as Action, j as ActionRef, k as Auth, B as BREAKPOINTS, l as BUILT_IN_DATASOURCE_TYPES, C as Callback, m as Connection, n as ConnectionSpec, o as DATE_PRESETS, D as Dashboard, p as DashboardInput, q as DataBinding, r as DataError, s as DataErrorCode, t as Datasource, u as DateRange, v as Display, w as Drill, x as Duration, y as EventHandler, z as EventMap, F as Expression, G as ExpressionError, I as FnProp, a$ as Grid, K as Handler, L as HelperSettings, M as Helpers, H as HttpClient, O as HttpClientInternals, P as Id, J as JsonValue, Q as Layout, U as LayoutItem, V as LoadOptions, X as LoadResult, Y as Metadata, Z as MigrateResult, _ as MigrationError, $ as Modal, a0 as NamedAction, N as NetworkOptions, a1 as Node, a2 as Panel, a3 as PanelControl, a4 as PanelMigration, a6 as Problem, a7 as RENDERER_VERSION, a8 as RESERVED_STATE_KEYS, a9 as RefRoot, aa as Reference, ab as Requires, R as ResolvedRequest, ac as SCHEMA_URL, S as Scope, ad as Severity, ae as Spec, b0 as StatusTone, af as Template, a as TimeSettings, ag as TokenSource, ah as TransformError, ai as TransformOptions, aj as TransformStep, ak as Translations, al as VARIABLE_KINDS, am as ValidateOptions, an as ValidationResult, ao as Variable, ap as WidgetCheck, aq as WidgetMigrations, as as applyTransform, at as buildRequestUrl, au as buildUrl, av as builtInWidgetChecks, aw as collectReferences, ax as compile, ay as createHelpers, az as createHttpClient, aA as dashboardJsonSchema, aB as evaluate, aC as evaluateSafe, aD as expressionReferences, aE as graphqlData, aF as interpolate, aG as interpolateUrl, aH as isCallbackSource, aI as isSafeUrl, aJ as loadDocument, aK as mergeConnections, aL as migrateDocument, aM as parse, aN as parseDuration, aO as placeholders, aP as plantDate, aQ as plantDayStart, aR as resolve, aS as resolveBaseUrl, aT as resolveRequest, aU as safeLink, aV as satisfies, aW as scope, aX as stripStrings, aY as templateReferences, aZ as translator, a_ as validateDocument } from './core-
|
|
1
|
+
export { f as ACTION_KINDS, g as ACTION_SCHEMAS, h as API_VERSION, i as Action, j as ActionRef, k as Auth, B as BREAKPOINTS, l as BUILT_IN_DATASOURCE_TYPES, C as Callback, m as Connection, n as ConnectionSpec, o as DATE_PRESETS, D as Dashboard, p as DashboardInput, q as DataBinding, r as DataError, s as DataErrorCode, t as Datasource, u as DateRange, v as Display, w as Drill, x as Duration, y as EventHandler, z as EventMap, F as Expression, G as ExpressionError, I as FnProp, a$ as Grid, K as Handler, L as HelperSettings, M as Helpers, H as HttpClient, O as HttpClientInternals, P as Id, J as JsonValue, Q as Layout, U as LayoutItem, V as LoadOptions, X as LoadResult, Y as Metadata, Z as MigrateResult, _ as MigrationError, $ as Modal, a0 as NamedAction, N as NetworkOptions, a1 as Node, a2 as Panel, a3 as PanelControl, a4 as PanelMigration, a6 as Problem, a7 as RENDERER_VERSION, a8 as RESERVED_STATE_KEYS, a9 as RefRoot, aa as Reference, ab as Requires, R as ResolvedRequest, ac as SCHEMA_URL, S as Scope, ad as Severity, ae as Spec, b0 as StatusTone, af as Template, a as TimeSettings, ag as TokenSource, ah as TransformError, ai as TransformOptions, aj as TransformStep, ak as Translations, al as VARIABLE_KINDS, am as ValidateOptions, an as ValidationResult, ao as Variable, ap as WidgetCheck, aq as WidgetMigrations, as as applyTransform, at as buildRequestUrl, au as buildUrl, av as builtInWidgetChecks, aw as collectReferences, ax as compile, ay as createHelpers, az as createHttpClient, aA as dashboardJsonSchema, aB as evaluate, aC as evaluateSafe, aD as expressionReferences, aE as graphqlData, aF as interpolate, aG as interpolateUrl, aH as isCallbackSource, aI as isSafeUrl, aJ as loadDocument, aK as mergeConnections, aL as migrateDocument, aM as parse, aN as parseDuration, aO as placeholders, aP as plantDate, aQ as plantDayStart, aR as resolve, aS as resolveBaseUrl, aT as resolveRequest, aU as safeLink, aV as satisfies, aW as scope, aX as stripStrings, aY as templateReferences, aZ as translator, a_ as validateDocument } from './core-BHAqRR6L.js';
|
|
2
2
|
import 'zod';
|
|
3
3
|
import 'react';
|
package/dist/core.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AnyWidgetDefinition, T as TreeState, H as HttpClient, R as ResolvedRequest, a as TimeSettings, D as Dashboard, N as NetworkOptions, J as JsonValue, S as Scope, W as WidgetDefinition, b as SlotDefinition, c as SlotRenderOptions, d as WidgetMeta, e as WidgetProps } from './core-
|
|
2
|
-
export { f as ACTION_KINDS, g as ACTION_SCHEMAS, h as API_VERSION, i as Action, j as ActionRef, k as Auth, B as BREAKPOINTS, l as BUILT_IN_DATASOURCE_TYPES, C as Callback, m as Connection, n as ConnectionSpec, o as DATE_PRESETS, p as DashboardInput, q as DataBinding, r as DataError, s as DataErrorCode, t as Datasource, u as DateRange, v as Display, w as Drill, x as Duration, E as Emit, y as EventHandler, z as EventMap, F as Expression, G as ExpressionError, I as FnProp, K as Handler, L as HelperSettings, M as Helpers, O as HttpClientInternals, P as Id, Q as Layout, U as LayoutItem, V as LoadOptions, X as LoadResult, Y as Metadata, Z as MigrateResult, _ as MigrationError, $ as Modal, a0 as NamedAction, a1 as Node, a2 as Panel, a3 as PanelControl, a4 as PanelMigration, a5 as PanelState, a6 as Problem, a7 as RENDERER_VERSION, a8 as RESERVED_STATE_KEYS, a9 as RefRoot, aa as Reference, ab as Requires, ac as SCHEMA_URL, ad as Severity, ae as Spec, af as Template, ag as TokenSource, ah as TransformError, ai as TransformOptions, aj as TransformStep, ak as Translations, al as VARIABLE_KINDS, am as ValidateOptions, an as ValidationResult, ao as Variable, ap as WidgetCheck, aq as WidgetMigrations, ar as WidgetStore, as as applyTransform, at as buildRequestUrl, au as buildUrl, av as builtInWidgetChecks, aw as collectReferences, ax as compile, ay as createHelpers, az as createHttpClient, aA as dashboardJsonSchema, aB as evaluate, aC as evaluateSafe, aD as expressionReferences, aE as graphqlData, aF as interpolate, aG as interpolateUrl, aH as isCallbackSource, aI as isSafeUrl, aJ as loadDocument, aK as mergeConnections, aL as migrateDocument, aM as parse, aN as parseDuration, aO as placeholders, aP as plantDate, aQ as plantDayStart, aR as resolve, aS as resolveBaseUrl, aT as resolveRequest, aU as safeLink, aV as satisfies, aW as scope, aX as stripStrings, aY as templateReferences, aZ as translator, a_ as validateDocument } from './core-
|
|
1
|
+
import { A as AnyWidgetDefinition, T as TreeState, H as HttpClient, R as ResolvedRequest, a as TimeSettings, D as Dashboard, N as NetworkOptions, J as JsonValue, S as Scope, W as WidgetDefinition, b as SlotDefinition, c as SlotRenderOptions, d as WidgetMeta, e as WidgetProps } from './core-BHAqRR6L.js';
|
|
2
|
+
export { f as ACTION_KINDS, g as ACTION_SCHEMAS, h as API_VERSION, i as Action, j as ActionRef, k as Auth, B as BREAKPOINTS, l as BUILT_IN_DATASOURCE_TYPES, C as Callback, m as Connection, n as ConnectionSpec, o as DATE_PRESETS, p as DashboardInput, q as DataBinding, r as DataError, s as DataErrorCode, t as Datasource, u as DateRange, v as Display, w as Drill, x as Duration, E as Emit, y as EventHandler, z as EventMap, F as Expression, G as ExpressionError, I as FnProp, K as Handler, L as HelperSettings, M as Helpers, O as HttpClientInternals, P as Id, Q as Layout, U as LayoutItem, V as LoadOptions, X as LoadResult, Y as Metadata, Z as MigrateResult, _ as MigrationError, $ as Modal, a0 as NamedAction, a1 as Node, a2 as Panel, a3 as PanelControl, a4 as PanelMigration, a5 as PanelState, a6 as Problem, a7 as RENDERER_VERSION, a8 as RESERVED_STATE_KEYS, a9 as RefRoot, aa as Reference, ab as Requires, ac as SCHEMA_URL, ad as Severity, ae as Spec, af as Template, ag as TokenSource, ah as TransformError, ai as TransformOptions, aj as TransformStep, ak as Translations, al as VARIABLE_KINDS, am as ValidateOptions, an as ValidationResult, ao as Variable, ap as WidgetCheck, aq as WidgetMigrations, ar as WidgetStore, as as applyTransform, at as buildRequestUrl, au as buildUrl, av as builtInWidgetChecks, aw as collectReferences, ax as compile, ay as createHelpers, az as createHttpClient, aA as dashboardJsonSchema, aB as evaluate, aC as evaluateSafe, aD as expressionReferences, aE as graphqlData, aF as interpolate, aG as interpolateUrl, aH as isCallbackSource, aI as isSafeUrl, aJ as loadDocument, aK as mergeConnections, aL as migrateDocument, aM as parse, aN as parseDuration, aO as placeholders, aP as plantDate, aQ as plantDayStart, aR as resolve, aS as resolveBaseUrl, aT as resolveRequest, aU as safeLink, aV as satisfies, aW as scope, aX as stripStrings, aY as templateReferences, aZ as translator, a_ as validateDocument } from './core-BHAqRR6L.js';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { CSSProperties, ReactNode, ComponentType } from 'react';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
@@ -77,6 +77,28 @@ declare function DateControl({ label, value, min, max, stepper, locale, onChange
|
|
|
77
77
|
onChange: (v: string) => void;
|
|
78
78
|
}): react_jsx_runtime.JSX.Element;
|
|
79
79
|
|
|
80
|
+
/** The class names inside a panel a theme may target (docs/styling-hooks.md). Public: never renamed in a major. */
|
|
81
|
+
declare const DS_CLASSES: readonly ["ds-atom-divider", "ds-atom-icon", "ds-atom-progress", "ds-atom-text", "ds-atom-value", "ds-badge", "ds-button", "ds-card", "ds-card-body", "ds-card-fields", "ds-card-head", "ds-cards", "ds-cell", "ds-cell-empty", "ds-cell-filter", "ds-cell-list", "ds-cell-sub", "ds-cell-value", "ds-chart", "ds-chart-legend", "ds-chip", "ds-chip-count", "ds-container", "ds-content", "ds-crumbs", "ds-donut", "ds-dot", "ds-filter-missing", "ds-filter-row", "ds-filter-widget", "ds-imagemap", "ds-inline", "ds-kpi", "ds-kpi-delta", "ds-kpi-empty", "ds-kpi-foot", "ds-kpi-label", "ds-kpi-main", "ds-kpi-sub", "ds-kpi-unit", "ds-kpi-value", "ds-legend", "ds-link", "ds-live", "ds-loading", "ds-loading-text", "ds-marker", "ds-meter-head", "ds-meter-value", "ds-meters", "ds-page-gap", "ds-pager", "ds-pager-of", "ds-pager-range", "ds-pager-size", "ds-pages", "ds-panel", "ds-panel-addons", "ds-panel-body", "ds-panel-foot", "ds-panel-head", "ds-panel-meta", "ds-panel-title", "ds-panel-toolbar", "ds-panel-tools", "ds-part-selected", "ds-pill", "ds-plain", "ds-progress", "ds-repeater", "ds-repeater-item", "ds-row-detail", "ds-search", "ds-segbar", "ds-skeleton", "ds-slot-hint", "ds-sort", "ds-spacer", "ds-stage-dot", "ds-stages", "ds-state", "ds-status", "ds-status-label", "ds-swatch", "ds-swatch-line", "ds-table", "ds-table-busy", "ds-table-count", "ds-table-scroll", "ds-table-tools", "ds-table-wrap", "ds-tabs", "ds-tabs-bar", "ds-tabs-panel", "ds-tile", "ds-tile-caption", "ds-tile-label", "ds-tile-main", "ds-tile-value", "ds-tiles", "ds-timeline", "ds-timeline-axis", "ds-timeline-bar", "ds-timeline-lane", "ds-timeline-name"];
|
|
82
|
+
type DsClass = (typeof DS_CLASSES)[number];
|
|
83
|
+
type Pseudo = "" | ":hover" | ":focus-visible" | ":first-child" | ":last-child" | "::before" | "::after";
|
|
84
|
+
/** A selector inside the panel: `&` is the panel itself. Your editor suggests every `& .ds-…` hook. */
|
|
85
|
+
type DsSelector = "&" | `&${Pseudo}` | `& .${DsClass}${Pseudo}` | `&:hover .${DsClass}`;
|
|
86
|
+
/**
|
|
87
|
+
* CSS as an object: `{ "& .ds-kpi-label": { textTransform: "uppercase" } }`. Keys are selectors (suggested from
|
|
88
|
+
* the documented hooks; any other selector still works), values are React-style CSS properties (camelCase; numbers
|
|
89
|
+
* are px where CSS needs a unit) or custom properties (`"--ds-space-md": "8px"`).
|
|
90
|
+
*/
|
|
91
|
+
type CssRules = {
|
|
92
|
+
[K in DsSelector]?: CssDeclarations;
|
|
93
|
+
} & {
|
|
94
|
+
[selector: string]: CssDeclarations;
|
|
95
|
+
};
|
|
96
|
+
type CssDeclarations = CSSProperties & {
|
|
97
|
+
[custom: `--${string}`]: string | number;
|
|
98
|
+
};
|
|
99
|
+
/** Turns a `CssRules` object into a CSS string with `&` selectors; unsafe values are dropped. */
|
|
100
|
+
declare function cssRulesToString(rules: CssRules, unsafe: RegExp): string;
|
|
101
|
+
|
|
80
102
|
/**
|
|
81
103
|
* The DashSpec token contract. Widgets read only these tokens, through `--ds-*` CSS variables,
|
|
82
104
|
* never a UI library's theme. Colours change per mode; everything else is shared by both modes.
|
|
@@ -226,8 +248,11 @@ interface ScaleTokens {
|
|
|
226
248
|
interface WidgetTheme {
|
|
227
249
|
/** CSS custom properties on every panel of this kind: any `--ds-*` token, or your own variables. */
|
|
228
250
|
vars?: Record<string, string>;
|
|
229
|
-
/**
|
|
230
|
-
|
|
251
|
+
/**
|
|
252
|
+
* Extra CSS for panels of this kind; `&` is the panel. A string (`"& .ds-kpi-label { text-transform: uppercase; }"`)
|
|
253
|
+
* or an object with suggested selectors (`{ "& .ds-kpi-label": { textTransform: "uppercase" } }`).
|
|
254
|
+
*/
|
|
255
|
+
css?: string | CssRules;
|
|
231
256
|
/** Anything else your own widget reads: `useThemeTokens()?.theme.widgets?.["acme.Gauge"]?.settings`. */
|
|
232
257
|
settings?: Record<string, unknown>;
|
|
233
258
|
}
|
|
@@ -1509,4 +1534,4 @@ declare function lazyWidget<S extends z.ZodTypeAny>(def: Omit<WidgetDefinition<S
|
|
|
1509
1534
|
fallback?: ReactNode;
|
|
1510
1535
|
}): WidgetDefinition<S>;
|
|
1511
1536
|
|
|
1512
|
-
export { AnyWidgetDefinition, BAR, BAR_ICONS, type Breakpoint, CallbackApi, type ColorTokens, ControlField, type DashEvent, DashSpecProvider, type DashSpecSettings, Dashboard, DashboardContext, type DashboardHandle, DashboardRenderer, type DashboardRendererProps, type DashboardRuntime, type DatasourceType, DateControl, DateRangeControl, type DeepPartial, type DesignSystem, FilterBar, Grid, type GridChangeItem, type HostHooks, HttpClient, JsonValue, type LayoutSpec, ModalHost, MultiSelectControl, NetworkOptions, type NodeScope, type Option, PanelFrame, RENDERER_CSS, ResolvedRequest, type RuntimeOptions, type ScaleTokens, Scope, ScriptMode, ScriptRunner, SelectControl, Slot, SlotDefinition, type SourceState, type StatusColors, type StatusTone, type Theme, ThemeContext, type ThemeInput, type ThemeMode, ThemeScope, type ThemeScopeProps, TimeSettings, type Tree, type TypeRole, type UIChipsProps, type UIComponents, type UICustomFilterProps, type UIDateProps, type UIDateRangeProps, type UIFilterBarProps, type UIFilterDef, type UIMultiSelectProps, type UISearchProps, type UISelectProps, type UIStateProps, type UIToggleProps, WidgetDefinition, WidgetMeta, WidgetProps, type WidgetRegistry, type WidgetTheme, type WrapOptions, builtInWidgets, checkWidget, combineDesignSystems, createDashboardRuntime, createTheme, createWidgetRegistry, defaultTheme, defineDesignSystem, defineWidget, echartsTheme, layoutsForView, lazyWidget, mergeDeep, panelRows, presetRange, resolveMode, themeCssVars, themeStylesheet, timeSettingsFor, useDashSpecSettings, useDashboard, useDashboardActions, useDashboardState, useNodeScope, useThemeTokens, useTree, widgetChecks, widgetThemeCss, wrapComponent };
|
|
1537
|
+
export { AnyWidgetDefinition, BAR, BAR_ICONS, type Breakpoint, CallbackApi, type ColorTokens, ControlField, type CssDeclarations, type CssRules, DS_CLASSES, type DashEvent, DashSpecProvider, type DashSpecSettings, Dashboard, DashboardContext, type DashboardHandle, DashboardRenderer, type DashboardRendererProps, type DashboardRuntime, type DatasourceType, DateControl, DateRangeControl, type DeepPartial, type DesignSystem, type DsClass, type DsSelector, FilterBar, Grid, type GridChangeItem, type HostHooks, HttpClient, JsonValue, type LayoutSpec, ModalHost, MultiSelectControl, NetworkOptions, type NodeScope, type Option, PanelFrame, RENDERER_CSS, ResolvedRequest, type RuntimeOptions, type ScaleTokens, Scope, ScriptMode, ScriptRunner, SelectControl, Slot, SlotDefinition, type SourceState, type StatusColors, type StatusTone, type Theme, ThemeContext, type ThemeInput, type ThemeMode, ThemeScope, type ThemeScopeProps, TimeSettings, type Tree, type TypeRole, type UIChipsProps, type UIComponents, type UICustomFilterProps, type UIDateProps, type UIDateRangeProps, type UIFilterBarProps, type UIFilterDef, type UIMultiSelectProps, type UISearchProps, type UISelectProps, type UIStateProps, type UIToggleProps, WidgetDefinition, WidgetMeta, WidgetProps, type WidgetRegistry, type WidgetTheme, type WrapOptions, builtInWidgets, checkWidget, combineDesignSystems, createDashboardRuntime, createTheme, createWidgetRegistry, cssRulesToString, defaultTheme, defineDesignSystem, defineWidget, echartsTheme, layoutsForView, lazyWidget, mergeDeep, panelRows, presetRange, resolveMode, themeCssVars, themeStylesheet, timeSettingsFor, useDashSpecSettings, useDashboard, useDashboardActions, useDashboardState, useNodeScope, useThemeTokens, useTree, widgetChecks, widgetThemeCss, wrapComponent };
|
package/dist/index.js
CHANGED
|
@@ -116,7 +116,7 @@ import {
|
|
|
116
116
|
translator,
|
|
117
117
|
validateDocument,
|
|
118
118
|
widgetChecks
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-4OUWLEBB.js";
|
|
120
120
|
import {
|
|
121
121
|
createStateProxy,
|
|
122
122
|
getPath,
|
|
@@ -1631,6 +1631,142 @@ function resolveMode(theme, prefersDark) {
|
|
|
1631
1631
|
return theme.mode;
|
|
1632
1632
|
}
|
|
1633
1633
|
|
|
1634
|
+
// src/theme/cssHooks.ts
|
|
1635
|
+
var DS_CLASSES = [
|
|
1636
|
+
"ds-atom-divider",
|
|
1637
|
+
"ds-atom-icon",
|
|
1638
|
+
"ds-atom-progress",
|
|
1639
|
+
"ds-atom-text",
|
|
1640
|
+
"ds-atom-value",
|
|
1641
|
+
"ds-badge",
|
|
1642
|
+
"ds-button",
|
|
1643
|
+
"ds-card",
|
|
1644
|
+
"ds-card-body",
|
|
1645
|
+
"ds-card-fields",
|
|
1646
|
+
"ds-card-head",
|
|
1647
|
+
"ds-cards",
|
|
1648
|
+
"ds-cell",
|
|
1649
|
+
"ds-cell-empty",
|
|
1650
|
+
"ds-cell-filter",
|
|
1651
|
+
"ds-cell-list",
|
|
1652
|
+
"ds-cell-sub",
|
|
1653
|
+
"ds-cell-value",
|
|
1654
|
+
"ds-chart",
|
|
1655
|
+
"ds-chart-legend",
|
|
1656
|
+
"ds-chip",
|
|
1657
|
+
"ds-chip-count",
|
|
1658
|
+
"ds-container",
|
|
1659
|
+
"ds-content",
|
|
1660
|
+
"ds-crumbs",
|
|
1661
|
+
"ds-donut",
|
|
1662
|
+
"ds-dot",
|
|
1663
|
+
"ds-filter-missing",
|
|
1664
|
+
"ds-filter-row",
|
|
1665
|
+
"ds-filter-widget",
|
|
1666
|
+
"ds-imagemap",
|
|
1667
|
+
"ds-inline",
|
|
1668
|
+
"ds-kpi",
|
|
1669
|
+
"ds-kpi-delta",
|
|
1670
|
+
"ds-kpi-empty",
|
|
1671
|
+
"ds-kpi-foot",
|
|
1672
|
+
"ds-kpi-label",
|
|
1673
|
+
"ds-kpi-main",
|
|
1674
|
+
"ds-kpi-sub",
|
|
1675
|
+
"ds-kpi-unit",
|
|
1676
|
+
"ds-kpi-value",
|
|
1677
|
+
"ds-legend",
|
|
1678
|
+
"ds-link",
|
|
1679
|
+
"ds-live",
|
|
1680
|
+
"ds-loading",
|
|
1681
|
+
"ds-loading-text",
|
|
1682
|
+
"ds-marker",
|
|
1683
|
+
"ds-meter-head",
|
|
1684
|
+
"ds-meter-value",
|
|
1685
|
+
"ds-meters",
|
|
1686
|
+
"ds-page-gap",
|
|
1687
|
+
"ds-pager",
|
|
1688
|
+
"ds-pager-of",
|
|
1689
|
+
"ds-pager-range",
|
|
1690
|
+
"ds-pager-size",
|
|
1691
|
+
"ds-pages",
|
|
1692
|
+
"ds-panel",
|
|
1693
|
+
"ds-panel-addons",
|
|
1694
|
+
"ds-panel-body",
|
|
1695
|
+
"ds-panel-foot",
|
|
1696
|
+
"ds-panel-head",
|
|
1697
|
+
"ds-panel-meta",
|
|
1698
|
+
"ds-panel-title",
|
|
1699
|
+
"ds-panel-toolbar",
|
|
1700
|
+
"ds-panel-tools",
|
|
1701
|
+
"ds-part-selected",
|
|
1702
|
+
"ds-pill",
|
|
1703
|
+
"ds-plain",
|
|
1704
|
+
"ds-progress",
|
|
1705
|
+
"ds-repeater",
|
|
1706
|
+
"ds-repeater-item",
|
|
1707
|
+
"ds-row-detail",
|
|
1708
|
+
"ds-search",
|
|
1709
|
+
"ds-segbar",
|
|
1710
|
+
"ds-skeleton",
|
|
1711
|
+
"ds-slot-hint",
|
|
1712
|
+
"ds-sort",
|
|
1713
|
+
"ds-spacer",
|
|
1714
|
+
"ds-stage-dot",
|
|
1715
|
+
"ds-stages",
|
|
1716
|
+
"ds-state",
|
|
1717
|
+
"ds-status",
|
|
1718
|
+
"ds-status-label",
|
|
1719
|
+
"ds-swatch",
|
|
1720
|
+
"ds-swatch-line",
|
|
1721
|
+
"ds-table",
|
|
1722
|
+
"ds-table-busy",
|
|
1723
|
+
"ds-table-count",
|
|
1724
|
+
"ds-table-scroll",
|
|
1725
|
+
"ds-table-tools",
|
|
1726
|
+
"ds-table-wrap",
|
|
1727
|
+
"ds-tabs",
|
|
1728
|
+
"ds-tabs-bar",
|
|
1729
|
+
"ds-tabs-panel",
|
|
1730
|
+
"ds-tile",
|
|
1731
|
+
"ds-tile-caption",
|
|
1732
|
+
"ds-tile-label",
|
|
1733
|
+
"ds-tile-main",
|
|
1734
|
+
"ds-tile-value",
|
|
1735
|
+
"ds-tiles",
|
|
1736
|
+
"ds-timeline",
|
|
1737
|
+
"ds-timeline-axis",
|
|
1738
|
+
"ds-timeline-bar",
|
|
1739
|
+
"ds-timeline-lane",
|
|
1740
|
+
"ds-timeline-name"
|
|
1741
|
+
];
|
|
1742
|
+
var UNITLESS = /* @__PURE__ */ new Set([
|
|
1743
|
+
"opacity",
|
|
1744
|
+
"zIndex",
|
|
1745
|
+
"fontWeight",
|
|
1746
|
+
"lineHeight",
|
|
1747
|
+
"flex",
|
|
1748
|
+
"flexGrow",
|
|
1749
|
+
"flexShrink",
|
|
1750
|
+
"order",
|
|
1751
|
+
"zoom",
|
|
1752
|
+
"gridRow",
|
|
1753
|
+
"gridColumn"
|
|
1754
|
+
]);
|
|
1755
|
+
function cssRulesToString(rules, unsafe) {
|
|
1756
|
+
const out = [];
|
|
1757
|
+
for (const [selector, decl] of Object.entries(rules)) {
|
|
1758
|
+
if (!decl || typeof decl !== "object" || /[{};<>]/.test(selector)) continue;
|
|
1759
|
+
const sel = selector.includes("&") ? selector : `& ${selector}`;
|
|
1760
|
+
const body = Object.entries(decl).filter(([, v]) => (typeof v === "string" || typeof v === "number") && !unsafe.test(String(v))).map(([k, v]) => {
|
|
1761
|
+
const prop = k.startsWith("--") ? k : k.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`);
|
|
1762
|
+
const val = typeof v === "number" && v !== 0 && !k.startsWith("--") && !UNITLESS.has(k) ? `${v}px` : String(v);
|
|
1763
|
+
return `${prop}: ${val};`;
|
|
1764
|
+
}).join(" ");
|
|
1765
|
+
if (body) out.push(`${sel} { ${body} }`);
|
|
1766
|
+
}
|
|
1767
|
+
return out.join("\n");
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1634
1770
|
// src/theme/cssVars.ts
|
|
1635
1771
|
var kebab = (s) => s.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`);
|
|
1636
1772
|
function flatten(prefix, value, out, unit = "") {
|
|
@@ -1720,8 +1856,9 @@ function widgetThemeCss(theme, scope2) {
|
|
|
1720
1856
|
const sel = `${scope2} .ds-panel[data-kind="${m[1]}"]${m[2] ? `[data-variant="${m[2]}"]` : ""}`;
|
|
1721
1857
|
const vars = Object.entries(w.vars ?? {}).filter(([k, v]) => SAFE_NAME.test(k) && !UNSAFE_CSS.test(String(v)));
|
|
1722
1858
|
if (vars.length) out.push(`${sel} { ${vars.map(([k, v]) => `${k}: ${v};`).join(" ")} }`);
|
|
1723
|
-
|
|
1724
|
-
|
|
1859
|
+
const css = typeof w.css === "object" && w.css !== null ? cssRulesToString(w.css, UNSAFE_CSS) : w.css;
|
|
1860
|
+
if (typeof css === "string" && css && !/<\/?\s*style/i.test(css))
|
|
1861
|
+
out.push(css.includes("&") ? css.replaceAll("&", sel) : `${sel} { ${css} }`);
|
|
1725
1862
|
}
|
|
1726
1863
|
return out.join("\n");
|
|
1727
1864
|
}
|
|
@@ -5620,11 +5757,14 @@ function EChart({
|
|
|
5620
5757
|
const cats = JSON.stringify(axisCategories(merged));
|
|
5621
5758
|
const replay = lastCats.current !== void 0 && cats !== lastCats.current && !reduce;
|
|
5622
5759
|
lastCats.current = cats;
|
|
5760
|
+
const replace = {
|
|
5761
|
+
replaceMerge: ["series", "xAxis", "yAxis", "dataset", "visualMap", "dataZoom"].filter((k) => k in merged)
|
|
5762
|
+
};
|
|
5623
5763
|
if (!replay) {
|
|
5624
|
-
c.setOption(merged, {
|
|
5764
|
+
c.setOption(merged, { ...replace, lazyUpdate: true });
|
|
5625
5765
|
return;
|
|
5626
5766
|
}
|
|
5627
|
-
c.setOption(atZero(merged),
|
|
5767
|
+
c.setOption(atZero(merged), replace);
|
|
5628
5768
|
const raf = requestAnimationFrame(() => {
|
|
5629
5769
|
if (!c.isDisposed()) c.setOption(merged, { notMerge: false, lazyUpdate: true });
|
|
5630
5770
|
});
|
|
@@ -8149,6 +8289,7 @@ export {
|
|
|
8149
8289
|
Connection,
|
|
8150
8290
|
ControlField,
|
|
8151
8291
|
DATE_PRESETS,
|
|
8292
|
+
DS_CLASSES,
|
|
8152
8293
|
DashSpecProvider,
|
|
8153
8294
|
Dashboard,
|
|
8154
8295
|
DashboardContext,
|
|
@@ -8213,6 +8354,7 @@ export {
|
|
|
8213
8354
|
createHttpClient,
|
|
8214
8355
|
createTheme,
|
|
8215
8356
|
createWidgetRegistry,
|
|
8357
|
+
cssRulesToString,
|
|
8216
8358
|
dashboardJsonSchema,
|
|
8217
8359
|
defaultTheme,
|
|
8218
8360
|
defineDesignSystem,
|