@postnord/pn-marketweb-components 2.4.24 → 2.4.25

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.
Files changed (42) hide show
  1. package/cjs/index-4199ff85.js +16 -8
  2. package/cjs/loader.cjs.js +1 -1
  3. package/cjs/pn-market-web-components.cjs.js +1 -1
  4. package/cjs/pn-multi-row-connected-dropdown-row.cjs.entry.js +372 -0
  5. package/cjs/pn-multi-row-connected-dropdown.cjs.entry.js +205 -0
  6. package/collection/collection-manifest.json +2 -0
  7. package/collection/components/input/pn-multi-row-connected-dropdown/pn-multi-row-connected-dropdown-row.css +90 -0
  8. package/collection/components/input/pn-multi-row-connected-dropdown/pn-multi-row-connected-dropdown-row.js +836 -0
  9. package/collection/components/input/pn-multi-row-connected-dropdown/pn-multi-row-connected-dropdown.css +16 -0
  10. package/collection/components/input/pn-multi-row-connected-dropdown/pn-multi-row-connected-dropdown.js +631 -0
  11. package/collection/components/input/pn-multi-row-connected-dropdown/pn-multi-row-connected-dropdown.stories.js +62 -0
  12. package/collection/components/input/pn-multi-row-connected-dropdown/types.js +1 -0
  13. package/components/index.d.ts +2 -0
  14. package/components/index.js +2 -0
  15. package/components/pn-filter-checkbox.js +1 -88
  16. package/components/pn-filter-checkbox2.js +90 -0
  17. package/components/pn-multi-row-connected-dropdown-row.d.ts +11 -0
  18. package/components/pn-multi-row-connected-dropdown-row.js +6 -0
  19. package/components/pn-multi-row-connected-dropdown-row2.js +434 -0
  20. package/components/pn-multi-row-connected-dropdown.d.ts +11 -0
  21. package/components/pn-multi-row-connected-dropdown.js +262 -0
  22. package/esm/index-ee44c065.js +16 -8
  23. package/esm/loader.js +1 -1
  24. package/esm/pn-market-web-components.js +1 -1
  25. package/esm/pn-multi-row-connected-dropdown-row.entry.js +368 -0
  26. package/esm/pn-multi-row-connected-dropdown.entry.js +201 -0
  27. package/esm-es5/index-ee44c065.js +1 -1
  28. package/esm-es5/loader.js +1 -1
  29. package/esm-es5/pn-market-web-components.js +1 -1
  30. package/esm-es5/pn-multi-row-connected-dropdown-row.entry.js +1 -0
  31. package/esm-es5/pn-multi-row-connected-dropdown.entry.js +1 -0
  32. package/package.json +1 -1
  33. package/pn-market-web-components/p-5d2a19e3.entry.js +1 -0
  34. package/pn-market-web-components/p-7e81b501.system.entry.js +1 -0
  35. package/pn-market-web-components/p-83c85053.system.entry.js +1 -0
  36. package/pn-market-web-components/p-b4416838.entry.js +1 -0
  37. package/pn-market-web-components/p-fcdb7381.system.js +1 -1
  38. package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
  39. package/types/components/input/pn-multi-row-connected-dropdown/pn-multi-row-connected-dropdown-row.d.ts +93 -0
  40. package/types/components/input/pn-multi-row-connected-dropdown/pn-multi-row-connected-dropdown.d.ts +45 -0
  41. package/types/components/input/pn-multi-row-connected-dropdown/types.d.ts +32 -0
  42. package/types/components.d.ts +124 -0
