@watermarkinsights/ripple 5.31.0-alpha.5 → 5.31.0-alpha.7
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/cjs/{app-globals-77259a15.js → app-globals-f7da32e6.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ripple.cjs.js +1 -1
- package/dist/cjs/wm-chart-stack.cjs.entry.js +18 -11
- package/dist/collection/components/charts/wm-chart-stack/wm-chart-stack.js +26 -12
- package/dist/collection/dev/chart-stack.js +19 -0
- package/dist/docs/docs.json +14 -2
- package/dist/docs/skill/index.md +1 -0
- package/dist/docs/skill/wm-action-menu.md +2 -2
- package/dist/docs/skill/wm-chart-legend.md +4 -2
- package/dist/docs/skill/wm-chart-stack.md +8 -1
- package/dist/docs/skill/wm-date-range.md +3 -3
- package/dist/docs/skill/wm-datepicker.md +2 -2
- package/dist/docs/skill/wm-file.md +4 -4
- package/dist/docs/skill/wm-flyout.md +5 -4
- package/dist/docs/skill/wm-input.md +2 -1
- package/dist/docs/skill/wm-menuitem.md +2 -1
- package/dist/docs/skill/wm-modal.md +5 -3
- package/dist/docs/skill/wm-navigation-hamburger.md +2 -1
- package/dist/docs/skill/wm-navigation-item.md +2 -1
- package/dist/docs/skill/wm-navigation.md +2 -1
- package/dist/docs/skill/wm-navigator.md +3 -1
- package/dist/docs/skill/wm-nested-select.md +2 -1
- package/dist/docs/skill/wm-optgroup.md +2 -2
- package/dist/docs/skill/wm-option.md +2 -2
- package/dist/docs/skill/wm-pagination.md +3 -1
- package/dist/docs/skill/wm-progress-monitor.md +2 -1
- package/dist/docs/skill/wm-search.md +5 -2
- package/dist/docs/skill/wm-select.md +8 -4
- package/dist/docs/skill/wm-snackbar.md +7 -2
- package/dist/docs/skill/wm-tab-item.md +3 -1
- package/dist/docs/skill/wm-tag-input.md +4 -1
- package/dist/docs/skill/wm-tag-option.md +2 -2
- package/dist/docs/skill/wm-textarea.md +2 -1
- package/dist/docs/skill/wm-timepicker.md +2 -2
- package/dist/docs/skill/wm-uploader.md +3 -1
- package/dist/esm/{app-globals-299e37c6.js → app-globals-d77e6bdb.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/ripple.js +1 -1
- package/dist/esm/wm-chart-stack.entry.js +18 -11
- package/dist/esm-es5/{app-globals-299e37c6.js → app-globals-d77e6bdb.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/ripple.js +1 -1
- package/dist/esm-es5/wm-chart-stack.entry.js +1 -1
- package/dist/ripple/{p-f7d03f60.js → p-18b840be.js} +1 -1
- package/dist/ripple/p-79175cd4.entry.js +1 -0
- package/dist/ripple/{p-99c617c2.system.js → p-b3eecf4a.system.js} +1 -1
- package/dist/ripple/{p-341f9a16.system.js → p-bea24dad.system.js} +1 -1
- package/dist/ripple/{p-4bbd4fad.system.entry.js → p-e97166ce.system.entry.js} +1 -1
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/components/charts/wm-chart-stack/wm-chart-stack.d.ts +9 -1
- package/dist/types/components.d.ts +24 -4
- package/package.json +2 -2
- package/dist/ripple/p-1c69ebe2.entry.js +0 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-bb947bd5.js');
|
|
6
|
-
const appGlobals = require('./app-globals-
|
|
6
|
+
const appGlobals = require('./app-globals-f7da32e6.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
package/dist/cjs/ripple.cjs.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-bb947bd5.js');
|
|
6
|
-
const appGlobals = require('./app-globals-
|
|
6
|
+
const appGlobals = require('./app-globals-f7da32e6.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
9
|
Stencil Client Patch Browser v4.21.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -65,6 +65,9 @@ const ChartStack = class {
|
|
|
65
65
|
get flattenedData() {
|
|
66
66
|
return [...this.processedStacks.values()].flat();
|
|
67
67
|
}
|
|
68
|
+
get segmentWrappers() {
|
|
69
|
+
return this.el.shadowRoot.querySelectorAll(".segment-wrapper");
|
|
70
|
+
}
|
|
68
71
|
getPatternClass(item) {
|
|
69
72
|
var _a;
|
|
70
73
|
return this.isPatternMode ? ((_a = interfaces.patternKey[item.color]) !== null && _a !== void 0 ? _a : "") : "";
|
|
@@ -101,6 +104,14 @@ const ChartStack = class {
|
|
|
101
104
|
this.propagateExternalLegendData();
|
|
102
105
|
this.measurePending = true; // re-measure label fit after this change renders
|
|
103
106
|
}
|
|
107
|
+
else {
|
|
108
|
+
// config or data was unset — clear derived state so the chart renders empty
|
|
109
|
+
this.processedStacks = new Map();
|
|
110
|
+
this.stackTotals = new Map();
|
|
111
|
+
this.legendData = [];
|
|
112
|
+
this.propagateExternalLegendData();
|
|
113
|
+
this.hasHiddenValues = false;
|
|
114
|
+
}
|
|
104
115
|
}
|
|
105
116
|
buildProcessedStacks() {
|
|
106
117
|
if (!this.data) {
|
|
@@ -162,7 +173,6 @@ const ChartStack = class {
|
|
|
162
173
|
return result;
|
|
163
174
|
}
|
|
164
175
|
countStackTotals(processedStacks) {
|
|
165
|
-
this.stackTotals = new Map();
|
|
166
176
|
const stackTotals = new Map();
|
|
167
177
|
processedStacks.forEach((segments, stackName) => {
|
|
168
178
|
const stackTotal = segments.reduce((acc, s) => acc + s.amount, 0);
|
|
@@ -338,22 +348,20 @@ const ChartStack = class {
|
|
|
338
348
|
highlightSegment(item) {
|
|
339
349
|
var _a;
|
|
340
350
|
const idx = this.flattenedData.indexOf(item);
|
|
341
|
-
const segmentWrappers = this.
|
|
351
|
+
const segmentWrappers = this.segmentWrappers;
|
|
342
352
|
segmentWrappers.forEach((segmentWrapper) => segmentWrapper.classList.add("faded"));
|
|
343
353
|
(_a = segmentWrappers[idx]) === null || _a === void 0 ? void 0 : _a.classList.remove("faded");
|
|
344
354
|
const legendIdx = this.legendData.findIndex((legendItem) => legendItem.barLegend === item.barLegend);
|
|
345
355
|
this.wmChartStackHighlighted.emit({ idx: legendIdx });
|
|
346
356
|
}
|
|
347
357
|
highlightSegmentsByLegend(legend) {
|
|
348
|
-
|
|
349
|
-
segmentWrappers.forEach((segmentWrapper, idx) => {
|
|
358
|
+
this.segmentWrappers.forEach((segmentWrapper, idx) => {
|
|
350
359
|
var _a;
|
|
351
360
|
segmentWrapper.classList.toggle("faded", ((_a = this.flattenedData[idx]) === null || _a === void 0 ? void 0 : _a.barLegend) !== legend);
|
|
352
361
|
});
|
|
353
362
|
}
|
|
354
363
|
clearHighlights() {
|
|
355
|
-
|
|
356
|
-
wrappers.forEach((wrapper) => wrapper.classList.remove("faded"));
|
|
364
|
+
this.segmentWrappers.forEach((segmentWrapper) => segmentWrapper.classList.remove("faded"));
|
|
357
365
|
this.wmChartStackHighlighted.emit({ idx: -1 });
|
|
358
366
|
}
|
|
359
367
|
clearFocus() {
|
|
@@ -367,9 +375,8 @@ const ChartStack = class {
|
|
|
367
375
|
// #region Responsiveness
|
|
368
376
|
////////////////////////////////////////////////////////////
|
|
369
377
|
updateHiddenValues() {
|
|
370
|
-
const segmentWrappers = this.el.shadowRoot.querySelectorAll(".segment-wrapper");
|
|
371
378
|
let anyHidden = false;
|
|
372
|
-
segmentWrappers.forEach((segmentWrapper) => {
|
|
379
|
+
this.segmentWrappers.forEach((segmentWrapper) => {
|
|
373
380
|
const value = segmentWrapper.querySelector(".value");
|
|
374
381
|
if (!value) {
|
|
375
382
|
return;
|
|
@@ -393,7 +400,7 @@ const ChartStack = class {
|
|
|
393
400
|
}
|
|
394
401
|
renderSegment(item, stackIdx, segmentIdx) {
|
|
395
402
|
var _a, _b;
|
|
396
|
-
return (index.h("div", { class: "segment-wrapper", style: { "--segment-width": `${item.gridPercent}%` }, key: `${stackIdx}-${segmentIdx}` }, (this.isPrintMode || this.valueFormat === "percentage") && this.renderValue(item), index.h("div", { class: `segment ${this.getPatternClass(item)}`, style: { "--segment-color": `var(--${item.color})` }, tabindex: "-1", role: "img", "aria-label": `${item.groupName}, ${item.displayValue}. ${item.amount}/${(_b = this.stackTotals.get((_a = item.groupName) !== null && _a !== void 0 ? _a : "")) !== null && _b !== void 0 ? _b : 0} ${item.barLegend}`, "data-stack-index": stackIdx, "data-segment-index": segmentIdx, onClick: (ev) => this.handleSegmentClick(ev, item), onKeyDown: (ev) => this.handleSegmentKeyDown(ev, stackIdx, segmentIdx) })));
|
|
403
|
+
return (index.h("div", { class: "segment-wrapper", style: { "--segment-width": `${item.gridPercent}%` }, key: `${stackIdx}-${segmentIdx}` }, (this.isPrintMode || this.valueFormat === "percentage") && this.renderValue(item), index.h("div", { class: `segment horizontal ${this.getPatternClass(item)}`, style: { "--segment-color": `var(--${item.color})` }, tabindex: "-1", role: "img", "aria-label": `${item.groupName}, ${item.displayValue}. ${item.amount}/${(_b = this.stackTotals.get((_a = item.groupName) !== null && _a !== void 0 ? _a : "")) !== null && _b !== void 0 ? _b : 0} ${item.barLegend}`, "data-stack-index": stackIdx, "data-segment-index": segmentIdx, onClick: (ev) => this.handleSegmentClick(ev, item), onKeyDown: (ev) => this.handleSegmentKeyDown(ev, stackIdx, segmentIdx) })));
|
|
397
404
|
}
|
|
398
405
|
renderStacks() {
|
|
399
406
|
const stackNames = [...this.processedStacks.keys()];
|
|
@@ -414,7 +421,7 @@ const ChartStack = class {
|
|
|
414
421
|
const total = (_a = this.stackTotals.get(stackName)) !== null && _a !== void 0 ? _a : 0;
|
|
415
422
|
return (index.h("div", { class: "print-table", "aria-hidden": "true" }, segments.map((item) => {
|
|
416
423
|
var _a, _b, _c;
|
|
417
|
-
return (index.h("div", { class: "print-row", key: `row-${stackName}-${item.barLegend}` }, index.h("div", { class: "print-legend" }, index.h("div", { class: `swatch ${this.getPatternClass(item)}`, style: { "--segment-color": `var(--${item.color})` } }), index.h("span", { class: "print-legend-name" }, item.barLegend)), index.h("span", { class: "print-percent" }, item.displayValue), index.h("span", { class: "print-fraction" }, item.amount, "/", total), index.h("span", { class: "print-text" }, (_c = (_a = item.popoverText) !== null && _a !== void 0 ? _a : (_b = this.config) === null || _b === void 0 ? void 0 : _b.popoverText) !== null && _c !== void 0 ? _c : "")));
|
|
424
|
+
return (index.h("div", { class: "print-row", key: `row-${stackName}-${item.barLegend}` }, index.h("div", { class: "print-legend" }, index.h("div", { class: `swatch horizontal ${this.getPatternClass(item)}`, style: { "--segment-color": `var(--${item.color})` } }), index.h("span", { class: "print-legend-name" }, item.barLegend)), index.h("span", { class: "print-percent" }, item.displayValue), index.h("span", { class: "print-fraction" }, item.amount, "/", total), index.h("span", { class: "print-text" }, (_c = (_a = item.popoverText) !== null && _a !== void 0 ? _a : (_b = this.config) === null || _b === void 0 ? void 0 : _b.popoverText) !== null && _c !== void 0 ? _c : "")));
|
|
418
425
|
})));
|
|
419
426
|
}
|
|
420
427
|
renderLegend(orientation) {
|
|
@@ -426,7 +433,7 @@ const ChartStack = class {
|
|
|
426
433
|
render() {
|
|
427
434
|
var _a, _b, _c, _d;
|
|
428
435
|
const gridLineRow = this.processedStacks.size * (this.isPrintMode ? 2 : 1) + 1;
|
|
429
|
-
return (index.h(index.Host, { key: '
|
|
436
|
+
return (index.h(index.Host, { key: 'a02be9b6a7e8a570d12fc471ab0899c1d6bff609' }, index.h("div", { key: '27a456aca42c248c767a3d44d4fca43e27342113', class: "popover-wrapper" }, index.h("priv-chart-popover", { key: '710e6b9ed574358949d86736991a94ff23033e1b', ref: (el) => (this.popoverEl = el), onIntChartPopoverToggled: (ev) => this.handlePopoverToggled(ev) })), index.h("div", { key: 'c696620647c3a4bf69b8cbfdfd88fe0d56c0e9e4', ref: (el) => (this.componentWrapperEl = el), class: `component-wrapper ${this.isPrintMode ? "print-mode" : ""} ${this.isPatternMode ? "pattern-mode" : ""}`, tabindex: "0", role: "application", onKeyDown: (ev) => this.handleChartKeyDown(ev), onBlur: (ev) => this.handleComponentBlur(ev), "aria-roledescription": intl.chartMessages.interactiveChart, "aria-describedby": "chart-instructions", "aria-label": (_a = this.config) === null || _a === void 0 ? void 0 : _a.label }, ((_c = (_b = this.config) === null || _b === void 0 ? void 0 : _b.showLabel) !== null && _c !== void 0 ? _c : true) && (index.h("label", { key: '7bcc1cdcf20e17af7078d5ddec312accafb0ee2a', id: "label", class: "label" }, index.h("span", { key: '4b1e5090ccbaf485a5efd543575056f77ecc3af8', class: "label-text" }, (_d = this.config) === null || _d === void 0 ? void 0 : _d.label), this.subinfoText && index.h("span", { key: '4eba44204c943e58e16a0edd2787315d44ae2f23', class: "subinfo" }, this.subinfoText))), this.showLegend === "top" && this.renderLegend("horizontal"), index.h("div", { key: 'c11932585eb98bc5b12ead052e6965d954d28b0f', class: "chart-body" }, this.showLegend === "left" && this.renderLegend("vertical"), index.h("div", { key: '772c6c62d2ff5ef996ca6e72bd18f174a5357dc3', class: `stacks ${this.isKeying ? "user-is-keying" : ""} ${this.showGrid ? "show-grid" : ""} ${this.isSingleStack ? "single-stack" : ""}`, ref: (el) => (this.stacksEl = el), style: { "--grid-line-row": `${gridLineRow}` } }, this.showGrid && index.h("div", { key: '85170b43d60832f82fca6588c39e0ccbcc00cede', class: "vertical-grid-line" }), this.renderStacks(), this.showGrid && (index.h("div", { key: 'ac782af53cf46f6797bb1a564fdbbc221fd8ea43', class: "x-axis" }, index.h("div", { key: 'f6175cb9012164eda83c920edc9746c25753bc1e', class: "x-axis-line" }), index.h("div", { key: 'd218b9ce3d734dd6e218f16d944e93199ac52580', class: "x-axis-ticks" }, index.h("span", { key: 'eff3d60abf1a6ca2cbaf0247996d891d3cbfadad', class: "tick zero" }, "0%"), index.h("span", { key: '8767b56809d269272bdc1ef9ccd4d194e6c79070', class: "tick end" }, "100%"))))), this.showLegend === "right" && this.renderLegend("vertical")), this.showLegend === "bottom" && this.renderLegend("horizontal"), !this.isPrintMode && (index.h("div", { key: '1d9a5524f1669987d19daa5d5fff5dcde93fe4ba', class: `hidden-values-warning ${this.hasHiddenValues ? "" : "hidden"}` }, intl.stackChartMessages.hiddenValues)), chartFunctions.renderInstructionsText())));
|
|
430
437
|
}
|
|
431
438
|
static get delegatesFocus() { return true; }
|
|
432
439
|
get el() { return index.getElement(this); }
|
|
@@ -9,6 +9,9 @@ import { isElOrChild } from "../../../global/functions";
|
|
|
9
9
|
* Data and configuration are set via JavaScript properties (`chart.config` and `chart.data`) — not
|
|
10
10
|
* HTML attributes.
|
|
11
11
|
*
|
|
12
|
+
* @displayName Stack Chart
|
|
13
|
+
* @category Data Visualization
|
|
14
|
+
*
|
|
12
15
|
* @keyboardInteraction
|
|
13
16
|
* - **Tab**: Enters the chart wrapper.
|
|
14
17
|
* - **Arrow Down / Right**: Focuses the first segment.
|
|
@@ -48,6 +51,10 @@ import { isElOrChild } from "../../../global/functions";
|
|
|
48
51
|
* ];
|
|
49
52
|
* </script>
|
|
50
53
|
*
|
|
54
|
+
* @example {react} Single stack
|
|
55
|
+
* <WmChartStack ref={chartRef} />
|
|
56
|
+
* // In useEffect: chartRef.current.config = {...}; chartRef.current.data = [...];
|
|
57
|
+
*
|
|
51
58
|
* @example {html} Grouped (multiple stacks)
|
|
52
59
|
* <wm-chart-stack id="status-by-requirement"></wm-chart-stack>
|
|
53
60
|
* <script>
|
|
@@ -61,7 +68,7 @@ import { isElOrChild } from "../../../global/functions";
|
|
|
61
68
|
* ];
|
|
62
69
|
* </script>
|
|
63
70
|
*
|
|
64
|
-
* @example {react}
|
|
71
|
+
* @example {react} Grouped (multiple stacks)
|
|
65
72
|
* <WmChartStack ref={chartRef} />
|
|
66
73
|
* // In useEffect: chartRef.current.config = {...}; chartRef.current.data = [...];
|
|
67
74
|
*/
|
|
@@ -117,6 +124,9 @@ export class ChartStack {
|
|
|
117
124
|
get flattenedData() {
|
|
118
125
|
return [...this.processedStacks.values()].flat();
|
|
119
126
|
}
|
|
127
|
+
get segmentWrappers() {
|
|
128
|
+
return this.el.shadowRoot.querySelectorAll(".segment-wrapper");
|
|
129
|
+
}
|
|
120
130
|
getPatternClass(item) {
|
|
121
131
|
var _a;
|
|
122
132
|
return this.isPatternMode ? ((_a = patternKey[item.color]) !== null && _a !== void 0 ? _a : "") : "";
|
|
@@ -153,6 +163,14 @@ export class ChartStack {
|
|
|
153
163
|
this.propagateExternalLegendData();
|
|
154
164
|
this.measurePending = true; // re-measure label fit after this change renders
|
|
155
165
|
}
|
|
166
|
+
else {
|
|
167
|
+
// config or data was unset — clear derived state so the chart renders empty
|
|
168
|
+
this.processedStacks = new Map();
|
|
169
|
+
this.stackTotals = new Map();
|
|
170
|
+
this.legendData = [];
|
|
171
|
+
this.propagateExternalLegendData();
|
|
172
|
+
this.hasHiddenValues = false;
|
|
173
|
+
}
|
|
156
174
|
}
|
|
157
175
|
buildProcessedStacks() {
|
|
158
176
|
if (!this.data) {
|
|
@@ -214,7 +232,6 @@ export class ChartStack {
|
|
|
214
232
|
return result;
|
|
215
233
|
}
|
|
216
234
|
countStackTotals(processedStacks) {
|
|
217
|
-
this.stackTotals = new Map();
|
|
218
235
|
const stackTotals = new Map();
|
|
219
236
|
processedStacks.forEach((segments, stackName) => {
|
|
220
237
|
const stackTotal = segments.reduce((acc, s) => acc + s.amount, 0);
|
|
@@ -390,22 +407,20 @@ export class ChartStack {
|
|
|
390
407
|
highlightSegment(item) {
|
|
391
408
|
var _a;
|
|
392
409
|
const idx = this.flattenedData.indexOf(item);
|
|
393
|
-
const segmentWrappers = this.
|
|
410
|
+
const segmentWrappers = this.segmentWrappers;
|
|
394
411
|
segmentWrappers.forEach((segmentWrapper) => segmentWrapper.classList.add("faded"));
|
|
395
412
|
(_a = segmentWrappers[idx]) === null || _a === void 0 ? void 0 : _a.classList.remove("faded");
|
|
396
413
|
const legendIdx = this.legendData.findIndex((legendItem) => legendItem.barLegend === item.barLegend);
|
|
397
414
|
this.wmChartStackHighlighted.emit({ idx: legendIdx });
|
|
398
415
|
}
|
|
399
416
|
highlightSegmentsByLegend(legend) {
|
|
400
|
-
|
|
401
|
-
segmentWrappers.forEach((segmentWrapper, idx) => {
|
|
417
|
+
this.segmentWrappers.forEach((segmentWrapper, idx) => {
|
|
402
418
|
var _a;
|
|
403
419
|
segmentWrapper.classList.toggle("faded", ((_a = this.flattenedData[idx]) === null || _a === void 0 ? void 0 : _a.barLegend) !== legend);
|
|
404
420
|
});
|
|
405
421
|
}
|
|
406
422
|
clearHighlights() {
|
|
407
|
-
|
|
408
|
-
wrappers.forEach((wrapper) => wrapper.classList.remove("faded"));
|
|
423
|
+
this.segmentWrappers.forEach((segmentWrapper) => segmentWrapper.classList.remove("faded"));
|
|
409
424
|
this.wmChartStackHighlighted.emit({ idx: -1 });
|
|
410
425
|
}
|
|
411
426
|
clearFocus() {
|
|
@@ -419,9 +434,8 @@ export class ChartStack {
|
|
|
419
434
|
// #region Responsiveness
|
|
420
435
|
////////////////////////////////////////////////////////////
|
|
421
436
|
updateHiddenValues() {
|
|
422
|
-
const segmentWrappers = this.el.shadowRoot.querySelectorAll(".segment-wrapper");
|
|
423
437
|
let anyHidden = false;
|
|
424
|
-
segmentWrappers.forEach((segmentWrapper) => {
|
|
438
|
+
this.segmentWrappers.forEach((segmentWrapper) => {
|
|
425
439
|
const value = segmentWrapper.querySelector(".value");
|
|
426
440
|
if (!value) {
|
|
427
441
|
return;
|
|
@@ -445,7 +459,7 @@ export class ChartStack {
|
|
|
445
459
|
}
|
|
446
460
|
renderSegment(item, stackIdx, segmentIdx) {
|
|
447
461
|
var _a, _b;
|
|
448
|
-
return (h("div", { class: "segment-wrapper", style: { "--segment-width": `${item.gridPercent}%` }, key: `${stackIdx}-${segmentIdx}` }, (this.isPrintMode || this.valueFormat === "percentage") && this.renderValue(item), h("div", { class: `segment ${this.getPatternClass(item)}`, style: { "--segment-color": `var(--${item.color})` }, tabindex: "-1", role: "img", "aria-label": `${item.groupName}, ${item.displayValue}. ${item.amount}/${(_b = this.stackTotals.get((_a = item.groupName) !== null && _a !== void 0 ? _a : "")) !== null && _b !== void 0 ? _b : 0} ${item.barLegend}`, "data-stack-index": stackIdx, "data-segment-index": segmentIdx, onClick: (ev) => this.handleSegmentClick(ev, item), onKeyDown: (ev) => this.handleSegmentKeyDown(ev, stackIdx, segmentIdx) })));
|
|
462
|
+
return (h("div", { class: "segment-wrapper", style: { "--segment-width": `${item.gridPercent}%` }, key: `${stackIdx}-${segmentIdx}` }, (this.isPrintMode || this.valueFormat === "percentage") && this.renderValue(item), h("div", { class: `segment horizontal ${this.getPatternClass(item)}`, style: { "--segment-color": `var(--${item.color})` }, tabindex: "-1", role: "img", "aria-label": `${item.groupName}, ${item.displayValue}. ${item.amount}/${(_b = this.stackTotals.get((_a = item.groupName) !== null && _a !== void 0 ? _a : "")) !== null && _b !== void 0 ? _b : 0} ${item.barLegend}`, "data-stack-index": stackIdx, "data-segment-index": segmentIdx, onClick: (ev) => this.handleSegmentClick(ev, item), onKeyDown: (ev) => this.handleSegmentKeyDown(ev, stackIdx, segmentIdx) })));
|
|
449
463
|
}
|
|
450
464
|
renderStacks() {
|
|
451
465
|
const stackNames = [...this.processedStacks.keys()];
|
|
@@ -466,7 +480,7 @@ export class ChartStack {
|
|
|
466
480
|
const total = (_a = this.stackTotals.get(stackName)) !== null && _a !== void 0 ? _a : 0;
|
|
467
481
|
return (h("div", { class: "print-table", "aria-hidden": "true" }, segments.map((item) => {
|
|
468
482
|
var _a, _b, _c;
|
|
469
|
-
return (h("div", { class: "print-row", key: `row-${stackName}-${item.barLegend}` }, h("div", { class: "print-legend" }, h("div", { class: `swatch ${this.getPatternClass(item)}`, style: { "--segment-color": `var(--${item.color})` } }), h("span", { class: "print-legend-name" }, item.barLegend)), h("span", { class: "print-percent" }, item.displayValue), h("span", { class: "print-fraction" }, item.amount, "/", total), h("span", { class: "print-text" }, (_c = (_a = item.popoverText) !== null && _a !== void 0 ? _a : (_b = this.config) === null || _b === void 0 ? void 0 : _b.popoverText) !== null && _c !== void 0 ? _c : "")));
|
|
483
|
+
return (h("div", { class: "print-row", key: `row-${stackName}-${item.barLegend}` }, h("div", { class: "print-legend" }, h("div", { class: `swatch horizontal ${this.getPatternClass(item)}`, style: { "--segment-color": `var(--${item.color})` } }), h("span", { class: "print-legend-name" }, item.barLegend)), h("span", { class: "print-percent" }, item.displayValue), h("span", { class: "print-fraction" }, item.amount, "/", total), h("span", { class: "print-text" }, (_c = (_a = item.popoverText) !== null && _a !== void 0 ? _a : (_b = this.config) === null || _b === void 0 ? void 0 : _b.popoverText) !== null && _c !== void 0 ? _c : "")));
|
|
470
484
|
})));
|
|
471
485
|
}
|
|
472
486
|
renderLegend(orientation) {
|
|
@@ -478,7 +492,7 @@ export class ChartStack {
|
|
|
478
492
|
render() {
|
|
479
493
|
var _a, _b, _c, _d;
|
|
480
494
|
const gridLineRow = this.processedStacks.size * (this.isPrintMode ? 2 : 1) + 1;
|
|
481
|
-
return (h(Host, { key: '
|
|
495
|
+
return (h(Host, { key: 'a02be9b6a7e8a570d12fc471ab0899c1d6bff609' }, h("div", { key: '27a456aca42c248c767a3d44d4fca43e27342113', class: "popover-wrapper" }, h("priv-chart-popover", { key: '710e6b9ed574358949d86736991a94ff23033e1b', ref: (el) => (this.popoverEl = el), onIntChartPopoverToggled: (ev) => this.handlePopoverToggled(ev) })), h("div", { key: 'c696620647c3a4bf69b8cbfdfd88fe0d56c0e9e4', ref: (el) => (this.componentWrapperEl = el), class: `component-wrapper ${this.isPrintMode ? "print-mode" : ""} ${this.isPatternMode ? "pattern-mode" : ""}`, tabindex: "0", role: "application", onKeyDown: (ev) => this.handleChartKeyDown(ev), onBlur: (ev) => this.handleComponentBlur(ev), "aria-roledescription": chartMessages.interactiveChart, "aria-describedby": "chart-instructions", "aria-label": (_a = this.config) === null || _a === void 0 ? void 0 : _a.label }, ((_c = (_b = this.config) === null || _b === void 0 ? void 0 : _b.showLabel) !== null && _c !== void 0 ? _c : true) && (h("label", { key: '7bcc1cdcf20e17af7078d5ddec312accafb0ee2a', id: "label", class: "label" }, h("span", { key: '4b1e5090ccbaf485a5efd543575056f77ecc3af8', class: "label-text" }, (_d = this.config) === null || _d === void 0 ? void 0 : _d.label), this.subinfoText && h("span", { key: '4eba44204c943e58e16a0edd2787315d44ae2f23', class: "subinfo" }, this.subinfoText))), this.showLegend === "top" && this.renderLegend("horizontal"), h("div", { key: 'c11932585eb98bc5b12ead052e6965d954d28b0f', class: "chart-body" }, this.showLegend === "left" && this.renderLegend("vertical"), h("div", { key: '772c6c62d2ff5ef996ca6e72bd18f174a5357dc3', class: `stacks ${this.isKeying ? "user-is-keying" : ""} ${this.showGrid ? "show-grid" : ""} ${this.isSingleStack ? "single-stack" : ""}`, ref: (el) => (this.stacksEl = el), style: { "--grid-line-row": `${gridLineRow}` } }, this.showGrid && h("div", { key: '85170b43d60832f82fca6588c39e0ccbcc00cede', class: "vertical-grid-line" }), this.renderStacks(), this.showGrid && (h("div", { key: 'ac782af53cf46f6797bb1a564fdbbc221fd8ea43', class: "x-axis" }, h("div", { key: 'f6175cb9012164eda83c920edc9746c25753bc1e', class: "x-axis-line" }), h("div", { key: 'd218b9ce3d734dd6e218f16d944e93199ac52580', class: "x-axis-ticks" }, h("span", { key: 'eff3d60abf1a6ca2cbaf0247996d891d3cbfadad', class: "tick zero" }, "0%"), h("span", { key: '8767b56809d269272bdc1ef9ccd4d194e6c79070', class: "tick end" }, "100%"))))), this.showLegend === "right" && this.renderLegend("vertical")), this.showLegend === "bottom" && this.renderLegend("horizontal"), !this.isPrintMode && (h("div", { key: '1d9a5524f1669987d19daa5d5fff5dcde93fe4ba', class: `hidden-values-warning ${this.hasHiddenValues ? "" : "hidden"}` }, stackChartMessages.hiddenValues)), renderInstructionsText())));
|
|
482
496
|
}
|
|
483
497
|
static get is() { return "wm-chart-stack"; }
|
|
484
498
|
static get encapsulation() { return "shadow"; }
|
|
@@ -106,6 +106,16 @@ document.getElementById("pattern-mode-checkbox").addEventListener("change", (ev)
|
|
|
106
106
|
const dataJsonInput = document.getElementById("data-json-input");
|
|
107
107
|
|
|
108
108
|
function setChartData(data) {
|
|
109
|
+
// Restore a config if it was cleared (e.g. via the Unset preset) so the chart re-renders.
|
|
110
|
+
if (!stackChart1.config) {
|
|
111
|
+
stackChart1.config = {
|
|
112
|
+
label: "Year 1 Cohort Submission Status by Requirement",
|
|
113
|
+
subinfo: "Progress of completion of licensure requirements",
|
|
114
|
+
colors: "semantic",
|
|
115
|
+
showLegend: "top",
|
|
116
|
+
valueFormat: "percentage",
|
|
117
|
+
};
|
|
118
|
+
}
|
|
109
119
|
stackChart1.data = data;
|
|
110
120
|
if (dataJsonInput) {
|
|
111
121
|
dataJsonInput.value = JSON.stringify(data, null, 2);
|
|
@@ -178,6 +188,15 @@ document.getElementById("preset-popover").addEventListener("click", () => {
|
|
|
178
188
|
]);
|
|
179
189
|
});
|
|
180
190
|
|
|
191
|
+
// Preset: Unset config and data (test the data -> no data transition)
|
|
192
|
+
document.getElementById("preset-unset").addEventListener("click", () => {
|
|
193
|
+
stackChart1.config = undefined;
|
|
194
|
+
stackChart1.data = undefined;
|
|
195
|
+
if (dataJsonInput) {
|
|
196
|
+
dataJsonInput.value = "";
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
|
|
181
200
|
// Initialize JSON textarea with current data after chart loads
|
|
182
201
|
setTimeout(() => {
|
|
183
202
|
if (stackChart1 && stackChart1.data && dataJsonInput) {
|
package/dist/docs/docs.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-07-
|
|
2
|
+
"timestamp": "2026-07-01T21:46:53",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.21.0",
|
|
@@ -2894,6 +2894,14 @@
|
|
|
2894
2894
|
"tag": "wm-chart-stack",
|
|
2895
2895
|
"docs": "Renders a horizontal stacked bar chart: each stack's segments are sized as a percentage of\nthat stack's total. Supports any number of stacks and segments, each occupying their own row.\nData and configuration are set via JavaScript properties (`chart.config` and `chart.data`) — not\nHTML attributes.",
|
|
2896
2896
|
"docsTags": [
|
|
2897
|
+
{
|
|
2898
|
+
"name": "displayName",
|
|
2899
|
+
"text": "Stack Chart"
|
|
2900
|
+
},
|
|
2901
|
+
{
|
|
2902
|
+
"name": "category",
|
|
2903
|
+
"text": "Data Visualization"
|
|
2904
|
+
},
|
|
2897
2905
|
{
|
|
2898
2906
|
"name": "keyboardInteraction",
|
|
2899
2907
|
"text": "- **Tab**: Enters the chart wrapper.\n- **Arrow Down / Right**: Focuses the first segment.\n- **Arrow Left / Right**: Moves to the previous / next segment within the stack, wrapping at the ends.\n- **Arrow Up / Down**: Moves to the previous / next stack (focusing its first segment), wrapping at the ends.\n- **Enter**: Activates the popover button when the popover is open.\n- **Escape**: Closes the open popover.\n- **Tab** (from within): Exits the chart and clears focus."
|
|
@@ -2910,13 +2918,17 @@
|
|
|
2910
2918
|
"name": "example",
|
|
2911
2919
|
"text": "{html} Single stack\n<wm-chart-stack id=\"submission-status\"></wm-chart-stack>\n<script>\nconst chart = document.querySelector('#submission-status');\nchart.config = { label: 'Submission status', colors: 'semantic', showLegend: 'top' };\nchart.data = [\n{ stackName: 'Status', legend: 'Not Submitted', amount: 2 },\n{ stackName: 'Status', legend: 'Awaiting Review', amount: 4 },\n{ stackName: 'Status', legend: 'Met', amount: 10 },\n{ stackName: 'Status', legend: 'Not Met', amount: 4 },\n];\n</script>"
|
|
2912
2920
|
},
|
|
2921
|
+
{
|
|
2922
|
+
"name": "example",
|
|
2923
|
+
"text": "{react} Single stack\n<WmChartStack ref={chartRef} />\n// In useEffect: chartRef.current.config = {...}; chartRef.current.data = [...];"
|
|
2924
|
+
},
|
|
2913
2925
|
{
|
|
2914
2926
|
"name": "example",
|
|
2915
2927
|
"text": "{html} Grouped (multiple stacks)\n<wm-chart-stack id=\"status-by-requirement\"></wm-chart-stack>\n<script>\nconst chart = document.querySelector('#status-by-requirement');\nchart.config = { label: 'Status by requirement', colors: 'semantic', showLegend: 'top' };\nchart.data = [\n{ stackName: 'Requirement 01', legend: 'Met', amount: 12 },\n{ stackName: 'Requirement 01', legend: 'Not Met', amount: 12 },\n{ stackName: 'Requirement 02', legend: 'Met', amount: 33 },\n{ stackName: 'Requirement 02', legend: 'Not Met', amount: 67 },\n];\n</script>"
|
|
2916
2928
|
},
|
|
2917
2929
|
{
|
|
2918
2930
|
"name": "example",
|
|
2919
|
-
"text": "{react}
|
|
2931
|
+
"text": "{react} Grouped (multiple stacks)\n<WmChartStack ref={chartRef} />\n// In useEffect: chartRef.current.config = {...}; chartRef.current.data = [...];"
|
|
2920
2932
|
}
|
|
2921
2933
|
],
|
|
2922
2934
|
"usage": {},
|
package/dist/docs/skill/index.md
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
| **Column Chart** | `wm-chart-column` | `wm-chart-column.md` | Data Visualization |
|
|
17
17
|
| **Line Chart** | `wm-line-chart` | `wm-line-chart.md` | Data Visualization |
|
|
18
18
|
| **Progress Monitor** | `wm-progress-monitor` | `wm-progress-monitor.md` | Data Visualization |
|
|
19
|
+
| **Stack Chart** | `wm-chart-stack` | `wm-chart-stack.md` | Data Visualization |
|
|
19
20
|
| **Date Range** | `wm-date-range` | `wm-date-range.md` | Form Inputs |
|
|
20
21
|
| **Datepicker** | `wm-datepicker` | `wm-datepicker.md` | Form Inputs |
|
|
21
22
|
| **File List** | `wm-file-list` | `wm-file-list.md` | Form Inputs |
|
|
@@ -46,8 +46,8 @@ one or more wm-menuitem children.
|
|
|
46
46
|
- _(default)_ -- One or more wm-menuitem elements.
|
|
47
47
|
|
|
48
48
|
**Events:**
|
|
49
|
-
- `menuLoaded` _(deprecated: Use wmActionMenuLoaded instead.)_
|
|
50
|
-
- `wmActionMenuLoaded`
|
|
49
|
+
- `menuLoaded` -- Fires when the component finishes loading. _(deprecated: Use wmActionMenuLoaded instead.)_
|
|
50
|
+
- `wmActionMenuLoaded` -- Fires when the component finishes loading and child wm-menuitem elements are ready.
|
|
51
51
|
|
|
52
52
|
**Accessibility:**
|
|
53
53
|
|
|
@@ -27,9 +27,11 @@ charts automatically. _(default: `""`)_
|
|
|
27
27
|
legend -- suitable for printed output. _(default: `false`)_
|
|
28
28
|
|
|
29
29
|
**Events:**
|
|
30
|
-
- `wmLegendItemClick`
|
|
30
|
+
- `wmLegendItemClick` -- Fires when the user clicks a legend item. The associated chart highlights
|
|
31
|
+
the corresponding bar(s) and fades all others. Detail: `{{ idx: number }} idx -- zero-based index of the clicked legend item, or
|
|
31
32
|
`-1` to clear all highlights.`
|
|
32
|
-
- `wmLegendItemHover`
|
|
33
|
+
- `wmLegendItemHover` -- Fires when the user hovers over a legend item. The associated chart
|
|
34
|
+
highlights the corresponding bar(s) and fades all others. Detail: `{{ idx: number }} idx -- zero-based index of the hovered legend item, or
|
|
33
35
|
`-1` to clear all highlights.`
|
|
34
36
|
|
|
35
37
|
**Code example:**
|
|
@@ -90,7 +90,7 @@ chart.data = [
|
|
|
90
90
|
</script>
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
_Single stack_
|
|
94
94
|
|
|
95
95
|
```react
|
|
96
96
|
<WmChartStack ref={chartRef} />
|
|
@@ -111,4 +111,11 @@ chart.data = [
|
|
|
111
111
|
{ stackName: 'Requirement 02', legend: 'Not Met', amount: 67 },
|
|
112
112
|
];
|
|
113
113
|
</script>
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
_Grouped (multiple stacks)_
|
|
117
|
+
|
|
118
|
+
```react
|
|
119
|
+
<WmChartStack ref={chartRef} />
|
|
120
|
+
// In useEffect: chartRef.current.config = {...}; chartRef.current.data = [...];
|
|
114
121
|
```
|
|
@@ -53,12 +53,12 @@ Updated as the user types or picks from the calendar. _(default: `""`)_
|
|
|
53
53
|
Updated as the user types or picks from the calendar. _(default: `""`)_
|
|
54
54
|
|
|
55
55
|
**Events:**
|
|
56
|
-
- `wmEndInputBlur`
|
|
57
|
-
- `wmRangeSelection` Detail: `{{ startDate: { iso: string, us: string, int: string }, endDate: { iso: string, us: string, int: string } }}
|
|
56
|
+
- `wmEndInputBlur` -- Fires when the end date input loses focus.
|
|
57
|
+
- `wmRangeSelection` -- Fires when the user completes a range selection from the calendar popup. Detail: `{{ startDate: { iso: string, us: string, int: string }, endDate: { iso: string, us: string, int: string } }}
|
|
58
58
|
startDate and endDate -- each formatted in ISO (YYYY-MM-DD), US (mm/dd/yyyy), and INT
|
|
59
59
|
(dd/mm/yyyy). The dates are always returned in chronological order regardless of the order
|
|
60
60
|
they were clicked.`
|
|
61
|
-
- `wmStartInputBlur`
|
|
61
|
+
- `wmStartInputBlur` -- Fires when the start date input loses focus.
|
|
62
62
|
|
|
63
63
|
**Methods:**
|
|
64
64
|
- `isValidISO(input?: string) => Promise<boolean>`
|
|
@@ -37,8 +37,8 @@ _None documented_
|
|
|
37
37
|
- `value` -- The date displayed in the input field, in the format specified by `date-format`. Updated as the user types. Can also be set programmatically by the application. _(default: `""`)_
|
|
38
38
|
|
|
39
39
|
**Events:**
|
|
40
|
-
- `wmDatepickerDateSelected` Detail: `{{ date: string }} date -- the selected date in ISO format (YYYY-MM-DD).`
|
|
41
|
-
- `wmDatepickerInputBlurred`
|
|
40
|
+
- `wmDatepickerDateSelected` -- Fires when the user selects a date from the calendar popup. Detail: `{{ date: string }} date -- the selected date in ISO format (YYYY-MM-DD).`
|
|
41
|
+
- `wmDatepickerInputBlurred` -- Fires when the text input loses focus.
|
|
42
42
|
|
|
43
43
|
**Methods:**
|
|
44
44
|
- `isValidIso(input?: string) => Promise<boolean>`
|
|
@@ -31,10 +31,10 @@ from the parent wm-file-list or wm-uploader when set there. _(type: `"all" | "la
|
|
|
31
31
|
(e.g. `"Uploaded by Smith, John"`).
|
|
32
32
|
|
|
33
33
|
**Events:**
|
|
34
|
-
- `wmFileDelete`
|
|
35
|
-
- `wmFileDownload`
|
|
36
|
-
- `wmFileErrorCleared`
|
|
37
|
-
- `wmFilePreview`
|
|
34
|
+
- `wmFileDelete` -- Fires when the delete button is clicked.
|
|
35
|
+
- `wmFileDownload` -- Fires when the download button is clicked.
|
|
36
|
+
- `wmFileErrorCleared` -- Fires when the user clears a file error by clicking the Clear button.
|
|
37
|
+
- `wmFilePreview` -- Fires when the preview button is clicked.
|
|
38
38
|
|
|
39
39
|
**Accessibility:**
|
|
40
40
|
|
|
@@ -65,10 +65,11 @@ in the footer. Fires `wmFlyoutSecondaryTriggered` when clicked.
|
|
|
65
65
|
- _(default)_ -- Main content of the flyout body.
|
|
66
66
|
|
|
67
67
|
**Events:**
|
|
68
|
-
- `wmFlyoutBreadcrumbClicked` Detail: `{{ breadcrumb: string, index: number }} breadcrumb -- the label of the clicked breadcrumb; index -- its zero-based position in the original CSV list.`
|
|
69
|
-
- `wmFlyoutCloseTriggered`
|
|
70
|
-
|
|
71
|
-
- `
|
|
68
|
+
- `wmFlyoutBreadcrumbClicked` -- Fires when a breadcrumb button (any non-last breadcrumb) is clicked. Detail: `{{ breadcrumb: string, index: number }} breadcrumb -- the label of the clicked breadcrumb; index -- its zero-based position in the original CSV list.`
|
|
69
|
+
- `wmFlyoutCloseTriggered` -- Fires when the close button is clicked, Escape is pressed, or the native
|
|
70
|
+
dialog close event fires. The host application must set `open` to false in response.
|
|
71
|
+
- `wmFlyoutPrimaryTriggered` -- Fires when the primary footer button is clicked.
|
|
72
|
+
- `wmFlyoutSecondaryTriggered` -- Fires when the secondary footer button is clicked.
|
|
72
73
|
|
|
73
74
|
**Methods:**
|
|
74
75
|
- `focusHeading() => Promise<void>`
|
|
@@ -52,7 +52,8 @@ symbol prefixes/suffixes, and inline info/error messaging. Use instead of a nati
|
|
|
52
52
|
- `value` -- The initial value of the input field, or its current value when reading from the component. _(default: `""`)_
|
|
53
53
|
|
|
54
54
|
**Events:**
|
|
55
|
-
- `wmInputValueChanged`
|
|
55
|
+
- `wmInputValueChanged` -- Fires on blur when the input value has changed since the last blur. Use the
|
|
56
|
+
native `input` event if you need to react to every keystroke. Detail: `{{ value: string }} value -- the current value of the input at the time of blur.`
|
|
56
57
|
|
|
57
58
|
**Accessibility:**
|
|
58
59
|
|
|
@@ -23,7 +23,8 @@ or an MDI character code (deprecated). Incompatible with `description`.
|
|
|
23
23
|
- _(default)_ -- The visible label text for the menu item.
|
|
24
24
|
|
|
25
25
|
**Events:**
|
|
26
|
-
- `wmMenuitemClicked`
|
|
26
|
+
- `wmMenuitemClicked` -- Fires when the menu item is clicked or Enter is pressed while focused.
|
|
27
|
+
Consumed by the parent wm-action-menu to close the dropdown.
|
|
27
28
|
|
|
28
29
|
**Accessibility:**
|
|
29
30
|
|
|
@@ -54,9 +54,11 @@ generated if absent -- do not set this prop manually. _(required)_
|
|
|
54
54
|
- _(default)_ -- Modal content: wm-modal-header, body content, and wm-modal-footer.
|
|
55
55
|
|
|
56
56
|
**Events:**
|
|
57
|
-
- `wmModalCloseTriggered`
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
- `wmModalCloseTriggered` -- Fires when the close button is clicked or Escape is pressed. Does not bubble,
|
|
58
|
+
preventing nested modals from closing simultaneously. The host application must set `open`
|
|
59
|
+
to false in response.
|
|
60
|
+
- `wmModalPrimaryTriggered` -- Fires when the wm-modal-footer primary button is clicked.
|
|
61
|
+
- `wmModalSecondaryTriggered` -- Fires when the wm-modal-footer secondary button is clicked.
|
|
60
62
|
|
|
61
63
|
**Methods:**
|
|
62
64
|
- `emitCloseEvent() => Promise<void>`
|
|
@@ -29,7 +29,8 @@ _None documented_
|
|
|
29
29
|
linking and for keeping `aria-expanded` in sync with the navigation's open state.
|
|
30
30
|
|
|
31
31
|
**Events:**
|
|
32
|
-
- `wmNavigationHamburgerClicked`
|
|
32
|
+
- `wmNavigationHamburgerClicked` -- Fires when the button is clicked. Consumed by the associated wm-navigation
|
|
33
|
+
to toggle its `open` state -- not intended for direct application use.
|
|
33
34
|
|
|
34
35
|
**Accessibility:**
|
|
35
36
|
|
|
@@ -33,7 +33,8 @@ _None documented_
|
|
|
33
33
|
- _(default)_ -- Optional icon element displayed before the link text.
|
|
34
34
|
|
|
35
35
|
**Events:**
|
|
36
|
-
- `wmNavigationItemClicked`
|
|
36
|
+
- `wmNavigationItemClicked` -- Fires when the link is clicked. Consumed by the parent wm-navigation to
|
|
37
|
+
close the collapsible menu on narrow viewports.
|
|
37
38
|
|
|
38
39
|
**Accessibility:**
|
|
39
40
|
|
|
@@ -34,7 +34,8 @@ on viewports wider than 1024px where the navigation is always visible. _(default
|
|
|
34
34
|
- _(default)_ -- One or more wm-navigation-item elements.
|
|
35
35
|
|
|
36
36
|
**Events:**
|
|
37
|
-
- `wmNavigationStateChanged`
|
|
37
|
+
- `wmNavigationStateChanged` -- Fires when the collapsible navigation opens or closes. Consumed by
|
|
38
|
+
wm-navigation-hamburger to keep its `aria-expanded` state in sync.
|
|
38
39
|
|
|
39
40
|
**Accessibility:**
|
|
40
41
|
|
|
@@ -48,7 +48,9 @@ Each object must include `id`, `name`, `icon_url`, and either `link_url` (auth-t
|
|
|
48
48
|
- `user-name` -- The display name of the logged-in user, shown in the menu header.
|
|
49
49
|
|
|
50
50
|
**Events:**
|
|
51
|
-
- `wmNavigatorLogout`
|
|
51
|
+
- `wmNavigatorLogout` -- Fires when the user clicks the logout option. Always handle this event to
|
|
52
|
+
run app-specific cleanup (e.g. clearing local storage or session state) before any logout
|
|
53
|
+
redirect. If `logout-url` is set, the component will navigate there after this event fires.
|
|
52
54
|
|
|
53
55
|
**Accessibility:**
|
|
54
56
|
|
|
@@ -57,7 +57,8 @@ group. _(default: `false`)_
|
|
|
57
57
|
`multiple` to be set. _(default: `false`)_
|
|
58
58
|
|
|
59
59
|
**Events:**
|
|
60
|
-
- `wmNestedSelectBlurred`
|
|
60
|
+
- `wmNestedSelectBlurred` -- Fires when focus leaves the component entirely (not when moving between
|
|
61
|
+
internal elements such as options or group buttons).
|
|
61
62
|
|
|
62
63
|
**Accessibility:**
|
|
63
64
|
|
|
@@ -20,8 +20,8 @@ of its options. _(default: `false`)_
|
|
|
20
20
|
dropdown menu. _(required)_
|
|
21
21
|
|
|
22
22
|
**Events:**
|
|
23
|
-
- `wmOptgroupAllDeselected`
|
|
24
|
-
- `wmOptgroupAllSelected`
|
|
23
|
+
- `wmOptgroupAllDeselected` -- Fires when the "Deselect All" button inside this group is activated.
|
|
24
|
+
- `wmOptgroupAllSelected` -- Fires when the "Select All" button inside this group is activated.
|
|
25
25
|
|
|
26
26
|
**Methods:**
|
|
27
27
|
- `emitDeselection() => Promise<void>`
|
|
@@ -24,8 +24,8 @@ or modifies this value -- it is purely a pass-through for application code to at
|
|
|
24
24
|
or key. _(type: `null | string`)_
|
|
25
25
|
|
|
26
26
|
**Events:**
|
|
27
|
-
- `wmOptionDeselected` Detail: ``HTMLWmOptionElement` -- the option element that was deselected.`
|
|
28
|
-
- `wmOptionSelected` Detail: ``HTMLWmOptionElement` -- the option element that was selected.`
|
|
27
|
+
- `wmOptionDeselected` -- Fires when this option is deselected by the user (multiselect mode only). Detail: ``HTMLWmOptionElement` -- the option element that was deselected.`
|
|
28
|
+
- `wmOptionSelected` -- Fires when this option is selected by the user. Detail: ``HTMLWmOptionElement` -- the option element that was selected.`
|
|
29
29
|
|
|
30
30
|
**Code example:**
|
|
31
31
|
|
|
@@ -45,7 +45,9 @@ calculate the total page count.
|
|
|
45
45
|
`event.target.value` in the `wmPaginationPageClicked` handler to get the selected page. _(default: `1`)_
|
|
46
46
|
|
|
47
47
|
**Events:**
|
|
48
|
-
- `wmPaginationPageClicked`
|
|
48
|
+
- `wmPaginationPageClicked` -- Fires when the user clicks a page number, previous, or next button.
|
|
49
|
+
Read `event.target.value` to get the selected page number, then update `current-page`
|
|
50
|
+
and re-render your data.
|
|
49
51
|
|
|
50
52
|
**Accessibility:**
|
|
51
53
|
|
|
@@ -33,7 +33,8 @@ and collapses to bars when it cannot. _(type: `number | string`)_
|
|
|
33
33
|
in bar layout mode (e.g. `"Completed,Not Completed"`). Keys cannot contain commas.
|
|
34
34
|
|
|
35
35
|
**Events:**
|
|
36
|
-
- `wmProgressMonitorModeChange`
|
|
36
|
+
- `wmProgressMonitorModeChange` -- Fires once on load and again whenever the layout switches between `"doughnut"`
|
|
37
|
+
and `"bar"` modes. Use this to synchronize external UI that depends on the current layout. Detail: ``"doughnut" | "bar"` -- the new layout mode.`
|
|
37
38
|
|
|
38
39
|
**Code example:**
|
|
39
40
|
|