@dso-toolkit/core 62.5.0 → 62.7.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 (156) hide show
  1. package/dist/cjs/dso-accordion-section.cjs.entry.js +1 -1
  2. package/dist/cjs/dso-accordion-section.cjs.entry.js.map +1 -1
  3. package/dist/cjs/dso-action-list-item.cjs.entry.js +1 -1
  4. package/dist/cjs/dso-action-list-item.cjs.entry.js.map +1 -1
  5. package/dist/cjs/dso-action-list.cjs.entry.js +1 -1
  6. package/dist/cjs/dso-action-list.cjs.entry.js.map +1 -1
  7. package/dist/cjs/dso-alert_7.cjs.entry.js +2 -1
  8. package/dist/cjs/dso-alert_7.cjs.entry.js.map +1 -1
  9. package/dist/cjs/dso-annotation-output_3.cjs.entry.js +21 -2
  10. package/dist/cjs/dso-annotation-output_3.cjs.entry.js.map +1 -1
  11. package/dist/cjs/dso-card.cjs.entry.js +27 -10
  12. package/dist/cjs/dso-card.cjs.entry.js.map +1 -1
  13. package/dist/cjs/dso-header.cjs.entry.js +1 -1
  14. package/dist/cjs/dso-info_2.cjs.entry.js +6 -0
  15. package/dist/cjs/dso-info_2.cjs.entry.js.map +1 -1
  16. package/dist/cjs/dso-mark-bar.cjs.entry.js +17 -2
  17. package/dist/cjs/dso-mark-bar.cjs.entry.js.map +1 -1
  18. package/dist/cjs/dso-pagination.cjs.entry.js +1 -1
  19. package/dist/cjs/dso-toolkit.cjs.js +1 -1
  20. package/dist/cjs/dso-viewer-grid.cjs.entry.js +1 -1
  21. package/dist/cjs/dso-viewer-grid.cjs.entry.js.map +1 -1
  22. package/dist/cjs/dsot-document-component-demo.cjs.entry.js +72 -25
  23. package/dist/cjs/dsot-document-component-demo.cjs.entry.js.map +1 -1
  24. package/dist/cjs/is-modified-event-97f83d0f.js +14 -0
  25. package/dist/cjs/is-modified-event-97f83d0f.js.map +1 -0
  26. package/dist/cjs/loader.cjs.js +1 -1
  27. package/dist/collection/components/accordion/components/accordion-section.css +6 -1
  28. package/dist/collection/components/action-list/action-list.css +12 -3
  29. package/dist/collection/components/action-list/components/action-list-item.css +14 -7
  30. package/dist/collection/components/card/card.css +73 -0
  31. package/dist/collection/components/card/card.js +49 -48
  32. package/dist/collection/components/card/card.js.map +1 -1
  33. package/dist/collection/components/document-component/document-component.css +12 -17
  34. package/dist/collection/components/document-component/document-component.js +71 -3
  35. package/dist/collection/components/document-component/document-component.js.map +1 -1
  36. package/dist/collection/components/document-component/document-component.models.js.map +1 -1
  37. package/dist/collection/components/document-component-demo/document-component.demo.js +74 -26
  38. package/dist/collection/components/document-component-demo/document-component.demo.js.map +1 -1
  39. package/dist/collection/components/mark-bar/mark-bar.css +50 -694
  40. package/dist/collection/components/mark-bar/mark-bar.interfaces.js.map +1 -1
  41. package/dist/collection/components/mark-bar/mark-bar.js +45 -1
  42. package/dist/collection/components/mark-bar/mark-bar.js.map +1 -1
  43. package/dist/collection/components/ozon-content/nodes/ext-ref.node.js +1 -1
  44. package/dist/collection/components/ozon-content/nodes/ext-ref.node.js.map +1 -1
  45. package/dist/collection/components/selectable/selectable.js +7 -1
  46. package/dist/collection/components/selectable/selectable.js.map +1 -1
  47. package/dist/collection/components/viewer-grid/viewer-grid.css +4 -0
  48. package/dist/collection/utils/is-modified-event.js +8 -2
  49. package/dist/collection/utils/is-modified-event.js.map +1 -1
  50. package/dist/components/document-component.js +24 -4
  51. package/dist/components/document-component.js.map +1 -1
  52. package/dist/components/dso-accordion-section.js +1 -1
  53. package/dist/components/dso-accordion-section.js.map +1 -1
  54. package/dist/components/dso-action-list-item.js +1 -1
  55. package/dist/components/dso-action-list-item.js.map +1 -1
  56. package/dist/components/dso-action-list.js +1 -1
  57. package/dist/components/dso-action-list.js.map +1 -1
  58. package/dist/components/dso-card.js +37 -15
  59. package/dist/components/dso-card.js.map +1 -1
  60. package/dist/components/dso-mark-bar.js +19 -3
  61. package/dist/components/dso-mark-bar.js.map +1 -1
  62. package/dist/components/dso-viewer-grid.js +1 -1
  63. package/dist/components/dso-viewer-grid.js.map +1 -1
  64. package/dist/components/dsot-document-component-demo.js +74 -26
  65. package/dist/components/dsot-document-component-demo.js.map +1 -1
  66. package/dist/components/is-modified-event.js +8 -2
  67. package/dist/components/is-modified-event.js.map +1 -1
  68. package/dist/components/ozon-content.js +2 -1
  69. package/dist/components/ozon-content.js.map +1 -1
  70. package/dist/components/selectable.js +7 -1
  71. package/dist/components/selectable.js.map +1 -1
  72. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  73. package/dist/dso-toolkit/dso-toolkit.esm.js.map +1 -1
  74. package/dist/dso-toolkit/p-159c0a88.entry.js +2 -0
  75. package/dist/dso-toolkit/p-159c0a88.entry.js.map +1 -0
  76. package/dist/dso-toolkit/p-17e4b846.js +2 -0
  77. package/dist/dso-toolkit/p-17e4b846.js.map +1 -0
  78. package/dist/dso-toolkit/{p-54444f78.entry.js → p-193b7e46.entry.js} +2 -2
  79. package/dist/dso-toolkit/p-33416b1d.entry.js +2 -0
  80. package/dist/dso-toolkit/p-33416b1d.entry.js.map +1 -0
  81. package/dist/dso-toolkit/{p-7371aee1.entry.js → p-336aefb5.entry.js} +2 -2
  82. package/dist/dso-toolkit/p-336aefb5.entry.js.map +1 -0
  83. package/dist/dso-toolkit/p-35dae23f.entry.js +2 -0
  84. package/dist/dso-toolkit/p-35dae23f.entry.js.map +1 -0
  85. package/dist/dso-toolkit/p-39962ce8.entry.js +2 -0
  86. package/dist/dso-toolkit/p-39962ce8.entry.js.map +1 -0
  87. package/dist/dso-toolkit/{p-d165ad74.entry.js → p-6d602847.entry.js} +2 -2
  88. package/dist/dso-toolkit/p-977dde7f.entry.js +2 -0
  89. package/dist/dso-toolkit/p-977dde7f.entry.js.map +1 -0
  90. package/dist/dso-toolkit/p-9c34ee39.entry.js +2 -0
  91. package/dist/dso-toolkit/p-9c34ee39.entry.js.map +1 -0
  92. package/dist/dso-toolkit/{p-b8ff5318.entry.js → p-a3f28ef2.entry.js} +2 -2
  93. package/dist/dso-toolkit/{p-b8ff5318.entry.js.map → p-a3f28ef2.entry.js.map} +1 -1
  94. package/dist/dso-toolkit/{p-f3bd801e.entry.js → p-bf04808f.entry.js} +2 -2
  95. package/dist/dso-toolkit/{p-f3bd801e.entry.js.map → p-bf04808f.entry.js.map} +1 -1
  96. package/dist/dso-toolkit/p-d24073fe.entry.js +2 -0
  97. package/dist/dso-toolkit/p-d24073fe.entry.js.map +1 -0
  98. package/dist/esm/dso-accordion-section.entry.js +1 -1
  99. package/dist/esm/dso-accordion-section.entry.js.map +1 -1
  100. package/dist/esm/dso-action-list-item.entry.js +1 -1
  101. package/dist/esm/dso-action-list-item.entry.js.map +1 -1
  102. package/dist/esm/dso-action-list.entry.js +1 -1
  103. package/dist/esm/dso-action-list.entry.js.map +1 -1
  104. package/dist/esm/dso-alert_7.entry.js +2 -1
  105. package/dist/esm/dso-alert_7.entry.js.map +1 -1
  106. package/dist/esm/dso-annotation-output_3.entry.js +22 -3
  107. package/dist/esm/dso-annotation-output_3.entry.js.map +1 -1
  108. package/dist/esm/dso-card.entry.js +28 -11
  109. package/dist/esm/dso-card.entry.js.map +1 -1
  110. package/dist/esm/dso-header.entry.js +1 -1
  111. package/dist/esm/dso-info_2.entry.js +6 -0
  112. package/dist/esm/dso-info_2.entry.js.map +1 -1
  113. package/dist/esm/dso-mark-bar.entry.js +17 -2
  114. package/dist/esm/dso-mark-bar.entry.js.map +1 -1
  115. package/dist/esm/dso-pagination.entry.js +1 -1
  116. package/dist/esm/dso-toolkit.js +1 -1
  117. package/dist/esm/dso-viewer-grid.entry.js +1 -1
  118. package/dist/esm/dso-viewer-grid.entry.js.map +1 -1
  119. package/dist/esm/dsot-document-component-demo.entry.js +73 -26
  120. package/dist/esm/dsot-document-component-demo.entry.js.map +1 -1
  121. package/dist/esm/is-modified-event-4fc531e3.js +12 -0
  122. package/dist/esm/is-modified-event-4fc531e3.js.map +1 -0
  123. package/dist/esm/loader.js +1 -1
  124. package/dist/types/components/card/card.d.ts +14 -10
  125. package/dist/types/components/document-component/document-component.d.ts +17 -2
  126. package/dist/types/components/document-component/document-component.models.d.ts +6 -0
  127. package/dist/types/components/document-component-demo/document-component.demo.d.ts +13 -6
  128. package/dist/types/components/mark-bar/mark-bar.d.ts +7 -1
  129. package/dist/types/components/mark-bar/mark-bar.interfaces.d.ts +10 -1
  130. package/dist/types/components/selectable/selectable.d.ts +3 -2
  131. package/dist/types/components.d.ts +31 -20
  132. package/dist/types/utils/is-modified-event.d.ts +6 -2
  133. package/package.json +2 -2
  134. package/dist/cjs/is-modified-event-ccd748ea.js +0 -8
  135. package/dist/cjs/is-modified-event-ccd748ea.js.map +0 -1
  136. package/dist/dso-toolkit/p-02c35f4e.entry.js +0 -2
  137. package/dist/dso-toolkit/p-02c35f4e.entry.js.map +0 -1
  138. package/dist/dso-toolkit/p-0afd6a86.entry.js +0 -2
  139. package/dist/dso-toolkit/p-0afd6a86.entry.js.map +0 -1
  140. package/dist/dso-toolkit/p-2cd3e805.entry.js +0 -2
  141. package/dist/dso-toolkit/p-2cd3e805.entry.js.map +0 -1
  142. package/dist/dso-toolkit/p-4f601b8c.entry.js +0 -2
  143. package/dist/dso-toolkit/p-4f601b8c.entry.js.map +0 -1
  144. package/dist/dso-toolkit/p-5eb2019a.entry.js +0 -2
  145. package/dist/dso-toolkit/p-5eb2019a.entry.js.map +0 -1
  146. package/dist/dso-toolkit/p-7371aee1.entry.js.map +0 -1
  147. package/dist/dso-toolkit/p-9747c291.js +0 -2
  148. package/dist/dso-toolkit/p-9747c291.js.map +0 -1
  149. package/dist/dso-toolkit/p-b9059ec2.entry.js +0 -2
  150. package/dist/dso-toolkit/p-b9059ec2.entry.js.map +0 -1
  151. package/dist/dso-toolkit/p-f493248a.entry.js +0 -2
  152. package/dist/dso-toolkit/p-f493248a.entry.js.map +0 -1
  153. package/dist/esm/is-modified-event-587a0b0a.js +0 -6
  154. package/dist/esm/is-modified-event-587a0b0a.js.map +0 -1
  155. /package/dist/dso-toolkit/{p-54444f78.entry.js.map → p-193b7e46.entry.js.map} +0 -0
  156. /package/dist/dso-toolkit/{p-d165ad74.entry.js.map → p-6d602847.entry.js.map} +0 -0
