@dso-toolkit/core 41.0.1 → 43.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/dist/cjs/dso-alert.cjs.entry.js +1 -1
  2. package/dist/cjs/dso-autosuggest.cjs.entry.js +30 -10
  3. package/dist/cjs/dso-badge.cjs.entry.js +1 -1
  4. package/dist/cjs/dso-banner.cjs.entry.js +1 -1
  5. package/dist/cjs/dso-date-picker.cjs.entry.js +1 -1
  6. package/dist/cjs/dso-header.cjs.entry.js +31 -21
  7. package/dist/cjs/dso-helpcenter-panel.cjs.entry.js +1 -1
  8. package/dist/cjs/dso-highlight-box.cjs.entry.js +1 -1
  9. package/dist/cjs/dso-icon.cjs.entry.js +15 -24
  10. package/dist/cjs/dso-image-overlay.cjs.entry.js +46 -8
  11. package/dist/cjs/dso-info-button.cjs.entry.js +5 -1
  12. package/dist/cjs/dso-label.cjs.entry.js +78 -3
  13. package/dist/cjs/dso-map-controls.cjs.entry.js +1 -1
  14. package/dist/cjs/dso-ozon-content.cjs.entry.js +60 -9
  15. package/dist/cjs/dso-pagination.cjs.entry.js +6 -3
  16. package/dist/cjs/dso-progress-bar.cjs.entry.js +1 -1
  17. package/dist/cjs/dso-toggletip.cjs.entry.js +3 -15
  18. package/dist/cjs/dso-toolkit.cjs.js +1 -1
  19. package/dist/cjs/dso-tooltip.cjs.entry.js +8 -1
  20. package/dist/cjs/dso-tree-view.cjs.entry.js +24 -2
  21. package/dist/cjs/dso-viewer-grid.cjs.entry.js +1 -1
  22. package/dist/cjs/loader.cjs.js +1 -1
  23. package/dist/collection/collection-manifest.json +1 -1
  24. package/dist/collection/components/alert/alert.css +5 -5
  25. package/dist/collection/components/autosuggest/autosuggest.js +68 -11
  26. package/dist/collection/components/autosuggest/autosuggest.template.js +3 -1
  27. package/dist/collection/components/badge/badge.css +4 -1
  28. package/dist/collection/components/banner/banner.css +2 -2
  29. package/dist/collection/components/date-picker/date-picker.css +3 -3
  30. package/dist/collection/components/header/header.css +149 -3
  31. package/dist/collection/components/header/header.interfaces.js +1 -0
  32. package/dist/collection/components/header/header.js +94 -100
  33. package/dist/collection/components/header/header.template.js +15 -31
  34. package/dist/collection/components/helpcenter-panel/helpcenter-panel.css +98 -4
  35. package/dist/collection/components/highlight-box/highlight-box.css +11 -6
  36. package/dist/collection/components/icon/icon.js +0 -2
  37. package/dist/collection/components/image-overlay/image-overlay.css +126 -4
  38. package/dist/collection/components/image-overlay/image-overlay.js +57 -11
  39. package/dist/collection/components/info-button/info-button.js +24 -2
  40. package/dist/collection/components/label/label.css +14 -1
  41. package/dist/collection/components/label/label.js +118 -12
  42. package/dist/collection/components/label/label.template.js +2 -1
  43. package/dist/collection/components/list/list.template.js +11 -4
  44. package/dist/collection/components/map-controls/map-controls.css +149 -4
  45. package/dist/collection/components/ozon-content/nodes/figuur.node.js +22 -0
  46. package/dist/collection/components/ozon-content/nodes/{illustratie.node.js → inline-tekst-afbeelding.node.js} +2 -2
  47. package/dist/collection/components/ozon-content/nodes/int-io-ref.node.js +27 -0
  48. package/dist/collection/components/ozon-content/nodes/int-ref.node.js +1 -0
  49. package/dist/collection/components/ozon-content/ozon-content-mapper.js +7 -3
  50. package/dist/collection/components/ozon-content/ozon-content.css +25 -8
  51. package/dist/collection/components/ozon-content/ozon-content.js +3 -1
  52. package/dist/collection/components/pagination/pagination.css +4 -4
  53. package/dist/collection/components/pagination/pagination.js +8 -5
  54. package/dist/collection/components/progress-bar/progress-bar.css +1 -1
  55. package/dist/collection/components/toggletip/toggletip.js +3 -15
  56. package/dist/collection/components/tooltip/tooltip.css +1 -1
  57. package/dist/collection/components/tooltip/tooltip.js +7 -0
  58. package/dist/collection/components/tree-view/tree-item.js +1 -1
  59. package/dist/collection/components/tree-view/tree-view.js +58 -2
  60. package/dist/collection/components/viewer-grid/viewer-grid.css +212 -10
  61. package/dist/custom-elements/index.js +318 -110
  62. package/dist/dso-toolkit/dso-toolkit.css +1 -1
  63. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  64. package/dist/dso-toolkit/p-15d0f2eb.entry.js +1 -0
  65. package/dist/dso-toolkit/p-1845b0ce.entry.js +1 -0
  66. package/dist/dso-toolkit/p-19b5fae2.entry.js +1 -0
  67. package/dist/dso-toolkit/p-237cd551.entry.js +1 -0
  68. package/dist/dso-toolkit/{p-0777c1c4.entry.js → p-363b56b1.entry.js} +1 -1
  69. package/dist/dso-toolkit/p-590cbab6.entry.js +1 -0
  70. package/dist/dso-toolkit/{p-3cb44a36.entry.js → p-6505be7d.entry.js} +1 -1
  71. package/dist/dso-toolkit/p-68d49733.entry.js +1 -0
  72. package/dist/dso-toolkit/{p-1e92e29d.entry.js → p-7b716383.entry.js} +1 -1
  73. package/dist/dso-toolkit/p-80b5c915.entry.js +1 -0
  74. package/dist/dso-toolkit/p-93683c65.entry.js +1 -0
  75. package/dist/dso-toolkit/p-acc0620a.entry.js +1 -0
  76. package/dist/dso-toolkit/p-ba835421.entry.js +1 -0
  77. package/dist/dso-toolkit/p-bd1ee63c.entry.js +1 -0
  78. package/dist/dso-toolkit/p-bf4d6f63.entry.js +1 -0
  79. package/dist/dso-toolkit/p-ca3a1440.entry.js +1 -0
  80. package/dist/dso-toolkit/{p-37e12c3c.entry.js → p-d60876c2.entry.js} +1 -1
  81. package/dist/dso-toolkit/p-d84c166c.entry.js +1 -0
  82. package/dist/dso-toolkit/p-e98f049e.entry.js +1 -0
  83. package/dist/dso-toolkit/p-f726111e.entry.js +1 -0
  84. package/dist/esm/dso-alert.entry.js +1 -1
  85. package/dist/esm/dso-autosuggest.entry.js +30 -10
  86. package/dist/esm/dso-badge.entry.js +1 -1
  87. package/dist/esm/dso-banner.entry.js +1 -1
  88. package/dist/esm/dso-date-picker.entry.js +1 -1
  89. package/dist/esm/dso-header.entry.js +31 -21
  90. package/dist/esm/dso-helpcenter-panel.entry.js +1 -1
  91. package/dist/esm/dso-highlight-box.entry.js +1 -1
  92. package/dist/esm/dso-icon.entry.js +15 -24
  93. package/dist/esm/dso-image-overlay.entry.js +46 -8
  94. package/dist/esm/dso-info-button.entry.js +5 -1
  95. package/dist/esm/dso-label.entry.js +79 -4
  96. package/dist/esm/dso-map-controls.entry.js +1 -1
  97. package/dist/esm/dso-ozon-content.entry.js +60 -9
  98. package/dist/esm/dso-pagination.entry.js +6 -3
  99. package/dist/esm/dso-progress-bar.entry.js +1 -1
  100. package/dist/esm/dso-toggletip.entry.js +3 -15
  101. package/dist/esm/dso-toolkit.js +1 -1
  102. package/dist/esm/dso-tooltip.entry.js +8 -1
  103. package/dist/esm/dso-tree-view.entry.js +24 -2
  104. package/dist/esm/dso-viewer-grid.entry.js +1 -1
  105. package/dist/esm/loader.js +1 -1
  106. package/dist/types/components/autosuggest/autosuggest.d.ts +17 -1
  107. package/dist/types/components/autosuggest/autosuggest.template.d.ts +1 -1
  108. package/dist/types/components/header/header.d.ts +13 -20
  109. package/dist/types/components/header/header.interfaces.d.ts +17 -0
  110. package/dist/types/components/header/header.template.d.ts +1 -1
  111. package/dist/types/components/image-overlay/image-overlay.d.ts +5 -0
  112. package/dist/types/components/info-button/info-button.d.ts +2 -0
  113. package/dist/types/components/label/label.d.ts +21 -3
  114. package/dist/types/components/label/label.template.d.ts +1 -1
  115. package/dist/types/components/ozon-content/nodes/{illustratie.node.d.ts → figuur.node.d.ts} +1 -1
  116. package/dist/types/components/ozon-content/nodes/inline-tekst-afbeelding.node.d.ts +5 -0
  117. package/dist/types/components/ozon-content/nodes/int-io-ref.node.d.ts +6 -0
  118. package/dist/types/components/ozon-content/ozon-content-node-context.interface.d.ts +2 -1
  119. package/dist/types/components/ozon-content/ozon-content.interfaces.d.ts +2 -0
  120. package/dist/types/components/toggletip/toggletip.d.ts +1 -3
  121. package/dist/types/components/tooltip/tooltip.d.ts +1 -0
  122. package/dist/types/components/tree-view/tree-view.d.ts +10 -2
  123. package/dist/types/components.d.ts +43 -7
  124. package/package.json +1 -1
  125. package/dist/dso-toolkit/p-076400f4.entry.js +0 -1
  126. package/dist/dso-toolkit/p-09b53589.entry.js +0 -1
  127. package/dist/dso-toolkit/p-14fc5767.entry.js +0 -1
  128. package/dist/dso-toolkit/p-2f64bded.entry.js +0 -1
  129. package/dist/dso-toolkit/p-5e614420.entry.js +0 -1
  130. package/dist/dso-toolkit/p-60679db4.entry.js +0 -1
  131. package/dist/dso-toolkit/p-7796687c.entry.js +0 -1
  132. package/dist/dso-toolkit/p-7f41f2a1.entry.js +0 -1
  133. package/dist/dso-toolkit/p-b1dc8d76.entry.js +0 -1
  134. package/dist/dso-toolkit/p-c0b7f435.entry.js +0 -1
  135. package/dist/dso-toolkit/p-d0d279cc.entry.js +0 -1
  136. package/dist/dso-toolkit/p-daf049bd.entry.js +0 -1
  137. package/dist/dso-toolkit/p-e01b1657.entry.js +0 -1
  138. package/dist/dso-toolkit/p-e1496a15.entry.js +0 -1
  139. package/dist/dso-toolkit/p-ea14647b.entry.js +0 -1
  140. package/dist/dso-toolkit/p-f1026921.entry.js +0 -1
