@dso-toolkit/core 58.3.1 → 59.0.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 (121) hide show
  1. package/dist/cjs/_commonjsHelpers-68cdf74f.js +7 -0
  2. package/dist/cjs/_commonjsHelpers-68cdf74f.js.map +1 -0
  3. package/dist/cjs/dso-alert_5.cjs.entry.js +497 -46
  4. package/dist/cjs/dso-alert_5.cjs.entry.js.map +1 -1
  5. package/dist/cjs/dso-annotation-output_3.cjs.entry.js +6 -2
  6. package/dist/cjs/dso-annotation-output_3.cjs.entry.js.map +1 -1
  7. package/dist/cjs/dso-modal.cjs.entry.js +1 -1
  8. package/dist/cjs/dso-modal.cjs.entry.js.map +1 -1
  9. package/dist/cjs/dso-table.cjs.entry.js +1 -1
  10. package/dist/cjs/dso-table.cjs.entry.js.map +1 -1
  11. package/dist/cjs/dso-toolkit.cjs.js +1 -1
  12. package/dist/cjs/dso-tooltip.cjs.entry.js +1 -1
  13. package/dist/cjs/dso-tooltip.cjs.entry.js.map +1 -1
  14. package/dist/cjs/dsot-document-component-demo.cjs.entry.js +1688 -41
  15. package/dist/cjs/dsot-document-component-demo.cjs.entry.js.map +1 -1
  16. package/dist/cjs/loader.cjs.js +1 -1
  17. package/dist/collection/collection-manifest.json +1 -1
  18. package/dist/collection/components/document-component/document-component.css +687 -13
  19. package/dist/collection/components/document-component/document-component.js +31 -7
  20. package/dist/collection/components/document-component/document-component.js.map +1 -1
  21. package/dist/collection/components/document-component/document-component.models.js +2 -0
  22. package/dist/collection/components/document-component/document-component.models.js.map +1 -0
  23. package/dist/collection/components/document-component-demo/document-component.demo.css +11 -0
  24. package/dist/collection/components/document-component-demo/document-component.demo.js +235 -0
  25. package/dist/collection/components/document-component-demo/document-component.demo.js.map +1 -0
  26. package/dist/collection/components/modal/modal.css +3 -3
  27. package/dist/collection/components/ozon-content/nodes/al.node.js +24 -7
  28. package/dist/collection/components/ozon-content/nodes/al.node.js.map +1 -1
  29. package/dist/collection/components/ozon-content/nodes/ext-ref.node.js +3 -1
  30. package/dist/collection/components/ozon-content/nodes/ext-ref.node.js.map +1 -1
  31. package/dist/collection/components/ozon-content/nodes/nieuwe-tekst.node.js +1 -1
  32. package/dist/collection/components/ozon-content/nodes/nieuwe-tekst.node.js.map +1 -1
  33. package/dist/collection/components/ozon-content/nodes/opschrift.node.js +9 -1
  34. package/dist/collection/components/ozon-content/nodes/opschrift.node.js.map +1 -1
  35. package/dist/collection/components/ozon-content/nodes/table.node/table.node.js +1 -2
  36. package/dist/collection/components/ozon-content/nodes/table.node/table.node.js.map +1 -1
  37. package/dist/collection/components/ozon-content/nodes/verwijderde-tekst.node.js +1 -1
  38. package/dist/collection/components/ozon-content/nodes/verwijderde-tekst.node.js.map +1 -1
  39. package/dist/collection/components/ozon-content/ozon-content-context.interface.js.map +1 -1
  40. package/dist/collection/components/ozon-content/ozon-content-mapper.js +11 -9
  41. package/dist/collection/components/ozon-content/ozon-content-mapper.js.map +1 -1
  42. package/dist/collection/components/ozon-content/ozon-content-node-context.interface.js.map +1 -1
  43. package/dist/collection/components/ozon-content/ozon-content.css +1100 -35
  44. package/dist/collection/components/ozon-content/ozon-content.interfaces.js.map +1 -1
  45. package/dist/collection/components/ozon-content/ozon-content.js +17 -83
  46. package/dist/collection/components/ozon-content/ozon-content.js.map +1 -1
  47. package/dist/collection/components/table/table.css +669 -97
  48. package/dist/collection/components/tooltip/tooltip.css +0 -8
  49. package/dist/components/document-component.js +6 -2
  50. package/dist/components/document-component.js.map +1 -1
  51. package/dist/components/dso-modal.js +1 -1
  52. package/dist/components/dso-modal.js.map +1 -1
  53. package/dist/components/dso-table.js +1 -1
  54. package/dist/components/dso-table.js.map +1 -1
  55. package/dist/components/dsot-document-component-demo.js +1694 -45
  56. package/dist/components/dsot-document-component-demo.js.map +1 -1
  57. package/dist/components/index.d.ts +1 -1
  58. package/dist/components/ozon-content.js +500 -50
  59. package/dist/components/ozon-content.js.map +1 -1
  60. package/dist/components/tooltip.js +1 -1
  61. package/dist/components/tooltip.js.map +1 -1
  62. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  63. package/dist/dso-toolkit/dso-toolkit.esm.js.map +1 -1
  64. package/dist/dso-toolkit/p-2401e7f9.entry.js +2 -0
  65. package/dist/dso-toolkit/p-2401e7f9.entry.js.map +1 -0
  66. package/dist/dso-toolkit/p-2ab99812.entry.js +2 -0
  67. package/dist/dso-toolkit/{p-a63c82a4.entry.js.map → p-2ab99812.entry.js.map} +1 -1
  68. package/dist/dso-toolkit/p-432df09a.entry.js +2 -0
  69. package/dist/dso-toolkit/p-432df09a.entry.js.map +1 -0
  70. package/dist/dso-toolkit/p-4573c419.js +2 -0
  71. package/dist/dso-toolkit/p-4573c419.js.map +1 -0
  72. package/dist/dso-toolkit/p-47e77e24.entry.js +2 -0
  73. package/dist/dso-toolkit/p-47e77e24.entry.js.map +1 -0
  74. package/dist/dso-toolkit/p-ab1f0511.entry.js +2 -0
  75. package/dist/dso-toolkit/p-ab1f0511.entry.js.map +1 -0
  76. package/dist/dso-toolkit/p-ad44136d.entry.js +2 -0
  77. package/dist/dso-toolkit/p-ad44136d.entry.js.map +1 -0
  78. package/dist/esm/_commonjsHelpers-1c8beb5f.js +5 -0
  79. package/dist/esm/_commonjsHelpers-1c8beb5f.js.map +1 -0
  80. package/dist/esm/dso-alert_5.entry.js +498 -47
  81. package/dist/esm/dso-alert_5.entry.js.map +1 -1
  82. package/dist/esm/dso-annotation-output_3.entry.js +6 -2
  83. package/dist/esm/dso-annotation-output_3.entry.js.map +1 -1
  84. package/dist/esm/dso-modal.entry.js +1 -1
  85. package/dist/esm/dso-modal.entry.js.map +1 -1
  86. package/dist/esm/dso-table.entry.js +1 -1
  87. package/dist/esm/dso-table.entry.js.map +1 -1
  88. package/dist/esm/dso-toolkit.js +1 -1
  89. package/dist/esm/dso-tooltip.entry.js +1 -1
  90. package/dist/esm/dso-tooltip.entry.js.map +1 -1
  91. package/dist/esm/dsot-document-component-demo.entry.js +1689 -42
  92. package/dist/esm/dsot-document-component-demo.entry.js.map +1 -1
  93. package/dist/esm/loader.js +1 -1
  94. package/dist/types/components/document-component/document-component.d.ts +6 -1
  95. package/dist/types/components/document-component/document-component.models.d.ts +14 -0
  96. package/dist/types/components/document-component-demo/document-component.demo.d.ts +64 -0
  97. package/dist/types/components/ozon-content/nodes/al.node.d.ts +1 -1
  98. package/dist/types/components/ozon-content/ozon-content-context.interface.d.ts +3 -2
  99. package/dist/types/components/ozon-content/ozon-content-mapper.d.ts +0 -1
  100. package/dist/types/components/ozon-content/ozon-content-node-context.interface.d.ts +3 -2
  101. package/dist/types/components/ozon-content/ozon-content.d.ts +4 -25
  102. package/dist/types/components/ozon-content/ozon-content.interfaces.d.ts +1 -4
  103. package/dist/types/components.d.ts +41 -25
  104. package/package.json +8 -2
  105. package/dist/collection/components/document-component/document-component.demo.js +0 -112
  106. package/dist/collection/components/document-component/document-component.demo.js.map +0 -1
  107. package/dist/collection/components/document-component/document-component.types.js +0 -2
  108. package/dist/collection/components/document-component/document-component.types.js.map +0 -1
  109. package/dist/dso-toolkit/p-42ba2c81.entry.js +0 -2
  110. package/dist/dso-toolkit/p-42ba2c81.entry.js.map +0 -1
  111. package/dist/dso-toolkit/p-48d76094.entry.js +0 -2
  112. package/dist/dso-toolkit/p-48d76094.entry.js.map +0 -1
  113. package/dist/dso-toolkit/p-5c5e43d3.entry.js +0 -2
  114. package/dist/dso-toolkit/p-5c5e43d3.entry.js.map +0 -1
  115. package/dist/dso-toolkit/p-8af61320.entry.js +0 -2
  116. package/dist/dso-toolkit/p-8af61320.entry.js.map +0 -1
  117. package/dist/dso-toolkit/p-9a3f154b.entry.js +0 -2
  118. package/dist/dso-toolkit/p-9a3f154b.entry.js.map +0 -1
  119. package/dist/dso-toolkit/p-a63c82a4.entry.js +0 -2
  120. package/dist/types/components/document-component/document-component.demo.d.ts +0 -40
  121. package/dist/types/components/document-component/document-component.types.d.ts +0 -8
