@dso-toolkit/core 67.0.0 → 67.1.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 (81) hide show
  1. package/dist/cjs/dso-accordion-section.cjs.entry.js +5 -3
  2. package/dist/cjs/dso-accordion-section.cjs.entry.js.map +1 -1
  3. package/dist/cjs/dso-alert_6.cjs.entry.js +19 -3
  4. package/dist/cjs/dso-alert_6.cjs.entry.js.map +1 -1
  5. package/dist/cjs/dso-annotation-locatie_2.cjs.entry.js +31 -9
  6. package/dist/cjs/dso-annotation-locatie_2.cjs.entry.js.map +1 -1
  7. package/dist/cjs/dso-document-card.cjs.entry.js +1 -1
  8. package/dist/cjs/dso-document-card.cjs.entry.js.map +1 -1
  9. package/dist/cjs/dso-toolkit.cjs.js +1 -1
  10. package/dist/cjs/dsot-document-component-demo.cjs.entry.js +8 -3
  11. package/dist/cjs/dsot-document-component-demo.cjs.entry.js.map +1 -1
  12. package/dist/cjs/loader.cjs.js +1 -1
  13. package/dist/collection/components/accordion/components/accordion-section.css +14 -0
  14. package/dist/collection/components/accordion/components/accordion-section.interfaces.js.map +1 -1
  15. package/dist/collection/components/accordion/components/accordion-section.js +39 -8
  16. package/dist/collection/components/accordion/components/accordion-section.js.map +1 -1
  17. package/dist/collection/components/document-card/document-card.css +2 -1
  18. package/dist/collection/components/document-component/document-component-heading.js +15 -6
  19. package/dist/collection/components/document-component/document-component-heading.js.map +1 -1
  20. package/dist/collection/components/document-component/document-component.css +55 -7
  21. package/dist/collection/components/document-component/document-component.js +99 -2
  22. package/dist/collection/components/document-component/document-component.js.map +1 -1
  23. package/dist/collection/components/document-component/document-component.models.js.map +1 -1
  24. package/dist/collection/components/document-component-demo/document-component.demo.js +52 -3
  25. package/dist/collection/components/document-component-demo/document-component.demo.js.map +1 -1
  26. package/dist/collection/components/panel/panel.i18n.js +13 -0
  27. package/dist/collection/components/panel/panel.i18n.js.map +1 -0
  28. package/dist/collection/components/panel/panel.js +29 -1
  29. package/dist/collection/components/panel/panel.js.map +1 -1
  30. package/dist/components/document-component.js +35 -10
  31. package/dist/components/document-component.js.map +1 -1
  32. package/dist/components/dso-accordion-section.js +20 -11
  33. package/dist/components/dso-accordion-section.js.map +1 -1
  34. package/dist/components/dso-document-card.js +1 -1
  35. package/dist/components/dso-document-card.js.map +1 -1
  36. package/dist/components/dsot-document-component-demo.js +9 -3
  37. package/dist/components/dsot-document-component-demo.js.map +1 -1
  38. package/dist/components/panel.js +21 -2
  39. package/dist/components/panel.js.map +1 -1
  40. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  41. package/dist/dso-toolkit/dso-toolkit.esm.js.map +1 -1
  42. package/dist/dso-toolkit/p-39d0a5be.entry.js +2 -0
  43. package/dist/dso-toolkit/p-39d0a5be.entry.js.map +1 -0
  44. package/dist/dso-toolkit/p-3e9082b8.entry.js +2 -0
  45. package/dist/dso-toolkit/p-3e9082b8.entry.js.map +1 -0
  46. package/dist/dso-toolkit/p-758523a5.entry.js +2 -0
  47. package/dist/dso-toolkit/p-758523a5.entry.js.map +1 -0
  48. package/dist/dso-toolkit/{p-e05b8f92.entry.js → p-a83d9abb.entry.js} +2 -2
  49. package/dist/dso-toolkit/{p-e05b8f92.entry.js.map → p-a83d9abb.entry.js.map} +1 -1
  50. package/dist/dso-toolkit/p-c64628c7.entry.js +2 -0
  51. package/dist/dso-toolkit/p-c64628c7.entry.js.map +1 -0
  52. package/dist/esm/dso-accordion-section.entry.js +5 -3
  53. package/dist/esm/dso-accordion-section.entry.js.map +1 -1
  54. package/dist/esm/dso-alert_6.entry.js +19 -3
  55. package/dist/esm/dso-alert_6.entry.js.map +1 -1
  56. package/dist/esm/dso-annotation-locatie_2.entry.js +31 -9
  57. package/dist/esm/dso-annotation-locatie_2.entry.js.map +1 -1
  58. package/dist/esm/dso-document-card.entry.js +1 -1
  59. package/dist/esm/dso-document-card.entry.js.map +1 -1
  60. package/dist/esm/dso-toolkit.js +1 -1
  61. package/dist/esm/dsot-document-component-demo.entry.js +8 -3
  62. package/dist/esm/dsot-document-component-demo.entry.js.map +1 -1
  63. package/dist/esm/loader.js +1 -1
  64. package/dist/types/components/accordion/components/accordion-section.d.ts +7 -2
  65. package/dist/types/components/accordion/components/accordion-section.interfaces.d.ts +1 -0
  66. package/dist/types/components/document-component/document-component-heading.d.ts +3 -0
  67. package/dist/types/components/document-component/document-component.d.ts +18 -1
  68. package/dist/types/components/document-component/document-component.models.d.ts +7 -0
  69. package/dist/types/components/document-component-demo/document-component.demo.d.ts +11 -1
  70. package/dist/types/components/panel/panel.d.ts +6 -0
  71. package/dist/types/components/panel/panel.i18n.d.ts +2 -0
  72. package/dist/types/components.d.ts +66 -8
  73. package/package.json +3 -3
  74. package/dist/dso-toolkit/p-76dfbee3.entry.js +0 -2
  75. package/dist/dso-toolkit/p-76dfbee3.entry.js.map +0 -1
  76. package/dist/dso-toolkit/p-abe7047e.entry.js +0 -2
  77. package/dist/dso-toolkit/p-abe7047e.entry.js.map +0 -1
  78. package/dist/dso-toolkit/p-bc0a6bac.entry.js +0 -2
  79. package/dist/dso-toolkit/p-bc0a6bac.entry.js.map +0 -1
  80. package/dist/dso-toolkit/p-e665556c.entry.js +0 -2
  81. package/dist/dso-toolkit/p-e665556c.entry.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { h, forceUpdate, Fragment, Host, } from "@stencil/core";
1
+ import { forceUpdate, Fragment, h, Host, } from "@stencil/core";
2
2
  import { stateMap, } from "./accordion-section.interfaces";
3
3
  // eslint-disable-next-line no-console
4
4
  const log = window["_dsoLog"] === true ? console.log.bind(console.log) : function () { };
@@ -70,6 +70,7 @@ export class AccordionSection {
70
70
  });
71
71
  };
72
72
  this.handleTitle = undefined;
73
+ this.wijzigactie = undefined;
73
74
  this.heading = "h2";
74
75
  this.handleUrl = undefined;
75
76
  this.status = undefined;
@@ -151,12 +152,13 @@ export class AccordionSection {
151
152
  var _a;
152
153
  const { variant, reverseAlign } = (_a = this.accordionState) !== null && _a !== void 0 ? _a : {};
153
154
  const hasAddons = !!this.statusDescription || !!this.status || !!this.icon || !!this.attachmentCount;
154
- return (h(Host, { key: '23337050418689dbfc47c9542db507be85152548', class: {
155
+ return (h(Host, { key: '937a873b5c70c026f894ae8dea52683b863d90b0', class: {
155
156
  "dso-accordion-section": true,
156
157
  ["dso-accordion-" + variant]: true,
157
158
  "dso-nested-accordion": this.hasNestedAccordion || this.containsNestedAccordion,
158
159
  "dso-accordion-reverse-align": reverseAlign !== null && reverseAlign !== void 0 ? reverseAlign : false,
159
- }, hidden: !variant, onMouseenter: () => (this.hover = true), onMouseleave: () => (this.hover = false) }, h(Handle, { key: '8493773157cbad694a9276a34edf42f28971c1d3', heading: this.heading, ref: (element) => (this.sectionHeading = element) }, h(HandleElement, { key: '03af7533dc94bef4e5a7ef4bea580075f02c892c', handleUrl: this.handleUrl, onClick: this.handleClick, open: this.open, handleElementRef: (e) => (this.handleElementRef = e) }, reverseAlign ? (h(Fragment, null, hasAddons && (h("div", { class: "dso-section-handle-addons" }, h(HandleIcon, { icon: this.icon }))), h("span", null, this.handleTitle), this.label && (h("dso-label", { status: this.labelStatus, compact: true }, this.label)), h("dso-icon", { class: "dso-section-handle-chevron", icon: "chevron-down" }))) : (h(Fragment, null, h("dso-icon", { class: "dso-section-handle-chevron", icon: "chevron-right" }), this.status && h("span", { class: "sr-only" }, stateMap[this.status]), h("span", null, this.handleTitle, this.isNeutral && (h("dso-icon", { class: "info-icon", icon: this.open || this.hover ? "info-active" : "info" }))), this.label && (h("dso-label", { status: this.labelStatus, compact: true }, this.label)), hasAddons && (h("div", { class: "dso-section-handle-addons" }, this.statusDescription && h("span", { class: "dso-status" }, this.statusDescription), h(HandleIcon, { state: this.status, icon: this.icon, attachmentCount: this.attachmentCount }))))))), h("dso-expandable", { key: 'a2ffd853eb9dfd47220f64a6af05bd1a78bb1efe', class: "dso-section-body", open: this.open, enableAnimation: true, minimumHeight: this.isNeutral ? 0 : 4, onDsoExpandableAnimationStart: this.handleExpandableAnimationStart, onDsoExpandableAnimationEnd: this.handleExpandableAnimationEnd }, h("div", { key: '1d0233d7f7464ba1d0071d401761923d7b644661', class: "dso-section-body-content", ref: (element) => (this.sectionBody = element) }, h("slot", { key: '125ac6d140ca961facba19f52ac0ba12dc2b6364' })))));
160
+ ["dso-accordion-wijzigactie-" + this.wijzigactie]: !!this.wijzigactie,
161
+ }, hidden: !variant, onMouseenter: () => (this.hover = true), onMouseleave: () => (this.hover = false) }, h(Handle, { key: 'f11e91044d5bb13452ae5bf47fee3687251e82df', heading: this.heading, ref: (element) => (this.sectionHeading = element) }, h(HandleElement, { key: '8139be8585ce016428b0a8b60b47f3b96f3e0875', handleUrl: this.handleUrl, onClick: this.handleClick, open: this.open, handleElementRef: (e) => (this.handleElementRef = e) }, reverseAlign ? (h(Fragment, null, hasAddons && (h("div", { class: "dso-section-handle-addons" }, h(HandleIcon, { icon: this.icon }))), h("dso-renvooi", { value: this.handleTitle }), this.label && (h("dso-label", { status: this.labelStatus, compact: true }, this.label)), h("dso-icon", { class: "dso-section-handle-chevron", icon: "chevron-down" }))) : (h(Fragment, null, h("dso-icon", { class: "dso-section-handle-chevron", icon: "chevron-right" }), this.status && h("span", { class: "sr-only" }, stateMap[this.status]), h("span", null, h("dso-renvooi", { value: this.handleTitle }), this.isNeutral && (h("dso-icon", { class: "info-icon", icon: this.open || this.hover ? "info-active" : "info" }))), this.label && (h("dso-label", { status: this.labelStatus, compact: true }, this.label)), hasAddons && (h("div", { class: "dso-section-handle-addons" }, this.statusDescription && h("span", { class: "dso-status" }, this.statusDescription), h(HandleIcon, { state: this.status, icon: this.icon, attachmentCount: this.attachmentCount }))))))), h("dso-expandable", { key: 'd80403dc350ce8c407c4d57afa239445915e4860', class: "dso-section-body", open: this.open, enableAnimation: true, minimumHeight: this.isNeutral ? 0 : 4, onDsoExpandableAnimationStart: this.handleExpandableAnimationStart, onDsoExpandableAnimationEnd: this.handleExpandableAnimationEnd }, h("div", { key: '04bdf62633f13f08bad4dc0e8ac870cb3c633393', class: "dso-section-body-content", ref: (element) => (this.sectionBody = element) }, h("slot", { key: 'c28041eb3c640bce06d98411d80d43b9127058f6' })))));
160
162
  }
