@dso-toolkit/core 41.0.0 → 43.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/dso-alert.cjs.entry.js +1 -1
- package/dist/cjs/dso-autosuggest.cjs.entry.js +17 -8
- package/dist/cjs/dso-badge.cjs.entry.js +1 -1
- package/dist/cjs/dso-banner.cjs.entry.js +1 -1
- package/dist/cjs/dso-header.cjs.entry.js +31 -21
- package/dist/cjs/dso-helpcenter-panel.cjs.entry.js +1 -1
- package/dist/cjs/dso-icon.cjs.entry.js +15 -24
- package/dist/cjs/dso-image-overlay.cjs.entry.js +1 -1
- package/dist/cjs/dso-label.cjs.entry.js +78 -3
- package/dist/cjs/dso-map-controls.cjs.entry.js +1 -1
- package/dist/cjs/dso-ozon-content.cjs.entry.js +32 -3
- package/dist/cjs/dso-pagination.cjs.entry.js +5 -2
- package/dist/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/cjs/dso-tooltip.cjs.entry.js +7 -0
- package/dist/cjs/dso-tree-view.cjs.entry.js +24 -2
- package/dist/cjs/dso-viewer-grid.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/alert/alert.css +4 -4
- package/dist/collection/components/autosuggest/autosuggest.js +37 -9
- package/dist/collection/components/autosuggest/autosuggest.template.js +2 -1
- package/dist/collection/components/badge/badge.css +4 -1
- package/dist/collection/components/banner/banner.css +2 -2
- package/dist/collection/components/header/header.css +146 -0
- package/dist/collection/components/header/header.interfaces.js +1 -0
- package/dist/collection/components/header/header.js +94 -100
- package/dist/collection/components/header/header.template.js +15 -31
- package/dist/collection/components/helpcenter-panel/helpcenter-panel.css +96 -2
- package/dist/collection/components/icon/icon.js +0 -2
- package/dist/collection/components/image-overlay/image-overlay.css +124 -2
- package/dist/collection/components/label/label.css +13 -0
- package/dist/collection/components/label/label.js +118 -12
- package/dist/collection/components/label/label.template.js +2 -1
- package/dist/collection/components/list/list.template.js +11 -4
- package/dist/collection/components/map-controls/map-controls.css +147 -2
- package/dist/collection/components/ozon-content/nodes/int-io-ref.node.js +27 -0
- package/dist/collection/components/ozon-content/nodes/int-ref.node.js +1 -0
- package/dist/collection/components/ozon-content/ozon-content-mapper.js +3 -1
- package/dist/collection/components/ozon-content/ozon-content.css +23 -0
- package/dist/collection/components/ozon-content/ozon-content.js +3 -1
- package/dist/collection/components/pagination/pagination.js +8 -5
- package/dist/collection/components/tooltip/tooltip.js +7 -0
- package/dist/collection/components/tree-view/tree-item.js +1 -1
- package/dist/collection/components/tree-view/tree-view.js +58 -2
- package/dist/collection/components/viewer-grid/viewer-grid.css +207 -5
- package/dist/custom-elements/index.js +219 -73
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/p-04b8814d.entry.js +1 -0
- package/dist/dso-toolkit/p-15d0f2eb.entry.js +1 -0
- package/dist/dso-toolkit/{p-37e12c3c.entry.js → p-17e9802f.entry.js} +1 -1
- package/dist/dso-toolkit/p-19b5fae2.entry.js +1 -0
- package/dist/dso-toolkit/p-1bd0e0c3.entry.js +1 -0
- package/dist/dso-toolkit/p-1d52d4f2.entry.js +1 -0
- package/dist/dso-toolkit/p-553bd3aa.entry.js +1 -0
- package/dist/dso-toolkit/p-590cbab6.entry.js +1 -0
- package/dist/dso-toolkit/p-63e0f10d.entry.js +1 -0
- package/dist/dso-toolkit/p-8e6ee9f0.entry.js +1 -0
- package/dist/dso-toolkit/p-a5705dd1.entry.js +1 -0
- package/dist/dso-toolkit/p-a7bcd356.entry.js +1 -0
- package/dist/dso-toolkit/p-aa098949.entry.js +1 -0
- package/dist/dso-toolkit/p-c282135e.entry.js +1 -0
- package/dist/dso-toolkit/p-ca3a1440.entry.js +1 -0
- package/dist/esm/dso-alert.entry.js +1 -1
- package/dist/esm/dso-autosuggest.entry.js +17 -8
- package/dist/esm/dso-badge.entry.js +1 -1
- package/dist/esm/dso-banner.entry.js +1 -1
- package/dist/esm/dso-header.entry.js +31 -21
- package/dist/esm/dso-helpcenter-panel.entry.js +1 -1
- package/dist/esm/dso-icon.entry.js +15 -24
- package/dist/esm/dso-image-overlay.entry.js +1 -1
- package/dist/esm/dso-label.entry.js +79 -4
- package/dist/esm/dso-map-controls.entry.js +1 -1
- package/dist/esm/dso-ozon-content.entry.js +32 -3
- package/dist/esm/dso-pagination.entry.js +5 -2
- package/dist/esm/dso-toolkit.js +1 -1
- package/dist/esm/dso-tooltip.entry.js +7 -0
- package/dist/esm/dso-tree-view.entry.js +24 -2
- package/dist/esm/dso-viewer-grid.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/autosuggest/autosuggest.d.ts +6 -0
- package/dist/types/components/autosuggest/autosuggest.template.d.ts +1 -1
- package/dist/types/components/header/header.d.ts +13 -20
- package/dist/types/components/header/header.interfaces.d.ts +17 -0
- package/dist/types/components/header/header.template.d.ts +1 -1
- package/dist/types/components/label/label.d.ts +21 -3
- package/dist/types/components/label/label.template.d.ts +1 -1
- package/dist/types/components/ozon-content/nodes/int-io-ref.node.d.ts +6 -0
- package/dist/types/components/ozon-content/ozon-content-node-context.interface.d.ts +2 -1
- package/dist/types/components/ozon-content/ozon-content.interfaces.d.ts +2 -0
- package/dist/types/components/tooltip/tooltip.d.ts +1 -0
- package/dist/types/components/tree-view/tree-view.d.ts +10 -2
- package/dist/types/components.d.ts +34 -7
- package/package.json +1 -1
- package/dist/dso-toolkit/p-076400f4.entry.js +0 -1
- package/dist/dso-toolkit/p-09b53589.entry.js +0 -1
- package/dist/dso-toolkit/p-2f64bded.entry.js +0 -1
- package/dist/dso-toolkit/p-5e614420.entry.js +0 -1
- package/dist/dso-toolkit/p-60679db4.entry.js +0 -1
- package/dist/dso-toolkit/p-7796687c.entry.js +0 -1
- package/dist/dso-toolkit/p-7f41f2a1.entry.js +0 -1
- package/dist/dso-toolkit/p-b1dc8d76.entry.js +0 -1
- package/dist/dso-toolkit/p-c0b7f435.entry.js +0 -1
- package/dist/dso-toolkit/p-d0d279cc.entry.js +0 -1
- package/dist/dso-toolkit/p-e01b1657.entry.js +0 -1
- package/dist/dso-toolkit/p-e1496a15.entry.js +0 -1
- package/dist/dso-toolkit/p-ea14647b.entry.js +0 -1
- package/dist/dso-toolkit/p-f1026921.entry.js +0 -1
|
@@ -6,8 +6,9 @@ export class Header {
|
|
|
6
6
|
constructor() {
|
|
7
7
|
this.mainMenu = [];
|
|
8
8
|
this.useDropDownMenu = "auto";
|
|
9
|
+
/** Used to show the login/logout option. 'none' renders nothing. */
|
|
10
|
+
this.authStatus = 'none';
|
|
9
11
|
this.showDropDown = false;
|
|
10
|
-
this.isLoggedIn = false;
|
|
11
12
|
this.hasSubLogo = false;
|
|
12
13
|
this.overflowMenuItems = 0;
|
|
13
14
|
this.onWindowResize = debounce(() => {
|
|
@@ -15,17 +16,21 @@ export class Header {
|
|
|
15
16
|
this.setOverflowMenu();
|
|
16
17
|
}, 100);
|
|
17
18
|
this.MenuItem = (item) => {
|
|
18
|
-
const click = (event) => {
|
|
19
|
-
event.preventDefault();
|
|
20
|
-
this.menuItemClick.emit({
|
|
21
|
-
originalEvent: event,
|
|
22
|
-
menuItem: item,
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
19
|
return (h("li", { class: item.active ? "dso-active" : undefined },
|
|
26
|
-
h("a", { href: item.url, "aria-current": item.active ? "page" : undefined, onClick:
|
|
20
|
+
h("a", { href: item.url, "aria-current": item.active ? "page" : undefined, onClick: e => this.clickHandler(e, 'menuItem', { menuItem: item }) }, item.label)));
|
|
27
21
|
};
|
|
28
22
|
}
|
|
23
|
+
clickHandler(e, type, options) {
|
|
24
|
+
var _a, _b;
|
|
25
|
+
this.headerClick.emit({
|
|
26
|
+
originalEvent: e,
|
|
27
|
+
isModifiedEvent: e.button !== 0 || e.ctrlKey || e.shiftKey || e.altKey || e.metaKey,
|
|
28
|
+
type,
|
|
29
|
+
menuItem: options === null || options === void 0 ? void 0 : options.menuItem,
|
|
30
|
+
url: (_a = options === null || options === void 0 ? void 0 : options.url) !== null && _a !== void 0 ? _a : (_b = options === null || options === void 0 ? void 0 : options.menuItem) === null || _b === void 0 ? void 0 : _b.url,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
;
|
|
29
34
|
watchUseDropDownMenu(value) {
|
|
30
35
|
if (value === "auto") {
|
|
31
36
|
this.setDropDownMenu();
|
|
@@ -43,7 +48,7 @@ export class Header {
|
|
|
43
48
|
if (this.wrapper.clientWidth >= this.nav.clientWidth) {
|
|
44
49
|
return;
|
|
45
50
|
}
|
|
46
|
-
if (this.overflowMenuItems >= this.mainMenu.length) {
|
|
51
|
+
if (this.mainMenu && this.overflowMenuItems >= this.mainMenu.length) {
|
|
47
52
|
return;
|
|
48
53
|
}
|
|
49
54
|
this.overflowMenuItems++;
|
|
@@ -87,7 +92,7 @@ export class Header {
|
|
|
87
92
|
h("slot", { name: "logo" })),
|
|
88
93
|
h("div", { class: "sub-logo" },
|
|
89
94
|
h("slot", { name: "sub-logo" }))),
|
|
90
|
-
this.showDropDown && this.mainMenu.length > 0 && (h("div", { class: "dropdown" },
|
|
95
|
+
this.showDropDown && this.mainMenu && this.mainMenu.length > 0 && (h("div", { class: "dropdown" },
|
|
91
96
|
h("dso-dropdown-menu", { "dropdown-align": "right" },
|
|
92
97
|
h("button", { type: "button", class: "tertiary", slot: "toggle" },
|
|
93
98
|
h("span", null, "Menu")),
|
|
@@ -96,31 +101,35 @@ export class Header {
|
|
|
96
101
|
h("ul", null,
|
|
97
102
|
this.mainMenu.map(this.MenuItem),
|
|
98
103
|
this.userHomeUrl && (h("li", null,
|
|
99
|
-
h("a", { href: this.userHomeUrl }, "Mijn Omgevingsloket"))),
|
|
100
|
-
this.loginUrl && !this.isLoggedIn && (h("li", null,
|
|
101
|
-
h("a", { href: this.loginUrl }, "Inloggen"))),
|
|
104
|
+
h("a", { href: this.userHomeUrl, onClick: e => this.clickHandler(e, 'userHome', { url: this.userHomeUrl }) }, "Mijn Omgevingsloket"))),
|
|
102
105
|
this.userProfileUrl &&
|
|
103
106
|
this.userProfileName &&
|
|
104
|
-
this.
|
|
105
|
-
h("a", { href: this.userProfileUrl },
|
|
107
|
+
this.authStatus === 'loggedIn' && (h("li", null,
|
|
108
|
+
h("a", { href: this.userProfileUrl, onClick: e => this.clickHandler(e, 'profile', { url: this.userProfileUrl }) },
|
|
106
109
|
this.userProfileName,
|
|
107
|
-
h("span", { class: "profile-label" }, "- Mijn profiel")))),
|
|
108
|
-
this.
|
|
109
|
-
h("a", { href: this.
|
|
110
|
-
|
|
110
|
+
h("span", { class: "profile-label" }, " - Mijn profiel")))),
|
|
111
|
+
this.authStatus === 'loggedOut' && (h("li", null, this.loginUrl
|
|
112
|
+
? h("a", { href: this.loginUrl, onClick: e => this.clickHandler(e, 'login', { url: this.loginUrl }) }, "Inloggen")
|
|
113
|
+
: h("button", { type: "button", onClick: e => this.clickHandler(e, 'login') }, "Inloggen"))),
|
|
114
|
+
this.authStatus === 'loggedIn' && (h("li", null, this.logoutUrl
|
|
115
|
+
? h("a", { href: this.logoutUrl, onClick: e => this.clickHandler(e, 'logout', { url: this.logoutUrl }) }, "Uitloggen")
|
|
116
|
+
: h("button", { type: "button", onClick: e => this.clickHandler(e, 'logout') }, "Uitloggen"))))))))),
|
|
117
|
+
!this.showDropDown && (h(Fragment, null,
|
|
111
118
|
h("div", { class: "dso-header-session" },
|
|
112
119
|
this.userProfileUrl &&
|
|
113
120
|
this.userProfileName &&
|
|
114
|
-
this.
|
|
121
|
+
this.authStatus === 'loggedIn' && (h("div", { class: "profile" },
|
|
115
122
|
h("span", { class: "profile-label" }, "Welkom:"),
|
|
116
|
-
h("a", { href: this.userProfileUrl }, this.userProfileName))),
|
|
117
|
-
this.
|
|
118
|
-
h("a", { href: this.loginUrl }, "Inloggen")
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
123
|
+
h("a", { href: this.userProfileUrl, onClick: e => this.clickHandler(e, 'profile', { url: this.userProfileUrl }) }, this.userProfileName))),
|
|
124
|
+
this.authStatus === 'loggedOut' && (h("div", { class: "login" }, this.loginUrl
|
|
125
|
+
? h("a", { href: this.loginUrl, onClick: e => this.clickHandler(e, 'login', { url: this.loginUrl }) }, "Inloggen")
|
|
126
|
+
: h("button", { class: "dso-tertiary", type: "button", onClick: e => this.clickHandler(e, 'login') }, "Inloggen"))),
|
|
127
|
+
this.authStatus === 'loggedIn' && (h("div", { class: "logout" }, this.logoutUrl
|
|
128
|
+
? h("a", { href: this.logoutUrl, onClick: e => this.clickHandler(e, 'logout', { url: this.logoutUrl }) }, "Uitloggen")
|
|
129
|
+
: h("button", { class: "dso-tertiary", type: "button", onClick: e => this.clickHandler(e, 'logout') }, "Uitloggen")))),
|
|
130
|
+
((this.mainMenu && this.mainMenu.length > 0) || this.userHomeUrl) && (h("nav", { class: "dso-navbar" },
|
|
122
131
|
h("ul", { class: "dso-nav dso-nav-main", ref: (element) => (this.nav = element) },
|
|
123
|
-
this.mainMenu
|
|
132
|
+
this.mainMenu && this.mainMenu
|
|
124
133
|
.filter((_, index) => index < this.mainMenu.length - this.overflowMenuItems)
|
|
125
134
|
.map(this.MenuItem),
|
|
126
135
|
this.overflowMenuItems > 0 && (h("li", null,
|
|
@@ -129,15 +138,13 @@ export class Header {
|
|
|
129
138
|
h("span", null, "Meer")),
|
|
130
139
|
h("div", { class: "dso-dropdown-options" },
|
|
131
140
|
h("dso-dropdown-options", null,
|
|
132
|
-
h("ul", null, this.mainMenu
|
|
133
|
-
.filter((_, index) => index >=
|
|
134
|
-
this.mainMenu.length -
|
|
135
|
-
this.overflowMenuItems)
|
|
141
|
+
h("ul", null, this.mainMenu && this.mainMenu
|
|
142
|
+
.filter((_, index) => index >= this.mainMenu.length - this.overflowMenuItems)
|
|
136
143
|
.map(this.MenuItem))))))),
|
|
137
144
|
this.userHomeUrl && (h("li", { class: "menu-user-home" },
|
|
138
|
-
h("a", { href: this.userHomeUrl },
|
|
145
|
+
h("a", { href: this.userHomeUrl, onClick: e => this.clickHandler(e, 'userHome', { url: this.userHomeUrl }) },
|
|
139
146
|
h("dso-icon", { icon: "user-line" }),
|
|
140
|
-
"Mijn Omgevingsloket"))))))))));
|
|
147
|
+
"Mijn Omgevingsloket")))))))))));
|
|
141
148
|
}
|
|
142
149
|
static get is() { return "dso-header"; }
|
|
143
150
|
static get encapsulation() { return "shadow"; }
|
|
@@ -148,13 +155,18 @@ export class Header {
|
|
|
148
155
|
"$": ["header.css"]
|
|
149
156
|
}; }
|
|
150
157
|
static get properties() { return {
|
|
151
|
-
"
|
|
152
|
-
"type": "
|
|
158
|
+
"mainMenu": {
|
|
159
|
+
"type": "unknown",
|
|
153
160
|
"mutable": false,
|
|
154
161
|
"complexType": {
|
|
155
|
-
"original": "
|
|
156
|
-
"resolved": "
|
|
157
|
-
"references": {
|
|
162
|
+
"original": "HeaderMenuItem[]",
|
|
163
|
+
"resolved": "HeaderMenuItem[] | undefined",
|
|
164
|
+
"references": {
|
|
165
|
+
"HeaderMenuItem": {
|
|
166
|
+
"location": "import",
|
|
167
|
+
"path": "./header.interfaces"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
158
170
|
},
|
|
159
171
|
"required": false,
|
|
160
172
|
"optional": true,
|
|
@@ -162,81 +174,77 @@ export class Header {
|
|
|
162
174
|
"tags": [],
|
|
163
175
|
"text": ""
|
|
164
176
|
},
|
|
165
|
-
"
|
|
166
|
-
"reflect": false
|
|
177
|
+
"defaultValue": "[]"
|
|
167
178
|
},
|
|
168
|
-
"
|
|
179
|
+
"useDropDownMenu": {
|
|
169
180
|
"type": "string",
|
|
170
181
|
"mutable": false,
|
|
171
182
|
"complexType": {
|
|
172
|
-
"original": "
|
|
173
|
-
"resolved": "
|
|
183
|
+
"original": "\"always\" | \"never\" | \"auto\"",
|
|
184
|
+
"resolved": "\"always\" | \"auto\" | \"never\"",
|
|
174
185
|
"references": {}
|
|
175
186
|
},
|
|
176
187
|
"required": false,
|
|
177
|
-
"optional":
|
|
188
|
+
"optional": false,
|
|
178
189
|
"docs": {
|
|
179
190
|
"tags": [],
|
|
180
191
|
"text": ""
|
|
181
192
|
},
|
|
182
|
-
"attribute": "
|
|
183
|
-
"reflect": false
|
|
193
|
+
"attribute": "use-drop-down-menu",
|
|
194
|
+
"reflect": false,
|
|
195
|
+
"defaultValue": "\"auto\""
|
|
184
196
|
},
|
|
185
|
-
"
|
|
186
|
-
"type": "
|
|
197
|
+
"authStatus": {
|
|
198
|
+
"type": "string",
|
|
187
199
|
"mutable": false,
|
|
188
200
|
"complexType": {
|
|
189
|
-
"original": "
|
|
190
|
-
"resolved": "
|
|
191
|
-
"references": {
|
|
192
|
-
"HeaderMenuItem": {
|
|
193
|
-
"location": "local"
|
|
194
|
-
}
|
|
195
|
-
}
|
|
201
|
+
"original": "'none' | 'loggedIn' | 'loggedOut'",
|
|
202
|
+
"resolved": "\"loggedIn\" | \"loggedOut\" | \"none\"",
|
|
203
|
+
"references": {}
|
|
196
204
|
},
|
|
197
205
|
"required": false,
|
|
198
206
|
"optional": false,
|
|
199
207
|
"docs": {
|
|
200
208
|
"tags": [],
|
|
201
|
-
"text": ""
|
|
209
|
+
"text": "Used to show the login/logout option. 'none' renders nothing."
|
|
202
210
|
},
|
|
203
|
-
"
|
|
211
|
+
"attribute": "auth-status",
|
|
212
|
+
"reflect": false,
|
|
213
|
+
"defaultValue": "'none'"
|
|
204
214
|
},
|
|
205
|
-
"
|
|
215
|
+
"loginUrl": {
|
|
206
216
|
"type": "string",
|
|
207
217
|
"mutable": false,
|
|
208
218
|
"complexType": {
|
|
209
|
-
"original": "
|
|
210
|
-
"resolved": "
|
|
219
|
+
"original": "string",
|
|
220
|
+
"resolved": "string | undefined",
|
|
211
221
|
"references": {}
|
|
212
222
|
},
|
|
213
223
|
"required": false,
|
|
214
|
-
"optional":
|
|
224
|
+
"optional": true,
|
|
215
225
|
"docs": {
|
|
216
226
|
"tags": [],
|
|
217
|
-
"text": ""
|
|
227
|
+
"text": "When the `authStatus` is `loggedOut` a loginUrl can be provided, the login button will render as an anchor."
|
|
218
228
|
},
|
|
219
|
-
"attribute": "
|
|
220
|
-
"reflect": false
|
|
221
|
-
"defaultValue": "\"auto\""
|
|
229
|
+
"attribute": "login-url",
|
|
230
|
+
"reflect": false
|
|
222
231
|
},
|
|
223
|
-
"
|
|
224
|
-
"type": "
|
|
232
|
+
"logoutUrl": {
|
|
233
|
+
"type": "string",
|
|
225
234
|
"mutable": false,
|
|
226
235
|
"complexType": {
|
|
227
|
-
"original": "
|
|
228
|
-
"resolved": "
|
|
236
|
+
"original": "string",
|
|
237
|
+
"resolved": "string | undefined",
|
|
229
238
|
"references": {}
|
|
230
239
|
},
|
|
231
240
|
"required": false,
|
|
232
|
-
"optional":
|
|
241
|
+
"optional": true,
|
|
233
242
|
"docs": {
|
|
234
243
|
"tags": [],
|
|
235
244
|
"text": ""
|
|
236
245
|
},
|
|
237
|
-
"attribute": "
|
|
238
|
-
"reflect": false
|
|
239
|
-
"defaultValue": "false"
|
|
246
|
+
"attribute": "logout-url",
|
|
247
|
+
"reflect": false
|
|
240
248
|
},
|
|
241
249
|
"userProfileName": {
|
|
242
250
|
"type": "string",
|
|
@@ -296,40 +304,26 @@ export class Header {
|
|
|
296
304
|
"overflowMenuItems": {}
|
|
297
305
|
}; }
|
|
298
306
|
static get events() { return [{
|
|
299
|
-
"method": "
|
|
300
|
-
"name": "
|
|
301
|
-
"bubbles": true,
|
|
302
|
-
"cancelable": true,
|
|
303
|
-
"composed": true,
|
|
304
|
-
"docs": {
|
|
305
|
-
"tags": [],
|
|
306
|
-
"text": ""
|
|
307
|
-
},
|
|
308
|
-
"complexType": {
|
|
309
|
-
"original": "HeaderMenuItemClickEvent",
|
|
310
|
-
"resolved": "HeaderMenuItemClickEvent",
|
|
311
|
-
"references": {
|
|
312
|
-
"HeaderMenuItemClickEvent": {
|
|
313
|
-
"location": "local"
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
}, {
|
|
318
|
-
"method": "logoutClick",
|
|
319
|
-
"name": "logoutClick",
|
|
307
|
+
"method": "headerClick",
|
|
308
|
+
"name": "headerClick",
|
|
320
309
|
"bubbles": true,
|
|
321
310
|
"cancelable": true,
|
|
322
311
|
"composed": true,
|
|
323
312
|
"docs": {
|
|
324
313
|
"tags": [],
|
|
325
|
-
"text": "
|
|
314
|
+
"text": "Emitted when something in the header is selected.\n\n`event.detail.type` indicates the functionality the user pressed. eg. `'login'` or `'menuItem'`"
|
|
326
315
|
},
|
|
327
316
|
"complexType": {
|
|
328
|
-
"original": "
|
|
329
|
-
"resolved": "
|
|
317
|
+
"original": "HeaderClickEvent | HeaderClickMenuItemEvent",
|
|
318
|
+
"resolved": "HeaderClickEvent | HeaderClickMenuItemEvent",
|
|
330
319
|
"references": {
|
|
331
|
-
"
|
|
332
|
-
"location": "
|
|
320
|
+
"HeaderClickEvent": {
|
|
321
|
+
"location": "import",
|
|
322
|
+
"path": "./header.interfaces"
|
|
323
|
+
},
|
|
324
|
+
"HeaderClickMenuItemEvent": {
|
|
325
|
+
"location": "import",
|
|
326
|
+
"path": "./header.interfaces"
|
|
333
327
|
}
|
|
334
328
|
}
|
|
335
329
|
}
|
|
@@ -1,34 +1,18 @@
|
|
|
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,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<div slot="logo"><img height="40" alt="Omgevingsloket" src="${logo}" /></div>
|
|
19
|
-
<div slot="sub-logo"><img alt="Regels op de kaart" src="${subLogo}" /></div></div>
|
|
20
|
-
</dso-header>`
|
|
21
|
-
: html `<dso-header
|
|
22
|
-
.mainMenu=${mainMenu}
|
|
23
|
-
use-drop-down-menu=${ifDefined(useDropDownMenu)}
|
|
24
|
-
is-logged-in=${ifDefined(isLoggedIn)}
|
|
25
|
-
login-url=${ifDefined(bindLoginUrl)}
|
|
26
|
-
logout-url=${ifDefined(bindLogoutUrl)}
|
|
27
|
-
user-profile-url=${ifDefined(userProfileUrl)}
|
|
28
|
-
user-profile-name=${ifDefined(userProfileName)}
|
|
29
|
-
user-home-url=${ifDefined(userHomeUrl)}
|
|
30
|
-
@menuItemClick=${menuItemClick}
|
|
31
|
-
>
|
|
32
|
-
<div slot="logo"><img alt="Omgevingsloket" src="${logo}" /></div>
|
|
33
|
-
</dso-header>`;
|
|
3
|
+
export function headerTemplate({ logo, subLogo, mainMenu, useDropDownMenu, authStatus, loginUrl, logoutUrl, userProfileUrl, userProfileName, userHomeUrl, onHeaderClick, }) {
|
|
4
|
+
return html `<dso-header
|
|
5
|
+
.mainMenu=${mainMenu}
|
|
6
|
+
use-drop-down-menu=${ifDefined(useDropDownMenu)}
|
|
7
|
+
auth-status=${ifDefined(authStatus)}
|
|
8
|
+
login-url=${ifDefined(loginUrl)}
|
|
9
|
+
logout-url=${ifDefined(logoutUrl)}
|
|
10
|
+
user-profile-url=${ifDefined(userProfileUrl)}
|
|
11
|
+
user-profile-name=${ifDefined(userProfileName)}
|
|
12
|
+
user-home-url=${ifDefined(userHomeUrl)}
|
|
13
|
+
@headerClick=${onHeaderClick}
|
|
14
|
+
>
|
|
15
|
+
<div slot="logo"><img height="40" alt="Omgevingsloket" src="${logo}" /></div>
|
|
16
|
+
${subLogo ? html `<div slot="sub-logo"><img alt="Regels op de kaart" src="${subLogo}" /></div>` : undefined}
|
|
17
|
+
</dso-header>`;
|
|
34
18
|
}
|
|
@@ -116,10 +116,18 @@
|
|
|
116
116
|
line-height: 16px;
|
|
117
117
|
}
|
|
118
118
|
.open-button.btn-sm dso-icon,
|
|
119
|
-
.open-button.btn-sm svg.di, .open-button.btn-sm.extern::after, .open-button.btn-sm.download::after {
|
|
119
|
+
.open-button.btn-sm svg.di, .open-button.btn-sm.extern::after, .open-button.btn-sm.download::after, .open-button.btn-sm.dso-spinner::before {
|
|
120
120
|
margin-bottom: -4px;
|
|
121
121
|
margin-top: -4px;
|
|
122
122
|
}
|
|
123
|
+
.open-button.btn-sm.dso-spinner-left::before {
|
|
124
|
+
height: 16px;
|
|
125
|
+
width: 16px;
|
|
126
|
+
}
|
|
127
|
+
.open-button.btn-sm.dso-spinner-right::after {
|
|
128
|
+
height: 16px;
|
|
129
|
+
width: 16px;
|
|
130
|
+
}
|
|
123
131
|
.open-button.download::after {
|
|
124
132
|
background: var(--dso-icon, var(--di-download-wit)) no-repeat;
|
|
125
133
|
background-position: center;
|
|
@@ -146,6 +154,31 @@
|
|
|
146
154
|
margin-left: 8px;
|
|
147
155
|
margin-right: -8px;
|
|
148
156
|
}
|
|
157
|
+
.open-button.dso-spinner-left[disabled], .open-button.dso-spinner-right[disabled] {
|
|
158
|
+
background-color: #39870c;
|
|
159
|
+
border-color: #39870c;
|
|
160
|
+
color: #fff;
|
|
161
|
+
}
|
|
162
|
+
.open-button.dso-spinner-left::before {
|
|
163
|
+
background-image: url("data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E");
|
|
164
|
+
background-repeat: no-repeat;
|
|
165
|
+
content: "";
|
|
166
|
+
display: inline-block;
|
|
167
|
+
height: 24px;
|
|
168
|
+
vertical-align: top;
|
|
169
|
+
width: 24px;
|
|
170
|
+
margin-right: 8px;
|
|
171
|
+
}
|
|
172
|
+
.open-button.dso-spinner-right::after {
|
|
173
|
+
background-image: url("data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E");
|
|
174
|
+
background-repeat: no-repeat;
|
|
175
|
+
content: "";
|
|
176
|
+
display: inline-block;
|
|
177
|
+
height: 24px;
|
|
178
|
+
vertical-align: top;
|
|
179
|
+
width: 24px;
|
|
180
|
+
margin-left: 8px;
|
|
181
|
+
}
|
|
149
182
|
.open-button:hover {
|
|
150
183
|
cursor: pointer;
|
|
151
184
|
}
|
|
@@ -216,10 +249,18 @@
|
|
|
216
249
|
line-height: 16px;
|
|
217
250
|
}
|
|
218
251
|
.close-button.btn-sm dso-icon,
|
|
219
|
-
.close-button.btn-sm svg.di, .close-button.btn-sm.extern::after, .close-button.btn-sm.download::after {
|
|
252
|
+
.close-button.btn-sm svg.di, .close-button.btn-sm.extern::after, .close-button.btn-sm.download::after, .close-button.btn-sm.dso-spinner::before {
|
|
220
253
|
margin-bottom: -4px;
|
|
221
254
|
margin-top: -4px;
|
|
222
255
|
}
|
|
256
|
+
.close-button.btn-sm.dso-spinner-left::before {
|
|
257
|
+
height: 16px;
|
|
258
|
+
width: 16px;
|
|
259
|
+
}
|
|
260
|
+
.close-button.btn-sm.dso-spinner-right::after {
|
|
261
|
+
height: 16px;
|
|
262
|
+
width: 16px;
|
|
263
|
+
}
|
|
223
264
|
.close-button.download::after {
|
|
224
265
|
background: var(--dso-icon, var(--di-download)) no-repeat;
|
|
225
266
|
background-position: center;
|
|
@@ -258,6 +299,59 @@
|
|
|
258
299
|
margin-left: 8px;
|
|
259
300
|
margin-right: -8px;
|
|
260
301
|
}
|
|
302
|
+
.close-button.dso-spinner-left[disabled], .close-button.dso-spinner-right[disabled] {
|
|
303
|
+
background-color: #fff;
|
|
304
|
+
border-color: #39870c;
|
|
305
|
+
color: #39870c;
|
|
306
|
+
}
|
|
307
|
+
.close-button.dso-spinner-left::before {
|
|
308
|
+
background-image: url("data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E");
|
|
309
|
+
background-repeat: no-repeat;
|
|
310
|
+
content: "";
|
|
311
|
+
display: inline-block;
|
|
312
|
+
height: 24px;
|
|
313
|
+
vertical-align: top;
|
|
314
|
+
width: 24px;
|
|
315
|
+
margin-right: 8px;
|
|
316
|
+
}
|
|
317
|
+
.close-button.dso-spinner-left:not([disabled]):hover::before {
|
|
318
|
+
background-image: url("data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E");
|
|
319
|
+
background-repeat: no-repeat;
|
|
320
|
+
content: "";
|
|
321
|
+
display: inline-block;
|
|
322
|
+
height: 24px;
|
|
323
|
+
vertical-align: top;
|
|
324
|
+
width: 24px;
|
|
325
|
+
margin-right: 8px;
|
|
326
|
+
}
|
|
327
|
+
.close-button.dso-spinner-left:not([disabled]).btn-sm:hover::before {
|
|
328
|
+
height: 16px;
|
|
329
|
+
width: 16px;
|
|
330
|
+
}
|
|
331
|
+
.close-button.dso-spinner-right::after {
|
|
332
|
+
background-image: url("data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E");
|
|
333
|
+
background-repeat: no-repeat;
|
|
334
|
+
content: "";
|
|
335
|
+
display: inline-block;
|
|
336
|
+
height: 24px;
|
|
337
|
+
vertical-align: top;
|
|
338
|
+
width: 24px;
|
|
339
|
+
margin-left: 8px;
|
|
340
|
+
}
|
|
341
|
+
.close-button.dso-spinner-right:not([disabled]):hover::after {
|
|
342
|
+
background-image: url("data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E");
|
|
343
|
+
background-repeat: no-repeat;
|
|
344
|
+
content: "";
|
|
345
|
+
display: inline-block;
|
|
346
|
+
height: 24px;
|
|
347
|
+
vertical-align: top;
|
|
348
|
+
width: 24px;
|
|
349
|
+
margin-left: 8px;
|
|
350
|
+
}
|
|
351
|
+
.close-button.dso-spinner-right:not([disabled]).btn-sm:hover::after {
|
|
352
|
+
height: 16px;
|
|
353
|
+
width: 16px;
|
|
354
|
+
}
|
|
261
355
|
.close-button::before {
|
|
262
356
|
background: var(--dso-icon, var(--di-times)) no-repeat;
|
|
263
357
|
background-position: center;
|
|
@@ -77,7 +77,6 @@ import sortAscending from '@dso-toolkit/sources/src/icons/sort-ascending.svg';
|
|
|
77
77
|
import sortDescending from '@dso-toolkit/sources/src/icons/sort-descending.svg';
|
|
78
78
|
import sort from '@dso-toolkit/sources/src/icons/sort.svg';
|
|
79
79
|
import sound from '@dso-toolkit/sources/src/icons/sound.svg';
|
|
80
|
-
import statusForbidden from '@dso-toolkit/sources/src/icons/status-forbidden.svg';
|
|
81
80
|
import statusDanger from '@dso-toolkit/sources/src/icons/status-danger.svg';
|
|
82
81
|
import statusInfo from '@dso-toolkit/sources/src/icons/status-info.svg';
|
|
83
82
|
import statusSuccess from '@dso-toolkit/sources/src/icons/status-success.svg';
|
|
@@ -171,7 +170,6 @@ const icons = [
|
|
|
171
170
|
{ alias: 'sort', svg: sort },
|
|
172
171
|
{ alias: 'sound', svg: sound },
|
|
173
172
|
{ alias: 'status-danger', svg: statusDanger },
|
|
174
|
-
{ alias: 'status-forbidden', svg: statusForbidden },
|
|
175
173
|
{ alias: 'status-info', svg: statusInfo },
|
|
176
174
|
{ alias: 'status-success', svg: statusSuccess },
|
|
177
175
|
{ alias: 'status-warning', svg: statusWarning },
|