@dso-toolkit/core 35.0.0 → 36.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 (147) hide show
  1. package/dist/cjs/dso-alert.cjs.entry.js +1 -1
  2. package/dist/cjs/dso-attachments-counter.cjs.entry.js +1 -1
  3. package/dist/cjs/dso-autosuggest.cjs.entry.js +2 -2
  4. package/dist/cjs/dso-badge.cjs.entry.js +1 -1
  5. package/dist/cjs/dso-banner.cjs.entry.js +1 -1
  6. package/dist/cjs/dso-date-picker.cjs.entry.js +2 -2
  7. package/dist/cjs/dso-dropdown-menu.cjs.entry.js +2 -2
  8. package/dist/cjs/dso-header.cjs.entry.js +16 -7
  9. package/dist/cjs/dso-helpcenter-panel.cjs.entry.js +1 -1
  10. package/dist/cjs/dso-highlight-box.cjs.entry.js +1 -1
  11. package/dist/cjs/dso-icon.cjs.entry.js +1 -1
  12. package/dist/cjs/dso-image-overlay.cjs.entry.js +4 -4
  13. package/dist/cjs/dso-info-button.cjs.entry.js +1 -1
  14. package/dist/cjs/dso-info_2.cjs.entry.js +2 -2
  15. package/dist/cjs/dso-label.cjs.entry.js +1 -1
  16. package/dist/cjs/dso-map-base-layers.cjs.entry.js +1 -1
  17. package/dist/cjs/dso-map-controls.cjs.entry.js +22 -19
  18. package/dist/cjs/dso-map-overlays.cjs.entry.js +1 -1
  19. package/dist/cjs/dso-ozon-content.cjs.entry.js +36 -24
  20. package/dist/cjs/dso-progress-bar.cjs.entry.js +1 -1
  21. package/dist/cjs/dso-progress-indicator.cjs.entry.js +1 -1
  22. package/dist/cjs/dso-toggletip.cjs.entry.js +1 -1
  23. package/dist/cjs/dso-toolkit.cjs.js +2 -2
  24. package/dist/cjs/dso-tooltip.cjs.entry.js +8 -4
  25. package/dist/cjs/dso-tree-view.cjs.entry.js +9 -9
  26. package/dist/cjs/dso-viewer-grid.cjs.entry.js +4 -4
  27. package/dist/cjs/{focus-trap.esm-8d3e3fb6.js → focus-trap.esm-a85643b0.js} +102 -68
  28. package/dist/cjs/{index-5ea63531.js → index-dfb4ea62.js} +73 -64
  29. package/dist/cjs/index.esm-3520a2a6.js +427 -0
  30. package/dist/cjs/loader.cjs.js +2 -2
  31. package/dist/collection/collection-manifest.json +2 -2
  32. package/dist/collection/components/alert/alert.template.js +1 -1
  33. package/dist/collection/components/anchor/anchor.template.js +1 -1
  34. package/dist/collection/components/autosuggest/autosuggest.css +1 -1
  35. package/dist/collection/components/badge/badge.template.js +1 -1
  36. package/dist/collection/components/button/button.template.js +1 -1
  37. package/dist/collection/components/date-picker/date-picker.css +6 -6
  38. package/dist/collection/components/date-picker/date-picker.template.js +1 -1
  39. package/dist/collection/components/definition-list/definition-list.template.js +2 -2
  40. package/dist/collection/components/dropdown-menu/dropdown-menu.template.js +1 -1
  41. package/dist/collection/components/header/header.css +1 -1
  42. package/dist/collection/components/header/header.js +38 -9
  43. package/dist/collection/components/header/header.template.js +4 -2
  44. package/dist/collection/components/helpcenter-panel/helpcenter-panel.template.js +2 -2
  45. package/dist/collection/components/highlight-box/highlight-box.template.js +2 -2
  46. package/dist/collection/components/icon/icon.template.js +1 -1
  47. package/dist/collection/components/image-overlay/image-overlay.css +1 -1
  48. package/dist/collection/components/label/label.template.js +2 -2
  49. package/dist/collection/components/list/list.template.js +1 -1
  50. package/dist/collection/components/map-controls/map-controls.js +17 -19
  51. package/dist/collection/components/ozon-content/get-node-name.function.js +9 -0
  52. package/dist/collection/components/ozon-content/nodes/al.node.js +2 -1
  53. package/dist/collection/components/ozon-content/nodes/fallback.node.js +2 -1
  54. package/dist/collection/components/ozon-content/nodes/noot.node.js +15 -15
  55. package/dist/collection/components/ozon-content/ozon-content-mapper.js +9 -5
  56. package/dist/collection/components/ozon-content/ozon-content.css +76 -23
  57. package/dist/collection/components/progress-bar/progress-bar.template.js +1 -1
  58. package/dist/collection/components/progress-indicator/progress-indicator.template.js +1 -1
  59. package/dist/collection/components/selectable/selectable.css +7 -1
  60. package/dist/collection/components/selectable/selectable.template.js +1 -1
  61. package/dist/collection/components/toggletip/toggletip.template.js +2 -2
  62. package/dist/collection/components/tooltip/tooltip.css +1 -1
  63. package/dist/collection/components/tooltip/tooltip.template.js +1 -1
  64. package/dist/collection/components/tree-view/tree-item.js +7 -7
  65. package/dist/collection/components/tree-view/tree-view.css +86 -15
  66. package/dist/collection/components/viewer-grid/viewer-grid.css +2 -2
  67. package/dist/custom-elements/index.js +438 -216
  68. package/dist/dso-toolkit/dso-toolkit.css +1 -1
  69. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  70. package/dist/dso-toolkit/p-016ed5a8.entry.js +1 -0
  71. package/dist/dso-toolkit/{p-c6f467b3.entry.js → p-0216f283.entry.js} +1 -1
  72. package/dist/dso-toolkit/{p-348414bf.entry.js → p-09bcacd0.entry.js} +1 -1
  73. package/dist/dso-toolkit/{p-2b6a3dfa.entry.js → p-117a31fe.entry.js} +1 -1
  74. package/dist/dso-toolkit/p-131d54e3.js +5 -0
  75. package/dist/dso-toolkit/{p-50b63cf4.entry.js → p-1eeadd3e.entry.js} +1 -1
  76. package/dist/dso-toolkit/{p-ad540748.entry.js → p-2279329b.entry.js} +1 -1
  77. package/dist/dso-toolkit/p-258e8371.entry.js +1 -0
  78. package/dist/dso-toolkit/{p-bc14cafd.entry.js → p-3ced438e.entry.js} +1 -1
  79. package/dist/dso-toolkit/{p-c54ecae1.entry.js → p-406b179d.entry.js} +1 -1
  80. package/dist/dso-toolkit/{p-225bbb28.entry.js → p-4b5f6b4c.entry.js} +1 -1
  81. package/dist/dso-toolkit/{p-3b493a2c.entry.js → p-527a85b6.entry.js} +1 -1
  82. package/dist/dso-toolkit/{p-94dffa65.entry.js → p-52f159e7.entry.js} +1 -1
  83. package/dist/dso-toolkit/{p-dc86d830.entry.js → p-58f5e092.entry.js} +1 -1
  84. package/dist/dso-toolkit/p-5e5fbd41.js +5 -0
  85. package/dist/dso-toolkit/{p-f0b67246.entry.js → p-639228f6.entry.js} +1 -1
  86. package/dist/dso-toolkit/{p-951f5872.entry.js → p-6a8452bd.entry.js} +1 -1
  87. package/dist/dso-toolkit/{p-4e573fc5.entry.js → p-98ef5f8c.entry.js} +1 -1
  88. package/dist/dso-toolkit/{p-94b79e43.entry.js → p-a1c9bb35.entry.js} +1 -1
  89. package/dist/dso-toolkit/{p-3c4dbd89.entry.js → p-a5008a4e.entry.js} +1 -1
  90. package/dist/dso-toolkit/{p-c95108fe.entry.js → p-a59dcbb0.entry.js} +1 -1
  91. package/dist/dso-toolkit/p-b06c275a.entry.js +1 -0
  92. package/dist/dso-toolkit/p-b4222d6e.entry.js +1 -0
  93. package/dist/dso-toolkit/{p-dad72605.js → p-b9eb3491.js} +1 -1
  94. package/dist/dso-toolkit/p-bec38cf5.entry.js +1 -0
  95. package/dist/dso-toolkit/{p-ad2210ad.entry.js → p-d0d3ca99.entry.js} +1 -1
  96. package/dist/dso-toolkit/{p-5037944e.entry.js → p-d72edd80.entry.js} +1 -1
  97. package/dist/dso-toolkit/{p-1fefbf8c.entry.js → p-e1934ab6.entry.js} +1 -1
  98. package/dist/esm/dso-alert.entry.js +1 -1
  99. package/dist/esm/dso-attachments-counter.entry.js +1 -1
  100. package/dist/esm/dso-autosuggest.entry.js +2 -2
  101. package/dist/esm/dso-badge.entry.js +1 -1
  102. package/dist/esm/dso-banner.entry.js +1 -1
  103. package/dist/esm/dso-date-picker.entry.js +2 -2
  104. package/dist/esm/dso-dropdown-menu.entry.js +2 -2
  105. package/dist/esm/dso-header.entry.js +16 -7
  106. package/dist/esm/dso-helpcenter-panel.entry.js +1 -1
  107. package/dist/esm/dso-highlight-box.entry.js +1 -1
  108. package/dist/esm/dso-icon.entry.js +1 -1
  109. package/dist/esm/dso-image-overlay.entry.js +4 -4
  110. package/dist/esm/dso-info-button.entry.js +1 -1
  111. package/dist/esm/dso-info_2.entry.js +2 -2
  112. package/dist/esm/dso-label.entry.js +1 -1
  113. package/dist/esm/dso-map-base-layers.entry.js +1 -1
  114. package/dist/esm/dso-map-controls.entry.js +22 -19
  115. package/dist/esm/dso-map-overlays.entry.js +1 -1
  116. package/dist/esm/dso-ozon-content.entry.js +36 -24
  117. package/dist/esm/dso-progress-bar.entry.js +1 -1
  118. package/dist/esm/dso-progress-indicator.entry.js +1 -1
  119. package/dist/esm/dso-toggletip.entry.js +1 -1
  120. package/dist/esm/dso-toolkit.js +2 -2
  121. package/dist/esm/dso-tooltip.entry.js +8 -4
  122. package/dist/esm/dso-tree-view.entry.js +9 -9
  123. package/dist/esm/dso-viewer-grid.entry.js +4 -4
  124. package/dist/esm/{focus-trap.esm-299989f2.js → focus-trap.esm-a01ad6c9.js} +102 -68
  125. package/dist/esm/{index-d54cae76.js → index-9ec8c07f.js} +73 -64
  126. package/dist/esm/index.esm-45465af7.js +422 -0
  127. package/dist/esm/loader.js +2 -2
  128. package/dist/types/components/header/header.d.ts +7 -1
  129. package/dist/types/components/header/header.template.d.ts +1 -1
  130. package/dist/types/components/ozon-content/get-node-name.function.d.ts +1 -0
  131. package/dist/types/components/ozon-content/nodes/noot.node.d.ts +2 -2
  132. package/dist/types/components/ozon-content/ozon-content-mapper.d.ts +0 -1
  133. package/dist/types/components/ozon-content/ozon-content-node-context.interface.d.ts +0 -1
  134. package/dist/types/components/ozon-content/ozon-content-node.interface.d.ts +0 -1
  135. package/dist/types/components/ozon-content/ozon-content.d.ts +0 -1
  136. package/dist/types/components.d.ts +3 -2
  137. package/dist/types/icon/dso-icon-sass-function.d.ts +1 -1
  138. package/package.json +28 -26
  139. package/dist/cjs/index.esm-2ac7081c.js +0 -267
  140. package/dist/dso-toolkit/p-44905fb1.js +0 -5
  141. package/dist/dso-toolkit/p-88bc5873.entry.js +0 -1
  142. package/dist/dso-toolkit/p-8b6e3abc.entry.js +0 -1
  143. package/dist/dso-toolkit/p-8bf3a60e.js +0 -5
  144. package/dist/dso-toolkit/p-a7306b7b.entry.js +0 -1
  145. package/dist/dso-toolkit/p-daa1e29d.entry.js +0 -1
  146. package/dist/dso-toolkit/p-f193c258.entry.js +0 -1
  147. package/dist/esm/index.esm-a1362957.js +0 -262
