@postnord/pn-marketweb-components 2.4.11 → 2.4.12
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/pn-proxio-findprice.cjs.entry.js +22 -23
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice.css +1 -0
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice.js +21 -22
- package/components/pn-proxio-findprice.js +22 -23
- package/esm/pn-proxio-findprice.entry.js +22 -23
- package/esm-es5/pn-proxio-findprice.entry.js +1 -1
- package/package.json +1 -1
- package/pn-market-web-components/{p-de823bdb.system.entry.js → p-247eea44.system.entry.js} +1 -1
- package/pn-market-web-components/p-884fc6d1.entry.js +1 -0
- package/pn-market-web-components/p-d295ef71.system.js +1 -1
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/types/components/widgets/pn-proxio-findprice/pn-proxio-findprice.d.ts +2 -1
- package/pn-market-web-components/p-9271cf8e.entry.js +0 -1
|
@@ -229,7 +229,7 @@ const postnordPerson2Svg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTcxIiBoZW
|
|
|
229
229
|
|
|
230
230
|
const cloudsSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjc4IiBoZWlnaHQ9IjU1IiB2aWV3Qm94PSIwIDAgMjc4IDU1IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjQ3LjM1NSA0OS42ODE1QzI0Ny42OTQgNTIuNDc5IDI0OS43MjIgNTQuNjI2MSAyNTIuMTgxIDU0LjYyNjFIMjcyLjkyNkMyNzUuNjIgNTQuNjI2MSAyNzcuNzk4IDUyLjA1MjIgMjc3Ljc5OCA0OC44Njg2VjQ4LjgwMDhDMjc3Ljc5OCA0NS42MTczIDI3NS42MiA0My4wNDMzIDI3Mi45MjYgNDMuMDQzM0gyNzAuNTM3QzI2OS42MDggMz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ljg4IDI1LjYzMjhWMjUuNTM3NUMxNjguODggMjEuNjI3NyAxNjYuMjA5IDE4LjQ4MDggMTYyLjg5MSAxOC40ODA4SDE1OS45MDdDMTU4Ljc3NyAxMy44MDE1IDE1NS4zMyAxMC4zNzUzIDE1MS4yMzYgMTAuMzc1M0gxNDYuNDJDMTQ1Ljk3MSA0LjcwNTMzIDE0MS45MjEgMC4yNjcwOSAxMzYuOTkxIDAuMjY3MDlDMTMyLjA2MiAwLjI2NzA5IDEyOC4wMTIgNC43MDUzMyAxMjcuNTYzIDEwLjM3NTNIMTI0LjUyOEMxMTkuNTEgMTAuMzc1MyAxMTUuNDYzIDE1LjUyNDcgMTE1LjQ2MyAyMS44MTg0VjI2LjU4NjRIMTMxLjA1NloiIGZpbGw9IiNFMEY4RkYiLz4KPC9zdmc+Cg==';
|
|
231
231
|
|
|
232
|
-
const pnProxioFindpriceCss = "@charset \"UTF-8\";pn-proxio-findprice .findprice-form{margin:0em auto 3em auto}pn-proxio-findprice .findprice-form-wrapper{background-color:#EFFBFF;padding:3.2rem}pn-proxio-findprice .sizeTable{border-style:none !important;border:0 !important;position:relative}pn-proxio-findprice .sizeTable>tr td{margin-bottom:1em;text-align:center;vertical-align:bottom;padding-right:1em;padding-top:1em;position:relative;z-index:1}pn-proxio-findprice .sizeTable #clouds{position:absolute;top:3rem;width:100%}pn-proxio-findprice .firstCell{margin-right:0;margin-left:auto}pn-proxio-findprice [slot=title]{margin-bottom:1rem}pn-proxio-findprice h2{text-align:center}pn-proxio-findprice .findprice__heading{text-align:center;line-height:1.1;font-weight:bold;color:#000000;font-size:3.2rem;font-weight:700}pn-proxio-findprice .findprice__subheading{font-size:2.4rem;margin-bottom:2.4rem}pn-proxio-findprice .resultHeading{text-align:center;font-size:1.5em;line-height:1.1;font-weight:bold;margin-bottom:2em}pn-proxio-findprice .findprice__clear-all-filters{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin:2.4rem;color:#005D92}pn-proxio-findprice .findprice__clear-all-filters .findprice__clear-all-filters__btn{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;cursor:pointer}pn-proxio-findprice .sizecategory{margin-top:1em;margin-bottom:3rem;font-size:0.9em;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}pn-proxio-findprice .weightoption{font-size:0.9em;margin:0 auto}pn-proxio-findprice .shipmentcountry{margin-top:3rem;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}pn-proxio-findprice .shipmentcountry .shipmentcountry-header{text-align:center;font-size:2rem;font-weight:700;line-height:2.2rem}pn-proxio-findprice .shipmentcountry select{color:#005D92;font-size:1.6rem;font-weight:500;border-radius:0.8rem;cursor:pointer;outline:none;position:relative;display:-ms-flexbox;display:flex;padding:0.6em 1em;z-index:0;-webkit-transition:z-index 0s 0.5s;transition:z-index 0s 0.5s;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%}@media screen and (min-width: 500px){pn-proxio-findprice .shipmentcountry select{min-width:47.3rem;width:inherit}}pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container{max-width:inherit;position:relative;margin-top:1.2rem;width:100%}@media screen and (min-width: 500px){pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container{margin:0 auto;margin-top:1.2rem;width:inherit}}pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container svg{position:absolute;z-index:1;right:1rem;top:1.5rem}pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container svg path{fill:#005D92}pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content{text-align:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:row;flex-direction:row}pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content pn-choice-button{width:7em;line-height:3.3em;font-size:0.9em;vertical-align:bottom;background:#FFFFFF;border-radius:1rem}pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content pn-choice-button>label{-ms-flex-line-pack:center;align-content:center;-ms-flex-pack:center;justify-content:center;color:#000000;margin-bottom:0}pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content pn-choice-button ::before{content:\"Max \";font-weight:lighter;color:#5E554A}pn-proxio-findprice .resultlist{max-width:60em;margin:3.2rem auto 3.2rem auto}pn-proxio-findprice .servicePoint{text-align:center}pn-proxio-findprice .servicePoint pn-illustration{display:block;max-width:5em;max-height:5em;margin:1.5em auto 0 auto}pn-proxio-findprice .servicePoint h3{margin-top:0.8em;margin-bottom:0.9em}pn-proxio-findprice .servicePoint a{color:#005D92;text-decoration:none}pn-proxio-findprice .servicePoint a:hover{color:#0D234B;text-decoration:underline}";
|
|
232
|
+
const pnProxioFindpriceCss = "@charset \"UTF-8\";pn-proxio-findprice .findprice-form{margin:0em auto 3em auto}pn-proxio-findprice .findprice-form-wrapper{background-color:#EFFBFF;padding:3.2rem}pn-proxio-findprice .sizeTable{border-style:none !important;border:0 !important;position:relative}pn-proxio-findprice .sizeTable>tr td{margin-bottom:1em;text-align:center;vertical-align:bottom;padding-right:1em;padding-top:1em;position:relative;z-index:1}pn-proxio-findprice .sizeTable #clouds{position:absolute;top:3rem;width:100%}pn-proxio-findprice .firstCell{margin-right:0;margin-left:auto}pn-proxio-findprice [slot=title]{margin-bottom:1rem}pn-proxio-findprice h2{text-align:center}pn-proxio-findprice .findprice__heading{text-align:center;line-height:1.1;font-weight:bold;color:#000000;font-size:3.2rem;font-weight:700}pn-proxio-findprice .findprice__subheading{font-size:2.4rem;margin-bottom:2.4rem}pn-proxio-findprice .resultHeading{text-align:center;font-size:1.5em;line-height:1.1;font-weight:bold;margin-bottom:2em}pn-proxio-findprice .findprice__clear-all-filters{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin:2.4rem;color:#005D92}pn-proxio-findprice .findprice__clear-all-filters .findprice__clear-all-filters__btn{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;cursor:pointer}pn-proxio-findprice .sizecategory{margin-top:1em;margin-bottom:3rem;font-size:0.9em;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}pn-proxio-findprice .weightoption{font-size:0.9em;margin:0 auto}pn-proxio-findprice .shipmentcountry{margin-top:3rem;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}pn-proxio-findprice .shipmentcountry .shipmentcountry-header{text-align:center;font-size:2rem;font-weight:700;line-height:2.2rem}pn-proxio-findprice .shipmentcountry select{color:#005D92;font-size:1.6rem;font-weight:500;border-radius:0.8rem;cursor:pointer;outline:none;position:relative;display:-ms-flexbox;display:flex;padding:0.6em 1em;z-index:0;-webkit-transition:z-index 0s 0.5s;transition:z-index 0s 0.5s;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%}@media screen and (min-width: 500px){pn-proxio-findprice .shipmentcountry select{min-width:47.3rem;width:inherit}}pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container{max-width:inherit;position:relative;margin-top:1.2rem;width:100%}@media screen and (min-width: 500px){pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container{margin:0 auto;margin-top:1.2rem;width:inherit}}pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container svg{position:absolute;z-index:1;right:1rem;top:1.5rem;pointer-events:none}pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container svg path{fill:#005D92}pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content{text-align:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:row;flex-direction:row}pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content pn-choice-button{width:7em;line-height:3.3em;font-size:0.9em;vertical-align:bottom;background:#FFFFFF;border-radius:1rem}pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content pn-choice-button>label{-ms-flex-line-pack:center;align-content:center;-ms-flex-pack:center;justify-content:center;color:#000000;margin-bottom:0}pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content pn-choice-button ::before{content:\"Max \";font-weight:lighter;color:#5E554A}pn-proxio-findprice .resultlist{max-width:60em;margin:3.2rem auto 3.2rem auto}pn-proxio-findprice .servicePoint{text-align:center}pn-proxio-findprice .servicePoint pn-illustration{display:block;max-width:5em;max-height:5em;margin:1.5em auto 0 auto}pn-proxio-findprice .servicePoint h3{margin-top:0.8em;margin-bottom:0.9em}pn-proxio-findprice .servicePoint a{color:#005D92;text-decoration:none}pn-proxio-findprice .servicePoint a:hover{color:#0D234B;text-decoration:underline}";
|
|
233
233
|
|
|
234
234
|
const PnProxioFindPrice = class {
|
|
235
235
|
constructor(hostRef) {
|
|
@@ -313,6 +313,7 @@ const PnProxioFindPrice = class {
|
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
filterItems() {
|
|
316
|
+
var _a, _b;
|
|
316
317
|
const sizeItemData = this.data.proxioProducts.filter(item => {
|
|
317
318
|
return item.proxioProduct.productWeightGroupList.some(weightGroup => {
|
|
318
319
|
return weightGroup.item3.includes(this.sizecategory.value);
|
|
@@ -327,38 +328,22 @@ const PnProxioFindPrice = class {
|
|
|
327
328
|
return weightGroup.item1 === comparisonWeight;
|
|
328
329
|
});
|
|
329
330
|
});
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
return item.proxioProduct.productWeightGroupList.some(weightGroup => {
|
|
333
|
-
return weightGroup.item1 === comparisonWeight;
|
|
334
|
-
});
|
|
335
|
-
});
|
|
336
|
-
}
|
|
337
|
-
if (this.showInternational && this.countrycodevalue) {
|
|
331
|
+
let isInternational = this.showInternational && ((_b = (((_a = this.countrycodevalue) === null || _a === void 0 ? void 0 : _a.trim()) !== '')) !== null && _b !== void 0 ? _b : false);
|
|
332
|
+
if (isInternational) {
|
|
338
333
|
weightFilteredData = weightFilteredData === null || weightFilteredData === void 0 ? void 0 : weightFilteredData.filter(item => item.proxioProduct.weightPriceCountryList.some(countryItem => countryItem.item3.includes(this.countrycodevalue.toUpperCase())));
|
|
339
334
|
}
|
|
340
|
-
weightFilteredData = this.sortWeightItems(weightFilteredData);
|
|
335
|
+
weightFilteredData = this.sortWeightItems(weightFilteredData, isInternational);
|
|
341
336
|
this.filteredItems = weightFilteredData;
|
|
342
337
|
}
|
|
343
338
|
parseFloatFromString(text) {
|
|
344
339
|
var _a;
|
|
345
340
|
return parseFloat((_a = text === null || text === void 0 ? void 0 : text.replace(/[^\d\.\,]*/g, '')) !== null && _a !== void 0 ? _a : 100000);
|
|
346
341
|
}
|
|
347
|
-
sortWeightItems(weightFilteredData) {
|
|
342
|
+
sortWeightItems(weightFilteredData, isInternational) {
|
|
348
343
|
var _a;
|
|
349
|
-
const comparisonWeight = this.weight.value;
|
|
350
344
|
(_a = weightFilteredData === null || weightFilteredData === void 0 ? void 0 : weightFilteredData.sort((a, b) => {
|
|
351
|
-
|
|
352
|
-
let
|
|
353
|
-
if (aIndex < 0)
|
|
354
|
-
aIndex = 0;
|
|
355
|
-
let aValue = (_d = (_c = (_b = (_a = a === null || a === void 0 ? void 0 : a.proxioProduct) === null || _a === void 0 ? void 0 : _a.weightAndPriceList[aIndex]) === null || _b === void 0 ? void 0 : _b.item2) === null || _c === void 0 ? void 0 : _c.toLowerCase()) !== null && _d !== void 0 ? _d : "";
|
|
356
|
-
let aNumber = this.parseFloatFromString(aValue);
|
|
357
|
-
let bIndex = b.proxioProduct.productWeightGroupList.findIndex(weightGroup => weightGroup.item1 === comparisonWeight);
|
|
358
|
-
if (bIndex < 0)
|
|
359
|
-
bIndex = 0;
|
|
360
|
-
let bValue = (_h = (_g = (_f = (_e = b === null || b === void 0 ? void 0 : b.proxioProduct) === null || _e === void 0 ? void 0 : _e.weightAndPriceList[bIndex]) === null || _f === void 0 ? void 0 : _f.item2) === null || _g === void 0 ? void 0 : _g.toLowerCase()) !== null && _h !== void 0 ? _h : "";
|
|
361
|
-
let bNumber = this.parseFloatFromString(bValue);
|
|
345
|
+
let aNumber = this.getSortNumber(a, isInternational);
|
|
346
|
+
let bNumber = this.getSortNumber(b, isInternational);
|
|
362
347
|
if (aNumber && bNumber) {
|
|
363
348
|
return aNumber - bNumber;
|
|
364
349
|
}
|
|
@@ -372,6 +357,20 @@ const PnProxioFindPrice = class {
|
|
|
372
357
|
})) !== null && _a !== void 0 ? _a : [];
|
|
373
358
|
return weightFilteredData;
|
|
374
359
|
}
|
|
360
|
+
getSortNumber(proxioPriceListGroupResponseItem, isInternational) {
|
|
361
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
362
|
+
let index = (_c = (_b = (_a = proxioPriceListGroupResponseItem === null || proxioPriceListGroupResponseItem === void 0 ? void 0 : proxioPriceListGroupResponseItem.proxioProduct) === null || _a === void 0 ? void 0 : _a.productWeightGroupList) === null || _b === void 0 ? void 0 : _b.findIndex(weightGroup => weightGroup.item1 === this.weight.value)) !== null && _c !== void 0 ? _c : 0;
|
|
363
|
+
if (index < 0) {
|
|
364
|
+
index = 0;
|
|
365
|
+
}
|
|
366
|
+
let pricevalue = (_g = (_f = (_e = (_d = proxioPriceListGroupResponseItem === null || proxioPriceListGroupResponseItem === void 0 ? void 0 : proxioPriceListGroupResponseItem.proxioProduct) === null || _d === void 0 ? void 0 : _d.weightAndPriceList[index]) === null || _e === void 0 ? void 0 : _e.item2) === null || _f === void 0 ? void 0 : _f.toLowerCase()) !== null && _g !== void 0 ? _g : "";
|
|
367
|
+
if (isInternational) {
|
|
368
|
+
let weightPriceCurrentCountryList = (_j = (_h = proxioPriceListGroupResponseItem === null || proxioPriceListGroupResponseItem === void 0 ? void 0 : proxioPriceListGroupResponseItem.proxioProduct) === null || _h === void 0 ? void 0 : _h.weightPriceCountryList) === null || _j === void 0 ? void 0 : _j.filter(countryItem => countryItem.item3.includes(this.countrycodevalue.toUpperCase()));
|
|
369
|
+
pricevalue = (_m = (_l = (_k = weightPriceCurrentCountryList[index]) === null || _k === void 0 ? void 0 : _k.item2) === null || _l === void 0 ? void 0 : _l.toLowerCase()) !== null && _m !== void 0 ? _m : "";
|
|
370
|
+
}
|
|
371
|
+
let sortNumber = this.parseFloatFromString(pricevalue);
|
|
372
|
+
return sortNumber;
|
|
373
|
+
}
|
|
375
374
|
resetFilters() {
|
|
376
375
|
var _a, _b, _c;
|
|
377
376
|
this.weight = { value: 0, name: "" };
|
|
@@ -128,6 +128,7 @@ pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container svg {
|
|
|
128
128
|
z-index: 1;
|
|
129
129
|
right: 1rem;
|
|
130
130
|
top: 1.5rem;
|
|
131
|
+
pointer-events: none;
|
|
131
132
|
}
|
|
132
133
|
pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container svg path {
|
|
133
134
|
fill: #005D92;
|
|
@@ -90,6 +90,7 @@ export class PnProxioFindPrice {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
filterItems() {
|
|
93
|
+
var _a, _b;
|
|
93
94
|
const sizeItemData = this.data.proxioProducts.filter(item => {
|
|
94
95
|
return item.proxioProduct.productWeightGroupList.some(weightGroup => {
|
|
95
96
|
return weightGroup.item3.includes(this.sizecategory.value);
|
|
@@ -104,38 +105,22 @@ export class PnProxioFindPrice {
|
|
|
104
105
|
return weightGroup.item1 === comparisonWeight;
|
|
105
106
|
});
|
|
106
107
|
});
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
return item.proxioProduct.productWeightGroupList.some(weightGroup => {
|
|
110
|
-
return weightGroup.item1 === comparisonWeight;
|
|
111
|
-
});
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
if (this.showInternational && this.countrycodevalue) {
|
|
108
|
+
let isInternational = this.showInternational && ((_b = (((_a = this.countrycodevalue) === null || _a === void 0 ? void 0 : _a.trim()) !== '')) !== null && _b !== void 0 ? _b : false);
|
|
109
|
+
if (isInternational) {
|
|
115
110
|
weightFilteredData = weightFilteredData === null || weightFilteredData === void 0 ? void 0 : weightFilteredData.filter(item => item.proxioProduct.weightPriceCountryList.some(countryItem => countryItem.item3.includes(this.countrycodevalue.toUpperCase())));
|
|
116
111
|
}
|
|
117
|
-
weightFilteredData = this.sortWeightItems(weightFilteredData);
|
|
112
|
+
weightFilteredData = this.sortWeightItems(weightFilteredData, isInternational);
|
|
118
113
|
this.filteredItems = weightFilteredData;
|
|
119
114
|
}
|
|
120
115
|
parseFloatFromString(text) {
|
|
121
116
|
var _a;
|
|
122
117
|
return parseFloat((_a = text === null || text === void 0 ? void 0 : text.replace(/[^\d\.\,]*/g, '')) !== null && _a !== void 0 ? _a : 100000);
|
|
123
118
|
}
|
|
124
|
-
sortWeightItems(weightFilteredData) {
|
|
119
|
+
sortWeightItems(weightFilteredData, isInternational) {
|
|
125
120
|
var _a;
|
|
126
|
-
const comparisonWeight = this.weight.value;
|
|
127
121
|
(_a = weightFilteredData === null || weightFilteredData === void 0 ? void 0 : weightFilteredData.sort((a, b) => {
|
|
128
|
-
|
|
129
|
-
let
|
|
130
|
-
if (aIndex < 0)
|
|
131
|
-
aIndex = 0;
|
|
132
|
-
let aValue = (_d = (_c = (_b = (_a = a === null || a === void 0 ? void 0 : a.proxioProduct) === null || _a === void 0 ? void 0 : _a.weightAndPriceList[aIndex]) === null || _b === void 0 ? void 0 : _b.item2) === null || _c === void 0 ? void 0 : _c.toLowerCase()) !== null && _d !== void 0 ? _d : "";
|
|
133
|
-
let aNumber = this.parseFloatFromString(aValue);
|
|
134
|
-
let bIndex = b.proxioProduct.productWeightGroupList.findIndex(weightGroup => weightGroup.item1 === comparisonWeight);
|
|
135
|
-
if (bIndex < 0)
|
|
136
|
-
bIndex = 0;
|
|
137
|
-
let bValue = (_h = (_g = (_f = (_e = b === null || b === void 0 ? void 0 : b.proxioProduct) === null || _e === void 0 ? void 0 : _e.weightAndPriceList[bIndex]) === null || _f === void 0 ? void 0 : _f.item2) === null || _g === void 0 ? void 0 : _g.toLowerCase()) !== null && _h !== void 0 ? _h : "";
|
|
138
|
-
let bNumber = this.parseFloatFromString(bValue);
|
|
122
|
+
let aNumber = this.getSortNumber(a, isInternational);
|
|
123
|
+
let bNumber = this.getSortNumber(b, isInternational);
|
|
139
124
|
if (aNumber && bNumber) {
|
|
140
125
|
return aNumber - bNumber;
|
|
141
126
|
}
|
|
@@ -149,6 +134,20 @@ export class PnProxioFindPrice {
|
|
|
149
134
|
})) !== null && _a !== void 0 ? _a : [];
|
|
150
135
|
return weightFilteredData;
|
|
151
136
|
}
|
|
137
|
+
getSortNumber(proxioPriceListGroupResponseItem, isInternational) {
|
|
138
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
139
|
+
let index = (_c = (_b = (_a = proxioPriceListGroupResponseItem === null || proxioPriceListGroupResponseItem === void 0 ? void 0 : proxioPriceListGroupResponseItem.proxioProduct) === null || _a === void 0 ? void 0 : _a.productWeightGroupList) === null || _b === void 0 ? void 0 : _b.findIndex(weightGroup => weightGroup.item1 === this.weight.value)) !== null && _c !== void 0 ? _c : 0;
|
|
140
|
+
if (index < 0) {
|
|
141
|
+
index = 0;
|
|
142
|
+
}
|
|
143
|
+
let pricevalue = (_g = (_f = (_e = (_d = proxioPriceListGroupResponseItem === null || proxioPriceListGroupResponseItem === void 0 ? void 0 : proxioPriceListGroupResponseItem.proxioProduct) === null || _d === void 0 ? void 0 : _d.weightAndPriceList[index]) === null || _e === void 0 ? void 0 : _e.item2) === null || _f === void 0 ? void 0 : _f.toLowerCase()) !== null && _g !== void 0 ? _g : "";
|
|
144
|
+
if (isInternational) {
|
|
145
|
+
let weightPriceCurrentCountryList = (_j = (_h = proxioPriceListGroupResponseItem === null || proxioPriceListGroupResponseItem === void 0 ? void 0 : proxioPriceListGroupResponseItem.proxioProduct) === null || _h === void 0 ? void 0 : _h.weightPriceCountryList) === null || _j === void 0 ? void 0 : _j.filter(countryItem => countryItem.item3.includes(this.countrycodevalue.toUpperCase()));
|
|
146
|
+
pricevalue = (_m = (_l = (_k = weightPriceCurrentCountryList[index]) === null || _k === void 0 ? void 0 : _k.item2) === null || _l === void 0 ? void 0 : _l.toLowerCase()) !== null && _m !== void 0 ? _m : "";
|
|
147
|
+
}
|
|
148
|
+
let sortNumber = this.parseFloatFromString(pricevalue);
|
|
149
|
+
return sortNumber;
|
|
150
|
+
}
|
|
152
151
|
resetFilters() {
|
|
153
152
|
var _a, _b, _c;
|
|
154
153
|
this.weight = { value: 0, name: "" };
|
|
@@ -232,7 +232,7 @@ const postnordPerson2Svg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTcxIiBoZW
|
|
|
232
232
|
|
|
233
233
|
const cloudsSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjc4IiBoZWlnaHQ9IjU1IiB2aWV3Qm94PSIwIDAgMjc4IDU1IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjQ3LjM1NSA0OS42ODE1QzI0Ny42OTQgNTIuNDc5IDI0OS43MjIgNTQuNjI2MSAyNTIuMTgxIDU0LjYyNjFIMjcyLjkyNkMyNzUuNjIgNTQuNjI2MSAyNzcuNzk4IDUyLjA1MjIgMjc3Ljc5OCA0OC44Njg2VjQ4LjgwMDhDMjc3Ljc5OCA0NS42MTczIDI3NS42MiA0My4wNDMzIDI3Mi45MjYgNDMuMDQzM0gyNzAuNTM3QzI2OS42MDggMzkuMjQzOSAyNjYuODQ2IDM2LjQ3MyAyNjMuNTg1IDM2LjQ3M0gyNTkuNzE3QzI1OS4zNzMgMzEuODQxIDI1Ni4xMDEgMjguMjA5MiAyNTIuMTI0IDI4LjIwOTJDMjQ4LjE0NiAyOC4yMDkyIDI0NC44OCAzMS44NDEgMjQ0LjUzIDM2LjQ3M0gyNDIuMDk1QzIzOC4wODMgMzYuNDczIDIzNC44MTYgNDAuNjcyNiAyMzQuODE2IDQ1LjgyMDVWNDkuNjgxNUgyNDcuMzU1WiIgZmlsbD0iI0UwRjhGRiIvPgo8cGF0aCBkPSJNMTIuMDM5MSA0Ni4xMDI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YzIDE1LjUyNDcgMTE1LjQ2MyAyMS44MTg0VjI2LjU4NjRIMTMxLjA1NloiIGZpbGw9IiNFMEY4RkYiLz4KPC9zdmc+Cg==';
|
|
234
234
|
|
|
235
|
-
const pnProxioFindpriceCss = "@charset \"UTF-8\";pn-proxio-findprice .findprice-form{margin:0em auto 3em auto}pn-proxio-findprice .findprice-form-wrapper{background-color:#EFFBFF;padding:3.2rem}pn-proxio-findprice .sizeTable{border-style:none !important;border:0 !important;position:relative}pn-proxio-findprice .sizeTable>tr td{margin-bottom:1em;text-align:center;vertical-align:bottom;padding-right:1em;padding-top:1em;position:relative;z-index:1}pn-proxio-findprice .sizeTable #clouds{position:absolute;top:3rem;width:100%}pn-proxio-findprice .firstCell{margin-right:0;margin-left:auto}pn-proxio-findprice [slot=title]{margin-bottom:1rem}pn-proxio-findprice h2{text-align:center}pn-proxio-findprice .findprice__heading{text-align:center;line-height:1.1;font-weight:bold;color:#000000;font-size:3.2rem;font-weight:700}pn-proxio-findprice .findprice__subheading{font-size:2.4rem;margin-bottom:2.4rem}pn-proxio-findprice .resultHeading{text-align:center;font-size:1.5em;line-height:1.1;font-weight:bold;margin-bottom:2em}pn-proxio-findprice .findprice__clear-all-filters{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin:2.4rem;color:#005D92}pn-proxio-findprice .findprice__clear-all-filters .findprice__clear-all-filters__btn{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;cursor:pointer}pn-proxio-findprice .sizecategory{margin-top:1em;margin-bottom:3rem;font-size:0.9em;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}pn-proxio-findprice .weightoption{font-size:0.9em;margin:0 auto}pn-proxio-findprice .shipmentcountry{margin-top:3rem;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}pn-proxio-findprice .shipmentcountry .shipmentcountry-header{text-align:center;font-size:2rem;font-weight:700;line-height:2.2rem}pn-proxio-findprice .shipmentcountry select{color:#005D92;font-size:1.6rem;font-weight:500;border-radius:0.8rem;cursor:pointer;outline:none;position:relative;display:-ms-flexbox;display:flex;padding:0.6em 1em;z-index:0;-webkit-transition:z-index 0s 0.5s;transition:z-index 0s 0.5s;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%}@media screen and (min-width: 500px){pn-proxio-findprice .shipmentcountry select{min-width:47.3rem;width:inherit}}pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container{max-width:inherit;position:relative;margin-top:1.2rem;width:100%}@media screen and (min-width: 500px){pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container{margin:0 auto;margin-top:1.2rem;width:inherit}}pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container svg{position:absolute;z-index:1;right:1rem;top:1.5rem}pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container svg path{fill:#005D92}pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content{text-align:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:row;flex-direction:row}pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content pn-choice-button{width:7em;line-height:3.3em;font-size:0.9em;vertical-align:bottom;background:#FFFFFF;border-radius:1rem}pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content pn-choice-button>label{-ms-flex-line-pack:center;align-content:center;-ms-flex-pack:center;justify-content:center;color:#000000;margin-bottom:0}pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content pn-choice-button ::before{content:\"Max \";font-weight:lighter;color:#5E554A}pn-proxio-findprice .resultlist{max-width:60em;margin:3.2rem auto 3.2rem auto}pn-proxio-findprice .servicePoint{text-align:center}pn-proxio-findprice .servicePoint pn-illustration{display:block;max-width:5em;max-height:5em;margin:1.5em auto 0 auto}pn-proxio-findprice .servicePoint h3{margin-top:0.8em;margin-bottom:0.9em}pn-proxio-findprice .servicePoint a{color:#005D92;text-decoration:none}pn-proxio-findprice .servicePoint a:hover{color:#0D234B;text-decoration:underline}";
|
|
235
|
+
const pnProxioFindpriceCss = "@charset \"UTF-8\";pn-proxio-findprice .findprice-form{margin:0em auto 3em auto}pn-proxio-findprice .findprice-form-wrapper{background-color:#EFFBFF;padding:3.2rem}pn-proxio-findprice .sizeTable{border-style:none !important;border:0 !important;position:relative}pn-proxio-findprice .sizeTable>tr td{margin-bottom:1em;text-align:center;vertical-align:bottom;padding-right:1em;padding-top:1em;position:relative;z-index:1}pn-proxio-findprice .sizeTable #clouds{position:absolute;top:3rem;width:100%}pn-proxio-findprice .firstCell{margin-right:0;margin-left:auto}pn-proxio-findprice [slot=title]{margin-bottom:1rem}pn-proxio-findprice h2{text-align:center}pn-proxio-findprice .findprice__heading{text-align:center;line-height:1.1;font-weight:bold;color:#000000;font-size:3.2rem;font-weight:700}pn-proxio-findprice .findprice__subheading{font-size:2.4rem;margin-bottom:2.4rem}pn-proxio-findprice .resultHeading{text-align:center;font-size:1.5em;line-height:1.1;font-weight:bold;margin-bottom:2em}pn-proxio-findprice .findprice__clear-all-filters{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin:2.4rem;color:#005D92}pn-proxio-findprice .findprice__clear-all-filters .findprice__clear-all-filters__btn{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;cursor:pointer}pn-proxio-findprice .sizecategory{margin-top:1em;margin-bottom:3rem;font-size:0.9em;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}pn-proxio-findprice .weightoption{font-size:0.9em;margin:0 auto}pn-proxio-findprice .shipmentcountry{margin-top:3rem;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}pn-proxio-findprice .shipmentcountry .shipmentcountry-header{text-align:center;font-size:2rem;font-weight:700;line-height:2.2rem}pn-proxio-findprice .shipmentcountry select{color:#005D92;font-size:1.6rem;font-weight:500;border-radius:0.8rem;cursor:pointer;outline:none;position:relative;display:-ms-flexbox;display:flex;padding:0.6em 1em;z-index:0;-webkit-transition:z-index 0s 0.5s;transition:z-index 0s 0.5s;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%}@media screen and (min-width: 500px){pn-proxio-findprice .shipmentcountry select{min-width:47.3rem;width:inherit}}pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container{max-width:inherit;position:relative;margin-top:1.2rem;width:100%}@media screen and (min-width: 500px){pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container{margin:0 auto;margin-top:1.2rem;width:inherit}}pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container svg{position:absolute;z-index:1;right:1rem;top:1.5rem;pointer-events:none}pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container svg path{fill:#005D92}pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content{text-align:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:row;flex-direction:row}pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content pn-choice-button{width:7em;line-height:3.3em;font-size:0.9em;vertical-align:bottom;background:#FFFFFF;border-radius:1rem}pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content pn-choice-button>label{-ms-flex-line-pack:center;align-content:center;-ms-flex-pack:center;justify-content:center;color:#000000;margin-bottom:0}pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content pn-choice-button ::before{content:\"Max \";font-weight:lighter;color:#5E554A}pn-proxio-findprice .resultlist{max-width:60em;margin:3.2rem auto 3.2rem auto}pn-proxio-findprice .servicePoint{text-align:center}pn-proxio-findprice .servicePoint pn-illustration{display:block;max-width:5em;max-height:5em;margin:1.5em auto 0 auto}pn-proxio-findprice .servicePoint h3{margin-top:0.8em;margin-bottom:0.9em}pn-proxio-findprice .servicePoint a{color:#005D92;text-decoration:none}pn-proxio-findprice .servicePoint a:hover{color:#0D234B;text-decoration:underline}";
|
|
236
236
|
|
|
237
237
|
const PnProxioFindPrice = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
238
238
|
constructor() {
|
|
@@ -317,6 +317,7 @@ const PnProxioFindPrice = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
319
|
filterItems() {
|
|
320
|
+
var _a, _b;
|
|
320
321
|
const sizeItemData = this.data.proxioProducts.filter(item => {
|
|
321
322
|
return item.proxioProduct.productWeightGroupList.some(weightGroup => {
|
|
322
323
|
return weightGroup.item3.includes(this.sizecategory.value);
|
|
@@ -331,38 +332,22 @@ const PnProxioFindPrice = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
331
332
|
return weightGroup.item1 === comparisonWeight;
|
|
332
333
|
});
|
|
333
334
|
});
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
return item.proxioProduct.productWeightGroupList.some(weightGroup => {
|
|
337
|
-
return weightGroup.item1 === comparisonWeight;
|
|
338
|
-
});
|
|
339
|
-
});
|
|
340
|
-
}
|
|
341
|
-
if (this.showInternational && this.countrycodevalue) {
|
|
335
|
+
let isInternational = this.showInternational && ((_b = (((_a = this.countrycodevalue) === null || _a === void 0 ? void 0 : _a.trim()) !== '')) !== null && _b !== void 0 ? _b : false);
|
|
336
|
+
if (isInternational) {
|
|
342
337
|
weightFilteredData = weightFilteredData === null || weightFilteredData === void 0 ? void 0 : weightFilteredData.filter(item => item.proxioProduct.weightPriceCountryList.some(countryItem => countryItem.item3.includes(this.countrycodevalue.toUpperCase())));
|
|
343
338
|
}
|
|
344
|
-
weightFilteredData = this.sortWeightItems(weightFilteredData);
|
|
339
|
+
weightFilteredData = this.sortWeightItems(weightFilteredData, isInternational);
|
|
345
340
|
this.filteredItems = weightFilteredData;
|
|
346
341
|
}
|
|
347
342
|
parseFloatFromString(text) {
|
|
348
343
|
var _a;
|
|
349
344
|
return parseFloat((_a = text === null || text === void 0 ? void 0 : text.replace(/[^\d\.\,]*/g, '')) !== null && _a !== void 0 ? _a : 100000);
|
|
350
345
|
}
|
|
351
|
-
sortWeightItems(weightFilteredData) {
|
|
346
|
+
sortWeightItems(weightFilteredData, isInternational) {
|
|
352
347
|
var _a;
|
|
353
|
-
const comparisonWeight = this.weight.value;
|
|
354
348
|
(_a = weightFilteredData === null || weightFilteredData === void 0 ? void 0 : weightFilteredData.sort((a, b) => {
|
|
355
|
-
|
|
356
|
-
let
|
|
357
|
-
if (aIndex < 0)
|
|
358
|
-
aIndex = 0;
|
|
359
|
-
let aValue = (_d = (_c = (_b = (_a = a === null || a === void 0 ? void 0 : a.proxioProduct) === null || _a === void 0 ? void 0 : _a.weightAndPriceList[aIndex]) === null || _b === void 0 ? void 0 : _b.item2) === null || _c === void 0 ? void 0 : _c.toLowerCase()) !== null && _d !== void 0 ? _d : "";
|
|
360
|
-
let aNumber = this.parseFloatFromString(aValue);
|
|
361
|
-
let bIndex = b.proxioProduct.productWeightGroupList.findIndex(weightGroup => weightGroup.item1 === comparisonWeight);
|
|
362
|
-
if (bIndex < 0)
|
|
363
|
-
bIndex = 0;
|
|
364
|
-
let bValue = (_h = (_g = (_f = (_e = b === null || b === void 0 ? void 0 : b.proxioProduct) === null || _e === void 0 ? void 0 : _e.weightAndPriceList[bIndex]) === null || _f === void 0 ? void 0 : _f.item2) === null || _g === void 0 ? void 0 : _g.toLowerCase()) !== null && _h !== void 0 ? _h : "";
|
|
365
|
-
let bNumber = this.parseFloatFromString(bValue);
|
|
349
|
+
let aNumber = this.getSortNumber(a, isInternational);
|
|
350
|
+
let bNumber = this.getSortNumber(b, isInternational);
|
|
366
351
|
if (aNumber && bNumber) {
|
|
367
352
|
return aNumber - bNumber;
|
|
368
353
|
}
|
|
@@ -376,6 +361,20 @@ const PnProxioFindPrice = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
376
361
|
})) !== null && _a !== void 0 ? _a : [];
|
|
377
362
|
return weightFilteredData;
|
|
378
363
|
}
|
|
364
|
+
getSortNumber(proxioPriceListGroupResponseItem, isInternational) {
|
|
365
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
366
|
+
let index = (_c = (_b = (_a = proxioPriceListGroupResponseItem === null || proxioPriceListGroupResponseItem === void 0 ? void 0 : proxioPriceListGroupResponseItem.proxioProduct) === null || _a === void 0 ? void 0 : _a.productWeightGroupList) === null || _b === void 0 ? void 0 : _b.findIndex(weightGroup => weightGroup.item1 === this.weight.value)) !== null && _c !== void 0 ? _c : 0;
|
|
367
|
+
if (index < 0) {
|
|
368
|
+
index = 0;
|
|
369
|
+
}
|
|
370
|
+
let pricevalue = (_g = (_f = (_e = (_d = proxioPriceListGroupResponseItem === null || proxioPriceListGroupResponseItem === void 0 ? void 0 : proxioPriceListGroupResponseItem.proxioProduct) === null || _d === void 0 ? void 0 : _d.weightAndPriceList[index]) === null || _e === void 0 ? void 0 : _e.item2) === null || _f === void 0 ? void 0 : _f.toLowerCase()) !== null && _g !== void 0 ? _g : "";
|
|
371
|
+
if (isInternational) {
|
|
372
|
+
let weightPriceCurrentCountryList = (_j = (_h = proxioPriceListGroupResponseItem === null || proxioPriceListGroupResponseItem === void 0 ? void 0 : proxioPriceListGroupResponseItem.proxioProduct) === null || _h === void 0 ? void 0 : _h.weightPriceCountryList) === null || _j === void 0 ? void 0 : _j.filter(countryItem => countryItem.item3.includes(this.countrycodevalue.toUpperCase()));
|
|
373
|
+
pricevalue = (_m = (_l = (_k = weightPriceCurrentCountryList[index]) === null || _k === void 0 ? void 0 : _k.item2) === null || _l === void 0 ? void 0 : _l.toLowerCase()) !== null && _m !== void 0 ? _m : "";
|
|
374
|
+
}
|
|
375
|
+
let sortNumber = this.parseFloatFromString(pricevalue);
|
|
376
|
+
return sortNumber;
|
|
377
|
+
}
|
|
379
378
|
resetFilters() {
|
|
380
379
|
var _a, _b, _c;
|
|
381
380
|
this.weight = { value: 0, name: "" };
|
|
@@ -225,7 +225,7 @@ const postnordPerson2Svg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD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jIyNyAzNC41ODcyIDI2LjMyODMgMzQuNTg3MkgyMi45MTc5QzIyLjYwMDQgMzAuNTU5NyAxOS43MzI3IDI3LjQwNzEgMTYuMjQyMSAyNy40MDcxQzEyLjc1MTQgMjcuNDA3MSA5Ljg4MzcxIDMwLjU1OTcgOS41NjYyMiAzNC41ODcySDcuNDE2NThDMy44NjM0NiAzNC41ODcyIDAuOTk4MDQ3IDM4LjI0NDggMC45OTgwNDcgNDIuNzE1NFY0Ni4xMDIySDEyLjAzOTFaIiBmaWxsPSIjRTBGOEZGIi8+CjxwYXRoIGQ9Ik0xMzEuMDU2IDI2LjU4NjRDMTMxLjQ0OSAzMC4wNDIzIDEzMy45NDggMzIuNjg5NSAxMzYuOTkxIDMyLjY4OTVIMTYyLjg5MUMxNjYuMjA5IDMyLjY4OTUgMTY4Ljg4IDI5LjU0MjYgMTY4Ljg4IDI1LjYzMjhWMjUuNTM3NUMxNjguODggMjEuNjI3NyAxNjYuMjA5IDE4LjQ4MDggMTYyLjg5MSAxOC40ODA4SDE1OS45MDdDMTU4Ljc3NyAxMy44MDE1IDE1NS4zMyAxMC4zNzUzIDE1MS4yMzYgMTAuMzc1M0gxNDYuNDJDMTQ1Ljk3MSA0LjcwNTMzIDE0MS45MjEgMC4yNjcwOSAxMzYuOTkxIDAuMjY3MDlDMTMyLjA2MiAwLjI2NzA5IDEyOC4wMTIgNC43MDUzMyAxMjcuNTYzIDEwLjM3NTNIMTI0LjUyOEMxMTkuNTEgMTAuMzc1MyAxMTUuNDYzIDE1LjUyNDcgMTE1LjQ2MyAyMS44MTg0VjI2LjU4NjRIMTMxLjA1NloiIGZpbGw9IiNFMEY4RkYiLz4KPC9zdmc+Cg==';
|
|
227
227
|
|
|
228
|
-
const pnProxioFindpriceCss = "@charset \"UTF-8\";pn-proxio-findprice .findprice-form{margin:0em auto 3em auto}pn-proxio-findprice .findprice-form-wrapper{background-color:#EFFBFF;padding:3.2rem}pn-proxio-findprice .sizeTable{border-style:none !important;border:0 !important;position:relative}pn-proxio-findprice .sizeTable>tr td{margin-bottom:1em;text-align:center;vertical-align:bottom;padding-right:1em;padding-top:1em;position:relative;z-index:1}pn-proxio-findprice .sizeTable #clouds{position:absolute;top:3rem;width:100%}pn-proxio-findprice .firstCell{margin-right:0;margin-left:auto}pn-proxio-findprice [slot=title]{margin-bottom:1rem}pn-proxio-findprice h2{text-align:center}pn-proxio-findprice .findprice__heading{text-align:center;line-height:1.1;font-weight:bold;color:#000000;font-size:3.2rem;font-weight:700}pn-proxio-findprice .findprice__subheading{font-size:2.4rem;margin-bottom:2.4rem}pn-proxio-findprice .resultHeading{text-align:center;font-size:1.5em;line-height:1.1;font-weight:bold;margin-bottom:2em}pn-proxio-findprice .findprice__clear-all-filters{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin:2.4rem;color:#005D92}pn-proxio-findprice .findprice__clear-all-filters .findprice__clear-all-filters__btn{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;cursor:pointer}pn-proxio-findprice .sizecategory{margin-top:1em;margin-bottom:3rem;font-size:0.9em;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}pn-proxio-findprice .weightoption{font-size:0.9em;margin:0 auto}pn-proxio-findprice .shipmentcountry{margin-top:3rem;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}pn-proxio-findprice .shipmentcountry .shipmentcountry-header{text-align:center;font-size:2rem;font-weight:700;line-height:2.2rem}pn-proxio-findprice .shipmentcountry select{color:#005D92;font-size:1.6rem;font-weight:500;border-radius:0.8rem;cursor:pointer;outline:none;position:relative;display:-ms-flexbox;display:flex;padding:0.6em 1em;z-index:0;-webkit-transition:z-index 0s 0.5s;transition:z-index 0s 0.5s;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%}@media screen and (min-width: 500px){pn-proxio-findprice .shipmentcountry select{min-width:47.3rem;width:inherit}}pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container{max-width:inherit;position:relative;margin-top:1.2rem;width:100%}@media screen and (min-width: 500px){pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container{margin:0 auto;margin-top:1.2rem;width:inherit}}pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container svg{position:absolute;z-index:1;right:1rem;top:1.5rem}pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container svg path{fill:#005D92}pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content{text-align:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:row;flex-direction:row}pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content pn-choice-button{width:7em;line-height:3.3em;font-size:0.9em;vertical-align:bottom;background:#FFFFFF;border-radius:1rem}pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content pn-choice-button>label{-ms-flex-line-pack:center;align-content:center;-ms-flex-pack:center;justify-content:center;color:#000000;margin-bottom:0}pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content pn-choice-button ::before{content:\"Max \";font-weight:lighter;color:#5E554A}pn-proxio-findprice .resultlist{max-width:60em;margin:3.2rem auto 3.2rem auto}pn-proxio-findprice .servicePoint{text-align:center}pn-proxio-findprice .servicePoint pn-illustration{display:block;max-width:5em;max-height:5em;margin:1.5em auto 0 auto}pn-proxio-findprice .servicePoint h3{margin-top:0.8em;margin-bottom:0.9em}pn-proxio-findprice .servicePoint a{color:#005D92;text-decoration:none}pn-proxio-findprice .servicePoint a:hover{color:#0D234B;text-decoration:underline}";
|
|
228
|
+
const pnProxioFindpriceCss = "@charset \"UTF-8\";pn-proxio-findprice .findprice-form{margin:0em auto 3em auto}pn-proxio-findprice .findprice-form-wrapper{background-color:#EFFBFF;padding:3.2rem}pn-proxio-findprice .sizeTable{border-style:none !important;border:0 !important;position:relative}pn-proxio-findprice .sizeTable>tr td{margin-bottom:1em;text-align:center;vertical-align:bottom;padding-right:1em;padding-top:1em;position:relative;z-index:1}pn-proxio-findprice .sizeTable #clouds{position:absolute;top:3rem;width:100%}pn-proxio-findprice .firstCell{margin-right:0;margin-left:auto}pn-proxio-findprice [slot=title]{margin-bottom:1rem}pn-proxio-findprice h2{text-align:center}pn-proxio-findprice .findprice__heading{text-align:center;line-height:1.1;font-weight:bold;color:#000000;font-size:3.2rem;font-weight:700}pn-proxio-findprice .findprice__subheading{font-size:2.4rem;margin-bottom:2.4rem}pn-proxio-findprice .resultHeading{text-align:center;font-size:1.5em;line-height:1.1;font-weight:bold;margin-bottom:2em}pn-proxio-findprice .findprice__clear-all-filters{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin:2.4rem;color:#005D92}pn-proxio-findprice .findprice__clear-all-filters .findprice__clear-all-filters__btn{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;cursor:pointer}pn-proxio-findprice .sizecategory{margin-top:1em;margin-bottom:3rem;font-size:0.9em;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}pn-proxio-findprice .weightoption{font-size:0.9em;margin:0 auto}pn-proxio-findprice .shipmentcountry{margin-top:3rem;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}pn-proxio-findprice .shipmentcountry .shipmentcountry-header{text-align:center;font-size:2rem;font-weight:700;line-height:2.2rem}pn-proxio-findprice .shipmentcountry select{color:#005D92;font-size:1.6rem;font-weight:500;border-radius:0.8rem;cursor:pointer;outline:none;position:relative;display:-ms-flexbox;display:flex;padding:0.6em 1em;z-index:0;-webkit-transition:z-index 0s 0.5s;transition:z-index 0s 0.5s;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%}@media screen and (min-width: 500px){pn-proxio-findprice .shipmentcountry select{min-width:47.3rem;width:inherit}}pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container{max-width:inherit;position:relative;margin-top:1.2rem;width:100%}@media screen and (min-width: 500px){pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container{margin:0 auto;margin-top:1.2rem;width:inherit}}pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container svg{position:absolute;z-index:1;right:1rem;top:1.5rem;pointer-events:none}pn-proxio-findprice .shipmentcountry .shipmentcountry-select-container svg path{fill:#005D92}pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content{text-align:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:row;flex-direction:row}pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content pn-choice-button{width:7em;line-height:3.3em;font-size:0.9em;vertical-align:bottom;background:#FFFFFF;border-radius:1rem}pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content pn-choice-button>label{-ms-flex-line-pack:center;align-content:center;-ms-flex-pack:center;justify-content:center;color:#000000;margin-bottom:0}pn-proxio-findprice .findprice-form-wrapper .weightoption .weightoption-content pn-choice-button ::before{content:\"Max \";font-weight:lighter;color:#5E554A}pn-proxio-findprice .resultlist{max-width:60em;margin:3.2rem auto 3.2rem auto}pn-proxio-findprice .servicePoint{text-align:center}pn-proxio-findprice .servicePoint pn-illustration{display:block;max-width:5em;max-height:5em;margin:1.5em auto 0 auto}pn-proxio-findprice .servicePoint h3{margin-top:0.8em;margin-bottom:0.9em}pn-proxio-findprice .servicePoint a{color:#005D92;text-decoration:none}pn-proxio-findprice .servicePoint a:hover{color:#0D234B;text-decoration:underline}";
|
|
229
229
|
|
|
230
230
|
const PnProxioFindPrice = class {
|
|
231
231
|
constructor(hostRef) {
|
|
@@ -309,6 +309,7 @@ const PnProxioFindPrice = class {
|
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
filterItems() {
|
|
312
|
+
var _a, _b;
|
|
312
313
|
const sizeItemData = this.data.proxioProducts.filter(item => {
|
|
313
314
|
return item.proxioProduct.productWeightGroupList.some(weightGroup => {
|
|
314
315
|
return weightGroup.item3.includes(this.sizecategory.value);
|
|
@@ -323,38 +324,22 @@ const PnProxioFindPrice = class {
|
|
|
323
324
|
return weightGroup.item1 === comparisonWeight;
|
|
324
325
|
});
|
|
325
326
|
});
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
return item.proxioProduct.productWeightGroupList.some(weightGroup => {
|
|
329
|
-
return weightGroup.item1 === comparisonWeight;
|
|
330
|
-
});
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
|
-
if (this.showInternational && this.countrycodevalue) {
|
|
327
|
+
let isInternational = this.showInternational && ((_b = (((_a = this.countrycodevalue) === null || _a === void 0 ? void 0 : _a.trim()) !== '')) !== null && _b !== void 0 ? _b : false);
|
|
328
|
+
if (isInternational) {
|
|
334
329
|
weightFilteredData = weightFilteredData === null || weightFilteredData === void 0 ? void 0 : weightFilteredData.filter(item => item.proxioProduct.weightPriceCountryList.some(countryItem => countryItem.item3.includes(this.countrycodevalue.toUpperCase())));
|
|
335
330
|
}
|
|
336
|
-
weightFilteredData = this.sortWeightItems(weightFilteredData);
|
|
331
|
+
weightFilteredData = this.sortWeightItems(weightFilteredData, isInternational);
|
|
337
332
|
this.filteredItems = weightFilteredData;
|
|
338
333
|
}
|
|
339
334
|
parseFloatFromString(text) {
|
|
340
335
|
var _a;
|
|
341
336
|
return parseFloat((_a = text === null || text === void 0 ? void 0 : text.replace(/[^\d\.\,]*/g, '')) !== null && _a !== void 0 ? _a : 100000);
|
|
342
337
|
}
|
|
343
|
-
sortWeightItems(weightFilteredData) {
|
|
338
|
+
sortWeightItems(weightFilteredData, isInternational) {
|
|
344
339
|
var _a;
|
|
345
|
-
const comparisonWeight = this.weight.value;
|
|
346
340
|
(_a = weightFilteredData === null || weightFilteredData === void 0 ? void 0 : weightFilteredData.sort((a, b) => {
|
|
347
|
-
|
|
348
|
-
let
|
|
349
|
-
if (aIndex < 0)
|
|
350
|
-
aIndex = 0;
|
|
351
|
-
let aValue = (_d = (_c = (_b = (_a = a === null || a === void 0 ? void 0 : a.proxioProduct) === null || _a === void 0 ? void 0 : _a.weightAndPriceList[aIndex]) === null || _b === void 0 ? void 0 : _b.item2) === null || _c === void 0 ? void 0 : _c.toLowerCase()) !== null && _d !== void 0 ? _d : "";
|
|
352
|
-
let aNumber = this.parseFloatFromString(aValue);
|
|
353
|
-
let bIndex = b.proxioProduct.productWeightGroupList.findIndex(weightGroup => weightGroup.item1 === comparisonWeight);
|
|
354
|
-
if (bIndex < 0)
|
|
355
|
-
bIndex = 0;
|
|
356
|
-
let bValue = (_h = (_g = (_f = (_e = b === null || b === void 0 ? void 0 : b.proxioProduct) === null || _e === void 0 ? void 0 : _e.weightAndPriceList[bIndex]) === null || _f === void 0 ? void 0 : _f.item2) === null || _g === void 0 ? void 0 : _g.toLowerCase()) !== null && _h !== void 0 ? _h : "";
|
|
357
|
-
let bNumber = this.parseFloatFromString(bValue);
|
|
341
|
+
let aNumber = this.getSortNumber(a, isInternational);
|
|
342
|
+
let bNumber = this.getSortNumber(b, isInternational);
|
|
358
343
|
if (aNumber && bNumber) {
|
|
359
344
|
return aNumber - bNumber;
|
|
360
345
|
}
|
|
@@ -368,6 +353,20 @@ const PnProxioFindPrice = class {
|
|
|
368
353
|
})) !== null && _a !== void 0 ? _a : [];
|
|
369
354
|
return weightFilteredData;
|
|
370
355
|
}
|
|
356
|
+
getSortNumber(proxioPriceListGroupResponseItem, isInternational) {
|
|
357
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
358
|
+
let index = (_c = (_b = (_a = proxioPriceListGroupResponseItem === null || proxioPriceListGroupResponseItem === void 0 ? void 0 : proxioPriceListGroupResponseItem.proxioProduct) === null || _a === void 0 ? void 0 : _a.productWeightGroupList) === null || _b === void 0 ? void 0 : _b.findIndex(weightGroup => weightGroup.item1 === this.weight.value)) !== null && _c !== void 0 ? _c : 0;
|
|
359
|
+
if (index < 0) {
|
|
360
|
+
index = 0;
|
|
361
|
+
}
|
|
362
|
+
let pricevalue = (_g = (_f = (_e = (_d = proxioPriceListGroupResponseItem === null || proxioPriceListGroupResponseItem === void 0 ? void 0 : proxioPriceListGroupResponseItem.proxioProduct) === null || _d === void 0 ? void 0 : _d.weightAndPriceList[index]) === null || _e === void 0 ? void 0 : _e.item2) === null || _f === void 0 ? void 0 : _f.toLowerCase()) !== null && _g !== void 0 ? _g : "";
|
|
363
|
+
if (isInternational) {
|
|
364
|
+
let weightPriceCurrentCountryList = (_j = (_h = proxioPriceListGroupResponseItem === null || proxioPriceListGroupResponseItem === void 0 ? void 0 : proxioPriceListGroupResponseItem.proxioProduct) === null || _h === void 0 ? void 0 : _h.weightPriceCountryList) === null || _j === void 0 ? void 0 : _j.filter(countryItem => countryItem.item3.includes(this.countrycodevalue.toUpperCase()));
|
|
365
|
+
pricevalue = (_m = (_l = (_k = weightPriceCurrentCountryList[index]) === null || _k === void 0 ? void 0 : _k.item2) === null || _l === void 0 ? void 0 : _l.toLowerCase()) !== null && _m !== void 0 ? _m : "";
|
|
366
|
+
}
|
|
367
|
+
let sortNumber = this.parseFloatFromString(pricevalue);
|
|
368
|
+
return sortNumber;
|
|
369
|
+
}
|
|
371
370
|
resetFilters() {
|
|
372
371
|
var _a, _b, _c;
|
|
373
372
|
this.weight = { value: 0, name: "" };
|