@postnord/pn-marketweb-components 2.1.0 → 2.1.2
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/{data-b5ef4f7c.js → data-4fa6b08d.js} +2 -2
- package/cjs/loader.cjs.js +1 -1
- package/cjs/pn-find-price-result.cjs.entry.js +4 -4
- package/cjs/{pn-find-price-store-0b8c195c.js → pn-find-price-store-a91ce3f6.js} +2 -2
- package/cjs/pn-find-price.cjs.entry.js +7 -7
- package/cjs/pn-language-selector_9.cjs.entry.js +32 -19
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/cjs/{pn-marketweb-siteheader-login-links_2.cjs.entry.js → pn-marketweb-siteheader-login-button_5.cjs.entry.js} +109 -18
- package/cjs/pn-marketweb-siteheader-login-linklist.cjs.entry.js +27 -15
- package/cjs/pn-marketweb-siteheader.cjs.entry.js +74 -58
- package/cjs/{pn-product-card_4.cjs.entry.js → pn-product-card_3.cjs.entry.js} +0 -18
- package/cjs/pn-product-pricelist.cjs.entry.js +1 -1
- package/cjs/pn-proxio-findprice-result.cjs.entry.js +63 -0
- package/cjs/pn-proxio-findprice.cjs.entry.js +311 -0
- package/cjs/pn-proxio-pricegroup.cjs.entry.js +6 -22
- package/cjs/pn-titletag.cjs.entry.js +24 -0
- package/cjs/translations-585711ff.js +21 -0
- package/collection/collection-manifest.json +5 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-button.css +0 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-button.js +47 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.css +27 -13
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.js +51 -16
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-links.js +32 -23
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-mypage-button.css +0 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-mypage-button.js +55 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.js +112 -25
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-unified-login.css +0 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-unified-login.js +88 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.css +33 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.js +26 -4
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.stories.js +3 -4
- package/collection/components/layout-components/pn-marketweb-siteheader/translations.js +67 -55
- package/collection/components/layout-components/pn-marketweb-siteheader/unifiedLoginHelper.js +46 -0
- package/collection/components/widgets/pn-find-price/data.js +2 -2
- package/collection/components/widgets/pn-find-price/pn-find-price-result.js +7 -7
- package/collection/components/widgets/pn-find-price/pn-find-price-store.js +2 -2
- package/collection/components/widgets/pn-find-price/pn-find-price-translations.js +5 -5
- package/collection/components/widgets/pn-proxio-findprice/data.js +52 -0
- package/collection/components/widgets/pn-proxio-findprice/find-price.stories.js +27 -0
- package/collection/components/widgets/pn-proxio-findprice/img/clouds.svg +5 -0
- package/collection/components/widgets/pn-proxio-findprice/img/large-package.svg +9 -0
- package/collection/components/widgets/pn-proxio-findprice/img/medium-package.svg +9 -0
- package/collection/components/widgets/pn-proxio-findprice/img/postnord-person1.svg +52 -0
- package/collection/components/widgets/pn-proxio-findprice/img/postnord-person2.svg +56 -0
- package/collection/components/widgets/pn-proxio-findprice/img/small-package.svg +23 -0
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-result.css +9 -0
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-result.js +234 -0
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-store.js +29 -0
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-translations.js +106 -0
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-types.js +1 -0
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice.css +119 -0
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice.js +250 -0
- package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.css +3 -0
- package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.js +1 -0
- package/collection/globals/MarketWebLoginManager.js +1 -1
- package/custom-elements/index.d.ts +30 -0
- package/custom-elements/index.js +775 -273
- package/esm/{data-9c9c5f41.js → data-059c2a58.js} +2 -2
- package/esm/loader.js +1 -1
- package/esm/pn-find-price-result.entry.js +4 -4
- package/esm/{pn-find-price-store-b4556c9b.js → pn-find-price-store-bde5071d.js} +2 -2
- package/esm/pn-find-price.entry.js +7 -7
- package/esm/pn-language-selector_9.entry.js +32 -19
- package/esm/pn-market-web-components.js +1 -1
- package/esm/{pn-marketweb-siteheader-login-links_2.entry.js → pn-marketweb-siteheader-login-button_5.entry.js} +107 -19
- package/esm/pn-marketweb-siteheader-login-linklist.entry.js +27 -15
- package/esm/pn-marketweb-siteheader.entry.js +74 -58
- package/esm/{pn-product-card_4.entry.js → pn-product-card_3.entry.js} +2 -19
- package/esm/pn-product-pricelist.entry.js +1 -1
- package/esm/pn-proxio-findprice-result.entry.js +59 -0
- package/esm/pn-proxio-findprice.entry.js +307 -0
- package/esm/pn-proxio-pricegroup.entry.js +3 -19
- package/esm/pn-titletag.entry.js +20 -0
- package/esm/translations-022fefa0.js +19 -0
- package/esm-es5/{data-9c9c5f41.js → data-059c2a58.js} +1 -1
- package/esm-es5/loader.js +1 -1
- package/esm-es5/pn-find-price-result.entry.js +1 -1
- package/esm-es5/{pn-find-price-store-b4556c9b.js → pn-find-price-store-bde5071d.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-login-button_5.entry.js +1 -0
- package/esm-es5/pn-marketweb-siteheader-login-linklist.entry.js +1 -1
- package/esm-es5/pn-marketweb-siteheader.entry.js +1 -1
- package/esm-es5/pn-product-card_3.entry.js +1 -0
- package/esm-es5/pn-product-pricelist.entry.js +1 -1
- package/esm-es5/pn-proxio-findprice-result.entry.js +1 -0
- package/esm-es5/pn-proxio-findprice.entry.js +1 -0
- package/esm-es5/pn-proxio-pricegroup.entry.js +1 -1
- package/esm-es5/pn-titletag.entry.js +1 -0
- package/esm-es5/translations-022fefa0.js +1 -0
- package/package.json +2 -2
- package/pn-market-web-components/p-10eafcd7.entry.js +1 -0
- package/pn-market-web-components/p-2b4c41aa.system.entry.js +1 -0
- package/pn-market-web-components/p-3120cc66.system.entry.js +1 -0
- package/pn-market-web-components/{p-37017f68.system.js → p-3738a2df.system.js} +1 -1
- package/pn-market-web-components/p-3969ec4d.entry.js +1 -0
- package/pn-market-web-components/{p-0b0727dc.entry.js → p-39b54d40.entry.js} +1 -1
- package/pn-market-web-components/p-499bb3ac.entry.js +1 -0
- package/pn-market-web-components/p-4a03854b.system.entry.js +1 -0
- package/pn-market-web-components/p-4b0020a0.system.entry.js +1 -0
- package/pn-market-web-components/p-557328e3.system.entry.js +1 -0
- package/pn-market-web-components/{p-ac0e3c22.system.entry.js → p-59be826b.system.entry.js} +1 -1
- package/pn-market-web-components/p-67887512.system.js +1 -1
- package/pn-market-web-components/p-6995075c.entry.js +1 -0
- package/pn-market-web-components/p-8afa354b.system.entry.js +1 -0
- package/pn-market-web-components/{p-aab2e28f.entry.js → p-8b684578.entry.js} +1 -1
- package/pn-market-web-components/p-951861fa.entry.js +1 -0
- package/pn-market-web-components/{p-736e5b84.system.entry.js → p-98a7ddd1.system.entry.js} +1 -1
- package/pn-market-web-components/p-a120063f.js +1 -0
- package/pn-market-web-components/p-b501b216.system.js +1 -0
- package/pn-market-web-components/p-b7adbd6d.system.entry.js +1 -0
- package/pn-market-web-components/{p-3ae38e63.entry.js → p-b9a84e67.entry.js} +1 -1
- package/pn-market-web-components/p-c8ceda2e.entry.js +1 -0
- package/pn-market-web-components/p-e397e11b.entry.js +1 -0
- package/pn-market-web-components/p-e7a1cda9.entry.js +1 -0
- package/pn-market-web-components/{p-d0653c80.system.entry.js → p-e881d111.system.entry.js} +1 -1
- package/pn-market-web-components/{p-e4a4e68f.system.entry.js → p-ecdf2b69.system.entry.js} +1 -1
- package/pn-market-web-components/p-f58bde56.js +1 -0
- package/pn-market-web-components/p-f782ce94.system.entry.js +1 -0
- package/pn-market-web-components/p-fefc9629.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-login-button.d.ts +8 -0
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.d.ts +4 -1
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-links.d.ts +2 -1
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-mypage-button.d.ts +6 -0
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.d.ts +7 -2
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-types.d.ts +10 -8
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-unified-login.d.ts +8 -0
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.d.ts +2 -0
- package/types/components/layout-components/pn-marketweb-siteheader/translations.d.ts +12 -0
- package/types/components/layout-components/pn-marketweb-siteheader/unifiedLoginHelper.d.ts +1 -0
- package/types/components/widgets/pn-find-price/pn-find-price-store.d.ts +4 -4
- package/types/components/widgets/pn-find-price/pn-find-price-translations.d.ts +5 -5
- package/types/components/widgets/pn-find-price/pn-find-price-types.d.ts +2 -2
- package/types/components/widgets/pn-proxio-findprice/pn-proxio-findprice-result.d.ts +22 -0
- package/types/components/widgets/pn-proxio-findprice/pn-proxio-findprice-store.d.ts +51 -0
- package/types/components/widgets/pn-proxio-findprice/pn-proxio-findprice-translations.d.ts +106 -0
- package/types/components/widgets/pn-proxio-findprice/pn-proxio-findprice-types.d.ts +39 -0
- package/types/components/widgets/pn-proxio-findprice/pn-proxio-findprice.d.ts +24 -0
- package/types/components/widgets/pn-proxio-pricegroup/types.d.ts +1 -1
- package/types/components.d.ts +130 -1
- package/esm-es5/pn-marketweb-siteheader-login-links_2.entry.js +0 -1
- package/esm-es5/pn-product-card_4.entry.js +0 -1
- package/pn-market-web-components/p-022d9a78.entry.js +0 -1
- package/pn-market-web-components/p-198d9c77.system.entry.js +0 -1
- package/pn-market-web-components/p-332e9005.entry.js +0 -1
- package/pn-market-web-components/p-3c0d63fb.system.entry.js +0 -1
- package/pn-market-web-components/p-63c30175.entry.js +0 -1
- package/pn-market-web-components/p-6b33db5b.system.entry.js +0 -1
- package/pn-market-web-components/p-77557da8.entry.js +0 -1
- package/pn-market-web-components/p-92fd28e6.entry.js +0 -1
- package/pn-market-web-components/p-a119cb8e.entry.js +0 -1
- package/pn-market-web-components/p-c4254e9e.js +0 -1
- package/pn-market-web-components/p-d542a52b.system.entry.js +0 -1
- package/pn-market-web-components/p-eb662559.system.entry.js +0 -1
- /package/pn-market-web-components/{p-bfa7c83f.system.js → p-1534926e.system.js} +0 -0
- /package/pn-market-web-components/{p-86b52823.js → p-a07906d5.js} +0 -0
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import { Component, h, Prop, State, Watch } from "@stencil/core";
|
|
2
|
+
import { translations, markets } from "./pn-proxio-findprice-translations";
|
|
3
|
+
import { MarketWebContextService } from "../../../globals/MarketWebContextService";
|
|
4
|
+
import { weights, sizeCategories } from "./data.js";
|
|
5
|
+
import { FetchHelper } from "../../../globals/FetchHelper";
|
|
6
|
+
import { state } from "./pn-proxio-findprice-store";
|
|
7
|
+
import S from "./img/small-package.svg";
|
|
8
|
+
import M from "./img/medium-package.svg";
|
|
9
|
+
import L from "./img/large-package.svg";
|
|
10
|
+
import person from "./img/postnord-person2.svg";
|
|
11
|
+
import clouds from "./img/clouds.svg";
|
|
12
|
+
export class PnProxioFindPrice {
|
|
13
|
+
constructor() {
|
|
14
|
+
this.endpoint = null;
|
|
15
|
+
this.language = "da";
|
|
16
|
+
this.market = "dk";
|
|
17
|
+
this.cache = false;
|
|
18
|
+
this.filteredItems = [];
|
|
19
|
+
this.weight = { value: 0, name: "" };
|
|
20
|
+
this.weightvalue = 0;
|
|
21
|
+
this.sizecategory = { value: "", name: "", icon: "", unit: "" };
|
|
22
|
+
this.data = { proxioProducts: [] };
|
|
23
|
+
this.fetchHelper = new FetchHelper("proxiopricegroups");
|
|
24
|
+
}
|
|
25
|
+
componentWillLoad() {
|
|
26
|
+
this.setInitialValues().then(() => {
|
|
27
|
+
this.init();
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
async setInitialValues(href = window.location.href) {
|
|
31
|
+
const marketWebContextService = new MarketWebContextService(href);
|
|
32
|
+
const environment = await marketWebContextService.getEnvironmentName();
|
|
33
|
+
if ((!this.endpoint && (environment === null || environment === void 0 ? void 0 : environment.indexOf('local')) === -1)) {
|
|
34
|
+
const market = await marketWebContextService.getMarket();
|
|
35
|
+
this.endpoint = await marketWebContextService.getEndpoint(environment, market);
|
|
36
|
+
}
|
|
37
|
+
if (!this.endpoint) {
|
|
38
|
+
this.endpoint = "";
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
init() {
|
|
42
|
+
this.setState();
|
|
43
|
+
this.getDataSource();
|
|
44
|
+
this.fetchData();
|
|
45
|
+
}
|
|
46
|
+
async getDataSource() {
|
|
47
|
+
try {
|
|
48
|
+
//for keeping small value preselected
|
|
49
|
+
this.sizecategory = sizeCategories.filter(x => x.value === "S")[0];
|
|
50
|
+
console.log(this.sizecategory);
|
|
51
|
+
this.filterItems();
|
|
52
|
+
}
|
|
53
|
+
catch (e) {
|
|
54
|
+
console.log('Unable to parse data');
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
async fetchData() {
|
|
58
|
+
if (!this.market || !this.language) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const endpoint = (this.endpoint.lastIndexOf("/") === this.endpoint.length - 1) ? this.endpoint.substring(0, this.endpoint.length - 1) : this.endpoint;
|
|
62
|
+
const fetchUrl = `${endpoint}/api/proxio/price-list-groups?market=${this.market}&language=${this.language}&cached=${this.cache}`;
|
|
63
|
+
//const fetchUrl = `http://localhost:51444/api/proxio/price-list-groups?market=${this.market}&language=${this.language}&cached=${this.cache}`;
|
|
64
|
+
const data = await this.fetchHelper.fetchJson(fetchUrl, {
|
|
65
|
+
'mode': 'cors',
|
|
66
|
+
}, this.cache, this.onFetchData.bind(this));
|
|
67
|
+
if (data) {
|
|
68
|
+
this.data.proxioProducts = data;
|
|
69
|
+
}
|
|
70
|
+
this.filterItems();
|
|
71
|
+
}
|
|
72
|
+
onFetchData(data) {
|
|
73
|
+
this.data = data;
|
|
74
|
+
}
|
|
75
|
+
setState() {
|
|
76
|
+
this.market = "dk";
|
|
77
|
+
if (this.market) {
|
|
78
|
+
state.market = markets[this.market];
|
|
79
|
+
}
|
|
80
|
+
if (this.language && translations[this.language]) {
|
|
81
|
+
state.i18n = translations[this.language];
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
filterItems() {
|
|
85
|
+
if (!this.data) {
|
|
86
|
+
console.log('Data has not yet been loaded');
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
console.log("data ", this.data);
|
|
90
|
+
const sizeItemData = this.data.proxioProducts.filter(item => {
|
|
91
|
+
return item.proxioProduct.productWeightGroupList.some(weightGroup => {
|
|
92
|
+
return weightGroup.item3.includes(this.sizecategory.value);
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
console.log("sizeItemData ", sizeItemData);
|
|
96
|
+
if (!this.weight) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const comparisonWeight = this.weight.value;
|
|
100
|
+
let weightFilteredData = sizeItemData.filter(item => {
|
|
101
|
+
return item.proxioProduct.productWeightGroupList.some(weightGroup => {
|
|
102
|
+
return weightGroup.item1 === comparisonWeight;
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
console.log("weightFilteredData ", weightFilteredData);
|
|
106
|
+
if (weightFilteredData.length === 0 && this.weightvalue !== 0) {
|
|
107
|
+
weightFilteredData = sizeItemData.filter(item => {
|
|
108
|
+
return item.proxioProduct.productWeightGroupList.some(weightGroup => {
|
|
109
|
+
return weightGroup.item1 === comparisonWeight;
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
this.filteredItems = weightFilteredData;
|
|
114
|
+
}
|
|
115
|
+
render() {
|
|
116
|
+
return (h("div", { class: "findprice-form" },
|
|
117
|
+
h("div", { class: "findprice-form-wrapper" },
|
|
118
|
+
h("h4", { class: "findprice__heading" }, state.i18n.sizeheading),
|
|
119
|
+
h("div", { class: "sizecategory" },
|
|
120
|
+
h("table", { class: "sizeTable" },
|
|
121
|
+
h("img", { id: "clouds", src: clouds }),
|
|
122
|
+
h("tr", null,
|
|
123
|
+
h("td", null,
|
|
124
|
+
h("img", { class: "firstCell", src: person })),
|
|
125
|
+
h("td", null,
|
|
126
|
+
h("img", { src: S })),
|
|
127
|
+
h("td", null,
|
|
128
|
+
h("img", { src: M })),
|
|
129
|
+
h("td", null,
|
|
130
|
+
h("img", { src: L }))),
|
|
131
|
+
h("tr", null,
|
|
132
|
+
h("td", null),
|
|
133
|
+
sizeCategories.map((sizeCategory) => (h("td", null,
|
|
134
|
+
h("pn-radio-button", { id: 'findpricecategory-' + sizeCategory.value, radioid: sizeCategory.value, value: sizeCategory.value, name: "sizecategory", checked: sizeCategory.value === this.sizecategory.value, onChange: () => {
|
|
135
|
+
this.sizecategory = sizeCategories.filter(x => x.value === sizeCategory.value)[0];
|
|
136
|
+
this.weight = { value: 0, name: "" };
|
|
137
|
+
this.weightvalue = this.weight.value;
|
|
138
|
+
} }))))))),
|
|
139
|
+
h("h4", { class: "findprice__heading findprice__subheading" }, state.i18n.weightheading),
|
|
140
|
+
(this.sizecategory.value && weights[this.sizecategory.unit]) ? (h("div", { class: "weightoption" }, h("div", { class: "weightoption-content" }, weights[this.sizecategory.unit].map((wght) => (h("pn-choice-button", { id: 'findpriceweight-' + wght.value, choiceid: this.sizecategory.value + wght.value, name: "weight", type: "radio", value: (!this.weight.value) ? 0 : weights[this.sizecategory.unit].findIndex((x) => x.value === this.weightvalue), checked: wght.value === this.weight.value, onChange: () => {
|
|
141
|
+
this.weight = weights[this.sizecategory.unit].filter(x => x.value === wght.value)[0];
|
|
142
|
+
this.weightvalue = this.weight.value;
|
|
143
|
+
} }, wght.name)))))) : null),
|
|
144
|
+
(this.filteredItems && this.filteredItems.length > 0) ? (h("div", { class: "resultlist" },
|
|
145
|
+
(state.i18n.resultlistheading) ? (h("div", { class: "resultHeading" }, state.i18n.resultlistheading)) : null,
|
|
146
|
+
this.filteredItems.map((item) => (h("div", null,
|
|
147
|
+
h("pn-proxio-findprice-result", { activeweight: this.weight.value, item: item })))))) : null));
|
|
148
|
+
}
|
|
149
|
+
static get is() { return "pn-proxio-findprice"; }
|
|
150
|
+
static get originalStyleUrls() { return {
|
|
151
|
+
"$": ["pn-proxio-findprice.scss"]
|
|
152
|
+
}; }
|
|
153
|
+
static get styleUrls() { return {
|
|
154
|
+
"$": ["pn-proxio-findprice.css"]
|
|
155
|
+
}; }
|
|
156
|
+
static get properties() { return {
|
|
157
|
+
"endpoint": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"mutable": true,
|
|
160
|
+
"complexType": {
|
|
161
|
+
"original": "string",
|
|
162
|
+
"resolved": "string",
|
|
163
|
+
"references": {}
|
|
164
|
+
},
|
|
165
|
+
"required": false,
|
|
166
|
+
"optional": false,
|
|
167
|
+
"docs": {
|
|
168
|
+
"tags": [],
|
|
169
|
+
"text": ""
|
|
170
|
+
},
|
|
171
|
+
"attribute": "endpoint",
|
|
172
|
+
"reflect": false,
|
|
173
|
+
"defaultValue": "null"
|
|
174
|
+
},
|
|
175
|
+
"language": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"mutable": true,
|
|
178
|
+
"complexType": {
|
|
179
|
+
"original": "string",
|
|
180
|
+
"resolved": "string",
|
|
181
|
+
"references": {}
|
|
182
|
+
},
|
|
183
|
+
"required": false,
|
|
184
|
+
"optional": false,
|
|
185
|
+
"docs": {
|
|
186
|
+
"tags": [],
|
|
187
|
+
"text": ""
|
|
188
|
+
},
|
|
189
|
+
"attribute": "language",
|
|
190
|
+
"reflect": false,
|
|
191
|
+
"defaultValue": "\"da\""
|
|
192
|
+
},
|
|
193
|
+
"market": {
|
|
194
|
+
"type": "string",
|
|
195
|
+
"mutable": true,
|
|
196
|
+
"complexType": {
|
|
197
|
+
"original": "string",
|
|
198
|
+
"resolved": "string",
|
|
199
|
+
"references": {}
|
|
200
|
+
},
|
|
201
|
+
"required": false,
|
|
202
|
+
"optional": false,
|
|
203
|
+
"docs": {
|
|
204
|
+
"tags": [],
|
|
205
|
+
"text": ""
|
|
206
|
+
},
|
|
207
|
+
"attribute": "market",
|
|
208
|
+
"reflect": false,
|
|
209
|
+
"defaultValue": "\"dk\""
|
|
210
|
+
},
|
|
211
|
+
"cache": {
|
|
212
|
+
"type": "boolean",
|
|
213
|
+
"mutable": false,
|
|
214
|
+
"complexType": {
|
|
215
|
+
"original": "boolean",
|
|
216
|
+
"resolved": "boolean",
|
|
217
|
+
"references": {}
|
|
218
|
+
},
|
|
219
|
+
"required": false,
|
|
220
|
+
"optional": false,
|
|
221
|
+
"docs": {
|
|
222
|
+
"tags": [],
|
|
223
|
+
"text": ""
|
|
224
|
+
},
|
|
225
|
+
"attribute": "cache",
|
|
226
|
+
"reflect": false,
|
|
227
|
+
"defaultValue": "false"
|
|
228
|
+
}
|
|
229
|
+
}; }
|
|
230
|
+
static get states() { return {
|
|
231
|
+
"filteredItems": {},
|
|
232
|
+
"weight": {},
|
|
233
|
+
"weightvalue": {},
|
|
234
|
+
"sizecategory": {},
|
|
235
|
+
"data": {}
|
|
236
|
+
}; }
|
|
237
|
+
static get watchers() { return [{
|
|
238
|
+
"propName": "market",
|
|
239
|
+
"methodName": "setState"
|
|
240
|
+
}, {
|
|
241
|
+
"propName": "language",
|
|
242
|
+
"methodName": "setState"
|
|
243
|
+
}, {
|
|
244
|
+
"propName": "sizecategory",
|
|
245
|
+
"methodName": "filterItems"
|
|
246
|
+
}, {
|
|
247
|
+
"propName": "weightvalue",
|
|
248
|
+
"methodName": "filterItems"
|
|
249
|
+
}]; }
|
|
250
|
+
}
|
|
@@ -14,6 +14,9 @@ pn-proxio-pricegroup div.weightvaluecontainer {
|
|
|
14
14
|
pn-proxio-pricegroup div.weightvaluecontainer pn-button {
|
|
15
15
|
transform: translateY(-0.4rem);
|
|
16
16
|
}
|
|
17
|
+
pn-proxio-pricegroup div.weightvaluecontainer pn-button button::before {
|
|
18
|
+
display: none;
|
|
19
|
+
}
|
|
17
20
|
pn-proxio-pricegroup div.weightradios {
|
|
18
21
|
display: flex;
|
|
19
22
|
flex-direction: row;
|
|
@@ -42,6 +42,7 @@ export class PnProxioPricegroup {
|
|
|
42
42
|
}
|
|
43
43
|
const endpoint = (this.endpoint.lastIndexOf("/") === this.endpoint.length - 1) ? this.endpoint.substring(0, this.endpoint.length - 1) : this.endpoint;
|
|
44
44
|
const fetchUrl = `${endpoint}/api/proxio/price-list-group?tariffId=${this.tariffid}&market=${this.market}&language=${this.language}&cached=${this.cache}`;
|
|
45
|
+
//const fetchUrl = `http://localhost:51444/api/proxio/price-list-group?tariffId=${this.tariffid}&market=${this.market}&language=${this.language}&cached=${this.cache}`;
|
|
45
46
|
const data = await this.fetchHelper.fetchJson(fetchUrl, {
|
|
46
47
|
'mode': 'cors',
|
|
47
48
|
}, this.cache, this.onFetchData.bind(this));
|
|
@@ -332,7 +332,7 @@ class MarketWebLoginManager {
|
|
|
332
332
|
getBaseUrl() {
|
|
333
333
|
const atEnvironments = ["localhost", "integration.", 'local.'];
|
|
334
334
|
let useATEnv = atEnvironments.filter(x => this.endpoint.indexOf(x) !== -1).length > 0;
|
|
335
|
-
if (
|
|
335
|
+
if (['devportal.postnord.com', 'atportal.postnord.com'].indexOf(window.location.hostname) !== -1) {
|
|
336
336
|
useATEnv = true;
|
|
337
337
|
}
|
|
338
338
|
if (useATEnv) {
|
|
@@ -152,6 +152,12 @@ export const PnMarketwebSiteheaderLogin: {
|
|
|
152
152
|
new (): PnMarketwebSiteheaderLogin;
|
|
153
153
|
};
|
|
154
154
|
|
|
155
|
+
interface PnMarketwebSiteheaderLoginButton extends Components.PnMarketwebSiteheaderLoginButton, HTMLElement {}
|
|
156
|
+
export const PnMarketwebSiteheaderLoginButton: {
|
|
157
|
+
prototype: PnMarketwebSiteheaderLoginButton;
|
|
158
|
+
new (): PnMarketwebSiteheaderLoginButton;
|
|
159
|
+
};
|
|
160
|
+
|
|
155
161
|
interface PnMarketwebSiteheaderLoginLinklist extends Components.PnMarketwebSiteheaderLoginLinklist, HTMLElement {}
|
|
156
162
|
export const PnMarketwebSiteheaderLoginLinklist: {
|
|
157
163
|
prototype: PnMarketwebSiteheaderLoginLinklist;
|
|
@@ -164,6 +170,12 @@ export const PnMarketwebSiteheaderLoginLinks: {
|
|
|
164
170
|
new (): PnMarketwebSiteheaderLoginLinks;
|
|
165
171
|
};
|
|
166
172
|
|
|
173
|
+
interface PnMarketwebSiteheaderLoginMypageButton extends Components.PnMarketwebSiteheaderLoginMypageButton, HTMLElement {}
|
|
174
|
+
export const PnMarketwebSiteheaderLoginMypageButton: {
|
|
175
|
+
prototype: PnMarketwebSiteheaderLoginMypageButton;
|
|
176
|
+
new (): PnMarketwebSiteheaderLoginMypageButton;
|
|
177
|
+
};
|
|
178
|
+
|
|
167
179
|
interface PnMarketwebSiteheaderLoginProfileselection extends Components.PnMarketwebSiteheaderLoginProfileselection, HTMLElement {}
|
|
168
180
|
export const PnMarketwebSiteheaderLoginProfileselection: {
|
|
169
181
|
prototype: PnMarketwebSiteheaderLoginProfileselection;
|
|
@@ -176,6 +188,12 @@ export const PnMarketwebSiteheaderSearch: {
|
|
|
176
188
|
new (): PnMarketwebSiteheaderSearch;
|
|
177
189
|
};
|
|
178
190
|
|
|
191
|
+
interface PnMarketwebSiteheaderUnifiedLogin extends Components.PnMarketwebSiteheaderUnifiedLogin, HTMLElement {}
|
|
192
|
+
export const PnMarketwebSiteheaderUnifiedLogin: {
|
|
193
|
+
prototype: PnMarketwebSiteheaderUnifiedLogin;
|
|
194
|
+
new (): PnMarketwebSiteheaderUnifiedLogin;
|
|
195
|
+
};
|
|
196
|
+
|
|
179
197
|
interface PnParcelTracker extends Components.PnParcelTracker, HTMLElement {}
|
|
180
198
|
export const PnParcelTracker: {
|
|
181
199
|
prototype: PnParcelTracker;
|
|
@@ -272,6 +290,18 @@ export const PnProfileSelectorOption: {
|
|
|
272
290
|
new (): PnProfileSelectorOption;
|
|
273
291
|
};
|
|
274
292
|
|
|
293
|
+
interface PnProxioFindprice extends Components.PnProxioFindprice, HTMLElement {}
|
|
294
|
+
export const PnProxioFindprice: {
|
|
295
|
+
prototype: PnProxioFindprice;
|
|
296
|
+
new (): PnProxioFindprice;
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
interface PnProxioFindpriceResult extends Components.PnProxioFindpriceResult, HTMLElement {}
|
|
300
|
+
export const PnProxioFindpriceResult: {
|
|
301
|
+
prototype: PnProxioFindpriceResult;
|
|
302
|
+
new (): PnProxioFindpriceResult;
|
|
303
|
+
};
|
|
304
|
+
|
|
275
305
|
interface PnProxioPricegroup extends Components.PnProxioPricegroup, HTMLElement {}
|
|
276
306
|
export const PnProxioPricegroup: {
|
|
277
307
|
prototype: PnProxioPricegroup;
|