@@ -1,6 +1,6 @@
1
1
  import { html } from "lit-html";
2
- import { ifDefined } from "lit-html/directives/if-defined";
3
- export function headerTemplate({ logo, subLogo, mainMenu, useDropDownMenu, showSubLogo, loginUrl, logoutUrl, isLoggedIn, showLoggedIn, userProfileUrl, userProfileName, userHomeUrl, }) {
2
+ import { ifDefined } from "lit-html/directives/if-defined.js";
3
+ export function headerTemplate({ logo, subLogo, mainMenu, useDropDownMenu, showSubLogo, loginUrl, logoutUrl, isLoggedIn, showLoggedIn, userProfileUrl, userProfileName, userHomeUrl, menuItemClick, }) {
4
4
  const bindLoginUrl = showLoggedIn && loginUrl ? loginUrl : undefined;
5
5
  const bindLogoutUrl = showLoggedIn && logoutUrl ? logoutUrl : undefined;
6
6
  return showSubLogo
@@ -13,6 +13,7 @@ export function headerTemplate({ logo, subLogo, mainMenu, useDropDownMenu, showS
13
13
  user-profile-url=${ifDefined(userProfileUrl)}
14
14
  user-profile-name=${ifDefined(userProfileName)}
15
15
  user-home-url=${ifDefined(userHomeUrl)}
16
+ @menuItemClick=${menuItemClick}
16
17
  >
17
18
  <div slot="logo"><img height="40" alt="Omgevingsloket" src="${logo}" /></div>
18
19
  <div slot="sub-logo"><img alt="Regels op de kaart" src="${subLogo}" /></div></div>
@@ -26,6 +27,7 @@ export function headerTemplate({ logo, subLogo, mainMenu, useDropDownMenu, showS
26
27
  user-profile-url=${ifDefined(userProfileUrl)}
27
28
  user-profile-name=${ifDefined(userProfileName)}
28
29
  user-home-url=${ifDefined(userHomeUrl)}
30
+ @menuItemClick=${menuItemClick}
29
31
  >
30
32
  <div slot="logo"><img alt="Omgevingsloket" src="${logo}" /></div>
31
33
  </dso-header>`;
@@ -1,6 +1,6 @@
1
1
  import { html } from "lit-html";
2
- import { ifDefined } from "lit-html/directives/if-defined";
3
- import { unsafeHTML } from "lit-html/directives/unsafe-html";
2
+ import { ifDefined } from "lit-html/directives/if-defined.js";
3
+ import { unsafeHTML } from "lit-html/directives/unsafe-html.js";
4
4
  export function helpcenterPanelTemplate({ label, url, content, }) {
5
5
  return html `
6
6
  ${unsafeHTML(content)}
@@ -1,6 +1,6 @@
1
1
  import { html } from 'lit-html';
2
- import { ifDefined } from 'lit-html/directives/if-defined';
3
- import { unsafeHTML } from 'lit-html/directives/unsafe-html';
2
+ import { ifDefined } from 'lit-html/directives/if-defined.js';
3
+ import { unsafeHTML } from 'lit-html/directives/unsafe-html.js';
4
4
  import { iconTemplate } from '../icon/icon.template';
5
5
  export function highlightBoxTemplate({ yellow, white, dropShadow, border, step, icon, richContent }) {
6
6
  return html `
@@ -1,5 +1,5 @@
1
1
  import { html } from 'lit-html';
2
- import { ifDefined } from 'lit-html/directives/if-defined';
2
+ import { ifDefined } from 'lit-html/directives/if-defined.js';
3
3
  export function iconTemplate({ icon }, slot) {
4
4
  return html `
5
5
  <dso-icon
@@ -138,7 +138,7 @@ button::-moz-focus-inner {
138
138
  left: 0;
139
139
  right: 0;
140
140
  bottom: 0;
141
- z-index: 1;
141
+ z-index: 19;
142
142
  display: flex;
143
143
  padding: 32px;
144
144
  background-color: rgba(255, 255, 255, 0.8);
@@ -1,6 +1,6 @@
1
1
  import { html, nothing } from 'lit-html';
2
- import { ifDefined } from 'lit-html/directives/if-defined';
3
- import { unsafeHTML } from 'lit-html/directives/unsafe-html';
2
+ import { ifDefined } from 'lit-html/directives/if-defined.js';
3
+ import { unsafeHTML } from 'lit-html/directives/unsafe-html.js';
4
4
  export function labelTemplate({ status, label, button, compact, symbol }) {
5
5
  return html `
6
6
  <dso-label
@@ -1,7 +1,7 @@
1
1
  // Keep in sync with packages\css\src\components\list\list.template.ts (https://github.com/dso-toolkit/dso-toolkit/issues/1438)
2
2
  import { Type } from '@dso-toolkit/sources';
3
3
  import { html } from 'lit-html';
4
- import { classMap } from 'lit-html/directives/class-map';
4
+ import { classMap } from 'lit-html/directives/class-map.js';
5
5
  function ul(children, modifier) {
6
6
  return html `
7
7
  <ul class="${classMap({
@@ -1,41 +1,39 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
2
- if (!privateMap.has(receiver)) {
3
- throw new TypeError("attempted to get private field on non-instance");
4
- }
5
- return privateMap.get(receiver);
1
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
6
5
  };
7
- var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
8
- if (!privateMap.has(receiver)) {
9
- throw new TypeError("attempted to set private field on non-instance");
10
- }
11
- privateMap.set(receiver, value);
12
- return value;
6
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7
+ if (kind === "m") throw new TypeError("Private method is not writable");
8
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
9
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
10
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
13
11
  };
14
- var _closeButtonElement, _toggleButtonElement;
12
+ var _MapControls_closeButtonElement, _MapControls_toggleButtonElement;
15
13
  import { Component, h, Host, Prop, Event, State, Watch } from '@stencil/core';
16
14
  const transitionDuration = 300; // Sync with $transition-duration in ./map-controls.scss
17
15
  export class MapControls {
18
16
  constructor() {
19
17
  this.open = false;
20
18
  this.hideContent = !this.open;
21
- _closeButtonElement.set(this, void 0);
22
- _toggleButtonElement.set(this, void 0);
19
+ _MapControls_closeButtonElement.set(this, void 0);
20
+ _MapControls_toggleButtonElement.set(this, void 0);
23
21
  }
24
22
  watchOpen(open) {
25
23
  if (open) {
26
24
  this.hideContent = false;
27
- setTimeout(() => __classPrivateFieldGet(this, _closeButtonElement).focus(), transitionDuration);
25
+ setTimeout(() => __classPrivateFieldGet(this, _MapControls_closeButtonElement, "f").focus(), transitionDuration);
28
26
  }
29
27
  else {
30
28
  setTimeout(() => {
31
29
  this.hideContent = true;
32
- __classPrivateFieldGet(this, _toggleButtonElement).focus();
30
+ __classPrivateFieldGet(this, _MapControls_toggleButtonElement, "f").focus();
33
31
  }, transitionDuration);
34
32
  }
35
33
  }
36
34
  render() {
37
35
  return (h(Host, null,
38
- h("button", { type: "button", id: "toggle-visibility-button", onClick: () => this.open = !this.open, ref: element => __classPrivateFieldSet(this, _toggleButtonElement, element) },
36
+ h("button", { type: "button", id: "toggle-visibility-button", onClick: () => this.open = !this.open, ref: element => __classPrivateFieldSet(this, _MapControls_toggleButtonElement, element, "f") },
39
37
  h("dso-icon", { icon: "layers" }),
40
38
  h("span", null, "Kaartlagen")),
41
39
  h("div", { id: "zoom-buttons" },
@@ -48,7 +46,7 @@ export class MapControls {
48
46
  h("section", { hidden: this.hideContent },
49
47
  h("header", null,
50
48
  h("h2", null, "Kaartlagen"),
51
- h("button", { type: "button", id: "close-button", onClick: () => this.open = false, ref: element => __classPrivateFieldSet(this, _closeButtonElement, element) },
49
+ h("button", { type: "button", id: "close-button", onClick: () => this.open = false, ref: element => __classPrivateFieldSet(this, _MapControls_closeButtonElement, element, "f") },
52
50
  h("span", null, "Sluit dialoog"),
53
51
  h("dso-icon", { icon: "times" }))),
54
52
  h("div", { class: "content" },
@@ -146,4 +144,4 @@ export class MapControls {
146
144
  "methodName": "watchOpen"
147
145
  }]; }
148
146
  }
149
- _closeButtonElement = new WeakMap(), _toggleButtonElement = new WeakMap();
147
+ _MapControls_closeButtonElement = new WeakMap(), _MapControls_toggleButtonElement = new WeakMap();
@@ -0,0 +1,9 @@
1
+ export function getNodeName(node) {
2
+ if (node instanceof Element) {
3
+ return node.localName;
4
+ }
5
+ if (node.nodeName.includes(':')) {
6
+ return node.nodeName.substring(node.nodeName.indexOf(':') + 1);
7
+ }
8
+ return node.nodeName;
9
+ }
@@ -1,10 +1,11 @@
1
1
  import { h } from '@stencil/core';
2
+ import { getNodeName } from '../get-node-name.function';
2
3
  export class OzonContentAlNode {
3
4
  constructor() {
4
5
  this.name = 'Al';
5
6
  }
6
7
  render(node, { mapNodeToJsx, path }) {
7
- const nestedAl = path.some(node => node.nodeName === 'Al');
8
+ const nestedAl = path.some(node => getNodeName(node) === 'Al');
8
9
  const content = mapNodeToJsx(node.childNodes);
9
10
  return nestedAl
10
11
  ? h("span", { role: "paragraph" }, content)
@@ -1,10 +1,11 @@
1
1
  import { h } from '@stencil/core';
2
+ import { getNodeName } from '../get-node-name.function';
2
3
  export class OzonContentFallbackNode {
3
4
  constructor() {
4
5
  // This name does not match any elements
5
6
  this.name = ['<fallback>'];
6
7
  }
7
8
  render(node, { mapNodeToJsx }) {
8
- return (h("span", { class: `fallback od-${node instanceof Element ? node.localName : node.nodeName}` }, mapNodeToJsx(node.childNodes)));
9
+ return (h("span", { class: `fallback od-${getNodeName(node)}` }, mapNodeToJsx(node.childNodes)));
9
10
  }
10
11
  }
@@ -1,27 +1,27 @@
1
1
  import { h, Fragment } from '@stencil/core';
2
+ import { getNodeName } from '../get-node-name.function';
2
3
  export class OzonContentNootNode {
3
4
  constructor() {
4
5
  this.name = 'Noot';
5
6
  this.handles = ['NootNummer'];
6
7
  }
7
- identify(node) {
8
- var _a;
9
- return (_a = node.getAttribute("id")) !== null && _a !== void 0 ? _a : undefined;
8
+ identify() {
9
+ return 'Noot';
10
10
  }
11
- render(node, { mapNodeToJsx, state: noteIsOpen, setState }) {
11
+ render(node, { mapNodeToJsx, state: openNoteId, setState }) {
12
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}`;
13
+ const noteId = node.getAttribute('id');
14
+ if (!noteId) {
15
+ console.error('Noot node without id', node);
16
+ return h(Fragment, null);
17
+ }
18
+ const noteControlsId = `dso-ozon-note-${noteId}`;
16
19
  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
- };
20
+ const nootNummer = (_b = (_a = childNodes.find(n => getNodeName(n) === 'NootNummer')) === null || _a === void 0 ? void 0 : _a.textContent) !== null && _b !== void 0 ? _b : noteId;
22
21
  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'))))));
22
+ h("sup", null,
23
+ h("button", { type: "button", class: "toggle-note", id: noteControlsId, onClick: () => setState === null || setState === void 0 ? void 0 : setState(openNoteId === noteId ? undefined : noteId), onBlur: () => setState === null || setState === void 0 ? void 0 : setState(undefined), "aria-expanded": openNoteId === noteId ? 'true' : 'false' }, nootNummer)),
24
+ h("dso-tooltip", { active: openNoteId === noteId, for: noteControlsId, stateless: true },
25
+ h("span", { role: "section" }, mapNodeToJsx(Array.from(node.querySelectorAll(':scope > Al')))))));
26
26
  }
27
27
  }
@@ -9,6 +9,7 @@ import { OzonContentIntRefNode } from './nodes/int-ref.node';
9
9
  import { OzonContentNootNode } from './nodes/noot.node';
10
10
  import { OzonContentTableNode } from './nodes/table.node';
11
11
  import { OzonContentTextNode } from './nodes/text.node';
12
+ import { getNodeName } from './get-node-name.function';
12
13
  import { OzonContentFallbackNode } from './nodes/fallback.node';
13
14
  export class Mapper {
14
15
  constructor() {
@@ -46,25 +47,28 @@ export class Mapper {
46
47
  })) !== null && _a !== void 0 ? _a : this.fallbackNode;
47
48
  }
48
49
  mapNodeToJsx(node, context, path) {
49
- var _a, _b;
50
+ var _a;
50
51
  if (node instanceof NodeList) {
51
52
  return h(Fragment, null, Array.from(node).map(n => this.mapNodeToJsx(n, context, path)));
52
53
  }
53
54
  if (Array.isArray(node)) {
54
55
  return h(Fragment, null, node.map(n => this.mapNodeToJsx(n, context, path)));
55
56
  }
56
- const nodeName = node instanceof Element ? node.localName : node.nodeName;
57
+ const nodeName = getNodeName(node);
57
58
  const mapper = this.findMapper(nodeName);
58
- const identity = (_a = mapper === null || mapper === void 0 ? void 0 : mapper.identify) === null || _a === void 0 ? void 0 : _a.call(mapper, node);
59
+ if (!mapper) {
60
+ return h(Fragment, null);
61
+ }
62
+ const identity = (_a = mapper.identify) === null || _a === void 0 ? void 0 : _a.call(mapper, node);
59
63
  const state = identity ? context.state[identity] : undefined;
60
64
  const setState = identity ? (state) => context.setState(Object.assign(Object.assign({}, context.state), { [identity]: state })) : undefined;
61
- return (_b = mapper === null || mapper === void 0 ? void 0 : mapper.render(node, {
65
+ return mapper.render(node, {
62
66
  mapNodeToJsx: n => this.mapNodeToJsx(n, context, [...path, node]),
63
67
  emitAnchorClick: context.emitAnchorClick,
64
68
  setState,
65
69
  state,
66
70
  path
67
- })) !== null && _b !== void 0 ? _b : h(Fragment, null);
71
+ });
68
72
  }
69
73
  transform(xml, context) {
70
74
  if (!this.cache || this.cache.xml !== xml) {
@@ -2,43 +2,96 @@
2
2
  display: block;
3
3
  }
4
4
 
5
- .noot {
5
+ button.toggle-note {
6
+ display: inline-block;
7
+ font-size: 1em;
8
+ font-weight: 500;
9
+ margin-bottom: 0;
6
10
  text-decoration: none;
11
+ touch-action: manipulation;
12
+ text-align: left;
13
+ user-select: none;
14
+ vertical-align: middle;
15
+ border: 0;
16
+ color: #39870c;
17
+ line-height: 1;
18
+ padding: 0;
19
+ background-color: transparent;
20
+ }
21
+ button.toggle-note:focus, button.toggle-note:focus-visible {
22
+ outline-offset: 2px;
23
+ }
24
+ button.toggle-note:active {
25
+ outline: 0;
26
+ }
27
+ button.toggle-note.extern::after, button.toggle-note.download::after {
28
+ content: "";
29
+ display: inline-block;
30
+ height: 1.5em;
31
+ margin-left: 8px;
32
+ vertical-align: top;
33
+ width: 1.5em;
7
34
  }
8
- .noot:not(.dso-open) + * {
9
- display: none;
35
+ button.toggle-note[disabled] {
36
+ color: #afcf9d;
10
37
  }
11
- .noot.dso-open + * {
12
- display: block;
38
+ button.toggle-note:not([disabled]):hover {
39
+ color: #676cb0;
40
+ text-decoration: underline;
41
+ }
42
+ button.toggle-note:not([disabled]):active {
43
+ color: #676cb0;
13
44
  }
14
- .noot + * {
15
- margin: 4px 0;
16
- padding: 8px 32px 8px 8px;
45
+ button.toggle-note.btn-align {
46
+ line-height: calc(1.5em - 1px);
47
+ padding: 11px 0;
17
48
  position: relative;
18
49
  }
19
- .noot + * > a {
20
- display: block;
21
- height: 24px;
22
- position: absolute;
23
- right: 0;
24
- text-align: center;
25
- top: 0;
26
- width: 24px;
27
- }
28
- .noot + * > a::before {
29
- background: var(--dso-icon, var(--di-times-zwart)) no-repeat;
50
+ button.toggle-note.extern::after, button.toggle-note.download::after {
51
+ position: relative;
52
+ top: -2px;
53
+ }
54
+ button.toggle-note.download::after {
55
+ background: var(--dso-icon, var(--di-download)) no-repeat;
30
56
  background-position: center;
31
57
  background-size: cover;
32
58
  height: 1.5em;
33
59
  vertical-align: top;
34
60
  width: 1.5em;
35
- content: "";
36
- display: block;
37
61
  }
38
- .noot + * {
39
- background-color: #ebf3e6;
62
+ button.toggle-note.download[disabled]::after {
63
+ --dso-icon: var(--di-download-grasgroen-40);
64
+ }
65
+ button.toggle-note.download:not([disabled]):hover::after, button.toggle-note.download:not([disabled]):active::after {
66
+ --dso-icon: var(--di-download-scampi);
67
+ }
68
+ button.toggle-note.extern::after {
69
+ background: var(--dso-icon, var(--di-external-link)) no-repeat;
70
+ background-position: center;
71
+ background-size: cover;
72
+ height: 1.5em;
73
+ vertical-align: top;
74
+ width: 1.5em;
75
+ }
76
+ button.toggle-note.extern[disabled]::after {
77
+ --dso-icon: var(--di-external-link-grasgroen-40);
78
+ }
79
+ button.toggle-note.extern:not([disabled]):hover::after, button.toggle-note.extern:not([disabled]):active::after {
80
+ --dso-icon: var(--di-external-link-scampi);
81
+ }
82
+ button.toggle-note dso-icon + span:not(.sr-only),
83
+ button.toggle-note svg.di + span:not(.sr-only),
84
+ button.toggle-note span:not(.sr-only) + dso-icon,
85
+ button.toggle-note span:not(.sr-only) + svg.di {
86
+ margin-left: 8px;
87
+ }
88
+ button.toggle-note dso-icon,
89
+ button.toggle-note svg.di,
90
+ button.toggle-note span {
91
+ vertical-align: middle;
40
92
  }
41
93
 
94
+ span[role=section],
42
95
  span[role=paragraph] {
43
96
  display: block;
44
97
  }
@@ -1,5 +1,5 @@
1
1
  import { html, nothing } from 'lit-html';
2
- import { ifDefined } from 'lit-html/directives/if-defined';
2
+ import { ifDefined } from 'lit-html/directives/if-defined.js';
3
3
  export function progressBarTemplate({ progress, label, min, max }) {
4
4
  return html `
5
5
  <dso-progress-bar
@@ -1,5 +1,5 @@
1
1
  import { html } from 'lit-html';
2
- import { ifDefined } from 'lit-html/directives/if-defined';
2
+ import { ifDefined } from 'lit-html/directives/if-defined.js';
3
3
  export function progressIndicatorTemplate({ label, block, size }) {
4
4
  return html `
5
5
  <dso-progress-indicator
@@ -32,9 +32,15 @@
32
32
  position: absolute;
33
33
  top: 0;
34
34
  width: 24px;
35
- z-index: 1;
35
+ z-index: 100;
36
36
  zoom: 1;
37
37
  }
38
+ @media (prefers-contrast: more) {
39
+ :host input[type=checkbox],
40
+ :host input[type=radio] {
41
+ opacity: 1;
42
+ }
43
+ }
38
44
  :host input[type=checkbox]:not([disabled]),
39
45
  :host input[type=radio]:not([disabled]) {
40
46
  cursor: pointer;
@@ -1,5 +1,5 @@
1
1
  import { html, nothing } from 'lit-html';
2
- import { ifDefined } from 'lit-html/directives/if-defined';
2
+ import { ifDefined } from 'lit-html/directives/if-defined.js';
3
3
  export function selectableTemplate({ type, id, name, label, value, required, invalid, describedById, checked, indeterminate, disabled, onChange, info }) {
4
4
  var _a;
5
5
  return html `
@@ -1,6 +1,6 @@
1
1
  import { html } from "lit-html";
2
- import { ifDefined } from "lit-html/directives/if-defined";
3
- import { unsafeHTML } from "lit-html/directives/unsafe-html";
2
+ import { ifDefined } from "lit-html/directives/if-defined.js";
3
+ import { unsafeHTML } from "lit-html/directives/unsafe-html.js";
4
4
  export function toggletipTemplate({ children, label, position, small, secondary, }) {
5
5
  return html `<dso-toggletip
6
6
  label=${ifDefined(label)}
@@ -49,7 +49,7 @@
49
49
  opacity: 0;
50
50
  position: absolute;
51
51
  transition: opacity 0.15s linear;
52
- z-index: 1070;
52
+ z-index: 410;
53
53
  }
54
54
  .tooltip.in {
55
55
  opacity: 1;
@@ -1,5 +1,5 @@
1
1
  import { html } from 'lit-html';
2
- import { ifDefined } from 'lit-html/directives/if-defined';
2
+ import { ifDefined } from 'lit-html/directives/if-defined.js';
3
3
  export function tooltipTemplate({ active, position, label, id }) {
4
4
  return html `<dso-tooltip position=${position} for=${ifDefined(id)} ?active=${active}>
5
5
  ${label}
@@ -1,21 +1,21 @@
1
1
  import { h, Fragment } from '@stencil/core';
2
2
  import clsx from 'clsx';
3
3
  export const DsoTreeItem = ({ owner, ancestors, item, index, level, setSize }) => {
4
- var _a, _b, _c;
5
- return (h("li", { key: item.id, class: clsx('tree-item', { 'has-child': item.hasItems }), role: 'none' },
4
+ var _a, _b, _c, _d;
5
+ return (h("li", { key: item.id, class: clsx('tree-item', { 'has-child': item.hasItems, 'is-expanded': (!!item.open && !!((_a = item.items) === null || _a === void 0 ? void 0 : _a.length)) }), role: 'none' },
6
6
  h("div", { class: "tree-branch-control" }, item.hasItems
7
7
  ?
8
8
  h("div", { onClick: (e) => owner.itemClick(e, ancestors, item) },
9
- h("dso-icon", { icon: item.open ? 'chevron-down' : 'chevron-right' }))
9
+ h("dso-icon", { icon: item.open ? 'minus-square' : 'plus-square' }))
10
10
  : h("dso-icon", null)),
11
- h("p", { class: clsx('tree-content', { 'active': item.active }, { 'selected': item.selected }), tabindex: level === 1 && index === 0 ? 0 : -1, role: "treeitem", "aria-expanded": item.hasItems ? '' + (!!item.open && !!((_a = item.items) === null || _a === void 0 ? void 0 : _a.length)) : undefined, "aria-current": item.active ? 'true' : undefined, "aria-level": level, "aria-setsize": setSize, "aria-posinset": index + 1, "aria-busy": item.loading ? 'true' : undefined, onClick: (e) => owner.itemClick(e, ancestors, item) },
11
+ h("p", { class: clsx('tree-content', { 'active': item.active }, { 'selected': item.selected }), tabindex: level === 1 && index === 0 ? 0 : -1, role: "treeitem", "aria-expanded": item.hasItems ? '' + (!!item.open && !!((_b = item.items) === null || _b === void 0 ? void 0 : _b.length)) : undefined, "aria-current": item.active ? 'true' : undefined, "aria-level": level, "aria-setsize": setSize, "aria-posinset": index + 1, "aria-busy": item.loading ? 'true' : undefined, onClick: (e) => owner.itemClick(e, ancestors, item) },
12
12
  item.selected && h("span", { class: "sr-only" }, "Resultaat: "),
13
13
  item.href
14
14
  ? h("a", { href: item.href, tabindex: "-1" }, item.label)
15
- : h("span", null, item.label), (_b = item.icons) === null || _b === void 0 ? void 0 :
16
- _b.map((icon) => h("dso-icon", { icon: icon.icon, title: icon.label }))),
15
+ : h("span", null, item.label), (_c = item.icons) === null || _c === void 0 ? void 0 :
16
+ _c.map((icon) => h("dso-icon", { icon: icon.icon, title: icon.label }))),
17
17
  item.open &&
18
18
  h(Fragment, null, item.hasItems && !item.items && item.loading
19
19
  ? h("dso-progress-indicator", { size: "small", label: "Resultaten laden: een moment geduld alstublieft." })
20
- : h("ul", { role: "group" }, (_c = item.items) === null || _c === void 0 ? void 0 : _c.map((childItem, index, org) => h(DsoTreeItem, { owner: owner, ancestors: [...ancestors, item], item: childItem, index: index, level: level + 1, setSize: org.length }))))));
20
+ : h("ul", { role: "group" }, (_d = item.items) === null || _d === void 0 ? void 0 : _d.map((childItem, index, org) => h(DsoTreeItem, { owner: owner, ancestors: [...ancestors, item], item: childItem, index: index, level: level + 1, setSize: org.length }))))));
21
21
  };
@@ -1,31 +1,97 @@
1
1
  :host ul {
2
2
  list-style-type: none;
3
+ padding-inline-start: 32px;
4
+ position: relative;
5
+ }
6
+ :host li {
7
+ position: relative;
3
8
  }
4
9
  :host ul[role=tree] {
5
10
  padding-left: 0;
6
11
  }
7
- :host li[role=treeitem] > ul {
8
- padding-left: 1.5em;
12
+ :host ul[role=group]::before {
13
+ border-left: 1px solid #275937;
14
+ content: "";
15
+ height: 8px;
16
+ left: 44px;
17
+ position: absolute;
18
+ top: 0;
19
+ width: 0;
20
+ }
21
+ :host li:not(.has-child)::before {
22
+ border-top: 1px solid #275937;
23
+ content: "";
24
+ height: 0;
25
+ left: 12px;
26
+ position: absolute;
27
+ top: 20px;
28
+ width: 16px;
29
+ }
30
+ :host li:not(.has-child)::after {
31
+ border-left: 1px solid #275937;
32
+ content: "";
33
+ height: 100%;
34
+ left: 12px;
35
+ position: absolute;
36
+ top: 8px;
37
+ width: 0;
38
+ }
39
+ :host li:not(.has-child):last-child::after {
40
+ height: 20px;
41
+ top: 0;
42
+ }
43
+ :host li.has-child::before {
44
+ border-top: 1px solid #275937;
45
+ content: "";
46
+ height: 0;
47
+ left: 24px;
48
+ position: absolute;
49
+ top: 20px;
50
+ width: 4px;
51
+ }
52
+ :host li.has-child:not(:last-child)::after {
53
+ border-left: 1px solid #275937;
54
+ content: "";
55
+ height: calc(100% - 24px);
56
+ left: 12px;
57
+ position: absolute;
58
+ top: 32px;
59
+ width: 0;
60
+ }
61
+ :host li.has-child.is-expanded:last-child::after {
62
+ border-left: 1px solid #275937;
63
+ content: "";
64
+ height: calc(100% - 32px);
65
+ left: 12px;
66
+ position: absolute;
67
+ top: 32px;
68
+ width: 0;
9
69
  }
10
70
  :host .tree-branch-control {
11
- cursor: pointer;
71
+ color: #39870c;
12
72
  display: inline-block;
13
- margin: 8px 0;
73
+ font-size: 16px;
74
+ margin: 8px 8px 8px 0;
14
75
  vertical-align: top;
15
76
  }
77
+ :host .tree-branch-control > div {
78
+ cursor: pointer;
79
+ }
16
80
  :host .tree-content {
17
81
  cursor: pointer;
18
82
  display: inline-block;
19
83
  margin: 8px 0;
20
- width: calc(100% - 24px);
84
+ max-width: calc(100% - 40px);
21
85
  }
22
- :host .tree-content.active {
23
- font-weight: 700;
24
- }
25
- :host .tree-content.active:hover {
86
+ :host .tree-content a {
87
+ color: #191919;
26
88
  text-decoration: underline;
27
89
  }
28
- :host .tree-content.active a {
90
+ :host .tree-content a:hover, :host .tree-content a:focus {
91
+ color: #191919;
92
+ text-decoration: none;
93
+ }
94
+ :host .tree-content a:active {
29
95
  text-decoration: none;
30
96
  }
31
97
  :host .tree-content.selected {
@@ -36,18 +102,23 @@
36
102
  :host .tree-content.selected:hover, :host .tree-content.selected:focus {
37
103
  text-decoration: none;
38
104
  }
39
- :host .tree-content a, :host .tree-content a:visited {
40
- color: #191919;
105
+ :host .tree-content.active {
106
+ color: #8b4a6a;
107
+ font-style: italic;
108
+ font-weight: 700;
41
109
  text-decoration: underline;
42
110
  }
43
- :host .tree-content a:hover, :host .tree-content a:focus {
44
- color: #191919;
111
+ :host .tree-content.active:hover, :host .tree-content.active:focus {
45
112
  text-decoration: none;
46
113
  }
47
- :host .tree-content a:active {
114
+ :host .tree-content.active a {
115
+ color: #8b4a6a;
116
+ }
117
+ :host .tree-content.active a:hover, :host .tree-content.active a:focus {
48
118
  text-decoration: none;
49
119
  }
50
120
  :host .tree-content dso-icon {
121
+ color: #39870c;
51
122
  font-size: 0.75em;
52
123
  margin-left: 0.5em;
53
124
  vertical-align: text-bottom;