@dso-toolkit/core 34.2.1 → 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-image-overlay.cjs.entry.js +62 -0
- 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 +5 -711
- package/dist/cjs/focus-trap.esm-8d3e3fb6.js +712 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/autosuggest/autosuggest.js +6 -2
- 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/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/viewer-grid/viewer-grid.css +30 -2
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +3022 -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-de3ab027.entry.js → p-225bbb28.entry.js} +1 -5
- package/dist/dso-toolkit/p-44905fb1.js +5 -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-image-overlay.entry.js +58 -0
- 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 +3 -709
- 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/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.d.ts +19 -6
- package/package.json +2 -2
- package/dist/collection/components/ozon-content/ozon-content.transformer.js +0 -105
- package/dist/dso-toolkit/p-20856f91.entry.js +0 -1
- package/dist/types/components/ozon-content/ozon-content.transformer.d.ts +0 -15
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["dso-map-base-layers.cjs",[[1,"dso-map-base-layers",{"baseLayers":[16]}]]],["dso-map-overlays.cjs",[[1,"dso-map-overlays",{"overlays":[16]}]]],["dso-header.cjs",[[1,"dso-header",{"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"isLoggedIn":[4,"is-logged-in"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32]}]]],["dso-toggletip.cjs",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-tree-view.cjs",[[1,"dso-tree-view",{"collection":[16]}]]],["dso-date-picker.cjs",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel.cjs",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]}]]],["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-viewer-grid.cjs",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"mainSize":[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",{"suggestions":[16],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32]},[[4,"click","onDocumentClick"]]]]],["dso-badge.cjs",[[1,"dso-badge",{"status":[1]}]]],["dso-banner.cjs",[[1,"dso-banner",{"status":[1]}]]],["dso-highlight-box.cjs",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content.cjs",[[
|
|
17
|
+
return index.bootstrapLazy([["dso-map-base-layers.cjs",[[1,"dso-map-base-layers",{"baseLayers":[16]}]]],["dso-map-overlays.cjs",[[1,"dso-map-overlays",{"overlays":[16]}]]],["dso-header.cjs",[[1,"dso-header",{"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"isLoggedIn":[4,"is-logged-in"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32]}]]],["dso-toggletip.cjs",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-tree-view.cjs",[[1,"dso-tree-view",{"collection":[16]}]]],["dso-date-picker.cjs",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel.cjs",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]}]]],["dso-image-overlay.cjs",[[1,"dso-image-overlay",{"active":[32],"focused":[32]}]]],["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-viewer-grid.cjs",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"mainSize":[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",{"suggestions":[16],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32]},[[4,"click","onDocumentClick"]]]]],["dso-badge.cjs",[[1,"dso-badge",{"status":[1]}]]],["dso-banner.cjs",[[1,"dso-banner",{"status":[1]}]]],["dso-highlight-box.cjs",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content.cjs",[[2,"dso-ozon-content",{"content":[1],"state":[32]}]]],["dso-progress-bar.cjs",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-dropdown-menu.cjs",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4]}]]],["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"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]},[[0,"click","listenClick"]]]]],["dso-info-button.cjs",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1]}]]],["dso-info_2.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],"toggleInfo":[64]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]],["dso-icon.cjs",[[1,"dso-icon",{"icon":[1]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"./components/helpcenter-panel/helpcenter-panel.js",
|
|
15
15
|
"./components/highlight-box/highlight-box.js",
|
|
16
16
|
"./components/icon/icon.js",
|
|
17
|
+
"./components/image-overlay/image-overlay.js",
|
|
17
18
|
"./components/info/info.js",
|
|
18
19
|
"./components/label/label.js",
|
|
19
20
|
"./components/map-base-layers/map-base-layers.js",
|
|
@@ -5,7 +5,11 @@ import escapeStringRegexp from "escape-string-regexp";
|
|
|
5
5
|
export class Autosuggest {
|
|
6
6
|
constructor() {
|
|
7
7
|
/**
|
|
8
|
-
* The suggestions for the value of the slotted input element
|
|
8
|
+
* The suggestions for the value of the slotted input element. Optionally a
|
|
9
|
+
* Suggestion can have a `type` and `item`.
|
|
10
|
+
*
|
|
11
|
+
* The `type` is used to style the suggestion. `item` can be use to reference
|
|
12
|
+
* the original object that was used to create the suggestion.
|
|
9
13
|
*/
|
|
10
14
|
this.suggestions = [];
|
|
11
15
|
/**
|
|
@@ -238,7 +242,7 @@ export class Autosuggest {
|
|
|
238
242
|
"optional": false,
|
|
239
243
|
"docs": {
|
|
240
244
|
"tags": [],
|
|
241
|
-
"text": "The suggestions for the value of the slotted input element"
|
|
245
|
+
"text": "The suggestions for the value of the slotted input element. Optionally a\nSuggestion can have a `type` and `item`.\n\nThe `type` is used to style the suggestion. `item` can be use to reference\nthe original object that was used to create the suggestion."
|
|
242
246
|
},
|
|
243
247
|
"defaultValue": "[]"
|
|
244
248
|
},
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { html } from 'lit-html';
|
|
2
2
|
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
3
|
+
import { unsafeHTML } from 'lit-html/directives/unsafe-html';
|
|
3
4
|
import { iconTemplate } from '../icon/icon.template';
|
|
4
5
|
export function highlightBoxTemplate({ yellow, white, dropShadow, border, step, icon, richContent }) {
|
|
5
6
|
return html `
|
|
@@ -11,7 +12,9 @@ export function highlightBoxTemplate({ yellow, white, dropShadow, border, step,
|
|
|
11
12
|
?border=${border}
|
|
12
13
|
>
|
|
13
14
|
${icon && iconTemplate({ icon }, 'icon')}
|
|
14
|
-
|
|
15
|
+
<div class="dso-rich-content">
|
|
16
|
+
${typeof richContent === 'string' ? unsafeHTML(richContent) : richContent}
|
|
17
|
+
</div>
|
|
15
18
|
</dso-highlight-box>
|
|
16
19
|
`;
|
|
17
20
|
}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
button {
|
|
2
|
+
-webkit-appearance: button;
|
|
3
|
+
color: inherit;
|
|
4
|
+
cursor: pointer;
|
|
5
|
+
font: inherit;
|
|
6
|
+
font-family: inherit;
|
|
7
|
+
font-size: inherit;
|
|
8
|
+
line-height: inherit;
|
|
9
|
+
margin: 0;
|
|
10
|
+
overflow: visible;
|
|
11
|
+
text-transform: none;
|
|
12
|
+
}
|
|
13
|
+
button[disabled] {
|
|
14
|
+
cursor: default;
|
|
15
|
+
}
|
|
16
|
+
button::-moz-focus-inner {
|
|
17
|
+
border: 0;
|
|
18
|
+
padding: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:host {
|
|
22
|
+
display: inline-block;
|
|
23
|
+
position: relative;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:host(:hover) .open,
|
|
27
|
+
.open:focus {
|
|
28
|
+
opacity: 1;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.open {
|
|
32
|
+
display: inline-block;
|
|
33
|
+
font-size: 1em;
|
|
34
|
+
font-weight: 500;
|
|
35
|
+
margin-bottom: 0;
|
|
36
|
+
text-decoration: none;
|
|
37
|
+
touch-action: manipulation;
|
|
38
|
+
text-align: left;
|
|
39
|
+
user-select: none;
|
|
40
|
+
vertical-align: middle;
|
|
41
|
+
background-color: #fff;
|
|
42
|
+
border-color: #39870c;
|
|
43
|
+
color: #39870c;
|
|
44
|
+
border-width: 1px;
|
|
45
|
+
border-style: solid;
|
|
46
|
+
border-radius: 4px;
|
|
47
|
+
line-height: 1.5;
|
|
48
|
+
min-width: 56px;
|
|
49
|
+
padding: 11px 15px;
|
|
50
|
+
border: 0;
|
|
51
|
+
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.5);
|
|
52
|
+
min-width: auto;
|
|
53
|
+
padding: 8px;
|
|
54
|
+
opacity: 0;
|
|
55
|
+
position: absolute;
|
|
56
|
+
right: 16px;
|
|
57
|
+
top: 16px;
|
|
58
|
+
}
|
|
59
|
+
.open:focus, .open:focus-visible {
|
|
60
|
+
outline-offset: 2px;
|
|
61
|
+
}
|
|
62
|
+
.open:active {
|
|
63
|
+
outline: 0;
|
|
64
|
+
}
|
|
65
|
+
.open.extern::after, .open.download::after {
|
|
66
|
+
content: "";
|
|
67
|
+
display: inline-block;
|
|
68
|
+
height: 1.5em;
|
|
69
|
+
margin-left: 8px;
|
|
70
|
+
vertical-align: top;
|
|
71
|
+
width: 1.5em;
|
|
72
|
+
}
|
|
73
|
+
.open:hover {
|
|
74
|
+
background-color: #39870c;
|
|
75
|
+
border-color: #39870c;
|
|
76
|
+
color: #fff;
|
|
77
|
+
}
|
|
78
|
+
.open:active {
|
|
79
|
+
background-color: #275937;
|
|
80
|
+
border-color: #275937;
|
|
81
|
+
color: #fff;
|
|
82
|
+
}
|
|
83
|
+
.open[disabled], .open[disabled]:hover {
|
|
84
|
+
background-color: #fff;
|
|
85
|
+
border-color: #afcf9d;
|
|
86
|
+
color: #afcf9d;
|
|
87
|
+
}
|
|
88
|
+
.open.btn-sm {
|
|
89
|
+
line-height: 16px;
|
|
90
|
+
}
|
|
91
|
+
.open.btn-sm dso-icon,
|
|
92
|
+
.open.btn-sm svg.di, .open.btn-sm.extern::after, .open.btn-sm.download::after {
|
|
93
|
+
margin-bottom: -4px;
|
|
94
|
+
margin-top: -4px;
|
|
95
|
+
}
|
|
96
|
+
.open.download::after {
|
|
97
|
+
background: var(--dso-icon, var(--di-download)) no-repeat;
|
|
98
|
+
background-position: center;
|
|
99
|
+
background-size: cover;
|
|
100
|
+
height: 1.5em;
|
|
101
|
+
vertical-align: top;
|
|
102
|
+
width: 1.5em;
|
|
103
|
+
}
|
|
104
|
+
.open.download:hover::after {
|
|
105
|
+
--dso-icon: var(--di-download-wit);
|
|
106
|
+
}
|
|
107
|
+
.open.download[disabled]::after {
|
|
108
|
+
--dso-icon: var(--di-download-grasgroen-40);
|
|
109
|
+
}
|
|
110
|
+
.open.extern::after {
|
|
111
|
+
background: var(--dso-icon, var(--di-external-link)) no-repeat;
|
|
112
|
+
background-position: center;
|
|
113
|
+
background-size: cover;
|
|
114
|
+
height: 1.5em;
|
|
115
|
+
vertical-align: top;
|
|
116
|
+
width: 1.5em;
|
|
117
|
+
}
|
|
118
|
+
.open.extern:hover::after {
|
|
119
|
+
--dso-icon: var(--di-external-link-wit);
|
|
120
|
+
}
|
|
121
|
+
.open.extern[disabled]::after {
|
|
122
|
+
--dso-icon: var(--di-external-link-grasgroen-40);
|
|
123
|
+
}
|
|
124
|
+
.open > span {
|
|
125
|
+
position: absolute;
|
|
126
|
+
width: 1px;
|
|
127
|
+
height: 1px;
|
|
128
|
+
padding: 0;
|
|
129
|
+
margin: -1px;
|
|
130
|
+
overflow: hidden;
|
|
131
|
+
clip: rect(0, 0, 0, 0);
|
|
132
|
+
border: 0;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.dimmer {
|
|
136
|
+
position: fixed;
|
|
137
|
+
top: 0;
|
|
138
|
+
left: 0;
|
|
139
|
+
right: 0;
|
|
140
|
+
bottom: 0;
|
|
141
|
+
z-index: 1;
|
|
142
|
+
display: flex;
|
|
143
|
+
padding: 32px;
|
|
144
|
+
background-color: rgba(255, 255, 255, 0.8);
|
|
145
|
+
justify-content: center;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.wrapper {
|
|
149
|
+
box-shadow: 0 8px 24px 0 rgba(25, 25, 25, 0.4);
|
|
150
|
+
position: relative;
|
|
151
|
+
z-index: 20;
|
|
152
|
+
align-self: center;
|
|
153
|
+
line-height: 0;
|
|
154
|
+
}
|
|
155
|
+
.wrapper img {
|
|
156
|
+
width: auto;
|
|
157
|
+
height: auto;
|
|
158
|
+
max-width: 100%;
|
|
159
|
+
max-height: calc(100vh - 64px);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.close {
|
|
163
|
+
display: inline-block;
|
|
164
|
+
font-size: 1em;
|
|
165
|
+
font-weight: 500;
|
|
166
|
+
margin-bottom: 0;
|
|
167
|
+
text-decoration: none;
|
|
168
|
+
touch-action: manipulation;
|
|
169
|
+
text-align: left;
|
|
170
|
+
user-select: none;
|
|
171
|
+
vertical-align: middle;
|
|
172
|
+
background-color: #fff;
|
|
173
|
+
border-color: #39870c;
|
|
174
|
+
color: #39870c;
|
|
175
|
+
border-width: 1px;
|
|
176
|
+
border-style: solid;
|
|
177
|
+
border-radius: 4px;
|
|
178
|
+
line-height: 1.5;
|
|
179
|
+
min-width: 56px;
|
|
180
|
+
padding: 11px 15px;
|
|
181
|
+
border: 0;
|
|
182
|
+
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.5);
|
|
183
|
+
min-width: auto;
|
|
184
|
+
padding: 8px;
|
|
185
|
+
position: absolute;
|
|
186
|
+
top: 16px;
|
|
187
|
+
right: 16px;
|
|
188
|
+
}
|
|
189
|
+
.close:focus, .close:focus-visible {
|
|
190
|
+
outline-offset: 2px;
|
|
191
|
+
}
|
|
192
|
+
.close:active {
|
|
193
|
+
outline: 0;
|
|
194
|
+
}
|
|
195
|
+
.close.extern::after, .close.download::after {
|
|
196
|
+
content: "";
|
|
197
|
+
display: inline-block;
|
|
198
|
+
height: 1.5em;
|
|
199
|
+
margin-left: 8px;
|
|
200
|
+
vertical-align: top;
|
|
201
|
+
width: 1.5em;
|
|
202
|
+
}
|
|
203
|
+
.close:hover {
|
|
204
|
+
background-color: #39870c;
|
|
205
|
+
border-color: #39870c;
|
|
206
|
+
color: #fff;
|
|
207
|
+
}
|
|
208
|
+
.close:active {
|
|
209
|
+
background-color: #275937;
|
|
210
|
+
border-color: #275937;
|
|
211
|
+
color: #fff;
|
|
212
|
+
}
|
|
213
|
+
.close[disabled], .close[disabled]:hover {
|
|
214
|
+
background-color: #fff;
|
|
215
|
+
border-color: #afcf9d;
|
|
216
|
+
color: #afcf9d;
|
|
217
|
+
}
|
|
218
|
+
.close.btn-sm {
|
|
219
|
+
line-height: 16px;
|
|
220
|
+
}
|
|
221
|
+
.close.btn-sm dso-icon,
|
|
222
|
+
.close.btn-sm svg.di, .close.btn-sm.extern::after, .close.btn-sm.download::after {
|
|
223
|
+
margin-bottom: -4px;
|
|
224
|
+
margin-top: -4px;
|
|
225
|
+
}
|
|
226
|
+
.close.download::after {
|
|
227
|
+
background: var(--dso-icon, var(--di-download)) no-repeat;
|
|
228
|
+
background-position: center;
|
|
229
|
+
background-size: cover;
|
|
230
|
+
height: 1.5em;
|
|
231
|
+
vertical-align: top;
|
|
232
|
+
width: 1.5em;
|
|
233
|
+
}
|
|
234
|
+
.close.download:hover::after {
|
|
235
|
+
--dso-icon: var(--di-download-wit);
|
|
236
|
+
}
|
|
237
|
+
.close.download[disabled]::after {
|
|
238
|
+
--dso-icon: var(--di-download-grasgroen-40);
|
|
239
|
+
}
|
|
240
|
+
.close.extern::after {
|
|
241
|
+
background: var(--dso-icon, var(--di-external-link)) no-repeat;
|
|
242
|
+
background-position: center;
|
|
243
|
+
background-size: cover;
|
|
244
|
+
height: 1.5em;
|
|
245
|
+
vertical-align: top;
|
|
246
|
+
width: 1.5em;
|
|
247
|
+
}
|
|
248
|
+
.close.extern:hover::after {
|
|
249
|
+
--dso-icon: var(--di-external-link-wit);
|
|
250
|
+
}
|
|
251
|
+
.close.extern[disabled]::after {
|
|
252
|
+
--dso-icon: var(--di-external-link-grasgroen-40);
|
|
253
|
+
}
|
|
254
|
+
.close > span {
|
|
255
|
+
position: absolute;
|
|
256
|
+
width: 1px;
|
|
257
|
+
height: 1px;
|
|
258
|
+
padding: 0;
|
|
259
|
+
margin: -1px;
|
|
260
|
+
overflow: hidden;
|
|
261
|
+
clip: rect(0, 0, 0, 0);
|
|
262
|
+
border: 0;
|
|
263
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Component, Element, forceUpdate, h, Host, State } from "@stencil/core";
|
|
2
|
+
import { createFocusTrap } from 'focus-trap';
|
|
3
|
+
export class ImageOverlay {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.active = false;
|
|
6
|
+
this.focused = false;
|
|
7
|
+
}
|
|
8
|
+
componentDidLoad() {
|
|
9
|
+
this.mutationObserver = new MutationObserver(() => forceUpdate(this.host));
|
|
10
|
+
this.mutationObserver.observe(this.host, {
|
|
11
|
+
attributes: true,
|
|
12
|
+
subtree: true
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
disconnectedCallback() {
|
|
16
|
+
var _a, _b;
|
|
17
|
+
(_a = this.trap) === null || _a === void 0 ? void 0 : _a.deactivate();
|
|
18
|
+
(_b = this.mutationObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
var _a;
|
|
22
|
+
const { src, alt } = (_a = this.host.querySelector('img')) !== null && _a !== void 0 ? _a : {};
|
|
23
|
+
return (h(Host, { tabindex: this.focused ? -1 : 0, onFocus: () => {
|
|
24
|
+
var _a;
|
|
25
|
+
(_a = this.buttonElement) === null || _a === void 0 ? void 0 : _a.focus();
|
|
26
|
+
} },
|
|
27
|
+
this.active && src && alt && (h("div", { class: "dimmer", ref: element => this.wrapperElement = element },
|
|
28
|
+
h("div", { class: "wrapper" },
|
|
29
|
+
h("img", { src: src, alt: alt }),
|
|
30
|
+
h("button", { type: "button", class: "close", onClick: () => this.active = false },
|
|
31
|
+
h("dso-icon", { icon: "times" }),
|
|
32
|
+
h("span", null, "Sluiten"))))),
|
|
33
|
+
h("slot", null),
|
|
34
|
+
h("button", { type: "button", class: "open", ref: element => this.buttonElement = element, onClick: () => this.active = true, onFocus: () => this.focused = true, onBlur: () => this.focused = false },
|
|
35
|
+
h("dso-icon", { icon: "external-link" }),
|
|
36
|
+
h("span", null, "Afbeelding vergroot weergeven"))));
|
|
37
|
+
}
|
|
38
|
+
componentDidRender() {
|
|
39
|
+
var _a, _b;
|
|
40
|
+
if (this.active && this.wrapperElement && !this.trap) {
|
|
41
|
+
this.trap = createFocusTrap(this.wrapperElement, {
|
|
42
|
+
escapeDeactivates: true,
|
|
43
|
+
clickOutsideDeactivates: (e) => {
|
|
44
|
+
if (e instanceof MouseEvent && e.composedPath()[0] === this.wrapperElement) {
|
|
45
|
+
this.active = false;
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
return true;
|
|
49
|
+
},
|
|
50
|
+
setReturnFocus: (_a = this.buttonElement) !== null && _a !== void 0 ? _a : false,
|
|
51
|
+
onDeactivate: () => this.active = false
|
|
52
|
+
}).activate();
|
|
53
|
+
}
|
|
54
|
+
else if (!this.active && this.trap) {
|
|
55
|
+
(_b = this.trap) === null || _b === void 0 ? void 0 : _b.deactivate();
|
|
56
|
+
delete this.trap;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
static get is() { return "dso-image-overlay"; }
|
|
60
|
+
static get encapsulation() { return "shadow"; }
|
|
61
|
+
static get originalStyleUrls() { return {
|
|
62
|
+
"$": ["./image-overlay.scss"]
|
|
63
|
+
}; }
|
|
64
|
+
static get styleUrls() { return {
|
|
65
|
+
"$": ["image-overlay.css"]
|
|
66
|
+
}; }
|
|
67
|
+
static get states() { return {
|
|
68
|
+
"active": {},
|
|
69
|
+
"focused": {}
|
|
70
|
+
}; }
|
|
71
|
+
static get elementRef() { return "host"; }
|
|
72
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
export class OzonContentAlNode {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.name = 'Al';
|
|
5
|
+
}
|
|
6
|
+
render(node, { mapNodeToJsx, path }) {
|
|
7
|
+
const nestedAl = path.some(node => node.nodeName === 'Al');
|
|
8
|
+
const content = mapNodeToJsx(node.childNodes);
|
|
9
|
+
return nestedAl
|
|
10
|
+
? h("span", { role: "paragraph" }, content)
|
|
11
|
+
: h("p", null, content);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
export class OzonContentExtRefNode {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.name = [
|
|
5
|
+
'ExtRef',
|
|
6
|
+
'ExtIoRef'
|
|
7
|
+
];
|
|
8
|
+
}
|
|
9
|
+
render(node, { mapNodeToJsx }) {
|
|
10
|
+
var _a;
|
|
11
|
+
return (h("a", { target: "_blank", rel: "noopener noreferrer", href: (_a = node.getAttribute('ref')) !== null && _a !== void 0 ? _a : undefined },
|
|
12
|
+
h("span", { class: "sr-only" }, "opent in nieuw venster"),
|
|
13
|
+
mapNodeToJsx(node.childNodes)));
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
export class OzonContentFallbackNode {
|
|
3
|
+
constructor() {
|
|
4
|
+
// This name does not match any elements
|
|
5
|
+
this.name = ['<fallback>'];
|
|
6
|
+
}
|
|
7
|
+
render(node, { mapNodeToJsx }) {
|
|
8
|
+
return (h("span", { class: `fallback od-${node instanceof Element ? node.localName : node.nodeName}` }, mapNodeToJsx(node.childNodes)));
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
export class OzonContentIllustratieNode {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.name = [
|
|
5
|
+
'Illustratie',
|
|
6
|
+
'InlineTekstAfbeelding'
|
|
7
|
+
];
|
|
8
|
+
}
|
|
9
|
+
render(node) {
|
|
10
|
+
var _a, _b, _c, _d;
|
|
11
|
+
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 }));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
export class OzonContentInhoudNode {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.name = [
|
|
5
|
+
'Inhoud',
|
|
6
|
+
'Opschrift',
|
|
7
|
+
'ContainerBlocksType',
|
|
8
|
+
'BlockMixedcontentMetMaximaleInlinesMarkersPopupsType'
|
|
9
|
+
];
|
|
10
|
+
}
|
|
11
|
+
render(node, { mapNodeToJsx }) {
|
|
12
|
+
return h("div", { class: "dso-rich-content" }, mapNodeToJsx(node.childNodes));
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
export class OzonContentInlineNodes {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.name = [
|
|
5
|
+
'sub',
|
|
6
|
+
'sup',
|
|
7
|
+
'strong',
|
|
8
|
+
'b',
|
|
9
|
+
'u',
|
|
10
|
+
'i',
|
|
11
|
+
'br'
|
|
12
|
+
];
|
|
13
|
+
}
|
|
14
|
+
render(node, { mapNodeToJsx }) {
|
|
15
|
+
if (node.localName === 'br') {
|
|
16
|
+
return h("br", null);
|
|
17
|
+
}
|
|
18
|
+
const Tag = node.localName;
|
|
19
|
+
return h(Tag, null, mapNodeToJsx(node.childNodes));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
export class OzonContentIntRefNode {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.name = 'IntRef';
|
|
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
|
+
href,
|
|
20
|
+
documentComponent: ref,
|
|
21
|
+
originalEvent: event
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
return (h("a", { href: `#${ref}`, onClick: intRefOnClick }, mapNodeToJsx(node.childNodes)));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { h, Fragment } from '@stencil/core';
|
|
2
|
+
export class OzonContentNootNode {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.name = 'Noot';
|
|
5
|
+
this.handles = ['NootNummer'];
|
|
6
|
+
}
|
|
7
|
+
identify(node) {
|
|
8
|
+
var _a;
|
|
9
|
+
return (_a = node.getAttribute("id")) !== null && _a !== void 0 ? _a : undefined;
|
|
10
|
+
}
|
|
11
|
+
render(node, { mapNodeToJsx, state: noteIsOpen, setState }) {
|
|
12
|
+
var _a, _b;
|
|
13
|
+
const noteId = (_a = node.getAttribute('id')) !== null && _a !== void 0 ? _a : undefined;
|
|
14
|
+
const noteControlsId = noteId && `dso-ozon-note-${noteId}`;
|
|
15
|
+
const noteHref = noteId && `#${noteControlsId}`;
|
|
16
|
+
const childNodes = Array.from(node.childNodes);
|
|
17
|
+
const nootNummer = (_b = childNodes.find(n => n.nodeName === 'NootNummer')) === null || _b === void 0 ? void 0 : _b.textContent;
|
|
18
|
+
const onClickNote = (event) => {
|
|
19
|
+
event.preventDefault();
|
|
20
|
+
setState === null || setState === void 0 ? void 0 : setState(!noteIsOpen);
|
|
21
|
+
};
|
|
22
|
+
return (h(Fragment, null,
|
|
23
|
+
h("a", { class: { noot: true, "dso-open": !!noteIsOpen }, href: noteHref, "aria-controls": noteControlsId, "aria-expanded": noteIsOpen ? "true" : "false", onClick: onClickNote },
|
|
24
|
+
h("sup", null, nootNummer)),
|
|
25
|
+
h("span", { id: noteControlsId, role: "section" }, mapNodeToJsx(Array.from(node.querySelectorAll(':scope > Al'))))));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export function mapColspecs(count, nodeList) {
|
|
2
|
+
const elements = Array.from(nodeList);
|
|
3
|
+
const totalWidth = getTotalWidth(elements);
|
|
4
|
+
return {
|
|
5
|
+
totalWidth,
|
|
6
|
+
count,
|
|
7
|
+
columns: elements.map((element, index) => {
|
|
8
|
+
var _a;
|
|
9
|
+
const colNumber = element.getAttribute('colnum');
|
|
10
|
+
return {
|
|
11
|
+
name: (_a = element.getAttribute('colname')) !== null && _a !== void 0 ? _a : '',
|
|
12
|
+
number: colNumber ? parseInt(colNumber, 10) : index + 1,
|
|
13
|
+
width: getWidth(totalWidth, element)
|
|
14
|
+
};
|
|
15
|
+
})
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function getTotalWidth(elements) {
|
|
19
|
+
return elements.reduce((totalWidth, element) => {
|
|
20
|
+
var _a, _b;
|
|
21
|
+
const width = (_b = (_a = element.getAttribute('colwidth')) === null || _a === void 0 ? void 0 : _a.replace(/[^0-9]/, '')) !== null && _b !== void 0 ? _b : '';
|
|
22
|
+
const colWidth = parseInt(width, 10);
|
|
23
|
+
return totalWidth + (isNaN(colWidth) ? 0 : colWidth);
|
|
24
|
+
}, 0);
|
|
25
|
+
}
|
|
26
|
+
function getWidth(totalWidth, element) {
|
|
27
|
+
const width = element.getAttribute('colwidth');
|
|
28
|
+
if (!width) {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
if (width === '*') {
|
|
32
|
+
return '100%';
|
|
33
|
+
}
|
|
34
|
+
if (width.includes('*') || width.match(/^[\d+]$/)) {
|
|
35
|
+
const colWidth = parseInt(width.replace(/[^0-9]/, ''), 10);
|
|
36
|
+
return `${Math.round(colWidth / totalWidth * 100)}%`;
|
|
37
|
+
}
|
|
38
|
+
return width;
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { OzonContentTableNode } from './table.node';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { h } from '@stencil/core/internal';
|
|
2
|
+
function getData(cell) {
|
|
3
|
+
return {
|
|
4
|
+
moreRows: cell.getAttribute('morerows'),
|
|
5
|
+
nameStart: cell.getAttribute('namest'),
|
|
6
|
+
nameEnd: cell.getAttribute('nameend')
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
function getColspan({ columns }, nameStart, nameEnd) {
|
|
10
|
+
const colspecStart = columns.find(c => c.name === nameStart);
|
|
11
|
+
const colspecEnd = columns.find(c => c.name === nameEnd);
|
|
12
|
+
if (!colspecStart || !colspecEnd) {
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
const colspan = colspecEnd.number - colspecStart.number + 1;
|
|
16
|
+
return colspan === 1 ? undefined : colspan;
|
|
17
|
+
}
|
|
18
|
+
export const Cell = ({ context: { mapNodeToJsx }, colspecs, cell }) => {
|
|
19
|
+
const { moreRows, nameStart, nameEnd } = getData(cell);
|
|
20
|
+
const td = {
|
|
21
|
+
rowSpan: moreRows ? parseInt(moreRows, 10) + 1 : undefined,
|
|
22
|
+
colSpan: colspecs && nameStart && nameEnd ? getColspan(colspecs, nameStart, nameEnd) : undefined
|
|
23
|
+
};
|
|
24
|
+
return (h("td", Object.assign({}, td), mapNodeToJsx(cell.childNodes)));
|
|
25
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Fragment, h } from '@stencil/core';
|
|
2
|
+
import { Cell } from './table-cell';
|
|
3
|
+
export const Rows = ({ context, colspecs, rows }) => {
|
|
4
|
+
return (h(Fragment, null, rows.map(row => (h("tr", null, Array.from(row.children).map(cell => (h(Cell, { cell: cell, colspecs: colspecs, context: context }))))))));
|
|
5
|
+
};
|