@dso-toolkit/core 27.4.0 → 29.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/dist/cjs/dso-alert.cjs.entry.js +2 -2
  2. package/dist/cjs/dso-attachments-counter.cjs.entry.js +2 -2
  3. package/dist/cjs/dso-autosuggest.cjs.entry.js +3 -3
  4. package/dist/cjs/dso-badge.cjs.entry.js +2 -3
  5. package/dist/cjs/dso-banner.cjs.entry.js +2 -2
  6. package/dist/cjs/dso-date-picker.cjs.entry.js +2 -2
  7. package/dist/cjs/dso-dropdown-menu.cjs.entry.js +47 -7
  8. package/dist/cjs/dso-highlight-box.cjs.entry.js +2 -2
  9. package/dist/cjs/dso-icon.cjs.entry.js +9 -3
  10. package/dist/cjs/dso-info_3.cjs.entry.js +4 -4
  11. package/dist/cjs/dso-label.cjs.entry.js +6 -7
  12. package/dist/cjs/dso-map-base-layers.cjs.entry.js +2 -2
  13. package/dist/cjs/dso-map-controls.cjs.entry.js +2 -2
  14. package/dist/cjs/dso-map-overlays.cjs.entry.js +2 -2
  15. package/dist/cjs/dso-ozon-content.cjs.entry.js +443 -0
  16. package/dist/cjs/dso-progress-bar.cjs.entry.js +2 -2
  17. package/dist/cjs/dso-progress-indicator.cjs.entry.js +2 -2
  18. package/dist/cjs/dso-toolkit.cjs.js +3 -3
  19. package/dist/cjs/dso-tooltip.cjs.entry.js +55 -23
  20. package/dist/cjs/{index-5c4e19ff.js → index-fcdfdd38.js} +97 -34
  21. package/dist/cjs/loader.cjs.js +3 -3
  22. package/dist/cjs/{v4-14140ff3.js → v4-8e8d6fbc.js} +0 -0
  23. package/dist/collection/collection-manifest.json +2 -1
  24. package/dist/collection/components/badge/badge.js +0 -1
  25. package/dist/collection/components/icon/icon.css +1 -0
  26. package/dist/collection/components/icon/icon.js +2 -0
  27. package/dist/collection/components/label/label.css +8 -0
  28. package/dist/collection/components/label/label.js +5 -6
  29. package/dist/collection/components/ozon-content/ozon-content.css +100 -0
  30. package/dist/collection/components/ozon-content/ozon-content.interfaces.js +2 -0
  31. package/dist/collection/components/ozon-content/ozon-content.js +80 -0
  32. package/dist/collection/components/ozon-content/ozon-content.template.js +9 -0
  33. package/dist/collection/components/ozon-content/ozon-content.transformer.js +91 -0
  34. package/dist/collection/icon/dso-icon-sass-function.js +2 -2
  35. package/dist/custom-elements/index.d.ts +6 -0
  36. package/dist/custom-elements/index.js +567 -52
  37. package/dist/dso-toolkit/dso-toolkit.css +1 -1
  38. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  39. package/dist/dso-toolkit/p-08427682.entry.js +1 -0
  40. package/dist/dso-toolkit/p-0a7cb861.entry.js +1 -0
  41. package/dist/dso-toolkit/p-12f7e7d7.entry.js +5 -0
  42. package/dist/dso-toolkit/{p-ad90fe4d.js → p-19b890a3.js} +0 -0
  43. package/dist/dso-toolkit/p-262858dd.entry.js +1 -0
  44. package/dist/dso-toolkit/p-2c6e9460.entry.js +1 -0
  45. package/dist/dso-toolkit/p-2e7d535c.entry.js +1 -0
  46. package/dist/dso-toolkit/p-94500196.entry.js +1 -0
  47. package/dist/dso-toolkit/p-968d9e1d.entry.js +1 -0
  48. package/dist/dso-toolkit/p-a2357726.entry.js +1 -0
  49. package/dist/dso-toolkit/p-a40eeb32.js +1 -0
  50. package/dist/dso-toolkit/p-ae6209c6.entry.js +1 -0
  51. package/dist/dso-toolkit/p-b5b946de.entry.js +1 -0
  52. package/dist/dso-toolkit/p-c5acf7e2.entry.js +1 -0
  53. package/dist/dso-toolkit/p-c9c1bc8f.entry.js +1 -0
  54. package/dist/dso-toolkit/p-d748df48.entry.js +1 -0
  55. package/dist/dso-toolkit/p-dff52fb0.entry.js +1 -0
  56. package/dist/dso-toolkit/p-e4269e02.entry.js +1 -0
  57. package/dist/dso-toolkit/p-e7700d9e.entry.js +1 -0
  58. package/dist/dso-toolkit/p-eadba8c3.entry.js +1 -0
  59. package/dist/esm/dso-alert.entry.js +2 -2
  60. package/dist/esm/dso-attachments-counter.entry.js +2 -2
  61. package/dist/esm/dso-autosuggest.entry.js +3 -3
  62. package/dist/esm/dso-badge.entry.js +2 -3
  63. package/dist/esm/dso-banner.entry.js +2 -2
  64. package/dist/esm/dso-date-picker.entry.js +2 -2
  65. package/dist/esm/dso-dropdown-menu.entry.js +47 -7
  66. package/dist/esm/dso-highlight-box.entry.js +2 -2
  67. package/dist/esm/dso-icon.entry.js +9 -3
  68. package/dist/esm/dso-info_3.entry.js +4 -4
  69. package/dist/esm/dso-label.entry.js +6 -7
  70. package/dist/esm/dso-map-base-layers.entry.js +2 -2
  71. package/dist/esm/dso-map-controls.entry.js +2 -2
  72. package/dist/esm/dso-map-overlays.entry.js +2 -2
  73. package/dist/esm/dso-ozon-content.entry.js +439 -0
  74. package/dist/esm/dso-progress-bar.entry.js +2 -2
  75. package/dist/esm/dso-progress-indicator.entry.js +2 -2
  76. package/dist/esm/dso-toolkit.js +3 -3
  77. package/dist/esm/dso-tooltip.entry.js +55 -23
  78. package/dist/esm/{index-fbcbba93.js → index-61410be2.js} +97 -34
  79. package/dist/esm/loader.js +3 -3
  80. package/dist/esm/{v4-929670b7.js → v4-fa4bb814.js} +0 -0
  81. package/dist/types/components/alert/alert.template.d.ts +2 -2
  82. package/dist/types/components/attachments-counter/attachments-counter.template.d.ts +1 -1
  83. package/dist/types/components/autosuggest/autosuggest.d.ts +2 -3
  84. package/dist/types/components/autosuggest/autosuggest.template.d.ts +1 -1
  85. package/dist/types/components/badge/badge.template.d.ts +1 -1
  86. package/dist/types/components/banner/banner.template.d.ts +1 -1
  87. package/dist/types/components/date-picker/date-picker.template.d.ts +3 -3
  88. package/dist/types/components/dropdown-menu/dropdown-menu.template.d.ts +1 -1
  89. package/dist/types/components/highlight-box/highlight-box.template.d.ts +1 -1
  90. package/dist/types/components/icon/icon.template.d.ts +1 -1
  91. package/dist/types/components/info/info.template.d.ts +1 -1
  92. package/dist/types/components/info-button/info-button.template.d.ts +1 -1
  93. package/dist/types/components/label/label.d.ts +1 -1
  94. package/dist/types/components/label/label.template.d.ts +1 -1
  95. package/dist/types/components/map-controls/map-controls.template.d.ts +1 -1
  96. package/dist/types/components/ozon-content/ozon-content.d.ts +13 -0
  97. package/dist/types/components/ozon-content/ozon-content.interfaces.d.ts +5 -0
  98. package/dist/types/components/ozon-content/ozon-content.template.d.ts +2 -0
  99. package/dist/types/components/ozon-content/ozon-content.transformer.d.ts +15 -0
  100. package/dist/types/components/progress-bar/progress-bar.template.d.ts +1 -1
  101. package/dist/types/components/progress-indicator/progress-indicator.template.d.ts +1 -1
  102. package/dist/types/components/selectable/selectable.template.d.ts +1 -1
  103. package/dist/types/components/tooltip/tooltip.template.d.ts +1 -1
  104. package/dist/types/components.d.ts +19 -2
  105. package/dist/types/globals.d.ts +12 -0
  106. package/dist/types/stencil-public-runtime.d.ts +190 -182
  107. package/loader/index.d.ts +0 -1
  108. package/package.json +34 -32
  109. package/dist/dso-toolkit/p-0acdd660.entry.js +0 -1
  110. package/dist/dso-toolkit/p-17e062d6.entry.js +0 -1
  111. package/dist/dso-toolkit/p-1b4843e8.entry.js +0 -1
  112. package/dist/dso-toolkit/p-28aaf3b6.entry.js +0 -1
  113. package/dist/dso-toolkit/p-372742ef.entry.js +0 -1
  114. package/dist/dso-toolkit/p-5d6816e3.entry.js +0 -1
  115. package/dist/dso-toolkit/p-6f031e8a.entry.js +0 -1
  116. package/dist/dso-toolkit/p-6f5a1e4e.entry.js +0 -1
  117. package/dist/dso-toolkit/p-70a658a0.entry.js +0 -1
  118. package/dist/dso-toolkit/p-8662814d.entry.js +0 -1
  119. package/dist/dso-toolkit/p-9174121a.entry.js +0 -1
  120. package/dist/dso-toolkit/p-a58e3c64.entry.js +0 -1
  121. package/dist/dso-toolkit/p-acae4c27.entry.js +0 -1
  122. package/dist/dso-toolkit/p-ae985488.js +0 -1
  123. package/dist/dso-toolkit/p-c06e43cd.entry.js +0 -1
  124. package/dist/dso-toolkit/p-e29b0619.entry.js +0 -1
  125. package/dist/dso-toolkit/p-e4ba88f4.entry.js +0 -5
  126. package/dist/dso-toolkit/p-f952c084.entry.js +0 -1
