@watermarkinsights/ripple 3.7.0 → 3.8.0-2

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 (253) hide show
  1. package/dist/cjs/{functions-13b0e88e.js → functions-edfdd03f.js} +67 -41
  2. package/dist/cjs/{global-c802d13c.js → global-ffd0392c.js} +1 -1
  3. package/dist/cjs/{index-cd179539.js → index-0e7e3668.js} +96 -64
  4. package/dist/cjs/loader.cjs.js +4 -4
  5. package/dist/cjs/priv-chart-popover.cjs.entry.js +4 -4
  6. package/dist/cjs/priv-datepicker.cjs.entry.js +23 -18
  7. package/dist/cjs/priv-navigator-button.cjs.entry.js +3 -3
  8. package/dist/cjs/priv-navigator-item.cjs.entry.js +2 -2
  9. package/dist/cjs/ripple.cjs.js +4 -4
  10. package/dist/cjs/wm-action-menu_2.cjs.entry.js +5 -5
  11. package/dist/cjs/wm-button.cjs.entry.js +4 -4
  12. package/dist/cjs/wm-chart-slice.cjs.entry.js +2 -2
  13. package/dist/cjs/wm-chart.cjs.entry.js +5 -5
  14. package/dist/cjs/wm-datepicker.cjs.entry.js +13 -4
  15. package/dist/cjs/wm-input.cjs.entry.js +4 -4
  16. package/dist/cjs/wm-modal-footer.cjs.entry.js +3 -3
  17. package/dist/cjs/wm-modal-header.cjs.entry.js +3 -3
  18. package/dist/cjs/wm-modal.cjs.entry.js +7 -5
  19. package/dist/cjs/wm-navigation-hamburger.cjs.entry.js +56 -0
  20. package/dist/cjs/wm-navigation-item.cjs.entry.js +31 -0
  21. package/dist/cjs/wm-navigation.cjs.entry.js +87 -0
  22. package/dist/cjs/wm-navigator.cjs.entry.js +4 -4
  23. package/dist/cjs/wm-network-uploader.cjs.entry.js +4 -4
  24. package/dist/cjs/wm-option_2.cjs.entry.js +6 -6
  25. package/dist/cjs/wm-pagination.cjs.entry.js +4 -4
  26. package/dist/cjs/wm-search.cjs.entry.js +4 -4
  27. package/dist/cjs/wm-snackbar.cjs.entry.js +4 -4
  28. package/dist/cjs/wm-tab-item_3.cjs.entry.js +7 -7
  29. package/dist/cjs/wm-tag-input.cjs.entry.js +13 -4
  30. package/dist/cjs/wm-timepicker.cjs.entry.js +9 -6
  31. package/dist/cjs/wm-toggletip.cjs.entry.js +4 -4
  32. package/dist/cjs/wm-uploader.cjs.entry.js +4 -4
  33. package/dist/cjs/wm-wrapper.cjs.entry.js +2 -2
  34. package/dist/collection/collection-manifest.json +10 -2
  35. package/dist/collection/components/wm-action-menu/wm-action-menu.css +0 -1
  36. package/dist/collection/components/wm-button/wm-button.css +1 -3
  37. package/dist/collection/components/wm-chart/priv-chart-popover/priv-chart-popover.css +0 -1
  38. package/dist/collection/components/wm-chart/wm-chart-slice.js +51 -0
  39. package/dist/collection/components/wm-chart/wm-chart.css +3 -1
  40. package/dist/collection/components/wm-chart/wm-chart.js +1 -1
  41. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.css +3 -5
  42. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +39 -15
  43. package/dist/collection/components/wm-datepicker/wm-datepicker.css +1 -3
  44. package/dist/collection/components/wm-datepicker/wm-datepicker.js +15 -0
  45. package/dist/collection/components/wm-input/wm-input.css +1 -3
  46. package/dist/collection/components/wm-menuitem/wm-menuitem.css +0 -1
  47. package/dist/collection/components/wm-modal/wm-modal-footer.css +0 -1
  48. package/dist/collection/components/wm-modal/wm-modal-header.css +0 -1
  49. package/dist/collection/components/wm-modal/wm-modal.css +0 -1
  50. package/dist/collection/components/wm-modal/wm-modal.js +3 -1
  51. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +86 -0
  52. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +96 -0
  53. package/dist/collection/components/wm-navigation/wm-navigation-item.css +85 -0
  54. package/dist/collection/components/wm-navigation/wm-navigation-item.js +101 -0
  55. package/dist/collection/components/wm-navigation/wm-navigation.css +117 -0
  56. package/dist/collection/components/wm-navigation/wm-navigation.js +142 -0
  57. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.css +0 -1
  58. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.css +0 -1
  59. package/dist/collection/components/wm-navigator/wm-navigator.css +0 -1
  60. package/dist/collection/components/wm-option/wm-option.css +2 -4
  61. package/dist/collection/components/wm-pagination/wm-pagination.css +0 -1
  62. package/dist/collection/components/wm-search/wm-search.css +0 -1
  63. package/dist/collection/components/wm-select/wm-select.css +2 -4
  64. package/dist/collection/components/wm-snackbar/wm-snackbar.css +2 -4
  65. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +0 -1
  66. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.css +0 -1
  67. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.css +0 -1
  68. package/dist/collection/components/wm-tag-input/wm-tag-input.css +2 -4
  69. package/dist/collection/components/wm-tag-input/wm-tag-input.js +9 -0
  70. package/dist/collection/components/wm-timepicker/wm-timepicker.css +2 -4
  71. package/dist/collection/components/wm-timepicker/wm-timepicker.js +5 -2
  72. package/dist/collection/components/wm-toggletip/wm-toggletip.css +1 -3
  73. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.css +1 -3
  74. package/dist/collection/components/wm-uploader/wm-uploader.css +1 -3
  75. package/dist/esm/{functions-6ddad20e.js → functions-6cd52dcf.js} +67 -41
  76. package/dist/esm/{global-a4da88c7.js → global-51d6ea5f.js} +1 -1
  77. package/dist/esm/{index-66f8130e.js → index-cd8f9ae2.js} +96 -64
  78. package/dist/esm/loader.js +4 -4
  79. package/dist/esm/polyfills/css-shim.js +1 -1
  80. package/dist/esm/priv-chart-popover.entry.js +4 -4
  81. package/dist/esm/priv-datepicker.entry.js +23 -18
  82. package/dist/esm/priv-navigator-button.entry.js +3 -3
  83. package/dist/esm/priv-navigator-item.entry.js +2 -2
  84. package/dist/esm/ripple.js +4 -4
  85. package/dist/esm/wm-action-menu_2.entry.js +5 -5
  86. package/dist/esm/wm-button.entry.js +4 -4
  87. package/dist/esm/wm-chart-slice.entry.js +2 -2
  88. package/dist/esm/wm-chart.entry.js +5 -5
  89. package/dist/esm/wm-datepicker.entry.js +13 -4
  90. package/dist/esm/wm-input.entry.js +4 -4
  91. package/dist/esm/wm-modal-footer.entry.js +3 -3
  92. package/dist/esm/wm-modal-header.entry.js +3 -3
  93. package/dist/esm/wm-modal.entry.js +7 -5
  94. package/dist/esm/wm-navigation-hamburger.entry.js +52 -0
  95. package/dist/esm/wm-navigation-item.entry.js +27 -0
  96. package/dist/esm/wm-navigation.entry.js +83 -0
  97. package/dist/esm/wm-navigator.entry.js +4 -4
  98. package/dist/esm/wm-network-uploader.entry.js +4 -4
  99. package/dist/esm/wm-option_2.entry.js +6 -6
  100. package/dist/esm/wm-pagination.entry.js +4 -4
  101. package/dist/esm/wm-search.entry.js +4 -4
  102. package/dist/esm/wm-snackbar.entry.js +4 -4
  103. package/dist/esm/wm-tab-item_3.entry.js +7 -7
  104. package/dist/esm/wm-tag-input.entry.js +13 -4
  105. package/dist/esm/wm-timepicker.entry.js +9 -6
  106. package/dist/esm/wm-toggletip.entry.js +4 -4
  107. package/dist/esm/wm-uploader.entry.js +4 -4
  108. package/dist/esm/wm-wrapper.entry.js +2 -2
  109. package/dist/esm-es5/functions-6cd52dcf.js +15 -0
  110. package/dist/esm-es5/global-51d6ea5f.js +1 -0
  111. package/dist/esm-es5/http-service-5d037e16.js +1 -0
  112. package/dist/esm-es5/index-cd8f9ae2.js +1 -0
  113. package/dist/esm-es5/index.js +0 -0
  114. package/dist/esm-es5/interfaces-61c6305b.js +1 -0
  115. package/dist/esm-es5/loader.js +1 -0
  116. package/dist/esm-es5/priv-chart-popover.entry.js +1 -0
  117. package/dist/esm-es5/priv-datepicker.entry.js +1 -0
  118. package/dist/esm-es5/priv-navigator-button.entry.js +1 -0
  119. package/dist/esm-es5/priv-navigator-item.entry.js +1 -0
  120. package/dist/esm-es5/ripple.js +1 -0
  121. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -0
  122. package/dist/esm-es5/wm-button.entry.js +1 -0
  123. package/dist/esm-es5/wm-chart-slice.entry.js +1 -0
  124. package/dist/esm-es5/wm-chart.entry.js +1 -0
  125. package/dist/esm-es5/wm-datepicker.entry.js +1 -0
  126. package/dist/esm-es5/wm-input.entry.js +1 -0
  127. package/dist/esm-es5/wm-modal-footer.entry.js +1 -0
  128. package/dist/esm-es5/wm-modal-header.entry.js +1 -0
  129. package/dist/esm-es5/wm-modal.entry.js +1 -0
  130. package/dist/esm-es5/wm-navigation-hamburger.entry.js +1 -0
  131. package/dist/esm-es5/wm-navigation-item.entry.js +1 -0
  132. package/dist/esm-es5/wm-navigation.entry.js +1 -0
  133. package/dist/esm-es5/wm-navigator.entry.js +1 -0
  134. package/dist/esm-es5/wm-network-uploader.entry.js +1 -0
  135. package/dist/esm-es5/wm-option_2.entry.js +1 -0
  136. package/dist/esm-es5/wm-pagination.entry.js +1 -0
  137. package/dist/esm-es5/wm-search.entry.js +1 -0
  138. package/dist/esm-es5/wm-snackbar.entry.js +1 -0
  139. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -0
  140. package/dist/esm-es5/wm-tag-input.entry.js +1 -0
  141. package/dist/esm-es5/wm-timepicker.entry.js +1 -0
  142. package/dist/esm-es5/wm-toggletip.entry.js +1 -0
  143. package/dist/esm-es5/wm-uploader.entry.js +1 -0
  144. package/dist/esm-es5/wm-wrapper.entry.js +1 -0
  145. package/dist/index.js +1 -1
  146. package/dist/loader/index.d.ts +0 -1
  147. package/dist/loader/index.js +1 -1
  148. package/dist/ripple/p-05b44011.system.entry.js +1 -0
  149. package/dist/ripple/p-088e3c4c.system.entry.js +1 -0
  150. package/dist/ripple/p-08b7ec08.system.js +1 -0
  151. package/dist/ripple/p-15759528.system.entry.js +1 -0
  152. package/dist/ripple/p-17fef956.entry.js +1 -0
  153. package/dist/ripple/p-1d7049b5.system.entry.js +1 -0
  154. package/dist/ripple/p-20856a2d.system.js +1 -0
  155. package/dist/ripple/p-2206c8d0.entry.js +1 -0
  156. package/dist/ripple/p-244877c8.entry.js +1 -0
  157. package/dist/ripple/p-284a9749.system.entry.js +1 -0
  158. package/dist/ripple/p-2b526a98.entry.js +1 -0
  159. package/dist/ripple/p-2f63e022.system.entry.js +1 -0
  160. package/dist/ripple/p-313b6073.system.js +1 -0
  161. package/dist/ripple/p-323c8fbd.entry.js +1 -0
  162. package/dist/ripple/p-38062c39.js +1 -0
  163. package/dist/ripple/p-3ba3afca.entry.js +1 -0
  164. package/dist/ripple/p-45ee5b9d.system.entry.js +1 -0
  165. package/dist/ripple/p-48ab9e16.entry.js +1 -0
  166. package/dist/ripple/p-4999f5dc.entry.js +1 -0
  167. package/dist/ripple/p-4ab257fe.entry.js +1 -0
  168. package/dist/ripple/p-4c0de099.system.entry.js +1 -0
  169. package/dist/ripple/p-4c75587a.system.entry.js +1 -0
  170. package/dist/ripple/p-4ed98fb1.system.entry.js +1 -0
  171. package/dist/ripple/p-504579c2.system.entry.js +1 -0
  172. package/dist/ripple/p-50ea2036.system.js +1 -0
  173. package/dist/ripple/p-58a1e616.system.entry.js +1 -0
  174. package/dist/ripple/p-5fd47eac.entry.js +1 -0
  175. package/dist/ripple/p-664c3f62.entry.js +1 -0
  176. package/dist/ripple/p-6923b8f6.system.js +15 -0
  177. package/dist/ripple/p-6e5a35ae.system.entry.js +1 -0
  178. package/dist/ripple/p-741972e8.system.entry.js +1 -0
  179. package/dist/ripple/p-764fa608.entry.js +1 -0
  180. package/dist/ripple/p-77bd8d1b.entry.js +1 -0
  181. package/dist/ripple/p-7ff67db9.entry.js +1 -0
  182. package/dist/ripple/p-8139cdfe.system.js +1 -0
  183. package/dist/ripple/p-83028f2c.js +1 -0
  184. package/dist/ripple/p-864b71bf.system.entry.js +1 -0
  185. package/dist/ripple/p-87b8fddf.entry.js +1 -0
  186. package/dist/ripple/p-8a0450fd.entry.js +1 -0
  187. package/dist/ripple/p-9173f673.entry.js +1 -0
  188. package/dist/ripple/p-9a9743f5.system.entry.js +1 -0
  189. package/dist/ripple/p-9f442b49.system.entry.js +1 -0
  190. package/dist/ripple/p-a2c2f475.system.entry.js +1 -0
  191. package/dist/ripple/p-a3fcdd9f.entry.js +1 -0
  192. package/dist/ripple/p-a5177480.system.entry.js +1 -0
  193. package/dist/ripple/p-a588ae81.entry.js +1 -0
  194. package/dist/ripple/p-a8358b36.entry.js +1 -0
  195. package/dist/ripple/p-a88d46f9.system.entry.js +1 -0
  196. package/dist/ripple/p-a8dfec6d.system.entry.js +1 -0
  197. package/dist/ripple/p-aedd95e6.system.js +1 -0
  198. package/dist/ripple/p-b1d25dec.entry.js +1 -0
  199. package/dist/ripple/p-b542340c.system.entry.js +1 -0
  200. package/dist/ripple/p-c19298a5.system.entry.js +1 -0
  201. package/dist/ripple/p-c401898d.entry.js +1 -0
  202. package/dist/ripple/p-ce81ccb4.system.entry.js +1 -0
  203. package/dist/ripple/p-cfa8106a.system.entry.js +1 -0
  204. package/dist/ripple/p-dadb6c78.js +16 -0
  205. package/dist/ripple/p-db7f5d60.entry.js +1 -0
  206. package/dist/ripple/p-dff01b0a.system.entry.js +1 -0
  207. package/dist/ripple/p-e758db14.system.entry.js +1 -0
  208. package/dist/ripple/p-ecb6a2e0.entry.js +1 -0
  209. package/dist/ripple/p-ef344252.entry.js +1 -0
  210. package/dist/ripple/p-f0dfc5d7.entry.js +1 -0
  211. package/dist/ripple/p-f2ba1a0f.system.entry.js +1 -0
  212. package/dist/ripple/p-f92f2d83.entry.js +1 -0
  213. package/dist/ripple/p-fe0a25c1.entry.js +1 -0
  214. package/dist/ripple/ripple.esm.js +1 -1
  215. package/dist/ripple/ripple.js +130 -0
  216. package/dist/types/components/wm-chart/wm-chart-slice.d.ts +3 -0
  217. package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +6 -2
  218. package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +1 -0
  219. package/dist/types/components/wm-modal/wm-modal.d.ts +1 -1
  220. package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +13 -0
  221. package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +10 -0
  222. package/dist/types/components/wm-navigation/wm-navigation.d.ts +19 -0
  223. package/dist/types/components.d.ts +57 -0
  224. package/dist/types/stencil-public-runtime.d.ts +6 -4
  225. package/package.json +1 -1
  226. package/dist/ripple/p-0068e871.entry.js +0 -1
  227. package/dist/ripple/p-00999aeb.entry.js +0 -1
  228. package/dist/ripple/p-08b273ba.entry.js +0 -1
  229. package/dist/ripple/p-0c58f50d.entry.js +0 -1
  230. package/dist/ripple/p-11c09317.entry.js +0 -1
  231. package/dist/ripple/p-196b4c55.entry.js +0 -1
  232. package/dist/ripple/p-1a3df227.entry.js +0 -1
  233. package/dist/ripple/p-3590a57f.entry.js +0 -1
  234. package/dist/ripple/p-3a178ac8.entry.js +0 -1
  235. package/dist/ripple/p-46371fad.entry.js +0 -1
  236. package/dist/ripple/p-5548fc7c.js +0 -1
  237. package/dist/ripple/p-5c73fd59.entry.js +0 -1
  238. package/dist/ripple/p-66513af1.entry.js +0 -1
  239. package/dist/ripple/p-828316d6.entry.js +0 -1
  240. package/dist/ripple/p-857a0bc0.js +0 -16
  241. package/dist/ripple/p-8b0eb05e.entry.js +0 -1
  242. package/dist/ripple/p-9624967f.entry.js +0 -1
  243. package/dist/ripple/p-99db8501.entry.js +0 -1
  244. package/dist/ripple/p-99e2c5f6.entry.js +0 -1
  245. package/dist/ripple/p-9baa3039.js +0 -1
  246. package/dist/ripple/p-b495e06c.entry.js +0 -1
  247. package/dist/ripple/p-b8aa478f.entry.js +0 -1
  248. package/dist/ripple/p-bc9ca97b.entry.js +0 -1
  249. package/dist/ripple/p-bf985c5d.entry.js +0 -1
  250. package/dist/ripple/p-cd6de442.entry.js +0 -1
  251. package/dist/ripple/p-cfdf1a79.entry.js +0 -1
  252. package/dist/ripple/p-d22c957d.entry.js +0 -1
  253. package/dist/ripple/p-e43b4eda.entry.js +0 -1
