@watermarkinsights/ripple 5.23.0-alpha.0 → 5.23.0-alpha.1

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.
Files changed (39) hide show
  1. package/dist/cjs/{app-globals-d75466f5.js → app-globals-d5560aa2.js} +1 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/priv-chart-popover_2.cjs.entry.js +2 -2
  4. package/dist/cjs/ripple.cjs.js +1 -1
  5. package/dist/cjs/wm-chart-bar.cjs.entry.js +7 -7
  6. package/dist/cjs/wm-option_2.cjs.entry.js +50 -31
  7. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +2 -2
  8. package/dist/collection/components/charts/wm-chart-bar/wm-chart-bar.css +5 -3
  9. package/dist/collection/components/charts/wm-chart-bar/wm-chart-bar.js +7 -7
  10. package/dist/collection/components/charts/wm-chart-legend/wm-chart-legend.js +2 -2
  11. package/dist/collection/components/selects/wm-select/wm-select.js +50 -31
  12. package/dist/collection/dev/chart-bar.js +8 -8
  13. package/dist/esm/{app-globals-be942f12.js → app-globals-2d0df1cb.js} +1 -1
  14. package/dist/esm/loader.js +1 -1
  15. package/dist/esm/priv-chart-popover_2.entry.js +2 -2
  16. package/dist/esm/ripple.js +1 -1
  17. package/dist/esm/wm-chart-bar.entry.js +7 -7
  18. package/dist/esm/wm-option_2.entry.js +50 -31
  19. package/dist/esm-es5/{app-globals-be942f12.js → app-globals-2d0df1cb.js} +1 -1
  20. package/dist/esm-es5/loader.js +1 -1
  21. package/dist/esm-es5/priv-chart-popover_2.entry.js +1 -1
  22. package/dist/esm-es5/ripple.js +1 -1
  23. package/dist/esm-es5/wm-chart-bar.entry.js +1 -1
  24. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  25. package/dist/ripple/{p-5a5456e8.js → p-0d03f838.js} +1 -1
  26. package/dist/ripple/p-1eae5841.entry.js +1 -0
  27. package/dist/ripple/{p-efe93044.entry.js → p-21480984.entry.js} +1 -1
  28. package/dist/ripple/{p-77de2d9e.system.entry.js → p-2f925b25.system.entry.js} +1 -1
  29. package/dist/ripple/{p-6ea645ee.system.entry.js → p-60aa6bec.system.entry.js} +1 -1
  30. package/dist/ripple/{p-bd4a3dd8.system.entry.js → p-62cdc8c6.system.entry.js} +1 -1
  31. package/dist/ripple/{p-dcb1935c.entry.js → p-6646191c.entry.js} +1 -1
  32. package/dist/ripple/{p-4c727f0f.system.js → p-874cc540.system.js} +1 -1
  33. package/dist/ripple/{p-1806bab8.system.js → p-8aee3856.system.js} +1 -1
  34. package/dist/ripple/ripple.esm.js +1 -1
  35. package/dist/ripple/ripple.js +1 -1
  36. package/dist/types/components/selects/wm-select/wm-select.d.ts +4 -2
  37. package/dist/types/global/interfaces.d.ts +2 -3
  38. package/package.json +3 -3
  39. package/dist/ripple/p-a68d6bed.entry.js +0 -1
@@ -455,55 +455,74 @@ const Select = class {
455
455
  }
456
456
  this.announcement = message;
457
457
  }