@@ -13,6 +13,9 @@ export class DocumentComponent {
13
13
  this.dsoOpenToggle.emit({ originalEvent: e, open: !this.open });
14
14
  }
15
15
  };
16
+ this.handleOzonContentAnchorClick = (e) => {
17
+ this.dsoOzonContentAnchorClick.emit({ originalEvent: e, ozonContentAnchorClick: e.detail });
18
+ };
16
19
  this.heading = "h2";
17
20
  this.label = undefined;
18
21
  this.nummer = undefined;
@@ -45,7 +48,7 @@ export class DocumentComponent {
45
48
  }
46
49
  render() {
47
50
  const suffix = this.suffix();
48
- return (h(Fragment, null, h("div", { class: "heading-container" }, this.wijzigactie && h("span", { class: "wijzigactie-label" }, this.wijzigactieLabel, ":"), h("div", { class: "heading" }, h(Heading, { heading: this.heading, class: "heading-element", onClick: this.handleHeadingClick }, this.type !== "LID" && (h("button", { type: "button", class: "toggle-button" }, h("dso-icon", { icon: this.open ? "chevron-down" : "chevron-right" }))), h("div", { class: "title" }, this.notApplicable && h("span", { class: "not-applicable" }, "Niet van toepassing:"), this.label || this.nummer || this.opschrift ? (h(Fragment, null, this.label && (h(Fragment, null, " ", h("dso-ozon-content", { content: this.label, inline: true }))), this.nummer && (h(Fragment, null, " ", h("dso-ozon-content", { content: this.nummer, inline: true }))), this.opschrift && (h(Fragment, null, " ", h("dso-ozon-content", { content: this.opschrift, inline: true }))))) : (this.alternativeTitle), suffix && h("span", null, " - [", suffix, "]"))), this.genesteOntwerpInformatie && !this.open && !this.bevatOntwerpInformatie && (h(Fragment, null, h("dso-badge", { status: "warning", "aria-describedby": "nested-draft-description" }, "!"), h("dso-tooltip", { id: "nested-draft-description" }, "Er is een ontwerp beschikbaar."))), (this.bevatOntwerpInformatie || this.annotated) && (h("div", { class: "addons" }, this.bevatOntwerpInformatie && (h("dso-label", { status: "warning", compact: true }, "Ontwerp")), this.annotated && (h("dso-annotation-button", { identifier: "expandable", open: this.openAnnotation, onDsoClick: (e) => this.dsoAnnotationToggle.emit({ originalEvent: e }) })))))), h("slot", { name: "annotation" }), this.open && (this.inhoud || this.gereserveerd) && (h("div", { class: "content" }, this.gereserveerd && (h("dso-alert", { status: "info" }, "Dit onderdeel is gereserveerd voor toekomstige toevoeging.")), h("dso-ozon-content", { content: this.inhoud }))), h("slot", null)));
51
+ return (h(Fragment, null, h("div", { class: "heading-container" }, this.wijzigactie && h("span", { class: "wijzigactie-label" }, this.wijzigactieLabel, ":"), h("div", { class: "heading" }, h(Heading, { heading: this.heading, class: "heading-element", onClick: this.handleHeadingClick }, this.type !== "LID" && (h("button", { type: "button", class: "toggle-button" }, h("dso-icon", { icon: this.open ? "chevron-down" : "chevron-right" }))), h("div", { class: "title" }, this.notApplicable && h("span", { class: "not-applicable" }, "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, inline: true }))), this.nummer && (h(Fragment, null, " ", h("dso-ozon-content", { content: this.nummer, onDsoAnchorClick: this.handleOzonContentAnchorClick, inline: true }))), this.opschrift && (h(Fragment, null, " ", h("dso-ozon-content", { content: this.opschrift, onDsoAnchorClick: this.handleOzonContentAnchorClick, inline: true }))))) : (this.alternativeTitle), suffix && h("span", null, " - [", suffix, "]"))), this.genesteOntwerpInformatie && !this.open && !this.bevatOntwerpInformatie && (h(Fragment, null, h("dso-badge", { status: "warning", "aria-describedby": "nested-draft-description" }, "!"), h("dso-tooltip", { id: "nested-draft-description" }, "Er is een ontwerp beschikbaar."))), (this.bevatOntwerpInformatie || this.annotated) && (h("div", { class: "addons" }, this.bevatOntwerpInformatie && (h("dso-label", { status: "warning", compact: true }, "Ontwerp")), this.annotated && (h("dso-annotation-button", { identifier: "expandable", open: this.openAnnotation, onDsoClick: (e) => this.dsoAnnotationToggle.emit({ originalEvent: e }) })))))), h("slot", { name: "annotation" }), this.open && (this.inhoud || this.gereserveerd || this.vervallen) && (h("div", { class: "content" }, this.gereserveerd && (h("dso-alert", { status: "info" }, "Dit onderdeel is gereserveerd voor toekomstige toevoeging.")), this.vervallen && h("dso-alert", { status: "info" }, "Dit onderdeel is vervallen."), this.inhoud && (h("dso-ozon-content", { content: this.inhoud, onDsoAnchorClick: this.handleOzonContentAnchorClick })))), h("slot", null)));
49
52
  }
50
53
  static get is() { return "dso-document-component"; }
51
54
  static get encapsulation() { return "shadow"; }
@@ -352,8 +355,8 @@ export class DocumentComponent {
352
355
  "references": {
353
356
  "DocumentComponentWijzigactie": {
354
357
  "location": "import",
355
- "path": "./document-component.types",
356
- "id": "src/components/document-component/document-component.types.ts::DocumentComponentWijzigactie"
358
+ "path": "./document-component.models",
359
+ "id": "src/components/document-component/document-component.models.ts::DocumentComponentWijzigactie"
357
360
  }
358
361
  }
359
362
  },
@@ -385,8 +388,29 @@ export class DocumentComponent {
385
388
  "references": {
386
389
  "DocumentComponentOpenToggleEvent": {
387
390
  "location": "import",
388
- "path": "./document-component.types",
389
- "id": "src/components/document-component/document-component.types.ts::DocumentComponentOpenToggleEvent"
391
+ "path": "./document-component.models",
392
+ "id": "src/components/document-component/document-component.models.ts::DocumentComponentOpenToggleEvent"
393
+ }
394
+ }
395
+ }
396
+ }, {
397
+ "method": "dsoOzonContentAnchorClick",
398
+ "name": "dsoOzonContentAnchorClick",
399
+ "bubbles": false,
400
+ "cancelable": true,
401
+ "composed": true,
402
+ "docs": {
403
+ "tags": [],
404
+ "text": "Emitted when the user actives intRef or intIoRef anchors in Ozon Content"
405
+ },
406
+ "complexType": {
407
+ "original": "DocumentComponentOzonContentAnchorClickEvent",
408
+ "resolved": "DocumentComponentOzonContentAnchorClickEvent",
409
+ "references": {
410
+ "DocumentComponentOzonContentAnchorClickEvent": {
411
+ "location": "import",
412
+ "path": "./document-component.models",
413
+ "id": "src/components/document-component/document-component.models.ts::DocumentComponentOzonContentAnchorClickEvent"
390
414
  }
391
415
  }
392
416
  }
@@ -406,8 +430,8 @@ export class DocumentComponent {
406
430
  "references": {
407
431
  "DocumentComponentToggleAnnotationEvent": {
408
432
  "location": "import",
409
- "path": "./document-component.types",
410
- "id": "src/components/document-component/document-component.types.ts::DocumentComponentToggleAnnotationEvent"
433
+ "path": "./document-component.models",
434
+ "id": "src/components/document-component/document-component.models.ts::DocumentComponentToggleAnnotationEvent"
411
435
  }
412
436
  }
413
437
  }
@@ -1 +1 @@
1
- {"version":3,"file":"document-component.js","sourceRoot":"","sources":["../../../src/components/document-component/document-component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAsB,KAAK,EAAgB,QAAQ,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAMtG,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAEvD,MAAM,iBAAiB,GAA8D;EACnF,eAAe,EAAE,YAAY;EAC7B,SAAS,EAAE,YAAY;EACvB,kBAAkB,EAAE,YAAY;EAChC,OAAO,EAAE,YAAY;CACtB,CAAC;AAOF,MAAM,OAAO,iBAAiB;;IAuHpB,uBAAkB,GAAG,CAAC,CAAa,EAAE,EAAE;MAC7C,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,EAAE;QACvB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;OACjE;IACH,CAAC,CAAC;mBAtH0C,IAAI;;;;;gBA8BzC,KAAK;oBAMD,KAAK;yBAMA,KAAK;oCAMM,KAAK;kCAMP,KAAK;qBAMlB,KAAK;wBAMF,KAAK;qBAMR,KAAK;0BAMA,KAAK;;;;;EAgCtB,IAAY,gBAAgB;IAC1B,OAAO,IAAI,CAAC,WAAW,IAAI,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;EACjE,CAAC;EAQO,MAAM;IACZ,IAAI,IAAI,CAAC,SAAS,EAAE;MAClB,OAAO,WAAW,CAAC;KACpB;IAED,IAAI,IAAI,CAAC,YAAY,EAAE;MACrB,OAAO,cAAc,CAAC;KACvB;IAED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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { h, Component, ComponentInterface, Event, EventEmitter, Fragment, Prop } from \"@stencil/core\";\r\nimport {\r\n DocumentComponentOpenToggleEvent,\r\n DocumentComponentToggleAnnotationEvent,\r\n DocumentComponentWijzigactie,\r\n} from \"./document-component.types\";\r\nimport { Heading } from \"./document-component-heading\";\r\n\r\nconst wijzigActieLabels: { [wijzigActie in DocumentComponentWijzigactie]: string } = {\r\n nieuweContainer: \"Toegevoegd\",\r\n verwijder: \"Verwijderd\",\r\n verwijderContainer: \"Verwijderd\",\r\n voegtoe: \"Toegevoegd\",\r\n};\r\n\r\n@Component({\r\n tag: \"dso-document-component\",\r\n styleUrl: \"document-component.scss\",\r\n shadow: true,\r\n})\r\nexport class DocumentComponent implements ComponentInterface {\r\n /**\r\n * The heading element to use.\r\n */\r\n @Prop()\r\n heading: \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" = \"h2\";\r\n\r\n /**\r\n * The Label XML.\r\n */\r\n @Prop()\r\n label?: string;\r\n\r\n /**\r\n * The Nummer XML.\r\n */\r\n @Prop()\r\n nummer?: string;\r\n\r\n /**\r\n * The Opschrift XML.\r\n */\r\n @Prop()\r\n opschrift?: string;\r\n\r\n /**\r\n * The Inhoud XML.\r\n */\r\n @Prop()\r\n inhoud?: string;\r\n\r\n /**\r\n * This boolean attribute indicates whether the children are visible.\r\n */\r\n @Prop({ reflect: true })\r\n open = false;\r\n\r\n /**\r\n * Marks this Document Component as belonging to an active filter.\r\n */\r\n @Prop({ reflect: true })\r\n filtered = false;\r\n\r\n /**\r\n * Marks this Document Component as not-applicable.\r\n */\r\n @Prop({ reflect: true })\r\n notApplicable = false;\r\n\r\n /**\r\n * When a child Document Component has a status \"Draft\".\r\n */\r\n @Prop({ reflect: true })\r\n genesteOntwerpInformatie = false;\r\n\r\n /**\r\n * Marks as draft.\r\n */\r\n @Prop({ reflect: true })\r\n bevatOntwerpInformatie = false;\r\n\r\n /**\r\n * Enables annotations.\r\n */\r\n @Prop({ reflect: true })\r\n annotated = false;\r\n\r\n /**\r\n * Marks Document Component as reserved.\r\n */\r\n @Prop()\r\n gereserveerd = false;\r\n\r\n /**\r\n * Marks the Document Component as expired.\r\n */\r\n @Prop()\r\n vervallen = false;\r\n\r\n /**\r\n * When the Annotation Output is opened, set this to true.\r\n */\r\n @Prop()\r\n openAnnotation = false;\r\n\r\n /**\r\n * An alternative title to show when there is nothing to create a title.\r\n */\r\n @Prop()\r\n alternativeTitle?: string;\r\n\r\n /**\r\n * Type of Document Component.\r\n */\r\n @Prop({ reflect: true })\r\n type?: string;\r\n\r\n /**\r\n * The wijzigactie as in STOP.\r\n */\r\n @Prop({ reflect: true })\r\n wijzigactie?: DocumentComponentWijzigactie;\r\n\r\n /**\r\n * Emitted when the user activates the toggle.\r\n */\r\n @Event({ bubbles: false })\r\n dsoOpenToggle!: EventEmitter<DocumentComponentOpenToggleEvent>;\r\n\r\n /**\r\n * Emitted when the user activates the annotation button.\r\n */\r\n @Event({ bubbles: false })\r\n dsoAnnotationToggle!: EventEmitter<DocumentComponentToggleAnnotationEvent>;\r\n\r\n private get wijzigactieLabel(): string | undefined {\r\n return this.wijzigactie && wijzigActieLabels[this.wijzigactie];\r\n }\r\n\r\n private handleHeadingClick = (e: MouseEvent) => {\r\n if (this.type !== \"LID\") {\r\n this.dsoOpenToggle.emit({ originalEvent: e, open: !this.open });\r\n }\r\n };\r\n\r\n private suffix(): string | undefined {\r\n if (this.vervallen) {\r\n return \"vervallen\";\r\n }\r\n\r\n if (this.gereserveerd) {\r\n return \"gereserveerd\";\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n render() {\r\n const suffix = this.suffix();\r\n\r\n return (\r\n <>\r\n <div class=\"heading-container\">\r\n {this.wijzigactie && <span class=\"wijzigactie-label\">{this.wijzigactieLabel}:</span>}\r\n <div class=\"heading\">\r\n <Heading heading={this.heading} class=\"heading-element\" onClick={this.handleHeadingClick}>\r\n {this.type !== \"LID\" && (\r\n <button type=\"button\" class=\"toggle-button\">\r\n <dso-icon icon={this.open ? \"chevron-down\" : \"chevron-right\"}></dso-icon>\r\n </button>\r\n )}\r\n <div class=\"title\">\r\n {this.notApplicable && <span class=\"not-applicable\">Niet van toepassing:</span>}\r\n {this.label || this.nummer || this.opschrift ? (\r\n <>\r\n {this.label && (\r\n <>\r\n {\" \"}\r\n <dso-ozon-content content={this.label} inline></dso-ozon-content>\r\n </>\r\n )}\r\n {this.nummer && (\r\n <>\r\n {\" \"}\r\n <dso-ozon-content content={this.nummer} inline></dso-ozon-content>\r\n </>\r\n )}\r\n {this.opschrift && (\r\n <>\r\n {\" \"}\r\n <dso-ozon-content content={this.opschrift} inline></dso-ozon-content>\r\n </>\r\n )}\r\n </>\r\n ) : (\r\n this.alternativeTitle\r\n )}\r\n {suffix && <span> - [{suffix}]</span>}\r\n </div>\r\n </Heading>\r\n {this.genesteOntwerpInformatie && !this.open && !this.bevatOntwerpInformatie && (\r\n <>\r\n <dso-badge status=\"warning\" aria-describedby=\"nested-draft-description\">\r\n !\r\n </dso-badge>\r\n <dso-tooltip id=\"nested-draft-description\">Er is een ontwerp beschikbaar.</dso-tooltip>\r\n </>\r\n )}\r\n {(this.bevatOntwerpInformatie || this.annotated) && (\r\n <div class=\"addons\">\r\n {this.bevatOntwerpInformatie && (\r\n <dso-label status=\"warning\" compact>\r\n Ontwerp\r\n </dso-label>\r\n )}\r\n {this.annotated && (\r\n <dso-annotation-button\r\n identifier=\"expandable\"\r\n open={this.openAnnotation}\r\n onDsoClick={(e) => this.dsoAnnotationToggle.emit({ originalEvent: e })}\r\n ></dso-annotation-button>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n </div>\r\n <slot name=\"annotation\" />\r\n {this.open && (this.inhoud || this.gereserveerd) && (\r\n <div class=\"content\">\r\n {this.gereserveerd && (\r\n <dso-alert status=\"info\">Dit onderdeel is gereserveerd voor toekomstige toevoeging.</dso-alert>\r\n )}\r\n <dso-ozon-content content={this.inhoud}></dso-ozon-content>\r\n </div>\r\n )}\r\n <slot />\r\n </>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"document-component.js","sourceRoot":"","sources":["../../../src/components/document-component/document-component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAsB,KAAK,EAAgB,QAAQ,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAQtG,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAIvD,MAAM,iBAAiB,GAA8D;EACnF,eAAe,EAAE,YAAY;EAC7B,SAAS,EAAE,YAAY;EACvB,kBAAkB,EAAE,YAAY;EAChC,OAAO,EAAE,YAAY;CACtB,CAAC;AAOF,MAAM,OAAO,iBAAiB;;IA6HpB,uBAAkB,GAAG,CAAC,CAAa,EAAE,EAAE;MAC7C,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,EAAE;QACvB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;OACjE;IACH,CAAC,CAAC;IAcM,iCAA4B,GAAG,CAAC,CAAyD,EAAE,EAAE;MACnG,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,sBAAsB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IAC9F,CAAC,CAAC;mBA5I0C,IAAI;;;;;gBA8BzC,KAAK;oBAMD,KAAK;yBAMA,KAAK;oCAMM,KAAK;kCAMP,KAAK;qBAMlB,KAAK;wBAMF,KAAK;qBAMR,KAAK;0BAMA,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K,EAAC,SAAS;QACjB,IAAI,CAAC,YAAY,IAAI,CACpB,iBAAW,MAAM,EAAC,MAAM,iEAAuE,CAChG;QACA,IAAI,CAAC,SAAS,IAAI,iBAAW,MAAM,EAAC,MAAM,kCAAwC;QAClF,IAAI,CAAC,MAAM,IAAI,CACd,wBACE,OAAO,EAAE,IAAI,CAAC,MAAM,EACpB,gBAAgB,EAAE,IAAI,CAAC,4BAA4B,GACjC,CACrB,CACG,CACP;MACD,eAAQ,CACP,CACJ,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { h, Component, ComponentInterface, Event, EventEmitter, Fragment, Prop } from \"@stencil/core\";\r\nimport {\r\n DocumentComponentOpenToggleEvent,\r\n DocumentComponentToggleAnnotationEvent,\r\n DocumentComponentOzonContentAnchorClickEvent,\r\n DocumentComponentWijzigactie,\r\n} from \"./document-component.models\";\r\nimport { OzonContentAnchorClickEvent } from \"../ozon-content/ozon-content.interfaces\";\r\nimport { Heading } from \"./document-component-heading\";\r\n\r\nimport { DsoOzonContentCustomEvent } from \"../../components\";\r\n\r\nconst wijzigActieLabels: { [wijzigActie in DocumentComponentWijzigactie]: string } = {\r\n nieuweContainer: \"Toegevoegd\",\r\n verwijder: \"Verwijderd\",\r\n verwijderContainer: \"Verwijderd\",\r\n voegtoe: \"Toegevoegd\",\r\n};\r\n\r\n@Component({\r\n tag: \"dso-document-component\",\r\n styleUrl: \"document-component.scss\",\r\n shadow: true,\r\n})\r\nexport class DocumentComponent implements ComponentInterface {\r\n /**\r\n * The heading element to use.\r\n */\r\n @Prop()\r\n heading: \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" = \"h2\";\r\n\r\n /**\r\n * The Label XML.\r\n */\r\n @Prop()\r\n label?: string;\r\n\r\n /**\r\n * The Nummer XML.\r\n */\r\n @Prop()\r\n nummer?: string;\r\n\r\n /**\r\n * The Opschrift XML.\r\n */\r\n @Prop()\r\n opschrift?: string;\r\n\r\n /**\r\n * The Inhoud XML.\r\n */\r\n @Prop()\r\n inhoud?: string;\r\n\r\n /**\r\n * This boolean attribute indicates whether the children are visible.\r\n */\r\n @Prop({ reflect: true })\r\n open = false;\r\n\r\n /**\r\n * Marks this Document Component as belonging to an active filter.\r\n */\r\n @Prop({ reflect: true })\r\n filtered = false;\r\n\r\n /**\r\n * Marks this Document Component as not-applicable.\r\n */\r\n @Prop({ reflect: true })\r\n notApplicable = false;\r\n\r\n /**\r\n * When a child Document Component has a status \"Draft\".\r\n */\r\n @Prop({ reflect: true })\r\n genesteOntwerpInformatie = false;\r\n\r\n /**\r\n * Marks as draft.\r\n */\r\n @Prop({ reflect: true })\r\n bevatOntwerpInformatie = false;\r\n\r\n /**\r\n * Enables annotations.\r\n */\r\n @Prop({ reflect: true })\r\n annotated = false;\r\n\r\n /**\r\n * Marks Document Component as reserved.\r\n */\r\n @Prop()\r\n gereserveerd = false;\r\n\r\n /**\r\n * Marks the Document Component as expired.\r\n */\r\n @Prop()\r\n vervallen = false;\r\n\r\n /**\r\n * When the Annotation Output is opened, set this to true.\r\n */\r\n @Prop()\r\n openAnnotation = false;\r\n\r\n /**\r\n * An alternative title to show when there is nothing to create a title.\r\n */\r\n @Prop()\r\n alternativeTitle?: string;\r\n\r\n /**\r\n * Type of Document Component.\r\n */\r\n @Prop({ reflect: true })\r\n type?: string;\r\n\r\n /**\r\n * The wijzigactie as in STOP.\r\n */\r\n @Prop({ reflect: true })\r\n wijzigactie?: DocumentComponentWijzigactie;\r\n\r\n /**\r\n * Emitted when the user activates the toggle.\r\n */\r\n @Event({ bubbles: false })\r\n dsoOpenToggle!: EventEmitter<DocumentComponentOpenToggleEvent>;\r\n\r\n /**\r\n * Emitted when the user actives intRef or intIoRef anchors in Ozon Content\r\n */\r\n @Event({ bubbles: false })\r\n dsoOzonContentAnchorClick!: EventEmitter<DocumentComponentOzonContentAnchorClickEvent>;\r\n\r\n /**\r\n * Emitted when the user activates the annotation button.\r\n */\r\n @Event({ bubbles: false })\r\n dsoAnnotationToggle!: EventEmitter<DocumentComponentToggleAnnotationEvent>;\r\n\r\n private get wijzigactieLabel(): string | undefined {\r\n return this.wijzigactie && wijzigActieLabels[this.wijzigactie];\r\n }\r\n\r\n private handleHeadingClick = (e: MouseEvent) => {\r\n if (this.type !== \"LID\") {\r\n this.dsoOpenToggle.emit({ originalEvent: e, open: !this.open });\r\n }\r\n };\r\n\r\n private suffix(): string | undefined {\r\n if (this.vervallen) {\r\n return \"vervallen\";\r\n }\r\n\r\n if (this.gereserveerd) {\r\n return \"gereserveerd\";\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n private handleOzonContentAnchorClick = (e: DsoOzonContentCustomEvent<OzonContentAnchorClickEvent>) => {\r\n this.dsoOzonContentAnchorClick.emit({ originalEvent: e, ozonContentAnchorClick: e.detail });\r\n };\r\n\r\n render() {\r\n const suffix = this.suffix();\r\n\r\n return (\r\n <>\r\n <div class=\"heading-container\">\r\n {this.wijzigactie && <span class=\"wijzigactie-label\">{this.wijzigactieLabel}:</span>}\r\n <div class=\"heading\">\r\n <Heading heading={this.heading} class=\"heading-element\" onClick={this.handleHeadingClick}>\r\n {this.type !== \"LID\" && (\r\n <button type=\"button\" class=\"toggle-button\">\r\n <dso-icon icon={this.open ? \"chevron-down\" : \"chevron-right\"}></dso-icon>\r\n </button>\r\n )}\r\n <div class=\"title\">\r\n {this.notApplicable && <span class=\"not-applicable\">Niet van toepassing:</span>}\r\n {this.label || this.nummer || this.opschrift ? (\r\n <>\r\n {this.label && (\r\n <>\r\n {\" \"}\r\n <dso-ozon-content\r\n content={this.label}\r\n onDsoAnchorClick={this.handleOzonContentAnchorClick}\r\n inline\r\n ></dso-ozon-content>\r\n </>\r\n )}\r\n {this.nummer && (\r\n <>\r\n {\" \"}\r\n <dso-ozon-content\r\n content={this.nummer}\r\n onDsoAnchorClick={this.handleOzonContentAnchorClick}\r\n inline\r\n ></dso-ozon-content>\r\n </>\r\n )}\r\n {this.opschrift && (\r\n <>\r\n {\" \"}\r\n <dso-ozon-content\r\n content={this.opschrift}\r\n onDsoAnchorClick={this.handleOzonContentAnchorClick}\r\n inline\r\n ></dso-ozon-content>\r\n </>\r\n )}\r\n </>\r\n ) : (\r\n this.alternativeTitle\r\n )}\r\n {suffix && <span> - [{suffix}]</span>}\r\n </div>\r\n </Heading>\r\n {this.genesteOntwerpInformatie && !this.open && !this.bevatOntwerpInformatie && (\r\n <>\r\n <dso-badge status=\"warning\" aria-describedby=\"nested-draft-description\">\r\n !\r\n </dso-badge>\r\n <dso-tooltip id=\"nested-draft-description\">Er is een ontwerp beschikbaar.</dso-tooltip>\r\n </>\r\n )}\r\n {(this.bevatOntwerpInformatie || this.annotated) && (\r\n <div class=\"addons\">\r\n {this.bevatOntwerpInformatie && (\r\n <dso-label status=\"warning\" compact>\r\n Ontwerp\r\n </dso-label>\r\n )}\r\n {this.annotated && (\r\n <dso-annotation-button\r\n identifier=\"expandable\"\r\n open={this.openAnnotation}\r\n onDsoClick={(e) => this.dsoAnnotationToggle.emit({ originalEvent: e })}\r\n ></dso-annotation-button>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n </div>\r\n <slot name=\"annotation\" />\r\n {this.open && (this.inhoud || this.gereserveerd || this.vervallen) && (\r\n <div class=\"content\">\r\n {this.gereserveerd && (\r\n <dso-alert status=\"info\">Dit onderdeel is gereserveerd voor toekomstige toevoeging.</dso-alert>\r\n )}\r\n {this.vervallen && <dso-alert status=\"info\">Dit onderdeel is vervallen.</dso-alert>}\r\n {this.inhoud && (\r\n <dso-ozon-content\r\n content={this.inhoud}\r\n onDsoAnchorClick={this.handleOzonContentAnchorClick}\r\n ></dso-ozon-content>\r\n )}\r\n </div>\r\n )}\r\n <slot />\r\n </>\r\n );\r\n }\r\n}\r\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=document-component.models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-component.models.js","sourceRoot":"","sources":["../../../src/components/document-component/document-component.models.ts"],"names":[],"mappings":"","sourcesContent":["import { DsoOzonContentCustomEvent } from \"../../components\";\r\nimport { OzonContentAnchorClickEvent } from \"../ozon-content/ozon-content.interfaces\";\r\n\r\nexport interface DocumentComponentOpenToggleEvent {\r\n originalEvent: Event;\r\n open: boolean;\r\n}\r\n\r\nexport interface DocumentComponentToggleAnnotationEvent {\r\n originalEvent: Event;\r\n}\r\n\r\nexport type DocumentComponentWijzigactie = \"voegtoe\" | \"verwijder\" | \"nieuweContainer\" | \"verwijderContainer\";\r\n\r\nexport interface DocumentComponentOzonContentAnchorClickEvent {\r\n originalEvent: DsoOzonContentCustomEvent<OzonContentAnchorClickEvent>;\r\n ozonContentAnchorClick: OzonContentAnchorClickEvent;\r\n}\r\n"]}
@@ -0,0 +1,11 @@
1
+ :host {
2
+ display: block;
3
+ margin: 0 8px;
4
+ border-left: 1px dashed transparent;
5
+ border-right: 1px dashed transparent;
6
+ }
7
+
8
+ :host([show-canvas]) {
9
+ border-left: 1px dashed pink;
10
+ border-right: 1px dashed pink;
11
+ }
@@ -0,0 +1,235 @@
1
+ import { h } from "@stencil/core";
2
+ import sampleSize from "lodash.samplesize";
3
+ import random from "lodash.random";
4
+ export class DocumentComponentDemo {
5
+ constructor() {
6
+ this.DocumentComponent = ({ path }) => {
7
+ var _a;
8
+ const documentComponent = path.at(-1);
9
+ const { DocumentComponent } = this;
10
+ return (h("ul", null, documentComponent &&
11
+ ((_a = this.getEmbeddedDocumentComponents(documentComponent)) === null || _a === void 0 ? void 0 : _a.map((d, i) => (h("li", { key: d.documentTechnischId }, h("dso-document-component", { annotated: i % 3 === 2, bevatOntwerpInformatie: !!d.bevatOntwerpInformatie, filtered: this.isOpen(d) ? this.isFiltered(d) : this.hasFilteredChildren(d), genesteOntwerpInformatie: this.hasNestedDraft(d), gereserveerd: d.gereserveerd, heading: "h2", inhoud: d.inhoud, label: d.labelXml, openAnnotation: this.isOpenedAnnotation(d), notApplicable: this.isNotApplicable(d) || path.some((p) => this.isNotApplicable(p)), nummer: d.nummerXml, onDsoAnnotationToggle: () => this.handleAnnotationToggle(d), onDsoOpenToggle: (e) => this.handleOpenToggle(e, d), onDsoOzonContentAnchorClick: (e) => this.handleOzonContentAnchorClick(e), open: this.isOpen(d), opschrift: d.opschrift, type: d.type, vervallen: d.vervallen, wijzigactie: d.wijzigactie }, this.isOpenedAnnotation(d) && (h("dso-annotation-output", { slot: "annotation", open: true, identifier: "test", onDsoClose: () => this.handleAnnotationToggle(d) }, h("span", { slot: "title" }, "Annotaties"), h("dso-slide-toggle", { checked: this.isCheckedSlideToggle(d), onDsoActiveChange: () => this.handleSelectableChange(d) }, "Delfzijl"))), this.showContent(d) && h(DocumentComponent, { path: [...path, d] }))))))));
12
+ };
13
+ this.showCanvas = false;
14
+ this.jsonFile = undefined;
15
+ this.openDefault = false;
16
+ this.response = undefined;
17
+ this.openOrClosed = [];
18
+ this.openedAnnotation = [];
19
+ this.filtered = [];
20
+ this.notApplicable = [];
21
+ this.activeAnnotationSelectables = [];
22
+ }
23
+ async jsonFileWatcher() {
24
+ this.openOrClosed = [];
25
+ await this.loadData();
26
+ }
27
+ async openDefaultWatcher() {
28
+ this.openOrClosed = [];
29
+ await this.loadData();
30
+ }
31
+ async componentDidLoad() {
32
+ await this.loadData();
33
+ }
34
+ getEmbeddedDocumentComponents(documentComponent) {
35
+ var _a, _b, _c;
36
+ return ((_b = (_a = documentComponent === null || documentComponent === void 0 ? void 0 : documentComponent._embedded) === null || _a === void 0 ? void 0 : _a.ontwerpTekststructuurDocumentComponenten) !== null && _b !== void 0 ? _b : (_c = documentComponent === null || documentComponent === void 0 ? void 0 : documentComponent._embedded) === null || _c === void 0 ? void 0 : _c.tekststructuurDocumentComponenten);
37
+ }
38
+ concatEmbeddedDocumentComponents(documentComponent) {
39
+ var _a;
40
+ const embeddedDocuments = [...((_a = this.getEmbeddedDocumentComponents(documentComponent)) !== null && _a !== void 0 ? _a : [])];
41
+ for (const d of embeddedDocuments) {
42
+ embeddedDocuments.push(...this.concatEmbeddedDocumentComponents(d));
43
+ }
44
+ return embeddedDocuments;
45
+ }
46
+ selectRandomDocumentComponents(documentComponent, exclude = []) {
47
+ const documentComponents = this.concatEmbeddedDocumentComponents(documentComponent).filter((d) => !exclude.includes(d));
48
+ const size = random(0, Math.floor(documentComponents.length / 10));
49
+ return sampleSize(documentComponents, size);
50
+ }
51
+ async loadData() {
52
+ var _a;
53
+ if (!this.jsonFile) {
54
+ this.response = undefined;
55
+ return;
56
+ }
57
+ const data = await fetch(this.jsonFile).then((r) => r.json());
58
+ const lichaam = (_a = this.getEmbeddedDocumentComponents(data)) === null || _a === void 0 ? void 0 : _a.find((documentComponent) => documentComponent.type === "LICHAAM");
59
+ if (lichaam) {
60
+ this.response = lichaam;
61
+ this.notApplicable = this.selectRandomDocumentComponents(lichaam);
62
+ this.filtered = this.selectRandomDocumentComponents(lichaam, this.notApplicable);
63
+ }
64
+ }
65
+ handleOpenToggle(_e, documentComponent) {
66
+ const isOpenOrClosed = this.openOrClosed.includes(documentComponent);
67
+ this.openOrClosed = !isOpenOrClosed
68
+ ? [...this.openOrClosed, documentComponent]
69
+ : this.openOrClosed.filter((d) => d !== documentComponent);
70
+ }
71
+ handleAnnotationToggle(documentComponent) {
72
+ this.openedAnnotation = this.isOpenedAnnotation(documentComponent)
73
+ ? this.openedAnnotation.filter((d) => d !== documentComponent)
74
+ : [...this.openedAnnotation, documentComponent];
75
+ if (!this.isOpen(documentComponent)) {
76
+ this.openOrClosed = [...this.openOrClosed, documentComponent];
77
+ }
78
+ }
79
+ handleSelectableChange(documentComponent) {
80
+ this.activeAnnotationSelectables = this.isCheckedSlideToggle(documentComponent)
81
+ ? this.activeAnnotationSelectables.filter((d) => d !== documentComponent)
82
+ : [...this.activeAnnotationSelectables, documentComponent];
83
+ }
84
+ handleOzonContentAnchorClick(e) {
85
+ this.dsotOzonContentAnchorClick.emit(e.detail);
86
+ }
87
+ isCheckedSlideToggle(documentComponent) {
88
+ return this.activeAnnotationSelectables.includes(documentComponent);
89
+ }
90
+ hasFilteredChildren(documentComponent) {
91
+ var _a, _b;
92
+ return (this.filtered.includes(documentComponent) ||
93
+ ((_b = (_a = this.getEmbeddedDocumentComponents(documentComponent)) === null || _a === void 0 ? void 0 : _a.some((d) => this.hasFilteredChildren(d))) !== null && _b !== void 0 ? _b : false));
94
+ }
95
+ isOpen(documentComponent) {
96
+ return documentComponent.type === "LID" || this.openDefault
97
+ ? !this.openOrClosed.includes(documentComponent)
98
+ : this.openOrClosed.includes(documentComponent);
99
+ }
100
+ isOpenedAnnotation(documentComponent) {
101
+ return this.openedAnnotation.includes(documentComponent);
102
+ }
103
+ isFiltered(documentComponent) {
104
+ return this.filtered.includes(documentComponent);
105
+ }
106
+ isNotApplicable(documentComponent) {
107
+ return this.notApplicable.includes(documentComponent);
108
+ }
109
+ hasNestedDraft(documentComponent) {
110
+ var _a, _b;
111
+ return ((_b = (_a = this.getEmbeddedDocumentComponents(documentComponent)) === null || _a === void 0 ? void 0 : _a.some((d) => !!d.bevatOntwerpInformatie || this.hasNestedDraft(d))) !== null && _b !== void 0 ? _b : false);
112
+ }
113
+ showContent(documentComponent) {
114
+ var _a;
115
+ return (this.isOpen(documentComponent) &&
116
+ !!(((_a = this.getEmbeddedDocumentComponents(documentComponent)) === null || _a === void 0 ? void 0 : _a.length) || documentComponent.inhoud));
117
+ }
118
+ render() {
119
+ const { DocumentComponent } = this;
120
+ return (h("dso-responsive-element", { class: "dso-document-components" }, this.response && h(DocumentComponent, { path: [this.response] })));
121
+ }
122
+ static get is() { return "dsot-document-component-demo"; }
123
+ static get encapsulation() { return "scoped"; }
124
+ static get originalStyleUrls() {
125
+ return {
126
+ "$": ["document-component.demo.scss"]
127
+ };
128
+ }
129
+ static get styleUrls() {
130
+ return {
131
+ "$": ["document-component.demo.css"]
132
+ };
133
+ }
134
+ static get properties() {
135
+ return {
136
+ "showCanvas": {
137
+ "type": "boolean",
138
+ "mutable": false,
139
+ "complexType": {
140
+ "original": "boolean",
141
+ "resolved": "boolean",
142
+ "references": {}
143
+ },
144
+ "required": false,
145
+ "optional": false,
146
+ "docs": {
147
+ "tags": [],
148
+ "text": "Show canvas to where Document Component extends."
149
+ },
150
+ "attribute": "show-canvas",
151
+ "reflect": true,
152
+ "defaultValue": "false"
153
+ },
154
+ "jsonFile": {
155
+ "type": "string",
156
+ "mutable": false,
157
+ "complexType": {
158
+ "original": "string",
159
+ "resolved": "string | undefined",
160
+ "references": {}
161
+ },
162
+ "required": false,
163
+ "optional": true,
164
+ "docs": {
165
+ "tags": [],
166
+ "text": "Name of the file to load."
167
+ },
168
+ "attribute": "json-file",
169
+ "reflect": false
170
+ },
171
+ "openDefault": {
172
+ "type": "boolean",
173
+ "mutable": false,
174
+ "complexType": {
175
+ "original": "boolean",
176
+ "resolved": "boolean",
177
+ "references": {}
178
+ },
179
+ "required": false,
180
+ "optional": false,
181
+ "docs": {
182
+ "tags": [],
183
+ "text": "The default state for all Document Components."
184
+ },
185
+ "attribute": "open-default",
186
+ "reflect": false,
187
+ "defaultValue": "false"
188
+ }
189
+ };
190
+ }
191
+ static get states() {
192
+ return {
193
+ "response": {},
194
+ "openOrClosed": {},
195
+ "openedAnnotation": {},
196
+ "filtered": {},
197
+ "notApplicable": {},
198
+ "activeAnnotationSelectables": {}
199
+ };
200
+ }
201
+ static get events() {
202
+ return [{
203
+ "method": "dsotOzonContentAnchorClick",
204
+ "name": "dsotOzonContentAnchorClick",
205
+ "bubbles": true,
206
+ "cancelable": true,
207
+ "composed": true,
208
+ "docs": {
209
+ "tags": [],
210
+ "text": "To demo user interacting with IntRef or IntIoRef elements."
211
+ },
212
+ "complexType": {
213
+ "original": "DocumentComponentOzonContentAnchorClickEvent",
214
+ "resolved": "DocumentComponentOzonContentAnchorClickEvent",
215
+ "references": {
216
+ "DocumentComponentOzonContentAnchorClickEvent": {
217
+ "location": "import",
218
+ "path": "../document-component/document-component.models",
219
+ "id": "src/components/document-component/document-component.models.ts::DocumentComponentOzonContentAnchorClickEvent"
220
+ }
221
+ }
222
+ }
223
+ }];
224
+ }
225
+ static get watchers() {
226
+ return [{
227
+ "propName": "jsonFile",
228
+ "methodName": "jsonFileWatcher"
229
+ }, {
230
+ "propName": "openDefault",
231
+ "methodName": "openDefaultWatcher"
232
+ }];
233
+ }
234
+ }
235
+ //# sourceMappingURL=document-component.demo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-component.demo.js","sourceRoot":"","sources":["../../../src/components/document-component-demo/document-component.demo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAsB,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAC1G,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAC3C,OAAO,MAAM,MAAM,eAAe,CAAC;AA8BnC,MAAM,OAAO,qBAAqB;;IA2LxB,sBAAiB,GAAG,CAAC,EAAE,IAAI,EAA0B,EAAE,EAAE;;MAC/D,MAAM,iBAAiB,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;MAEtC,MAAM,EAAE,iBAAiB,EAAE,GAAG,IAAI,CAAC;MAEnC,OAAO,CACL,cACG,iBAAiB;SAChB,MAAA,IAAI,CAAC,6BAA6B,CAAC,iB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AC,iBAAoC;IAC1D,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;EACxD,CAAC;EAEO,cAAc,CAAC,iBAAoC;;IACzD,OAAO,CACL,MAAA,MAAA,IAAI,CAAC,6BAA6B,CAAC,iBAAiB,CAAC,0CAAE,IAAI,CACzD,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,sBAAsB,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAC5D,mCAAI,KAAK,CACX,CAAC;EACJ,CAAC;EAEO,WAAW,CAAC,iBAAoC;;IACtD,OAAO,CACL,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC;MAC9B,CAAC,CAAC,CAAC,CAAA,MAAA,IAAI,CAAC,6BAA6B,CAAC,iBAAiB,CAAC,0CAAE,MAAM,KAAI,iBAAiB,CAAC,MAAM,CAAC,CAC9F,CAAC;EACJ,CAAC;EAyDD,MAAM;IACJ,MAAM,EAAE,iBAAiB,EAAE,GAAG,IAAI,CAAC;IAEnC,OAAO,CACL,8BAAwB,KAAK,EAAC,yBAAyB,IACpD,IAAI,CAAC,QAAQ,IAAI,EAAC,iBAAiB,IAAC,IAAI,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAI,CACvC,CAC1B,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { h, Component, ComponentInterface, State, Prop, Watch, Event, EventEmitter } from \"@stencil/core\";\r\nimport sampleSize from \"lodash.samplesize\";\r\nimport random from \"lodash.random\";\r\n\r\nimport {\r\n DocumentComponentOzonContentAnchorClickEvent,\r\n DocumentComponentOpenToggleEvent,\r\n} from \"../document-component/document-component.models\";\r\nimport { DsoDocumentComponentCustomEvent } from \"../../components\";\r\n\r\ninterface DocumentComponent {\r\n documentTechnischId: string;\r\n type?: string;\r\n labelXml?: string;\r\n nummerXml?: string;\r\n opschrift?: string;\r\n inhoud?: string;\r\n gereserveerd?: boolean;\r\n vervallen?: boolean;\r\n bevatOntwerpInformatie?: boolean;\r\n wijzigactie?: \"voegtoe\" | \"verwijder\" | \"nieuweContainer\" | \"verwijderContainer\";\r\n _embedded?: {\r\n ontwerpTekststructuurDocumentComponenten?: DocumentComponent[];\r\n tekststructuurDocumentComponenten?: DocumentComponent[];\r\n };\r\n}\r\n\r\n@Component({\r\n tag: \"dsot-document-component-demo\",\r\n scoped: true,\r\n styleUrl: \"document-component.demo.scss\",\r\n})\r\nexport class DocumentComponentDemo implements ComponentInterface {\r\n /**\r\n * Show canvas to where Document Component extends.\r\n */\r\n @Prop({ reflect: true })\r\n showCanvas = false;\r\n\r\n /**\r\n * Name of the file to load.\r\n */\r\n @Prop()\r\n jsonFile?: string;\r\n\r\n /**\r\n * The default state for all Document Components.\r\n */\r\n @Prop()\r\n openDefault = false;\r\n\r\n /**\r\n * To demo user interacting with IntRef or IntIoRef elements.\r\n */\r\n @Event()\r\n dsotOzonContentAnchorClick!: EventEmitter<DocumentComponentOzonContentAnchorClickEvent>;\r\n\r\n @State()\r\n response?: DocumentComponent;\r\n\r\n @State()\r\n openOrClosed: DocumentComponent[] = [];\r\n\r\n @State()\r\n openedAnnotation: DocumentComponent[] = [];\r\n\r\n @State()\r\n filtered: DocumentComponent[] = [];\r\n\r\n @State()\r\n notApplicable: DocumentComponent[] = [];\r\n\r\n @State()\r\n activeAnnotationSelectables: DocumentComponent[] = [];\r\n\r\n @Watch(\"jsonFile\")\r\n async jsonFileWatcher() {\r\n this.openOrClosed = [];\r\n\r\n await this.loadData();\r\n }\r\n\r\n @Watch(\"openDefault\")\r\n async openDefaultWatcher() {\r\n this.openOrClosed = [];\r\n\r\n await this.loadData();\r\n }\r\n\r\n async componentDidLoad(): Promise<void> {\r\n await this.loadData();\r\n }\r\n\r\n private getEmbeddedDocumentComponents(documentComponent: DocumentComponent | undefined) {\r\n return (\r\n documentComponent?._embedded?.ontwerpTekststructuurDocumentComponenten ??\r\n documentComponent?._embedded?.tekststructuurDocumentComponenten\r\n );\r\n }\r\n\r\n private concatEmbeddedDocumentComponents(documentComponent: DocumentComponent): DocumentComponent[] {\r\n const embeddedDocuments = [...(this.getEmbeddedDocumentComponents(documentComponent) ?? [])];\r\n\r\n for (const d of embeddedDocuments) {\r\n embeddedDocuments.push(...this.concatEmbeddedDocumentComponents(d));\r\n }\r\n\r\n return embeddedDocuments;\r\n }\r\n\r\n private selectRandomDocumentComponents(\r\n documentComponent: DocumentComponent,\r\n exclude: DocumentComponent[] = []\r\n ): DocumentComponent[] {\r\n const documentComponents = this.concatEmbeddedDocumentComponents(documentComponent).filter(\r\n (d) => !exclude.includes(d)\r\n );\r\n const size = random(0, Math.floor(documentComponents.length / 10));\r\n\r\n return sampleSize(documentComponents, size);\r\n }\r\n\r\n private async loadData() {\r\n if (!this.jsonFile) {\r\n this.response = undefined;\r\n\r\n return;\r\n }\r\n\r\n const data = await fetch(this.jsonFile).then((r) => r.json());\r\n const lichaam = this.getEmbeddedDocumentComponents(data)?.find(\r\n (documentComponent) => documentComponent.type === \"LICHAAM\"\r\n );\r\n\r\n if (lichaam) {\r\n this.response = lichaam;\r\n\r\n this.notApplicable = this.selectRandomDocumentComponents(lichaam);\r\n this.filtered = this.selectRandomDocumentComponents(lichaam, this.notApplicable);\r\n }\r\n }\r\n\r\n private handleOpenToggle(\r\n _e: DsoDocumentComponentCustomEvent<DocumentComponentOpenToggleEvent>,\r\n documentComponent: DocumentComponent\r\n ) {\r\n const isOpenOrClosed = this.openOrClosed.includes(documentComponent);\r\n\r\n this.openOrClosed = !isOpenOrClosed\r\n ? [...this.openOrClosed, documentComponent]\r\n : this.openOrClosed.filter((d) => d !== documentComponent);\r\n }\r\n\r\n private handleAnnotationToggle(documentComponent: DocumentComponent) {\r\n this.openedAnnotation = this.isOpenedAnnotation(documentComponent)\r\n ? this.openedAnnotation.filter((d) => d !== documentComponent)\r\n : [...this.openedAnnotation, documentComponent];\r\n\r\n if (!this.isOpen(documentComponent)) {\r\n this.openOrClosed = [...this.openOrClosed, documentComponent];\r\n }\r\n }\r\n\r\n private handleSelectableChange(documentComponent: DocumentComponent) {\r\n this.activeAnnotationSelectables = this.isCheckedSlideToggle(documentComponent)\r\n ? this.activeAnnotationSelectables.filter((d) => d !== documentComponent)\r\n : [...this.activeAnnotationSelectables, documentComponent];\r\n }\r\n\r\n private handleOzonContentAnchorClick(\r\n e: DsoDocumentComponentCustomEvent<DocumentComponentOzonContentAnchorClickEvent>\r\n ) {\r\n this.dsotOzonContentAnchorClick.emit(e.detail);\r\n }\r\n\r\n private isCheckedSlideToggle(documentComponent: DocumentComponent) {\r\n return this.activeAnnotationSelectables.includes(documentComponent);\r\n }\r\n\r\n private hasFilteredChildren(documentComponent: DocumentComponent): boolean {\r\n return (\r\n this.filtered.includes(documentComponent) ||\r\n (this.getEmbeddedDocumentComponents(documentComponent)?.some((d) => this.hasFilteredChildren(d)) ?? false)\r\n );\r\n }\r\n\r\n private isOpen(documentComponent: DocumentComponent): boolean {\r\n return documentComponent.type === \"LID\" || this.openDefault\r\n ? !this.openOrClosed.includes(documentComponent)\r\n : this.openOrClosed.includes(documentComponent);\r\n }\r\n\r\n private isOpenedAnnotation(documentComponent: DocumentComponent): boolean {\r\n return this.openedAnnotation.includes(documentComponent);\r\n }\r\n\r\n private isFiltered(documentComponent: DocumentComponent): boolean {\r\n return this.filtered.includes(documentComponent);\r\n }\r\n\r\n private isNotApplicable(documentComponent: DocumentComponent): boolean {\r\n return this.notApplicable.includes(documentComponent);\r\n }\r\n\r\n private hasNestedDraft(documentComponent: DocumentComponent): boolean {\r\n return (\r\n this.getEmbeddedDocumentComponents(documentComponent)?.some(\r\n (d) => !!d.bevatOntwerpInformatie || this.hasNestedDraft(d)\r\n ) ?? false\r\n );\r\n }\r\n\r\n private showContent(documentComponent: DocumentComponent): boolean {\r\n return (\r\n this.isOpen(documentComponent) &&\r\n !!(this.getEmbeddedDocumentComponents(documentComponent)?.length || documentComponent.inhoud)\r\n );\r\n }\r\n\r\n private DocumentComponent = ({ path }: DocumentComponentProps) => {\r\n const documentComponent = path.at(-1);\r\n\r\n const { DocumentComponent } = this;\r\n\r\n return (\r\n <ul>\r\n {documentComponent &&\r\n this.getEmbeddedDocumentComponents(documentComponent)?.map((d, i) => (\r\n <li key={d.documentTechnischId}>\r\n <dso-document-component\r\n annotated={i % 3 === 2}\r\n bevatOntwerpInformatie={!!d.bevatOntwerpInformatie}\r\n filtered={this.isOpen(d) ? this.isFiltered(d) : this.hasFilteredChildren(d)}\r\n genesteOntwerpInformatie={this.hasNestedDraft(d)}\r\n gereserveerd={d.gereserveerd}\r\n heading=\"h2\"\r\n inhoud={d.inhoud}\r\n label={d.labelXml}\r\n openAnnotation={this.isOpenedAnnotation(d)}\r\n notApplicable={this.isNotApplicable(d) || path.some((p) => this.isNotApplicable(p))}\r\n nummer={d.nummerXml}\r\n onDsoAnnotationToggle={() => this.handleAnnotationToggle(d)}\r\n onDsoOpenToggle={(e) => this.handleOpenToggle(e, d)}\r\n onDsoOzonContentAnchorClick={(e) => this.handleOzonContentAnchorClick(e)}\r\n open={this.isOpen(d)}\r\n opschrift={d.opschrift}\r\n type={d.type}\r\n vervallen={d.vervallen}\r\n wijzigactie={d.wijzigactie}\r\n >\r\n {this.isOpenedAnnotation(d) && (\r\n <dso-annotation-output\r\n slot=\"annotation\"\r\n open\r\n identifier=\"test\"\r\n onDsoClose={() => this.handleAnnotationToggle(d)}\r\n >\r\n <span slot=\"title\">Annotaties</span>\r\n <dso-slide-toggle\r\n checked={this.isCheckedSlideToggle(d)}\r\n onDsoActiveChange={() => this.handleSelectableChange(d)}\r\n >\r\n Delfzijl\r\n </dso-slide-toggle>\r\n </dso-annotation-output>\r\n )}\r\n {this.showContent(d) && <DocumentComponent path={[...path, d]} />}\r\n </dso-document-component>\r\n </li>\r\n ))}\r\n </ul>\r\n );\r\n };\r\n\r\n render() {\r\n const { DocumentComponent } = this;\r\n\r\n return (\r\n <dso-responsive-element class=\"dso-document-components\">\r\n {this.response && <DocumentComponent path={[this.response]} />}\r\n </dso-responsive-element>\r\n );\r\n }\r\n}\r\n\r\ninterface DocumentComponentProps {\r\n path: DocumentComponent[];\r\n}\r\n"]}
@@ -23,7 +23,7 @@
23
23
  :host([fullscreen]) dialog .dso-dialog {
24
24
  display: flex;
25
25
  flex-direction: column;
26
- max-inline-size: 100%;
26
+ inline-size: 100%;
27
27
  block-size: 100%;
28
28
  }
29
29
  :host([fullscreen]) dialog .dso-dialog > dso-scrollable {
@@ -42,7 +42,7 @@
42
42
  :host dialog .dso-dialog {
43
43
  display: flex;
44
44
  flex-direction: column;
45
- max-inline-size: 100%;
45
+ inline-size: 100%;
46
46
  block-size: 100%;
47
47
  }
48
48
  :host dialog .dso-dialog > dso-scrollable {
@@ -93,7 +93,7 @@ button::-moz-focus-inner {
93
93
  background-color: rgba(255, 255, 255, 0.8);
94
94
  }
95
95
  .dso-modal .dso-dialog {
96
- max-inline-size: 640px;
96
+ inline-size: 640px;
97
97
  background-color: #fff;
98
98
  opacity: 1;
99
99
  box-shadow: 0 8px 24px 0 rgba(25, 25, 25, 0.4);
@@ -1,16 +1,33 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { getNodeName } from "../get-node-name.function";
3
+ import clsx from "clsx";
4
+ function isNestedAl(path) {
5
+ return path.some((n) => {
6
+ const nodeName = getNodeName(n);
7
+ return nodeName === "Al" || nodeName === "Opschrift";
8
+ });
9
+ }
3
10
  export class OzonContentAlNode {
4
11
  constructor() {
5
12
  this.name = "Al";
6
13
  }
7
- render(node, { mapNodeToJsx, path }) {
8
- const nestedAl = path.some((n) => {
9
- const nodeName = getNodeName(n);
10
- return nodeName === "Al" || nodeName === "Opschrift";
11
- });
12
- const content = mapNodeToJsx(node.childNodes);
13
- return nestedAl ? h("span", { role: "paragraph" }, content) : h("p", null, content);
14
+ render(node, { mapNodeToJsx, path, inline }) {
15
+ let content = mapNodeToJsx(node.childNodes);
16
+ const wijzigactie = node.getAttribute("wijzigactie");
17
+ const className = clsx({ [`wijzigactie-${wijzigactie}`]: !!wijzigactie }) || undefined;
18
+ if (inline || isNestedAl(path)) {
19
+ content = (h("span", { role: "paragraph", class: className }, content));
20
+ }
21
+ else {
22
+ content = h("p", { class: className }, content);
23
+ }
24
+ if (wijzigactie === "voegtoe") {
25
+ content = h("ins", null, content);
26
+ }
27
+ else if (wijzigactie === "verwijder") {
28
+ content = h("del", null, content);
29
+ }
30
+ return content;
14
31
  }
15
32
  }
16
33
  //# sourceMappingURL=al.node.js.map
@@ -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;AAIxD,MAAM,OAAO,iBAAiB;EAA9B;IACE,SAAI,GAAG,IAAI,CAAC;EAad,CAAC;EAXC,MAAM,CAAC,IAAa,EAAE,EAAE,YAAY,EAAE,IAAI,EAA0B;IAClE,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;MAC/B,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;MAEhC,OAAO,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,WAAW,CAAC;IACvD,CAAC,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAE9C,OAAO,QAAQ,CAAC,CAAC,CAAC,YAAM,IAAI,EAAC,WAAW,IAAE,OAAO,CAAQ,CAAC,CAAC,CAAC,aAAI,OAAO,CAAK,CAAC;EAC/E,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\n\r\nexport class OzonContentAlNode implements OzonContentNode {\r\n name = \"Al\";\r\n\r\n render(node: Element, { mapNodeToJsx, path }: OzonContentNodeContext) {\r\n const nestedAl = path.some((n) => {\r\n const nodeName = getNodeName(n);\r\n\r\n return nodeName === \"Al\" || nodeName === \"Opschrift\";\r\n });\r\n\r\n const content = mapNodeToJsx(node.childNodes);\r\n\r\n return nestedAl ? <span role=\"paragraph\">{content}</span> : <p>{content}</p>;\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,11 +1,13 @@
1
1
  import { h } from "@stencil/core";
2
+ import kebabCase from "lodash.kebabcase";
2
3
  export class OzonContentExtRefNode {
3
4
  constructor() {
4
5
  this.name = ["ExtRef", "ExtIoRef"];
5
6
  }
6
7
  render(node, { mapNodeToJsx }) {
7
8
  const href = node.tagName === "ExtIoRef" ? node.getAttribute("href") : node.getAttribute("ref");
8
- return (h("a", { target: "_blank", rel: "noopener noreferrer", href: href !== null && href !== void 0 ? href : undefined }, h("span", { class: "sr-only" }, "opent in nieuw venster "), mapNodeToJsx(node.childNodes)));
9
+ const className = kebabCase(node.tagName);
10
+ return (h("a", { target: "_blank", rel: "noopener noreferrer", href: href !== null && href !== void 0 ? href : undefined, class: className }, h("span", { class: "sr-only" }, "opent in nieuw venster "), mapNodeToJsx(node.childNodes), h("dso-icon", { icon: "external-link" })));
9
11
  }
10
12
  }
11
13
  //# sourceMappingURL=ext-ref.node.js.map
@@ -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;AAKlC,MAAM,OAAO,qBAAqB;EAAlC;IACE,SAAI,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;EAYhC,CAAC;EAVC,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;IAEhG,OAAO,CACL,SAAG,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB,EAAC,IAAI,EAAE,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,SAAS;MAClE,YAAM,KAAK,EAAC,SAAS,8BAA+B;MACnD,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAC5B,CACL,CAAC;EACJ,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 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\r\n return (\r\n <a target=\"_blank\" rel=\"noopener noreferrer\" href={href ?? undefined}>\r\n <span class=\"sr-only\">opent in nieuw venster </span>\r\n {mapNodeToJsx(node.childNodes)}\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;EAchC,CAAC;EAZC,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;MACpF,YAAM,KAAK,EAAC,SAAS,8BAA+B;MACnD,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC;MAC9B,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 <span class=\"sr-only\">opent in nieuw venster </span>\r\n {mapNodeToJsx(node.childNodes)}\r\n <dso-icon icon=\"external-link\"></dso-icon>\r\n </a>\r\n );\r\n }\r\n}\r\n"]}
@@ -4,7 +4,7 @@ export class OzonContentNieuweTekstNode {
4
4
  this.name = "NieuweTekst";
5
5
  }
6
6
  render(node, { mapNodeToJsx }) {
7
- return h("ins", null, mapNodeToJsx(node.childNodes));
7
+ return h("ins", { class: "nieuwe-tekst" }, mapNodeToJsx(node.childNodes));
8
8
  }
9
9
  }
10
10
  //# sourceMappingURL=nieuwe-tekst.node.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nieuwe-tekst.node.js","sourceRoot":"","sources":["../../../../src/components/ozon-content/nodes/nieuwe-tekst.node.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAKlC,MAAM,OAAO,0BAA0B;EAAvC;IACE,SAAI,GAAG,aAAa,CAAC;EAKvB,CAAC;EAHC,MAAM,CAAC,IAAa,EAAE,EAAE,YAAY,EAA0B;IAC5D,OAAO,eAAM,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAO,CAAC;EACpD,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 OzonContentNieuweTekstNode implements OzonContentNode {\r\n name = \"NieuweTekst\";\r\n\r\n render(node: Element, { mapNodeToJsx }: OzonContentNodeContext) {\r\n return <ins>{mapNodeToJsx(node.childNodes)}</ins>;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"nieuwe-tekst.node.js","sourceRoot":"","sources":["../../../../src/components/ozon-content/nodes/nieuwe-tekst.node.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAKlC,MAAM,OAAO,0BAA0B;EAAvC;IACE,SAAI,GAAG,aAAa,CAAC;EAKvB,CAAC;EAHC,MAAM,CAAC,IAAa,EAAE,EAAE,YAAY,EAA0B;IAC5D,OAAO,WAAK,KAAK,EAAC,cAAc,IAAE,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAO,CAAC;EACzE,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 OzonContentNieuweTekstNode implements OzonContentNode {\r\n name = \"NieuweTekst\";\r\n\r\n render(node: Element, { mapNodeToJsx }: OzonContentNodeContext) {\r\n return <ins class=\"nieuwe-tekst\">{mapNodeToJsx(node.childNodes)}</ins>;\r\n }\r\n}\r\n"]}
@@ -4,7 +4,15 @@ export class OzonContentOpschriftNode {
4
4
  this.name = "Opschrift";
5
5
  }
6
6
  render(node, { mapNodeToJsx }) {
7
- return h(Fragment, null, mapNodeToJsx(node.childNodes));
7
+ let content = mapNodeToJsx(node.childNodes);
8
+ const wijzigactie = node.getAttribute("wijzigactie");
9
+ if (wijzigactie === "voegtoe") {
10
+ content = h("ins", { class: "nieuwe-tekst" }, content);
11
+ }
12
+ else if (wijzigactie === "verwijder") {
13
+ content = h("del", { class: "verwijderde-tekst" }, content);
14
+ }
15
+ return h(Fragment, null, content);
8
16
  }
9
17
  }
10
18
  //# sourceMappingURL=opschrift.node.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"opschrift.node.js","sourceRoot":"","sources":["../../../../src/components/ozon-content/nodes/opschrift.node.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAK5C,MAAM,OAAO,wBAAwB;EAArC;IACE,SAAI,GAAG,WAAW,CAAC;EAKrB,CAAC;EAHC,MAAM,CAAC,IAAa,EAAE,EAAE,YAAY,EAA0B;IAC5D,OAAO,EAAC,QAAQ,QAAE,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAY,CAAC;EAC9D,CAAC;CACF","sourcesContent":["import { h, Fragment } 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 OzonContentOpschriftNode implements OzonContentNode {\r\n name = \"Opschrift\";\r\n\r\n render(node: Element, { mapNodeToJsx }: OzonContentNodeContext) {\r\n return <Fragment>{mapNodeToJsx(node.childNodes)}</Fragment>;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"opschrift.node.js","sourceRoot":"","sources":["../../../../src/components/ozon-content/nodes/opschrift.node.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAK5C,MAAM,OAAO,wBAAwB;EAArC;IACE,SAAI,GAAG,WAAW,CAAC;EAcrB,CAAC;EAZC,MAAM,CAAC,IAAa,EAAE,EAAE,YAAY,EAA0B;IAC5D,IAAI,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC5C,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;IAErD,IAAI,WAAW,KAAK,SAAS,EAAE;MAC7B,OAAO,GAAG,WAAK,KAAK,EAAC,cAAc,IAAE,OAAO,CAAO,CAAC;KACrD;SAAM,IAAI,WAAW,KAAK,WAAW,EAAE;MACtC,OAAO,GAAG,WAAK,KAAK,EAAC,mBAAmB,IAAE,OAAO,CAAO,CAAC;KAC1D;IAED,OAAO,kBAAG,OAAO,CAAI,CAAC;EACxB,CAAC;CACF","sourcesContent":["import { h, Fragment } 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 OzonContentOpschriftNode implements OzonContentNode {\r\n name = \"Opschrift\";\r\n\r\n render(node: Element, { mapNodeToJsx }: OzonContentNodeContext) {\r\n let content = mapNodeToJsx(node.childNodes);\r\n const wijzigactie = node.getAttribute(\"wijzigactie\");\r\n\r\n if (wijzigactie === \"voegtoe\") {\r\n content = <ins class=\"nieuwe-tekst\">{content}</ins>;\r\n } else if (wijzigactie === \"verwijder\") {\r\n content = <del class=\"verwijderde-tekst\">{content}</del>;\r\n }\r\n\r\n return <>{content}</>;\r\n }\r\n}\r\n"]}
@@ -28,8 +28,7 @@ export class OzonContentTableNode {
28
28
  const { caption, colspecs, headRows, bodyRows, editAction } = mapData(node);
29
29
  const bron = Array.from(node.childNodes).find((n) => getNodeName(n) === "Bron");
30
30
  return (h("dso-table", null, h("table", Object.assign({ class: clsx("table dso-table-vertical-lines", {
31
- "dso-del": editAction === "verwijder",
32
- "dso-ins": editAction === "voegtoe",
31
+ [`wijzigactie-${editAction}`]: editAction,
33
32
  }) }, (bron ? { "aria-describedby": this.id } : {})), caption && h("caption", null, caption), colspecs && h(Colgroup, { colspecs: colspecs }), headRows.length > 0 && (h("thead", null, h(Rows, { rows: headRows, colspecs: colspecs, context: context }))), bodyRows.length > 0 && (h("tbody", null, h(Rows, { rows: bodyRows, colspecs: colspecs, context: context })))), bron && h("div", { id: this.id }, context.mapNodeToJsx(bron))));
34
33
  }
35
34
  }