@content-blocks/js 0.7.7 → 0.8.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 (380) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +111 -3
  3. package/THIRD-PARTY-NOTICES.md +21 -0
  4. package/dist/cjs/{app-globals-3a1e7e63.js → app-globals-V2Kpy_OQ.js} +0 -2
  5. package/dist/cjs/content-accordion.cjs.entry.js +87 -0
  6. package/dist/cjs/content-blocks.cjs.js +35 -11
  7. package/dist/cjs/content-button.cjs.entry.js +113 -0
  8. package/dist/cjs/content-carousel.cjs.entry.js +153 -47
  9. package/dist/cjs/content-grid-formatter.cjs.entry.js +102 -0
  10. package/dist/cjs/content-hero-block.cjs.entry.js +45 -0
  11. package/dist/cjs/content-image.cjs.entry.js +153 -0
  12. package/dist/cjs/content-line.cjs.entry.js +61 -0
  13. package/dist/cjs/content-navigation-block.cjs.entry.js +51 -34
  14. package/dist/cjs/content-overlay.cjs.entry.js +641 -0
  15. package/dist/cjs/content-spacer.cjs.entry.js +75 -0
  16. package/dist/cjs/content-split-block.cjs.entry.js +22 -19
  17. package/dist/cjs/content-tabs.cjs.entry.js +38 -21
  18. package/dist/cjs/content-text-block.cjs.entry.js +63 -0
  19. package/dist/cjs/content-tout-block.cjs.entry.js +34 -0
  20. package/dist/cjs/{content-accordion_11.cjs.entry.js → content-video.cjs.entry.js} +14541 -12905
  21. package/dist/cjs/{focus-trap.esm-7bc384a0.js → focus-trap.esm-ZwN-anf1.js} +484 -190
  22. package/dist/cjs/{index-2e0ce692.js → index-B1U6Gweq.js} +348 -246
  23. package/dist/cjs/index-ClnpH9XB.js +2170 -0
  24. package/dist/cjs/index-CyalvZJn.js +1719 -0
  25. package/dist/cjs/index-DUvWvBDN.js +290 -0
  26. package/dist/cjs/index-voGY4Tkl.js +4705 -0
  27. package/dist/cjs/index.cjs.js +2 -5
  28. package/dist/cjs/loader.cjs.js +3 -8
  29. package/dist/cjs/responsive-component-C5eJS82z.js +171 -0
  30. package/dist/cjs/responsive-component-DMdnQIPV.js +171 -0
  31. package/dist/cjs/swiper-KLYbvU1K.js +3931 -0
  32. package/dist/cjs/{swiper-8221f4e8.js → swiper-_Z8Y4IJI.js} +269 -236
  33. package/dist/cjs/utils-BCHaRGm_.js +462 -0
  34. package/dist/cjs/{utils-df044337.js → utils-C3gXIS2t.js} +51 -49
  35. package/dist/cjs/utils-DUvWvBDN.js +290 -0
  36. package/dist/collection/blocks/content-hero-block/content-hero-block.css +1 -1
  37. package/dist/collection/blocks/content-hero-block/content-hero-block.js +33 -48
  38. package/dist/collection/blocks/content-split-block/content-split-block.css +16 -5
  39. package/dist/collection/blocks/content-split-block/content-split-block.js +29 -48
  40. package/dist/collection/blocks/content-text-block/content-text-block.js +65 -59
  41. package/dist/collection/blocks/content-tout-block/content-tout-block.css +3 -0
  42. package/dist/collection/blocks/content-tout-block/content-tout-block.js +22 -47
  43. package/dist/collection/collection-manifest.json +8 -5
  44. package/dist/collection/components/content-accordion/content-accordion.css +20 -1
  45. package/dist/collection/components/content-accordion/content-accordion.js +67 -33
  46. package/dist/collection/components/content-accordion/libraries/w3_disclosure_button.js +0 -1
  47. package/dist/collection/components/content-carousel/content-carousel.css +60 -4
  48. package/dist/collection/components/content-carousel/content-carousel.js +294 -44
  49. package/dist/collection/components/content-navigation-block/content-navigation-block.css +15 -1
  50. package/dist/collection/components/content-navigation-block/content-navigation-block.js +86 -42
  51. package/dist/collection/components/content-overlay/content-overlay.css +36 -5
  52. package/dist/collection/components/content-overlay/content-overlay.js +181 -120
  53. package/dist/collection/components/content-overlay/libraries/aria-dialog.js +0 -1
  54. package/dist/collection/components/content-overlay/libraries/aria-utilities.js +0 -1
  55. package/dist/collection/components/content-tabs/content-tabs.js +7 -49
  56. package/dist/collection/components/content-tabs/libraries/w3_tabs.js +0 -1
  57. package/dist/collection/elements/content-button/content-button.css +8 -7
  58. package/dist/collection/elements/content-button/content-button.js +103 -84
  59. package/dist/collection/elements/content-image/content-image.css +3 -1
  60. package/dist/collection/elements/content-image/content-image.js +176 -95
  61. package/dist/collection/elements/content-line/content-line.js +63 -54
  62. package/dist/collection/elements/content-video/content-video.css +1 -1
  63. package/dist/collection/elements/content-video/content-video.js +123 -73
  64. package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.css +8 -2
  65. package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js +167 -89
  66. package/dist/collection/formatters/content-spacer/content-spacer.js +86 -209
  67. package/dist/collection/global/content-blocks-reset.css +77 -0
  68. package/dist/collection/index.js +1 -1
  69. package/dist/collection/sass/_mixins.scss +21 -5
  70. package/dist/collection/sass/_variables.scss +15 -15
  71. package/dist/collection/setupFiles.js +0 -1
  72. package/dist/collection/site/site.js +67 -0
  73. package/dist/collection/utils/breakpoints.js +162 -0
  74. package/dist/collection/utils/responsive-component.js +249 -0
  75. package/dist/collection/utils/utils.js +32 -42
  76. package/dist/components/content-accordion.js +65 -44
  77. package/dist/components/content-button.js +89 -43
  78. package/dist/components/content-carousel.js +172 -55
  79. package/dist/components/content-grid-formatter.js +127 -3
  80. package/dist/components/content-hero-block.js +33 -26
  81. package/dist/components/content-image.js +127 -71
  82. package/dist/components/content-line.js +56 -35
  83. package/dist/components/content-navigation-block.js +62 -39
  84. package/dist/components/content-overlay.js +128 -67
  85. package/dist/components/content-spacer.js +70 -54
  86. package/dist/components/content-split-block.js +33 -32
  87. package/dist/components/content-tabs.js +46 -25
  88. package/dist/components/content-text-block.js +55 -35
  89. package/dist/components/content-tout-block.js +29 -27
  90. package/dist/components/content-video.js +14605 -11951
  91. package/dist/{esm/focus-trap.esm-8fb54175.js → components/focus-trap.esm.js} +484 -190
  92. package/dist/components/index.d.ts +2 -0
  93. package/dist/components/index.js +3 -3
  94. package/dist/components/{p-5a91aa1b.js → index2.js} +348 -246
  95. package/dist/components/p-BWRCeMvO.js +1 -0
  96. package/dist/components/p-CYF5GU_q.js +1 -0
  97. package/dist/components/p-DXUoPIwl.js +10 -0
  98. package/dist/components/p-D_Ll4QNj.js +1 -0
  99. package/dist/components/p-DhIoW7H3.js +1 -0
  100. package/dist/components/responsive-component.js +168 -0
  101. package/dist/components/{p-e5dc4ea4.js → swiper.js} +268 -235
  102. package/dist/components/utils.js +4969 -0
  103. package/dist/{esm/utils-1c9f0ec1.js → components/utils2.js} +51 -50
  104. package/dist/content-blocks/content-accordion.entry.js +85 -0
  105. package/dist/content-blocks/content-blocks.esm.js +47 -2
  106. package/dist/content-blocks/content-button.entry.js +111 -0
  107. package/dist/content-blocks/content-carousel.entry.js +188 -0
  108. package/dist/content-blocks/content-grid-formatter.entry.js +100 -0
  109. package/dist/content-blocks/content-hero-block.entry.js +43 -0
  110. package/dist/content-blocks/content-image.entry.js +151 -0
  111. package/dist/content-blocks/content-line.entry.js +59 -0
  112. package/dist/content-blocks/content-navigation-block.entry.js +105 -0
  113. package/dist/content-blocks/content-overlay.entry.js +639 -0
  114. package/dist/content-blocks/content-spacer.entry.js +73 -0
  115. package/dist/content-blocks/content-split-block.entry.js +34 -0
  116. package/dist/content-blocks/content-tabs.entry.js +245 -0
  117. package/dist/content-blocks/content-text-block.entry.js +61 -0
  118. package/dist/content-blocks/content-tout-block.entry.js +32 -0
  119. package/dist/{esm/content-accordion_11.entry.js → content-blocks/content-video.entry.js} +14516 -12868
  120. package/dist/{components/p-a2fedf8a.js → content-blocks/focus-trap.esm-DXUoPIwl.js} +484 -190
  121. package/dist/content-blocks/global/content-blocks-reset.css +77 -0
  122. package/dist/content-blocks/index-BFDJMblF.js +4690 -0
  123. package/dist/{esm/index-f45a9c45.js → content-blocks/index-P1YnSd-O.js} +348 -246
  124. package/dist/content-blocks/index.esm.js +1 -2
  125. package/dist/content-blocks/p-008457f0.entry.js +1 -0
  126. package/dist/content-blocks/p-052692f1.entry.js +1 -0
  127. package/dist/content-blocks/p-0f71bd32.entry.js +1 -0
  128. package/dist/content-blocks/p-1f154617.entry.js +1 -0
  129. package/dist/content-blocks/p-2554ebd8.entry.js +1 -0
  130. package/dist/content-blocks/p-4afd6511.entry.js +1 -0
  131. package/dist/content-blocks/p-78d5de9f.entry.js +1 -0
  132. package/dist/content-blocks/p-7bcf7e7e.entry.js +1 -0
  133. package/dist/content-blocks/p-9058031c.entry.js +1 -0
  134. package/dist/content-blocks/p-9c41ac23.entry.js +17 -0
  135. package/dist/content-blocks/p-CLwOzPEO.js +3 -0
  136. package/dist/content-blocks/p-CYF5GU_q.js +1 -0
  137. package/dist/content-blocks/p-CjR_4mPu.js +1 -0
  138. package/dist/content-blocks/p-DQuL1Twl.js +1 -0
  139. package/dist/content-blocks/p-DXUoPIwl.js +10 -0
  140. package/dist/content-blocks/p-D_Ll4QNj.js +1 -0
  141. package/dist/content-blocks/p-DhIoW7H3.js +1 -0
  142. package/dist/content-blocks/p-DzYwy_62.js +1 -0
  143. package/dist/content-blocks/p-b2e6358a.entry.js +1 -0
  144. package/dist/content-blocks/p-c783bc68.entry.js +1 -0
  145. package/dist/content-blocks/p-e3d81e15.entry.js +1 -0
  146. package/dist/content-blocks/p-f23b4aae.entry.js +1 -0
  147. package/dist/content-blocks/p-f75c9094.entry.js +1 -0
  148. package/dist/content-blocks/responsive-component-BsLrcKbS.js +169 -0
  149. package/dist/content-blocks/sass/_mixins.scss +21 -5
  150. package/dist/content-blocks/sass/_variables.scss +15 -15
  151. package/dist/{esm/swiper-e9621adb.js → content-blocks/swiper-nBv069TB.js} +268 -235
  152. package/dist/{components/p-b85cfa86.js → content-blocks/utils--SDsQnWS.js} +51 -50
  153. package/dist/content-blocks/utils-Bak__24s.js +280 -0
  154. package/dist/docs.d.ts +480 -0
  155. package/dist/docs.json +5312 -0
  156. package/dist/esm/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -2
  157. package/dist/esm/content-accordion.entry.js +85 -0
  158. package/dist/esm/content-blocks.js +33 -8
  159. package/dist/esm/content-button.entry.js +111 -0
  160. package/dist/esm/content-carousel.entry.js +153 -45
  161. package/dist/esm/content-grid-formatter.entry.js +100 -0
  162. package/dist/esm/content-hero-block.entry.js +43 -0
  163. package/dist/esm/content-image.entry.js +151 -0
  164. package/dist/esm/content-line.entry.js +59 -0
  165. package/dist/esm/content-navigation-block.entry.js +51 -32
  166. package/dist/esm/content-overlay.entry.js +639 -0
  167. package/dist/esm/content-spacer.entry.js +73 -0
  168. package/dist/esm/content-split-block.entry.js +22 -17
  169. package/dist/esm/content-tabs.entry.js +38 -19
  170. package/dist/esm/content-text-block.entry.js +61 -0
  171. package/dist/esm/content-tout-block.entry.js +32 -0
  172. package/dist/esm/content-video.entry.js +72033 -0
  173. package/dist/esm/focus-trap.esm-DXUoPIwl.js +1801 -0
  174. package/dist/esm/index-BASCLGuP.js +1713 -0
  175. package/dist/esm/index-BFDJMblF.js +4690 -0
  176. package/dist/esm/index-CLwOzPEO.js +2161 -0
  177. package/dist/esm/index-CjR_4mPu.js +280 -0
  178. package/dist/esm/index-P1YnSd-O.js +5397 -0
  179. package/dist/esm/index.js +1 -3
  180. package/dist/esm/loader.js +3 -6
  181. package/dist/esm/responsive-component-BsLrcKbS.js +169 -0
  182. package/dist/esm/responsive-component-D7dJHMp0.js +169 -0
  183. package/dist/esm/swiper-CtypHPwF.js +3928 -0
  184. package/dist/esm/swiper-nBv069TB.js +3941 -0
  185. package/dist/esm/utils--SDsQnWS.js +460 -0
  186. package/dist/esm/utils-Bak__24s.js +280 -0
  187. package/dist/esm/utils-CYF5GU_q.js +438 -0
  188. package/dist/node_modules/video.js/dist/video-js.min.css +1 -0
  189. package/dist/test/axe.js +60 -0
  190. package/dist/types/Users/shahrukceo/Developer/content-blocks/packages/js/.stencil/test/axe.d.ts +16 -0
  191. package/dist/types/blocks/content-hero-block/content-hero-block.d.ts +7 -11
  192. package/dist/types/blocks/content-split-block/content-split-block.d.ts +5 -9
  193. package/dist/types/blocks/content-text-block/content-text-block.d.ts +4 -9
  194. package/dist/types/blocks/content-tout-block/content-tout-block.d.ts +5 -10
  195. package/dist/types/components/content-accordion/content-accordion.d.ts +4 -3
  196. package/dist/types/components/content-accordion/libraries/w3_disclosure_button.d.ts +0 -1
  197. package/dist/types/components/content-carousel/content-carousel.d.ts +44 -7
  198. package/dist/types/components/content-navigation-block/content-navigation-block.d.ts +14 -8
  199. package/dist/types/components/content-overlay/content-overlay.d.ts +15 -16
  200. package/dist/types/components/content-overlay/libraries/aria-dialog.d.ts +0 -1
  201. package/dist/types/components/content-overlay/libraries/aria-utilities.d.ts +0 -1
  202. package/dist/types/components/content-tabs/content-tabs.d.ts +4 -10
  203. package/dist/types/components/content-tabs/libraries/w3_tabs.d.ts +0 -1
  204. package/dist/types/components.d.ts +892 -198
  205. package/dist/types/elements/content-button/content-button.d.ts +8 -13
  206. package/dist/types/elements/content-image/content-image.d.ts +15 -9
  207. package/dist/types/elements/content-line/content-line.d.ts +5 -12
  208. package/dist/types/elements/content-video/content-video.d.ts +6 -11
  209. package/dist/types/formatters/content-grid-formatter/content-grid-formatter.d.ts +14 -9
  210. package/dist/types/formatters/content-spacer/content-spacer.d.ts +4 -36
  211. package/dist/types/index.d.ts +3 -1
  212. package/dist/types/setupFiles.d.ts +0 -1
  213. package/dist/types/stencil-public-runtime.d.ts +265 -60
  214. package/dist/types/typings.d.ts +10 -0
  215. package/dist/types/utils/breakpoints.d.ts +57 -0
  216. package/dist/types/utils/responsive-component.d.ts +49 -0
  217. package/dist/types/utils/utils.d.ts +11 -8
  218. package/loader/cdn.js +1 -0
  219. package/loader/index.cjs.js +1 -0
  220. package/loader/index.d.ts +24 -0
  221. package/loader/index.es2017.js +1 -0
  222. package/loader/index.js +2 -0
  223. package/package.json +74 -64
  224. package/dist/cjs/BehaviorSubject-12116537.js +0 -655
  225. package/dist/cjs/BehaviorSubject-12116537.js.map +0 -1
  226. package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
  227. package/dist/cjs/content-accordion_11.cjs.entry.js.map +0 -1
  228. package/dist/cjs/content-blocks.cjs.js.map +0 -1
  229. package/dist/cjs/content-carousel.cjs.entry.js.map +0 -1
  230. package/dist/cjs/content-navigation-block.cjs.entry.js.map +0 -1
  231. package/dist/cjs/content-split-block.cjs.entry.js.map +0 -1
  232. package/dist/cjs/content-tabs.cjs.entry.js.map +0 -1
  233. package/dist/cjs/focus-trap.esm-7bc384a0.js.map +0 -1
  234. package/dist/cjs/index-2e0ce692.js.map +0 -1
  235. package/dist/cjs/index-8af2820a.js +0 -1650
  236. package/dist/cjs/index-8af2820a.js.map +0 -1
  237. package/dist/cjs/index.cjs.js.map +0 -1
  238. package/dist/cjs/loader.cjs.js.map +0 -1
  239. package/dist/cjs/swiper-8221f4e8.js.map +0 -1
  240. package/dist/cjs/utils-df044337.js.map +0 -1
  241. package/dist/cjs/utils-f8ccab0a.js +0 -126
  242. package/dist/cjs/utils-f8ccab0a.js.map +0 -1
  243. package/dist/cjs/window-resize-service-65a5a370.js +0 -37
  244. package/dist/cjs/window-resize-service-65a5a370.js.map +0 -1
  245. package/dist/collection/blocks/content-hero-block/content-hero-block.js.map +0 -1
  246. package/dist/collection/blocks/content-split-block/content-split-block.js.map +0 -1
  247. package/dist/collection/blocks/content-text-block/content-text-block.js.map +0 -1
  248. package/dist/collection/blocks/content-tout-block/content-tout-block.js.map +0 -1
  249. package/dist/collection/components/content-accordion/content-accordion.js.map +0 -1
  250. package/dist/collection/components/content-accordion/libraries/w3_disclosure_button.js.map +0 -1
  251. package/dist/collection/components/content-carousel/content-carousel.js.map +0 -1
  252. package/dist/collection/components/content-navigation-block/content-navigation-block.js.map +0 -1
  253. package/dist/collection/components/content-overlay/content-overlay.js.map +0 -1
  254. package/dist/collection/components/content-overlay/libraries/aria-dialog.js.map +0 -1
  255. package/dist/collection/components/content-overlay/libraries/aria-utilities.js.map +0 -1
  256. package/dist/collection/components/content-tabs/content-tabs.js.map +0 -1
  257. package/dist/collection/components/content-tabs/libraries/w3_tabs.js.map +0 -1
  258. package/dist/collection/elements/content-button/content-button.js.map +0 -1
  259. package/dist/collection/elements/content-image/content-image.js.map +0 -1
  260. package/dist/collection/elements/content-line/content-line.js.map +0 -1
  261. package/dist/collection/elements/content-video/content-video.js.map +0 -1
  262. package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js.map +0 -1
  263. package/dist/collection/formatters/content-spacer/content-spacer.js.map +0 -1
  264. package/dist/collection/globalScript.js +0 -15
  265. package/dist/collection/globalScript.js.map +0 -1
  266. package/dist/collection/index.js.map +0 -1
  267. package/dist/collection/services/content-events-service.js +0 -23
  268. package/dist/collection/services/content-events-service.js.map +0 -1
  269. package/dist/collection/services/window-resize-service.js +0 -31
  270. package/dist/collection/services/window-resize-service.js.map +0 -1
  271. package/dist/collection/setupFiles.js.map +0 -1
  272. package/dist/collection/stories/ContentHeroBlock.stories.js +0 -51
  273. package/dist/collection/stories/ContentHeroBlock.stories.js.map +0 -1
  274. package/dist/collection/stories/ContentNavigationBlock.stories.js +0 -33
  275. package/dist/collection/stories/ContentNavigationBlock.stories.js.map +0 -1
  276. package/dist/collection/stories/ContentSpacer.stories.js +0 -20
  277. package/dist/collection/stories/ContentSpacer.stories.js.map +0 -1
  278. package/dist/collection/stories/ContentTextBlock.stories.js +0 -17
  279. package/dist/collection/stories/ContentTextBlock.stories.js.map +0 -1
  280. package/dist/collection/stories/ContentToutBlock.stories.js +0 -17
  281. package/dist/collection/stories/ContentToutBlock.stories.js.map +0 -1
  282. package/dist/collection/stories/FullPageExample.stories.js +0 -432
  283. package/dist/collection/stories/FullPageExample.stories.js.map +0 -1
  284. package/dist/collection/stories/assets/accessibility.svg +0 -5
  285. package/dist/collection/stories/assets/discord.svg +0 -15
  286. package/dist/collection/stories/assets/github.svg +0 -3
  287. package/dist/collection/stories/assets/tutorials.svg +0 -12
  288. package/dist/collection/stories/assets/youtube.svg +0 -4
  289. package/dist/collection/utils/utils.js.map +0 -1
  290. package/dist/components/content-accordion.js.map +0 -1
  291. package/dist/components/content-button.js.map +0 -1
  292. package/dist/components/content-carousel.js.map +0 -1
  293. package/dist/components/content-grid-formatter.js.map +0 -1
  294. package/dist/components/content-hero-block.js.map +0 -1
  295. package/dist/components/content-image.js.map +0 -1
  296. package/dist/components/content-line.js.map +0 -1
  297. package/dist/components/content-navigation-block.js.map +0 -1
  298. package/dist/components/content-overlay.js.map +0 -1
  299. package/dist/components/content-spacer.js.map +0 -1
  300. package/dist/components/content-split-block.js.map +0 -1
  301. package/dist/components/content-tabs.js.map +0 -1
  302. package/dist/components/content-text-block.js.map +0 -1
  303. package/dist/components/content-tout-block.js.map +0 -1
  304. package/dist/components/content-video.js.map +0 -1
  305. package/dist/components/index.js.map +0 -1
  306. package/dist/components/p-26483b46.js +0 -35
  307. package/dist/components/p-26483b46.js.map +0 -1
  308. package/dist/components/p-5a91aa1b.js.map +0 -1
  309. package/dist/components/p-74be971f.js +0 -652
  310. package/dist/components/p-74be971f.js.map +0 -1
  311. package/dist/components/p-7a436263.js +0 -122
  312. package/dist/components/p-7a436263.js.map +0 -1
  313. package/dist/components/p-a2fedf8a.js.map +0 -1
  314. package/dist/components/p-b85cfa86.js.map +0 -1
  315. package/dist/components/p-e28db040.js +0 -1452
  316. package/dist/components/p-e28db040.js.map +0 -1
  317. package/dist/components/p-e5dc4ea4.js.map +0 -1
  318. package/dist/components/p-e9bce2ab.js +0 -88
  319. package/dist/components/p-e9bce2ab.js.map +0 -1
  320. package/dist/content-blocks/content-blocks.esm.js.map +0 -1
  321. package/dist/content-blocks/index.esm.js.map +0 -1
  322. package/dist/content-blocks/p-13c3cc4f.js +0 -3
  323. package/dist/content-blocks/p-13c3cc4f.js.map +0 -1
  324. package/dist/content-blocks/p-398760b3.entry.js +0 -26
  325. package/dist/content-blocks/p-398760b3.entry.js.map +0 -1
  326. package/dist/content-blocks/p-5422c25b.entry.js +0 -2
  327. package/dist/content-blocks/p-5422c25b.entry.js.map +0 -1
  328. package/dist/content-blocks/p-5a91aa1b.js +0 -2
  329. package/dist/content-blocks/p-5a91aa1b.js.map +0 -1
  330. package/dist/content-blocks/p-650d1757.js +0 -2
  331. package/dist/content-blocks/p-650d1757.js.map +0 -1
  332. package/dist/content-blocks/p-74be971f.js +0 -2
  333. package/dist/content-blocks/p-74be971f.js.map +0 -1
  334. package/dist/content-blocks/p-a2fedf8a.js +0 -10
  335. package/dist/content-blocks/p-a2fedf8a.js.map +0 -1
  336. package/dist/content-blocks/p-b305392e.entry.js +0 -2
  337. package/dist/content-blocks/p-b305392e.entry.js.map +0 -1
  338. package/dist/content-blocks/p-b85cfa86.js +0 -2
  339. package/dist/content-blocks/p-b85cfa86.js.map +0 -1
  340. package/dist/content-blocks/p-cc7397cf.js +0 -2
  341. package/dist/content-blocks/p-cc7397cf.js.map +0 -1
  342. package/dist/content-blocks/p-d62775d7.entry.js +0 -2
  343. package/dist/content-blocks/p-d62775d7.entry.js.map +0 -1
  344. package/dist/content-blocks/p-e1255160.js +0 -2
  345. package/dist/content-blocks/p-e1255160.js.map +0 -1
  346. package/dist/content-blocks/p-e5dc4ea4.js +0 -2
  347. package/dist/content-blocks/p-e5dc4ea4.js.map +0 -1
  348. package/dist/content-blocks/p-f73f934a.entry.js +0 -2
  349. package/dist/content-blocks/p-f73f934a.entry.js.map +0 -1
  350. package/dist/esm/BehaviorSubject-f7a12fd8.js +0 -652
  351. package/dist/esm/BehaviorSubject-f7a12fd8.js.map +0 -1
  352. package/dist/esm/app-globals-0f993ce5.js.map +0 -1
  353. package/dist/esm/content-accordion_11.entry.js.map +0 -1
  354. package/dist/esm/content-blocks.js.map +0 -1
  355. package/dist/esm/content-carousel.entry.js.map +0 -1
  356. package/dist/esm/content-navigation-block.entry.js.map +0 -1
  357. package/dist/esm/content-split-block.entry.js.map +0 -1
  358. package/dist/esm/content-tabs.entry.js.map +0 -1
  359. package/dist/esm/focus-trap.esm-8fb54175.js.map +0 -1
  360. package/dist/esm/index-ec24af7a.js +0 -1621
  361. package/dist/esm/index-ec24af7a.js.map +0 -1
  362. package/dist/esm/index-f45a9c45.js.map +0 -1
  363. package/dist/esm/index.js.map +0 -1
  364. package/dist/esm/loader.js.map +0 -1
  365. package/dist/esm/swiper-e9621adb.js.map +0 -1
  366. package/dist/esm/utils-1c9f0ec1.js.map +0 -1
  367. package/dist/esm/utils-9a901aa9.js +0 -122
  368. package/dist/esm/utils-9a901aa9.js.map +0 -1
  369. package/dist/esm/window-resize-service-354f2ac5.js +0 -35
  370. package/dist/esm/window-resize-service-354f2ac5.js.map +0 -1
  371. package/dist/types/globalScript.d.ts +0 -1
  372. package/dist/types/old-components.d.ts +0 -1239
  373. package/dist/types/services/content-events-service.d.ts +0 -11
  374. package/dist/types/services/window-resize-service.d.ts +0 -11
  375. package/dist/types/stories/ContentHeroBlock.stories.d.ts +0 -11
  376. package/dist/types/stories/ContentNavigationBlock.stories.d.ts +0 -9
  377. package/dist/types/stories/ContentSpacer.stories.d.ts +0 -15
  378. package/dist/types/stories/ContentTextBlock.stories.d.ts +0 -9
  379. package/dist/types/stories/ContentToutBlock.stories.d.ts +0 -9
  380. package/dist/types/stories/FullPageExample.stories.d.ts +0 -10