@@ -1,4 +1,3 @@
1
- @charset "UTF-8";
2
1
  /* --------------------------------------
3
2
  1. Box-shadow
4
3
  -------------------------------------- */
@@ -36,7 +35,6 @@
36
35
  /********************************************************************************************/
37
36
  /* DO NOT USE THESE DIRECTLY, ASSIGN THEM TO VARIABLES NAMED AFTER FUNCTIONALITY, SEE BELOW */
38
37
  /********************************************************************************************/
39
- /* USAGE */
40
38
  /* BELOW IS BEFORE WE HAD THE COLOR PALETTE FROM UI */
41
39
  /* TODO: replace with vars above whenever possible */
42
40
  /* Buttons */
@@ -420,7 +418,7 @@ wm-uploader .wm-button.-selectoronly:before {
420
418
  line-height: inherit;
421
419
  -webkit-font-smoothing: antialiased;
422
420
  -moz-osx-font-smoothing: grayscale;
423
- content: "";
421
+ content: "\f140";
424
422
  position: absolute;
425
423
  right: 0.5625rem;
426
424
  top: 50%;
@@ -3878,11 +3878,17 @@ function icuUnitToEcma(unit) {
3878
3878
  return unit.replace(/^(.*?)-/, '');
3879
3879
  }
3880
3880
  var FRACTION_PRECISION_REGEX = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
3881
- var SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?$/g;
3881
+ var SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?[rs]?$/g;
3882
3882
  var INTEGER_WIDTH_REGEX = /(\*)(0+)|(#+)(0+)|(0+)/g;
3883
3883
  var CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/;
3884
3884
  function parseSignificantPrecision(str) {
3885
3885
  var result = {};
3886
+ if (str[str.length - 1] === 'r') {
3887
+ result.roundingPriority = 'morePrecision';
3888
+ }
3889
+ else if (str[str.length - 1] === 's') {
3890
+ result.roundingPriority = 'lessPrecision';
3891
+ }
3886
3892
  str.replace(SIGNIFICANT_PRECISION_REGEX, function (_, g1, g2) {
3887
3893
  // @@@ case
3888
3894
  if (typeof g2 !== 'string') {
@@ -4109,8 +4115,13 @@ function parseNumberSkeleton(tokens) {
4109
4115
  }
4110
4116
  return '';
4111
4117
  });
4112
- if (token.options.length) {
4113
- result = __assign(__assign({}, result), parseSignificantPrecision(token.options[0]));
4118
+ var opt = token.options[0];
4119
+ // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display
4120
+ if (opt === 'w') {
4121
+ result = __assign(__assign({}, result), { trailingZeroDisplay: 'stripIfInteger' });
4122
+ }
4123
+ else if (opt) {
4124
+ result = __assign(__assign({}, result), parseSignificantPrecision(opt));
4114
4125
  }
4115
4126
  continue;
4116
4127
  }
@@ -4132,8 +4143,8 @@ function parseNumberSkeleton(tokens) {
4132
4143
  }
4133
4144
 
4134
4145
  var _a;
4135
- var SPACE_SEPARATOR_START_REGEX = new RegExp("^" + SPACE_SEPARATOR_REGEX.source + "*");
4136
- var SPACE_SEPARATOR_END_REGEX = new RegExp(SPACE_SEPARATOR_REGEX.source + "*$");
4146
+ var SPACE_SEPARATOR_START_REGEX = new RegExp("^".concat(SPACE_SEPARATOR_REGEX.source, "*"));
4147
+ var SPACE_SEPARATOR_END_REGEX = new RegExp("".concat(SPACE_SEPARATOR_REGEX.source, "*$"));
4137
4148
  function createLocation(start, end) {
4138
4149
  return { start: start, end: end };
4139
4150
  }
@@ -4380,7 +4391,7 @@ var Parser = /** @class */ (function () {
4380
4391
  return {
4381
4392
  val: {
4382
4393
  type: TYPE.literal,
4383
- value: "<" + tagName + "/>",
4394
+ value: "<".concat(tagName, "/>"),
4384
4395
  location: createLocation(startPosition, this.clonePosition()),
4385
4396
  },
4386
4397
  err: null,
@@ -4985,7 +4996,7 @@ var Parser = /** @class */ (function () {
4985
4996
  }
4986
4997
  var code = codePointAt(this.message, offset);
4987
4998
  if (code === undefined) {
4988
- throw Error("Offset " + offset + " is at invalid UTF-16 code unit boundary");
4999
+ throw Error("Offset ".concat(offset, " is at invalid UTF-16 code unit boundary"));
4989
5000
  }
4990
5001
  return code;
4991
5002
  };
@@ -5053,7 +5064,7 @@ var Parser = /** @class */ (function () {
5053
5064
  */
5054
5065
  Parser.prototype.bumpTo = function (targetOffset) {
5055
5066
  if (this.offset() > targetOffset) {
5056
- throw Error("targetOffset " + targetOffset + " must be greater than or equal to the current offset " + this.offset());
5067
+ throw Error("targetOffset ".concat(targetOffset, " must be greater than or equal to the current offset ").concat(this.offset()));
5057
5068
  }
5058
5069
  targetOffset = Math.min(targetOffset, this.message.length);
5059
5070
  while (true) {
@@ -5062,7 +5073,7 @@ var Parser = /** @class */ (function () {
5062
5073
  break;
5063
5074
  }
5064
5075
  if (offset > targetOffset) {
5065
- throw Error("targetOffset " + targetOffset + " is at invalid UTF-16 code unit boundary");
5076
+ throw Error("targetOffset ".concat(targetOffset, " is at invalid UTF-16 code unit boundary"));
5066
5077
  }
5067
5078
  this.bump();
5068
5079
  if (this.isEOF()) {
@@ -5528,28 +5539,28 @@ var FormatError = /** @class */ (function (_super) {
5528
5539
  return _this;
5529
5540
  }
5530
5541
  FormatError.prototype.toString = function () {
5531
- return "[formatjs Error: " + this.code + "] " + this.message;
5542
+ return "[formatjs Error: ".concat(this.code, "] ").concat(this.message);
5532
5543
  };
5533
5544
  return FormatError;
5534
5545
  }(Error));
5535
5546
  var InvalidValueError = /** @class */ (function (_super) {
5536
5547
  __extends(InvalidValueError, _super);
5537
5548
  function InvalidValueError(variableId, value, options, originalMessage) {
5538
- return _super.call(this, "Invalid values for \"" + variableId + "\": \"" + value + "\". Options are \"" + Object.keys(options).join('", "') + "\"", ErrorCode.INVALID_VALUE, originalMessage) || this;
5549
+ return _super.call(this, "Invalid values for \"".concat(variableId, "\": \"").concat(value, "\". Options are \"").concat(Object.keys(options).join('", "'), "\""), ErrorCode.INVALID_VALUE, originalMessage) || this;
5539
5550
  }
5540
5551
  return InvalidValueError;
5541
5552
  }(FormatError));
5542
5553
  var InvalidValueTypeError = /** @class */ (function (_super) {
5543
5554
  __extends(InvalidValueTypeError, _super);
5544
5555
  function InvalidValueTypeError(value, type, originalMessage) {
5545
- return _super.call(this, "Value for \"" + value + "\" must be of type " + type, ErrorCode.INVALID_VALUE, originalMessage) || this;
5556
+ return _super.call(this, "Value for \"".concat(value, "\" must be of type ").concat(type), ErrorCode.INVALID_VALUE, originalMessage) || this;
5546
5557
  }
5547
5558
  return InvalidValueTypeError;
5548
5559
  }(FormatError));
5549
5560
  var MissingValueError = /** @class */ (function (_super) {
5550
5561
  __extends(MissingValueError, _super);
5551
5562
  function MissingValueError(variableId, originalMessage) {
5552
- return _super.call(this, "The intl string context variable \"" + variableId + "\" was not provided to the string \"" + originalMessage + "\"", ErrorCode.MISSING_VALUE, originalMessage) || this;
5563
+ return _super.call(this, "The intl string context variable \"".concat(variableId, "\" was not provided to the string \"").concat(originalMessage, "\""), ErrorCode.MISSING_VALUE, originalMessage) || this;
5553
5564
  }
5554
5565
  return MissingValueError;
5555
5566
  }(FormatError));
@@ -5710,7 +5721,7 @@ originalMessage) {
5710
5721
  continue;
5711
5722
  }
5712
5723
  if (isPluralElement(el)) {
5713
- var opt = el.options["=" + value];
5724
+ var opt = el.options["=".concat(value)];
5714
5725
  if (!opt) {
5715
5726
  if (!Intl.PluralRules) {
5716
5727
  throw new FormatError("Intl.PluralRules is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-pluralrules\"\n", ErrorCode.MISSING_INTL_API, originalMessage);
@@ -5781,7 +5792,7 @@ function createDefaultFormatters(cache) {
5781
5792
  for (var _i = 0; _i < arguments.length; _i++) {
5782
5793
  args[_i] = arguments[_i];
5783
5794
  }
5784
- return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args)))();
5795
+ return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
5785
5796
  }, {
5786
5797
  cache: createFastMemoizeCache$1(cache.number),
5787
5798
  strategy: strategies.variadic,
@@ -5792,7 +5803,7 @@ function createDefaultFormatters(cache) {
5792
5803
  for (var _i = 0; _i < arguments.length; _i++) {
5793
5804
  args[_i] = arguments[_i];
5794
5805
  }
5795
- return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args)))();
5806
+ return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
5796
5807
  }, {
5797
5808
  cache: createFastMemoizeCache$1(cache.dateTime),
5798
5809
  strategy: strategies.variadic,
@@ -5803,7 +5814,7 @@ function createDefaultFormatters(cache) {
5803
5814
  for (var _i = 0; _i < arguments.length; _i++) {
5804
5815
  args[_i] = arguments[_i];
5805
5816
  }
5806
- return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args)))();
5817
+ return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args, false)))();
5807
5818
  }, {
5808
5819
  cache: createFastMemoizeCache$1(cache.pluralRules),
5809
5820
  strategy: strategies.variadic,
@@ -5961,7 +5972,13 @@ var IntlErrorCode;
5961
5972
  var IntlError = /** @class */ (function (_super) {
5962
5973
  __extends(IntlError, _super);
5963
5974
  function IntlError(code, message, exception) {
5964
- var _this = _super.call(this, "[@formatjs/intl Error " + code + "] " + message + " \n" + (exception ? "\n" + exception.message + "\n" + exception.stack : '')) || this;
5975
+ var _this = this;
5976
+ var err = exception
5977
+ ? exception instanceof Error
5978
+ ? exception
5979
+ : new Error(String(exception))
5980
+ : undefined;
5981
+ _this = _super.call(this, "[@formatjs/intl Error ".concat(code, "] ").concat(message, " \n").concat(err ? "\n".concat(err.message, "\n").concat(err.stack) : '')) || this;
5965
5982
  _this.code = code;
5966
5983
  // @ts-ignore just so we don't need to declare dep on @types/node
5967
5984
  if (typeof Error.captureStackTrace === 'function') {
@@ -5993,19 +6010,26 @@ var MissingDataError = /** @class */ (function (_super) {
5993
6010
  }
5994
6011
  return MissingDataError;
5995
6012
  }(IntlError));
6013
+ var IntlFormatError = /** @class */ (function (_super) {
6014
+ __extends(IntlFormatError, _super);
6015
+ function IntlFormatError(message, locale, exception) {
6016
+ return _super.call(this, IntlErrorCode.FORMAT_ERROR, "".concat(message, " \nLocale: ").concat(locale, "\n"), exception) || this;
6017
+ }
6018
+ return IntlFormatError;
6019
+ }(IntlError));
5996
6020
  var MessageFormatError = /** @class */ (function (_super) {
5997
6021
  __extends(MessageFormatError, _super);
5998
6022
  function MessageFormatError(message, locale, descriptor, exception) {
5999
- var _this = _super.call(this, IntlErrorCode.FORMAT_ERROR, message + " \nLocale: " + locale + "\nMessageID: " + (descriptor === null || descriptor === void 0 ? void 0 : descriptor.id) + "\nDefault Message: " + (descriptor === null || descriptor === void 0 ? void 0 : descriptor.defaultMessage) + "\nDescription: " + (descriptor === null || descriptor === void 0 ? void 0 : descriptor.description) + " \n", exception) || this;
6023
+ var _this = _super.call(this, "".concat(message, " \nMessageID: ").concat(descriptor === null || descriptor === void 0 ? void 0 : descriptor.id, "\nDefault Message: ").concat(descriptor === null || descriptor === void 0 ? void 0 : descriptor.defaultMessage, "\nDescription: ").concat(descriptor === null || descriptor === void 0 ? void 0 : descriptor.description, " \n"), locale, exception) || this;
6000
6024
  _this.descriptor = descriptor;
6001
6025
  return _this;
6002
6026
  }
6003
6027
  return MessageFormatError;
6004
- }(IntlError));
6028
+ }(IntlFormatError));
6005
6029
  var MissingTranslationError = /** @class */ (function (_super) {
6006
6030
  __extends(MissingTranslationError, _super);
6007
6031
  function MissingTranslationError(descriptor, locale) {
6008
- var _this = _super.call(this, IntlErrorCode.MISSING_TRANSLATION, "Missing message: \"" + descriptor.id + "\" for locale \"" + locale + "\", using " + (descriptor.defaultMessage ? 'default message' : 'id') + " as fallback.") || this;
6032
+ var _this = _super.call(this, IntlErrorCode.MISSING_TRANSLATION, "Missing message: \"".concat(descriptor.id, "\" for locale \"").concat(locale, "\", using ").concat(descriptor.defaultMessage ? 'default message' : 'id', " as fallback.")) || this;
6009
6033
  _this.descriptor = descriptor;
6010
6034
  return _this;
6011
6035
  }
@@ -6032,6 +6056,7 @@ var DEFAULT_INTL_CONFIG = {
6032
6056
  timeZone: undefined,
6033
6057
  defaultLocale: 'en',
6034
6058
  defaultFormats: {},
6059
+ fallbackOnEmptyString: true,
6035
6060
  onError: defaultErrorHandler,
6036
6061
  };
6037
6062
  function createIntlCache() {
@@ -6074,7 +6099,7 @@ function createFormatters(cache) {
6074
6099
  for (var _i = 0; _i < arguments.length; _i++) {
6075
6100
  args[_i] = arguments[_i];
6076
6101
  }
6077
- return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args)))();
6102
+ return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
6078
6103
  }, {
6079
6104
  cache: createFastMemoizeCache(cache.dateTime),
6080
6105
  strategy: strategies.variadic,
@@ -6085,7 +6110,7 @@ function createFormatters(cache) {
6085
6110
  for (var _i = 0; _i < arguments.length; _i++) {
6086
6111
  args[_i] = arguments[_i];
6087
6112
  }
6088
- return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args)))();
6113
+ return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
6089
6114
  }, {
6090
6115
  cache: createFastMemoizeCache(cache.number),
6091
6116
  strategy: strategies.variadic,
@@ -6096,7 +6121,7 @@ function createFormatters(cache) {
6096
6121
  for (var _i = 0; _i < arguments.length; _i++) {
6097
6122
  args[_i] = arguments[_i];
6098
6123
  }
6099
- return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args)))();
6124
+ return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args, false)))();
6100
6125
  }, {
6101
6126
  cache: createFastMemoizeCache(cache.pluralRules),
6102
6127
  strategy: strategies.variadic,
@@ -6119,7 +6144,7 @@ function createFormatters(cache) {
6119
6144
  for (var _i = 0; _i < arguments.length; _i++) {
6120
6145
  args[_i] = arguments[_i];
6121
6146
  }
6122
- return new (RelativeTimeFormat.bind.apply(RelativeTimeFormat, __spreadArray([void 0], args)))();
6147
+ return new (RelativeTimeFormat.bind.apply(RelativeTimeFormat, __spreadArray([void 0], args, false)))();
6123
6148
  }, {
6124
6149
  cache: createFastMemoizeCache(cache.relativeTime),
6125
6150
  strategy: strategies.variadic,
@@ -6130,7 +6155,7 @@ function createFormatters(cache) {
6130
6155
  for (var _i = 0; _i < arguments.length; _i++) {
6131
6156
  args[_i] = arguments[_i];
6132
6157
  }
6133
- return new (ListFormat.bind.apply(ListFormat, __spreadArray([void 0], args)))();
6158
+ return new (ListFormat.bind.apply(ListFormat, __spreadArray([void 0], args, false)))();
6134
6159
  }, {
6135
6160
  cache: createFastMemoizeCache(cache.list),
6136
6161
  strategy: strategies.variadic,
@@ -6140,7 +6165,7 @@ function createFormatters(cache) {
6140
6165
  for (var _i = 0; _i < arguments.length; _i++) {
6141
6166
  args[_i] = arguments[_i];
6142
6167
  }
6143
- return new (DisplayNames.bind.apply(DisplayNames, __spreadArray([void 0], args)))();
6168
+ return new (DisplayNames.bind.apply(DisplayNames, __spreadArray([void 0], args, false)))();
6144
6169
  }, {
6145
6170
  cache: createFastMemoizeCache(cache.displayNames),
6146
6171
  strategy: strategies.variadic,
@@ -6156,7 +6181,7 @@ function getNamedFormat(formats, type, name, onError) {
6156
6181
  if (format) {
6157
6182
  return format;
6158
6183
  }
6159
- onError(new UnsupportedFormatterError("No " + type + " format named: " + name));
6184
+ onError(new UnsupportedFormatterError("No ".concat(type, " format named: ").concat(name)));
6160
6185
  }
6161
6186
 
6162
6187
  /**
@@ -6191,7 +6216,7 @@ function deepMergeFormatsAndSetTimeZone(f1, timeZone) {
6191
6216
  return __assign(__assign(__assign({}, mfFormats), f1), { date: deepMergeOptions(setTimeZoneInOptions(mfFormats.date, timeZone), setTimeZoneInOptions(f1.date || {}, timeZone)), time: deepMergeOptions(setTimeZoneInOptions(mfFormats.time, timeZone), setTimeZoneInOptions(f1.time || {}, timeZone)) });
6192
6217
  }
6193
6218
  function formatMessage(_a, state, messageDescriptor, values, opts) {
6194
- var locale = _a.locale, formats = _a.formats, messages = _a.messages, defaultLocale = _a.defaultLocale, defaultFormats = _a.defaultFormats, onError = _a.onError, timeZone = _a.timeZone, defaultRichTextElements = _a.defaultRichTextElements;
6219
+ var locale = _a.locale, formats = _a.formats, messages = _a.messages, defaultLocale = _a.defaultLocale, defaultFormats = _a.defaultFormats, fallbackOnEmptyString = _a.fallbackOnEmptyString, onError = _a.onError, timeZone = _a.timeZone, defaultRichTextElements = _a.defaultRichTextElements;
6195
6220
  if (messageDescriptor === void 0) { messageDescriptor = { id: '' }; }
6196
6221
  var msgId = messageDescriptor.id, defaultMessage = messageDescriptor.defaultMessage;
6197
6222
  // `id` is a required field of a Message Descriptor.
@@ -6221,6 +6246,9 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
6221
6246
  formats = deepMergeFormatsAndSetTimeZone(formats, timeZone);
6222
6247
  defaultFormats = deepMergeFormatsAndSetTimeZone(defaultFormats, timeZone);
6223
6248
  if (!message) {
6249
+ if (fallbackOnEmptyString === false && message === '') {
6250
+ return message;
6251
+ }
6224
6252
  if (!defaultMessage ||
6225
6253
  (locale && locale.toLowerCase() !== defaultLocale.toLowerCase())) {
6226
6254
  // This prevents warnings from littering the console in development
@@ -6234,7 +6262,7 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
6234
6262
  return formatter.format(values);
6235
6263
  }
6236
6264
  catch (e) {
6237
- onError(new MessageFormatError("Error formatting default message for: \"" + id + "\", rendering default message verbatim", locale, messageDescriptor, e));
6265
+ onError(new MessageFormatError("Error formatting default message for: \"".concat(id, "\", rendering default message verbatim"), locale, messageDescriptor, e));
6238
6266
  return typeof defaultMessage === 'string' ? defaultMessage : id;
6239
6267
  }
6240
6268
  }
@@ -6246,7 +6274,7 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
6246
6274
  return formatter.format(values);
6247
6275
  }
6248
6276
  catch (e) {
6249
- onError(new MessageFormatError("Error formatting message: \"" + id + "\", using " + (defaultMessage ? 'default message' : 'id') + " as fallback.", locale, messageDescriptor, e));
6277
+ onError(new MessageFormatError("Error formatting message: \"".concat(id, "\", using ").concat(defaultMessage ? 'default message' : 'id', " as fallback."), locale, messageDescriptor, e));
6250
6278
  }
6251
6279
  if (defaultMessage) {
6252
6280
  try {
@@ -6254,7 +6282,7 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
6254
6282
  return formatter.format(values);
6255
6283
  }
6256
6284
  catch (e) {
6257
- onError(new MessageFormatError("Error formatting the default message for: \"" + id + "\", rendering message verbatim", locale, messageDescriptor, e));
6285
+ onError(new MessageFormatError("Error formatting the default message for: \"".concat(id, "\", rendering message verbatim"), locale, messageDescriptor, e));
6258
6286
  }
6259
6287
  }
6260
6288
  if (typeof message === 'string') {
@@ -6292,9 +6320,7 @@ function getFormatter$2(_a, type, getDateTimeFormat, options) {
6292
6320
  if (options === void 0) { options = {}; }
6293
6321
  var format = options.format;
6294
6322
  var defaults = __assign(__assign({}, (timeZone && { timeZone: timeZone })), (format && getNamedFormat(formats, type, format, onError)));
6295
- var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS,
6296
- // @ts-expect-error es2020 has a lot stuff from es2021 bleed in
6297
- defaults);
6323
+ var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, defaults);
6298
6324
  if (type === 'time' &&
6299
6325
  !filteredOptions.hour &&
6300
6326
  !filteredOptions.minute &&
@@ -6411,7 +6437,7 @@ var LIST_FORMAT_OPTIONS = [
6411
6437
  ];
6412
6438
  var now = Date.now();
6413
6439
  function generateToken(i) {
6414
- return now + "_" + i + "_" + now;
6440
+ return "".concat(now, "_").concat(i, "_").concat(now);
6415
6441
  }
6416
6442
  function formatList(opts, getListFormat, values, options) {
6417
6443
  if (options === void 0) { options = {}; }
@@ -6478,7 +6504,7 @@ function formatPlural(_a, getPluralRules, value, options) {
6478
6504
  return getPluralRules(locale, filteredOptions).select(value);
6479
6505
  }
6480
6506
  catch (e) {
6481
- onError(new MessageFormatError('Error formatting plural.', e));
6507
+ onError(new IntlFormatError('Error formatting plural.', locale, e));
6482
6508
  }
6483
6509
  return 'other';
6484
6510
  }
@@ -6505,7 +6531,7 @@ function formatRelativeTime(config, getRelativeTimeFormat, value, unit, options)
6505
6531
  return getFormatter$1(config, getRelativeTimeFormat, options).format(value, unit);
6506
6532
  }
6507
6533
  catch (e) {
6508
- config.onError(new MessageFormatError('Error formatting relative time.', e));
6534
+ config.onError(new IntlFormatError('Error formatting relative time.', config.locale, e));
6509
6535
  }
6510
6536
  return String(value);
6511
6537
  }
@@ -6585,7 +6611,7 @@ function createIntl(config, cache) {
6585
6611
  var locale = resolvedConfig.locale, defaultLocale = resolvedConfig.defaultLocale, onError = resolvedConfig.onError;
6586
6612
  if (!locale) {
6587
6613
  if (onError) {
6588
- onError(new InvalidConfigError("\"locale\" was not configured, using \"" + defaultLocale + "\" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details"));
6614
+ onError(new InvalidConfigError("\"locale\" was not configured, using \"".concat(defaultLocale, "\" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details")));
6589
6615
  }
6590
6616
  // Since there's no registered locale data for `locale`, this will
6591
6617
  // fallback to the `defaultLocale` to make sure things can render.
@@ -6595,11 +6621,11 @@ function createIntl(config, cache) {
6595
6621
  resolvedConfig.locale = resolvedConfig.defaultLocale || 'en';
6596
6622
  }
6597
6623
  else if (!Intl.NumberFormat.supportedLocalesOf(locale).length && onError) {
6598
- onError(new MissingDataError("Missing locale data for locale: \"" + locale + "\" in Intl.NumberFormat. Using default locale: \"" + defaultLocale + "\" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details"));
6624
+ onError(new MissingDataError("Missing locale data for locale: \"".concat(locale, "\" in Intl.NumberFormat. Using default locale: \"").concat(defaultLocale, "\" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details")));
6599
6625
  }
6600
6626
  else if (!Intl.DateTimeFormat.supportedLocalesOf(locale).length &&
6601
6627
  onError) {
6602
- onError(new MissingDataError("Missing locale data for locale: \"" + locale + "\" in Intl.DateTimeFormat. Using default locale: \"" + defaultLocale + "\" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details"));
6628
+ onError(new MissingDataError("Missing locale data for locale: \"".concat(locale, "\" in Intl.DateTimeFormat. Using default locale: \"").concat(defaultLocale, "\" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details")));
6603
6629
  }
6604
6630
  verifyConfigMessages(resolvedConfig);
6605
6631
  return __assign(__assign({}, resolvedConfig), { formatters: formatters, formatNumber: formatNumber.bind(null, resolvedConfig, formatters.getNumberFormat), formatNumberToParts: formatNumberToParts.bind(null, resolvedConfig, formatters.getNumberFormat), formatRelativeTime: formatRelativeTime.bind(null, resolvedConfig, formatters.getRelativeTimeFormat), formatDate: formatDate.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateToParts: formatDateToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTime: formatTime.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateTimeRange: formatDateTimeRange.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTimeToParts: formatTimeToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatPlural: formatPlural.bind(null, resolvedConfig, formatters.getPluralRules), formatMessage: formatMessage.bind(null, resolvedConfig, formatters), formatList: formatList.bind(null, resolvedConfig, formatters.getListFormat), formatListToParts: formatListToParts.bind(null, resolvedConfig, formatters.getListFormat), formatDisplayName: formatDisplayName.bind(null, resolvedConfig, formatters.getDisplayNames) });
@@ -1,4 +1,4 @@
1
- const version = "3.7.0";
1
+ const version = "3.8.0-2";
2
2
 
3
3
  // PRINT RIPPLE VERSION IN CONSOLE
4
4
  // test envs return 0 for plugin.length
@@ -347,7 +347,6 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
347
347
  // Workaround for Safari, moving the <input> caret when re-assigning the same valued
348
348
  if (memberName === 'list') {
349
349
  isProp = false;
350
- // tslint:disable-next-line: triple-equals
351
350
  }
352
351
  else if (oldValue == null || elm[memberName] != n) {
353
352
  elm[memberName] = n;
@@ -887,6 +886,29 @@ const then = (promise, thenFn) => {
887
886
  };
888
887
  const addHydratedFlag = (elm) => elm.classList.add('hydrated')
889
888
  ;
889
+ /**
890
+ * Parse a new property value for a given property type.
891
+ *
892
+ * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
893
+ * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
894
+ * 1. `any`, the type given to `propValue` in the function signature
895
+ * 2. the type stored from `propType`.
896
+ *
897
+ * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
898
+ *
899
+ * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
900
+ * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
901
+ * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
902
+ * ```tsx
903
+ * <my-cmp prop-val={0}></my-cmp>
904
+ * ```
905
+ *
906
+ * HTML prop values on the other hand, will always a string
907
+ *
908
+ * @param propValue the new value to coerce to some type
909
+ * @param propType the type of the prop, expressed as a binary number
910
+ * @returns the parsed/coerced value
911
+ */
890
912
  const parsePropertyValue = (propValue, propType) => {
891
913
  // ensure this value is of the correct prop type
892
914
  if (propValue != null && !isComplexType(propValue)) {
@@ -992,14 +1014,14 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
992
1014
  prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
993
1015
  plt.jmp(() => {
994
1016
  const propName = attrNameToPropName.get(attrName);
995
- // In a webcomponent lifecyle the attributeChangedCallback runs prior to connectedCallback
1017
+ // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
996
1018
  // in the case where an attribute was set inline.
997
1019
  // ```html
998
1020
  // <my-component some-attribute="some-value"></my-component>
999
1021
  // ```
1000
1022
  //
1001
- // There is an edge case where a developer sets the attribute inline on a custom element and then programatically
1002
- // changes it before it has been upgraded as shown below:
1023
+ // There is an edge case where a developer sets the attribute inline on a custom element and then
1024
+ // programmatically changes it before it has been upgraded as shown below:
1003
1025
  //
1004
1026
  // ```html
1005
1027
  // <!-- this component has _not_ been upgraded yet -->
@@ -1009,13 +1031,13 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1009
1031
  // el = document.querySelector("#test");
1010
1032
  // el.someAttribute = "another-value";
1011
1033
  // // upgrade component
1012
- // cutsomElements.define('my-component', MyComponent);
1034
+ // customElements.define('my-component', MyComponent);
1013
1035
  // </script>
1014
1036
  // ```
1015
1037
  // In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
1016
1038
  // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
1017
1039
  // to the value that was set inline i.e. "some-value" from above example. When
1018
- // the connectedCallback attempts to unshadow it will use "some-value" as the intial value rather than "another-value"
1040
+ // the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
1019
1041
  //
1020
1042
  // The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
1021
1043
  // by connectedCallback as this attributeChangedCallback will not fire.
@@ -1029,6 +1051,14 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1029
1051
  newValue = this[propName];
1030
1052
  delete this[propName];
1031
1053
  }
1054
+ else if (prototype.hasOwnProperty(propName) &&
1055
+ typeof this[propName] === 'number' &&
1056
+ this[propName] == newValue) {
1057
+ // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
1058
+ // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
1059
+ // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
1060
+ return;
1061
+ }
1032
1062
  this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
1033
1063
  });
1034
1064
  };
@@ -1114,7 +1144,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
1114
1144
  const ancestorComponent = hostRef.$ancestorComponent$;
1115
1145
  const schedule = () => scheduleUpdate(hostRef, true);
1116
1146
  if (ancestorComponent && ancestorComponent['s-rc']) {
1117
- // this is the intial load and this component it has an ancestor component
1147
+ // this is the initial load and this component it has an ancestor component
1118
1148
  // but the ancestor component has NOT fired its will update lifecycle yet
1119
1149
  // so let's just cool our jets and wait for the ancestor to continue first
1120
1150
  // this will get fired off when the ancestor component
@@ -1197,71 +1227,73 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1197
1227
  let isBootstrapping = true;
1198
1228
  Object.assign(plt, options);
1199
1229
  plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
1200
- lazyBundles.map((lazyBundle) => lazyBundle[1].map((compactMeta) => {
1201
- const cmpMeta = {
1202
- $flags$: compactMeta[0],
1203
- $tagName$: compactMeta[1],
1204
- $members$: compactMeta[2],
1205
- $listeners$: compactMeta[3],
1206
- };
1207
- {
1208
- cmpMeta.$members$ = compactMeta[2];
1209
- }
1210
- {
1211
- cmpMeta.$listeners$ = compactMeta[3];
1212
- }
1213
- {
1214
- cmpMeta.$attrsToReflect$ = [];
1215
- }
1216
- {
1217
- cmpMeta.$watchers$ = {};
1218
- }
1219
- const tagName = cmpMeta.$tagName$;
1220
- const HostElement = class extends HTMLElement {
1221
- // StencilLazyHost
1222
- constructor(self) {
1223
- // @ts-ignore
1224
- super(self);
1225
- self = this;
1226
- registerHost(self, cmpMeta);
1227
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1228
- // this component is using shadow dom
1229
- // and this browser supports shadow dom
1230
- // add the read-only property "shadowRoot" to the host element
1231
- // adding the shadow root build conditionals to minimize runtime
1232
- {
1230
+ lazyBundles.map((lazyBundle) => {
1231
+ lazyBundle[1].map((compactMeta) => {
1232
+ const cmpMeta = {
1233
+ $flags$: compactMeta[0],
1234
+ $tagName$: compactMeta[1],
1235
+ $members$: compactMeta[2],
1236
+ $listeners$: compactMeta[3],
1237
+ };
1238
+ {
1239
+ cmpMeta.$members$ = compactMeta[2];
1240
+ }
1241
+ {
1242
+ cmpMeta.$listeners$ = compactMeta[3];
1243
+ }
1244
+ {
1245
+ cmpMeta.$attrsToReflect$ = [];
1246
+ }
1247
+ {
1248
+ cmpMeta.$watchers$ = {};
1249
+ }
1250
+ const tagName = cmpMeta.$tagName$;
1251
+ const HostElement = class extends HTMLElement {
1252
+ // StencilLazyHost
1253
+ constructor(self) {
1254
+ // @ts-ignore
1255
+ super(self);
1256
+ self = this;
1257
+ registerHost(self, cmpMeta);
1258
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1259
+ // this component is using shadow dom
1260
+ // and this browser supports shadow dom
1261
+ // add the read-only property "shadowRoot" to the host element
1262
+ // adding the shadow root build conditionals to minimize runtime
1233
1263
  {
1234
- self.attachShadow({ mode: 'open' });
1264
+ {
1265
+ self.attachShadow({ mode: 'open' });
1266
+ }
1235
1267
  }
1236
1268
  }
1237
1269
  }
1238
- }
1239
- connectedCallback() {
1240
- if (appLoadFallback) {
1241
- clearTimeout(appLoadFallback);
1242
- appLoadFallback = null;
1270
+ connectedCallback() {
1271
+ if (appLoadFallback) {
1272
+ clearTimeout(appLoadFallback);
1273
+ appLoadFallback = null;
1274
+ }
1275
+ if (isBootstrapping) {
1276
+ // connectedCallback will be processed once all components have been registered
1277
+ deferredConnectedCallbacks.push(this);
1278
+ }
1279
+ else {
1280
+ plt.jmp(() => connectedCallback(this));
1281
+ }
1243
1282
  }
1244
- if (isBootstrapping) {
1245
- // connectedCallback will be processed once all components have been registered
1246
- deferredConnectedCallbacks.push(this);
1283
+ disconnectedCallback() {
1284
+ plt.jmp(() => disconnectedCallback(this));
1247
1285
  }
1248
- else {
1249
- plt.jmp(() => connectedCallback(this));
1286
+ componentOnReady() {
1287
+ return getHostRef(this).$onReadyPromise$;
1250
1288
  }
1289
+ };
1290
+ cmpMeta.$lazyBundleId$ = lazyBundle[0];
1291
+ if (!exclude.includes(tagName) && !customElements.get(tagName)) {
1292
+ cmpTags.push(tagName);
1293
+ customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
1251
1294
  }
1252
- disconnectedCallback() {
1253
- plt.jmp(() => disconnectedCallback(this));
1254
- }
1255
- componentOnReady() {
1256
- return getHostRef(this).$onReadyPromise$;
1257
- }
1258
- };
1259
- cmpMeta.$lazyBundleId$ = lazyBundle[0];
1260
- if (!exclude.includes(tagName) && !customElements.get(tagName)) {
1261
- cmpTags.push(tagName);
1262
- customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
1263
- }
1264
- }));
1295
+ });
1296
+ });
1265
1297
  {
1266
1298
  visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
1267
1299
  visibilityStyle.setAttribute('data-styles', '');