@@ -1,17 +1,91 @@
1
- import { Component, h, Prop, Event, State } from '@stencil/core';
1
+ import { Component, h, Prop, Event, State, Element, Fragment, Watch } from '@stencil/core';
2
2
  import clsx from 'clsx';
3
+ function hasEllipses(el) {
4
+ return el.scrollWidth > el.clientWidth;
5
+ }
3
6
  export class Label {
7
+ constructor() {
8
+ this.resizeObserver = new ResizeObserver(() => this.truncateLabel());
9
+ this.keydownListenerActive = false;
10
+ this.keyDownListener = (event) => {
11
+ if (event.key == 'Escape') {
12
+ this.textHover = false;
13
+ this.textFocus = false;
14
+ }
15
+ };
16
+ }
17
+ watchTruncate(truncate) {
18
+ if (truncate) {
19
+ this.startTruncate();
20
+ }
21
+ else {
22
+ this.stopTruncate();
23
+ }
24
+ }
25
+ watchTooltipActive() {
26
+ if (!this.keydownListenerActive && (this.textHover || this.textFocus)) {
27
+ document.addEventListener('keydown', this.keyDownListener);
28
+ this.keydownListenerActive = true;
29
+ }
30
+ if (!this.textHover && !this.textFocus) {
31
+ document.removeEventListener('keydown', this.keyDownListener);
32
+ this.keydownListenerActive = false;
33
+ }
34
+ }
35
+ truncateLabel() {
36
+ setTimeout(() => {
37
+ if (this.labelContent) {
38
+ this.truncatedContent = hasEllipses(this.labelContent) ? this.host.innerText : undefined;
39
+ }
40
+ });
41
+ }
42
+ componentDidLoad() {
43
+ if (this.truncate) {
44
+ this.startTruncate();
45
+ }
46
+ }
47
+ disconnectedCallback() {
48
+ this.stopTruncate();
49
+ }
50
+ startTruncate() {
51
+ this.mutationObserver = new MutationObserver(() => {
52
+ this.truncateLabel();
53
+ });
54
+ this.mutationObserver.observe(this.host, {
55
+ attributes: true,
56
+ subtree: true
57
+ });
58
+ this.resizeObserver.observe(this.host);
59
+ this.truncateLabel();
60
+ }
61
+ stopTruncate() {
62
+ var _a;
63
+ document.removeEventListener('keydown', this.keyDownListener);
64
+ (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
65
+ this.resizeObserver.unobserve(this.host);
66
+ this.truncatedContent = undefined;
67
+ this.keydownListenerActive = false;
68
+ }
4
69
  render() {
5
70
  const status = this.status && Label.statusMap.get(this.status);
6
- return (h("span", { class: clsx('dso-label', { [`dso-label-${this.status}`]: this.status, 'dso-compact': this.compact && !this.removable, 'dso-hover': this.hover }) },
7
- h("slot", { name: "symbol" }),
8
- status && (h("span", { class: "sr-only" },
9
- status,
10
- ": ")),
11
- h("slot", null),
12
- this.removable && (h("button", { type: "button", onClick: e => this.removeClick.emit(e), onMouseEnter: () => this.hover = true, onMouseLeave: () => this.hover = false },
13
- h("span", { class: "sr-only" }, "Verwijder"),
14
- h("dso-icon", { icon: "times" })))));
71
+ return (h(Fragment, null,
72
+ h("span", { id: "toggle-anchor", class: clsx('dso-label', {
73
+ [`dso-label-${this.status}`]: this.status,
74
+ 'dso-compact': this.compact && !this.removable,
75
+ 'dso-hover': this.removeHover || this.removeFocus,
76
+ }) },
77
+ h("slot", { name: "symbol" }),
78
+ status && (h("span", { class: "sr-only" },
79
+ status,
80
+ ": ")),
81
+ h("span", { class: clsx('dso-label-content', {
82
+ 'dso-truncate': !!this.truncate,
83
+ }), ref: element => this.labelContent = element, tabindex: (this.truncate && this.truncatedContent) ? 0 : -1, onMouseEnter: () => this.textHover = true, onMouseLeave: () => this.textHover = false, onFocus: () => this.textFocus = true, onBlur: () => this.textFocus = false },
84
+ h("slot", null)),
85
+ this.removable && (h("button", { type: "button", onClick: e => this.removeClick.emit(e), onMouseEnter: () => this.removeHover = true, onMouseLeave: () => this.removeHover = false, onFocus: () => this.removeFocus = true, onBlur: () => this.removeFocus = false },
86
+ h("span", { class: "sr-only" }, "Verwijder"),
87
+ h("dso-icon", { icon: "times" })))),
88
+ h("dso-tooltip", { stateless: true, for: "toggle-anchor", active: !!this.truncatedContent && (this.textHover || this.textFocus), position: "top" }, this.truncatedContent)));
15
89
  }
16
90
  static get is() { return "dso-label"; }
17
91
  static get encapsulation() { return "shadow"; }
@@ -72,10 +146,31 @@ export class Label {
72
146
  },
73
147
  "attribute": "status",
74
148
  "reflect": false
149
+ },
150
+ "truncate": {
151
+ "type": "boolean",
152
+ "mutable": false,
153
+ "complexType": {
154
+ "original": "boolean",
155
+ "resolved": "boolean | undefined",
156
+ "references": {}
157
+ },
158
+ "required": false,
159
+ "optional": true,
160
+ "docs": {
161
+ "tags": [],
162
+ "text": ""
163
+ },
164
+ "attribute": "truncate",
165
+ "reflect": false
75
166
  }
76
167
  }; }