@@ -0,0 +1,443 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-fcdfdd38.js');
6
+
7
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
8
+
9
+ function assertString(input) {
10
+ var isString = typeof input === 'string' || input instanceof String;
11
+
12
+ if (!isString) {
13
+ var invalidType = _typeof(input);
14
+
15
+ if (input === null) invalidType = 'null';else if (invalidType === 'object') invalidType = input.constructor.name;
16
+ throw new TypeError("Expected a string but received a ".concat(invalidType));
17
+ }
18
+ }
19
+
20
+ function merge() {
21
+ var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
22
+ var defaults = arguments.length > 1 ? arguments[1] : undefined;
23
+
24
+ for (var key in defaults) {
25
+ if (typeof obj[key] === 'undefined') {
26
+ obj[key] = defaults[key];
27
+ }
28
+ }
29
+
30
+ return obj;
31
+ }
32
+
33
+ var default_fqdn_options = {
34
+ require_tld: true,
35
+ allow_underscores: false,
36
+ allow_trailing_dot: false,
37
+ allow_numeric_tld: false
38
+ };
39
+ function isFQDN(str, options) {
40
+ assertString(str);
41
+ options = merge(options, default_fqdn_options);
42
+ /* Remove the optional trailing dot before checking validity */
43
+
44
+ if (options.allow_trailing_dot && str[str.length - 1] === '.') {
45
+ str = str.substring(0, str.length - 1);
46
+ }
47
+
48
+ var parts = str.split('.');
49
+ var tld = parts[parts.length - 1];
50
+
51
+ if (options.require_tld) {
52
+ // disallow fqdns without tld
53
+ if (parts.length < 2) {
54
+ return false;
55
+ }
56
+
57
+ if (!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {
58
+ return false;
59
+ } // disallow spaces && special characers
60
+
61
+
62
+ if (/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20\u00A9\uFFFD]/.test(tld)) {
63
+ return false;
64
+ }
65
+ } // reject numeric TLDs
66
+
67
+
68
+ if (!options.allow_numeric_tld && /^\d+$/.test(tld)) {
69
+ return false;
70
+ }
71
+
72
+ return parts.every(function (part) {
73
+ if (part.length > 63) {
74
+ return false;
75
+ }
76
+
77
+ if (!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(part)) {
78
+ return false;
79
+ } // disallow full-width chars
80
+
81
+
82
+ if (/[\uff01-\uff5e]/.test(part)) {
83
+ return false;
84
+ } // disallow parts starting or ending with hyphen
85
+
86
+
87
+ if (/^-|-$/.test(part)) {
88
+ return false;
89
+ }
90
+
91
+ if (!options.allow_underscores && /_/.test(part)) {
92
+ return false;
93
+ }
94
+
95
+ return true;
96
+ });
97
+ }
98
+
99
+ /**
100
+ 11.3. Examples
101
+
102
+ The following addresses
103
+
104
+ fe80::1234 (on the 1st link of the node)
105
+ ff02::5678 (on the 5th link of the node)
106
+ ff08::9abc (on the 10th organization of the node)
107
+
108
+ would be represented as follows:
109
+
110
+ fe80::1234%1
111
+ ff02::5678%5
112
+ ff08::9abc%10
113
+
114
+ (Here we assume a natural translation from a zone index to the
115
+ <zone_id> part, where the Nth zone of any scope is translated into
116
+ "N".)
117
+
118
+ If we use interface names as <zone_id>, those addresses could also be
119
+ represented as follows:
120
+
121
+ fe80::1234%ne0
122
+ ff02::5678%pvc1.3
123
+ ff08::9abc%interface10
124
+
125
+ where the interface "ne0" belongs to the 1st link, "pvc1.3" belongs
126
+ to the 5th link, and "interface10" belongs to the 10th organization.
127
+ * * */
128
+
129
+ var IPv4SegmentFormat = '(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])';
130
+ var IPv4AddressFormat = "(".concat(IPv4SegmentFormat, "[.]){3}").concat(IPv4SegmentFormat);
131
+ var IPv4AddressRegExp = new RegExp("^".concat(IPv4AddressFormat, "$"));
132
+ var IPv6SegmentFormat = '(?:[0-9a-fA-F]{1,4})';
133
+ var IPv6AddressRegExp = new RegExp('^(' + "(?:".concat(IPv6SegmentFormat, ":){7}(?:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){6}(?:").concat(IPv4AddressFormat, "|:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){5}(?::").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,2}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){4}(?:(:").concat(IPv6SegmentFormat, "){0,1}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,3}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){3}(?:(:").concat(IPv6SegmentFormat, "){0,2}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,4}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){2}(?:(:").concat(IPv6SegmentFormat, "){0,3}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,5}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){1}(?:(:").concat(IPv6SegmentFormat, "){0,4}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,6}|:)|") + "(?::((?::".concat(IPv6SegmentFormat, "){0,5}:").concat(IPv4AddressFormat, "|(?::").concat(IPv6SegmentFormat, "){1,7}|:))") + ')(%[0-9a-zA-Z-.:]{1,})?$');
134
+ function isIP(str) {
135
+ var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
136
+ assertString(str);
137
+ version = String(version);
138
+
139
+ if (!version) {
140
+ return isIP(str, 4) || isIP(str, 6);
141
+ }
142
+
143
+ if (version === '4') {
144
+ if (!IPv4AddressRegExp.test(str)) {
145
+ return false;
146
+ }
147
+
148
+ var parts = str.split('.').sort(function (a, b) {
149
+ return a - b;
150
+ });
151
+ return parts[3] <= 255;
152
+ }
153
+
154
+ if (version === '6') {
155
+ return !!IPv6AddressRegExp.test(str);
156
+ }
157
+
158
+ return false;
159
+ }
160
+
161
+ /*
162
+ options for isURL method
163
+
164
+ require_protocol - if set as true isURL will return false if protocol is not present in the URL
165
+ require_valid_protocol - isURL will check if the URL's protocol is present in the protocols option
166
+ protocols - valid protocols can be modified with this option
167
+ require_host - if set as false isURL will not check if host is present in the URL
168
+ require_port - if set as true isURL will check if port is present in the URL
169
+ allow_protocol_relative_urls - if set as true protocol relative URLs will be allowed
170
+ validate_length - if set as false isURL will skip string length validation (IE maximum is 2083)
171
+
172
+ */
173
+
174
+ var default_url_options = {
175
+ protocols: ['http', 'https', 'ftp'],
176
+ require_tld: true,
177
+ require_protocol: false,
178
+ require_host: true,
179
+ require_port: false,
180
+ require_valid_protocol: true,
181
+ allow_underscores: false,
182
+ allow_trailing_dot: false,
183
+ allow_protocol_relative_urls: false,
184
+ validate_length: true
185
+ };
186
+ var wrapped_ipv6 = /^\[([^\]]+)\](?::([0-9]+))?$/;
187
+
188
+ function isRegExp(obj) {
189
+ return Object.prototype.toString.call(obj) === '[object RegExp]';
190
+ }
191
+
192
+ function checkHost(host, matches) {
193
+ for (var i = 0; i < matches.length; i++) {
194
+ var match = matches[i];
195
+
196
+ if (host === match || isRegExp(match) && match.test(host)) {
197
+ return true;
198
+ }
199
+ }
200
+
201
+ return false;
202
+ }
203
+
204
+ function isURL(url, options) {
205
+ assertString(url);
206
+
207
+ if (!url || /[\s<>]/.test(url)) {
208
+ return false;
209
+ }
210
+
211
+ if (url.indexOf('mailto:') === 0) {
212
+ return false;
213
+ }
214
+
215
+ options = merge(options, default_url_options);
216
+
217
+ if (options.validate_length && url.length >= 2083) {
218
+ return false;
219
+ }
220
+
221
+ var protocol, auth, host, hostname, port, port_str, split, ipv6;
222
+ split = url.split('#');
223
+ url = split.shift();
224
+ split = url.split('?');
225
+ url = split.shift();
226
+ split = url.split('://');
227
+
228
+ if (split.length > 1) {
229
+ protocol = split.shift().toLowerCase();
230
+
231
+ if (options.require_valid_protocol && options.protocols.indexOf(protocol) === -1) {
232
+ return false;
233
+ }
234
+ } else if (options.require_protocol) {
235
+ return false;
236
+ } else if (url.substr(0, 2) === '//') {
237
+ if (!options.allow_protocol_relative_urls) {
238
+ return false;
239
+ }
240
+
241
+ split[0] = url.substr(2);
242
+ }
243
+
244
+ url = split.join('://');
245
+
246
+ if (url === '') {
247
+ return false;
248
+ }
249
+
250
+ split = url.split('/');
251
+ url = split.shift();
252
+
253
+ if (url === '' && !options.require_host) {
254
+ return true;
255
+ }
256
+
257
+ split = url.split('@');
258
+
259
+ if (split.length > 1) {
260
+ if (options.disallow_auth) {
261
+ return false;
262
+ }
263
+
264
+ if (split[0] === '' || split[0].substr(0, 1) === ':') {
265
+ return false;
266
+ }
267
+
268
+ auth = split.shift();
269
+
270
+ if (auth.indexOf(':') >= 0 && auth.split(':').length > 2) {
271
+ return false;
272
+ }
273
+ }
274
+
275
+ hostname = split.join('@');
276
+ port_str = null;
277
+ ipv6 = null;
278
+ var ipv6_match = hostname.match(wrapped_ipv6);
279
+
280
+ if (ipv6_match) {
281
+ host = '';
282
+ ipv6 = ipv6_match[1];
283
+ port_str = ipv6_match[2] || null;
284
+ } else {
285
+ split = hostname.split(':');
286
+ host = split.shift();
287
+
288
+ if (split.length) {
289
+ port_str = split.join(':');
290
+ }
291
+ }
292
+
293
+ if (port_str !== null) {
294
+ port = parseInt(port_str, 10);
295
+
296
+ if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) {
297
+ return false;
298
+ }
299
+ } else if (options.require_port) {
300
+ return false;
301
+ }
302
+
303
+ if (!isIP(host) && !isFQDN(host, options) && (!ipv6 || !isIP(ipv6, 6))) {
304
+ return false;
305
+ }
306
+
307
+ host = host || ipv6;
308
+
309
+ if (options.host_whitelist && !checkHost(host, options.host_whitelist)) {
310
+ return false;
311
+ }
312
+
313
+ if (options.host_blacklist && checkHost(host, options.host_blacklist)) {
314
+ return false;
315
+ }
316
+
317
+ return true;
318
+ }
319
+
320
+ function transformDescriptionNote(body) {
321
+ body.querySelectorAll('a.noot > div.noot_popup').forEach((e, index) => {
322
+ const contentElement = e.querySelector('.od-Al');
323
+ const ozonPopupElement = contentElement === null || contentElement === void 0 ? void 0 : contentElement.parentElement;
324
+ const anchorElement = ozonPopupElement === null || ozonPopupElement === void 0 ? void 0 : ozonPopupElement.parentElement;
325
+ const supElement = document.createElement('sup');
326
+ supElement.replaceChildren(...Array.from(anchorElement.childNodes));
327
+ anchorElement === null || anchorElement === void 0 ? void 0 : anchorElement.replaceChildren(supElement);
328
+ anchorElement === null || anchorElement === void 0 ? void 0 : anchorElement.after(contentElement);
329
+ ozonPopupElement === null || ozonPopupElement === void 0 ? void 0 : ozonPopupElement.remove();
330
+ const id = (index + 1).toString(10);
331
+ const [termId, contentId] = [`dso-ozon-term-${id}`, `dso-ozon-content-${id}`];
332
+ anchorElement === null || anchorElement === void 0 ? void 0 : anchorElement.setAttribute('id', termId);
333
+ anchorElement === null || anchorElement === void 0 ? void 0 : anchorElement.setAttribute('aria-controls', contentId);
334
+ anchorElement === null || anchorElement === void 0 ? void 0 : anchorElement.setAttribute('aria-expanded', 'false');
335
+ contentElement === null || contentElement === void 0 ? void 0 : contentElement.setAttribute('id', contentId);
336
+ });
337
+ return body;
338
+ }
339
+ function transformDocumentComponent(body) {
340
+ body.querySelectorAll('span[data-verwijst-naar-documentcomponent]').forEach(e => {
341
+ const a = document.createElement('a');
342
+ a.href = `#${e.getAttribute('data-verwijst-naar-documentcomponent')}`;
343
+ a.replaceChildren(...Array.from(e.childNodes));
344
+ e.replaceWith(a);
345
+ });
346
+ return body;
347
+ }
348
+ const transformers = [transformDescriptionNote, transformDocumentComponent];
349
+ class OzonContentTransformer {
350
+ constructor(anchorClick) {
351
+ this.anchorClick = anchorClick;
352
+ this.domParser = new DOMParser();
353
+ this.eventHandlers = [this.handleValidUrls, this.handleDescriptionNoteClick, this.handleContentAnchor];
354
+ }
355
+ setContent(content) {
356
+ this.content = transformers.reduce((c, t) => t(c), this.domParser.parseFromString(content, 'text/html').body).children;
357
+ }
358
+ handleClickEvent(event) {
359
+ this.eventHandlers.some(h => h.bind(this)(event.composedPath(), event));
360
+ }
361
+ handleDescriptionNoteClick(composedPath, event) {
362
+ var _a;
363
+ const containerIndex = composedPath.findIndex(this.isHostElement);
364
+ if (containerIndex === -1) {
365
+ return false;
366
+ }
367
+ const anchorElement = (_a = composedPath
368
+ .slice(0, containerIndex)) === null || _a === void 0 ? void 0 : _a.find((e) => e instanceof HTMLAnchorElement && e.classList.contains('noot'));
369
+ if (!anchorElement) {
370
+ return false;
371
+ }
372
+ event.preventDefault();
373
+ const open = anchorElement.classList.contains('dso-open');
374
+ if (open) {
375
+ anchorElement.classList.remove('dso-open');
376
+ anchorElement.setAttribute('aria-expanded', 'false');
377
+ }
378
+ else {
379
+ anchorElement.classList.add('dso-open');
380
+ anchorElement.setAttribute('aria-expanded', 'true');
381
+ }
382
+ return true;
383
+ }
384
+ handleContentAnchor(composedPath, event) {
385
+ if (composedPath.some(e => e instanceof HTMLAnchorElement)) {
386
+ event.preventDefault();
387
+ const anchor = composedPath.find((e) => e instanceof HTMLAnchorElement);
388
+ const href = anchor.href;
389
+ this.anchorClick.emit({
390
+ href,
391
+ documentComponent: href.substr(href.indexOf('#') + 1),
392
+ originalEvent: event
393
+ });
394
+ return true;
395
+ }
396
+ return false;
397
+ }
398
+ handleValidUrls(composedPath) {
399
+ var _a;
400
+ const containerIndex = composedPath.findIndex(this.isHostElement);
401
+ if (containerIndex === -1) {
402
+ return false;
403
+ }
404
+ return (_a = composedPath.slice(0, containerIndex)) === null || _a === void 0 ? void 0 : _a.some(e => e instanceof HTMLAnchorElement && isURL(e.href));
405
+ }
406
+ isHostElement(value) {
407
+ return value instanceof HTMLElement && value.tagName === 'DSO-OZON-CONTENT';
408
+ }
409
+ }
410
+
411
+ const ozonContentCss = "dso-ozon-content{display:block}.noot{text-decoration:none}.noot:not(.dso-open)+.od-Al{display:none}.noot.dso-open+.od-Al{display:block}.noot+.od-Al{margin:4px 0;padding:8px 32px 8px 8px;position:relative}.noot+.od-Al>a{display:block;height:24px;position:absolute;right:0;text-align:center;top:0;width:24px}.noot+.od-Al>a::before{background:var(--dso-icon, var(--di-times-zwart)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em;content:\"\";display:block}.noot+.od-Al{background-color:#ebf3e6}.od-Term{font-weight:700}.od-Definitie,.od-Tussenkop{font-style:italic}.od-Inhoud,.od-Inhoud>.od-Lijst,.od-IntIoRef,.od-Lidnr,.od-LiNr,.od-Opschrift,.od-Tussenkop{display:inline}.od-Al,.od-Lijstaanhef{margin-bottom:0.75em}.od-IntIoRef{border-bottom:1px dotted}.od-LiNummer{float:left;min-width:0.7em;padding-right:0.3em;text-align:right}.od-Figuur img{margin-left:25px;max-width:100%;height:auto}.od-Figuur .od-Bijschrift{font-size:0.75rem;margin-left:25px;padding-bottom:2.5rem}.od-Tabel thead{font-weight:600}.od-Kadertekst{border:1px solid #e5e5e5;margin-bottom:1rem;padding:1rem}";
412
+
413
+ let OzonContent = class {
414
+ constructor(hostRef) {
415
+ index.registerInstance(this, hostRef);
416
+ this.anchorClick = index.createEvent(this, "anchorClick", 7);
417
+ }
418
+ handleClick(event) {
419
+ this.transformer.handleClickEvent(event);
420
+ }
421
+ componentWillLoad() {
422
+ this.transformer = new OzonContentTransformer(this.anchorClick);
423
+ }
424
+ componentWillRender() {
425
+ this.transformer.setContent(this.content);
426
+ }
427
+ render() {
428
+ return index.h("div", { class: "dso-rich-content", ref: el => this.container = el });
429
+ }
430
+ componentDidRender() {
431
+ var _a;
432
+ const content = this.transformer.content;
433
+ if (this.container && content) {
434
+ this.container.replaceChildren(...Array.from(content));
435
+ }
436
+ else {
437
+ (_a = this.container) === null || _a === void 0 ? void 0 : _a.replaceChildren();
438
+ }
439
+ }
440
+ };
441
+ OzonContent.style = ozonContentCss;
442
+
443
+ exports.dso_ozon_content = OzonContent;
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-5c4e19ff.js');
5
+ const index = require('./index-fcdfdd38.js');
6
6
 
