@dso-toolkit/core 62.8.4 → 62.10.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 (191) hide show
  1. package/dist/cjs/dso-date-picker.cjs.entry.js +45 -22
  2. package/dist/cjs/dso-date-picker.cjs.entry.js.map +1 -1
  3. package/dist/cjs/dso-expandable.cjs.entry.js +14 -4
  4. package/dist/cjs/dso-expandable.cjs.entry.js.map +1 -1
  5. package/dist/cjs/dso-list-button.cjs.entry.js +23 -9
  6. package/dist/cjs/dso-list-button.cjs.entry.js.map +1 -1
  7. package/dist/cjs/dso-logo.cjs.entry.js +1 -1
  8. package/dist/cjs/dso-logo.cjs.entry.js.map +1 -1
  9. package/dist/cjs/dso-modal.cjs.entry.js +3 -1
  10. package/dist/cjs/dso-modal.cjs.entry.js.map +1 -1
  11. package/dist/cjs/dso-toolkit.cjs.js +1 -1
  12. package/dist/cjs/loader.cjs.js +1 -1
  13. package/dist/collection/components/accordion/accordion.interfaces.js.map +1 -1
  14. package/dist/collection/components/accordion/accordion.js.map +1 -1
  15. package/dist/collection/components/accordion/components/accordion-section.interfaces.js.map +1 -1
  16. package/dist/collection/components/accordion/components/accordion-section.js.map +1 -1
  17. package/dist/collection/components/action-list/action-list.js.map +1 -1
  18. package/dist/collection/components/action-list/components/action-list-item.js.map +1 -1
  19. package/dist/collection/components/alert/alert.js.map +1 -1
  20. package/dist/collection/components/annotation-button/annotation-button.js.map +1 -1
  21. package/dist/collection/components/annotation-output/annotation-output.js.map +1 -1
  22. package/dist/collection/components/attachments-counter/attachments-counter.js.map +1 -1
  23. package/dist/collection/components/autosuggest/autosuggest.interfaces.js.map +1 -1
  24. package/dist/collection/components/autosuggest/autosuggest.js.map +1 -1
  25. package/dist/collection/components/badge/badge.js.map +1 -1
  26. package/dist/collection/components/banner/banner.js.map +1 -1
  27. package/dist/collection/components/card/card.interfaces.js.map +1 -1
  28. package/dist/collection/components/card/card.js.map +1 -1
  29. package/dist/collection/components/card-container/card-container.interfaces.js.map +1 -1
  30. package/dist/collection/components/card-container/card-container.js.map +1 -1
  31. package/dist/collection/components/date-picker/date-picker.interfaces.js.map +1 -1
  32. package/dist/collection/components/date-picker/date-picker.js +49 -26
  33. package/dist/collection/components/date-picker/date-picker.js.map +1 -1
  34. package/dist/collection/components/date-picker/date-utils.js.map +1 -1
  35. package/dist/collection/components/date-picker-legacy/date-localization.js.map +1 -1
  36. package/dist/collection/components/date-picker-legacy/date-picker-day.js.map +1 -1
  37. package/dist/collection/components/date-picker-legacy/date-picker-legacy.interfaces.js.map +1 -1
  38. package/dist/collection/components/date-picker-legacy/date-picker-legacy.js.map +1 -1
  39. package/dist/collection/components/date-picker-legacy/date-picker-month.js.map +1 -1
  40. package/dist/collection/components/date-picker-legacy/date-utils.js.map +1 -1
  41. package/dist/collection/components/date-picker-legacy/utils/month-range.js.map +1 -1
  42. package/dist/collection/components/date-picker-legacy/utils/range.js.map +1 -1
  43. package/dist/collection/components/document-component/document-component-heading.js.map +1 -1
  44. package/dist/collection/components/document-component/document-component.js.map +1 -1
  45. package/dist/collection/components/document-component/document-component.models.js.map +1 -1
  46. package/dist/collection/components/document-component-demo/document-component.demo.js.map +1 -1
  47. package/dist/collection/components/dropdown-menu/dropdown-menu.js.map +1 -1
  48. package/dist/collection/components/expandable/expandable.css +4 -1
  49. package/dist/collection/components/expandable/expandable.js +16 -5
  50. package/dist/collection/components/expandable/expandable.js.map +1 -1
  51. package/dist/collection/components/header/header.interfaces.js.map +1 -1
  52. package/dist/collection/components/header/header.js.map +1 -1
  53. package/dist/collection/components/helpcenter-panel/helpcenter-panel.js.map +1 -1
  54. package/dist/collection/components/highlight-box/highlight-box.js.map +1 -1
  55. package/dist/collection/components/icon/icon.js.map +1 -1
  56. package/dist/collection/components/image-overlay/image-overlay.js.map +1 -1
  57. package/dist/collection/components/info/info.js.map +1 -1
  58. package/dist/collection/components/info-button/info-button.interfaces.js.map +1 -1
  59. package/dist/collection/components/info-button/info-button.js.map +1 -1
  60. package/dist/collection/components/label/label.js.map +1 -1
  61. package/dist/collection/components/list-button/list-button.interfaces.js.map +1 -1
  62. package/dist/collection/components/list-button/list-button.js +41 -10
  63. package/dist/collection/components/list-button/list-button.js.map +1 -1
  64. package/dist/collection/components/logo/logo.css +1 -1
  65. package/dist/collection/components/logo/logo.js +1 -1
  66. package/dist/collection/components/logo/logo.js.map +1 -1
  67. package/dist/collection/components/map-base-layers/map-base-layers.interfaces.js.map +1 -1
  68. package/dist/collection/components/map-base-layers/map-base-layers.js.map +1 -1
  69. package/dist/collection/components/map-controls/map-controls.interfaces.js.map +1 -1
  70. package/dist/collection/components/map-controls/map-controls.js.map +1 -1
  71. package/dist/collection/components/map-overlays/map-overlays.interfaces.js.map +1 -1
  72. package/dist/collection/components/map-overlays/map-overlays.js.map +1 -1
  73. package/dist/collection/components/mark-bar/mark-bar.interfaces.js.map +1 -1
  74. package/dist/collection/components/mark-bar/mark-bar.js.map +1 -1
  75. package/dist/collection/components/modal/modal.interfaces.js.map +1 -1
  76. package/dist/collection/components/modal/modal.js +3 -1
  77. package/dist/collection/components/modal/modal.js.map +1 -1
  78. package/dist/collection/components/ozon-content/get-node-name.function.js.map +1 -1
  79. package/dist/collection/components/ozon-content/nodes/al.node.js.map +1 -1
  80. package/dist/collection/components/ozon-content/nodes/bron.node.js.map +1 -1
  81. package/dist/collection/components/ozon-content/nodes/document.node.js.map +1 -1
  82. package/dist/collection/components/ozon-content/nodes/ext-ref.node.js.map +1 -1
  83. package/dist/collection/components/ozon-content/nodes/fallback.node.js.map +1 -1
  84. package/dist/collection/components/ozon-content/nodes/figuur.node.js.map +1 -1
  85. package/dist/collection/components/ozon-content/nodes/inhoud.node.js.map +1 -1
  86. package/dist/collection/components/ozon-content/nodes/inline-tekst-afbeelding.node.js.map +1 -1
  87. package/dist/collection/components/ozon-content/nodes/inline.nodes.js.map +1 -1
  88. package/dist/collection/components/ozon-content/nodes/int-io-ref.node.js.map +1 -1
  89. package/dist/collection/components/ozon-content/nodes/int-ref.node.js.map +1 -1
  90. package/dist/collection/components/ozon-content/nodes/lijst.node.js.map +1 -1
  91. package/dist/collection/components/ozon-content/nodes/nieuwe-tekst.node.js.map +1 -1
  92. package/dist/collection/components/ozon-content/nodes/noot.node.js.map +1 -1
  93. package/dist/collection/components/ozon-content/nodes/opschrift.node.js.map +1 -1
  94. package/dist/collection/components/ozon-content/nodes/table.node/colspec/colspec-mapper.js.map +1 -1
  95. package/dist/collection/components/ozon-content/nodes/table.node/colspec/colspec.interface.js.map +1 -1
  96. package/dist/collection/components/ozon-content/nodes/table.node/index.js.map +1 -1
  97. package/dist/collection/components/ozon-content/nodes/table.node/table-cell.js.map +1 -1
  98. package/dist/collection/components/ozon-content/nodes/table.node/table-colgroup.js.map +1 -1
  99. package/dist/collection/components/ozon-content/nodes/table.node/table-rows.js.map +1 -1
  100. package/dist/collection/components/ozon-content/nodes/table.node/table.node.js.map +1 -1
  101. package/dist/collection/components/ozon-content/nodes/text.node.js.map +1 -1
  102. package/dist/collection/components/ozon-content/nodes/verwijderde-tekst.node.js.map +1 -1
  103. package/dist/collection/components/ozon-content/ozon-content-context.interface.js.map +1 -1
  104. package/dist/collection/components/ozon-content/ozon-content-mapper.js.map +1 -1
  105. package/dist/collection/components/ozon-content/ozon-content-node-context.interface.js.map +1 -1
  106. package/dist/collection/components/ozon-content/ozon-content-node-state.interface.js.map +1 -1
  107. package/dist/collection/components/ozon-content/ozon-content-node.interface.js.map +1 -1
  108. package/dist/collection/components/ozon-content/ozon-content.interfaces.js.map +1 -1
  109. package/dist/collection/components/ozon-content/ozon-content.js.map +1 -1
  110. package/dist/collection/components/pagination/pagination.interfaces.js.map +1 -1
  111. package/dist/collection/components/pagination/pagination.js.map +1 -1
  112. package/dist/collection/components/progress-bar/progress-bar.js.map +1 -1
  113. package/dist/collection/components/progress-indicator/progress-indicator.js.map +1 -1
  114. package/dist/collection/components/responsive-element/responsive-element.interfaces.js.map +1 -1
  115. package/dist/collection/components/responsive-element/responsive-element.js.map +1 -1
  116. package/dist/collection/components/scrollable/scrollable.interfaces.js.map +1 -1
  117. package/dist/collection/components/scrollable/scrollable.js.map +1 -1
  118. package/dist/collection/components/selectable/selectable.interfaces.js.map +1 -1
  119. package/dist/collection/components/selectable/selectable.js.map +1 -1
  120. package/dist/collection/components/slide-toggle/slide-toggle.interfaces.js.map +1 -1
  121. package/dist/collection/components/slide-toggle/slide-toggle.js.map +1 -1
  122. package/dist/collection/components/table/table.js.map +1 -1
  123. package/dist/collection/components/toggletip/toggletip.js.map +1 -1
  124. package/dist/collection/components/tooltip/tooltip.js.map +1 -1
  125. package/dist/collection/components/tree-view/tree-item.js.map +1 -1
  126. package/dist/collection/components/tree-view/tree-view.interfaces.js.map +1 -1
  127. package/dist/collection/components/tree-view/tree-view.js.map +1 -1
  128. package/dist/collection/components/viewer-grid/components/document-panel.js.map +1 -1
  129. package/dist/collection/components/viewer-grid/components/filterpanel.js.map +1 -1
  130. package/dist/collection/components/viewer-grid/components/index.js.map +1 -1
  131. package/dist/collection/components/viewer-grid/components/main-panel.js.map +1 -1
  132. package/dist/collection/components/viewer-grid/components/overlay.js.map +1 -1
  133. package/dist/collection/components/viewer-grid/components/sizing-buttons.js.map +1 -1
  134. package/dist/collection/components/viewer-grid/components/viewer-grid-filterpanel-buttons.js.map +1 -1
  135. package/dist/collection/components/viewer-grid/viewer-grid.interfaces.js.map +1 -1
  136. package/dist/collection/components/viewer-grid/viewer-grid.js.map +1 -1
  137. package/dist/collection/index.js.map +1 -1
  138. package/dist/collection/utils/create-identifier.js.map +1 -1
  139. package/dist/collection/utils/has-overflow.js.map +1 -1
  140. package/dist/collection/utils/is-interactive-element.js.map +1 -1
  141. package/dist/collection/utils/is-modified-event.js.map +1 -1
  142. package/dist/components/dso-date-picker.js +45 -22
  143. package/dist/components/dso-date-picker.js.map +1 -1
  144. package/dist/components/dso-list-button.js +25 -10
  145. package/dist/components/dso-list-button.js.map +1 -1
  146. package/dist/components/dso-logo.js +2 -2
  147. package/dist/components/dso-logo.js.map +1 -1
  148. package/dist/components/dso-modal.js +3 -1
  149. package/dist/components/dso-modal.js.map +1 -1
  150. package/dist/components/expandable.js +17 -6
  151. package/dist/components/expandable.js.map +1 -1
  152. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  153. package/dist/dso-toolkit/dso-toolkit.esm.js.map +1 -1
  154. package/dist/dso-toolkit/{p-2258933b.entry.js → p-1981592d.entry.js} +2 -2
  155. package/dist/dso-toolkit/p-1981592d.entry.js.map +1 -0
  156. package/dist/dso-toolkit/p-638ad5e5.entry.js +2 -0
  157. package/dist/dso-toolkit/p-638ad5e5.entry.js.map +1 -0
  158. package/dist/dso-toolkit/{p-5f39d08c.entry.js → p-b36ab83a.entry.js} +2 -2
  159. package/dist/dso-toolkit/p-b36ab83a.entry.js.map +1 -0
  160. package/dist/dso-toolkit/{p-78baffb7.entry.js → p-ea6ca8b2.entry.js} +2 -2
  161. package/dist/dso-toolkit/p-ea6ca8b2.entry.js.map +1 -0
  162. package/dist/dso-toolkit/p-f6d1d215.entry.js +2 -0
  163. package/dist/dso-toolkit/p-f6d1d215.entry.js.map +1 -0
  164. package/dist/esm/dso-date-picker.entry.js +45 -22
  165. package/dist/esm/dso-date-picker.entry.js.map +1 -1
  166. package/dist/esm/dso-expandable.entry.js +14 -4
  167. package/dist/esm/dso-expandable.entry.js.map +1 -1
  168. package/dist/esm/dso-list-button.entry.js +24 -10
  169. package/dist/esm/dso-list-button.entry.js.map +1 -1
  170. package/dist/esm/dso-logo.entry.js +1 -1
  171. package/dist/esm/dso-logo.entry.js.map +1 -1
  172. package/dist/esm/dso-modal.entry.js +3 -1
  173. package/dist/esm/dso-modal.entry.js.map +1 -1
  174. package/dist/esm/dso-toolkit.js +1 -1
  175. package/dist/esm/loader.js +1 -1
  176. package/dist/scripts/readme.js +78 -0
  177. package/dist/scripts/readme.js.map +1 -0
  178. package/dist/types/components/date-picker/date-picker.d.ts +4 -2
  179. package/dist/types/components/date-picker/date-picker.interfaces.d.ts +5 -1
  180. package/dist/types/components/expandable/expandable.d.ts +4 -0
  181. package/dist/types/components/list-button/list-button.d.ts +8 -0
  182. package/dist/types/components.d.ts +12 -4
  183. package/dist/types/usr/src/app/packages/core/.stencil/scripts/readme.d.ts +1 -0
  184. package/package.json +4 -2
  185. package/dist/dso-toolkit/p-2258933b.entry.js.map +0 -1
  186. package/dist/dso-toolkit/p-5f39d08c.entry.js.map +0 -1
  187. package/dist/dso-toolkit/p-78baffb7.entry.js.map +0 -1
  188. package/dist/dso-toolkit/p-7b36db3a.entry.js +0 -2
  189. package/dist/dso-toolkit/p-7b36db3a.entry.js.map +0 -1
  190. package/dist/dso-toolkit/p-e2f7399e.entry.js +0 -2
  191. package/dist/dso-toolkit/p-e2f7399e.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"info-button.js","sourceRoot":"","sources":["../../../src/components/info-button/info-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAgB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC7F,OAAO,IAAI,MAAM,MAAM,CAAC;AASxB,MAAM,OAAO,UAAU;;;iBAUb,KAAK;;iBAYL,uBAAuB;;EAQ/B;;KAEG;EAEH,KAAK,CAAC,QAAQ;;IACZ,MAAA,IAAI,CAAC,MAAM,0CAAE,KAAK,EAAE,CAAC;EACvB,CAAC;EAEO,YAAY,CAAC,CAAa;IAChC,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;IAC3B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;EACjE,CAAC;EAED,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,IAAC,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;MACrF,cACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,IAAI,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,oBAAoB,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,mBACnE,OAAO,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,EACpF,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,EACpC,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC;QAEzC,gBAAU,IAAI,EAAE,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,GAAa;QAC/E,YAAM,KAAK,EAAC,SAAS,IAAE,IAAI,CAAC,KAAK,CAAQ,CAClC,CACJ,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { h, Component, Event, Prop, EventEmitter, Method, Host, State } from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\n\r\nimport { InfoButtonToggleEvent } from \"./info-button.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-info-button\",\r\n shadow: true,\r\n styleUrl: \"info-button.scss\",\r\n})\r\nexport class InfoButton {\r\n private button?: HTMLButtonElement;\r\n\r\n /**\r\n * Whether the InfoButton is active.\r\n */\r\n @Prop({ mutable: true, reflect: true })\r\n active?: boolean;\r\n\r\n @State()\r\n hover = false;\r\n\r\n /**\r\n * For secondary Info Button.\r\n */\r\n @Prop()\r\n secondary?: boolean;\r\n\r\n /**\r\n * The label.\r\n */\r\n @Prop()\r\n label = \"Toelichting bij optie\";\r\n\r\n /**\r\n * Emitted when the user activates the Info Button.\r\n */\r\n @Event()\r\n dsoToggle!: EventEmitter<InfoButtonToggleEvent>;\r\n\r\n /**\r\n * To set focus to the toggle button.\r\n */\r\n @Method()\r\n async setFocus() {\r\n this.button?.focus();\r\n }\r\n\r\n private handleToggle(e: MouseEvent) {\r\n this.active = !this.active;\r\n this.dsoToggle.emit({ originalEvent: e, active: this.active });\r\n }\r\n\r\n render() {\r\n return (\r\n <Host onMouseenter={() => (this.hover = true)} onMouseleave={() => (this.hover = false)}>\r\n <button\r\n type=\"button\"\r\n class={clsx({ \"dso-open\": !!this.active, \"dso-info-secondary\": !!this.secondary })}\r\n aria-expanded={typeof this.active === \"boolean\" ? this.active.toString() : undefined}\r\n onClick={(e) => this.handleToggle(e)}\r\n ref={(element) => (this.button = element)}\r\n >\r\n <dso-icon icon={this.active || this.hover ? \"info-active\" : \"info\"}></dso-icon>\r\n <span class=\"sr-only\">{this.label}</span>\r\n </button>\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"info-button.js","sourceRoot":"","sources":["../../../../src/components/info-button/info-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAgB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC7F,OAAO,IAAI,MAAM,MAAM,CAAC;AASxB,MAAM,OAAO,UAAU;;;iBAUb,KAAK;;iBAYL,uBAAuB;;EAQ/B;;KAEG;EAEH,KAAK,CAAC,QAAQ;;IACZ,MAAA,IAAI,CAAC,MAAM,0CAAE,KAAK,EAAE,CAAC;EACvB,CAAC;EAEO,YAAY,CAAC,CAAa;IAChC,IA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itter, Method, Host, State } from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\n\r\nimport { InfoButtonToggleEvent } from \"./info-button.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-info-button\",\r\n shadow: true,\r\n styleUrl: \"info-button.scss\",\r\n})\r\nexport class InfoButton {\r\n private button?: HTMLButtonElement;\r\n\r\n /**\r\n * Whether the InfoButton is active.\r\n */\r\n @Prop({ mutable: true, reflect: true })\r\n active?: boolean;\r\n\r\n @State()\r\n hover = false;\r\n\r\n /**\r\n * For secondary Info Button.\r\n */\r\n @Prop()\r\n secondary?: boolean;\r\n\r\n /**\r\n * The label.\r\n */\r\n @Prop()\r\n label = \"Toelichting bij optie\";\r\n\r\n /**\r\n * Emitted when the user activates the Info Button.\r\n */\r\n @Event()\r\n dsoToggle!: EventEmitter<InfoButtonToggleEvent>;\r\n\r\n /**\r\n * To set focus to the toggle button.\r\n */\r\n @Method()\r\n async setFocus() {\r\n this.button?.focus();\r\n }\r\n\r\n private handleToggle(e: MouseEvent) {\r\n this.active = !this.active;\r\n this.dsoToggle.emit({ originalEvent: e, active: this.active });\r\n }\r\n\r\n render() {\r\n return (\r\n <Host onMouseenter={() => (this.hover = true)} onMouseleave={() => (this.hover = false)}>\r\n <button\r\n type=\"button\"\r\n class={clsx({ \"dso-open\": !!this.active, \"dso-info-secondary\": !!this.secondary })}\r\n aria-expanded={typeof this.active === \"boolean\" ? this.active.toString() : undefined}\r\n onClick={(e) => this.handleToggle(e)}\r\n ref={(element) => (this.button = element)}\r\n >\r\n <dso-icon icon={this.active || this.hover ? \"info-active\" : \"info\"}></dso-icon>\r\n <span class=\"sr-only\">{this.label}</span>\r\n </button>\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"label.js","sourceRoot":"","sources":["../../../src/components/label/label.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,CAAC,EACD,SAAS,EAET,OAAO,EACP,KAAK,EAEL,QAAQ,EACR,MA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AG,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;UAEtC,eAAa,CACR;QACN,IAAI,CAAC,SAAS,IAAI,CACjB,cACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,EAC3C,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,EAC7C,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,EAC9C,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,EACxC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;UAExC,YAAM,KAAK,EAAC,SAAS;;YAAa,IAAI,CAAC,SAAS,CAAQ;UACxD,gBAAU,IAAI,EAAC,OAAO,GAAY,CAC3B,CACV,CACI;MACN,IAAI,CAAC,WAAW,IAAI,CACnB,mBACE,SAAS,QACT,EAAE,EAAC,eAAe,EAClB,MAAM,EAAE,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,EACxC,QAAQ,EAAC,KAAK,EACd,QAAQ,EAAC,UAAU,IAElB,IAAI,CAAC,SAAS,CACH,CACf,CACQ,CACZ,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\r\n h,\r\n Component,\r\n ComponentInterface,\r\n Element,\r\n Event,\r\n EventEmitter,\r\n Fragment,\r\n Method,\r\n Prop,\r\n State,\r\n Watch,\r\n Listen,\r\n} from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\nimport debounce from \"debounce\";\r\n\r\nconst resizeObserver = new ResizeObserver(\r\n debounce((entries: ResizeObserverEntry[]) => {\r\n entries.forEach(({ target }) => {\r\n if (isDsoLabelComponent(target)) {\r\n target._truncateLabel();\r\n }\r\n });\r\n }, 150),\r\n);\r\n\r\nfunction isDsoLabelComponent(element: Element): element is HTMLDsoLabelElement {\r\n return element.tagName === \"DSO-LABEL\";\r\n}\r\n\r\nfunction hasEllipses(el: HTMLElement): boolean {\r\n return el.scrollWidth > el.clientWidth;\r\n}\r\n\r\n@Component({\r\n tag: \"dso-label\",\r\n styleUrl: \"label.scss\",\r\n shadow: true,\r\n})\r\nexport class Label implements ComponentInterface {\r\n private labelContent: HTMLSpanElement | undefined;\r\n\r\n private mutationObserver?: MutationObserver;\r\n\r\n @Element()\r\n private host!: HTMLDsoLabelElement;\r\n\r\n /**\r\n * For compact Label\r\n */\r\n @Prop()\r\n compact?: boolean;\r\n\r\n /**\r\n * Shows a button that can be used to remove the Label.\r\n */\r\n @Prop()\r\n removable?: boolean;\r\n\r\n /**\r\n * The status of this Label.\r\n */\r\n @Prop()\r\n status?: \"primary\" | \"info\" | \"success\" | \"warning\" | \"danger\" | \"error\" | \"bright\" | \"attention\";\r\n\r\n /**\r\n * Emitted when the user activates the remove button.\r\n */\r\n @Event()\r\n dsoRemoveClick!: EventEmitter<MouseEvent>;\r\n\r\n @State()\r\n removeHover?: boolean;\r\n\r\n @State()\r\n removeFocus?: boolean;\r\n\r\n /**\r\n * Whether the Label is allowed to truncate the contents if it does not fit the container element.\r\n */\r\n @Prop()\r\n truncate?: boolean;\r\n\r\n @State()\r\n textHover?: boolean;\r\n\r\n @State()\r\n textFocus?: boolean;\r\n\r\n @State()\r\n isTruncated = false;\r\n\r\n @State()\r\n labelText = \"\";\r\n\r\n @Watch(\"removable\")\r\n watchRemovable(removable: boolean) {\r\n if (removable) {\r\n this.startMutationObserver();\r\n } else {\r\n this.stopMutationObserver();\r\n }\r\n }\r\n\r\n @Watch(\"truncate\")\r\n watchTruncate(truncate: boolean) {\r\n if (truncate) {\r\n this.startTruncate();\r\n } else {\r\n this.stopTruncate();\r\n }\r\n }\r\n\r\n @Listen(\"keydown\", { target: \"document\" })\r\n keyDownListener(event: KeyboardEvent) {\r\n if (event.key === \"Escape\") {\r\n this.textHover = false;\r\n this.textFocus = false;\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n @Method()\r\n async _truncateLabel() {\r\n setTimeout(() => {\r\n this.isTruncated = !!this.labelContent && hasEllipses(this.labelContent);\r\n });\r\n }\r\n\r\n private syncLabelText() {\r\n this.labelText = this.host.textContent?.trim() ?? \"\";\r\n }\r\n\r\n componentDidLoad() {\r\n if (this.truncate) {\r\n this.startTruncate();\r\n }\r\n\r\n if (this.removable) {\r\n this.startMutationObserver();\r\n }\r\n }\r\n\r\n disconnectedCallback() {\r\n this.stopTruncate();\r\n\r\n this.stopMutationObserver(true);\r\n }\r\n\r\n /** The mutationObserver fetches the text placed inside the label, this is then used for the remove button and tooltip. */\r\n private startMutationObserver(): void {\r\n this.mutationObserver = new MutationObserver(() => this.syncLabelText());\r\n\r\n this.mutationObserver.observe(this.host, {\r\n characterData: true,\r\n childList: true,\r\n subtree: true,\r\n attributes: true,\r\n });\r\n\r\n this.syncLabelText();\r\n }\r\n\r\n private stopMutationObserver(force = false): void {\r\n if (force || !(this.truncate && this.removable)) {\r\n this.mutationObserver?.disconnect();\r\n\r\n delete this.mutationObserver;\r\n }\r\n }\r\n\r\n private startTruncate(): void {\r\n resizeObserver.observe(this.host);\r\n this.startMutationObserver();\r\n this._truncateLabel();\r\n }\r\n\r\n private stopTruncate(): void {\r\n resizeObserver.unobserve(this.host);\r\n this.stopMutationObserver();\r\n this.isTruncated = false;\r\n }\r\n\r\n render() {\r\n return (\r\n <Fragment>\r\n <span\r\n aria-describedby=\"toggle-anchor\"\r\n class={clsx(\"dso-label\", {\r\n [`dso-label-${this.status}`]: this.status,\r\n \"dso-compact\": this.compact && !this.removable,\r\n \"dso-hover\": this.removeHover || this.removeFocus,\r\n })}\r\n >\r\n <slot name=\"symbol\"></slot>\r\n <span\r\n class={clsx(\"dso-label-content\", {\r\n \"dso-truncate\": !!this.truncate,\r\n })}\r\n ref={(element) => (this.labelContent = element)}\r\n tabindex={this.truncate && this.isTruncated ? 0 : undefined}\r\n onMouseEnter={() => (this.textHover = true)}\r\n onMouseLeave={() => (this.textHover = false)}\r\n onFocus={() => (this.textFocus = true)}\r\n onBlur={() => (this.textFocus = false)}\r\n >\r\n <slot></slot>\r\n </span>\r\n {this.removable && (\r\n <button\r\n type=\"button\"\r\n onClick={(e) => this.dsoRemoveClick.emit(e)}\r\n onMouseEnter={() => (this.removeHover = true)}\r\n onMouseLeave={() => (this.removeHover = false)}\r\n onFocus={() => (this.removeFocus = true)}\r\n onBlur={() => (this.removeFocus = false)}\r\n >\r\n <span class=\"sr-only\">Verwijder: {this.labelText}</span>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n </button>\r\n )}\r\n </span>\r\n {this.isTruncated && (\r\n <dso-tooltip\r\n stateless\r\n id=\"toggle-anchor\"\r\n active={this.textHover || this.textFocus}\r\n position=\"top\"\r\n strategy=\"absolute\"\r\n >\r\n {this.labelText}\r\n </dso-tooltip>\r\n )}\r\n </Fragment>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"label.js","sourceRoot":"","sources":["../../../../src/components/label/label.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,CAAC,EACD,SAAS,EAET,OAAO,EACP,KAAK,EAEL,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,EACL,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,MAAM,cAAc,GAAG,IAAI,cAAc,CACvC,QAAQ,CAAC,CAAC,OAA8B,EAAE,EAAE;EAC1C,OAAO,CAAC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AAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,EAC7C,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,EAC9C,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,EACxC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;UAExC,YAAM,KAAK,EAAC,SAAS;;YAAa,IAAI,CAAC,SAAS,CAAQ;UACxD,gBAAU,IAAI,EAAC,OAAO,GAAY,CAC3B,CACV,CACI;MACN,IAAI,CAAC,WAAW,IAAI,CACnB,mBACE,SAAS,QACT,EAAE,EAAC,eAAe,EAClB,MAAM,EAAE,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,EACxC,QAAQ,EAAC,KAAK,EACd,QAAQ,EAAC,UAAU,IAElB,IAAI,CAAC,SAAS,CACH,CACf,CACQ,CACZ,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\r\n h,\r\n Component,\r\n ComponentInterface,\r\n Element,\r\n Event,\r\n EventEmitter,\r\n Fragment,\r\n Method,\r\n Prop,\r\n State,\r\n Watch,\r\n Listen,\r\n} from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\nimport debounce from \"debounce\";\r\n\r\nconst resizeObserver = new ResizeObserver(\r\n debounce((entries: ResizeObserverEntry[]) => {\r\n entries.forEach(({ target }) => {\r\n if (isDsoLabelComponent(target)) {\r\n target._truncateLabel();\r\n }\r\n });\r\n }, 150),\r\n);\r\n\r\nfunction isDsoLabelComponent(element: Element): element is HTMLDsoLabelElement {\r\n return element.tagName === \"DSO-LABEL\";\r\n}\r\n\r\nfunction hasEllipses(el: HTMLElement): boolean {\r\n return el.scrollWidth > el.clientWidth;\r\n}\r\n\r\n@Component({\r\n tag: \"dso-label\",\r\n styleUrl: \"label.scss\",\r\n shadow: true,\r\n})\r\nexport class Label implements ComponentInterface {\r\n private labelContent: HTMLSpanElement | undefined;\r\n\r\n private mutationObserver?: MutationObserver;\r\n\r\n @Element()\r\n private host!: HTMLDsoLabelElement;\r\n\r\n /**\r\n * For compact Label\r\n */\r\n @Prop()\r\n compact?: boolean;\r\n\r\n /**\r\n * Shows a button that can be used to remove the Label.\r\n */\r\n @Prop()\r\n removable?: boolean;\r\n\r\n /**\r\n * The status of this Label.\r\n */\r\n @Prop()\r\n status?: \"primary\" | \"info\" | \"success\" | \"warning\" | \"danger\" | \"error\" | \"bright\" | \"attention\";\r\n\r\n /**\r\n * Emitted when the user activates the remove button.\r\n */\r\n @Event()\r\n dsoRemoveClick!: EventEmitter<MouseEvent>;\r\n\r\n @State()\r\n removeHover?: boolean;\r\n\r\n @State()\r\n removeFocus?: boolean;\r\n\r\n /**\r\n * Whether the Label is allowed to truncate the contents if it does not fit the container element.\r\n */\r\n @Prop()\r\n truncate?: boolean;\r\n\r\n @State()\r\n textHover?: boolean;\r\n\r\n @State()\r\n textFocus?: boolean;\r\n\r\n @State()\r\n isTruncated = false;\r\n\r\n @State()\r\n labelText = \"\";\r\n\r\n @Watch(\"removable\")\r\n watchRemovable(removable: boolean) {\r\n if (removable) {\r\n this.startMutationObserver();\r\n } else {\r\n this.stopMutationObserver();\r\n }\r\n }\r\n\r\n @Watch(\"truncate\")\r\n watchTruncate(truncate: boolean) {\r\n if (truncate) {\r\n this.startTruncate();\r\n } else {\r\n this.stopTruncate();\r\n }\r\n }\r\n\r\n @Listen(\"keydown\", { target: \"document\" })\r\n keyDownListener(event: KeyboardEvent) {\r\n if (event.key === \"Escape\") {\r\n this.textHover = false;\r\n this.textFocus = false;\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n @Method()\r\n async _truncateLabel() {\r\n setTimeout(() => {\r\n this.isTruncated = !!this.labelContent && hasEllipses(this.labelContent);\r\n });\r\n }\r\n\r\n private syncLabelText() {\r\n this.labelText = this.host.textContent?.trim() ?? \"\";\r\n }\r\n\r\n componentDidLoad() {\r\n if (this.truncate) {\r\n this.startTruncate();\r\n }\r\n\r\n if (this.removable) {\r\n this.startMutationObserver();\r\n }\r\n }\r\n\r\n disconnectedCallback() {\r\n this.stopTruncate();\r\n\r\n this.stopMutationObserver(true);\r\n }\r\n\r\n /** The mutationObserver fetches the text placed inside the label, this is then used for the remove button and tooltip. */\r\n private startMutationObserver(): void {\r\n this.mutationObserver = new MutationObserver(() => this.syncLabelText());\r\n\r\n this.mutationObserver.observe(this.host, {\r\n characterData: true,\r\n childList: true,\r\n subtree: true,\r\n attributes: true,\r\n });\r\n\r\n this.syncLabelText();\r\n }\r\n\r\n private stopMutationObserver(force = false): void {\r\n if (force || !(this.truncate && this.removable)) {\r\n this.mutationObserver?.disconnect();\r\n\r\n delete this.mutationObserver;\r\n }\r\n }\r\n\r\n private startTruncate(): void {\r\n resizeObserver.observe(this.host);\r\n this.startMutationObserver();\r\n this._truncateLabel();\r\n }\r\n\r\n private stopTruncate(): void {\r\n resizeObserver.unobserve(this.host);\r\n this.stopMutationObserver();\r\n this.isTruncated = false;\r\n }\r\n\r\n render() {\r\n return (\r\n <Fragment>\r\n <span\r\n aria-describedby=\"toggle-anchor\"\r\n class={clsx(\"dso-label\", {\r\n [`dso-label-${this.status}`]: this.status,\r\n \"dso-compact\": this.compact && !this.removable,\r\n \"dso-hover\": this.removeHover || this.removeFocus,\r\n })}\r\n >\r\n <slot name=\"symbol\"></slot>\r\n <span\r\n class={clsx(\"dso-label-content\", {\r\n \"dso-truncate\": !!this.truncate,\r\n })}\r\n ref={(element) => (this.labelContent = element)}\r\n tabindex={this.truncate && this.isTruncated ? 0 : undefined}\r\n onMouseEnter={() => (this.textHover = true)}\r\n onMouseLeave={() => (this.textHover = false)}\r\n onFocus={() => (this.textFocus = true)}\r\n onBlur={() => (this.textFocus = false)}\r\n >\r\n <slot></slot>\r\n </span>\r\n {this.removable && (\r\n <button\r\n type=\"button\"\r\n onClick={(e) => this.dsoRemoveClick.emit(e)}\r\n onMouseEnter={() => (this.removeHover = true)}\r\n onMouseLeave={() => (this.removeHover = false)}\r\n onFocus={() => (this.removeFocus = true)}\r\n onBlur={() => (this.removeFocus = false)}\r\n >\r\n <span class=\"sr-only\">Verwijder: {this.labelText}</span>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n </button>\r\n )}\r\n </span>\r\n {this.isTruncated && (\r\n <dso-tooltip\r\n stateless\r\n id=\"toggle-anchor\"\r\n active={this.textHover || this.textFocus}\r\n position=\"top\"\r\n strategy=\"absolute\"\r\n >\r\n {this.labelText}\r\n </dso-tooltip>\r\n )}\r\n </Fragment>\r\n );\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"list-button.interfaces.js","sourceRoot":"","sources":["../../../src/components/list-button/list-button.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export interface ListButtonChangeEvent {\r\n originalEvent?: Event;\r\n /** The value that was set */\r\n count: number;\r\n}\r\n\r\nexport interface ListButtonSelectedEvent {\r\n originalEvent?: Event;\r\n /** The value that was set */\r\n checked: boolean;\r\n}\r\n"]}
