@dso-toolkit/core 31.1.1 → 33.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 (63) hide show
  1. package/dist/cjs/dso-date-picker.cjs.entry.js +1 -1
  2. package/dist/cjs/dso-dropdown-menu.cjs.entry.js +4 -1
  3. package/dist/cjs/dso-helpcenter-panel.cjs.entry.js +44 -0
  4. package/dist/cjs/dso-highlight-box.cjs.entry.js +1 -1
  5. package/dist/cjs/dso-icon.cjs.entry.js +29 -5
  6. package/dist/cjs/dso-info_2.cjs.entry.js +1 -1
  7. package/dist/cjs/dso-ozon-content.cjs.entry.js +47 -10
  8. package/dist/cjs/dso-toggletip.cjs.entry.js +2 -1
  9. package/dist/cjs/dso-toolkit.cjs.js +1 -1
  10. package/dist/cjs/dso-tree-view.cjs.entry.js +5 -4
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/collection/collection-manifest.json +1 -0
  13. package/dist/collection/components/date-picker/date-picker.css +0 -3
  14. package/dist/collection/components/dropdown-menu/dropdown-menu.css +4 -0
  15. package/dist/collection/components/dropdown-menu/dropdown-menu.js +3 -0
  16. package/dist/collection/components/helpcenter-panel/helpcenter-panel.css +312 -0
  17. package/dist/collection/components/helpcenter-panel/helpcenter-panel.js +92 -0
  18. package/dist/collection/components/helpcenter-panel/helpcenter-panel.template.js +13 -0
  19. package/dist/collection/components/highlight-box/highlight-box.css +1 -1
  20. package/dist/collection/components/icon/icon.js +8 -0
  21. package/dist/collection/components/info/info.css +4 -4
  22. package/dist/collection/components/toggletip/toggletip.css +4 -0
  23. package/dist/collection/components/toggletip/toggletip.js +1 -0
  24. package/dist/collection/components/tree-view/tree-item.js +3 -2
  25. package/dist/collection/components/tree-view/tree-view.css +33 -5
  26. package/dist/collection/components/tree-view/tree-view.js +11 -11
  27. package/dist/custom-elements/index.d.ts +6 -0
  28. package/dist/custom-elements/index.js +132 -25
  29. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  30. package/dist/dso-toolkit/p-741e96de.entry.js +5 -0
  31. package/dist/dso-toolkit/p-75233655.entry.js +1 -0
  32. package/dist/dso-toolkit/{p-e2dc97c4.entry.js → p-984551a8.entry.js} +1 -1
  33. package/dist/dso-toolkit/p-a52d3623.entry.js +1 -0
  34. package/dist/dso-toolkit/p-affe82e6.entry.js +1 -0
  35. package/dist/dso-toolkit/p-b07991b9.entry.js +1 -0
  36. package/dist/dso-toolkit/{p-ae6209c6.entry.js → p-be5682cc.entry.js} +1 -1
  37. package/dist/dso-toolkit/{p-9735f393.entry.js → p-e03d7741.entry.js} +1 -1
  38. package/dist/dso-toolkit/p-e814d644.entry.js +1 -0
  39. package/dist/esm/dso-date-picker.entry.js +1 -1
  40. package/dist/esm/dso-dropdown-menu.entry.js +4 -1
  41. package/dist/esm/dso-helpcenter-panel.entry.js +40 -0
  42. package/dist/esm/dso-highlight-box.entry.js +1 -1
  43. package/dist/esm/dso-icon.entry.js +29 -5
  44. package/dist/esm/dso-info_2.entry.js +1 -1
  45. package/dist/esm/dso-ozon-content.entry.js +47 -10
  46. package/dist/esm/dso-toggletip.entry.js +2 -1
  47. package/dist/esm/dso-toolkit.js +1 -1
  48. package/dist/esm/dso-tree-view.entry.js +5 -4
  49. package/dist/esm/loader.js +1 -1
  50. package/dist/types/components/dropdown-menu/dropdown-menu.d.ts +1 -0
  51. package/dist/types/components/helpcenter-panel/helpcenter-panel.d.ts +11 -0
  52. package/dist/types/components/helpcenter-panel/helpcenter-panel.template.d.ts +2 -0
  53. package/dist/types/components/tree-view/tree-item.d.ts +4 -4
  54. package/dist/types/components/tree-view/tree-view.d.ts +12 -9
  55. package/dist/types/components/tree-view/tree-view.interfaces.d.ts +14 -4
  56. package/dist/types/components/tree-view/tree-view.template.d.ts +1 -1
  57. package/dist/types/components.d.ts +24 -7
  58. package/package.json +1 -1
  59. package/dist/dso-toolkit/p-12f7e7d7.entry.js +0 -5
  60. package/dist/dso-toolkit/p-5a67f3f7.entry.js +0 -1
  61. package/dist/dso-toolkit/p-a8a0e909.entry.js +0 -1
  62. package/dist/dso-toolkit/p-ad8f467f.entry.js +0 -1
  63. package/dist/dso-toolkit/p-faf19a1d.entry.js +0 -1
@@ -45,6 +45,11 @@ const calendar = `<svg id="calendar" xmlns="http://www.w3.org/2000/svg" viewBox=
45
45
  </svg>
46
46
  `;
47
47
 
48
+ const call = `<svg id="call" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
49
+ <path fill="currentColor" d="M23,17.86V22a1,1,0,0,1-1,1A22,22,0,0,1,1,2,1,1,0,0,1,2,1H6a1,1,0,0,1,1,.84L8.26,7A1,1,0,0,1,8,7.88L5.42,10.57a20.11,20.11,0,0,0,8,8L16.12,16a1,1,0,0,1,.87-.28l5.17,1.14A1,1,0,0,1,23,17.86Z"/>
50
+ </svg>
51
+ `;
52
+
48
53
  const caretDown = `<svg id="caret-down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
49
54
  <path fill="currentColor" d="M19.71,10,13.08,16.6a1.35,1.35,0,0,1-1.9,0L4.3,9.93C3.77,9.42,4,9,4.71,9H19.28C20,9,20.23,9.43,19.71,10Z"/>
50
55
  </svg>
@@ -55,6 +60,11 @@ const check = `<svg id="check" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2
55
60
  </svg>
56
61
  `;
57
62
 
63
+ const checkCircle = `<svg id="check-circle" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
64
+ <path fill="currentColor" d="M10.11,18,5.29,13.31A.92.92,0,0,1,5.3,12a1,1,0,0,1,1.41,0l3.4,3.3,7.18-7a1,1,0,0,1,1.41,0,.92.92,0,0,1,0,1.35ZM12,3a9,9,0,1,0,9,9,9,9,0,0,0-9-9m0-2A11,11,0,1,1,1,12,11,11,0,0,1,12,1ZM10.11,18,5.29,13.31A.92.92,0,0,1,5.3,12a1,1,0,0,1,1.41,0l3.4,3.3,7.18-7a1,1,0,0,1,1.41,0,.92.92,0,0,1,0,1.35Z"/>
65
+ </svg>
66
+ `;
67
+
58
68
  const chevronDown = `<svg id="chevron-down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
