@watermarkinsights/ripple 5.7.0-9 → 5.8.0-0

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 (167) hide show
  1. package/dist/cjs/{global-80ed0881.js → global-541becf9.js} +1 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/priv-option-list.cjs.entry.js +13 -2
  4. package/dist/cjs/ripple.cjs.js +1 -1
  5. package/dist/cjs/wm-line-chart.cjs.entry.js +19 -38
  6. package/dist/cjs/wm-modal-pss_3.cjs.entry.js +24 -23
  7. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +19 -38
  8. package/dist/collection/components/selects/priv-option-list/priv-option-list.css +10 -0
  9. package/dist/collection/components/selects/priv-option-list/priv-option-list.js +12 -1
  10. package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.css +12 -0
  11. package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.js +1 -1
  12. package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.css +12 -0
  13. package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.js +3 -2
  14. package/dist/collection/components/wm-modal-pss/wm-modal-pss.css +16 -2
  15. package/dist/collection/components/wm-modal-pss/wm-modal-pss.js +12 -11
  16. package/dist/collection/dev/pss-modal.js +8 -0
  17. package/dist/collection/dev/scripts.js +12 -15
  18. package/dist/esm/{chartFunctions-dfcb1edf.js → chartFunctions-34f19953.js} +1 -1
  19. package/dist/esm/{functions-b791a892.js → functions-8800c690.js} +1 -1
  20. package/dist/esm/{global-525745d2.js → global-3ec0570b.js} +1 -1
  21. package/dist/esm/{intl-f2f7ce8b.js → intl-b110ca8d.js} +1 -1
  22. package/dist/esm/loader.js +1 -1
  23. package/dist/esm/priv-calendar.entry.js +1 -1
  24. package/dist/esm/priv-chart-popover.entry.js +1 -1
  25. package/dist/esm/priv-option-list.entry.js +14 -3
  26. package/dist/esm/ripple.js +1 -1
  27. package/dist/esm/wm-action-menu_2.entry.js +1 -1
  28. package/dist/esm/wm-button.entry.js +1 -1
  29. package/dist/esm/wm-chart.entry.js +3 -3
  30. package/dist/esm/wm-date-range.entry.js +1 -1
  31. package/dist/esm/wm-datepicker.entry.js +1 -1
  32. package/dist/esm/wm-file.entry.js +1 -1
  33. package/dist/esm/wm-input.entry.js +2 -2
  34. package/dist/esm/wm-line-chart.entry.js +22 -41
  35. package/dist/esm/wm-modal-pss_3.entry.js +22 -21
  36. package/dist/esm/wm-modal_3.entry.js +2 -2
  37. package/dist/esm/wm-navigation_3.entry.js +2 -2
  38. package/dist/esm/wm-navigator.entry.js +1 -1
  39. package/dist/esm/wm-nested-select.entry.js +2 -2
  40. package/dist/esm/wm-optgroup.entry.js +1 -1
  41. package/dist/esm/wm-option_2.entry.js +2 -2
  42. package/dist/esm/wm-pagination.entry.js +1 -1
  43. package/dist/esm/wm-progress-indicator_3.entry.js +2 -2
  44. package/dist/esm/wm-search.entry.js +2 -2
  45. package/dist/esm/wm-snackbar.entry.js +2 -2
  46. package/dist/esm/wm-tab-item_3.entry.js +1 -1
  47. package/dist/esm/wm-tag-input.entry.js +2 -2
  48. package/dist/esm/wm-tag-option.entry.js +1 -1
  49. package/dist/esm/wm-textarea.entry.js +2 -2
  50. package/dist/esm/wm-timepicker.entry.js +1 -1
  51. package/dist/esm/wm-toggletip.entry.js +1 -1
  52. package/dist/esm/wm-uploader.entry.js +2 -2
  53. package/dist/esm-es5/{chartFunctions-dfcb1edf.js → chartFunctions-34f19953.js} +1 -1
  54. package/dist/esm-es5/{functions-b791a892.js → functions-8800c690.js} +1 -1
  55. package/dist/esm-es5/{global-525745d2.js → global-3ec0570b.js} +1 -1
  56. package/dist/esm-es5/{intl-f2f7ce8b.js → intl-b110ca8d.js} +1 -1
  57. package/dist/esm-es5/loader.js +1 -1
  58. package/dist/esm-es5/priv-calendar.entry.js +1 -1
  59. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  60. package/dist/esm-es5/priv-option-list.entry.js +1 -1
  61. package/dist/esm-es5/ripple.js +1 -1
  62. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  63. package/dist/esm-es5/wm-button.entry.js +1 -1
  64. package/dist/esm-es5/wm-chart.entry.js +1 -1
  65. package/dist/esm-es5/wm-date-range.entry.js +1 -1
  66. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  67. package/dist/esm-es5/wm-file.entry.js +1 -1
  68. package/dist/esm-es5/wm-input.entry.js +1 -1
  69. package/dist/esm-es5/wm-line-chart.entry.js +1 -1
  70. package/dist/esm-es5/wm-modal-pss_3.entry.js +1 -1
  71. package/dist/esm-es5/wm-modal_3.entry.js +1 -1
  72. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  73. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  74. package/dist/esm-es5/wm-nested-select.entry.js +1 -1
  75. package/dist/esm-es5/wm-optgroup.entry.js +1 -1
  76. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  77. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  78. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  79. package/dist/esm-es5/wm-search.entry.js +1 -1
  80. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  81. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  82. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  83. package/dist/esm-es5/wm-tag-option.entry.js +1 -1
  84. package/dist/esm-es5/wm-textarea.entry.js +1 -1
  85. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  86. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  87. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  88. package/dist/ripple/{p-21d372ed.js → p-02dc1562.js} +1 -1
  89. package/dist/ripple/{p-ca971eac.system.entry.js → p-037bf5c7.system.entry.js} +1 -1
  90. package/dist/ripple/{p-ff1ed90f.entry.js → p-04d5e7d7.entry.js} +1 -1
  91. package/dist/ripple/{p-eefbca0e.system.js → p-064eda0e.system.js} +1 -1
  92. package/dist/ripple/{p-b01f9998.system.entry.js → p-0eea8fd3.system.entry.js} +1 -1
  93. package/dist/ripple/{p-1d18d9d2.system.entry.js → p-0faf7ef9.system.entry.js} +1 -1
  94. package/dist/ripple/{p-45f9ad09.entry.js → p-13cc92e7.entry.js} +1 -1
  95. package/dist/ripple/{p-236af552.entry.js → p-1618709f.entry.js} +1 -1
  96. package/dist/ripple/{p-bf7d98d8.entry.js → p-1c7201d1.entry.js} +1 -1
  97. package/dist/ripple/{p-c853e185.system.entry.js → p-2520d947.system.entry.js} +1 -1
  98. package/dist/ripple/{p-6d129ef8.system.entry.js → p-29f41fea.system.entry.js} +1 -1
  99. package/dist/ripple/{p-f24572f5.entry.js → p-2c028fe2.entry.js} +1 -1
  100. package/dist/ripple/{p-3e415c49.system.entry.js → p-2f565d7a.system.entry.js} +1 -1
  101. package/dist/ripple/{p-02deae76.entry.js → p-31b587a3.entry.js} +1 -1
  102. package/dist/ripple/{p-41550baa.entry.js → p-3212fd0e.entry.js} +1 -1
  103. package/dist/ripple/{p-215793a4.entry.js → p-34d80f95.entry.js} +1 -1
  104. package/dist/ripple/{p-f2101a0d.entry.js → p-37649315.entry.js} +1 -1
  105. package/dist/ripple/{p-aea13873.entry.js → p-3aca84d7.entry.js} +1 -1
  106. package/dist/ripple/{p-0b1c6965.system.entry.js → p-3bb1f795.system.entry.js} +1 -1
  107. package/dist/ripple/{p-828adbf1.system.js → p-4378b6b9.system.js} +1 -1
  108. package/dist/ripple/{p-ed1f6b8d.system.entry.js → p-43b03ad8.system.entry.js} +1 -1
  109. package/dist/ripple/{p-fa4f1030.system.entry.js → p-4743176d.system.entry.js} +1 -1
  110. package/dist/ripple/{p-c2e00d4a.system.entry.js → p-4c5606da.system.entry.js} +1 -1
  111. package/dist/ripple/p-54d7688a.entry.js +1 -0
  112. package/dist/ripple/{p-eddbcb21.js → p-5943c8b1.js} +1 -1
  113. package/dist/ripple/{p-2e79fa49.entry.js → p-5ea1c7a6.entry.js} +1 -1
  114. package/dist/ripple/{p-1389302e.system.entry.js → p-5eb02aa9.system.entry.js} +1 -1
  115. package/dist/ripple/{p-6cc07645.system.entry.js → p-6025efee.system.entry.js} +1 -1
  116. package/dist/ripple/p-6692b5a6.entry.js +1 -0
  117. package/dist/ripple/{p-db9657eb.system.entry.js → p-6a4c59e0.system.entry.js} +1 -1
  118. package/dist/ripple/{p-5284791c.entry.js → p-6ad695a5.entry.js} +1 -1
  119. package/dist/ripple/{p-149a22bf.entry.js → p-6d2122b9.entry.js} +1 -1
  120. package/dist/ripple/{p-30b905eb.system.entry.js → p-6eb50cc3.system.entry.js} +1 -1
  121. package/dist/ripple/{p-012cab20.entry.js → p-72c22a55.entry.js} +1 -1
  122. package/dist/ripple/{p-505eca1c.system.entry.js → p-7906a797.system.entry.js} +1 -1
  123. package/dist/ripple/{p-749597da.system.entry.js → p-7b982ba8.system.entry.js} +1 -1
  124. package/dist/ripple/{p-83be63f6.entry.js → p-7e4866c3.entry.js} +1 -1
  125. package/dist/ripple/{p-84ba5b74.entry.js → p-870cf4ef.entry.js} +1 -1
  126. package/dist/ripple/{p-1e625a5e.entry.js → p-8f217fb1.entry.js} +1 -1
  127. package/dist/ripple/{p-f4bcee58.system.entry.js → p-90261a03.system.entry.js} +1 -1
  128. package/dist/ripple/{p-f40e1468.system.entry.js → p-9a2cf94c.system.entry.js} +1 -1
  129. package/dist/ripple/{p-cff5d7e9.system.entry.js → p-9fccdac8.system.entry.js} +1 -1
  130. package/dist/ripple/p-ae4c8481.system.entry.js +1 -0
  131. package/dist/ripple/{p-c1e3c2fb.entry.js → p-b01d022f.entry.js} +1 -1
  132. package/dist/ripple/{p-b9dbf1f4.entry.js → p-b0e099f8.entry.js} +1 -1
  133. package/dist/ripple/{p-c47fab48.entry.js → p-b19ea29e.entry.js} +1 -1
  134. package/dist/ripple/p-b8671d49.system.entry.js +1 -0
  135. package/dist/ripple/{p-5300b15d.entry.js → p-b976c84b.entry.js} +1 -1
  136. package/dist/ripple/{p-226fe4e0.entry.js → p-c2657183.entry.js} +1 -1
  137. package/dist/ripple/{p-a3c01e10.system.entry.js → p-c39a3951.system.entry.js} +1 -1
  138. package/dist/ripple/{p-3deaf4d9.system.entry.js → p-cbd2473d.system.entry.js} +1 -1
  139. package/dist/ripple/{p-3d50db36.entry.js → p-cedfcf23.entry.js} +1 -1
  140. package/dist/ripple/{p-a0ecb6d7.system.entry.js → p-d824406e.system.entry.js} +1 -1
  141. package/dist/ripple/{p-6fdfe9f4.system.entry.js → p-dd26ae24.system.entry.js} +1 -1
  142. package/dist/ripple/{p-cad0c5f9.system.entry.js → p-dd76bf0a.system.entry.js} +1 -1
  143. package/dist/ripple/{p-e081fdc2.system.entry.js → p-e28671cd.system.entry.js} +1 -1
  144. package/dist/ripple/{p-72165bd2.entry.js → p-e4ff7200.entry.js} +1 -1
  145. package/dist/ripple/{p-df157138.entry.js → p-e53b6f7c.entry.js} +1 -1
  146. package/dist/ripple/{p-16f65bf4.js → p-eca78c2b.js} +1 -1
  147. package/dist/ripple/{p-1092e5ce.js → p-ed65f965.js} +1 -1
  148. package/dist/ripple/{p-ae82b3d2.system.js → p-edd87140.system.js} +1 -1
  149. package/dist/ripple/{p-81c2df85.system.js → p-ee31c799.system.js} +1 -1
  150. package/dist/ripple/{p-f90e4094.entry.js → p-f05e38b1.entry.js} +1 -1
  151. package/dist/ripple/p-f367f027.system.entry.js +1 -0
  152. package/dist/ripple/p-f939505d.entry.js +1 -0
  153. package/dist/ripple/{p-5a9e3108.system.entry.js → p-f9d26f8b.system.entry.js} +1 -1
  154. package/dist/ripple/{p-01035c8e.system.js → p-fb22d5a8.system.js} +1 -1
  155. package/dist/ripple/ripple.esm.js +1 -1
  156. package/dist/ripple/ripple.js +1 -1
  157. package/dist/types/components/charts/wm-line-chart/wm-line-chart.d.ts +0 -2
  158. package/dist/types/components/wm-modal-pss/wm-modal-pss-footer.d.ts +1 -1
  159. package/dist/types/components/wm-modal-pss/wm-modal-pss-header.d.ts +1 -1
  160. package/dist/types/components/wm-modal-pss/wm-modal-pss.d.ts +33 -0
  161. package/package.json +1 -1
  162. package/dist/ripple/p-249add87.system.entry.js +0 -1
  163. package/dist/ripple/p-5254f902.entry.js +0 -1
  164. package/dist/ripple/p-6e725656.system.entry.js +0 -1
  165. package/dist/ripple/p-725230dd.system.entry.js +0 -1
  166. package/dist/ripple/p-e687176d.entry.js +0 -1
  167. package/dist/ripple/p-f13b034e.entry.js +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const version = "5.7.0-9";
