@nanoporetech-digital/components 2.10.1 → 2.11.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 (333) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/{date-utils-0ae9a12d.js → date-utils-b3af910d.js} +2 -2
  3. package/dist/cjs/date-utils-b3af910d.js.map +1 -0
  4. package/dist/cjs/{global-0d4f3b77.js → global-989678ec.js} +1 -8
  5. package/dist/cjs/global-989678ec.js.map +1 -0
  6. package/dist/cjs/loader.cjs.js +2 -2
  7. package/dist/cjs/nano-components.cjs.js +2 -2
  8. package/dist/cjs/nano-datalist_3.cjs.entry.js +3 -1
  9. package/dist/cjs/nano-datalist_3.cjs.entry.js.map +1 -1
  10. package/dist/cjs/nano-date-input.cjs.entry.js +13 -5
  11. package/dist/cjs/nano-date-input.cjs.entry.js.map +1 -1
  12. package/dist/cjs/nano-date-picker.cjs.entry.js +2 -2
  13. package/dist/cjs/nano-date-picker.cjs.entry.js.map +1 -1
  14. package/dist/cjs/nano-details.cjs.entry.js +1 -2
  15. package/dist/cjs/nano-details.cjs.entry.js.map +1 -1
  16. package/dist/cjs/nano-global-search-results.cjs.entry.js +1 -2
  17. package/dist/cjs/nano-global-search-results.cjs.entry.js.map +1 -1
  18. package/dist/cjs/nano-grid_3.cjs.entry.js +1 -2
  19. package/dist/cjs/nano-grid_3.cjs.entry.js.map +1 -1
  20. package/dist/cjs/nano-icon-button.cjs.entry.js +4 -0
  21. package/dist/cjs/nano-icon-button.cjs.entry.js.map +1 -1
  22. package/dist/cjs/nano-resize-observe_2.cjs.entry.js +1 -2
  23. package/dist/cjs/nano-resize-observe_2.cjs.entry.js.map +1 -1
  24. package/dist/cjs/nano-slides.cjs.entry.js +1 -2
  25. package/dist/cjs/nano-slides.cjs.entry.js.map +1 -1
  26. package/dist/cjs/nano-sticker.cjs.entry.js +2 -3
  27. package/dist/cjs/nano-sticker.cjs.entry.js.map +1 -1
  28. package/dist/cjs/nano-tab-group.cjs.entry.js +4 -2
  29. package/dist/cjs/nano-tab-group.cjs.entry.js.map +1 -1
  30. package/dist/cjs/nano-tab.cjs.entry.js +5 -1
  31. package/dist/cjs/nano-tab.cjs.entry.js.map +1 -1
  32. package/dist/cjs/nano-tooltip.cjs.entry.js +1 -1
  33. package/dist/cjs/nano-tooltip.cjs.entry.js.map +1 -1
  34. package/dist/collection/components/accordion/accordion.js +1 -1
  35. package/dist/collection/components/alert/alert.js +1 -1
  36. package/dist/collection/components/algolia/algolia-filter.js +2 -2
  37. package/dist/collection/components/algolia/algolia-input.js +5 -5
  38. package/dist/collection/components/algolia/algolia-results.js +1 -1
  39. package/dist/collection/components/algolia/algolia.js +6 -6
  40. package/dist/collection/components/checkbox/checkbox-group.js +2 -2
  41. package/dist/collection/components/checkbox/checkbox.js +3 -3
  42. package/dist/collection/components/datalist/datalist.js +4 -2
  43. package/dist/collection/components/datalist/datalist.js.map +1 -1
  44. package/dist/collection/components/date-input/date-input.js +62 -11
  45. package/dist/collection/components/date-input/date-input.js.map +1 -1
  46. package/dist/collection/components/date-picker/date-picker.css +1 -1
  47. package/dist/collection/components/date-picker/date-picker.js +5 -5
  48. package/dist/collection/components/details/details.js +1 -2
  49. package/dist/collection/components/details/details.js.map +1 -1
  50. package/dist/collection/components/dialog/dialog.js +1 -1
  51. package/dist/collection/components/dropdown/dropdown.js +1 -1
  52. package/dist/collection/components/file-upload/file-upload.js +4 -4
  53. package/dist/collection/components/global-nav/global-nav.js +4 -4
  54. package/dist/collection/components/global-search-results/global-search-results.js +0 -1
  55. package/dist/collection/components/global-search-results/global-search-results.js.map +1 -1
  56. package/dist/collection/components/grid/grid-item.js +1 -1
  57. package/dist/collection/components/grid/grid.js +0 -1
  58. package/dist/collection/components/grid/grid.js.map +1 -1
  59. package/dist/collection/components/icon/icon.js +1 -1
  60. package/dist/collection/components/icon-button/icon-button.js +23 -1
  61. package/dist/collection/components/icon-button/icon-button.js.map +1 -1
  62. package/dist/collection/components/input/input.js +5 -5
  63. package/dist/collection/components/nav-item/nav-item.js +4 -4
  64. package/dist/collection/components/range/range.js +4 -4
  65. package/dist/collection/components/resize-observe/resize-observe.js +1 -2
  66. package/dist/collection/components/resize-observe/resize-observe.js.map +1 -1
  67. package/dist/collection/components/select/select.js +7 -7
  68. package/dist/collection/components/slides/slides.js +7 -8
  69. package/dist/collection/components/slides/slides.js.map +1 -1
  70. package/dist/collection/components/sticker/sticker.js +0 -1
  71. package/dist/collection/components/sticker/sticker.js.map +1 -1
  72. package/dist/collection/components/tabs/tab-group.js +5 -3
  73. package/dist/collection/components/tabs/tab-group.js.map +1 -1
  74. package/dist/collection/components/tabs/tab.js +5 -1
  75. package/dist/collection/components/tabs/tab.js.map +1 -1
  76. package/dist/collection/components/tooltip/tooltip.css +0 -1
  77. package/dist/collection/global/script/global.js +0 -7
  78. package/dist/collection/global/script/global.js.map +1 -1
  79. package/dist/collection/utils/date-utils.js +1 -1
  80. package/dist/collection/utils/date-utils.js.map +1 -1
  81. package/dist/components/datalist.js +3 -1
  82. package/dist/components/datalist.js.map +1 -1
  83. package/dist/components/date-picker.js +2 -2
  84. package/dist/components/date-picker.js.map +1 -1
  85. package/dist/components/grid.js +1 -2
  86. package/dist/components/grid.js.map +1 -1
  87. package/dist/components/icon-button.js +6 -1
  88. package/dist/components/icon-button.js.map +1 -1
  89. package/dist/components/index.js +0 -7
  90. package/dist/components/index.js.map +1 -1
  91. package/dist/components/nano-date-input.js +14 -4
  92. package/dist/components/nano-date-input.js.map +1 -1
  93. package/dist/components/nano-details.js +1 -2
  94. package/dist/components/nano-details.js.map +1 -1
  95. package/dist/components/nano-global-search-results.js +1 -2
  96. package/dist/components/nano-global-search-results.js.map +1 -1
  97. package/dist/components/nano-slides.js +1 -2
  98. package/dist/components/nano-slides.js.map +1 -1
  99. package/dist/components/nano-tab-group.js +4 -2
  100. package/dist/components/nano-tab-group.js.map +1 -1
  101. package/dist/components/nano-tab.js +5 -1
  102. package/dist/components/nano-tab.js.map +1 -1
  103. package/dist/components/resize-observe.js +1 -2
  104. package/dist/components/resize-observe.js.map +1 -1
  105. package/dist/components/sticker.js +2 -3
  106. package/dist/components/sticker.js.map +1 -1
  107. package/dist/components/tooltip.js +1 -1
  108. package/dist/components/tooltip.js.map +1 -1
  109. package/dist/custom-elements/index.js +41 -1938
  110. package/dist/custom-elements/index.js.map +1 -1
  111. package/dist/esm/{date-utils-e4b757ff.js → date-utils-839cb010.js} +2 -2
  112. package/dist/esm/date-utils-839cb010.js.map +1 -0
  113. package/dist/esm/{global-d5ec4d53.js → global-8047b4ff.js} +1 -8
  114. package/dist/esm/global-8047b4ff.js.map +1 -0
  115. package/dist/esm/loader.js +2 -2
  116. package/dist/esm/nano-components.js +2 -2
  117. package/dist/esm/nano-datalist_3.entry.js +3 -1
  118. package/dist/esm/nano-datalist_3.entry.js.map +1 -1
  119. package/dist/esm/nano-date-input.entry.js +13 -5
  120. package/dist/esm/nano-date-input.entry.js.map +1 -1
  121. package/dist/esm/nano-date-picker.entry.js +2 -2
  122. package/dist/esm/nano-date-picker.entry.js.map +1 -1
  123. package/dist/esm/nano-details.entry.js +1 -2
  124. package/dist/esm/nano-details.entry.js.map +1 -1
  125. package/dist/esm/nano-global-search-results.entry.js +1 -2
  126. package/dist/esm/nano-global-search-results.entry.js.map +1 -1
  127. package/dist/esm/nano-grid_3.entry.js +1 -2
  128. package/dist/esm/nano-grid_3.entry.js.map +1 -1
  129. package/dist/esm/nano-icon-button.entry.js +4 -0
  130. package/dist/esm/nano-icon-button.entry.js.map +1 -1
  131. package/dist/esm/nano-resize-observe_2.entry.js +1 -2
  132. package/dist/esm/nano-resize-observe_2.entry.js.map +1 -1
  133. package/dist/esm/nano-slides.entry.js +1 -2
  134. package/dist/esm/nano-slides.entry.js.map +1 -1
  135. package/dist/esm/nano-sticker.entry.js +2 -3
  136. package/dist/esm/nano-sticker.entry.js.map +1 -1
  137. package/dist/esm/nano-tab-group.entry.js +4 -2
  138. package/dist/esm/nano-tab-group.entry.js.map +1 -1
  139. package/dist/esm/nano-tab.entry.js +5 -1
  140. package/dist/esm/nano-tab.entry.js.map +1 -1
  141. package/dist/esm/nano-tooltip.entry.js +1 -1
  142. package/dist/esm/nano-tooltip.entry.js.map +1 -1
  143. package/dist/esm-es5/date-utils-839cb010.js +5 -0
  144. package/dist/esm-es5/date-utils-839cb010.js.map +1 -0
  145. package/dist/esm-es5/{global-d5ec4d53.js → global-8047b4ff.js} +2 -2
  146. package/dist/esm-es5/global-8047b4ff.js.map +1 -0
  147. package/dist/esm-es5/loader.js +1 -1
  148. package/dist/esm-es5/loader.js.map +1 -1
  149. package/dist/esm-es5/nano-components.js +1 -1
  150. package/dist/esm-es5/nano-components.js.map +1 -1
  151. package/dist/esm-es5/nano-datalist_3.entry.js +1 -1
  152. package/dist/esm-es5/nano-datalist_3.entry.js.map +1 -1
  153. package/dist/esm-es5/nano-date-input.entry.js +1 -1
  154. package/dist/esm-es5/nano-date-input.entry.js.map +1 -1
  155. package/dist/esm-es5/nano-date-picker.entry.js +1 -1
  156. package/dist/esm-es5/nano-date-picker.entry.js.map +1 -1
  157. package/dist/esm-es5/nano-details.entry.js +1 -1
  158. package/dist/esm-es5/nano-details.entry.js.map +1 -1
  159. package/dist/esm-es5/nano-global-search-results.entry.js +1 -1
  160. package/dist/esm-es5/nano-global-search-results.entry.js.map +1 -1
  161. package/dist/esm-es5/nano-grid_3.entry.js +1 -1
  162. package/dist/esm-es5/nano-grid_3.entry.js.map +1 -1
  163. package/dist/esm-es5/nano-icon-button.entry.js +2 -2
  164. package/dist/esm-es5/nano-icon-button.entry.js.map +1 -1
  165. package/dist/esm-es5/nano-resize-observe_2.entry.js +1 -1
  166. package/dist/esm-es5/nano-resize-observe_2.entry.js.map +1 -1
  167. package/dist/esm-es5/nano-slides.entry.js +2 -2
  168. package/dist/esm-es5/nano-slides.entry.js.map +1 -1
  169. package/dist/esm-es5/nano-sticker.entry.js +1 -1
  170. package/dist/esm-es5/nano-sticker.entry.js.map +1 -1
  171. package/dist/esm-es5/nano-tab-group.entry.js +2 -2
  172. package/dist/esm-es5/nano-tab-group.entry.js.map +1 -1
  173. package/dist/esm-es5/nano-tab.entry.js +2 -2
  174. package/dist/esm-es5/nano-tab.entry.js.map +1 -1
  175. package/dist/esm-es5/nano-tooltip.entry.js +1 -1
  176. package/dist/esm-es5/nano-tooltip.entry.js.map +1 -1
  177. package/dist/nano-components/nano-components.esm.js +1 -1
  178. package/dist/nano-components/nano-components.esm.js.map +1 -1
  179. package/dist/nano-components/nano-components.js +1 -1
  180. package/dist/nano-components/p-0193a282.entry.js +5 -0
  181. package/dist/nano-components/p-0193a282.entry.js.map +1 -0
  182. package/dist/nano-components/p-0320410c.entry.js +5 -0
  183. package/dist/nano-components/p-0320410c.entry.js.map +1 -0
  184. package/dist/nano-components/p-2720ee8f.entry.js +5 -0
  185. package/dist/nano-components/p-2720ee8f.entry.js.map +1 -0
  186. package/dist/nano-components/p-32900c91.entry.js +5 -0
  187. package/dist/nano-components/p-32900c91.entry.js.map +1 -0
  188. package/dist/nano-components/p-33fce1a6.js +5 -0
  189. package/dist/nano-components/p-33fce1a6.js.map +1 -0
  190. package/dist/nano-components/p-371aebe7.system.entry.js +23 -0
  191. package/dist/nano-components/p-371aebe7.system.entry.js.map +1 -0
  192. package/dist/nano-components/p-41899a31.system.entry.js +5 -0
  193. package/dist/nano-components/p-41899a31.system.entry.js.map +1 -0
  194. package/dist/nano-components/p-53957ec6.system.js +5 -0
  195. package/dist/nano-components/{p-e7140887.system.js.map → p-53957ec6.system.js.map} +1 -1
  196. package/dist/nano-components/p-561500f0.system.entry.js +5 -0
  197. package/dist/nano-components/p-561500f0.system.entry.js.map +1 -0
  198. package/dist/nano-components/p-70272eae.js +5 -0
  199. package/dist/nano-components/p-70272eae.js.map +1 -0
  200. package/dist/nano-components/p-755d9227.entry.js +5 -0
  201. package/dist/nano-components/p-755d9227.entry.js.map +1 -0
  202. package/dist/nano-components/p-7bd25494.entry.js +5 -0
  203. package/dist/nano-components/p-7bd25494.entry.js.map +1 -0
  204. package/dist/nano-components/p-7c837460.entry.js +5 -0
  205. package/dist/nano-components/p-7c837460.entry.js.map +1 -0
  206. package/dist/nano-components/{p-93880c28.system.js → p-82e28afd.system.js} +2 -2
  207. package/dist/nano-components/p-82e28afd.system.js.map +1 -0
  208. package/dist/nano-components/p-8378428e.system.js +5 -0
  209. package/dist/nano-components/p-8378428e.system.js.map +1 -0
  210. package/dist/nano-components/p-8df4f125.system.entry.js +5 -0
  211. package/dist/nano-components/p-8df4f125.system.entry.js.map +1 -0
  212. package/dist/nano-components/{p-d0385948.system.entry.js → p-93596c3d.system.entry.js} +2 -2
  213. package/dist/nano-components/p-93596c3d.system.entry.js.map +1 -0
  214. package/dist/nano-components/{p-3e930ac7.entry.js → p-9d9b0b66.entry.js} +2 -2
  215. package/dist/nano-components/p-9d9b0b66.entry.js.map +1 -0
  216. package/dist/nano-components/p-9ffdf6cc.entry.js +5 -0
  217. package/dist/nano-components/{p-222d8095.entry.js.map → p-9ffdf6cc.entry.js.map} +1 -1
  218. package/dist/nano-components/p-a1444980.entry.js +5 -0
  219. package/dist/nano-components/p-a1444980.entry.js.map +1 -0
  220. package/dist/nano-components/p-aa84c727.system.entry.js +5 -0
  221. package/dist/nano-components/p-aa84c727.system.entry.js.map +1 -0
  222. package/dist/nano-components/p-ac5e3775.system.entry.js +5 -0
  223. package/dist/nano-components/p-ac5e3775.system.entry.js.map +1 -0
  224. package/dist/nano-components/p-b85cf493.system.entry.js +5 -0
  225. package/dist/nano-components/{p-e817ab4a.system.entry.js.map → p-b85cf493.system.entry.js.map} +1 -1
  226. package/dist/nano-components/{p-1030797a.entry.js → p-d37e1489.entry.js} +2 -2
  227. package/dist/nano-components/p-d37e1489.entry.js.map +1 -0
  228. package/dist/nano-components/p-d61ae833.system.entry.js +5 -0
  229. package/dist/nano-components/p-d61ae833.system.entry.js.map +1 -0
  230. package/dist/nano-components/p-d93274de.entry.js +5 -0
  231. package/dist/nano-components/p-d93274de.entry.js.map +1 -0
  232. package/dist/nano-components/p-da88981f.entry.js +23 -0
  233. package/dist/nano-components/p-da88981f.entry.js.map +1 -0
  234. package/dist/nano-components/p-e8a913ac.system.entry.js +5 -0
  235. package/dist/nano-components/p-e8a913ac.system.entry.js.map +1 -0
  236. package/dist/nano-components/p-e9a279ee.system.entry.js +5 -0
  237. package/dist/nano-components/p-e9a279ee.system.entry.js.map +1 -0
  238. package/dist/nano-components/p-faba2fc1.system.entry.js +5 -0
  239. package/dist/nano-components/p-faba2fc1.system.entry.js.map +1 -0
  240. package/dist/nano-components/p-ff026352.system.entry.js +5 -0
  241. package/dist/nano-components/p-ff026352.system.entry.js.map +1 -0
  242. package/dist/types/components/date-input/date-input.d.ts +6 -1
  243. package/dist/types/components/icon-button/icon-button.d.ts +2 -0
  244. package/dist/types/components/tabs/tab.d.ts +1 -0
  245. package/dist/types/components.d.ts +20 -0
  246. package/docs-json.json +54 -2
  247. package/package.json +2 -4
  248. package/dist/cjs/ResizeObserver.es-09b81a1b.js +0 -935
  249. package/dist/cjs/ResizeObserver.es-09b81a1b.js.map +0 -1
  250. package/dist/cjs/date-utils-0ae9a12d.js.map +0 -1
  251. package/dist/cjs/global-0d4f3b77.js.map +0 -1
  252. package/dist/cjs/intersection-observer-1822c787.js +0 -987
  253. package/dist/cjs/intersection-observer-1822c787.js.map +0 -1
  254. package/dist/components/ResizeObserver.es.js +0 -933
  255. package/dist/components/ResizeObserver.es.js.map +0 -1
  256. package/dist/components/intersection-observer.js +0 -985
  257. package/dist/components/intersection-observer.js.map +0 -1
  258. package/dist/esm/ResizeObserver.es-724af9fd.js +0 -933
  259. package/dist/esm/ResizeObserver.es-724af9fd.js.map +0 -1
  260. package/dist/esm/date-utils-e4b757ff.js.map +0 -1
  261. package/dist/esm/global-d5ec4d53.js.map +0 -1
  262. package/dist/esm/intersection-observer-dff9fb5b.js +0 -985
  263. package/dist/esm/intersection-observer-dff9fb5b.js.map +0 -1
  264. package/dist/esm-es5/ResizeObserver.es-724af9fd.js +0 -5
  265. package/dist/esm-es5/ResizeObserver.es-724af9fd.js.map +0 -1
  266. package/dist/esm-es5/date-utils-e4b757ff.js +0 -5
  267. package/dist/esm-es5/date-utils-e4b757ff.js.map +0 -1
  268. package/dist/esm-es5/global-d5ec4d53.js.map +0 -1
  269. package/dist/esm-es5/intersection-observer-dff9fb5b.js +0 -5
  270. package/dist/esm-es5/intersection-observer-dff9fb5b.js.map +0 -1
  271. package/dist/nano-components/p-00eaa36a.entry.js +0 -5
  272. package/dist/nano-components/p-00eaa36a.entry.js.map +0 -1
  273. package/dist/nano-components/p-1030797a.entry.js.map +0 -1
  274. package/dist/nano-components/p-11a2dcce.js +0 -5
  275. package/dist/nano-components/p-11a2dcce.js.map +0 -1
  276. package/dist/nano-components/p-1a30dfdd.system.entry.js +0 -5
  277. package/dist/nano-components/p-1a30dfdd.system.entry.js.map +0 -1
  278. package/dist/nano-components/p-222d8095.entry.js +0 -5
  279. package/dist/nano-components/p-241d90eb.system.entry.js +0 -5
  280. package/dist/nano-components/p-241d90eb.system.entry.js.map +0 -1
  281. package/dist/nano-components/p-2c8d7273.entry.js +0 -5
  282. package/dist/nano-components/p-2c8d7273.entry.js.map +0 -1
  283. package/dist/nano-components/p-3093915f.entry.js +0 -5
  284. package/dist/nano-components/p-3093915f.entry.js.map +0 -1
  285. package/dist/nano-components/p-325c1cad.entry.js +0 -5
  286. package/dist/nano-components/p-325c1cad.entry.js.map +0 -1
  287. package/dist/nano-components/p-32f396c0.system.entry.js +0 -5
  288. package/dist/nano-components/p-32f396c0.system.entry.js.map +0 -1
  289. package/dist/nano-components/p-35108e08.entry.js +0 -5
  290. package/dist/nano-components/p-35108e08.entry.js.map +0 -1
  291. package/dist/nano-components/p-3ccb176c.system.entry.js +0 -5
  292. package/dist/nano-components/p-3ccb176c.system.entry.js.map +0 -1
  293. package/dist/nano-components/p-3e930ac7.entry.js.map +0 -1
  294. package/dist/nano-components/p-42cebbfe.system.entry.js +0 -5
  295. package/dist/nano-components/p-42cebbfe.system.entry.js.map +0 -1
  296. package/dist/nano-components/p-5d17cfbb.system.entry.js +0 -23
  297. package/dist/nano-components/p-5d17cfbb.system.entry.js.map +0 -1
  298. package/dist/nano-components/p-5d5ea4ab.system.entry.js +0 -5
  299. package/dist/nano-components/p-5d5ea4ab.system.entry.js.map +0 -1
  300. package/dist/nano-components/p-6722447c.entry.js +0 -5
  301. package/dist/nano-components/p-6722447c.entry.js.map +0 -1
  302. package/dist/nano-components/p-6d138abf.entry.js +0 -5
  303. package/dist/nano-components/p-6d138abf.entry.js.map +0 -1
  304. package/dist/nano-components/p-76d9d1d4.entry.js +0 -5
  305. package/dist/nano-components/p-76d9d1d4.entry.js.map +0 -1
  306. package/dist/nano-components/p-866f083f.system.entry.js +0 -5
  307. package/dist/nano-components/p-866f083f.system.entry.js.map +0 -1
  308. package/dist/nano-components/p-88779174.system.entry.js +0 -5
  309. package/dist/nano-components/p-88779174.system.entry.js.map +0 -1
  310. package/dist/nano-components/p-93880c28.system.js.map +0 -1
  311. package/dist/nano-components/p-97b13ad2.entry.js +0 -5
  312. package/dist/nano-components/p-97b13ad2.entry.js.map +0 -1
  313. package/dist/nano-components/p-b430a9b6.system.js +0 -5
  314. package/dist/nano-components/p-b430a9b6.system.js.map +0 -1
  315. package/dist/nano-components/p-d0385948.system.entry.js.map +0 -1
  316. package/dist/nano-components/p-debd9efc.js +0 -5
  317. package/dist/nano-components/p-debd9efc.js.map +0 -1
  318. package/dist/nano-components/p-e195ab77.system.js +0 -5
  319. package/dist/nano-components/p-e195ab77.system.js.map +0 -1
  320. package/dist/nano-components/p-e7140887.system.js +0 -5
  321. package/dist/nano-components/p-e817ab4a.system.entry.js +0 -5
  322. package/dist/nano-components/p-f5d4d13b.system.js +0 -5
  323. package/dist/nano-components/p-f5d4d13b.system.js.map +0 -1
  324. package/dist/nano-components/p-f66958c1.js +0 -5
  325. package/dist/nano-components/p-f66958c1.js.map +0 -1
  326. package/dist/nano-components/p-f710c763.system.entry.js +0 -5
  327. package/dist/nano-components/p-f710c763.system.entry.js.map +0 -1
  328. package/dist/nano-components/p-f9c7d961.js +0 -5
  329. package/dist/nano-components/p-f9c7d961.js.map +0 -1
  330. package/dist/nano-components/p-ffc2063a.entry.js +0 -23
  331. package/dist/nano-components/p-ffc2063a.entry.js.map +0 -1
  332. package/dist/nano-components/p-fff27907.system.entry.js +0 -5
  333. package/dist/nano-components/p-fff27907.system.entry.js.map +0 -1