77
168
  static get states() { return {
78
- "hover": {}
169
+ "removeHover": {},
170
+ "removeFocus": {},
171
+ "textHover": {},
172
+ "textFocus": {},
173
+ "truncatedContent": {}
79
174
  }; }
80
175
  static get events() { return [{
81
176
  "method": "removeClick",
@@ -97,10 +192,21 @@ export class Label {
97
192
  }
98
193
  }
99
194
  }]; }
195
+ static get elementRef() { return "host"; }
196
+ static get watchers() { return [{
197
+ "propName": "truncate",
198
+ "methodName": "watchTruncate"
199
+ }, {
200
+ "propName": "textHover",
201
+ "methodName": "watchTooltipActive"
202
+ }, {
203
+ "propName": "textFocus",
204
+ "methodName": "watchTooltipActive"
205
+ }]; }
100
206
  }
101
207
  Label.statusMap = new Map([
102
208
  ['info', 'Opmerking'],
103
209
  ['success', 'Gelukt'],
104
210
  ['warning', 'Waarschuwing'],
105
- ['danger', 'Fout']
211
+ ['danger', 'Fout'],
106
212
  ]);
@@ -1,11 +1,12 @@
1
1
  import { html, nothing } from 'lit-html';
2
2
  import { ifDefined } from 'lit-html/directives/if-defined.js';