7
7
  const progressBarCss = ":host{display:block}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.progress{background-color:#fff;border:1px solid #39870c;height:16px;margin-bottom:calc(16px + 1em);position:relative}.progress .progress-bar{background-color:#39870c;color:#fff;float:left;font-size:14px;height:100%;line-height:16px;text-align:center;width:0%}.progress .progress-bar>span:not(.sr-only){color:#191919;left:0;position:absolute;top:calc(100% + 8px)}";
8
8
 
9
- const ProgressBar = class {
9
+ let ProgressBar = class {
10
10
  constructor(hostRef) {
11
11
  index.registerInstance(this, hostRef);
12
12
  this.min = 0;
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-5c4e19ff.js');
5
+ const index = require('./index-fcdfdd38.js');
6
6
 
7
7
  const progressIndicatorCss = "*,*::after,*::before{box-sizing:border-box}.dso-progress-indicator-spinner{display:inline-block;margin:0;position:relative;vertical-align:middle}span.dso-progress-indicator-label{margin-left:16px;vertical-align:middle}:host{display:block}:host([block]){align-items:center;display:flex;justify-content:center}:host([size=small]) .dso-progress-indicator-spinner,:host(:not([size=medium]):not([size=large])) .dso-progress-indicator-spinner{height:24px;width:24px}:host([size=small]):host([block]),:host(:not([size=medium]):not([size=large])):host([block]){padding:12px 16px}:host([size=medium]) .dso-progress-indicator-spinner{height:32px;width:32px}:host([size=medium]):host([block]){padding:16px}:host([size=large]) .dso-progress-indicator-spinner{height:48px;width:48px}:host([size=large]):host([block]){padding:24px 16px}";
8
8
 
9
- const Progressindicator = class {
9
+ let Progressindicator = class {
10
10
  constructor(hostRef) {
11
11
  index.registerInstance(this, hostRef);
12
12
  }
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-5c4e19ff.js');
3
+ const index = require('./index-fcdfdd38.js');
4
4
 
5
5
  /*
6
- Stencil Client Patch Browser v2.5.2 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v2.9.0 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
  const patchBrowser = () => {
9
9
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('dso-toolkit.cjs.js', document.baseURI).href));
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
  };
16
16
 
17
17
  patchBrowser().then(options => {
18
- return index.bootstrapLazy([["dso-map-base-layers.cjs",[[1,"dso-map-base-layers",{"baseLayers":[16],"selectedBaseLayer":[1040]}]]],["dso-map-overlays.cjs",[[1,"dso-map-overlays",{"overlays":[16],"checkedOverlays":[1040]}]]],["dso-date-picker.cjs",[[1,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"value":[513],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-label.cjs",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"hover":[32]}]]],["dso-map-controls.cjs",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32]}]]],["dso-alert.cjs",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-attachments-counter.cjs",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest.cjs",[[6,"dso-autosuggest",{"fetchSuggestions":[16],"suggestOnFocus":[4,"suggest-on-focus"],"suggestions":[32],"showSuggestions":[32]},[[4,"click","onDocumentClick"]]]]],["dso-badge.cjs",[[1,"dso-badge",{"status":[1]}]]],["dso-banner.cjs",[[1,"dso-banner",{"status":[1]}]]],["dso-dropdown-menu.cjs",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4]}]]],["dso-highlight-box.cjs",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-progress-bar.cjs",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-progress-indicator.cjs",[[1,"dso-progress-indicator",{"label":[1],"size":[1],"block":[4]}]]],["dso-tooltip.cjs",[[1,"dso-tooltip",{"position":[1],"for":[1],"noArrow":[4,"no-arrow"],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]},[[0,"click","listenClick"]]]]],["dso-icon.cjs",[[1,"dso-icon",{"icon":[1]}]]],["dso-info_3.cjs",[[1,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32]}],[1,"dso-info",{"fixed":[516],"active":[516]}],[1,"dso-info-button",{"active":[1540],"label":[1]}]]]], options);
18
+ return index.bootstrapLazy([["dso-map-base-layers.cjs",[[1,"dso-map-base-layers",{"baseLayers":[16],"selectedBaseLayer":[1040]}]]],["dso-map-overlays.cjs",[[1,"dso-map-overlays",{"overlays":[16],"checkedOverlays":[1040]}]]],["dso-date-picker.cjs",[[1,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"value":[513],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-label.cjs",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"hover":[32]}]]],["dso-map-controls.cjs",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32]}]]],["dso-alert.cjs",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-attachments-counter.cjs",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest.cjs",[[6,"dso-autosuggest",{"fetchSuggestions":[16],"suggestOnFocus":[4,"suggest-on-focus"],"suggestions":[32],"showSuggestions":[32]},[[4,"click","onDocumentClick"]]]]],["dso-badge.cjs",[[1,"dso-badge",{"status":[1]}]]],["dso-banner.cjs",[[1,"dso-banner",{"status":[1]}]]],["dso-dropdown-menu.cjs",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4]}]]],["dso-highlight-box.cjs",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content.cjs",[[0,"dso-ozon-content",{"content":[1]},[[0,"click","handleClick"]]]]],["dso-progress-bar.cjs",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-progress-indicator.cjs",[[1,"dso-progress-indicator",{"label":[1],"size":[1],"block":[4]}]]],["dso-tooltip.cjs",[[1,"dso-tooltip",{"position":[1],"for":[1],"noArrow":[4,"no-arrow"],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]},[[0,"click","listenClick"]]]]],["dso-icon.cjs",[[1,"dso-icon",{"icon":[1]}]]],["dso-info_3.cjs",[[1,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32]}],[1,"dso-info",{"fixed":[516],"active":[516]}],[1,"dso-info-button",{"active":[1540],"label":[1]}]]]], options);
19
19
  });