1
+ {"version":3,"file":"list-button.interfaces.js","sourceRoot":"","sources":["../../../../src/components/list-button/list-button.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export interface ListButtonChangeEvent {\r\n originalEvent?: Event;\r\n /** The value that was set */\r\n count: number;\r\n}\r\n\r\nexport interface ListButtonSelectedEvent {\r\n originalEvent?: Event;\r\n /** The value that was set */\r\n checked: boolean;\r\n}\r\n"]}
@@ -1,4 +1,4 @@
1
- import { h } from "@stencil/core";
1
+ import { h, forceUpdate, } from "@stencil/core";
2
2
  import { createFocusTrap } from "focus-trap";
3
3
  import clsx from "clsx";
4
4
  export class ListButton {
@@ -12,15 +12,28 @@ export class ListButton {
12
12
  this.max = undefined;
13
13
  this.checked = false;
14
14
  this.disabled = false;
15
+ this.subcontentPrefix = undefined;
15
16
  this.manual = true;
16
17
  }
18
+ get subcontentSlot() {
19
+ return this.host.querySelector("[slot='subcontent']");
20
+ }
17
21
  watchManualCallback() {
18
22
  if (!this.manual && this.manualCount) {
19
23
  this.stopManualCountInput();
20
24
  }
21
25
  }
26
+ connectedCallback() {
27
+ this.mutationObserver = new MutationObserver(() => forceUpdate(this.host));
28
+ this.mutationObserver.observe(this.host, {
29
+ characterData: true,
30
+ childList: true,
31
+ subtree: true,
32
+ attributes: true,
33
+ });
34
+ }
22
35
  componentDidRender() {
23
- var _a;
36
+ var _a, _b;
24
37
  if (this.manualCount !== undefined && this.manualInputWrapperElement && !this.trap) {
25
38
  this.trap = createFocusTrap(this.manualInputWrapperElement, {
26
39
  escapeDeactivates: true,
@@ -37,10 +50,13 @@ export class ListButton {
37
50
  (_a = this.trap) === null || _a === void 0 ? void 0 : _a.deactivate();
38
51
  delete this.trap;
39
52
  }
53
+ (_b = this.subcontentSlot) === null || _b === void 0 ? void 0 : _b.setAttribute("aria-hidden", "true");
40
54
  }
41
55
  disconnectedCallback() {
42
- var _a;
56
+ var _a, _b;
43
57
  (_a = this.trap) === null || _a === void 0 ? void 0 : _a.deactivate();
58
+ (_b = this.mutationObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
59
+ delete this.mutationObserver;
44
60
  }
45
61
  handleOnChange({ target }) {
46
62
  if (target instanceof HTMLInputElement) {
@@ -50,7 +66,7 @@ export class ListButton {
50
66
  stepValue(e, direction) {
51
67
  if (typeof this.count === "number") {
52
68
  const newValue = direction === "increment" ? this.count + 1 : this.count - 1;
53
- if (this.isNewCountValid(newValue) === false) {
69
+ if (!this.isNewCountValid(newValue)) {
54
70
  return;
55
71
  }
56
72
  this.dsoCountChange.emit({
@@ -90,17 +106,14 @@ export class ListButton {
90
106
  this.manualCount = undefined;
91
107
  }
92
108
  isNewCountValid(newValue) {
93
- if (this.min !== undefined &&
109
+ return !(this.min !== undefined &&
94
110
  this.max !== undefined &&
95
- (newValue < Number(this.min) || newValue > Number(this.max))) {
96
- return false;
97
- }
98
- return true;
111
+ (newValue < Number(this.min) || newValue > Number(this.max)));
99
112
  }
100
113
  render() {
101
114
  const showButtonInputs = this.manualCount === undefined;
102
115
  const selected = this.checked || (this.count !== undefined && this.count > 0);
103
- return (h("div", { class: clsx(["dso-button-group", { "dso-disabled": this.disabled }]) }, h("div", { class: clsx(["dso-list-button", { "dso-selected": selected, "dso-single-count": this.count === 1 }]), onClick: (e) => this.handleSelectClick(e) }, h("div", { class: "dso-selectable" }, h("input", { id: "dso-list-button-checkbox", type: "checkbox", value: "list-button", name: "naam", checked: selected, disabled: this.disabled, "aria-label": this.label }), h("label", { htmlFor: "dso-list-button-checkbox" }, this.label)), this.sublabel && h("span", { class: "dso-sublabel" }, this.sublabel), h("slot", { name: "subcontent" })), this.count !== undefined && this.count > 0 && (h("div", { class: "dso-input-number" }, this.manualCount === undefined && this.count > 1 && (h("button", { type: "button", class: "dso-tertiary", disabled: this.count === Number(this.min) || this.disabled, onClick: (e) => this.stepValue(e, "decrement") }, h("dso-icon", { icon: "minus-circle" }), h("span", { class: "sr-only" }, "Aantal verlagen"))), h("div", { class: "dso-input-wrapper" }, this.manualCount === undefined && this.count > 1 && (h("input", { class: "dso-input-step-counter", type: "number", tabIndex: -1, "aria-label": "Aantal", value: this.count, readOnly: true })), h("form", { onSubmit: (e) => this.setCount(e) }, h("div", { ref: (element) => (this.manualInputWrapperElement = element) }, h("input", { class: clsx("form-control", { hidden: showButtonInputs }), type: "number", "aria-label": "Aantal", value: this.manualCount, min: this.min, max: this.max, onInput: (e) => this.handleOnChange(e) })), this.manual === true && (h("button", { class: clsx("dso-manual-input-button", { "sr-only": !showButtonInputs }), type: !showButtonInputs ? "submit" : "button", disabled: this.disabled, onClick: () => showButtonInputs && this.startManualCountInput() }, showButtonInputs ? (h("span", { class: "sr-only" }, "Handmatig aantal invullen")) : (h("span", { class: "sr-only" }, "Zet waarde")))))), showButtonInputs && (h("button", { type: "button", class: "dso-tertiary", disabled: this.count === Number(this.max) || this.disabled, onClick: (e) => this.stepValue(e, "increment") }, h("dso-icon", { icon: "plus-circle" }), h("span", { class: "sr-only" }, "Aantal verhogen")))))));
116
+ return (h("div", { class: clsx(["dso-button-group", { "dso-disabled": this.disabled }]) }, h("div", { class: clsx(["dso-list-button", { "dso-selected": selected, "dso-single-count": this.count === 1 }]), onClick: (e) => this.handleSelectClick(e) }, h("div", { class: "dso-selectable" }, h("input", { id: "dso-list-button-checkbox", type: "checkbox", value: "list-button", name: "naam", "aria-describedby": [this.sublabel && "sublabel", this.subcontentSlot && "description"].filter((s) => !!s).join(" ") || null, checked: selected, disabled: this.disabled }), h("label", { htmlFor: "dso-list-button-checkbox" }, this.label), this.subcontentSlot && (h("div", { class: "sr-only", id: "description" }, this.subcontentPrefix && this.subcontentPrefix + ":", h("div", { innerHTML: this.subcontentSlot.innerHTML })))), this.sublabel && (h("span", { class: "dso-sublabel", id: "sublabel" }, this.sublabel)), h("slot", { name: "subcontent" })), this.count !== undefined && this.count > 0 && (h("div", { class: "dso-input-number" }, this.manualCount === undefined && this.count > 1 && (h("button", { type: "button", class: "dso-tertiary", disabled: this.count === Number(this.min) || this.disabled, onClick: (e) => this.stepValue(e, "decrement") }, h("dso-icon", { icon: "minus-circle" }), h("span", { class: "sr-only" }, "Aantal verlagen"))), h("div", { class: "dso-input-wrapper" }, this.manualCount === undefined && this.count > 1 && (h("input", { class: "dso-input-step-counter", type: "number", tabIndex: -1, "aria-label": "Aantal", value: this.count, readOnly: true })), h("form", { onSubmit: (e) => this.setCount(e) }, h("div", { ref: (element) => (this.manualInputWrapperElement = element) }, h("input", { class: clsx("form-control", { hidden: showButtonInputs }), type: "number", "aria-label": "Aantal", value: this.manualCount, min: this.min, max: this.max, onInput: (e) => this.handleOnChange(e) })), this.manual && (h("button", { class: clsx("dso-manual-input-button", { "sr-only": !showButtonInputs }), type: !showButtonInputs ? "submit" : "button", disabled: this.disabled, onClick: () => showButtonInputs && this.startManualCountInput() }, showButtonInputs ? (h("span", { class: "sr-only" }, "Handmatig aantal invullen")) : (h("span", { class: "sr-only" }, "Zet waarde")))))), showButtonInputs && (h("button", { type: "button", class: "dso-tertiary", disabled: this.count === Number(this.max) || this.disabled, onClick: (e) => this.stepValue(e, "increment") }, h("dso-icon", { icon: "plus-circle" }), h("span", { class: "sr-only" }, "Aantal verhogen")))))));
104
117
  }
105
118
  static get is() { return "dso-list-button"; }
106
119
  static get encapsulation() { return "shadow"; }
@@ -237,6 +250,23 @@ export class ListButton {
237
250
  "reflect": true,
238
251
  "defaultValue": "false"
239
252
  },
253
+ "subcontentPrefix": {
254
+ "type": "string",
255
+ "mutable": false,
256
+ "complexType": {
257
+ "original": "string",
258
+ "resolved": "string | undefined",
259
+ "references": {}
260
+ },
261
+ "required": false,
262
+ "optional": true,
263
+ "docs": {
264
+ "tags": [],
265
+ "text": "Prefix to subcontent for the purpose of screenreading."
266
+ },
267
+ "attribute": "subcontent-prefix",
268
+ "reflect": false
269
+ },
240
270
  "manual": {
241
271
  "type": "boolean",
242
272
  "mutable": false,
@@ -308,6 +338,7 @@ export class ListButton {
308
338
  }
309
339
  }];
310
340
  }
341
+ static get elementRef() { return "host"; }
311
342
  static get watchers() {
312
343
  return [{
313
344
  "propName": "manual",
@@ -1 +1 @@
1
- {"version":3,"file":"list-button.js","sourceRoot":"","sources":["../../../src/components/list-button/list-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAG1G,OAAO,EAAE,eAAe,EAAa,MAAM,YAAY,CAAC;AACxD,OAAO,IAAI,MAAM,MAAM,CAAC;AAOxB,MAAM,OAAO,UAAU;;;;;;;;;mBA6CX,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, ComponentInterface, h, Prop, Event, EventEmitter, State, Watch } from \"@stencil/core\";\r\nimport { ListButtonChangeEvent, ListButtonSelectedEvent } from \"./list-button.interfaces\";\r\n\r\nimport { createFocusTrap, FocusTrap } from \"focus-trap\";\r\nimport clsx from \"clsx\";\r\n\r\n@Component({\r\n tag: \"dso-list-button\",\r\n shadow: true,\r\n styleUrl: \"list-button.scss\",\r\n})\r\nexport class ListButton implements ComponentInterface {\r\n private trap?: FocusTrap;\r\n\r\n @State()\r\n private manualInputWrapperElement?: HTMLDivElement;\r\n\r\n private manualInputButtonElement?: HTMLButtonElement;\r\n\r\n @State()\r\n manualCount?: number;\r\n\r\n /**\r\n * The label of the List Button.\r\n */\r\n @Prop()\r\n label?: string;\r\n\r\n /**\r\n * The sublabel of the List Button.\r\n */\r\n @Prop()\r\n sublabel?: string;\r\n\r\n /**\r\n * When defined the count can show on the List Button.\r\n */\r\n @Prop()\r\n count?: number;\r\n\r\n /**\r\n * The minimum value.\r\n */\r\n @Prop()\r\n min?: string | number;\r\n\r\n /**\r\n * The maximum value.\r\n */\r\n @Prop()\r\n max?: string | number;\r\n\r\n /**\r\n * Whether the List Button is checked.\r\n */\r\n @Prop({ reflect: true })\r\n checked = false;\r\n\r\n /**\r\n * Whether the List Button is disabled.\r\n */\r\n @Prop({ reflect: true })\r\n disabled = false;\r\n\r\n /**\r\n * Allow user to directly input a value.\r\n *\r\n * Set to `false` to force users to use plus/minus buttons.\r\n */\r\n @Prop()\r\n manual = true;\r\n\r\n /**\r\n * Emitted when the user changes the count.\r\n */\r\n @Event()\r\n dsoCountChange!: EventEmitter<ListButtonChangeEvent>;\r\n\r\n /**\r\n * Emitted when the user activates the List Button itself.\r\n *\r\n * Does not fire when the user activates the count controls.\r\n */\r\n @Event()\r\n dsoSelectedChange!: EventEmitter<ListButtonSelectedEvent>;\r\n\r\n @Watch(\"manual\")\r\n watchManualCallback() {\r\n if (!this.manual && this.manualCount) {\r\n this.stopManualCountInput();\r\n }\r\n }\r\n\r\n componentDidRender(): void {\r\n if (this.manualCount !== undefined && this.manualInputWrapperElement && !this.trap) {\r\n this.trap = createFocusTrap(this.manualInputWrapperElement, {\r\n escapeDeactivates: true,\r\n setReturnFocus: false,\r\n\r\n clickOutsideDeactivates: (e) => {\r\n this.setCount(e);\r\n\r\n return true;\r\n },\r\n onDeactivate: () => this.stopManualCountInput(),\r\n onPostDeactivate: () => this.manualInputButtonElement?.focus(),\r\n }).activate();\r\n } else if (this.manualCount === undefined && this.trap) {\r\n this.trap?.deactivate();\r\n\r\n delete this.trap;\r\n }\r\n }\r\n\r\n disconnectedCallback(): void {\r\n this.trap?.deactivate();\r\n }\r\n\r\n private handleOnChange({ target }: Event): void {\r\n if (target instanceof HTMLInputElement) {\r\n this.manualCount = target.valueAsNumber;\r\n }\r\n }\r\n\r\n private stepValue(e: Event, direction: \"increment\" | \"decrement\"): void {\r\n if (typeof this.count === \"number\") {\r\n const newValue = direction === \"increment\" ? this.count + 1 : this.count - 1;\r\n\r\n if (this.isNewCountValid(newValue) === false) {\r\n return;\r\n }\r\n\r\n this.dsoCountChange.emit({\r\n originalEvent: e,\r\n count: newValue,\r\n });\r\n }\r\n }\r\n\r\n private setCount(e: Event): void {\r\n e.preventDefault();\r\n\r\n if (typeof this.manualCount === \"number\" && this.isNewCountValid(this.manualCount)) {\r\n this.dsoCountChange.emit({\r\n originalEvent: e,\r\n count: this.manualCount,\r\n });\r\n this.stopManualCountInput();\r\n }\r\n }\r\n\r\n private handleSelectClick(e: Event): void {\r\n e.preventDefault();\r\n\r\n if (this.count !== undefined) {\r\n this.dsoCountChange.emit({\r\n originalEvent: e,\r\n count: this.count > 0 ? 0 : 1,\r\n });\r\n\r\n return;\r\n }\r\n\r\n this.dsoSelectedChange.emit({\r\n originalEvent: e,\r\n checked: !this.checked,\r\n });\r\n }\r\n\r\n private startManualCountInput(): void {\r\n this.manualCount = this.count;\r\n }\r\n\r\n private stopManualCountInput(): void {\r\n this.manualCount = undefined;\r\n }\r\n\r\n private isNewCountValid(newValue: number): boolean {\r\n if (\r\n this.min !== undefined &&\r\n this.max !== undefined &&\r\n (newValue < Number(this.min) || newValue > Number(this.max))\r\n ) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n render() {\r\n const showButtonInputs = this.manualCount === undefined;\r\n\r\n const selected = this.checked || (this.count !== undefined && this.count > 0);\r\n\r\n return (\r\n <div class={clsx([\"dso-button-group\", { \"dso-disabled\": this.disabled }])}>\r\n <div\r\n class={clsx([\"dso-list-button\", { \"dso-selected\": selected, \"dso-single-count\": this.count === 1 }])}\r\n onClick={(e) => this.handleSelectClick(e)}\r\n >\r\n <div class=\"dso-selectable\">\r\n <input\r\n id=\"dso-list-button-checkbox\"\r\n type=\"checkbox\"\r\n value=\"list-button\"\r\n name=\"naam\"\r\n checked={selected}\r\n disabled={this.disabled}\r\n aria-label={this.label}\r\n />\r\n <label htmlFor=\"dso-list-button-checkbox\">{this.label}</label>\r\n </div>\r\n {this.sublabel && <span class=\"dso-sublabel\">{this.sublabel}</span>}\r\n <slot name=\"subcontent\" />\r\n </div>\r\n\r\n {this.count !== undefined && this.count > 0 && (\r\n <div class=\"dso-input-number\">\r\n {this.manualCount === undefined && this.count > 1 && (\r\n <button\r\n type=\"button\"\r\n class=\"dso-tertiary\"\r\n disabled={this.count === Number(this.min) || this.disabled}\r\n onClick={(e) => this.stepValue(e, \"decrement\")}\r\n >\r\n <dso-icon icon=\"minus-circle\"></dso-icon>\r\n <span class=\"sr-only\">Aantal verlagen</span>\r\n </button>\r\n )}\r\n\r\n <div class=\"dso-input-wrapper\">\r\n {this.manualCount === undefined && this.count > 1 && (\r\n <input\r\n class=\"dso-input-step-counter\"\r\n type=\"number\"\r\n tabIndex={-1}\r\n aria-label=\"Aantal\"\r\n value={this.count}\r\n readOnly\r\n />\r\n )}\r\n\r\n <form onSubmit={(e) => this.setCount(e)}>\r\n <div ref={(element) => (this.manualInputWrapperElement = element)}>\r\n <input\r\n class={clsx(\"form-control\", { hidden: showButtonInputs })}\r\n type=\"number\"\r\n aria-label=\"Aantal\"\r\n value={this.manualCount}\r\n min={this.min}\r\n max={this.max}\r\n onInput={(e) => this.handleOnChange(e)}\r\n />\r\n </div>\r\n\r\n {this.manual === true && (\r\n <button\r\n class={clsx(\"dso-manual-input-button\", { \"sr-only\": !showButtonInputs })}\r\n type={!showButtonInputs ? \"submit\" : \"button\"}\r\n disabled={this.disabled}\r\n onClick={() => showButtonInputs && this.startManualCountInput()}\r\n >\r\n {showButtonInputs ? (\r\n <span class=\"sr-only\">Handmatig aantal invullen</span>\r\n ) : (\r\n <span class=\"sr-only\">Zet waarde</span>\r\n )}\r\n </button>\r\n )}\r\n </form>\r\n </div>\r\n\r\n {showButtonInputs && (\r\n <button\r\n type=\"button\"\r\n class=\"dso-tertiary\"\r\n disabled={this.count === Number(this.max) || this.disabled}\r\n onClick={(e) => this.stepValue(e, \"increment\")}\r\n >\r\n <dso-icon icon=\"plus-circle\"></dso-icon>\r\n <span class=\"sr-only\">Aantal verhogen</span>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"list-button.js","sourceRoot":"","sources":["../../../../src/components/list-button/list-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,OAAO,EACP,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,KAAK,EACL,KAAK,EACL,WAAW,GACZ,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,eAAe,EAAa,MAAM,YAAY,CAAC;AACxD,OAAO,IAAI,MAAM,MAAM,CAAC;AAOxB,MAAM,OAAO,UAAU;;;;;;;;;mBAsDX,KAAK;oBAMJ,KAAK;;kB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\r\n forceUpdate,\r\n} from \"@stencil/core\";\r\nimport { ListButtonChangeEvent, ListButtonSelectedEvent } from \"./list-button.interfaces\";\r\n\r\nimport { createFocusTrap, FocusTrap } from \"focus-trap\";\r\nimport clsx from \"clsx\";\r\n\r\n@Component({\r\n tag: \"dso-list-button\",\r\n shadow: true,\r\n styleUrl: \"list-button.scss\",\r\n})\r\nexport class ListButton implements ComponentInterface {\r\n @Element()\r\n host!: HTMLDsoListButtonElement;\r\n\r\n private trap?: FocusTrap;\r\n\r\n private mutationObserver?: MutationObserver;\r\n\r\n private get subcontentSlot() {\r\n return this.host.querySelector<HTMLElement>(\"[slot='subcontent']\");\r\n }\r\n\r\n @State()\r\n private manualInputWrapperElement?: HTMLDivElement;\r\n\r\n private manualInputButtonElement?: HTMLButtonElement;\r\n\r\n @State()\r\n manualCount?: number;\r\n\r\n /**\r\n * The label of the List Button.\r\n */\r\n @Prop()\r\n label?: string;\r\n\r\n /**\r\n * The sublabel of the List Button.\r\n */\r\n @Prop()\r\n sublabel?: string;\r\n\r\n /**\r\n * When defined the count can show on the List Button.\r\n */\r\n @Prop()\r\n count?: number;\r\n\r\n /**\r\n * The minimum value.\r\n */\r\n @Prop()\r\n min?: string | number;\r\n\r\n /**\r\n * The maximum value.\r\n */\r\n @Prop()\r\n max?: string | number;\r\n\r\n /**\r\n * Whether the List Button is checked.\r\n */\r\n @Prop({ reflect: true })\r\n checked = false;\r\n\r\n /**\r\n * Whether the List Button is disabled.\r\n */\r\n @Prop({ reflect: true })\r\n disabled = false;\r\n\r\n /**\r\n * Prefix to subcontent for the purpose of screenreading.\r\n */\r\n @Prop()\r\n subcontentPrefix?: string;\r\n\r\n /**\r\n * Allow user to directly input a value.\r\n *\r\n * Set to `false` to force users to use plus/minus buttons.\r\n */\r\n @Prop()\r\n manual = true;\r\n\r\n /**\r\n * Emitted when the user changes the count.\r\n */\r\n @Event()\r\n dsoCountChange!: EventEmitter<ListButtonChangeEvent>;\r\n\r\n /**\r\n * Emitted when the user activates the List Button itself.\r\n *\r\n * Does not fire when the user activates the count controls.\r\n */\r\n @Event()\r\n dsoSelectedChange!: EventEmitter<ListButtonSelectedEvent>;\r\n\r\n @Watch(\"manual\")\r\n watchManualCallback() {\r\n if (!this.manual && this.manualCount) {\r\n this.stopManualCountInput();\r\n }\r\n }\r\n\r\n connectedCallback() {\r\n this.mutationObserver = new MutationObserver(() => forceUpdate(this.host));\r\n\r\n this.mutationObserver.observe(this.host, {\r\n characterData: true,\r\n childList: true,\r\n subtree: true,\r\n attributes: true,\r\n });\r\n }\r\n\r\n componentDidRender(): void {\r\n if (this.manualCount !== undefined && this.manualInputWrapperElement && !this.trap) {\r\n this.trap = createFocusTrap(this.manualInputWrapperElement, {\r\n escapeDeactivates: true,\r\n setReturnFocus: false,\r\n\r\n clickOutsideDeactivates: (e) => {\r\n this.setCount(e);\r\n\r\n return true;\r\n },\r\n onDeactivate: () => this.stopManualCountInput(),\r\n onPostDeactivate: () => this.manualInputButtonElement?.focus(),\r\n }).activate();\r\n } else if (this.manualCount === undefined && this.trap) {\r\n this.trap?.deactivate();\r\n\r\n delete this.trap;\r\n }\r\n\r\n this.subcontentSlot?.setAttribute(\"aria-hidden\", \"true\");\r\n }\r\n\r\n disconnectedCallback(): void {\r\n this.trap?.deactivate();\r\n\r\n this.mutationObserver?.disconnect();\r\n delete this.mutationObserver;\r\n }\r\n\r\n private handleOnChange({ target }: Event): void {\r\n if (target instanceof HTMLInputElement) {\r\n this.manualCount = target.valueAsNumber;\r\n }\r\n }\r\n\r\n private stepValue(e: Event, direction: \"increment\" | \"decrement\"): void {\r\n if (typeof this.count === \"number\") {\r\n const newValue = direction === \"increment\" ? this.count + 1 : this.count - 1;\r\n\r\n if (!this.isNewCountValid(newValue)) {\r\n return;\r\n }\r\n\r\n this.dsoCountChange.emit({\r\n originalEvent: e,\r\n count: newValue,\r\n });\r\n }\r\n }\r\n\r\n private setCount(e: Event): void {\r\n e.preventDefault();\r\n\r\n if (typeof this.manualCount === \"number\" && this.isNewCountValid(this.manualCount)) {\r\n this.dsoCountChange.emit({\r\n originalEvent: e,\r\n count: this.manualCount,\r\n });\r\n this.stopManualCountInput();\r\n }\r\n }\r\n\r\n private handleSelectClick(e: Event): void {\r\n e.preventDefault();\r\n\r\n if (this.count !== undefined) {\r\n this.dsoCountChange.emit({\r\n originalEvent: e,\r\n count: this.count > 0 ? 0 : 1,\r\n });\r\n\r\n return;\r\n }\r\n\r\n this.dsoSelectedChange.emit({\r\n originalEvent: e,\r\n checked: !this.checked,\r\n });\r\n }\r\n\r\n private startManualCountInput(): void {\r\n this.manualCount = this.count;\r\n }\r\n\r\n private stopManualCountInput(): void {\r\n this.manualCount = undefined;\r\n }\r\n\r\n private isNewCountValid(newValue: number): boolean {\r\n return !(\r\n this.min !== undefined &&\r\n this.max !== undefined &&\r\n (newValue < Number(this.min) || newValue > Number(this.max))\r\n );\r\n }\r\n\r\n render() {\r\n const showButtonInputs = this.manualCount === undefined;\r\n\r\n const selected = this.checked || (this.count !== undefined && this.count > 0);\r\n\r\n return (\r\n <div class={clsx([\"dso-button-group\", { \"dso-disabled\": this.disabled }])}>\r\n <div\r\n class={clsx([\"dso-list-button\", { \"dso-selected\": selected, \"dso-single-count\": this.count === 1 }])}\r\n onClick={(e) => this.handleSelectClick(e)}\r\n >\r\n <div class=\"dso-selectable\">\r\n <input\r\n id=\"dso-list-button-checkbox\"\r\n type=\"checkbox\"\r\n value=\"list-button\"\r\n name=\"naam\"\r\n aria-describedby={\r\n [this.sublabel && \"sublabel\", this.subcontentSlot && \"description\"].filter((s) => !!s).join(\" \") || null\r\n }\r\n checked={selected}\r\n disabled={this.disabled}\r\n />\r\n <label htmlFor=\"dso-list-button-checkbox\">{this.label}</label>\r\n {this.subcontentSlot && (\r\n <div class=\"sr-only\" id=\"description\">\r\n {this.subcontentPrefix && this.subcontentPrefix + \":\"}\r\n <div innerHTML={this.subcontentSlot.innerHTML}></div>\r\n </div>\r\n )}\r\n </div>\r\n {this.sublabel && (\r\n <span class=\"dso-sublabel\" id=\"sublabel\">\r\n {this.sublabel}\r\n </span>\r\n )}\r\n <slot name=\"subcontent\" />\r\n </div>\r\n\r\n {this.count !== undefined && this.count > 0 && (\r\n <div class=\"dso-input-number\">\r\n {this.manualCount === undefined && this.count > 1 && (\r\n <button\r\n type=\"button\"\r\n class=\"dso-tertiary\"\r\n disabled={this.count === Number(this.min) || this.disabled}\r\n onClick={(e) => this.stepValue(e, \"decrement\")}\r\n >\r\n <dso-icon icon=\"minus-circle\"></dso-icon>\r\n <span class=\"sr-only\">Aantal verlagen</span>\r\n </button>\r\n )}\r\n\r\n <div class=\"dso-input-wrapper\">\r\n {this.manualCount === undefined && this.count > 1 && (\r\n <input\r\n class=\"dso-input-step-counter\"\r\n type=\"number\"\r\n tabIndex={-1}\r\n aria-label=\"Aantal\"\r\n value={this.count}\r\n readOnly\r\n />\r\n )}\r\n\r\n <form onSubmit={(e) => this.setCount(e)}>\r\n <div ref={(element) => (this.manualInputWrapperElement = element)}>\r\n <input\r\n class={clsx(\"form-control\", { hidden: showButtonInputs })}\r\n type=\"number\"\r\n aria-label=\"Aantal\"\r\n value={this.manualCount}\r\n min={this.min}\r\n max={this.max}\r\n onInput={(e) => this.handleOnChange(e)}\r\n />\r\n </div>\r\n\r\n {this.manual && (\r\n <button\r\n class={clsx(\"dso-manual-input-button\", { \"sr-only\": !showButtonInputs })}\r\n type={!showButtonInputs ? \"submit\" : \"button\"}\r\n disabled={this.disabled}\r\n onClick={() => showButtonInputs && this.startManualCountInput()}\r\n >\r\n {showButtonInputs ? (\r\n <span class=\"sr-only\">Handmatig aantal invullen</span>\r\n ) : (\r\n <span class=\"sr-only\">Zet waarde</span>\r\n )}\r\n </button>\r\n )}\r\n </form>\r\n </div>\r\n\r\n {showButtonInputs && (\r\n <button\r\n type=\"button\"\r\n class=\"dso-tertiary\"\r\n disabled={this.count === Number(this.max) || this.disabled}\r\n onClick={(e) => this.stepValue(e, \"increment\")}\r\n >\r\n <dso-icon icon=\"plus-circle\"></dso-icon>\r\n <span class=\"sr-only\">Aantal verhogen</span>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
@@ -53,7 +53,7 @@
53
53
  place-self: start end;
54
54
  display: flex;
55
55
  place-items: center;
56
- background-color: #e17000;
56
+ background-color: #8b4a6a;
57
57
  border-radius: 3px;
58
58
  transform: rotate(3deg);
59
59
  padding: 0 8px;
@@ -36,7 +36,7 @@ export class Logo {
36
36
  "text": "The label clarifies the service within the Omgevingsloket, shown\r\nas a subtitle (and on smaller screens as the main wordmark itself)."
37
37
  },
38
38
  "attribute": "label",
39
- "reflect": false
39
+ "reflect": true
40
40
  },
41
41
  "ribbon": {
42
42
  "type": "string",
@@ -1 +1 @@
1
- {"version":3,"file":"logo.js","sourceRoot":"","sources":["../../../src/components/logo/logo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAO7E,MAAM,OAAO,IAAI;;;;;EAgBf,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,kBAAa,CAAC,gBAAgB,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,IAAI,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;MAC9G,WAAK,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,MAAM,EAAC,MAAM,EAAC,KAAK,EAAC,aAAa;QACpE,YAAM,KAAK,EAAC,OAAO,EAAC,CAAC,EAAC,4CAA4C,GAAG;QACrE,YAAM,KAAK,EAAC,QAAQ,EAAC,CAAC,EAAC,0CAA0C,GAAG;QACpE,YAAM,KAAK,EAAC,OAAO,EAAC,CAAC,EAAC,uCAAuC,GAAG,CAC5D;MAEN,WAAK,KAAK,EAAC,eAAe;QACxB,YAAM,KAAK,EAAC,yBAAyB,gBAAiB;QACtD,YAAM,KAAK,EAAC,qBAAqB,YAAa,CAC1C;MAEL,IAAI,CAAC,KAAK,IAAI,YAAM,KAAK,EAAC,YAAY,IAAE,IAAI,CAAC,KAAK,CAAQ;MAC1D,IAAI,CAAC,MAAM,IAAI,WAAK,KAAK,EAAC,aAAa,IAAE,IAAI,CAAC,MAAM,CAAO,CACvD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, ComponentInterface, Host, Prop, h } from \"@stencil/core\";\r\n\r\n@Component({\r\n tag: \"dso-logo\",\r\n styleUrl: \"logo.scss\",\r\n shadow: true,\r\n})\r\nexport class Logo implements ComponentInterface {\r\n /**\r\n * The label clarifies the service within the Omgevingsloket, shown\r\n * as a subtitle (and on smaller screens as the main wordmark itself).\r\n */\r\n @Prop()\r\n label?: string;\r\n\r\n /**\r\n * The ribbon contains the text for a possible 'sticker' on top of the logo.\r\n * Used to clarify the (non-production) server environment (\"int\", \"kta\", \"pfm\", \"pre\", or \"dmo\")\r\n *\r\n */\r\n @Prop()\r\n ribbon?: string;\r\n\r\n render() {\r\n return (\r\n <Host aria-label={[\"Omgevingsloket\", this.label, this.ribbon && `(${this.ribbon})`].filter((s) => !!s).join(\" \")}>\r\n <svg fill=\"none\" viewBox=\"0 0 48 48\" height=\"100%\" class=\"logo-target\">\r\n <path class=\"outer\" d=\"M26 0a24 24 0 1 0 0 47.9A24 24 0 0 0 24 0Z\" />\r\n <path class=\"middle\" d=\"M24 8A16 16 0 0 0 8 24 16 16 0 1 0 24 8Z\" />\r\n <path class=\"inner\" d=\"M24 32a8 8 0 0 0 0-16 8 8 0 0 0 0 16Z\" />\r\n </svg>\r\n\r\n <div class=\"logo-wordmark\">\r\n <span class=\"logo-wordmark-omgevings\">Omgevings</span>\r\n <span class=\"logo-wordmark-loket\">loket</span>\r\n </div>\r\n\r\n {this.label && <span class=\"logo-label\">{this.label}</span>}\r\n {this.ribbon && <div class=\"logo-ribbon\">{this.ribbon}</div>}\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"logo.js","sourceRoot":"","sources":["../../../../src/components/logo/logo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAO7E,MAAM,OAAO,IAAI;;;;;EAgBf,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,kBAAa,CAAC,gBAAgB,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,IAAI,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;MAC9G,WAAK,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,MAAM,EAAC,MAAM,EAAC,KAAK,EAAC,aAAa;QACpE,YAAM,KAAK,EAAC,OAAO,EAAC,CAAC,EAAC,4CAA4C,GAAG;QACrE,YAAM,KAAK,EAAC,QAAQ,EAAC,CAAC,EAAC,0CAA0C,GAAG;QACpE,YAAM,KAAK,EAAC,OAAO,EAAC,CAAC,EAAC,uCAAuC,GAAG,CAC5D;MAEN,WAAK,KAAK,EAAC,eAAe;QACxB,YAAM,KAAK,EAAC,yBAAyB,gBAAiB;QACtD,YAAM,KAAK,EAAC,qBAAqB,YAAa,CAC1C;MAEL,IAAI,CAAC,KAAK,IAAI,YAAM,KAAK,EAAC,YAAY,IAAE,IAAI,CAAC,KAAK,CAAQ;MAC1D,IAAI,CAAC,MAAM,IAAI,WAAK,KAAK,EAAC,aAAa,IAAE,IAAI,CAAC,MAAM,CAAO,CACvD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, ComponentInterface, Host, Prop, h } from \"@stencil/core\";\r\n\r\n@Component({\r\n tag: \"dso-logo\",\r\n styleUrl: \"logo.scss\",\r\n shadow: true,\r\n})\r\nexport class Logo implements ComponentInterface {\r\n /**\r\n * The label clarifies the service within the Omgevingsloket, shown\r\n * as a subtitle (and on smaller screens as the main wordmark itself).\r\n */\r\n @Prop({ reflect: true })\r\n label?: string;\r\n\r\n /**\r\n * The ribbon contains the text for a possible 'sticker' on top of the logo.\r\n * Used to clarify the (non-production) server environment (\"int\", \"kta\", \"pfm\", \"pre\", or \"dmo\")\r\n *\r\n */\r\n @Prop()\r\n ribbon?: string;\r\n\r\n render() {\r\n return (\r\n <Host aria-label={[\"Omgevingsloket\", this.label, this.ribbon && `(${this.ribbon})`].filter((s) => !!s).join(\" \")}>\r\n <svg fill=\"none\" viewBox=\"0 0 48 48\" height=\"100%\" class=\"logo-target\">\r\n <path class=\"outer\" d=\"M26 0a24 24 0 1 0 0 47.9A24 24 0 0 0 24 0Z\" />\r\n <path class=\"middle\" d=\"M24 8A16 16 0 0 0 8 24 16 16 0 1 0 24 8Z\" />\r\n <path class=\"inner\" d=\"M24 32a8 8 0 0 0 0-16 8 8 0 0 0 0 16Z\" />\r\n </svg>\r\n\r\n <div class=\"logo-wordmark\">\r\n <span class=\"logo-wordmark-omgevings\">Omgevings</span>\r\n <span class=\"logo-wordmark-loket\">loket</span>\r\n </div>\r\n\r\n {this.label && <span class=\"logo-label\">{this.label}</span>}\r\n {this.ribbon && <div class=\"logo-ribbon\">{this.ribbon}</div>}\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"map-base-layers.interfaces.js","sourceRoot":"","sources":["../../../src/components/map-base-layers/map-base-layers.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export interface BaseLayer {\r\n id: number;\r\n name: string;\r\n checked?: boolean;\r\n disabled?: boolean;\r\n info?: string;\r\n}\r\n\r\nexport interface BaseLayerChangeEvent {\r\n activeBaseLayer: BaseLayer;\r\n}\r\n"]}
1
+ {"version":3,"file":"map-base-layers.interfaces.js","sourceRoot":"","sources":["../../../../src/components/map-base-layers/map-base-layers.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export interface BaseLayer {\r\n id: number;\r\n name: string;\r\n checked?: boolean;\r\n disabled?: boolean;\r\n info?: string;\r\n}\r\n\r\nexport interface BaseLayerChangeEvent {\r\n activeBaseLayer: BaseLayer;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"map-base-layers.js","sourceRoot":"","sources":["../../../src/components/map-base-layers/map-base-layers.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAoC,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AASpC,MAAM,OAAO,aAAa;;IAEhB,mBAAc,GAA+C,EAAE,CAAC;iBAYhE,MAAM,EAAE;;;EAQR,sBAAsB,CAAC,SAAoB;IACjD,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,eAAe,EAAE,SAAS,EAAE,CAAC,CAAC;EAC/D,CAAC;EAED,kBAAkB;IAChB,IAAI,CAAC,UAAU;OACZ,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,eAAC,OAAA,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAA,MAAA,MAAA,IAAI,CAAC,kBAAkB,0CAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,0CAAE,QAAQ,MAAK,IAAI,CAAA,EAAA,CAAC;OACpG,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;;MACb,MAAA,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,0CAAE,UAAU,CAAC,KAAK,CAAC,CAAC;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Event, EventEmitter, ComponentInterface } from \"@stencil/core\";\r\nimport { v4 as uuidv4 } from \"uuid\";\r\n\r\nimport { BaseLayer, BaseLayerChangeEvent } from \"./map-base-layers.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-map-base-layers\",\r\n styleUrl: \"./map-base-layers.scss\",\r\n shadow: true,\r\n})\r\nexport class MapBaseLayers implements ComponentInterface {\r\n private previousBaselayers: BaseLayer[] | undefined;\r\n private selectableRefs: { [id: number]: HTMLDsoSelectableElement } = {};\r\n\r\n /**\r\n * Emitted when the user checks or unchecks a base layer.\r\n */\r\n @Event()\r\n dsoBaseLayerChange!: EventEmitter<BaseLayerChangeEvent>;\r\n\r\n /**\r\n * To group the overlays together. Generally the default value suffices.\r\n */\r\n @Prop()\r\n group = uuidv4();\r\n\r\n /**\r\n * The base layers.\r\n */\r\n @Prop()\r\n baseLayers!: BaseLayer[];\r\n\r\n private baseLayerChangeHandler(baseLayer: BaseLayer): void {\r\n this.dsoBaseLayerChange.emit({ activeBaseLayer: baseLayer });\r\n }\r\n\r\n componentDidRender() {\r\n this.baseLayers\r\n .filter((l) => !l.disabled && this.previousBaselayers?.find((p) => p.id === l.id)?.disabled === true)\r\n .forEach((o) => {\r\n this.selectableRefs[o.id]?.toggleInfo(false);\r\n });\r\n\r\n this.previousBaselayers = this.baseLayers;\r\n }\r\n\r\n render() {\r\n for (const ref in this.selectableRefs) {\r\n delete this.selectableRefs[ref];\r\n }\r\n\r\n return (\r\n <fieldset class=\"form-group dso-radios\">\r\n <legend class=\"sr-only\">Achtergrond</legend>\r\n <div class=\"dso-label-container\">\r\n <span class=\"control-label\" aria-hidden=\"true\">\r\n Achtergrond\r\n </span>\r\n </div>\r\n <div class=\"dso-field-container\">\r\n {this.baseLayers.map((baseLayer) => (\r\n <dso-selectable\r\n key={baseLayer.id}\r\n type=\"radio\"\r\n value={baseLayer.name}\r\n checked={baseLayer.checked}\r\n disabled={baseLayer.disabled}\r\n name={this.group}\r\n ref={(ref) => ref && (this.selectableRefs[baseLayer.id] = ref)}\r\n onDsoChange={() => this.baseLayerChangeHandler(baseLayer)}\r\n >\r\n {baseLayer.name}\r\n {baseLayer.info ? <p slot=\"info\">{baseLayer.info}</p> : null}\r\n </dso-selectable>\r\n ))}\r\n </div>\r\n </fieldset>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"map-base-layers.js","sourceRoot":"","sources":["../../../../src/components/map-base-layers/map-base-layers.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAoC,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AASpC,MAAM,OAAO,aAAa;;IAEhB,mBAAc,GAA+C,EAAE,CAAC;iBAYhE,MAAM,EAAE;;;EAQR,sBAAsB,CAAC,SAAoB;IACjD,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,eAAe,EAAE,SAAS,EAAE,CAAC,CAAC;EAC/D,CAAC;EAED,kBAAkB;IAChB,IAAI,CAAC,UAAU;OACZ,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,eAAC,OAAA,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAA,MAAA,MAAA,IAAI,CAAC,kBAAkB,0CAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,0CAAE,QAAQ,MAAK,IAAI,CAAA,EAAA,CAAC;OACpG,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;;MACb,MAAA,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,0CAAE,UAAU,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEL,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,UAAU,CAAC;EAC5C,CAAC;EAED,MAAM;IACJ,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,cAAc,EAAE;MACrC,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;KACjC;IAED,OAAO,CACL,gBAAU,KAAK,EAAC,uBAAuB;MACrC,cAAQ,KAAK,EAAC,SAAS,kBAAqB;MAC5C,WAAK,KAAK,EAAC,qBAAqB;QAC9B,YAAM,KAAK,EAAC,eAAe,iBAAa,MAAM,kBAEvC,CACH;MACN,WAAK,KAAK,EAAC,qBAAqB,IAC7B,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAClC,sBACE,GAAG,EAAE,SAAS,CAAC,EAAE,EACjB,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,SAAS,CAAC,IAAI,EACrB,OAAO,EAAE,SAAS,CAAC,OAAO,EAC1B,QAAQ,EAAE,SAAS,CAAC,QAAQ,EAC5B,IAAI,EAAE,IAAI,CAAC,KAAK,EAChB,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,EAC9D,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,sBAAsB,CAAC,SAAS,CAAC;QAExD,SAAS,CAAC,IAAI;QACd,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,SAAG,IAAI,EAAC,MAAM,IAAE,SAAS,CAAC,IAAI,CAAK,CAAC,CAAC,CAAC,IAAI,CAC7C,CAClB,CAAC,CACE,CACG,CACZ,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop, Event, EventEmitter, ComponentInterface } from \"@stencil/core\";\r\nimport { v4 as uuidv4 } from \"uuid\";\r\n\r\nimport { BaseLayer, BaseLayerChangeEvent } from \"./map-base-layers.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-map-base-layers\",\r\n styleUrl: \"./map-base-layers.scss\",\r\n shadow: true,\r\n})\r\nexport class MapBaseLayers implements ComponentInterface {\r\n private previousBaselayers: BaseLayer[] | undefined;\r\n private selectableRefs: { [id: number]: HTMLDsoSelectableElement } = {};\r\n\r\n /**\r\n * Emitted when the user checks or unchecks a base layer.\r\n */\r\n @Event()\r\n dsoBaseLayerChange!: EventEmitter<BaseLayerChangeEvent>;\r\n\r\n /**\r\n * To group the overlays together. Generally the default value suffices.\r\n */\r\n @Prop()\r\n group = uuidv4();\r\n\r\n /**\r\n * The base layers.\r\n */\r\n @Prop()\r\n baseLayers!: BaseLayer[];\r\n\r\n private baseLayerChangeHandler(baseLayer: BaseLayer): void {\r\n this.dsoBaseLayerChange.emit({ activeBaseLayer: baseLayer });\r\n }\r\n\r\n componentDidRender() {\r\n this.baseLayers\r\n .filter((l) => !l.disabled && this.previousBaselayers?.find((p) => p.id === l.id)?.disabled === true)\r\n .forEach((o) => {\r\n this.selectableRefs[o.id]?.toggleInfo(false);\r\n });\r\n\r\n this.previousBaselayers = this.baseLayers;\r\n }\r\n\r\n render() {\r\n for (const ref in this.selectableRefs) {\r\n delete this.selectableRefs[ref];\r\n }\r\n\r\n return (\r\n <fieldset class=\"form-group dso-radios\">\r\n <legend class=\"sr-only\">Achtergrond</legend>\r\n <div class=\"dso-label-container\">\r\n <span class=\"control-label\" aria-hidden=\"true\">\r\n Achtergrond\r\n </span>\r\n </div>\r\n <div class=\"dso-field-container\">\r\n {this.baseLayers.map((baseLayer) => (\r\n <dso-selectable\r\n key={baseLayer.id}\r\n type=\"radio\"\r\n value={baseLayer.name}\r\n checked={baseLayer.checked}\r\n disabled={baseLayer.disabled}\r\n name={this.group}\r\n ref={(ref) => ref && (this.selectableRefs[baseLayer.id] = ref)}\r\n onDsoChange={() => this.baseLayerChangeHandler(baseLayer)}\r\n >\r\n {baseLayer.name}\r\n {baseLayer.info ? <p slot=\"info\">{baseLayer.info}</p> : null}\r\n </dso-selectable>\r\n ))}\r\n </div>\r\n </fieldset>\r\n );\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"map-controls.interfaces.js","sourceRoot":"","sources":["../../../src/components/map-controls/map-controls.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export interface MapControlsToggleEvent {\r\n originalEvent?: MouseEvent | KeyboardEvent;\r\n open: boolean;\r\n}\r\n"]}
1
+ {"version":3,"file":"map-controls.interfaces.js","sourceRoot":"","sources":["../../../../src/components/map-controls/map-controls.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export interface MapControlsToggleEvent {\r\n originalEvent?: MouseEvent | KeyboardEvent;\r\n open: boolean;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"map-controls.js","sourceRoot":"","sources":["../../../src/components/map-controls/map-controls.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAGpG,wDAAwD;AACxD,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAO/B,MAAM,OAAO,WAAW;;IACd,eAAU,GAAG,YAAY,CAAC;IAyElC,kDAAmD;IACnD,mDAAoD;gBApE7C,KAAK;;uBAkCE,CAAC,IAAI,CAAC,IAAI;;EAGxB,SAAS,CAAC,IAAa;IACrB,IAAI,IAAI,EAAE;MACR,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;MAEzB,UAAU,CAAC,GAAG,EAAE,WAAC,OAAA,MAAA,uBAAA,IAAI,uCAAoB,0CAAE,KAAK,EAAE,CAAA,EAAA,EAAE,kBAAkB,CAAC,CAAC;KACzE;SAAM;MACL,UAAU,CAAC,GAAG,EAAE;;QACd,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QAExB,MAAA,uBAAA,IAAI,wCAAqB,0CAAE,KAAK,EAAE,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,CAC3B,CACL;MACN,eAAS,MAAM,EAAE,IAAI,CAAC,WAAW;QAC/B;UACE,cAAK,IAAI,CAAC,UAAU,CAAM;UAC1B,cACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,cAAc,EACpB,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,EACxC,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,uBAAA,IAAI,mCAAuB,OAAO,MAAA,CAAC;YAEtD;;cAAsB,IAAI,CAAC,UAAU,CAAQ;YAC7C,gBAAU,IAAI,EAAC,OAAO,GAAY,CAC3B,CACF;QACT;UACE,WAAK,KAAK,EAAC,SAAS;YAClB,eAAa,CACT,CACS,CACT,CACL,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Host, Prop, Event, EventEmitter, State, Watch, Method } from \"@stencil/core\";\r\nimport { MapControlsToggleEvent } from \"./map-controls.interfaces\";\r\n\r\n// Sync with $transition-duration in ./map-controls.scss\r\nconst transitionDuration = 300;\r\n\r\n@Component({\r\n tag: \"dso-map-controls\",\r\n styleUrl: \"./map-controls.scss\",\r\n shadow: true,\r\n})\r\nexport class MapControls {\r\n private panelTitle = \"Kaartlagen\";\r\n\r\n /**\r\n * To show and hide the Map Controls.\r\n */\r\n @Prop({ reflect: true, mutable: true })\r\n open = false;\r\n\r\n /**\r\n * To disable the zoom controls:\r\n *\r\n * * `in`: Disable zoom in button.\r\n * * `out`: Disable zoom out button.\r\n * * `both`: Disable zoom in and zoom out.\r\n */\r\n @Prop()\r\n disableZoom?: \"in\" | \"out\" | \"both\";\r\n\r\n /**\r\n * Emitted when the user activates the zoom in button.\r\n */\r\n @Event()\r\n dsoZoomIn!: EventEmitter<MouseEvent>;\r\n\r\n /**\r\n * Emitted when the user activates the zoom out button.\r\n */\r\n @Event()\r\n dsoZoomOut!: EventEmitter<MouseEvent>;\r\n\r\n /**\r\n * emits when the panel opens or closes.\r\n *\r\n * - `event.detail.originalEvent` contains the original `MouseEvent / KeyboardEvent` when the panel is toggled by clicking the visibility button or the close button.\r\n * - `event.detail.open` is true when the panel opens and false when the panel closes.\r\n */\r\n @Event()\r\n dsoToggle!: EventEmitter<MapControlsToggleEvent>;\r\n\r\n @State()\r\n hideContent = !this.open;\r\n\r\n @Watch(\"open\")\r\n watchOpen(open: boolean) {\r\n if (open) {\r\n this.hideContent = false;\r\n\r\n setTimeout(() => this.#closeButtonElement?.focus(), transitionDuration);\r\n } else {\r\n setTimeout(() => {\r\n this.hideContent = true;\r\n\r\n this.#toggleButtonElement?.focus();\r\n }, transitionDuration);\r\n }\r\n }\r\n\r\n /**\r\n * Emitted when the visibility is toggled.\r\n *\r\n * Can be used to recalculate map widths or reposition center when the Map Controls opens or closes.\r\n * @param e\r\n */\r\n @Method()\r\n async toggleVisibility(e: MouseEvent | KeyboardEvent) {\r\n this.open = !this.open;\r\n\r\n this.dsoToggle.emit({\r\n originalEvent: e,\r\n open: this.open,\r\n });\r\n }\r\n\r\n #closeButtonElement: HTMLButtonElement | undefined;\r\n #toggleButtonElement: HTMLButtonElement | undefined;\r\n\r\n render() {\r\n return (\r\n <Host>\r\n <button\r\n type=\"button\"\r\n id=\"toggle-visibility-button\"\r\n class=\"toggle-visibility-button\"\r\n onClick={(e) => this.toggleVisibility(e)}\r\n ref={(element) => (this.#toggleButtonElement = element)}\r\n >\r\n <dso-icon icon=\"layers\"></dso-icon>\r\n <span>Kaartlagen</span>\r\n </button>\r\n <div class=\"zoom-buttons\">\r\n <button\r\n type=\"button\"\r\n onClick={(e) => this.dsoZoomIn.emit(e)}\r\n disabled={this.disableZoom === \"in\" || this.disableZoom === \"both\"}\r\n >\r\n <span>Zoom in</span>\r\n <dso-icon icon=\"plus\"></dso-icon>\r\n </button>\r\n <button\r\n type=\"button\"\r\n onClick={(e) => this.dsoZoomOut.emit(e)}\r\n disabled={this.disableZoom === \"out\" || this.disableZoom === \"both\"}\r\n >\r\n <span>Zoom uit</span>\r\n <dso-icon icon=\"minus\"></dso-icon>\r\n </button>\r\n </div>\r\n <section hidden={this.hideContent}>\r\n <header>\r\n <h2>{this.panelTitle}</h2>\r\n <button\r\n type=\"button\"\r\n class=\"close-button\"\r\n onClick={(e) => this.toggleVisibility(e)}\r\n ref={(element) => (this.#closeButtonElement = element)}\r\n >\r\n <span>Verberg paneel {this.panelTitle}</span>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n </button>\r\n </header>\r\n <dso-scrollable>\r\n <div class=\"content\">\r\n <slot></slot>\r\n </div>\r\n </dso-scrollable>\r\n </section>\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"map-controls.js","sourceRoot":"","sources":["../../../../src/components/map-controls/map-controls.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAGpG,wDAAwD;AACxD,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAO/B,MAAM,OAAO,WAAW;;IACd,eAAU,GAAG,YAAY,CAAC;IAyElC,kDAAmD;IACnD,mDAAoD;gBApE7C,KAAK;;uBAkCE,CAAC,IAAI,CAAC,IAAI;;EAGxB,SAAS,CAAC,IAAa;IACrB,IAAI,IAAI,EAAE;MACR,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;MAEzB,UAAU,CAAC,GAAG,EAAE,WAAC,OAAA,MAAA,uBAAA,IAAI,uCAAoB,0CAAE,KAAK,EAAE,CAAA,EAAA,EAAE,kBAAkB,CAAC,CAAC;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ACvC,QAAQ,EAAE,IAAI,CAAC,WAAW,KAAK,KAAK,IAAI,IAAI,CAAC,WAAW,KAAK,MAAM;UAEnE,2BAAqB;UACrB,gBAAU,IAAI,EAAC,OAAO,GAAY,CAC3B,CACL;MACN,eAAS,MAAM,EAAE,IAAI,CAAC,WAAW;QAC/B;UACE,cAAK,IAAI,CAAC,UAAU,CAAM;UAC1B,cACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,cAAc,EACpB,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,EACxC,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,uBAAA,IAAI,mCAAuB,OAAO,MAAA,CAAC;YAEtD;;cAAsB,IAAI,CAAC,UAAU,CAAQ;YAC7C,gBAAU,IAAI,EAAC,OAAO,GAAY,CAC3B,CACF;QACT;UACE,WAAK,KAAK,EAAC,SAAS;YAClB,eAAa,CACT,CACS,CACT,CACL,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Host, Prop, Event, EventEmitter, State, Watch, Method } from \"@stencil/core\";\r\nimport { MapControlsToggleEvent } from \"./map-controls.interfaces\";\r\n\r\n// Sync with $transition-duration in ./map-controls.scss\r\nconst transitionDuration = 300;\r\n\r\n@Component({\r\n tag: \"dso-map-controls\",\r\n styleUrl: \"./map-controls.scss\",\r\n shadow: true,\r\n})\r\nexport class MapControls {\r\n private panelTitle = \"Kaartlagen\";\r\n\r\n /**\r\n * To show and hide the Map Controls.\r\n */\r\n @Prop({ reflect: true, mutable: true })\r\n open = false;\r\n\r\n /**\r\n * To disable the zoom controls:\r\n *\r\n * * `in`: Disable zoom in button.\r\n * * `out`: Disable zoom out button.\r\n * * `both`: Disable zoom in and zoom out.\r\n */\r\n @Prop()\r\n disableZoom?: \"in\" | \"out\" | \"both\";\r\n\r\n /**\r\n * Emitted when the user activates the zoom in button.\r\n */\r\n @Event()\r\n dsoZoomIn!: EventEmitter<MouseEvent>;\r\n\r\n /**\r\n * Emitted when the user activates the zoom out button.\r\n */\r\n @Event()\r\n dsoZoomOut!: EventEmitter<MouseEvent>;\r\n\r\n /**\r\n * emits when the panel opens or closes.\r\n *\r\n * - `event.detail.originalEvent` contains the original `MouseEvent / KeyboardEvent` when the panel is toggled by clicking the visibility button or the close button.\r\n * - `event.detail.open` is true when the panel opens and false when the panel closes.\r\n */\r\n @Event()\r\n dsoToggle!: EventEmitter<MapControlsToggleEvent>;\r\n\r\n @State()\r\n hideContent = !this.open;\r\n\r\n @Watch(\"open\")\r\n watchOpen(open: boolean) {\r\n if (open) {\r\n this.hideContent = false;\r\n\r\n setTimeout(() => this.#closeButtonElement?.focus(), transitionDuration);\r\n } else {\r\n setTimeout(() => {\r\n this.hideContent = true;\r\n\r\n this.#toggleButtonElement?.focus();\r\n }, transitionDuration);\r\n }\r\n }\r\n\r\n /**\r\n * Emitted when the visibility is toggled.\r\n *\r\n * Can be used to recalculate map widths or reposition center when the Map Controls opens or closes.\r\n * @param e\r\n */\r\n @Method()\r\n async toggleVisibility(e: MouseEvent | KeyboardEvent) {\r\n this.open = !this.open;\r\n\r\n this.dsoToggle.emit({\r\n originalEvent: e,\r\n open: this.open,\r\n });\r\n }\r\n\r\n #closeButtonElement: HTMLButtonElement | undefined;\r\n #toggleButtonElement: HTMLButtonElement | undefined;\r\n\r\n render() {\r\n return (\r\n <Host>\r\n <button\r\n type=\"button\"\r\n id=\"toggle-visibility-button\"\r\n class=\"toggle-visibility-button\"\r\n onClick={(e) => this.toggleVisibility(e)}\r\n ref={(element) => (this.#toggleButtonElement = element)}\r\n >\r\n <dso-icon icon=\"layers\"></dso-icon>\r\n <span>Kaartlagen</span>\r\n </button>\r\n <div class=\"zoom-buttons\">\r\n <button\r\n type=\"button\"\r\n onClick={(e) => this.dsoZoomIn.emit(e)}\r\n disabled={this.disableZoom === \"in\" || this.disableZoom === \"both\"}\r\n >\r\n <span>Zoom in</span>\r\n <dso-icon icon=\"plus\"></dso-icon>\r\n </button>\r\n <button\r\n type=\"button\"\r\n onClick={(e) => this.dsoZoomOut.emit(e)}\r\n disabled={this.disableZoom === \"out\" || this.disableZoom === \"both\"}\r\n >\r\n <span>Zoom uit</span>\r\n <dso-icon icon=\"minus\"></dso-icon>\r\n </button>\r\n </div>\r\n <section hidden={this.hideContent}>\r\n <header>\r\n <h2>{this.panelTitle}</h2>\r\n <button\r\n type=\"button\"\r\n class=\"close-button\"\r\n onClick={(e) => this.toggleVisibility(e)}\r\n ref={(element) => (this.#closeButtonElement = element)}\r\n >\r\n <span>Verberg paneel {this.panelTitle}</span>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n </button>\r\n </header>\r\n <dso-scrollable>\r\n <div class=\"content\">\r\n <slot></slot>\r\n </div>\r\n </dso-scrollable>\r\n </section>\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"map-overlays.interfaces.js","sourceRoot":"","sources":["../../../src/components/map-overlays/map-overlays.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export interface Overlay {\r\n id: number;\r\n name: string;\r\n checked?: boolean;\r\n disabled?: boolean;\r\n info?: string;\r\n}\r\n\r\nexport interface OverlayChangeEvent {\r\n overlay: Overlay;\r\n checked: boolean;\r\n}\r\n"]}
1
+ {"version":3,"file":"map-overlays.interfaces.js","sourceRoot":"","sources":["../../../../src/components/map-overlays/map-overlays.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export interface Overlay {\r\n id: number;\r\n name: string;\r\n checked?: boolean;\r\n disabled?: boolean;\r\n info?: string;\r\n}\r\n\r\nexport interface OverlayChangeEvent {\r\n overlay: Overlay;\r\n checked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AU,KAAK,EAAC,2BAA2B;MACzC,cAAQ,KAAK,EAAC,SAAS,iBAAoB;MAC3C,WAAK,KAAK,EAAC,qBAAqB;QAC9B,YAAM,KAAK,EAAC,eAAe,iBAAa,MAAM,iBAEvC,CACH;MACN,WAAK,KAAK,EAAC,qBAAqB,IAC7B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAC9B,sBACE,GAAG,EAAE,OAAO,CAAC,EAAE,EACf,IAAI,EAAC,UAAU,EACf,KAAK,EAAE,OAAO,CAAC,IAAI,EACnB,OAAO,EAAE,OAAO,CAAC,OAAO,EACxB,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAC1B,IAAI,EAAE,IAAI,CAAC,KAAK,EAChB,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,EAC5D,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,oBAAoB,CAAC,OAAO,EAAE,CAAC,CAAC;QAExD,OAAO,CAAC,IAAI;QACZ,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,SAAG,IAAI,EAAC,MAAM,IAAE,OAAO,CAAC,IAAI,CAAK,CAAC,CAAC,CAAC,IAAI,CACzC,CAClB,CAAC,CACE,CACG,CACZ,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, Prop, h, ComponentInterface } from \"@stencil/core\";\r\nimport { v4 as uuidv4 } from \"uuid\";\r\n\r\nimport { Overlay, OverlayChangeEvent } from \"./map-overlays.interfaces\";\r\n\r\nimport { SelectableChangeEvent } from \"../selectable/selectable.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-map-overlays\",\r\n styleUrl: \"./map-overlays.scss\",\r\n shadow: true,\r\n})\r\nexport class MapOverlays implements ComponentInterface {\r\n private previousOverlays: Overlay[] | undefined;\r\n private selectableRefs: { [id: number]: HTMLDsoSelectableElement } = {};\r\n\r\n /**\r\n * To group the overlays together. Generally the default value suffices.\r\n */\r\n @Prop()\r\n group = uuidv4();\r\n\r\n /**\r\n * The overlays.\r\n */\r\n @Prop()\r\n overlays!: Overlay[];\r\n\r\n /**\r\n * Emitted when the user selects a different overlay.\r\n */\r\n @Event()\r\n dsoToggleOverlay!: EventEmitter<OverlayChangeEvent>;\r\n\r\n private overlayChangeHandler(overlay: Overlay, e: CustomEvent<SelectableChangeEvent>) {\r\n const { checked } = e.detail;\r\n\r\n this.dsoToggleOverlay.emit({ overlay, checked });\r\n }\r\n\r\n componentDidRender() {\r\n this.overlays\r\n .filter((o) => !o.disabled && this.previousOverlays?.find((p) => p.id === o.id)?.disabled === true)\r\n .forEach((o) => {\r\n this.selectableRefs[o.id]?.toggleInfo(false);\r\n });\r\n\r\n this.previousOverlays = this.overlays;\r\n }\r\n\r\n render() {\r\n for (const ref in this.selectableRefs) {\r\n delete this.selectableRefs[ref];\r\n }\r\n\r\n return (\r\n <fieldset class=\"form-group dso-checkboxes\">\r\n <legend class=\"sr-only\">Kaartlagen</legend>\r\n <div class=\"dso-label-container\">\r\n <span class=\"control-label\" aria-hidden=\"true\">\r\n Kaartlagen\r\n </span>\r\n </div>\r\n <div class=\"dso-field-container\">\r\n {this.overlays.map((overlay) => (\r\n <dso-selectable\r\n key={overlay.id}\r\n type=\"checkbox\"\r\n value={overlay.name}\r\n checked={overlay.checked}\r\n disabled={overlay.disabled}\r\n name={this.group}\r\n ref={(ref) => ref && (this.selectableRefs[overlay.id] = ref)}\r\n onDsoChange={(e) => this.overlayChangeHandler(overlay, e)}\r\n >\r\n {overlay.name}\r\n {overlay.info ? <p slot=\"info\">{overlay.info}</p> : null}\r\n </dso-selectable>\r\n ))}\r\n </div>\r\n </fieldset>\r\n );\r\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2BAA2B;MACzC,cAAQ,KAAK,EAAC,SAAS,iBAAoB;MAC3C,WAAK,KAAK,EAAC,qBAAqB;QAC9B,YAAM,KAAK,EAAC,eAAe,iBAAa,MAAM,iBAEvC,CACH;MACN,WAAK,KAAK,EAAC,qBAAqB,IAC7B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAC9B,sBACE,GAAG,EAAE,OAAO,CAAC,EAAE,EACf,IAAI,EAAC,UAAU,EACf,KAAK,EAAE,OAAO,CAAC,IAAI,EACnB,OAAO,EAAE,OAAO,CAAC,OAAO,EACxB,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAC1B,IAAI,EAAE,IAAI,CAAC,KAAK,EAChB,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,EAC5D,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,oBAAoB,CAAC,OAAO,EAAE,CAAC,CAAC;QAExD,OAAO,CAAC,IAAI;QACZ,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,SAAG,IAAI,EAAC,MAAM,IAAE,OAAO,CAAC,IAAI,CAAK,CAAC,CAAC,CAAC,IAAI,CACzC,CAClB,CAAC,CACE,CACG,CACZ,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, Prop, h, ComponentInterface } from \"@stencil/core\";\r\nimport { v4 as uuidv4 } from \"uuid\";\r\n\r\nimport { Overlay, OverlayChangeEvent } from \"./map-overlays.interfaces\";\r\n\r\nimport { SelectableChangeEvent } from \"../selectable/selectable.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-map-overlays\",\r\n styleUrl: \"./map-overlays.scss\",\r\n shadow: true,\r\n})\r\nexport class MapOverlays implements ComponentInterface {\r\n private previousOverlays: Overlay[] | undefined;\r\n private selectableRefs: { [id: number]: HTMLDsoSelectableElement } = {};\r\n\r\n /**\r\n * To group the overlays together. Generally the default value suffices.\r\n */\r\n @Prop()\r\n group = uuidv4();\r\n\r\n /**\r\n * The overlays.\r\n */\r\n @Prop()\r\n overlays!: Overlay[];\r\n\r\n /**\r\n * Emitted when the user selects a different overlay.\r\n */\r\n @Event()\r\n dsoToggleOverlay!: EventEmitter<OverlayChangeEvent>;\r\n\r\n private overlayChangeHandler(overlay: Overlay, e: CustomEvent<SelectableChangeEvent>) {\r\n const { checked } = e.detail;\r\n\r\n this.dsoToggleOverlay.emit({ overlay, checked });\r\n }\r\n\r\n componentDidRender() {\r\n this.overlays\r\n .filter((o) => !o.disabled && this.previousOverlays?.find((p) => p.id === o.id)?.disabled === true)\r\n .forEach((o) => {\r\n this.selectableRefs[o.id]?.toggleInfo(false);\r\n });\r\n\r\n this.previousOverlays = this.overlays;\r\n }\r\n\r\n render() {\r\n for (const ref in this.selectableRefs) {\r\n delete this.selectableRefs[ref];\r\n }\r\n\r\n return (\r\n <fieldset class=\"form-group dso-checkboxes\">\r\n <legend class=\"sr-only\">Kaartlagen</legend>\r\n <div class=\"dso-label-container\">\r\n <span class=\"control-label\" aria-hidden=\"true\">\r\n Kaartlagen\r\n </span>\r\n </div>\r\n <div class=\"dso-field-container\">\r\n {this.overlays.map((overlay) => (\r\n <dso-selectable\r\n key={overlay.id}\r\n type=\"checkbox\"\r\n value={overlay.name}\r\n checked={overlay.checked}\r\n disabled={overlay.disabled}\r\n name={this.group}\r\n ref={(ref) => ref && (this.selectableRefs[overlay.id] = ref)}\r\n onDsoChange={(e) => this.overlayChangeHandler(overlay, e)}\r\n >\r\n {overlay.name}\r\n {overlay.info ? <p slot=\"info\">{overlay.info}</p> : null}\r\n </dso-selectable>\r\n ))}\r\n </div>\r\n </fieldset>\r\n );\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"mark-bar.interfaces.js","sourceRoot":"","sources":["../../../src/components/mark-bar/mark-bar.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export interface MarkBarInputEvent {\r\n originalEvent: Event;\r\n value: string;\r\n}\r\n\r\nexport interface MarkBarPaginationEvent {\r\n originalEvent: MouseEvent | KeyboardEvent;\r\n}\r\n\r\nexport interface MarkBarClearEvent {\r\n originalEvent: MouseEvent;\r\n}\r\n\r\n/**\r\n * Mark Bar focus options\r\n */\r\nexport interface MarkBarFocusOptions {\r\n /**\r\n * Set to true to select all text in the input field when it receives focus.\r\n */\r\n select?: boolean;\r\n}\r\n"]}
1
+ {"version":3,"file":"mark-bar.interfaces.js","sourceRoot":"","sources":["../../../../src/components/mark-bar/mark-bar.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export interface MarkBarInputEvent {\r\n originalEvent: Event;\r\n value: string;\r\n}\r\n\r\nexport interface MarkBarPaginationEvent {\r\n originalEvent: MouseEvent | KeyboardEvent;\r\n}\r\n\r\nexport interface MarkBarClearEvent {\r\n originalEvent: MouseEvent;\r\n}\r\n\r\n/**\r\n * Mark Bar focus options\r\n */\r\nexport interface MarkBarFocusOptions {\r\n /**\r\n * Set to true to select all text in the input field when it receives focus.\r\n */\r\n select?: boolean;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"mark-bar.js","sourceRoot":"","sources":["../../../src/components/mark-bar/mark-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAsB,IAAI,EAAE,KAAK,EAAgB,MAAM,EAAE,MAAM,eAAe,CAAC;AAapG,MAAM,OAAO,OAAO;;IA+DV,gBAAW,GAAG,CAAC,CAAQ,EAAE,EAAE;MACjC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,YAAY,gBAAgB,CAAC,EAAE;QAC3C,OAAO;OACR;MAED,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;QACjB,aA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { h, Component, ComponentInterface, Prop, Event, EventEmitter, Method } from \"@stencil/core\";\r\nimport {\r\n MarkBarInputEvent,\r\n MarkBarClearEvent,\r\n MarkBarPaginationEvent,\r\n MarkBarFocusOptions,\r\n} from \"./mark-bar.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-mark-bar\",\r\n styleUrl: \"./mark-bar.scss\",\r\n shadow: true,\r\n})\r\nexport class MarkBar implements ComponentInterface {\r\n /**\r\n * The current search value.\r\n */\r\n @Prop()\r\n value?: string;\r\n\r\n /**\r\n * The label for the input field.\r\n */\r\n @Prop()\r\n label = \"Zoeken in document\";\r\n\r\n /**\r\n * The current (one-based) highlighted search item.\r\n */\r\n @Prop()\r\n current?: number;\r\n\r\n /**\r\n * Total number of search results.\r\n */\r\n @Prop()\r\n totalCount?: number;\r\n\r\n /**\r\n * Focuses the input field.\r\n */\r\n @Method()\r\n async dsoFocus(options: MarkBarFocusOptions = {}) {\r\n this.inputElement?.focus();\r\n\r\n if (options.select) {\r\n this.inputElement?.select();\r\n }\r\n }\r\n\r\n /**\r\n * Emitted each time the user types in the search field.\r\n */\r\n @Event({ bubbles: false })\r\n dsoInput!: EventEmitter<MarkBarInputEvent>;\r\n\r\n /**\r\n * Emitted when user activates \"next search result\" button.\r\n */\r\n @Event({ bubbles: false })\r\n dsoNext!: EventEmitter<MarkBarPaginationEvent>;\r\n\r\n /**\r\n * Emitted when user activates \"previous search result\" button.\r\n */\r\n @Event({ bubbles: false })\r\n dsoPrevious!: EventEmitter<MarkBarPaginationEvent>;\r\n\r\n /**\r\n * Emitted when user activates \"clear search result\" button.\r\n */\r\n @Event({ bubbles: false })\r\n dsoClear!: EventEmitter<MarkBarClearEvent>;\r\n\r\n private inputElement?: HTMLInputElement;\r\n\r\n private handleInput = (e: Event) => {\r\n if (!(e.target instanceof HTMLInputElement)) {\r\n return;\r\n }\r\n\r\n this.dsoInput.emit({\r\n originalEvent: e,\r\n value: e.target.value,\r\n });\r\n };\r\n\r\n private handleNext = (e: MouseEvent | KeyboardEvent) => {\r\n this.dsoNext.emit({ originalEvent: e });\r\n };\r\n\r\n private handlePrevious = (e: MouseEvent) => {\r\n this.dsoPrevious.emit({ originalEvent: e });\r\n };\r\n\r\n private handleClear = (e: MouseEvent) => {\r\n this.dsoClear.emit({ originalEvent: e });\r\n };\r\n\r\n private handleKeyDown = (e: KeyboardEvent) => {\r\n if (e.key === \"Enter\") {\r\n this.handleNext(e);\r\n }\r\n };\r\n\r\n render() {\r\n const current = this.current || 0;\r\n const totalCount = this.totalCount || 0;\r\n\r\n return (\r\n <div class=\"dso-mark-bar\">\r\n <div class=\"dso-mark-bar-input\">\r\n <input\r\n type=\"text\"\r\n id=\"search-input\"\r\n value={this.value}\r\n onInput={this.handleInput}\r\n onKeyDown={this.handleKeyDown}\r\n placeholder=\" \"\r\n ref={(element) => (this.inputElement = element)}\r\n />\r\n <label htmlFor=\"search-input\">\r\n <dso-icon class=\"dso-search-icon\" icon=\"search\"></dso-icon>\r\n <span class=\"label-text\">{this.label}</span>\r\n </label>\r\n <button type=\"button\" onClick={this.handleClear}>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n <span class=\"sr-only\">Zoekopdracht legen</span>\r\n </button>\r\n </div>\r\n <div class=\"dso-button-container\">\r\n <span class=\"divider\" />\r\n <button type=\"button\" onClick={this.handlePrevious} disabled={current <= 1}>\r\n <dso-icon icon=\"chevron-up\" class=\"hydrated\"></dso-icon>\r\n <span class=\"sr-only\">Vorig zoekresultaat</span>\r\n </button>\r\n <span>\r\n {current}/{totalCount}\r\n </span>\r\n <button type=\"button\" onClick={this.handleNext} disabled={current >= totalCount}>\r\n <dso-icon icon=\"chevron-down\" class=\"hydrated\"></dso-icon>\r\n <span class=\"sr-only\">Volgend zoekresultaat</span>\r\n </button>\r\n </div>\r\n </div>\r\n );\r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OAAO;;UAAG,UAAU,CAChB;QACP,cAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,OAAO,IAAI,UAAU;UAC7E,gBAAU,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,UAAU,GAAY;UAC1D,YAAM,KAAK,EAAC,SAAS,4BAA6B,CAC3C,CACL,CACF,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { h, Component, ComponentInterface, Prop, Event, EventEmitter, Method } from \"@stencil/core\";\r\nimport {\r\n MarkBarInputEvent,\r\n MarkBarClearEvent,\r\n MarkBarPaginationEvent,\r\n MarkBarFocusOptions,\r\n} from \"./mark-bar.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-mark-bar\",\r\n styleUrl: \"./mark-bar.scss\",\r\n shadow: true,\r\n})\r\nexport class MarkBar implements ComponentInterface {\r\n /**\r\n * The current search value.\r\n */\r\n @Prop()\r\n value?: string;\r\n\r\n /**\r\n * The label for the input field.\r\n */\r\n @Prop()\r\n label = \"Zoeken in document\";\r\n\r\n /**\r\n * The current (one-based) highlighted search item.\r\n */\r\n @Prop()\r\n current?: number;\r\n\r\n /**\r\n * Total number of search results.\r\n */\r\n @Prop()\r\n totalCount?: number;\r\n\r\n /**\r\n * Focuses the input field.\r\n */\r\n @Method()\r\n async dsoFocus(options: MarkBarFocusOptions = {}) {\r\n this.inputElement?.focus();\r\n\r\n if (options.select) {\r\n this.inputElement?.select();\r\n }\r\n }\r\n\r\n /**\r\n * Emitted each time the user types in the search field.\r\n */\r\n @Event({ bubbles: false })\r\n dsoInput!: EventEmitter<MarkBarInputEvent>;\r\n\r\n /**\r\n * Emitted when user activates \"next search result\" button.\r\n */\r\n @Event({ bubbles: false })\r\n dsoNext!: EventEmitter<MarkBarPaginationEvent>;\r\n\r\n /**\r\n * Emitted when user activates \"previous search result\" button.\r\n */\r\n @Event({ bubbles: false })\r\n dsoPrevious!: EventEmitter<MarkBarPaginationEvent>;\r\n\r\n /**\r\n * Emitted when user activates \"clear search result\" button.\r\n */\r\n @Event({ bubbles: false })\r\n dsoClear!: EventEmitter<MarkBarClearEvent>;\r\n\r\n private inputElement?: HTMLInputElement;\r\n\r\n private handleInput = (e: Event) => {\r\n if (!(e.target instanceof HTMLInputElement)) {\r\n return;\r\n }\r\n\r\n this.dsoInput.emit({\r\n originalEvent: e,\r\n value: e.target.value,\r\n });\r\n };\r\n\r\n private handleNext = (e: MouseEvent | KeyboardEvent) => {\r\n this.dsoNext.emit({ originalEvent: e });\r\n };\r\n\r\n private handlePrevious = (e: MouseEvent) => {\r\n this.dsoPrevious.emit({ originalEvent: e });\r\n };\r\n\r\n private handleClear = (e: MouseEvent) => {\r\n this.dsoClear.emit({ originalEvent: e });\r\n };\r\n\r\n private handleKeyDown = (e: KeyboardEvent) => {\r\n if (e.key === \"Enter\") {\r\n this.handleNext(e);\r\n }\r\n };\r\n\r\n render() {\r\n const current = this.current || 0;\r\n const totalCount = this.totalCount || 0;\r\n\r\n return (\r\n <div class=\"dso-mark-bar\">\r\n <div class=\"dso-mark-bar-input\">\r\n <input\r\n type=\"text\"\r\n id=\"search-input\"\r\n value={this.value}\r\n onInput={this.handleInput}\r\n onKeyDown={this.handleKeyDown}\r\n placeholder=\" \"\r\n ref={(element) => (this.inputElement = element)}\r\n />\r\n <label htmlFor=\"search-input\">\r\n <dso-icon class=\"dso-search-icon\" icon=\"search\"></dso-icon>\r\n <span class=\"label-text\">{this.label}</span>\r\n </label>\r\n <button type=\"button\" onClick={this.handleClear}>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n <span class=\"sr-only\">Zoekopdracht legen</span>\r\n </button>\r\n </div>\r\n <div class=\"dso-button-container\">\r\n <span class=\"divider\" />\r\n <button type=\"button\" onClick={this.handlePrevious} disabled={current <= 1}>\r\n <dso-icon icon=\"chevron-up\" class=\"hydrated\"></dso-icon>\r\n <span class=\"sr-only\">Vorig zoekresultaat</span>\r\n </button>\r\n <span>\r\n {current}/{totalCount}\r\n </span>\r\n <button type=\"button\" onClick={this.handleNext} disabled={current >= totalCount}>\r\n <dso-icon icon=\"chevron-down\" class=\"hydrated\"></dso-icon>\r\n <span class=\"sr-only\">Volgend zoekresultaat</span>\r\n </button>\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"modal.interfaces.js","sourceRoot":"","sources":["../../../src/components/modal/modal.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export interface ModalCloseEvent {\r\n originalEvent?: MouseEvent | Event;\r\n}\r\n\r\nexport type ModalRole = \"dialog\" | \"alert\" | \"alertdialog\";\r\n\r\nexport type AllowedModalContentTypes = HTMLElement | DocumentFragment | string;\r\n"]}
1
+ {"version":3,"file":"modal.interfaces.js","sourceRoot":"","sources":["../../../../src/components/modal/modal.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export interface ModalCloseEvent {\r\n originalEvent?: MouseEvent | Event;\r\n}\r\n\r\nexport type ModalRole = \"dialog\" | \"alert\" | \"alertdialog\";\r\n\r\nexport type AllowedModalContentTypes = HTMLElement | DocumentFragment | string;\r\n"]}
@@ -14,7 +14,9 @@ export class Modal {
14
14
  }
15
15
  componentDidLoad() {
16
16
  var _a;
17
- (_a = this.htmlDialogElement) === null || _a === void 0 ? void 0 : _a.showModal();
17
+ if ((_a = this.htmlDialogElement) === null || _a === void 0 ? void 0 : _a.isConnected) {
18
+ this.htmlDialogElement.showModal();
19
+ }
18
20
  document.body.classList.add("dso-modal-open");
19
21
  }
20
22
  disconnectedCallback() {
@@ -1 +1 @@
1
- {"version":3,"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UAAU,CAAC,CAAC,CAAC,CACjB,WAAK,KAAK,EAAC,YAAY;UACrB,UAAI,EAAE,EAAE,IAAI,CAAC,MAAM,IAAG,IAAI,CAAC,UAAU,CAAM;UAC1C,IAAI,CAAC,eAAe,IAAI,CACvB,cAAQ,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,WAAW,EAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC;YAC9F,gBAAU,IAAI,EAAC,OAAO,GAAY;YAClC,YAAM,KAAK,EAAC,SAAS,cAAe,CAC7B,CACV,CACG,CACP,CAAC,CAAC,CAAC,CACF,YAAM,KAAK,EAAC,SAAS,EAAC,EAAE,EAAE,IAAI,CAAC,MAAM,cAE9B,CACR;QAED;UACE,WAAK,KAAK,EAAC,UAAU,EAAC,QAAQ,EAAE,CAAC;YAC/B,YAAM,IAAI,EAAC,MAAM,GAAG,CAChB,CACS;QAEhB,IAAI,CAAC,SAAS,IAAI,CACjB,WAAK,KAAK,EAAC,YAAY;UACrB,YAAM,IAAI,EAAC,QAAQ,GAAG,CAClB,CACP,CACG,CACC,CACV,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { h, Component, ComponentInterface, Element, Event, EventEmitter, Prop, State } from \"@stencil/core\";\r\nimport { v4 } from \"uuid\";\r\n\r\nimport { ModalCloseEvent } from \"./modal.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-modal\",\r\n styleUrl: \"modal.scss\",\r\n shadow: true,\r\n})\r\nexport class Modal implements ComponentInterface {\r\n private htmlDialogElement?: HTMLDialogElement;\r\n\r\n @Element()\r\n host!: HTMLDsoModalElement;\r\n\r\n @State()\r\n ariaId = v4();\r\n\r\n @State()\r\n hasFooter?: boolean;\r\n\r\n /**\r\n * when set the modal will be shown in fullscreen.\r\n */\r\n @Prop({ reflect: true })\r\n fullscreen?: boolean;\r\n\r\n /**\r\n * The title of the Modal.\r\n */\r\n @Prop()\r\n modalTitle?: string;\r\n\r\n /**\r\n * the role for the modal `dialog` | `alert` | `alertdialog`.\r\n */\r\n @Prop()\r\n role: string | null = \"dialog\";\r\n\r\n /**\r\n * when `false` the close button in the header will not be rendered. Defaults to `true`.\r\n *\r\n * Needs `modalTitle` to be set.\r\n */\r\n @Prop()\r\n showCloseButton = true;\r\n\r\n /**\r\n * Emitted when the user wants to close the Modal.\r\n */\r\n @Event()\r\n dsoClose!: EventEmitter<ModalCloseEvent>;\r\n\r\n componentWillLoad(): void {\r\n this.hasFooter = this.host.querySelector(\"[slot='footer']\") !== null;\r\n }\r\n\r\n componentDidLoad(): void {\r\n this.htmlDialogElement?.showModal();\r\n document.body.classList.add(\"dso-modal-open\");\r\n }\r\n\r\n disconnectedCallback(): void {\r\n document.body.classList.remove(\"dso-modal-open\");\r\n this.htmlDialogElement?.close();\r\n }\r\n\r\n render() {\r\n return (\r\n <dialog\r\n class=\"dso-modal\"\r\n role={this.role ?? undefined}\r\n aria-modal=\"true\"\r\n aria-labelledby={this.ariaId}\r\n ref={(element) => (this.htmlDialogElement = element)}\r\n onCancel={(e) => {\r\n e.preventDefault();\r\n\r\n this.dsoClose.emit({ originalEvent: e });\r\n }}\r\n >\r\n <div class=\"dso-dialog\" role=\"document\">\r\n {this.modalTitle ? (\r\n <div class=\"dso-header\">\r\n <h2 id={this.ariaId}>{this.modalTitle}</h2>\r\n {this.showCloseButton && (\r\n <button type=\"button\" class=\"dso-close\" onClick={(e) => this.dsoClose.emit({ originalEvent: e })}>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n <span class=\"sr-only\">Sluiten</span>\r\n </button>\r\n )}\r\n </div>\r\n ) : (\r\n <span class=\"sr-only\" id={this.ariaId}>\r\n Dialoog\r\n </span>\r\n )}\r\n\r\n <dso-scrollable>\r\n <div class=\"dso-body\" tabIndex={0}>\r\n <slot name=\"body\" />\r\n </div>\r\n </dso-scrollable>\r\n\r\n {this.hasFooter && (\r\n <div class=\"dso-footer\">\r\n <slot name=\"footer\" />\r\n </div>\r\n )}\r\n </div>\r\n </dialog>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"modal.js","sourceRoot":"","sources":["../../../../src/components/modal/modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAsB,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC5G,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAS1B,MAAM,OAAO,KAAK;;kBAOP,EAAE,EAAE;;;;gBAqBS,QAAQ;2BAQZ,IAAI;;EAQtB,iBAAiB;IACf,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;EACvE,CAAC;EAED,gBAAgB;;IACd,IAAI,MAAA,IAAI,CAAC,iBAAiB,0CAAE,WAAW,EAAE;MACvC,IAAI,CAAC,iBAAiB,CAAC,SAAS,EAAE,CAAC;KACpC;IAED,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;EAChD,CAAC;EAED,oBAAoB;;IAClB,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;IACjD,MAAA,IAAI,CAAC,iBAAiB,0CAAE,KAAK,EAAE,CAAC;EAClC,CAAC;EAED,MAAM;;IACJ,OAAO,CACL,cACE,KAAK,EAAC,WAAW,EACjB,IAAI,EAAE,MAAA,IAAI,CAAC,IAAI,mCAAI,SAAS,gBACjB,MAAM,qBACA,IAAI,CAAC,MAAM,EAC5B,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,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Interface, Element, Event, EventEmitter, Prop, State } from \"@stencil/core\";\r\nimport { v4 } from \"uuid\";\r\n\r\nimport { ModalCloseEvent } from \"./modal.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-modal\",\r\n styleUrl: \"modal.scss\",\r\n shadow: true,\r\n})\r\nexport class Modal implements ComponentInterface {\r\n private htmlDialogElement?: HTMLDialogElement;\r\n\r\n @Element()\r\n host!: HTMLDsoModalElement;\r\n\r\n @State()\r\n ariaId = v4();\r\n\r\n @State()\r\n hasFooter?: boolean;\r\n\r\n /**\r\n * when set the modal will be shown in fullscreen.\r\n */\r\n @Prop({ reflect: true })\r\n fullscreen?: boolean;\r\n\r\n /**\r\n * The title of the Modal.\r\n */\r\n @Prop()\r\n modalTitle?: string;\r\n\r\n /**\r\n * the role for the modal `dialog` | `alert` | `alertdialog`.\r\n */\r\n @Prop()\r\n role: string | null = \"dialog\";\r\n\r\n /**\r\n * when `false` the close button in the header will not be rendered. Defaults to `true`.\r\n *\r\n * Needs `modalTitle` to be set.\r\n */\r\n @Prop()\r\n showCloseButton = true;\r\n\r\n /**\r\n * Emitted when the user wants to close the Modal.\r\n */\r\n @Event()\r\n dsoClose!: EventEmitter<ModalCloseEvent>;\r\n\r\n componentWillLoad(): void {\r\n this.hasFooter = this.host.querySelector(\"[slot='footer']\") !== null;\r\n }\r\n\r\n componentDidLoad(): void {\r\n if (this.htmlDialogElement?.isConnected) {\r\n this.htmlDialogElement.showModal();\r\n }\r\n\r\n document.body.classList.add(\"dso-modal-open\");\r\n }\r\n\r\n disconnectedCallback(): void {\r\n document.body.classList.remove(\"dso-modal-open\");\r\n this.htmlDialogElement?.close();\r\n }\r\n\r\n render() {\r\n return (\r\n <dialog\r\n class=\"dso-modal\"\r\n role={this.role ?? undefined}\r\n aria-modal=\"true\"\r\n aria-labelledby={this.ariaId}\r\n ref={(element) => (this.htmlDialogElement = element)}\r\n onCancel={(e) => {\r\n e.preventDefault();\r\n\r\n this.dsoClose.emit({ originalEvent: e });\r\n }}\r\n >\r\n <div class=\"dso-dialog\" role=\"document\">\r\n {this.modalTitle ? (\r\n <div class=\"dso-header\">\r\n <h2 id={this.ariaId}>{this.modalTitle}</h2>\r\n {this.showCloseButton && (\r\n <button type=\"button\" class=\"dso-close\" onClick={(e) => this.dsoClose.emit({ originalEvent: e })}>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n <span class=\"sr-only\">Sluiten</span>\r\n </button>\r\n )}\r\n </div>\r\n ) : (\r\n <span class=\"sr-only\" id={this.ariaId}>\r\n Dialoog\r\n </span>\r\n )}\r\n\r\n <dso-scrollable>\r\n <div class=\"dso-body\" tabIndex={0}>\r\n <slot name=\"body\" />\r\n </div>\r\n </dso-scrollable>\r\n\r\n {this.hasFooter && (\r\n <div class=\"dso-footer\">\r\n <slot name=\"footer\" />\r\n </div>\r\n )}\r\n </div>\r\n </dialog>\r\n );\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"get-node-name.function.js","sourceRoot":"","sources":["../../../src/components/ozon-content/get-node-name.function.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,WAAW,CAAC,IAAU;EACpC,IAAI,IAAI,YAAY,OAAO,EAAE;IAC3B,OAAO,IAAI,CAAC,SAAS,CAAC;GACvB;EAED,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;IAC/B,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;GAChE;EAED,OAAO,IAAI,CAAC,QAAQ,CAAC;AACvB,CAAC","sourcesContent":["export function getNodeName(node: Node): string {\r\n if (node instanceof Element) {\r\n return node.localName;\r\n }\r\n\r\n if (node.nodeName.includes(\":\")) {\r\n return node.nodeName.substring(node.nodeName.indexOf(\":\") + 1);\r\n }\r\n\r\n return node.nodeName;\r\n}\r\n"]}
1
+ {"version":3,"file":"get-node-name.function.js","sourceRoot":"","sources":["../../../../src/components/ozon-content/get-node-name.function.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,WAAW,CAAC,IAAU;EACpC,IAAI,IAAI,YAAY,OAAO,EAAE;IAC3B,OAAO,IAAI,CAAC,SAAS,CAAC;GACvB;EAED,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;IAC/B,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;GAChE;EAED,OAAO,IAAI,CAAC,QAAQ,CAAC;AACvB,CAAC","sourcesContent":["export function getNodeName(node: Node): string {\r\n if (node instanceof Element) {\r\n return node.localName;\r\n }\r\n\r\n if (node.nodeName.includes(\":\")) {\r\n return node.nodeName.substring(node.nodeName.indexOf(\":\") + 1);\r\n }\r\n\r\n return node.nodeName;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"al.node.js","sourceRoot":"","sources":["../../../../src/components/ozon-content/nodes/al.node.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,SAAS,UAAU,CAAC,IAAY;EAC9B,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;IACrB,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;IAEhC,OAAO,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,WAAW,CAAC;EACvD,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,OAAO,iBAAiB;EAA9B;IACE,SAAI,GAAG,IAAI,CAAC;EA0Bd,CAAC;EAxBC,MAAM,CAAC,IAAa,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAA0B;IAC1E,IAAI,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC5C,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;IAErD,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,eAAe,WAAW,EAAE,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,IAAI,SAAS,CAAC;IAEvF,IAAI,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE;MAC9B,OAAO,GAAG,CACR,YAAM,IAAI,EAAC,WAAW,EAAC,KAAK,EAAE,SAAS,IACpC,OAAO,CACH,CACR,CAAC;KACH;SAAM;MACL,OAAO,GAAG,SAAG,KAAK,EAAE,SAAS,IAAG,OAAO,CAAK,CAAC;KAC9C;IAED,IAAI,WAAW,KAAK,SAAS,EAAE;MAC7B,OAAO,GAAG,eAAM,OAAO,CAAO,CAAC;KAChC;SAAM,IAAI,WAAW,KAAK,WAAW,EAAE;MACtC,OAAO,GAAG,eAAM,OAAO,CAAO,CAAC;KAChC;IAED,OAAO,OAAO,CAAC;EACjB,CAAC;CACF","sourcesContent":["import { h } from \"@stencil/core\";\r\n\r\nimport { getNodeName } from \"../get-node-name.function\";\r\nimport { OzonContentNodeContext } from \"../ozon-content-node-context.interface\";\r\nimport { OzonContentNode } from \"../ozon-content-node.interface\";\r\nimport clsx from \"clsx\";\r\n\r\nfunction isNestedAl(path: Node[]) {\r\n return path.some((n) => {\r\n const nodeName = getNodeName(n);\r\n\r\n return nodeName === \"Al\" || nodeName === \"Opschrift\";\r\n });\r\n}\r\n\r\nexport class OzonContentAlNode implements OzonContentNode {\r\n name = \"Al\";\r\n\r\n render(node: Element, { mapNodeToJsx, path, inline }: OzonContentNodeContext) {\r\n let content = mapNodeToJsx(node.childNodes);\r\n const wijzigactie = node.getAttribute(\"wijzigactie\");\r\n\r\n const className = clsx({ [`wijzigactie-${wijzigactie}`]: !!wijzigactie }) || undefined;\r\n\r\n if (inline || isNestedAl(path)) {\r\n content = (\r\n <span role=\"paragraph\" class={className}>\r\n {content}\r\n </span>\r\n );\r\n } else {\r\n content = <p class={className}>{content}</p>;\r\n }\r\n\r\n if (wijzigactie === \"voegtoe\") {\r\n content = <ins>{content}</ins>;\r\n } else if (wijzigactie === \"verwijder\") {\r\n content = <del>{content}</del>;\r\n }\r\n\r\n return content;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"al.node.js","sourceRoot":"","sources":["../../../../../src/components/ozon-content/nodes/al.node.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,SAAS,UAAU,CAAC,IAAY;EAC9B,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;IACrB,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;IAEhC,OAAO,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,WAAW,CAAC;EACvD,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,OAAO,iBAAiB;EAA9B;IACE,SAAI,GAAG,IAAI,CAAC;EA0Bd,CAAC;EAxBC,MAAM,CAAC,IAAa,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAA0B;IAC1E,IAAI,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC5C,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;IAErD,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,eAAe,WAAW,EAAE,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,IAAI,SAAS,CAAC;IAEvF,IAAI,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE;MAC9B,OAAO,GAAG,CACR,YAAM,IAAI,EAAC,WAAW,EAAC,KAAK,EAAE,SAAS,IACpC,OAAO,CACH,CACR,CAAC;KACH;SAAM;MACL,OAAO,GAAG,SAAG,KAAK,EAAE,SAAS,IAAG,OAAO,CAAK,CAAC;KAC9C;IAED,IAAI,WAAW,KAAK,SAAS,EAAE;MAC7B,OAAO,GAAG,eAAM,OAAO,CAAO,CAAC;KAChC;SAAM,IAAI,WAAW,KAAK,WAAW,EAAE;MACtC,OAAO,GAAG,eAAM,OAAO,CAAO,CAAC;KAChC;IAED,OAAO,OAAO,CAAC;EACjB,CAAC;CACF","sourcesContent":["import { h } from \"@stencil/core\";\r\n\r\nimport { getNodeName } from \"../get-node-name.function\";\r\nimport { OzonContentNodeContext } from \"../ozon-content-node-context.interface\";\r\nimport { OzonContentNode } from \"../ozon-content-node.interface\";\r\nimport clsx from \"clsx\";\r\n\r\nfunction isNestedAl(path: Node[]) {\r\n return path.some((n) => {\r\n const nodeName = getNodeName(n);\r\n\r\n return nodeName === \"Al\" || nodeName === \"Opschrift\";\r\n });\r\n}\r\n\r\nexport class OzonContentAlNode implements OzonContentNode {\r\n name = \"Al\";\r\n\r\n render(node: Element, { mapNodeToJsx, path, inline }: OzonContentNodeContext) {\r\n let content = mapNodeToJsx(node.childNodes);\r\n const wijzigactie = node.getAttribute(\"wijzigactie\");\r\n\r\n const className = clsx({ [`wijzigactie-${wijzigactie}`]: !!wijzigactie }) || undefined;\r\n\r\n if (inline || isNestedAl(path)) {\r\n content = (\r\n <span role=\"paragraph\" class={className}>\r\n {content}\r\n </span>\r\n );\r\n } else {\r\n content = <p class={className}>{content}</p>;\r\n }\r\n\r\n if (wijzigactie === \"voegtoe\") {\r\n content = <ins>{content}</ins>;\r\n } else if (wijzigactie === \"verwijder\") {\r\n content = <del>{content}</del>;\r\n }\r\n\r\n return content;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"bron.node.js","sourceRoot":"","sources":["../../../../src/components/ozon-content/nodes/bron.node.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAKlC,MAAM,OAAO,mBAAmB;EAAhC;IACE,SAAI,GAAG,MAAM,CAAC;EAKhB,CAAC;EAHC,MAAM,CAAC,IAAa,EAAE,EAAE,YAAY,EAA0B;IAC5D,OAAO,YAAM,KAAK,EAAC,eAAe,IAAE,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAQ,CAAC;EAC5E,CAAC;CACF","sourcesContent":["import { h } from \"@stencil/core\";\r\n\r\nimport { OzonContentNodeContext } from \"../ozon-content-node-context.interface\";\r\nimport { OzonContentNode } from \"../ozon-content-node.interface\";\r\n\r\nexport class OzonContentBronNode implements OzonContentNode {\r\n name = \"Bron\";\r\n\r\n render(node: Element, { mapNodeToJsx }: OzonContentNodeContext) {\r\n return <span class=\"dso-ozon-bron\">{mapNodeToJsx(node.childNodes)}</span>;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"bron.node.js","sourceRoot":"","sources":["../../../../../src/components/ozon-content/nodes/bron.node.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAKlC,MAAM,OAAO,mBAAmB;EAAhC;IACE,SAAI,GAAG,MAAM,CAAC;EAKhB,CAAC;EAHC,MAAM,CAAC,IAAa,EAAE,EAAE,YAAY,EAA0B;IAC5D,OAAO,YAAM,KAAK,EAAC,eAAe,IAAE,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAQ,CAAC;EAC5E,CAAC;CACF","sourcesContent":["import { h } from \"@stencil/core\";\r\n\r\nimport { OzonContentNodeContext } from \"../ozon-content-node-context.interface\";\r\nimport { OzonContentNode } from \"../ozon-content-node.interface\";\r\n\r\nexport class OzonContentBronNode implements OzonContentNode {\r\n name = \"Bron\";\r\n\r\n render(node: Element, { mapNodeToJsx }: OzonContentNodeContext) {\r\n return <span class=\"dso-ozon-bron\">{mapNodeToJsx(node.childNodes)}</span>;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"document.node.js","sourceRoot":"","sources":["../../../../src/components/ozon-content/nodes/document.node.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAK5C,MAAM,OAAO,uBAAuB;EAApC;IACE,SAAI,GAAG,WAAW,CAAC;EAKrB,CAAC;EAHC,MAAM,CAAC,IAAU,EAAE,EAAE,YAAY,EAA0B;IACzD,OAAO,EAAC,QAAQ,QAAE,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAY,CAAC;EAC9D,CAAC;CACF","sourcesContent":["import { Fragment, h } from \"@stencil/core\";\r\n\r\nimport { OzonContentNodeContext } from \"../ozon-content-node-context.interface\";\r\nimport { OzonContentNode } from \"../ozon-content-node.interface\";\r\n\r\nexport class OzonContentDocumentNode implements OzonContentNode {\r\n name = \"#document\";\r\n\r\n render(node: Node, { mapNodeToJsx }: OzonContentNodeContext) {\r\n return <Fragment>{mapNodeToJsx(node.childNodes)}</Fragment>;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"document.node.js","sourceRoot":"","sources":["../../../../../src/components/ozon-content/nodes/document.node.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAK5C,MAAM,OAAO,uBAAuB;EAApC;IACE,SAAI,GAAG,WAAW,CAAC;EAKrB,CAAC;EAHC,MAAM,CAAC,IAAU,EAAE,EAAE,YAAY,EAA0B;IACzD,OAAO,EAAC,QAAQ,QAAE,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAY,CAAC;EAC9D,CAAC;CACF","sourcesContent":["import { Fragment, h } from \"@stencil/core\";\r\n\r\nimport { OzonContentNodeContext } from \"../ozon-content-node-context.interface\";\r\nimport { OzonContentNode } from \"../ozon-content-node.interface\";\r\n\r\nexport class OzonContentDocumentNode implements OzonContentNode {\r\n name = \"#document\";\r\n\r\n render(node: Node, { mapNodeToJsx }: OzonContentNodeContext) {\r\n return <Fragment>{mapNodeToJsx(node.childNodes)}</Fragment>;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ext-ref.node.js","sourceRoot":"","sources":["../../../../src/components/ozon-content/nodes/ext-ref.node.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,SAAS,MAAM,kBAAkB,CAAC;AAKzC,MAAM,OAAO,qBAAqB;EAAlC;IACE,SAAI,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;EAahC,CAAC;EAXC,MAAM,CAAC,IAAa,EAAE,EAAE,YAAY,EAA0B;IAC5D,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAChG,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAE1C,OAAO,CACL,SAAG,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB,EAAC,IAAI,EAAE,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,SAAS,EAAE,KAAK,EAAE,SAAS;MACnF,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC;;MAAE,YAAM,KAAK,EAAC,SAAS,8CAA+C;MACpG,gBAAU,IAAI,EAAC,eAAe,GAAY,CACxC,CACL,CAAC;EACJ,CAAC;CACF","sourcesContent":["import { h } from \"@stencil/core\";\r\nimport kebabCase from \"lodash.kebabcase\";\r\n\r\nimport { OzonContentNodeContext } from \"../ozon-content-node-context.interface\";\r\nimport { OzonContentNode } from \"../ozon-content-node.interface\";\r\n\r\nexport class OzonContentExtRefNode implements OzonContentNode {\r\n name = [\"ExtRef\", \"ExtIoRef\"];\r\n\r\n render(node: Element, { mapNodeToJsx }: OzonContentNodeContext) {\r\n const href = node.tagName === \"ExtIoRef\" ? node.getAttribute(\"href\") : node.getAttribute(\"ref\");\r\n const className = kebabCase(node.tagName);\r\n\r\n return (\r\n <a target=\"_blank\" rel=\"noopener noreferrer\" href={href ?? undefined} class={className}>\r\n {mapNodeToJsx(node.childNodes)} <span class=\"sr-only\">(Opent andere website in nieuw tabblad)</span>\r\n <dso-icon icon=\"external-link\"></dso-icon>\r\n </a>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ext-ref.node.js","sourceRoot":"","sources":["../../../../../src/components/ozon-content/nodes/ext-ref.node.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,SAAS,MAAM,kBAAkB,CAAC;AAKzC,MAAM,OAAO,qBAAqB;EAAlC;IACE,SAAI,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;EAahC,CAAC;EAXC,MAAM,CAAC,IAAa,EAAE,EAAE,YAAY,EAA0B;IAC5D,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAChG,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAE1C,OAAO,CACL,SAAG,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB,EAAC,IAAI,EAAE,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,SAAS,EAAE,KAAK,EAAE,SAAS;MACnF,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC;;MAAE,YAAM,KAAK,EAAC,SAAS,8CAA+C;MACpG,gBAAU,IAAI,EAAC,eAAe,GAAY,CACxC,CACL,CAAC;EACJ,CAAC;CACF","sourcesContent":["import { h } from \"@stencil/core\";\r\nimport kebabCase from \"lodash.kebabcase\";\r\n\r\nimport { OzonContentNodeContext } from \"../ozon-content-node-context.interface\";\r\nimport { OzonContentNode } from \"../ozon-content-node.interface\";\r\n\r\nexport class OzonContentExtRefNode implements OzonContentNode {\r\n name = [\"ExtRef\", \"ExtIoRef\"];\r\n\r\n render(node: Element, { mapNodeToJsx }: OzonContentNodeContext) {\r\n const href = node.tagName === \"ExtIoRef\" ? node.getAttribute(\"href\") : node.getAttribute(\"ref\");\r\n const className = kebabCase(node.tagName);\r\n\r\n return (\r\n <a target=\"_blank\" rel=\"noopener noreferrer\" href={href ?? undefined} class={className}>\r\n {mapNodeToJsx(node.childNodes)} <span class=\"sr-only\">(Opent andere website in nieuw tabblad)</span>\r\n <dso-icon icon=\"external-link\"></dso-icon>\r\n </a>\r\n );\r\n }\r\n}\r\n"]}