59
69
  <path fill="currentColor" d="M12,16,5.29,9.63a.93.93,0,0,1,0-1.35,1,1,0,0,1,1.42,0l5.29,5,5.29-5a1,1,0,0,1,1.42,0,.91.91,0,0,1,0,1.34Z"/>
60
70
  </svg>
@@ -99,6 +109,11 @@ const cultural = `<svg id="cultural" xmlns="http://www.w3.org/2000/svg" viewBox=
99
109
  <path fill="currentColor" d="M6,18H4V10H6Zm4-8H8v8h2Zm6,0H14v8h2Zm4,0H18v8h2Zm1,11V19H3v2H1v2H23V21Zm.09-12H2.92c-1,0-1.21-.45-.53-1l8.2-6.6a2.12,2.12,0,0,1,2.49,0L21.6,8C22.29,8.56,22.06,9,21.09,9ZM14,6a2,2,0,1,0-2,2A2,2,0,0,0,14,6Z"/>
100
110
  </svg>`;
101
111
 
112
+ const document = `<svg id="document" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
113
+ <path fill="currentColor" d="M14.11,1H5A2,2,0,0,0,3,3V21a2,2,0,0,0,2,2H19a2,2,0,0,0,2-2V7.89ZM19,21H5V3h8V9h6Zm-2-2H7V17H17Zm0-4H7V13H17Z"/>
114
+ </svg>
115
+ `;
116
+
102
117
  const download = `<svg id="download" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
103
118
  <path fill="currentColor" d="M18.72,10.44,12,17l-6.7-6.52C4.8,10,5,9.63,5.63,9.63H8.5V1.82A.8.8,0,0,1,9.28,1h5.44a.8.8,0,0,1,.78.82V9.61h2.87C19,9.6,19.2,10,18.72,10.44ZM1,17v6H23V17Zm16,3a2,2,0,1,1-2-2A2,2,0,0,1,17,20Zm5,0a2,2,0,1,1-2-2A2,2,0,0,1,22,20Z"/>
104
119
  </svg>
@@ -144,10 +159,7 @@ const filter = `<svg id="filter" xmlns="http://www.w3.org/2000/svg" viewBox="0 0
144
159
  `;
145
160
 
146
161
  const forbidden = `<svg id="forbidden" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
147
- <g>
148
- <path d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm8.25,11a8.19,8.19,0,0,1-1.53,4.77L7.23,5.28a8.24,8.24,0,0,1,13,6.72ZM3.75,12A8.19,8.19,0,0,1,5.28,7.23L16.77,18.72A8.24,8.24,0,0,1,3.75,12Z" style="fill: #ce3f51"/>
149
- <path d="M12,1A11,11,0,1,1,1,12,11,11,0,0,1,12,1m6.72,15.77A8.24,8.24,0,0,0,7.23,5.28L18.72,16.77M12,20.25a8.19,8.19,0,0,0,4.77-1.53L5.28,7.23a8.24,8.24,0,0,0,6.72,13M12,0A12,12,0,1,0,24,12,12,12,0,0,0,12,0ZM8.84,5.48A7.18,7.18,0,0,1,12,4.75,7.26,7.26,0,0,1,19.25,12a7.18,7.18,0,0,1-.73,3.16L8.84,5.48ZM12,19.25A7.26,7.26,0,0,1,4.75,12a7.18,7.18,0,0,1,.73-3.16l9.68,9.68a7.18,7.18,0,0,1-3.16.73Z" style="fill: #fff"/>
150
- </g>
162
+ <path fill="currentColor" d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1ZM3,12A9,9,0,0,1,5,6.39L17.61,19A8.91,8.91,0,0,1,12,21,9,9,0,0,1,3,12Zm16,5.61L6.39,5A9,9,0,0,1,19,17.61Z"/>
151
163
  </svg>
152
164
  `;
153
165
 
@@ -270,7 +282,7 @@ const more = `<svg id="more" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24
270
282
  `;
271
283
 
272
284
  const municipality = `<svg id="municipality" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
273
- <path fill="currentColor" d="M22.92,16a.26.26,0,0,1,0,.33h-.67v5.5a.21.21,0,0,1-.21.21H13.92a.21.21,0,0,1-.21-.21V16.28H13a.26.26,0,0,1,0-.33l1.19-1H8.92a.21.21,0,0,1-.21-.21V9.28H8a.26.26,0,0,1,0-.33L13,5a.24.24,0,0,1,.26,0L17.92,9a.26.26,0,0,1,0,.33h-.67v3.29L18,12a.24.24,0,0,1,.26,0L20,13.52V12.21a2.35,2.35,0,0,1-2-2.44C18,6.36,19.67,4,20.5,4S23,6.36,23,9.77a2.35,2.35,0,0,1-2,2.44v2.15Zm-12,1L6.22,13A.21.21,0,0,0,6,13L1.08,17a.26.26,0,0,0,0,.33h.67v5.51a.21.21,0,0,0,.21.21h8.16a.21.21,0,0,0,.21-.21v-5.5H11A.25.25,0,0,0,10.92,17ZM3,12.41c0,.79,4,.79,4,0A1.4,1.4,0,0,0,6,11.2v-2A2.35,2.35,0,0,0,8,6.77C8,3.36,6.33,1,5.5,1S3,3.36,3,6.77A2.35,2.35,0,0,0,5,9.21V11C3.9,11,3,11.63,3,12.41Z"/>
285
+ <path fill="currentColor" d="M16,10V9H8v1H0V23H8v1h3V18h2v6h3V23h8V10ZM4,20H2V12H4Zm4,0H6V12H8Zm5-7H11V11h2Zm5,7H16V12h2Zm4,0H20V12h2ZM22,1.88a2.55,2.55,0,0,1,2,0V.51a2.53,2.53,0,0,0-2,0c-1,.41-2,.74-3-.26V0H18V6.38L16,6V3.5L12,2,8,3.5V6L0,7.5V9H8V8h8V9h8V7.5l-5-.94V4.2c1,1,2,.67,3,.25a2.55,2.55,0,0,1,2,0V3.09a2.55,2.55,0,0,0-2,0c-1,.41-2,.75-3-.25V1.63C20,2.63,21,2.29,22,1.88ZM12,6a1,1,0,1,1,1-1A1,1,0,0,1,12,6Z"/>
274
286
  </svg>
275
287
  `;
276
288
 
@@ -382,6 +394,14 @@ const sound = `<svg id="sound" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2
382
394
  </svg>
