@dso-toolkit/core 43.1.0 → 45.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 (170) hide show
  1. package/dist/cjs/dso-autosuggest.cjs.entry.js +30 -11
  2. package/dist/cjs/dso-badge.cjs.entry.js +1 -1
  3. package/dist/cjs/dso-date-picker.cjs.entry.js +2 -2
  4. package/dist/cjs/dso-header.cjs.entry.js +12 -6
  5. package/dist/cjs/dso-image-overlay.cjs.entry.js +1 -1
  6. package/dist/cjs/dso-info-button.cjs.entry.js +2 -2
  7. package/dist/cjs/dso-info_2.cjs.entry.js +5 -5
  8. package/dist/cjs/dso-label.cjs.entry.js +17 -13
  9. package/dist/cjs/dso-map-base-layers.cjs.entry.js +2 -2
  10. package/dist/cjs/dso-map-controls.cjs.entry.js +5 -4
  11. package/dist/cjs/dso-map-overlays.cjs.entry.js +2 -2
  12. package/dist/cjs/dso-ozon-content.cjs.entry.js +11 -6
  13. package/dist/cjs/dso-pagination.cjs.entry.js +2 -2
  14. package/dist/cjs/dso-progress-bar.cjs.entry.js +2 -2
  15. package/dist/cjs/dso-progress-indicator.cjs.entry.js +2 -2
  16. package/dist/cjs/dso-toolkit.cjs.js +1 -1
  17. package/dist/cjs/dso-tree-view.cjs.entry.js +6 -6
  18. package/dist/cjs/dso-viewer-grid.cjs.entry.js +18 -13
  19. package/dist/cjs/loader.cjs.js +1 -1
  20. package/dist/collection/components/alert/alert.template.js +0 -14
  21. package/dist/collection/components/autosuggest/autosuggest.js +34 -15
  22. package/dist/collection/components/autosuggest/autosuggest.template.js +4 -4
  23. package/dist/collection/components/badge/badge.css +8 -3
  24. package/dist/collection/components/banner/banner.template.js +1 -1
  25. package/dist/collection/components/date-picker/date-picker.js +3 -3
  26. package/dist/collection/components/date-picker/date-picker.template.js +2 -17
  27. package/dist/collection/components/dropdown-menu/dropdown-menu.template.js +22 -3
  28. package/dist/collection/components/header/header.css +24 -0
  29. package/dist/collection/components/header/header.js +12 -6
  30. package/dist/collection/components/header/header.template.js +2 -2
  31. package/dist/collection/components/image-overlay/image-overlay.css +1040 -0
  32. package/dist/collection/components/info/info.css +1040 -0
  33. package/dist/collection/components/info/info.js +5 -5
  34. package/dist/collection/components/info/info.template.js +2 -2
  35. package/dist/collection/components/info-button/info-button.js +3 -3
  36. package/dist/collection/components/info-button/info-button.template.js +2 -2
  37. package/dist/collection/components/label/label.css +6 -1
  38. package/dist/collection/components/label/label.js +24 -17
  39. package/dist/collection/components/label/label.template.js +3 -3
  40. package/dist/collection/components/map-base-layers/map-base-layers.js +3 -3
  41. package/dist/collection/components/map-controls/map-controls.css +1041 -0
  42. package/dist/collection/components/map-controls/map-controls.js +11 -8
  43. package/dist/collection/components/map-controls/map-controls.template.js +5 -5
  44. package/dist/collection/components/map-overlays/map-overlays.js +3 -3
  45. package/dist/collection/components/ozon-content/nodes/ext-ref.node.js +2 -2
  46. package/dist/collection/components/ozon-content/ozon-content.css +18 -0
  47. package/dist/collection/components/ozon-content/ozon-content.js +13 -8
  48. package/dist/collection/components/ozon-content/ozon-content.template.js +4 -4
  49. package/dist/collection/components/pagination/pagination.js +3 -3
  50. package/dist/collection/components/pagination/pagination.template.js +2 -2
  51. package/dist/collection/components/progress-bar/progress-bar.css +9 -13
  52. package/dist/collection/components/progress-bar/progress-bar.js +4 -3
  53. package/dist/collection/components/progress-indicator/progress-indicator.css +0 -4
  54. package/dist/collection/components/progress-indicator/progress-indicator.js +1 -1
  55. package/dist/collection/components/selectable/selectable.js +4 -4
  56. package/dist/collection/components/selectable/selectable.template.js +2 -2
  57. package/dist/collection/components/tree-view/tree-view.js +9 -9
  58. package/dist/collection/components/tree-view/tree-view.template.js +4 -4
  59. package/dist/collection/components/viewer-grid/viewer-grid.css +1078 -10
  60. package/dist/collection/components/viewer-grid/viewer-grid.js +24 -16
  61. package/dist/collection/components/viewer-grid/{templates/viewer-grid.template.js → viewer-grid.template.js} +5 -5
  62. package/dist/custom-elements/index.js +122 -82
  63. package/dist/dso-toolkit/dso-toolkit.css +1 -1
  64. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  65. package/dist/dso-toolkit/p-10a6db1a.entry.js +1 -0
  66. package/dist/dso-toolkit/p-1450f113.entry.js +1 -0
  67. package/dist/dso-toolkit/p-16635f4b.entry.js +1 -0
  68. package/dist/dso-toolkit/p-25f8dbc6.entry.js +1 -0
  69. package/dist/dso-toolkit/p-361528b4.entry.js +1 -0
  70. package/dist/dso-toolkit/p-375a2523.entry.js +1 -0
  71. package/dist/dso-toolkit/p-3799366e.entry.js +1 -0
  72. package/dist/dso-toolkit/p-3b5f957e.entry.js +1 -0
  73. package/dist/dso-toolkit/p-6bc71e48.entry.js +1 -0
  74. package/dist/dso-toolkit/p-91b6a181.entry.js +1 -0
  75. package/dist/dso-toolkit/p-b95bc2c7.entry.js +1 -0
  76. package/dist/dso-toolkit/p-c1070a58.entry.js +1 -0
  77. package/dist/dso-toolkit/p-d780f9ff.entry.js +1 -0
  78. package/dist/dso-toolkit/p-e4bcafc4.entry.js +1 -0
  79. package/dist/dso-toolkit/p-e7888d49.entry.js +1 -0
  80. package/dist/dso-toolkit/p-eb17d45e.entry.js +1 -0
  81. package/dist/dso-toolkit/p-fd8a8509.entry.js +1 -0
  82. package/dist/esm/dso-autosuggest.entry.js +30 -11
  83. package/dist/esm/dso-badge.entry.js +1 -1
  84. package/dist/esm/dso-date-picker.entry.js +2 -2
  85. package/dist/esm/dso-header.entry.js +12 -6
  86. package/dist/esm/dso-image-overlay.entry.js +1 -1
  87. package/dist/esm/dso-info-button.entry.js +2 -2
  88. package/dist/esm/dso-info_2.entry.js +5 -5
  89. package/dist/esm/dso-label.entry.js +18 -14
  90. package/dist/esm/dso-map-base-layers.entry.js +2 -2
  91. package/dist/esm/dso-map-controls.entry.js +5 -4
  92. package/dist/esm/dso-map-overlays.entry.js +2 -2
  93. package/dist/esm/dso-ozon-content.entry.js +11 -6
  94. package/dist/esm/dso-pagination.entry.js +2 -2
  95. package/dist/esm/dso-progress-bar.entry.js +2 -2
  96. package/dist/esm/dso-progress-indicator.entry.js +2 -2
  97. package/dist/esm/dso-toolkit.js +1 -1
  98. package/dist/esm/dso-tree-view.entry.js +6 -6
  99. package/dist/esm/dso-viewer-grid.entry.js +18 -13
  100. package/dist/esm/loader.js +1 -1
  101. package/dist/types/components/alert/alert.template.d.ts +1 -2
  102. package/dist/types/components/autosuggest/autosuggest.d.ts +6 -4
  103. package/dist/types/components/autosuggest/autosuggest.template.d.ts +1 -1
  104. package/dist/types/components/date-picker/date-picker.d.ts +1 -1
  105. package/dist/types/components/date-picker/date-picker.template.d.ts +1 -4
  106. package/dist/types/components/dropdown-menu/dropdown-menu.template.d.ts +1 -2
  107. package/dist/types/components/header/header.d.ts +4 -3
  108. package/dist/types/components/header/header.template.d.ts +1 -1
  109. package/dist/types/components/info/info.d.ts +1 -1
  110. package/dist/types/components/info/info.template.d.ts +1 -1
  111. package/dist/types/components/info-button/info-button.d.ts +1 -1
  112. package/dist/types/components/info-button/info-button.template.d.ts +1 -1
  113. package/dist/types/components/label/label.d.ts +3 -2
  114. package/dist/types/components/label/label.template.d.ts +1 -1
  115. package/dist/types/components/map-base-layers/map-base-layers.d.ts +1 -1
  116. package/dist/types/components/map-controls/map-controls.d.ts +3 -2
  117. package/dist/types/components/map-controls/map-controls.template.d.ts +1 -1
  118. package/dist/types/components/map-overlays/map-overlays.d.ts +1 -1
  119. package/dist/types/components/ozon-content/ozon-content.d.ts +6 -2
  120. package/dist/types/components/ozon-content/ozon-content.template.d.ts +1 -1
  121. package/dist/types/components/pagination/pagination.d.ts +1 -1
  122. package/dist/types/components/pagination/pagination.template.d.ts +1 -1
  123. package/dist/types/components/selectable/selectable.d.ts +1 -1
  124. package/dist/types/components/selectable/selectable.template.d.ts +1 -1
  125. package/dist/types/components/tree-view/tree-view.d.ts +3 -3
  126. package/dist/types/components/tree-view/tree-view.template.d.ts +1 -1
  127. package/dist/types/components/viewer-grid/viewer-grid.d.ts +8 -4
  128. package/dist/types/components/viewer-grid/viewer-grid.template.d.ts +3 -0
  129. package/dist/types/components.d.ts +29 -29
  130. package/package.json +3 -16
  131. package/dist/collection/components/anchor/anchor.template.js +0 -17
  132. package/dist/collection/components/button/button.template.js +0 -48
  133. package/dist/collection/components/context/context.template.js +0 -42
  134. package/dist/collection/components/definition-list/definition-list.template.js +0 -36
  135. package/dist/collection/components/label/label.decorator.js +0 -6
  136. package/dist/collection/components/label-group/label-group.template.js +0 -7
  137. package/dist/collection/components/list/list.template.js +0 -44
  138. package/dist/collection/components/viewer-grid/example-pages/viewer-grid-document-header.example-template.js +0 -22
  139. package/dist/collection/components/viewer-grid/example-pages/viewer-grid-document-list.example-template.js +0 -12
  140. package/dist/collection/components/viewer-grid/example-pages/viewer-grid-filterblok.example-template.js +0 -60
  141. package/dist/collection/components/viewer-grid/example-pages/viewer-grid-tiles.example-template.js +0 -17
  142. package/dist/dso-toolkit/p-1845b0ce.entry.js +0 -1
  143. package/dist/dso-toolkit/p-19b5fae2.entry.js +0 -1
  144. package/dist/dso-toolkit/p-202bd676.entry.js +0 -1
  145. package/dist/dso-toolkit/p-237cd551.entry.js +0 -1
  146. package/dist/dso-toolkit/p-336bf5b9.entry.js +0 -1
  147. package/dist/dso-toolkit/p-363b56b1.entry.js +0 -1
  148. package/dist/dso-toolkit/p-3ad06d9d.entry.js +0 -1
  149. package/dist/dso-toolkit/p-6505be7d.entry.js +0 -1
  150. package/dist/dso-toolkit/p-80b5c915.entry.js +0 -1
  151. package/dist/dso-toolkit/p-93683c65.entry.js +0 -1
  152. package/dist/dso-toolkit/p-acc0620a.entry.js +0 -1
  153. package/dist/dso-toolkit/p-b86128b3.entry.js +0 -1
  154. package/dist/dso-toolkit/p-ba835421.entry.js +0 -1
  155. package/dist/dso-toolkit/p-bd1ee63c.entry.js +0 -1
  156. package/dist/dso-toolkit/p-ca3a1440.entry.js +0 -1
  157. package/dist/dso-toolkit/p-d84c166c.entry.js +0 -1
  158. package/dist/dso-toolkit/p-e98f049e.entry.js +0 -1
  159. package/dist/types/components/anchor/anchor.template.d.ts +0 -2
  160. package/dist/types/components/button/button.template.d.ts +0 -2
  161. package/dist/types/components/context/context.template.d.ts +0 -3
  162. package/dist/types/components/definition-list/definition-list.template.d.ts +0 -3
  163. package/dist/types/components/label/label.decorator.d.ts +0 -3
  164. package/dist/types/components/label-group/label-group.template.d.ts +0 -2
  165. package/dist/types/components/list/list.template.d.ts +0 -3
  166. package/dist/types/components/viewer-grid/example-pages/viewer-grid-document-header.example-template.d.ts +0 -2
  167. package/dist/types/components/viewer-grid/example-pages/viewer-grid-document-list.example-template.d.ts +0 -2
  168. package/dist/types/components/viewer-grid/example-pages/viewer-grid-filterblok.example-template.d.ts +0 -1
  169. package/dist/types/components/viewer-grid/example-pages/viewer-grid-tiles.example-template.d.ts +0 -2
  170. package/dist/types/components/viewer-grid/templates/viewer-grid.template.d.ts +0 -3