161
163
  static get is() { return "dso-accordion-section"; }
162
164
  static get encapsulation() { return "shadow"; }
@@ -176,12 +178,18 @@ export class AccordionSection {
176
178
  "type": "string",
177
179
  "mutable": false,
178
180
  "complexType": {
179
- "original": "string",
180
- "resolved": "string | undefined",
181
- "references": {}
181
+ "original": "RenvooiValue | undefined",
182
+ "resolved": "string | undefined | { toegevoegd: string; } | { verwijderd: string; } | { was: string; wordt: string; }",
183
+ "references": {
184
+ "RenvooiValue": {
185
+ "location": "import",
186
+ "path": "../../renvooi/renvooi.interfaces",
187
+ "id": "src/components/renvooi/renvooi.interfaces.ts::RenvooiValue"
188
+ }
189
+ }
182
190
  },
183
- "required": false,
184
- "optional": true,
191
+ "required": true,
192
+ "optional": false,
185
193
  "docs": {
186
194
  "tags": [],
187
195
  "text": "The title of the handle"
@@ -189,6 +197,29 @@ export class AccordionSection {
189
197
  "attribute": "handle-title",
190
198
  "reflect": false
191
199
  },
200
+ "wijzigactie": {
201
+ "type": "string",
202
+ "mutable": false,
203
+ "complexType": {
204
+ "original": "AccordionSectionWijzigactie",
205
+ "resolved": "\"verwijder\" | \"voegtoe\" | undefined",
206
+ "references": {
207
+ "AccordionSectionWijzigactie": {
208
+ "location": "import",
209
+ "path": "./accordion-section.interfaces",
210
+ "id": "src/components/accordion/components/accordion-section.interfaces.ts::AccordionSectionWijzigactie"
211
+ }
212
+ }
213
+ },
214
+ "required": false,
215
+ "optional": true,
216
+ "docs": {
217
+ "tags": [],
218
+ "text": "An optional 'wijzigactie' that signals if the section is added or removed."
219
+ },
220
+ "attribute": "wijzigactie",
221
+ "reflect": false
222
+ },
192
223
  "heading": {
193
224
  "type": "string",
194
225
  "mutable": false,
@@ -1 +1 @@
1
- {"version":3,"file":"accordion-section.js","sourceRoot":"","sources":["../../../../../src/components/accordion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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\r\n h,\r\n Component,\r\n ComponentInterface,\r\n Element,\r\n Event,\r\n forceUpdate,\r\n Fragment,\r\n Host,\r\n Prop,\r\n State,\r\n EventEmitter,\r\n FunctionalComponent,\r\n Method,\r\n} from \"@stencil/core\";\r\n\r\nimport { AccordionInternalState } from \"../accordion.interfaces\";\r\nimport {\r\n AccordionHeading,\r\n AccordionSectionAnimationEndEvent,\r\n AccordionSectionState,\r\n AccordionSectionToggleClickEvent,\r\n AccordionSectionAnimationStartEvent,\r\n stateMap,\r\n} from \"./accordion-section.interfaces\";\r\nimport { ExpandableAnimationEndEvent } from \"../../expandable/expandable\";\r\nimport { LabelStatus } from \"../../label/label.interfaces\";\r\n\r\n// eslint-disable-next-line no-console\r\nconst log = (window as any)[\"_dsoLog\"] === true ? console.log.bind(console.log) : function () {};\r\n\r\nconst HandleElement: FunctionalComponent<{\r\n handleUrl: string | undefined;\r\n open: boolean;\r\n handleElementRef: (element: HTMLAnchorElement | HTMLButtonElement | undefined) => void;\r\n onClick: (e: MouseEvent) => void;\r\n}> = ({ handleUrl, onClick, open, handleElementRef }, children) => {\r\n if (handleUrl) {\r\n return (\r\n <a href={handleUrl} onClick={onClick} aria-expanded={open ? \"true\" : \"false\"} ref={handleElementRef}>\r\n {children}\r\n </a>\r\n );\r\n }\r\n\r\n return (\r\n <button type=\"button\" onClick={onClick} aria-expanded={open ? \"true\" : \"false\"} ref={handleElementRef}>\r\n {children}\r\n </button>\r\n );\r\n};\r\n\r\nconst Handle: FunctionalComponent<{\r\n heading: AccordionHeading;\r\n ref: (element: HTMLHeadingElement | undefined) => void;\r\n}> = ({ heading, ref }, children) => {\r\n switch (heading) {\r\n default:\r\n case \"h2\":\r\n return (\r\n <h2 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h2>\r\n );\r\n case \"h3\":\r\n return (\r\n <h3 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h3>\r\n );\r\n case \"h4\":\r\n return (\r\n <h4 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h4>\r\n );\r\n case \"h5\":\r\n return (\r\n <h5 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h5>\r\n );\r\n }\r\n};\r\n\r\nconst HandleIcon: FunctionalComponent<{\r\n state?: AccordionSectionState;\r\n icon?: string;\r\n attachmentCount?: number;\r\n}> = ({ state, icon, attachmentCount }) => {\r\n if (state) {\r\n return <HandleStateIcon state={state} />;\r\n }\r\n\r\n if (attachmentCount) {\r\n return <dso-attachments-counter count={attachmentCount}></dso-attachments-counter>;\r\n }\r\n\r\n if (icon) {\r\n return <dso-icon icon={icon}></dso-icon>;\r\n }\r\n};\r\n\r\nconst HandleStateIcon: FunctionalComponent<{ state: AccordionSectionState }> = ({ state }) => {\r\n if (state === \"error\") {\r\n return <dso-icon icon=\"status-error\"></dso-icon>;\r\n }\r\n\r\n if (state === \"danger\") {\r\n return <dso-icon icon=\"status-danger\"></dso-icon>;\r\n }\r\n\r\n if (state === \"success\") {\r\n return <dso-icon icon=\"status-success\"></dso-icon>;\r\n }\r\n\r\n if (state === \"info\") {\r\n return <dso-icon icon=\"status-info\"></dso-icon>;\r\n }\r\n\r\n if (state === \"warning\") {\r\n return <dso-icon icon=\"status-warning\"></dso-icon>;\r\n }\r\n};\r\n\r\n@Component({\r\n tag: \"dso-accordion-section\",\r\n styleUrl: \"accordion-section.scss\",\r\n shadow: true,\r\n})\r\nexport class AccordionSection implements ComponentInterface {\r\n private accordionState?: AccordionInternalState;\r\n\r\n private sectionBody?: HTMLDivElement;\r\n\r\n private sectionHeading?: HTMLHeadingElement;\r\n\r\n @Element()\r\n host!: HTMLDsoAccordionSectionElement;\r\n\r\n /**\r\n * The title of the handle\r\n */\r\n @Prop()\r\n handleTitle?: string;\r\n\r\n /**\r\n * Which heading element to use.\r\n */\r\n @Prop()\r\n heading: AccordionHeading = \"h2\";\r\n\r\n /**\r\n * When set the handle will render as a `<a>`. When undefined it renders as a `<button>`\r\n */\r\n @Prop()\r\n handleUrl?: string;\r\n\r\n /**\r\n * `state` takes precedence over `attachmentCount` and `icon`\r\n */\r\n @Prop()\r\n status?: AccordionSectionState;\r\n\r\n /**\r\n * `attachmentCount` takes precedence over `icon`\r\n */\r\n @Prop()\r\n attachmentCount?: number;\r\n\r\n /**\r\n * To set an icon in the heading handle.\r\n */\r\n @Prop()\r\n icon?: string;\r\n\r\n /**\r\n * The status of the section.\r\n */\r\n @Prop()\r\n statusDescription?: string;\r\n\r\n /**\r\n * Set the Accordion Section open.\r\n */\r\n @Prop({ reflect: true })\r\n open = false;\r\n\r\n /**\r\n * Set when this Accordion Section contains or will contain an Accordion.\r\n */\r\n @Prop({ reflect: true })\r\n hasNestedAccordion = false;\r\n\r\n /**\r\n * The label to be displayed in the heading handle inside a Label (optional)\r\n */\r\n @Prop()\r\n label?: string;\r\n\r\n /**\r\n * The status of the Label in the heading handle (optional)\r\n */\r\n @Prop()\r\n labelStatus?: LabelStatus;\r\n\r\n /**\r\n * Calling this method will set focus to the handle.\r\n */\r\n @Method()\r\n async focusHandle() {\r\n this.handleElementRef?.focus();\r\n }\r\n\r\n @State()\r\n hover = false;\r\n\r\n get containsNestedAccordion() {\r\n return this.host.querySelector(\"dso-accordion\") !== null;\r\n }\r\n\r\n componentWillLoad() {\r\n this.accordion?._getState().then((state) => {\r\n this.accordionState = state;\r\n\r\n forceUpdate(this.host);\r\n });\r\n }\r\n\r\n get isNeutral() {\r\n return this.accordionState?.variant === \"neutral\";\r\n }\r\n\r\n private async scrollIntoView(bodyHeight: number | undefined, behavior: ScrollBehavior = \"auto\"): Promise<void> {\r\n log(\r\n `DSO Toolkit [Accordion Section] scrollIntoView(bodyHeight: ${JSON.stringify(\r\n bodyHeight,\r\n )}, behavior: ${JSON.stringify(behavior)})`,\r\n );\r\n\r\n const bodyClientRect = this.sectionBody?.getBoundingClientRect();\r\n const headingClientRect = this.sectionHeading?.getBoundingClientRect();\r\n\r\n log(`DSO Toolkit [Accordion Section] const bodyClientRect = ${JSON.stringify(bodyClientRect)};`);\r\n log(`DSO Toolkit [Accordion Section] const headingClientRect = ${JSON.stringify(headingClientRect)};`);\r\n log(`DSO Toolkit [Accordion Section] this.accordionState = ${JSON.stringify(this.accordionState)};`);\r\n log(`DSO Toolkit [Accordion Section] this.open = ${JSON.stringify(this.open)};`);\r\n\r\n if (!bodyClientRect || !headingClientRect || !this.accordionState) {\r\n log(`DSO Toolkit [Accordion Section] returning`);\r\n\r\n return;\r\n }\r\n\r\n // this y is relative to the top of the viewport.\r\n const sectionBottomY = headingClientRect.top + headingClientRect.height + (this.open ? (bodyHeight ?? 0) : 0);\r\n\r\n log(`DSO Toolkit [Accordion Section] const sectionBottomY = ${JSON.stringify(sectionBottomY)};`);\r\n log(`DSO Toolkit [Accordion Section] window.innerHeight = ${JSON.stringify(window.innerHeight)};`);\r\n\r\n const box = this.host.getBoundingClientRect();\r\n\r\n const scrollTop = window.scrollY || document.documentElement.scrollTop || document.body.scrollTop;\r\n const clientTop = document.documentElement.clientTop || document.body.clientTop || 0;\r\n const top = box.top + scrollTop - clientTop;\r\n\r\n log(\"DSO Toolkit [Accordion Section] scroll\", { box, scrollTop, clientTop, top });\r\n\r\n if (sectionBottomY > window.innerHeight) {\r\n log(\r\n `DSO Toolkit [Accordion Section] sectionBottomY > window.innerHeight === ${JSON.stringify(\r\n sectionBottomY > window.innerHeight,\r\n )};`,\r\n );\r\n\r\n const expandedAccordionHeight = sectionBottomY - headingClientRect.top;\r\n const shouldScrollToTopOfSection = expandedAccordionHeight > window.innerHeight;\r\n\r\n log(\r\n `DSO Toolkit [Accordion Section] const expandedAccordionHeight = ${JSON.stringify(expandedAccordionHeight)};`,\r\n );\r\n log(\r\n `DSO Toolkit [Accordion Section] const shouldScrollToTopOfSection = ${JSON.stringify(\r\n shouldScrollToTopOfSection,\r\n )};`,\r\n );\r\n\r\n window.scrollTo({\r\n top: shouldScrollToTopOfSection ? top : top - (window.innerHeight - expandedAccordionHeight),\r\n behavior,\r\n });\r\n } else if (headingClientRect.top < 0) {\r\n log(\r\n `DSO Toolkit [Accordion Section] headingClientRect.top < 0 === ${JSON.stringify(headingClientRect.top < 0)};`,\r\n );\r\n\r\n window.scrollTo({\r\n top,\r\n behavior,\r\n });\r\n }\r\n }\r\n\r\n private get accordion() {\r\n return this.host.closest(\"dso-accordion\");\r\n }\r\n\r\n private handleClick = (event: MouseEvent) => {\r\n this.dsoToggleClick.emit({\r\n originalEvent: event,\r\n open: !this.open,\r\n });\r\n };\r\n\r\n private handleExpandableAnimationStart = (e: CustomEvent<any>) => {\r\n this.dsoAnimationStart.emit({\r\n animation: this.open ? \"opening\" : \"closing\",\r\n scrollIntoView: (behavior: ScrollBehavior = \"auto\") => this.scrollIntoView(e.detail.bodyHeight, behavior),\r\n });\r\n };\r\n\r\n private handleExpandableAnimationEnd = (e: CustomEvent<ExpandableAnimationEndEvent>) => {\r\n this.dsoAnimationEnd.emit({\r\n open: this.open,\r\n scrollIntoView: (behavior: ScrollBehavior = \"auto\") => this.scrollIntoView(e.detail.bodyHeight, behavior),\r\n });\r\n };\r\n\r\n /**\r\n * Emitted when the user activates the toggle button.\r\n */\r\n @Event({ bubbles: false })\r\n dsoToggleClick!: EventEmitter<AccordionSectionToggleClickEvent>;\r\n\r\n /**\r\n * Event emitted when the Accordion Section starts its toggle animation.\r\n */\r\n @Event({ bubbles: false })\r\n dsoAnimationStart!: EventEmitter<AccordionSectionAnimationStartEvent>;\r\n\r\n /**\r\n * Event emitted when the Accordion Section completes its toggle animation.\r\n */\r\n @Event({ bubbles: false })\r\n dsoAnimationEnd!: EventEmitter<AccordionSectionAnimationEndEvent>;\r\n\r\n private handleElementRef?: HTMLAnchorElement | HTMLButtonElement;\r\n\r\n render() {\r\n const { variant, reverseAlign } = this.accordionState ?? {};\r\n const hasAddons = !!this.statusDescription || !!this.status || !!this.icon || !!this.attachmentCount;\r\n\r\n return (\r\n <Host\r\n class={{\r\n \"dso-accordion-section\": true,\r\n [\"dso-accordion-\" + variant]: true,\r\n \"dso-nested-accordion\": this.hasNestedAccordion || this.containsNestedAccordion,\r\n \"dso-accordion-reverse-align\": reverseAlign ?? false,\r\n }}\r\n hidden={!variant}\r\n onMouseenter={() => (this.hover = true)}\r\n onMouseleave={() => (this.hover = false)}\r\n >\r\n <Handle heading={this.heading} ref={(element) => (this.sectionHeading = element)}>\r\n <HandleElement\r\n handleUrl={this.handleUrl}\r\n onClick={this.handleClick}\r\n open={this.open}\r\n handleElementRef={(e) => (this.handleElementRef = e)}\r\n >\r\n {reverseAlign ? (\r\n <Fragment>\r\n {hasAddons && (\r\n <div class=\"dso-section-handle-addons\">\r\n <HandleIcon icon={this.icon} />\r\n </div>\r\n )}\r\n\r\n <span>{this.handleTitle}</span>\r\n\r\n {this.label && (\r\n <dso-label status={this.labelStatus} compact>\r\n {this.label}\r\n </dso-label>\r\n )}\r\n\r\n <dso-icon class=\"dso-section-handle-chevron\" icon=\"chevron-down\"></dso-icon>\r\n </Fragment>\r\n ) : (\r\n <Fragment>\r\n <dso-icon class=\"dso-section-handle-chevron\" icon=\"chevron-right\"></dso-icon>\r\n\r\n {this.status && <span class=\"sr-only\">{stateMap[this.status]}</span>}\r\n\r\n <span>\r\n {this.handleTitle}\r\n {this.isNeutral && (\r\n <dso-icon class=\"info-icon\" icon={this.open || this.hover ? \"info-active\" : \"info\"} />\r\n )}\r\n </span>\r\n\r\n {this.label && (\r\n <dso-label status={this.labelStatus} compact>\r\n {this.label}\r\n </dso-label>\r\n )}\r\n\r\n {hasAddons && (\r\n <div class=\"dso-section-handle-addons\">\r\n {this.statusDescription && <span class=\"dso-status\">{this.statusDescription}</span>}\r\n <HandleIcon state={this.status} icon={this.icon} attachmentCount={this.attachmentCount} />\r\n </div>\r\n )}\r\n </Fragment>\r\n )}\r\n </HandleElement>\r\n </Handle>\r\n <dso-expandable\r\n class=\"dso-section-body\"\r\n open={this.open}\r\n enableAnimation\r\n minimumHeight={this.isNeutral ? 0 : 4}\r\n onDsoExpandableAnimationStart={this.handleExpandableAnimationStart}\r\n onDsoExpandableAnimationEnd={this.handleExpandableAnimationEnd}\r\n >\r\n <div class=\"dso-section-body-content\" ref={(element) => (this.sectionBody = element)}>\r\n <slot />\r\n </div>\r\n </dso-expandable>\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"accordion-section.js","sourceRoot":"","sources":["../../../../../src/components/accordion/components/accordion-section.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,OAAO,EACP,KAAK,EAEL,WAAW,EACX,QAAQ,EAER,CAAC,EACD,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,GACN,MAAM,eAAe,CAAC;AAGvB,OAAO,EAOL,QAAQ,GACT,MAAM,gCAAgC,CAAC;AAKxC,sCAAsC;AACtC,MAAM,GAAG,GAAI,MAAc,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,cAAa,CAAC,CAAC;AAEjG,MAAM,aAAa,GAKd,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE,QAAQ,EAAE,EAAE;IAChE,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,CACL,SAAG,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,mBAAiB,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,GAAG,EAAE,gBAAgB,IAChG,QAAQ,CACP,CACL,CAAC;IACJ,CAAC;IAED,OAAO,CACL,cAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,mBAAiB,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,GAAG,EAAE,gBAAgB,IAClG,QAAQ,CACF,CACV,CAAC;AACJ,CAA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WAAW,GAAG,OAAO,CAAC;oBAClF,8DAAQ,CACJ,CACS,CACZ,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\r\n Component,\r\n ComponentInterface,\r\n Element,\r\n Event,\r\n EventEmitter,\r\n forceUpdate,\r\n Fragment,\r\n FunctionalComponent,\r\n h,\r\n Host,\r\n Method,\r\n Prop,\r\n State,\r\n} from \"@stencil/core\";\r\n\r\nimport { AccordionInternalState } from \"../accordion.interfaces\";\r\nimport {\r\n AccordionHeading,\r\n AccordionSectionAnimationEndEvent,\r\n AccordionSectionAnimationStartEvent,\r\n AccordionSectionState,\r\n AccordionSectionToggleClickEvent,\r\n AccordionSectionWijzigactie,\r\n stateMap,\r\n} from \"./accordion-section.interfaces\";\r\nimport { ExpandableAnimationEndEvent } from \"../../expandable/expandable\";\r\nimport { LabelStatus } from \"../../label/label.interfaces\";\r\nimport { RenvooiValue } from \"../../renvooi/renvooi.interfaces\";\r\n\r\n// eslint-disable-next-line no-console\r\nconst log = (window as any)[\"_dsoLog\"] === true ? console.log.bind(console.log) : function () {};\r\n\r\nconst HandleElement: FunctionalComponent<{\r\n handleUrl: string | undefined;\r\n open: boolean;\r\n handleElementRef: (element: HTMLAnchorElement | HTMLButtonElement | undefined) => void;\r\n onClick: (e: MouseEvent) => void;\r\n}> = ({ handleUrl, onClick, open, handleElementRef }, children) => {\r\n if (handleUrl) {\r\n return (\r\n <a href={handleUrl} onClick={onClick} aria-expanded={open ? \"true\" : \"false\"} ref={handleElementRef}>\r\n {children}\r\n </a>\r\n );\r\n }\r\n\r\n return (\r\n <button type=\"button\" onClick={onClick} aria-expanded={open ? \"true\" : \"false\"} ref={handleElementRef}>\r\n {children}\r\n </button>\r\n );\r\n};\r\n\r\nconst Handle: FunctionalComponent<{\r\n heading: AccordionHeading;\r\n ref: (element: HTMLHeadingElement | undefined) => void;\r\n}> = ({ heading, ref }, children) => {\r\n switch (heading) {\r\n default:\r\n case \"h2\":\r\n return (\r\n <h2 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h2>\r\n );\r\n case \"h3\":\r\n return (\r\n <h3 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h3>\r\n );\r\n case \"h4\":\r\n return (\r\n <h4 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h4>\r\n );\r\n case \"h5\":\r\n return (\r\n <h5 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h5>\r\n );\r\n }\r\n};\r\n\r\nconst HandleIcon: FunctionalComponent<{\r\n state?: AccordionSectionState;\r\n icon?: string;\r\n attachmentCount?: number;\r\n}> = ({ state, icon, attachmentCount }) => {\r\n if (state) {\r\n return <HandleStateIcon state={state} />;\r\n }\r\n\r\n if (attachmentCount) {\r\n return <dso-attachments-counter count={attachmentCount}></dso-attachments-counter>;\r\n }\r\n\r\n if (icon) {\r\n return <dso-icon icon={icon}></dso-icon>;\r\n }\r\n};\r\n\r\nconst HandleStateIcon: FunctionalComponent<{ state: AccordionSectionState }> = ({ state }) => {\r\n if (state === \"error\") {\r\n return <dso-icon icon=\"status-error\"></dso-icon>;\r\n }\r\n\r\n if (state === \"danger\") {\r\n return <dso-icon icon=\"status-danger\"></dso-icon>;\r\n }\r\n\r\n if (state === \"success\") {\r\n return <dso-icon icon=\"status-success\"></dso-icon>;\r\n }\r\n\r\n if (state === \"info\") {\r\n return <dso-icon icon=\"status-info\"></dso-icon>;\r\n }\r\n\r\n if (state === \"warning\") {\r\n return <dso-icon icon=\"status-warning\"></dso-icon>;\r\n }\r\n};\r\n\r\n@Component({\r\n tag: \"dso-accordion-section\",\r\n styleUrl: \"accordion-section.scss\",\r\n shadow: true,\r\n})\r\nexport class AccordionSection implements ComponentInterface {\r\n private accordionState?: AccordionInternalState;\r\n\r\n private sectionBody?: HTMLDivElement;\r\n\r\n private sectionHeading?: HTMLHeadingElement;\r\n\r\n @Element()\r\n host!: HTMLDsoAccordionSectionElement;\r\n\r\n /**\r\n * The title of the handle\r\n */\r\n @Prop()\r\n handleTitle!: RenvooiValue | undefined;\r\n\r\n /**\r\n * An optional 'wijzigactie' that signals if the section is added or removed.\r\n */\r\n @Prop()\r\n wijzigactie?: AccordionSectionWijzigactie;\r\n\r\n /**\r\n * Which heading element to use.\r\n */\r\n @Prop()\r\n heading: AccordionHeading = \"h2\";\r\n\r\n /**\r\n * When set the handle will render as a `<a>`. When undefined it renders as a `<button>`\r\n */\r\n @Prop()\r\n handleUrl?: string;\r\n\r\n /**\r\n * `state` takes precedence over `attachmentCount` and `icon`\r\n */\r\n @Prop()\r\n status?: AccordionSectionState;\r\n\r\n /**\r\n * `attachmentCount` takes precedence over `icon`\r\n */\r\n @Prop()\r\n attachmentCount?: number;\r\n\r\n /**\r\n * To set an icon in the heading handle.\r\n */\r\n @Prop()\r\n icon?: string;\r\n\r\n /**\r\n * The status of the section.\r\n */\r\n @Prop()\r\n statusDescription?: string;\r\n\r\n /**\r\n * Set the Accordion Section open.\r\n */\r\n @Prop({ reflect: true })\r\n open = false;\r\n\r\n /**\r\n * Set when this Accordion Section contains or will contain an Accordion.\r\n */\r\n @Prop({ reflect: true })\r\n hasNestedAccordion = false;\r\n\r\n /**\r\n * The label to be displayed in the heading handle inside a Label (optional)\r\n */\r\n @Prop()\r\n label?: string;\r\n\r\n /**\r\n * The status of the Label in the heading handle (optional)\r\n */\r\n @Prop()\r\n labelStatus?: LabelStatus;\r\n\r\n /**\r\n * Calling this method will set focus to the handle.\r\n */\r\n @Method()\r\n async focusHandle() {\r\n this.handleElementRef?.focus();\r\n }\r\n\r\n @State()\r\n hover = false;\r\n\r\n get containsNestedAccordion() {\r\n return this.host.querySelector(\"dso-accordion\") !== null;\r\n }\r\n\r\n componentWillLoad() {\r\n this.accordion?._getState().then((state) => {\r\n this.accordionState = state;\r\n\r\n forceUpdate(this.host);\r\n });\r\n }\r\n\r\n get isNeutral() {\r\n return this.accordionState?.variant === \"neutral\";\r\n }\r\n\r\n private async scrollIntoView(bodyHeight: number | undefined, behavior: ScrollBehavior = \"auto\"): Promise<void> {\r\n log(\r\n `DSO Toolkit [Accordion Section] scrollIntoView(bodyHeight: ${JSON.stringify(\r\n bodyHeight,\r\n )}, behavior: ${JSON.stringify(behavior)})`,\r\n );\r\n\r\n const bodyClientRect = this.sectionBody?.getBoundingClientRect();\r\n const headingClientRect = this.sectionHeading?.getBoundingClientRect();\r\n\r\n log(`DSO Toolkit [Accordion Section] const bodyClientRect = ${JSON.stringify(bodyClientRect)};`);\r\n log(`DSO Toolkit [Accordion Section] const headingClientRect = ${JSON.stringify(headingClientRect)};`);\r\n log(`DSO Toolkit [Accordion Section] this.accordionState = ${JSON.stringify(this.accordionState)};`);\r\n log(`DSO Toolkit [Accordion Section] this.open = ${JSON.stringify(this.open)};`);\r\n\r\n if (!bodyClientRect || !headingClientRect || !this.accordionState) {\r\n log(`DSO Toolkit [Accordion Section] returning`);\r\n\r\n return;\r\n }\r\n\r\n // this y is relative to the top of the viewport.\r\n const sectionBottomY = headingClientRect.top + headingClientRect.height + (this.open ? (bodyHeight ?? 0) : 0);\r\n\r\n log(`DSO Toolkit [Accordion Section] const sectionBottomY = ${JSON.stringify(sectionBottomY)};`);\r\n log(`DSO Toolkit [Accordion Section] window.innerHeight = ${JSON.stringify(window.innerHeight)};`);\r\n\r\n const box = this.host.getBoundingClientRect();\r\n\r\n const scrollTop = window.scrollY || document.documentElement.scrollTop || document.body.scrollTop;\r\n const clientTop = document.documentElement.clientTop || document.body.clientTop || 0;\r\n const top = box.top + scrollTop - clientTop;\r\n\r\n log(\"DSO Toolkit [Accordion Section] scroll\", { box, scrollTop, clientTop, top });\r\n\r\n if (sectionBottomY > window.innerHeight) {\r\n log(\r\n `DSO Toolkit [Accordion Section] sectionBottomY > window.innerHeight === ${JSON.stringify(\r\n sectionBottomY > window.innerHeight,\r\n )};`,\r\n );\r\n\r\n const expandedAccordionHeight = sectionBottomY - headingClientRect.top;\r\n const shouldScrollToTopOfSection = expandedAccordionHeight > window.innerHeight;\r\n\r\n log(\r\n `DSO Toolkit [Accordion Section] const expandedAccordionHeight = ${JSON.stringify(expandedAccordionHeight)};`,\r\n );\r\n log(\r\n `DSO Toolkit [Accordion Section] const shouldScrollToTopOfSection = ${JSON.stringify(\r\n shouldScrollToTopOfSection,\r\n )};`,\r\n );\r\n\r\n window.scrollTo({\r\n top: shouldScrollToTopOfSection ? top : top - (window.innerHeight - expandedAccordionHeight),\r\n behavior,\r\n });\r\n } else if (headingClientRect.top < 0) {\r\n log(\r\n `DSO Toolkit [Accordion Section] headingClientRect.top < 0 === ${JSON.stringify(headingClientRect.top < 0)};`,\r\n );\r\n\r\n window.scrollTo({\r\n top,\r\n behavior,\r\n });\r\n }\r\n }\r\n\r\n private get accordion() {\r\n return this.host.closest(\"dso-accordion\");\r\n }\r\n\r\n private handleClick = (event: MouseEvent) => {\r\n this.dsoToggleClick.emit({\r\n originalEvent: event,\r\n open: !this.open,\r\n });\r\n };\r\n\r\n private handleExpandableAnimationStart = (e: CustomEvent<any>) => {\r\n this.dsoAnimationStart.emit({\r\n animation: this.open ? \"opening\" : \"closing\",\r\n scrollIntoView: (behavior: ScrollBehavior = \"auto\") => this.scrollIntoView(e.detail.bodyHeight, behavior),\r\n });\r\n };\r\n\r\n private handleExpandableAnimationEnd = (e: CustomEvent<ExpandableAnimationEndEvent>) => {\r\n this.dsoAnimationEnd.emit({\r\n open: this.open,\r\n scrollIntoView: (behavior: ScrollBehavior = \"auto\") => this.scrollIntoView(e.detail.bodyHeight, behavior),\r\n });\r\n };\r\n\r\n /**\r\n * Emitted when the user activates the toggle button.\r\n */\r\n @Event({ bubbles: false })\r\n dsoToggleClick!: EventEmitter<AccordionSectionToggleClickEvent>;\r\n\r\n /**\r\n * Event emitted when the Accordion Section starts its toggle animation.\r\n */\r\n @Event({ bubbles: false })\r\n dsoAnimationStart!: EventEmitter<AccordionSectionAnimationStartEvent>;\r\n\r\n /**\r\n * Event emitted when the Accordion Section completes its toggle animation.\r\n */\r\n @Event({ bubbles: false })\r\n dsoAnimationEnd!: EventEmitter<AccordionSectionAnimationEndEvent>;\r\n\r\n private handleElementRef?: HTMLAnchorElement | HTMLButtonElement;\r\n\r\n render() {\r\n const { variant, reverseAlign } = this.accordionState ?? {};\r\n const hasAddons = !!this.statusDescription || !!this.status || !!this.icon || !!this.attachmentCount;\r\n\r\n return (\r\n <Host\r\n class={{\r\n \"dso-accordion-section\": true,\r\n [\"dso-accordion-\" + variant]: true,\r\n \"dso-nested-accordion\": this.hasNestedAccordion || this.containsNestedAccordion,\r\n \"dso-accordion-reverse-align\": reverseAlign ?? false,\r\n [\"dso-accordion-wijzigactie-\" + this.wijzigactie]: !!this.wijzigactie,\r\n }}\r\n hidden={!variant}\r\n onMouseenter={() => (this.hover = true)}\r\n onMouseleave={() => (this.hover = false)}\r\n >\r\n <Handle heading={this.heading} ref={(element) => (this.sectionHeading = element)}>\r\n <HandleElement\r\n handleUrl={this.handleUrl}\r\n onClick={this.handleClick}\r\n open={this.open}\r\n handleElementRef={(e) => (this.handleElementRef = e)}\r\n >\r\n {reverseAlign ? (\r\n <Fragment>\r\n {hasAddons && (\r\n <div class=\"dso-section-handle-addons\">\r\n <HandleIcon icon={this.icon} />\r\n </div>\r\n )}\r\n <dso-renvooi value={this.handleTitle} />\r\n {this.label && (\r\n <dso-label status={this.labelStatus} compact>\r\n {this.label}\r\n </dso-label>\r\n )}\r\n <dso-icon class=\"dso-section-handle-chevron\" icon=\"chevron-down\"></dso-icon>\r\n </Fragment>\r\n ) : (\r\n <Fragment>\r\n <dso-icon class=\"dso-section-handle-chevron\" icon=\"chevron-right\"></dso-icon>\r\n\r\n {this.status && <span class=\"sr-only\">{stateMap[this.status]}</span>}\r\n\r\n <span>\r\n <dso-renvooi value={this.handleTitle} />\r\n {this.isNeutral && (\r\n <dso-icon class=\"info-icon\" icon={this.open || this.hover ? \"info-active\" : \"info\"} />\r\n )}\r\n </span>\r\n\r\n {this.label && (\r\n <dso-label status={this.labelStatus} compact>\r\n {this.label}\r\n </dso-label>\r\n )}\r\n\r\n {hasAddons && (\r\n <div class=\"dso-section-handle-addons\">\r\n {this.statusDescription && <span class=\"dso-status\">{this.statusDescription}</span>}\r\n <HandleIcon state={this.status} icon={this.icon} attachmentCount={this.attachmentCount} />\r\n </div>\r\n )}\r\n </Fragment>\r\n )}\r\n </HandleElement>\r\n </Handle>\r\n <dso-expandable\r\n class=\"dso-section-body\"\r\n open={this.open}\r\n enableAnimation\r\n minimumHeight={this.isNeutral ? 0 : 4}\r\n onDsoExpandableAnimationStart={this.handleExpandableAnimationStart}\r\n onDsoExpandableAnimationEnd={this.handleExpandableAnimationEnd}\r\n >\r\n <div class=\"dso-section-body-content\" ref={(element) => (this.sectionBody = element)}>\r\n <slot />\r\n </div>\r\n </dso-expandable>\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
@@ -33,7 +33,8 @@
33
33
  ::slotted([slot=meta]) {
34
34
  display: flex !important;
35
35
  justify-content: space-between !important;
36
- margin-inline-start: auto !important;
36
+ flex-shrink: 0 !important;
37
+ align-self: end !important;
37
38
  }
38
39
  @media screen and (max-width: 480px) {
39
40
  ::slotted([slot=meta]) {
@@ -12,19 +12,28 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  };
13
13
  import { h } from "@stencil/core";
14
14
  export const Heading = (_a, children) => {
15
- var { heading } = _a, props = __rest(_a, ["heading"]);
15
+ var { heading, mode, href, onClick } = _a, props = __rest(_a, ["heading", "mode", "href", "onClick"]);
16
+ let headingElement;
16
17
  switch (heading) {
17
18
  default:
18
19
  case "h2":
19
- return h("h2", Object.assign({}, props), children);
20
+ headingElement = (h("h2", Object.assign({}, props, { onClick: mode === "document" ? onClick : undefined }), children));
21
+ break;
20
22
  case "h3":
21
- return h("h3", Object.assign({}, props), children);
23
+ headingElement = (h("h3", Object.assign({}, props, { onClick: mode === "document" ? onClick : undefined }), children));
24
+ break;
22
25
  case "h4":
23
- return h("h4", Object.assign({}, props), children);
26
+ headingElement = (h("h4", Object.assign({}, props, { onClick: mode === "document" ? onClick : undefined }), children));
27
+ break;
24
28
  case "h5":
25
- return h("h5", Object.assign({}, props), children);
29
+ headingElement = (h("h5", Object.assign({}, props, { onClick: mode === "document" ? onClick : undefined }), children));
30
+ break;
26
31
  case "h6":
27
- return h("h6", Object.assign({}, props), children);
32
+ headingElement = (h("h6", Object.assign({}, props, { onClick: mode === "document" ? onClick : undefined }), children));
28
33
  }
34
+ if (mode === "table-of-contents" && href) {
35
+ return (h("a", { href: href, onClick: onClick, class: "heading-anchor" }, headingElement));
36
+ }
37
+ return headingElement;
29
38
  };
30
39
  //# sourceMappingURL=document-component-heading.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"document-component-heading.js","sourceRoot":"","sources":["../../../../src/components/document-component/document-component-heading.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AAOvD,MAAM,CAAC,MAAM,OAAO,GAEhB,CAAC,EAAqB,EAAE,QAAQ,EAAE,EAAE;QAAnC,EAAE,OAAO,OAAY,EAAP,KAAK,cAAnB,WAAqB,CAAF;IACtB,QAAQ,OAAO,EAAE,CAAC;QAChB,QAAQ;QACR,KAAK,IAAI;YACP,OAAO,0BAAQ,KAAK,GAAG,QAAQ,CAAM,CAAC;QACxC,KAAK,IAAI;YACP,OAAO,0BAAQ,KAAK,GAAG,QAAQ,CAAM,CAAC;QACxC,KAAK,IAAI;YACP,OAAO,0BAAQ,KAAK,GAAG,QAAQ,CAAM,CAAC;QACxC,KAAK,IAAI;YACP,OAAO,0BAAQ,KAAK,GAAG,QAAQ,CAAM,CAAC;QACxC,KAAK,IAAI;YACP,OAAO,0BAAQ,KAAK,GAAG,QAAQ,CAAM,CAAC;IAC1C,CAAC;AACH,CAAC,CAAC","sourcesContent":["import { h, FunctionalComponent } from \"@stencil/core\";\r\nimport { JSXBase } from \"@stencil/core/internal\";\r\n\r\ninterface DocumentComponentHeadingProps {\r\n heading: \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\r\n}\r\n\r\nexport const Heading: FunctionalComponent<\r\n DocumentComponentHeadingProps & JSXBase.HTMLAttributes<HTMLHeadingElement>\r\n> = ({ heading, ...props }, children) => {\r\n switch (heading) {\r\n default:\r\n case \"h2\":\r\n return <h2 {...props}>{children}</h2>;\r\n case \"h3\":\r\n return <h3 {...props}>{children}</h3>;\r\n case \"h4\":\r\n return <h4 {...props}>{children}</h4>;\r\n case \"h5\":\r\n return <h5 {...props}>{children}</h5>;\r\n case \"h6\":\r\n return <h6 {...props}>{children}</h6>;\r\n }\r\n};\r\n"]}
1
+ {"version":3,"file":"document-component-heading.js","sourceRoot":"","sources":["../../../../src/components/document-component/document-component-heading.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,CAAC,EAA8B,MAAM,eAAe,CAAC;AAU9D,MAAM,CAAC,MAAM,OAAO,GAEhB,CAAC,EAA0C,EAAE,QAAQ,EAAE,EAAE;QAAxD,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,OAAY,EAAP,KAAK,cAAxC,sCAA0C,CAAF;IAC3C,IAAI,cAAqB,CAAC;IAC1B,QAAQ,OAAO,EAAE,CAAC;QAChB,QAAQ;QACR,KAAK,IAAI;YACP,cAAc,GAAG,CACf,0BAAQ,KAAK,IAAE,OAAO,EAAE,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,KAC9D,QAAQ,CACN,CACN,CAAC;YACF,MAAM;QACR,KAAK,IAAI;YACP,cAAc,GAAG,CACf,0BAAQ,KAAK,IAAE,OAAO,EAAE,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,KAC9D,QAAQ,CACN,CACN,CAAC;YACF,MAAM;QACR,KAAK,IAAI;YACP,cAAc,GAAG,CACf,0BAAQ,KAAK,IAAE,OAAO,EAAE,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,KAC9D,QAAQ,CACN,CACN,CAAC;YACF,MAAM;QACR,KAAK,IAAI;YACP,cAAc,GAAG,CACf,0BAAQ,KAAK,IAAE,OAAO,EAAE,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,KAC9D,QAAQ,CACN,CACN,CAAC;YACF,MAAM;QACR,KAAK,IAAI;YACP,cAAc,GAAG,CACf,0BAAQ,KAAK,IAAE,OAAO,EAAE,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,KAC9D,QAAQ,CACN,CACN,CAAC;IACN,CAAC;IAED,IAAI,IAAI,KAAK,mBAAmB,IAAI,IAAI,EAAE,CAAC;QACzC,OAAO,CACL,SAAG,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAC,gBAAgB,IACpD,cAAc,CACb,CACL,CAAC;IACJ,CAAC;IAED,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC","sourcesContent":["import { h, FunctionalComponent, VNode } from \"@stencil/core\";\r\nimport { JSXBase } from \"@stencil/core/internal\";\r\nimport { DocumentComponentMode } from \"./document-component.models\";\r\n\r\ninterface DocumentComponentHeadingProps {\r\n heading: \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\r\n mode: DocumentComponentMode;\r\n href?: string;\r\n}\r\n\r\nexport const Heading: FunctionalComponent<\r\n DocumentComponentHeadingProps & JSXBase.HTMLAttributes<HTMLHeadingElement>\r\n> = ({ heading, mode, href, onClick, ...props }, children) => {\r\n let headingElement: VNode;\r\n switch (heading) {\r\n default:\r\n case \"h2\":\r\n headingElement = (\r\n <h2 {...props} onClick={mode === \"document\" ? onClick : undefined}>\r\n {children}\r\n </h2>\r\n );\r\n break;\r\n case \"h3\":\r\n headingElement = (\r\n <h3 {...props} onClick={mode === \"document\" ? onClick : undefined}>\r\n {children}\r\n </h3>\r\n );\r\n break;\r\n case \"h4\":\r\n headingElement = (\r\n <h4 {...props} onClick={mode === \"document\" ? onClick : undefined}>\r\n {children}\r\n </h4>\r\n );\r\n break;\r\n case \"h5\":\r\n headingElement = (\r\n <h5 {...props} onClick={mode === \"document\" ? onClick : undefined}>\r\n {children}\r\n </h5>\r\n );\r\n break;\r\n case \"h6\":\r\n headingElement = (\r\n <h6 {...props} onClick={mode === \"document\" ? onClick : undefined}>\r\n {children}\r\n </h6>\r\n );\r\n }\r\n\r\n if (mode === \"table-of-contents\" && href) {\r\n return (\r\n <a href={href} onClick={onClick} class=\"heading-anchor\">\r\n {headingElement}\r\n </a>\r\n );\r\n }\r\n\r\n return headingElement;\r\n};\r\n"]}
@@ -719,7 +719,6 @@ a.dso-tertiary, a.dso-tertiary:visited {
719
719
  :host([wijzigactie=verwijderContainer]) .heading-container,
720
720
  :host(:where([wijzigactie=verwijder])) {
721
721
  --_dso-document-component-text-decoration: line-through;
722
- --_dso-renvooi-text-decoration: line-through;
723
722
  }
724
723
  :host([wijzigactie=verwijderContainer]) .heading-container,
725
724
  :host(:where([wijzigactie=verwijder])) {
@@ -817,6 +816,25 @@ a.dso-tertiary, a.dso-tertiary:visited {
817
816
  color: #275937;
818
817
  }
819
818
 
819
+ .heading-anchor {
820
+ display: flex;
821
+ flex-wrap: nowrap;
822
+ background-color: transparent;
823
+ color: var(--link-color);
824
+ text-decoration: underline;
825
+ text-decoration: none;
826
+ }
827
+ .heading-anchor:hover, .heading-anchor:focus-visible {
828
+ color: var(--link-hover-color);
829
+ text-decoration: underline;
830
+ }
831
+ .heading-anchor:active {
832
+ text-decoration: none;
833
+ }
834
+ .heading-anchor:visited {
835
+ color: var(--link-visited-color);
836
+ }
837
+
820
838
  .heading-element {
821
839
  align-items: start;
822
840
  display: flex;
@@ -828,6 +846,10 @@ a.dso-tertiary, a.dso-tertiary:visited {
828
846
  vertical-align: middle;
829
847
  }
830
848
 
849
+ #heading-title {
850
+ display: block;
851
+ }
852
+
831
853
  :host([not-collapsible]) .heading-container {
832
854
  margin-block-end: 0;
833
855
  }
@@ -838,20 +860,42 @@ a.dso-tertiary, a.dso-tertiary:visited {
838
860
  color: #000;
839
861
  }
840
862
 
841
- :host(:not([not-collapsible])) .heading-element {
863
+ :host([mode=document]:not([not-collapsible])) {
864
+ --link-color: document-component.$heading-anchor-color;
865
+ --link-hover-color: document-component.$heading-anchor-hover-color;
866
+ }
867
+ :host([mode=document]:not([not-collapsible])) .heading-element {
842
868
  cursor: pointer;
843
869
  }
844
- :host(:not([not-collapsible])) .heading-element:hover, :host(:not([not-collapsible])) .heading-element:focus-visible {
870
+ :host([mode=document]:not([not-collapsible])) .heading-element:hover, :host([mode=document]:not([not-collapsible])) .heading-element:focus-visible {
845
871
  color: var(--link-hover-color);
846
872
  text-decoration: underline;
847
873
  }
848
- :host(:not([not-collapsible])) .heading-element:active {
874
+ :host([mode=document]:not([not-collapsible])) .heading-element:active {
849
875
  text-decoration: none;
850
876
  }
851
- :host(:not([not-collapsible])) .editaction-label {
877
+ :host([mode=document]:not([not-collapsible])) .editaction-label {
852
878
  margin-inline-start: 24px;
853
879
  }
854
880
 
881
+ :host([mode=table-of-contents]) .heading-container {
882
+ padding-inline-start: 8px;
883
+ }
884
+ :host([mode=table-of-contents]) .heading-element {
885
+ color: inherit;
886
+ }
887
+ :host([mode=table-of-contents]) .editaction-label {
888
+ margin-inline-start: 0;
889
+ }
890
+
891
+ :host([mode=table-of-contents][type=ARTIKEL]) .heading-element {
892
+ color: inherit;
893
+ }
894
+
895
+ :host([mode=table-of-contents]:not([type=HOOFDSTUK])) .heading-element {
896
+ font-weight: normal;
897
+ }
898
+
855
899
  .addons {
856
900
  margin-inline-start: auto;
857
901
  display: flex;
@@ -886,11 +930,15 @@ a.dso-tertiary, a.dso-tertiary:visited {
886
930
  .annotation-container {
887
931
  padding-inline-end: 8px;
888
932
  }
933
+ .annotation-container dso-panel {
934
+ --_dso-panel-body-background-color: #fff;
935
+ }
889
936
 
890
- :host(:where([wijzigactie=verwijder])) .annotation-container dso-panel {
937
+ :host(:where([annotations-wijzigactie=verwijder])) .annotation-container dso-panel {
891
938
  --_dso-panel-body-background-color: #faecee;
939
+ --_dso-renvooi-text-decoration: line-through;
892
940
  }
893
941
 
894
- :host([wijzigactie=voegtoe]) .annotation-container dso-panel {
942
+ :host([annotations-wijzigactie=voegtoe]) .annotation-container dso-panel {
895
943
  --_dso-panel-body-background-color: #f2f8ea;
896
944
  }
@@ -1,4 +1,5 @@
1
1
  import { h, Fragment, Host } from "@stencil/core";
2
+ import { isModifiedEvent } from "../../utils/is-modified-event";
2
3
  import { Heading } from "./document-component-heading";
3
4
  const wijzigactieLabels = {
4
5
  nieuweContainer: "Toegevoegd",
@@ -15,7 +16,10 @@ const wijzigactieLabels = {
15
16
  export class DocumentComponent {
16
17
  constructor() {
17
18
  this.handleHeadingClick = (e) => {
18
- if (this.type !== "LID") {
19
+ if (this.mode === "table-of-contents") {
20
+ this.dsoTableOfContentsClick.emit({ originalEvent: e, isModifiedEvent: isModifiedEvent(e) });
21
+ }
22
+ else if (this.type !== "LID") {
19
23
  this.dsoOpenToggle.emit({ originalEvent: e, open: !this.open });
20
24
  }
21
25
  };
@@ -46,8 +50,11 @@ export class DocumentComponent {
46
50
  this.alternativeTitle = undefined;
47
51
  this.type = undefined;
48
52
  this.wijzigactie = undefined;
53
+ this.annotationsWijzigactie = undefined;
49
54
  this.mark = undefined;
50
55
  this.recursiveToggle = undefined;
56
+ this.mode = "document";
57
+ this.href = undefined;
51
58
  }
52
59
  get wijzigactieLabel() {
53
60
  return this.wijzigactie && wijzigactieLabels[this.wijzigactie];
@@ -61,6 +68,11 @@ export class DocumentComponent {
61
68
  }
62
69
  return undefined;
63
70
  }
71
+ showOntwerpBadge() {
72
+ return (this.genesteOntwerpInformatie &&
73
+ !this.bevatOntwerpInformatie &&
74
+ ((!this.open && this.mode === "document") || this.mode === "table-of-contents"));
75
+ }
64
76
  render() {
65
77
  const suffix = this.suffix();
66
78
  const collapsible = !!((this.label || this.nummer || this.opschrift || this.alternativeTitle) &&
@@ -73,7 +85,7 @@ export class DocumentComponent {
73
85
  this.alternativeTitle ||
74
86
  this.bevatOntwerpInformatie ||
75
87
  this.annotated);
76
- return (h(Host, { key: '39bacfd2c41b74ed451bf34161e6a33cf51c7ca9', "not-collapsible": !collapsible }, showHeading && (h("div", { key: '93b3a3c570ee0188884d4328c21c1f2f8b563784', class: "heading-container", part: "_heading-container" }, this.wijzigactie && h("span", { key: 'd7b9e993c885cada89f79720c677abd464b64806', class: "editaction-label" }, this.wijzigactieLabel, ":"), h("div", { key: '32d527c8735ccd5d053d422d5d1d0f90bb1f0e99', class: "heading" }, h(Heading, { key: 'e10aaa36596cbd958eeae81321d5c85ca1d7ef70', heading: this.heading, class: "heading-element", onClick: this.handleHeadingClick }, collapsible && (h("button", { key: '4af544286bbf38dce190c844c55fb1e24a934d1c', type: "button", class: "toggle-button", "aria-describedby": "heading-title", "aria-expanded": this.open.toString() }, h("dso-icon", { key: '8ec4306f64b6b044291b5cb5bc48ef3303d517cd', icon: this.open ? "chevron-down" : "chevron-right" }), h("span", { key: 'e6da0a2685724087edf27d53b6691b9765deeac6', class: "sr-only" }, this.open ? "Invouwen" : "Uitvouwen"))), h("div", { key: 'a6d9b394665aa139349a156ec41612a11619964e', id: "heading-title" }, this.notApplicable && h("span", { key: 'cfec0cfb4e5c6f60f1e1deeacb2d64c5462fcdfa', class: "sr-only" }, "Niet van toepassing:"), this.label || this.nummer || this.opschrift ? (h(Fragment, null, this.label && (h(Fragment, null, " ", h("dso-ozon-content", { content: this.label, onDsoAnchorClick: this.handleOzonContentAnchorClick, mark: this.mark && ((text) => { var _a; return (_a = this.mark) === null || _a === void 0 ? void 0 : _a.call(this, text, "label"); }), onDsoOzonContentMarkItemHighlight: (e) => this.dsoMarkItemHighlight.emit(Object.assign(Object.assign({}, e.detail), { source: "label" })), inline: true }))), this.nummer && (h(Fragment, null, " ", h("dso-ozon-content", { content: this.nummer, onDsoAnchorClick: this.handleOzonContentAnchorClick, mark: this.mark && ((text) => { var _a; return (_a = this.mark) === null || _a === void 0 ? void 0 : _a.call(this, text, "nummer"); }), onDsoOzonContentMarkItemHighlight: (e) => this.dsoMarkItemHighlight.emit(Object.assign(Object.assign({}, e.detail), { source: "nummer" })), inline: true }))), this.opschrift && (h(Fragment, null, " ", h("dso-ozon-content", { content: this.opschrift, onDsoAnchorClick: this.handleOzonContentAnchorClick, mark: this.mark && ((text) => { var _a; return (_a = this.mark) === null || _a === void 0 ? void 0 : _a.call(this, text, "opschrift"); }), onDsoOzonContentMarkItemHighlight: (e) => this.dsoMarkItemHighlight.emit(Object.assign(Object.assign({}, e.detail), { source: "opschrift" })), inline: true }))))) : (this.alternativeTitle), suffix && h("span", { key: 'f6d72e0a97216cd23c86f4ed8f3d8c6d372a091e' }, " - [", suffix, "]"))), this.recursiveToggle !== undefined && this.open && (h("button", { key: '62c9d7923bd11e7680d8a37fd3415b2886bf3973', type: "button", class: "recursive-toggle", title: this.recursiveToggle === true ? "Verberg alles" : "Toon alles", onClick: this.handleRecursiveToggleClick }, h("dso-icon", { key: '52e92f79252e4ee7d87e8488d001399a947df8fb', icon: this.recursiveToggle === true ? "eye" : "eye-slash" }))), this.genesteOntwerpInformatie && !this.open && !this.bevatOntwerpInformatie && (h(Fragment, null, h("dso-badge", { key: '71013a6e7021e88a59c2106e92bdaf7242ee48e3', status: "warning", "aria-describedby": "nested-draft-description" }, "!"), h("dso-tooltip", { key: '252343a7a833b1a4f155a2817f42f3da1ace6d04', id: "nested-draft-description" }, "Er is een ontwerp beschikbaar."))), (this.bevatOntwerpInformatie || this.annotated) && (h("div", { key: '4683c28f78e5980fbd05fd64ffafbe3fee43fad2', class: "addons" }, this.bevatOntwerpInformatie && (h("dso-label", { key: '61a5e97d4e50bdcefbc75695d48ae5ca32bd8853', status: "warning", compact: true }, "Ontwerp")), this.annotated && (h("button", { key: 'a68005f6e877278b552fb177361517102b6f88c6', type: "button", class: "dso-tertiary", "aria-controls": this.openAnnotation ? "annotations" : undefined, "aria-expanded": this.openAnnotation.toString(), onClick: (e) => this.dsoAnnotationToggle.emit({ originalEvent: e }) }, h("dso-icon", { key: '663c9753888c9c527c1c927545eedcaf4e544478', icon: "label" }), h("span", { key: '338190bc276d24b094e910c159ac63f4f950c40b', class: "sr-only" }, "Toelichting bekijken")))))))), this.openAnnotation && (h("div", { key: 'b18ee4e6199481087cb861e6e459583204063f2c', class: "annotation-container", part: "_annotation-container" }, h("dso-panel", { key: 'c602d21323b6d035f90049b503d797d0233b0ba6', id: "annotations", onDsoCloseClick: (e) => this.dsoAnnotationToggle.emit({ originalEvent: e }) }, h("h2", { key: '65c0e9f263a34cf17cac4c6d4d61998304cc692b', slot: "heading" }, "Kenmerken en kaart"), h("slot", { key: 'ced7df684cc5ae4dd8c7a943cfcad201b7c42353', name: "annotations" })))), this.open && (this.inhoud || this.gereserveerd || this.vervallen) && (h("div", { key: '391d266d030eb0b1dffa566951592adaa821469f', class: "content", part: "_content" }, this.gereserveerd && (h("dso-alert", { key: 'fa0c9b2aa478bacc1d9f1546e3e553442e9a5f01', status: "info" }, "Dit onderdeel is gereserveerd voor toekomstige toevoeging.")), this.vervallen && h("dso-alert", { key: '2f727f2691b60ae40a8a0914977f041227c3255e', status: "info" }, "Dit onderdeel is vervallen."), this.inhoud && (h("dso-ozon-content", { key: 'ca7b318a2656bd425dcd97cbd6b34badad68f696', content: this.inhoud, onDsoAnchorClick: this.handleOzonContentAnchorClick, mark: this.mark && ((text) => { var _a; return (_a = this.mark) === null || _a === void 0 ? void 0 : _a.call(this, text, "inhoud"); }), onDsoOzonContentMarkItemHighlight: (e) => this.dsoMarkItemHighlight.emit(Object.assign(Object.assign({}, e.detail), { source: "inhoud" })) })))), h("div", { key: '42acd41f100d89a7c21a5eb776d14b809f5880a7', class: "children-container", part: "_children-container" }, h("slot", { key: 'f38841370988de0d34e03461e4d35c759b3b6853' }))));
88
+ return (h(Host, { key: '050711aa3e5227ac9a468b4177cf2408a812c524', "not-collapsible": !collapsible }, showHeading && (h("div", { key: 'bd5484e50d030e424fb3ba4e2d5b86451b00e181', class: "heading-container", part: "_heading-container" }, this.wijzigactie && h("span", { key: '327b9a53addde2ff513a077b28c140b760c35d4b', class: "editaction-label" }, this.wijzigactieLabel, ":"), h("div", { key: '1bc6de30e0517bbf6d671a34cc0e52281d53b8d0', class: "heading" }, h(Heading, { key: '26a645af827d41e0ce19d1c2b17a7f14e9be299c', heading: this.heading, class: "heading-element", onClick: this.handleHeadingClick, mode: this.mode, href: this.href }, collapsible && this.mode === "document" && (h("button", { key: '477baa2478a912a7e62098ed402680221c607b4e', type: "button", class: "toggle-button", "aria-describedby": "heading-title", "aria-expanded": this.open.toString() }, h("dso-icon", { key: '9a04f2c1dc70deb54d2f7977d7d41740c78df351', icon: this.open ? "chevron-down" : "chevron-right" }), h("span", { key: 'a594823723148ed63fb1774dc446296ae3efc4da', class: "sr-only" }, this.open ? "Invouwen" : "Uitvouwen"))), h("span", { key: '909c52529cc65621d7973a2e06f3501d8d8d4216', id: "heading-title" }, this.notApplicable && h("span", { key: 'd869da95a5e8d8d49bd7850c0ac4760cfad05801', class: "sr-only" }, "Niet van toepassing:"), this.label || this.nummer || this.opschrift ? (h(Fragment, null, this.label && (h(Fragment, null, " ", h("dso-ozon-content", { content: this.label, onDsoAnchorClick: this.handleOzonContentAnchorClick, mark: this.mark && ((text) => { var _a; return (_a = this.mark) === null || _a === void 0 ? void 0 : _a.call(this, text, "label"); }), onDsoOzonContentMarkItemHighlight: (e) => this.dsoMarkItemHighlight.emit(Object.assign(Object.assign({}, e.detail), { source: "label" })), inline: true }))), this.nummer && (h(Fragment, null, " ", h("dso-ozon-content", { content: this.nummer, onDsoAnchorClick: this.handleOzonContentAnchorClick, mark: this.mark && ((text) => { var _a; return (_a = this.mark) === null || _a === void 0 ? void 0 : _a.call(this, text, "nummer"); }), onDsoOzonContentMarkItemHighlight: (e) => this.dsoMarkItemHighlight.emit(Object.assign(Object.assign({}, e.detail), { source: "nummer" })), inline: true }))), this.opschrift && (h(Fragment, null, " ", h("dso-ozon-content", { content: this.opschrift, onDsoAnchorClick: this.handleOzonContentAnchorClick, mark: this.mark && ((text) => { var _a; return (_a = this.mark) === null || _a === void 0 ? void 0 : _a.call(this, text, "opschrift"); }), onDsoOzonContentMarkItemHighlight: (e) => this.dsoMarkItemHighlight.emit(Object.assign(Object.assign({}, e.detail), { source: "opschrift" })), inline: true }))))) : (this.alternativeTitle), suffix && h("span", { key: '07d4c76b7e1329efb78c41560389b506165de833' }, " - [", suffix, "]"))), this.recursiveToggle !== undefined && this.open && this.mode === "document" && (h("button", { key: '941b9f8c4d29897ec2a39bf42904c5b326a475d9', type: "button", class: "recursive-toggle", title: this.recursiveToggle === true ? "Verberg alles" : "Toon alles", onClick: this.handleRecursiveToggleClick }, h("dso-icon", { key: '46337a7625cb46d1161569722d76822c831a872b', icon: this.recursiveToggle === true ? "eye" : "eye-slash" }))), this.showOntwerpBadge() && (h(Fragment, null, h("dso-badge", { key: 'ade951add661eefbd7d11c9de029e6b2e0394cba', status: "warning", "aria-describedby": "nested-draft-description" }, "!"), h("dso-tooltip", { key: '294d694a2f50878bbcac8b7b13476ce5cbdf78e3', id: "nested-draft-description" }, "Er is een ontwerp beschikbaar."))), (this.bevatOntwerpInformatie || this.annotated) && (h("div", { key: '18484e4344d0ff694dc67858eaff24ca0d27b0a8', class: "addons" }, this.bevatOntwerpInformatie && (h("dso-label", { key: '8bf558ed5dd48df4d23f4957302e147c45651b95', status: "warning", compact: true }, "Ontwerp")), this.annotated && this.mode === "document" && (h("button", { key: '05314fa8305396e460fe95688acb97f94f166a1e', type: "button", class: "dso-tertiary", "aria-controls": this.openAnnotation ? "annotations" : undefined, "aria-expanded": this.openAnnotation.toString(), onClick: (e) => this.dsoAnnotationToggle.emit({ originalEvent: e }) }, h("dso-icon", { key: '0a0f62fc38084a2d6c0c916350dba255ee353993', icon: "label" }), h("span", { key: '13ed74cf4e9ce6b812d1a21f1c4f937657eabcaf', class: "sr-only" }, "Kenmerken en kaartgegevens ", this.openAnnotation ? "verbergen" : "tonen")))))))), this.openAnnotation && (h("div", { key: '463130f23f107cc2347747bb39fdbbe8a890247b', class: "annotation-container", part: "_annotation-container" }, h("dso-panel", { key: 'f4d3b73f47d0918b276694de035bb722ec79c57f', id: "annotations", onDsoCloseClick: (e) => this.dsoAnnotationToggle.emit({ originalEvent: e }), closeButtonLabel: "Kenmerken en kaartgegevens verbergen" }, h("h2", { key: '00db47e61722b1b4917210987513edd18758e66a', slot: "heading" }, "Kenmerken en kaart"), h("slot", { key: '48b7dc786ed04ec4246c8034ab8bc3d15859b943', name: "annotations" })))), this.open && (this.inhoud || this.gereserveerd || this.vervallen) && this.mode === "document" && (h("div", { key: '729087f463134d47897dcf5246d949e8c8d73610', class: "content", part: "_content" }, this.gereserveerd && (h("dso-alert", { key: '80333fb2c38651ad98e7bc707c65a60fb4e2bd2d', status: "info" }, "Dit onderdeel is gereserveerd voor toekomstige toevoeging.")), this.vervallen && h("dso-alert", { key: 'b06d8846e17d9c1b165bef0e38fb31018dddcae3', status: "info" }, "Dit onderdeel is vervallen."), this.inhoud && (h("dso-ozon-content", { key: '01529975b3e2526a5540bf96cdf19fe2488fabc3', content: this.inhoud, onDsoAnchorClick: this.handleOzonContentAnchorClick, mark: this.mark && ((text) => { var _a; return (_a = this.mark) === null || _a === void 0 ? void 0 : _a.call(this, text, "inhoud"); }), onDsoOzonContentMarkItemHighlight: (e) => this.dsoMarkItemHighlight.emit(Object.assign(Object.assign({}, e.detail), { source: "inhoud" })) })))), h("div", { key: 'cb741975adcc22246353c06878f1dc6d1b2a8f1b', class: "children-container", part: "_children-container" }, h("slot", { key: 'fc5cf019d82b45aa6ac5789bc228a639367f18c2' }))));
77
89
  }
78
90
  static get is() { return "dso-document-component"; }
79
91
  static get encapsulation() { return "shadow"; }
@@ -418,6 +430,29 @@ export class DocumentComponent {
418
430
  "attribute": "wijzigactie",
419
431
  "reflect": true
420
432
  },
433
+ "annotationsWijzigactie": {
434
+ "type": "string",
435
+ "mutable": false,
436
+ "complexType": {
437
+ "original": "DocumentComponentAnnotationsWijzigactie",
438
+ "resolved": "\"verwijder\" | \"voegtoe\" | undefined",
439
+ "references": {
440
+ "DocumentComponentAnnotationsWijzigactie": {
441
+ "location": "import",
442
+ "path": "./document-component.models",
443
+ "id": "src/components/document-component/document-component.models.ts::DocumentComponentAnnotationsWijzigactie"
444
+ }
445
+ }
446
+ },
447
+ "required": false,
448
+ "optional": true,
449
+ "docs": {
450
+ "tags": [],
451
+ "text": "The wijzigactie for all annotations."
452
+ },
453
+ "attribute": "annotations-wijzigactie",
454
+ "reflect": true
455
+ },
421
456
  "mark": {
422
457
  "type": "unknown",
423
458
  "mutable": false,
@@ -461,6 +496,47 @@ export class DocumentComponent {
461
496
  },
462
497
  "attribute": "recursive-toggle",
463
498
  "reflect": false
499
+ },
500
+ "mode": {
501
+ "type": "string",
502
+ "mutable": false,
503
+ "complexType": {
504
+ "original": "DocumentComponentMode",
505
+ "resolved": "\"document\" | \"table-of-contents\"",
506
+ "references": {
507
+ "DocumentComponentMode": {
508
+ "location": "import",
509
+ "path": "./document-component.models",
510
+ "id": "src/components/document-component/document-component.models.ts::DocumentComponentMode"
511
+ }
512
+ }
513
+ },
514
+ "required": false,
515
+ "optional": false,
516
+ "docs": {
517
+ "tags": [],
518
+ "text": "The mode of the Document Component. One of \"document\" or \"table-of-contents\". Defaults to \"document\""
519
+ },
520
+ "attribute": "mode",
521
+ "reflect": true,
522
+ "defaultValue": "\"document\""
523
+ },
524
+ "href": {
525
+ "type": "string",
526
+ "mutable": false,
527
+ "complexType": {
528
+ "original": "string",
529
+ "resolved": "string | undefined",
530
+ "references": {}
531
+ },
532
+ "required": false,
533
+ "optional": true,
534
+ "docs": {
535
+ "tags": [],
536
+ "text": "The URL to which the Heading links (only in mode=\"table-of-contents\")."
537
+ },
538
+ "attribute": "href",
539
+ "reflect": true
464
540
  }
465
541
  };
466
542
  }
@@ -507,6 +583,27 @@ export class DocumentComponent {
507
583
  }
508
584
  }
509
585
  }
586
+ }, {
587
+ "method": "dsoTableOfContentsClick",
588
+ "name": "dsoTableOfContentsClick",
589
+ "bubbles": false,
590
+ "cancelable": true,
591
+ "composed": true,
592
+ "docs": {
593
+ "tags": [],
594
+ "text": "Emitted when the user clicks the heading in mode=\"table-of-contents\"."
595
+ },
596
+ "complexType": {
597
+ "original": "DocumentComponentTableOfContentsClickEvent",
598
+ "resolved": "DocumentComponentTableOfContentsClickEvent",
599
+ "references": {
600
+ "DocumentComponentTableOfContentsClickEvent": {
601
+ "location": "import",
602
+ "path": "./document-component.models",
603
+ "id": "src/components/document-component/document-component.models.ts::DocumentComponentTableOfContentsClickEvent"
604
+ }
605
+ }
606
+ }
510
607
  }, {
511
608
  "method": "dsoOzonContentAnchorClick",
512
609
  "name": "dsoOzonContentAnchorClick",