3
+ const version = "5.8.0-0";
4
4
 
5
5
  // PRINT RIPPLE VERSION IN CONSOLE
6
6
  // test envs return 0 for plugin.length
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-e86c28b6.js');
6
- require('./global-80ed0881.js');
6
+ require('./global-541becf9.js');
7
7
 
8
8
  const defineCustomElements = (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-e86c28b6.js');
6
6
  const functions = require('./functions-e24249e6.js');
7
7
 
8
- const privOptionListCss = ".search{-webkit-box-sizing:border-box;box-sizing:border-box;padding:1.25rem}.search .searchfield-wrapper{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:2.75rem;width:100%;padding:0 0.75rem;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;border:1px solid;border-color:var(--wmcolor-select-search-border)}.search .searchfield-wrapper:focus,.search .searchfield-wrapper.focus{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}.search .searchfield{width:100%;border:none;outline:none;font-family:inherit;font-size:0.875rem;margin-left:0.25rem}.search .icon:before{display:inline-block;font:normal normal normal 24px/1 \"Material Design Icons\";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:\"\\f349\";color:var(--wmcolor-select-search-icon);font-size:1.12rem}.search-results-message{padding:1.25rem;color:var(--wmcolor-select-searchresults-text);font-size:0.875rem;font-style:italic}.return-btn,.select-all{width:100%;cursor:pointer;padding:1.25rem;margin:0;background:var(--wmcolor-select-option-background);font-family:inherit;font-size:inherit;text-align:left;text-align:start;font-weight:500;color:var(--wmcolor-select-option-text);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.return-btn:hover,.select-all:hover{outline:none;background:var(--wmcolor-select-option-background-hover)}.return-btn:focus,.select-all:focus{outline:none;background:var(--wmcolor-select-option-background-focus)}.return-btn,.select-all,.search{border:none}.return-btn:not(:last-child),.select-all:not(:last-child),.search:not(:last-child){border-bottom:2px solid;border-color:var(--wmcolor-select-option-border)}.options-wrapper{overflow-y:auto;max-height:var(--max-height)}.non-options-wrapper{border-bottom:1px solid var(--wmcolor-border-dark)}.return-btn{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;font-weight:600;font-size:0.875rem}.return-btn:before{display:inline-block;font:normal normal normal 24px/1 \"Material Design Icons\";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:\"\\f141\";pointer-events:none;font-size:1.28rem}";
8
+ const privOptionListCss = ".search{-webkit-box-sizing:border-box;box-sizing:border-box;padding:1.25rem}.search .searchfield-wrapper{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:2.75rem;width:100%;padding:0 0.75rem;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;border:1px solid;border-color:var(--wmcolor-select-search-border)}.search .searchfield-wrapper:focus,.search .searchfield-wrapper.focus{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}.search .searchfield{width:100%;border:none;outline:none;font-family:inherit;font-size:0.875rem;margin-left:0.25rem}.search .icon:before{display:inline-block;font:normal normal normal 24px/1 \"Material Design Icons\";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:\"\\f349\";color:var(--wmcolor-select-search-icon);font-size:1.12rem}.search-results-message{padding:1.25rem;color:var(--wmcolor-select-searchresults-text);font-size:0.875rem;font-style:italic}.return-btn,.select-all{width:100%;cursor:pointer;padding:1.25rem;margin:0;background:var(--wmcolor-select-option-background);font-family:inherit;font-size:inherit;text-align:left;text-align:start;font-weight:500;color:var(--wmcolor-select-option-text);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.return-btn:hover,.select-all:hover{outline:none;background:var(--wmcolor-select-option-background-hover)}.return-btn:focus,.select-all:focus{outline:none;background:var(--wmcolor-select-option-background-focus)}.return-btn,.select-all,.search{border:none}.return-btn:not(:last-child),.select-all:not(:last-child),.search:not(:last-child){border-bottom:2px solid;border-color:var(--wmcolor-select-option-border)}.options-wrapper{overflow-y:auto;max-height:var(--max-height)}.non-options-wrapper{border-bottom:1px solid var(--wmcolor-border-dark)}.return-btn{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;font-weight:600;font-size:0.875rem}.return-btn:before{display:inline-block;font:normal normal normal 24px/1 \"Material Design Icons\";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:\"\\f141\";pointer-events:none;padding-right:0.5rem;font-size:1.28rem}.return-btn .return-btn-label{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-pack:justify;justify-content:space-between}.return-btn .return-btn-label .selection-count{font-weight:400;font-style:italic}";
9
9
 
10
10
  const PrivOptionList = class {
11
11
  constructor(hostRef) {
@@ -383,10 +383,21 @@ const PrivOptionList = class {
383
383
  this.announcement = message;
384
384
  }
385
385
  renderReturnBtn() {
386
+ const selectionCount = this.childOptions.filter((o) => o.selected).length;
387
+ const singleSelectionCountMessage = functions.intl.formatMessage({
388
+ id: "select.optgroupSingleSelectionCount",
389
+ defaultMessage: "Item Selected",
390
+ description: "Text indicating number of selected in a group, where only a single selection is possible.",
391
+ }, { numSelected: selectionCount });
392
+ const multipleSelectionCountMessage = functions.intl.formatMessage({
393
+ id: "select.optgroupMultipleSelectionCount",
394
+ defaultMessage: "{numSelected} Selected",
395
+ description: "Text indicating number of selected in a group, where multiple selections are possible.",
396
+ }, { numSelected: selectionCount });
386
397
  return (index.h("button", { ref: (el) => (this.returnBtnEl = el), id: "return-btn", class: "return-btn", onKeyDown: (ev) => this.handleKeyDown(ev), onClick: () => {
387
398
  //@ts-ignore -- Check out this one weird trick TypeScript doesn't want you to know about
388
399
  this.el.getRootNode().host.isExpanded = false;
389
- } }, this.optgroupLabel));
400
+ } }, index.h("div", { class: "return-btn-label" }, this.optgroupLabel, selectionCount > 0 && (index.h("span", { class: "selection-count" }, this.multiple ? multipleSelectionCountMessage : singleSelectionCountMessage)))));
390
401
  }