@@ -10,8 +10,10 @@ export class Autosuggest {
10
10
  *
11
11
  * The `type` is used to style the suggestion. `item` can be use to reference
12
12
  * the original object that was used to create the suggestion.
13
+ *
14
+ * The value should be null when no suggestions have been fetched.
13
15
  */
14
- this.suggestions = [];
16
+ this.suggestions = null;
15
17
  /**
16
18
  * Shows progress indicator when fetching results.
17
19
  */
@@ -31,7 +33,7 @@ export class Autosuggest {
31
33
  this.inputId = v4();
32
34
  this.labelId = v4();
33
35
  this.debouncedEmitValue = debounce((value) => {
34
- this.changeEmitter.emit(value);
36
+ this.dsoChange.emit(value);
35
37
  this.debouncedShowLoading();
36
38
  }, 200);
37
39
  this.debouncedShowLoading = debounce(() => {
@@ -131,7 +133,7 @@ export class Autosuggest {
131
133
  }
132
134
  this.input.setAttribute("role", "combobox");
133
135
  this.input.setAttribute("aria-haspopup", "listbox");
134
- this.input.setAttribute("aria-owns", this.listboxId);
136
+ this.input.setAttribute("aria-controls", this.listboxId);
135
137
  this.input.setAttribute("aria-expanded", "false");
136
138
  this.input.setAttribute("autocomplete", "off");
137
139
  this.input.setAttribute("aria-autocomplete", "list");
@@ -168,12 +170,18 @@ export class Autosuggest {
168
170
  this.input.setAttribute("aria-activedescendant", this.listboxItemId(suggestion));
169
171
  }
170
172
  selectFirstSuggestion() {
173
+ if (!this.suggestions) {
174
+ return;
175
+ }
171
176
  this.selectedSuggestion = this.suggestions[0];
172
177
  if (this.selectedSuggestion) {
173
178
  this.input.setAttribute('aria-activedescendant', this.listboxItemId(this.selectedSuggestion));
174
179
  }
175
180
  }
176
181
  selectLastSuggestion() {
182
+ if (!this.suggestions) {
183
+ return;
184
+ }
177
185
  this.selectedSuggestion = this.suggestions[this.suggestions.length - 1];
178
186
  if (this.selectedSuggestion) {
179
187
  this.input.setAttribute('aria-activedescendant', this.listboxItemId(this.selectedSuggestion));
@@ -181,6 +189,9 @@ export class Autosuggest {
181
189
  }
182
190
  selectNextSuggestion() {
183
191
  var _a;
192
+ if (!this.suggestions) {
193
+ return;
194
+ }
184
195
  const index = this.selectedSuggestion ? this.suggestions.indexOf(this.selectedSuggestion) : -1;
185
196
  this.selectedSuggestion = (_a = this.suggestions[index + 1]) !== null && _a !== void 0 ? _a : this.suggestions[0];
186
197
  if (this.selectedSuggestion) {
@@ -189,6 +200,9 @@ export class Autosuggest {
189
200
  }
190
201
  selectPreviousSuggestion() {
191
202
  var _a;
203
+ if (!this.suggestions) {
204
+ return;
205
+ }
192
206
  const index = this.selectedSuggestion ? this.suggestions.indexOf(this.selectedSuggestion) : 0;
193
207
  this.selectedSuggestion = (_a = this.suggestions[index - 1]) !== null && _a !== void 0 ? _a : this.suggestions[this.suggestions.length - 1];
194
208
  if (this.selectedSuggestion) {
@@ -197,12 +211,14 @@ export class Autosuggest {
197
211
  }
198
212
  resetSelectedSuggestion() {
199
213
  this.showLoading = !this.loadingDelayed;
214
+ this.notFound = false;
200
215
  this.selectedSuggestion = undefined;
201
216
  this.input.setAttribute('aria-activedescendant', '');
202
217
  }
203
218
  openSuggestions(selectSuggestion) {
204
- this.showSuggestions = this.suggestions.length > 0;
205
- this.notFound = this.suggestions.length === 0;
219
+ var _a, _b, _c;
220
+ this.showSuggestions = (_a = (this.suggestions && this.suggestions.length > 0)) !== null && _a !== void 0 ? _a : false;
221
+ this.notFound = (_c = ((_b = this.suggestions) === null || _b === void 0 ? void 0 : _b.length) === 0) !== null && _c !== void 0 ? _c : false;
206
222
  this.input.setAttribute("aria-expanded", (this.showSuggestions || this.notFound).toString());
207
223
  if (this.showSuggestions && selectSuggestion === 'first') {
208
224
  this.selectFirstSuggestion();
@@ -219,14 +235,17 @@ export class Autosuggest {
219
235
  }
220
236
  pickSelectedValue() {
221
237
  if (this.selectedSuggestion && this.showSuggestions) {
222
- this.selectEmitter.emit(this.selectedSuggestion);
238
+ this.dsoSelect.emit(this.selectedSuggestion);
223
239
  }
224
240
  else {
225
- this.searchEmitter.emit(this.input.value);
241
+ this.dsoSearch.emit(this.input.value);
226
242
  }
227
243
  this.closeSuggestions();
228
244
  }
229
245
  listboxItemId(suggestion) {
246
+ if (!this.suggestions) {
247
+ return '';
248
+ }
230
249
  return `${this.inputId}-${this.suggestions.indexOf(suggestion) + 1}`;
231
250
  }
232
251
  render() {
@@ -236,7 +255,7 @@ export class Autosuggest {
236
255
  this.loading && this.showLoading
237
256
  ? h("div", { class: "autosuggest-progress-box" },
238
257
  h("dso-progress-indicator", { label: this.loadingLabel }))
239
- : h("ul", { role: "listbox", id: this.listboxId, "aria-labelledby": this.labelId, ref: element => this.listbox = element, hidden: !this.showSuggestions && !this.notFound }, this.showSuggestions
258
+ : h("ul", { role: "listbox", id: this.listboxId, "aria-labelledby": this.labelId, ref: element => this.listbox = element, hidden: !this.showSuggestions && !this.notFound }, this.showSuggestions && this.suggestions
240
259
  ? this.suggestions.map((suggestion) => (h("li", { role: "option", id: this.listboxItemId(suggestion), key: suggestion.value, onMouseEnter: () => this.selectSuggestion(suggestion), onMouseLeave: () => this.resetSelectedSuggestion(), onClick: () => this.pickSelectedValue(), "aria-selected": (suggestion === this.selectedSuggestion).toString(), "aria-label": suggestion.value },
241
260
  h("span", { class: "value" }, this.markTerms(suggestion.value, terms)),
242
261
  suggestion.type
@@ -262,8 +281,8 @@ export class Autosuggest {
262
281
  "type": "unknown",
263
282
  "mutable": false,
264
283
  "complexType": {
265
- "original": "Suggestion[]",
266
- "resolved": "Suggestion[]",
284
+ "original": "Suggestion[] | null",
285
+ "resolved": "Suggestion[] | null",
267
286
  "references": {
268
287
  "Suggestion": {
269
288
  "location": "local"
@@ -274,9 +293,9 @@ export class Autosuggest {
274
293
  "optional": false,
275
294
  "docs": {
276
295
  "tags": [],
277
- "text": "The suggestions for the value of the slotted input element. Optionally a\nSuggestion can have a `type` and `item`.\n\nThe `type` is used to style the suggestion. `item` can be use to reference\nthe original object that was used to create the suggestion."
296
+ "text": "The suggestions for the value of the slotted input element. Optionally a\nSuggestion can have a `type` and `item`.\n\nThe `type` is used to style the suggestion. `item` can be use to reference\nthe original object that was used to create the suggestion.\n\nThe value should be null when no suggestions have been fetched."
278
297
  },
279
- "defaultValue": "[]"
298
+ "defaultValue": "null"
280
299
  },
281
300
  "loading": {
282
301
  "type": "boolean",
@@ -374,7 +393,7 @@ export class Autosuggest {
374
393
  "showLoading": {}
375
394
  }; }
376
395
  static get events() { return [{
377
- "method": "selectEmitter",
396
+ "method": "dsoSelect",
378
397
  "name": "dsoSelect",
379
398
  "bubbles": true,
380
399
  "cancelable": true,
@@ -393,7 +412,7 @@ export class Autosuggest {
393
412
  }
394
413
  }
395
414
  }, {
396
- "method": "changeEmitter",
415
+ "method": "dsoChange",
397
416
  "name": "dsoChange",
398
417
  "bubbles": true,
399
418
  "cancelable": true,
@@ -408,7 +427,7 @@ export class Autosuggest {
408
427
  "references": {}
409
428
  }
410
429
  }, {
411
- "method": "searchEmitter",
430
+ "method": "dsoSearch",
412
431
  "name": "dsoSearch",
413
432
  "bubbles": true,
414
433
  "cancelable": true,
@@ -1,12 +1,12 @@
1
1
  import { html } from 'lit-html';
2
2
  import { ifDefined } from 'lit-html/directives/if-defined.js';
3
- export function autosuggestTemplate({ suggestions, onSelect, onChange, onSearch, suggestOnFocus, loading, loadingLabel, loadingDelayed, notFoundLabel }, children) {
3
+ export function autosuggestTemplate({ suggestions, dsoSelect, dsoChange, dsoSearch, suggestOnFocus, loading, loadingLabel, loadingDelayed, notFoundLabel }, children) {
4
4
  return html `
5
5
  <dso-autosuggest
6
6
  .suggestions=${suggestions}
7
- @dsoSelect=${onSelect}
8
- @dsoChange=${onChange}
9
- @dsoSearch=${onSearch}
7
+ @dsoSelect=${dsoSelect}
8
+ @dsoChange=${dsoChange}
9
+ @dsoSearch=${dsoSearch}
10
10
  ?suggest-on-focus=${suggestOnFocus}
11
11
  ?loading=${loading}
12
12
  loading-label=${ifDefined(loadingLabel)}
@@ -21,38 +21,43 @@
21
21
 
22
22
  .dso-badge {
23
23
  background-color: #666;
24
+ border: 1px solid #666;
24
25
  border-radius: 1em;
25
26
  color: #fff;
26
27
  display: inline-block;
27
28
  font-size: 0.875em;
28
29
  line-height: 1;
29
- min-width: calc(1 + 8px);
30
+ min-width: 1.5rem;
30
31
  padding: 4px 8px;
31
32
  text-align: center;
32
33
  }
33
34
  .dso-badge.badge-info {
34
35
  background-color: #6ca4d9;
36
+ border-color: #6ca4d9;
35
37
  color: #191919;
36
38
  }
37
39
  .dso-badge.badge-primary {
38
40
  background-color: #275937;
41
+ border-color: #275937;
39
42
  color: #fff;
40
43
  }
41
44
  .dso-badge.badge-success {
42
45
  background-color: #39870c;
46
+ border-color: #39870c;
43
47
  color: #fff;
44
48
  }
45
49
  .dso-badge.badge-warning {
46
50
  background-color: #dcd400;
51
+ border-color: #dcd400;
47
52
  color: #191919;
48
53
  }
49
54
  .dso-badge.badge-danger {
50
55
  background-color: #ce3f51;
56
+ border-color: #ce3f51;
51
57
  color: #fff;
52
58
  }
53
59
  .dso-badge.badge-outline {
54
60
  background-color: #fff;
61
+ border-color: #191919;
55
62
  color: #191919;
56
- outline: 1px solid #191919;
57
- outline-offset: -1px;
58
63
  }
@@ -7,7 +7,7 @@ export function bannerTemplate({ status, richContent, onClick }) {
7
7
  <div class="row">
8
8
  <div class="col-sm-12">
9
9
  ${richContent}
10
- <button type="button" class="btn btn-link" @click=${onClick}>
10
+ <button type="button" class="dso-tertiary" @click=${onClick}>
11
11
  <span class="sr-only">Sluiten</span>
12
12
  ${iconTemplate({ icon: 'times' })}
13
13
  </button>
@@ -387,7 +387,7 @@ export class DsoDatePicker {
387
387
  const event = this.prepareEvent(value);
388
388
  this.value = typeof value === 'string' ? value : event.value;
389
389
  if (this.value !== this.previousValue) {
390
- this.dateChange.emit(event);
390
+ this.dsoDateChange.emit(event);
391
391
  this.previousValue = this.value;
392
392
  }
393
393
  }
@@ -672,8 +672,8 @@ export class DsoDatePicker {
672
672
  "visible": {}
673
673
  }; }
674
674
  static get events() { return [{
675
- "method": "dateChange",
676
- "name": "dateChange",
675
+ "method": "dsoDateChange",
676
+ "name": "dsoDateChange",
677
677
  "bubbles": true,
678
678
  "cancelable": true,
679
679
  "composed": true,
@@ -1,9 +1,9 @@
1
1
  import { html } from 'lit-html';
2
2
  import { ifDefined } from 'lit-html/directives/if-defined.js';
3
- export function datePickerTemplate({ id, onDateChange, value, min, max, disabled, autofocus, direction }) {
3
+ export function datePickerTemplate({ id, dsoDateChange, value, min, max, disabled, autofocus, direction }) {
4
4
  return html `
5
5
  <dso-date-picker
6
- @dateChange=${(e) => onDateChange(e)}
6
+ @dsoDateChange=${(e) => dsoDateChange === null || dsoDateChange === void 0 ? void 0 : dsoDateChange(e)}
7
7
  direction=${ifDefined(direction)}
8
8
  identifier=${ifDefined(id)}
9
9
  value=${ifDefined(value || undefined)}
@@ -14,18 +14,3 @@ export function datePickerTemplate({ id, onDateChange, value, min, max, disabled
14
14
  ></dso-date-picker>
15
15
  `;
16
16
  }
17
- export function datePickerWithLabelTemplate(datePicker, id, label) {
18
- return html `
19
- <label for=${id}>${label}</label>
20
- ${datePicker}
21
- `;
22
- }
23
- export function datePickerShowByScriptingTemplate(datePicker, id) {
24
- return html `
25
- ${datePicker}
26
-
27
- <button type="button" @click=${() => { var _a; return (_a = document.querySelector(`dso-date-picker[identifier="${id}"]`)) === null || _a === void 0 ? void 0 : _a.show(); }}>
28
- Open
29
- </button>
30
- `;
31
- }
@@ -1,6 +1,6 @@
1
- import { html } from "lit-html";
1
+ import { html, nothing } from "lit-html";
2
2
  import { ifDefined } from 'lit-html/directives/if-defined.js';
3
- export function dropdownMenuTemplate({ id, button, dropdownAlign, isCheckable, children }) {
3
+ export function dropdownMenuTemplate({ id, button, dropdownAlign, isCheckable, groups }) {
4
4
  return html `
5
5
  <dso-dropdown-menu
6
6
  dropdown-align=${ifDefined(dropdownAlign)}
@@ -10,7 +10,26 @@ export function dropdownMenuTemplate({ id, button, dropdownAlign, isCheckable, c
10
10
  <span>${button.label}</span>
11
11
  </button>
12
12
  <div class="dso-dropdown-options">
13
- ${children}
13
+ ${groups.map(group => html `
14
+ ${group.header
15
+ ? html `
16
+ <h2 class="dso-group-label">${group.header}</h2>
17
+ `
18
+ : nothing}
19
+ <ul>
20
+ ${group.items.map(item => html `
21
+ <li class=${ifDefined(item.checked ? 'dso-checked' : undefined)}>
22
+ ${item.type === 'anchor'
23
+ ? html `
24
+ <a href=${item.url}>${item.label}</a>
25
+ `
26
+ : html `
27
+ <button type="button">${item.label}</button>
28
+ `}
29
+ </li>
30
+ `)}
31
+ </ul>
32
+ `)}
14
33
  </div>
15
34
  </dso-dropdown-menu>
16
35
  `;
@@ -105,6 +105,7 @@
105
105
  .logout .dso-tertiary:not([disabled]):hover {
106
106
  color: #676cb0;
107
107
  text-decoration: underline;
108
+ text-underline-position: under;
108
109
  }
109
110
  .login .dso-tertiary:not([disabled]):active,
110
111
  .logout .dso-tertiary:not([disabled]):active {
@@ -190,6 +191,24 @@
190
191
  .logout .dso-tertiary span:not(.sr-only) + svg.di {
191
192
  margin-left: 8px;
192
193
  }
194
+ .login .dso-tertiary dso-icon[icon=chevron-left] + span:not(.sr-only),
195
+ .login .dso-tertiary dso-icon[icon=chevron-right] + span:not(.sr-only),
196
+ .login .dso-tertiary svg.di.di-angle-down + span:not(.sr-only),
197
+ .login .dso-tertiary svg.di.di-angle-up + span:not(.sr-only),
198
+ .login .dso-tertiary span:not(.sr-only) + svg.di.di-angle-down,
199
+ .login .dso-tertiary span:not(.sr-only) + svg.di.di-angle-up,
200
+ .login .dso-tertiary span:not(.sr-only) + dso-icon[icon=chevron-left],
201
+ .login .dso-tertiary span:not(.sr-only) + dso-icon[icon=chevron-right],
202
+ .logout .dso-tertiary dso-icon[icon=chevron-left] + span:not(.sr-only),
203
+ .logout .dso-tertiary dso-icon[icon=chevron-right] + span:not(.sr-only),
204
+ .logout .dso-tertiary svg.di.di-angle-down + span:not(.sr-only),
205
+ .logout .dso-tertiary svg.di.di-angle-up + span:not(.sr-only),
206
+ .logout .dso-tertiary span:not(.sr-only) + svg.di.di-angle-down,
207
+ .logout .dso-tertiary span:not(.sr-only) + svg.di.di-angle-up,
208
+ .logout .dso-tertiary span:not(.sr-only) + dso-icon[icon=chevron-left],
209
+ .logout .dso-tertiary span:not(.sr-only) + dso-icon[icon=chevron-right] {
210
+ margin-left: 0;
211
+ }
193
212
  .login .dso-tertiary dso-icon,
194
213
  .login .dso-tertiary svg.di,
195
214
  .login .dso-tertiary span,
@@ -242,6 +261,10 @@ dso-dropdown-menu > .dso-tertiary::after,
242
261
  dso-dropdown-menu > .btn::after {
243
262
  content: "";
244
263
  display: inline-block;
264
+ }
265
+ dso-dropdown-menu > .dso-primary::after,
266
+ dso-dropdown-menu > .dso-secondary::after,
267
+ dso-dropdown-menu > .btn::after {
245
268
  margin-left: 8px;
246
269
  }
247
270
  dso-dropdown-menu > .dso-primary::after,
@@ -274,6 +297,7 @@ dso-dropdown-menu > .btn-link::after {
274
297
  height: 24px;
275
298
  vertical-align: top;
276
299
  width: 24px;
300
+ margin-left: 4px;
277
301
  position: relative;
278
302
  top: -2px;
279
303
  }
@@ -8,7 +8,6 @@ export class Header {
8
8
  this.useDropDownMenu = "auto";
9
9
  /** Used to show the login/logout option. 'none' renders nothing. */
10
10
  this.authStatus = 'none';
11
- this.showDropDown = false;
12
11
  this.hasSubLogo = false;
13
12
  this.overflowMenuItems = 0;
14
13
  this.onWindowResize = debounce(() => {
@@ -22,7 +21,7 @@ export class Header {
22
21
  }
23
22
  clickHandler(e, type, options) {
24
23
  var _a, _b;
25
- this.headerClick.emit({
24
+ this.dsoHeaderClick.emit({
26
25
  originalEvent: e,
27
26
  isModifiedEvent: e.button !== 0 || e.ctrlKey || e.shiftKey || e.altKey || e.metaKey,
28
27
  type,
@@ -31,7 +30,7 @@ export class Header {
31
30
  });
32
31
  }
33
32
  ;
34
- watchUseDropDownMenu(value) {
33
+ setShowDropDown(value) {
35
34
  if (value === "auto") {
36
35
  this.setDropDownMenu();
37
36
  return;
@@ -59,6 +58,9 @@ export class Header {
59
58
  }
60
59
  window.setTimeout(() => this.shrinkMenuToFit(), 0);
61
60
  }
61
+ componentDidLoad() {
62
+ this.setShowDropDown(this.useDropDownMenu);
63
+ }
62
64
  setOverflowMenu() {
63
65
  if (this.showDropDown) {
64
66
  return;
@@ -82,6 +84,10 @@ export class Header {
82
84
  window.removeEventListener("resize", this.onWindowResize);
83
85
  }
84
86
  render() {
87
+ // Prevent 'flickering' when useDropDownMenu = 'always'
88
+ if (this.showDropDown === undefined) {
89
+ return;
90
+ }
85
91
  return (h(Fragment, null,
86
92
  h("div", { class: clsx("dso-header", {
87
93
  ["use-drop-down"]: this.showDropDown,
@@ -304,8 +310,8 @@ export class Header {
304
310
  "overflowMenuItems": {}
305
311
  }; }
306
312
  static get events() { return [{
307
- "method": "headerClick",
308
- "name": "headerClick",
313
+ "method": "dsoHeaderClick",
314
+ "name": "dsoHeaderClick",
309
315
  "bubbles": true,
310
316
  "cancelable": true,
311
317
  "composed": true,
@@ -331,6 +337,6 @@ export class Header {
331
337
  static get elementRef() { return "host"; }
332
338
  static get watchers() { return [{
333
339
  "propName": "useDropDownMenu",
334
- "methodName": "watchUseDropDownMenu"
340
+ "methodName": "setShowDropDown"
335
341
  }]; }
336
342
  }
@@ -1,6 +1,6 @@
1
1
  import { html } from "lit-html";
2
2
  import { ifDefined } from "lit-html/directives/if-defined.js";
3
- export function headerTemplate({ logo, subLogo, mainMenu, useDropDownMenu, authStatus, loginUrl, logoutUrl, userProfileUrl, userProfileName, userHomeUrl, onHeaderClick, }) {
3
+ export function headerTemplate({ logo, subLogo, mainMenu, useDropDownMenu, authStatus, loginUrl, logoutUrl, userProfileUrl, userProfileName, userHomeUrl, dsoHeaderClick, }) {
4
4
  return html `<dso-header
5
5
  .mainMenu=${mainMenu}
6
6
  use-drop-down-menu=${ifDefined(useDropDownMenu)}
@@ -10,7 +10,7 @@ export function headerTemplate({ logo, subLogo, mainMenu, useDropDownMenu, authS
10
10
  user-profile-url=${ifDefined(userProfileUrl)}
11
11
  user-profile-name=${ifDefined(userProfileName)}
12
12
  user-home-url=${ifDefined(userHomeUrl)}
13
- @headerClick=${onHeaderClick}
13
+ @dsoHeaderClick=${dsoHeaderClick}
14
14
  >
15
15
  <div slot="logo"><img height="40" alt="Omgevingsloket" src="${logo}" /></div>
16
16
  ${subLogo ? html `<div slot="sub-logo"><img alt="Regels op de kaart" src="${subLogo}" /></div>` : undefined}