@@ -1 +0,0 @@
1
- {"version":3,"names":["W3Tabs","constructor","stencilElement","tablist","querySelectorAll","tabs","panels","generateArrays","keys","end","home","left","up","right","down","delete","enter","space","direction","i","length","addListeners","index","addEventListener","clickEventListener","keydownEventListener","keyupEventListener","event","tab","target","closest","preventDefault","activateTab","key","keyCode","focusLastTab","focusFirstTab","determineOrientation","determineDeletable","vertical","getAttribute","proceed","switchTabOnArrowPress","pressed","undefined","focus","setFocus","deactivateTabs","removeAttribute","setAttribute","controls","document","getElementById","t","p","deleteTab","panel","parentElement","removeChild","contentTabsCss","ContentTabsStyle0","ContentTabs","componentWillLoad","WindowResizeService","registerProp","this","classes","subscribe","newValue","classString","componentDidLoad","element","render","h","Host","class","name"],"sources":["src/components/content-tabs/libraries/w3_tabs.ts","src/components/content-tabs/content-tabs.scss?tag=content-tabs","src/components/content-tabs/content-tabs.tsx"],"sourcesContent":["/*\n* This content is licensed according to the W3C Software License at\n* https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document\n*/\nexport default class W3Tabs {\n constructor(stencilElement: HTMLElement) {\n var tablist = stencilElement.querySelectorAll('[role=\"tablist\"]')[0];\n var tabs;\n var panels;\n\n generateArrays();\n\n function generateArrays () {\n tabs = stencilElement.querySelectorAll('[role=\"tab\"]');\n panels = stencilElement.querySelectorAll('[role=\"tabpanel\"]');\n };\n\n // For easy reference\n var keys = {\n end: 35,\n home: 36,\n left: 37,\n up: 38,\n right: 39,\n down: 40,\n delete: 46,\n enter: 13,\n space: 32\n };\n\n // Add or subtract depending on key pressed\n var direction = {\n 37: -1,\n 38: -1,\n 39: 1,\n 40: 1\n };\n\n // Bind listeners\n for (var i = 0; i < tabs.length; ++i) {\n addListeners(i);\n };\n\n function addListeners (index) {\n tabs[index].addEventListener('click', clickEventListener);\n tabs[index].addEventListener('keydown', keydownEventListener);\n tabs[index].addEventListener('keyup', keyupEventListener);\n\n // Build an array with all tabs (<button>s) in it\n tabs[index].index = index;\n };\n\n // When a tab is clicked, activateTab is fired to activate it\n function clickEventListener (event) {\n let tab = event.target.closest('button');\n event.preventDefault();\n activateTab(tab, false);\n };\n\n // Handle keydown on tabs\n function keydownEventListener (event) {\n var key = event.keyCode;\n\n switch (key) {\n case keys.end:\n event.preventDefault();\n // Activate last tab\n focusLastTab();\n break;\n case keys.home:\n event.preventDefault();\n // Activate first tab\n focusFirstTab();\n break;\n\n // Up and down are in keydown\n // because we need to prevent page scroll >:)\n case keys.up:\n case keys.down:\n determineOrientation(event);\n break;\n };\n };\n\n // Handle keyup on tabs\n function keyupEventListener (event) {\n var key = event.keyCode;\n\n switch (key) {\n case keys.left:\n case keys.right:\n determineOrientation(event);\n break;\n case keys.delete:\n determineDeletable(event);\n break;\n case keys.enter:\n case keys.space:\n event.preventDefault();\n activateTab(event.target);\n break;\n };\n };\n\n // When a tablist’s aria-orientation is set to vertical,\n // only up and down arrow should function.\n // In all other cases only left and right arrow function.\n function determineOrientation (event) {\n var key = event.keyCode;\n var vertical = tablist.getAttribute('aria-orientation') == 'vertical';\n var proceed = false;\n\n if (vertical) {\n if (key === keys.up || key === keys.down) {\n event.preventDefault();\n proceed = true;\n };\n }\n else {\n if (key === keys.left || key === keys.right) {\n proceed = true;\n };\n };\n\n if (proceed) {\n switchTabOnArrowPress(event);\n };\n };\n\n // Either focus the next, previous, first, or last tab\n // depending on key pressed\n function switchTabOnArrowPress (event) {\n var pressed = event.keyCode;\n\n if (direction[pressed]) {\n var target = event.target;\n if (target.index !== undefined) {\n if (tabs[target.index + direction[pressed]]) {\n tabs[target.index + direction[pressed]].focus();\n }\n else if (pressed === keys.left || pressed === keys.up) {\n focusLastTab();\n }\n else if (pressed === keys.right || pressed == keys.down) {\n focusFirstTab();\n };\n };\n };\n };\n\n // Activates any given tab panel\n function activateTab (tab, setFocus?) {\n setFocus = setFocus || true;\n // Deactivate all other tabs\n deactivateTabs();\n\n // Remove tabindex attribute\n tab.removeAttribute('tabindex');\n\n // Set the tab as selected\n tab.setAttribute('aria-selected', 'true');\n\n // Get the value of aria-controls (which is an ID)\n var controls = tab.getAttribute('aria-controls');\n\n // Remove hidden attribute from tab panel to make it visible\n document.getElementById(controls).removeAttribute('hidden');\n\n // Set focus when required\n if (setFocus) {\n tab.focus();\n };\n };\n\n // Deactivate all tabs and tab panels\n function deactivateTabs () {\n for (var t = 0; t < tabs.length; t++) {\n tabs[t].setAttribute('tabindex', '-1');\n tabs[t].setAttribute('aria-selected', 'false');\n };\n\n for (var p = 0; p < panels.length; p++) {\n panels[p].setAttribute('hidden', 'hidden');\n };\n };\n\n // Make a guess\n function focusFirstTab () {\n tabs[0].focus();\n };\n\n // Make a guess\n function focusLastTab () {\n tabs[tabs.length - 1].focus();\n };\n\n // Detect if a tab is deletable\n function determineDeletable (event) {\n var target = event.target;\n\n if (target.getAttribute('data-deletable') !== null) {\n // Delete target tab\n deleteTab(event);\n\n // Update arrays related to tabs widget\n generateArrays();\n\n // Activate the closest tab to the one that was just deleted\n if (target.index - 1 < 0) {\n activateTab(tabs[0]);\n }\n else {\n activateTab(tabs[target.index - 1]);\n };\n };\n };\n\n // Deletes a tab and its panel\n function deleteTab(event) {\n var target = event.target;\n var panel = document.getElementById(target.getAttribute('aria-controls'));\n\n target.parentElement.removeChild(target);\n panel.parentElement.removeChild(panel);\n };\n }\n};","content-tabs {\n display: block;\n button[role=\"tab\"] {\n padding: 0;\n border: none;\n font: inherit;\n color: inherit;\n background-color: inherit;\n cursor: pointer; \n border-bottom: 1px solid transparent;\n &[aria-selected=\"true\"] {\n border-bottom: 1px solid black;\n }\n }\n}\n","import { Component, h, Element, Host, Prop, State } from '@stencil/core';\nimport W3Tabs from './libraries/w3_tabs';\nimport { ResponsiveString } from '../../typings';\nimport { WindowResizeService } from '../../services/window-resize-service';\n\n/**\n * @slot content - This slot will usually serve specific markup to ensure tabs are accessible.\n * @slot - Default slot, same as content slot.\n */\n@Component({\n tag: 'content-tabs',\n styleUrl: 'content-tabs.scss',\n shadow: false,\n})\nexport class ContentTabs {\n @Element() private element: HTMLElement;\n /**\n * @type String\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n classes: ResponsiveString;\n\n @State() classString: string;\n\n componentWillLoad() {\n WindowResizeService.registerProp(this.classes).subscribe(newValue => {\n this.classString = newValue as string;\n });\n }\n\n componentDidLoad() {\n new W3Tabs(this.element);\n }\n render() {\n return (\n <Host class={this.classString}>\n <slot name=\"content\"></slot>\n <slot></slot>\n </Host>\n );\n }\n}\n"],"mappings":"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","ignoreList":[]}
@@ -1,652 +0,0 @@
1
- function isFunction(value) {
2
- return typeof value === 'function';
3
- }
4
-
5
- function createErrorClass(createImpl) {
6
- const _super = (instance) => {
7
- Error.call(instance);
8
- instance.stack = new Error().stack;
9
- };
10
- const ctorFunc = createImpl(_super);
11
- ctorFunc.prototype = Object.create(Error.prototype);
12
- ctorFunc.prototype.constructor = ctorFunc;
13
- return ctorFunc;
14
- }
15
-
16
- const UnsubscriptionError = createErrorClass((_super) => function UnsubscriptionErrorImpl(errors) {
17
- _super(this);
18
- this.message = errors
19
- ? `${errors.length} errors occurred during unsubscription:
20
- ${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\n ')}`
21
- : '';
22
- this.name = 'UnsubscriptionError';
23
- this.errors = errors;
24
- });
25
-
26
- function arrRemove(arr, item) {
27
- if (arr) {
28
- const index = arr.indexOf(item);
29
- 0 <= index && arr.splice(index, 1);
30
- }
31
- }
32
-
33
- class Subscription {
34
- constructor(initialTeardown) {
35
- this.initialTeardown = initialTeardown;
36
- this.closed = false;
37
- this._parentage = null;
38
- this._finalizers = null;
39
- }
40
- unsubscribe() {
41
- let errors;
42
- if (!this.closed) {
43
- this.closed = true;
44
- const { _parentage } = this;
45
- if (_parentage) {
46
- this._parentage = null;
47
- if (Array.isArray(_parentage)) {
48
- for (const parent of _parentage) {
49
- parent.remove(this);
50
- }
51
- }
52
- else {
53
- _parentage.remove(this);
54
- }
55
- }
56
- const { initialTeardown: initialFinalizer } = this;
57
- if (isFunction(initialFinalizer)) {
58
- try {
59
- initialFinalizer();
60
- }
61
- catch (e) {
62
- errors = e instanceof UnsubscriptionError ? e.errors : [e];
63
- }
64
- }
65
- const { _finalizers } = this;
66
- if (_finalizers) {
67
- this._finalizers = null;
68
- for (const finalizer of _finalizers) {
69
- try {
70
- execFinalizer(finalizer);
71
- }
72
- catch (err) {
73
- errors = errors !== null && errors !== void 0 ? errors : [];
74
- if (err instanceof UnsubscriptionError) {
75
- errors = [...errors, ...err.errors];
76
- }
77
- else {
78
- errors.push(err);
79
- }
80
- }
81
- }
82
- }
83
- if (errors) {
84
- throw new UnsubscriptionError(errors);
85
- }
86
- }
87
- }
88
- add(teardown) {
89
- var _a;
90
- if (teardown && teardown !== this) {
91
- if (this.closed) {
92
- execFinalizer(teardown);
93
- }
94
- else {
95
- if (teardown instanceof Subscription) {
96
- if (teardown.closed || teardown._hasParent(this)) {
97
- return;
98
- }
99
- teardown._addParent(this);
100
- }
101
- (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);
102
- }
103
- }
104
- }
105
- _hasParent(parent) {
106
- const { _parentage } = this;
107
- return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));
108
- }
109
- _addParent(parent) {
110
- const { _parentage } = this;
111
- this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;
112
- }
113
- _removeParent(parent) {
114
- const { _parentage } = this;
115
- if (_parentage === parent) {
116
- this._parentage = null;
117
- }
118
- else if (Array.isArray(_parentage)) {
119
- arrRemove(_parentage, parent);
120
- }
121
- }
122
- remove(teardown) {
123
- const { _finalizers } = this;
124
- _finalizers && arrRemove(_finalizers, teardown);
125
- if (teardown instanceof Subscription) {
126
- teardown._removeParent(this);
127
- }
128
- }
129
- }
130
- Subscription.EMPTY = (() => {
131
- const empty = new Subscription();
132
- empty.closed = true;
133
- return empty;
134
- })();
135
- const EMPTY_SUBSCRIPTION = Subscription.EMPTY;
136
- function isSubscription(value) {
137
- return (value instanceof Subscription ||
138
- (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));
139
- }
140
- function execFinalizer(finalizer) {
141
- if (isFunction(finalizer)) {
142
- finalizer();
143
- }
144
- else {
145
- finalizer.unsubscribe();
146
- }
147
- }
148
-
149
- const config = {
150
- onUnhandledError: null,
151
- onStoppedNotification: null,
152
- Promise: undefined,
153
- useDeprecatedSynchronousErrorHandling: false,
154
- useDeprecatedNextContext: false,
155
- };
156
-
157
- const timeoutProvider = {
158
- setTimeout(handler, timeout, ...args) {
159
- const { delegate } = timeoutProvider;
160
- if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {
161
- return delegate.setTimeout(handler, timeout, ...args);
162
- }
163
- return setTimeout(handler, timeout, ...args);
164
- },
165
- clearTimeout(handle) {
166
- const { delegate } = timeoutProvider;
167
- return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);
168
- },
169
- delegate: undefined,
170
- };
171
-
172
- function reportUnhandledError(err) {
173
- timeoutProvider.setTimeout(() => {
174
- const { onUnhandledError } = config;
175
- if (onUnhandledError) {
176
- onUnhandledError(err);
177
- }
178
- else {
179
- throw err;
180
- }
181
- });
182
- }
183
-
184
- function noop() { }
185
-
186
- const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined))();
187
- function errorNotification(error) {
188
- return createNotification('E', undefined, error);
189
- }
190
- function nextNotification(value) {
191
- return createNotification('N', value, undefined);
192
- }
193
- function createNotification(kind, value, error) {
194
- return {
195
- kind,
196
- value,
197
- error,
198
- };
199
- }
200
-
201
- let context = null;
202
- function errorContext(cb) {
203
- if (config.useDeprecatedSynchronousErrorHandling) {
204
- const isRoot = !context;
205
- if (isRoot) {
206
- context = { errorThrown: false, error: null };
207
- }
208
- cb();
209
- if (isRoot) {
210
- const { errorThrown, error } = context;
211
- context = null;
212
- if (errorThrown) {
213
- throw error;
214
- }
215
- }
216
- }
217
- else {
218
- cb();
219
- }
220
- }
221
-
222
- class Subscriber extends Subscription {
223
- constructor(destination) {
224
- super();
225
- this.isStopped = false;
226
- if (destination) {
227
- this.destination = destination;
228
- if (isSubscription(destination)) {
229
- destination.add(this);
230
- }
231
- }
232
- else {
233
- this.destination = EMPTY_OBSERVER;
234
- }
235
- }
236
- static create(next, error, complete) {
237
- return new SafeSubscriber(next, error, complete);
238
- }
239
- next(value) {
240
- if (this.isStopped) {
241
- handleStoppedNotification(nextNotification(value), this);
242
- }
243
- else {
244
- this._next(value);
245
- }
246
- }
247
- error(err) {
248
- if (this.isStopped) {
249
- handleStoppedNotification(errorNotification(err), this);
250
- }
251
- else {
252
- this.isStopped = true;
253
- this._error(err);
254
- }
255
- }
256
- complete() {
257
- if (this.isStopped) {
258
- handleStoppedNotification(COMPLETE_NOTIFICATION, this);
259
- }
260
- else {
261
- this.isStopped = true;
262
- this._complete();
263
- }
264
- }
265
- unsubscribe() {
266
- if (!this.closed) {
267
- this.isStopped = true;
268
- super.unsubscribe();
269
- this.destination = null;
270
- }
271
- }
272
- _next(value) {
273
- this.destination.next(value);
274
- }
275
- _error(err) {
276
- try {
277
- this.destination.error(err);
278
- }
279
- finally {
280
- this.unsubscribe();
281
- }
282
- }
283
- _complete() {
284
- try {
285
- this.destination.complete();
286
- }
287
- finally {
288
- this.unsubscribe();
289
- }
290
- }
291
- }
292
- const _bind = Function.prototype.bind;
293
- function bind(fn, thisArg) {
294
- return _bind.call(fn, thisArg);
295
- }
296
- class ConsumerObserver {
297
- constructor(partialObserver) {
298
- this.partialObserver = partialObserver;
299
- }
300
- next(value) {
301
- const { partialObserver } = this;
302
- if (partialObserver.next) {
303
- try {
304
- partialObserver.next(value);
305
- }
306
- catch (error) {
307
- handleUnhandledError(error);
308
- }
309
- }
310
- }
311
- error(err) {
312
- const { partialObserver } = this;
313
- if (partialObserver.error) {
314
- try {
315
- partialObserver.error(err);
316
- }
317
- catch (error) {
318
- handleUnhandledError(error);
319
- }
320
- }
321
- else {
322
- handleUnhandledError(err);
323
- }
324
- }
325
- complete() {
326
- const { partialObserver } = this;
327
- if (partialObserver.complete) {
328
- try {
329
- partialObserver.complete();
330
- }
331
- catch (error) {
332
- handleUnhandledError(error);
333
- }
334
- }
335
- }
336
- }
337
- class SafeSubscriber extends Subscriber {
338
- constructor(observerOrNext, error, complete) {
339
- super();
340
- let partialObserver;
341
- if (isFunction(observerOrNext) || !observerOrNext) {
342
- partialObserver = {
343
- next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined),
344
- error: error !== null && error !== void 0 ? error : undefined,
345
- complete: complete !== null && complete !== void 0 ? complete : undefined,
346
- };
347
- }
348
- else {
349
- let context;
350
- if (this && config.useDeprecatedNextContext) {
351
- context = Object.create(observerOrNext);
352
- context.unsubscribe = () => this.unsubscribe();
353
- partialObserver = {
354
- next: observerOrNext.next && bind(observerOrNext.next, context),
355
- error: observerOrNext.error && bind(observerOrNext.error, context),
356
- complete: observerOrNext.complete && bind(observerOrNext.complete, context),
357
- };
358
- }
359
- else {
360
- partialObserver = observerOrNext;
361
- }
362
- }
363
- this.destination = new ConsumerObserver(partialObserver);
364
- }
365
- }
366
- function handleUnhandledError(error) {
367
- {
368
- reportUnhandledError(error);
369
- }
370
- }
371
- function defaultErrorHandler(err) {
372
- throw err;
373
- }
374
- function handleStoppedNotification(notification, subscriber) {
375
- const { onStoppedNotification } = config;
376
- onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber));
377
- }
378
- const EMPTY_OBSERVER = {
379
- closed: true,
380
- next: noop,
381
- error: defaultErrorHandler,
382
- complete: noop,
383
- };
384
-
385
- const observable = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')();
386
-
387
- function identity(x) {
388
- return x;
389
- }
390
-
391
- function pipeFromArray(fns) {
392
- if (fns.length === 0) {
393
- return identity;
394
- }
395
- if (fns.length === 1) {
396
- return fns[0];
397
- }
398
- return function piped(input) {
399
- return fns.reduce((prev, fn) => fn(prev), input);
400
- };
401
- }
402
-
403
- class Observable {
404
- constructor(subscribe) {
405
- if (subscribe) {
406
- this._subscribe = subscribe;
407
- }
408
- }
409
- lift(operator) {
410
- const observable = new Observable();
411
- observable.source = this;
412
- observable.operator = operator;
413
- return observable;
414
- }
415
- subscribe(observerOrNext, error, complete) {
416
- const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);
417
- errorContext(() => {
418
- const { operator, source } = this;
419
- subscriber.add(operator
420
- ?
421
- operator.call(subscriber, source)
422
- : source
423
- ?
424
- this._subscribe(subscriber)
425
- :
426
- this._trySubscribe(subscriber));
427
- });
428
- return subscriber;
429
- }
430
- _trySubscribe(sink) {
431
- try {
432
- return this._subscribe(sink);
433
- }
434
- catch (err) {
435
- sink.error(err);
436
- }
437
- }
438
- forEach(next, promiseCtor) {
439
- promiseCtor = getPromiseCtor(promiseCtor);
440
- return new promiseCtor((resolve, reject) => {
441
- const subscriber = new SafeSubscriber({
442
- next: (value) => {
443
- try {
444
- next(value);
445
- }
446
- catch (err) {
447
- reject(err);
448
- subscriber.unsubscribe();
449
- }
450
- },
451
- error: reject,
452
- complete: resolve,
453
- });
454
- this.subscribe(subscriber);
455
- });
456
- }
457
- _subscribe(subscriber) {
458
- var _a;
459
- return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);
460
- }
461
- [observable]() {
462
- return this;
463
- }
464
- pipe(...operations) {
465
- return pipeFromArray(operations)(this);
466
- }
467
- toPromise(promiseCtor) {
468
- promiseCtor = getPromiseCtor(promiseCtor);
469
- return new promiseCtor((resolve, reject) => {
470
- let value;
471
- this.subscribe((x) => (value = x), (err) => reject(err), () => resolve(value));
472
- });
473
- }
474
- }
475
- Observable.create = (subscribe) => {
476
- return new Observable(subscribe);
477
- };
478
- function getPromiseCtor(promiseCtor) {
479
- var _a;
480
- return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;
481
- }
482
- function isObserver(value) {
483
- return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);
484
- }
485
- function isSubscriber(value) {
486
- return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));
487
- }
488
-
489
- const ObjectUnsubscribedError = createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() {
490
- _super(this);
491
- this.name = 'ObjectUnsubscribedError';
492
- this.message = 'object unsubscribed';
493
- });
494
-
495
- class Subject extends Observable {
496
- constructor() {
497
- super();
498
- this.closed = false;
499
- this.currentObservers = null;
500
- this.observers = [];
501
- this.isStopped = false;
502
- this.hasError = false;
503
- this.thrownError = null;
504
- }
505
- lift(operator) {
506
- const subject = new AnonymousSubject(this, this);
507
- subject.operator = operator;
508
- return subject;
509
- }
510
- _throwIfClosed() {
511
- if (this.closed) {
512
- throw new ObjectUnsubscribedError();
513
- }
514
- }
515
- next(value) {
516
- errorContext(() => {
517
- this._throwIfClosed();
518
- if (!this.isStopped) {
519
- if (!this.currentObservers) {
520
- this.currentObservers = Array.from(this.observers);
521
- }
522
- for (const observer of this.currentObservers) {
523
- observer.next(value);
524
- }
525
- }
526
- });
527
- }
528
- error(err) {
529
- errorContext(() => {
530
- this._throwIfClosed();
531
- if (!this.isStopped) {
532
- this.hasError = this.isStopped = true;
533
- this.thrownError = err;
534
- const { observers } = this;
535
- while (observers.length) {
536
- observers.shift().error(err);
537
- }
538
- }
539
- });
540
- }
541
- complete() {
542
- errorContext(() => {
543
- this._throwIfClosed();
544
- if (!this.isStopped) {
545
- this.isStopped = true;
546
- const { observers } = this;
547
- while (observers.length) {
548
- observers.shift().complete();
549
- }
550
- }
551
- });
552
- }
553
- unsubscribe() {
554
- this.isStopped = this.closed = true;
555
- this.observers = this.currentObservers = null;
556
- }
557
- get observed() {
558
- var _a;
559
- return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;
560
- }
561
- _trySubscribe(subscriber) {
562
- this._throwIfClosed();
563
- return super._trySubscribe(subscriber);
564
- }
565
- _subscribe(subscriber) {
566
- this._throwIfClosed();
567
- this._checkFinalizedStatuses(subscriber);
568
- return this._innerSubscribe(subscriber);
569
- }
570
- _innerSubscribe(subscriber) {
571
- const { hasError, isStopped, observers } = this;
572
- if (hasError || isStopped) {
573
- return EMPTY_SUBSCRIPTION;
574
- }
575
- this.currentObservers = null;
576
- observers.push(subscriber);
577
- return new Subscription(() => {
578
- this.currentObservers = null;
579
- arrRemove(observers, subscriber);
580
- });
581
- }
582
- _checkFinalizedStatuses(subscriber) {
583
- const { hasError, thrownError, isStopped } = this;
584
- if (hasError) {
585
- subscriber.error(thrownError);
586
- }
587
- else if (isStopped) {
588
- subscriber.complete();
589
- }
590
- }
591
- asObservable() {
592
- const observable = new Observable();
593
- observable.source = this;
594
- return observable;
595
- }
596
- }
597
- Subject.create = (destination, source) => {
598
- return new AnonymousSubject(destination, source);
599
- };
600
- class AnonymousSubject extends Subject {
601
- constructor(destination, source) {
602
- super();
603
- this.destination = destination;
604
- this.source = source;
605
- }
606
- next(value) {
607
- var _a, _b;
608
- (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);
609
- }
610
- error(err) {
611
- var _a, _b;
612
- (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);
613
- }
614
- complete() {
615
- var _a, _b;
616
- (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);
617
- }
618
- _subscribe(subscriber) {
619
- var _a, _b;
620
- return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;
621
- }
622
- }
623
-
624
- class BehaviorSubject extends Subject {
625
- constructor(_value) {
626
- super();
627
- this._value = _value;
628
- }
629
- get value() {
630
- return this.getValue();
631
- }
632
- _subscribe(subscriber) {
633
- const subscription = super._subscribe(subscriber);
634
- !subscription.closed && subscriber.next(this._value);
635
- return subscription;
636
- }
637
- getValue() {
638
- const { hasError, thrownError, _value } = this;
639
- if (hasError) {
640
- throw thrownError;
641
- }
642
- this._throwIfClosed();
643
- return _value;
644
- }
645
- next(value) {
646
- super.next((this._value = value));
647
- }
648
- }
649
-
650
- export { BehaviorSubject as B, Observable as O };
651
-
652
- //# sourceMappingURL=BehaviorSubject-f7a12fd8.js.map