391
402
  renderSearchField() {
392
403
  return (index.h("div", { class: "search" }, index.h("div", { class: "searchfield-wrapper", ref: (el) => (this.searchFieldWrapperEl = el) }, index.h("div", { class: "icon" }), index.h("input", { ref: (el) => (this.searchFieldEl = el), class: "searchfield", role: "combobox", "aria-controls": "list",
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-e86c28b6.js');
6
- require('./global-80ed0881.js');
6
+ require('./global-541becf9.js');
7
7
 
8
8
  /*
9
9
  Stencil Client Patch Browser v4.8.2 | MIT Licensed | https://stenciljs.com
@@ -14,7 +14,6 @@ const LineChart = class {
14
14
  index.registerInstance(this, hostRef);
15
15
  this.minTickWidth = 120;
16
16
  this.popoverData = [];
17
- this.focusedDataPoint = [0, 0];
18
17
  this.dataPointMatrix = [];
19
18
  this.xIntervals = [];
20
19
  this.displayedXIntervals = [];
@@ -109,7 +108,7 @@ const LineChart = class {
109
108
  if (!ev.shiftKey && this.firstVisibleLineIdx !== -1) {
110
109
  ev.preventDefault();
111
110
  this.announce(this.lineFocusMessage(this.firstVisibleLineIdx));
112
- this.focusDataPoint(this.firstVisibleLineIdx, 0);
111
+ this.focusDataPointByEl(this.lineEls[this.firstVisibleLineIdx].querySelector(".point"));
113
112
  }
114
113
  break;
115
114
  case "ArrowUp":
@@ -127,9 +126,7 @@ const LineChart = class {
127
126
  }
128
127
  }
129
128
  handleDataPointKeydown(ev) {
130
- const [lineIdx, pointIdx] = this.focusedDataPoint;
131
- const lineLength = this.lineEls[lineIdx].querySelectorAll(".point").length;
132
- const numLines = this.dataPointMatrix.length;
129
+ const curPointEl = ev.target;
133
130
  switch (ev.key) {
134
131
  case "Tab":
135
132
  if (ev.shiftKey && this.visibilityToggles) {
@@ -138,32 +135,25 @@ const LineChart = class {
138
135
  }
139
136
  break;
140
137
  case "ArrowUp":
141
- ev.preventDefault();
142
- let prevLineIdx = lineIdx;
143
- do
144
- prevLineIdx = functions.wrapAround(prevLineIdx, -1, numLines - 1);
145
- while (this.hiddenLines.includes(prevLineIdx));
146
- this.announce(this.lineFocusMessage(prevLineIdx));
147
- this.focusDataPoint(prevLineIdx, pointIdx);
148
- break;
149
138
  case "ArrowDown":
150
139
  ev.preventDefault();
151
- let nextLineIdx = lineIdx;
152
- do
153
- nextLineIdx = functions.wrapAround(nextLineIdx, 1, numLines - 1);
154
- while (this.hiddenLines.includes(nextLineIdx));
155
- this.announce(this.lineFocusMessage(nextLineIdx));
156
- this.focusDataPoint(nextLineIdx, pointIdx);
140
+ const pointElsInColumn = Array.from(this.pointEls).filter((p) => p.dataset.pointidx == curPointEl.dataset.pointidx);
141
+ if (pointElsInColumn.length > 1) {
142
+ const nextPointIdx = functions.wrapAround(pointElsInColumn.indexOf(curPointEl), ev.key == "ArrowUp" ? -1 : 1, pointElsInColumn.length - 1);
143
+ const nextPointInColumn = pointElsInColumn[nextPointIdx];
144
+ this.announce(this.lineFocusMessage(parseInt(nextPointInColumn.dataset.lineidx)));
145
+ this.focusDataPointByEl(nextPointInColumn);
146
+ }
157
147
  break;
158
148
  case "ArrowLeft":
159
- ev.preventDefault();
160
- const prevPointIdx = functions.wrapAround(pointIdx, -1, lineLength - 1);
161
- this.focusDataPoint(lineIdx, prevPointIdx);
162
- break;
163
149
  case "ArrowRight":
164
150
  ev.preventDefault();
165
- const nextPointIdx = functions.wrapAround(pointIdx, 1, lineLength - 1);
166
- this.focusDataPoint(lineIdx, nextPointIdx);
151
+ const linePoints = Array.from(curPointEl.parentElement.querySelectorAll(".point"));
152
+ if (linePoints.length > 1) {
153
+ const nextPointIdxInDirection = functions.wrapAround(linePoints.indexOf(curPointEl), ev.key == "ArrowLeft" ? -1 : 1, linePoints.length - 1);
154
+ const nextPointInDirection = linePoints[nextPointIdxInDirection];
155
+ this.focusDataPointByEl(nextPointInDirection);
156
+ }
167
157
  break;
168
158
  }
169
159
  }
@@ -179,21 +169,13 @@ const LineChart = class {
179
169
  const numDataPoints = this.dataPointMatrix[lineIdx].filter((datapoint) => datapoint.yValue !== null).length;
180
170
  return `${label}, line ${lineIdx + 1} of ${this.dataPointMatrix.length} with ${numDataPoints} data points`;
181
171
  }
182
- focusDataPoint(lineIdx, pointIdx) {
183
- const lineEl = this.lineEls[lineIdx];
184
- const linePointEl = lineEl.querySelectorAll(".point")[pointIdx];
185
- this.pointEls.forEach((point) => (point.tabIndex = -1));
186
- linePointEl.tabIndex = 0;
187
- linePointEl.focus();
188
- this.focusedDataPoint = [lineIdx, pointIdx];
189
- }
190
172
  focusDataPointByEl(pointEl) {
191
- const lineIdx = parseInt(pointEl.dataset.lineidx);
192
- const pointIdx = Array.from(pointEl.parentElement.querySelectorAll(".point")).indexOf(pointEl);
173
+ // const lineIdx = parseInt(pointEl.dataset.lineidx!);
174
+ // const pointIdx = parseInt(pointEl.dataset.pointidx!);
193
175
  this.pointEls.forEach((point) => (point.tabIndex = -1));
194
176
  pointEl.tabIndex = 0;
195
177
  pointEl.focus();
196
- this.focusedDataPoint = [lineIdx, pointIdx];
178
+ // this.focusedDataPoint = [lineIdx, pointIdx];
197
179
  }
198
180
  calcYIntervals() {
199
181
  let yIntervals = [];
@@ -286,7 +268,6 @@ const LineChart = class {
286
268
  const lineEl = this.lineEls[this.firstVisibleLineIdx];
287
269
  const linePointEl = lineEl.querySelectorAll(".point")[0];
288
270
  linePointEl.tabIndex = 0;
289
- this.focusedDataPoint = [this.firstVisibleLineIdx, 0];
290
271
  }
291
272
  }
292
273
  calcDelta(dataPoint, prevDataPoint) {
@@ -366,7 +347,7 @@ const LineChart = class {
366
347
  const changeSinceMessage = intl.lineChartMessages.getChangeSince(prevDataPoint.xValue);
367
348
  ariaLabel += `, ${changeSinceMessage} ${this.calcDelta(dataPoint, prevDataPoint)}`;
368
349
  }
369
- return (index.h("span", { id: `${lineLabel}-${pointIdx}`, role: "img", "aria-label": ariaLabel, tabIndex: firstPointTabIndex, class: "point icon", style: iconStyle, "data-lineidx": lineIdx, "data-xvalue": xValue, onKeyDown: (ev) => this.handleDataPointKeydown(ev), onFocus: () => (this.popoverIndex = pointIdx), onClick: (ev) => this.focusDataPointByEl(ev.target), onMouseEnter: () => (this.popoverIndex = pointIdx) }));
350
+ return (index.h("span", { id: `${lineLabel}-${pointIdx}`, role: "img", "aria-label": ariaLabel, tabIndex: firstPointTabIndex, class: "point icon", style: iconStyle, "data-lineidx": lineIdx, "data-pointidx": pointIdx, "data-xvalue": xValue, onKeyDown: (ev) => this.handleDataPointKeydown(ev), onFocus: () => (this.popoverIndex = pointIdx), onClick: (ev) => this.focusDataPointByEl(ev.target), onMouseEnter: () => (this.popoverIndex = pointIdx) }));
370
351
  }
371
352
  })));
372
353
  }
@@ -3,10 +3,12 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-e86c28b6.js');
6
+ const functions = require('./functions-e24249e6.js');
7
+ const intl = require('./intl-5aeba788.js');
6
8
 
7
- const wmModalPssCss = "wm-modal-pss{--wmcolor-modal-background:var(--wmcolor-background);--wmcolor-modal-border:var(--wmcolor-border);--wmcolor-modal-heading:var(--wmcolor-text);--wmcolor-modal-overlay:var(--wmcolor-overlay);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;position:fixed;top:50%;left:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);z-index:2001;width:80vw;max-width:750px;max-height:80vh;-webkit-box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14)}wm-modal-pss *{-webkit-box-sizing:border-box;box-sizing:border-box}wm-modal-pss>*{width:80vw;max-width:750px;background:var(--wmcolor-modal-background)}wm-modal-pss>*:focus{outline:none}wm-modal-pss wm-modal-pss-header,wm-modal-pss wm-modal-pss-footer{padding:20px 30px}wm-modal-pss wm-modal-pss-header{z-index:2003}wm-modal-pss wm-modal-pss-footer{z-index:2003}wm-modal-pss>:not(wm-modal-pss-header):not(wm-modal-pss-footer){max-height:calc(80vh - 166px);z-index:2002}wm-modal-pss.wm-modal wm-modal-pss-header{border-bottom:1px solid var(--wmcolor-modal-border)}wm-modal-pss.wm-modal wm-modal-pss-footer{border-top:1px solid var(--wmcolor-modal-border)}@media only screen and (max-width: 768px){wm-modal-pss.wm-modal{height:100%;max-height:none;max-width:none;width:100vw}wm-modal-pss.wm-modal>*{max-width:none;width:100vw}wm-modal-pss.wm-modal>*:not(wm-modal-pss-header):not(wm-modal-pss-footer){max-height:none;height:calc(100vh - 166px)}}wm-modal-pss.wm-dialog>:not(wm-modal-pss-header):not(wm-modal-pss-footer){padding:0 30px 20px 30px;font-size:0.875rem;border:none}wm-modal-pss .overlay{width:100vw;height:100vh;max-width:none;max-height:none;position:fixed !important;top:-1;bottom:1;left:-1;right:1;-webkit-transform:translate(0%, 0%);transform:translate(0%, 0%);background-color:var(--wmcolor-modal-overlay);-webkit-transition:opacity 0.5s ease-out;transition:opacity 0.5s ease-out;z-index:2000}wm-modal-pss.hide{visibility:hidden}wm-modal-pss .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important;top:0;left:0}";
9
+ const wmModalPssCss = "wm-modal-pss{--wmcolor-modal-background:var(--wmcolor-background);--wmcolor-modal-border:var(--wmcolor-border);--wmcolor-modal-heading:var(--wmcolor-text);--wmcolor-modal-overlay:var(--wmcolor-overlay);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;position:fixed;top:50%;left:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);z-index:2001;width:80vw;max-width:750px;max-height:80vh;-webkit-box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);-moz-box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14)}wm-modal-pss *{-webkit-box-sizing:border-box;box-sizing:border-box}wm-modal-pss>*{width:80vw;max-width:750px;background:var(--wmcolor-modal-background)}wm-modal-pss>*:focus{outline:none}wm-modal-pss wm-modal-pss-header,wm-modal-pss wm-modal-pss-footer{padding:1.25rem 1.875rem}wm-modal-pss wm-modal-pss-header{z-index:2003}wm-modal-pss wm-modal-pss-footer{z-index:2003}wm-modal-pss>:not(wm-modal-pss-header):not(wm-modal-pss-footer){max-height:calc(80vh - 166px);z-index:2002}wm-modal-pss.wm-modal wm-modal-pss-header{border-bottom:1px solid var(--wmcolor-modal-border)}wm-modal-pss.wm-modal wm-modal-pss-footer{border-top:1px solid var(--wmcolor-modal-border)}@media only screen and (max-width: 768px){wm-modal-pss.wm-modal{height:100%;max-height:none;max-width:none;width:100vw}wm-modal-pss.wm-modal>*{max-width:none;width:100vw}wm-modal-pss.wm-modal>*:not(wm-modal-pss-header):not(wm-modal-pss-footer){max-height:none;height:calc(100vh - 166px)}}wm-modal-pss.wm-dialog>:not(wm-modal-pss-header):not(wm-modal-pss-footer){padding:0 1.875rem 1.25rem 1.875rem;font-size:0.875rem;border:none}wm-modal-pss .overlay{width:100vw;height:100vh;max-width:none;max-height:none;position:fixed !important;top:-1;bottom:1;left:-1;right:1;-webkit-transform:translate(0%, 0%);transform:translate(0%, 0%);background-color:var(--wmcolor-modal-overlay);-ms-transition:opacity 0.5s ease-out;-webkit-transition:opacity 0.5s ease-out;-moz-transition:opacity 0.5s ease-out;transition:opacity 0.5s ease-out;z-index:2000}wm-modal-pss.hide{visibility:hidden}wm-modal-pss .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important;top:0;left:0}";
8
10
 
9
- const Modal = class {
11
+ const ModalPss = class {
10
12
  constructor(hostRef) {
11
13
  index.registerInstance(this, hostRef);
12
14
  this.focusLastElement = index.createEvent(this, "focusLastElement", 3);
@@ -37,6 +39,12 @@ const Modal = class {
37
39
  toggleModal() {
38
40
  this.open ? this.showModal() : this.hideModal();
39
41
  }
42
+ //The below not implemented in light of the fact that the app does often need to keep track of the modal's state itself so that it can update the data displayed in the body:
43
+ //App can also open modal by emitting wmShowModal event. Event needs to include the modal's unique id as the event detail, or else all modals on the page will open when wmShowModal event is dispatched.
44
+ // @Listen("wmShowModal", { target: "window" })
45
+ // doesEventMatchId(ev: CustomEvent) {
46
+ // ev.detail === this.uid && this.showModal();
47
+ // }
40
48
  handleClick(ev) {
41
49
  this.open && ev.target === this.overlayEl && this.focusOnOpenEl.focus();
42
50
  }
@@ -71,14 +79,13 @@ const Modal = class {
71
79
  componentWillLoad() {
72
80
  if (this.elementToFocus === "primary" || this.elementToFocus === "secondary") {
73
81
  if (!this.el.id) {
74
- console.error("For accessibility purposes, you need to set the modal content wrapper's id to 'content-[id of wm-modal-pss]'.");
82
+ console.error("You are telling the modal to focus an element in the footer when it opens. That's fine! But when you do that, you also need to give the wm-modal-wrapper an ID and set the ID of the modal body to 'content-[id of wm-modal-wrapper]. This is for accessibility purposes.");
75
83
  }
76
84
  }
77
85
  this.el.focus = () => {
78
86
  this.focusOnOpenEl.focus();
79
87
  };
80
- const generatedId = "wmcl-" + Math.random().toString(36).substr(2, 10);
81
- this.uid = this.el.id ? this.el.id : generatedId;
88
+ this.uid = this.el.id ? this.el.id : functions.generateId();
82
89
  }
83
90
  componentDidLoad() {
84
91
  if (this.open) {
@@ -109,13 +116,7 @@ const Modal = class {
109
116
  this.focusOnCloseEl = elToFocus.parentElement;
110
117
  }
111
118
  else {
112
- let el;
113
- while (elToFocus && elToFocus.shadowRoot) {
114
- el = elToFocus.shadowRoot.activeElement;
115
- }
116
- if (el) {
117
- this.focusOnCloseEl = el;
118
- }
119
+ this.focusOnCloseEl = functions.checkForActiveElInShadow(elToFocus);
119
120
  }
120
121
  }
121
122
  redirectFocusFromBody() {
@@ -135,11 +136,11 @@ const Modal = class {
135
136
  "open": ["toggleModal"]
136
137
  }; }
137
138
  };
138
- Modal.style = wmModalPssCss;
139
+ ModalPss.style = wmModalPssCss;
139
140
 
140
- const wmModalPssFooterCss = "wm-modal-pss-footer{border-radius:0px 0px 5px 5px;margin-top:-1px}wm-modal-pss-footer .wm-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}@media only screen and (max-width: 650px){wm-modal-pss-footer .wm-wrapper.footer-text{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start}}wm-modal-pss-footer .wm-wrapper wm-button+wm-button{margin-left:1rem}wm-modal-pss-footer .wm-wrapper .wm-info{font-size:0.875rem;font-style:italic}@media only screen and (max-width: 650px){wm-modal-pss-footer .wm-wrapper .wm-info{padding-bottom:0.625rem}}wm-modal-pss-footer .wm-wrapper .wm-info:focus{outline:none}";
141
+ const wmModalPssFooterCss = "wm-modal-pss-footer{-webkit-border-radius:0px 0px 5px 5px;-moz-border-radius:0px 0px 5px 5px;-ms-border-radius:0px 0px 5px 5px;border-radius:0px 0px 5px 5px;margin-top:-1px}wm-modal-pss-footer .wm-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}@media only screen and (max-width: 650px){wm-modal-pss-footer .wm-wrapper.footer-text{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start}}wm-modal-pss-footer .wm-wrapper wm-button+wm-button{margin-left:1rem}wm-modal-pss-footer .wm-wrapper .wm-info{font-size:0.875rem;font-style:italic}@media only screen and (max-width: 650px){wm-modal-pss-footer .wm-wrapper .wm-info{padding-bottom:0.625rem}}wm-modal-pss-footer .wm-wrapper .wm-info:focus{outline:none}";
141
142
 
142
- const ModalFooter = class {
143
+ const ModalPssFooter = class {
143
144
  constructor(hostRef) {
144
145
  index.registerInstance(this, hostRef);
145
146
  this.secondaryText = "";
@@ -172,11 +173,11 @@ const ModalFooter = class {
172
173
  }
173
174
  get el() { return index.getElement(this); }
174
175
  };
175
- ModalFooter.style = wmModalPssFooterCss;
176
+ ModalPssFooter.style = wmModalPssFooterCss;
176
177
 
177
- const wmModalPssHeaderCss = "wm-modal-pss-header{border-radius:5px 5px 0 0px;margin-bottom:-1px}wm-modal-pss-header .wm-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}wm-modal-pss-header .wm-wrapper .title{margin:0;font-weight:600;font-size:1.125rem;color:var(--wmcolor-modal-heading);line-height:normal}wm-modal-pss-header .wm-wrapper .title .subtitle{display:block;font-size:0.875rem;font-weight:normal}wm-modal-pss-header .wm-wrapper .title:focus{outline:none}";
178
+ const wmModalPssHeaderCss = "wm-modal-pss-header{-webkit-border-radius:5px 5px 0 0px;-moz-border-radius:5px 5px 0 0px;-ms-border-radius:5px 5px 0 0px;border-radius:5px 5px 0 0px;margin-bottom:-1px}wm-modal-pss-header .wm-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}wm-modal-pss-header .wm-wrapper .title{margin:0;font-weight:600;font-size:1.125rem;color:var(--wmcolor-modal-heading);line-height:normal}wm-modal-pss-header .wm-wrapper .title .subtitle{display:block;font-size:0.875rem;font-weight:normal}wm-modal-pss-header .wm-wrapper .title:focus{outline:none}";
178
179
 
179
- const ModalHeader = class {
180
+ const ModalPssHeader = class {
180
181
  constructor(hostRef) {
181
182
  index.registerInstance(this, hostRef);
182
183
  this.heading = "";
@@ -202,12 +203,12 @@ const ModalHeader = class {
202
203
  // this.headingElement.focus();
203
204
  // }
204
205
  render() {
205
- return (index.h(index.Host, null, index.h("div", { class: "wm-wrapper" }, index.h("div", null, index.h("h2", { class: "title", id: `wm-modal-heading-text-${this.uid}` }, this.heading, index.h("span", { class: "subtitle" }, this.subheading))), index.h("wm-button", { "button-type": "navigational", icon: "f156", tooltip: "Close", "tooltip-position": "left", id: `wm-modal-close-${this.uid}`, ref: (el) => (this.closeButtonEl = el), onClick: () => this.emitParentCloseEvent() }))));
206
+ return (index.h(index.Host, null, index.h("div", { class: "wm-wrapper" }, index.h("div", null, index.h("h2", { class: "title", id: `wm-modal-heading-text-${this.uid}` }, this.heading, index.h("span", { class: "subtitle" }, this.subheading))), index.h("wm-button", { "button-type": "navigational", icon: "f156", tooltip: intl.globalMessages.close, "tooltip-position": "left", id: `wm-modal-close-${this.uid}`, ref: (el) => (this.closeButtonEl = el), onClick: () => this.emitParentCloseEvent() }))));
206
207
  }
207
208
  get el() { return index.getElement(this); }
208
209
  };
209
- ModalHeader.style = wmModalPssHeaderCss;
210
+ ModalPssHeader.style = wmModalPssHeaderCss;
210
211
 
211
- exports.wm_modal_pss = Modal;
212
- exports.wm_modal_pss_footer = ModalFooter;
213
- exports.wm_modal_pss_header = ModalHeader;
212
+ exports.wm_modal_pss = ModalPss;
213
+ exports.wm_modal_pss_footer = ModalPssFooter;
214
+ exports.wm_modal_pss_header = ModalPssHeader;
@@ -6,7 +6,6 @@ export class LineChart {
6
6
  constructor() {
7
7
  this.minTickWidth = 120;
8
8
  this.popoverData = [];
9
- this.focusedDataPoint = [0, 0];
10
9
  this.dataPointMatrix = [];
11
10
  this.xIntervals = [];
12
11
  this.displayedXIntervals = [];
@@ -101,7 +100,7 @@ export class LineChart {
101
100
  if (!ev.shiftKey && this.firstVisibleLineIdx !== -1) {
102
101
  ev.preventDefault();
103
102
  this.announce(this.lineFocusMessage(this.firstVisibleLineIdx));
104
- this.focusDataPoint(this.firstVisibleLineIdx, 0);
103
+ this.focusDataPointByEl(this.lineEls[this.firstVisibleLineIdx].querySelector(".point"));
105
104
  }
106
105
  break;
107
106
  case "ArrowUp":
@@ -119,9 +118,7 @@ export class LineChart {
119
118
  }
120
119
  }
121
120
  handleDataPointKeydown(ev) {
122
- const [lineIdx, pointIdx] = this.focusedDataPoint;
123
- const lineLength = this.lineEls[lineIdx].querySelectorAll(".point").length;
124
- const numLines = this.dataPointMatrix.length;
121
+ const curPointEl = ev.target;
125
122
  switch (ev.key) {
126
123
  case "Tab":
127
124
  if (ev.shiftKey && this.visibilityToggles) {
@@ -130,32 +127,25 @@ export class LineChart {
130
127
  }
131
128
  break;
132
129
  case "ArrowUp":
133
- ev.preventDefault();
134
- let prevLineIdx = lineIdx;
135
- do
136
- prevLineIdx = wrapAround(prevLineIdx, -1, numLines - 1);
137
- while (this.hiddenLines.includes(prevLineIdx));
138
- this.announce(this.lineFocusMessage(prevLineIdx));
139
- this.focusDataPoint(prevLineIdx, pointIdx);
140
- break;
141
130
  case "ArrowDown":
142
131
  ev.preventDefault();
143
- let nextLineIdx = lineIdx;
144
- do
145
- nextLineIdx = wrapAround(nextLineIdx, 1, numLines - 1);
146
- while (this.hiddenLines.includes(nextLineIdx));
147
- this.announce(this.lineFocusMessage(nextLineIdx));
148
- this.focusDataPoint(nextLineIdx, pointIdx);
132
+ const pointElsInColumn = Array.from(this.pointEls).filter((p) => p.dataset.pointidx == curPointEl.dataset.pointidx);
133
+ if (pointElsInColumn.length > 1) {
134
+ const nextPointIdx = wrapAround(pointElsInColumn.indexOf(curPointEl), ev.key == "ArrowUp" ? -1 : 1, pointElsInColumn.length - 1);
135
+ const nextPointInColumn = pointElsInColumn[nextPointIdx];
136
+ this.announce(this.lineFocusMessage(parseInt(nextPointInColumn.dataset.lineidx)));
137
+ this.focusDataPointByEl(nextPointInColumn);
138
+ }
149
139
  break;
150
140
  case "ArrowLeft":
151
- ev.preventDefault();
152
- const prevPointIdx = wrapAround(pointIdx, -1, lineLength - 1);
153
- this.focusDataPoint(lineIdx, prevPointIdx);
154
- break;
155
141
  case "ArrowRight":
156
142
  ev.preventDefault();
157
- const nextPointIdx = wrapAround(pointIdx, 1, lineLength - 1);
158
- this.focusDataPoint(lineIdx, nextPointIdx);
143
+ const linePoints = Array.from(curPointEl.parentElement.querySelectorAll(".point"));
144
+ if (linePoints.length > 1) {
145
+ const nextPointIdxInDirection = wrapAround(linePoints.indexOf(curPointEl), ev.key == "ArrowLeft" ? -1 : 1, linePoints.length - 1);
146
+ const nextPointInDirection = linePoints[nextPointIdxInDirection];
147
+ this.focusDataPointByEl(nextPointInDirection);
148
+ }
159
149
  break;
160
150
  }
161
151
  }
@@ -171,21 +161,13 @@ export class LineChart {
171
161
  const numDataPoints = this.dataPointMatrix[lineIdx].filter((datapoint) => datapoint.yValue !== null).length;
172
162
  return `${label}, line ${lineIdx + 1} of ${this.dataPointMatrix.length} with ${numDataPoints} data points`;
173
163
  }
174
- focusDataPoint(lineIdx, pointIdx) {
175
- const lineEl = this.lineEls[lineIdx];
176
- const linePointEl = lineEl.querySelectorAll(".point")[pointIdx];
177
- this.pointEls.forEach((point) => (point.tabIndex = -1));
178
- linePointEl.tabIndex = 0;
179
- linePointEl.focus();
180
- this.focusedDataPoint = [lineIdx, pointIdx];
181
- }
182
164
  focusDataPointByEl(pointEl) {
183
- const lineIdx = parseInt(pointEl.dataset.lineidx);
184
- const pointIdx = Array.from(pointEl.parentElement.querySelectorAll(".point")).indexOf(pointEl);
165
+ // const lineIdx = parseInt(pointEl.dataset.lineidx!);
166
+ // const pointIdx = parseInt(pointEl.dataset.pointidx!);
185
167
  this.pointEls.forEach((point) => (point.tabIndex = -1));
186
168
  pointEl.tabIndex = 0;
187
169
  pointEl.focus();
188
- this.focusedDataPoint = [lineIdx, pointIdx];
170
+ // this.focusedDataPoint = [lineIdx, pointIdx];
189
171
  }
190
172
  calcYIntervals() {
191
173
  let yIntervals = [];
@@ -278,7 +260,6 @@ export class LineChart {
278
260
  const lineEl = this.lineEls[this.firstVisibleLineIdx];
279
261
  const linePointEl = lineEl.querySelectorAll(".point")[0];
280
262
  linePointEl.tabIndex = 0;
281
- this.focusedDataPoint = [this.firstVisibleLineIdx, 0];
282
263
  }
283
264
  }
284
265
  calcDelta(dataPoint, prevDataPoint) {
@@ -358,7 +339,7 @@ export class LineChart {
358
339
  const changeSinceMessage = lineChartMessages.getChangeSince(prevDataPoint.xValue);
359
340
  ariaLabel += `, ${changeSinceMessage} ${this.calcDelta(dataPoint, prevDataPoint)}`;
360
341
  }
361
- return (h("span", { id: `${lineLabel}-${pointIdx}`, role: "img", "aria-label": ariaLabel, tabIndex: firstPointTabIndex, class: "point icon", style: iconStyle, "data-lineidx": lineIdx, "data-xvalue": xValue, onKeyDown: (ev) => this.handleDataPointKeydown(ev), onFocus: () => (this.popoverIndex = pointIdx), onClick: (ev) => this.focusDataPointByEl(ev.target), onMouseEnter: () => (this.popoverIndex = pointIdx) }));
342
+ return (h("span", { id: `${lineLabel}-${pointIdx}`, role: "img", "aria-label": ariaLabel, tabIndex: firstPointTabIndex, class: "point icon", style: iconStyle, "data-lineidx": lineIdx, "data-pointidx": pointIdx, "data-xvalue": xValue, onKeyDown: (ev) => this.handleDataPointKeydown(ev), onFocus: () => (this.popoverIndex = pointIdx), onClick: (ev) => this.focusDataPointByEl(ev.target), onMouseEnter: () => (this.popoverIndex = pointIdx) }));
362
343
  }
363
344
  })));
364
345
  }
@@ -142,5 +142,15 @@
142
142
  -moz-osx-font-smoothing: grayscale;
143
143
  content: "\f141";
144
144
  pointer-events: none;
145
+ padding-right: 0.5rem;
145
146
  font-size: 1.28rem;
147
+ }
148
+ .return-btn .return-btn-label {
149
+ display: flex;
150
+ flex-grow: 1;
151
+ justify-content: space-between;
152
+ }
153
+ .return-btn .return-btn-label .selection-count {
154
+ font-weight: 400;
155
+ font-style: italic;
146
156
  }
@@ -369,10 +369,21 @@ export class PrivOptionList {
369
369
  this.announcement = message;
370
370
  }
371
371
  renderReturnBtn() {
372
+ const selectionCount = this.childOptions.filter((o) => o.selected).length;
373
+ const singleSelectionCountMessage = intl.formatMessage({
374
+ id: "select.optgroupSingleSelectionCount",
375
+ defaultMessage: "Item Selected",
376
+ description: "Text indicating number of selected in a group, where only a single selection is possible.",
377
+ }, { numSelected: selectionCount });
378
+ const multipleSelectionCountMessage = intl.formatMessage({
379
+ id: "select.optgroupMultipleSelectionCount",
380
+ defaultMessage: "{numSelected} Selected",
381
+ description: "Text indicating number of selected in a group, where multiple selections are possible.",
382
+ }, { numSelected: selectionCount });
372
383
  return (h("button", { ref: (el) => (this.returnBtnEl = el), id: "return-btn", class: "return-btn", onKeyDown: (ev) => this.handleKeyDown(ev), onClick: () => {
373
384
  //@ts-ignore -- Check out this one weird trick TypeScript doesn't want you to know about
374
385
  this.el.getRootNode().host.isExpanded = false;
375
- } }, this.optgroupLabel));
386
+ } }, h("div", { class: "return-btn-label" }, this.optgroupLabel, selectionCount > 0 && (h("span", { class: "selection-count" }, this.multiple ? multipleSelectionCountMessage : singleSelectionCountMessage)))));
376
387
  }
377
388
  renderSearchField() {
378
389
  return (h("div", { class: "search" }, h("div", { class: "searchfield-wrapper", ref: (el) => (this.searchFieldWrapperEl = el) }, h("div", { class: "icon" }), h("input", { ref: (el) => (this.searchFieldEl = el), class: "searchfield", role: "combobox", "aria-controls": "list",
@@ -30,12 +30,24 @@
30
30
  (they can't be aligned on the baseline because of possible description text and error message)
31
31
  -------------------------------------- */
32
32
  wm-modal-pss-footer {
33
+ -webkit-border-radius: 0px 0px 5px 5px;
34
+ -moz-border-radius: 0px 0px 5px 5px;
35
+ -ms-border-radius: 0px 0px 5px 5px;
33
36
  border-radius: 0px 0px 5px 5px;
34
37
  margin-top: -1px;
35
38
  }
36
39
  wm-modal-pss-footer .wm-wrapper {
40
+ display: -webkit-box;
41
+ display: -webkit-flex;
42
+ display: -ms-flexbox;
37
43
  display: flex;
44
+ -webkit-box-pack: justify;
45
+ -ms-flex-pack: justify;
46
+ -webkit-justify-content: space-between;
38
47
  justify-content: space-between;
48
+ -webkit-box-align: center;
49
+ -webkit-align-items: center;
50
+ -ms-flex-align: center;
39
51
  align-items: center;
40
52
  }
41
53
  @media only screen and (max-width: 650px) {
@@ -1,5 +1,5 @@
1
1
  import { h } from "@stencil/core";
2
- export class ModalFooter {
2
+ export class ModalPssFooter {
3
3
  constructor() {
4
4
  this.secondaryText = "";
5
5
  this.primaryText = "";
@@ -30,12 +30,24 @@
30
30
  (they can't be aligned on the baseline because of possible description text and error message)
31
31
  -------------------------------------- */
32
32
  wm-modal-pss-header {
33
+ -webkit-border-radius: 5px 5px 0 0px;
34
+ -moz-border-radius: 5px 5px 0 0px;
35
+ -ms-border-radius: 5px 5px 0 0px;
33
36
  border-radius: 5px 5px 0 0px;
34
37
  margin-bottom: -1px;
35
38
  }
36
39
  wm-modal-pss-header .wm-wrapper {
40
+ display: -webkit-box;
41
+ display: -webkit-flex;
42
+ display: -ms-flexbox;
37
43
  display: flex;
44
+ -webkit-box-pack: justify;
45
+ -ms-flex-pack: justify;
46
+ -webkit-justify-content: space-between;
38
47
  justify-content: space-between;
48
+ -webkit-box-align: center;
49
+ -webkit-align-items: center;
50
+ -ms-flex-align: center;
39
51
  align-items: center;
40
52
  }
41
53
  wm-modal-pss-header .wm-wrapper .title {
@@ -1,5 +1,6 @@
1
1
  import { h, Host } from "@stencil/core";
2
- export class ModalHeader {
2
+ import { globalMessages } from "../../global/intl";
3
+ export class ModalPssHeader {
3
4
  constructor() {
4
5
  this.heading = "";
5
6
  this.subheading = "";
@@ -24,7 +25,7 @@ export class ModalHeader {
24
25
  // this.headingElement.focus();
25
26
  // }
26
27
  render() {
27
- return (h(Host, null, h("div", { class: "wm-wrapper" }, h("div", null, h("h2", { class: "title", id: `wm-modal-heading-text-${this.uid}` }, this.heading, h("span", { class: "subtitle" }, this.subheading))), h("wm-button", { "button-type": "navigational", icon: "f156", tooltip: "Close", "tooltip-position": "left", id: `wm-modal-close-${this.uid}`, ref: (el) => (this.closeButtonEl = el), onClick: () => this.emitParentCloseEvent() }))));
28
+ return (h(Host, null, h("div", { class: "wm-wrapper" }, h("div", null, h("h2", { class: "title", id: `wm-modal-heading-text-${this.uid}` }, this.heading, h("span", { class: "subtitle" }, this.subheading))), h("wm-button", { "button-type": "navigational", icon: "f156", tooltip: globalMessages.close, "tooltip-position": "left", id: `wm-modal-close-${this.uid}`, ref: (el) => (this.closeButtonEl = el), onClick: () => this.emitParentCloseEvent() }))));
28
29
  }
29
30
  static get is() { return "wm-modal-pss-header"; }
30
31
  static get originalStyleUrls() {
@@ -34,8 +34,17 @@ wm-modal-pss {
34
34
  --wmcolor-modal-border: var(--wmcolor-border);
35
35
  --wmcolor-modal-heading: var(--wmcolor-text);
36
36
  --wmcolor-modal-overlay: var(--wmcolor-overlay);
37
+ display: -webkit-box;
38
+ display: -webkit-flex;
39
+ display: -ms-flexbox;
37
40
  display: flex;
41
+ -webkit-box-pack: center;
42
+ -ms-flex-pack: center;
43
+ -webkit-justify-content: center;
38
44
  justify-content: center;
45
+ -webkit-box-align: center;
46
+ -webkit-align-items: center;
47
+ -ms-flex-align: center;
39
48
  align-items: center;
40
49
  flex-direction: column;
41
50
  position: fixed;
@@ -46,6 +55,8 @@ wm-modal-pss {
46
55
  width: 80vw;
47
56
  max-width: 750px;
48
57
  max-height: 80vh;
58
+ -webkit-box-shadow: 0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);
59
+ -moz-box-shadow: 0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);
49
60
  box-shadow: 0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);
50
61
  }
51
62
  wm-modal-pss * {
@@ -61,7 +72,7 @@ wm-modal-pss > *:focus {
61
72
  }
62
73
  wm-modal-pss wm-modal-pss-header,
63
74
  wm-modal-pss wm-modal-pss-footer {
64
- padding: 20px 30px;
75
+ padding: 1.25rem 1.875rem;
65
76
  }
66
77
  wm-modal-pss wm-modal-pss-header {
67
78
  z-index: 2003;
@@ -96,7 +107,7 @@ wm-modal-pss.wm-modal wm-modal-pss-footer {
96
107
  }
97
108
  }
98
109
  wm-modal-pss.wm-dialog > :not(wm-modal-pss-header):not(wm-modal-pss-footer) {
99
- padding: 0 30px 20px 30px;
110
+ padding: 0 1.875rem 1.25rem 1.875rem;
100
111
  font-size: 0.875rem;
101
112
  border: none;
102
113
  }
@@ -112,6 +123,9 @@ wm-modal-pss .overlay {
112
123
  right: 1;
113
124
  transform: translate(0%, 0%);
114
125
  background-color: var(--wmcolor-modal-overlay);
126
+ -ms-transition: opacity 0.5s ease-out;
127
+ -webkit-transition: opacity 0.5s ease-out;
128
+ -moz-transition: opacity 0.5s ease-out;
115
129
  transition: opacity 0.5s ease-out;
116
130
  z-index: 2000;
117
131
  }