@postnord/pn-marketweb-components 2.4.17 → 2.4.18
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/index-4199ff85.js +8 -4
- package/cjs/index-e4882728.js +72 -0
- package/cjs/loader.cjs.js +1 -1
- package/cjs/pn-date-and-time.cjs.entry.js +1 -1
- package/cjs/pn-dropdown-choice-adds-row.cjs.entry.js +254 -0
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/cjs/pn-multi-formfield.cjs.entry.js +2 -70
- package/collection/collection-manifest.json +1 -0
- package/collection/components/input/pn-date-and-time/pn-date-and-time.css +2 -1
- package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.css +58 -0
- package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.js +508 -0
- package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.stories.js +43 -0
- package/collection/components/input/pn-dropdown-choice-adds-row/types.js +1 -0
- package/components/index.d.ts +1 -0
- package/components/index.js +1 -0
- package/components/index3.js +61 -178
- package/components/index4.js +187 -0
- package/components/pn-date-and-time.js +1 -1
- package/components/pn-dropdown-choice-adds-row.d.ts +11 -0
- package/components/pn-dropdown-choice-adds-row.js +292 -0
- package/components/pn-find-price-result2.js +1 -1
- package/components/pn-find-service-and-price-result2.js +1 -1
- package/components/pn-mainnav-store.js +1 -1
- package/components/pn-marketweb-siteheader-login-linklist2.js +1 -1
- package/components/pn-marketweb-siteheader-search2.js +1 -1
- package/components/pn-multi-formfield.js +1 -69
- package/components/pn-product-pricelist-result.js +1 -1
- package/components/pn-profile-modal-store.js +1 -1
- package/components/pn-proxio-findprice.js +1 -1
- package/components/pn-sidenav-store.js +1 -1
- package/esm/index-8976f360.js +70 -0
- package/esm/index-ee44c065.js +8 -4
- package/esm/loader.js +1 -1
- package/esm/pn-date-and-time.entry.js +1 -1
- package/esm/pn-dropdown-choice-adds-row.entry.js +250 -0
- package/esm/pn-market-web-components.js +1 -1
- package/esm/pn-multi-formfield.entry.js +1 -69
- package/esm-es5/index-8976f360.js +1 -0
- package/esm-es5/index-ee44c065.js +1 -1
- package/esm-es5/loader.js +1 -1
- package/esm-es5/pn-date-and-time.entry.js +1 -1
- package/esm-es5/pn-dropdown-choice-adds-row.entry.js +1 -0
- package/esm-es5/pn-market-web-components.js +1 -1
- package/esm-es5/pn-multi-formfield.entry.js +1 -1
- package/package.json +1 -1
- package/pn-market-web-components/p-196b2316.system.entry.js +1 -0
- package/pn-market-web-components/p-296637c0.system.js +1 -0
- package/pn-market-web-components/p-3a897643.system.entry.js +1 -0
- package/pn-market-web-components/p-4e3d7a56.js +1 -0
- package/pn-market-web-components/p-4e7d4e69.entry.js +1 -0
- package/pn-market-web-components/{p-8ac445d6.entry.js → p-76ce7256.entry.js} +1 -1
- package/pn-market-web-components/p-c0961278.system.entry.js +1 -0
- package/pn-market-web-components/p-e5d9f268.entry.js +1 -0
- package/pn-market-web-components/p-fcdb7381.system.js +1 -1
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/types/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.d.ts +43 -0
- package/types/components/input/pn-dropdown-choice-adds-row/types.d.ts +18 -0
- package/types/components.d.ts +43 -0
- package/pn-market-web-components/p-14d13eaa.system.entry.js +0 -1
- package/pn-market-web-components/p-f7867310.entry.js +0 -1
- package/pn-market-web-components/p-fbae553c.system.entry.js +0 -1
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as debounce_1 } from './index3.js';
|
|
3
|
+
import { d as defineCustomElement$2 } from './pn-marketweb-input2.js';
|
|
4
|
+
|
|
5
|
+
const pnDropdownChoiceAddsRowCss = "pn-dropdown-choice-adds-row{gap:1rem}pn-dropdown-choice-adds-row .dropdown-choice-form-row{display:-ms-flexbox;display:flex;gap:1rem}pn-dropdown-choice-adds-row .pn-row-select-dropdown{width:50%;margin-bottom:1rem}@media only screen and (max-width: 640px){pn-dropdown-choice-adds-row .pn-row-select-dropdown{width:100%}}pn-dropdown-choice-adds-row .pn-dropdown-choice-table{width:100%;border-spacing:0rem}pn-dropdown-choice-adds-row .pn-dropdown-choice-table thead th{text-align:left;padding:1rem 0.5rem}pn-dropdown-choice-adds-row .pn-dropdown-choice-table thead th label{color:#5E554A;font-size:1.4rem;font-weight:400}pn-dropdown-choice-adds-row .pn-dropdown-choice-table thead .table-header--name{width:40%}pn-dropdown-choice-adds-row .pn-dropdown-choice-table thead .table-header--dropdown{width:40%}pn-dropdown-choice-adds-row .pn-dropdown-choice-table thead .table-header--input{width:10%}pn-dropdown-choice-adds-row .pn-dropdown-choice-table thead .table-header--delete{width:10%}pn-dropdown-choice-adds-row .pn-dropdown-choice-table tbody td{padding:0.5rem}pn-dropdown-choice-adds-row .pn-dropdown-choice-table tbody tr:nth-child(even){background-color:#effbff}pn-dropdown-choice-adds-row .pn-dropdown-choice-table tbody .tr-delete{text-align:center}pn-dropdown-choice-adds-row .pn-dropdown-choice-table tfoot td small{color:#A70707;vertical-align:middle}pn-dropdown-choice-adds-row .pn-dropdown-choice-table tfoot td pn-icon{margin-right:0.25em;vertical-align:middle}";
|
|
6
|
+
|
|
7
|
+
const pnDropdownChoiceAddsRow = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.__registerHost();
|
|
11
|
+
this.rowvalues = createEvent(this, "rowvalues", 7);
|
|
12
|
+
this.pnRowSelectDropdown = null;
|
|
13
|
+
this.tableHead = null;
|
|
14
|
+
this.tableBody = null;
|
|
15
|
+
this.formRowEvent = e => {
|
|
16
|
+
var _a;
|
|
17
|
+
const debouncedAddValue = debounce_1.debounce(this.updateHiddenFieldValue.bind(this), 500);
|
|
18
|
+
if (e.target.matches('input')) {
|
|
19
|
+
['change', 'keyup'].forEach(eventName => {
|
|
20
|
+
e.target.addEventListener(eventName, debouncedAddValue);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
const rowDropdown = (_a = e.target.closest('.generated-table-row')) === null || _a === void 0 ? void 0 : _a.querySelector('pn-select');
|
|
25
|
+
if (rowDropdown) {
|
|
26
|
+
rowDropdown.addEventListener('selectchange', debouncedAddValue);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
this.dropdownData = null;
|
|
31
|
+
this.addRowDropdownName = '';
|
|
32
|
+
this.addRowDropdownPlaceholder = '';
|
|
33
|
+
this.addRowDropdownLabel = '';
|
|
34
|
+
this.rowNameLabel = '';
|
|
35
|
+
this.rowHasDropdown = true;
|
|
36
|
+
this.rowDropdownLabel = '';
|
|
37
|
+
this.rowDropdownPlaceholder = '';
|
|
38
|
+
this.rowInputLabel = '';
|
|
39
|
+
this.rowDeleteButtonText = '';
|
|
40
|
+
this.totalInputLimit = 0;
|
|
41
|
+
this.inputLimitWarning = null;
|
|
42
|
+
this.nextRowIndex = null;
|
|
43
|
+
this.rowSelectDropdownArr = null;
|
|
44
|
+
this.columnCount = null;
|
|
45
|
+
this.showWarning = false;
|
|
46
|
+
this.formValue = null;
|
|
47
|
+
}
|
|
48
|
+
dropdownDataWatcher() {
|
|
49
|
+
if (typeof this.dropdownData === 'string') {
|
|
50
|
+
this._dropdownData = JSON.parse(this.dropdownData);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
this._dropdownData = this.dropdownData;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
componentWillLoad() {
|
|
57
|
+
this.dropdownDataWatcher();
|
|
58
|
+
}
|
|
59
|
+
componentDidLoad() {
|
|
60
|
+
this.setInitialValues();
|
|
61
|
+
this.addEventHandlers();
|
|
62
|
+
}
|
|
63
|
+
addEventHandlers() {
|
|
64
|
+
this.pnRowSelectDropdown.addEventListener('selectchange', this.addRowElement.bind(this));
|
|
65
|
+
}
|
|
66
|
+
setInitialValues() {
|
|
67
|
+
this.nextRowIndex = 0;
|
|
68
|
+
this.columnCount = this.rowHasDropdown ? 4 : 3;
|
|
69
|
+
this.setRowSelectDropdownArr();
|
|
70
|
+
}
|
|
71
|
+
setRowSelectDropdownArr() {
|
|
72
|
+
this.rowSelectDropdownArr = [];
|
|
73
|
+
this._dropdownData.forEach(element => {
|
|
74
|
+
this.rowSelectDropdownArr.push(element.caption);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
updateHiddenFieldValue() {
|
|
78
|
+
const allRows = [...this.tableBody.querySelectorAll('tr')];
|
|
79
|
+
const columnValueCount = this.rowHasDropdown ? 3 : 2;
|
|
80
|
+
const formValues = [];
|
|
81
|
+
if (allRows.length) {
|
|
82
|
+
allRows.forEach(elm => {
|
|
83
|
+
var _a, _b, _c;
|
|
84
|
+
const row = { row: [] };
|
|
85
|
+
const nameElm = elm.querySelector('.tr-name');
|
|
86
|
+
const dropdownElm = elm.querySelector('.tr-dropdown');
|
|
87
|
+
const inputElm = elm.querySelector('.tr-input');
|
|
88
|
+
const nameValue = { name: this.rowNameLabel, value: nameElm === null || nameElm === void 0 ? void 0 : nameElm.innerHTML };
|
|
89
|
+
row.row.push(nameValue);
|
|
90
|
+
const dropdown = dropdownElm.querySelector('.current-selection');
|
|
91
|
+
if (dropdown) {
|
|
92
|
+
const dropdownSelection = (_a = dropdown.textContent) !== null && _a !== void 0 ? _a : '';
|
|
93
|
+
if (dropdownSelection.length) {
|
|
94
|
+
const dropdownValue = {
|
|
95
|
+
name: this.rowDropdownLabel,
|
|
96
|
+
value: dropdownSelection,
|
|
97
|
+
};
|
|
98
|
+
row.row.push(dropdownValue);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
if (!dropdown && columnValueCount === 3) {
|
|
102
|
+
const dropdownValue = {
|
|
103
|
+
name: this.rowDropdownLabel,
|
|
104
|
+
value: '',
|
|
105
|
+
};
|
|
106
|
+
row.row.push(dropdownValue);
|
|
107
|
+
}
|
|
108
|
+
const inputValue = parseInt((_c = (_b = inputElm.querySelector('input')) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : '0');
|
|
109
|
+
if (inputValue > 0) {
|
|
110
|
+
const inputColumnValue = { name: this.rowInputLabel, value: inputValue.toString() };
|
|
111
|
+
row.row.push(inputColumnValue);
|
|
112
|
+
}
|
|
113
|
+
if (row.row.length === columnValueCount) {
|
|
114
|
+
formValues.push(row);
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
if (formValues.length && formValues.length === allRows.length) {
|
|
119
|
+
const valueJsonString = JSON.stringify(formValues);
|
|
120
|
+
this.formValue = `PN-JSON|${valueJsonString}`;
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
this.formValue = '';
|
|
124
|
+
}
|
|
125
|
+
this.rowvalues.emit(this.formValue);
|
|
126
|
+
this.checkInputTotal();
|
|
127
|
+
}
|
|
128
|
+
addRowElement() {
|
|
129
|
+
const selected = this.pnRowSelectDropdown.querySelector('.current-selection .pn-option-content');
|
|
130
|
+
const selectedValue = selected === null || selected === void 0 ? void 0 : selected.textContent;
|
|
131
|
+
const slotElm = this.tableBody;
|
|
132
|
+
const newRow = document.createElement('tr');
|
|
133
|
+
newRow.setAttribute('index', `${this.nextRowIndex}`);
|
|
134
|
+
newRow.setAttribute('class', 'generated-table-row');
|
|
135
|
+
newRow.onclick = e => this.formRowEvent(e);
|
|
136
|
+
const rowNameColumn = document.createElement('td');
|
|
137
|
+
rowNameColumn.setAttribute('class', 'tr-name');
|
|
138
|
+
rowNameColumn.innerHTML = selectedValue;
|
|
139
|
+
newRow.appendChild(rowNameColumn);
|
|
140
|
+
if (this.rowHasDropdown) {
|
|
141
|
+
const rowDropdownColumn = this.createDropdownColumn(selectedValue);
|
|
142
|
+
newRow.appendChild(rowDropdownColumn);
|
|
143
|
+
}
|
|
144
|
+
const rowInputColumn = this.createInputColumn(selectedValue);
|
|
145
|
+
newRow.appendChild(rowInputColumn);
|
|
146
|
+
const deleteButton = this.createDeleteButtonColumn();
|
|
147
|
+
newRow.appendChild(deleteButton);
|
|
148
|
+
slotElm.appendChild(newRow);
|
|
149
|
+
this.updateRowSelectDropdown();
|
|
150
|
+
this.nextRowIndex++;
|
|
151
|
+
}
|
|
152
|
+
createDropdownColumn(selectedValue) {
|
|
153
|
+
const dropdownColumn = document.createElement('td');
|
|
154
|
+
dropdownColumn.setAttribute('class', 'tr-dropdown');
|
|
155
|
+
const selectedItem = this._dropdownData.find(arr => arr.caption === selectedValue);
|
|
156
|
+
if (Array.isArray(selectedItem.values) && selectedItem.values.length) {
|
|
157
|
+
const dropdown = document.createElement('pn-select');
|
|
158
|
+
dropdown.setAttribute('name', `${selectedValue}-dropdown`);
|
|
159
|
+
dropdown.setAttribute('placeholder', this.rowDropdownPlaceholder);
|
|
160
|
+
selectedItem.values.forEach(childItem => {
|
|
161
|
+
const childOption = document.createElement('pn-option');
|
|
162
|
+
childOption.innerHTML = childItem.caption;
|
|
163
|
+
dropdown.appendChild(childOption);
|
|
164
|
+
});
|
|
165
|
+
dropdownColumn.appendChild(dropdown);
|
|
166
|
+
}
|
|
167
|
+
return dropdownColumn;
|
|
168
|
+
}
|
|
169
|
+
createInputColumn(selectedValue) {
|
|
170
|
+
const inputColumn = document.createElement('td');
|
|
171
|
+
inputColumn.setAttribute('class', 'tr-input');
|
|
172
|
+
const inputElm = document.createElement('pn-marketweb-input');
|
|
173
|
+
inputElm.setAttribute('type', 'number');
|
|
174
|
+
inputElm.setAttribute('name', `${selectedValue}-input`);
|
|
175
|
+
inputElm.setAttribute('placeholder', '0');
|
|
176
|
+
inputColumn.appendChild(inputElm);
|
|
177
|
+
return inputColumn;
|
|
178
|
+
}
|
|
179
|
+
createDeleteButtonColumn() {
|
|
180
|
+
const buttonColumn = document.createElement('td');
|
|
181
|
+
buttonColumn.setAttribute('class', 'tr-delete');
|
|
182
|
+
const buttonElm = document.createElement('pn-button');
|
|
183
|
+
buttonElm.onclick = e => this.deleteRow(e);
|
|
184
|
+
buttonElm.setAttribute('appearance', 'warning');
|
|
185
|
+
buttonElm.setAttribute('small', 'true');
|
|
186
|
+
buttonElm.appendChild(document.createTextNode(this.rowDeleteButtonText));
|
|
187
|
+
buttonColumn.appendChild(buttonElm);
|
|
188
|
+
return buttonColumn;
|
|
189
|
+
}
|
|
190
|
+
updateRowSelectDropdown() {
|
|
191
|
+
const rowNames = [].map.call(this.tableBody.querySelectorAll('.tr-name'), el => {
|
|
192
|
+
return el.innerHTML;
|
|
193
|
+
});
|
|
194
|
+
if (rowNames.length) {
|
|
195
|
+
this.rowSelectDropdownArr = [];
|
|
196
|
+
this._dropdownData.forEach(element => {
|
|
197
|
+
if (!rowNames.includes(element.caption)) {
|
|
198
|
+
this.rowSelectDropdownArr.push(element.caption);
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
this.setRowSelectDropdownArr();
|
|
204
|
+
}
|
|
205
|
+
const selectOptions = this.pnRowSelectDropdown.querySelectorAll('pn-option');
|
|
206
|
+
selectOptions.forEach(elm => {
|
|
207
|
+
elm.removeAttribute('selected');
|
|
208
|
+
});
|
|
209
|
+
const placeholder = this.pnRowSelectDropdown.querySelector('.pn-option-content');
|
|
210
|
+
placeholder.innerHTML = this.addRowDropdownPlaceholder;
|
|
211
|
+
this.updateHiddenFieldValue();
|
|
212
|
+
}
|
|
213
|
+
deleteRow(e) {
|
|
214
|
+
e.preventDefault();
|
|
215
|
+
this.nextRowIndex--;
|
|
216
|
+
const targetElm = e.currentTarget;
|
|
217
|
+
const targetRow = targetElm.closest('tr');
|
|
218
|
+
targetRow.remove();
|
|
219
|
+
const allRows = [...this.tableBody.querySelectorAll('tr')];
|
|
220
|
+
allRows.map((elm, index) => {
|
|
221
|
+
elm.setAttribute('index', `${index}`);
|
|
222
|
+
});
|
|
223
|
+
this.updateRowSelectDropdown();
|
|
224
|
+
}
|
|
225
|
+
checkInputTotal() {
|
|
226
|
+
const allRows = this.tableBody.querySelectorAll('tr');
|
|
227
|
+
if (this.totalInputLimit === 0 || allRows.length < 1) {
|
|
228
|
+
this.showWarning = false;
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
let totalInput = 0;
|
|
232
|
+
allRows.forEach(element => {
|
|
233
|
+
var _a;
|
|
234
|
+
const inputField = element.querySelector('pn-marketweb-input');
|
|
235
|
+
if (inputField.value) {
|
|
236
|
+
totalInput += (_a = parseInt(inputField.value)) !== null && _a !== void 0 ? _a : 0;
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
this.showWarning = totalInput > this.totalInputLimit ? true : false;
|
|
240
|
+
}
|
|
241
|
+
render() {
|
|
242
|
+
var _a;
|
|
243
|
+
return (h(Host, null, h("div", { class: "dropdown-choice-form-row" }, h("pn-select", { ref: el => (this.pnRowSelectDropdown = el), name: this.addRowDropdownName, placeholder: this.addRowDropdownPlaceholder, label: this.addRowDropdownLabel, class: "pn-row-select-dropdown" }, (_a = this.rowSelectDropdownArr) === null || _a === void 0 ? void 0 : _a.map((value) => (h("pn-option", null, value))))), h("div", { class: "dropdown-choice-form-row" }, h("table", { class: "pn-dropdown-choice-table" }, h("thead", { ref: el => (this.tableHead = el) }, this.nextRowIndex === 0 ? null : (h("tr", null, h("th", { class: "table-header--name" }, h("label", null, this.rowNameLabel)), this.rowHasDropdown ? (h("th", { class: "table-header--dropdown" }, h("label", null, this.rowDropdownLabel))) : null, h("th", { class: "table-header--input" }, h("label", null, this.rowInputLabel)), h("th", { class: "table-header--delete" })))), h("tbody", { ref: el => (this.tableBody = el), class: "pn-dropdown-choice-table-slot" }, h("slot", null)), h("tfoot", null, this.showWarning ? (h("tr", null, h("td", { colSpan: this.columnCount }, h("pn-icon", { symbol: "alert-exclamation-circle", small: true, color: "warning" }), h("small", { class: "dropdown-choice-error-message" }, this.inputLimitWarning)))) : null)))));
|
|
244
|
+
}
|
|
245
|
+
get hostElement() { return this; }
|
|
246
|
+
static get watchers() { return {
|
|
247
|
+
"dropdownData": ["dropdownDataWatcher"]
|
|
248
|
+
}; }
|
|
249
|
+
static get style() { return pnDropdownChoiceAddsRowCss; }
|
|
250
|
+
}, [4, "pn-dropdown-choice-adds-row", {
|
|
251
|
+
"dropdownData": [1, "dropdown-data"],
|
|
252
|
+
"addRowDropdownName": [1, "add-row-dropdown-name"],
|
|
253
|
+
"addRowDropdownPlaceholder": [1, "add-row-dropdown-placeholder"],
|
|
254
|
+
"addRowDropdownLabel": [1, "add-row-dropdown-label"],
|
|
255
|
+
"rowNameLabel": [1, "row-name-label"],
|
|
256
|
+
"rowHasDropdown": [4, "row-has-dropdown"],
|
|
257
|
+
"rowDropdownLabel": [1, "row-dropdown-label"],
|
|
258
|
+
"rowDropdownPlaceholder": [1, "row-dropdown-placeholder"],
|
|
259
|
+
"rowInputLabel": [1, "row-input-label"],
|
|
260
|
+
"rowDeleteButtonText": [1, "row-delete-button-text"],
|
|
261
|
+
"totalInputLimit": [2, "total-input-limit"],
|
|
262
|
+
"inputLimitWarning": [1, "input-limit-warning"],
|
|
263
|
+
"nextRowIndex": [32],
|
|
264
|
+
"rowSelectDropdownArr": [32],
|
|
265
|
+
"columnCount": [32],
|
|
266
|
+
"showWarning": [32],
|
|
267
|
+
"formValue": [32]
|
|
268
|
+
}]);
|
|
269
|
+
function defineCustomElement$1() {
|
|
270
|
+
if (typeof customElements === "undefined") {
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
const components = ["pn-dropdown-choice-adds-row", "pn-marketweb-input"];
|
|
274
|
+
components.forEach(tagName => { switch (tagName) {
|
|
275
|
+
case "pn-dropdown-choice-adds-row":
|
|
276
|
+
if (!customElements.get(tagName)) {
|
|
277
|
+
customElements.define(tagName, pnDropdownChoiceAddsRow);
|
|
278
|
+
}
|
|
279
|
+
break;
|
|
280
|
+
case "pn-marketweb-input":
|
|
281
|
+
if (!customElements.get(tagName)) {
|
|
282
|
+
defineCustomElement$2();
|
|
283
|
+
}
|
|
284
|
+
break;
|
|
285
|
+
} });
|
|
286
|
+
}
|
|
287
|
+
defineCustomElement$1();
|
|
288
|
+
|
|
289
|
+
const PnDropdownChoiceAddsRow = pnDropdownChoiceAddsRow;
|
|
290
|
+
const defineCustomElement = defineCustomElement$1;
|
|
291
|
+
|
|
292
|
+
export { PnDropdownChoiceAddsRow, defineCustomElement };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { c as createStore } from './
|
|
2
|
+
import { c as createStore } from './index4.js';
|
|
3
3
|
import { d as defineCustomElement$4 } from './pn-product-card2.js';
|
|
4
4
|
import { d as defineCustomElement$3 } from './pn-product-card-info2.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './pn-product-card-price2.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { c as createStore } from './
|
|
2
|
+
import { c as createStore } from './index4.js';
|
|
3
3
|
import { d as defineCustomElement$3 } from './pn-product-card2.js';
|
|
4
4
|
import { d as defineCustomElement$2 } from './pn-product-tile-info2.js';
|
|
5
5
|
import { d as defineCustomElement$1 } from './pn-product-tile-price2.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { c as createStore } from './
|
|
2
|
+
import { c as createStore } from './index4.js';
|
|
3
3
|
|
|
4
4
|
// Read more about how stencil stores work here: https://stenciljs.com/docs/stencil-store
|
|
5
5
|
const { state, onChange } = createStore({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { c as createStore } from './
|
|
2
|
+
import { c as createStore } from './index4.js';
|
|
3
3
|
|
|
4
4
|
// Read more about how stencil stores work here: https://stenciljs.com/docs/stencil-store
|
|
5
5
|
const { state, onChange } = createStore({
|
|
@@ -1,75 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as debounce_1 } from './index3.js';
|
|
2
3
|
import { v as v4 } from './v4.js';
|
|
3
4
|
|
|
4
|
-
/**
|
|
5
|
-
* Returns a function, that, as long as it continues to be invoked, will not
|
|
6
|
-
* be triggered. The function will be called after it stops being called for
|
|
7
|
-
* N milliseconds. If `immediate` is passed, trigger the function on the
|
|
8
|
-
* leading edge, instead of the trailing. The function also has a property 'clear'
|
|
9
|
-
* that is a function which will clear the timer to prevent previously scheduled executions.
|
|
10
|
-
*
|
|
11
|
-
* @source underscore.js
|
|
12
|
-
* @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/
|
|
13
|
-
* @param {Function} function to wrap
|
|
14
|
-
* @param {Number} timeout in ms (`100`)
|
|
15
|
-
* @param {Boolean} whether to execute at the beginning (`false`)
|
|
16
|
-
* @api public
|
|
17
|
-
*/
|
|
18
|
-
function debounce(func, wait, immediate){
|
|
19
|
-
var timeout, args, context, timestamp, result;
|
|
20
|
-
if (null == wait) wait = 100;
|
|
21
|
-
|
|
22
|
-
function later() {
|
|
23
|
-
var last = Date.now() - timestamp;
|
|
24
|
-
|
|
25
|
-
if (last < wait && last >= 0) {
|
|
26
|
-
timeout = setTimeout(later, wait - last);
|
|
27
|
-
} else {
|
|
28
|
-
timeout = null;
|
|
29
|
-
if (!immediate) {
|
|
30
|
-
result = func.apply(context, args);
|
|
31
|
-
context = args = null;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
var debounced = function(){
|
|
36
|
-
context = this;
|
|
37
|
-
args = arguments;
|
|
38
|
-
timestamp = Date.now();
|
|
39
|
-
var callNow = immediate && !timeout;
|
|
40
|
-
if (!timeout) timeout = setTimeout(later, wait);
|
|
41
|
-
if (callNow) {
|
|
42
|
-
result = func.apply(context, args);
|
|
43
|
-
context = args = null;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return result;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
debounced.clear = function() {
|
|
50
|
-
if (timeout) {
|
|
51
|
-
clearTimeout(timeout);
|
|
52
|
-
timeout = null;
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
debounced.flush = function() {
|
|
57
|
-
if (timeout) {
|
|
58
|
-
result = func.apply(context, args);
|
|
59
|
-
context = args = null;
|
|
60
|
-
|
|
61
|
-
clearTimeout(timeout);
|
|
62
|
-
timeout = null;
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
return debounced;
|
|
67
|
-
}
|
|
68
|
-
// Adds compatibility for ES modules
|
|
69
|
-
debounce.debounce = debounce;
|
|
70
|
-
|
|
71
|
-
var debounce_1 = debounce;
|
|
72
|
-
|
|
73
5
|
const pnMultiFormfieldCss = ".pn-multi-formfield{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}";
|
|
74
6
|
|
|
75
7
|
const PnMultiFormField = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { c as createStore } from './
|
|
2
|
+
import { c as createStore } from './index4.js';
|
|
3
3
|
import { s as sendDirectUrl, a as stampShopUrl } from './data.js';
|
|
4
4
|
import { d as defineCustomElement$5 } from './pn-product-card2.js';
|
|
5
5
|
import { d as defineCustomElement$4 } from './pn-product-card-info2.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { F as FetchHelper, M as MarketWebContextService } from './MarketWebContextService.js';
|
|
3
|
-
import { c as createStore } from './
|
|
3
|
+
import { c as createStore } from './index4.js';
|
|
4
4
|
import { d as defineCustomElement$8 } from './pn-choice-button2.js';
|
|
5
5
|
import { d as defineCustomElement$7 } from './pn-proxio-findprice-result2.js';
|
|
6
6
|
import { d as defineCustomElement$6 } from './pn-proxio-productcard2.js';
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a function, that, as long as it continues to be invoked, will not
|
|
3
|
+
* be triggered. The function will be called after it stops being called for
|
|
4
|
+
* N milliseconds. If `immediate` is passed, trigger the function on the
|
|
5
|
+
* leading edge, instead of the trailing. The function also has a property 'clear'
|
|
6
|
+
* that is a function which will clear the timer to prevent previously scheduled executions.
|
|
7
|
+
*
|
|
8
|
+
* @source underscore.js
|
|
9
|
+
* @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/
|
|
10
|
+
* @param {Function} function to wrap
|
|
11
|
+
* @param {Number} timeout in ms (`100`)
|
|
12
|
+
* @param {Boolean} whether to execute at the beginning (`false`)
|
|
13
|
+
* @api public
|
|
14
|
+
*/
|
|
15
|
+
function debounce(func, wait, immediate){
|
|
16
|
+
var timeout, args, context, timestamp, result;
|
|
17
|
+
if (null == wait) wait = 100;
|
|
18
|
+
|
|
19
|
+
function later() {
|
|
20
|
+
var last = Date.now() - timestamp;
|
|
21
|
+
|
|
22
|
+
if (last < wait && last >= 0) {
|
|
23
|
+
timeout = setTimeout(later, wait - last);
|
|
24
|
+
} else {
|
|
25
|
+
timeout = null;
|
|
26
|
+
if (!immediate) {
|
|
27
|
+
result = func.apply(context, args);
|
|
28
|
+
context = args = null;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
var debounced = function(){
|
|
33
|
+
context = this;
|
|
34
|
+
args = arguments;
|
|
35
|
+
timestamp = Date.now();
|
|
36
|
+
var callNow = immediate && !timeout;
|
|
37
|
+
if (!timeout) timeout = setTimeout(later, wait);
|
|
38
|
+
if (callNow) {
|
|
39
|
+
result = func.apply(context, args);
|
|
40
|
+
context = args = null;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
debounced.clear = function() {
|
|
47
|
+
if (timeout) {
|
|
48
|
+
clearTimeout(timeout);
|
|
49
|
+
timeout = null;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
debounced.flush = function() {
|
|
54
|
+
if (timeout) {
|
|
55
|
+
result = func.apply(context, args);
|
|
56
|
+
context = args = null;
|
|
57
|
+
|
|
58
|
+
clearTimeout(timeout);
|
|
59
|
+
timeout = null;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
return debounced;
|
|
64
|
+
}
|
|
65
|
+
// Adds compatibility for ES modules
|
|
66
|
+
debounce.debounce = debounce;
|
|
67
|
+
|
|
68
|
+
var debounce_1 = debounce;
|
|
69
|
+
|
|
70
|
+
export { debounce_1 as d };
|
package/esm/index-ee44c065.js
CHANGED
|
@@ -2137,6 +2137,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
2137
2137
|
return import(
|
|
2138
2138
|
/* webpackMode: "lazy" */
|
|
2139
2139
|
'./pn-date-and-time.entry.js').then(processMod, consoleError);
|
|
2140
|
+
case 'pn-dropdown-choice-adds-row':
|
|
2141
|
+
return import(
|
|
2142
|
+
/* webpackMode: "lazy" */
|
|
2143
|
+
'./pn-dropdown-choice-adds-row.entry.js').then(processMod, consoleError);
|
|
2140
2144
|
case 'pn-filter-checkbox':
|
|
2141
2145
|
return import(
|
|
2142
2146
|
/* webpackMode: "lazy" */
|
|
@@ -2301,10 +2305,6 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
2301
2305
|
return import(
|
|
2302
2306
|
/* webpackMode: "lazy" */
|
|
2303
2307
|
'./pn-mainnav-link.entry.js').then(processMod, consoleError);
|
|
2304
|
-
case 'pn-marketweb-input':
|
|
2305
|
-
return import(
|
|
2306
|
-
/* webpackMode: "lazy" */
|
|
2307
|
-
'./pn-marketweb-input.entry.js').then(processMod, consoleError);
|
|
2308
2308
|
case 'pn-marketweb-siteheader-login-button_5':
|
|
2309
2309
|
return import(
|
|
2310
2310
|
/* webpackMode: "lazy" */
|
|
@@ -2317,6 +2317,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
2317
2317
|
return import(
|
|
2318
2318
|
/* webpackMode: "lazy" */
|
|
2319
2319
|
'./pn-choice-button.entry.js').then(processMod, consoleError);
|
|
2320
|
+
case 'pn-marketweb-input':
|
|
2321
|
+
return import(
|
|
2322
|
+
/* webpackMode: "lazy" */
|
|
2323
|
+
'./pn-marketweb-input.entry.js').then(processMod, consoleError);
|
|
2320
2324
|
case 'pn-proxio-productcard_4':
|
|
2321
2325
|
return import(
|
|
2322
2326
|
/* webpackMode: "lazy" */
|