@watermarkinsights/ripple 5.11.0-2 → 5.11.0-4

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 (55) hide show
  1. package/dist/cjs/{app-globals-86975eea.js → app-globals-9ac264d7.js} +1 -1
  2. package/dist/cjs/{chartFunctions-a3a08880.js → chartFunctions-7314b414.js} +9 -6
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/ripple.cjs.js +1 -1
  5. package/dist/cjs/wm-action-menu_2.cjs.entry.js +2 -2
  6. package/dist/cjs/wm-chart.cjs.entry.js +1 -1
  7. package/dist/cjs/wm-line-chart.cjs.entry.js +1 -1
  8. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +3 -3
  9. package/dist/cjs/wm-tag-input.cjs.entry.js +1 -1
  10. package/dist/collection/components/charts/chartFunctions.js +9 -6
  11. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +1 -1
  12. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +2 -2
  13. package/dist/collection/components/wm-action-menu/wm-action-menu.css +5 -5
  14. package/dist/collection/components/wm-menuitem/wm-menuitem.css +6 -5
  15. package/dist/collection/components/wm-tag-input/wm-tag-input.css +28 -19
  16. package/dist/esm/{app-globals-9eb5f635.js → app-globals-e7c0199c.js} +1 -1
  17. package/dist/esm/{chartFunctions-21d5a3d3.js → chartFunctions-c273c613.js} +9 -6
  18. package/dist/esm/loader.js +1 -1
  19. package/dist/esm/ripple.js +1 -1
  20. package/dist/esm/wm-action-menu_2.entry.js +2 -2
  21. package/dist/esm/wm-chart.entry.js +1 -1
  22. package/dist/esm/wm-line-chart.entry.js +1 -1
  23. package/dist/esm/wm-progress-indicator_3.entry.js +3 -3
  24. package/dist/esm/wm-tag-input.entry.js +1 -1
  25. package/dist/esm-es5/{app-globals-9eb5f635.js → app-globals-e7c0199c.js} +1 -1
  26. package/dist/esm-es5/chartFunctions-c273c613.js +1 -0
  27. package/dist/esm-es5/loader.js +1 -1
  28. package/dist/esm-es5/ripple.js +1 -1
  29. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  30. package/dist/esm-es5/wm-chart.entry.js +1 -1
  31. package/dist/esm-es5/wm-line-chart.entry.js +1 -1
  32. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  33. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  34. package/dist/ripple/{p-79b5df24.entry.js → p-11c9fc2e.entry.js} +1 -1
  35. package/dist/ripple/{p-f9222794.system.entry.js → p-43055c83.system.entry.js} +1 -1
  36. package/dist/ripple/{p-1eb7a1a7.system.js → p-4b413899.system.js} +1 -1
  37. package/dist/ripple/p-4c1efa04.system.js +1 -0
  38. package/dist/ripple/{p-6a936730.js → p-564893b0.js} +1 -1
  39. package/dist/ripple/{p-9c366b37.system.entry.js → p-7ed7b66f.system.entry.js} +1 -1
  40. package/dist/ripple/{p-1c9e0cae.system.entry.js → p-831d25cb.system.entry.js} +1 -1
  41. package/dist/ripple/{p-cbfa468a.system.entry.js → p-88973d98.system.entry.js} +1 -1
  42. package/dist/ripple/{p-a45891a2.system.js → p-8a6c4a3b.system.js} +1 -1
  43. package/dist/ripple/p-96505312.js +1 -0
  44. package/dist/ripple/{p-839ce827.entry.js → p-ac0655a0.entry.js} +1 -1
  45. package/dist/ripple/{p-2f07262e.entry.js → p-b8873f91.entry.js} +1 -1
  46. package/dist/ripple/{p-0335da82.entry.js → p-bad14b66.entry.js} +1 -1
  47. package/dist/ripple/{p-663b70f8.entry.js → p-c66335a0.entry.js} +1 -1
  48. package/dist/ripple/{p-e8023928.system.entry.js → p-d254efea.system.entry.js} +1 -1
  49. package/dist/ripple/ripple.esm.js +1 -1
  50. package/dist/ripple/ripple.js +1 -1
  51. package/dist/types/global/interfaces.d.ts +1 -0
  52. package/package.json +1 -1
  53. package/dist/esm-es5/chartFunctions-21d5a3d3.js +0 -1
  54. package/dist/ripple/p-37b044c7.system.js +0 -1
  55. package/dist/ripple/p-f41ab9ea.js +0 -1
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index-788526f5.js');
4
4
 
5
- const version = "5.11.0-2";
5
+ const version = "5.11.0-4";
6
6
 
7
7
  // PRINT RIPPLE VERSION IN CONSOLE
8
8
  // test envs return 0 for plugin.length
@@ -345,6 +345,7 @@ async function getDetails(chartType) {
345
345
  }