458
- renderButtonText() {
459
- this.displayedOptions = this.childOptions.filter((x) => x.selected);
460
- if (this.multiple && this.displayedOptions.length < 1) {
461
- return index.h("span", null, this.placeholder);
458
+ handleOverflow() {
459
+ // handle overflow + counter for multiselect
460
+ // this is a fixed measurement accounting for the max width of a 3 character overflow counter
461
+ const overflowCounterWidth = 38;
462
+ const computedStyle = window.getComputedStyle(this.buttonEl);
463
+ // there seems to be no quick way to get an elements width without padding, except for subtracting padding manually
464
+ const paddingLeft = parseInt(computedStyle.getPropertyValue("padding-left").slice(0, -2));
465
+ const paddingRight = parseInt(computedStyle.getPropertyValue("padding-right").slice(0, -2));
466
+ const availableSpace = this.buttonEl.clientWidth - paddingLeft - paddingRight - overflowCounterWidth;
467
+ this.overflowCount = 0;
468
+ this.measurementAreaEl.textContent = this.displayedOptions.map((x) => x.textContent).join(", ");
469
+ let optionsTotalWidth = this.measurementAreaEl.clientWidth;
470
+ while (optionsTotalWidth > availableSpace && this.displayedOptions.length > 1) {
471
+ this.overflowCount++;
472
+ this.displayedOptions.pop();
473
+ this.measurementAreaEl.textContent = this.displayedOptions.map((x) => x.textContent).join(", ");
474
+ optionsTotalWidth = this.measurementAreaEl.clientWidth;
462
475
  }
463
- else if (this.multiple && this.allSelected && this.overflowCount > 0) {
464
- return this.allSelectedMessage;
476
+ }
477
+ setButtonText() {
478
+ if (!this.multiple) {
479
+ const selEl = this.childOptions.filter((x) => x.selected)[0];
480
+ return selEl ? selEl.textContent : "";
465
481
  }
466
482
  else {
467
- // handle overflow + counter for multiselect
468
- // only bother if things have changed
483
+ this.displayedOptions = this.childOptions.filter((x) => x.selected);
469
484
  const hasChanged = this.displayedOptions !== this.previousDisplayedOptions;
470
- if (this.multiple && hasChanged) {
471
- // this is a fixed measurement accounting for the max width of a 3 character overflow counter
472
- const overflowCounterWidth = 38;
473
- const computedStyle = window.getComputedStyle(this.buttonEl);
474
- // there seems to be no quick way to get an elements width without padding, except for subtracting padding manually
475
- const paddingLeft = parseInt(computedStyle.getPropertyValue("padding-left").slice(0, -2));
476
- const paddingRight = parseInt(computedStyle.getPropertyValue("padding-right").slice(0, -2));
477
- const availableSpace = this.buttonEl.clientWidth - paddingLeft - paddingRight - overflowCounterWidth;
478
- this.overflowCount = 0;
479
- this.measurementAreaEl.textContent = this.displayedOptions.map((x) => x.textContent).join(", ");
480
- let optionsTotalWidth = this.measurementAreaEl.clientWidth;
481
- while (optionsTotalWidth > availableSpace && this.displayedOptions.length > 1) {
482
- this.overflowCount++;
483
- this.displayedOptions.pop();
484
- this.measurementAreaEl.textContent = this.displayedOptions.map((x) => x.textContent).join(", ");
485
- optionsTotalWidth = this.measurementAreaEl.clientWidth;
485
+ const noDisplayedOptions = this.displayedOptions.length < 1;
486
+ if (noDisplayedOptions) {
487
+ return this.placeholder;
488
+ }
489
+ else if (!this.buttonEl) {
490
+ index.forceUpdate(this.el);
491
+ return "";
492
+ }
493
+ else if (hasChanged) {
494
+ this.handleOverflow();
495
+ // we need to calc overflowcount as we only want to display allSelected message if there is an overflow...
496
+ if (this.overflowCount > 0 && this.allSelected) {
497
+ // ...but it should be reset so it isn't displayed in that case
498
+ this.overflowCount = 0;
499
+ this.buttonText = this.allSelectedMessage;
500
+ }
501
+ else {
502
+ this.buttonText = this.displayedOptions.map((x) => x.textContent).join(", ");
486
503
  }
487
- this.previousDisplayedOptions = this.displayedOptions;
488
504
  }
489
- return this.displayedOptions.map((x, idx) => (index.h("span", null, idx > 0 ? ", " : "", x.textContent)));
505
+ this.previousDisplayedOptions = this.displayedOptions;
506
+ // the reason for setting a global variable and returning it
507
+ // is that we need the stored value when displayedOptions haven't changed.
508
+ return this.buttonText; // multiselect value
490
509
  }
491
510
  }
492
511
  renderOverflowCount() {
493
- if (this.overflowCount > 0 && !this.allSelected) {
512
+ if (this.overflowCount > 0) {
494
513
  return (index.h("span", null, index.h("span", { class: "overflow-counter" }, "+", this.overflowCount)));
495
514
  }
496
515
  }
497
516
  render() {
498
517
  const showSubinfo = !this.multiple && this.selectedOptions.length > 0 && this.selectedOptions[0].subinfo;
499
- return (index.h(index.Host, { key: 'e58f2afa4361d7e27f94175a32acb0f93701cf76', onBlur: (ev) => this.handleComponentBlur(ev) }, index.h("div", { key: '13de69b572a4af34c1abc0002bbc8a87dc7d521a', class: `wrapper ${functions.getTextDir()} label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, index.h("div", { key: 'd234f604a3f94f843617733f6a8f5baaabc098d3', class: "label-wrapper" }, index.h("label", { key: '9dac4166a74898241e6422cd93023e5980d015bf', class: "label", id: "label", htmlFor: "selectbtn", onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => functions.hideTooltip() }, this.label),
518
+ return (index.h(index.Host, { key: '9a0a5c13f988c06c380ed732da86365c28446e77', onBlur: (ev) => this.handleComponentBlur(ev) }, index.h("div", { key: '3aa70cdc8f541d6f93ff99cbe44d6192bcba364b', class: `wrapper ${functions.getTextDir()} label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, index.h("div", { key: '899522611760999dca554ab63bfa0f5c831d0542', class: "label-wrapper" }, index.h("label", { key: '0730c044f78edc158ac6a2de09ea05a09ddecd23', class: "label", id: "label", htmlFor: "selectbtn", onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => functions.hideTooltip() }, this.label),
500
519
  // we can't use aria-required because the listbox is in a sub-component and it is not announced
501
- this.requiredField && (index.h("span", { key: '788b4c52a1e59bfb425f909374f722b5856b8fb3', class: "required" }, index.h("span", { key: '95cbdb98f925a5b80579a77147151903f2f63618', class: "sr-only" }, intl.globalMessages.requiredField), index.h("span", { key: 'ca3dacb55461f2cd7f5b81c746e5b70d8bd82f27', "aria-hidden": "true" }, "*")))), index.h("div", { key: '65cb0cbfe742c251b082adc84af5648a54ff4f12', class: "button-wrapper" }, index.h("button", { key: '8731a753912360eeb0ed4b60019463bf4398f8ae', id: "selectbtn", disabled: this.isDisabled, "aria-labelledby": "label selectbtn", "aria-describedby": "error", popoverTarget: "dropdown", popoverTargetAction: "toggle", class: "displayedoption", ref: (el) => (this.buttonEl = el) }, index.h("span", { key: 'e8d751bedfcc1922416fc177f43153ed2dfa0f84', class: `overflowcontrol ${showSubinfo ? "hassubinfo" : ""}` }, index.h("span", { key: '104277dfd731f7138889d573ad33ab7e5f8f4ffe', class: "button-text" }, this.renderButtonText()), showSubinfo && index.h("span", { key: 'cddb5d3cb91877c2adf73978e2e3114e3a148999', class: "subinfo" }, this.selectedOptions[0].subinfo)), index.h("div", { key: 'e4e76e115d85e4a3d24a17d762dec65091c14c69', class: `expand-icon svg-icon ${this.isExpanded ? "svg-expand-less" : "svg-expand-more"}` }), this.renderOverflowCount(), index.h("div", { key: '910df5182752522e9a709afbbb9d885b4cb93f46', ref: (el) => (this.measurementAreaEl = el), class: "measurement-area", "aria-hidden": "true" })), index.h("div", { key: '620f6414a70890323eb11958ff2c17415a86e437',
520
+ this.requiredField && (index.h("span", { key: 'b453a4c0fbd8973d62a7cfdc4e37537ab94dfed8', class: "required" }, index.h("span", { key: '53699fcc342d68b1fb24180cb13a524ab58038c4', class: "sr-only" }, intl.globalMessages.requiredField), index.h("span", { key: 'b7489dbe7ee74b6c46d30002762f10624f26cad7', "aria-hidden": "true" }, "*")))), index.h("div", { key: 'b44b002b4a5b34cf0958a8ddfc9efcb6934873f0', class: "button-wrapper" }, index.h("button", { key: 'b6f5d59e8399d894c2bb7cbfd4c9b5e57a7bfc4a', id: "selectbtn", disabled: this.isDisabled, "aria-labelledby": "label selectbtn", "aria-describedby": "error", popoverTarget: "dropdown", popoverTargetAction: "toggle", class: "displayedoption", ref: (el) => (this.buttonEl = el) }, index.h("span", { key: 'c4d37441c2e76ecf5c03b6a22cabbec2d16c77bc', class: `overflowcontrol ${showSubinfo ? "hassubinfo" : ""}` }, index.h("span", { key: 'baa91ff63a3d7d33be866337237408f38f46cc60', class: "button-text" }, this.setButtonText()), showSubinfo && index.h("span", { key: '5ed44f71ef8184df2bfee442fa94e496f9305b54', class: "subinfo" }, this.selectedOptions[0].subinfo)), index.h("div", { key: 'd0e3a1bade399be089b1f38e33281ca5f1e6cc03', class: `expand-icon svg-icon ${this.isExpanded ? "svg-expand-less" : "svg-expand-more"}` }), this.renderOverflowCount(), index.h("div", { key: '2a43776bb5a5cccc79796939ca9be7b7b8ee569a', ref: (el) => (this.measurementAreaEl = el), class: "measurement-area", "aria-hidden": "true" })), index.h("div", { key: 'eac706ae0781e210c89aed74dded805472a01996',
502
521
  // is-open is for the CSS transition in modern browsers
503
522
  // hidden is to wait for position calculations in Firefox
504
523
  class: `dropdown ${this.isExpanded ? "is-open" : ""} ${this.isHidden ? "hidden" : ""} ${this.openUp ? "upward" : ""}`, id: "dropdown", popover: "auto", ref: (el) => (this.dropdownEl = el),
505
524
  // @ts-ignore -- don't tell typescript but we're in the future
506
- onToggle: (ev) => this.handleToggle(ev) }, index.h("priv-option-list", { key: 'a059818c76eaad5b43895e30cc9a40ada0bc3ffa', ref: (el) => (this.optionListEl = el), multiple: this.multiple, search: this.search, selectAll: this.selectAll, maxHeight: this.maxHeight, searchPlaceholder: this.searchPlaceholder, onOptionListCloseRequested: () => {
525
+ onToggle: (ev) => this.handleToggle(ev) }, index.h("priv-option-list", { key: '3ba4da015a18e38b1a6fddd6788886d4dc551cd1', ref: (el) => (this.optionListEl = el), multiple: this.multiple, search: this.search, selectAll: this.selectAll, maxHeight: this.maxHeight, searchPlaceholder: this.searchPlaceholder, onOptionListCloseRequested: () => {
507
526
  this.dropdownEl.hidePopover();
508
527
  }, onOptionListAllSelected: () => {
509
528
  this.returnFocus = true;
@@ -511,7 +530,7 @@ const Select = class {
511
530
  }, onOptionListAllDeselected: () => {
512
531
  this.returnFocus = true;
513
532
  this.wmSelectAllDeselected.emit();
514
- } }, index.h("slot", { key: 'a8f910407e5bbba4b5d6e004f2114f2519c56454' }))), index.h("div", { key: '13651a1650697c9860718e4665dbf300ab6e5faa', id: "error", class: this.errorMessage ? "error-message" : "" }, this.errorMessage), index.h("div", { key: 'f627a9e7035ea2f2df40493242965d2e15184de9', id: "announcement", "aria-live": "polite", "aria-atomic": "true", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)))));
533
+ } }, index.h("slot", { key: '87030837dc77fa939c06ccaf0f69e5b4d067c628' }))), index.h("div", { key: '36ccfeb061afde76690cf17a27aef19cfdf01071', id: "error", class: this.errorMessage ? "error-message" : "" }, this.errorMessage), index.h("div", { key: '63a34701d7a0822dca9c7970be7bce7c74dcfa72', id: "announcement", "aria-live": "polite", "aria-atomic": "true", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)))));
515
534
  }
516
535
  static get delegatesFocus() { return true; }
517
536
  get el() { return index.getElement(this); }
@@ -128,7 +128,7 @@ export class ChartPopover {
128
128
  "mutable": false,
129
129
  "complexType": {
130
130
  "original": "ChartData",
131
- "resolved": "undefined | { [key: string]: any; label: string; amount: number; color?: string | undefined; popoverTitle?: string | undefined; popoverText?: string | undefined; popoverButtonText?: string | undefined; }",
131
+ "resolved": "undefined | { [key: string]: any; barLegend: string; amount: number; color?: string | undefined; popoverTitle?: string | undefined; popoverText?: string | undefined; popoverButtonText?: string | undefined; }",
132
132
  "references": {
133
133
  "ChartData": {
134
134
  "location": "import",
@@ -253,7 +253,7 @@ export class ChartPopover {
253
253
  },
254
254
  "complexType": {
255
255
  "original": "ChartData",
256
- "resolved": "{ [key: string]: any; label: string; amount: number; color?: string | undefined; popoverTitle?: string | undefined; popoverText?: string | undefined; popoverButtonText?: string | undefined; }",
256
+ "resolved": "{ [key: string]: any; barLegend: string; amount: number; color?: string | undefined; popoverTitle?: string | undefined; popoverText?: string | undefined; popoverButtonText?: string | undefined; }",
257
257
  "references": {
258
258
  "ChartData": {
259
259
  "location": "import",
@@ -886,6 +886,7 @@
886
886
  .chart-wrapper {
887
887
  display: flex;
888
888
  container: chart-measure/inline-size;
889
+ gap: 0.75rem;
889
890
  }
890
891
 
891
892
  .legend.--top {
@@ -935,19 +936,22 @@
935
936
  grid-template-columns: minmax(0, max-content) auto 1fr;
936
937
  grid-template-rows: 1fr;
937
938
  margin-right: 3rem;
939
+ row-gap: 0.75rem;
938
940
  }
939
941
 
940
942
  .chart-right-side {
941
943
  grid-column: 4;
942
944
  grid-row: 1/-1;
943
945
  }
946
+ .chart-right-side:empty {
947
+ display: none;
948
+ }
944
949
 
945
950
  .category-axis-label {
946
951
  max-width: 9.375rem;
947
952
  display: flex;
948
953
  align-items: center;
949
954
  justify-content: center;
950
- margin-inline-end: 0.75rem;
951
955
  }
952
956
  @container chart-measure (max-width: 414px) {
953
957
  .category-axis-label {
@@ -976,7 +980,6 @@
976
980
  grid-column: 2/-1;
977
981
  row-gap: 0.75rem;
978
982
  align-items: center;
979
- margin-block-end: 0.75rem;
980
983
  grid-template-rows: repeat(var(--row-count), minmax(1.5rem, 1fr)) 0;
981
984
  }
982
985
 
@@ -1062,7 +1065,6 @@
1062
1065
  display: flex;
1063
1066
  justify-content: space-between;
1064
1067
  font-size: 0.75rem;
1065
- margin-block-end: 0.75rem;
1066
1068
  }
1067
1069
  @container chart-measure (max-width: 414px) {
1068
1070
  .x-axis .tick:not(:first-of-type):not(:last-of-type) {
@@ -88,7 +88,7 @@ export class ChartBar {
88
88
  var _a;
89
89
  const barColor = item.color || (isUniformConfigColor ? this.colorPalette[0] : (_a = this.colorPalette[index]) !== null && _a !== void 0 ? _a : defaultColor);
90
90
  return {
91
- label: item.label,
91
+ barLegend: item.barLegend,
92
92
  amount: item.amount,
93
93
  gridPercent: (item.amount / this.gridMax) * 100,
94
94
  displayValue: formatDisplayValue(item.amount, itemTotal, valueFormat),
@@ -223,7 +223,7 @@ export class ChartBar {
223
223
  setTimeout(() => {
224
224
  // allow time for the popover to reopen if the click that closed it was on a bar, to prevent flash
225
225
  if (this.popoverEl.open) {
226
- this.highlightBar(this.processedData.findIndex((item) => { var _a; return item.label === ((_a = this.popoverEl.chartData) === null || _a === void 0 ? void 0 : _a.label); }));
226
+ this.highlightBar(this.processedData.findIndex((item) => { var _a; return item.barLegend === ((_a = this.popoverEl.chartData) === null || _a === void 0 ? void 0 : _a.barLegend); }));
227
227
  }
228
228
  else {
229
229
  this.clearHighlights();
@@ -231,7 +231,7 @@ export class ChartBar {
231
231
  }, 30);
232
232
  }
233
233
  openPopover(clickedProcessedData, coords) {
234
- let matchingChartData = this.data.find((item) => item.label === clickedProcessedData.label);
234
+ let matchingChartData = this.data.find((item) => item.barLegend === clickedProcessedData.barLegend);
235
235
  if (matchingChartData) {
236
236
  this.popoverEl.chartData = matchingChartData;
237
237
  this.popoverEl.header = matchingChartData.popoverTitle || this.config.popoverTitle || "";
@@ -271,14 +271,14 @@ export class ChartBar {
271
271
  // #region Rendering
272
272
  ////////////////////////////////////////////////////////////
273
273
  renderBarLegends() {
274
- return this.processedData.map((item) => (h("div", { key: `legend-${item.label}`, class: "bar-legend" }, item.label)));
274
+ return this.processedData.map((item) => (h("div", { key: `legend-${item.barLegend}`, class: "bar-legend" }, item.barLegend)));
275
275
  }
276
276
  renderBars() {
277
277
  // Use effective grid max (numTicks * interval) for accurate bar sizing
278
278
  const effectiveGridMax = this.gridInfo.numTicks * this.gridInfo.interval;
279
279
  return this.processedData.map((item, idx) => {
280
280
  const barPercent = effectiveGridMax > 0 ? (item.amount / effectiveGridMax) * 100 : 0;
281
- return (h("div", { key: `bar-${item.label}`, class: "bar-wrapper" }, h("div", { class: "bar", style: { width: `${barPercent}%`, backgroundColor: `var(--${item.color})` }, onClick: (ev) => this.handleBarClick(ev, idx), onKeyDown: (ev) => this.handleBarKeyDown(ev, idx), tabindex: "-1", "aria-label": `${item.label} ${item.displayValue}` }), h("span", { class: "value", style: { insetInlineStart: `${barPercent}%` } }, item.displayValue)));
281
+ return (h("div", { key: `bar-${item.barLegend}`, class: "bar-wrapper" }, h("div", { class: "bar", style: { width: `${barPercent}%`, backgroundColor: `var(--${item.color})` }, onClick: (ev) => this.handleBarClick(ev, idx), onKeyDown: (ev) => this.handleBarKeyDown(ev, idx), tabindex: "-1", "aria-label": `${item.barLegend} ${item.displayValue}` }), h("span", { class: "value", style: { insetInlineStart: `${barPercent}%` } }, item.displayValue)));
282
282
  });
283
283
  }
284
284
  renderXAxis() {
@@ -297,7 +297,7 @@ export class ChartBar {
297
297
  render() {
298
298
  var _a, _b, _c, _d, _e, _f, _g;
299
299
  const rowCount = this.processedData.length || 1;
300
- return (h(Host, { key: 'af9ee18a445a32072133a4818a17543a9b642653' }, h("div", { key: '1ebd9b80b2546978f0819918abc7be5d71058315', class: "component-wrapper", 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 }, h("div", { key: 'fe01168cac52e5dba3f05b7fc51c8ef581c1422c', class: "popover-wrapper" }, h("priv-chart-popover", { key: '84dc52e1c81f3a978e2b4369cb675ef3969038cf', ref: (el) => (this.popoverEl = el), onIntChartPopoverOpenChanged: (ev) => this.handlePopoverOpenChanged(ev) })), h("label", { key: '0190875870d6e90915038a49c26343ee85f57a20', id: "label", class: `label --${(_b = this.config) === null || _b === void 0 ? void 0 : _b.labelPosition}` }, h("span", { key: '1d6900d5a62cecea8afab6f3348f9ed7305bed9f', class: "label-text" }, (_c = this.config) === null || _c === void 0 ? void 0 : _c.label), this.subinfoText ? h("span", { class: "subinfo" }, this.subinfoText) : ""), this.showLegend === "top" && this.renderLegend("horizontal"), h("div", { key: '1c22408dd8d89d988202eaa31279026641325f03', class: "chart-wrapper" }, h("div", { key: '11e1c3558f052f2f77f8b8e3f29503ca69a5f93d', class: "chart-left-side" }, this.showLegend === "left" && this.renderLegend("vertical"), h("div", { key: '96852f416f193b403dd2a1d55f8ef0d9181779ab', class: "category-axis-label" }, h("span", { key: '4c25a14518ea40222b2b965a319624ea35f87a84', class: "axis-label-text" }, (_d = this.config) === null || _d === void 0 ? void 0 : _d.categoryAxisLabel))), h("div", { key: '7dcd802835da086e4860ee3f09e256bcb925b7ad', class: "chart-center" }, h("div", { key: 'bc8e2bfc65afea16e352b61f77bd9483271af04b', class: "chart-area", style: { "--row-count": rowCount.toString() } }, this.processedData && this.renderBarLegends(), h("div", { key: '5bcfb85a9d3f13843edd8a4242473e29ff8373e7', class: `bar-area ${this.isKeying ? "user-is-keying" : ""}`, ref: (el) => (this.barAreaEl = el) }, this.gridInfo && ((_e = this.config) === null || _e === void 0 ? void 0 : _e.gridMax) != undefined && this.renderGrid(), this.gridInfo && this.processedData && this.renderBars())), h("div", { key: '8d7ea9e756430f0fc18db7a2114adca5dd0b13a0', class: "value-axis-label" }, h("span", { key: '5c6d15a4dc479179de31ab267dcbacf50bd6a918', class: "axis-label-text" }, (_f = this.config) === null || _f === void 0 ? void 0 : _f.valueAxisLabel)), this.gridInfo && ((_g = this.config) === null || _g === void 0 ? void 0 : _g.gridMax) != undefined && this.renderXAxis()), h("div", { key: '3cf6cf7f5574af218c366b00c3abfde6ad8d9204', class: "chart-right-side" }, this.showLegend === "right" && this.renderLegend("vertical"))), this.showLegend === "bottom" && this.renderLegend("horizontal"), renderInstructionsText())));
300
+ return (h(Host, { key: '2fe75003c819b49d5de618eea92bbd2fcfc10723' }, h("div", { key: '48f496b705d9571f9386dfddaaaddbd414836252', class: "component-wrapper", 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 }, h("div", { key: '9f78d67d37c8048554127adbd40ee94409dcc575', class: "popover-wrapper" }, h("priv-chart-popover", { key: '9d1f5bf3bb3d1af0a36b2c0e7d53a7e56f23ce9d', ref: (el) => (this.popoverEl = el), onIntChartPopoverOpenChanged: (ev) => this.handlePopoverOpenChanged(ev) })), h("label", { key: 'c111aecf07f21b19422804a21ffeba9632258309', id: "label", class: `label --${(_b = this.config) === null || _b === void 0 ? void 0 : _b.labelPosition}` }, h("span", { key: 'bb866688ed8f54ded76bfdff8ca54437322dc73d', class: "label-text" }, (_c = this.config) === null || _c === void 0 ? void 0 : _c.label), this.subinfoText ? h("span", { class: "subinfo" }, this.subinfoText) : ""), this.showLegend === "top" && this.renderLegend("horizontal"), h("div", { key: '58a8f0c8932fa214311ef73fac64925d2eb1cb74', class: "chart-wrapper" }, h("div", { key: '1ad4c29e26a7d5fb3e23b54d25ce639adbceedd9', class: "chart-left-side" }, this.showLegend === "left" && this.renderLegend("vertical"), h("div", { key: '5f7aeb14ab9101f1fd38c811d9ac17660c5055d5', class: "category-axis-label" }, h("span", { key: 'bc99815352064b5b62efc9634d0f623b29e56c19', class: "axis-label-text" }, (_d = this.config) === null || _d === void 0 ? void 0 : _d.categoryAxisLabel))), h("div", { key: '1b968d3f687215a65ddd3bc6e39bc96dd908c68c', class: "chart-center" }, h("div", { key: '6da38ae08882fed85387427d8c36984160ac805a', class: "chart-area", style: { "--row-count": rowCount.toString() } }, this.processedData && this.renderBarLegends(), h("div", { key: '1413e4f4a62e10cf7236d87b38b96932f3bd713a', class: `bar-area ${this.isKeying ? "user-is-keying" : ""}`, ref: (el) => (this.barAreaEl = el) }, this.gridInfo && ((_e = this.config) === null || _e === void 0 ? void 0 : _e.gridMax) != undefined && this.renderGrid(), this.gridInfo && this.processedData && this.renderBars())), h("div", { key: '5021bad3a65b05b5280a63320dacfab6b560ab88', class: "value-axis-label" }, h("span", { key: 'c2b06b622ef28a16423eaa277c31e7c298ed431d', class: "axis-label-text" }, (_f = this.config) === null || _f === void 0 ? void 0 : _f.valueAxisLabel)), this.gridInfo && ((_g = this.config) === null || _g === void 0 ? void 0 : _g.gridMax) != undefined && this.renderXAxis()), h("div", { key: '49ae3d55b3172a5d98cb26b6bbdd59c277b38b57', class: "chart-right-side" }, this.showLegend === "right" && this.renderLegend("vertical"))), this.showLegend === "bottom" && this.renderLegend("horizontal"), renderInstructionsText())));
301
301
  }
302
302
  static get is() { return "wm-chart-bar"; }
303
303
  static get encapsulation() { return "shadow"; }
@@ -318,7 +318,7 @@ export class ChartBar {
318
318
  "mutable": false,
319
319
  "complexType": {
320
320
  "original": "ChartConfig",
321
- "resolved": "undefined | { label: string; labelPosition: \"top\" | \"none\"; labelWidth: string; valueAxisLabel: string; categoryAxisLabel: string; printMode: boolean; printModeFormat: \"amount\" | \"percentage\"; gridMax?: number | \"auto\" | undefined; sort?: \"none\" | \"ascending\" | \"descending\" | undefined; showLegend?: \"top\" | \"bottom\" | \"left\" | \"right\" | \"none\" | undefined; subinfo?: string | undefined; completionMessage?: string | undefined; valueFormat?: \"none\" | \"amount\" | \"percentage\" | undefined; colors?: string | undefined; popoverTitle?: string | undefined; popoverText?: string | undefined; popoverButtonText?: string | undefined; }",
321
+ "resolved": "undefined | { label: string; labelPosition: \"top\" | \"none\"; valueAxisLabel: string; categoryAxisLabel: string; printMode: boolean; printModeFormat: \"amount\" | \"percentage\"; gridMax?: number | \"auto\" | undefined; sort?: \"none\" | \"ascending\" | \"descending\" | undefined; showLegend?: \"top\" | \"bottom\" | \"left\" | \"right\" | \"none\" | undefined; subinfo?: string | undefined; completionMessage?: string | undefined; valueFormat?: \"none\" | \"amount\" | \"percentage\" | undefined; colors?: string | undefined; popoverTitle?: string | undefined; popoverText?: string | undefined; popoverButtonText?: string | undefined; }",
322
322
  "references": {
323
323
  "ChartConfig": {
324
324
  "location": "import",
@@ -26,10 +26,10 @@ export class ChartLegend {
26
26
  this.wmLegendItemClick.emit({ idx: idx });
27
27
  }
28
28
  renderLegendItems() {
29
- return this.processedData.map((item, idx) => (h("div", { class: "legend-item", key: item.label, onClick: () => this.handleLegendItemClick(idx) }, h("div", { class: "color", style: { "--color": `var(--${item.color})` } }), h("div", { class: "label" }, item.label), h("span", { class: `print-value ${this.printMode ? "force-visible" : ""}` }, "(", item.printValue, ")"))));
29
+ return this.processedData.map((item, idx) => (h("div", { class: "legend-item", key: item.barLegend, onClick: () => this.handleLegendItemClick(idx) }, h("div", { class: "color", style: { "--color": `var(--${item.color})` } }), h("div", { class: "label" }, item.barLegend), h("span", { class: `print-value ${this.printMode ? "force-visible" : ""}` }, "(", item.printValue, ")"))));
30
30
  }
31
31
  render() {
32
- return (h(Host, { key: 'c6cff1273bae9bd36f74c056bc7863a538e83e28' }, h("div", { key: '8538f637a18d8b7e9877f8a95ff6a31e8e7ee317', class: `legend-container --${this.orientation}` }, this.renderLegendItems())));
32
+ return (h(Host, { key: 'be2793da927897a4c0e62345ffe502967fd7f12c' }, h("div", { key: '382567c522ff081fbd02e96563b11f1831a56c32', class: `legend-container --${this.orientation}` }, this.renderLegendItems())));
33
33
  }
34
34
  static get is() { return "wm-chart-legend"; }
35
35
  static get encapsulation() { return "shadow"; }
@@ -273,55 +273,74 @@ export class Select {
273
273
  }
274
274
  this.announcement = message;
275
275
  }
276
- renderButtonText() {
277
- this.displayedOptions = this.childOptions.filter((x) => x.selected);
278
- if (this.multiple && this.displayedOptions.length < 1) {
279
- return h("span", null, this.placeholder);
276
+ handleOverflow() {
277
+ // handle overflow + counter for multiselect
278
+ // this is a fixed measurement accounting for the max width of a 3 character overflow counter
279
+ const overflowCounterWidth = 38;
280
+ const computedStyle = window.getComputedStyle(this.buttonEl);
281
+ // there seems to be no quick way to get an elements width without padding, except for subtracting padding manually
282
+ const paddingLeft = parseInt(computedStyle.getPropertyValue("padding-left").slice(0, -2));
283
+ const paddingRight = parseInt(computedStyle.getPropertyValue("padding-right").slice(0, -2));
284
+ const availableSpace = this.buttonEl.clientWidth - paddingLeft - paddingRight - overflowCounterWidth;
285
+ this.overflowCount = 0;
286
+ this.measurementAreaEl.textContent = this.displayedOptions.map((x) => x.textContent).join(", ");
287
+ let optionsTotalWidth = this.measurementAreaEl.clientWidth;
288
+ while (optionsTotalWidth > availableSpace && this.displayedOptions.length > 1) {
289
+ this.overflowCount++;
290
+ this.displayedOptions.pop();
291
+ this.measurementAreaEl.textContent = this.displayedOptions.map((x) => x.textContent).join(", ");
292
+ optionsTotalWidth = this.measurementAreaEl.clientWidth;
280
293
  }
281
- else if (this.multiple && this.allSelected && this.overflowCount > 0) {
282
- return this.allSelectedMessage;
294
+ }
295
+ setButtonText() {
296
+ if (!this.multiple) {
297
+ const selEl = this.childOptions.filter((x) => x.selected)[0];
298
+ return selEl ? selEl.textContent : "";
283
299
  }
284
300
  else {
285
- // handle overflow + counter for multiselect
286
- // only bother if things have changed
301
+ this.displayedOptions = this.childOptions.filter((x) => x.selected);
287
302
  const hasChanged = this.displayedOptions !== this.previousDisplayedOptions;
288
- if (this.multiple && hasChanged) {
289
- // this is a fixed measurement accounting for the max width of a 3 character overflow counter
290
- const overflowCounterWidth = 38;
291
- const computedStyle = window.getComputedStyle(this.buttonEl);
292
- // there seems to be no quick way to get an elements width without padding, except for subtracting padding manually
293
- const paddingLeft = parseInt(computedStyle.getPropertyValue("padding-left").slice(0, -2));
294
- const paddingRight = parseInt(computedStyle.getPropertyValue("padding-right").slice(0, -2));
295
- const availableSpace = this.buttonEl.clientWidth - paddingLeft - paddingRight - overflowCounterWidth;
296
- this.overflowCount = 0;
297
- this.measurementAreaEl.textContent = this.displayedOptions.map((x) => x.textContent).join(", ");
298
- let optionsTotalWidth = this.measurementAreaEl.clientWidth;
299
- while (optionsTotalWidth > availableSpace && this.displayedOptions.length > 1) {
300
- this.overflowCount++;
301
- this.displayedOptions.pop();
302
- this.measurementAreaEl.textContent = this.displayedOptions.map((x) => x.textContent).join(", ");
303
- optionsTotalWidth = this.measurementAreaEl.clientWidth;
303
+ const noDisplayedOptions = this.displayedOptions.length < 1;
304
+ if (noDisplayedOptions) {
305
+ return this.placeholder;
306
+ }
307
+ else if (!this.buttonEl) {
308
+ forceUpdate(this.el);
309
+ return "";
310
+ }
311
+ else if (hasChanged) {
312
+ this.handleOverflow();
313
+ // we need to calc overflowcount as we only want to display allSelected message if there is an overflow...
314
+ if (this.overflowCount > 0 && this.allSelected) {
315
+ // ...but it should be reset so it isn't displayed in that case
316
+ this.overflowCount = 0;
317
+ this.buttonText = this.allSelectedMessage;
318
+ }
319
+ else {
320
+ this.buttonText = this.displayedOptions.map((x) => x.textContent).join(", ");
304
321
  }
305
- this.previousDisplayedOptions = this.displayedOptions;
306
322
  }
307
- return this.displayedOptions.map((x, idx) => (h("span", null, idx > 0 ? ", " : "", x.textContent)));
323
+ this.previousDisplayedOptions = this.displayedOptions;
324
+ // the reason for setting a global variable and returning it
325
+ // is that we need the stored value when displayedOptions haven't changed.
326
+ return this.buttonText; // multiselect value
308
327
  }
309
328
  }
310
329
  renderOverflowCount() {
311
- if (this.overflowCount > 0 && !this.allSelected) {
330
+ if (this.overflowCount > 0) {
312
331
  return (h("span", null, h("span", { class: "overflow-counter" }, "+", this.overflowCount)));
313
332
  }
314
333
  }
315
334
  render() {
316
335
  const showSubinfo = !this.multiple && this.selectedOptions.length > 0 && this.selectedOptions[0].subinfo;
317
- return (h(Host, { key: 'e58f2afa4361d7e27f94175a32acb0f93701cf76', onBlur: (ev) => this.handleComponentBlur(ev) }, h("div", { key: '13de69b572a4af34c1abc0002bbc8a87dc7d521a', class: `wrapper ${getTextDir()} label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { key: 'd234f604a3f94f843617733f6a8f5baaabc098d3', class: "label-wrapper" }, h("label", { key: '9dac4166a74898241e6422cd93023e5980d015bf', class: "label", id: "label", htmlFor: "selectbtn", onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => hideTooltip() }, this.label),
336
+ return (h(Host, { key: '9a0a5c13f988c06c380ed732da86365c28446e77', onBlur: (ev) => this.handleComponentBlur(ev) }, h("div", { key: '3aa70cdc8f541d6f93ff99cbe44d6192bcba364b', class: `wrapper ${getTextDir()} label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { key: '899522611760999dca554ab63bfa0f5c831d0542', class: "label-wrapper" }, h("label", { key: '0730c044f78edc158ac6a2de09ea05a09ddecd23', class: "label", id: "label", htmlFor: "selectbtn", onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => hideTooltip() }, this.label),
318
337
  // we can't use aria-required because the listbox is in a sub-component and it is not announced
319
- this.requiredField && (h("span", { key: '788b4c52a1e59bfb425f909374f722b5856b8fb3', class: "required" }, h("span", { key: '95cbdb98f925a5b80579a77147151903f2f63618', class: "sr-only" }, globalMessages.requiredField), h("span", { key: 'ca3dacb55461f2cd7f5b81c746e5b70d8bd82f27', "aria-hidden": "true" }, "*")))), h("div", { key: '65cb0cbfe742c251b082adc84af5648a54ff4f12', class: "button-wrapper" }, h("button", { key: '8731a753912360eeb0ed4b60019463bf4398f8ae', id: "selectbtn", disabled: this.isDisabled, "aria-labelledby": "label selectbtn", "aria-describedby": "error", popoverTarget: "dropdown", popoverTargetAction: "toggle", class: "displayedoption", ref: (el) => (this.buttonEl = el) }, h("span", { key: 'e8d751bedfcc1922416fc177f43153ed2dfa0f84', class: `overflowcontrol ${showSubinfo ? "hassubinfo" : ""}` }, h("span", { key: '104277dfd731f7138889d573ad33ab7e5f8f4ffe', class: "button-text" }, this.renderButtonText()), showSubinfo && h("span", { key: 'cddb5d3cb91877c2adf73978e2e3114e3a148999', class: "subinfo" }, this.selectedOptions[0].subinfo)), h("div", { key: 'e4e76e115d85e4a3d24a17d762dec65091c14c69', class: `expand-icon svg-icon ${this.isExpanded ? "svg-expand-less" : "svg-expand-more"}` }), this.renderOverflowCount(), h("div", { key: '910df5182752522e9a709afbbb9d885b4cb93f46', ref: (el) => (this.measurementAreaEl = el), class: "measurement-area", "aria-hidden": "true" })), h("div", { key: '620f6414a70890323eb11958ff2c17415a86e437',
338
+ this.requiredField && (h("span", { key: 'b453a4c0fbd8973d62a7cfdc4e37537ab94dfed8', class: "required" }, h("span", { key: '53699fcc342d68b1fb24180cb13a524ab58038c4', class: "sr-only" }, globalMessages.requiredField), h("span", { key: 'b7489dbe7ee74b6c46d30002762f10624f26cad7', "aria-hidden": "true" }, "*")))), h("div", { key: 'b44b002b4a5b34cf0958a8ddfc9efcb6934873f0', class: "button-wrapper" }, h("button", { key: 'b6f5d59e8399d894c2bb7cbfd4c9b5e57a7bfc4a', id: "selectbtn", disabled: this.isDisabled, "aria-labelledby": "label selectbtn", "aria-describedby": "error", popoverTarget: "dropdown", popoverTargetAction: "toggle", class: "displayedoption", ref: (el) => (this.buttonEl = el) }, h("span", { key: 'c4d37441c2e76ecf5c03b6a22cabbec2d16c77bc', class: `overflowcontrol ${showSubinfo ? "hassubinfo" : ""}` }, h("span", { key: 'baa91ff63a3d7d33be866337237408f38f46cc60', class: "button-text" }, this.setButtonText()), showSubinfo && h("span", { key: '5ed44f71ef8184df2bfee442fa94e496f9305b54', class: "subinfo" }, this.selectedOptions[0].subinfo)), h("div", { key: 'd0e3a1bade399be089b1f38e33281ca5f1e6cc03', class: `expand-icon svg-icon ${this.isExpanded ? "svg-expand-less" : "svg-expand-more"}` }), this.renderOverflowCount(), h("div", { key: '2a43776bb5a5cccc79796939ca9be7b7b8ee569a', ref: (el) => (this.measurementAreaEl = el), class: "measurement-area", "aria-hidden": "true" })), h("div", { key: 'eac706ae0781e210c89aed74dded805472a01996',
320
339
  // is-open is for the CSS transition in modern browsers
321
340
  // hidden is to wait for position calculations in Firefox
322
341
  class: `dropdown ${this.isExpanded ? "is-open" : ""} ${this.isHidden ? "hidden" : ""} ${this.openUp ? "upward" : ""}`, id: "dropdown", popover: "auto", ref: (el) => (this.dropdownEl = el),
323
342
  // @ts-ignore -- don't tell typescript but we're in the future
324
- onToggle: (ev) => this.handleToggle(ev) }, h("priv-option-list", { key: 'a059818c76eaad5b43895e30cc9a40ada0bc3ffa', ref: (el) => (this.optionListEl = el), multiple: this.multiple, search: this.search, selectAll: this.selectAll, maxHeight: this.maxHeight, searchPlaceholder: this.searchPlaceholder, onOptionListCloseRequested: () => {
343
+ onToggle: (ev) => this.handleToggle(ev) }, h("priv-option-list", { key: '3ba4da015a18e38b1a6fddd6788886d4dc551cd1', ref: (el) => (this.optionListEl = el), multiple: this.multiple, search: this.search, selectAll: this.selectAll, maxHeight: this.maxHeight, searchPlaceholder: this.searchPlaceholder, onOptionListCloseRequested: () => {
325
344
  this.dropdownEl.hidePopover();
326
345
  }, onOptionListAllSelected: () => {
327
346
  this.returnFocus = true;
@@ -329,7 +348,7 @@ export class Select {
329
348
  }, onOptionListAllDeselected: () => {
330
349
  this.returnFocus = true;
331
350
  this.wmSelectAllDeselected.emit();
332
- } }, h("slot", { key: 'a8f910407e5bbba4b5d6e004f2114f2519c56454' }))), h("div", { key: '13651a1650697c9860718e4665dbf300ab6e5faa', id: "error", class: this.errorMessage ? "error-message" : "" }, this.errorMessage), h("div", { key: 'f627a9e7035ea2f2df40493242965d2e15184de9', id: "announcement", "aria-live": "polite", "aria-atomic": "true", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)))));
351
+ } }, h("slot", { key: '87030837dc77fa939c06ccaf0f69e5b4d067c628' }))), h("div", { key: '36ccfeb061afde76690cf17a27aef19cfdf01071', id: "error", class: this.errorMessage ? "error-message" : "" }, this.errorMessage), h("div", { key: '63a34701d7a0822dca9c7970be7bce7c74dcfa72', id: "announcement", "aria-live": "polite", "aria-atomic": "true", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)))));
333
352
  }
334
353
  static get is() { return "wm-select"; }
335
354
  static get encapsulation() { return "shadow"; }
@@ -25,14 +25,14 @@ setTimeout(() => {
25
25
  };
26
26
 
27
27
  barChart1.data = [
28
- { label: "Marine Biology", amount: 250, whatever: "whatever", color: "wmcolor-border" },
29
- { label: "Organic Chemistry", amount: 500 },
30
- { label: "Aeronautical Engineering", amount: 982 },
31
- { label: "Pure Mathematics", amount: 100 },
32
- { label: "Astrophysics", amount: 500, popoverTitle: "Astrophysics", popoverText: "Astrophysics description set by the data", popoverButtonText: "View Astrophysics Details" },
33
- { label: "Social Psychology", amount: 900 },
34
- { label: "Urban Sociology", amount: 500 },
35
- { label: "Behavioral Economics & Economy Sciences", amount: 250 },
28
+ { barLegend: "Marine Biology", amount: 250, whatever: "whatever", color: "wmcolor-border" },
29
+ { barLegend: "Organic Chemistry", amount: 500 },
30
+ { barLegend: "Aeronautical Engineering", amount: 982 },
31
+ { barLegend: "Pure Mathematics", amount: 100 },
32
+ { barLegend: "Astrophysics", amount: 500, popoverTitle: "Astrophysics", popoverText: "Astrophysics description set by the data", popoverButtonText: "View Astrophysics Details" },
33
+ { barLegend: "Social Psychology", amount: 900 },
34
+ { barLegend: "Urban Sociology", amount: 500 },
35
+ { barLegend: "Behavioral Economics & Economy Sciences", amount: 250 },
36
36
  ];
37
37
  }, 1000);
38
38
 
@@ -1,6 +1,6 @@
1
1
  import './index-130e07bb.js';
2
2
 
3
- const version = "5.23.0-alpha.0";
3
+ const version = "5.23.0-alpha.1";
4
4
 
5
5
  // PRINT RIPPLE VERSION IN CONSOLE
6
6
  // test envs return 0 for plugin.length
@@ -1,6 +1,6 @@
1
1
  import { b as bootstrapLazy } from './index-130e07bb.js';
2
2
  export { s as setNonce } from './index-130e07bb.js';
3
- import { g as globalScripts } from './app-globals-be942f12.js';
3
+ import { g as globalScripts } from './app-globals-2d0df1cb.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
@@ -157,10 +157,10 @@ const ChartLegend = class {
157
157
  this.wmLegendItemClick.emit({ idx: idx });
158
158
  }
159
159
  renderLegendItems() {
160
- return this.processedData.map((item, idx) => (h("div", { class: "legend-item", key: item.label, onClick: () => this.handleLegendItemClick(idx) }, h("div", { class: "color", style: { "--color": `var(--${item.color})` } }), h("div", { class: "label" }, item.label), h("span", { class: `print-value ${this.printMode ? "force-visible" : ""}` }, "(", item.printValue, ")"))));
160
+ return this.processedData.map((item, idx) => (h("div", { class: "legend-item", key: item.barLegend, onClick: () => this.handleLegendItemClick(idx) }, h("div", { class: "color", style: { "--color": `var(--${item.color})` } }), h("div", { class: "label" }, item.barLegend), h("span", { class: `print-value ${this.printMode ? "force-visible" : ""}` }, "(", item.printValue, ")"))));
161
161
  }
162
162
  render() {
163
- return (h(Host, { key: 'c6cff1273bae9bd36f74c056bc7863a538e83e28' }, h("div", { key: '8538f637a18d8b7e9877f8a95ff6a31e8e7ee317', class: `legend-container --${this.orientation}` }, this.renderLegendItems())));
163
+ return (h(Host, { key: 'be2793da927897a4c0e62345ffe502967fd7f12c' }, h("div", { key: '382567c522ff081fbd02e96563b11f1831a56c32', class: `legend-container --${this.orientation}` }, this.renderLegendItems())));
164
164
  }
165
165
  static get delegatesFocus() { return true; }
166
166
  get el() { return getElement(this); }
@@ -1,6 +1,6 @@
1
1
  import { p as promiseResolve, b as bootstrapLazy } from './index-130e07bb.js';
2
2
  export { s as setNonce } from './index-130e07bb.js';
3
- import { g as globalScripts } from './app-globals-be942f12.js';
3
+ import { g as globalScripts } from './app-globals-2d0df1cb.js';
4
4
 
5
5
  /*
6
6
  Stencil Client Patch Browser v4.21.0 | MIT Licensed | https://stenciljs.com