@dso-toolkit/core 34.1.0 → 35.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.
- package/dist/cjs/dso-autosuggest.cjs.entry.js +5 -1
- package/dist/cjs/dso-header.cjs.entry.js +1 -1
- package/dist/cjs/dso-image-overlay.cjs.entry.js +62 -0
- package/dist/cjs/dso-info_2.cjs.entry.js +4 -1
- package/dist/cjs/dso-map-base-layers.cjs.entry.js +14 -1
- package/dist/cjs/dso-map-overlays.cjs.entry.js +14 -1
- package/dist/cjs/dso-ozon-content.cjs.entry.js +281 -423
- package/dist/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/cjs/dso-viewer-grid.cjs.entry.js +57 -726
- package/dist/cjs/focus-trap.esm-8d3e3fb6.js +712 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/autosuggest/autosuggest.js +6 -2
- package/dist/collection/components/header/header.css +21 -13
- package/dist/collection/components/highlight-box/highlight-box.template.js +4 -1
- package/dist/collection/components/image-overlay/image-overlay.css +263 -0
- package/dist/collection/components/image-overlay/image-overlay.js +72 -0
- package/dist/collection/components/image-overlay/image-overlay.template.js +7 -0
- package/dist/collection/components/info/info.css +20 -0
- package/dist/collection/components/map-base-layers/map-base-layers.js +16 -1
- package/dist/collection/components/map-overlays/map-overlays.js +16 -1
- package/dist/collection/components/ozon-content/nodes/al.node.js +13 -0
- package/dist/collection/components/ozon-content/nodes/document.node.js +9 -0
- package/dist/collection/components/ozon-content/nodes/ext-ref.node.js +15 -0
- package/dist/collection/components/ozon-content/nodes/fallback.node.js +10 -0
- package/dist/collection/components/ozon-content/nodes/illustratie.node.js +13 -0
- package/dist/collection/components/ozon-content/nodes/inhoud.node.js +14 -0
- package/dist/collection/components/ozon-content/nodes/inline.nodes.js +21 -0
- package/dist/collection/components/ozon-content/nodes/int-ref.node.js +26 -0
- package/dist/collection/components/ozon-content/nodes/noot.node.js +27 -0
- package/dist/collection/components/ozon-content/nodes/table.node/colspec/colspec-mapper.js +39 -0
- package/dist/collection/components/ozon-content/nodes/table.node/colspec/colspec.interface.js +2 -0
- package/dist/collection/components/ozon-content/nodes/table.node/index.js +1 -0
- package/dist/collection/components/ozon-content/nodes/table.node/table-cell.js +25 -0
- package/dist/collection/components/ozon-content/nodes/table.node/table-colgroup.js +4 -0
- package/dist/collection/components/ozon-content/nodes/table.node/table-rows.js +5 -0
- package/dist/collection/components/ozon-content/nodes/table.node/table.node.js +32 -0
- package/dist/collection/components/ozon-content/nodes/text.node.js +9 -0
- package/dist/collection/components/ozon-content/ozon-content-context.interface.js +1 -0
- package/dist/collection/components/ozon-content/ozon-content-mapper.js +76 -0
- package/dist/collection/components/ozon-content/ozon-content-node-context.interface.js +1 -0
- package/dist/collection/components/ozon-content/ozon-content-node-state.interface.js +1 -0
- package/dist/collection/components/ozon-content/ozon-content-node.interface.js +1 -0
- package/dist/collection/components/ozon-content/ozon-content.css +15 -7
- package/dist/collection/components/ozon-content/ozon-content.js +21 -33
- package/dist/collection/components/selectable/selectable.js +25 -1
- package/dist/collection/components/viewer-grid/viewer-grid-filterpanel-buttons.js +7 -0
- package/dist/collection/components/viewer-grid/viewer-grid.css +351 -3
- package/dist/collection/components/viewer-grid/viewer-grid.js +109 -19
- package/dist/collection/components/viewer-grid/viewer-grid.template.js +7 -3
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +3088 -3103
- package/dist/dso-toolkit/dso-toolkit.css +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/p-225bbb28.entry.js +1 -0
- package/dist/dso-toolkit/p-3c4dbd89.entry.js +1 -0
- package/dist/dso-toolkit/p-44905fb1.js +5 -0
- package/dist/dso-toolkit/p-50b63cf4.entry.js +1 -0
- package/dist/dso-toolkit/p-8b6e3abc.entry.js +1 -0
- package/dist/dso-toolkit/p-ad540748.entry.js +1 -0
- package/dist/dso-toolkit/p-c6f467b3.entry.js +1 -0
- package/dist/dso-toolkit/p-f193c258.entry.js +1 -0
- package/dist/esm/dso-autosuggest.entry.js +5 -1
- package/dist/esm/dso-header.entry.js +1 -1
- package/dist/esm/dso-image-overlay.entry.js +58 -0
- package/dist/esm/dso-info_2.entry.js +4 -1
- package/dist/esm/dso-map-base-layers.entry.js +14 -1
- package/dist/esm/dso-map-overlays.entry.js +14 -1
- package/dist/esm/dso-ozon-content.entry.js +282 -424
- package/dist/esm/dso-toolkit.js +1 -1
- package/dist/esm/dso-viewer-grid.entry.js +58 -727
- package/dist/esm/focus-trap.esm-299989f2.js +710 -0
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/autosuggest/autosuggest.d.ts +15 -1
- package/dist/types/components/image-overlay/image-overlay.d.ts +15 -0
- package/dist/types/components/image-overlay/image-overlay.template.d.ts +2 -0
- package/dist/types/components/map-base-layers/map-base-layers.d.ts +7 -2
- package/dist/types/components/map-overlays/map-overlays.d.ts +7 -2
- package/dist/types/components/ozon-content/nodes/al.node.d.ts +6 -0
- package/dist/types/components/ozon-content/nodes/document.node.d.ts +6 -0
- package/dist/types/components/ozon-content/nodes/ext-ref.node.d.ts +6 -0
- package/dist/types/components/ozon-content/nodes/fallback.node.d.ts +6 -0
- package/dist/types/components/ozon-content/nodes/illustratie.node.d.ts +5 -0
- package/dist/types/components/ozon-content/nodes/inhoud.node.d.ts +6 -0
- package/dist/types/components/ozon-content/nodes/inline.nodes.d.ts +6 -0
- package/dist/types/components/ozon-content/nodes/int-ref.node.d.ts +6 -0
- package/dist/types/components/ozon-content/nodes/noot.node.d.ts +8 -0
- package/dist/types/components/ozon-content/nodes/table.node/colspec/colspec-mapper.d.ts +2 -0
- package/dist/types/components/ozon-content/nodes/table.node/colspec/colspec.interface.d.ts +10 -0
- package/dist/types/components/ozon-content/nodes/table.node/index.d.ts +1 -0
- package/dist/types/components/ozon-content/nodes/table.node/table-cell.d.ts +8 -0
- package/dist/types/components/ozon-content/nodes/table.node/table-colgroup.d.ts +5 -0
- package/dist/types/components/ozon-content/nodes/table.node/table-rows.d.ts +8 -0
- package/dist/types/components/ozon-content/nodes/table.node/table.node.d.ts +7 -0
- package/dist/types/components/ozon-content/nodes/text.node.d.ts +5 -0
- package/dist/types/components/ozon-content/ozon-content-context.interface.d.ts +8 -0
- package/dist/types/components/ozon-content/ozon-content-mapper.d.ts +12 -0
- package/dist/types/components/ozon-content/ozon-content-node-context.interface.d.ts +8 -0
- package/dist/types/components/ozon-content/ozon-content-node-state.interface.d.ts +3 -0
- package/dist/types/components/ozon-content/ozon-content-node.interface.d.ts +8 -0
- package/dist/types/components/ozon-content/ozon-content.d.ts +8 -10
- package/dist/types/components/ozon-content/ozon-content.interfaces.d.ts +2 -2
- package/dist/types/components/selectable/selectable.d.ts +1 -0
- package/dist/types/components/viewer-grid/viewer-grid-filterpanel-buttons.d.ts +6 -0
- package/dist/types/components/viewer-grid/viewer-grid.d.ts +14 -3
- package/dist/types/components/viewer-grid/viewer-grid.template.d.ts +1 -1
- package/dist/types/components.d.ts +25 -6
- package/package.json +2 -2
- package/dist/collection/components/ozon-content/ozon-content.transformer.js +0 -105
- package/dist/dso-toolkit/p-06de0fa1.entry.js +0 -1
- package/dist/dso-toolkit/p-17f073d1.entry.js +0 -1
- package/dist/dso-toolkit/p-20856f91.entry.js +0 -1
- package/dist/dso-toolkit/p-7b006b11.entry.js +0 -1
- package/dist/dso-toolkit/p-aadc4f8e.entry.js +0 -1
- package/dist/dso-toolkit/p-b69134ed.entry.js +0 -5
- package/dist/types/components/ozon-content/ozon-content.transformer.d.ts +0 -15
|
@@ -1,488 +1,346 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent
|
|
1
|
+
import { h, F as Fragment, r as registerInstance, c as createEvent } from './index-d54cae76.js';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var isString = typeof input === 'string' || input instanceof String;
|
|
7
|
-
|
|
8
|
-
if (!isString) {
|
|
9
|
-
var invalidType = _typeof(input);
|
|
10
|
-
|
|
11
|
-
if (input === null) invalidType = 'null';else if (invalidType === 'object') invalidType = input.constructor.name;
|
|
12
|
-
throw new TypeError("Expected a string but received a ".concat(invalidType));
|
|
3
|
+
class OzonContentAlNode {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.name = 'Al';
|
|
13
6
|
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
for (var key in defaults) {
|
|
21
|
-
if (typeof obj[key] === 'undefined') {
|
|
22
|
-
obj[key] = defaults[key];
|
|
23
|
-
}
|
|
7
|
+
render(node, { mapNodeToJsx, path }) {
|
|
8
|
+
const nestedAl = path.some(node => node.nodeName === 'Al');
|
|
9
|
+
const content = mapNodeToJsx(node.childNodes);
|
|
10
|
+
return nestedAl
|
|
11
|
+
? h("span", { role: "paragraph" }, content)
|
|
12
|
+
: h("p", null, content);
|
|
24
13
|
}
|
|
25
|
-
|
|
26
|
-
return obj;
|
|
27
14
|
}
|
|
28
15
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
allow_trailing_dot: false,
|
|
33
|
-
allow_numeric_tld: false,
|
|
34
|
-
allow_wildcard: false
|
|
35
|
-
};
|
|
36
|
-
function isFQDN(str, options) {
|
|
37
|
-
assertString(str);
|
|
38
|
-
options = merge(options, default_fqdn_options);
|
|
39
|
-
/* Remove the optional trailing dot before checking validity */
|
|
40
|
-
|
|
41
|
-
if (options.allow_trailing_dot && str[str.length - 1] === '.') {
|
|
42
|
-
str = str.substring(0, str.length - 1);
|
|
16
|
+
class OzonContentDocumentNode {
|
|
17
|
+
constructor() {
|
|
18
|
+
this.name = '#document';
|
|
43
19
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
if (options.allow_wildcard === true && str.indexOf('*.') === 0) {
|
|
48
|
-
str = str.substring(2);
|
|
20
|
+
render(node, { mapNodeToJsx }) {
|
|
21
|
+
return h(Fragment, null, mapNodeToJsx(node.childNodes));
|
|
49
22
|
}
|
|
50
|
-
|
|
51
|
-
var parts = str.split('.');
|
|
52
|
-
var tld = parts[parts.length - 1];
|
|
53
|
-
|
|
54
|
-
if (options.require_tld) {
|
|
55
|
-
// disallow fqdns without tld
|
|
56
|
-
if (parts.length < 2) {
|
|
57
|
-
return false;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {
|
|
61
|
-
return false;
|
|
62
|
-
} // disallow spaces
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
if (/\s/.test(tld)) {
|
|
66
|
-
return false;
|
|
67
|
-
}
|
|
68
|
-
} // reject numeric TLDs
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
if (!options.allow_numeric_tld && /^\d+$/.test(tld)) {
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
return parts.every(function (part) {
|
|
76
|
-
if (part.length > 63) {
|
|
77
|
-
return false;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
if (!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(part)) {
|
|
81
|
-
return false;
|
|
82
|
-
} // disallow full-width chars
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
if (/[\uff01-\uff5e]/.test(part)) {
|
|
86
|
-
return false;
|
|
87
|
-
} // disallow parts starting or ending with hyphen
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
if (/^-|-$/.test(part)) {
|
|
91
|
-
return false;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
if (!options.allow_underscores && /_/.test(part)) {
|
|
95
|
-
return false;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
return true;
|
|
99
|
-
});
|
|
100
23
|
}
|
|
101
24
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
ff02::5678 (on the 5th link of the node)
|
|
109
|
-
ff08::9abc (on the 10th organization of the node)
|
|
110
|
-
|
|
111
|
-
would be represented as follows:
|
|
112
|
-
|
|
113
|
-
fe80::1234%1
|
|
114
|
-
ff02::5678%5
|
|
115
|
-
ff08::9abc%10
|
|
116
|
-
|
|
117
|
-
(Here we assume a natural translation from a zone index to the
|
|
118
|
-
<zone_id> part, where the Nth zone of any scope is translated into
|
|
119
|
-
"N".)
|
|
120
|
-
|
|
121
|
-
If we use interface names as <zone_id>, those addresses could also be
|
|
122
|
-
represented as follows:
|
|
123
|
-
|
|
124
|
-
fe80::1234%ne0
|
|
125
|
-
ff02::5678%pvc1.3
|
|
126
|
-
ff08::9abc%interface10
|
|
127
|
-
|
|
128
|
-
where the interface "ne0" belongs to the 1st link, "pvc1.3" belongs
|
|
129
|
-
to the 5th link, and "interface10" belongs to the 10th organization.
|
|
130
|
-
* * */
|
|
131
|
-
|
|
132
|
-
var IPv4SegmentFormat = '(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])';
|
|
133
|
-
var IPv4AddressFormat = "(".concat(IPv4SegmentFormat, "[.]){3}").concat(IPv4SegmentFormat);
|
|
134
|
-
var IPv4AddressRegExp = new RegExp("^".concat(IPv4AddressFormat, "$"));
|
|
135
|
-
var IPv6SegmentFormat = '(?:[0-9a-fA-F]{1,4})';
|
|
136
|
-
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,})?$');
|
|
137
|
-
function isIP(str) {
|
|
138
|
-
var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
139
|
-
assertString(str);
|
|
140
|
-
version = String(version);
|
|
141
|
-
|
|
142
|
-
if (!version) {
|
|
143
|
-
return isIP(str, 4) || isIP(str, 6);
|
|
25
|
+
class OzonContentExtRefNode {
|
|
26
|
+
constructor() {
|
|
27
|
+
this.name = [
|
|
28
|
+
'ExtRef',
|
|
29
|
+
'ExtIoRef'
|
|
30
|
+
];
|
|
144
31
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
var parts = str.split('.').sort(function (a, b) {
|
|
152
|
-
return a - b;
|
|
153
|
-
});
|
|
154
|
-
return parts[3] <= 255;
|
|
32
|
+
render(node, { mapNodeToJsx }) {
|
|
33
|
+
var _a;
|
|
34
|
+
return (h("a", { target: "_blank", rel: "noopener noreferrer", href: (_a = node.getAttribute('ref')) !== null && _a !== void 0 ? _a : undefined },
|
|
35
|
+
h("span", { class: "sr-only" }, "opent in nieuw venster"),
|
|
36
|
+
mapNodeToJsx(node.childNodes)));
|
|
155
37
|
}
|
|
38
|
+
}
|
|
156
39
|
|
|
157
|
-
|
|
158
|
-
|
|
40
|
+
class OzonContentIllustratieNode {
|
|
41
|
+
constructor() {
|
|
42
|
+
this.name = [
|
|
43
|
+
'Illustratie',
|
|
44
|
+
'InlineTekstAfbeelding'
|
|
45
|
+
];
|
|
46
|
+
}
|
|
47
|
+
render(node) {
|
|
48
|
+
var _a, _b, _c, _d;
|
|
49
|
+
return (h("img", { src: (_a = node.getAttribute('naam')) !== null && _a !== void 0 ? _a : undefined, alt: (_b = node.getAttribute('naam')) !== null && _b !== void 0 ? _b : undefined, height: (_c = node.getAttribute('hoogte')) !== null && _c !== void 0 ? _c : undefined, width: (_d = node.getAttribute('breedte')) !== null && _d !== void 0 ? _d : undefined }));
|
|
159
50
|
}
|
|
160
|
-
|
|
161
|
-
return false;
|
|
162
51
|
}
|
|
163
52
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
options for isURL method
|
|
177
|
-
|
|
178
|
-
require_protocol - if set as true isURL will return false if protocol is not present in the URL
|
|
179
|
-
require_valid_protocol - isURL will check if the URL's protocol is present in the protocols option
|
|
180
|
-
protocols - valid protocols can be modified with this option
|
|
181
|
-
require_host - if set as false isURL will not check if host is present in the URL
|
|
182
|
-
require_port - if set as true isURL will check if port is present in the URL
|
|
183
|
-
allow_protocol_relative_urls - if set as true protocol relative URLs will be allowed
|
|
184
|
-
validate_length - if set as false isURL will skip string length validation (IE maximum is 2083)
|
|
185
|
-
|
|
186
|
-
*/
|
|
187
|
-
|
|
188
|
-
var default_url_options = {
|
|
189
|
-
protocols: ['http', 'https', 'ftp'],
|
|
190
|
-
require_tld: true,
|
|
191
|
-
require_protocol: false,
|
|
192
|
-
require_host: true,
|
|
193
|
-
require_port: false,
|
|
194
|
-
require_valid_protocol: true,
|
|
195
|
-
allow_underscores: false,
|
|
196
|
-
allow_trailing_dot: false,
|
|
197
|
-
allow_protocol_relative_urls: false,
|
|
198
|
-
allow_fragments: true,
|
|
199
|
-
allow_query_components: true,
|
|
200
|
-
validate_length: true
|
|
201
|
-
};
|
|
202
|
-
var wrapped_ipv6 = /^\[([^\]]+)\](?::([0-9]+))?$/;
|
|
203
|
-
|
|
204
|
-
function isRegExp(obj) {
|
|
205
|
-
return Object.prototype.toString.call(obj) === '[object RegExp]';
|
|
53
|
+
class OzonContentInhoudNode {
|
|
54
|
+
constructor() {
|
|
55
|
+
this.name = [
|
|
56
|
+
'Inhoud',
|
|
57
|
+
'Opschrift',
|
|
58
|
+
'ContainerBlocksType',
|
|
59
|
+
'BlockMixedcontentMetMaximaleInlinesMarkersPopupsType'
|
|
60
|
+
];
|
|
61
|
+
}
|
|
62
|
+
render(node, { mapNodeToJsx }) {
|
|
63
|
+
return h("div", { class: "dso-rich-content" }, mapNodeToJsx(node.childNodes));
|
|
64
|
+
}
|
|
206
65
|
}
|
|
207
66
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
67
|
+
class OzonContentInlineNodes {
|
|
68
|
+
constructor() {
|
|
69
|
+
this.name = [
|
|
70
|
+
'sub',
|
|
71
|
+
'sup',
|
|
72
|
+
'strong',
|
|
73
|
+
'b',
|
|
74
|
+
'u',
|
|
75
|
+
'i',
|
|
76
|
+
'br'
|
|
77
|
+
];
|
|
78
|
+
}
|
|
79
|
+
render(node, { mapNodeToJsx }) {
|
|
80
|
+
if (node.localName === 'br') {
|
|
81
|
+
return h("br", null);
|
|
214
82
|
}
|
|
83
|
+
const Tag = node.localName;
|
|
84
|
+
return h(Tag, null, mapNodeToJsx(node.childNodes));
|
|
215
85
|
}
|
|
216
|
-
|
|
217
|
-
return false;
|
|
218
86
|
}
|
|
219
87
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
if (!url || /[\s<>]/.test(url)) {
|
|
224
|
-
return false;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
if (url.indexOf('mailto:') === 0) {
|
|
228
|
-
return false;
|
|
88
|
+
class OzonContentIntRefNode {
|
|
89
|
+
constructor() {
|
|
90
|
+
this.name = 'IntRef';
|
|
229
91
|
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
92
|
+
render(node, { mapNodeToJsx, emitAnchorClick }) {
|
|
93
|
+
const ref = node.getAttribute('ref');
|
|
94
|
+
if (!ref) {
|
|
95
|
+
return mapNodeToJsx(node.childNodes);
|
|
96
|
+
}
|
|
97
|
+
const intRefOnClick = (event) => {
|
|
98
|
+
event.preventDefault();
|
|
99
|
+
const target = event.currentTarget;
|
|
100
|
+
if (!(target instanceof HTMLAnchorElement)) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
const { href } = target;
|
|
104
|
+
emitAnchorClick({
|
|
105
|
+
href,
|
|
106
|
+
documentComponent: ref,
|
|
107
|
+
originalEvent: event
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
return (h("a", { href: `#${ref}`, onClick: intRefOnClick }, mapNodeToJsx(node.childNodes)));
|
|
235
111
|
}
|
|
112
|
+
}
|
|
236
113
|
|
|
237
|
-
|
|
238
|
-
|
|
114
|
+
class OzonContentNootNode {
|
|
115
|
+
constructor() {
|
|
116
|
+
this.name = 'Noot';
|
|
117
|
+
this.handles = ['NootNummer'];
|
|
239
118
|
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
return
|
|
119
|
+
identify(node) {
|
|
120
|
+
var _a;
|
|
121
|
+
return (_a = node.getAttribute("id")) !== null && _a !== void 0 ? _a : undefined;
|
|
122
|
+
}
|
|
123
|
+
render(node, { mapNodeToJsx, state: noteIsOpen, setState }) {
|
|
124
|
+
var _a, _b;
|
|
125
|
+
const noteId = (_a = node.getAttribute('id')) !== null && _a !== void 0 ? _a : undefined;
|
|
126
|
+
const noteControlsId = noteId && `dso-ozon-note-${noteId}`;
|
|
127
|
+
const noteHref = noteId && `#${noteControlsId}`;
|
|
128
|
+
const childNodes = Array.from(node.childNodes);
|
|
129
|
+
const nootNummer = (_b = childNodes.find(n => n.nodeName === 'NootNummer')) === null || _b === void 0 ? void 0 : _b.textContent;
|
|
130
|
+
const onClickNote = (event) => {
|
|
131
|
+
event.preventDefault();
|
|
132
|
+
setState === null || setState === void 0 ? void 0 : setState(!noteIsOpen);
|
|
133
|
+
};
|
|
134
|
+
return (h(Fragment, null,
|
|
135
|
+
h("a", { class: { noot: true, "dso-open": !!noteIsOpen }, href: noteHref, "aria-controls": noteControlsId, "aria-expanded": noteIsOpen ? "true" : "false", onClick: onClickNote },
|
|
136
|
+
h("sup", null, nootNummer)),
|
|
137
|
+
h("span", { id: noteControlsId, role: "section" }, mapNodeToJsx(Array.from(node.querySelectorAll(':scope > Al'))))));
|
|
243
138
|
}
|
|
139
|
+
}
|
|
244
140
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
141
|
+
function mapColspecs(count, nodeList) {
|
|
142
|
+
const elements = Array.from(nodeList);
|
|
143
|
+
const totalWidth = getTotalWidth(elements);
|
|
144
|
+
return {
|
|
145
|
+
totalWidth,
|
|
146
|
+
count,
|
|
147
|
+
columns: elements.map((element, index) => {
|
|
148
|
+
var _a;
|
|
149
|
+
const colNumber = element.getAttribute('colnum');
|
|
150
|
+
return {
|
|
151
|
+
name: (_a = element.getAttribute('colname')) !== null && _a !== void 0 ? _a : '',
|
|
152
|
+
number: colNumber ? parseInt(colNumber, 10) : index + 1,
|
|
153
|
+
width: getWidth(totalWidth, element)
|
|
154
|
+
};
|
|
155
|
+
})
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
function getTotalWidth(elements) {
|
|
159
|
+
return elements.reduce((totalWidth, element) => {
|
|
160
|
+
var _a, _b;
|
|
161
|
+
const width = (_b = (_a = element.getAttribute('colwidth')) === null || _a === void 0 ? void 0 : _a.replace(/[^0-9]/, '')) !== null && _b !== void 0 ? _b : '';
|
|
162
|
+
const colWidth = parseInt(width, 10);
|
|
163
|
+
return totalWidth + (isNaN(colWidth) ? 0 : colWidth);
|
|
164
|
+
}, 0);
|
|
165
|
+
}
|
|
166
|
+
function getWidth(totalWidth, element) {
|
|
167
|
+
const width = element.getAttribute('colwidth');
|
|
168
|
+
if (!width) {
|
|
169
|
+
return undefined;
|
|
266
170
|
}
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
if (url === '') {
|
|
271
|
-
return false;
|
|
171
|
+
if (width === '*') {
|
|
172
|
+
return '100%';
|
|
272
173
|
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
if (url === '' && !options.require_host) {
|
|
278
|
-
return true;
|
|
174
|
+
if (width.includes('*') || width.match(/^[\d+]$/)) {
|
|
175
|
+
const colWidth = parseInt(width.replace(/[^0-9]/, ''), 10);
|
|
176
|
+
return `${Math.round(colWidth / totalWidth * 100)}%`;
|
|
279
177
|
}
|
|
178
|
+
return width;
|
|
179
|
+
}
|
|
280
180
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
if (options.disallow_auth) {
|
|
285
|
-
return false;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
if (split[0] === '') {
|
|
289
|
-
return false;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
auth = split.shift();
|
|
293
|
-
|
|
294
|
-
if (auth.indexOf(':') >= 0 && auth.split(':').length > 2) {
|
|
295
|
-
return false;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
var _auth$split = auth.split(':'),
|
|
299
|
-
_auth$split2 = _slicedToArray(_auth$split, 2),
|
|
300
|
-
user = _auth$split2[0],
|
|
301
|
-
password = _auth$split2[1];
|
|
302
|
-
|
|
303
|
-
if (user === '' && password === '') {
|
|
304
|
-
return false;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
181
|
+
const Colgroup = ({ colspecs }) => (colspecs.columns.length > 0
|
|
182
|
+
? (h("colgroup", null, colspecs.columns.map(colspec => (h("col", { style: { width: colspec.width } })))))
|
|
183
|
+
: h(Fragment, null));
|
|
307
184
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
185
|
+
function getData(cell) {
|
|
186
|
+
return {
|
|
187
|
+
moreRows: cell.getAttribute('morerows'),
|
|
188
|
+
nameStart: cell.getAttribute('namest'),
|
|
189
|
+
nameEnd: cell.getAttribute('nameend')
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
function getColspan({ columns }, nameStart, nameEnd) {
|
|
193
|
+
const colspecStart = columns.find(c => c.name === nameStart);
|
|
194
|
+
const colspecEnd = columns.find(c => c.name === nameEnd);
|
|
195
|
+
if (!colspecStart || !colspecEnd) {
|
|
196
|
+
return undefined;
|
|
197
|
+
}
|
|
198
|
+
const colspan = colspecEnd.number - colspecStart.number + 1;
|
|
199
|
+
return colspan === 1 ? undefined : colspan;
|
|
200
|
+
}
|
|
201
|
+
const Cell = ({ context: { mapNodeToJsx }, colspecs, cell }) => {
|
|
202
|
+
const { moreRows, nameStart, nameEnd } = getData(cell);
|
|
203
|
+
const td = {
|
|
204
|
+
rowSpan: moreRows ? parseInt(moreRows, 10) + 1 : undefined,
|
|
205
|
+
colSpan: colspecs && nameStart && nameEnd ? getColspan(colspecs, nameStart, nameEnd) : undefined
|
|
206
|
+
};
|
|
207
|
+
return (h("td", Object.assign({}, td), mapNodeToJsx(cell.childNodes)));
|
|
208
|
+
};
|
|
312
209
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
port_str = ipv6_match[2] || null;
|
|
317
|
-
} else {
|
|
318
|
-
split = hostname.split(':');
|
|
319
|
-
host = split.shift();
|
|
210
|
+
const Rows = ({ context, colspecs, rows }) => {
|
|
211
|
+
return (h(Fragment, null, rows.map(row => (h("tr", null, Array.from(row.children).map(cell => (h(Cell, { cell: cell, colspecs: colspecs, context: context }))))))));
|
|
212
|
+
};
|
|
320
213
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
214
|
+
function mapData(node) {
|
|
215
|
+
var _a, _b, _c;
|
|
216
|
+
const tgroup = node.querySelector(':scope > tgroup');
|
|
217
|
+
const colAttribute = (_a = tgroup === null || tgroup === void 0 ? void 0 : tgroup.getAttribute('cols')) !== null && _a !== void 0 ? _a : undefined;
|
|
218
|
+
const columnCount = colAttribute ? parseInt(colAttribute, 10) : undefined;
|
|
219
|
+
return {
|
|
220
|
+
caption: (_c = (_b = node.querySelector(':scope > title')) === null || _b === void 0 ? void 0 : _b.textContent) !== null && _c !== void 0 ? _c : undefined,
|
|
221
|
+
colspecs: tgroup && columnCount ? mapColspecs(columnCount, tgroup.querySelectorAll(':scope > colspec')) : undefined,
|
|
222
|
+
headRows: Array.from(node.querySelectorAll(':scope > tgroup > thead > row')),
|
|
223
|
+
bodyRows: Array.from(node.querySelectorAll(':scope > tgroup > tbody > row'))
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
class OzonContentTableNode {
|
|
227
|
+
constructor() {
|
|
228
|
+
this.name = 'table';
|
|
229
|
+
this.handles = ['title', 'tgroup', 'colspec', 'thead', 'tbody', 'row', 'cell'];
|
|
230
|
+
}
|
|
231
|
+
render(node, context) {
|
|
232
|
+
const { caption, colspecs, headRows, bodyRows } = mapData(node);
|
|
233
|
+
return (h("table", { class: "table" },
|
|
234
|
+
caption && (h("caption", null, caption)),
|
|
235
|
+
colspecs && (h(Colgroup, { colspecs: colspecs })),
|
|
236
|
+
headRows.length > 0 && (h("thead", null,
|
|
237
|
+
h(Rows, { rows: headRows, colspecs: colspecs, context: context }))),
|
|
238
|
+
bodyRows.length > 0 && (h("tbody", null,
|
|
239
|
+
h(Rows, { rows: bodyRows, colspecs: colspecs, context: context })))));
|
|
324
240
|
}
|
|
241
|
+
}
|
|
325
242
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) {
|
|
330
|
-
return false;
|
|
331
|
-
}
|
|
332
|
-
} else if (options.require_port) {
|
|
333
|
-
return false;
|
|
243
|
+
class OzonContentTextNode {
|
|
244
|
+
constructor() {
|
|
245
|
+
this.name = '#text';
|
|
334
246
|
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
return checkHost(host, options.host_whitelist);
|
|
247
|
+
render(node) {
|
|
248
|
+
return h(Fragment, null, node.textContent);
|
|
338
249
|
}
|
|
250
|
+
}
|
|
339
251
|
|
|
340
|
-
|
|
341
|
-
|
|
252
|
+
class OzonContentFallbackNode {
|
|
253
|
+
constructor() {
|
|
254
|
+
// This name does not match any elements
|
|
255
|
+
this.name = ['<fallback>'];
|
|
342
256
|
}
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
if (options.host_blacklist && checkHost(host, options.host_blacklist)) {
|
|
347
|
-
return false;
|
|
257
|
+
render(node, { mapNodeToJsx }) {
|
|
258
|
+
return (h("span", { class: `fallback od-${node instanceof Element ? node.localName : node.nodeName}` }, mapNodeToJsx(node.childNodes)));
|
|
348
259
|
}
|
|
349
|
-
|
|
350
|
-
return true;
|
|
351
260
|
}
|
|
352
261
|
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
nootAnchorElement.replaceChildren(supElement);
|
|
375
|
-
const id = (index + 1).toString(10);
|
|
376
|
-
const [termId, contentId] = [`dso-ozon-term-${id}`, `dso-ozon-content-${id}`];
|
|
377
|
-
nootAnchorElement.setAttribute('href', `#${termId}`);
|
|
378
|
-
nootAnchorElement.setAttribute('id', termId);
|
|
379
|
-
nootAnchorElement.setAttribute('aria-controls', contentId);
|
|
380
|
-
nootAnchorElement.setAttribute('aria-expanded', 'false');
|
|
381
|
-
contentAlElement === null || contentAlElement === void 0 ? void 0 : contentAlElement.setAttribute('id', contentId);
|
|
382
|
-
});
|
|
383
|
-
return body;
|
|
384
|
-
}
|
|
385
|
-
function transformDocumentComponent(body) {
|
|
386
|
-
body.querySelectorAll('span[data-verwijst-naar-documentcomponent]').forEach(e => {
|
|
387
|
-
const a = document.createElement('a');
|
|
388
|
-
a.href = `#${e.getAttribute('data-verwijst-naar-documentcomponent')}`;
|
|
389
|
-
a.replaceChildren(...Array.from(e.childNodes));
|
|
390
|
-
e.replaceWith(a);
|
|
391
|
-
});
|
|
392
|
-
return body;
|
|
393
|
-
}
|
|
394
|
-
const transformers = [transformDescriptionNote, transformDocumentComponent];
|
|
395
|
-
class OzonContentTransformer {
|
|
396
|
-
constructor(anchorClick) {
|
|
397
|
-
this.anchorClick = anchorClick;
|
|
262
|
+
class Mapper {
|
|
263
|
+
constructor() {
|
|
264
|
+
this.mappers = [
|
|
265
|
+
new OzonContentTextNode(),
|
|
266
|
+
new OzonContentDocumentNode(),
|
|
267
|
+
new OzonContentInhoudNode(),
|
|
268
|
+
new OzonContentIntRefNode(),
|
|
269
|
+
new OzonContentExtRefNode(),
|
|
270
|
+
new OzonContentAlNode(),
|
|
271
|
+
new OzonContentInlineNodes(),
|
|
272
|
+
new OzonContentIllustratieNode(),
|
|
273
|
+
new OzonContentNootNode(),
|
|
274
|
+
new OzonContentTableNode()
|
|
275
|
+
];
|
|
276
|
+
this.skip = this.mappers.reduce((t, m) => {
|
|
277
|
+
if (m.handles) {
|
|
278
|
+
t.push(...m.handles);
|
|
279
|
+
}
|
|
280
|
+
return t;
|
|
281
|
+
}, []);
|
|
282
|
+
this.fallbackNode = new OzonContentFallbackNode();
|
|
398
283
|
this.domParser = new DOMParser();
|
|
399
|
-
this.eventHandlers = [this.handleValidUrls, this.handleDescriptionNoteClick, this.handleContentAnchor];
|
|
400
|
-
}
|
|
401
|
-
setContent(content) {
|
|
402
|
-
this.content = transformers.reduce((c, t) => t(c), this.domParser.parseFromString(content, 'text/html').body).children;
|
|
403
284
|
}
|
|
404
|
-
|
|
405
|
-
this.eventHandlers.some(h => h.bind(this)(event.composedPath(), event));
|
|
406
|
-
}
|
|
407
|
-
handleDescriptionNoteClick(composedPath, event) {
|
|
285
|
+
findMapper(name) {
|
|
408
286
|
var _a;
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
return false;
|
|
287
|
+
if (this.skip.includes(name)) {
|
|
288
|
+
return undefined;
|
|
412
289
|
}
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
290
|
+
return (_a = this.mappers.find(m => {
|
|
291
|
+
if (Array.isArray(m.name)) {
|
|
292
|
+
return m.name.includes(name);
|
|
293
|
+
}
|
|
294
|
+
return m.name === name;
|
|
295
|
+
})) !== null && _a !== void 0 ? _a : this.fallbackNode;
|
|
296
|
+
}
|
|
297
|
+
mapNodeToJsx(node, context, path) {
|
|
298
|
+
var _a, _b;
|
|
299
|
+
if (node instanceof NodeList) {
|
|
300
|
+
return h(Fragment, null, Array.from(node).map(n => this.mapNodeToJsx(n, context, path)));
|
|
417
301
|
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
if (open) {
|
|
421
|
-
anchorElement.classList.remove('dso-open');
|
|
422
|
-
anchorElement.setAttribute('aria-expanded', 'false');
|
|
302
|
+
if (Array.isArray(node)) {
|
|
303
|
+
return h(Fragment, null, node.map(n => this.mapNodeToJsx(n, context, path)));
|
|
423
304
|
}
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
305
|
+
const nodeName = node instanceof Element ? node.localName : node.nodeName;
|
|
306
|
+
const mapper = this.findMapper(nodeName);
|
|
307
|
+
const identity = (_a = mapper === null || mapper === void 0 ? void 0 : mapper.identify) === null || _a === void 0 ? void 0 : _a.call(mapper, node);
|
|
308
|
+
const state = identity ? context.state[identity] : undefined;
|
|
309
|
+
const setState = identity ? (state) => context.setState(Object.assign(Object.assign({}, context.state), { [identity]: state })) : undefined;
|
|
310
|
+
return (_b = mapper === null || mapper === void 0 ? void 0 : mapper.render(node, {
|
|
311
|
+
mapNodeToJsx: n => this.mapNodeToJsx(n, context, [...path, node]),
|
|
312
|
+
emitAnchorClick: context.emitAnchorClick,
|
|
313
|
+
setState,
|
|
314
|
+
state,
|
|
315
|
+
path
|
|
316
|
+
})) !== null && _b !== void 0 ? _b : h(Fragment, null);
|
|
317
|
+
}
|
|
318
|
+
transform(xml, context) {
|
|
319
|
+
if (!this.cache || this.cache.xml !== xml) {
|
|
320
|
+
this.cache = { xml, document: this.domParser.parseFromString(xml, 'text/xml') };
|
|
427
321
|
}
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
handleContentAnchor(composedPath, event) {
|
|
431
|
-
if (composedPath.some(e => e instanceof HTMLAnchorElement)) {
|
|
432
|
-
event.preventDefault();
|
|
433
|
-
const anchor = composedPath.find((e) => e instanceof HTMLAnchorElement);
|
|
434
|
-
const href = anchor.href;
|
|
435
|
-
this.anchorClick.emit({
|
|
436
|
-
href,
|
|
437
|
-
documentComponent: href.substr(href.indexOf('#') + 1),
|
|
438
|
-
originalEvent: event
|
|
439
|
-
});
|
|
440
|
-
return true;
|
|
441
|
-
}
|
|
442
|
-
return false;
|
|
443
|
-
}
|
|
444
|
-
handleValidUrls(composedPath) {
|
|
445
|
-
var _a;
|
|
446
|
-
const containerIndex = composedPath.findIndex(this.isHostElement);
|
|
447
|
-
if (containerIndex === -1) {
|
|
448
|
-
return false;
|
|
449
|
-
}
|
|
450
|
-
// require_tld: false is needed to allow http://localhost
|
|
451
|
-
return (_a = composedPath.slice(0, containerIndex)) === null || _a === void 0 ? void 0 : _a.some(e => { var _a; return e instanceof HTMLAnchorElement && isURL((_a = e.getAttribute('href')) !== null && _a !== void 0 ? _a : '', { require_tld: false, require_protocol: true }); });
|
|
452
|
-
}
|
|
453
|
-
isHostElement(value) {
|
|
454
|
-
return value instanceof HTMLElement && value.tagName === 'DSO-OZON-CONTENT';
|
|
322
|
+
const xmlDocument = this.cache.document;
|
|
323
|
+
return this.mapNodeToJsx(xmlDocument.getRootNode(), context, []);
|
|
455
324
|
}
|
|
456
325
|
}
|
|
457
326
|
|
|
458
|
-
const ozonContentCss = "dso-ozon-content{display:block}.noot{text-decoration:none}.noot:not(.dso-open)
|
|
327
|
+
const ozonContentCss = ".sc-dso-ozon-content-h{display:block}.noot.sc-dso-ozon-content{text-decoration:none}.noot.sc-dso-ozon-content:not(.dso-open)+*.sc-dso-ozon-content{display:none}.noot.dso-open.sc-dso-ozon-content+*.sc-dso-ozon-content{display:block}.noot.sc-dso-ozon-content+*.sc-dso-ozon-content{margin:4px 0;padding:8px 32px 8px 8px;position:relative}.noot.sc-dso-ozon-content+*.sc-dso-ozon-content>a.sc-dso-ozon-content{display:block;height:24px;position:absolute;right:0;text-align:center;top:0;width:24px}.noot.sc-dso-ozon-content+*.sc-dso-ozon-content>a.sc-dso-ozon-content::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.sc-dso-ozon-content+*.sc-dso-ozon-content{background-color:#ebf3e6}span[role=paragraph].sc-dso-ozon-content{display:block}.fallback.sc-dso-ozon-content{display:block}.od-Term.sc-dso-ozon-content{font-weight:700}.od-Definitie.sc-dso-ozon-content,.od-Tussenkop.sc-dso-ozon-content{font-style:italic}.od-Inhoud.sc-dso-ozon-content,.od-Inhoud.sc-dso-ozon-content>.od-Lijst.sc-dso-ozon-content,.od-IntIoRef.sc-dso-ozon-content,.od-Lidnr.sc-dso-ozon-content,.od-LiNr.sc-dso-ozon-content,.od-Opschrift.sc-dso-ozon-content,.od-Tussenkop.sc-dso-ozon-content{display:inline}.od-Al.sc-dso-ozon-content,.od-Lijstaanhef.sc-dso-ozon-content{margin-bottom:0.75em}.od-IntIoRef.sc-dso-ozon-content{border-bottom:1px dotted}.od-LiNummer.sc-dso-ozon-content{float:left;min-width:0.7em;padding-right:0.3em;text-align:right}.od-Figuur.sc-dso-ozon-content img.sc-dso-ozon-content{margin-left:25px;max-width:100%;height:auto}.od-Figuur.sc-dso-ozon-content .od-Bijschrift.sc-dso-ozon-content{font-size:0.75rem;margin-left:25px;padding-bottom:2.5rem}.od-Tabel.sc-dso-ozon-content thead.sc-dso-ozon-content{font-weight:600}.od-Kadertekst.sc-dso-ozon-content{border:1px solid #e5e5e5;margin-bottom:1rem;padding:1rem}";
|
|
459
328
|
|
|
460
329
|
let OzonContent = class {
|
|
461
330
|
constructor(hostRef) {
|
|
462
331
|
registerInstance(this, hostRef);
|
|
463
332
|
this.anchorClick = createEvent(this, "anchorClick", 7);
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
this.transformer.handleClickEvent(event);
|
|
467
|
-
}
|
|
468
|
-
componentWillLoad() {
|
|
469
|
-
this.transformer = new OzonContentTransformer(this.anchorClick);
|
|
470
|
-
}
|
|
471
|
-
componentWillRender() {
|
|
472
|
-
this.transformer.setContent(this.content);
|
|
333
|
+
this.state = {};
|
|
334
|
+
this.mapper = new Mapper();
|
|
473
335
|
}
|
|
474
336
|
render() {
|
|
475
|
-
return h("div", { class: "dso-rich-content", ref: el => this.container = el });
|
|
476
|
-
}
|
|
477
|
-
componentDidRender() {
|
|
478
337
|
var _a;
|
|
479
|
-
const
|
|
480
|
-
|
|
481
|
-
this.
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
}
|
|
338
|
+
const context = {
|
|
339
|
+
state: this.state,
|
|
340
|
+
setState: state => this.state = state,
|
|
341
|
+
emitAnchorClick: this.anchorClick.emit
|
|
342
|
+
};
|
|
343
|
+
return this.mapper.transform((_a = this.content) !== null && _a !== void 0 ? _a : '', context);
|
|
486
344
|
}
|
|
487
345
|
};
|
|
488
346
|
OzonContent.style = ozonContentCss;
|