@mozaic-ds/web-components 0.11.0 → 0.12.0-beta.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 (357) hide show
  1. package/README.md +2 -1
  2. package/package.json +5 -5
  3. package/public/ClickOutside-63071e7a.js +15 -1
  4. package/public/ClickOutside-63071e7a.js.map +1 -1
  5. package/public/DataTableDefaultAction.nested-46712849.js +762 -0
  6. package/public/DataTableDefaultAction.nested-46712849.js.map +1 -0
  7. package/public/DataTableUtilities-313a448d.js +386 -0
  8. package/public/DataTableUtilities-313a448d.js.map +1 -0
  9. package/public/EventForward-8492ff62.js +109 -1
  10. package/public/EventForward-8492ff62.js.map +1 -1
  11. package/public/EventHandler-02058705.js +15 -1
  12. package/public/EventHandler-02058705.js.map +1 -1
  13. package/public/adeo/components/autocomplete/Autocomplete.js +1 -1
  14. package/public/adeo/components/autocomplete/Autocomplete.js.map +1 -1
  15. package/public/adeo/components/autocomplete/Autocomplete.svelte +7 -5
  16. package/public/adeo/components/header/Header.js +1 -1
  17. package/public/adeo/components/header/Header.js.map +1 -1
  18. package/public/adeo/components/pagination/Pagination.js +1 -1
  19. package/public/adeo/components/pagination/Pagination.js.map +1 -1
  20. package/public/adeo/components/pagination/Pagination.svelte +5 -4
  21. package/public/adeo/components/sidebar/sidebar-feature-group.nested.js +1 -1
  22. package/public/adeo/components/sidebar/sidebar-feature-group.nested.js.map +1 -1
  23. package/public/adeo/components/sidebar/sidebar-segment.nested.js +1 -1
  24. package/public/adeo/components/sidebar/sidebar-segment.nested.js.map +1 -1
  25. package/public/adeo/components/sidebar-feature-group/sidebar-feature-group.nested.svelte +1 -1
  26. package/public/adeo/components/sidebar-segment/sidebar-segment.nested.svelte +1 -1
  27. package/public/array-5b770a93.js +13 -1
  28. package/public/array-5b770a93.js.map +1 -1
  29. package/public/axis-fbc0f7b5.js +174 -1
  30. package/public/axis-fbc0f7b5.js.map +1 -1
  31. package/public/band-d7a07d2c.js +186 -1
  32. package/public/band-d7a07d2c.js.map +1 -1
  33. package/public/bricoman/components/autocomplete/Autocomplete.js +1 -1
  34. package/public/bricoman/components/autocomplete/Autocomplete.js.map +1 -1
  35. package/public/bricoman/components/autocomplete/Autocomplete.svelte +7 -5
  36. package/public/bricoman/components/header/Header.js +1 -1
  37. package/public/bricoman/components/header/Header.js.map +1 -1
  38. package/public/bricoman/components/pagination/Pagination.js +1 -1
  39. package/public/bricoman/components/pagination/Pagination.js.map +1 -1
  40. package/public/bricoman/components/pagination/Pagination.svelte +5 -4
  41. package/public/bricoman/components/sidebar/sidebar-feature-group.nested.js +1 -1
  42. package/public/bricoman/components/sidebar/sidebar-feature-group.nested.js.map +1 -1
  43. package/public/bricoman/components/sidebar/sidebar-segment.nested.js +1 -1
  44. package/public/bricoman/components/sidebar/sidebar-segment.nested.js.map +1 -1
  45. package/public/bricoman/components/sidebar-feature-group/sidebar-feature-group.nested.svelte +1 -1
  46. package/public/bricoman/components/sidebar-segment/sidebar-segment.nested.svelte +1 -1
  47. package/public/bundle.js +56 -60
  48. package/public/components/accordion/Accordion.js +365 -1
  49. package/public/components/accordion/Accordion.js.map +1 -1
  50. package/public/components/autocomplete/Autocomplete.js +1515 -1
  51. package/public/components/autocomplete/Autocomplete.js.map +1 -1
  52. package/public/components/autocomplete/Autocomplete.svelte +15 -34
  53. package/public/components/badge/Badge.js +155 -1
  54. package/public/components/badge/Badge.js.map +1 -1
  55. package/public/components/badge/Badge.nested.js +101 -1
  56. package/public/components/badge/Badge.nested.js.map +1 -1
  57. package/public/components/breadcrumb/Breadcrumb.js +372 -1
  58. package/public/components/breadcrumb/Breadcrumb.js.map +1 -1
  59. package/public/components/breadcrumb/Breadcrumb.nested.js +319 -1
  60. package/public/components/breadcrumb/Breadcrumb.nested.js.map +1 -1
  61. package/public/components/button/Button.js +1141 -1
  62. package/public/components/button/Button.js.map +1 -1
  63. package/public/components/button/Button.nested.js +1005 -0
  64. package/public/components/button/Button.nested.js.map +1 -0
  65. package/public/components/button/Button.nested.svelte +173 -0
  66. package/public/components/button/Button.svelte +2 -2
  67. package/public/components/card/Card.js +369 -1
  68. package/public/components/card/Card.js.map +1 -1
  69. package/public/components/carousel/Carousel.js +710 -0
  70. package/public/components/carousel/Carousel.js.map +1 -0
  71. package/public/components/carousel/Carousel.svelte +408 -0
  72. package/public/components/carousel/CarouselCard.nested.js +140 -0
  73. package/public/components/carousel/CarouselCard.nested.js.map +1 -0
  74. package/public/components/carousel/carousel.types.d.ts +20 -0
  75. package/public/components/carousel/carousel.types.d.ts.map +1 -0
  76. package/public/components/carouselcard/CarouselCard.nested.svelte +54 -0
  77. package/public/components/chart/BarChart.js +583 -1
  78. package/public/components/chart/BarChart.js.map +1 -1
  79. package/public/components/chart/Donut.js +1189 -1
  80. package/public/components/chart/Donut.js.map +1 -1
  81. package/public/components/chart/GroupedBarChart.js +750 -1
  82. package/public/components/chart/GroupedBarChart.js.map +1 -1
  83. package/public/components/chart/LineChart.js +1731 -1
  84. package/public/components/chart/LineChart.js.map +1 -1
  85. package/public/components/chart/Radar.js +729 -1
  86. package/public/components/chart/Radar.js.map +1 -1
  87. package/public/components/chart/StackedBarChart.js +745 -1
  88. package/public/components/chart/StackedBarChart.js.map +1 -1
  89. package/public/components/checkbox/Checkbox.js +307 -1
  90. package/public/components/checkbox/Checkbox.js.map +1 -1
  91. package/public/components/checkboxgroup/checkboxGroup.js +404 -1
  92. package/public/components/checkboxgroup/checkboxGroup.js.map +1 -1
  93. package/public/components/checkboxgroup/checkboxgroup.types.d.ts.map +1 -1
  94. package/public/components/datatable/DataTable.js +3098 -1
  95. package/public/components/datatable/DataTable.js.map +1 -1
  96. package/public/components/datatable/DataTable.svelte +19 -44
  97. package/public/components/datatable/DataTableDefaultAction.nested.js +4 -1
  98. package/public/components/datatable/DataTableDefaultAction.nested.js.map +1 -1
  99. package/public/components/datatable/DataTableDefaultEdtion.nested.js +164 -1
  100. package/public/components/datatable/DataTableDefaultEdtion.nested.js.map +1 -1
  101. package/public/components/datatable/DataTableDefaultFilterTags.nested.js +380 -1
  102. package/public/components/datatable/DataTableDefaultFilterTags.nested.js.map +1 -1
  103. package/public/components/datatable/DataTableDefaultSelection.nested.js +424 -1
  104. package/public/components/datatable/DataTableDefaultSelection.nested.js.map +1 -1
  105. package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js +263 -1
  106. package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js.map +1 -1
  107. package/public/components/datatable/DataTableFooter.nested.js +637 -1
  108. package/public/components/datatable/DataTableFooter.nested.js.map +1 -1
  109. package/public/components/datatable/data.d.ts.map +1 -1
  110. package/public/components/datatable/datatable.types.d.ts +2 -16
  111. package/public/components/datatable/datatable.types.d.ts.map +1 -1
  112. package/public/components/datatabledefaultaction/DataTableDefaultAction.nested.svelte +0 -18
  113. package/public/components/dropdown/Dropdown.js +1426 -1
  114. package/public/components/dropdown/Dropdown.js.map +1 -1
  115. package/public/components/field/Field.js +375 -1
  116. package/public/components/field/Field.js.map +1 -1
  117. package/public/components/fileuploader/FileUploader.js +603 -1
  118. package/public/components/fileuploader/FileUploader.js.map +1 -1
  119. package/public/components/fileuploader/ResultFile.nested.js +344 -1
  120. package/public/components/fileuploader/ResultFile.nested.js.map +1 -1
  121. package/public/components/flag/Flag.js +174 -1
  122. package/public/components/flag/Flag.js.map +1 -1
  123. package/public/components/header/Header.js +918 -1
  124. package/public/components/header/Header.js.map +1 -1
  125. package/public/components/header/Header.types.d.ts.map +1 -1
  126. package/public/components/hero/Hero.js +271 -1
  127. package/public/components/hero/Hero.js.map +1 -1
  128. package/public/components/kpi/Kpi.js +404 -1
  129. package/public/components/kpi/Kpi.js.map +1 -1
  130. package/public/components/layer/Layer.js +471 -1
  131. package/public/components/layer/Layer.js.map +1 -1
  132. package/public/components/link/Link.js +380 -1
  133. package/public/components/link/Link.js.map +1 -1
  134. package/public/components/link/Link.nested.js +285 -0
  135. package/public/components/link/Link.nested.js.map +1 -0
  136. package/public/components/link/Link.nested.svelte +78 -0
  137. package/public/components/listbox/Listbox.js +595 -1
  138. package/public/components/listbox/Listbox.js.map +1 -1
  139. package/public/components/listbox/Listbox.nested.js +629 -1
  140. package/public/components/listbox/Listbox.nested.js.map +1 -1
  141. package/public/components/loader/Loader.js +246 -1
  142. package/public/components/loader/Loader.js.map +1 -1
  143. package/public/components/loader/Loader.nested.js +176 -1
  144. package/public/components/loader/Loader.nested.js.map +1 -1
  145. package/public/components/modal/Modal.js +395 -1
  146. package/public/components/modal/Modal.js.map +1 -1
  147. package/public/components/notification/Notification.js +458 -1
  148. package/public/components/notification/Notification.js.map +1 -1
  149. package/public/components/optionbutton/OptionButton.js +316 -1
  150. package/public/components/optionbutton/OptionButton.js.map +1 -1
  151. package/public/components/overlay/Overlay.js +104 -1
  152. package/public/components/overlay/Overlay.js.map +1 -1
  153. package/public/components/overlay/OverlayLoader.js +151 -1
  154. package/public/components/overlay/OverlayLoader.js.map +1 -1
  155. package/public/components/pagination/Pagination.js +613 -1
  156. package/public/components/pagination/Pagination.js.map +1 -1
  157. package/public/components/passwordinput/PasswordInput.js +291 -1
  158. package/public/components/passwordinput/PasswordInput.js.map +1 -1
  159. package/public/components/phonenumber/PhoneNumber.js +6894 -1
  160. package/public/components/phonenumber/PhoneNumber.js.map +1 -1
  161. package/public/components/phonenumber/PhoneNumber.svelte +1 -1
  162. package/public/components/price/Price.js +768 -1
  163. package/public/components/price/Price.js.map +1 -1
  164. package/public/components/progressbar/ProgressBar.js +278 -1
  165. package/public/components/progressbar/ProgressBar.js.map +1 -1
  166. package/public/components/quantityselector/QuantitySelector.js +397 -1
  167. package/public/components/quantityselector/QuantitySelector.js.map +1 -1
  168. package/public/components/radio/Radio.js +273 -1
  169. package/public/components/radio/Radio.js.map +1 -1
  170. package/public/components/radiogroup/RadioGroup.js +414 -1
  171. package/public/components/radiogroup/RadioGroup.js.map +1 -1
  172. package/public/components/radiogroup/radioGroup.types.d.ts.map +1 -1
  173. package/public/components/ratings/StarsInput.js +292 -1
  174. package/public/components/ratings/StarsInput.js.map +1 -1
  175. package/public/components/ratings/StarsResult.js +246 -1
  176. package/public/components/ratings/StarsResult.js.map +1 -1
  177. package/public/components/select/Select.js +451 -1
  178. package/public/components/select/Select.js.map +1 -1
  179. package/public/components/sidebar/Sidebar.js +784 -1
  180. package/public/components/sidebar/Sidebar.js.map +1 -1
  181. package/public/components/sidebar/sidebar-feature-group.nested.js +592 -1
  182. package/public/components/sidebar/sidebar-feature-group.nested.js.map +1 -1
  183. package/public/components/sidebar/sidebar-feature.nested.js +402 -1
  184. package/public/components/sidebar/sidebar-feature.nested.js.map +1 -1
  185. package/public/components/sidebar/sidebar-section.nested.js +394 -1
  186. package/public/components/sidebar/sidebar-section.nested.js.map +1 -1
  187. package/public/components/sidebar/sidebar-segment.nested.js +198 -1
  188. package/public/components/sidebar/sidebar-segment.nested.js.map +1 -1
  189. package/public/components/sidebar/sidebar-separator.nested.js +49 -1
  190. package/public/components/sidebar/sidebar-separator.nested.js.map +1 -1
  191. package/public/components/sidebar/sidebar-service.d.ts.map +1 -1
  192. package/public/components/sidebar/sidebar-sub-features.nested.js +312 -1
  193. package/public/components/sidebar/sidebar-sub-features.nested.js.map +1 -1
  194. package/public/components/sidebar/sidebar-user.nested.js +733 -1
  195. package/public/components/sidebar/sidebar-user.nested.js.map +1 -1
  196. package/public/components/sidebar/sidebar.types.d.ts.map +1 -1
  197. package/public/components/sidebar-user/sidebar-user.nested.svelte +0 -1
  198. package/public/components/starsinput/StarsInput.svelte +2 -9
  199. package/public/components/stepper/Stepper.js +371 -1
  200. package/public/components/stepper/Stepper.js.map +1 -1
  201. package/public/components/tabs/Tabs.js +615 -1
  202. package/public/components/tabs/Tabs.js.map +1 -1
  203. package/public/components/tabs/Tabs.nested.js +472 -1
  204. package/public/components/tabs/Tabs.nested.js.map +1 -1
  205. package/public/components/tag/Tag.js +665 -1
  206. package/public/components/tag/Tag.js.map +1 -1
  207. package/public/components/tag/Tag.nested.js +554 -1
  208. package/public/components/tag/Tag.nested.js.map +1 -1
  209. package/public/components/tag/Tag.nested.svelte +5 -5
  210. package/public/components/tag/Tag.svelte +5 -5
  211. package/public/components/taglist/TagList.js +475 -1
  212. package/public/components/taglist/TagList.js.map +1 -1
  213. package/public/components/textarea/Textarea.js +303 -1
  214. package/public/components/textarea/Textarea.js.map +1 -1
  215. package/public/components/textinput/Textinput.js +497 -1
  216. package/public/components/textinput/Textinput.js.map +1 -1
  217. package/public/components/textinput/Textinput.nested.js +320 -1
  218. package/public/components/textinput/Textinput.nested.js.map +1 -1
  219. package/public/components/toggle/Toggle.js +278 -1
  220. package/public/components/toggle/Toggle.js.map +1 -1
  221. package/public/components/tooltip/Tooltip.js +173 -1
  222. package/public/components/tooltip/Tooltip.js.map +1 -1
  223. package/public/icons/Billzloty24.js +2 -0
  224. package/public/icons/Billzloty24.js.map +1 -0
  225. package/public/icons/Billzloty32.js +2 -0
  226. package/public/icons/Billzloty32.js.map +1 -0
  227. package/public/icons/Billzloty48.js +2 -0
  228. package/public/icons/Billzloty48.js.map +1 -0
  229. package/public/icons/Billzloty64.js +2 -0
  230. package/public/icons/Billzloty64.js.map +1 -0
  231. package/public/icons/CardFundingzloty24.js +2 -0
  232. package/public/icons/CardFundingzloty24.js.map +1 -0
  233. package/public/icons/CardFundingzloty32.js +2 -0
  234. package/public/icons/CardFundingzloty32.js.map +1 -0
  235. package/public/icons/CardFundingzloty48.js +2 -0
  236. package/public/icons/CardFundingzloty48.js.map +1 -0
  237. package/public/icons/CardFundingzloty64.js +2 -0
  238. package/public/icons/CardFundingzloty64.js.map +1 -0
  239. package/public/icons/Fundingzloty24.js +2 -0
  240. package/public/icons/Fundingzloty24.js.map +1 -0
  241. package/public/icons/Fundingzloty32.js +2 -0
  242. package/public/icons/Fundingzloty32.js.map +1 -0
  243. package/public/icons/Fundingzloty48.js +2 -0
  244. package/public/icons/Fundingzloty48.js.map +1 -0
  245. package/public/icons/Fundingzloty64.js +2 -0
  246. package/public/icons/Fundingzloty64.js.map +1 -0
  247. package/public/icons/MonochromeStoreLocationbm24.js +2 -0
  248. package/public/icons/MonochromeStoreLocationbm24.js.map +1 -0
  249. package/public/icons/MonochromeStoreLocationbm32.js +2 -0
  250. package/public/icons/MonochromeStoreLocationbm32.js.map +1 -0
  251. package/public/icons/MonochromeStoreLocationbm48.js +2 -0
  252. package/public/icons/MonochromeStoreLocationbm48.js.map +1 -0
  253. package/public/icons/MonochromeStoreLocationbm64.js +2 -0
  254. package/public/icons/MonochromeStoreLocationbm64.js.map +1 -0
  255. package/public/icons/PaymentMonochromeBonificoBancario24.js +2 -0
  256. package/public/icons/PaymentMonochromeBonificoBancario24.js.map +1 -0
  257. package/public/icons/PaymentMonochromeBonificoBancario32.js +2 -0
  258. package/public/icons/PaymentMonochromeBonificoBancario32.js.map +1 -0
  259. package/public/icons/PaymentMonochromeBonificoBancario48.js +2 -0
  260. package/public/icons/PaymentMonochromeBonificoBancario48.js.map +1 -0
  261. package/public/icons/PaymentMonochromeBonificoBancario64.js +2 -0
  262. package/public/icons/PaymentMonochromeBonificoBancario64.js.map +1 -0
  263. package/public/icons/Receiptzloty24.js +2 -0
  264. package/public/icons/Receiptzloty24.js.map +1 -0
  265. package/public/icons/Receiptzloty32.js +2 -0
  266. package/public/icons/Receiptzloty32.js.map +1 -0
  267. package/public/icons/Receiptzloty48.js +2 -0
  268. package/public/icons/Receiptzloty48.js.map +1 -0
  269. package/public/icons/Receiptzloty64.js +2 -0
  270. package/public/icons/Receiptzloty64.js.map +1 -0
  271. package/public/icons/Renewableenergy24.js +2 -0
  272. package/public/icons/Renewableenergy24.js.map +1 -0
  273. package/public/icons/Renewableenergy32.js +2 -0
  274. package/public/icons/Renewableenergy32.js.map +1 -0
  275. package/public/icons/Renewableenergy48.js +2 -0
  276. package/public/icons/Renewableenergy48.js.map +1 -0
  277. package/public/icons/Renewableenergy64.js +2 -0
  278. package/public/icons/Renewableenergy64.js.map +1 -0
  279. package/public/icons/StoreBM24.js +2 -0
  280. package/public/icons/StoreBM24.js.map +1 -0
  281. package/public/icons/StoreBM32.js +2 -0
  282. package/public/icons/StoreBM32.js.map +1 -0
  283. package/public/icons/StoreBM48.js +2 -0
  284. package/public/icons/StoreBM48.js.map +1 -0
  285. package/public/icons/StoreBM64.js +2 -0
  286. package/public/icons/StoreBM64.js.map +1 -0
  287. package/public/icons/Wood24.js +2 -0
  288. package/public/icons/Wood24.js.map +1 -0
  289. package/public/icons/Wood32.js +2 -0
  290. package/public/icons/Wood32.js.map +1 -0
  291. package/public/icons/Wood48.js +2 -0
  292. package/public/icons/Wood48.js.map +1 -0
  293. package/public/icons/Wood64.js +2 -0
  294. package/public/icons/Wood64.js.map +1 -0
  295. package/public/icons/Woodflooring24.js +2 -0
  296. package/public/icons/Woodflooring24.js.map +1 -0
  297. package/public/icons/Woodflooring32.js +2 -0
  298. package/public/icons/Woodflooring32.js.map +1 -0
  299. package/public/icons/Woodflooring48.js +2 -0
  300. package/public/icons/Woodflooring48.js.map +1 -0
  301. package/public/icons/Woodflooring64.js +2 -0
  302. package/public/icons/Woodflooring64.js.map +1 -0
  303. package/public/icons/Woodflooringalt24.js +2 -0
  304. package/public/icons/Woodflooringalt24.js.map +1 -0
  305. package/public/icons/Woodflooringalt32.js +2 -0
  306. package/public/icons/Woodflooringalt32.js.map +1 -0
  307. package/public/icons/Woodflooringalt48.js +2 -0
  308. package/public/icons/Woodflooringalt48.js.map +1 -0
  309. package/public/icons/Woodflooringalt64.js +2 -0
  310. package/public/icons/Woodflooringalt64.js.map +1 -0
  311. package/public/icons/Zloty24.js +2 -0
  312. package/public/icons/Zloty24.js.map +1 -0
  313. package/public/icons/Zloty32.js +2 -0
  314. package/public/icons/Zloty32.js.map +1 -0
  315. package/public/icons/Zloty48.js +2 -0
  316. package/public/icons/Zloty48.js.map +1 -0
  317. package/public/icons/Zloty64.js +2 -0
  318. package/public/icons/Zloty64.js.map +1 -0
  319. package/public/icons.js +888 -696
  320. package/public/index-c33b3772.js +873 -1
  321. package/public/index-c33b3772.js.map +1 -1
  322. package/public/linear-f46d7e9e.js +700 -1
  323. package/public/linear-f46d7e9e.js.map +1 -1
  324. package/public/main.d.ts +1 -0
  325. package/public/main.d.ts.map +1 -1
  326. package/public/path-1b5da959.js +186 -1
  327. package/public/path-1b5da959.js.map +1 -1
  328. package/public/sidebar-service-275bf9ef.js +129 -1
  329. package/public/sidebar-service-275bf9ef.js.map +1 -1
  330. package/public/sidebar-service-589b271b.js +125 -0
  331. package/public/sidebar-service-589b271b.js.map +1 -0
  332. package/public/stories/carousel/items.d.ts +3 -0
  333. package/public/stories/carousel/items.d.ts.map +1 -0
  334. package/public/symbol-b05a6e2b.js +169 -1
  335. package/public/symbol-b05a6e2b.js.map +1 -1
  336. package/public/transform-15d69d5d.js +2743 -1
  337. package/public/transform-15d69d5d.js.map +1 -1
  338. package/public/utilities/DataTableUtilities.d.ts.map +1 -1
  339. package/public/utilities/DataTableUtilities.ts +0 -12
  340. package/public/utilities/EventForward.js +136 -1
  341. package/public/utilities/EventForward.js.map +1 -1
  342. package/public/utilities/EventHandler.js +36 -1
  343. package/public/utilities/EventHandler.js.map +1 -1
  344. package/public/utilities/components/carousel/carousel.types.d.ts +20 -0
  345. package/public/utilities/components/carousel/carousel.types.d.ts.map +1 -0
  346. package/public/utilities/components/datatable/data.d.ts.map +1 -1
  347. package/public/utilities/components/datatable/datatable.types.d.ts +2 -16
  348. package/public/utilities/components/datatable/datatable.types.d.ts.map +1 -1
  349. package/public/utilities/main.d.ts +1 -0
  350. package/public/utilities/main.d.ts.map +1 -1
  351. package/public/utilities/stories/carousel/Carousel.stories.d.ts +8 -0
  352. package/public/utilities/stories/carousel/Carousel.stories.d.ts.map +1 -0
  353. package/public/utilities/stories/carousel/items.d.ts +3 -0
  354. package/public/utilities/stories/carousel/items.d.ts.map +1 -0
  355. package/public/utilities/stories/datatable/DataTable.stories.d.ts.map +1 -1
  356. package/public/utilities/stories/ratings/StarsResult.stories.d.ts.map +1 -1
  357. package/public/utilities/utilities/DataTableUtilities.d.ts.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.nested.js","sources":["../../../src/components/tag/Tag.nested.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import type { TagSize, TagType } from './tag.types';\n import { EventHandler } from '../../utilities/EventHandler';\n\n export let label: string;\n export let size: TagSize = 'm';\n export let dark: boolean;\n export let type: TagType = 'text';\n export let disabled: boolean;\n export let id: string;\n export let value: string | undefined = undefined;\n export let href: string | undefined = undefined;\n export let name: string | undefined = undefined;\n export let selected = false;\n\n $: isSelected = selected ? true : false;\n $: userClass = $$props.class;\n $: attributes = { ...$$restProps };\n $: delete attributes.class;\n\n let eventHandler = new EventHandler();\n\n function getClasses(type: TagType, dark: boolean) {\n const classes = [`mc-tag-${type}`];\n\n if (size) {\n classes.push(`mc-tag-${type}--${size}`);\n }\n\n if (dark) {\n classes.push(`mc-tag-${type}--dark`);\n }\n\n return classes.join(' ');\n }\n\n function getSubClasses(type: TagType, element: string) {\n return `mc-tag-${type}__${element}`;\n }\n\n function onSelect(): void {\n isSelected = !isSelected;\n console.log(isSelected);\n eventHandler.dispatch('tag-selected', isSelected);\n }\n\n function onRemoved(): void {\n eventHandler.dispatch('tag-removed', { id, label, value });\n }\n</script>\n\n{#if type === 'text'}\n <span class=\"{getClasses(type, dark)} {userClass}\" {...attributes}>\n <span class={getSubClasses(type, 'label')}>\n {label}\n </span>\n </span>\n{/if}\n{#if type === 'link'}\n <a\n {href}\n class=\"{getClasses(type, dark)} {userClass}\"\n {...attributes}\n on:click|stopPropagation={onSelect}\n >\n <span class={getSubClasses(type, 'label')}>\n {label}\n </span>\n </a>\n{/if}\n{#if type === 'selectable'}\n <span\n class=\"{getClasses(type, dark)} {userClass}\"\n on:click|stopPropagation={onSelect}\n {...attributes}\n >\n <input\n class={getSubClasses(type, 'input')}\n type=\"checkbox\"\n {name}\n checked={isSelected}\n {id}\n {disabled}\n />\n <label class={getSubClasses(type, 'pill')} for={id}>\n <span class={getSubClasses(type, 'label')}>\n {label}\n </span>\n </label>\n </span>\n{/if}\n{#if type === 'removable'}\n <span class=\"{getClasses(type, dark)} {userClass}\" {...attributes}>\n <span class={getSubClasses(type, 'label')}>\n {label}\n </span>\n <button\n class={getSubClasses(type, 'remove')}\n on:click|stopPropagation={onRemoved}\n >\n <span class={getSubClasses(type, 'remove-text')}> {label} </span>\n </button>\n </span>\n{/if}\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import '@mozaic-ds/styles/components/c.tag';\n</style>\n"],"names":["class","span1_class_value","ctx","getSubClasses","insert","target","span1","anchor","append","span0","dirty","a_class_value","a","span","input","label_1","span2_class_value","span2","button","if_block0","create_if_block_3","if_block1","create_if_block_2","if_block2","create_if_block_1","if_block3","create_if_block","type","element","label","$$props","size","dark","disabled","id","value","href","name","selected","eventHandler","EventHandler","isSelected","$$invalidate","userClass","attributes","Object","assign","$$restProps","classes","push","join","console","log","dispatch"],"mappings":"i0zCAsDgBA,MAAAC,EAAAC,EAAW,IAAAA,EAAM,GAAAA,UAASA,EAAS,IAAOA,EAAU,wFAE7DA,EAAK,oBADKC,EAAcD,EAAI,GAAE,UAAO,yDAD1CE,EAIMC,EAAAC,EAAAC,GAHJC,EAEMF,EAAAG,2BADHP,EAAK,kBADKC,EAAcD,EAAI,GAAE,UAAO,6CAD5B,IAAAQ,GAAAT,KAAAA,EAAAC,EAAW,IAAAA,EAAM,GAAAA,UAASA,EAAS,KAAA,CAAAF,MAAAC,UAAOC,EAAU,8FASxDF,MAAAW,EAAAT,EAAW,IAAAA,EAAM,GAAAA,UAAQA,EAAS,IACtCA,EAAU,qFAIXA,EAAK,oBADKC,EAAcD,EAAI,GAAE,UAAO,yDAN1CE,EASGC,EAAAO,EAAAL,GAHDC,EAEMI,EAAAC,8BAJoBX,EAAQ,6BAG/BA,EAAK,kBADKC,EAAcD,EAAI,GAAE,UAAO,+DAJhC,IAAAQ,GAAAC,KAAAA,EAAAT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Od,EAAU,iFAzC/DiB,EAAS,SAATjB,MAAekB,EAAAlB,GAOfmB,EAAS,SAATnB,MAAeoB,EAAApB,GAYfqB,EAAS,eAATrB,MAAqBsB,EAAAtB,GAqBrBuB,EAAS,cAATvB,MAAoBwB,EAAAxB,gLAxCX,SAATA,sEAOS,SAATA,sEAYS,eAATA,sEAqBS,cAATA,uKAvDMC,EAAcwB,EAAeC,GACnB,MAAA,UAAAD,MAASC,4IAjCjBC,GAAaC,GACbC,KAAAA,EAAgB,KAAGD,QACnBE,GAAaF,GACbH,KAAAA,EAAgB,QAAMG,YACtBG,GAAiBH,MACjBI,GAAUJ,GACVK,MAAAA,GAAqCL,GACrCM,KAAAA,GAAoCN,GACpCO,KAAAA,GAAoCP,GACpCQ,SAAAA,GAAW,GAAKR,EAOvBS,MAAmBC,2XALpBC,IAAaH,GACbI,EAAA,EAAAC,EAAYb,EAAQ9B,WACpB4C,EAALC,OAAAC,UAAuBC,2BACXH,EAAW5C,4CAID2B,EAAeK,GAC3B,MAAAgB,aAAqBrB,YAEvBI,GACFiB,EAAQC,KAAe,UAAAtB,MAASI,KAG9BC,GACFgB,EAAQC,KAAI,UAAWtB,WAGlBqB,EAAQE,KAAK,iBAQpBR,EAAA,EAAAD,GAAcA,GACdU,QAAQC,IAAIX,GACZF,EAAac,SAAS,eAAgBZ,eAItCF,EAAac,SAAS,eAAiBnB,KAAIL,QAAOM"}
1
+ {"version":3,"file":"Tag.nested.js","sources":["../../../src/components/tag/Tag.nested.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import type { TagSize, TagType } from './tag.types';\n import { EventHandler } from '../../utilities/EventHandler';\n\n export let label: string;\n export let size: TagSize = 'm';\n export let dark: boolean;\n export let type: TagType = 'text';\n export let disabled: boolean;\n export let id: string;\n export let value: string | undefined = undefined;\n export let href: string | undefined = undefined;\n export let name: string | undefined = undefined;\n export let selected = false;\n\n $: isSelected = selected ? true : false;\n $: userClass = $$props.class;\n $: attributes = { ...$$restProps };\n $: delete attributes.class;\n\n let eventHandler = new EventHandler();\n\n function getClasses(type: TagType) {\n const classes = [`mc-tag-${type}`];\n\n if (size) {\n classes.push(`mc-tag-${type}--${size}`);\n }\n\n if (dark) {\n classes.push(`mc-tag-${type}--dark`);\n }\n\n return classes.join(' ');\n }\n\n function getSubClasses(type: TagType, element: string) {\n return `mc-tag-${type}__${element}`;\n }\n\n function onSelect(): void {\n isSelected = !isSelected;\n console.log(isSelected);\n eventHandler.dispatch('tag-selected', isSelected);\n }\n\n function onRemoved(): void {\n eventHandler.dispatch('tag-removed', { id, label, value });\n }\n</script>\n\n{#if type === 'text'}\n <span class=\"{getClasses(type)} {userClass}\" {...attributes}>\n <span class={getSubClasses(type, 'label')}>\n {label}\n </span>\n </span>\n{/if}\n{#if type === 'link'}\n <a\n {href}\n class=\"{getClasses(type)} {userClass}\"\n {...attributes}\n on:click|stopPropagation={onSelect}\n >\n <span class={getSubClasses(type, 'label')}>\n {label}\n </span>\n </a>\n{/if}\n{#if type === 'selectable'}\n <span\n class=\"{getClasses(type)} {userClass}\"\n on:click|stopPropagation={onSelect}\n {...attributes}\n >\n <input\n class={getSubClasses(type, 'input')}\n type=\"checkbox\"\n {name}\n checked={isSelected}\n {id}\n {disabled}\n />\n <label class={getSubClasses(type, 'pill')} for={id}>\n <span class={getSubClasses(type, 'label')}>\n {label}\n </span>\n </label>\n </span>\n{/if}\n{#if type === 'removable'}\n <span class=\"{getClasses(type)} {userClass}\" {...attributes}>\n <span class={getSubClasses(type, 'label')}>\n {label}\n </span>\n <button\n class={getSubClasses(type, 'remove')}\n on:click|stopPropagation={onRemoved}\n >\n <span class={getSubClasses(type, 'remove-text')}> {label} </span>\n </button>\n </span>\n{/if}\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import '@mozaic-ds/styles/components/c.tag';\n</style>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;mDAsDgB,GAAU,CAAA,CAAA,CAAA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AAA,CAAA,CAAA;;;MAGlC,IAAI,EAAA;GACN,OAAO,CAAC,IAAI,CAAA,CAAA,OAAA,EAAW,IAAI,CAAA,MAAA,CAAA,CAAA,CAAA;;;SAGtB,OAAO,CAAC,IAAI,CAAC,GAAG,CAAA,CAAA;;;UAOhB,QAAQ,GAAA;AACf,EAAA,YAAA,CAAA,CAAA,EAAA,UAAU,IAAI,UAAU,CAAA,CAAA;EACxB,OAAO,CAAC,GAAG,CAAC,UAAU,CAAA,CAAA;AACtB,EAAA,YAAY,CAAC,QAAQ,CAAC,cAAc,EAAE,UAAU,CAAA,CAAA;;;UAGzC,SAAS,GAAA;EAChB,YAAY,CAAC,QAAQ,CAAC,aAAa,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,EAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;AAhCzD,mBAAG,UAAU,GAAG,QAAQ,GAAG,IAAI,GAAG,KAAK,CAAA,CAAA;;;AACvC,EAAG,YAAA,CAAA,CAAA,EAAA,SAAS,GAAG,OAAO,CAAC,KAAK,CAAA,CAAA;AAC5B,kBAAG,UAAU,GAAf,MAAA,CAAA,MAAA,KAAuB,WAAW,CAAA,CAAA,CAAA;;;GAC/B,OAAS,UAAU,CAAC,KAAK,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -22,7 +22,7 @@
22
22
 
23
23
  let eventHandler = new EventHandler();
24
24
 
25
- function getClasses(type: TagType, dark: boolean) {
25
+ function getClasses(type: TagType) {
26
26
  const classes = [`mc-tag-${type}`];
27
27
 
28
28
  if (size) {
@@ -52,7 +52,7 @@
52
52
  </script>
53
53
 
54
54
  {#if type === 'text'}
55
- <span class="{getClasses(type, dark)} {userClass}" {...attributes}>
55
+ <span class="{getClasses(type)} {userClass}" {...attributes}>
56
56
  <span class={getSubClasses(type, 'label')}>
57
57
  {label}
58
58
  </span>
@@ -61,7 +61,7 @@
61
61
  {#if type === 'link'}
62
62
  <a
63
63
  {href}
64
- class="{getClasses(type, dark)} {userClass}"
64
+ class="{getClasses(type)} {userClass}"
65
65
  {...attributes}
66
66
  on:click|stopPropagation={onSelect}
67
67
  >
@@ -72,7 +72,7 @@
72
72
  {/if}
73
73
  {#if type === 'selectable'}
74
74
  <span
75
- class="{getClasses(type, dark)} {userClass}"
75
+ class="{getClasses(type)} {userClass}"
76
76
  on:click|stopPropagation={onSelect}
77
77
  {...attributes}
78
78
  >
@@ -92,7 +92,7 @@
92
92
  </span>
93
93
  {/if}
94
94
  {#if type === 'removable'}
95
- <span class="{getClasses(type, dark)} {userClass}" {...attributes}>
95
+ <span class="{getClasses(type)} {userClass}" {...attributes}>
96
96
  <span class={getSubClasses(type, 'label')}>
97
97
  {label}
98
98
  </span>
@@ -25,7 +25,7 @@
25
25
 
26
26
  let eventHandler = new EventHandler();
27
27
 
28
- function getClasses(type: TagType, dark: boolean) {
28
+ function getClasses(type: TagType) {
29
29
  const classes = [`mc-tag-${type}`];
30
30
 
31
31
  if (size) {
@@ -54,14 +54,14 @@
54
54
  </script>
55
55
 
56
56
  {#if type === 'text'}
57
- <span class="{getClasses(type, dark)} {userClass}" {...attributes}>
57
+ <span class="{getClasses(type)} {userClass}" {...attributes}>
58
58
  <span class={getSubClasses(type, 'label')}>
59
59
  {label}
60
60
  </span>
61
61
  </span>
62
62
  {/if}
63
63
  {#if type === 'link'}
64
- <a {href} class="{getClasses(type, dark)} {userClass}" {...attributes}>
64
+ <a {href} class="{getClasses(type)} {userClass}" {...attributes}>
65
65
  <span class={getSubClasses(type, 'label')}>
66
66
  {label}
67
67
  </span>
@@ -69,7 +69,7 @@
69
69
  {/if}
70
70
  {#if type === 'selectable'}
71
71
  <span
72
- class="{getClasses(type, dark)} {userClass}"
72
+ class="{getClasses(type)} {userClass}"
73
73
  on:click|preventDefault={onSelect}
74
74
  {...attributes}
75
75
  >
@@ -90,7 +90,7 @@
90
90
  </span>
91
91
  {/if}
92
92
  {#if type === 'removable'}
93
- <span class="{getClasses(type, dark)} {userClass}" {...attributes}>
93
+ <span class="{getClasses(type)} {userClass}" {...attributes}>
94
94
  <span class={getSubClasses(type, 'label')}>
95
95
  {label}
96
96
  </span>
@@ -1,2 +1,476 @@
1
- import{S as e,i as t,a as s,b as l,f as a,s as n,e as r,d as i,n as o,g as c,j as d,C as h,E as m,D as u,o as $,J as g,p,c as b,q as f,K as w,M as x,x as y,A as v,G as j}from"../../index-c33b3772.js";import{E as k}from"../../EventHandler-02058705.js";import E from"../tag/Tag.nested.js";function C(e,t,s){const l=e.slice();return l[14]=t[s],l[16]=s,l}function R(e){let t,s,a;return s=new E({props:{id:e[14].id,label:e[14].label,size:"s",type:"removable",dark:!1,disabled:!1,selected:!1}}),s.$on("tag-removed",(function(){return e[11](e[14])})),{c(){t=r("div"),y(s.$$.fragment),c(t,"class","tag-selected")},m(e,n){l(e,t,n),v(s,t,null),a=!0},p(t,l){e=t;const a={};32&l&&(a.id=e[14].id),32&l&&(a.label=e[14].label),s.$set(a)},i(e){a||(h(s.$$.fragment,e),a=!0)},o(e){u(s.$$.fragment,e),a=!1},d(e){e&&$(t),j(s)}}}function S(e){let t,s,a=(e[16]<e[0]||e[4])&&R(e);return{c(){a&&a.c(),t=w()},m(e,n){a&&a.m(e,n),l(e,t,n),s=!0},p(e,s){e[16]<e[0]||e[4]?a?(a.p(e,s),17&s&&h(a,1)):(a=R(e),a.c(),h(a,1),a.m(t.parentNode,t)):a&&(x(),u(a,1,1,(()=>{a=null})),m())},i(e){s||(h(a),s=!0)},o(e){u(a),s=!1},d(e){a&&a.d(e),e&&$(t)}}}function z(e){let t,s,a;return s=new E({props:{id:"id-tag",label:e[4]&&!e[3]?e[2]:e[1],size:"s",type:"link",class:"mc-taglist__showhide",dark:!1,disabled:!1,name:""}}),s.$on("tag-selected",e[7]),{c(){t=r("div"),y(s.$$.fragment),c(t,"class","tag-selected")},m(e,n){l(e,t,n),v(s,t,null),a=!0},p(e,t){const l={};30&t&&(l.label=e[4]&&!e[3]?e[2]:e[1]),s.$set(l)},i(e){a||(h(s.$$.fragment,e),a=!0)},o(e){u(s.$$.fragment,e),a=!1},d(e){e&&$(t),j(s)}}}function A(e){let t,s,a,n=e[5],p=[];for(let t=0;t<n.length;t+=1)p[t]=S(C(e,n,t));const b=e=>u(p[e],1,1,(()=>{p[e]=null}));let f=e[0]&&e[5].length>e[0]&&z(e);return{c(){t=r("div");for(let e=0;e<p.length;e+=1)p[e].c();s=i(),f&&f.c(),this.c=o,c(t,"class","mc-taglist")},m(e,n){l(e,t,n);for(let e=0;e<p.length;e+=1)p[e]&&p[e].m(t,null);d(t,s),f&&f.m(t,null),a=!0},p(e,[l]){if(113&l){let a;for(n=e[5],a=0;a<n.length;a+=1){const r=C(e,n,a);p[a]?(p[a].p(r,l),h(p[a],1)):(p[a]=S(r),p[a].c(),h(p[a],1),p[a].m(t,s))}for(x(),a=n.length;a<p.length;a+=1)b(a);m()}e[0]&&e[5].length>e[0]?f?(f.p(e,l),33&l&&h(f,1)):(f=z(e),f.c(),h(f,1),f.m(t,null)):f&&(x(),u(f,1,1,(()=>{f=null})),m())},i(e){if(!a){for(let e=0;e<n.length;e+=1)h(p[e]);h(f),a=!0}},o(e){p=p.filter(Boolean);for(let e=0;e<p.length;e+=1)u(p[e]);u(f),a=!1},d(e){e&&$(t),g(p,e),f&&f.d()}}}function J(e,t,s){let l,a,n;const r=["items","max","showlabel","reducelabel","showall","stateless"];let i=p(t,r),{items:o}=t,{max:c=10}=t,{showlabel:d="Show all"}=t,{reducelabel:h="Reduce"}=t,{showall:m=!1}=t,{stateless:u=!1}=t,$=new k;function g(e){$.dispatch("tag-removed",e)}return e.$$set=e=>{t=b(b({},t),f(e)),s(13,i=p(t,r)),"items"in e&&s(8,o=e.items),"max"in e&&s(0,c=e.max),"showlabel"in e&&s(1,d=e.showlabel),"reducelabel"in e&&s(2,h=e.reducelabel),"showall"in e&&s(9,m=e.showall),"stateless"in e&&s(3,u=e.stateless)},e.$$.update=()=>{256&e.$$.dirty&&s(5,l=o?JSON.parse(o):[]),512&e.$$.dirty&&s(4,a=!!m),s(10,n=Object.assign({},i)),1024&e.$$.dirty&&delete n.class},[c,d,h,u,a,l,g,function(){u?$.dispatch(a?"reduce":"show-all",l):s(4,a=!a)},o,m,n,e=>g(e)]}class N extends e{constructor(e){super();const r=document.createElement("style");r.textContent=".mc-taglist{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:1rem}",this.shadowRoot.appendChild(r),t(this,{target:this.shadowRoot,props:s(this.attributes),customElement:!0},J,A,n,{items:8,max:0,showlabel:1,reducelabel:2,showall:9,stateless:3},null),e&&(e.target&&l(e.target,this,e.anchor),e.props&&(this.$set(e.props),a()))}static get observedAttributes(){return["items","max","showlabel","reducelabel","showall","stateless"]}get items(){return this.$$.ctx[8]}set items(e){this.$$set({items:e}),a()}get max(){return this.$$.ctx[0]}set max(e){this.$$set({max:e}),a()}get showlabel(){return this.$$.ctx[1]}set showlabel(e){this.$$set({showlabel:e}),a()}get reducelabel(){return this.$$.ctx[2]}set reducelabel(e){this.$$set({reducelabel:e}),a()}get showall(){return this.$$.ctx[9]}set showall(e){this.$$set({showall:e}),a()}get stateless(){return this.$$.ctx[3]}set stateless(e){this.$$set({stateless:e}),a()}}export{N as default};
1
+ import { S as SvelteElement, i as init, a as attribute_to_object, b as insert, f as flush, s as safe_not_equal, e as element, d as space, n as noop, g as attr, j as append, C as transition_in, E as check_outros, D as transition_out, o as detach, J as destroy_each, p as compute_rest_props, c as assign, q as exclude_internal_props, K as empty, M as group_outros, x as create_component, A as mount_component, G as destroy_component } from '../../index-c33b3772.js';
2
+ import { E as EventHandler } from '../../EventHandler-02058705.js';
3
+ import Tag_nested from '../tag/Tag.nested.js';
4
+
5
+ /* src/components/taglist/TagList.svelte generated by Svelte v3.58.0 */
6
+
7
+ function get_each_context(ctx, list, i) {
8
+ const child_ctx = ctx.slice();
9
+ child_ctx[14] = list[i];
10
+ child_ctx[16] = i;
11
+ return child_ctx;
12
+ }
13
+
14
+ // (29:4) {#if index < max || showAll}
15
+ function create_if_block_1(ctx) {
16
+ let div;
17
+ let tag;
18
+ let current;
19
+
20
+ function tag_removed_handler() {
21
+ return /*tag_removed_handler*/ ctx[11](/*item*/ ctx[14]);
22
+ }
23
+
24
+ tag = new Tag_nested({
25
+ props: {
26
+ id: /*item*/ ctx[14].id,
27
+ label: /*item*/ ctx[14].label,
28
+ size: 's',
29
+ type: "removable",
30
+ dark: false,
31
+ disabled: false,
32
+ selected: false
33
+ }
34
+ });
35
+
36
+ tag.$on("tag-removed", tag_removed_handler);
37
+
38
+ return {
39
+ c() {
40
+ div = element("div");
41
+ create_component(tag.$$.fragment);
42
+ attr(div, "class", "tag-selected");
43
+ },
44
+ m(target, anchor) {
45
+ insert(target, div, anchor);
46
+ mount_component(tag, div, null);
47
+ current = true;
48
+ },
49
+ p(new_ctx, dirty) {
50
+ ctx = new_ctx;
51
+ const tag_changes = {};
52
+ if (dirty & /*parsedItems*/ 32) tag_changes.id = /*item*/ ctx[14].id;
53
+ if (dirty & /*parsedItems*/ 32) tag_changes.label = /*item*/ ctx[14].label;
54
+ tag.$set(tag_changes);
55
+ },
56
+ i(local) {
57
+ if (current) return;
58
+ transition_in(tag.$$.fragment, local);
59
+ current = true;
60
+ },
61
+ o(local) {
62
+ transition_out(tag.$$.fragment, local);
63
+ current = false;
64
+ },
65
+ d(detaching) {
66
+ if (detaching) detach(div);
67
+ destroy_component(tag);
68
+ }
69
+ };
70
+ }
71
+
72
+ // (28:2) {#each parsedItems as item, index}
73
+ function create_each_block(ctx) {
74
+ let if_block_anchor;
75
+ let current;
76
+ let if_block = (/*index*/ ctx[16] < /*max*/ ctx[0] || /*showAll*/ ctx[4]) && create_if_block_1(ctx);
77
+
78
+ return {
79
+ c() {
80
+ if (if_block) if_block.c();
81
+ if_block_anchor = empty();
82
+ },
83
+ m(target, anchor) {
84
+ if (if_block) if_block.m(target, anchor);
85
+ insert(target, if_block_anchor, anchor);
86
+ current = true;
87
+ },
88
+ p(ctx, dirty) {
89
+ if (/*index*/ ctx[16] < /*max*/ ctx[0] || /*showAll*/ ctx[4]) {
90
+ if (if_block) {
91
+ if_block.p(ctx, dirty);
92
+
93
+ if (dirty & /*max, showAll*/ 17) {
94
+ transition_in(if_block, 1);
95
+ }
96
+ } else {
97
+ if_block = create_if_block_1(ctx);
98
+ if_block.c();
99
+ transition_in(if_block, 1);
100
+ if_block.m(if_block_anchor.parentNode, if_block_anchor);
101
+ }
102
+ } else if (if_block) {
103
+ group_outros();
104
+
105
+ transition_out(if_block, 1, 1, () => {
106
+ if_block = null;
107
+ });
108
+
109
+ check_outros();
110
+ }
111
+ },
112
+ i(local) {
113
+ if (current) return;
114
+ transition_in(if_block);
115
+ current = true;
116
+ },
117
+ o(local) {
118
+ transition_out(if_block);
119
+ current = false;
120
+ },
121
+ d(detaching) {
122
+ if (if_block) if_block.d(detaching);
123
+ if (detaching) detach(if_block_anchor);
124
+ }
125
+ };
126
+ }
127
+
128
+ // (44:2) {#if max && parsedItems.length > max}
129
+ function create_if_block(ctx) {
130
+ let div;
131
+ let tag;
132
+ let current;
133
+
134
+ tag = new Tag_nested({
135
+ props: {
136
+ id: "id-tag",
137
+ label: /*showAll*/ ctx[4] && !/*stateless*/ ctx[3]
138
+ ? /*reducelabel*/ ctx[2]
139
+ : /*showlabel*/ ctx[1],
140
+ size: "s",
141
+ type: "link",
142
+ class: "mc-taglist__showhide",
143
+ dark: false,
144
+ disabled: false,
145
+ name: ""
146
+ }
147
+ });
148
+
149
+ tag.$on("tag-selected", /*onExtend*/ ctx[7]);
150
+
151
+ return {
152
+ c() {
153
+ div = element("div");
154
+ create_component(tag.$$.fragment);
155
+ attr(div, "class", "tag-selected");
156
+ },
157
+ m(target, anchor) {
158
+ insert(target, div, anchor);
159
+ mount_component(tag, div, null);
160
+ current = true;
161
+ },
162
+ p(ctx, dirty) {
163
+ const tag_changes = {};
164
+
165
+ if (dirty & /*showAll, stateless, reducelabel, showlabel*/ 30) tag_changes.label = /*showAll*/ ctx[4] && !/*stateless*/ ctx[3]
166
+ ? /*reducelabel*/ ctx[2]
167
+ : /*showlabel*/ ctx[1];
168
+
169
+ tag.$set(tag_changes);
170
+ },
171
+ i(local) {
172
+ if (current) return;
173
+ transition_in(tag.$$.fragment, local);
174
+ current = true;
175
+ },
176
+ o(local) {
177
+ transition_out(tag.$$.fragment, local);
178
+ current = false;
179
+ },
180
+ d(detaching) {
181
+ if (detaching) detach(div);
182
+ destroy_component(tag);
183
+ }
184
+ };
185
+ }
186
+
187
+ function create_fragment(ctx) {
188
+ let div;
189
+ let t;
190
+ let current;
191
+ let each_value = /*parsedItems*/ ctx[5];
192
+ let each_blocks = [];
193
+
194
+ for (let i = 0; i < each_value.length; i += 1) {
195
+ each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
196
+ }
197
+
198
+ const out = i => transition_out(each_blocks[i], 1, 1, () => {
199
+ each_blocks[i] = null;
200
+ });
201
+
202
+ let if_block = /*max*/ ctx[0] && /*parsedItems*/ ctx[5].length > /*max*/ ctx[0] && create_if_block(ctx);
203
+
204
+ return {
205
+ c() {
206
+ div = element("div");
207
+
208
+ for (let i = 0; i < each_blocks.length; i += 1) {
209
+ each_blocks[i].c();
210
+ }
211
+
212
+ t = space();
213
+ if (if_block) if_block.c();
214
+ this.c = noop;
215
+ attr(div, "class", "mc-taglist");
216
+ },
217
+ m(target, anchor) {
218
+ insert(target, div, anchor);
219
+
220
+ for (let i = 0; i < each_blocks.length; i += 1) {
221
+ if (each_blocks[i]) {
222
+ each_blocks[i].m(div, null);
223
+ }
224
+ }
225
+
226
+ append(div, t);
227
+ if (if_block) if_block.m(div, null);
228
+ current = true;
229
+ },
230
+ p(ctx, [dirty]) {
231
+ if (dirty & /*parsedItems, onRemoved, max, showAll*/ 113) {
232
+ each_value = /*parsedItems*/ ctx[5];
233
+ let i;
234
+
235
+ for (i = 0; i < each_value.length; i += 1) {
236
+ const child_ctx = get_each_context(ctx, each_value, i);
237
+
238
+ if (each_blocks[i]) {
239
+ each_blocks[i].p(child_ctx, dirty);
240
+ transition_in(each_blocks[i], 1);
241
+ } else {
242
+ each_blocks[i] = create_each_block(child_ctx);
243
+ each_blocks[i].c();
244
+ transition_in(each_blocks[i], 1);
245
+ each_blocks[i].m(div, t);
246
+ }
247
+ }
248
+
249
+ group_outros();
250
+
251
+ for (i = each_value.length; i < each_blocks.length; i += 1) {
252
+ out(i);
253
+ }
254
+
255
+ check_outros();
256
+ }
257
+
258
+ if (/*max*/ ctx[0] && /*parsedItems*/ ctx[5].length > /*max*/ ctx[0]) {
259
+ if (if_block) {
260
+ if_block.p(ctx, dirty);
261
+
262
+ if (dirty & /*max, parsedItems*/ 33) {
263
+ transition_in(if_block, 1);
264
+ }
265
+ } else {
266
+ if_block = create_if_block(ctx);
267
+ if_block.c();
268
+ transition_in(if_block, 1);
269
+ if_block.m(div, null);
270
+ }
271
+ } else if (if_block) {
272
+ group_outros();
273
+
274
+ transition_out(if_block, 1, 1, () => {
275
+ if_block = null;
276
+ });
277
+
278
+ check_outros();
279
+ }
280
+ },
281
+ i(local) {
282
+ if (current) return;
283
+
284
+ for (let i = 0; i < each_value.length; i += 1) {
285
+ transition_in(each_blocks[i]);
286
+ }
287
+
288
+ transition_in(if_block);
289
+ current = true;
290
+ },
291
+ o(local) {
292
+ each_blocks = each_blocks.filter(Boolean);
293
+
294
+ for (let i = 0; i < each_blocks.length; i += 1) {
295
+ transition_out(each_blocks[i]);
296
+ }
297
+
298
+ transition_out(if_block);
299
+ current = false;
300
+ },
301
+ d(detaching) {
302
+ if (detaching) detach(div);
303
+ destroy_each(each_blocks, detaching);
304
+ if (if_block) if_block.d();
305
+ }
306
+ };
307
+ }
308
+
309
+ function instance($$self, $$props, $$invalidate) {
310
+ let parsedItems;
311
+ let showAll;
312
+ let attributes;
313
+ const omit_props_names = ["items","max","showlabel","reducelabel","showall","stateless"];
314
+ let $$restProps = compute_rest_props($$props, omit_props_names);
315
+ let { items } = $$props;
316
+ let { max = 10 } = $$props;
317
+ let { showlabel = 'Show all' } = $$props;
318
+ let { reducelabel = 'Reduce' } = $$props;
319
+ let { showall = false } = $$props;
320
+ let { stateless = false } = $$props;
321
+ let eventHandler = new EventHandler();
322
+
323
+ function onRemoved(item) {
324
+ eventHandler.dispatch('tag-removed', item);
325
+ }
326
+
327
+ function onExtend() {
328
+ if (stateless) eventHandler.dispatch(showAll ? 'reduce' : 'show-all', parsedItems); else $$invalidate(4, showAll = !showAll);
329
+ }
330
+
331
+ const tag_removed_handler = item => onRemoved(item);
332
+
333
+ $$self.$$set = $$new_props => {
334
+ $$props = assign(assign({}, $$props), exclude_internal_props($$new_props));
335
+ $$invalidate(13, $$restProps = compute_rest_props($$props, omit_props_names));
336
+ if ('items' in $$new_props) $$invalidate(8, items = $$new_props.items);
337
+ if ('max' in $$new_props) $$invalidate(0, max = $$new_props.max);
338
+ if ('showlabel' in $$new_props) $$invalidate(1, showlabel = $$new_props.showlabel);
339
+ if ('reducelabel' in $$new_props) $$invalidate(2, reducelabel = $$new_props.reducelabel);
340
+ if ('showall' in $$new_props) $$invalidate(9, showall = $$new_props.showall);
341
+ if ('stateless' in $$new_props) $$invalidate(3, stateless = $$new_props.stateless);
342
+ };
343
+
344
+ $$self.$$.update = () => {
345
+ if ($$self.$$.dirty & /*items*/ 256) {
346
+ $$invalidate(5, parsedItems = items ? JSON.parse(items) : []);
347
+ }
348
+
349
+ if ($$self.$$.dirty & /*showall*/ 512) {
350
+ $$invalidate(4, showAll = showall ? true : false);
351
+ }
352
+
353
+ $$invalidate(10, attributes = Object.assign({}, $$restProps));
354
+
355
+ if ($$self.$$.dirty & /*attributes*/ 1024) {
356
+ delete attributes.class;
357
+ }
358
+ };
359
+
360
+ return [
361
+ max,
362
+ showlabel,
363
+ reducelabel,
364
+ stateless,
365
+ showAll,
366
+ parsedItems,
367
+ onRemoved,
368
+ onExtend,
369
+ items,
370
+ showall,
371
+ attributes,
372
+ tag_removed_handler
373
+ ];
374
+ }
375
+
376
+ class TagList extends SvelteElement {
377
+ constructor(options) {
378
+ super();
379
+ const style = document.createElement('style');
380
+ style.textContent = `.mc-taglist{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:1rem}`;
381
+ this.shadowRoot.appendChild(style);
382
+
383
+ init(
384
+ this,
385
+ {
386
+ target: this.shadowRoot,
387
+ props: attribute_to_object(this.attributes),
388
+ customElement: true
389
+ },
390
+ instance,
391
+ create_fragment,
392
+ safe_not_equal,
393
+ {
394
+ items: 8,
395
+ max: 0,
396
+ showlabel: 1,
397
+ reducelabel: 2,
398
+ showall: 9,
399
+ stateless: 3
400
+ },
401
+ null
402
+ );
403
+
404
+ if (options) {
405
+ if (options.target) {
406
+ insert(options.target, this, options.anchor);
407
+ }
408
+
409
+ if (options.props) {
410
+ this.$set(options.props);
411
+ flush();
412
+ }
413
+ }
414
+ }
415
+
416
+ static get observedAttributes() {
417
+ return ["items", "max", "showlabel", "reducelabel", "showall", "stateless"];
418
+ }
419
+
420
+ get items() {
421
+ return this.$$.ctx[8];
422
+ }
423
+
424
+ set items(items) {
425
+ this.$$set({ items });
426
+ flush();
427
+ }
428
+
429
+ get max() {
430
+ return this.$$.ctx[0];
431
+ }
432
+
433
+ set max(max) {
434
+ this.$$set({ max });
435
+ flush();
436
+ }
437
+
438
+ get showlabel() {
439
+ return this.$$.ctx[1];
440
+ }
441
+
442
+ set showlabel(showlabel) {
443
+ this.$$set({ showlabel });
444
+ flush();
445
+ }
446
+
447
+ get reducelabel() {
448
+ return this.$$.ctx[2];
449
+ }
450
+
451
+ set reducelabel(reducelabel) {
452
+ this.$$set({ reducelabel });
453
+ flush();
454
+ }
455
+
456
+ get showall() {
457
+ return this.$$.ctx[9];
458
+ }
459
+
460
+ set showall(showall) {
461
+ this.$$set({ showall });
462
+ flush();
463
+ }
464
+
465
+ get stateless() {
466
+ return this.$$.ctx[3];
467
+ }
468
+
469
+ set stateless(stateless) {
470
+ this.$$set({ stateless });
471
+ flush();
472
+ }
473
+ }
474
+
475
+ export { TagList as default };
2
476
  //# sourceMappingURL=TagList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TagList.js","sources":["../../../src/components/taglist/TagList.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { EventHandler } from '../../utilities/EventHandler';\n import Tag from '../tag/Tag.nested.svelte';\n import type { TagElem } from '../tag/tag.types';\n export let items: string;\n export let max = 10;\n export let showlabel = 'Show all';\n export let reducelabel = 'Reduce';\n export let showall = false;\n export let stateless = false;\n\n $: parsedItems = items ? (JSON.parse(items) as TagElem[]) : [];\n $: showAll = showall ? true : false;\n $: attributes = { ...$$restProps };\n $: delete attributes.class;\n\n let eventHandler = new EventHandler();\n\n function onRemoved(item: any): void {\n eventHandler.dispatch('tag-removed', item);\n }\n\n function onExtend(): void {\n if (stateless)\n eventHandler.dispatch(showAll ? 'reduce' : 'show-all', parsedItems);\n else showAll = !showAll;\n }\n</script>\n\n<div class=\"mc-taglist\">\n {#each parsedItems as item, index}\n {#if index < max || showAll}\n <div class=\"tag-selected\">\n <Tag\n id={item.id}\n label={item.label}\n size={'s'}\n type=\"removable\"\n dark={false}\n disabled={false}\n selected={false}\n on:tag-removed={() => onRemoved(item)}\n />\n </div>\n {/if}\n {/each}\n {#if max && parsedItems.length > max}\n <div class=\"tag-selected\">\n <Tag\n id=\"id-tag\"\n label={showAll && !stateless ? reducelabel : showlabel}\n size=\"s\"\n type=\"link\"\n class=\"mc-taglist__showhide\"\n dark={false}\n disabled={false}\n name=\"\"\n on:tag-selected={onExtend}\n />\n </div>\n {/if}\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n .mc-taglist {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n gap: $mu100;\n\n &__showhide {\n cursor: pointer;\n }\n }\n</style>\n"],"names":["id","ctx","label","insert","target","div","anchor","dirty","tag_changes","create_if_block_1","length","i","if_block","create_if_block","each_blocks","items","$$props","max","showlabel","reducelabel","showall","stateless","eventHandler","EventHandler","onRemoved","item","dispatch","$$invalidate","parsedItems","JSON","parse","showAll","attributes","Object","assign","$$restProps","class"],"mappings":"8YAoCcA,GAAAC,MAAKD,GACFE,MAAAD,MAAKC,WACN,2BAEA,YACI,YACA,iIARdC,EAWKC,EAAAC,EAAAC,2CATG,GAAAC,IAAAC,EAAAR,GAAAC,MAAKD,IACF,GAAAO,IAAAC,EAAAN,MAAAD,MAAKC,gIAJbD,EAAK,IAAGA,EAAG,IAAIA,EAAO,KAAAQ,EAAAR,uEAAtBA,EAAK,IAAGA,EAAG,IAAIA,EAAO,sOAmBhBC,MAAAD,OAAYA,EAAS,GAAGA,EAAW,GAAGA,EAAS,2DAIhD,YACI,kCAEOA,EAAQ,yEAV7BE,EAYKC,EAAAC,EAAAC,uCATM,GAAAC,IAAAC,EAAAN,MAAAD,OAAYA,EAAS,GAAGA,EAAW,GAAGA,EAAS,8HApBrDA,EAAW,wBAAhBS,OAAIC,GAAA,4DAgBD,IAAAC,EAAAX,EAAO,IAAAA,EAAY,GAAAS,OAAST,EAAG,IAAAY,EAAAZ,wHAjBtCE,EAgCKC,EAAAC,EAAAC,+GA/BIL,EAAW,WAAhBS,OAAIC,GAAA,EAAA,sGAAJD,OAAIC,EAAAG,EAAAJ,OAAAC,GAAA,WAgBDV,EAAO,IAAAA,EAAY,GAAAS,OAAST,EAAG,iIAhBlCS,OAAIC,GAAA,qPA1BKI,GAAaC,GACbC,IAAAA,EAAM,IAAED,GACRE,UAAAA,EAAY,YAAUF,GACtBG,YAAAA,EAAc,UAAQH,GACtBI,QAAAA,GAAU,GAAKJ,GACfK,UAAAA,GAAY,GAAKL,EAOxBM,MAAmBC,EAEd,SAAAC,EAAUC,GACjBH,EAAaI,SAAS,cAAeD,6RARtCE,EAAA,EAAEC,EAAcb,EAASc,KAAKC,MAAMf,GAAK,wBACvCgB,IAAUX,QACVY,EAALC,OAAAC,UAAuBC,4BACXH,EAAWI,iCASff,EACFC,EAAaI,SAASK,EAAU,SAAW,WAAYH,GACpDD,EAAA,EAAAI,GAAWA,UAgBYN,GAAAD,EAAUC"}
1
+ {"version":3,"file":"TagList.js","sources":["../../../src/components/taglist/TagList.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { EventHandler } from '../../utilities/EventHandler';\n import Tag from '../tag/Tag.nested.svelte';\n import type { TagElem } from '../tag/tag.types';\n export let items: string;\n export let max = 10;\n export let showlabel = 'Show all';\n export let reducelabel = 'Reduce';\n export let showall = false;\n export let stateless = false;\n\n $: parsedItems = items ? (JSON.parse(items) as TagElem[]) : [];\n $: showAll = showall ? true : false;\n $: attributes = { ...$$restProps };\n $: delete attributes.class;\n\n let eventHandler = new EventHandler();\n\n function onRemoved(item: any): void {\n eventHandler.dispatch('tag-removed', item);\n }\n\n function onExtend(): void {\n if (stateless)\n eventHandler.dispatch(showAll ? 'reduce' : 'show-all', parsedItems);\n else showAll = !showAll;\n }\n</script>\n\n<div class=\"mc-taglist\">\n {#each parsedItems as item, index}\n {#if index < max || showAll}\n <div class=\"tag-selected\">\n <Tag\n id={item.id}\n label={item.label}\n size={'s'}\n type=\"removable\"\n dark={false}\n disabled={false}\n selected={false}\n on:tag-removed={() => onRemoved(item)}\n />\n </div>\n {/if}\n {/each}\n {#if max && parsedItems.length > max}\n <div class=\"tag-selected\">\n <Tag\n id=\"id-tag\"\n label={showAll && !stateless ? reducelabel : showlabel}\n size=\"s\"\n type=\"link\"\n class=\"mc-taglist__showhide\"\n dark={false}\n disabled={false}\n name=\"\"\n on:tag-selected={onExtend}\n />\n </div>\n {/if}\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n .mc-taglist {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n gap: $mu100;\n\n &__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