@postnord/pn-marketweb-components 2.0.19 → 2.0.22
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/cjs/loader.cjs.js +1 -1
- package/cjs/pn-customernumber-selector-option.cjs.entry.js +1 -1
- package/cjs/pn-find-price-result.cjs.entry.js +5 -5
- package/cjs/pn-find-price.cjs.entry.js +5 -1
- package/cjs/pn-language-selector_9.cjs.entry.js +2 -1
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/cjs/pn-marketweb-siteheader-profileselection.cjs.entry.js +161 -0
- package/cjs/pn-product-card_4.cjs.entry.js +1 -1
- package/collection/collection-manifest.json +1 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.js +1 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-profileselection.css +0 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-profileselection.js +319 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-search.js +1 -1
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.stories.js +3 -3
- package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector-option.css +1 -0
- package/collection/components/widgets/pn-find-price/pn-find-price-result.js +5 -21
- package/collection/components/widgets/pn-find-price/pn-find-price.js +5 -1
- package/collection/components/widgets/pn-product-card/pn-product-card.css +25 -25
- package/custom-elements/index.d.ts +6 -0
- package/custom-elements/index.js +172 -11
- package/esm/loader.js +1 -1
- package/esm/pn-customernumber-selector-option.entry.js +1 -1
- package/esm/pn-find-price-result.entry.js +5 -5
- package/esm/pn-find-price.entry.js +5 -1
- package/esm/pn-language-selector_9.entry.js +2 -1
- package/esm/pn-market-web-components.js +1 -1
- package/esm/pn-marketweb-siteheader-profileselection.entry.js +157 -0
- package/esm/pn-product-card_4.entry.js +1 -1
- package/esm-es5/loader.js +1 -1
- package/esm-es5/pn-customernumber-selector-option.entry.js +1 -1
- package/esm-es5/pn-find-price-result.entry.js +1 -1
- package/esm-es5/pn-find-price.entry.js +1 -1
- package/esm-es5/pn-language-selector_9.entry.js +1 -1
- package/esm-es5/pn-market-web-components.js +1 -1
- package/esm-es5/pn-marketweb-siteheader-profileselection.entry.js +1 -0
- package/esm-es5/pn-product-card_4.entry.js +1 -1
- package/package.json +1 -1
- package/pn-market-web-components/p-26191bda.entry.js +1 -0
- package/pn-market-web-components/p-3fa09b4e.entry.js +1 -0
- package/pn-market-web-components/p-67887512.system.js +1 -1
- package/pn-market-web-components/{p-b27aad85.entry.js → p-7e294268.entry.js} +1 -1
- package/pn-market-web-components/{p-6c75474c.entry.js → p-7f5bee11.entry.js} +1 -1
- package/pn-market-web-components/p-8339dcf6.system.entry.js +1 -0
- package/pn-market-web-components/p-885879fb.entry.js +1 -0
- package/pn-market-web-components/{p-285c6c82.system.entry.js → p-9d1a2d82.system.entry.js} +1 -1
- package/pn-market-web-components/p-a0665bab.system.entry.js +1 -0
- package/pn-market-web-components/p-a94593a9.system.entry.js +1 -0
- package/pn-market-web-components/p-ddbd131f.system.entry.js +1 -0
- package/pn-market-web-components/{p-4a71cd20.system.entry.js → p-e23a18f4.system.entry.js} +1 -1
- package/pn-market-web-components/p-fcea21cb.entry.js +1 -0
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-profileselection.d.ts +28 -0
- package/types/components/widgets/pn-find-price/pn-find-price-result.d.ts +0 -4
- package/types/components.d.ts +46 -2
- package/umd/pn-marketweb-salesforce.js +1 -1
- package/pn-market-web-components/p-4ce60c6f.system.entry.js +0 -1
- package/pn-market-web-components/p-82daf429.entry.js +0 -1
- package/pn-market-web-components/p-92dddb52.entry.js +0 -1
- package/pn-market-web-components/p-99c929aa.system.entry.js +0 -1
- package/pn-market-web-components/p-adfb38e0.entry.js +0 -1
- package/pn-market-web-components/p-fb1b7359.system.entry.js +0 -1
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import { Component, Prop, h, State, Element, Watch, Event, Host } from "@stencil/core";
|
|
2
|
+
import { MarketWebLoginManager } from "../../../globals/MarketWebLoginManager";
|
|
3
|
+
export class PnMarketwebSiteheaderProfileSelection {
|
|
4
|
+
constructor() {
|
|
5
|
+
/** Specifies which endpoint domain we should load from */
|
|
6
|
+
this.endpoint = "";
|
|
7
|
+
/** Access token passed from backend */
|
|
8
|
+
this.token = "";
|
|
9
|
+
this.emitEvents = true;
|
|
10
|
+
// Login dialog
|
|
11
|
+
this.loginDialog = null;
|
|
12
|
+
/** User Fullname */
|
|
13
|
+
this.fullname = "";
|
|
14
|
+
this.loggedin = false;
|
|
15
|
+
this.loginManager = null;
|
|
16
|
+
this.toggleButtonText = "";
|
|
17
|
+
this.username = this.fullname;
|
|
18
|
+
}
|
|
19
|
+
componentWillLoad() {
|
|
20
|
+
const userInfo = this.loggedin && this.fullname ? { given_name: this.fullname } : null;
|
|
21
|
+
this.loginManager = new MarketWebLoginManager({ endpoint: this.endpoint, eventTarget: this.hostElement, userInfo });
|
|
22
|
+
this.hostElement["loginmanager"] = this.loginManager;
|
|
23
|
+
if (this.token) {
|
|
24
|
+
this.loginManager.registerToken(this.token, 'backend');
|
|
25
|
+
}
|
|
26
|
+
else if (this.emitEvents) { // The primary login instance
|
|
27
|
+
this.loginManager.invalidateTokenOfType('backend');
|
|
28
|
+
}
|
|
29
|
+
this.hostElement.addEventListener(this.loginManager.events.loginstatechange, this.onLoginStateChange.bind(this));
|
|
30
|
+
this.init();
|
|
31
|
+
this.setUserName();
|
|
32
|
+
this.setToggleButtonText();
|
|
33
|
+
}
|
|
34
|
+
async init() {
|
|
35
|
+
this.toggleButtonText = this.loginDialog.loginMenuLinkText;
|
|
36
|
+
this.loginManager.init(this.emitEvents);
|
|
37
|
+
this.setToggleButtonText();
|
|
38
|
+
}
|
|
39
|
+
setUserName() {
|
|
40
|
+
const userInfo = this.loginManager.getUserInfo();
|
|
41
|
+
let name = "";
|
|
42
|
+
if (!this.loggedin || !userInfo) {
|
|
43
|
+
this.username = name;
|
|
44
|
+
}
|
|
45
|
+
if (userInfo && userInfo.given_name) {
|
|
46
|
+
name = userInfo.given_name + ((userInfo === null || userInfo === void 0 ? void 0 : userInfo.family_name) ? ` ${userInfo === null || userInfo === void 0 ? void 0 : userInfo.family_name}` : "");
|
|
47
|
+
}
|
|
48
|
+
if (!name && userInfo && userInfo.email) {
|
|
49
|
+
name = userInfo.email;
|
|
50
|
+
}
|
|
51
|
+
if (!name && this.fullname) {
|
|
52
|
+
name = this.fullname;
|
|
53
|
+
}
|
|
54
|
+
this.username = name;
|
|
55
|
+
}
|
|
56
|
+
setToggleButtonText() {
|
|
57
|
+
if (this.loggedin) {
|
|
58
|
+
this.toggleButtonText = this.username;
|
|
59
|
+
if (!this.toggleButtonText) {
|
|
60
|
+
this.toggleButtonText = this.loginDialog.loggedInButtonText;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
this.toggleButtonText = this.loginDialog.loginMenuLinkText;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
onLoginStateChange(e) {
|
|
68
|
+
if (this.loggedin !== e.detail && this.emitEvents) {
|
|
69
|
+
this.loggedin = e.detail;
|
|
70
|
+
this.loginStateChange.emit({ loggedIn: this.loggedin, token: this.loginManager.getToken() });
|
|
71
|
+
this.setUserName();
|
|
72
|
+
this.setToggleButtonText();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
uniqueId(text) {
|
|
76
|
+
return "loginlink-" + text.replace(/[^A-Za-z0-9.\\\/]/igm, "") + "-" + (this.emitEvents ? "1" : "2");
|
|
77
|
+
}
|
|
78
|
+
linkAppearanceAttributes(link) {
|
|
79
|
+
let attributes = {};
|
|
80
|
+
if (link.linkType) {
|
|
81
|
+
switch (link.linkType) {
|
|
82
|
+
case 'primary':
|
|
83
|
+
attributes = {
|
|
84
|
+
appearance: '',
|
|
85
|
+
variant: ''
|
|
86
|
+
};
|
|
87
|
+
break;
|
|
88
|
+
case 'secondary':
|
|
89
|
+
attributes = {
|
|
90
|
+
appearance: 'light',
|
|
91
|
+
variant: 'outlined'
|
|
92
|
+
};
|
|
93
|
+
break;
|
|
94
|
+
case 'regularlink':
|
|
95
|
+
default:
|
|
96
|
+
attributes = {
|
|
97
|
+
appearance: 'light',
|
|
98
|
+
variant: 'borderless',
|
|
99
|
+
icon: 'arrow-right'
|
|
100
|
+
};
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
return attributes;
|
|
104
|
+
}
|
|
105
|
+
if (!link.linkType) {
|
|
106
|
+
attributes = {
|
|
107
|
+
appearance: link.primaryLinkApperance ? "dark" : "light"
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
return attributes;
|
|
111
|
+
}
|
|
112
|
+
render() {
|
|
113
|
+
var _a, _b, _c;
|
|
114
|
+
if (!this.loginDialog) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
let hostElementAttribute = {
|
|
118
|
+
username: null
|
|
119
|
+
};
|
|
120
|
+
if (this.username) {
|
|
121
|
+
hostElementAttribute.username = this.username;
|
|
122
|
+
}
|
|
123
|
+
return (h(Host, Object.assign({}, hostElementAttribute),
|
|
124
|
+
h("pn-nav-dropdown", { label: this.toggleButtonText, icon: "user", class: "siteheader-logindialog" }, (!this.loginDialog.overrideLoginMenu) ?
|
|
125
|
+
h("div", { "data-loggedin": this.loggedin + '' }, (!this.loggedin) ?
|
|
126
|
+
h("div", null, (_a = this.loginDialog.loginTitle) !== null && _a !== void 0 ? _a : h("strong", null, this.loginDialog.loginTitle),
|
|
127
|
+
((_b = this.loginDialog.loginMenuLinks) === null || _b === void 0 ? void 0 : _b.length) > 0 ?
|
|
128
|
+
h("ul", null, this.loginDialog.loginMenuLinks.map((link, i) => {
|
|
129
|
+
const href = (i === 0 && !link.href) ? this.loginManager.getLoginUrl() : link.href;
|
|
130
|
+
return (h("li", null,
|
|
131
|
+
h("pn-button", Object.assign({ href: href, id: this.uniqueId(link.linkText) }, this.linkAppearanceAttributes(link), (link.openInNewWindow && { target: '_blank' })), link.linkText)));
|
|
132
|
+
}))
|
|
133
|
+
: (h("ul", null,
|
|
134
|
+
h("li", null,
|
|
135
|
+
h("pn-button", { href: this.loginManager.getLoginUrl(this.loginDialog.loginUrl), target: "_top" }, this.loginDialog.loginLinkText)),
|
|
136
|
+
h("li", null,
|
|
137
|
+
h("pn-button", { href: this.loginDialog.registerUrl, target: "_top", appearance: "light", variant: "outlined" }, this.loginDialog.createLoginLinkText)))))
|
|
138
|
+
:
|
|
139
|
+
h("div", null,
|
|
140
|
+
h("ul", null, this.loginDialog.loggedInLinks.map((link) => {
|
|
141
|
+
const isLogoutLink = link.href.indexOf('logout') !== -1;
|
|
142
|
+
const href = (isLogoutLink) ? this.loginManager.getLogoutUrl(link.href.replace('logout', '').replace('http://window.location.href/?', '').replace('https://window.location.href/?', '')) : link.href;
|
|
143
|
+
return (h("li", null,
|
|
144
|
+
h("pn-button", Object.assign({ href: href, id: this.uniqueId(link.linkText) }, (link.openInNewWindow && { target: '_blank' }), this.linkAppearanceAttributes(link), { onClick: () => { if (isLogoutLink) {
|
|
145
|
+
this.loginManager.clearUserData();
|
|
146
|
+
} } }), link.linkText)));
|
|
147
|
+
}))))
|
|
148
|
+
:
|
|
149
|
+
h("div", null,
|
|
150
|
+
h("ul", null, (_c = this.loginDialog.loginMenuLinks) === null || _c === void 0 ? void 0 : _c.map(link => h("li", null,
|
|
151
|
+
h("a", { href: link.href, target: link.openInNewWindow ? "_blank" : "_self", class: "btn btn-link" }, link.linkText))))))));
|
|
152
|
+
}
|
|
153
|
+
static get is() { return "pn-marketweb-siteheader-profileselection"; }
|
|
154
|
+
static get originalStyleUrls() { return {
|
|
155
|
+
"$": ["pn-marketweb-siteheader-profileselection.scss"]
|
|
156
|
+
}; }
|
|
157
|
+
static get styleUrls() { return {
|
|
158
|
+
"$": ["pn-marketweb-siteheader-profileselection.css"]
|
|
159
|
+
}; }
|
|
160
|
+
static get properties() { return {
|
|
161
|
+
"endpoint": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"mutable": false,
|
|
164
|
+
"complexType": {
|
|
165
|
+
"original": "string",
|
|
166
|
+
"resolved": "string",
|
|
167
|
+
"references": {}
|
|
168
|
+
},
|
|
169
|
+
"required": false,
|
|
170
|
+
"optional": false,
|
|
171
|
+
"docs": {
|
|
172
|
+
"tags": [],
|
|
173
|
+
"text": "Specifies which endpoint domain we should load from"
|
|
174
|
+
},
|
|
175
|
+
"attribute": "endpoint",
|
|
176
|
+
"reflect": false,
|
|
177
|
+
"defaultValue": "\"\""
|
|
178
|
+
},
|
|
179
|
+
"token": {
|
|
180
|
+
"type": "string",
|
|
181
|
+
"mutable": false,
|
|
182
|
+
"complexType": {
|
|
183
|
+
"original": "string",
|
|
184
|
+
"resolved": "string",
|
|
185
|
+
"references": {}
|
|
186
|
+
},
|
|
187
|
+
"required": false,
|
|
188
|
+
"optional": false,
|
|
189
|
+
"docs": {
|
|
190
|
+
"tags": [],
|
|
191
|
+
"text": "Access token passed from backend"
|
|
192
|
+
},
|
|
193
|
+
"attribute": "token",
|
|
194
|
+
"reflect": false,
|
|
195
|
+
"defaultValue": "\"\""
|
|
196
|
+
},
|
|
197
|
+
"i18n": {
|
|
198
|
+
"type": "any",
|
|
199
|
+
"mutable": false,
|
|
200
|
+
"complexType": {
|
|
201
|
+
"original": "any",
|
|
202
|
+
"resolved": "any",
|
|
203
|
+
"references": {}
|
|
204
|
+
},
|
|
205
|
+
"required": false,
|
|
206
|
+
"optional": false,
|
|
207
|
+
"docs": {
|
|
208
|
+
"tags": [],
|
|
209
|
+
"text": ""
|
|
210
|
+
},
|
|
211
|
+
"attribute": "i-1-8n",
|
|
212
|
+
"reflect": false
|
|
213
|
+
},
|
|
214
|
+
"emitEvents": {
|
|
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": "emit-events",
|
|
229
|
+
"reflect": false,
|
|
230
|
+
"defaultValue": "true"
|
|
231
|
+
},
|
|
232
|
+
"loginDialog": {
|
|
233
|
+
"type": "unknown",
|
|
234
|
+
"mutable": true,
|
|
235
|
+
"complexType": {
|
|
236
|
+
"original": "LoginDialog",
|
|
237
|
+
"resolved": "LoginDialog",
|
|
238
|
+
"references": {
|
|
239
|
+
"LoginDialog": {
|
|
240
|
+
"location": "import",
|
|
241
|
+
"path": "./pn-marketweb-siteheader-types"
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
"required": false,
|
|
246
|
+
"optional": false,
|
|
247
|
+
"docs": {
|
|
248
|
+
"tags": [],
|
|
249
|
+
"text": ""
|
|
250
|
+
},
|
|
251
|
+
"defaultValue": "null"
|
|
252
|
+
},
|
|
253
|
+
"fullname": {
|
|
254
|
+
"type": "string",
|
|
255
|
+
"mutable": false,
|
|
256
|
+
"complexType": {
|
|
257
|
+
"original": "string",
|
|
258
|
+
"resolved": "string",
|
|
259
|
+
"references": {}
|
|
260
|
+
},
|
|
261
|
+
"required": false,
|
|
262
|
+
"optional": false,
|
|
263
|
+
"docs": {
|
|
264
|
+
"tags": [],
|
|
265
|
+
"text": "User Fullname"
|
|
266
|
+
},
|
|
267
|
+
"attribute": "fullname",
|
|
268
|
+
"reflect": false,
|
|
269
|
+
"defaultValue": "\"\""
|
|
270
|
+
},
|
|
271
|
+
"loggedin": {
|
|
272
|
+
"type": "boolean",
|
|
273
|
+
"mutable": false,
|
|
274
|
+
"complexType": {
|
|
275
|
+
"original": "boolean",
|
|
276
|
+
"resolved": "boolean",
|
|
277
|
+
"references": {}
|
|
278
|
+
},
|
|
279
|
+
"required": false,
|
|
280
|
+
"optional": false,
|
|
281
|
+
"docs": {
|
|
282
|
+
"tags": [],
|
|
283
|
+
"text": ""
|
|
284
|
+
},
|
|
285
|
+
"attribute": "loggedin",
|
|
286
|
+
"reflect": false,
|
|
287
|
+
"defaultValue": "false"
|
|
288
|
+
}
|
|
289
|
+
}; }
|
|
290
|
+
static get states() { return {
|
|
291
|
+
"loginManager": {},
|
|
292
|
+
"toggleButtonText": {},
|
|
293
|
+
"username": {}
|
|
294
|
+
}; }
|
|
295
|
+
static get events() { return [{
|
|
296
|
+
"method": "loginStateChange",
|
|
297
|
+
"name": "loginStateChange",
|
|
298
|
+
"bubbles": true,
|
|
299
|
+
"cancelable": true,
|
|
300
|
+
"composed": true,
|
|
301
|
+
"docs": {
|
|
302
|
+
"tags": [],
|
|
303
|
+
"text": ""
|
|
304
|
+
},
|
|
305
|
+
"complexType": {
|
|
306
|
+
"original": "any",
|
|
307
|
+
"resolved": "any",
|
|
308
|
+
"references": {}
|
|
309
|
+
}
|
|
310
|
+
}]; }
|
|
311
|
+
static get elementRef() { return "hostElement"; }
|
|
312
|
+
static get watchers() { return [{
|
|
313
|
+
"propName": "i18n",
|
|
314
|
+
"methodName": "init"
|
|
315
|
+
}, {
|
|
316
|
+
"propName": "loginDialog",
|
|
317
|
+
"methodName": "init"
|
|
318
|
+
}]; }
|
|
319
|
+
}
|
|
@@ -41,7 +41,7 @@ export class PnMarketwebSiteheaderSearch {
|
|
|
41
41
|
if (!data || !data.hits || !data.hits.length) {
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
|
-
const suggestions = data.hits.map((item) => {
|
|
44
|
+
const suggestions = data.hits.filter(item => item.type === "editorial").map((item) => {
|
|
45
45
|
return item.query;
|
|
46
46
|
});
|
|
47
47
|
// Store query in store
|
|
@@ -51,7 +51,7 @@ const PrimaryTemplate = ({ ...args }) => {
|
|
|
51
51
|
hide-search="false"
|
|
52
52
|
hide-login="false"
|
|
53
53
|
cache="false"
|
|
54
|
-
|
|
54
|
+
autocomplete-endpoint="http://localhost:51444/find_v2/_autocomplete"
|
|
55
55
|
session-forward="true">
|
|
56
56
|
<a href="" class="header-cart" slot="toprightend" style="align-self:center;position:relative;text-decoration:none;">
|
|
57
57
|
<span>Varukorg</span>
|
|
@@ -69,7 +69,7 @@ Content that is higher than 100% viewport height
|
|
|
69
69
|
-->
|
|
70
70
|
`;
|
|
71
71
|
};
|
|
72
|
-
//
|
|
72
|
+
//
|
|
73
73
|
export const Primary = PrimaryTemplate.bind({});
|
|
74
74
|
Primary.args = {
|
|
75
75
|
market : "se",
|
|
@@ -192,7 +192,7 @@ LoggedIn.args = {
|
|
|
192
192
|
market : "se",
|
|
193
193
|
language: 'sv',
|
|
194
194
|
endpoint: 'https://com-integration.postnord.com',
|
|
195
|
-
token: '
|
|
195
|
+
token: '26be29f67598bb2ee0530ac63c938727d703262646e521b67fe9751',
|
|
196
196
|
};
|
|
197
197
|
|
|
198
198
|
const BusinessUserLoggedInTemplate = ({ ...args }) => {
|
|
@@ -9,10 +9,6 @@ export class PnfindPriceResult {
|
|
|
9
9
|
this.showMeasurement = false;
|
|
10
10
|
this.weightText = "";
|
|
11
11
|
this.linkId = '';
|
|
12
|
-
this.usp = {
|
|
13
|
-
Billigast: h("pn-titletag", { slot: "Billigast", icon: "box-label" }, this.item.highestrankusp),
|
|
14
|
-
Snabbast: h("pn-titletag", { slot: "Snabbast", icon: "box-label", color: "blue700" }, this.item.highestrankusp)
|
|
15
|
-
};
|
|
16
12
|
}
|
|
17
13
|
componentWillLoad() {
|
|
18
14
|
this.composeItems();
|
|
@@ -38,7 +34,11 @@ export class PnfindPriceResult {
|
|
|
38
34
|
(h("h2", null,
|
|
39
35
|
h("a", { href: this.item.infopagelink, target: "_blank" }, this.item.name))) :
|
|
40
36
|
(h("h2", null, this.item.name)),
|
|
41
|
-
this.
|
|
37
|
+
(this.item.highestrankusp === "Snabbast") ?
|
|
38
|
+
(h("pn-titletag", { slot: "Snabbast", icon: "bolt", color: "blue700" }, this.item.highestrankusp))
|
|
39
|
+
: (this.item.highestrankusp === "Billigast") ?
|
|
40
|
+
(h("pn-titletag", { slot: "Billigast", icon: "box-label", color: "green700" }, this.item.highestrankusp))
|
|
41
|
+
: null),
|
|
42
42
|
h("div", { slot: "content" },
|
|
43
43
|
h("div", { class: "content" },
|
|
44
44
|
(this.item.description) ? (h("div", { class: "description" }, this.description.map((desc) => (h("li", null, desc))))) : null,
|
|
@@ -202,22 +202,6 @@ export class PnfindPriceResult {
|
|
|
202
202
|
"attribute": "show-measurement",
|
|
203
203
|
"reflect": false,
|
|
204
204
|
"defaultValue": "false"
|
|
205
|
-
},
|
|
206
|
-
"usp": {
|
|
207
|
-
"type": "unknown",
|
|
208
|
-
"mutable": false,
|
|
209
|
-
"complexType": {
|
|
210
|
-
"original": "{ Billigast: any; Snabbast: any; }",
|
|
211
|
-
"resolved": "{ Billigast: any; Snabbast: any; }",
|
|
212
|
-
"references": {}
|
|
213
|
-
},
|
|
214
|
-
"required": false,
|
|
215
|
-
"optional": false,
|
|
216
|
-
"docs": {
|
|
217
|
-
"tags": [],
|
|
218
|
-
"text": ""
|
|
219
|
-
},
|
|
220
|
-
"defaultValue": "{\n Billigast : <pn-titletag slot=\"Billigast\" icon=\"box-label\">{this.item.highestrankusp}</pn-titletag>,\n Snabbast : <pn-titletag slot=\"Snabbast\" icon=\"box-label\" color=\"blue700\">{this.item.highestrankusp}</pn-titletag>\n }"
|
|
221
205
|
}
|
|
222
206
|
}; }
|
|
223
207
|
static get states() { return {
|
|
@@ -80,7 +80,11 @@ export class PnfindPrice {
|
|
|
80
80
|
weightFilteredData.sort((a, b) => {
|
|
81
81
|
var ra = a.rank ? a.rank : 10000;
|
|
82
82
|
var rb = b.rank ? b.rank : 10000;
|
|
83
|
-
|
|
83
|
+
var ua = a.highestrankusp ? a.highestrankusp : "z";
|
|
84
|
+
var ub = b.highestrankusp ? b.highestrankusp : "z";
|
|
85
|
+
const compareUsp = ua.localeCompare(ub);
|
|
86
|
+
const compareRank = ra - rb;
|
|
87
|
+
return compareUsp || compareRank;
|
|
84
88
|
});
|
|
85
89
|
this.filteredItems = weightFilteredData;
|
|
86
90
|
}
|
|
@@ -44,17 +44,17 @@ pn-product-card [slot=title] h2 > a {
|
|
|
44
44
|
pn-product-card [slot=title] h2 > a::after {
|
|
45
45
|
content: "" !important;
|
|
46
46
|
}
|
|
47
|
-
pn-product-card [slot=
|
|
47
|
+
pn-product-card [slot=note] {
|
|
48
48
|
margin-top: 1em;
|
|
49
49
|
margin-bottom: 1em;
|
|
50
50
|
}
|
|
51
|
-
pn-product-card [slot=
|
|
51
|
+
pn-product-card [slot=additionalUSP] {
|
|
52
52
|
display: flex;
|
|
53
53
|
}
|
|
54
|
-
pn-product-card [slot=
|
|
54
|
+
pn-product-card [slot=additionalUSP] :first-child {
|
|
55
55
|
margin-left: 0em;
|
|
56
56
|
}
|
|
57
|
-
pn-product-card [slot=
|
|
57
|
+
pn-product-card [slot=additionalUSP] span {
|
|
58
58
|
margin-left: 1em;
|
|
59
59
|
background: #D3CECB;
|
|
60
60
|
color: #2D2013;
|
|
@@ -64,7 +64,7 @@ pn-product-card [slot=title] [slot=additionalUSP] span {
|
|
|
64
64
|
margin-top: 0.5em;
|
|
65
65
|
font-size: 0.75em;
|
|
66
66
|
}
|
|
67
|
-
pn-product-card
|
|
67
|
+
pn-product-card > pn-illustration {
|
|
68
68
|
min-width: 8rem;
|
|
69
69
|
width: 8rem;
|
|
70
70
|
height: 8rem;
|
|
@@ -77,7 +77,7 @@ pn-product-card [slot=title] > pn-illustration {
|
|
|
77
77
|
border-radius: 100%;
|
|
78
78
|
}
|
|
79
79
|
@media screen and (min-width: 36em) {
|
|
80
|
-
pn-product-card
|
|
80
|
+
pn-product-card > pn-illustration {
|
|
81
81
|
box-shadow: none;
|
|
82
82
|
top: 1.6rem;
|
|
83
83
|
right: 1.6rem;
|
|
@@ -86,26 +86,26 @@ pn-product-card [slot=title] > pn-illustration {
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
@media screen and (min-width: 48em) {
|
|
89
|
-
pn-product-card
|
|
89
|
+
pn-product-card > pn-illustration {
|
|
90
90
|
position: static;
|
|
91
91
|
top: auto;
|
|
92
92
|
right: auto;
|
|
93
93
|
margin-right: 3rem;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
pn-product-card
|
|
96
|
+
pn-product-card .cardcontent {
|
|
97
97
|
display: flex;
|
|
98
98
|
flex-direction: column;
|
|
99
99
|
justify-content: center;
|
|
100
100
|
flex-grow: 1;
|
|
101
101
|
}
|
|
102
102
|
@media screen and (min-width: 48em) {
|
|
103
|
-
pn-product-card
|
|
103
|
+
pn-product-card .cardcontent {
|
|
104
104
|
flex-direction: row;
|
|
105
105
|
gap: 1.6rem;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
pn-product-card [slot=
|
|
108
|
+
pn-product-card [slot=cardprice] {
|
|
109
109
|
display: flex;
|
|
110
110
|
flex-direction: column;
|
|
111
111
|
justify-content: center;
|
|
@@ -113,48 +113,48 @@ pn-product-card [slot=title] [slot=cardprice] {
|
|
|
113
113
|
flex-grow: 1;
|
|
114
114
|
}
|
|
115
115
|
@media screen and (min-width: 36em) {
|
|
116
|
-
pn-product-card [slot=
|
|
116
|
+
pn-product-card [slot=cardprice] {
|
|
117
117
|
flex-direction: row;
|
|
118
118
|
justify-content: space-between;
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
@media screen and (min-width: 48em) {
|
|
122
|
-
pn-product-card [slot=
|
|
122
|
+
pn-product-card [slot=cardprice] {
|
|
123
123
|
flex-direction: column;
|
|
124
124
|
justify-content: center;
|
|
125
125
|
align-items: flex-end;
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
pn-product-card [slot=
|
|
128
|
+
pn-product-card [slot=mobiledownload] {
|
|
129
129
|
margin-top: 1rem;
|
|
130
130
|
white-space: nowrap;
|
|
131
131
|
text-align: center;
|
|
132
132
|
display: flex;
|
|
133
133
|
flex-direction: column;
|
|
134
134
|
}
|
|
135
|
-
pn-product-card [slot=
|
|
135
|
+
pn-product-card [slot=mobiledownload] #riktiga {
|
|
136
136
|
order: 4;
|
|
137
137
|
margin-top: 1em;
|
|
138
138
|
}
|
|
139
|
-
pn-product-card [slot=
|
|
139
|
+
pn-product-card [slot=mobiledownload] #riktiga > div > a::after {
|
|
140
140
|
content: "" !important;
|
|
141
141
|
}
|
|
142
|
-
pn-product-card [slot=
|
|
142
|
+
pn-product-card [slot=mobiledownload] .riktigaAndroidImg {
|
|
143
143
|
width: 6em;
|
|
144
144
|
margin: 0.5em;
|
|
145
145
|
}
|
|
146
|
-
pn-product-card [slot=
|
|
146
|
+
pn-product-card [slot=mobiledownload] .riktigaAppleImg {
|
|
147
147
|
width: 5.6em;
|
|
148
148
|
margin: 0.5em;
|
|
149
149
|
}
|
|
150
|
-
pn-product-card [slot=
|
|
150
|
+
pn-product-card [slot=mobiledownload] a {
|
|
151
151
|
text-decoration: none;
|
|
152
152
|
color: #005D92;
|
|
153
153
|
}
|
|
154
|
-
pn-product-card [slot=
|
|
154
|
+
pn-product-card [slot=mobiledownload] a h3 {
|
|
155
155
|
text-decoration: underline;
|
|
156
156
|
}
|
|
157
|
-
pn-product-card [slot=
|
|
157
|
+
pn-product-card [slot=servicepoint] {
|
|
158
158
|
flex-direction: column;
|
|
159
159
|
justify-content: center;
|
|
160
160
|
flex-grow: 2;
|
|
@@ -162,32 +162,32 @@ pn-product-card [slot=title] [slot=servicepoint] {
|
|
|
162
162
|
text-align: center;
|
|
163
163
|
}
|
|
164
164
|
@media screen and (min-width: 36em) {
|
|
165
|
-
pn-product-card [slot=
|
|
165
|
+
pn-product-card [slot=servicepoint] {
|
|
166
166
|
flex-direction: row;
|
|
167
167
|
justify-content: space-between;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
@media screen and (min-width: 48em) {
|
|
171
|
-
pn-product-card [slot=
|
|
171
|
+
pn-product-card [slot=servicepoint] {
|
|
172
172
|
flex-direction: column;
|
|
173
173
|
justify-content: center;
|
|
174
174
|
align-items: flex-end;
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
|
-
pn-product-card
|
|
177
|
+
pn-product-card .details {
|
|
178
178
|
display: flex;
|
|
179
179
|
flex-direction: column;
|
|
180
180
|
justify-content: space-between;
|
|
181
181
|
width: 100%;
|
|
182
182
|
}
|
|
183
|
-
pn-product-card
|
|
183
|
+
pn-product-card .info {
|
|
184
184
|
display: flex;
|
|
185
185
|
justify-content: space-between;
|
|
186
186
|
flex-grow: 1;
|
|
187
187
|
flex-flow: wrap;
|
|
188
188
|
padding: 0 1em 0 0;
|
|
189
189
|
}
|
|
190
|
-
pn-product-card
|
|
190
|
+
pn-product-card .info > * {
|
|
191
191
|
min-width: 6em;
|
|
192
192
|
margin: 0.5em 1em 0.5em 0;
|
|
193
193
|
}
|
|
@@ -128,6 +128,12 @@ export const PnMarketwebSiteheaderLogin: {
|
|
|
128
128
|
new (): PnMarketwebSiteheaderLogin;
|
|
129
129
|
};
|
|
130
130
|
|
|
131
|
+
interface PnMarketwebSiteheaderProfileselection extends Components.PnMarketwebSiteheaderProfileselection, HTMLElement {}
|
|
132
|
+
export const PnMarketwebSiteheaderProfileselection: {
|
|
133
|
+
prototype: PnMarketwebSiteheaderProfileselection;
|
|
134
|
+
new (): PnMarketwebSiteheaderProfileselection;
|
|
135
|
+
};
|
|
136
|
+
|
|
131
137
|
interface PnMarketwebSiteheaderSearch extends Components.PnMarketwebSiteheaderSearch, HTMLElement {}
|
|
132
138
|
export const PnMarketwebSiteheaderSearch: {
|
|
133
139
|
prototype: PnMarketwebSiteheaderSearch;
|