@dso-toolkit/core 33.1.0 → 34.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 (173) hide show
  1. package/dist/cjs/dso-alert.cjs.entry.js +1 -1
  2. package/dist/cjs/dso-attachments-counter.cjs.entry.js +2 -2
  3. package/dist/cjs/dso-autosuggest.cjs.entry.js +8 -72
  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 +11 -11
  7. package/dist/cjs/dso-dropdown-menu.cjs.entry.js +19 -232
  8. package/dist/cjs/dso-header.cjs.entry.js +101 -0
  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-info-button.cjs.entry.js +2 -2
  13. package/dist/cjs/dso-info_2.cjs.entry.js +2 -2
  14. package/dist/cjs/dso-label.cjs.entry.js +2 -2
  15. package/dist/cjs/dso-map-base-layers.cjs.entry.js +7 -6
  16. package/dist/cjs/dso-map-controls.cjs.entry.js +3 -3
  17. package/dist/cjs/dso-map-overlays.cjs.entry.js +9 -10
  18. package/dist/cjs/dso-ozon-content.cjs.entry.js +1 -1
  19. package/dist/cjs/dso-progress-bar.cjs.entry.js +1 -1
  20. package/dist/cjs/dso-progress-indicator.cjs.entry.js +1 -1
  21. package/dist/cjs/dso-toggletip.cjs.entry.js +1 -1
  22. package/dist/cjs/dso-toolkit.cjs.js +2 -2
  23. package/dist/cjs/dso-tooltip.cjs.entry.js +169 -76
  24. package/dist/cjs/dso-tree-view.cjs.entry.js +2 -2
  25. package/dist/cjs/dso-viewer-grid.cjs.entry.js +778 -0
  26. package/dist/cjs/{index-fcdfdd38.js → index-5ea63531.js} +26 -2
  27. package/dist/cjs/index-794ad37a.js +72 -0
  28. package/dist/cjs/index.esm-2ac7081c.js +267 -0
  29. package/dist/cjs/loader.cjs.js +2 -2
  30. package/dist/collection/collection-manifest.json +3 -1
  31. package/dist/collection/components/alert/alert.css +0 -3
  32. package/dist/collection/components/anchor/anchor.template.js +17 -0
  33. package/dist/collection/components/attachments-counter/attachments-counter.css +0 -4
  34. package/dist/collection/components/autosuggest/autosuggest.css +0 -3
  35. package/dist/collection/components/autosuggest/autosuggest.js +19 -1
  36. package/dist/collection/components/autosuggest/autosuggest.template.js +2 -1
  37. package/dist/collection/components/badge/badge.css +0 -3
  38. package/dist/collection/components/banner/banner.css +0 -3
  39. package/dist/collection/components/button/button.template.js +48 -0
  40. package/dist/collection/components/context/context.template.js +42 -0
  41. package/dist/collection/components/date-picker/date-picker.css +0 -3
  42. package/dist/collection/components/date-picker/date-picker.js +10 -10
  43. package/dist/collection/components/definition-list/definition-list.template.js +36 -0
  44. package/dist/collection/components/dropdown-menu/dropdown-menu.css +0 -3
  45. package/dist/collection/components/dropdown-menu/dropdown-menu.js +15 -4
  46. package/dist/collection/components/header/header.css +433 -0
  47. package/dist/collection/components/header/header.js +294 -0
  48. package/dist/collection/components/header/header.template.js +32 -0
  49. package/dist/collection/components/helpcenter-panel/helpcenter-panel.css +0 -3
  50. package/dist/collection/components/highlight-box/highlight-box.css +0 -3
  51. package/dist/collection/components/icon/icon.css +0 -4
  52. package/dist/collection/components/info/info.css +1 -4
  53. package/dist/collection/components/info-button/info-button.css +1 -3
  54. package/dist/collection/components/label/label.css +0 -3
  55. package/dist/collection/components/label/label.js +2 -1
  56. package/dist/collection/components/label-group/label-group.template.js +7 -0
  57. package/dist/collection/components/list/list.template.js +37 -0
  58. package/dist/collection/components/map-base-layers/map-base-layers.css +4 -3
  59. package/dist/collection/components/map-base-layers/map-base-layers.js +10 -27
  60. package/dist/collection/components/map-controls/map-controls.css +18 -11
  61. package/dist/collection/components/map-controls/map-controls.js +10 -11
  62. package/dist/collection/components/map-controls/map-controls.template.js +12 -20
  63. package/dist/collection/components/map-overlays/map-overlays.css +4 -3
  64. package/dist/collection/components/map-overlays/map-overlays.js +13 -35
  65. package/dist/collection/components/ozon-content/ozon-content.css +0 -3
  66. package/dist/collection/components/progress-bar/progress-bar.css +0 -3
  67. package/dist/collection/components/progress-indicator/progress-indicator.css +0 -3
  68. package/dist/collection/components/selectable/selectable.css +0 -3
  69. package/dist/collection/components/toggletip/toggletip.css +0 -3
  70. package/dist/collection/components/tooltip/tooltip.css +34 -15
  71. package/dist/collection/components/tooltip/tooltip.js +19 -4
  72. package/dist/collection/components/tooltip/tooltip.template.js +3 -5
  73. package/dist/collection/components/tree-view/tree-view.css +3 -3
  74. package/dist/collection/components/viewer-grid/viewer-grid-document-header.template.js +39 -0
  75. package/dist/collection/components/viewer-grid/viewer-grid-document-list-item.template.js +19 -0
  76. package/dist/collection/components/viewer-grid/viewer-grid-filterblok.template.js +28 -0
  77. package/dist/collection/components/viewer-grid/viewer-grid.css +251 -0
  78. package/dist/collection/components/viewer-grid/viewer-grid.js +127 -0
  79. package/dist/collection/components/viewer-grid/viewer-grid.template.js +23 -0
  80. package/dist/custom-elements/index.d.ts +12 -0
  81. package/dist/custom-elements/index.js +1130 -117
  82. package/dist/dso-toolkit/dso-toolkit.css +1 -1
  83. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  84. package/dist/dso-toolkit/p-06de0fa1.entry.js +1 -0
  85. package/dist/dso-toolkit/p-10aa1fba.entry.js +1 -0
  86. package/dist/dso-toolkit/p-17f073d1.entry.js +1 -0
  87. package/dist/dso-toolkit/p-1805f5b0.js +1 -0
  88. package/dist/dso-toolkit/{p-75233655.entry.js → p-1fefbf8c.entry.js} +1 -1
  89. package/dist/dso-toolkit/{p-a52d3623.entry.js → p-20856f91.entry.js} +1 -1
  90. package/dist/dso-toolkit/{p-262858dd.entry.js → p-2b6a3dfa.entry.js} +1 -1
  91. package/dist/dso-toolkit/{p-be5682cc.entry.js → p-348414bf.entry.js} +1 -1
  92. package/dist/dso-toolkit/{p-984551a8.entry.js → p-3b493a2c.entry.js} +1 -1
  93. package/dist/dso-toolkit/p-4e573fc5.entry.js +1 -0
  94. package/dist/dso-toolkit/{p-c9c1bc8f.entry.js → p-5037944e.entry.js} +1 -1
  95. package/dist/dso-toolkit/p-7b006b11.entry.js +1 -0
  96. package/dist/dso-toolkit/p-8bf3a60e.js +5 -0
  97. package/dist/dso-toolkit/p-8f21d07d.entry.js +5 -0
  98. package/dist/dso-toolkit/{p-83f166b3.entry.js → p-94dffa65.entry.js} +1 -1
  99. package/dist/dso-toolkit/{p-b07991b9.entry.js → p-951f5872.entry.js} +1 -1
  100. package/dist/dso-toolkit/p-a6c9e063.entry.js +1 -0
  101. package/dist/dso-toolkit/p-a7306b7b.entry.js +1 -0
  102. package/dist/dso-toolkit/p-aadc4f8e.entry.js +1 -0
  103. package/dist/dso-toolkit/p-ad2210ad.entry.js +1 -0
  104. package/dist/dso-toolkit/{p-b5b946de.entry.js → p-bc14cafd.entry.js} +1 -1
  105. package/dist/dso-toolkit/{p-5665f1ee.entry.js → p-c54ecae1.entry.js} +1 -1
  106. package/dist/dso-toolkit/p-c95108fe.entry.js +1 -0
  107. package/dist/dso-toolkit/{p-e814d644.entry.js → p-daa1e29d.entry.js} +1 -1
  108. package/dist/dso-toolkit/p-dad72605.js +1 -0
  109. package/dist/dso-toolkit/{p-2e7d535c.entry.js → p-dc86d830.entry.js} +1 -1
  110. package/dist/dso-toolkit/{p-19de4cc7.entry.js → p-f0b67246.entry.js} +1 -1
  111. package/dist/esm/dso-alert.entry.js +1 -1
  112. package/dist/esm/dso-attachments-counter.entry.js +2 -2
  113. package/dist/esm/dso-autosuggest.entry.js +7 -71
  114. package/dist/esm/dso-badge.entry.js +1 -1
  115. package/dist/esm/dso-banner.entry.js +1 -1
  116. package/dist/esm/dso-date-picker.entry.js +11 -11
  117. package/dist/esm/dso-dropdown-menu.entry.js +17 -230
  118. package/dist/esm/dso-header.entry.js +97 -0
  119. package/dist/esm/dso-helpcenter-panel.entry.js +1 -1
  120. package/dist/esm/dso-highlight-box.entry.js +1 -1
  121. package/dist/esm/dso-icon.entry.js +1 -1
  122. package/dist/esm/dso-info-button.entry.js +2 -2
  123. package/dist/esm/dso-info_2.entry.js +2 -2
  124. package/dist/esm/dso-label.entry.js +2 -2
  125. package/dist/esm/dso-map-base-layers.entry.js +7 -6
  126. package/dist/esm/dso-map-controls.entry.js +3 -3
  127. package/dist/esm/dso-map-overlays.entry.js +9 -10
  128. package/dist/esm/dso-ozon-content.entry.js +1 -1
  129. package/dist/esm/dso-progress-bar.entry.js +1 -1
  130. package/dist/esm/dso-progress-indicator.entry.js +1 -1
  131. package/dist/esm/dso-toggletip.entry.js +1 -1
  132. package/dist/esm/dso-toolkit.js +2 -2
  133. package/dist/esm/dso-tooltip.entry.js +169 -76
  134. package/dist/esm/dso-tree-view.entry.js +2 -2
  135. package/dist/esm/dso-viewer-grid.entry.js +774 -0
  136. package/dist/esm/{index-61410be2.js → index-d54cae76.js} +26 -2
  137. package/dist/esm/index-f2bf58ce.js +70 -0
  138. package/dist/esm/index.esm-a1362957.js +262 -0
  139. package/dist/esm/loader.js +2 -2
  140. package/dist/types/components/anchor/anchor.template.d.ts +2 -0
  141. package/dist/types/components/autosuggest/autosuggest.d.ts +5 -0
  142. package/dist/types/components/autosuggest/autosuggest.template.d.ts +1 -1
  143. package/dist/types/components/button/button.template.d.ts +2 -0
  144. package/dist/types/components/context/context.template.d.ts +3 -0
  145. package/dist/types/components/definition-list/definition-list.template.d.ts +3 -0
  146. package/dist/types/components/dropdown-menu/dropdown-menu.d.ts +1 -1
  147. package/dist/types/components/header/header.d.ts +36 -0
  148. package/dist/types/components/header/header.template.d.ts +2 -0
  149. package/dist/types/components/label-group/label-group.template.d.ts +2 -0
  150. package/dist/types/components/list/list.template.d.ts +3 -0
  151. package/dist/types/components/map-base-layers/map-base-layers.d.ts +3 -4
  152. package/dist/types/components/map-base-layers/map-base-layers.interfaces.d.ts +6 -1
  153. package/dist/types/components/map-controls/map-controls.template.d.ts +1 -1
  154. package/dist/types/components/map-overlays/map-overlays.d.ts +4 -4
  155. package/dist/types/components/map-overlays/map-overlays.interfaces.d.ts +7 -1
  156. package/dist/types/components/tooltip/tooltip.d.ts +1 -0
  157. package/dist/types/components/viewer-grid/viewer-grid-document-header.template.d.ts +3 -0
  158. package/dist/types/components/viewer-grid/viewer-grid-document-list-item.template.d.ts +3 -0
  159. package/dist/types/components/viewer-grid/viewer-grid-filterblok.template.d.ts +3 -0
  160. package/dist/types/components/viewer-grid/viewer-grid.d.ts +22 -0
  161. package/dist/types/components/viewer-grid/viewer-grid.template.d.ts +3 -0
  162. package/dist/types/components.d.ts +54 -8
  163. package/package.json +4 -2
  164. package/dist/dso-toolkit/p-08427682.entry.js +0 -1
  165. package/dist/dso-toolkit/p-39dae284.entry.js +0 -1
  166. package/dist/dso-toolkit/p-741e96de.entry.js +0 -5
  167. package/dist/dso-toolkit/p-759920d0.entry.js +0 -1
  168. package/dist/dso-toolkit/p-9e9f8bcf.entry.js +0 -1
  169. package/dist/dso-toolkit/p-a40eeb32.js +0 -1
  170. package/dist/dso-toolkit/p-affe82e6.entry.js +0 -1
  171. package/dist/dso-toolkit/p-e03d7741.entry.js +0 -1
  172. package/dist/dso-toolkit/p-e4269e02.entry.js +0 -1
  173. package/dist/dso-toolkit/p-e7700d9e.entry.js +0 -1