383
395
  `;
384
396
 
397
+ const statusForbidden = `<svg id="forbidden" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
398
+ <g>
399
+ <path d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm8.25,11a8.19,8.19,0,0,1-1.53,4.77L7.23,5.28a8.24,8.24,0,0,1,13,6.72ZM3.75,12A8.19,8.19,0,0,1,5.28,7.23L16.77,18.72A8.24,8.24,0,0,1,3.75,12Z" style="fill: #ce3f51"/>
400
+ <path d="M12,1A11,11,0,1,1,1,12,11,11,0,0,1,12,1m6.72,15.77A8.24,8.24,0,0,0,7.23,5.28L18.72,16.77M12,20.25a8.19,8.19,0,0,0,4.77-1.53L5.28,7.23a8.24,8.24,0,0,0,6.72,13M12,0A12,12,0,1,0,24,12,12,12,0,0,0,12,0ZM8.84,5.48A7.18,7.18,0,0,1,12,4.75,7.26,7.26,0,0,1,19.25,12a7.18,7.18,0,0,1-.73,3.16L8.84,5.48ZM12,19.25A7.26,7.26,0,0,1,4.75,12a7.18,7.18,0,0,1,.73-3.16l9.68,9.68a7.18,7.18,0,0,1-3.16.73Z" style="fill: #fff"/>
401
+ </g>
402
+ </svg>
403
+ `;
404
+
385
405
  const statusDanger = `<svg id="status-danger-line" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
386
406
  <g>
387
407
  <path d="M22.6,18.51c.86,1.37.29,2.49-1.25,2.49H2.65C1.11,21,.54,19.88,1.4,18.51L10.44,4a1.7,1.7,0,0,1,3.12,0Z" style="fill: #ce3f51"/>
