@svgrid/grid-wc 3.0.34 → 3.0.36

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.
@@ -7165,7 +7165,7 @@ function Ia(e, t) {
7165
7165
  host: t.$$host
7166
7166
  })), s();
7167
7167
  }
7168
- customElements.define("sv-chart", ne(Ia, {
7168
+ typeof customElements < "u" && customElements.define("sv-chart", ne(Ia, {
7169
7169
  spec: { type: "Object" },
7170
7170
  legend: {
7171
7171
  attribute: "legend",
@@ -1,3 +1,4 @@
1
+ import type { CSSProperties } from 'react';
1
2
  import '@svgrid/grid-wc/chart';
2
3
  export interface SvChartProps {
3
4
  /** `property only` - ChartSpec */
@@ -84,7 +85,7 @@ export interface SvChartProps {
84
85
  onDrawingsChange?: (detail: unknown) => void;
85
86
  /** Forwarded to the host element. */
86
87
  className?: string;
87
- style?: Record<string, string | number>;
88
+ style?: CSSProperties;
88
89
  }
89
90
  /** The host element, reachable through a ref. */
90
91
  export interface SvChartHandle {
@@ -1,7 +1,7 @@
1
- import { createElement as e, forwardRef as t, useEffect as n, useImperativeHandle as r, useRef as i } from "react";
1
+ import { createElement as e, forwardRef as t, useEffect as n, useImperativeHandle as r, useLayoutEffect as i, useRef as a } from "react";
2
2
  import "@svgrid/grid-wc/chart";
3
3
  //#region src/react/chart.tsx
4
- var a = /* @__PURE__ */ "spec.legend.interactive.dataLabels.formatValue.tooltipFormat.tooltipMode.tooltipPosition.tooltipSticky.zoomable.zoom.rangePresets.syncGroup.contextMenu.animate.live.drillable.drillPath.selectable.selected.hoverHighlight.announce.describe.localeText.crosshairLabels.brush.brushHeight.toolbar.width.height.autosize.annotatable.drawable".split("."), o = [
4
+ var o = typeof window > "u" ? n : i, s = /* @__PURE__ */ "spec.legend.interactive.dataLabels.formatValue.tooltipFormat.tooltipMode.tooltipPosition.tooltipSticky.zoomable.zoom.rangePresets.syncGroup.contextMenu.animate.live.drillable.drillPath.selectable.selected.hoverHighlight.announce.describe.localeText.crosshairLabels.brush.brushHeight.toolbar.width.height.autosize.annotatable.drawable".split("."), c = [
5
5
  ["onSelect", "select"],
6
6
  ["onDrill", "drill"],
7
7
  ["onZoom", "zoom"],
@@ -10,23 +10,23 @@ var a = /* @__PURE__ */ "spec.legend.interactive.dataLabels.formatValue.tooltipF
10
10
  ["onAnnotate", "annotate"],
11
11
  ["onAnnotationRemove", "annotationremove"],
12
12
  ["onDrawingsChange", "drawingschange"]
13
- ], s = t(function(t, s) {
14
- let c = i(null), { className: l, style: u, ...d } = t, f = i({});
15
- n(() => {
16
- let e = c.current;
17
- if (e) for (let t of a) {
18
- let n = d[t];
19
- n === void 0 || Object.is(f.current[t], n) || (f.current[t] = n, e[t] = n);
13
+ ], l = t(function(t, i) {
14
+ let l = a(null), { className: u, style: d, ...f } = t, p = a({});
15
+ o(() => {
16
+ let e = l.current;
17
+ if (e) for (let t of s) {
18
+ let n = f[t];
19
+ n === void 0 || Object.is(p.current[t], n) || (p.current[t] = n, e[t] = n);
20
20
  }
21
21
  });
22
- let p = i(d);
23
- return p.current = d, n(() => {
24
- let e = c.current;
22
+ let m = a(f);
23
+ return m.current = f, n(() => {
24
+ let e = l.current;
25
25
  if (!e) return;
26
26
  let t = [];
27
- for (let [n, r] of o) {
27
+ for (let [n, r] of c) {
28
28
  let i = (e) => {
29
- let t = p.current[n];
29
+ let t = m.current[n];
30
30
  t?.(e.detail);
31
31
  };
32
32
  e.addEventListener(r, i), t.push([r, i]);
@@ -34,16 +34,16 @@ var a = /* @__PURE__ */ "spec.legend.interactive.dataLabels.formatValue.tooltipF
34
34
  return () => {
35
35
  for (let [n, r] of t) e.removeEventListener(n, r);
36
36
  };
37
- }, []), r(s, () => ({ get element() {
38
- return c.current;
37
+ }, []), r(i, () => ({ get element() {
38
+ return l.current;
39
39
  } }), []), e("sv-chart", {
40
- ref: c,
41
- class: l,
40
+ ref: l,
41
+ class: u,
42
42
  style: {
43
43
  display: "block",
44
- ...u
44
+ ...d
45
45
  }
46
46
  });
47
47
  });
48
48
  //#endregion
49
- export { s as SvChart, s as default };
49
+ export { l as SvChart, l as default };
@@ -1,3 +1,4 @@
1
+ import type { CSSProperties } from 'react';
1
2
  import '@svgrid/grid-wc';
2
3
  export interface SvGridProps {
3
4
  /** `property only` - ReadonlyArray<TData> */
@@ -401,7 +402,7 @@ export interface SvGridProps {
401
402
  shadow?: boolean;
402
403
  /** Forwarded to the host element. */
403
404
  className?: string;
404
- style?: Record<string, string | number>;
405
+ style?: CSSProperties;
405
406
  }
406
407
  /** The grid's imperative api, reachable through a ref. */
407
408
  export interface SvGridHandle {
@@ -1,7 +1,7 @@
1
- import { createElement as e, forwardRef as t, useEffect as n, useImperativeHandle as r, useRef as i } from "react";
1
+ import { createElement as e, forwardRef as t, useEffect as n, useImperativeHandle as r, useLayoutEffect as i, useRef as a } from "react";
2
2
  import "@svgrid/grid-wc";
3
3
  //#region src/react/index.tsx
4
- var a = /* @__PURE__ */ "data.columns.board.gallery.scheduler.gantt.chart.pivot.pivotMode.contextMenu.selectionBar.rowAdder.rowColor.columnAdder.fieldMenu.expandRows.pinSplitter.primaryField.features.sortable.filterable.editable.treeData.groupable.groupBy.expanded.groupFooters.grandTotalRow.groupDisplayMode.autoGroupColumnHeader.autoGroupColumnWidth.pageable.loading.loadingOverlay.loadingSkeletonRows.error.emptyMessage.localization.showGlobalFilter.showColumnFilters.filterMode.showGroupingControls.showRowSelection.showPagination.pageSize.pageSizeOptions.paginationPosition.externalPagination.rowCount.pageIndex.virtualization.rowHeight.autoRowHeight.rowResize.headerHeight.overscan.containerHeight.columnVirtualization.columnOverscan.columnWidth.initialColumnPinning.fitColumns.columnResize.responsive.showFilterMenu.showFilterRow.enableCellSelection.moveCells.enableRowHover.copyHeadersToClipboard.processCellForFill.processCellForClipboard.includeCollapsedRows.clipboardHtml.processCellFromClipboard.enableInlineEditing.editOnSecondClick.fullRowEditing.enableRowSummaries.summary.statusBar.toolPanel.charting.columnMenuTabs.toolPanelDefaultOpen.toolPanelDefaultTab.selectionMode.showRowNumbers.zebraRows.rowNumberWidth.externalSort.initialSorting.initialAdvancedFilter.externalFilter.getRowId.rowClass.notes.editableComments.conditionalFormats.conditionalStatScope.rowPlaceholder.rowModel.pivotResultColumns.rowSelectionModel.isDetailRow.detailRowHeight.showDetailToggle.isDetailOpen.hasDetail.serverGroup.serverFilterValues.pinnedTopRows.frozenRows.stickyGroupRows.mergedCells.rowLayout.pinnedBottomRows.enableColumnReorder.columnOrder.inferColumnTypes.rowDragManaged.rowDragGroup.alignedGridGroup.filterLocale".split("."), o = [
4
+ var o = typeof window > "u" ? n : i, s = /* @__PURE__ */ "data.columns.board.gallery.scheduler.gantt.chart.pivot.pivotMode.contextMenu.selectionBar.rowAdder.rowColor.columnAdder.fieldMenu.expandRows.pinSplitter.primaryField.features.sortable.filterable.editable.treeData.groupable.groupBy.expanded.groupFooters.grandTotalRow.groupDisplayMode.autoGroupColumnHeader.autoGroupColumnWidth.pageable.loading.loadingOverlay.loadingSkeletonRows.error.emptyMessage.localization.showGlobalFilter.showColumnFilters.filterMode.showGroupingControls.showRowSelection.showPagination.pageSize.pageSizeOptions.paginationPosition.externalPagination.rowCount.pageIndex.virtualization.rowHeight.autoRowHeight.rowResize.headerHeight.overscan.containerHeight.columnVirtualization.columnOverscan.columnWidth.initialColumnPinning.fitColumns.columnResize.responsive.showFilterMenu.showFilterRow.enableCellSelection.moveCells.enableRowHover.copyHeadersToClipboard.processCellForFill.processCellForClipboard.includeCollapsedRows.clipboardHtml.processCellFromClipboard.enableInlineEditing.editOnSecondClick.fullRowEditing.enableRowSummaries.summary.statusBar.toolPanel.charting.columnMenuTabs.toolPanelDefaultOpen.toolPanelDefaultTab.selectionMode.showRowNumbers.zebraRows.rowNumberWidth.externalSort.initialSorting.initialAdvancedFilter.externalFilter.getRowId.rowClass.notes.editableComments.conditionalFormats.conditionalStatScope.rowPlaceholder.rowModel.pivotResultColumns.rowSelectionModel.isDetailRow.detailRowHeight.showDetailToggle.isDetailOpen.hasDetail.serverGroup.serverFilterValues.pinnedTopRows.frozenRows.stickyGroupRows.mergedCells.rowLayout.pinnedBottomRows.enableColumnReorder.columnOrder.inferColumnTypes.rowDragManaged.rowDragGroup.alignedGridGroup.filterLocale".split("."), c = [
5
5
  ["onPivotModeChange", "pivotmodechange"],
6
6
  ["onRowAdd", "rowadd"],
7
7
  ["onColumnAdd", "columnadd"],
@@ -35,51 +35,51 @@ var a = /* @__PURE__ */ "data.columns.board.gallery.scheduler.gantt.chart.pivot.
35
35
  ["onRowDragEnd", "rowdragend"],
36
36
  ["onRowDrop", "rowdrop"],
37
37
  ["onSelectionchange", "selectionchange"]
38
- ], s = t(function(t, s) {
39
- let c = i(null), { shadow: l, className: u, style: d, ...f } = t;
38
+ ], l = t(function(t, i) {
39
+ let l = a(null), { shadow: u, className: d, style: f, ...p } = t;
40
40
  n(() => {
41
- l && import("@svgrid/grid-wc/shadow");
42
- }, [l]);
43
- let p = i({});
44
- n(() => {
45
- let e = c.current;
46
- if (e) for (let t of a) {
47
- let n = f[t];
48
- n === void 0 || Object.is(p.current[t], n) || (p.current[t] = n, e[t] = n);
41
+ u && import("@svgrid/grid-wc/shadow");
42
+ }, [u]);
43
+ let m = a({});
44
+ o(() => {
45
+ let e = l.current;
46
+ if (e) for (let t of s) {
47
+ let n = p[t];
48
+ n === void 0 || Object.is(m.current[t], n) || (m.current[t] = n, e[t] = n);
49
49
  }
50
50
  });
51
- let m = i(f);
52
- return m.current = f, n(() => {
53
- let e = c.current;
51
+ let h = a(p);
52
+ return h.current = p, n(() => {
53
+ let e = l.current;
54
54
  if (!e) return;
55
55
  let t = [];
56
- for (let [n, r] of o) {
56
+ for (let [n, r] of c) {
57
57
  let i = (e) => {
58
- let t = m.current[n];
58
+ let t = h.current[n];
59
59
  t?.(e.detail);
60
60
  };
61
61
  e.addEventListener(r, i), t.push([r, i]);
62
62
  }
63
- let n = m.current.onApiReady, r = e.api;
63
+ let n = h.current.onApiReady, r = e.api;
64
64
  return n && r != null && n(r), () => {
65
65
  for (let [n, r] of t) e.removeEventListener(n, r);
66
66
  };
67
- }, []), r(s, () => ({
67
+ }, []), r(i, () => ({
68
68
  get element() {
69
- return c.current;
69
+ return l.current;
70
70
  },
71
71
  get api() {
72
- return c.current?.api ?? null;
72
+ return l.current?.api ?? null;
73
73
  }
74
- }), []), e(l ? "sv-grid-shadow" : "sv-grid", {
75
- ref: c,
76
- class: u,
74
+ }), []), e(u ? "sv-grid-shadow" : "sv-grid", {
75
+ ref: l,
76
+ class: d,
77
77
  style: {
78
78
  display: "block",
79
79
  height: "100%",
80
- ...d
80
+ ...f
81
81
  }
82
82
  });
83
83
  });
84
84
  //#endregion
85
- export { s as SvGrid, s as default };
85
+ export { l as SvGrid, l as default };