@@ -0,0 +1,294 @@
1
+ import { Component, Element, Fragment, h, Prop, State, Watch, } from "@stencil/core";
2
+ import clsx from "clsx";
3
+ import debounce from "debounce";
4
+ const minDesktopViewportWidth = 992;
5
+ export class Header {
6
+ constructor() {
7
+ this.useDropDownMenu = "auto";
8
+ this.showDropDown = false;
9
+ this.isLoggedIn = false;
10
+ this.hasSubLogo = false;
11
+ this.overflowMenuItems = 0;
12
+ this.onWindowResize = debounce(() => {
13
+ this.setDropDownMenu();
14
+ this.setOverflowMenu();
15
+ }, 100);
16
+ }
17
+ watchUseDropDownMenu(value) {
18
+ if (value === "auto") {
19
+ this.setDropDownMenu();
20
+ return;
21
+ }
22
+ this.showDropDown = value === "always";
23
+ }
24
+ componentWillLoad() {
25
+ this.hasSubLogo = this.host.querySelector("*[slot = 'sub-logo']") !== null;
26
+ }
27
+ shrinkMenuToFit() {
28
+ if (!this.wrapper || !this.nav) {
29
+ return;
30
+ }
31
+ if (this.wrapper.clientWidth >= this.nav.clientWidth) {
32
+ return;
33
+ }
34
+ if (this.overflowMenuItems >= this.mainMenu.length) {
35
+ return;
36
+ }
37
+ this.overflowMenuItems++;
38
+ }
39
+ componentDidRender() {
40
+ if (this.showDropDown) {
41
+ return;
42
+ }
43
+ window.setTimeout(() => this.shrinkMenuToFit(), 0);
44
+ }
45
+ setOverflowMenu() {
46
+ if (this.showDropDown) {
47
+ return;
48
+ }
49
+ if (this.overflowMenuItems != 0) {
50
+ this.overflowMenuItems = 0;
51
+ return;
52
+ }
53
+ this.shrinkMenuToFit();
54
+ }
55
+ setDropDownMenu() {
56
+ if (this.useDropDownMenu !== "auto") {
57
+ return;
58
+ }
59
+ this.showDropDown = window.innerWidth < minDesktopViewportWidth;
60
+ }
61
+ connectedCallback() {
62
+ window.addEventListener("resize", this.onWindowResize);
63
+ }
64
+ disconnectedCallback() {
65
+ window.removeEventListener("resize", this.onWindowResize);
66
+ }
67
+ MenuItem(item) {
68
+ return (h("li", { class: item.active ? "dso-active" : undefined },
69
+ h("a", { href: item.url, "aria-current": item.active ? "page" : undefined }, item.label)));
70
+ }
71
+ render() {
72
+ return (h(Fragment, null,
73
+ h("div", { class: clsx("dso-header", {
74
+ ["use-drop-down"]: this.showDropDown,
75
+ ["has-sub-logo"]: this.hasSubLogo,
76
+ }), ref: (element) => (this.wrapper = element) },
77
+ h("div", { class: "logo-container" },
78
+ h("div", { class: "logo" },
79
+ h("slot", { name: "logo" })),
80
+ h("div", { class: "sub-logo" },
81
+ h("slot", { name: "sub-logo" }))),
82
+ this.showDropDown && (h("div", { class: "dropdown" },
83
+ h("dso-dropdown-menu", { "dropdown-align": "right" },
84
+ h("button", { type: "button", class: "tertiary", slot: "toggle" },
85
+ h("span", null, "Menu")),
86
+ h("div", { class: "dso-dropdown-options" },
87
+ h("dso-dropdown-options", null,
88
+ h("ul", null,
89
+ this.mainMenu.map(this.MenuItem),
90
+ this.userHomeUrl && (h("li", null,
91
+ h("a", { href: this.userHomeUrl }, "Mijn Omgevingsloket"))),
92
+ this.loginUrl && !this.isLoggedIn && (h("li", null,
93
+ h("a", { href: this.loginUrl }, "Inloggen"))),
94
+ this.userProfileUrl &&
95
+ this.userProfileName &&
96
+ this.isLoggedIn && (h("li", null,
97
+ h("a", { href: this.userProfileUrl },
98
+ this.userProfileName,
99
+ h("span", { class: "profile-label" }, "- Mijn profiel")))),
100
+ this.logoutUrl && this.isLoggedIn && (h("li", null,
101
+ h("a", { href: this.logoutUrl }, "Uitloggen"))))))))),
102
+ !this.showDropDown && (h(Fragment, null,
103
+ h("div", { class: "dso-header-session" },
104
+ this.userProfileUrl &&
105
+ this.userProfileName &&
106
+ this.isLoggedIn && (h("div", { class: "profile" },
107
+ h("span", { class: "profile-label" }, "Welkom:"),
108
+ h("a", { href: this.userProfileUrl }, this.userProfileName))),
109
+ this.loginUrl && !this.isLoggedIn && (h("div", { class: "login" },
110
+ h("a", { href: this.loginUrl }, "Inloggen"))),
111
+ this.logoutUrl && this.isLoggedIn && (h("div", { class: "logout" },
112
+ h("a", { href: this.logoutUrl }, "Uitloggen")))),
113
+ h("nav", { class: "dso-navbar" },
114
+ h("ul", { class: "dso-nav dso-nav-main", ref: (element) => (this.nav = element) },
115
+ this.mainMenu
116
+ .filter((_, index) => index < this.mainMenu.length - this.overflowMenuItems)
117
+ .map(this.MenuItem),
118
+ this.overflowMenuItems > 0 && (h("li", null,
119
+ h("dso-dropdown-menu", { "dropdown-align": "left" },
120
+ h("button", { type: "button", class: "tertiary", slot: "toggle" },
121
+ h("span", null, "Meer")),
122
+ h("div", { class: "dso-dropdown-options" },
123
+ h("dso-dropdown-options", null,
124
+ h("ul", null, this.mainMenu
125
+ .filter((_, index) => index >=
126
+ this.mainMenu.length -
127
+ this.overflowMenuItems)
128
+ .map(this.MenuItem))))))),
129
+ this.userHomeUrl && (h("li", { class: "menu-user-home" },
130
+ h("a", { href: this.userHomeUrl },
131
+ h("dso-icon", { icon: "user-line" }),
132
+ "Mijn Omgevingsloket"))))))))));
133
+ }
134
+ static get is() { return "dso-header"; }
135
+ static get encapsulation() { return "shadow"; }
136
+ static get originalStyleUrls() { return {
137
+ "$": ["header.scss"]
138
+ }; }
139
+ static get styleUrls() { return {
140
+ "$": ["header.css"]
141
+ }; }
142
+ static get properties() { return {
143
+ "loginUrl": {
144
+ "type": "string",
145
+ "mutable": false,
146
+ "complexType": {
147
+ "original": "string",
148
+ "resolved": "string | undefined",
149
+ "references": {}
150
+ },
151
+ "required": false,
152
+ "optional": true,
153
+ "docs": {
154
+ "tags": [],
155
+ "text": ""
156
+ },
157
+ "attribute": "login-url",
158
+ "reflect": false
159
+ },
160
+ "logoutUrl": {
161
+ "type": "string",
162
+ "mutable": false,
163
+ "complexType": {
164
+ "original": "string",
165
+ "resolved": "string | undefined",
166
+ "references": {}
167
+ },
168
+ "required": false,
169
+ "optional": true,
170
+ "docs": {
171
+ "tags": [],
172
+ "text": ""
173
+ },
174
+ "attribute": "logout-url",
175
+ "reflect": false
176
+ },
177
+ "mainMenu": {
178
+ "type": "unknown",
179
+ "mutable": false,
180
+ "complexType": {
181
+ "original": "HeaderMenuItem[]",
182
+ "resolved": "HeaderMenuItem[]",
183
+ "references": {
184
+ "HeaderMenuItem": {
185
+ "location": "local"
186
+ }
187
+ }
188
+ },
189
+ "required": true,
190
+ "optional": false,
191
+ "docs": {
192
+ "tags": [],
193
+ "text": ""
194
+ }
195
+ },
196
+ "useDropDownMenu": {
197
+ "type": "string",
198
+ "mutable": false,
199
+ "complexType": {
200
+ "original": "\"always\" | \"never\" | \"auto\"",
201
+ "resolved": "\"always\" | \"auto\" | \"never\"",
202
+ "references": {}
203
+ },
204
+ "required": false,
205
+ "optional": false,
206
+ "docs": {
207
+ "tags": [],
208
+ "text": ""
209
+ },
210
+ "attribute": "use-drop-down-menu",
211
+ "reflect": false,
212
+ "defaultValue": "\"auto\""
213
+ },
214
+ "isLoggedIn": {
215
+ "type": "boolean",
216
+ "mutable": false,
217
+ "complexType": {
218
+ "original": "boolean",
219
+ "resolved": "boolean",
220
+ "references": {}
221
+ },
222
+ "required": false,
223
+ "optional": false,
224
+ "docs": {
225
+ "tags": [],
226
+ "text": ""
227
+ },
228
+ "attribute": "is-logged-in",
229
+ "reflect": false,
230
+ "defaultValue": "false"
231
+ },
232
+ "userProfileName": {
233
+ "type": "string",
234
+ "mutable": false,
235
+ "complexType": {
236
+ "original": "string",
237
+ "resolved": "string | undefined",
238
+ "references": {}
239
+ },
240
+ "required": false,
241
+ "optional": true,
242
+ "docs": {
243
+ "tags": [],
244
+ "text": ""
245
+ },
246
+ "attribute": "user-profile-name",
247
+ "reflect": false
248
+ },
249
+ "userProfileUrl": {
250
+ "type": "string",
251
+ "mutable": false,
252
+ "complexType": {
253
+ "original": "string",
254
+ "resolved": "string | undefined",
255
+ "references": {}
256
+ },
257
+ "required": false,
258
+ "optional": true,
259
+ "docs": {
260
+ "tags": [],
261
+ "text": ""
262
+ },
263
+ "attribute": "user-profile-url",
264
+ "reflect": false
265
+ },
266
+ "userHomeUrl": {
267
+ "type": "string",
268
+ "mutable": false,
269
+ "complexType": {
270
+ "original": "string",
271
+ "resolved": "string | undefined",
272
+ "references": {}
273
+ },
274
+ "required": false,
275
+ "optional": true,
276
+ "docs": {
277
+ "tags": [],
278
+ "text": ""
279
+ },
280
+ "attribute": "user-home-url",
281
+ "reflect": false
282
+ }
283
+ }; }
284
+ static get states() { return {
285
+ "showDropDown": {},
286
+ "hasSubLogo": {},
287
+ "overflowMenuItems": {}
288
+ }; }
289
+ static get elementRef() { return "host"; }
290
+ static get watchers() { return [{
291
+ "propName": "useDropDownMenu",
292
+ "methodName": "watchUseDropDownMenu"
293
+ }]; }
294
+ }
@@ -0,0 +1,32 @@
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, }) {
4
+ const bindLoginUrl = showLoggedIn && loginUrl ? loginUrl : undefined;
5
+ const bindLogoutUrl = showLoggedIn && logoutUrl ? logoutUrl : undefined;
6
+ return showSubLogo
7
+ ? html `<dso-header
8
+ .mainMenu=${mainMenu}
9
+ use-drop-down-menu=${ifDefined(useDropDownMenu)}
10
+ is-logged-in=${ifDefined(isLoggedIn)}
11
+ login-url=${ifDefined(bindLoginUrl)}
12
+ logout-url=${ifDefined(bindLogoutUrl)}
13
+ user-profile-url=${ifDefined(userProfileUrl)}
14
+ user-profile-name=${ifDefined(userProfileName)}
15
+ user-home-url=${ifDefined(userHomeUrl)}
16
+ >
17
+ <div slot="logo"><img height="40" alt="Omgevingsloket" src="${logo}" /></div>
18
+ <div slot="sub-logo"><img alt="Regels op de kaart" src="${subLogo}" /></div></div>
19
+ </dso-header>`
20
+ : html `<dso-header
21
+ .mainMenu=${mainMenu}
22
+ use-drop-down-menu=${ifDefined(useDropDownMenu)}
23
+ is-logged-in=${ifDefined(isLoggedIn)}
24
+ login-url=${ifDefined(bindLoginUrl)}
25
+ logout-url=${ifDefined(bindLogoutUrl)}
26
+ user-profile-url=${ifDefined(userProfileUrl)}
27
+ user-profile-name=${ifDefined(userProfileName)}
28
+ user-home-url=${ifDefined(userHomeUrl)}
29
+ >
30
+ <div slot="logo"><img alt="Omgevingsloket" src="${logo}" /></div>
31
+ </dso-header>`;
32
+ }
@@ -1,6 +1,3 @@
1
- /* stylelint-disable value-keyword-case */
2
- /* stylelint-disable string-no-newline */
3
- /* stylelint-enable */
4
1
  :host {
5
2
  display: block;
6
3
  --di-times: url("data:image/svg+xml,%3csvg id='times' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%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");
@@ -1,6 +1,3 @@
1
- /* stylelint-disable value-keyword-case */
2
- /* stylelint-disable string-no-newline */
3
- /* stylelint-enable */
4
1
  :host {
5
2
  --di-external-link-grijs90: url("data:image/svg+xml,%3csvg id='external-link' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23191919%3b'%3e %3cpath fill='currentColor' d='M19%2c6V9.69c0%2c.33-.2.41-.43.17L17.06%2c8.35l-3.35%2c3.36a1%2c1%2c0%2c0%2c1-1.42%2c0%2c1%2c1%2c0%2c0%2c1%2c0-1.42l3.36-3.35L14.14%2c5.43C13.9%2c5.19%2c14%2c5%2c14.31%2c5H19V6ZM18%2c17V13a1%2c1%2c0%2c0%2c0-2%2c0v4a1%2c1%2c0%2c0%2c1-1%2c1H7a1%2c1%2c0%2c0%2c1-1-1V9A1%2c1%2c0%2c0%2c1%2c7%2c8h4a1%2c1%2c0%2c0%2c0%2c0-2H7A3%2c3%2c0%2c0%2c0%2c4%2c9v8a3%2c3%2c0%2c0%2c0%2c3%2c3h8A3%2c3%2c0%2c0%2c0%2c18%2c17Z'/%3e %3c/svg%3e");
6
3
  --di-download-grijs90: url("data:image/svg+xml,%3csvg id='download' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23191919%3b'%3e %3cpath fill='currentColor' d='M18.72%2c10.44%2c12%2c17l-6.7-6.52C4.8%2c10%2c5%2c9.63%2c5.63%2c9.63H8.5V1.82A.8.8%2c0%2c0%2c1%2c9.28%2c1h5.44a.8.8%2c0%2c0%2c1%2c.78.82V9.61h2.87C19%2c9.6%2c19.2%2c10%2c18.72%2c10.44ZM1%2c17v6H23V17Zm16%2c3a2%2c2%2c0%2c1%2c1-2-2A2%2c2%2c0%2c0%2c1%2c17%2c20Zm5%2c0a2%2c2%2c0%2c1%2c1-2-2A2%2c2%2c0%2c0%2c1%2c22%2c20Z'/%3e %3c/svg%3e");
@@ -1,8 +1,4 @@
1
- /* stylelint-disable value-keyword-case */
2
- /* stylelint-disable string-no-newline */
3
- /* stylelint-enable */
4
1
  :host {
5
- /* stylelint-disable-next-line no-invalid-position-at-import-rule */
6
2
  display: inline-block;
7
3
  height: 1.5em;
8
4
  vertical-align: top;
@@ -1,8 +1,5 @@
1
- /* stylelint-disable value-keyword-case */
2
- /* stylelint-disable string-no-newline */
3
- /* stylelint-enable */
4
1
  :host {
5
- --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");
2
+ --di-times-grijs90: url("data:image/svg+xml,%3csvg id='times' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23191919%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");
6
3
  display: block;
7
4
  background-color: #f2f2f2;
8
5
  padding: 16px 32px 16px 16px;
@@ -1,6 +1,3 @@
1
- /* stylelint-disable value-keyword-case */
2
- /* stylelint-disable string-no-newline */
3
- /* stylelint-enable */
4
1
  :host {
5
2
  display: inline-block;
6
3
  --di-info: url("data:image/svg+xml,%3csvg id='info' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M12%2c3a9%2c9%2c0%2c1%2c1-9%2c9%2c9%2c9%2c0%2c0%2c1%2c9-9m0-2A11%2c11%2c0%2c1%2c0%2c23%2c12%2c11%2c11%2c0%2c0%2c0%2c12%2c1Zm0%2c8a1%2c1%2c0%2c1%2c0-1-1A1%2c1%2c0%2c0%2c0%2c12%2c9Zm1%2c7.79V11.21A1.12%2c1.12%2c0%2c0%2c0%2c12%2c10a1.12%2c1.12%2c0%2c0%2c0-1%2c1.21v5.58A1.12%2c1.12%2c0%2c0%2c0%2c12%2c18%2c1.12%2c1.12%2c0%2c0%2c0%2c13%2c16.79Z'/%3e %3c/svg%3e");
@@ -36,6 +33,7 @@ button {
36
33
  border: 1px solid transparent;
37
34
  margin-left: 8px;
38
35
  padding: 0;
36
+ cursor: pointer;
39
37
  }
40
38
  button.dso-open, button:hover, button:active {
41
39
  --dso-icon: var(--di-info-active);
@@ -1,6 +1,3 @@
1
- /* stylelint-disable value-keyword-case */
2
- /* stylelint-disable string-no-newline */
3
- /* stylelint-enable */
4
1
  :host {
5
2
  display: inline-block;
6
3
  }
@@ -9,7 +9,8 @@ export class Label {
9
9
  status,
10
10
  ": ")),
11
11
  h("slot", null),
12
- this.removable && (h("button", { type: "button", onClick: e => this.removeClick.emit(e), title: "Verwijder", onMouseEnter: () => this.hover = true, onMouseLeave: () => this.hover = false },
12
+ this.removable && (h("button", { type: "button", onClick: e => this.removeClick.emit(e), onMouseEnter: () => this.hover = true, onMouseLeave: () => this.hover = false },
13
+ h("span", { class: "sr-only" }, "Verwijder"),
13
14
  h("dso-icon", { icon: "times" })))));
14
15
  }
15
16
  static get is() { return "dso-label"; }
@@ -0,0 +1,7 @@
1
+ import { html } from 'lit-html';
2
+ import { labelTemplate } from '../label/label.template';
3
+ export function labelGroupTemplate({ labels }) {
4
+ return html `<div class="dso-label-group">
5
+ ${labels.map(labels => labelTemplate(labels))}
6
+ </div>`;
7
+ }
@@ -0,0 +1,37 @@
1
+ // Keep in sync with packages\css\src\components\list\list.template.ts (https://github.com/dso-toolkit/dso-toolkit/issues/1438)
2
+ import { Type } from '@dso-toolkit/sources';
3
+ import { html } from 'lit-html';
4
+ import { classMap } from 'lit-html/directives/class-map';
5
+ function ul(children, modifier) {
6
+ return html `
7
+ <ul class="${classMap({
8
+ 'list-group': modifier === 'group',
9
+ 'dso-columns-list': modifier === 'columns'
10
+ })}">
11
+ ${children}
12
+ </ul>
13
+ `;
14
+ }
15
+ function ol(children, modifier) {
16
+ return html `
17
+ <ol class="${classMap({
18
+ 'list-group': modifier === 'group',
19
+ 'dso-columns-list': modifier === 'columns'
20
+ })}">
21
+ ${children}
22
+ </ol>
23
+ `;
24
+ }
25
+ export function listTemplate({ type, items, modifier }) {
26
+ const children = html `
27
+ ${items.map(item => html `
28
+ <li class="${classMap({ 'list-group-item': modifier === 'group' })}">
29
+ ${item}
30
+ </li>
31
+ `)}
32
+ `;
33
+ if (type === Type.Ol) {
34
+ return ol(children, modifier);
35
+ }
36
+ return ul(children, modifier);
37
+ }
@@ -1,6 +1,3 @@
1
- /* stylelint-disable value-keyword-case */
2
- /* stylelint-disable string-no-newline */
3
- /* stylelint-enable */
4
1
  :host {
5
2
  display: block;
6
3
  }
@@ -34,4 +31,8 @@ fieldset .control-label {
34
31
  margin-bottom: 8px;
35
32
  max-width: 100%;
36
33
  text-align: left;
34
+ }
35
+
36
+ p[slot=info] {
37
+ margin: 0;
37
38
  }
@@ -1,15 +1,18 @@
1
1
  import { Component, h, Prop, Event } from '@stencil/core';
2
2
  export class MapBaseLayers {
3
- selectBaseLayer(baseLayer) {
4
- this.selectedBaseLayer = baseLayer;
5
- this.baseLayerChange.emit(baseLayer);
3
+ baseLayerChangeHandler(baseLayer) {
4
+ this.baseLayerChange.emit({ activeBaseLayer: baseLayer });
6
5
  }
7
6
  render() {
8
7
  return (h("fieldset", { class: "form-group dso-radios" },
9
8
  h("legend", { class: "sr-only" }, "Achtergrond"),
10
9
  h("div", { class: "dso-label-container" },
11
10
  h("span", { class: "control-label", "aria-hidden": "true" }, "Achtergrond")),
12
- h("div", { class: "dso-field-container" }, this.baseLayers.map((baseLayer, i) => (h("dso-selectable", { key: baseLayer.id, type: "radio", value: baseLayer.name, checked: !this.selectedBaseLayer && i === 0 || this.selectedBaseLayer === baseLayer, onDsoChange: () => this.selectBaseLayer(baseLayer) }, baseLayer.name))))));
11
+ h("div", { class: "dso-field-container" }, this.baseLayers.map(baseLayer => (h("dso-selectable", { key: baseLayer.id, type: "radio", value: baseLayer.name, checked: baseLayer.checked, disabled: baseLayer.disabled, onDsoChange: () => this.baseLayerChangeHandler(baseLayer) },
12
+ baseLayer.name,
13
+ baseLayer.info
14
+ ? h("p", { slot: "info" }, baseLayer.info)
15
+ : null))))));
13
16
  }
14
17
  static get is() { return "dso-map-base-layers"; }
15
18
  static get encapsulation() { return "shadow"; }
@@ -39,26 +42,6 @@ export class MapBaseLayers {
39
42
  "tags": [],
40
43
  "text": ""
41
44
  }
42
- },
43
- "selectedBaseLayer": {
44
- "type": "unknown",
45
- "mutable": true,
46
- "complexType": {
47
- "original": "BaseLayer | undefined",
48
- "resolved": "BaseLayer | undefined",
49
- "references": {
50
- "BaseLayer": {
51
- "location": "import",
52
- "path": "./map-base-layers.interfaces"
53
- }
54
- }
55
- },
56
- "required": false,
57
- "optional": false,
58
- "docs": {
59
- "tags": [],
60
- "text": ""
61
- }
62
45
  }
63
46
  }; }
64
47
  static get events() { return [{
@@ -72,10 +55,10 @@ export class MapBaseLayers {
72
55
  "text": ""
73
56
  },
74
57
  "complexType": {
75
- "original": "BaseLayer",
76
- "resolved": "BaseLayer",
58
+ "original": "BaseLayerChangeEvent",
59
+ "resolved": "BaseLayerChangeEvent",
77
60
  "references": {
78
- "BaseLayer": {
61
+ "BaseLayerChangeEvent": {
79
62
  "location": "import",
80
63
  "path": "./map-base-layers.interfaces"
81
64
  }
@@ -1,6 +1,3 @@
1
- /* stylelint-disable value-keyword-case */
2
- /* stylelint-disable string-no-newline */
3
- /* stylelint-enable */
4
1
  button {
5
2
  -webkit-appearance: button;
6
3
  color: inherit;
@@ -48,14 +45,6 @@ button::-moz-focus-inner {
48
45
  display: none;
49
46
  }
50
47
 
51
- #controls {
52
- align-items: start;
53
- display: flex;
54
- position: absolute;
55
- right: calc(100% + 16px);
56
- top: 16px;
57
- }
58
-
59
48
  #toggle-visibility-button {
60
49
  display: inline-block;
61
50
  font-size: 1em;
@@ -81,6 +70,9 @@ button::-moz-focus-inner {
81
70
  margin-right: 16px;
82
71
  padding: 8px 16px;
83
72
  white-space: nowrap;
73
+ position: absolute;
74
+ right: calc(100% + 56px);
75
+ top: 16px;
84
76
  }
85
77
  #toggle-visibility-button:focus, #toggle-visibility-button:focus-visible {
86
78
  outline-offset: 2px;
@@ -157,6 +149,12 @@ button::-moz-focus-inner {
157
149
  margin-left: 8px;
158
150
  margin-right: -8px;
159
151
  }
152
+ #toggle-visibility-button:focus-visible {
153
+ background-color: #39870c;
154
+ border-color: #39870c;
155
+ color: #fff;
156
+ outline: none;
157
+ }
160
158
 
161
159
  #zoom-buttons {
162
160
  border-radius: 4px;
@@ -164,6 +162,9 @@ button::-moz-focus-inner {
164
162
  display: flex;
165
163
  flex-wrap: wrap;
166
164
  flex: 0 0;
165
+ position: absolute;
166
+ right: calc(100% + 16px);
167
+ top: 16px;
167
168
  }
168
169
  #zoom-buttons button {
169
170
  display: inline-block;
@@ -269,6 +270,12 @@ button::-moz-focus-inner {
269
270
  clip: rect(0, 0, 0, 0);
270
271
  border: 0;
271
272
  }
273
+ #zoom-buttons button:focus-visible {
274
+ background-color: #39870c;
275
+ border-color: #39870c;
276
+ color: #fff;
277
+ outline: none;
278
+ }
272
279
  #zoom-buttons button + button {
273
280
  border-radius: 0;
274
281
  border-bottom-left-radius: 4px;
@@ -35,17 +35,16 @@ export class MapControls {
35
35
  }
36
36
  render() {
37
37
  return (h(Host, null,
38
- h("div", { id: "controls" },
39
- h("button", { type: "button", id: "toggle-visibility-button", onClick: () => this.open = !this.open, ref: element => __classPrivateFieldSet(this, _toggleButtonElement, element) },
40
- h("dso-icon", { icon: "layers" }),
41
- h("span", null, "Kaartlagen")),
42
- h("div", { id: "zoom-buttons" },
43
- h("button", { type: "button", onClick: e => this.zoomIn.emit(e), disabled: this.disableZoom === 'in' || this.disableZoom === 'both' },
44
- h("span", null, "Zoom in"),
45
- h("dso-icon", { icon: "plus" })),
46
- h("button", { type: "button", onClick: e => this.zoomOut.emit(e), disabled: this.disableZoom === 'out' || this.disableZoom === 'both' },
47
- h("span", null, "Zoom uit"),
48
- h("dso-icon", { icon: "minus" })))),
38
+ h("button", { type: "button", id: "toggle-visibility-button", onClick: () => this.open = !this.open, ref: element => __classPrivateFieldSet(this, _toggleButtonElement, element) },
39
+ h("dso-icon", { icon: "layers" }),
40
+ h("span", null, "Kaartlagen")),
41
+ h("div", { id: "zoom-buttons" },
42
+ h("button", { type: "button", onClick: e => this.zoomIn.emit(e), disabled: this.disableZoom === 'in' || this.disableZoom === 'both' },
43
+ h("span", null, "Zoom in"),
44
+ h("dso-icon", { icon: "plus" })),
45
+ h("button", { type: "button", onClick: e => this.zoomOut.emit(e), disabled: this.disableZoom === 'out' || this.disableZoom === 'both' },
46
+ h("span", null, "Zoom uit"),
47
+ h("dso-icon", { icon: "minus" }))),
49
48
  h("section", { hidden: this.hideContent },
50
49
  h("header", null,
51
50
  h("h2", null, "Kaartlagen"),
@@ -1,6 +1,5 @@
1
- import { checkFix } from '@dso-toolkit/sources';
2
1
  import { html } from 'lit-html';
3
- export function mapControlsTemplate({ zoomIn, zoomOut, open, baseLayers, selectedBaseLayer, baseLayerChange, overlays, checkedOverlays, checkedOverlaysChange, disableZoom }) {
2
+ export function mapControlsTemplate({ zoomIn, zoomOut, open, baseLayers, baseLayerChange, overlays, toggleOverlay, disableZoom }) {
4
3
  return html `
5
4
  <dso-map-controls
6
5
  @zoomIn=${zoomIn}
@@ -8,24 +7,17 @@ export function mapControlsTemplate({ zoomIn, zoomOut, open, baseLayers, selecte
8
7
  .disableZoom=${disableZoom}
9
8
  ?open=${open}
10
9
  >
11
- <form>
12
- <div class="rich-content">
13
- <p>Inhoud</p>
14
- </div>
15
- <dso-map-base-layers
16
- .baseLayers=${baseLayers}
17
- .selectedBaseLayer=${selectedBaseLayer}
18
- @baseLayerChange=${(e) => baseLayerChange(e.detail)}
19
- ></dso-map-base-layers>
20
- <dso-map-overlays
21
- .overlays=${overlays}
22
- .checkedOverlays=${checkFix(checkedOverlays, overlays, o => o.name)}
23
- @checkedOverlaysChange=${(e) => checkedOverlaysChange(e.detail)}
24
- ></dso-map-overlays>
25
- <div class="rich-content">
26
- <p>Ook nog meer inhoud</p>
27
- </div>
28
- </form>
10
+ <dso-map-base-layers
11
+ .baseLayers=${baseLayers}
12
+ @baseLayerChange=${(e) => baseLayerChange(e)}
13
+ ></dso-map-base-layers>
14
+ <dso-map-overlays
15
+ .overlays=${overlays}
16
+ @toggleOverlay=${(e) => toggleOverlay(e)}
17
+ ></dso-map-overlays>
18
+ <div class="dso-rich-content">
19
+ <p>Dit is een Web Component wat aangesloten kan worden op Leaflet.js of OpenLayers.</p>
20
+ </div>
29
21
  </dso-map-controls>
30
22
  `;
31
23
  }