3
3
  import { unsafeHTML } from 'lit-html/directives/unsafe-html.js';
4
- export function labelTemplate({ status, label, button, compact, symbol }) {
4
+ export function labelTemplate({ status, label, button, compact, truncate, symbol }) {
5
5
  return html `
6
6
  <dso-label
7
7
  status=${ifDefined(status)}
8
8
  @removeClick=${ifDefined(button === null || button === void 0 ? void 0 : button.onClick)}
9
+ ?truncate=${truncate}
9
10
  ?compact=${compact}
10
11
  ?removable=${button}
11
12
  >
@@ -1,12 +1,13 @@
1
1
  // Keep in sync with packages\css\src\components\list\list.template.ts (https://github.com/dso-toolkit/dso-toolkit/issues/1438)
2
2
  import { Type } from '@dso-toolkit/sources';
3
- import { html } from 'lit-html';
3
+ import { html, nothing } from 'lit-html';
4
4
  import { classMap } from 'lit-html/directives/class-map.js';
5
5
  function ul(children, modifier) {
6
6
  return html `
7
7
  <ul class="${classMap({
8
8
  'list-group': modifier === 'group',
9
- 'dso-columns-list': modifier === 'columns'
9
+ 'dso-columns-list': modifier === 'columns',
10
+ 'dso-img-list': modifier === 'img-list'
10
11
  })}">
11
12
  ${children}
12
13
  </ul>