@@ -44,9 +44,15 @@
44
44
  content: "";
45
45
  display: block;
46
46
  height: 24px;
47
- left: 80px;
48
47
  position: absolute;
49
- width: calc(100% + 16px);
48
+ left: calc(2rem + 16px + 16px + 8px - 8px);
49
+ width: calc(100% - (2rem + 16px + 16px + 8px - 8px));
50
+ }
51
+ @media screen and (min-width: 480px) {
52
+ :host(.divider) .dso-action-list-item::after {
53
+ left: calc(2rem + 16px + 16px + 8px);
54
+ width: calc(100% - (2rem + 16px + 16px + 8px));
55
+ }
50
56
  }
51
57
 
52
58
  h3 {
@@ -67,15 +73,16 @@ h3 {
67
73
 
68
74
  .dso-action-list-item {
69
75
  display: grid;
70
- grid-template-columns: 80px 1fr;
76
+ grid-template-columns: calc(2rem + 16px + 16px + 8px - 8px) 1fr;
77
+ }
78
+ @media screen and (min-width: 480px) {
79
+ .dso-action-list-item {
80
+ grid-template-columns: calc(2rem + 16px + 16px + 8px) 1fr;
81
+ }
71
82
  }
72
83
  .dso-action-list-item .dso-step-counter {
73
84
  position: unset;
74
85
  }
75
- .dso-action-list-item .dso-step-counter,
76
- .dso-action-list-item dso-icon {
77
- margin-inline-start: 8px;
78
- }
79
86
  .dso-action-list-item .action-list-item-content {
80
87
  grid-column: 2/2;
81
88
  }
@@ -2,6 +2,62 @@
2
2
  grid-row: span 2;
3
3
  }
4
4
 
5
+ a {
6
+ background-color: transparent;
7
+ color: var(--link-color);
8
+ text-decoration: underline;
9
+ }
10
+ a:hover, a:focus {
11
+ color: var(--link-hover-color);
12
+ text-decoration: underline;
13
+ }
14
+ a:active {
15
+ text-decoration: none;
16
+ }
17
+ a:visited {
18
+ color: var(--link-visited-color);
19
+ }
20
+ a:not(.dso-primary, .dso-secondary, .dso-tertiary).download {
21
+ background-repeat: no-repeat;
22
+ background-size: 1.25em 1.25em;
23
+ padding-inline-end: 1.5em;
24
+ background-position: bottom 0 right 0;
25
+ background-image: url("./dso-icons.svg#img-download");
26
+ }
27
+ a:not(.dso-primary, .dso-secondary, .dso-tertiary).download:hover, a:not(.dso-primary, .dso-secondary, .dso-tertiary).download:focus {
28
+ background-image: url("./dso-icons.svg#img-download-scampi");
29
+ }
30
+ a:not(.dso-primary, .dso-secondary, .dso-tertiary).extern {
31
+ background-repeat: no-repeat;
32
+ background-size: 1.25em 1.25em;
33
+ padding-inline-end: 1.5em;
34
+ background-position: bottom 0 right 0;
35
+ background-image: url("./dso-icons.svg#img-external-link");
36
+ }
37
+ a:not(.dso-primary, .dso-secondary, .dso-tertiary).extern:hover, a:not(.dso-primary, .dso-secondary, .dso-tertiary).extern:focus {
38
+ background-image: url("./dso-icons.svg#img-external-link-scampi");
39
+ }
40
+ a:not(.dso-primary, .dso-secondary, .dso-tertiary)[href^="tel:"] {
41
+ background-repeat: no-repeat;
42
+ background-size: 1.25em 1.25em;
43
+ padding-inline-start: 1.5em;
44
+ background-position: bottom 0 left 0;
45
+ background-image: url("./dso-icons.svg#img-call-grasgroen");
46
+ }
47
+ a:not(.dso-primary, .dso-secondary, .dso-tertiary)[href^="tel:"]:hover, a:not(.dso-primary, .dso-secondary, .dso-tertiary)[href^="tel:"]:focus {
48
+ background-image: url("./dso-icons.svg#img-call-scampi");
49
+ }
50
+ a:not(.dso-primary, .dso-secondary, .dso-tertiary)[href^="mailto:"] {
51
+ background-repeat: no-repeat;
52
+ background-size: 1.25em 1.25em;
53
+ padding-inline-start: 1.5em;
54
+ background-position: bottom 0 left 0;
55
+ background-image: url("./dso-icons.svg#img-email-grasgroen");
56
+ }
57
+ a:not(.dso-primary, .dso-secondary, .dso-tertiary)[href^="mailto:"]:hover, a:not(.dso-primary, .dso-secondary, .dso-tertiary)[href^="mailto:"]:focus {
58
+ background-image: url("./dso-icons.svg#img-email-scampi");
59
+ }
60
+
5
61
  *,
6
62
  *::after,
7
63
  *::before {
@@ -23,4 +79,21 @@
23
79
  }
24
80
  :host .dso-card-image {
25
81
  margin-right: 8px;
82
+ }
83
+
84
+ :host(:hover) .dso-card-heading a {
85
+ color: #275937;
86
+ text-decoration: underline;
87
+ }
88
+
89
+ .dso-card-heading a {
90
+ text-decoration: none;
91
+ }
92
+
93
+ .heading-anchor {
94
+ color: #275937;
95
+ display: flex;
96
+ }
97
+ .heading-anchor dso-icon {
98
+ flex-shrink: 0;
26
99
  }
@@ -1,16 +1,23 @@
1
- import { h, Host } from "@stencil/core";
2
- import clsx from "clsx";
1
+ import { h, Host, forceUpdate } from "@stencil/core";
3
2
  import { isInteractiveElement } from "../../utils/is-interactive-element";
4
3
  import { isModifiedEvent } from "../../utils/is-modified-event";
5
4
  export class Card {
6
5
  constructor() {
7
- this.isSelectable = false;
8
- this.hasImage = false;
9
6
  this.clickable = true;
10
7
  this.imageShape = "normal";
8
+ this.href = undefined;
9
+ }
10
+ connectedCallback() {
11
+ this.mutationObserver = new MutationObserver(() => forceUpdate(this.host));
12
+ this.mutationObserver.observe(this.host, { attributes: true, childList: true });
13
+ }
14
+ disconnectedCallback() {
15
+ var _a;
16
+ (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
17
+ delete this.mutationObserver;
11
18
  }
12
19
  clickEventHandler(e) {
13
- if (!(e.target instanceof HTMLElement) || !this.clickable) {
20
+ if (!(e.target instanceof HTMLElement) || (!this.clickable && !this.href)) {
14
21
  return;
15
22
  }
16
23
  let element = e.target;
@@ -27,12 +34,22 @@ export class Card {
27
34
  }
28
35
  return this.dsoCardClicked.emit({ originalEvent: e, isModifiedEvent: isModifiedEvent(e) });
29
36
  }
30
- componentWillLoad() {
31
- this.isSelectable = this.host.querySelector("*[slot = 'selectable']") !== null;
32
- this.hasImage = this.host.querySelector("*[slot = 'image']") !== null;
37
+ get selectableSlottedElement() {
38
+ return this.host.querySelector("[slot='selectable']");
39
+ }
40
+ get imageSlottedElement() {
41
+ return this.host.querySelector("[slot='image']");
42
+ }
43
+ get headingSlottedElement() {
44
+ return this.host.querySelector("[slot='heading']");
45
+ }
46
+ get interactionsSlottedElement() {
47
+ return this.host.querySelector("[slot='interactions']");
33
48
  }
34
49
  render() {
35
- return (h(Host, { class: clsx({ "dso-not-clickable": !this.clickable }), onClick: (e) => this.clickEventHandler(e) }, h("div", { class: "dso-card-selectable", hidden: !this.isSelectable }, h("slot", { name: "selectable" })), h("div", { class: "dso-card-image", hidden: !this.hasImage }, h("slot", { name: "image" })), h("div", { class: "dso-card-heading" }, h("slot", { name: "heading" }), h("slot", { name: "interactions" })), h("div", { class: "dso-card-content" }, h("slot", { name: "content" }))));
50
+ const isSelectable = this.selectableSlottedElement !== null;
51
+ const hasImage = this.imageSlottedElement !== null;
52
+ return (h(Host, { onClick: (e) => this.clickEventHandler(e), "is-selectable": isSelectable, "has-image": hasImage }, h("div", { class: "dso-card-selectable", hidden: !isSelectable }, h("slot", { name: "selectable" })), h("div", { class: "dso-card-image", hidden: !hasImage }, h("slot", { name: "image" })), h("div", { class: "dso-card-heading" }, this.headingSlottedElement instanceof HTMLAnchorElement || !this.href ? (h("slot", { name: "heading" })) : (h("a", { href: this.href, class: "heading-anchor" }, h("slot", { name: "heading" }), h("dso-icon", { icon: "chevron-right" }))), this.interactionsSlottedElement !== null && h("slot", { name: "interactions" })), h("div", { class: "dso-card-content" }, h("slot", { name: "content" }))));
36
53
  }
37
54
  static get is() { return "dso-card"; }
38
55
  static get encapsulation() { return "shadow"; }
@@ -48,42 +65,6 @@ export class Card {
48
65
  }
49
66
  static get properties() {
50
67
  return {
51
- "isSelectable": {
52
- "type": "boolean",
53
- "mutable": false,
54
- "complexType": {
55
- "original": "boolean",
56
- "resolved": "boolean",
57
- "references": {}
58
- },
59
- "required": false,
60
- "optional": false,
61
- "docs": {
62
- "tags": [],
63
- "text": "Do not use, this is set programmatically by the component."
64
- },
65
- "attribute": "is-selectable",
66
- "reflect": true,
67
- "defaultValue": "false"
68
- },
69
- "hasImage": {
70
- "type": "boolean",
71
- "mutable": false,
72
- "complexType": {
73
- "original": "boolean",
74
- "resolved": "boolean",
75
- "references": {}
76
- },
77
- "required": false,
78
- "optional": false,
79
- "docs": {
80
- "tags": [],
81
- "text": "Do not use, this is set programmatically by the component."
82
- },
83
- "attribute": "has-image",
84
- "reflect": true,
85
- "defaultValue": "false"
86
- },
87
68
  "clickable": {
88
69
  "type": "boolean",
89
70
  "mutable": false,
@@ -95,11 +76,14 @@ export class Card {
95
76
  "required": false,
96
77
  "optional": false,
97
78
  "docs": {
98
- "tags": [],
99
- "text": "Whether or not the Card is clickable."
79
+ "tags": [{
80
+ "name": "deprecated",
81
+ "text": "Use `href` instead and `<ELEMENT_TYPE slot=\"heading\">` should NOT be of element type `a` (anchor)."
82
+ }],
83
+ "text": "Whether or not the Card is clickable. This is NOT a boolean attribute. Set to \"false\" to make the Card non-clickable."
100
84
  },
101
85
  "attribute": "clickable",
102
- "reflect": false,
86
+ "reflect": true,
103
87
  "defaultValue": "true"
104
88
  },
105
89
  "imageShape": {
@@ -125,6 +109,23 @@ export class Card {
125
109
  "attribute": "image-shape",
126
110
  "reflect": true,
127
111
  "defaultValue": "\"normal\""
112
+ },
113
+ "href": {
114
+ "type": "string",
115
+ "mutable": false,
116
+ "complexType": {
117
+ "original": "string",
118
+ "resolved": "string | undefined",
119
+ "references": {}
120
+ },
121
+ "required": false,
122
+ "optional": true,
123
+ "docs": {
124
+ "tags": [],
125
+ "text": "The URL to which the Card heading links."
126
+ },
127
+ "attribute": "href",
128
+ "reflect": true
128
129
  }
129
130
  };
130
131
  }
@@ -1 +1 @@
1
- {"version":3,"file":"card.js","sourceRoot":"","sources":["../../../src/components/card/card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAsB,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC3G,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,oBAAoB,EAAE,MAAM,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,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;MAErD,WAAK,KAAK,EAAC,qBAAqB,EAAC,MAAM,EAAE,CAAC,IAAI,CAAC,YAAY;QACzD,YAAM,IAAI,EAAC,YAAY,GAAG,CACtB;MACN,WAAK,KAAK,EAAC,gBAAgB,EAAC,MAAM,EAAE,CAAC,IAAI,CAAC,QAAQ;QAChD,YAAM,IAAI,EAAC,OAAO,GAAG,CACjB;MACN,WAAK,KAAK,EAAC,kBAAkB;QAC3B,YAAM,IAAI,EAAC,SAAS,GAAG;QACvB,YAAM,IAAI,EAAC,cAAc,GAAG,CACxB;MACN,WAAK,KAAK,EAAC,kBAAkB;QAC3B,YAAM,IAAI,EAAC,SAAS,GAAG,CACnB,CACD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { h, Component, ComponentInterface, Element, Event, EventEmitter, Host, Prop } from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\n\r\nimport { isInteractiveElement } from \"../../utils/is-interactive-element\";\r\nimport { isModifiedEvent } from \"../../utils/is-modified-event\";\r\n\r\nimport { DsoCardClickedEvent, ImageShape } from \"./card.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-card\",\r\n styleUrl: \"card.scss\",\r\n shadow: true,\r\n})\r\nexport class Card implements ComponentInterface {\r\n @Element()\r\n host!: HTMLDsoCardElement;\r\n\r\n /**\r\n * Do not use, this is set programmatically by the component.\r\n */\r\n @Prop({ reflect: true })\r\n isSelectable = false;\r\n\r\n /**\r\n * Do not use, this is set programmatically by the component.\r\n */\r\n @Prop({ reflect: true })\r\n hasImage = false;\r\n\r\n /**\r\n * Whether or not the Card is clickable.\r\n */\r\n @Prop()\r\n clickable = true;\r\n\r\n /**\r\n * Presentation of image in header.\r\n * - \"normal\" (\"24 x 24\").\r\n * - \"wide\" (\"30 x 26\")\r\n */\r\n @Prop({ reflect: true })\r\n imageShape: ImageShape = \"normal\";\r\n\r\n /**\r\n * Emitted when the Card is clickable and the user clicked the Card.\r\n */\r\n @Event()\r\n dsoCardClicked!: EventEmitter<DsoCardClickedEvent>;\r\n\r\n private clickEventHandler(e: MouseEvent) {\r\n if (!(e.target instanceof HTMLElement) || !this.clickable) {\r\n return;\r\n }\r\n\r\n let element: HTMLElement | null = e.target;\r\n\r\n while (element !== this.host && element !== null) {\r\n if (isInteractiveElement(element) || element === null) {\r\n return;\r\n }\r\n\r\n if (element.parentNode instanceof ShadowRoot && element.parentNode.host instanceof HTMLElement) {\r\n element = element.parentNode.host;\r\n } else {\r\n element = element.parentElement;\r\n }\r\n }\r\n\r\n return this.dsoCardClicked.emit({ originalEvent: e, isModifiedEvent: isModifiedEvent(e) });\r\n }\r\n\r\n componentWillLoad() {\r\n this.isSelectable = this.host.querySelector(\"*[slot = 'selectable']\") !== null;\r\n this.hasImage = this.host.querySelector(\"*[slot = 'image']\") !== null;\r\n }\r\n\r\n render() {\r\n return (\r\n <Host\r\n class={clsx({ \"dso-not-clickable\": !this.clickable })}\r\n onClick={(e: MouseEvent) => this.clickEventHandler(e)}\r\n >\r\n <div class=\"dso-card-selectable\" hidden={!this.isSelectable}>\r\n <slot name=\"selectable\" />\r\n </div>\r\n <div class=\"dso-card-image\" hidden={!this.hasImage}>\r\n <slot name=\"image\" />\r\n </div>\r\n <div class=\"dso-card-heading\">\r\n <slot name=\"heading\" />\r\n <slot name=\"interactions\" />\r\n </div>\r\n <div class=\"dso-card-content\">\r\n <slot name=\"content\" />\r\n </div>\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"card.js","sourceRoot":"","sources":["../../../src/components/card/card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAsB,OAAO,EAAE,KAAK,EAAgB,IAAI,E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IAAI,CAAC,IAAI,EAAE,KAAK,EAAC,gBAAgB;UACxC,YAAM,IAAI,EAAC,SAAS,GAAG;UACvB,gBAAU,IAAI,EAAC,eAAe,GAAY,CACxC,CACL;QACA,IAAI,CAAC,0BAA0B,KAAK,IAAI,IAAI,YAAM,IAAI,EAAC,cAAc,GAAG,CACrE;MACN,WAAK,KAAK,EAAC,kBAAkB;QAC3B,YAAM,IAAI,EAAC,SAAS,GAAG,CACnB,CACD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { h, Component, ComponentInterface, Element, Event, EventEmitter, Host, Prop, forceUpdate } from \"@stencil/core\";\r\n\r\nimport { isInteractiveElement } from \"../../utils/is-interactive-element\";\r\nimport { isModifiedEvent } from \"../../utils/is-modified-event\";\r\n\r\nimport { DsoCardClickedEvent, ImageShape } from \"./card.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-card\",\r\n styleUrl: \"card.scss\",\r\n shadow: true,\r\n})\r\nexport class Card implements ComponentInterface {\r\n @Element()\r\n host!: HTMLDsoCardElement;\r\n\r\n /**\r\n * Whether or not the Card is clickable. This is NOT a boolean attribute. Set to \"false\" to make the Card non-clickable.\r\n *\r\n * @deprecated Use `href` instead and `<ELEMENT_TYPE slot=\"heading\">` should NOT be of element type `a` (anchor).\r\n */\r\n @Prop({ reflect: true })\r\n clickable = true;\r\n\r\n /**\r\n * Presentation of image in header.\r\n * - \"normal\" (\"24 x 24\").\r\n * - \"wide\" (\"30 x 26\")\r\n */\r\n @Prop({ reflect: true })\r\n imageShape: ImageShape = \"normal\";\r\n\r\n /**\r\n * The URL to which the Card heading links.\r\n */\r\n @Prop({ reflect: true })\r\n href?: string;\r\n\r\n /**\r\n * Emitted when the Card is clickable and the user clicked the Card.\r\n */\r\n @Event()\r\n dsoCardClicked!: EventEmitter<DsoCardClickedEvent>;\r\n\r\n private mutationObserver?: MutationObserver;\r\n\r\n connectedCallback(): void {\r\n this.mutationObserver = new MutationObserver(() => forceUpdate(this.host));\r\n\r\n this.mutationObserver.observe(this.host, { attributes: true, childList: true });\r\n }\r\n\r\n disconnectedCallback(): void {\r\n this.mutationObserver?.disconnect();\r\n\r\n delete this.mutationObserver;\r\n }\r\n\r\n private clickEventHandler(e: MouseEvent) {\r\n if (!(e.target instanceof HTMLElement) || (!this.clickable && !this.href)) {\r\n return;\r\n }\r\n\r\n let element: HTMLElement | null = e.target;\r\n\r\n while (element !== this.host && element !== null) {\r\n if (isInteractiveElement(element) || element === null) {\r\n return;\r\n }\r\n\r\n if (element.parentNode instanceof ShadowRoot && element.parentNode.host instanceof HTMLElement) {\r\n element = element.parentNode.host;\r\n } else {\r\n element = element.parentElement;\r\n }\r\n }\r\n\r\n return this.dsoCardClicked.emit({ originalEvent: e, isModifiedEvent: isModifiedEvent(e) });\r\n }\r\n\r\n get selectableSlottedElement() {\r\n return this.host.querySelector(\"[slot='selectable']\");\r\n }\r\n\r\n get imageSlottedElement() {\r\n return this.host.querySelector(\"[slot='image']\");\r\n }\r\n\r\n get headingSlottedElement() {\r\n return this.host.querySelector(\"[slot='heading']\");\r\n }\r\n\r\n get interactionsSlottedElement() {\r\n return this.host.querySelector(\"[slot='interactions']\");\r\n }\r\n\r\n render() {\r\n const isSelectable = this.selectableSlottedElement !== null;\r\n const hasImage = this.imageSlottedElement !== null;\r\n\r\n return (\r\n <Host onClick={(e: MouseEvent) => this.clickEventHandler(e)} is-selectable={isSelectable} has-image={hasImage}>\r\n <div class=\"dso-card-selectable\" hidden={!isSelectable}>\r\n <slot name=\"selectable\" />\r\n </div>\r\n <div class=\"dso-card-image\" hidden={!hasImage}>\r\n <slot name=\"image\" />\r\n </div>\r\n <div class=\"dso-card-heading\">\r\n {this.headingSlottedElement instanceof HTMLAnchorElement || !this.href ? (\r\n <slot name=\"heading\" />\r\n ) : (\r\n <a href={this.href} class=\"heading-anchor\">\r\n <slot name=\"heading\" />\r\n <dso-icon icon=\"chevron-right\"></dso-icon>\r\n </a>\r\n )}\r\n {this.interactionsSlottedElement !== null && <slot name=\"interactions\" />}\r\n </div>\r\n <div class=\"dso-card-content\">\r\n <slot name=\"content\" />\r\n </div>\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
@@ -679,9 +679,10 @@ a.dso-tertiary, a.dso-tertiary:visited {
679
679
 
680
680
  :host {
681
681
  display: block;
682
+ --depth: var(--a, 0);
682
683
  }
683
684
 
684
- :host([type=LID]:where([wijzigactie=verwijder], [wijzigactie=voegtoe])) {
685
+ :host([not-collapsible]:where([wijzigactie=verwijder], [wijzigactie=voegtoe])) {
685
686
  padding-left: 8px;
686
687
  margin-right: 8px;
687
688
  }
@@ -719,6 +720,7 @@ a.dso-tertiary, a.dso-tertiary:visited {
719
720
  }
720
721
  :host([filtered])::before {
721
722
  content: "";
723
+ left: -3px;
722
724
  position: absolute;
723
725
  display: block;
724
726
  width: 3px;
@@ -731,6 +733,7 @@ a.dso-tertiary, a.dso-tertiary:visited {
731
733
  margin-bottom: 8px;
732
734
  }
733
735
 
736
+ .recursive-toggle,
734
737
  .toggle-button {
735
738
  border: 0;
736
739
  padding: 0;
@@ -749,39 +752,30 @@ a.dso-tertiary, a.dso-tertiary:visited {
749
752
  vertical-align: middle;
750
753
  }
751
754
 
752
- :host([type=LID]) .heading-container {
755
+ :host([not-collapsible]) .heading-container {
753
756
  margin-bottom: 0;
754
757
  }
755
- :host([type=LID]) .wijzigactie-label {
758
+ :host([not-collapsible]) .wijzigactie-label {
756
759
  margin-left: 0;
757
760
  }
758
- :host([type=LID]) .heading-element {
761
+ :host([not-collapsible]) .heading-element {
759
762
  color: #000;
760
763
  }
761
764
 
762
- :host(:not([type=LID])) .heading-element {
765
+ :host(:not([not-collapsible])) .heading-element {
763
766
  cursor: pointer;
764
767
  }
765
- :host(:not([type=LID])) .heading-element:hover, :host(:not([type=LID])) .heading-element:focus {
768
+ :host(:not([not-collapsible])) .heading-element:hover, :host(:not([not-collapsible])) .heading-element:focus {
766
769
  color: var(--link-hover-color);
767
770
  text-decoration: underline;
768
771
  }
769
- :host(:not([type=LID])) .heading-element:active {
772
+ :host(:not([not-collapsible])) .heading-element:active {
770
773
  text-decoration: none;
771
774
  }
772
- :host(:not([type=LID])) .wijzigactie-label {
775
+ :host(:not([not-collapsible])) .wijzigactie-label {
773
776
  margin-left: 24px;
774
777
  }
775
778
 
776
- :host-context(dso-responsive-element[small]) .content,
777
- :host(:not([type=LID])) .content {
778
- padding-left: 24px;
779
- }
780
-
781
- :host-context(dso-responsive-element[small]):host([type=LID]) .heading-container {
782
- padding-left: 24px;
783
- }
784
-
785
779
  .addons {
786
780
  margin-inline-start: auto;
787
781
  display: flex;
@@ -790,6 +784,7 @@ a.dso-tertiary, a.dso-tertiary:visited {
790
784
 
791
785
  .heading {
792
786
  display: flex;
787
+ align-items: start;
793
788
  gap: 8px;
794
789
  }
795
790
 
@@ -1,4 +1,4 @@
1
- import { h, Fragment } from "@stencil/core";
1
+ import { h, Fragment, Host } from "@stencil/core";
2
2
  import { Heading } from "./document-component-heading";
3
3
  const wijzigActieLabels = {
4
4
  nieuweContainer: "Toegevoegd",
@@ -6,6 +6,12 @@ const wijzigActieLabels = {
6
6
  verwijderContainer: "Verwijderd",
7
7
  voegtoe: "Toegevoegd",
8
8
  };
9
+ /**
10
+ * @part _annotation-container - private part, do not touch.
11
+ * @part _children-container - private part, do not touch.
12
+ * @part _content - private part, do not touch.
13
+ * @part _heading-container - private part, do not touch.
14
+ */
9
15
  export class DocumentComponent {
10
16
  constructor() {
11
17
  this.handleHeadingClick = (e) => {
@@ -16,6 +22,13 @@ export class DocumentComponent {
16
22
  this.handleOzonContentAnchorClick = (e) => {
17
23
  this.dsoOzonContentAnchorClick.emit({ originalEvent: e, ozonContentAnchorClick: e.detail });
18
24
  };
25
+ this.handleRecursiveToggleClick = (e) => {
26
+ this.dsoRecursiveToggle.emit({
27
+ originalEvent: e,
28
+ current: this.recursiveToggle,
29
+ next: this.recursiveToggle === true ? false : true,
30
+ });
31
+ };
19
32
  this.heading = "h2";
20
33
  this.label = undefined;
21
34
  this.nummer = undefined;
@@ -34,6 +47,7 @@ export class DocumentComponent {
34
47
  this.type = undefined;
35
48
  this.wijzigactie = undefined;
36
49
  this.mark = undefined;
50
+ this.recursiveToggle = undefined;
37
51
  }
38
52
  get wijzigactieLabel() {
39
53
  return this.wijzigactie && wijzigActieLabels[this.wijzigactie];
@@ -49,7 +63,17 @@ export class DocumentComponent {
49
63
  }
50
64
  render() {
51
65
  const suffix = this.suffix();
52
- 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, 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", 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, 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("slot", null)));
66
+ const collapsible = !!((this.label || this.nummer || this.opschrift || this.alternativeTitle) &&
67
+ this.type !== "LID");
68
+ const showHeading = !!(this.wijzigactie ||
69
+ collapsible ||
70
+ this.label ||
71
+ this.nummer ||
72
+ this.opschrift ||
73
+ this.alternativeTitle ||
74
+ this.bevatOntwerpInformatie ||
75
+ this.annotated);
76
+ return (h(Host, { "not-collapsible": !collapsible }, showHeading && (h("div", { class: "heading-container", part: "_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 }, collapsible && (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, 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", null, " - [", suffix, "]"))), this.recursiveToggle !== undefined && this.open && (h("button", { type: "button", class: "recursive-toggle", title: this.recursiveToggle === true ? "Verberg alles" : "Toon alles", onClick: this.handleRecursiveToggleClick }, h("dso-icon", { icon: this.recursiveToggle === true ? "eye" : "eye-slash" }))), 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("div", { class: "annotation-container", part: "_annotation-container" }, h("slot", { name: "annotation" })), this.open && (this.inhoud || this.gereserveerd || this.vervallen) && (h("div", { class: "content", part: "_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, 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", { class: "children-container", part: "_children-container" }, h("slot", null))));
53
77
  }
54
78
  static get is() { return "dso-document-component"; }
55
79
  static get encapsulation() { return "shadow"; }
@@ -412,13 +436,57 @@ export class DocumentComponent {
412
436
  "optional": true,
413
437
  "docs": {
414
438
  "tags": [],
415
- "text": "Voor het markeren in content."
439
+ "text": "To mark text."
416
440
  }
441
+ },
442
+ "recursiveToggle": {
443
+ "type": "any",
444
+ "mutable": false,
445
+ "complexType": {
446
+ "original": "DocumentComponentRecursiveToggleState",
447
+ "resolved": "\"indeterminate\" | boolean | undefined",
448
+ "references": {
449
+ "DocumentComponentRecursiveToggleState": {
450
+ "location": "import",
451
+ "path": "./document-component.models",
452
+ "id": "src/components/document-component/document-component.models.ts::DocumentComponentRecursiveToggleState"
453
+ }
454
+ }
455
+ },
456
+ "required": false,
457
+ "optional": false,
458
+ "docs": {
459
+ "tags": [],
460
+ "text": "Shows the recursive toggle button. When the user activates this button the event `dsoRecursiveToggle` is emitted."
461
+ },
462
+ "attribute": "recursive-toggle",
463
+ "reflect": false
417
464
  }
418
465
  };
419
466
  }
420
467
  static get events() {
421
468
  return [{
469
+ "method": "dsoRecursiveToggle",
470
+ "name": "dsoRecursiveToggle",
471
+ "bubbles": false,
472
+ "cancelable": true,
473
+ "composed": true,
474
+ "docs": {
475
+ "tags": [],
476
+ "text": "Emitted when the user activates the recursive toggle."
477
+ },
478
+ "complexType": {
479
+ "original": "DocumentComponentRecursiveToggleEvent",
480
+ "resolved": "DocumentComponentRecursiveToggleEvent",
481
+ "references": {
482
+ "DocumentComponentRecursiveToggleEvent": {
483
+ "location": "import",
484
+ "path": "./document-component.models",
485
+ "id": "src/components/document-component/document-component.models.ts::DocumentComponentRecursiveToggleEvent"
486
+ }
487
+ }
488
+ }
489
+ }, {
422
490
  "method": "dsoOpenToggle",
423
491
  "name": "dsoOpenToggle",
424
492
  "bubbles": false,
@@ -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;AAWtG,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;;IAyIpB,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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 DocumentComponentOzonContentAnchorClickEvent,\r\n DocumentComponentWijzigactie,\r\n DocumentComponentInputType,\r\n DocumentComponentMarkFunction,\r\n DocumentComponentMarkItemHighlightEvent,\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?: DocumentComponentInputType;\r\n\r\n /**\r\n * The Nummer XML.\r\n */\r\n @Prop()\r\n nummer?: DocumentComponentInputType;\r\n\r\n /**\r\n * The Opschrift XML.\r\n */\r\n @Prop()\r\n opschrift?: DocumentComponentInputType;\r\n\r\n /**\r\n * The Inhoud XML.\r\n */\r\n @Prop()\r\n inhoud?: DocumentComponentInputType;\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 * Voor het markeren in content.\r\n */\r\n @Prop()\r\n mark?: DocumentComponentMarkFunction;\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 /**\r\n * Emitted each time a marked item gets highlighted.\r\n */\r\n @Event({ bubbles: false })\r\n dsoMarkItemHighlight!: EventEmitter<DocumentComponentMarkItemHighlightEvent>;\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 mark={this.mark && ((text) => this.mark?.(text, \"label\"))}\r\n onDsoOzonContentMarkItemHighlight={(e) =>\r\n this.dsoMarkItemHighlight.emit({ ...e.detail, source: \"label\" })\r\n }\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 mark={this.mark && ((text) => this.mark?.(text, \"nummer\"))}\r\n onDsoOzonContentMarkItemHighlight={(e) =>\r\n this.dsoMarkItemHighlight.emit({ ...e.detail, source: \"nummer\" })\r\n }\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 mark={this.mark && ((text) => this.mark?.(text, \"opschrift\"))}\r\n onDsoOzonContentMarkItemHighlight={(e) =>\r\n this.dsoMarkItemHighlight.emit({ ...e.detail, source: \"opschrift\" })\r\n }\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 mark={this.mark && ((text) => this.mark?.(text, \"inhoud\"))}\r\n onDsoOzonContentMarkItemHighlight={(e) =>\r\n this.dsoMarkItemHighlight.emit({ ...e.detail, source: \"inhoud\" })\r\n }\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"]}
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,IAAI,EAAE,MAAM,eAAe,CAAC;AAa5G,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;AAEF;;;;;GAKG;AAMH,MAAM,OAAO,iBAAiB;;IAqJpB,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,yB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event, EventEmitter, Fragment, Prop, Host } from \"@stencil/core\";\r\nimport {\r\n DocumentComponentOpenToggleEvent,\r\n DocumentComponentToggleAnnotationEvent,\r\n DocumentComponentOzonContentAnchorClickEvent,\r\n DocumentComponentWijzigactie,\r\n DocumentComponentInputType,\r\n DocumentComponentMarkFunction,\r\n DocumentComponentMarkItemHighlightEvent,\r\n DocumentComponentRecursiveToggleEvent,\r\n DocumentComponentRecursiveToggleState,\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/**\r\n * @part _annotation-container - private part, do not touch.\r\n * @part _children-container - private part, do not touch.\r\n * @part _content - private part, do not touch.\r\n * @part _heading-container - private part, do not touch.\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?: DocumentComponentInputType;\r\n\r\n /**\r\n * The Nummer XML.\r\n */\r\n @Prop()\r\n nummer?: DocumentComponentInputType;\r\n\r\n /**\r\n * The Opschrift XML.\r\n */\r\n @Prop()\r\n opschrift?: DocumentComponentInputType;\r\n\r\n /**\r\n * The Inhoud XML.\r\n */\r\n @Prop()\r\n inhoud?: DocumentComponentInputType;\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 * To mark text.\r\n */\r\n @Prop()\r\n mark?: DocumentComponentMarkFunction;\r\n\r\n /**\r\n * Shows the recursive toggle button. When the user activates this button the event `dsoRecursiveToggle` is emitted.\r\n */\r\n @Prop()\r\n recursiveToggle: DocumentComponentRecursiveToggleState;\r\n\r\n /**\r\n * Emitted when the user activates the recursive toggle.\r\n */\r\n @Event({ bubbles: false })\r\n dsoRecursiveToggle!: EventEmitter<DocumentComponentRecursiveToggleEvent>;\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 /**\r\n * Emitted each time a marked item gets highlighted.\r\n */\r\n @Event({ bubbles: false })\r\n dsoMarkItemHighlight!: EventEmitter<DocumentComponentMarkItemHighlightEvent>;\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 private handleRecursiveToggleClick = (e: MouseEvent) => {\r\n this.dsoRecursiveToggle.emit({\r\n originalEvent: e,\r\n current: this.recursiveToggle,\r\n next: this.recursiveToggle === true ? false : true,\r\n });\r\n };\r\n\r\n render() {\r\n const suffix = this.suffix();\r\n const collapsible = !!(\r\n (this.label || this.nummer || this.opschrift || this.alternativeTitle) &&\r\n this.type !== \"LID\"\r\n );\r\n const showHeading = !!(\r\n this.wijzigactie ||\r\n collapsible ||\r\n this.label ||\r\n this.nummer ||\r\n this.opschrift ||\r\n this.alternativeTitle ||\r\n this.bevatOntwerpInformatie ||\r\n this.annotated\r\n );\r\n\r\n return (\r\n <Host not-collapsible={!collapsible}>\r\n {showHeading && (\r\n <div class=\"heading-container\" part=\"_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 {collapsible && (\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 mark={this.mark && ((text) => this.mark?.(text, \"label\"))}\r\n onDsoOzonContentMarkItemHighlight={(e) =>\r\n this.dsoMarkItemHighlight.emit({ ...e.detail, source: \"label\" })\r\n }\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 mark={this.mark && ((text) => this.mark?.(text, \"nummer\"))}\r\n onDsoOzonContentMarkItemHighlight={(e) =>\r\n this.dsoMarkItemHighlight.emit({ ...e.detail, source: \"nummer\" })\r\n }\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 mark={this.mark && ((text) => this.mark?.(text, \"opschrift\"))}\r\n onDsoOzonContentMarkItemHighlight={(e) =>\r\n this.dsoMarkItemHighlight.emit({ ...e.detail, source: \"opschrift\" })\r\n }\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.recursiveToggle !== undefined && this.open && (\r\n <button\r\n type=\"button\"\r\n class=\"recursive-toggle\"\r\n title={this.recursiveToggle === true ? \"Verberg alles\" : \"Toon alles\"}\r\n onClick={this.handleRecursiveToggleClick}\r\n >\r\n <dso-icon icon={this.recursiveToggle === true ? \"eye\" : \"eye-slash\"} />\r\n </button>\r\n )}\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 )}\r\n <div class=\"annotation-container\" part=\"_annotation-container\">\r\n <slot name=\"annotation\" />\r\n </div>\r\n {this.open && (this.inhoud || this.gereserveerd || this.vervallen) && (\r\n <div class=\"content\" part=\"_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 mark={this.mark && ((text) => this.mark?.(text, \"inhoud\"))}\r\n onDsoOzonContentMarkItemHighlight={(e) =>\r\n this.dsoMarkItemHighlight.emit({ ...e.detail, source: \"inhoud\" })\r\n }\r\n />\r\n )}\r\n </div>\r\n )}\r\n <div class=\"children-container\" part=\"_children-container\">\r\n <slot />\r\n </div>\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
@@ -1 +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, OzonContentText } 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\r\nexport type DocumentComponentInputType = XMLDocument | string;\r\n\r\nexport type DocumentComponentSource = \"label\" | \"nummer\" | \"opschrift\" | \"inhoud\";\r\n\r\nexport type DocumentComponentMarkFunction = (text: string, source: DocumentComponentSource) => OzonContentText[];\r\n\r\nexport interface DocumentComponentMarkItemHighlightEvent {\r\n source: DocumentComponentSource;\r\n text: string;\r\n elementRef: HTMLElement;\r\n}\r\n"]}
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, OzonContentText } 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\r\nexport type DocumentComponentInputType = XMLDocument | string;\r\n\r\nexport type DocumentComponentSource = \"label\" | \"nummer\" | \"opschrift\" | \"inhoud\";\r\n\r\nexport type DocumentComponentMarkFunction = (text: string, source: DocumentComponentSource) => OzonContentText[];\r\n\r\nexport interface DocumentComponentMarkItemHighlightEvent {\r\n source: DocumentComponentSource;\r\n text: string;\r\n elementRef: HTMLElement;\r\n}\r\n\r\nexport type DocumentComponentRecursiveToggleState = undefined | boolean | \"indeterminate\";\r\n\r\nexport interface DocumentComponentRecursiveToggleEvent {\r\n originalEvent: MouseEvent;\r\n current: DocumentComponentRecursiveToggleState;\r\n next: boolean;\r\n}\r\n"]}