@@ -473,8 +493,10 @@ const icons = [
473
493
  { alias: 'bars', svg: bars },
474
494
  { alias: 'buildings', svg: buildings },
475
495
  { alias: 'calendar', svg: calendar },
496
+ { alias: 'call', svg: call },
476
497
  { alias: 'caret-down', svg: caretDown },
477
498
  { alias: 'check', svg: check },
499
+ { alias: 'check-circle', svg: checkCircle },
478
500
  { alias: 'chevron-down', svg: chevronDown },
479
501
  { alias: 'chevron-left', svg: chevronLeft },
480
502
  { alias: 'chevron-right', svg: chevronRight },
@@ -484,6 +506,7 @@ const icons = [
484
506
  { alias: 'copy', svg: copy },
485
507
  { alias: 'crown', svg: crown },
486
508
  { alias: 'cultural', svg: cultural },
509
+ { alias: 'document', svg: document },
487
510
  { alias: 'download', svg: download },
488
511
  { alias: 'email', svg: email },
489
512
  { alias: 'energy', svg: energy },
@@ -540,6 +563,7 @@ const icons = [
540
563
  { alias: 'sort', svg: sort },
541
564
  { alias: 'sound', svg: sound },
542
565
  { alias: 'status-danger', svg: statusDanger },
566
+ { alias: 'status-forbidden', svg: statusForbidden },
543
567
  { alias: 'status-info', svg: statusInfo },
544
568
  { alias: 'status-success', svg: statusSuccess },
545
569
  { alias: 'status-warning', svg: statusWarning },
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, F as Fragment, f as forceUpdate, g as getElement } from './index-61410be2.js';
2
2
  import { c as createIdentifier } from './create-identifier-22acd3a3.js';
3
3
 
4
- const infoCss = ":host{--di-times-bosgroen:url(\"data:image/svg+xml,%3csvg id='times' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23275937%3b'%3e %3cpath fill='currentColor' d='M13.36%2c12l3.3-3.3A1%2c1%2c0%2c1%2c0%2c15.3%2c7.34L12%2c10.64%2c8.7%2c7.34A1%2c1%2c0%2c1%2c0%2c7.34%2c8.7l3.3%2c3.3-3.3%2c3.3A1%2c1%2c0%2c1%2c0%2c8.7%2c16.66l3.3-3.3%2c3.3%2c3.3a1%2c1%2c0%2c1%2c0%2c1.36-1.36Z'/%3e %3c/svg%3e\");display:block;background-color:#e5e5e5;padding:16px 32px 16px 16px;position:relative}:host>button{background-color:transparent;border-style:none;padding:0;position:absolute;right:0;top:0}:host>button::before{background:var(--dso-icon, var(--di-times-bosgroen)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em;content:\"\";display:inline-block}:host(:not([active]):not([fixed])){display:none}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}";
4
+ const infoCss = ":host{--di-times-bosgroen:url(\"data:image/svg+xml,%3csvg id='times' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23275937%3b'%3e %3cpath fill='currentColor' d='M13.36%2c12l3.3-3.3A1%2c1%2c0%2c1%2c0%2c15.3%2c7.34L12%2c10.64%2c8.7%2c7.34A1%2c1%2c0%2c1%2c0%2c7.34%2c8.7l3.3%2c3.3-3.3%2c3.3A1%2c1%2c0%2c1%2c0%2c8.7%2c16.66l3.3-3.3%2c3.3%2c3.3a1%2c1%2c0%2c1%2c0%2c1.36-1.36Z'/%3e %3c/svg%3e\");display:block;background-color:#f2f2f2;padding:16px 32px 16px 16px;position:relative}:host>button{background-color:transparent;border-style:none;padding:0;position:absolute;right:8px;top:8px}:host>button::before{background:var(--dso-icon, var(--di-times-grijs90)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em;content:\"\";display:inline-block}:host(:not([active]):not([fixed])){display:none}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}";
5
5
 
6
6
  let Info = class {
7
7
  constructor(hostRef) {
@@ -30,7 +30,8 @@ var default_fqdn_options = {
30
30
  require_tld: true,
31
31
  allow_underscores: false,
32
32
  allow_trailing_dot: false,
33
- allow_numeric_tld: false
33
+ allow_numeric_tld: false,
34
+ allow_wildcard: false
34
35
  };
35
36
  function isFQDN(str, options) {
36
37
  assertString(str);
@@ -40,6 +41,12 @@ function isFQDN(str, options) {
40
41
  if (options.allow_trailing_dot && str[str.length - 1] === '.') {
41
42
  str = str.substring(0, str.length - 1);
42
43
  }
44
+ /* Remove the optional wildcard before checking validity */
45
+
46
+
47
+ if (options.allow_wildcard === true && str.indexOf('*.') === 0) {
48
+ str = str.substring(2);
49
+ }
43
50
 
44
51
  var parts = str.split('.');
45
52
  var tld = parts[parts.length - 1];
@@ -50,12 +57,12 @@ function isFQDN(str, options) {
50
57
  return false;
51
58
  }
52
59
 
53
- if (!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {
60
+ if (!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {
54
61
  return false;
55
- } // disallow spaces && special characers
62
+ } // disallow spaces
56
63
 
57
64
 
58
- if (/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20\u00A9\uFFFD]/.test(tld)) {
65
+ if (/\s/.test(tld)) {
59
66
  return false;
60
67
  }
61
68
  } // reject numeric TLDs
@@ -154,6 +161,17 @@ function isIP(str) {
154
161
  return false;
155
162
  }
156
163
 
164
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
165
+
166
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
167
+
168
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
169
+
170
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
171
+
172
+ function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
173
+
174
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
157
175
  /*
158
176
  options for isURL method
159
177
 
@@ -177,6 +195,8 @@ var default_url_options = {
177
195
  allow_underscores: false,
178
196
  allow_trailing_dot: false,
179
197
  allow_protocol_relative_urls: false,
198
+ allow_fragments: true,
199
+ allow_query_components: true,
180
200
  validate_length: true
181
201
  };
182
202
  var wrapped_ipv6 = /^\[([^\]]+)\](?::([0-9]+))?$/;
@@ -214,6 +234,14 @@ function isURL(url, options) {
214
234
  return false;
215
235
  }
216
236
 
237
+ if (!options.allow_fragments && url.includes('#')) {
238
+ return false;
239
+ }
240
+
241
+ if (!options.allow_query_components && (url.includes('?') || url.includes('&'))) {
242
+ return false;
243
+ }
244
+
217
245
  var protocol, auth, host, hostname, port, port_str, split, ipv6;
218
246
  split = url.split('#');
219
247
  url = split.shift();
@@ -257,7 +285,7 @@ function isURL(url, options) {
257
285
  return false;
258
286
  }
259
287
 
260
- if (split[0] === '' || split[0].substr(0, 1) === ':') {
288
+ if (split[0] === '') {
261
289
  return false;
262
290
  }
263
291
 
@@ -266,6 +294,15 @@ function isURL(url, options) {
266
294
  if (auth.indexOf(':') >= 0 && auth.split(':').length > 2) {
267
295
  return false;
268
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
+ }
269
306
  }
270
307
 
271
308
  hostname = split.join('@');
@@ -286,7 +323,7 @@ function isURL(url, options) {
286
323
  }
287
324
  }
288
325
 
289
- if (port_str !== null) {
326
+ if (port_str !== null && port_str.length > 0) {
290
327
  port = parseInt(port_str, 10);
291
328
 
292
329
  if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) {
@@ -296,16 +333,16 @@ function isURL(url, options) {
296
333
  return false;
297
334
  }
298
335
 
336
+ if (options.host_whitelist) {
337
+ return checkHost(host, options.host_whitelist);
338
+ }
339
+
299
340
  if (!isIP(host) && !isFQDN(host, options) && (!ipv6 || !isIP(ipv6, 6))) {
300
341
  return false;
301
342
  }
302
343
 
303
344
  host = host || ipv6;
304
345
 
305
- if (options.host_whitelist && !checkHost(host, options.host_whitelist)) {
306
- return false;
307
- }
308
-
309
346
  if (options.host_blacklist && checkHost(host, options.host_blacklist)) {
310
347
  return false;
311
348
  }
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, F as Fragment, g as getElement } from './index-61410be2.js';
2
2
 
3
- const toggletipCss = "*,*::after,*::before{box-sizing:border-box}";
3
+ const toggletipCss = "*,*::after,*::before{box-sizing:border-box}:host(:focus){outline:none}";
4
4
 
5
5
  let Toggletip = class {
6
6
  constructor(hostRef) {
@@ -47,6 +47,7 @@ let Toggletip = class {
47
47
  throw Error("button not found");
48
48
  }
49
49
  this.button = button;
50
+ this.host.setAttribute("tabindex", "-1");
50
51
  }
51
52
  render() {
52
53
  return (h(Fragment, null, h("dso-info-button", { id: "toggle", onClick: this.click, label: this.label, active: this.active, secondary: this.secondary }), h("dso-tooltip", { stateless: true, for: "toggle", active: this.active, position: this.position, small: this.small }, h("slot", null))));
@@ -13,5 +13,5 @@ const patchBrowser = () => {
13
13
  };
14
14
 
15
15
  patchBrowser().then(options => {
16
- return bootstrapLazy([["dso-map-base-layers",[[1,"dso-map-base-layers",{"baseLayers":[16],"selectedBaseLayer":[1040]}]]],["dso-map-overlays",[[1,"dso-map-overlays",{"overlays":[16],"checkedOverlays":[1040]}]]],["dso-toggletip",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-tree-view",[[1,"dso-tree-view",{"collection":[16]}]]],["dso-date-picker",[[1,"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-label",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"hover":[32]}]]],["dso-map-controls",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32]}]]],["dso-alert",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-attachments-counter",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest",[[6,"dso-autosuggest",{"suggestions":[16],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32]},[[4,"click","onDocumentClick"]]]]],["dso-badge",[[1,"dso-badge",{"status":[1]}]]],["dso-banner",[[1,"dso-banner",{"status":[1]}]]],["dso-dropdown-menu",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4]}]]],["dso-highlight-box",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content",[[0,"dso-ozon-content",{"content":[1]},[[0,"click","handleClick"]]]]],["dso-progress-bar",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-progress-indicator",[[1,"dso-progress-indicator",{"label":[1],"size":[1],"block":[4]}]]],["dso-tooltip",[[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-icon",[[1,"dso-icon",{"icon":[1]}]]],["dso-info-button",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1]}]]],["dso-info_2",[[1,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]]], options);
16
+ return bootstrapLazy([["dso-map-base-layers",[[1,"dso-map-base-layers",{"baseLayers":[16],"selectedBaseLayer":[1040]}]]],["dso-map-overlays",[[1,"dso-map-overlays",{"overlays":[16],"checkedOverlays":[1040]}]]],["dso-toggletip",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-tree-view",[[1,"dso-tree-view",{"collection":[16]}]]],["dso-date-picker",[[1,"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",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]}]]],["dso-label",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"hover":[32]}]]],["dso-map-controls",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32]}]]],["dso-alert",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-attachments-counter",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest",[[6,"dso-autosuggest",{"suggestions":[16],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32]},[[4,"click","onDocumentClick"]]]]],["dso-badge",[[1,"dso-badge",{"status":[1]}]]],["dso-banner",[[1,"dso-banner",{"status":[1]}]]],["dso-dropdown-menu",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4]}]]],["dso-highlight-box",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content",[[0,"dso-ozon-content",{"content":[1]},[[0,"click","handleClick"]]]]],["dso-progress-bar",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-progress-indicator",[[1,"dso-progress-indicator",{"label":[1],"size":[1],"block":[4]}]]],["dso-tooltip",[[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",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1]}]]],["dso-info_2",[[1,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]],["dso-icon",[[1,"dso-icon",{"icon":[1]}]]]], options);
17
17
  });
@@ -3,13 +3,14 @@ import { c as clsx } from './clsx.m-071989db.js';
3
3
 
4
4
  const DsoTreeItem = ({ owner, ancestors, item, index, level, setSize }) => {
5
5
  var _a, _b, _c;
6
- return (h("li", { key: item.reference, class: clsx('tree-item', { 'has-child': item.hasItems }), role: 'none' },
6
+ return (h("li", { key: item.id, class: clsx('tree-item', { 'has-child': item.hasItems }), role: 'none' },
7
7
  h("div", { class: "tree-branch-control" }, item.hasItems
8
8
  ?
9
9
  h("div", { onClick: (e) => owner.itemClick(e, ancestors, item) },
10
10
  h("dso-icon", { icon: item.open ? 'chevron-down' : 'chevron-right' }))
11
11
  : h("dso-icon", null)),
12
- h("p", { class: "tree-content", 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-level": level, "aria-setsize": setSize, "aria-posinset": index + 1, "aria-busy": item.loading ? 'true' : undefined, onClick: (e) => owner.itemClick(e, ancestors, item) },
12
+ 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) },
13
+ item.selected && h("span", { class: "sr-only" }, "Resultaat: "),
13
14
  item.href
14
15
  ? h("a", { href: item.href, tabindex: "-1" }, item.label)
15
16
  : h("span", null, item.label), (_b = item.icons) === null || _b === void 0 ? void 0 :
@@ -20,7 +21,7 @@ const DsoTreeItem = ({ owner, ancestors, item, index, level, setSize }) => {
20
21
  : 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 }))))));
21
22
  };
22
23
 
23
- const treeViewCss = ":host ul{list-style-type:none}:host ul[role=tree]{padding-left:0}:host li[role=treeitem]>ul{padding-left:1.5em}:host .tree-branch-control{cursor:pointer;display:inline-block}:host .tree-content{cursor:pointer;display:inline-block;margin:8px 0}:host .tree-content a,:host .tree-content a:visited{color:#39870c;text-decoration:none}:host .tree-content a:hover,:host .tree-content a:focus{color:#676cb0;text-decoration:underline}:host .tree-content a:active{text-decoration:none}:host .tree-content dso-icon{vertical-align:text-bottom;font-size:0.75em;margin-left:0.5em}*,*::after,*::before{box-sizing:border-box}";
24
+ const treeViewCss = ":host ul{list-style-type:none}:host ul[role=tree]{padding-left:0}:host li[role=treeitem]>ul{padding-left:1.5em}:host .tree-branch-control{cursor:pointer;display:inline-block}:host .tree-content{cursor:pointer;display:inline-block;margin:8px 0}:host .tree-content.active{font-weight:700}:host .tree-content.active:hover{text-decoration:underline}:host .tree-content.active a{text-decoration:none}:host .tree-content.selected{color:#191919;font-weight:700;text-decoration:underline}:host .tree-content.selected:hover,:host .tree-content.selected:focus{text-decoration:none}:host .tree-content a,:host .tree-content a:visited{color:#191919;text-decoration:underline}:host .tree-content a:hover,:host .tree-content a:focus{color:#191919;text-decoration:none}:host .tree-content a:active{text-decoration:none}:host .tree-content dso-icon{font-size:0.75em;margin-left:0.5em;vertical-align:text-bottom}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}";
24
25
 
25
26
  let TreeView = class {
26
27
  constructor(hostRef) {
@@ -81,7 +82,7 @@ let TreeView = class {
81
82
  return;
82
83
  }
83
84
  TreeView.setFocus(tree, contentElement);
84
- this.clickItem.emit([...ancestors, item]);
85
+ this.clickItem.emit({ path: [...ancestors, item], originalEvent: event });
85
86
  return;
86
87
  }
87
88
  if (item.open) {
@@ -10,7 +10,7 @@ const patchEsm = () => {
10
10
  const defineCustomElements = (win, options) => {
11
11
  if (typeof window === 'undefined') return Promise.resolve();
12
12
  return patchEsm().then(() => {
13
- return bootstrapLazy([["dso-map-base-layers",[[1,"dso-map-base-layers",{"baseLayers":[16],"selectedBaseLayer":[1040]}]]],["dso-map-overlays",[[1,"dso-map-overlays",{"overlays":[16],"checkedOverlays":[1040]}]]],["dso-toggletip",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-tree-view",[[1,"dso-tree-view",{"collection":[16]}]]],["dso-date-picker",[[1,"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-label",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"hover":[32]}]]],["dso-map-controls",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32]}]]],["dso-alert",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-attachments-counter",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest",[[6,"dso-autosuggest",{"suggestions":[16],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32]},[[4,"click","onDocumentClick"]]]]],["dso-badge",[[1,"dso-badge",{"status":[1]}]]],["dso-banner",[[1,"dso-banner",{"status":[1]}]]],["dso-dropdown-menu",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4]}]]],["dso-highlight-box",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content",[[0,"dso-ozon-content",{"content":[1]},[[0,"click","handleClick"]]]]],["dso-progress-bar",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-progress-indicator",[[1,"dso-progress-indicator",{"label":[1],"size":[1],"block":[4]}]]],["dso-tooltip",[[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-icon",[[1,"dso-icon",{"icon":[1]}]]],["dso-info-button",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1]}]]],["dso-info_2",[[1,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]]], options);
13
+ return bootstrapLazy([["dso-map-base-layers",[[1,"dso-map-base-layers",{"baseLayers":[16],"selectedBaseLayer":[1040]}]]],["dso-map-overlays",[[1,"dso-map-overlays",{"overlays":[16],"checkedOverlays":[1040]}]]],["dso-toggletip",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-tree-view",[[1,"dso-tree-view",{"collection":[16]}]]],["dso-date-picker",[[1,"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",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]}]]],["dso-label",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"hover":[32]}]]],["dso-map-controls",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32]}]]],["dso-alert",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-attachments-counter",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest",[[6,"dso-autosuggest",{"suggestions":[16],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32]},[[4,"click","onDocumentClick"]]]]],["dso-badge",[[1,"dso-badge",{"status":[1]}]]],["dso-banner",[[1,"dso-banner",{"status":[1]}]]],["dso-dropdown-menu",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4]}]]],["dso-highlight-box",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content",[[0,"dso-ozon-content",{"content":[1]},[[0,"click","handleClick"]]]]],["dso-progress-bar",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-progress-indicator",[[1,"dso-progress-indicator",{"label":[1],"size":[1],"block":[4]}]]],["dso-tooltip",[[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",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1]}]]],["dso-info_2",[[1,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]],["dso-icon",[[1,"dso-icon",{"icon":[1]}]]]], options);
14
14
  });
15
15
  };
16
16
 
@@ -18,6 +18,7 @@ export declare class DropdownMenu {
18
18
  get tabbables(): FocusableElement[];
19
19
  openWatch(open: boolean): void;
20
20
  connectedCallback(): void;
21
+ componentDidRender(): void;
21
22
  componentWillRender(): void;
22
23
  openPopup(): void;
23
24
  closePopup(): void;
@@ -0,0 +1,11 @@
1
+ export declare class HelpcenterPanel {
2
+ label?: string;
3
+ url: string;
4
+ visibility: "visible" | "hidden";
5
+ isOpen: "open" | "close";
6
+ slideState: "open" | "close";
7
+ loadIframe: boolean;
8
+ openClick: () => void;
9
+ closeClick: () => void;
10
+ render(): any;
11
+ }
@@ -0,0 +1,2 @@
1
+ import { HelpcenterPanel } from "@dso-toolkit/sources";
2
+ export declare function helpcenterPanelTemplate({ label, url, content, }: HelpcenterPanel): import("lit-html").TemplateResult<1>;
@@ -1,13 +1,13 @@
1
1
  import { FunctionalComponent } from '../../stencil-public-runtime';
2
2
  import { TreeViewItem } from '@dso-toolkit/sources';
3
3
  import { TreeView } from './tree-view';
4
- interface TreeViewItemProps<T> {
4
+ interface TreeViewItemProps {
5
5
  owner: TreeView;
6
- ancestors: TreeViewItem<T>[];
7
- item: TreeViewItem<T>;
6
+ ancestors: TreeViewItem[];
7
+ item: TreeViewItem;
8
8
  index: number;
9
9
  level: number;
10
10
  setSize: number;
11
11
  }
12
- export declare const DsoTreeItem: FunctionalComponent<TreeViewItemProps<string>>;
12
+ export declare const DsoTreeItem: FunctionalComponent<TreeViewItemProps>;
13
13
  export {};
@@ -1,32 +1,35 @@
1
- import { ComponentInterface, Event, EventEmitter } from '../../stencil-public-runtime';
2
- import { TreeViewItem } from './tree-view.interfaces';
1
+ import { ComponentInterface, EventEmitter } from '../../stencil-public-runtime';
2
+ import { TreeViewPointerEvent, TreeViewItem } from './tree-view.interfaces';
3
3
  export declare class TreeView implements ComponentInterface {
4
4
  /**
5
5
  * The collection of TreeViewItems
6
6
  */
7
- collection: TreeViewItem<string>[];
7
+ collection: TreeViewItem[];
8
8
  /**
9
9
  * Emitted when a tree view item is opened.
10
10
  * The `detail` property of the `CustomEvent` will contain the complete path of TreeViewItems from the
11
11
  * root to the item that is emitting the open event. The consumer of the event is responsible for updating
12
12
  * the TreeView's collection (usually set the open state on the last TreeViewItem in path).
13
13
  */
14
- openItem: EventEmitter<TreeViewItem<string>[]>;
14
+ openItem: EventEmitter<TreeViewItem[]>;
15
15
  /**
16
16
  * Emitted when a tree view item is closed.
17
17
  * The `detail` property of the `CustomEvent` will contain the complete path of TreeViewItems from the
18
18
  * root to the item that is emitting the close event. The consumer of the event is responsible for updating
19
19
  * the TreeView's collection (usually set the closed state on the last TreeViewItem in path).
20
20
  */
21
- closeItem: EventEmitter<TreeViewItem<string>[]>;
21
+ closeItem: EventEmitter<TreeViewItem[]>;
22
22
  /**
23
23
  * Emitted when a tree view item is clicked.
24
- * The `detail` property of the `CustomEvent` will contain the complete path of TreeViewItems from the
25
- * root to the item that is emitting the clicked event.
24
+ * The `detail` property of the `CustomEvent` will contain an object with:
25
+ * `path` = the complete path of TreeViewItems from the root to the item that is emitting the clicked event.
26
+ * `originalEvent` = the original click event.
27
+ * The consumer of the event is responsible for updating the TreeView's collection (usually set the active
28
+ * state on the last TreeViewItem in path and clear all other active item states).
26
29
  */
27
- clickItem: EventEmitter<TreeViewItem<string>[]>;
30
+ clickItem: EventEmitter<TreeViewPointerEvent>;
28
31
  keyDownListener: (event: KeyboardEvent) => void;
29
- itemClick: (event: Event, ancestors: TreeViewItem<string>[], item: TreeViewItem<string>) => void;
32
+ itemClick: (event: MouseEvent, ancestors: TreeViewItem[], item: TreeViewItem) => void;
30
33
  private static setFocus;
31
34
  private static moveFocus;
32
35
  private static expandItemOrFocusChild;
@@ -1,6 +1,6 @@
1
- export interface TreeViewItem<T> {
2
- /** The reference of type T */
3
- reference: T;
1
+ export interface TreeViewItem {
2
+ /** The id of the item */
3
+ id: string;
4
4
  /** The label of the item */
5
5
  label: string;
6
6
  /** The optional href of the item (creates a link) */
@@ -8,11 +8,15 @@ export interface TreeViewItem<T> {
8
8
  /** Indicates whether the item has children */
9
9
  hasItems: boolean;
10
10
  /** The array of child items */
11
- items?: TreeViewItem<T>[];
11
+ items?: TreeViewItem[];
12
12
  /** Indicates whether the node is open and child items are shown */
13
13
  open?: boolean;
14
14
  /** Indicates the node is loading child items */
15
15
  loading?: boolean;
16
+ /** Indicates the node is active, only one item should be active */
17
+ active?: boolean;
18
+ /** Indicates the node is selected, multiple items can be selected */
19
+ selected?: boolean;
16
20
  /** An optional array of icons */
17
21
  icons?: TreeViewItemIcon[];
18
22
  }
@@ -22,3 +26,9 @@ export interface TreeViewItemIcon {
22
26
  /** The label for the icon */
23
27
  label: string;
24
28
  }
29
+ export interface TreeViewPointerEvent {
30
+ /** The path to the clicked item */
31
+ path: TreeViewItem[];
32
+ /** The original pointer event */
33
+ originalEvent: MouseEvent;
34
+ }
@@ -1,2 +1,2 @@
1
1
  import { TreeView } from '@dso-toolkit/sources';
2
- export declare function treeViewTemplate({ collection, onOpenItem, onCloseItem, onClickItem }: TreeView<string>): import("lit-html").TemplateResult<1>;
2
+ export declare function treeViewTemplate({ collection, onOpenItem, onCloseItem, onClickItem }: TreeView): import("lit-html").TemplateResult<1>;
@@ -12,7 +12,7 @@ import { BaseLayer } from "./components/map-base-layers/map-base-layers.interfac
12
12
  import { Overlay } from "./components/map-overlays/map-overlays.interfaces";
13
13
  import { ContentAnchor } from "./components/ozon-content/ozon-content.interfaces";
14
14
  import { SelectableChangeEvent } from "./components/selectable/selectable";
15
- import { TreeViewItem } from "./components/tree-view/tree-view.interfaces";
15
+ import { TreeViewItem, TreeViewPointerEvent } from "./components/tree-view/tree-view.interfaces";
16
16
  export namespace Components {
17
17
  interface DsoAlert {
18
18
  /**
@@ -111,6 +111,10 @@ export namespace Components {
111
111
  */
112
112
  "open": boolean;
113
113
  }
114
+ interface DsoHelpcenterPanel {
115
+ "label"?: string;
116
+ "url": string;
117
+ }
114
118
  interface DsoHighlightBox {
115
119
  "border"?: boolean;
116
120
  "dropShadow"?: boolean;
@@ -217,7 +221,7 @@ export namespace Components {
217
221
  /**
218
222
  * The collection of TreeViewItems
219
223
  */
220
- "collection": TreeViewItem<string>[];
224
+ "collection": TreeViewItem[];
221
225
  }
222
226
  }
223
227
  declare global {
@@ -263,6 +267,12 @@ declare global {
263
267
  prototype: HTMLDsoDropdownMenuElement;
264
268
  new (): HTMLDsoDropdownMenuElement;
265
269
  };
270
+ interface HTMLDsoHelpcenterPanelElement extends Components.DsoHelpcenterPanel, HTMLStencilElement {
271
+ }
272
+ var HTMLDsoHelpcenterPanelElement: {
273
+ prototype: HTMLDsoHelpcenterPanelElement;
274
+ new (): HTMLDsoHelpcenterPanelElement;
275
+ };
266
276
  interface HTMLDsoHighlightBoxElement extends Components.DsoHighlightBox, HTMLStencilElement {
267
277
  }
268
278
  var HTMLDsoHighlightBoxElement: {
@@ -361,6 +371,7 @@ declare global {
361
371
  "dso-banner": HTMLDsoBannerElement;
362
372
  "dso-date-picker": HTMLDsoDatePickerElement;
363
373
  "dso-dropdown-menu": HTMLDsoDropdownMenuElement;
374
+ "dso-helpcenter-panel": HTMLDsoHelpcenterPanelElement;
364
375
  "dso-highlight-box": HTMLDsoHighlightBoxElement;
365
376
  "dso-icon": HTMLDsoIconElement;
366
377
  "dso-info": HTMLDsoInfoElement;
@@ -492,6 +503,10 @@ declare namespace LocalJSX {
492
503
  */
493
504
  "open"?: boolean;
494
505
  }
506
+ interface DsoHelpcenterPanel {
507
+ "label"?: string;
508
+ "url": string;
509
+ }
495
510
  interface DsoHighlightBox {
496
511
  "border"?: boolean;
497
512
  "dropShadow"?: boolean;
@@ -599,19 +614,19 @@ declare namespace LocalJSX {
599
614
  /**
600
615
  * The collection of TreeViewItems
601
616
  */
602
- "collection": TreeViewItem<string>[];
617
+ "collection": TreeViewItem[];
603
618
  /**
604
- * Emitted when a tree view item is clicked. The `detail` property of the `CustomEvent` will contain the complete path of TreeViewItems from the root to the item that is emitting the clicked event.
619
+ * Emitted when a tree view item is clicked. The `detail` property of the `CustomEvent` will contain an object with: `path` = the complete path of TreeViewItems from the root to the item that is emitting the clicked event. `originalEvent` = the original click event. The consumer of the event is responsible for updating the TreeView's collection (usually set the active state on the last TreeViewItem in path and clear all other active item states).
605
620
  */
606
- "onClickItem"?: (event: CustomEvent<TreeViewItem<string>[]>) => void;
621
+ "onClickItem"?: (event: CustomEvent<TreeViewPointerEvent>) => void;
607
622
  /**
608
623
  * Emitted when a tree view item is closed. The `detail` property of the `CustomEvent` will contain the complete path of TreeViewItems from the root to the item that is emitting the close event. The consumer of the event is responsible for updating the TreeView's collection (usually set the closed state on the last TreeViewItem in path).
609
624
  */
610
- "onCloseItem"?: (event: CustomEvent<TreeViewItem<string>[]>) => void;
625
+ "onCloseItem"?: (event: CustomEvent<TreeViewItem[]>) => void;
611
626
  /**
612
627
  * Emitted when a tree view item is opened. The `detail` property of the `CustomEvent` will contain the complete path of TreeViewItems from the root to the item that is emitting the open event. The consumer of the event is responsible for updating the TreeView's collection (usually set the open state on the last TreeViewItem in path).
613
628
  */
614
- "onOpenItem"?: (event: CustomEvent<TreeViewItem<string>[]>) => void;
629
+ "onOpenItem"?: (event: CustomEvent<TreeViewItem[]>) => void;
615
630
  }
616
631
  interface IntrinsicElements {
617
632
  "dso-alert": DsoAlert;
@@ -621,6 +636,7 @@ declare namespace LocalJSX {
621
636
  "dso-banner": DsoBanner;
622
637
  "dso-date-picker": DsoDatePicker;
623
638
  "dso-dropdown-menu": DsoDropdownMenu;
639
+ "dso-helpcenter-panel": DsoHelpcenterPanel;
624
640
  "dso-highlight-box": DsoHighlightBox;
625
641
  "dso-icon": DsoIcon;
626
642
  "dso-info": DsoInfo;
@@ -649,6 +665,7 @@ declare module "@stencil/core" {
649
665
  "dso-banner": LocalJSX.DsoBanner & JSXBase.HTMLAttributes<HTMLDsoBannerElement>;
650
666
  "dso-date-picker": LocalJSX.DsoDatePicker & JSXBase.HTMLAttributes<HTMLDsoDatePickerElement>;
651
667
  "dso-dropdown-menu": LocalJSX.DsoDropdownMenu & JSXBase.HTMLAttributes<HTMLDsoDropdownMenuElement>;
668
+ "dso-helpcenter-panel": LocalJSX.DsoHelpcenterPanel & JSXBase.HTMLAttributes<HTMLDsoHelpcenterPanelElement>;
652
669
  "dso-highlight-box": LocalJSX.DsoHighlightBox & JSXBase.HTMLAttributes<HTMLDsoHighlightBoxElement>;
653
670
  "dso-icon": LocalJSX.DsoIcon & JSXBase.HTMLAttributes<HTMLDsoIconElement>;
654
671
  "dso-info": LocalJSX.DsoInfo & JSXBase.HTMLAttributes<HTMLDsoInfoElement>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dso-toolkit/core",
3
- "version": "31.1.1",
3
+ "version": "33.0.0",
4
4
  "description": "DSO Toolkit Web Components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/custom-elements/index.js",
@@ -1,5 +0,0 @@
1
- import{r as c,h as t,F as e,g as n}from"./p-a40eeb32.js";import{v as r}from"./p-19b890a3.js";
2
- /*!
3
- * tabbable 5.2.1
4
- * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
5
- */var o=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"].join(","),i="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,s=function(c){var t=parseInt(c.getAttribute("tabindex"),10);return isNaN(t)?function(c){return"true"===c.contentEditable}(c)?0:"AUDIO"!==c.nodeName&&"VIDEO"!==c.nodeName&&"DETAILS"!==c.nodeName||null!==c.getAttribute("tabindex")?c.tabIndex:0:t},a=function(c,t){return c.tabIndex===t.tabIndex?c.documentOrder-t.documentOrder:c.tabIndex-t.tabIndex},l=function(c){return"INPUT"===c.tagName},u=function(c,t){return!(!function(c,t){return!(t.disabled||function(c){return l(c)&&"hidden"===c.type}(t)||function(c,t){if("hidden"===getComputedStyle(c).visibility)return!0;var e=i.call(c,"details>summary:first-of-type");if(i.call(e?c.parentElement:c,"details:not([open]) *"))return!0;if(t&&"full"!==t){if("non-zero-area"===t){var n=c.getBoundingClientRect();return 0===n.width&&0===n.height}}else for(;c;){if("none"===getComputedStyle(c).display)return!0;c=c.parentElement}return!1}(t,c.displayCheck)||function(c){return"DETAILS"===c.tagName&&Array.prototype.slice.apply(c.children).some((function(c){return"SUMMARY"===c.tagName}))}(t)||function(c){if(l(c)||"SELECT"===c.tagName||"TEXTAREA"===c.tagName||"BUTTON"===c.tagName)for(var t=c.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var e=0;e<t.children.length;e++){var n=t.children.item(e);if("LEGEND"===n.tagName)return!n.contains(c)}return!0}t=t.parentElement}return!1}(t))}(c,t)||function(c){return function(c){return l(c)&&"radio"===c.type}(c)&&!function(c){if(!c.name)return!0;var t,e=c.form||c.ownerDocument,n=function(c){return e.querySelectorAll('input[type="radio"][name="'+c+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=n(window.CSS.escape(c.name));else try{t=n(c.name)}catch(c){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",c.message),!1}var r=function(c,t){for(var e=0;e<c.length;e++)if(c[e].checked&&c[e].form===t)return c[e]}(t,c.form);return!r||r===c}(c)}(t)||s(t)<0)},d=function(c,t){var e=[],n=[];return function(c,t,e){var n=Array.prototype.slice.apply(c.querySelectorAll(o));return t&&i.call(c,o)&&n.unshift(c),n.filter(e)}(c,(t=t||{}).includeContainer,u.bind(null,t)).forEach((function(c,t){var r=s(c);0===r?e.push(c):n.push({documentOrder:t,tabIndex:r,node:c})})),n.sort(a).map((function(c){return c.node})).concat(e)};let h=class{constructor(t){c(this,t),this.open=!1,this.dropdownAlign="left",this.checkable=!1,this.focusOutListener=c=>{this.tabbables.includes(c.relatedTarget)||(this.open=!1)},this.keyDownListener=c=>{if(!c.defaultPrevented){switch(c.key){case"ArrowDown":this.tabInPopup(1);break;case"ArrowUp":this.tabInPopup(-1);break;case"Escape":this.escape();break;case" ":c.target instanceof HTMLElement&&c.target.click();break;default:return}c.preventDefault()}},this.escape=()=>{this.button.focus(),this.open=!1}}get button(){const c=this.host.querySelectorAll('button[slot="toggle"]')[0];if(!(c instanceof HTMLButtonElement))throw new ReferenceError("Mandatory toggle button not found");return c}get tabbables(){return d(this.host).filter((c=>c!==this.button))}openWatch(c){c?this.openPopup():this.closePopup()}connectedCallback(){this.button.setAttribute("aria-haspopup","menu"),this.button.setAttribute("aria-expanded","false"),this.button.id||(this.button.id=r()),this.button.addEventListener("click",(()=>{this.open=!this.open}));const c=this.host.querySelector(".dso-dropdown-options");if(null==c)throw new ReferenceError("Dropdown options not found");c.setAttribute("role","menu"),c.setAttribute("aria-labelledby",this.button.id);for(const c of Array.from(this.host.getElementsByTagName("ul"))){c.setAttribute("role","none");for(const t of Array.from(c.getElementsByTagName("li")))t.setAttribute("role","none")}this.open&&this.openPopup()}componentWillRender(){for(const c of Array.from(this.host.getElementsByTagName("li")))for(const t of d(c))t.setAttribute("role",this.checkable?"menuitemradio":"menuitem"),this.checkable&&c.classList.contains("dso-checked")?t.setAttribute("aria-checked","true"):t.removeAttribute("aria-checked")}openPopup(){this.host.addEventListener("keydown",this.keyDownListener),this.host.addEventListener("focusout",this.focusOutListener),this.button.setAttribute("aria-expanded","true"),this.tabbables.forEach((c=>c.addEventListener("click",this.escape)))}closePopup(){this.host.removeEventListener("keydown",this.keyDownListener),this.host.removeEventListener("focusout",this.focusOutListener),this.button.setAttribute("aria-expanded","false"),this.tabbables.forEach((c=>c.removeEventListener("click",this.escape)))}tabInPopup(c){const t=this.tabbables;let e=t.findIndex((c=>c===document.activeElement))+c;e>=t.length?e=0:e<0&&(e=t.length-1),t[e].focus()}render(){return t(e,null,t("slot",{name:"toggle"}),t("div",{hidden:!this.open},t("slot",null)))}get host(){return n(this)}static get watchers(){return{open:["openWatch"]}}};h.style=":host{--di-check-wit:url(\"data:image/svg+xml,%3csvg id='check' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M10.11%2c18%2c5.29%2c13.31A.92.92%2c0%2c0%2c1%2c5.3%2c12a1%2c1%2c0%2c0%2c1%2c1.41%2c0l3.4%2c3.3%2c7.18-7a1%2c1%2c0%2c0%2c1%2c1.41%2c0%2c.92.92%2c0%2c0%2c1%2c0%2c1.35Z'/%3e %3c/svg%3e\");--di-chevron-down:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-down-scampi:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23676cb0%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-down-wit:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-up:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");--di-chevron-up-scampi:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23676cb0%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");--di-chevron-up-wit:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");display:inline-block;position:relative}";export{h as dso_dropdown_menu}