@@ -0,0 +1,836 @@
1
+ import { h, Host } from '@stencil/core';
2
+ import { debounce } from 'debounce';
3
+ import { v4 as uuidv4 } from 'uuid';
4
+ export class PnMultiRowConnectedDropdownRow {
5
+ constructor() {
6
+ this.pnConnectedDropdown = null;
7
+ this.pnConnectedDropdownSlotElement = null;
8
+ this.pnAddFieldButton = null;
9
+ this.pnFirstDropdown = null;
10
+ this.pnSecondDropdown = null;
11
+ this.pnInputField = null;
12
+ this.pnSingleDatePicker = null;
13
+ this.pnStartDate = null;
14
+ this.pnEndDate = null;
15
+ this.pnShowDateRangeFiledButton = null;
16
+ this.pnDateRangeContainer = null;
17
+ this.pnGenerateDatesButton = null;
18
+ this.pnDaysRow = null;
19
+ this.pnGeneratedDatesSlot = null;
20
+ this.pnSaveGeneratedDatesButton = null;
21
+ this.pnDeleteRowButton = null;
22
+ this.dropdownData = null;
23
+ this.languageCode = null;
24
+ this.label = null;
25
+ this.firstDropdownLabel = null;
26
+ this.secondDropdownLabel = null;
27
+ this.dropdownPlaceholder = null;
28
+ this.addRowText = null;
29
+ this.inputFildLabel = null;
30
+ this.inputFildPlaceholder = null;
31
+ this.dateButtonText = null;
32
+ this.datePlaceholder = null;
33
+ this.dateDaysFromToday = 1;
34
+ this.allowMultipleDates = null;
35
+ this.startDateLabel = null;
36
+ this.endDateLabel = null;
37
+ this.multiDateHelperText = null;
38
+ this.generateDatesButtonText = null;
39
+ this.saveDateButtonText = null;
40
+ this.noDatesText = null;
41
+ this.index = null;
42
+ this.predefinedValue = null;
43
+ this.yearsToAddToEndDate = null;
44
+ this.buttonsArray = null;
45
+ this.firstDropdownArr = null;
46
+ this.secondDropdownArr = [];
47
+ this.firstDropdownClass = null;
48
+ this.secondDropdownClass = null;
49
+ this.firstValidDateString = '';
50
+ this.lastValidDateString = '';
51
+ this.firstDropdownPlaceholder = '-';
52
+ this.secondDropdownPlaceholder = '-';
53
+ this.starDateValue = '';
54
+ this.endDateValue = '';
55
+ this.generatedDatesArr = [];
56
+ this.selectedButtonValue = '';
57
+ this.inputFieldValue = '';
58
+ this.dateValue = '';
59
+ this.daysArr = null;
60
+ }
61
+ componentWillLoad() {
62
+ this.getPredefinedValues();
63
+ this.setDropDownData();
64
+ this.setFirstValidDate();
65
+ }
66
+ componentDidLoad() {
67
+ this.setInitialValues();
68
+ this.addEventHandlers();
69
+ this.emittRowValues();
70
+ }
71
+ setDropDownData() {
72
+ if (typeof this.dropdownData === 'string') {
73
+ this._dropdownData = JSON.parse(this.dropdownData);
74
+ }
75
+ else {
76
+ this._dropdownData = this.dropdownData;
77
+ }
78
+ }
79
+ getPredefinedValues() {
80
+ this._predefinedValue = JSON.parse(this.predefinedValue);
81
+ }
82
+ applyPredefinedValue() {
83
+ this.getPredefinedValues();
84
+ this.setInitialValues();
85
+ }
86
+ setInitialValues() {
87
+ this.setButtonsValue();
88
+ this.setFirstDropdownValues();
89
+ this.setSecondDropdownValues();
90
+ this.setInputField();
91
+ this.setDateValue();
92
+ this.setDateRangeDefaults();
93
+ this.firstDropdownClass = this.firstDropdownLabel.replace(' ', '_') + '-dropdown';
94
+ this.secondDropdownClass = this.secondDropdownLabel.replace(' ', '_') + '-dropdown';
95
+ }
96
+ setButtonsValue() {
97
+ var _a;
98
+ this.buttonsArray = [];
99
+ if ((_a = this._predefinedValue.buttons) === null || _a === void 0 ? void 0 : _a.length) {
100
+ this.buttonsArray = this._predefinedValue.buttons;
101
+ this.buttonsArray.forEach(item => {
102
+ if (item.selected) {
103
+ this.selectedButtonValue = item.value;
104
+ }
105
+ });
106
+ }
107
+ else {
108
+ this._dropdownData.forEach(item => {
109
+ const button = { selected: false, value: item.caption, caption: item.caption };
110
+ this.buttonsArray.push(button);
111
+ });
112
+ }
113
+ }
114
+ setFirstDropdownValues() {
115
+ var _a;
116
+ this.firstDropdownArr = [];
117
+ if ((_a = this._predefinedValue.firstDropdown) === null || _a === void 0 ? void 0 : _a.length) {
118
+ this.firstDropdownArr = [...this._predefinedValue.firstDropdown];
119
+ }
120
+ }
121
+ setSecondDropdownValues() {
122
+ var _a;
123
+ this.secondDropdownArr = [];
124
+ if ((_a = this._predefinedValue.secondDropdown) === null || _a === void 0 ? void 0 : _a.length) {
125
+ this.secondDropdownArr = [...this._predefinedValue.secondDropdown];
126
+ }
127
+ }
128
+ setInputField() {
129
+ var _a;
130
+ this.inputFieldValue = ((_a = this._predefinedValue.input) === null || _a === void 0 ? void 0 : _a.length) ? this._predefinedValue.input : '';
131
+ }
132
+ setDateValue() {
133
+ var _a, _b, _c;
134
+ if (this.allowMultipleDates) {
135
+ this.pnDateRangeContainer.style.display = ((_a = this._predefinedValue.dates) === null || _a === void 0 ? void 0 : _a.length) ? '' : 'none';
136
+ this.generatedDatesArr = ((_b = this._predefinedValue.dates) === null || _b === void 0 ? void 0 : _b.length) ? this._predefinedValue.dates.split(',') : [];
137
+ this.saveGeneratedDates();
138
+ }
139
+ else {
140
+ this.dateValue = ((_c = this._predefinedValue.dates) === null || _c === void 0 ? void 0 : _c.length) ? this._predefinedValue.dates : '';
141
+ }
142
+ }
143
+ setDateRangeDefaults() {
144
+ var _a, _b;
145
+ this.daysArr = this._predefinedValue.dateRange.days;
146
+ this.starDateValue = ((_a = this._predefinedValue.dateRange.startDate) === null || _a === void 0 ? void 0 : _a.length) ? this._predefinedValue.dateRange.startDate : '';
147
+ this.endDateValue = ((_b = this._predefinedValue.dateRange.endDate) === null || _b === void 0 ? void 0 : _b.length) ? this._predefinedValue.dateRange.endDate : '';
148
+ }
149
+ setFirstValidDate() {
150
+ var _a;
151
+ const yearsToadd = this.yearsToAddToEndDate ? this.yearsToAddToEndDate : 2;
152
+ const date = new Date();
153
+ date.setDate((_a = date.getDate() + this.dateDaysFromToday) !== null && _a !== void 0 ? _a : 0);
154
+ const year = date.getFullYear();
155
+ const month = (date.getMonth() + 1).toString().padStart(2, '0');
156
+ const day = date.getDate().toString().padStart(2, '0');
157
+ const endYear = year + yearsToadd;
158
+ this.firstValidDateString = `${year.toString()}-${month}-${day}`;
159
+ this.lastValidDateString = `${endYear.toString()}-${month}-${day}`;
160
+ }
161
+ addEventHandlers() {
162
+ const emmitValues = debounce(this.emittRowValues.bind(this), 500);
163
+ this.pnInputField.addEventListener('keyup', this.handleInput.bind(this));
164
+ this.pnInputField.addEventListener('change', this.handleInput.bind(this));
165
+ this.pnInputField.addEventListener('keyup', emmitValues);
166
+ this.pnInputField.addEventListener('change', emmitValues);
167
+ if (this.allowMultipleDates) {
168
+ this.pnShowDateRangeFiledButton.addEventListener('click', this.showDateRangeRow.bind(this));
169
+ this.pnStartDate.addEventListener('dateselection', this.HandleRangeDatePickers.bind(this));
170
+ this.pnEndDate.addEventListener('dateselection', this.HandleRangeDatePickers.bind(this));
171
+ this.pnGenerateDatesButton.addEventListener('click', this.generateDates.bind(this));
172
+ this.pnSaveGeneratedDatesButton.addEventListener('click', this.saveGeneratedDates.bind(this));
173
+ this.pnSaveGeneratedDatesButton.addEventListener('click', emmitValues);
174
+ }
175
+ else {
176
+ this.pnSingleDatePicker.addEventListener('dateselection', this.setSingleDateValue.bind(this));
177
+ this.pnSingleDatePicker.addEventListener('dateselection', emmitValues);
178
+ }
179
+ if (this.index > 0) {
180
+ this.pnDeleteRowButton.addEventListener('click', this.deleteRow.bind(this));
181
+ }
182
+ }
183
+ generateUniqueId() {
184
+ return uuidv4();
185
+ }
186
+ updateSelectItemArr(arr, val) {
187
+ arr.forEach(item => {
188
+ if (item.value === val) {
189
+ item.selected = !item.selected;
190
+ }
191
+ else {
192
+ item.selected = false;
193
+ }
194
+ });
195
+ return arr;
196
+ }
197
+ handleOptionButtonClick(e) {
198
+ var _a;
199
+ e.preventDefault();
200
+ const elmValue = e.target.innerHTML;
201
+ this.buttonsArray = [...this.updateSelectItemArr(this.buttonsArray, elmValue)];
202
+ this.selectedButtonValue = this.buttonsArray.filter(e => e.selected === true).length > 0 ? elmValue : '';
203
+ if ((_a = this.selectedButtonValue) === null || _a === void 0 ? void 0 : _a.length) {
204
+ this.firstDropdownArr = [];
205
+ const selectionChildren = this._dropdownData.find(arr => arr.caption === elmValue);
206
+ selectionChildren.values.forEach(item => {
207
+ this.firstDropdownArr.push({ selected: false, value: item.caption, caption: item.caption });
208
+ });
209
+ this.firstDropdownArr = [...this.firstDropdownArr];
210
+ this.firstDropdownPlaceholder = this.dropdownPlaceholder;
211
+ const firstDropdownText = this.pnFirstDropdown.querySelector('.current-selection .pn-option-content');
212
+ firstDropdownText.innerHTML = this.dropdownPlaceholder;
213
+ this.secondDropdownArr = [];
214
+ this.secondDropdownPlaceholder = '-';
215
+ const secondDropdownText = this.pnSecondDropdown.querySelector('.current-selection .pn-option-content');
216
+ secondDropdownText.innerHTML = this.secondDropdownPlaceholder;
217
+ }
218
+ else {
219
+ this.firstDropdownArr = [];
220
+ this.firstDropdownPlaceholder = '-';
221
+ const firstDropdownText = this.pnFirstDropdown.querySelector('.current-selection .pn-option-content');
222
+ firstDropdownText.innerHTML = this.firstDropdownPlaceholder;
223
+ this.secondDropdownArr = [];
224
+ this.secondDropdownPlaceholder = '-';
225
+ const secondDropdownText = this.pnSecondDropdown.querySelector('.current-selection .pn-option-content');
226
+ secondDropdownText.innerHTML = this.secondDropdownPlaceholder;
227
+ }
228
+ this.emittRowValues();
229
+ }
230
+ handleFirstDropdownChange() {
231
+ const selected = this.pnFirstDropdown.querySelector('.current-selection .pn-option-content');
232
+ const selectedValue = selected === null || selected === void 0 ? void 0 : selected.textContent;
233
+ this.firstDropdownArr = [...this.updateSelectItemArr(this.firstDropdownArr, selectedValue)];
234
+ this.secondDropdownArr = [];
235
+ const selectedButton = this.buttonsArray.findIndex(item => item.selected === true);
236
+ const firstChildren = this._dropdownData.find(arr => arr.caption === this.buttonsArray[selectedButton].value);
237
+ const secondChildren = firstChildren.values.find(arr => arr.caption === selectedValue);
238
+ secondChildren.values.forEach(item => {
239
+ this.secondDropdownArr.push({ selected: false, value: item.caption, caption: item.caption });
240
+ });
241
+ this.secondDropdownPlaceholder = this.dropdownPlaceholder;
242
+ const secondDropdownText = this.pnSecondDropdown.querySelector('.current-selection .pn-option-content');
243
+ secondDropdownText.innerHTML = this.secondDropdownPlaceholder;
244
+ this.emittRowValues();
245
+ }
246
+ handleSecondDropdownChange() {
247
+ const selected = this.pnSecondDropdown.querySelector('.current-selection .pn-option-content');
248
+ const selectedValue = selected === null || selected === void 0 ? void 0 : selected.textContent;
249
+ this.secondDropdownArr = [...this.updateSelectItemArr(this.secondDropdownArr, selectedValue)];
250
+ this.emittRowValues();
251
+ }
252
+ handleInput(e) {
253
+ const elm = e.target;
254
+ if (elm.value !== '0') {
255
+ this.inputFieldValue = elm.value;
256
+ }
257
+ }
258
+ showDateRangeRow() {
259
+ if (this.pnDateRangeContainer.style.display === 'none') {
260
+ this.pnDateRangeContainer.style.display = '';
261
+ }
262
+ else {
263
+ this.pnDateRangeContainer.style.display = 'none';
264
+ }
265
+ }
266
+ HandleRangeDatePickers(e) {
267
+ const elm = e.target;
268
+ if (elm === this.pnStartDate) {
269
+ this.starDateValue = e.detail;
270
+ }
271
+ if (elm === this.pnEndDate) {
272
+ this.endDateValue = e.detail;
273
+ }
274
+ }
275
+ generateDates(e) {
276
+ var _a;
277
+ e.preventDefault();
278
+ const allCheckboxes = this.pnDaysRow.querySelectorAll('pn-filter-checkbox');
279
+ const selectedDays = [];
280
+ this.generatedDatesArr = [];
281
+ allCheckboxes.forEach(element => {
282
+ const input = element.querySelector('input');
283
+ if (input.value) {
284
+ selectedDays.push(input.value);
285
+ }
286
+ });
287
+ if (selectedDays.length && this.starDateValue && this.endDateValue) {
288
+ this.daysArr.forEach(item => {
289
+ if (selectedDays.some(x => x === item.value)) {
290
+ item.selected = true;
291
+ }
292
+ else {
293
+ item.selected = false;
294
+ }
295
+ });
296
+ const startDate = new Date(Date.parse(this.starDateValue));
297
+ const endDate = new Date(Date.parse(this.endDateValue));
298
+ for (var d = startDate; d <= endDate; d.setDate(d.getDate() + 1)) {
299
+ const i = this.daysArr.findIndex(item => parseInt(item.value) === d.getDay());
300
+ if ((_a = this.daysArr[i]) === null || _a === void 0 ? void 0 : _a.selected) {
301
+ const year = d.getFullYear();
302
+ const month = (d.getMonth() + 1).toString().padStart(2, '0');
303
+ const day = d.getDate().toString().padStart(2, '0');
304
+ this.generatedDatesArr.push(`${year}-${month}-${day}`);
305
+ }
306
+ }
307
+ }
308
+ }
309
+ deleteGeneratedDateRow(index) {
310
+ this.generatedDatesArr.splice(index, 1);
311
+ this.generatedDatesArr = [...this.generatedDatesArr];
312
+ }
313
+ saveGeneratedDates() {
314
+ var _a;
315
+ if ((_a = this.generatedDatesArr) === null || _a === void 0 ? void 0 : _a.length) {
316
+ this.dateValue = String(this.generatedDatesArr);
317
+ const dateCount = this.generatedDatesArr.length;
318
+ const buttonTextElm = this.pnShowDateRangeFiledButton.querySelector('.pn-button-content');
319
+ buttonTextElm.innerHTML = dateCount > 0 ? `${this.dateButtonText} (${dateCount})` : this.dateButtonText;
320
+ this.showDateRangeRow();
321
+ }
322
+ }
323
+ setSingleDateValue(e) {
324
+ const elm = e.target;
325
+ if (elm === this.pnSingleDatePicker) {
326
+ this.dateValue = e.detail;
327
+ }
328
+ }
329
+ emittRowValues() {
330
+ this.rowValueChange.emit({
331
+ id: this._predefinedValue.id,
332
+ buttons: this.buttonsArray,
333
+ firstDropdown: this.firstDropdownArr,
334
+ secondDropdown: this.secondDropdownArr,
335
+ input: this.inputFieldValue,
336
+ dates: this.dateValue,
337
+ dateRange: {
338
+ days: this.daysArr,
339
+ startDate: this.starDateValue,
340
+ endDate: this.endDateValue,
341
+ },
342
+ });
343
+ }
344
+ deleteRow() {
345
+ this.deleteRowEvent.emit(this._predefinedValue.id);
346
+ }
347
+ setActive(active) {
348
+ return active ? 'connected-dropdown__button active' : 'connected-dropdown__button';
349
+ }
350
+ render() {
351
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
352
+ return (h(Host, null, h("div", { ref: el => (this.pnConnectedDropdownSlotElement = el), class: "connected-dropdown-slot-element" }, h("div", { class: "connected-dropdown-parent-element connected-dropdown" }, h("div", { class: "connected-dropdown__row__no-margin" }, h("label", null, this.label)), h("div", { class: "connected-dropdown__row button-row" }, h("div", { class: "connected-dropdown__button-container option-buttons" }, (_a = this.buttonsArray) === null || _a === void 0 ? void 0 : _a.map(item => (h("button", { class: `${this.setActive(item.selected)}`, id: this.generateUniqueId(), onClick: this.handleOptionButtonClick.bind(this) }, item.value)))), h("div", { class: "connected-dropdown__button-container delete-button" }, this.index > 0 ? (h("pn-button", { ref: el => (this.pnDeleteRowButton = el), small: "true", "icon-only": "true", icon: "minus", appearance: "warning", index: this.index }, "Delete")) : null)), h("div", { class: "connected-dropdown__row input-row" }, h("pn-select", { ref: el => (this.pnFirstDropdown = el), class: "pn-row-select-dropdown dropDown1-dropdown", placeholder: this.firstDropdownPlaceholder, label: this.firstDropdownLabel }, (_b = this.firstDropdownArr) === null || _b === void 0 ? void 0 : _b.map((item, i) => (h("pn-option", { index: i, value: item.value, selected: item.selected, onClick: debounce(this.handleFirstDropdownChange.bind(this), 500) }, item.value)))), h("pn-select", { ref: el => (this.pnSecondDropdown = el), class: "pn-row-select-dropdown dropDown2-dropdown", placeholder: this.secondDropdownPlaceholder, label: this.secondDropdownLabel }, (_c = this.secondDropdownArr) === null || _c === void 0 ? void 0 : _c.map((item, i) => (h("pn-option", { index: i, value: item.value, selected: item.selected, onClick: debounce(this.handleSecondDropdownChange.bind(this), 500) }, item.value)))), h("pn-marketweb-input", { ref: el => (this.pnInputField = el), type: "number", placeholder: "0", label: this.inputFildLabel, value: this.inputFieldValue, min: "1" }), this.allowMultipleDates ? (h("pn-button", { ref: el => (this.pnShowDateRangeFiledButton = el), class: "connected-dropdown__toggle-date-button", small: "true", appearance: "light" }, this.dateButtonText)) : (h("div", { class: "connected-dropdown__date-container" }, h("div", { class: "connected-dropdown__label-container" }, h("label", null, this.dateButtonText)), h("pn-date-picker", { ref: el => (this.pnSingleDatePicker = el), range: "false", "disable-weekends": true, "min-date": this.firstValidDateString, language: this.languageCode, placeholder: this.datePlaceholder, class: "connected-dropdown__date-picker", start: ((_d = this.dateValue) === null || _d === void 0 ? void 0 : _d.length) ? this.dateValue : null })))), this.allowMultipleDates ? (h("div", { ref: el => (this.pnDateRangeContainer = el), class: "connected-dropdown__date-container", style: { display: 'none' } }, this.multiDateHelperText ? (h("div", { class: "connected-dropdown__row" }, h("p", null, this.multiDateHelperText))) : null, h("div", { class: "connected-dropdown__multi-date-row" }, h("div", { class: "connected-dropdown__date-container" }, h("div", { class: "connected-dropdown__label-container" }, h("label", null, this.startDateLabel)), h("pn-date-picker", { ref: el => (this.pnStartDate = el), range: "false", "disable-weekends": true, class: "connected-dropdown__date-picker", "min-date": this.firstValidDateString, "max-date": this.lastValidDateString, language: this.languageCode, placeholder: this.datePlaceholder, start: ((_e = this.starDateValue) === null || _e === void 0 ? void 0 : _e.length) ? this.starDateValue : null })), h("div", { class: "connected-dropdown__date-container" }, h("div", { class: "connected-dropdown__label-container" }, h("label", null, this.endDateLabel)), h("pn-date-picker", { ref: el => (this.pnEndDate = el), range: "false", "disable-weekends": true, class: "connected-dropdown__date-picker", "min-date": this.firstValidDateString, "max-date": this.lastValidDateString, language: this.languageCode, placeholder: this.datePlaceholder, start: ((_f = this.endDateValue) === null || _f === void 0 ? void 0 : _f.length) ? this.endDateValue : null }))), h("div", { ref: el => (this.pnDaysRow = el), class: "connected-dropdown__multi-date-row" }, (_g = this.daysArr) === null || _g === void 0 ? void 0 : _g.map((day) => (h("div", { class: "connected-dropdown__checkbox" }, h("pn-filter-checkbox", { checkboxid: 'day-' + day.value, name: '__' + day.caption, value: day.value, checked: day.selected }), h("label", { htmlFor: 'day-' + day.value }, day.caption))))), h("div", { class: "connected-dropdown__row" }, h("pn-button", { ref: el => (this.pnGenerateDatesButton = el), small: "true" }, this.generateDatesButtonText)), h("div", { ref: el => (this.pnGeneratedDatesSlot = el), class: "connected-dropdown__date-slot" }, (_h = this.generatedDatesArr) === null || _h === void 0 ? void 0 :
353
+ _h.map((date, i) => (h("div", { class: "connected-dropdown__row generated-date-row" }, h("p", null, date), h("pn-button", { index: i, small: "true", "icon-only": "true", icon: "minus", appearance: "warning", id: 'delete-date-' + i, onClick: this.deleteGeneratedDateRow.bind(this, i) }, date)))), !((_j = this.generatedDatesArr) === null || _j === void 0 ? void 0 : _j.length) ? h("p", null, this.noDatesText) : null), h("div", { class: "connected-dropdown__row" }, h("pn-button", { ref: el => (this.pnSaveGeneratedDatesButton = el), class: "connected-dropdown__button-right", small: "true" }, this.saveDateButtonText)))) : null))));
354
+ }
355
+ static get is() { return "pn-multi-row-connected-dropdown-row"; }
356
+ static get originalStyleUrls() {
357
+ return {
358
+ "$": ["pn-multi-row-connected-dropdown-row.scss"]
359
+ };
360
+ }
361
+ static get styleUrls() {
362
+ return {
363
+ "$": ["pn-multi-row-connected-dropdown-row.css"]
364
+ };
365
+ }
366
+ static get properties() {
367
+ return {
368
+ "dropdownData": {
369
+ "type": "string",
370
+ "mutable": false,
371
+ "complexType": {
372
+ "original": "string | Root[]",
373
+ "resolved": "Root[] | string",
374
+ "references": {
375
+ "Root": {
376
+ "location": "import",
377
+ "path": "./types"
378
+ }
379
+ }
380
+ },
381
+ "required": false,
382
+ "optional": false,
383
+ "docs": {
384
+ "tags": [],
385
+ "text": ""
386
+ },
387
+ "attribute": "dropdown-data",
388
+ "reflect": false,
389
+ "defaultValue": "null"
390
+ },
391
+ "languageCode": {
392
+ "type": "string",
393
+ "mutable": false,
394
+ "complexType": {
395
+ "original": "string",
396
+ "resolved": "string",
397
+ "references": {}
398
+ },
399
+ "required": false,
400
+ "optional": false,
401
+ "docs": {
402
+ "tags": [],
403
+ "text": ""
404
+ },
405
+ "attribute": "language-code",
406
+ "reflect": false,
407
+ "defaultValue": "null"
408
+ },
409
+ "label": {
410
+ "type": "string",
411
+ "mutable": false,
412
+ "complexType": {
413
+ "original": "string",
414
+ "resolved": "string",
415
+ "references": {}
416
+ },
417
+ "required": false,
418
+ "optional": false,
419
+ "docs": {
420
+ "tags": [],
421
+ "text": ""
422
+ },
423
+ "attribute": "label",
424
+ "reflect": false,
425
+ "defaultValue": "null"
426
+ },
427
+ "firstDropdownLabel": {
428
+ "type": "string",
429
+ "mutable": false,
430
+ "complexType": {
431
+ "original": "string",
432
+ "resolved": "string",
433
+ "references": {}
434
+ },
435
+ "required": false,
436
+ "optional": false,
437
+ "docs": {
438
+ "tags": [],
439
+ "text": ""
440
+ },
441
+ "attribute": "first-dropdown-label",
442
+ "reflect": false,
443
+ "defaultValue": "null"
444
+ },
445
+ "secondDropdownLabel": {
446
+ "type": "string",
447
+ "mutable": false,
448
+ "complexType": {
449
+ "original": "string",
450
+ "resolved": "string",
451
+ "references": {}
452
+ },
453
+ "required": false,
454
+ "optional": false,
455
+ "docs": {
456
+ "tags": [],
457
+ "text": ""
458
+ },
459
+ "attribute": "second-dropdown-label",
460
+ "reflect": false,
461
+ "defaultValue": "null"
462
+ },
463
+ "dropdownPlaceholder": {
464
+ "type": "string",
465
+ "mutable": false,
466
+ "complexType": {
467
+ "original": "string",
468
+ "resolved": "string",
469
+ "references": {}
470
+ },
471
+ "required": false,
472
+ "optional": false,
473
+ "docs": {
474
+ "tags": [],
475
+ "text": ""
476
+ },
477
+ "attribute": "dropdown-placeholder",
478
+ "reflect": false,
479
+ "defaultValue": "null"
480
+ },
481
+ "addRowText": {
482
+ "type": "string",
483
+ "mutable": false,
484
+ "complexType": {
485
+ "original": "string",
486
+ "resolved": "string",
487
+ "references": {}
488
+ },
489
+ "required": false,
490
+ "optional": false,
491
+ "docs": {
492
+ "tags": [],
493
+ "text": ""
494
+ },
495
+ "attribute": "add-row-text",
496
+ "reflect": false,
497
+ "defaultValue": "null"
498
+ },
499
+ "inputFildLabel": {
500
+ "type": "string",
501
+ "mutable": false,
502
+ "complexType": {
503
+ "original": "string",
504
+ "resolved": "string",
505
+ "references": {}
506
+ },
507
+ "required": false,
508
+ "optional": false,
509
+ "docs": {
510
+ "tags": [],
511
+ "text": ""
512
+ },
513
+ "attribute": "input-fild-label",
514
+ "reflect": false,
515
+ "defaultValue": "null"
516
+ },
517
+ "inputFildPlaceholder": {
518
+ "type": "string",
519
+ "mutable": false,
520
+ "complexType": {
521
+ "original": "string",
522
+ "resolved": "string",
523
+ "references": {}
524
+ },
525
+ "required": false,
526
+ "optional": false,
527
+ "docs": {
528
+ "tags": [],
529
+ "text": ""
530
+ },
531
+ "attribute": "input-fild-placeholder",
532
+ "reflect": false,
533
+ "defaultValue": "null"
534
+ },
535
+ "dateButtonText": {
536
+ "type": "string",
537
+ "mutable": false,
538
+ "complexType": {
539
+ "original": "string",
540
+ "resolved": "string",
541
+ "references": {}
542
+ },
543
+ "required": false,
544
+ "optional": false,
545
+ "docs": {
546
+ "tags": [],
547
+ "text": ""
548
+ },
549
+ "attribute": "date-button-text",
550
+ "reflect": false,
551
+ "defaultValue": "null"
552
+ },
553
+ "datePlaceholder": {
554
+ "type": "string",
555
+ "mutable": false,
556
+ "complexType": {
557
+ "original": "string",
558
+ "resolved": "string",
559
+ "references": {}
560
+ },
561
+ "required": false,
562
+ "optional": false,
563
+ "docs": {
564
+ "tags": [],
565
+ "text": ""
566
+ },
567
+ "attribute": "date-placeholder",
568
+ "reflect": false,
569
+ "defaultValue": "null"
570
+ },
571
+ "dateDaysFromToday": {
572
+ "type": "number",
573
+ "mutable": false,
574
+ "complexType": {
575
+ "original": "number",
576
+ "resolved": "number",
577
+ "references": {}
578
+ },
579
+ "required": false,
580
+ "optional": false,
581
+ "docs": {
582
+ "tags": [],
583
+ "text": ""
584
+ },
585
+ "attribute": "date-days-from-today",
586
+ "reflect": false,
587
+ "defaultValue": "1"
588
+ },
589
+ "allowMultipleDates": {
590
+ "type": "boolean",
591
+ "mutable": false,
592
+ "complexType": {
593
+ "original": "boolean",
594
+ "resolved": "boolean",
595
+ "references": {}
596
+ },
597
+ "required": false,
598
+ "optional": false,
599
+ "docs": {
600
+ "tags": [],
601
+ "text": ""
602
+ },
603
+ "attribute": "allow-multiple-dates",
604
+ "reflect": false,
605
+ "defaultValue": "null"
606
+ },
607
+ "startDateLabel": {
608
+ "type": "string",
609
+ "mutable": false,
610
+ "complexType": {
611
+ "original": "string",
612
+ "resolved": "string",
613
+ "references": {}
614
+ },
615
+ "required": false,
616
+ "optional": false,
617
+ "docs": {
618
+ "tags": [],
619
+ "text": ""
620
+ },
621
+ "attribute": "start-date-label",
622
+ "reflect": false,
623
+ "defaultValue": "null"
624
+ },
625
+ "endDateLabel": {
626
+ "type": "string",
627
+ "mutable": false,
628
+ "complexType": {
629
+ "original": "string",
630
+ "resolved": "string",
631
+ "references": {}
632
+ },
633
+ "required": false,
634
+ "optional": false,
635
+ "docs": {
636
+ "tags": [],
637
+ "text": ""
638
+ },
639
+ "attribute": "end-date-label",
640
+ "reflect": false,
641
+ "defaultValue": "null"
642
+ },
643
+ "multiDateHelperText": {
644
+ "type": "string",
645
+ "mutable": false,
646
+ "complexType": {
647
+ "original": "string",
648
+ "resolved": "string",
649
+ "references": {}
650
+ },
651
+ "required": false,
652
+ "optional": false,
653
+ "docs": {
654
+ "tags": [],
655
+ "text": ""
656
+ },
657
+ "attribute": "multi-date-helper-text",
658
+ "reflect": false,
659
+ "defaultValue": "null"
660
+ },
661
+ "generateDatesButtonText": {
662
+ "type": "string",
663
+ "mutable": false,
664
+ "complexType": {
665
+ "original": "string",
666
+ "resolved": "string",
667
+ "references": {}
668
+ },
669
+ "required": false,
670
+ "optional": false,
671
+ "docs": {
672
+ "tags": [],
673
+ "text": ""
674
+ },
675
+ "attribute": "generate-dates-button-text",
676
+ "reflect": false,
677
+ "defaultValue": "null"
678
+ },
679
+ "saveDateButtonText": {
680
+ "type": "string",
681
+ "mutable": false,
682
+ "complexType": {
683
+ "original": "string",
684
+ "resolved": "string",
685
+ "references": {}
686
+ },
687
+ "required": false,
688
+ "optional": false,
689
+ "docs": {
690
+ "tags": [],
691
+ "text": ""
692
+ },
693
+ "attribute": "save-date-button-text",
694
+ "reflect": false,
695
+ "defaultValue": "null"
696
+ },
697
+ "noDatesText": {
698
+ "type": "string",
699
+ "mutable": false,
700
+ "complexType": {
701
+ "original": "string",
702
+ "resolved": "string",
703
+ "references": {}
704
+ },
705
+ "required": false,
706
+ "optional": false,
707
+ "docs": {
708
+ "tags": [],
709
+ "text": ""
710
+ },
711
+ "attribute": "no-dates-text",
712
+ "reflect": false,
713
+ "defaultValue": "null"
714
+ },
715
+ "index": {
716
+ "type": "number",
717
+ "mutable": false,
718
+ "complexType": {
719
+ "original": "number",
720
+ "resolved": "number",
721
+ "references": {}
722
+ },
723
+ "required": false,
724
+ "optional": false,
725
+ "docs": {
726
+ "tags": [],
727
+ "text": ""
728
+ },
729
+ "attribute": "index",
730
+ "reflect": false,
731
+ "defaultValue": "null"
732
+ },
733
+ "predefinedValue": {
734
+ "type": "string",
735
+ "mutable": false,
736
+ "complexType": {
737
+ "original": "string",
738
+ "resolved": "string",
739
+ "references": {}
740
+ },
741
+ "required": false,
742
+ "optional": false,
743
+ "docs": {
744
+ "tags": [],
745
+ "text": ""
746
+ },
747
+ "attribute": "predefined-value",
748
+ "reflect": false,
749
+ "defaultValue": "null"
750
+ },
751
+ "yearsToAddToEndDate": {
752
+ "type": "number",
753
+ "mutable": false,
754
+ "complexType": {
755
+ "original": "number",
756
+ "resolved": "number",
757
+ "references": {}
758
+ },
759
+ "required": false,
760
+ "optional": false,
761
+ "docs": {
762
+ "tags": [],
763
+ "text": ""
764
+ },
765
+ "attribute": "years-to-add-to-end-date",
766
+ "reflect": false,
767
+ "defaultValue": "null"
768
+ }
769
+ };
770
+ }
771
+ static get states() {
772
+ return {
773
+ "buttonsArray": {},
774
+ "firstDropdownArr": {},
775
+ "secondDropdownArr": {},
776
+ "firstDropdownClass": {},
777
+ "secondDropdownClass": {},
778
+ "firstValidDateString": {},
779
+ "lastValidDateString": {},
780
+ "firstDropdownPlaceholder": {},
781
+ "secondDropdownPlaceholder": {},
782
+ "starDateValue": {},
783
+ "endDateValue": {},
784
+ "generatedDatesArr": {},
785
+ "selectedButtonValue": {},
786
+ "inputFieldValue": {},
787
+ "dateValue": {},
788
+ "daysArr": {}
789
+ };
790
+ }
791
+ static get events() {
792
+ return [{
793
+ "method": "rowValueChange",
794
+ "name": "rowValueChange",
795
+ "bubbles": true,
796
+ "cancelable": true,
797
+ "composed": true,
798
+ "docs": {
799
+ "tags": [],
800
+ "text": ""
801
+ },
802
+ "complexType": {
803
+ "original": "PredefinedValues",
804
+ "resolved": "PredefinedValues",
805
+ "references": {
806
+ "PredefinedValues": {
807
+ "location": "import",
808
+ "path": "./types"
809
+ }
810
+ }
811
+ }
812
+ }, {
813
+ "method": "deleteRowEvent",
814
+ "name": "deleteRowEvent",
815
+ "bubbles": true,
816
+ "cancelable": true,
817
+ "composed": true,
818
+ "docs": {
819
+ "tags": [],
820
+ "text": ""
821
+ },
822
+ "complexType": {
823
+ "original": "string",
824
+ "resolved": "string",
825
+ "references": {}
826
+ }
827
+ }];
828
+ }
829
+ static get elementRef() { return "hostElement"; }
830
+ static get watchers() {
831
+ return [{
832
+ "propName": "predefinedValue",
833
+ "methodName": "applyPredefinedValue"
834
+ }];
835
+ }
836
+ }