@@ -1,935 +0,0 @@
1
- /*!
2
- * Web Components for Nanopore digital Web Apps
3
- */
4
- 'use strict';
5
-
6
- /**
7
- * A collection of shims that provide minimal functionality of the ES6 collections.
8
- *
9
- * These implementations are not meant to be used outside of the ResizeObserver
10
- * modules as they cover only a limited range of use cases.
11
- */
12
- /* eslint-disable require-jsdoc, valid-jsdoc */
13
- var MapShim = (function () {
14
- if (typeof Map !== 'undefined') {
15
- return Map;
16
- }
17
- /**
18
- * Returns index in provided array that matches the specified key.
19
- *
20
- * @param {Array<Array>} arr
21
- * @param {*} key
22
- * @returns {number}
23
- */
24
- function getIndex(arr, key) {
25
- var result = -1;
26
- arr.some(function (entry, index) {
27
- if (entry[0] === key) {
28
- result = index;
29
- return true;
30
- }
31
- return false;
32
- });
33
- return result;
34
- }
35
- return /** @class */ (function () {
36
- function class_1() {
37
- this.__entries__ = [];
38
- }
39
- Object.defineProperty(class_1.prototype, "size", {
40
- /**
41
- * @returns {boolean}
42
- */
43
- get: function () {
44
- return this.__entries__.length;
45
- },
46
- enumerable: true,
47
- configurable: true
48
- });
49
- /**
50
- * @param {*} key
51
- * @returns {*}
52
- */
53
- class_1.prototype.get = function (key) {
54
- var index = getIndex(this.__entries__, key);
55
- var entry = this.__entries__[index];
56
- return entry && entry[1];
57
- };
58
- /**
59
- * @param {*} key
60
- * @param {*} value
61
- * @returns {void}
62
- */
63
- class_1.prototype.set = function (key, value) {
64
- var index = getIndex(this.__entries__, key);
65
- if (~index) {
66
- this.__entries__[index][1] = value;
67
- }
68
- else {
69
- this.__entries__.push([key, value]);
70
- }
71
- };
72
- /**
73
- * @param {*} key
74
- * @returns {void}
75
- */
76
- class_1.prototype.delete = function (key) {
77
- var entries = this.__entries__;
78
- var index = getIndex(entries, key);
79
- if (~index) {
80
- entries.splice(index, 1);
81
- }
82
- };
83
- /**
84
- * @param {*} key
85
- * @returns {void}
86
- */
87
- class_1.prototype.has = function (key) {
88
- return !!~getIndex(this.__entries__, key);
89
- };
90
- /**
91
- * @returns {void}
92
- */
93
- class_1.prototype.clear = function () {
94
- this.__entries__.splice(0);
95
- };
96
- /**
97
- * @param {Function} callback
98
- * @param {*} [ctx=null]
99
- * @returns {void}
100
- */
101
- class_1.prototype.forEach = function (callback, ctx) {
102
- if (ctx === void 0) { ctx = null; }
103
- for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
104
- var entry = _a[_i];
105
- callback.call(ctx, entry[1], entry[0]);
106
- }
107
- };
108
- return class_1;
109
- }());
110
- })();
111
-
112
- /**
113
- * Detects whether window and document objects are available in current environment.
114
- */
115
- var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;
116
-
117
- // Returns global object of a current environment.
118
- var global$1 = (function () {
119
- if (typeof global !== 'undefined' && global.Math === Math) {
120
- return global;
121
- }
122
- if (typeof self !== 'undefined' && self.Math === Math) {
123
- return self;
124
- }
125
- if (typeof window !== 'undefined' && window.Math === Math) {
126
- return window;
127
- }
128
- // eslint-disable-next-line no-new-func
129
- return Function('return this')();
130
- })();
131
-
132
- /**
133
- * A shim for the requestAnimationFrame which falls back to the setTimeout if
134
- * first one is not supported.
135
- *
136
- * @returns {number} Requests' identifier.
137
- */
138
- var requestAnimationFrame$1 = (function () {
139
- if (typeof requestAnimationFrame === 'function') {
140
- // It's required to use a bounded function because IE sometimes throws
141
- // an "Invalid calling object" error if rAF is invoked without the global
142
- // object on the left hand side.
143
- return requestAnimationFrame.bind(global$1);
144
- }
145
- return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
146
- })();
147
-
148
- // Defines minimum timeout before adding a trailing call.
149
- var trailingTimeout = 2;
150
- /**
151
- * Creates a wrapper function which ensures that provided callback will be
152
- * invoked only once during the specified delay period.
153
- *
154
- * @param {Function} callback - Function to be invoked after the delay period.
155
- * @param {number} delay - Delay after which to invoke callback.
156
- * @returns {Function}
157
- */
158
- function throttle (callback, delay) {
159
- var leadingCall = false, trailingCall = false, lastCallTime = 0;
160
- /**
161
- * Invokes the original callback function and schedules new invocation if
162
- * the "proxy" was called during current request.
163
- *
164
- * @returns {void}
165
- */
166
- function resolvePending() {
167
- if (leadingCall) {
168
- leadingCall = false;
169
- callback();
170
- }
171
- if (trailingCall) {
172
- proxy();
173
- }
174
- }
175
- /**
176
- * Callback invoked after the specified delay. It will further postpone
177
- * invocation of the original function delegating it to the
178
- * requestAnimationFrame.
179
- *
180
- * @returns {void}
181
- */
182
- function timeoutCallback() {
183
- requestAnimationFrame$1(resolvePending);
184
- }
185
- /**
186
- * Schedules invocation of the original function.
187
- *
188
- * @returns {void}
189
- */
190
- function proxy() {
191
- var timeStamp = Date.now();
192
- if (leadingCall) {
193
- // Reject immediately following calls.
194
- if (timeStamp - lastCallTime < trailingTimeout) {
195
- return;
196
- }
197
- // Schedule new call to be in invoked when the pending one is resolved.
198
- // This is important for "transitions" which never actually start
199
- // immediately so there is a chance that we might miss one if change
200
- // happens amids the pending invocation.
201
- trailingCall = true;
202
- }
203
- else {
204
- leadingCall = true;
205
- trailingCall = false;
206
- setTimeout(timeoutCallback, delay);
207
- }
208
- lastCallTime = timeStamp;
209
- }
210
- return proxy;
211
- }
212
-
213
- // Minimum delay before invoking the update of observers.
214
- var REFRESH_DELAY = 20;
215
- // A list of substrings of CSS properties used to find transition events that
216
- // might affect dimensions of observed elements.
217
- var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
218
- // Check if MutationObserver is available.
219
- var mutationObserverSupported = typeof MutationObserver !== 'undefined';
220
- /**
221
- * Singleton controller class which handles updates of ResizeObserver instances.
222
- */
223
- var ResizeObserverController = /** @class */ (function () {
224
- /**
225
- * Creates a new instance of ResizeObserverController.
226
- *
227
- * @private
228
- */
229
- function ResizeObserverController() {
230
- /**
231
- * Indicates whether DOM listeners have been added.
232
- *
233
- * @private {boolean}
234
- */
235
- this.connected_ = false;
236
- /**
237
- * Tells that controller has subscribed for Mutation Events.
238
- *
239
- * @private {boolean}
240
- */
241
- this.mutationEventsAdded_ = false;
242
- /**
243
- * Keeps reference to the instance of MutationObserver.
244
- *
245
- * @private {MutationObserver}
246
- */
247
- this.mutationsObserver_ = null;
248
- /**
249
- * A list of connected observers.
250
- *
251
- * @private {Array<ResizeObserverSPI>}
252
- */
253
- this.observers_ = [];
254
- this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
255
- this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
256
- }
257
- /**
258
- * Adds observer to observers list.
259
- *
260
- * @param {ResizeObserverSPI} observer - Observer to be added.
261
- * @returns {void}
262
- */
263
- ResizeObserverController.prototype.addObserver = function (observer) {
264
- if (!~this.observers_.indexOf(observer)) {
265
- this.observers_.push(observer);
266
- }
267
- // Add listeners if they haven't been added yet.
268
- if (!this.connected_) {
269
- this.connect_();
270
- }
271
- };
272
- /**
273
- * Removes observer from observers list.
274
- *
275
- * @param {ResizeObserverSPI} observer - Observer to be removed.
276
- * @returns {void}
277
- */
278
- ResizeObserverController.prototype.removeObserver = function (observer) {
279
- var observers = this.observers_;
280
- var index = observers.indexOf(observer);
281
- // Remove observer if it's present in registry.
282
- if (~index) {
283
- observers.splice(index, 1);
284
- }
285
- // Remove listeners if controller has no connected observers.
286
- if (!observers.length && this.connected_) {
287
- this.disconnect_();
288
- }
289
- };
290
- /**
291
- * Invokes the update of observers. It will continue running updates insofar
292
- * it detects changes.
293
- *
294
- * @returns {void}
295
- */
296
- ResizeObserverController.prototype.refresh = function () {
297
- var changesDetected = this.updateObservers_();
298
- // Continue running updates if changes have been detected as there might
299
- // be future ones caused by CSS transitions.
300
- if (changesDetected) {
301
- this.refresh();
302
- }
303
- };
304
- /**
305
- * Updates every observer from observers list and notifies them of queued
306
- * entries.
307
- *
308
- * @private
309
- * @returns {boolean} Returns "true" if any observer has detected changes in
310
- * dimensions of it's elements.
311
- */
312
- ResizeObserverController.prototype.updateObservers_ = function () {
313
- // Collect observers that have active observations.
314
- var activeObservers = this.observers_.filter(function (observer) {
315
- return observer.gatherActive(), observer.hasActive();
316
- });
317
- // Deliver notifications in a separate cycle in order to avoid any
318
- // collisions between observers, e.g. when multiple instances of
319
- // ResizeObserver are tracking the same element and the callback of one
320
- // of them changes content dimensions of the observed target. Sometimes
321
- // this may result in notifications being blocked for the rest of observers.
322
- activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
323
- return activeObservers.length > 0;
324
- };
325
- /**
326
- * Initializes DOM listeners.
327
- *
328
- * @private
329
- * @returns {void}
330
- */
331
- ResizeObserverController.prototype.connect_ = function () {
332
- // Do nothing if running in a non-browser environment or if listeners
333
- // have been already added.
334
- if (!isBrowser || this.connected_) {
335
- return;
336
- }
337
- // Subscription to the "Transitionend" event is used as a workaround for
338
- // delayed transitions. This way it's possible to capture at least the
339
- // final state of an element.
340
- document.addEventListener('transitionend', this.onTransitionEnd_);
341
- window.addEventListener('resize', this.refresh);
342
- if (mutationObserverSupported) {
343
- this.mutationsObserver_ = new MutationObserver(this.refresh);
344
- this.mutationsObserver_.observe(document, {
345
- attributes: true,
346
- childList: true,
347
- characterData: true,
348
- subtree: true
349
- });
350
- }
351
- else {
352
- document.addEventListener('DOMSubtreeModified', this.refresh);
353
- this.mutationEventsAdded_ = true;
354
- }
355
- this.connected_ = true;
356
- };
357
- /**
358
- * Removes DOM listeners.
359
- *
360
- * @private
361
- * @returns {void}
362
- */
363
- ResizeObserverController.prototype.disconnect_ = function () {
364
- // Do nothing if running in a non-browser environment or if listeners
365
- // have been already removed.
366
- if (!isBrowser || !this.connected_) {
367
- return;
368
- }
369
- document.removeEventListener('transitionend', this.onTransitionEnd_);
370
- window.removeEventListener('resize', this.refresh);
371
- if (this.mutationsObserver_) {
372
- this.mutationsObserver_.disconnect();
373
- }
374
- if (this.mutationEventsAdded_) {
375
- document.removeEventListener('DOMSubtreeModified', this.refresh);
376
- }
377
- this.mutationsObserver_ = null;
378
- this.mutationEventsAdded_ = false;
379
- this.connected_ = false;
380
- };
381
- /**
382
- * "Transitionend" event handler.
383
- *
384
- * @private
385
- * @param {TransitionEvent} event
386
- * @returns {void}
387
- */
388
- ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
389
- var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
390
- // Detect whether transition may affect dimensions of an element.
391
- var isReflowProperty = transitionKeys.some(function (key) {
392
- return !!~propertyName.indexOf(key);
393
- });
394
- if (isReflowProperty) {
395
- this.refresh();
396
- }
397
- };
398
- /**
399
- * Returns instance of the ResizeObserverController.
400
- *
401
- * @returns {ResizeObserverController}
402
- */
403
- ResizeObserverController.getInstance = function () {
404
- if (!this.instance_) {
405
- this.instance_ = new ResizeObserverController();
406
- }
407
- return this.instance_;
408
- };
409
- /**
410
- * Holds reference to the controller's instance.
411
- *
412
- * @private {ResizeObserverController}
413
- */
414
- ResizeObserverController.instance_ = null;
415
- return ResizeObserverController;
416
- }());
417
-
418
- /**
419
- * Defines non-writable/enumerable properties of the provided target object.
420
- *
421
- * @param {Object} target - Object for which to define properties.
422
- * @param {Object} props - Properties to be defined.
423
- * @returns {Object} Target object.
424
- */
425
- var defineConfigurable = (function (target, props) {
426
- for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
427
- var key = _a[_i];
428
- Object.defineProperty(target, key, {
429
- value: props[key],
430
- enumerable: false,
431
- writable: false,
432
- configurable: true
433
- });
434
- }
435
- return target;
436
- });
437
-
438
- /**
439
- * Returns the global object associated with provided element.
440
- *
441
- * @param {Object} target
442
- * @returns {Object}
443
- */
444
- var getWindowOf = (function (target) {
445
- // Assume that the element is an instance of Node, which means that it
446
- // has the "ownerDocument" property from which we can retrieve a
447
- // corresponding global object.
448
- var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
449
- // Return the local global object if it's not possible extract one from
450
- // provided element.
451
- return ownerGlobal || global$1;
452
- });
453
-
454
- // Placeholder of an empty content rectangle.
455
- var emptyRect = createRectInit(0, 0, 0, 0);
456
- /**
457
- * Converts provided string to a number.
458
- *
459
- * @param {number|string} value
460
- * @returns {number}
461
- */
462
- function toFloat(value) {
463
- return parseFloat(value) || 0;
464
- }
465
- /**
466
- * Extracts borders size from provided styles.
467
- *
468
- * @param {CSSStyleDeclaration} styles
469
- * @param {...string} positions - Borders positions (top, right, ...)
470
- * @returns {number}
471
- */
472
- function getBordersSize(styles) {
473
- var positions = [];
474
- for (var _i = 1; _i < arguments.length; _i++) {
475
- positions[_i - 1] = arguments[_i];
476
- }
477
- return positions.reduce(function (size, position) {
478
- var value = styles['border-' + position + '-width'];
479
- return size + toFloat(value);
480
- }, 0);
481
- }
482
- /**
483
- * Extracts paddings sizes from provided styles.
484
- *
485
- * @param {CSSStyleDeclaration} styles
486
- * @returns {Object} Paddings box.
487
- */
488
- function getPaddings(styles) {
489
- var positions = ['top', 'right', 'bottom', 'left'];
490
- var paddings = {};
491
- for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
492
- var position = positions_1[_i];
493
- var value = styles['padding-' + position];
494
- paddings[position] = toFloat(value);
495
- }
496
- return paddings;
497
- }
498
- /**
499
- * Calculates content rectangle of provided SVG element.
500
- *
501
- * @param {SVGGraphicsElement} target - Element content rectangle of which needs
502
- * to be calculated.
503
- * @returns {DOMRectInit}
504
- */
505
- function getSVGContentRect(target) {
506
- var bbox = target.getBBox();
507
- return createRectInit(0, 0, bbox.width, bbox.height);
508
- }
509
- /**
510
- * Calculates content rectangle of provided HTMLElement.
511
- *
512
- * @param {HTMLElement} target - Element for which to calculate the content rectangle.
513
- * @returns {DOMRectInit}
514
- */
515
- function getHTMLElementContentRect(target) {
516
- // Client width & height properties can't be
517
- // used exclusively as they provide rounded values.
518
- var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
519
- // By this condition we can catch all non-replaced inline, hidden and
520
- // detached elements. Though elements with width & height properties less
521
- // than 0.5 will be discarded as well.
522
- //
523
- // Without it we would need to implement separate methods for each of
524
- // those cases and it's not possible to perform a precise and performance
525
- // effective test for hidden elements. E.g. even jQuery's ':visible' filter
526
- // gives wrong results for elements with width & height less than 0.5.
527
- if (!clientWidth && !clientHeight) {
528
- return emptyRect;
529
- }
530
- var styles = getWindowOf(target).getComputedStyle(target);
531
- var paddings = getPaddings(styles);
532
- var horizPad = paddings.left + paddings.right;
533
- var vertPad = paddings.top + paddings.bottom;
534
- // Computed styles of width & height are being used because they are the
535
- // only dimensions available to JS that contain non-rounded values. It could
536
- // be possible to utilize the getBoundingClientRect if only it's data wasn't
537
- // affected by CSS transformations let alone paddings, borders and scroll bars.
538
- var width = toFloat(styles.width), height = toFloat(styles.height);
539
- // Width & height include paddings and borders when the 'border-box' box
540
- // model is applied (except for IE).
541
- if (styles.boxSizing === 'border-box') {
542
- // Following conditions are required to handle Internet Explorer which
543
- // doesn't include paddings and borders to computed CSS dimensions.
544
- //
545
- // We can say that if CSS dimensions + paddings are equal to the "client"
546
- // properties then it's either IE, and thus we don't need to subtract
547
- // anything, or an element merely doesn't have paddings/borders styles.
548
- if (Math.round(width + horizPad) !== clientWidth) {
549
- width -= getBordersSize(styles, 'left', 'right') + horizPad;
550
- }
551
- if (Math.round(height + vertPad) !== clientHeight) {
552
- height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
553
- }
554
- }
555
- // Following steps can't be applied to the document's root element as its
556
- // client[Width/Height] properties represent viewport area of the window.
557
- // Besides, it's as well not necessary as the <html> itself neither has
558
- // rendered scroll bars nor it can be clipped.
559
- if (!isDocumentElement(target)) {
560
- // In some browsers (only in Firefox, actually) CSS width & height
561
- // include scroll bars size which can be removed at this step as scroll
562
- // bars are the only difference between rounded dimensions + paddings
563
- // and "client" properties, though that is not always true in Chrome.
564
- var vertScrollbar = Math.round(width + horizPad) - clientWidth;
565
- var horizScrollbar = Math.round(height + vertPad) - clientHeight;
566
- // Chrome has a rather weird rounding of "client" properties.
567
- // E.g. for an element with content width of 314.2px it sometimes gives
568
- // the client width of 315px and for the width of 314.7px it may give
569
- // 314px. And it doesn't happen all the time. So just ignore this delta
570
- // as a non-relevant.
571
- if (Math.abs(vertScrollbar) !== 1) {
572
- width -= vertScrollbar;
573
- }
574
- if (Math.abs(horizScrollbar) !== 1) {
575
- height -= horizScrollbar;
576
- }
577
- }
578
- return createRectInit(paddings.left, paddings.top, width, height);
579
- }
580
- /**
581
- * Checks whether provided element is an instance of the SVGGraphicsElement.
582
- *
583
- * @param {Element} target - Element to be checked.
584
- * @returns {boolean}
585
- */
586
- var isSVGGraphicsElement = (function () {
587
- // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
588
- // interface.
589
- if (typeof SVGGraphicsElement !== 'undefined') {
590
- return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
591
- }
592
- // If it's so, then check that element is at least an instance of the
593
- // SVGElement and that it has the "getBBox" method.
594
- // eslint-disable-next-line no-extra-parens
595
- return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
596
- typeof target.getBBox === 'function'); };
597
- })();
598
- /**
599
- * Checks whether provided element is a document element (<html>).
600
- *
601
- * @param {Element} target - Element to be checked.
602
- * @returns {boolean}
603
- */
604
- function isDocumentElement(target) {
605
- return target === getWindowOf(target).document.documentElement;
606
- }
607
- /**
608
- * Calculates an appropriate content rectangle for provided html or svg element.
609
- *
610
- * @param {Element} target - Element content rectangle of which needs to be calculated.
611
- * @returns {DOMRectInit}
612
- */
613
- function getContentRect(target) {
614
- if (!isBrowser) {
615
- return emptyRect;
616
- }
617
- if (isSVGGraphicsElement(target)) {
618
- return getSVGContentRect(target);
619
- }
620
- return getHTMLElementContentRect(target);
621
- }
622
- /**
623
- * Creates rectangle with an interface of the DOMRectReadOnly.
624
- * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
625
- *
626
- * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
627
- * @returns {DOMRectReadOnly}
628
- */
629
- function createReadOnlyRect(_a) {
630
- var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
631
- // If DOMRectReadOnly is available use it as a prototype for the rectangle.
632
- var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
633
- var rect = Object.create(Constr.prototype);
634
- // Rectangle's properties are not writable and non-enumerable.
635
- defineConfigurable(rect, {
636
- x: x, y: y, width: width, height: height,
637
- top: y,
638
- right: x + width,
639
- bottom: height + y,
640
- left: x
641
- });
642
- return rect;
643
- }
644
- /**
645
- * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
646
- * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
647
- *
648
- * @param {number} x - X coordinate.
649
- * @param {number} y - Y coordinate.
650
- * @param {number} width - Rectangle's width.
651
- * @param {number} height - Rectangle's height.
652
- * @returns {DOMRectInit}
653
- */
654
- function createRectInit(x, y, width, height) {
655
- return { x: x, y: y, width: width, height: height };
656
- }
657
-
658
- /**
659
- * Class that is responsible for computations of the content rectangle of
660
- * provided DOM element and for keeping track of it's changes.
661
- */
662
- var ResizeObservation = /** @class */ (function () {
663
- /**
664
- * Creates an instance of ResizeObservation.
665
- *
666
- * @param {Element} target - Element to be observed.
667
- */
668
- function ResizeObservation(target) {
669
- /**
670
- * Broadcasted width of content rectangle.
671
- *
672
- * @type {number}
673
- */
674
- this.broadcastWidth = 0;
675
- /**
676
- * Broadcasted height of content rectangle.
677
- *
678
- * @type {number}
679
- */
680
- this.broadcastHeight = 0;
681
- /**
682
- * Reference to the last observed content rectangle.
683
- *
684
- * @private {DOMRectInit}
685
- */
686
- this.contentRect_ = createRectInit(0, 0, 0, 0);
687
- this.target = target;
688
- }
689
- /**
690
- * Updates content rectangle and tells whether it's width or height properties
691
- * have changed since the last broadcast.
692
- *
693
- * @returns {boolean}
694
- */
695
- ResizeObservation.prototype.isActive = function () {
696
- var rect = getContentRect(this.target);
697
- this.contentRect_ = rect;
698
- return (rect.width !== this.broadcastWidth ||
699
- rect.height !== this.broadcastHeight);
700
- };
701
- /**
702
- * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
703
- * from the corresponding properties of the last observed content rectangle.
704
- *
705
- * @returns {DOMRectInit} Last observed content rectangle.
706
- */
707
- ResizeObservation.prototype.broadcastRect = function () {
708
- var rect = this.contentRect_;
709
- this.broadcastWidth = rect.width;
710
- this.broadcastHeight = rect.height;
711
- return rect;
712
- };
713
- return ResizeObservation;
714
- }());
715
-
716
- var ResizeObserverEntry = /** @class */ (function () {
717
- /**
718
- * Creates an instance of ResizeObserverEntry.
719
- *
720
- * @param {Element} target - Element that is being observed.
721
- * @param {DOMRectInit} rectInit - Data of the element's content rectangle.
722
- */
723
- function ResizeObserverEntry(target, rectInit) {
724
- var contentRect = createReadOnlyRect(rectInit);
725
- // According to the specification following properties are not writable
726
- // and are also not enumerable in the native implementation.
727
- //
728
- // Property accessors are not being used as they'd require to define a
729
- // private WeakMap storage which may cause memory leaks in browsers that
730
- // don't support this type of collections.
731
- defineConfigurable(this, { target: target, contentRect: contentRect });
732
- }
733
- return ResizeObserverEntry;
734
- }());
735
-
736
- var ResizeObserverSPI = /** @class */ (function () {
737
- /**
738
- * Creates a new instance of ResizeObserver.
739
- *
740
- * @param {ResizeObserverCallback} callback - Callback function that is invoked
741
- * when one of the observed elements changes it's content dimensions.
742
- * @param {ResizeObserverController} controller - Controller instance which
743
- * is responsible for the updates of observer.
744
- * @param {ResizeObserver} callbackCtx - Reference to the public
745
- * ResizeObserver instance which will be passed to callback function.
746
- */
747
- function ResizeObserverSPI(callback, controller, callbackCtx) {
748
- /**
749
- * Collection of resize observations that have detected changes in dimensions
750
- * of elements.
751
- *
752
- * @private {Array<ResizeObservation>}
753
- */
754
- this.activeObservations_ = [];
755
- /**
756
- * Registry of the ResizeObservation instances.
757
- *
758
- * @private {Map<Element, ResizeObservation>}
759
- */
760
- this.observations_ = new MapShim();
761
- if (typeof callback !== 'function') {
762
- throw new TypeError('The callback provided as parameter 1 is not a function.');
763
- }
764
- this.callback_ = callback;
765
- this.controller_ = controller;
766
- this.callbackCtx_ = callbackCtx;
767
- }
768
- /**
769
- * Starts observing provided element.
770
- *
771
- * @param {Element} target - Element to be observed.
772
- * @returns {void}
773
- */
774
- ResizeObserverSPI.prototype.observe = function (target) {
775
- if (!arguments.length) {
776
- throw new TypeError('1 argument required, but only 0 present.');
777
- }
778
- // Do nothing if current environment doesn't have the Element interface.
779
- if (typeof Element === 'undefined' || !(Element instanceof Object)) {
780
- return;
781
- }
782
- if (!(target instanceof getWindowOf(target).Element)) {
783
- throw new TypeError('parameter 1 is not of type "Element".');
784
- }
785
- var observations = this.observations_;
786
- // Do nothing if element is already being observed.
787
- if (observations.has(target)) {
788
- return;
789
- }
790
- observations.set(target, new ResizeObservation(target));
791
- this.controller_.addObserver(this);
792
- // Force the update of observations.
793
- this.controller_.refresh();
794
- };
795
- /**
796
- * Stops observing provided element.
797
- *
798
- * @param {Element} target - Element to stop observing.
799
- * @returns {void}
800
- */
801
- ResizeObserverSPI.prototype.unobserve = function (target) {
802
- if (!arguments.length) {
803
- throw new TypeError('1 argument required, but only 0 present.');
804
- }
805
- // Do nothing if current environment doesn't have the Element interface.
806
- if (typeof Element === 'undefined' || !(Element instanceof Object)) {
807
- return;
808
- }
809
- if (!(target instanceof getWindowOf(target).Element)) {
810
- throw new TypeError('parameter 1 is not of type "Element".');
811
- }
812
- var observations = this.observations_;
813
- // Do nothing if element is not being observed.
814
- if (!observations.has(target)) {
815
- return;
816
- }
817
- observations.delete(target);
818
- if (!observations.size) {
819
- this.controller_.removeObserver(this);
820
- }
821
- };
822
- /**
823
- * Stops observing all elements.
824
- *
825
- * @returns {void}
826
- */
827
- ResizeObserverSPI.prototype.disconnect = function () {
828
- this.clearActive();
829
- this.observations_.clear();
830
- this.controller_.removeObserver(this);
831
- };
832
- /**
833
- * Collects observation instances the associated element of which has changed
834
- * it's content rectangle.
835
- *
836
- * @returns {void}
837
- */
838
- ResizeObserverSPI.prototype.gatherActive = function () {
839
- var _this = this;
840
- this.clearActive();
841
- this.observations_.forEach(function (observation) {
842
- if (observation.isActive()) {
843
- _this.activeObservations_.push(observation);
844
- }
845
- });
846
- };
847
- /**
848
- * Invokes initial callback function with a list of ResizeObserverEntry
849
- * instances collected from active resize observations.
850
- *
851
- * @returns {void}
852
- */
853
- ResizeObserverSPI.prototype.broadcastActive = function () {
854
- // Do nothing if observer doesn't have active observations.
855
- if (!this.hasActive()) {
856
- return;
857
- }
858
- var ctx = this.callbackCtx_;
859
- // Create ResizeObserverEntry instance for every active observation.
860
- var entries = this.activeObservations_.map(function (observation) {
861
- return new ResizeObserverEntry(observation.target, observation.broadcastRect());
862
- });
863
- this.callback_.call(ctx, entries, ctx);
864
- this.clearActive();
865
- };
866
- /**
867
- * Clears the collection of active observations.
868
- *
869
- * @returns {void}
870
- */
871
- ResizeObserverSPI.prototype.clearActive = function () {
872
- this.activeObservations_.splice(0);
873
- };
874
- /**
875
- * Tells whether observer has active observations.
876
- *
877
- * @returns {boolean}
878
- */
879
- ResizeObserverSPI.prototype.hasActive = function () {
880
- return this.activeObservations_.length > 0;
881
- };
882
- return ResizeObserverSPI;
883
- }());
884
-
885
- // Registry of internal observers. If WeakMap is not available use current shim
886
- // for the Map collection as it has all required methods and because WeakMap
887
- // can't be fully polyfilled anyway.
888
- var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
889
- /**
890
- * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
891
- * exposing only those methods and properties that are defined in the spec.
892
- */
893
- var ResizeObserver = /** @class */ (function () {
894
- /**
895
- * Creates a new instance of ResizeObserver.
896
- *
897
- * @param {ResizeObserverCallback} callback - Callback that is invoked when
898
- * dimensions of the observed elements change.
899
- */
900
- function ResizeObserver(callback) {
901
- if (!(this instanceof ResizeObserver)) {
902
- throw new TypeError('Cannot call a class as a function.');
903
- }
904
- if (!arguments.length) {
905
- throw new TypeError('1 argument required, but only 0 present.');
906
- }
907
- var controller = ResizeObserverController.getInstance();
908
- var observer = new ResizeObserverSPI(callback, controller, this);
909
- observers.set(this, observer);
910
- }
911
- return ResizeObserver;
912
- }());
913
- // Expose public methods of ResizeObserver.
914
- [
915
- 'observe',
916
- 'unobserve',
917
- 'disconnect'
918
- ].forEach(function (method) {
919
- ResizeObserver.prototype[method] = function () {
920
- var _a;
921
- return (_a = observers.get(this))[method].apply(_a, arguments);
922
- };
923
- });
924
-
925
- var index = (function () {
926
- // Export existing implementation if available.
927
- if (typeof global$1.ResizeObserver !== 'undefined') {
928
- return global$1.ResizeObserver;
929
- }
930
- return ResizeObserver;
931
- })();
932
-
933
- exports.index = index;
934
-
935
- //# sourceMappingURL=ResizeObserver.es-09b81a1b.js.map