346
346
  const sliceDetails = {
347
347
  amount: amount,
348
+ visualAmount: amount,
348
349
  perc: perc,
349
350
  legend: c.getAttribute("legend"),
350
351
  color: chartColors[colorIndex] || colors.gray,
@@ -455,10 +456,10 @@ function applyMinimumAngle(minimumAngle, slicesDetails, total) {
455
456
  // apply new amounts based on adjust angles
456
457
  let offsetAcc = 0;
457
458
  slicesDetails = slicesDetails.map((s, idx) => {
458
- const newAmount = (adjustedAngles[idx] / 360) * total;
459
+ const visualAmount = (adjustedAngles[idx] / 360) * total;
459
460
  const newOffset = offsetAcc;
460
- offsetAcc += newAmount;
461
- return Object.assign(Object.assign({}, s), { amount: newAmount, offset: newOffset });
461
+ offsetAcc += visualAmount;
462
+ return Object.assign(Object.assign({}, s), { visualAmount: visualAmount, offset: newOffset });
462
463
  });
463
464
  }
464
465
  return slicesDetails;
@@ -469,12 +470,14 @@ function renderDoughnut(chartType) {
469
470
  // no sorting in progress indicators
470
471
  let slicesDetails = isHybridDoughnut ? this.slicesDetails : sortSlicesDetails(this.slicesDetails, this.total);
471
472
  slicesDetails = applyMinimumAngle(7, slicesDetails, this.total);
473
+ let perc = amountToPercent(slicesDetails[0].amount, this.total, true);
474
+ perc = perc === 0 ? "<1%" : perc + "%";
472
475
  return (index.h("div", { class: "chart-wrapper doughnut-wrapper" },
473
476
  index.h("svg", { width: outerSize + "px", height: outerSize + "px", id: `graphic-${this.uid}`, class: "doughnut-svg" },
474
477
  renderFilter(),
475
478
  slicesDetails.map((s) => renderPath.call(this, s, chartType)),
476
479
  renderFocusOutline.call(this),
477
- isHybridDoughnut ? (index.h("text", { class: "value", x: "50%", y: "50%", "font-size": "1.5rem", "font-weight": "500", "text-anchor": "middle", "dominant-baseline": "middle" }, amountToPercent(slicesDetails[0].amount, this.total, true) + "%")) : (index.h("g", { transform: `translate(${this.chartDetails.padding / 2}, ${this.chartDetails.padding / 2})`, "text-anchor": "middle", "dominant-baseline": "middle" }, slicesDetails.map((s) => s.amount > 0 && !s.inSmallCluster ? renderDoughnutText.call(this, s) : ""))))));
480
+ isHybridDoughnut ? (index.h("text", { class: "value", x: "50%", y: "50%", "font-size": "1.5rem", "font-weight": "500", "text-anchor": "middle", "dominant-baseline": "middle" }, perc)) : (index.h("g", { transform: `translate(${this.chartDetails.padding / 2}, ${this.chartDetails.padding / 2})`, "text-anchor": "middle", "dominant-baseline": "middle" }, slicesDetails.map((s) => s.amount > 0 && !s.inSmallCluster ? renderDoughnutText.call(this, s) : ""))))));
478
481
  }
479
482
  function highlightSegmentInfo(infoEls, s) {
480
483
  infoEls.forEach((el) => {
@@ -494,7 +497,7 @@ function removeSegmentInfoHighlight(infoEls) {
494
497
  function renderPath(s, chartType) {
495
498
  const percentageValue = amountToPercent(s.amount, this.total, true) + "%";
496
499
  return (!isNaN(s.amount) && (index.h("g", { transform: `translate(${this.chartDetails.padding / 2}, ${this.chartDetails.padding / 2})` },
497
- index.h("path", { id: s.id, class: "segment doughnut-segment", fill: s.amount ? s.color : "transparent", d: getPathData.call(this, s.amount, s.offset, chartType), onClick: (ev) => handleSliceClick.call(this, ev, s), onFocus: (ev) => handleSliceFocus.call(this, ev, s), onKeyDown: (ev) => handleSliceKeyDown.call(this, ev), role: "img", "aria-label": `${s.legend}, ${percentageValue}`, "data-segmentindex": s.index }))));
500
+ index.h("path", { id: s.id, class: "segment doughnut-segment", fill: s.visualAmount ? s.color : "transparent", d: getPathData.call(this, s.visualAmount, s.offset, chartType), onClick: (ev) => handleSliceClick.call(this, ev, s), onFocus: (ev) => handleSliceFocus.call(this, ev, s), onKeyDown: (ev) => handleSliceKeyDown.call(this, ev), role: "img", "aria-label": `${s.legend}, ${percentageValue}`, "data-segmentindex": s.index }))));
498
501
  }
499
502
  function renderFocusOutline() {
500
503
  return this.isTabbing ? (index.h("g", { transform: `translate(${this.chartDetails.padding / 2}, ${this.chartDetails.padding / 2})` },
@@ -503,7 +506,7 @@ function renderFocusOutline() {
503
506
  index.h("use", { tabindex: -1, id: "kfbg2", xlinkHref: `#${this.focusedSliceId}` }))) : ("");
504
507
  }
505
508
  function renderDoughnutText(s) {
506
- const arcMiddle = amountToDegree(s.offset + s.amount / 2, this.total);
509
+ const arcMiddle = amountToDegree(s.offset + s.visualAmount / 2, this.total);
507
510
  let { x, y } = polarToCartesian(this.chartDetails.size / 2, 1.4, arcMiddle - 90);
508
511
  return (index.h("text", { class: "value", x: x + "px", y: y + "px", "data-segmentindex": s.index }, `${s.perc > 0 ? s.perc : "<1"}%`));
509
512
  }
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-788526f5.js');
6
- const appGlobals = require('./app-globals-86975eea.js');
6
+ const appGlobals = require('./app-globals-9ac264d7.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-788526f5.js');
6
- const appGlobals = require('./app-globals-86975eea.js');
6
+ const appGlobals = require('./app-globals-9ac264d7.js');
7
7
 
8
8
  /*
9
9
  Stencil Client Patch Browser v4.21.0 | MIT Licensed | https://stenciljs.com