scb-wc 0.1.263 → 0.1.264
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/README.md +19 -16
- package/all.d.ts +16 -0
- package/all.js +16 -0
- package/index.js +101 -85
- package/mvc/components/all.js +11 -0
- package/mvc/components/scb-accordion/scb-accordion-item.js +1 -1
- package/mvc/components/scb-accordion/scb-accordion.js +1 -1
- package/mvc/components/scb-app-bar/scb-app-bar.js +1 -1
- package/mvc/components/scb-avatar/scb-avatar.js +1 -1
- package/mvc/components/scb-button/scb-button.js +3 -3
- package/mvc/components/scb-calendar/scb-calendar.js +1 -1
- package/mvc/components/scb-calendar-card/scb-calendar-card.js +2 -2
- package/mvc/components/scb-card/scb-card.js +2 -2
- package/mvc/{vendor → components/scb-chevron}/scb-chevron.js +1 -1
- package/mvc/components/scb-cookies-consent/scb-cookies-consent.js +1 -1
- package/mvc/components/scb-datepicker/scb-datepicker.js +143 -0
- package/mvc/components/scb-dialog/scb-dialog.js +1 -1
- package/mvc/components/scb-drawer/scb-drawer.js +3 -3
- package/mvc/components/scb-drop-zone/scb-drop-zone.js +1 -1
- package/mvc/components/scb-dropdown/scb-dropdown.js +1 -1
- package/mvc/components/scb-fact-card/scb-fact-card.js +1 -1
- package/mvc/components/scb-header/scb-header.js +2 -2
- package/mvc/components/scb-horizontal-scroller/scb-horizontal-scroller.js +6 -6
- package/mvc/components/scb-icon-button/scb-icon-button.js +5 -5
- package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +6 -6
- package/mvc/components/scb-link/scb-link.js +1 -1
- package/mvc/components/scb-link-button/scb-link-button.js +1 -1
- package/mvc/components/scb-list/scb-list-item.js +6 -6
- package/mvc/components/scb-menu/scb-menu-item.js +1 -1
- package/mvc/components/scb-nav/scb-nav.js +1 -1
- package/mvc/components/scb-notification-card/scb-notification-card.js +1 -1
- package/mvc/components/scb-options-menu/scb-options-menu-item.js +1 -1
- package/mvc/components/scb-options-menu/scb-options-menu.js +2 -2
- package/mvc/components/scb-options-menu/scb-options-sub-menu.js +1 -1
- package/mvc/components/scb-overlay/scb-overlay.js +3 -3
- package/mvc/components/scb-pagination/scb-pagination.js +1 -1
- package/mvc/components/scb-progress-stepper/scb-progress-step.js +1 -1
- package/mvc/components/scb-search/scb-search.js +3 -3
- package/mvc/components/scb-segmented-button/scb-segmented-item.js +1 -1
- package/mvc/components/scb-select/scb-select-option.js +1 -1
- package/mvc/components/scb-select/scb-select.js +1 -1
- package/mvc/components/scb-snackbar/scb-snackbar.js +1 -1
- package/mvc/components/scb-stepper/scb-step.js +1 -1
- package/mvc/components/scb-table/scb-table.js +1 -1
- package/mvc/components/scb-table-advanced/scb-table-advanced.js +1 -1
- package/mvc/components/scb-table-next/read-table.js +1 -0
- package/mvc/components/scb-table-next/scb-table-next.js +6 -0
- package/mvc/components/scb-textfield/scb-textfield.js +34 -176
- package/mvc/components/scb-toc/scb-toc-item.js +1 -1
- package/mvc/components/scb-tooltip/scb-tooltip.js +2 -2
- package/mvc/components/scb-tour/scb-tour-step.js +1 -0
- package/mvc/components/scb-tour/scb-tour.js +33 -0
- package/mvc/{vendor → components/shared}/component-size-token.js +1 -1
- package/mvc/components/shared/lazy-focus-ring.js +2 -0
- package/mvc/components/shared/lazy-ripple.js +2 -0
- package/mvc/{vendor → components/shared}/manual-popover.js +1 -1
- package/mvc/components/shared/scb-icon-svg.js +11 -0
- package/mvc/vendor/scb-card-variants.internal.js +5 -5
- package/package.json +22 -2
- package/scb-card/scb-card-variants.internal.js +37 -40
- package/scb-components/index.d.ts +110 -0
- package/scb-components/scb-table-next/read-table.d.ts +29 -0
- package/scb-components/scb-table-next/scb-table-next.d.ts +22 -0
- package/scb-components/scb-tour/scb-tour-step.d.ts +13 -0
- package/scb-components/scb-tour/scb-tour.d.ts +57 -0
- package/scb-components/scb-viz/scb-viz-actions-runtime.d.ts +26 -0
- package/scb-components/scb-viz/scb-viz-print-runtime.d.ts +36 -0
- package/scb-components/scb-viz/scb-viz-series-differentiation-registry.d.ts +21 -0
- package/scb-components/scb-viz/scb-viz-series-differentiation-runtime.d.ts +42 -0
- package/scb-components/scb-viz/scb-viz-table-runtime.d.ts +31 -0
- package/scb-components/shared/component-size-token.d.ts +1 -0
- package/scb-components/shared/lazy-focus-ring.d.ts +4 -0
- package/scb-components/shared/lazy-ripple.d.ts +9 -0
- package/scb-components/shared/manual-popover.d.ts +7 -0
- package/scb-components/shared/scb-icon-svg.d.ts +3 -0
- package/scb-table-next/read-table.js +87 -0
- package/scb-table-next/scb-table-next.js +226 -0
- package/scb-tooltip/scb-tooltip.js +7 -1
- package/scb-tour/scb-tour-step.js +27 -0
- package/scb-tour/scb-tour.js +368 -0
- package/scb-viz/scb-viz-series-differentiation-registry.js +10 -7
- package/scb-viz/scb-viz.js +43 -43
- package/scb-wc.bundle.js +588 -291
- package/scb-wc.d.ts +32 -0
- package/shared/scb-icon-svg.js +5 -2
- package/mvc/vendor/lazy-focus-ring.js +0 -2
- package/mvc/vendor/lazy-ripple.js +0 -2
- package/mvc/vendor/scb-icon-svg.js +0 -11
|
@@ -93,22 +93,25 @@ var e = (e, t, n = "1.25") => {
|
|
|
93
93
|
]
|
|
94
94
|
};
|
|
95
95
|
function i() {
|
|
96
|
+
return r;
|
|
97
|
+
}
|
|
98
|
+
function a() {
|
|
96
99
|
return r.patterns.map(({ kind: e }) => e);
|
|
97
100
|
}
|
|
98
|
-
function
|
|
101
|
+
function o(e) {
|
|
99
102
|
return r.patterns.find(({ kind: t }) => t === e) || r.patterns.find(({ kind: e }) => e === r.defaultPatternKind) || r.patterns[0];
|
|
100
103
|
}
|
|
101
|
-
function
|
|
102
|
-
let r =
|
|
104
|
+
function s(e, t, n) {
|
|
105
|
+
let r = o(n);
|
|
103
106
|
return r?.appendMarks(e, t), r?.kind || n;
|
|
104
107
|
}
|
|
105
|
-
function
|
|
106
|
-
let t = r.dashStyles, n = r.markerSymbols,
|
|
108
|
+
function c(e) {
|
|
109
|
+
let t = r.dashStyles, n = r.markerSymbols, i = a();
|
|
107
110
|
return {
|
|
108
111
|
dashStyle: t[e % t.length],
|
|
109
112
|
markerSymbol: n[e % n.length],
|
|
110
|
-
patternKind:
|
|
113
|
+
patternKind: i[e % i.length]
|
|
111
114
|
};
|
|
112
115
|
}
|
|
113
116
|
//#endregion
|
|
114
|
-
export {
|
|
117
|
+
export { s as appendScbVizSeriesDifferentiationPatternMarks, o as getScbVizSeriesDifferentiationPatternDefinition, a as getScbVizSeriesDifferentiationPatternKinds, i as getScbVizSeriesDifferentiationRegistry, c as getScbVizSeriesDifferentiationVariant, r as scbVizSeriesDifferentiationRegistry };
|
package/scb-viz/scb-viz.js
CHANGED
|
@@ -9,10 +9,10 @@ import "../scb-horizontal-scroller/scb-horizontal-scroller.js";
|
|
|
9
9
|
import "../scb-segmented-button/scb-segmented-item.js";
|
|
10
10
|
import "../scb-segmented-button/scb-segmented-button.js";
|
|
11
11
|
import "../scb-table/scb-table.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
12
|
+
import { buildScbVizExportFileName as t, createScbVizCsvBlob as n, createScbVizRasterBlobFromElement as r, createScbVizRasterDataUrlFromElement as i, downloadScbVizBlob as a, getScbVizCurrentFullscreenElement as o, isScbVizFullscreenSupported as s, openScbVizPrintFrame as c, runWithScbVizForcedPrintLightMode as l, toggleScbVizFullscreen as u } from "./scb-viz-actions-runtime.js";
|
|
13
|
+
import { buildScbVizPrintDocumentHtml as d, buildScbVizPrintableFooterHtml as f, buildScbVizPrintableTableHtml as p } from "./scb-viz-print-runtime.js";
|
|
14
|
+
import { getScbVizSeriesDifferentiationPatternKinds as m } from "./scb-viz-series-differentiation-registry.js";
|
|
15
|
+
import { clearScbVizSeriesDifferentiationColorClass as h, clearScbVizSeriesDifferentiationMetadata as g, ensureScbVizStyledModeSeriesPattern as _, getScbVizGroupedSeriesDifferentiationVariant as v, getScbVizHighchartsColorClassName as y, getScbVizHighchartsSvgRoot as b, getScbVizLegendSeriesDifferentiationTargets as x, getScbVizSeriesDifferentiationVariantByIndex as S, isScbVizGroupedSeriesDifferentiationChart as C, isScbVizHighchartsStyledMode as w, setScbVizSeriesDifferentiationColorClass as T, setScbVizSeriesDifferentiationMetadata as E, shouldShowScbVizSeriesDifferentiationAction as D, usesScbVizGroupedPointDifferentiation as O } from "./scb-viz-series-differentiation-runtime.js";
|
|
16
16
|
import { buildScbVizResolvedTableView as k, createScbVizCsvRows as A, inferScbVizTableAlignments as j, normalizeScbVizRenderableCell as M, readScbVizTableDataFromSlot as N } from "./scb-viz-table-runtime.js";
|
|
17
17
|
import { LitElement as P, css as F, html as I } from "lit";
|
|
18
18
|
import { customElement as L, property as R, state as z } from "lit/decorators.js";
|
|
@@ -1161,16 +1161,16 @@ var H = /* @__PURE__ */ new Set([
|
|
|
1161
1161
|
].includes(n) ? "line" : ["area", "areaspline"].includes(n) ? "area" : ["column", "bar"].includes(n) ? this._isGroupedSeriesDifferentiationChart(e, t) ? "grouped-fill" : "fill" : ["pie", "variablepie"].includes(n) ? "point-fill" : null;
|
|
1162
1162
|
}
|
|
1163
1163
|
_getSeriesDifferentiationVariantByIndex(e) {
|
|
1164
|
-
return
|
|
1164
|
+
return S(e);
|
|
1165
1165
|
}
|
|
1166
1166
|
_isGroupedSeriesDifferentiationChart(e, t) {
|
|
1167
|
-
return
|
|
1167
|
+
return C(e, t);
|
|
1168
1168
|
}
|
|
1169
1169
|
_usesGroupedPointDifferentiation(e) {
|
|
1170
|
-
return
|
|
1170
|
+
return O(e);
|
|
1171
1171
|
}
|
|
1172
1172
|
_getGroupedSeriesDifferentiationVariant(e, t, n) {
|
|
1173
|
-
let r =
|
|
1173
|
+
let r = v(e, t, n);
|
|
1174
1174
|
return {
|
|
1175
1175
|
...r,
|
|
1176
1176
|
variantIndex: typeof r.variantIndex == "number" ? r.variantIndex : n
|
|
@@ -1202,7 +1202,7 @@ var H = /* @__PURE__ */ new Set([
|
|
|
1202
1202
|
});
|
|
1203
1203
|
}
|
|
1204
1204
|
_shouldShowSeriesDifferentiationAction() {
|
|
1205
|
-
return
|
|
1205
|
+
return D({
|
|
1206
1206
|
chart: this._getCurrentHighchartsChart(),
|
|
1207
1207
|
getCurrentPrintableView: () => this._getCurrentPrintableView(),
|
|
1208
1208
|
getSeriesDifferentiationGroup: (e, t) => this._getSeriesDifferentiationGroup(e, t),
|
|
@@ -1221,45 +1221,45 @@ var H = /* @__PURE__ */ new Set([
|
|
|
1221
1221
|
return { marker: a && Object.keys(a).length > 0 ? a : t && Object.keys(t).length > 0 ? t : { enabled: !1 } };
|
|
1222
1222
|
}
|
|
1223
1223
|
_isHighchartsStyledMode(e) {
|
|
1224
|
-
return
|
|
1224
|
+
return w(e);
|
|
1225
1225
|
}
|
|
1226
1226
|
_getHighchartsSvgRoot(e) {
|
|
1227
|
-
return
|
|
1227
|
+
return b(e);
|
|
1228
1228
|
}
|
|
1229
1229
|
_getHighchartsColorClassName(e, t) {
|
|
1230
|
-
return
|
|
1230
|
+
return y(e, t);
|
|
1231
1231
|
}
|
|
1232
1232
|
_setSeriesDifferentiationMetadata(e, t) {
|
|
1233
|
-
|
|
1233
|
+
E(e, t);
|
|
1234
1234
|
}
|
|
1235
1235
|
_clearSeriesDifferentiationMetadata(e) {
|
|
1236
|
-
|
|
1236
|
+
g(e);
|
|
1237
1237
|
}
|
|
1238
1238
|
_setSeriesDifferentiationColorClass(e, t) {
|
|
1239
|
-
|
|
1239
|
+
T(e, t);
|
|
1240
1240
|
}
|
|
1241
1241
|
_clearSeriesDifferentiationColorClass(e) {
|
|
1242
|
-
|
|
1242
|
+
h(e);
|
|
1243
1243
|
}
|
|
1244
1244
|
_getLegendSeriesDifferentiationTargets(e) {
|
|
1245
|
-
return
|
|
1245
|
+
return x(e);
|
|
1246
1246
|
}
|
|
1247
1247
|
_ensureStyledModeSeriesPattern(e, t, n) {
|
|
1248
|
-
|
|
1248
|
+
_(e, t, n);
|
|
1249
1249
|
}
|
|
1250
1250
|
_applyStyledModeSeriesDifferentiation(e) {
|
|
1251
|
-
let
|
|
1252
|
-
if (!
|
|
1253
|
-
|
|
1254
|
-
let
|
|
1255
|
-
e.series?.forEach((t,
|
|
1251
|
+
let t = this._getHighchartsSvgRoot(e);
|
|
1252
|
+
if (!t) return;
|
|
1253
|
+
t.classList.add("scb-viz-series-differentiation-enabled");
|
|
1254
|
+
let n = m(), r = this._getSeriesDifferentiationSnapshotStore(e);
|
|
1255
|
+
e.series?.forEach((t, i) => {
|
|
1256
1256
|
let a = this._getSeriesDifferentiationGroup(t, e);
|
|
1257
1257
|
if (!a) return;
|
|
1258
|
-
let o = String(t?.index ??
|
|
1259
|
-
|
|
1260
|
-
let s = a === "grouped-fill" && this._usesGroupedPointDifferentiation(t), c = a === "grouped-fill" ? this._getGroupedSeriesDifferentiationVariant(t, e,
|
|
1261
|
-
variantIndex:
|
|
1262
|
-
...this._getSeriesDifferentiationVariantByIndex(
|
|
1258
|
+
let o = String(t?.index ?? i);
|
|
1259
|
+
r.has(o) || r.set(o, this._captureSeriesDifferentiationSnapshot(t));
|
|
1260
|
+
let s = a === "grouped-fill" && this._usesGroupedPointDifferentiation(t), c = a === "grouped-fill" ? this._getGroupedSeriesDifferentiationVariant(t, e, i) : {
|
|
1261
|
+
variantIndex: i,
|
|
1262
|
+
...this._getSeriesDifferentiationVariantByIndex(i)
|
|
1263
1263
|
}, { dashStyle: l, markerSymbol: u, patternKind: d } = c, f = this._getHighchartsColorClassName(t?.graph ?? t?.area ?? t?.group, c.variantIndex), p = this._getLegendSeriesDifferentiationTargets(t);
|
|
1264
1264
|
this._setSeriesDifferentiationMetadata(t?.graph, {
|
|
1265
1265
|
role: "graph",
|
|
@@ -1283,8 +1283,8 @@ var H = /* @__PURE__ */ new Set([
|
|
|
1283
1283
|
role: "fill",
|
|
1284
1284
|
patternKind: d
|
|
1285
1285
|
}), this._setSeriesDifferentiationColorClass(e?.graphic, f);
|
|
1286
|
-
}), this._ensureStyledModeSeriesPattern(e, f, d))), a === "point-fill" && t.points?.forEach((t,
|
|
1287
|
-
let i = r
|
|
1286
|
+
}), this._ensureStyledModeSeriesPattern(e, f, d))), a === "point-fill" && t.points?.forEach((t, r) => {
|
|
1287
|
+
let i = n[r % n.length], a = this._getHighchartsColorClassName(t?.graphic ?? t?.legendSymbol ?? t?.legendItem?.symbol ?? t?.legendItem?.group, r), o = this._getLegendSeriesDifferentiationTargets(t);
|
|
1288
1288
|
this._setSeriesDifferentiationMetadata(t?.graphic, {
|
|
1289
1289
|
role: "fill",
|
|
1290
1290
|
patternKind: i
|
|
@@ -1361,7 +1361,7 @@ var H = /* @__PURE__ */ new Set([
|
|
|
1361
1361
|
return n.has(r) ? r : t;
|
|
1362
1362
|
}
|
|
1363
1363
|
_buildExportFileName(e) {
|
|
1364
|
-
return
|
|
1364
|
+
return t({
|
|
1365
1365
|
lang: this.lang,
|
|
1366
1366
|
title: this.title
|
|
1367
1367
|
}, e);
|
|
@@ -1370,17 +1370,17 @@ var H = /* @__PURE__ */ new Set([
|
|
|
1370
1370
|
return this;
|
|
1371
1371
|
}
|
|
1372
1372
|
_getCurrentFullscreenElement() {
|
|
1373
|
-
return
|
|
1373
|
+
return o();
|
|
1374
1374
|
}
|
|
1375
1375
|
_isFullscreenSupported() {
|
|
1376
|
-
return
|
|
1376
|
+
return s(this._getFullscreenTarget());
|
|
1377
1377
|
}
|
|
1378
1378
|
_syncFullscreenState() {
|
|
1379
1379
|
let e = this._getCurrentFullscreenElement() === this._getFullscreenTarget();
|
|
1380
1380
|
this._isFullscreen = e, this.toggleAttribute("data-scb-viz-fullscreen", e), this.#c(), this.#r();
|
|
1381
1381
|
}
|
|
1382
1382
|
async _toggleFullscreen() {
|
|
1383
|
-
await
|
|
1383
|
+
await u(this._getFullscreenTarget());
|
|
1384
1384
|
}
|
|
1385
1385
|
_renderActionsMenu() {
|
|
1386
1386
|
let e = this._getCurrentPrintableView(), t = this._canExportRaster(), n = this._canExportCsv(), r = t && (e === "diagram" || e === "image"), i = n && e === "table", a = this._shouldShowSeriesDifferentiationAction(), o = `${this._instanceId}-actions-menu`;
|
|
@@ -1802,17 +1802,17 @@ var H = /* @__PURE__ */ new Set([
|
|
|
1802
1802
|
async #m(e) {
|
|
1803
1803
|
let t = this._getExportableVisualElement();
|
|
1804
1804
|
if (!t) return;
|
|
1805
|
-
let n = await
|
|
1806
|
-
n &&
|
|
1805
|
+
let n = await r(t, this._getExportSurfaceTarget(), e);
|
|
1806
|
+
n && a(n, this._buildExportFileName(e === "jpeg" ? "jpg" : "png"));
|
|
1807
1807
|
}
|
|
1808
1808
|
_getCurrentPrintableView() {
|
|
1809
1809
|
return this.variant === "Table" ? "table" : this.variant === "Image" ? "image" : this.selectedChip === "Table" ? "table" : "diagram";
|
|
1810
1810
|
}
|
|
1811
1811
|
#h(e) {
|
|
1812
|
-
return
|
|
1812
|
+
return p(this._getResolvedTableView(e), (e) => this._escapeHtml(e), { getEmptyHeaderLabel: (e) => this._getEmptyTableHeaderLabel(e) });
|
|
1813
1813
|
}
|
|
1814
1814
|
#g() {
|
|
1815
|
-
return
|
|
1815
|
+
return f({
|
|
1816
1816
|
comment: this.comment,
|
|
1817
1817
|
commentLabel: this.commentLabel,
|
|
1818
1818
|
description: this.description,
|
|
@@ -1830,7 +1830,7 @@ var H = /* @__PURE__ */ new Set([
|
|
|
1830
1830
|
});
|
|
1831
1831
|
}
|
|
1832
1832
|
#_(e) {
|
|
1833
|
-
return
|
|
1833
|
+
return d({
|
|
1834
1834
|
contentHtml: e,
|
|
1835
1835
|
escapeHtml: (e) => this._escapeHtml(e),
|
|
1836
1836
|
footerHtml: this.#g(),
|
|
@@ -1840,7 +1840,7 @@ var H = /* @__PURE__ */ new Set([
|
|
|
1840
1840
|
});
|
|
1841
1841
|
}
|
|
1842
1842
|
async #v() {
|
|
1843
|
-
await
|
|
1843
|
+
await l(this, async () => {
|
|
1844
1844
|
let e = this._getCurrentPrintableView(), t = "";
|
|
1845
1845
|
if (e === "table") {
|
|
1846
1846
|
let e = this._getResolvedTableData();
|
|
@@ -1853,16 +1853,16 @@ var H = /* @__PURE__ */ new Set([
|
|
|
1853
1853
|
} else {
|
|
1854
1854
|
let e = this._getExportableVisualElement();
|
|
1855
1855
|
if (!e) return;
|
|
1856
|
-
let n = await
|
|
1856
|
+
let n = await i(e, this._getExportSurfaceTarget(), "png");
|
|
1857
1857
|
if (!n) return;
|
|
1858
1858
|
t = `<img class="viz-chart-image" src="${n}" alt="${this._escapeHtml(this._getImageAltText())}">`;
|
|
1859
1859
|
}
|
|
1860
|
-
await
|
|
1860
|
+
await c(this.#_(t));
|
|
1861
1861
|
});
|
|
1862
1862
|
}
|
|
1863
1863
|
#y() {
|
|
1864
1864
|
let e = this._getResolvedTableData();
|
|
1865
|
-
e?.rows?.length &&
|
|
1865
|
+
e?.rows?.length && a(n(A(e, (e) => this._normalizeRenderableCell(e)), this.lang), this._buildExportFileName("csv"));
|
|
1866
1866
|
}
|
|
1867
1867
|
#b() {
|
|
1868
1868
|
let e = this.#x(this.spacing), t = this.#x(this.spacingTop) ?? e, n = this.#x(this.spacingBottom) ?? e, r = this.#x(this.spacingLeft), i = this.#x(this.spacingRight);
|