@@ -16,7 +17,8 @@ function ol(children, modifier) {
16
17
  return html `
17
18
  <ol class="${classMap({
18
19
  'list-group': modifier === 'group',
19
- 'dso-columns-list': modifier === 'columns'
20
+ 'dso-columns-list': modifier === 'columns',
21
+ 'dso-img-list': modifier === 'img-list'
20
22
  })}">
21
23
  ${children}
22
24
  </ol>
@@ -26,7 +28,12 @@ export function listTemplate({ type, items, modifier }) {
26
28
  const children = html `
27
29
  ${items.map(item => html `
28
30
  <li class="${classMap({ 'list-group-item': modifier === 'group' })}">
29
- ${item}
31
+ ${modifier === 'img-list' ?
32
+ html `
33
+ <img src=${item.imgSrc} />
34
+ `
35
+ : nothing}
36
+ ${item.text}
30
37
  </li>
31
38
  `)}
32
39
  `;
@@ -104,13 +104,21 @@ button::-moz-focus-inner {
104
104
  color: #afcf9d;
105
105
  }
106
106
  #toggle-visibility-button.btn-sm {
107
- line-height: 16px;
107
+ line-height: 1rem;
108
108
  }
109
109
  #toggle-visibility-button.btn-sm dso-icon,
110
- #toggle-visibility-button.btn-sm svg.di, #toggle-visibility-button.btn-sm.extern::after, #toggle-visibility-button.btn-sm.download::after {
110
+ #toggle-visibility-button.btn-sm svg.di, #toggle-visibility-button.btn-sm.extern::after, #toggle-visibility-button.btn-sm.download::after, #toggle-visibility-button.btn-sm.dso-spinner::before {
111
111
  margin-bottom: -4px;
112
112
  margin-top: -4px;
113
113
  }
114
+ #toggle-visibility-button.btn-sm.dso-spinner-left::before {
115
+ height: 16px;
116
+ width: 16px;
117
+ }
118
+ #toggle-visibility-button.btn-sm.dso-spinner-right::after {
119
+ height: 16px;
120
+ width: 16px;
121
+ }
114
122
  #toggle-visibility-button.download::after {
115
123
  background: var(--dso-icon, var(--di-download)) no-repeat;
116
124
  background-position: center;
@@ -149,6 +157,59 @@ button::-moz-focus-inner {
149
157
  margin-left: 8px;
150
158
  margin-right: -8px;
151
159
  }
160
+ #toggle-visibility-button.dso-spinner-left[disabled], #toggle-visibility-button.dso-spinner-right[disabled] {
161
+ background-color: #fff;
162
+ border-color: #39870c;
163
+ color: #39870c;
164
+ }
165
+ #toggle-visibility-button.dso-spinner-left::before {
166
+ background-image: url("data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E");
167
+ background-repeat: no-repeat;
168
+ content: "";
169
+ display: inline-block;
170
+ height: 24px;
171
+ vertical-align: top;
172
+ width: 24px;
173
+ margin-right: 8px;
174
+ }
175
+ #toggle-visibility-button.dso-spinner-left:not([disabled]):hover::before {
176
+ background-image: url("data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E");
177
+ background-repeat: no-repeat;
178
+ content: "";
179
+ display: inline-block;
180
+ height: 24px;
181
+ vertical-align: top;
182
+ width: 24px;
183
+ margin-right: 8px;
184
+ }
185
+ #toggle-visibility-button.dso-spinner-left:not([disabled]).btn-sm:hover::before {
186
+ height: 16px;
187
+ width: 16px;
188
+ }
189
+ #toggle-visibility-button.dso-spinner-right::after {
190
+ background-image: url("data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E");
191
+ background-repeat: no-repeat;
192
+ content: "";
193
+ display: inline-block;
194
+ height: 24px;
195
+ vertical-align: top;
196
+ width: 24px;
197
+ margin-left: 8px;
198
+ }
199
+ #toggle-visibility-button.dso-spinner-right:not([disabled]):hover::after {
200
+ background-image: url("data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E");
201
+ background-repeat: no-repeat;
202
+ content: "";
203
+ display: inline-block;
204
+ height: 24px;
205
+ vertical-align: top;
206
+ width: 24px;
207
+ margin-left: 8px;
208
+ }
209
+ #toggle-visibility-button.dso-spinner-right:not([disabled]).btn-sm:hover::after {
210
+ height: 16px;
211
+ width: 16px;
212
+ }
152
213
  #toggle-visibility-button:focus-visible {
153
214
  background-color: #39870c;
154
215
  border-color: #39870c;
@@ -225,13 +286,21 @@ button::-moz-focus-inner {
225
286
  color: #afcf9d;
226
287
  }
227
288
  #zoom-buttons button.btn-sm {
228
- line-height: 16px;
289
+ line-height: 1rem;
229
290
  }
230
291
  #zoom-buttons button.btn-sm dso-icon,
231
- #zoom-buttons button.btn-sm svg.di, #zoom-buttons button.btn-sm.extern::after, #zoom-buttons button.btn-sm.download::after {
292
+ #zoom-buttons button.btn-sm svg.di, #zoom-buttons button.btn-sm.extern::after, #zoom-buttons button.btn-sm.download::after, #zoom-buttons button.btn-sm.dso-spinner::before {
232
293
  margin-bottom: -4px;
233
294
  margin-top: -4px;
234
295
  }
296
+ #zoom-buttons button.btn-sm.dso-spinner-left::before {
297
+ height: 16px;
298
+ width: 16px;
299
+ }
300
+ #zoom-buttons button.btn-sm.dso-spinner-right::after {
301
+ height: 16px;
302
+ width: 16px;
303
+ }
235
304
  #zoom-buttons button.download::after {
236
305
  background: var(--dso-icon, var(--di-download)) no-repeat;
237
306
  background-position: center;
@@ -270,6 +339,59 @@ button::-moz-focus-inner {
270
339
  clip: rect(0, 0, 0, 0);
271
340
  border: 0;
272
341
  }
342
+ #zoom-buttons button.dso-spinner-left[disabled], #zoom-buttons button.dso-spinner-right[disabled] {
343
+ background-color: #fff;
344
+ border-color: #39870c;
345
+ color: #39870c;
346
+ }
347
+ #zoom-buttons button.dso-spinner-left::before {
348
+ background-image: url("data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E");
349
+ background-repeat: no-repeat;
350
+ content: "";
351
+ display: inline-block;
352
+ height: 24px;
353
+ vertical-align: top;
354
+ width: 24px;
355
+ margin-right: 8px;
356
+ }
357
+ #zoom-buttons button.dso-spinner-left:not([disabled]):hover::before {
358
+ background-image: url("data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E");
359
+ background-repeat: no-repeat;
360
+ content: "";
361
+ display: inline-block;
362
+ height: 24px;
363
+ vertical-align: top;
364
+ width: 24px;
365
+ margin-right: 8px;
366
+ }
367
+ #zoom-buttons button.dso-spinner-left:not([disabled]).btn-sm:hover::before {
368
+ height: 16px;
369
+ width: 16px;
370
+ }
371
+ #zoom-buttons button.dso-spinner-right::after {
372
+ background-image: url("data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E");
373
+ background-repeat: no-repeat;
374
+ content: "";
375
+ display: inline-block;
376
+ height: 24px;
377
+ vertical-align: top;
378
+ width: 24px;
379
+ margin-left: 8px;
380
+ }
381
+ #zoom-buttons button.dso-spinner-right:not([disabled]):hover::after {
382
+ background-image: url("data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E");
383
+ background-repeat: no-repeat;
384
+ content: "";
385
+ display: inline-block;
386
+ height: 24px;
387
+ vertical-align: top;
388
+ width: 24px;
389
+ margin-left: 8px;
390
+ }
391
+ #zoom-buttons button.dso-spinner-right:not([disabled]).btn-sm:hover::after {
392
+ height: 16px;
393
+ width: 16px;
394
+ }
273
395
  #zoom-buttons button:focus-visible {
274
396
  background-color: #39870c;
275
397
  border-color: #39870c;
@@ -320,6 +442,9 @@ button::-moz-focus-inner {
320
442
  #close-button[disabled] {
321
443
  color: #afcf9d;
322
444
  }
445
+ #close-button[disabled].dso-spinner-left, #close-button[disabled].dso-spinner-right {
446
+ color: #39870c;
447
+ }
323
448
  #close-button:not([disabled]):hover {
324
449
  color: #676cb0;
325
450
  text-decoration: underline;
@@ -364,6 +489,26 @@ button::-moz-focus-inner {
364
489
  #close-button.extern:not([disabled]):hover::after, #close-button.extern:not([disabled]):active::after {
365
490
  --dso-icon: var(--di-external-link-scampi);
366
491
  }
492
+ #close-button.dso-spinner-left::before {
493
+ background-image: url("data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E");
494
+ background-repeat: no-repeat;
495
+ content: "";
496
+ display: inline-block;
497
+ height: 24px;
498
+ vertical-align: middle;
499
+ width: 24px;
500
+ margin-right: 8px;
501
+ }
502
+ #close-button.dso-spinner-right::after {
503
+ background-image: url("data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E");
504
+ background-repeat: no-repeat;
505
+ content: "";
506
+ display: inline-block;
507
+ height: 24px;
508
+ vertical-align: middle;
509
+ width: 24px;
510
+ margin-left: 8px;
511
+ }
367
512
  #close-button > span {
368
513
  position: absolute;
369
514
  width: 1px;
@@ -0,0 +1,22 @@
1
+ import { h } from '@stencil/core';
2
+ import { getNodeName } from '../get-node-name.function';
3
+ export class OzonContentFiguurNode {
4
+ constructor() {
5
+ this.name = [
6
+ 'Figuur',
7
+ ];
8
+ }
9
+ render(node) {
10
+ var _a, _b, _c, _d, _e;
11
+ const childNodes = Array.from(node.childNodes);
12
+ const titel = (_a = childNodes.find(n => getNodeName(n) === 'Titel')) === null || _a === void 0 ? void 0 : _a.textContent;
13
+ const bijschrift = (_b = childNodes.find(n => getNodeName(n) === 'Bijschrift')) === null || _b === void 0 ? void 0 : _b.textContent;
14
+ const illustratieNode = childNodes.find(n => getNodeName(n) === 'Illustratie');
15
+ if (illustratieNode instanceof Element) {
16
+ return (h("div", { class: "dso-ozon-figuur" },
17
+ h("dso-image-overlay", null,
18
+ h("img", { src: (_c = illustratieNode.getAttribute('naam')) !== null && _c !== void 0 ? _c : undefined, alt: (_e = (_d = titel !== null && titel !== void 0 ? titel : illustratieNode.getAttribute('alt')) !== null && _d !== void 0 ? _d : illustratieNode.getAttribute('naam')) !== null && _e !== void 0 ? _e : undefined })),
19
+ bijschrift && (h("span", { class: "figuur-bijschrift" }, bijschrift))));
20
+ }
21
+ }
22
+ }
@@ -1,9 +1,9 @@
1
1
  import { h } from '@stencil/core';
2
- export class OzonContentIllustratieNode {
2
+ export class OzonContentInlineTekstAfbeeldingNode {
3
3
  constructor() {
4
4
  this.name = [
5
+ 'InlineTekstAfbeelding',
5
6
  'Illustratie',
6
- 'InlineTekstAfbeelding'
7
7
  ];
8
8
  }
9
9
  render(node) {
@@ -0,0 +1,27 @@
1
+ import { h } from '@stencil/core';
2
+ export class OzonContentIntIoRefNode {
3
+ constructor() {
4
+ this.name = 'IntIoRef';
5
+ }
6
+ render(node, { mapNodeToJsx, emitAnchorClick }) {
7
+ const ref = node.getAttribute('ref');
8
+ if (!ref) {
9
+ return mapNodeToJsx(node.childNodes);
10
+ }
11
+ const intRefOnClick = (event) => {
12
+ event.preventDefault();
13
+ const target = event.currentTarget;
14
+ if (!(target instanceof HTMLAnchorElement)) {
15
+ return;
16
+ }
17
+ const { href } = target;
18
+ emitAnchorClick({
19
+ node: this.name,
20
+ href,
21
+ documentComponent: ref,
22
+ originalEvent: event
23
+ });
24
+ };
25
+ return (h("a", { href: `#${ref}`, onClick: intRefOnClick }, mapNodeToJsx(node.childNodes)));
26
+ }
27
+ }
@@ -16,6 +16,7 @@ export class OzonContentIntRefNode {
16
16
  }
17
17
  const { href } = target;
18
18
  emitAnchorClick({
19
+ node: this.name,
19
20
  href,
20
21
  documentComponent: ref,
21
22
  originalEvent: event
@@ -2,10 +2,12 @@ import { Fragment, h } from '@stencil/core';
2
2
  import { OzonContentAlNode } from './nodes/al.node';
3
3
  import { OzonContentDocumentNode } from './nodes/document.node';
4
4
  import { OzonContentExtRefNode } from './nodes/ext-ref.node';
5
- import { OzonContentIllustratieNode } from './nodes/illustratie.node';
5
+ import { OzonContentFiguurNode } from './nodes/figuur.node';
6
6
  import { OzonContentInhoudNode } from './nodes/inhoud.node';
7
+ import { OzonContentInlineTekstAfbeeldingNode } from './nodes/inline-tekst-afbeelding.node';
7
8
  import { OzonContentOpschriftNode } from './nodes/opschrift.node';
8
9
  import { OzonContentInlineNodes } from './nodes/inline.nodes';
10
+ import { OzonContentIntIoRefNode } from './nodes/int-io-ref.node';
9
11
  import { OzonContentIntRefNode } from './nodes/int-ref.node';
10
12
  import { OzonContentNootNode } from './nodes/noot.node';
11
13
  import { OzonContentTableNode } from './nodes/table.node';
@@ -23,9 +25,11 @@ export class Mapper {
23
25
  new OzonContentExtRefNode(),
24
26
  new OzonContentAlNode(),
25
27
  new OzonContentInlineNodes(),
26
- new OzonContentIllustratieNode(),
28
+ new OzonContentInlineTekstAfbeeldingNode(),
27
29
  new OzonContentNootNode(),
28
- new OzonContentTableNode()
30
+ new OzonContentTableNode(),
31
+ new OzonContentIntIoRefNode(),
32
+ new OzonContentFiguurNode(),
29
33
  ];
30
34
  this.skip = this.mappers.reduce((t, m) => {
31
35
  if (m.handles) {
@@ -69,6 +69,9 @@ button.toggle-note.extern::after, button.toggle-note.download::after {
69
69
  button.toggle-note[disabled] {
70
70
  color: #afcf9d;
71
71
  }
72
+ button.toggle-note[disabled].dso-spinner-left, button.toggle-note[disabled].dso-spinner-right {
73
+ color: #39870c;
74
+ }
72
75
  button.toggle-note:not([disabled]):hover {
73
76
  color: #676cb0;
74
77
  text-decoration: underline;
@@ -113,6 +116,26 @@ button.toggle-note.extern[disabled]::after {
113
116
  button.toggle-note.extern:not([disabled]):hover::after, button.toggle-note.extern:not([disabled]):active::after {
114
117
  --dso-icon: var(--di-external-link-scampi);
115
118
  }
119
+ button.toggle-note.dso-spinner-left::before {
120
+ background-image: url("data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E");
121
+ background-repeat: no-repeat;
122
+ content: "";
123
+ display: inline-block;
124
+ height: 24px;
125
+ vertical-align: middle;
126
+ width: 24px;
127
+ margin-right: 8px;
128
+ }
129
+ button.toggle-note.dso-spinner-right::after {
130
+ background-image: url("data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E");
131
+ background-repeat: no-repeat;
132
+ content: "";
133
+ display: inline-block;
134
+ height: 24px;
135
+ vertical-align: middle;
136
+ width: 24px;
137
+ margin-left: 8px;
138
+ }
116
139
  button.toggle-note dso-icon + span:not(.sr-only),
117
140
  button.toggle-note svg.di + span:not(.sr-only),
118
141
  button.toggle-note span:not(.sr-only) + dso-icon,
@@ -169,15 +192,9 @@ span[role=paragraph] {
169
192
  text-align: right;
170
193
  }
171
194
 
172
- .od-Figuur img {
173
- margin-left: 25px;
174
- max-width: 100%;
175
- height: auto;
176
- }
177
-
178
- .od-Figuur .od-Bijschrift {
195
+ .dso-ozon-figuur .figuur-bijschrift {
196
+ display: block;
179
197
  font-size: 0.75rem;
180
- margin-left: 25px;
181
198
  padding-bottom: 2.5rem;
182
199
  }
183
200
 
@@ -40,9 +40,11 @@ export class OzonContent {
40
40
  const transformed = this.mapper.transform((_a = this.content) !== null && _a !== void 0 ? _a : '', context);
41
41
  if (this.deleted) {
42
42
  return (h("section", null,
43
+ h("slot", { name: "prefix" }),
43
44
  h("span", { class: "deleted-start" }, "Begin verwijderd element"),
44
45
  transformed,
45
- h("span", { class: "deleted-end" }, "Einde verwijderd element")));
46
+ h("span", { class: "deleted-end" }, "Einde verwijderd element"),
47
+ h("slot", { name: "suffix" })));
46
48
  }
47
49
  return (h(Host, { onClick: (e) => this.handleHostOnClick(e) },
48
50
  h("slot", { name: "prefix" }),
@@ -14,7 +14,7 @@
14
14
  .pagination > li {
15
15
  display: inline-block;
16
16
  font-weight: bold;
17
- line-height: 28px;
17
+ line-height: calc(2rem - 4px);
18
18
  text-align: center;
19
19
  vertical-align: middle;
20
20
  }
@@ -23,10 +23,10 @@
23
23
  align-items: center;
24
24
  color: #39870c;
25
25
  display: flex;
26
- height: 32px;
26
+ height: 2rem;
27
27
  justify-content: center;
28
28
  position: relative;
29
- width: 32px;
29
+ width: 2rem;
30
30
  }
31
31
  .pagination > li > a:active,
32
32
  .pagination > li > span:active {
@@ -37,7 +37,7 @@
37
37
  border-radius: 50%;
38
38
  }
39
39
  .pagination > li a {
40
- line-height: 32px;
40
+ line-height: 2rem;
41
41
  text-decoration: none;
42
42
  }
43
43
  .pagination > li a:hover, .pagination > li a:focus {
@@ -15,19 +15,22 @@ export class Pagination {
15
15
  }
16
16
  ;
17
17
  render() {
18
+ var _a;
18
19
  if (!this.totalPages) {
19
20
  return null;
20
21
  }
22
+ const currentPage = (_a = this.currentPage) !== null && _a !== void 0 ? _a : 0;
21
23
  const pages = Array.from({ length: this.totalPages }, (_value, i) => i + 1);
24
+ const currentPageOutOfBounds = currentPage < pages[0] || currentPage > pages[pages.length - 1];
22
25
  return (h("ul", { class: "pagination" },
23
- h("li", { class: this.currentPage === pages[0] ? 'dso-page-hidden' : undefined },
24
- h("a", { href: this.formatHref(pages[0]), "aria-label": "Vorige", onClick: e => this.currentPage && this.clickHandler(e, pages[this.currentPage - 2]) },
26
+ h("li", { class: (currentPage <= pages[0] || currentPageOutOfBounds) ? 'dso-page-hidden' : undefined },
27
+ h("a", { href: this.formatHref(pages[0]), "aria-label": "Vorige", onClick: e => currentPage && this.clickHandler(e, pages[currentPage - 2]) },
25
28
  h("dso-icon", { icon: "chevron-left" }))),
26
- pages.map(page => (h("li", { key: page, class: this.currentPage === page ? 'active' : undefined }, this.currentPage === page
29
+ pages.map(page => (h("li", { key: page, class: currentPage === page ? 'active' : undefined }, currentPage === page
27
30
  ? (h("span", { "aria-current": "page" }, page))
28
31
  : (h("a", { href: this.formatHref(page), onClick: e => this.clickHandler(e, page) }, page))))),
29
- h("li", { class: this.currentPage === pages[pages.length - 1] ? 'dso-page-hidden' : undefined },
30
- h("a", { href: this.formatHref(pages[pages.length - 1]), "aria-label": "Volgende", onClick: e => this.currentPage && this.clickHandler(e, pages[this.currentPage]) },
32
+ h("li", { class: (currentPage >= pages[pages.length - 1] || currentPageOutOfBounds) ? 'dso-page-hidden' : undefined },
33
+ h("a", { href: this.formatHref(pages[pages.length - 1]), "aria-label": "Volgende", onClick: e => currentPage && this.clickHandler(e, pages[currentPage]) },
31
34
  h("dso-icon", { icon: "chevron-right" })))));
32
35
  }
33
36
  static get is() { return "dso-pagination"; }