@postnord/pn-marketweb-components 3.3.2 → 3.3.4

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 (27) hide show
  1. package/cjs/pn-address-autofill.cjs.entry.js +2 -2
  2. package/cjs/pn-address-autofill.cjs.entry.js.map +1 -1
  3. package/cjs/pn-date-and-time.cjs.entry.js +19 -12
  4. package/cjs/pn-date-and-time.cjs.entry.js.map +1 -1
  5. package/collection/components/input/pn-address-autofill/pn-address-autofill.js +2 -2
  6. package/collection/components/input/pn-address-autofill/pn-address-autofill.js.map +1 -1
  7. package/collection/components/input/pn-date-and-time/pn-date-and-time.js +19 -12
  8. package/collection/components/input/pn-date-and-time/pn-date-and-time.js.map +1 -1
  9. package/components/pn-address-autofill.js +2 -2
  10. package/components/pn-address-autofill.js.map +1 -1
  11. package/components/pn-date-and-time.js +19 -12
  12. package/components/pn-date-and-time.js.map +1 -1
  13. package/esm/pn-address-autofill.entry.js +2 -2
  14. package/esm/pn-address-autofill.entry.js.map +1 -1
  15. package/esm/pn-date-and-time.entry.js +19 -12
  16. package/esm/pn-date-and-time.entry.js.map +1 -1
  17. package/package.json +1 -1
  18. package/pn-market-web-components/p-bdaf4338.entry.js +2 -0
  19. package/pn-market-web-components/p-bdaf4338.entry.js.map +1 -0
  20. package/pn-market-web-components/p-d5a4ada5.entry.js +2 -0
  21. package/pn-market-web-components/p-d5a4ada5.entry.js.map +1 -0
  22. package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
  23. package/types/components/input/pn-date-and-time/pn-date-and-time.d.ts +0 -1
  24. package/pn-market-web-components/p-acbe60df.entry.js +0 -2
  25. package/pn-market-web-components/p-acbe60df.entry.js.map +0 -1
  26. package/pn-market-web-components/p-d8a57eba.entry.js +0 -2
  27. package/pn-market-web-components/p-d8a57eba.entry.js.map +0 -1
@@ -87,22 +87,29 @@ const PnDateAndTime = class {
87
87
  handleChange(e) {
88
88
  const target = e.target;
89
89
  if (target === this.pnDatePicker) {
90
- this.selectedDate = e.detail;
90
+ this.selectedDate = e.detail.start;
91
91
  }
92
- if (target === this.pnTimeFromHourDropdown || target === this.pnTimeFromMinuteDropdown || target === this.pnTimeToHourDropdown || target === this.pnTimeToMinuteDropdown) {
93
- this.handleTimeChange();
94
- }
95
- this.updateHiddenValue();
96
- }
97
- handleTimeChange() {
98
- const fromHourString = this.pnTimeFromHourDropdown.querySelector('[aria-selected=true]')?.textContent;
99
- const fromMinString = this.pnTimeFromMinuteDropdown.querySelector('[aria-selected=true]')?.textContent;
100
- const toHourString = this.pnTimeToHourDropdown.querySelector('[aria-selected=true]')?.textContent;
101
- const toMinString = this.pnTimeToMinuteDropdown.querySelector('[aria-selected=true]')?.textContent;
92
+ const fromHourString = this.pnTimeFromHourDropdown.outerText;
93
+ const fromMinString = this.pnTimeFromMinuteDropdown.outerText;
94
+ const toHourString = this.pnTimeToHourDropdown.outerText;
95
+ const toMinString = this.pnTimeToMinuteDropdown.outerText;
102
96
  this.selectedFromHour = parseInt(fromHourString);
103
97
  this.selectedFromMin = parseInt(fromMinString);
104
98
  this.selectedToHour = parseInt(toHourString);
105
99
  this.selectedToMin = parseInt(toMinString);
100
+ if (target === this.pnTimeFromHourDropdown) {
101
+ this.selectedFromHour = parseInt(e.detail.value);
102
+ }
103
+ if (target === this.pnTimeFromMinuteDropdown) {
104
+ this.selectedFromMin = parseInt(e.detail.value);
105
+ }
106
+ if (target === this.pnTimeToHourDropdown) {
107
+ this.selectedToHour = parseInt(e.detail.value);
108
+ }
109
+ if (target === this.pnTimeToMinuteDropdown) {
110
+ this.selectedToMin = parseInt(e.detail.value);
111
+ }
112
+ this.updateHiddenValue();
106
113
  }
107
114
  updateHiddenValue() {
108
115
  const date = new Date();
@@ -140,7 +147,7 @@ const PnDateAndTime = class {
140
147
  });
141
148
  }
142
149
  render() {
143
- return (h(Host, { key: '6f7c0f1c403a98ceaadef017f6dfe94e4d09ab06' }, h("div", { key: 'c4f95d2e042277cd090fa8a8ce4dd6cd357943ad', class: "date-and-time-group" }, this.dateAndTimeLabel ? (h("div", { class: "date-and-time-row" }, h("label", null, this.dateAndTimeLabel))) : null, h("div", { key: '2c772ab7b24783c634a06879cfede0eaf05952d6', class: "date-and-time-row" }, h("pn-date-picker", { key: '6a427ea028bf55b067b0885e2d3b97a0349acdd3', ref: el => (this.pnDatePicker = el), range: "false", "disable-weekends": this.disableWeekends, "min-date": this.firstValidDateString, "max-date": this.lastValidDateString, language: this.language, placeholder: this.datePlacehodler })), this.dateHelperText ? h("small", { class: "date-and-time-row helper-text" }, this.dateHelperText) : null), h("div", { key: '7f74f041493bb4da72d070e90d24d38441c5ebb9', class: "date-and-time-group" }, h("div", { key: '7b7b4b4ba67f36cf03c4ee6b80a3cdd55a5c8380', class: "date-and-time-row" }, h("pn-select", { key: 'd5d6fe2b881a8770fc1aec24bce38754b6a17db0', ref: el => (this.pnTimeFromHourDropdown = el), name: "date-and-time-from-houre", placeholder: this.hourArr[8], class: "date-and-time-dropdown--time", invalid: this.invalidTimespan }, this.hourArr?.map((hour) => h("pn-option", { label: hour, value: hour }))), h("pn-select", { key: 'bb8dafe866a95e94e0e8a1e53ccff80d0729ec48', ref: el => (this.pnTimeFromMinuteDropdown = el), name: "date-and-time-from-minute", placeholder: this.minuteArr[0], class: "date-and-time-dropdown--time", invalid: this.invalidTimespan }, this.minuteArr?.map((minute) => h("pn-option", { label: minute, value: minute }))), h("div", { key: '8281bbfae49ca8ec35a1d651d61a1bd478b70c0a', class: "time-separator" }, h("span", { key: 'd7c895902ce3efac4816f21510444914012fca29' }, "-")), h("pn-select", { key: '5fa29d4fc4d01a804427bd2119969ec0d6346df6', ref: el => (this.pnTimeToHourDropdown = el), name: "date-and-time-to-hour", placeholder: this.hourArr[12], class: "date-and-time-dropdown--time", invalid: this.invalidTimespan }, this.hourArr?.map((hour) => h("pn-option", { label: hour, value: hour }))), h("pn-select", { key: '968f33b37cad6d2528a789abd63a89c163642c53', ref: el => (this.pnTimeToMinuteDropdown = el), name: "date-and-time-to-minute", placeholder: this.minuteArr[0], class: "date-and-time-dropdown--time", invalid: this.invalidTimespan }, this.minuteArr?.map((minute) => h("pn-option", { label: minute, value: minute })))), this.timeHelperText ? h("small", { class: "date-and-time-row helper-text" }, this.timeHelperText) : null, this.invalidTimespan && this.errorMessage ? (h("small", { class: "date-and-time-row error-message" }, h("pn-icon", { icon: alert_info_circle, small: "false", color: "warning" }), this.errorMessage)) : null)));
150
+ return (h(Host, { key: '427046301b2ac39e7eec2606f03a219a052331c5' }, h("div", { key: '229f301ac20c70eea858802f46ba86c408e2079b', class: "date-and-time-group" }, this.dateAndTimeLabel ? (h("div", { class: "date-and-time-row" }, h("label", null, this.dateAndTimeLabel))) : null, h("div", { key: 'e861465a653b789df0058a16153e7b8f894c03de', class: "date-and-time-row" }, h("pn-date-picker", { key: '62ddce7306500633d72cdc4d12db989ac3c02b70', ref: el => (this.pnDatePicker = el), range: "false", "disable-weekends": this.disableWeekends, "min-date": this.firstValidDateString, "max-date": this.lastValidDateString, language: this.language, placeholder: this.datePlacehodler })), this.dateHelperText ? h("small", { class: "date-and-time-row helper-text" }, this.dateHelperText) : null), h("div", { key: '238e07b7c5c3e32a57fd4f63f5f0605d8f53020d', class: "date-and-time-group" }, h("div", { key: '31157ce2f842378db771141eb003f5c19d6adaed', class: "date-and-time-row" }, h("pn-select", { key: 'eb874ddc6dea2d1c62d557712576047c38a9f077', ref: el => (this.pnTimeFromHourDropdown = el), name: "date-and-time-from-houre", placeholder: this.hourArr[8], class: "date-and-time-dropdown--time", invalid: this.invalidTimespan }, this.hourArr?.map((hour) => h("pn-option", { label: hour, value: hour }))), h("pn-select", { key: 'c7721bed19e520e881780b456fa5fe6a20abd2eb', ref: el => (this.pnTimeFromMinuteDropdown = el), name: "date-and-time-from-minute", placeholder: this.minuteArr[0], class: "date-and-time-dropdown--time", invalid: this.invalidTimespan }, this.minuteArr?.map((minute) => h("pn-option", { label: minute, value: minute }))), h("div", { key: '6f6532649c8a6eee91b96f5152c0086d77a0c543', class: "time-separator" }, h("span", { key: '3e43b12bc5e6f4ed1d8d6330760ced467e39ef5c' }, "-")), h("pn-select", { key: 'ebe92ab375e3a9777b6b77b9dd45976cf26c6d9f', ref: el => (this.pnTimeToHourDropdown = el), name: "date-and-time-to-hour", placeholder: this.hourArr[12], class: "date-and-time-dropdown--time", invalid: this.invalidTimespan }, this.hourArr?.map((hour) => h("pn-option", { label: hour, value: hour }))), h("pn-select", { key: '38c2b11d4f8c0fd5206ffdb6a3bb8194a0ce495d', ref: el => (this.pnTimeToMinuteDropdown = el), name: "date-and-time-to-minute", placeholder: this.minuteArr[0], class: "date-and-time-dropdown--time", invalid: this.invalidTimespan }, this.minuteArr?.map((minute) => h("pn-option", { label: minute, value: minute })))), this.timeHelperText ? h("small", { class: "date-and-time-row helper-text" }, this.timeHelperText) : null, this.invalidTimespan && this.errorMessage ? (h("small", { class: "date-and-time-row error-message" }, h("pn-icon", { icon: alert_info_circle, small: "false", color: "warning" }), this.errorMessage)) : null)));
144
151
  }
145
152
  };
146
153
  PnDateAndTime.style = PnDateAndTimeStyle0;
@@ -1 +1 @@
1
- {"file":"pn-date-and-time.entry.js","mappings":";;AAAA,MAAM,IAAI,GAAG,4VAA4V,CAAC;AACnW,MAAM,iBAAiB,GAAG,IAAI;;ACDrC,MAAM,gBAAgB,GAAG,wbAAwb,CAAC;AACld,4BAAe,gBAAgB;;MCMlB,aAAa;;;;4BAQO,IAAI;gCACA,EAAE;iCACD,CAAC;qCACG,CAAC;4BACV,EAAE;8BACA,EAAE;8BACF,EAAE;+BACA,KAAK;+BACN,EAAE;wBAER,IAAI;uBACH,IAAI;yBACF,IAAI;yBACN,IAAI;+BACG,KAAK;4BACT,IAAI;gCACA,IAAI;+BACL,IAAI;8BACL,IAAI;6BACL,IAAI;oCACG,EAAE;mCACH,EAAE;;;IA3BzC,YAAY,GAAgB,IAAI,CAAC;IACjC,sBAAsB,GAAgB,IAAI,CAAC;IAC3C,wBAAwB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AC,CAAC,IAAY,KAAK,iBAAW,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,GAAc,CAAC,CAC7E,EACZ,kEACE,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,sBAAsB,GAAG,EAAiB,CAAC,EAC5D,IAAI,EAAC,yBAAyB,EAC9B,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAC9B,KAAK,EAAC,8BAA8B,EACpC,OAAO,EAAE,IAAI,CAAC,eAAe,IAE5B,IAAI,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,MAAc,KAAK,iBAAW,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAc,CAAC,CACrF,CACR,EACL,IAAI,CAAC,cAAc,GAAG,aAAO,KAAK,EAAC,+BAA+B,IAAE,IAAI,CAAC,cAAc,CAAS,GAAG,IAAI,EAEvG,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,YAAY,IACxC,aAAO,KAAK,EAAC,iCAAiC,IAC5C,eAAS,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAC,OAAO,EAAC,KAAK,EAAC,SAAS,GAAG,EACjE,IAAI,CAAC,YAAY,CACZ,IACN,IAAI,CACJ,CACD,EACP;KACH;;;;;;","names":[],"sources":["node_modules/pn-design-assets/pn-assets/icons/alert_info_circle.js","src/components/input/pn-date-and-time/pn-date-and-time.scss?tag=pn-date-and-time","src/components/input/pn-date-and-time/pn-date-and-time.tsx"],"sourcesContent":["const icon = '<svg class=\"pn-icon-svg\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\"><path fill=\"#000\" fill-rule=\"evenodd\" d=\"M4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0m8-10C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m0 8a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m1 2v4.5a1 1 0 1 1-2 0V12a1 1 0 1 1 2 0\" clip-rule=\"evenodd\"/></svg>';\nexport const alert_info_circle = icon;\nexport const alertInfoCircle = icon;\n","@import '../../../globals/main.scss';\n\npn-date-and-time {\n label {\n color: $gray700;\n font-size: 1.4rem;\n }\n\n .time-separator {\n margin-top: auto;\n margin-bottom: auto;\n }\n\n .date-and-time-group {\n margin-bottom: 1rem;\n }\n .date-and-time-row {\n display: flex;\n gap: 1rem;\n }\n\n .helper-text {\n margin-top: 0.2rem;\n color: $gray700;\n display: block;\n }\n\n .error-message {\n color: #a70707;\n }\n}\n","import { Component, Prop, h, Element, State, Host, Event, EventEmitter } from '@stencil/core';\nimport { alert_info_circle } from 'pn-design-assets/pn-assets/icons.js';\n\n@Component({\n tag: 'pn-date-and-time',\n styleUrl: 'pn-date-and-time.scss',\n})\nexport class PnDateAndTime {\n @Element() hostElement: Element;\n pnDatePicker: HTMLElement = null;\n pnTimeFromHourDropdown: HTMLElement = null;\n pnTimeFromMinuteDropdown: HTMLElement = null;\n pnTimeToHourDropdown: HTMLElement = null;\n pnTimeToMinuteDropdown: HTMLElement = null;\n\n @Prop() languageCode: string = null;\n @Prop() dateAndTimeLabel: string = '';\n @Prop() dateDaysFromToday: number = 0;\n @Prop() validTimeRangeMinutes: number = 0;\n @Prop() errorMessage: string = '';\n @Prop() dateHelperText: string = '';\n @Prop() timeHelperText: string = '';\n @Prop() disableWeekends: boolean = false;\n @Prop() datePlacehodler: string = '';\n\n @State() language: string = null;\n @State() hourArr: string[] = null;\n @State() minuteArr: string[] = null;\n @State() formValue: string = null;\n @State() invalidTimespan: boolean = false;\n @State() selectedDate: string = null;\n @State() selectedFromHour: number = null;\n @State() selectedFromMin: number = null;\n @State() selectedToHour: number = null;\n @State() selectedToMin: number = null;\n @State() firstValidDateString: string = '';\n @State() lastValidDateString: string = '';\n\n @Event() dateandtimerange: EventEmitter<string>;\n\n componentWillLoad() {\n this.setInitialValues();\n }\n\n componentDidLoad() {\n this.setDefaultHiddenValue();\n this.addEventHandlers();\n }\n\n async setInitialValues() {\n this.setLangugaeCode();\n this.setFirstValidDate();\n\n this.hourArr = this.getNumbersAsStringArr(6, 22, 1);\n this.minuteArr = this.getNumbersAsStringArr(0, 50, 10);\n }\n\n setFirstValidDate() {\n const date = new Date();\n date.setDate(date.getDate() + this.dateDaysFromToday ?? 0);\n\n const year = date.getFullYear();\n const month = (date.getMonth() + 1).toString().padStart(2, '0');\n const day = date.getDate().toString().padStart(2, '0');\n const endYear = year + 2;\n\n this.firstValidDateString = `${year.toString()}-${month}-${day}`;\n this.lastValidDateString = `${endYear.toString()}-${month}-${day}`;\n }\n\n setLangugaeCode() {\n if (typeof this.languageCode === 'string' && this.languageCode.trim() === '') {\n this.language = document.querySelector('html').lang;\n } else {\n this.language = this.languageCode;\n }\n }\n\n setDefaultHiddenValue() {\n this.selectedFromHour = parseInt(this.hourArr[8]);\n this.selectedFromMin = 0;\n this.selectedToHour = parseInt(this.hourArr[12]);\n this.selectedToMin = 0;\n\n this.updateHiddenValue();\n }\n\n addEventHandlers() {\n this.pnDatePicker.addEventListener('dateselection', this.handleChange.bind(this));\n\n this.pnTimeFromHourDropdown.addEventListener('selectOption', this.handleChange.bind(this));\n this.pnTimeFromMinuteDropdown.addEventListener('selectOption', this.handleChange.bind(this));\n this.pnTimeToHourDropdown.addEventListener('selectOption', this.handleChange.bind(this));\n this.pnTimeToMinuteDropdown.addEventListener('selectOption', this.handleChange.bind(this));\n }\n\n handleChange(e) {\n const target = e.target;\n\n if (target === this.pnDatePicker) {\n this.selectedDate = e.detail;\n }\n\n if (target === this.pnTimeFromHourDropdown || target === this.pnTimeFromMinuteDropdown || target === this.pnTimeToHourDropdown || target === this.pnTimeToMinuteDropdown) {\n this.handleTimeChange();\n }\n\n this.updateHiddenValue();\n }\n\n handleTimeChange() {\n const fromHourString = this.pnTimeFromHourDropdown.querySelector('[aria-selected=true]')?.textContent;\n const fromMinString = this.pnTimeFromMinuteDropdown.querySelector('[aria-selected=true]')?.textContent;\n const toHourString = this.pnTimeToHourDropdown.querySelector('[aria-selected=true]')?.textContent;\n const toMinString = this.pnTimeToMinuteDropdown.querySelector('[aria-selected=true]')?.textContent;\n\n this.selectedFromHour = parseInt(fromHourString);\n this.selectedFromMin = parseInt(fromMinString);\n this.selectedToHour = parseInt(toHourString);\n this.selectedToMin = parseInt(toMinString);\n }\n\n updateHiddenValue() {\n const date = new Date();\n const dateFrom = new Date(date.getFullYear(), date.getMonth(), date.getDate(), this.selectedFromHour, this.selectedFromMin, 0, 0);\n const dateTo = new Date(date.getFullYear(), date.getMonth(), date.getDate(), this.selectedToHour, this.selectedToMin, 0, 0);\n this.validateTimeRange(dateFrom.getTime(), dateTo.getTime());\n\n if (this.invalidTimespan || !this.selectedDate) {\n this.formValue = '';\n } else {\n const fromMin = this.selectedFromMin.toString().padStart(2, '0');\n const toMin = this.selectedToMin.toString().padStart(2, '0');\n\n this.formValue = `${this.selectedDate}, ${this.selectedFromHour}:${fromMin}-${this.selectedToHour}:${toMin}`;\n }\n\n this.dateandtimerange.emit(this.formValue);\n }\n\n validateTimeRange(from: number, to: number) {\n let differenceValue = (to - from) / 1000;\n differenceValue /= 60;\n this.invalidTimespan = differenceValue < this.validTimeRangeMinutes ? true : false;\n }\n\n getNumbersAsStringArr(start: number, stop: number, step: number) {\n const arr = Array.from({ length: (stop - start) / step + 1 }, (_, index: number) => start + index * step);\n const result: string[] = [];\n\n arr.forEach(item => {\n const itemAsString = item.toString().padStart(2, '0');\n result.push(itemAsString);\n });\n\n return result;\n }\n\n removePnOptionSelected() {\n const selectOptions = this.hostElement.querySelectorAll('pn-option');\n selectOptions.forEach(elm => {\n elm.removeAttribute('selected');\n });\n }\n\n render() {\n return (\n <Host>\n <div class=\"date-and-time-group\">\n {this.dateAndTimeLabel ? (\n <div class=\"date-and-time-row\">\n <label>{this.dateAndTimeLabel}</label>\n </div>\n ) : null}\n <div class=\"date-and-time-row\">\n <pn-date-picker\n ref={el => (this.pnDatePicker = el as HTMLElement)}\n range=\"false\"\n disable-weekends={this.disableWeekends}\n min-date={this.firstValidDateString}\n max-date={this.lastValidDateString}\n language={this.language}\n placeholder={this.datePlacehodler}\n ></pn-date-picker>\n </div>\n\n {this.dateHelperText ? <small class=\"date-and-time-row helper-text\">{this.dateHelperText}</small> : null}\n </div>\n <div class=\"date-and-time-group\">\n <div class=\"date-and-time-row\">\n <pn-select\n ref={el => (this.pnTimeFromHourDropdown = el as HTMLElement)}\n name=\"date-and-time-from-houre\"\n placeholder={this.hourArr[8]}\n class=\"date-and-time-dropdown--time\"\n invalid={this.invalidTimespan}\n >\n {this.hourArr?.map((hour: string) => <pn-option label={hour} value={hour}></pn-option>)}\n </pn-select>\n <pn-select\n ref={el => (this.pnTimeFromMinuteDropdown = el as HTMLElement)}\n name=\"date-and-time-from-minute\"\n placeholder={this.minuteArr[0]}\n class=\"date-and-time-dropdown--time\"\n invalid={this.invalidTimespan}\n >\n {this.minuteArr?.map((minute: string) => <pn-option label={minute} value={minute}></pn-option>)}\n </pn-select>\n <div class=\"time-separator\">\n <span>-</span>\n </div>\n <pn-select\n ref={el => (this.pnTimeToHourDropdown = el as HTMLElement)}\n name=\"date-and-time-to-hour\"\n placeholder={this.hourArr[12]}\n class=\"date-and-time-dropdown--time\"\n invalid={this.invalidTimespan}\n >\n {this.hourArr?.map((hour: string) => <pn-option label={hour} value={hour}></pn-option>)}\n </pn-select>\n <pn-select\n ref={el => (this.pnTimeToMinuteDropdown = el as HTMLElement)}\n name=\"date-and-time-to-minute\"\n placeholder={this.minuteArr[0]}\n class=\"date-and-time-dropdown--time\"\n invalid={this.invalidTimespan}\n >\n {this.minuteArr?.map((minute: string) => <pn-option label={minute} value={minute}></pn-option>)}\n </pn-select>\n </div>\n {this.timeHelperText ? <small class=\"date-and-time-row helper-text\">{this.timeHelperText}</small> : null}\n\n {this.invalidTimespan && this.errorMessage ? (\n <small class=\"date-and-time-row error-message\">\n <pn-icon icon={alert_info_circle} small=\"false\" color=\"warning\" />\n {this.errorMessage}\n </small>\n ) : null}\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,EACL,IAAI,CAAC,cAAc,GAAG,aAAO,KAAK,EAAC,+BAA+B,IAAE,IAAI,CAAC,cAAc,CAAS,GAAG,IAAI,EAEvG,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,YAAY,IACxC,aAAO,KAAK,EAAC,iCAAiC,IAC5C,eAAS,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAC,OAAO,EAAC,KAAK,EAAC,SAAS,GAAG,EACjE,IAAI,CAAC,YAAY,CACZ,IACN,IAAI,CACJ,CACD,EACP;KACH;;;;;;","names":[],"sources":["node_modules/pn-design-assets/pn-assets/icons/alert_info_circle.js","src/components/input/pn-date-and-time/pn-date-and-time.scss?tag=pn-date-and-time","src/components/input/pn-date-and-time/pn-date-and-time.tsx"],"sourcesContent":["const icon = '<svg class=\"pn-icon-svg\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\"><path fill=\"#000\" fill-rule=\"evenodd\" d=\"M4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0m8-10C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m0 8a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m1 2v4.5a1 1 0 1 1-2 0V12a1 1 0 1 1 2 0\" clip-rule=\"evenodd\"/></svg>';\nexport const alert_info_circle = icon;\nexport const alertInfoCircle = icon;\n","@import '../../../globals/main.scss';\n\npn-date-and-time {\n label {\n color: $gray700;\n font-size: 1.4rem;\n }\n\n .time-separator {\n margin-top: auto;\n margin-bottom: auto;\n }\n\n .date-and-time-group {\n margin-bottom: 1rem;\n }\n .date-and-time-row {\n display: flex;\n gap: 1rem;\n }\n\n .helper-text {\n margin-top: 0.2rem;\n color: $gray700;\n display: block;\n }\n\n .error-message {\n color: #a70707;\n }\n}\n","import { Component, Prop, h, Element, State, Host, Event, EventEmitter } from '@stencil/core';\nimport { alert_info_circle } from 'pn-design-assets/pn-assets/icons.js';\n\n@Component({\n tag: 'pn-date-and-time',\n styleUrl: 'pn-date-and-time.scss',\n})\nexport class PnDateAndTime {\n @Element() hostElement: Element;\n pnDatePicker: HTMLElement = null;\n pnTimeFromHourDropdown: HTMLElement = null;\n pnTimeFromMinuteDropdown: HTMLElement = null;\n pnTimeToHourDropdown: HTMLElement = null;\n pnTimeToMinuteDropdown: HTMLElement = null;\n\n @Prop() languageCode: string = null;\n @Prop() dateAndTimeLabel: string = '';\n @Prop() dateDaysFromToday: number = 0;\n @Prop() validTimeRangeMinutes: number = 0;\n @Prop() errorMessage: string = '';\n @Prop() dateHelperText: string = '';\n @Prop() timeHelperText: string = '';\n @Prop() disableWeekends: boolean = false;\n @Prop() datePlacehodler: string = '';\n\n @State() language: string = null;\n @State() hourArr: string[] = null;\n @State() minuteArr: string[] = null;\n @State() formValue: string = null;\n @State() invalidTimespan: boolean = false;\n @State() selectedDate: string = null;\n @State() selectedFromHour: number = null;\n @State() selectedFromMin: number = null;\n @State() selectedToHour: number = null;\n @State() selectedToMin: number = null;\n @State() firstValidDateString: string = '';\n @State() lastValidDateString: string = '';\n\n @Event() dateandtimerange: EventEmitter<string>;\n\n componentWillLoad() {\n this.setInitialValues();\n }\n\n componentDidLoad() {\n this.setDefaultHiddenValue();\n this.addEventHandlers();\n }\n\n async setInitialValues() {\n this.setLangugaeCode();\n this.setFirstValidDate();\n\n this.hourArr = this.getNumbersAsStringArr(6, 22, 1);\n this.minuteArr = this.getNumbersAsStringArr(0, 50, 10);\n }\n\n setFirstValidDate() {\n const date = new Date();\n date.setDate(date.getDate() + this.dateDaysFromToday ?? 0);\n\n const year = date.getFullYear();\n const month = (date.getMonth() + 1).toString().padStart(2, '0');\n const day = date.getDate().toString().padStart(2, '0');\n const endYear = year + 2;\n\n this.firstValidDateString = `${year.toString()}-${month}-${day}`;\n this.lastValidDateString = `${endYear.toString()}-${month}-${day}`;\n }\n\n setLangugaeCode() {\n if (typeof this.languageCode === 'string' && this.languageCode.trim() === '') {\n this.language = document.querySelector('html').lang;\n } else {\n this.language = this.languageCode;\n }\n }\n\n setDefaultHiddenValue() {\n this.selectedFromHour = parseInt(this.hourArr[8]);\n this.selectedFromMin = 0;\n this.selectedToHour = parseInt(this.hourArr[12]);\n this.selectedToMin = 0;\n\n this.updateHiddenValue();\n }\n\n addEventHandlers() {\n this.pnDatePicker.addEventListener('dateselection', this.handleChange.bind(this));\n\n this.pnTimeFromHourDropdown.addEventListener('selectOption', this.handleChange.bind(this));\n this.pnTimeFromMinuteDropdown.addEventListener('selectOption', this.handleChange.bind(this));\n this.pnTimeToHourDropdown.addEventListener('selectOption', this.handleChange.bind(this));\n this.pnTimeToMinuteDropdown.addEventListener('selectOption', this.handleChange.bind(this));\n }\n\n handleChange(e) {\n const target = e.target;\n\n if (target === this.pnDatePicker) {\n this.selectedDate = e.detail.start;\n }\n \n const fromHourString = this.pnTimeFromHourDropdown.outerText;\n const fromMinString = this.pnTimeFromMinuteDropdown.outerText;\n const toHourString = this.pnTimeToHourDropdown.outerText;\n const toMinString = this.pnTimeToMinuteDropdown.outerText;\n\n this.selectedFromHour = parseInt(fromHourString);\n this.selectedFromMin = parseInt(fromMinString);\n this.selectedToHour = parseInt(toHourString);\n this.selectedToMin = parseInt(toMinString);\n\n if (target === this.pnTimeFromHourDropdown) {\n this.selectedFromHour = parseInt(e.detail.value);\n }\n\n if (target === this.pnTimeFromMinuteDropdown) {\n this.selectedFromMin = parseInt(e.detail.value);\n }\n\n if (target === this.pnTimeToHourDropdown) {\n this.selectedToHour = parseInt(e.detail.value);\n }\n\n if (target === this.pnTimeToMinuteDropdown) {\n this.selectedToMin = parseInt(e.detail.value);\n }\n\n this.updateHiddenValue();\n }\n\n updateHiddenValue() {\n const date = new Date();\n const dateFrom = new Date(date.getFullYear(), date.getMonth(), date.getDate(), this.selectedFromHour, this.selectedFromMin, 0, 0);\n const dateTo = new Date(date.getFullYear(), date.getMonth(), date.getDate(), this.selectedToHour, this.selectedToMin, 0, 0);\n this.validateTimeRange(dateFrom.getTime(), dateTo.getTime());\n\n if (this.invalidTimespan || !this.selectedDate) {\n this.formValue = '';\n } else {\n const fromMin = this.selectedFromMin.toString().padStart(2, '0');\n const toMin = this.selectedToMin.toString().padStart(2, '0');\n\n this.formValue = `${this.selectedDate}, ${this.selectedFromHour}:${fromMin}-${this.selectedToHour}:${toMin}`;\n }\n \n this.dateandtimerange.emit(this.formValue);\n }\n\n validateTimeRange(from: number, to: number) {\n let differenceValue = (to - from) / 1000;\n differenceValue /= 60;\n this.invalidTimespan = differenceValue < this.validTimeRangeMinutes ? true : false;\n }\n\n getNumbersAsStringArr(start: number, stop: number, step: number) {\n const arr = Array.from({ length: (stop - start) / step + 1 }, (_, index: number) => start + index * step);\n const result: string[] = [];\n\n arr.forEach(item => {\n const itemAsString = item.toString().padStart(2, '0');\n result.push(itemAsString);\n });\n\n return result;\n }\n\n removePnOptionSelected() {\n const selectOptions = this.hostElement.querySelectorAll('pn-option');\n selectOptions.forEach(elm => {\n elm.removeAttribute('selected');\n });\n }\n\n render() {\n return (\n <Host>\n <div class=\"date-and-time-group\">\n {this.dateAndTimeLabel ? (\n <div class=\"date-and-time-row\">\n <label>{this.dateAndTimeLabel}</label>\n </div>\n ) : null}\n <div class=\"date-and-time-row\">\n <pn-date-picker\n ref={el => (this.pnDatePicker = el as HTMLElement)}\n range=\"false\"\n disable-weekends={this.disableWeekends}\n min-date={this.firstValidDateString}\n max-date={this.lastValidDateString}\n language={this.language}\n placeholder={this.datePlacehodler}\n ></pn-date-picker>\n </div>\n\n {this.dateHelperText ? <small class=\"date-and-time-row helper-text\">{this.dateHelperText}</small> : null}\n </div>\n <div class=\"date-and-time-group\">\n <div class=\"date-and-time-row\">\n <pn-select\n ref={el => (this.pnTimeFromHourDropdown = el as HTMLElement)}\n name=\"date-and-time-from-houre\"\n placeholder={this.hourArr[8]}\n class=\"date-and-time-dropdown--time\"\n invalid={this.invalidTimespan}\n >\n {this.hourArr?.map((hour: string) => <pn-option label={hour} value={hour}></pn-option>)}\n </pn-select>\n <pn-select\n ref={el => (this.pnTimeFromMinuteDropdown = el as HTMLElement)}\n name=\"date-and-time-from-minute\"\n placeholder={this.minuteArr[0]}\n class=\"date-and-time-dropdown--time\"\n invalid={this.invalidTimespan}\n >\n {this.minuteArr?.map((minute: string) => <pn-option label={minute} value={minute}></pn-option>)}\n </pn-select>\n <div class=\"time-separator\">\n <span>-</span>\n </div>\n <pn-select\n ref={el => (this.pnTimeToHourDropdown = el as HTMLElement)}\n name=\"date-and-time-to-hour\"\n placeholder={this.hourArr[12]}\n class=\"date-and-time-dropdown--time\"\n invalid={this.invalidTimespan}\n >\n {this.hourArr?.map((hour: string) => <pn-option label={hour} value={hour}></pn-option>)}\n </pn-select>\n <pn-select\n ref={el => (this.pnTimeToMinuteDropdown = el as HTMLElement)}\n name=\"date-and-time-to-minute\"\n placeholder={this.minuteArr[0]}\n class=\"date-and-time-dropdown--time\"\n invalid={this.invalidTimespan}\n >\n {this.minuteArr?.map((minute: string) => <pn-option label={minute} value={minute}></pn-option>)}\n </pn-select>\n </div>\n {this.timeHelperText ? <small class=\"date-and-time-row helper-text\">{this.timeHelperText}</small> : null}\n\n {this.invalidTimespan && this.errorMessage ? (\n <small class=\"date-and-time-row error-message\">\n <pn-icon icon={alert_info_circle} small=\"false\" color=\"warning\" />\n {this.errorMessage}\n </small>\n ) : null}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@postnord/pn-marketweb-components",
3
- "version": "3.3.2",
3
+ "version": "3.3.4",
4
4
  "description": "PostNord Market Websites Components",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -0,0 +1,2 @@
1
+ import{r as t,c as e,g as s,h as i,d as a}from"./p-06555615.js";const n='<svg class="pn-icon-svg" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path fill="#000" fill-rule="evenodd" d="M4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0m8-10C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m0 8a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m1 2v4.5a1 1 0 1 1-2 0V12a1 1 0 1 1 2 0" clip-rule="evenodd"/></svg>';const d=n;const h="pn-button-dropdown .pn-button-dropdown>pn-button>.pn-button{min-height:initial}pn-date-and-time label{color:#5e554a;font-size:1.4rem}pn-date-and-time .time-separator{margin-top:auto;margin-bottom:auto}pn-date-and-time .date-and-time-group{margin-bottom:1rem}pn-date-and-time .date-and-time-row{display:flex;gap:1rem}pn-date-and-time .helper-text{margin-top:0.2rem;color:#5e554a;display:block}pn-date-and-time .error-message{color:#a70707}";const l=h;const o=class{constructor(s){t(this,s);this.dateandtimerange=e(this,"dateandtimerange",7);this.languageCode=null;this.dateAndTimeLabel="";this.dateDaysFromToday=0;this.validTimeRangeMinutes=0;this.errorMessage="";this.dateHelperText="";this.timeHelperText="";this.disableWeekends=false;this.datePlacehodler="";this.language=null;this.hourArr=null;this.minuteArr=null;this.formValue=null;this.invalidTimespan=false;this.selectedDate=null;this.selectedFromHour=null;this.selectedFromMin=null;this.selectedToHour=null;this.selectedToMin=null;this.firstValidDateString="";this.lastValidDateString=""}get hostElement(){return s(this)}pnDatePicker=null;pnTimeFromHourDropdown=null;pnTimeFromMinuteDropdown=null;pnTimeToHourDropdown=null;pnTimeToMinuteDropdown=null;dateandtimerange;componentWillLoad(){this.setInitialValues()}componentDidLoad(){this.setDefaultHiddenValue();this.addEventHandlers()}async setInitialValues(){this.setLangugaeCode();this.setFirstValidDate();this.hourArr=this.getNumbersAsStringArr(6,22,1);this.minuteArr=this.getNumbersAsStringArr(0,50,10)}setFirstValidDate(){const t=new Date;t.setDate(t.getDate()+this.dateDaysFromToday??0);const e=t.getFullYear();const s=(t.getMonth()+1).toString().padStart(2,"0");const i=t.getDate().toString().padStart(2,"0");const a=e+2;this.firstValidDateString=`${e.toString()}-${s}-${i}`;this.lastValidDateString=`${a.toString()}-${s}-${i}`}setLangugaeCode(){if(typeof this.languageCode==="string"&&this.languageCode.trim()===""){this.language=document.querySelector("html").lang}else{this.language=this.languageCode}}setDefaultHiddenValue(){this.selectedFromHour=parseInt(this.hourArr[8]);this.selectedFromMin=0;this.selectedToHour=parseInt(this.hourArr[12]);this.selectedToMin=0;this.updateHiddenValue()}addEventHandlers(){this.pnDatePicker.addEventListener("dateselection",this.handleChange.bind(this));this.pnTimeFromHourDropdown.addEventListener("selectOption",this.handleChange.bind(this));this.pnTimeFromMinuteDropdown.addEventListener("selectOption",this.handleChange.bind(this));this.pnTimeToHourDropdown.addEventListener("selectOption",this.handleChange.bind(this));this.pnTimeToMinuteDropdown.addEventListener("selectOption",this.handleChange.bind(this))}handleChange(t){const e=t.target;if(e===this.pnDatePicker){this.selectedDate=t.detail.start}const s=this.pnTimeFromHourDropdown.outerText;const i=this.pnTimeFromMinuteDropdown.outerText;const a=this.pnTimeToHourDropdown.outerText;const n=this.pnTimeToMinuteDropdown.outerText;this.selectedFromHour=parseInt(s);this.selectedFromMin=parseInt(i);this.selectedToHour=parseInt(a);this.selectedToMin=parseInt(n);if(e===this.pnTimeFromHourDropdown){this.selectedFromHour=parseInt(t.detail.value)}if(e===this.pnTimeFromMinuteDropdown){this.selectedFromMin=parseInt(t.detail.value)}if(e===this.pnTimeToHourDropdown){this.selectedToHour=parseInt(t.detail.value)}if(e===this.pnTimeToMinuteDropdown){this.selectedToMin=parseInt(t.detail.value)}this.updateHiddenValue()}updateHiddenValue(){const t=new Date;const e=new Date(t.getFullYear(),t.getMonth(),t.getDate(),this.selectedFromHour,this.selectedFromMin,0,0);const s=new Date(t.getFullYear(),t.getMonth(),t.getDate(),this.selectedToHour,this.selectedToMin,0,0);this.validateTimeRange(e.getTime(),s.getTime());if(this.invalidTimespan||!this.selectedDate){this.formValue=""}else{const t=this.selectedFromMin.toString().padStart(2,"0");const e=this.selectedToMin.toString().padStart(2,"0");this.formValue=`${this.selectedDate}, ${this.selectedFromHour}:${t}-${this.selectedToHour}:${e}`}this.dateandtimerange.emit(this.formValue)}validateTimeRange(t,e){let s=(e-t)/1e3;s/=60;this.invalidTimespan=s<this.validTimeRangeMinutes?true:false}getNumbersAsStringArr(t,e,s){const i=Array.from({length:(e-t)/s+1},((e,i)=>t+i*s));const a=[];i.forEach((t=>{const e=t.toString().padStart(2,"0");a.push(e)}));return a}removePnOptionSelected(){const t=this.hostElement.querySelectorAll("pn-option");t.forEach((t=>{t.removeAttribute("selected")}))}render(){return i(a,{key:"427046301b2ac39e7eec2606f03a219a052331c5"},i("div",{key:"229f301ac20c70eea858802f46ba86c408e2079b",class:"date-and-time-group"},this.dateAndTimeLabel?i("div",{class:"date-and-time-row"},i("label",null,this.dateAndTimeLabel)):null,i("div",{key:"e861465a653b789df0058a16153e7b8f894c03de",class:"date-and-time-row"},i("pn-date-picker",{key:"62ddce7306500633d72cdc4d12db989ac3c02b70",ref:t=>this.pnDatePicker=t,range:"false","disable-weekends":this.disableWeekends,"min-date":this.firstValidDateString,"max-date":this.lastValidDateString,language:this.language,placeholder:this.datePlacehodler})),this.dateHelperText?i("small",{class:"date-and-time-row helper-text"},this.dateHelperText):null),i("div",{key:"238e07b7c5c3e32a57fd4f63f5f0605d8f53020d",class:"date-and-time-group"},i("div",{key:"31157ce2f842378db771141eb003f5c19d6adaed",class:"date-and-time-row"},i("pn-select",{key:"eb874ddc6dea2d1c62d557712576047c38a9f077",ref:t=>this.pnTimeFromHourDropdown=t,name:"date-and-time-from-houre",placeholder:this.hourArr[8],class:"date-and-time-dropdown--time",invalid:this.invalidTimespan},this.hourArr?.map((t=>i("pn-option",{label:t,value:t})))),i("pn-select",{key:"c7721bed19e520e881780b456fa5fe6a20abd2eb",ref:t=>this.pnTimeFromMinuteDropdown=t,name:"date-and-time-from-minute",placeholder:this.minuteArr[0],class:"date-and-time-dropdown--time",invalid:this.invalidTimespan},this.minuteArr?.map((t=>i("pn-option",{label:t,value:t})))),i("div",{key:"6f6532649c8a6eee91b96f5152c0086d77a0c543",class:"time-separator"},i("span",{key:"3e43b12bc5e6f4ed1d8d6330760ced467e39ef5c"},"-")),i("pn-select",{key:"ebe92ab375e3a9777b6b77b9dd45976cf26c6d9f",ref:t=>this.pnTimeToHourDropdown=t,name:"date-and-time-to-hour",placeholder:this.hourArr[12],class:"date-and-time-dropdown--time",invalid:this.invalidTimespan},this.hourArr?.map((t=>i("pn-option",{label:t,value:t})))),i("pn-select",{key:"38c2b11d4f8c0fd5206ffdb6a3bb8194a0ce495d",ref:t=>this.pnTimeToMinuteDropdown=t,name:"date-and-time-to-minute",placeholder:this.minuteArr[0],class:"date-and-time-dropdown--time",invalid:this.invalidTimespan},this.minuteArr?.map((t=>i("pn-option",{label:t,value:t}))))),this.timeHelperText?i("small",{class:"date-and-time-row helper-text"},this.timeHelperText):null,this.invalidTimespan&&this.errorMessage?i("small",{class:"date-and-time-row error-message"},i("pn-icon",{icon:d,small:"false",color:"warning"}),this.errorMessage):null))}};o.style=l;export{o as pn_date_and_time};
2
+ //# sourceMappingURL=p-bdaf4338.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["icon","alert_info_circle","pnDateAndTimeCss","PnDateAndTimeStyle0","PnDateAndTime","pnDatePicker","pnTimeFromHourDropdown","pnTimeFromMinuteDropdown","pnTimeToHourDropdown","pnTimeToMinuteDropdown","dateandtimerange","componentWillLoad","this","setInitialValues","componentDidLoad","setDefaultHiddenValue","addEventHandlers","setLangugaeCode","setFirstValidDate","hourArr","getNumbersAsStringArr","minuteArr","date","Date","setDate","getDate","dateDaysFromToday","year","getFullYear","month","getMonth","toString","padStart","day","endYear","firstValidDateString","lastValidDateString","languageCode","trim","language","document","querySelector","lang","selectedFromHour","parseInt","selectedFromMin","selectedToHour","selectedToMin","updateHiddenValue","addEventListener","handleChange","bind","e","target","selectedDate","detail","start","fromHourString","outerText","fromMinString","toHourString","toMinString","value","dateFrom","dateTo","validateTimeRange","getTime","invalidTimespan","formValue","fromMin","toMin","emit","from","to","differenceValue","validTimeRangeMinutes","stop","step","arr","Array","length","_","index","result","forEach","item","itemAsString","push","removePnOptionSelected","selectOptions","hostElement","querySelectorAll","elm","removeAttribute","render","h","Host","key","class","dateAndTimeLabel","ref","el","range","disableWeekends","placeholder","datePlacehodler","dateHelperText","name","invalid","map","hour","label","minute","timeHelperText","errorMessage","small","color"],"sources":["node_modules/pn-design-assets/pn-assets/icons/alert_info_circle.js","src/components/input/pn-date-and-time/pn-date-and-time.scss?tag=pn-date-and-time","src/components/input/pn-date-and-time/pn-date-and-time.tsx"],"sourcesContent":["const icon = '<svg class=\"pn-icon-svg\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\"><path fill=\"#000\" fill-rule=\"evenodd\" d=\"M4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0m8-10C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m0 8a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m1 2v4.5a1 1 0 1 1-2 0V12a1 1 0 1 1 2 0\" clip-rule=\"evenodd\"/></svg>';\nexport const alert_info_circle = icon;\nexport const alertInfoCircle = icon;\n","@import '../../../globals/main.scss';\n\npn-date-and-time {\n label {\n color: $gray700;\n font-size: 1.4rem;\n }\n\n .time-separator {\n margin-top: auto;\n margin-bottom: auto;\n }\n\n .date-and-time-group {\n margin-bottom: 1rem;\n }\n .date-and-time-row {\n display: flex;\n gap: 1rem;\n }\n\n .helper-text {\n margin-top: 0.2rem;\n color: $gray700;\n display: block;\n }\n\n .error-message {\n color: #a70707;\n }\n}\n","import { Component, Prop, h, Element, State, Host, Event, EventEmitter } from '@stencil/core';\nimport { alert_info_circle } from 'pn-design-assets/pn-assets/icons.js';\n\n@Component({\n tag: 'pn-date-and-time',\n styleUrl: 'pn-date-and-time.scss',\n})\nexport class PnDateAndTime {\n @Element() hostElement: Element;\n pnDatePicker: HTMLElement = null;\n pnTimeFromHourDropdown: HTMLElement = null;\n pnTimeFromMinuteDropdown: HTMLElement = null;\n pnTimeToHourDropdown: HTMLElement = null;\n pnTimeToMinuteDropdown: HTMLElement = null;\n\n @Prop() languageCode: string = null;\n @Prop() dateAndTimeLabel: string = '';\n @Prop() dateDaysFromToday: number = 0;\n @Prop() validTimeRangeMinutes: number = 0;\n @Prop() errorMessage: string = '';\n @Prop() dateHelperText: string = '';\n @Prop() timeHelperText: string = '';\n @Prop() disableWeekends: boolean = false;\n @Prop() datePlacehodler: string = '';\n\n @State() language: string = null;\n @State() hourArr: string[] = null;\n @State() minuteArr: string[] = null;\n @State() formValue: string = null;\n @State() invalidTimespan: boolean = false;\n @State() selectedDate: string = null;\n @State() selectedFromHour: number = null;\n @State() selectedFromMin: number = null;\n @State() selectedToHour: number = null;\n @State() selectedToMin: number = null;\n @State() firstValidDateString: string = '';\n @State() lastValidDateString: string = '';\n\n @Event() dateandtimerange: EventEmitter<string>;\n\n componentWillLoad() {\n this.setInitialValues();\n }\n\n componentDidLoad() {\n this.setDefaultHiddenValue();\n this.addEventHandlers();\n }\n\n async setInitialValues() {\n this.setLangugaeCode();\n this.setFirstValidDate();\n\n this.hourArr = this.getNumbersAsStringArr(6, 22, 1);\n this.minuteArr = this.getNumbersAsStringArr(0, 50, 10);\n }\n\n setFirstValidDate() {\n const date = new Date();\n date.setDate(date.getDate() + this.dateDaysFromToday ?? 0);\n\n const year = date.getFullYear();\n const month = (date.getMonth() + 1).toString().padStart(2, '0');\n const day = date.getDate().toString().padStart(2, '0');\n const endYear = year + 2;\n\n this.firstValidDateString = `${year.toString()}-${month}-${day}`;\n this.lastValidDateString = `${endYear.toString()}-${month}-${day}`;\n }\n\n setLangugaeCode() {\n if (typeof this.languageCode === 'string' && this.languageCode.trim() === '') {\n this.language = document.querySelector('html').lang;\n } else {\n this.language = this.languageCode;\n }\n }\n\n setDefaultHiddenValue() {\n this.selectedFromHour = parseInt(this.hourArr[8]);\n this.selectedFromMin = 0;\n this.selectedToHour = parseInt(this.hourArr[12]);\n this.selectedToMin = 0;\n\n this.updateHiddenValue();\n }\n\n addEventHandlers() {\n this.pnDatePicker.addEventListener('dateselection', this.handleChange.bind(this));\n\n this.pnTimeFromHourDropdown.addEventListener('selectOption', this.handleChange.bind(this));\n this.pnTimeFromMinuteDropdown.addEventListener('selectOption', this.handleChange.bind(this));\n this.pnTimeToHourDropdown.addEventListener('selectOption', this.handleChange.bind(this));\n this.pnTimeToMinuteDropdown.addEventListener('selectOption', this.handleChange.bind(this));\n }\n\n handleChange(e) {\n const target = e.target;\n\n if (target === this.pnDatePicker) {\n this.selectedDate = e.detail.start;\n }\n \n const fromHourString = this.pnTimeFromHourDropdown.outerText;\n const fromMinString = this.pnTimeFromMinuteDropdown.outerText;\n const toHourString = this.pnTimeToHourDropdown.outerText;\n const toMinString = this.pnTimeToMinuteDropdown.outerText;\n\n this.selectedFromHour = parseInt(fromHourString);\n this.selectedFromMin = parseInt(fromMinString);\n this.selectedToHour = parseInt(toHourString);\n this.selectedToMin = parseInt(toMinString);\n\n if (target === this.pnTimeFromHourDropdown) {\n this.selectedFromHour = parseInt(e.detail.value);\n }\n\n if (target === this.pnTimeFromMinuteDropdown) {\n this.selectedFromMin = parseInt(e.detail.value);\n }\n\n if (target === this.pnTimeToHourDropdown) {\n this.selectedToHour = parseInt(e.detail.value);\n }\n\n if (target === this.pnTimeToMinuteDropdown) {\n this.selectedToMin = parseInt(e.detail.value);\n }\n\n this.updateHiddenValue();\n }\n\n updateHiddenValue() {\n const date = new Date();\n const dateFrom = new Date(date.getFullYear(), date.getMonth(), date.getDate(), this.selectedFromHour, this.selectedFromMin, 0, 0);\n const dateTo = new Date(date.getFullYear(), date.getMonth(), date.getDate(), this.selectedToHour, this.selectedToMin, 0, 0);\n this.validateTimeRange(dateFrom.getTime(), dateTo.getTime());\n\n if (this.invalidTimespan || !this.selectedDate) {\n this.formValue = '';\n } else {\n const fromMin = this.selectedFromMin.toString().padStart(2, '0');\n const toMin = this.selectedToMin.toString().padStart(2, '0');\n\n this.formValue = `${this.selectedDate}, ${this.selectedFromHour}:${fromMin}-${this.selectedToHour}:${toMin}`;\n }\n \n this.dateandtimerange.emit(this.formValue);\n }\n\n validateTimeRange(from: number, to: number) {\n let differenceValue = (to - from) / 1000;\n differenceValue /= 60;\n this.invalidTimespan = differenceValue < this.validTimeRangeMinutes ? true : false;\n }\n\n getNumbersAsStringArr(start: number, stop: number, step: number) {\n const arr = Array.from({ length: (stop - start) / step + 1 }, (_, index: number) => start + index * step);\n const result: string[] = [];\n\n arr.forEach(item => {\n const itemAsString = item.toString().padStart(2, '0');\n result.push(itemAsString);\n });\n\n return result;\n }\n\n removePnOptionSelected() {\n const selectOptions = this.hostElement.querySelectorAll('pn-option');\n selectOptions.forEach(elm => {\n elm.removeAttribute('selected');\n });\n }\n\n render() {\n return (\n <Host>\n <div class=\"date-and-time-group\">\n {this.dateAndTimeLabel ? (\n <div class=\"date-and-time-row\">\n <label>{this.dateAndTimeLabel}</label>\n </div>\n ) : null}\n <div class=\"date-and-time-row\">\n <pn-date-picker\n ref={el => (this.pnDatePicker = el as HTMLElement)}\n range=\"false\"\n disable-weekends={this.disableWeekends}\n min-date={this.firstValidDateString}\n max-date={this.lastValidDateString}\n language={this.language}\n placeholder={this.datePlacehodler}\n ></pn-date-picker>\n </div>\n\n {this.dateHelperText ? <small class=\"date-and-time-row helper-text\">{this.dateHelperText}</small> : null}\n </div>\n <div class=\"date-and-time-group\">\n <div class=\"date-and-time-row\">\n <pn-select\n ref={el => (this.pnTimeFromHourDropdown = el as HTMLElement)}\n name=\"date-and-time-from-houre\"\n placeholder={this.hourArr[8]}\n class=\"date-and-time-dropdown--time\"\n invalid={this.invalidTimespan}\n >\n {this.hourArr?.map((hour: string) => <pn-option label={hour} value={hour}></pn-option>)}\n </pn-select>\n <pn-select\n ref={el => (this.pnTimeFromMinuteDropdown = el as HTMLElement)}\n name=\"date-and-time-from-minute\"\n placeholder={this.minuteArr[0]}\n class=\"date-and-time-dropdown--time\"\n invalid={this.invalidTimespan}\n >\n {this.minuteArr?.map((minute: string) => <pn-option label={minute} value={minute}></pn-option>)}\n </pn-select>\n <div class=\"time-separator\">\n <span>-</span>\n </div>\n <pn-select\n ref={el => (this.pnTimeToHourDropdown = el as HTMLElement)}\n name=\"date-and-time-to-hour\"\n placeholder={this.hourArr[12]}\n class=\"date-and-time-dropdown--time\"\n invalid={this.invalidTimespan}\n >\n {this.hourArr?.map((hour: string) => <pn-option label={hour} value={hour}></pn-option>)}\n </pn-select>\n <pn-select\n ref={el => (this.pnTimeToMinuteDropdown = el as HTMLElement)}\n name=\"date-and-time-to-minute\"\n placeholder={this.minuteArr[0]}\n class=\"date-and-time-dropdown--time\"\n invalid={this.invalidTimespan}\n >\n {this.minuteArr?.map((minute: string) => <pn-option label={minute} value={minute}></pn-option>)}\n </pn-select>\n </div>\n {this.timeHelperText ? <small class=\"date-and-time-row helper-text\">{this.timeHelperText}</small> : null}\n\n {this.invalidTimespan && this.errorMessage ? (\n <small class=\"date-and-time-row error-message\">\n <pn-icon icon={alert_info_circle} small=\"false\" color=\"warning\" />\n {this.errorMessage}\n </small>\n ) : null}\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"gEAAA,MAAMA,EAAO,6VACN,MAAMC,EAAoBD,ECDjC,MAAME,EAAmB,ybACzB,MAAAC,EAAeD,E,MCMFE,EAAa,M,8FAQO,K,sBACI,G,uBACC,E,2BACI,E,kBACT,G,oBACE,G,oBACA,G,qBACE,M,qBACD,G,cAEN,K,aACC,K,eACE,K,eACF,K,qBACO,M,kBACJ,K,sBACI,K,qBACD,K,oBACD,K,mBACD,K,0BACO,G,yBACD,E,kCA3BvCC,aAA4B,KAC5BC,uBAAsC,KACtCC,yBAAwC,KACxCC,qBAAoC,KACpCC,uBAAsC,KAyB7BC,iBAET,iBAAAC,GACEC,KAAKC,kB,CAGP,gBAAAC,GACEF,KAAKG,wBACLH,KAAKI,kB,CAGP,sBAAMH,GACJD,KAAKK,kBACLL,KAAKM,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MC,EAAmBkH,MAAM,QAAQC,MAAM,YACrDxG,KAAKsG,cAEN,M","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as i,g as s,h as e,d as l}from"./p-06555615.js";import{F as n,M as o}from"./p-73cef33c.js";import{d as h}from"./p-aed52bc1.js";const a="pn-button-dropdown .pn-button-dropdown>pn-button>.pn-button{min-height:initial}pn-address-autofill pn-marketweb-input{width:50%}pn-address-autofill .input-container-row{display:flex;gap:1rem;margin-bottom:1rem}pn-address-autofill .label-container{color:#5e554a;font-size:0.875em;display:flex;justify-content:space-between;align-items:flex-end}pn-address-autofill .autocomplete-items{position:absolute;border-radius:0.8rem;border:0.1rem solid #5e554a;width:100%;max-height:30rem;overflow-y:auto}pn-address-autofill .autocomplete-items:hover,pn-address-autofill .autocomplete-items :focus{border:0.1rem solid #00a0d6}pn-address-autofill .autocomplete-items div{padding:1.6rem;cursor:pointer;background-color:#fff;border:0.1rem solid transparent}pn-address-autofill .autocomplete-items div:first-child{border-radius:0.8rem 0.8rem 0 0}pn-address-autofill .autocomplete-items div:last-child{border-radius:0 0 0.8rem 0.8rem}pn-address-autofill .autocomplete-items div:hover{background-color:#e0f8ff}pn-address-autofill .autocomplete-items .autocomplete-active{background-color:#e0f8ff}";const r=a;const u=class{constructor(s){t(this,s);this.addresscomplete=i(this,"addresscomplete",7);this.market=null;this.environment=null;this.endpoint=null;this.cache=true;this.countryCode=null;this.postalCodeProps=null;this.cityProps=null;this.streetAddressProps=null;this.streetNumberProps=null;this.streetAdressArr=null;this.streetNumberArr=null;this.city=null;this.postalCode=null;this.streetAddress=null;this.streetNumber=null;this.fullAddress=null}get hostElement(){return s(this)}pnInputPostalCode=null;pnInputCity=null;pnInputStreetAddress=null;pnInputStreetNumber=null;postalCodeInputField=null;streetAddressInputField=null;streetNumberInputField=null;pnInputHiddenValue=null;endpointPath="/api/location/get-by-location";_postalCodeProps=null;_cityProps=null;_streetAddressProps=null;_streetNumberProps=null;addresscomplete;fetchHelper=new n("PostalCodeCityAutofill");componentWillLoad(){this.setInitialValues();this._postalCodeProps=this.setProps(this.postalCodeProps);this._cityProps=this.setProps(this.cityProps);this._streetAddressProps=this.setProps(this.streetAddressProps);this._streetNumberProps=this.setProps(this.streetNumberProps)}setProps(t){if(typeof t==="string"){return JSON.parse(t)}else{return t}}componentDidLoad(){this.postalCodeInputField=this.pnInputPostalCode.querySelector("input");this.streetAddressInputField=this.pnInputStreetAddress.querySelector("input");this.streetNumberInputField=this.pnInputStreetNumber.querySelector("input");this.addEventHandlers()}async setInitialValues(t=window.location.href){const i=new o(t);if(!this.environment){this.environment=await i.getEnvironmentName()}if(!this.endpoint&&this.environment?.indexOf("local")===-1){this.endpoint=await i.getEndpoint(this.environment,this.market)}if(!this.endpoint){this.endpoint=""}}addEventHandlers(){const t=h(this.fetchData.bind(this,this.postalCodeInputField),1e3);this.postalCodeInputField.addEventListener("keyup",t);this.streetAddressInputField.addEventListener("keyup",this.handleStreetAddressDropdown.bind(this));this.streetNumberInputField.addEventListener("focus",this.handleStreetNumberDropdown.bind(this));this.addFormFieldEvent()}addFormFieldEvent(){const t=this.hostElement.querySelectorAll("input");t.forEach((t=>{["keyup","change"].forEach((i=>{const s=h(this.updateHiddenValue.bind(this),1e3);t.addEventListener(i,s)}))}))}updateHiddenValue(t){if(t.target===this.streetNumberInputField){this.streetNumber=this.streetNumberInputField.value}if(this.postalCode&&this.city&&this.streetAddress&&this.streetNumber){this.fullAddress=`${this.streetAddress} ${this.streetNumber}, ${this.city} ${this.postalCode}`}else{this.fullAddress=""}this.addresscomplete.emit(this.fullAddress)}async fetchData(t,i){if(i){i.preventDefault();if(i.key==="Tab"){if(this.city){return}}}let s="";const e=i&&i.target===this.postalCodeInputField;const l=t===this.streetAddressInputField&&this.city&&this.city.length;const n=t===this.streetNumberInputField&&this.city&&this.city.length&&this.streetAddress&&this.streetAddress.length;if(e){s=this.postalCodeInputField.value;this.streetAdressArr=null;this.streetAddressInputField.value="";this.streetNumberArr=null;this.streetNumberInputField.value="";this.city=null;this.streetAddress=null;this.streetNumber=null}if(l){s=`${this.streetAddressInputField.value}, ${this.city}`;this.streetNumberArr=null;this.streetNumberInputField.value="";this.streetNumber=null}if(n){this.streetAdressArr=null;s=`${this.streetAddress}, ${this.city}`}if(s.length>0){const t=this.endpoint.lastIndexOf("/")===this.endpoint.length-1?this.endpoint.substring(0,this.endpoint.length-1):this.endpoint;const i=`${t}${this.endpointPath}?countryCode=${this.countryCode}&query=${s}&maxHits=1000`;const o=await this.fetchHelper.fetchJson(i,{mode:"cors"},this.cache);if(o){if(e){this.city=o.postalCodes?o.postalCodes[0]?.postalCity:null}if(l&&o.addresses){this.postalCode=this.postalCodeInputField.value;this.filterStreetNames(o)}if(n&&o.addresses){this.filterStreetNumbers(o)}}}}filterStreetNames=t=>{const i=[];this.streetAdressArr=null;t.addresses.forEach((t=>{if(t.postalCode.postalCity===this.city&&!i.includes(t.street)){i.push(t.street)}}));this.streetAdressArr=i};filterStreetNumbers=t=>{const i=[];t.addresses.forEach((t=>{if(t.postalCode.postalCode===this.postalCode){const{numberFrom:s,numberTo:e}=t;const l=parseInt(s);const n=parseInt(e);for(let t=l;t<=n;t++){const s=t.toString();if(!i.includes(s)){i.push(t.toString())}}}}));this.streetNumberArr=i};async handleStreetAddressDropdown(t){const i=t.target;if(i===this.streetAddressInputField&&i.value.length){if(!this.streetAdressArr||!this.streetAdressArr.length){await this.fetchData(this.streetAddressInputField,null)}}if(!i.value||!i.value.length){this.streetAdressArr=null}if(this.streetAdressArr&&this.streetAdressArr.length){this.autoComplete(t,this.streetAdressArr)}}async handleStreetNumberDropdown(t){t.preventDefault();const i=t.target;if(i===this.streetNumberInputField){if(!this.streetNumberArr||!this.streetNumberArr.length){await this.fetchData(this.streetNumberInputField,null)}if(this.streetNumberArr){this.autoComplete(t,this.streetNumberArr)}}}autoComplete(t,i){const s=t.target;if(i.length<1){return}let e=0;s.addEventListener("input",(()=>{const t=s.value;this.closeAllLists(s);if(!t){return}e=-1;let l=document.createElement("div");l.setAttribute("id","autocomplete-list"+s.name);l.setAttribute("class","autocomplete-items");s.parentElement.appendChild(l);for(let e=0;e<i.length;e++){if(i[e].substring(0,t.length).toUpperCase()==t.toUpperCase()){let n=document.createElement("div");n.innerHTML="<strong>"+i[e].substring(0,t.length)+"</strong>";n.innerHTML+=i[e].substring(t.length);n.innerHTML+="<input type='hidden' value='"+i[e]+"'>";n.addEventListener("click",(t=>{const i=s.closest("pn-marketweb-input");let e=t.target;if(e.nodeName==="STRONG"){e=e.parentElement}i.value=e.getElementsByTagName("input")[0].value;if(s===this.streetNumberInputField){this.streetNumber=i.value}if(s===this.streetAddressInputField){this.streetAddress=i.value}this.closeAllLists(t.target);s.focus()}));l.appendChild(n)}}}));s.addEventListener("keydown",(t=>{const i=document.getElementById("autocomplete-list"+s.name);let l;if(i){l=i.getElementsByTagName("div")}else{l=i}if(t.keyCode==40){e++;this.addActive(l,e)}if(t.keyCode==38){e--;this.addActive(l,e)}if(t.keyCode==13){t.preventDefault();if(e>-1){if(l){l[e].click()}}}}))}closeAllLists(t){const i=document.getElementsByClassName("autocomplete-items");for(let s=0;s<i.length;s++){if(t!=i[s]){i[s].parentNode.removeChild(i[s])}}}addActive(t,i){if(!t)return;this.removeActive(t);if(i>=t.length)i=0;if(i<0)i=t.length-1;t[i].classList.add("autocomplete-active")}removeActive(t){for(let i=0;i<t.length;i++){t[i].classList.remove("autocomplete-active")}}render(){return e(l,{key:"e0f667ef808c53f3d40b514b3a648447a6a57fd2",class:"pn-address-autofill"},this._postalCodeProps?.postalCodeCityLabel?e("div",{class:"label-container"},e("label",null,`${this._postalCodeProps.postalCodeCityLabel}`)):null,e("div",{key:"6e4b2cdefa11b88e5904f1cf9e234abb9a9387f4",class:"input-container-row"},e("pn-marketweb-input",{key:"599a06260d24a6a2a857e25072388177a09f14c9",type:"text",name:this._postalCodeProps?.postalCodeInputName,required:this._postalCodeProps?.postalCodeInputRequired,placeholder:this._postalCodeProps?.postalCodeInputPlaceholder,ref:t=>this.pnInputPostalCode=t,autocomplete:"off",helpertext:this._postalCodeProps?.postalCodeInputHelpertext}),e("pn-marketweb-input",{key:"251e676f25c64be78351ea3663c36ead103f4c3f",type:"text",name:this._cityProps?.cityInputName,disabled:true,value:this.city,placeholder:this._cityProps?.cityInputPlaceholder,autocomplete:"off",helpertext:this._cityProps?.cityInputHelpertext})),this._streetAddressProps?.streetAddressNumberLabel?e("div",{class:"label-container"},e("label",null,`${this._streetAddressProps.streetAddressNumberLabel}`)):null,e("div",{key:"71fdc61d6fa1f0b0f4fe8f02eb5d64254f4ca7fd",class:"input-container-row"},e("pn-marketweb-input",{key:"d7c21bc51aa24541c910cc2f1adf1708a5897245",type:"text",name:this._streetAddressProps?.streetAddressInputName,required:this._streetAddressProps?.streetAddressInputRequired,value:this.streetAddress,placeholder:this._streetAddressProps?.streetAddressInputPlaceholder,ref:t=>this.pnInputStreetAddress=t,autocomplete:"off",helpertext:this._streetAddressProps?.streetAddressInputHelpertext}),e("pn-marketweb-input",{key:"b96c0b5ab0632528b44d9e2477208750b61dc8b3",type:"text",name:this._streetNumberProps?.streetNumberInputName,required:this._streetNumberProps?.streetNumberInputRequired,value:this.streetNumber,placeholder:this._streetNumberProps?.streetNumberInputPlaceholder,ref:t=>this.pnInputStreetNumber=t,autocomplete:"off",helpertext:this._streetNumberProps?.streetNumberInputHelpertext})))}};u.style=r;export{u as pn_address_autofill};
2
+ //# sourceMappingURL=p-d5a4ada5.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["pnAddressAutofillCss","PnAddressAutofillStyle0","PnAddressAutofill","pnInputPostalCode","pnInputCity","pnInputStreetAddress","pnInputStreetNumber","postalCodeInputField","streetAddressInputField","streetNumberInputField","pnInputHiddenValue","endpointPath","_postalCodeProps","_cityProps","_streetAddressProps","_streetNumberProps","addresscomplete","fetchHelper","FetchHelper","componentWillLoad","this","setInitialValues","setProps","postalCodeProps","cityProps","streetAddressProps","streetNumberProps","props","JSON","parse","componentDidLoad","querySelector","addEventHandlers","href","window","location","marketWebContextService","MarketWebContextService","environment","getEnvironmentName","endpoint","indexOf","getEndpoint","market","postalCodeSearch","debounce","fetchData","bind","addEventListener","handleStreetAddressDropdown","handleStreetNumberDropdown","addFormFieldEvent","allInputs","hostElement","querySelectorAll","forEach","element","eventName","debounceUpdate","updateHiddenValue","e","target","streetNumber","value","postalCode","city","streetAddress","fullAddress","emit","field","preventDefault","key","query","isPostalCodeSearch","isStreetAddressSearch","length","isStreetNumberSearch","streetAdressArr","streetNumberArr","endpointBase","lastIndexOf","substring","fetchUrl","countryCode","data","fetchJson","mode","cache","postalCodes","postalCity","addresses","filterStreetNames","filterStreetNumbers","item","includes","street","push","streetNumbersResult","numberFrom","numberTo","from","parseInt","to","i","nrString","toString","autoComplete","arr","inputField","currentFocus","val","closeAllLists","list","document","createElement","setAttribute","name","parentElement","appendChild","toUpperCase","option","innerHTML","clickEvent","inputParrent","closest","eventTarget","nodeName","getElementsByTagName","focus","keydownEvent","listElement","getElementById","keyCode","addActive","click","elmnt","lists","getElementsByClassName","parentNode","removeChild","removeActive","classList","add","remove","render","h","Host","class","postalCodeCityLabel","type","postalCodeInputName","required","postalCodeInputRequired","placeholder","postalCodeInputPlaceholder","ref","el","autocomplete","helpertext","postalCodeInputHelpertext","cityInputName","disabled","cityInputPlaceholder","cityInputHelpertext","streetAddressNumberLabel","streetAddressInputName","streetAddressInputRequired","streetAddressInputPlaceholder","streetAddressInputHelpertext","streetNumberInputName","streetNumberInputRequired","streetNumberInputPlaceholder","streetNumberInputHelpertext"],"sources":["src/components/input/pn-address-autofill/pn-address-autofill.scss?tag=pn-address-autofill","src/components/input/pn-address-autofill/pn-address-autofill.tsx"],"sourcesContent":["@import '../../../globals/main.scss';\n\npn-address-autofill {\n pn-marketweb-input {\n width: 50%;\n }\n\n .input-container-row {\n display: flex;\n //flex-grow: 1;\n gap: 1rem;\n margin-bottom: 1rem;\n }\n\n .label-container {\n color: $gray700;\n font-size: 0.875em;\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n }\n\n .autocomplete-items {\n position: absolute;\n border-radius: 0.8rem;\n border: 0.1rem solid $gray700;\n width: 100%;\n max-height: 30rem;\n overflow-y: auto;\n\n &:hover,\n :focus {\n border: 0.1rem solid $blue400;\n }\n\n div {\n padding: 1.6rem;\n cursor: pointer;\n background-color: #fff;\n border: 0.1rem solid transparent;\n\n &:first-child {\n border-radius: 0.8rem 0.8rem 0 0;\n }\n\n &:last-child {\n border-radius: 0 0 0.8rem 0.8rem;\n }\n\n &:hover {\n background-color: #e0f8ff;\n }\n }\n\n .autocomplete-active {\n background-color: #e0f8ff;\n }\n }\n}\n","import { Component, Prop, h, Element, State, Host, EventEmitter, Event } from '@stencil/core';\nimport { MarketWebContextService } from '../../../globals/MarketWebContextService';\nimport { FetchHelper } from '../../../globals/FetchHelper';\nimport { Root, PostalCodeProps, CityProps, StreetAddressProps, StreetNumberProps } from './types';\nimport debounce from 'debounce';\n\n@Component({\n tag: 'pn-address-autofill',\n styleUrl: 'pn-address-autofill.scss',\n})\nexport class PnAddressAutofill {\n @Element() hostElement: Element;\n pnInputPostalCode: HTMLElement = null;\n pnInputCity: HTMLElement = null;\n pnInputStreetAddress: HTMLElement = null;\n pnInputStreetNumber: HTMLElement = null;\n postalCodeInputField: HTMLInputElement = null;\n streetAddressInputField: HTMLInputElement = null;\n streetNumberInputField: HTMLInputElement = null;\n pnInputHiddenValue: HTMLElement = null;\n endpointPath = '/api/location/get-by-location';\n private _postalCodeProps: PostalCodeProps = null;\n private _cityProps: CityProps = null;\n private _streetAddressProps: StreetAddressProps = null;\n private _streetNumberProps: StreetNumberProps = null;\n\n /** Specifies which market we want to show (se,dk,fi,no,com) */\n @Prop({ mutable: true, reflect: true }) market: string = null; //se\n /** Specifies which environment we're fetching data from. (production, preproduction, integration, localhost) */\n @Prop({ mutable: true, reflect: true }) environment: string = null; //sv\n @Prop() endpoint: string = null;\n @Prop() cache: boolean = true;\n @Prop() countryCode: string = null;\n @Prop() postalCodeProps: string | PostalCodeProps = null;\n @Prop() cityProps: string | CityProps = null;\n @Prop() streetAddressProps: string | StreetAddressProps = null;\n @Prop() streetNumberProps: string | StreetNumberProps = null;\n\n @State() streetAdressArr: string[] = null;\n @State() streetNumberArr: string[] = null;\n @State() city: string = null;\n @State() postalCode: string = null;\n @State() streetAddress: string = null;\n @State() streetNumber: string = null;\n @State() fullAddress: string = null;\n\n @Event() addresscomplete: EventEmitter<string>;\n\n fetchHelper = new FetchHelper('PostalCodeCityAutofill');\n\n componentWillLoad() {\n this.setInitialValues();\n this._postalCodeProps = this.setProps(this.postalCodeProps);\n this._cityProps = this.setProps(this.cityProps);\n this._streetAddressProps = this.setProps(this.streetAddressProps);\n this._streetNumberProps = this.setProps(this.streetNumberProps);\n }\n\n setProps(props) {\n if (typeof props === 'string') {\n return JSON.parse(props);\n } else {\n return props;\n }\n }\n\n componentDidLoad() {\n this.postalCodeInputField = this.pnInputPostalCode.querySelector('input');\n this.streetAddressInputField = this.pnInputStreetAddress.querySelector('input');\n this.streetNumberInputField = this.pnInputStreetNumber.querySelector('input');\n this.addEventHandlers();\n }\n\n async setInitialValues(href = window.location.href) {\n const marketWebContextService = new MarketWebContextService(href);\n if (!this.environment) {\n this.environment = await marketWebContextService.getEnvironmentName();\n }\n\n if (!this.endpoint && this.environment?.indexOf('local') === -1) {\n this.endpoint = await marketWebContextService.getEndpoint(this.environment, this.market);\n }\n\n if (!this.endpoint) {\n this.endpoint = '';\n }\n }\n\n addEventHandlers() {\n const postalCodeSearch = debounce(this.fetchData.bind(this, this.postalCodeInputField), 1000);\n this.postalCodeInputField.addEventListener('keyup', postalCodeSearch);\n this.streetAddressInputField.addEventListener('keyup', this.handleStreetAddressDropdown.bind(this));\n this.streetNumberInputField.addEventListener('focus', this.handleStreetNumberDropdown.bind(this));\n this.addFormFieldEvent();\n }\n\n addFormFieldEvent() {\n const allInputs = this.hostElement.querySelectorAll('input');\n allInputs.forEach(element => {\n ['keyup', 'change'].forEach(eventName => {\n const debounceUpdate = debounce(this.updateHiddenValue.bind(this), 1000);\n element.addEventListener(eventName, debounceUpdate);\n });\n });\n }\n\n updateHiddenValue(e) {\n if (e.target === this.streetNumberInputField) {\n this.streetNumber = this.streetNumberInputField.value;\n }\n\n if (this.postalCode && this.city && this.streetAddress && this.streetNumber) {\n this.fullAddress = `${this.streetAddress} ${this.streetNumber}, ${this.city} ${this.postalCode}`;\n } else {\n this.fullAddress = '';\n }\n\n this.addresscomplete.emit(this.fullAddress);\n }\n\n async fetchData(field, e: KeyboardEvent) {\n if (e) {\n e.preventDefault();\n\n if (e.key === 'Tab') {\n if (this.city) {\n return;\n }\n }\n }\n\n let query = '';\n const isPostalCodeSearch = e && e.target === this.postalCodeInputField;\n const isStreetAddressSearch = field === this.streetAddressInputField && this.city && this.city.length;\n const isStreetNumberSearch = field === this.streetNumberInputField && this.city && this.city.length && this.streetAddress && this.streetAddress.length;\n\n if (isPostalCodeSearch) {\n query = this.postalCodeInputField.value;\n this.streetAdressArr = null;\n this.streetAddressInputField.value = '';\n this.streetNumberArr = null;\n this.streetNumberInputField.value = '';\n this.city = null;\n this.streetAddress = null;\n this.streetNumber = null;\n }\n if (isStreetAddressSearch) {\n query = `${this.streetAddressInputField.value}, ${this.city}`;\n this.streetNumberArr = null;\n this.streetNumberInputField.value = '';\n this.streetNumber = null;\n }\n if (isStreetNumberSearch) {\n this.streetAdressArr = null;\n query = `${this.streetAddress}, ${this.city}`;\n }\n\n if (query.length > 0) {\n const endpointBase = this.endpoint.lastIndexOf('/') === this.endpoint.length - 1 ? this.endpoint.substring(0, this.endpoint.length - 1) : this.endpoint;\n const fetchUrl = `${endpointBase}${this.endpointPath}?countryCode=${this.countryCode}&query=${query}&maxHits=1000`;\n const data = (await this.fetchHelper.fetchJson(\n fetchUrl,\n {\n mode: 'cors',\n },\n this.cache,\n )) as Root;\n\n if (data) {\n if (isPostalCodeSearch) {\n this.city = data.postalCodes ? data.postalCodes[0]?.postalCity : null;\n }\n\n if (isStreetAddressSearch && data.addresses) {\n this.postalCode = this.postalCodeInputField.value;\n this.filterStreetNames(data);\n }\n\n if (isStreetNumberSearch && data.addresses) {\n this.filterStreetNumbers(data);\n }\n }\n }\n }\n\n filterStreetNames = (data: Root) => {\n const addresses: string[] = [];\n this.streetAdressArr = null;\n data.addresses.forEach(item => {\n if (item.postalCode.postalCity === this.city && !addresses.includes(item.street)) {\n addresses.push(item.street);\n }\n });\n this.streetAdressArr = addresses;\n };\n\n filterStreetNumbers = (data: Root) => {\n const streetNumbersResult: string[] = [];\n data.addresses.forEach(item => {\n if (item.postalCode.postalCode === this.postalCode) {\n const { numberFrom, numberTo } = item;\n const from = parseInt(numberFrom);\n const to = parseInt(numberTo);\n\n for (let i = from; i <= to; i++) {\n const nrString = i.toString();\n if (!streetNumbersResult.includes(nrString)) {\n streetNumbersResult.push(i.toString());\n }\n }\n }\n });\n this.streetNumberArr = streetNumbersResult;\n };\n\n async handleStreetAddressDropdown(e) {\n const target = e.target;\n\n if (target === this.streetAddressInputField && target.value.length) {\n if (!this.streetAdressArr || !this.streetAdressArr.length) {\n await this.fetchData(this.streetAddressInputField, null);\n }\n }\n\n if (!target.value || !target.value.length) {\n this.streetAdressArr = null;\n }\n\n if (this.streetAdressArr && this.streetAdressArr.length) {\n this.autoComplete(e, this.streetAdressArr);\n }\n }\n\n async handleStreetNumberDropdown(e) {\n e.preventDefault();\n const target = e.target;\n\n if (target === this.streetNumberInputField) {\n if (!this.streetNumberArr || !this.streetNumberArr.length) {\n await this.fetchData(this.streetNumberInputField, null);\n }\n if (this.streetNumberArr) {\n this.autoComplete(e, this.streetNumberArr);\n }\n }\n }\n\n autoComplete(e, arr: string[]) {\n const inputField = e.target;\n if (arr.length < 1) {\n return;\n }\n\n let currentFocus = 0;\n\n inputField.addEventListener('input', () => {\n const val = inputField.value;\n this.closeAllLists(inputField);\n\n if (!val) {\n return;\n }\n\n currentFocus = -1;\n let list = document.createElement('div');\n list.setAttribute('id', 'autocomplete-list' + inputField.name);\n list.setAttribute('class', 'autocomplete-items');\n inputField.parentElement.appendChild(list);\n for (let i = 0; i < arr.length; i++) {\n if (arr[i].substring(0, val.length).toUpperCase() == val.toUpperCase()) {\n let option = document.createElement('div');\n option.innerHTML = '<strong>' + arr[i].substring(0, val.length) + '</strong>';\n option.innerHTML += arr[i].substring(val.length);\n option.innerHTML += \"<input type='hidden' value='\" + arr[i] + \"'>\";\n option.addEventListener('click', clickEvent => {\n const inputParrent = inputField.closest('pn-marketweb-input');\n let eventTarget = clickEvent.target as HTMLElement;\n if (eventTarget.nodeName === 'STRONG') {\n eventTarget = eventTarget.parentElement;\n }\n inputParrent.value = eventTarget.getElementsByTagName('input')[0].value;\n\n if (inputField === this.streetNumberInputField) {\n this.streetNumber = inputParrent.value;\n }\n if (inputField === this.streetAddressInputField) {\n this.streetAddress = inputParrent.value;\n }\n\n this.closeAllLists(clickEvent.target);\n inputField.focus();\n });\n\n list.appendChild(option);\n }\n }\n });\n\n inputField.addEventListener('keydown', keydownEvent => {\n const listElement = document.getElementById('autocomplete-list' + inputField.name);\n let element;\n if (listElement) {\n element = listElement.getElementsByTagName('div');\n } else {\n element = listElement;\n }\n\n //If arrow DOWN key is pressed\n if (keydownEvent.keyCode == 40) {\n currentFocus++;\n this.addActive(element, currentFocus);\n }\n\n //If the arrow UP key is pressed\n if (keydownEvent.keyCode == 38) {\n currentFocus--;\n this.addActive(element, currentFocus);\n }\n\n //If the ENTER key is pressed\n if (keydownEvent.keyCode == 13) {\n keydownEvent.preventDefault();\n if (currentFocus > -1) {\n if (element) {\n element[currentFocus].click();\n }\n }\n }\n });\n }\n\n //close all autocomplete lists in the document, except the one passed as an argument:\n closeAllLists(elmnt) {\n const lists = document.getElementsByClassName('autocomplete-items');\n for (let i = 0; i < lists.length; i++) {\n if (elmnt != lists[i]) {\n lists[i].parentNode.removeChild(lists[i]);\n }\n }\n }\n\n //a function to classify an item as \"active\":\n addActive(elmnt, currentFocus) {\n if (!elmnt) return;\n this.removeActive(elmnt);\n if (currentFocus >= elmnt.length) currentFocus = 0;\n if (currentFocus < 0) currentFocus = elmnt.length - 1;\n elmnt[currentFocus].classList.add('autocomplete-active');\n }\n\n //a function to remove the \"active\" class from all autocomplete items:\n removeActive(elmnt) {\n for (let i = 0; i < elmnt.length; i++) {\n elmnt[i].classList.remove('autocomplete-active');\n }\n }\n\n render() {\n return (\n <Host class=\"pn-address-autofill\">\n {this._postalCodeProps?.postalCodeCityLabel ? (\n <div class=\"label-container\">\n <label>{`${this._postalCodeProps.postalCodeCityLabel}`}</label>\n </div>\n ) : null}\n <div class=\"input-container-row\">\n <pn-marketweb-input\n type=\"text\"\n name={this._postalCodeProps?.postalCodeInputName}\n required={this._postalCodeProps?.postalCodeInputRequired}\n placeholder={this._postalCodeProps?.postalCodeInputPlaceholder}\n ref={el => (this.pnInputPostalCode = el as HTMLElement)}\n autocomplete=\"off\"\n helpertext={this._postalCodeProps?.postalCodeInputHelpertext}\n ></pn-marketweb-input>\n\n <pn-marketweb-input\n type=\"text\"\n name={this._cityProps?.cityInputName}\n disabled\n value={this.city}\n placeholder={this._cityProps?.cityInputPlaceholder}\n autocomplete=\"off\"\n helpertext={this._cityProps?.cityInputHelpertext}\n ></pn-marketweb-input>\n </div>\n\n {this._streetAddressProps?.streetAddressNumberLabel ? (\n <div class=\"label-container\">\n <label>{`${this._streetAddressProps.streetAddressNumberLabel}`}</label>\n </div>\n ) : null}\n <div class=\"input-container-row\">\n <pn-marketweb-input\n type=\"text\"\n name={this._streetAddressProps?.streetAddressInputName}\n required={this._streetAddressProps?.streetAddressInputRequired}\n value={this.streetAddress}\n placeholder={this._streetAddressProps?.streetAddressInputPlaceholder}\n ref={el => (this.pnInputStreetAddress = el as HTMLElement)}\n autocomplete=\"off\"\n helpertext={this._streetAddressProps?.streetAddressInputHelpertext}\n ></pn-marketweb-input>\n\n <pn-marketweb-input\n type=\"text\"\n name={this._streetNumberProps?.streetNumberInputName}\n required={this._streetNumberProps?.streetNumberInputRequired}\n value={this.streetNumber}\n placeholder={this._streetNumberProps?.streetNumberInputPlaceholder}\n ref={el => (this.pnInputStreetNumber = el as HTMLElement)}\n autocomplete=\"off\"\n helpertext={this._streetNumberProps?.streetNumberInputHelpertext}\n ></pn-marketweb-input>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"+IAAA,MAAMA,EAAuB,0jCAC7B,MAAAC,EAAeD,E,MCSFE,EAAiB,M,sFAiB6B,K,iBAEK,K,cACnC,K,WACF,K,iBACK,K,qBACsB,K,eACZ,K,wBACkB,K,uBACF,K,qBAEnB,K,qBACA,K,UACb,K,gBACM,K,mBACG,K,kBACD,K,iBACD,I,kCAhC/BC,kBAAiC,KACjCC,YAA2B,KAC3BC,qBAAoC,KACpCC,oBAAmC,KACnCC,qBAAyC,KACzCC,wBAA4C,KAC5CC,uBAA2C,KAC3CC,mBAAkC,KAClCC,aAAe,gCACPC,iBAAoC,KACpCC,WAAwB,KACxBC,oBAA0C,KAC1CC,mBAAwC,KAsBvCC,gBAETC,YAAc,IAAIC,EAAY,0BAE9B,iBAAAC,GACEC,KAAKC,mBACLD,KAAKR,iBAAmBQ,KAAKE,SAASF,KAAKG,iBAC3CH,KAAKP,WAAaO,KAAKE,SAASF,KAAKI,WACrCJ,KAAKN,oBAAsBM,KAAKE,SAASF,KAAKK,oBAC9CL,KAAKL,mBAAqBK,KAAKE,SAASF,KAAKM,kB,CAG/C,QAAAJ,CAASK,GACP,UAAWA,IAAU,SAAU,CAC7B,OAAOC,KAAKC,MAAMF,E,KACb,CACL,OAAOA,C,EAIX,gBAAAG,GACEV,KAAKb,qBAAuBa,KAAKjB,kBAAkB4B,cAAc,SACjEX,KAAKZ,wBAA0BY,KAAKf,qBAAqB0B,cAAc,SACvEX,KAAKX,uBAAyBW,KAAKd,oBAAoByB,cAAc,SACrEX,KAAKY,kB,CAGP,sBAAMX,CAAiBY,EAAOC,OAAOC,SAASF,MAC5C,MAAMG,EAA0B,IAAIC,EAAwBJ,GA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/BlB,SAAUnI,KAAKL,oBAAoB2J,0BACnC3G,MAAO3C,KAAK0C,aACZ2F,YAAarI,KAAKL,oBAAoB4J,6BACtChB,IAAKC,GAAOxI,KAAKd,oBAAsBsJ,EACvCC,aAAa,MACbC,WAAY1I,KAAKL,oBAAoB6J,+B","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{p as e,H as t,b as a}from"./p-06555615.js";export{s as setNonce}from"./p-06555615.js";import{g as n}from"./p-e1255160.js";var o=()=>{{r(t.prototype)}const a=import.meta.url;const n={};if(a!==""){n.resourcesUrl=new URL(".",a).href}return e(n)};var r=e=>{const t=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return t.call(this,e)}const a=t.call(this,false);const n=this.childNodes;if(e){for(let e=0;e<n.length;e++){if(n[e].nodeType!==2){a.appendChild(n[e].cloneNode(true))}}}return a}};o().then((async e=>{await n();return a(JSON.parse('[["p-b765e4a9",[[4,"pn-marketweb-siteheader",{"market":[1537],"language":[1537],"siteid":[1],"environment":[1537],"userToken":[1,"user-token"],"userFullname":[1,"user-fullname"],"userLoggedin":[516,"user-loggedin"],"endpoint":[1],"hideSiteSelector":[1540,"hide-site-selector"],"hideHomeMenuItem":[1540,"hide-home-menu-item"],"hideLanguageSelector":[1540,"hide-language-selector"],"hideSearch":[1540,"hide-search"],"hideLogin":[1540,"hide-login"],"showProfileSelection":[1540,"show-profile-selection"],"showUnifiedLogin":[4,"show-unified-login"],"siteDomainInUrls":[4,"site-domain-in-urls"],"AutocompleteEndpoint":[1,"autocomplete-endpoint"],"sessionForward":[4,"session-forward"],"cache":[4],"searchPlaceholder":[1,"search-placeholder"],"spaMode":[4,"spa-mode"],"checkUserLoggedInStateInterval":[2,"check-user-logged-in-state-interval"],"pageId":[1,"page-id"],"i18n":[32],"gotData":[32],"fetchingData":[32],"homePageLink":[32],"menuItems":[32],"siteDefinition":[32],"search":[32],"siteSelector":[32],"languageSelector":[32],"languageOptions":[32],"loginDialog":[32],"minimizeSearch":[32],"loggedIn":[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]],{"language":["onLanguageChange"],"market":["onMarketChange"]}]]],["p-63505736",[[0,"pn-proxio-findprice",{"endpoint":[1025],"language":[1025],"market":[1025],"showMedium":[4,"show-medium"],"showInternational":[4,"show-international"],"maxAbroadKg":[2,"max-abroad-kg"],"weightListName":[1,"weight-list-name"],"cache":[4],"filteredItems":[32],"weight":[32],"weightvalue":[32],"countrycodevalue":[32],"sizecategory":[32],"data":[32]},null,{"market":["setState"],"language":["setState"],"sizecategory":["filterItems"],"weightvalue":["filterItems"],"countrycodevalue":["filterItems"]}]]],["p-4372d10e",[[0,"pn-find-price",{"source":[1],"language":[1025],"market":[1025],"filteredItems":[32],"weight":[32],"weightvalue":[32],"sourceData":[32],"sizecategory":[32]},null,{"market":["setState"],"language":["setState"],"sizecategory":["filterItems"],"weightvalue":["filterItems"]}]]],["p-796ebfee",[[0,"pn-find-service-and-price",{"source":[1],"language":[1025],"market":[1025],"filteredItems":[32],"postagetype":[32],"weight":[32],"weightvalue":[32],"deliveryscope":[32],"sourceData":[32]},null,{"market":["setState"],"language":["setState"],"postagetype":["filterItems"],"deliveryscope":["filterItems"],"weightvalue":["filterItems"]}]]],["p-721598b8",[[4,"pn-product-pricelist",{"source":[1],"language":[1025],"market":[1025],"productid":[1],"filteredItems":[32],"sourceData":[32],"gotData":[32],"loading":[32],"postagetype":[32],"weight":[32],"weightvalue":[32]},null,{"market":["setState"],"language":["setState"],"postagetype":["filterItems"],"weightvalue":["filterItems"]}]]],["p-7b05d7c7",[[0,"pn-proxio-pricegroup",{"endpoint":[1025],"language":[1],"market":[1],"tariffid":[1],"cache":[4],"activeWeightIndex":[32],"data":[32],"i18n":[32]},[[0,"activeWeightIndex","setActiveWeightIndex"],[0,"language","setLanguage"]]]]],["p-f0568315",[[0,"pn-product-pricelist-result",{"item":[1040],"description":[16],"shownitems":[16],"showMeasurement":[4,"show-measurement"],"weightText":[32]},null,{"item":["composeItems"]}]]],["p-e5345c69",[[4,"pn-marketweb-sitefooter",{"market":[1537],"language":[1537],"environment":[1537],"endpoint":[1],"siteDomainInUrls":[4,"site-domain-in-urls"],"cache":[4],"theme":[513],"backgroundcolor":[513],"showSwan":[4,"show-swan"],"siteDefinition":[32],"footerContent":[32],"i18n":[32],"gotData":[32],"fetchingData":[32]},null,{"language":["onLanguageChange"],"market":["onMarketChange"]}]]],["p-42c9386d",[[4,"pn-media-block",{"blockHeight":[1,"block-height"],"imageSrc":[1,"image-src"],"imageSrcSmallScreenFormat":[1,"image-src-small-screen-format"],"imageAltText":[1,"image-alt-text"],"videoSrc":[1,"video-src"],"parallaxScroll":[4,"parallax-scroll"],"showOverlayLayer":[4,"show-overlay-layer"],"customOverlayBackground":[1,"custom-overlay-background"],"animateOverlayBackground":[4,"animate-overlay-background"],"scrollSnapBlock":[4,"scroll-snap-block"],"fixedBackground":[4,"fixed-background"],"blockHeading":[1,"block-heading"],"blockHeadingLevel":[2,"block-heading-level"],"blockPreamble":[1,"block-preamble"],"pnPlayOnScrollObserverOptions":[32],"calculatedBlockHeight":[32],"hasButtonSlot":[32]}]]],["p-5ac23b38",[[0,"pn-multi-row-connected-dropdown",{"dropdownData":[1,"dropdown-data"],"languageCode":[1,"language-code"],"label":[1],"firstDropdownLabel":[1,"first-dropdown-label"],"secondDropdownLabel":[1,"second-dropdown-label"],"dropdownPlaceholder":[1,"dropdown-placeholder"],"addRowText":[1,"add-row-text"],"inputFildLabel":[1,"input-fild-label"],"inputFildPlaceholder":[1,"input-fild-placeholder"],"dateButtonText":[1,"date-button-text"],"datePlaceholder":[1,"date-placeholder"],"dateDaysFromToday":[2,"date-days-from-today"],"allowMultipleRows":[4,"allow-multiple-rows"],"allowMultipleDates":[4,"allow-multiple-dates"],"startDateLabel":[1,"start-date-label"],"endDateLabel":[1,"end-date-label"],"multiDateHelperText":[1,"multi-date-helper-text"],"generateDatesButtonText":[1,"generate-dates-button-text"],"saveDateButtonText":[1,"save-date-button-text"],"noDatesText":[1,"no-dates-text"],"yearsToAddToEndDate":[2,"years-to-add-to-end-date"],"rowCount":[32],"rowData":[32],"formValues":[32]},[[0,"rowValueChange","predefinedValueChange"],[0,"deleteRowEvent","deleteRowEvent"]]]]],["p-781ef432",[[0,"pn-dropdown-with-multi-input-rows",{"dropdownData":[1,"dropdown-data"],"languageCode":[1,"language-code"],"firstDropdownLabel":[1,"first-dropdown-label"],"firstDropdownHelperText":[1,"first-dropdown-helper-text"],"secondDropdownLabel":[1,"second-dropdown-label"],"secondDropdownHelperText":[1,"second-dropdown-helper-text"],"secondDropdownMax":[2,"second-dropdown-max"],"deleteMultipleRowsWarningText":[1,"delete-multiple-rows-warning-text"],"confirmDeleteButtonText":[1,"confirm-delete-button-text"],"abortDeleteButtonText":[1,"abort-delete-button-text"],"fristInputLabel":[1,"frist-input-label"],"fristInputPlaceholder":[1,"frist-input-placeholder"],"firstInputMin":[2,"first-input-min"],"firstInputMax":[2,"first-input-max"],"firstInputWarning":[2,"first-input-warning"],"firstInputWarningText":[1,"first-input-warning-text"],"firstInputLowErrorText":[1,"first-input-low-error-text"],"firstInputHighErrorText":[1,"first-input-high-error-text"],"secondInputLabel":[1,"second-input-label"],"secondInputPlaceholder":[1,"second-input-placeholder"],"secondInputMin":[2,"second-input-min"],"secondInputMax":[2,"second-input-max"],"secondInputWarning":[2,"second-input-warning"],"secondInputWarningText":[1,"second-input-warning-text"],"secondInputLowErrorText":[1,"second-input-low-error-text"],"secondInputHighErrorText":[1,"second-input-high-error-text"],"dateLabel":[1,"date-label"],"datePlaceholder":[1,"date-placeholder"],"dateDaysFromToday":[2,"date-days-from-today"],"yearsToAddToEndDate":[2,"years-to-add-to-end-date"],"sumFieldLabel":[1,"sum-field-label"],"addRowText":[1,"add-row-text"],"elementHelperText":[1,"element-helper-text"],"dropdownDataRoot":[32],"secondDropdownArr":[32],"rowCount":[32],"rowData":[32],"formValues":[32],"firstValidDateString":[32],"lastValidDateString":[32],"rowSum":[32],"minRowCount":[32],"showDelteConfirm":[32]},[[0,"rowValueChange","predefinedValueChange"],[0,"firstInputChange","predefinedValueChange"],[0,"secondInputChange","predefinedValueChange"],[0,"deleteRowEvent","deleteRowEvent"]]]]],["p-acbe60df",[[0,"pn-address-autofill",{"market":[1537],"environment":[1537],"endpoint":[1],"cache":[4],"countryCode":[1,"country-code"],"postalCodeProps":[1,"postal-code-props"],"cityProps":[1,"city-props"],"streetAddressProps":[1,"street-address-props"],"streetNumberProps":[1,"street-number-props"],"streetAdressArr":[32],"streetNumberArr":[32],"city":[32],"postalCode":[32],"streetAddress":[32],"streetNumber":[32],"fullAddress":[32]}]]],["p-e9501c6f",[[4,"pn-dropdown-choice-adds-row",{"dropdownData":[1,"dropdown-data"],"languageCode":[1,"language-code"],"addRowDropdownName":[1,"add-row-dropdown-name"],"addRowDropdownPlaceholder":[1,"add-row-dropdown-placeholder"],"addRowDropdownLabel":[1,"add-row-dropdown-label"],"rowNameLabel":[1,"row-name-label"],"rowHasDropdown":[4,"row-has-dropdown"],"rowDropdownLabel":[1,"row-dropdown-label"],"rowDropdownPlaceholder":[1,"row-dropdown-placeholder"],"rowInputLabel":[1,"row-input-label"],"rowDeleteButtonText":[1,"row-delete-button-text"],"totalInputLimit":[2,"total-input-limit"],"inputLimitWarning":[1,"input-limit-warning"],"nextRowIndex":[32],"rowSelectDropdownArr":[32],"columnCount":[32],"showWarning":[32],"formValue":[32]},null,{"dropdownData":["dropdownDataWatcher"]}]]],["p-391970af",[[0,"pn-multiple-input",{"label":[1],"placeholder":[1],"addRowButtonText":[1,"add-row-button-text"],"rowData":[32]}]]],["p-ebaeee5e",[[0,"pn-parcel-tracker",{"formActionUrl":[1,"form-action-url"],"heading":[1],"buttonLabel":[1,"button-label"],"locale":[1],"placeholder":[1],"inputName":[1,"input-name"],"currentWidth":[32]},[[9,"resize","handleViewportSizeChange"]]]]],["p-95c10b7e",[[0,"pn-pex-pricefinder",{"language":[1],"currency":[1],"apiUrl":[1,"api-url"],"i18n":[32],"fromzip":[32],"tozip":[32],"weight":[32],"when":[32],"response":[32]},[[0,"language","setLanguage"]]]]],["p-40538914",[[0,"pn-share",{"link":[1],"language":[1537],"i18n":[32]},null,{"language":["onLanguageChange"]}]]],["p-34689c97",[[4,"pn-stats-info",{"heading":[1],"dataArray":[1,"data-array"],"backgroundUrl":[1,"background-url"],"myParsedArray":[32]},null,{"dataArray":["parseMyArrayProp"]}]]],["p-68aa55f7",[[4,"pn-animated-tile",{"toggled":[32],"transitionClassName":[32],"animateIcon":[32]},null,{"toggled":["onToggledHandler"]}]]],["p-586a1e3c",[[0,"pn-app-banner",{"appName":[1,"app-name"],"appDescription":[1,"app-description"],"ctaText":[1,"cta-text"],"appleStoreLink":[1,"apple-store-link"],"googleStoreLink":[1,"google-store-link"],"isClosed":[32],"storeLink":[32],"isLocalStorageAvailable":[32]}]]],["p-16f70311",[[4,"pn-bonus-progressbar",{"icon":[1],"heading":[1],"sumtext":[513],"theme":[513],"bonuspercentage":[1],"currency":[513],"value":[1538],"min":[1538],"max":[1538],"valuepercentage":[32],"progresspercentage":[32],"levelValues":[32],"currentLevelAdjustedValue":[32]},null,{"currentLevelAdjustedValue":["setValuePercentage"],"value":["setValuePercentage"],"min":["setValuePercentage"],"max":["setValuePercentage"]}]]],["p-a8220c88",[[0,"pn-bonus-progressbar-level",{"current":[516],"value":[1538],"bonuspercentage":[1537],"visualpercentage":[1538],"percentage":[32],"max":[32],"min":[32],"currency":[32]}]]],["p-56bd346e",[[0,"pn-breakpoints",{"breakPointClass":[1,"break-point-class"],"currentWidth":[32]},[[9,"resize","handleViewportSizeChange"]]]]],["p-1317587f",[[0,"pn-chart",{"labels":[1],"dataSets":[1,"data-sets"],"dataChartType":[8,"data-chart-type"],"myChartCtxRef":[32]},null,{"dataSets":["dataChangeHandler"],"labels":["labelsChangeHandler"]}]]],["p-190c671b",[[4,"pn-charts-card",{"header":[1],"highlight":[1],"preamble":[1],"label":[1],"source":[1],"sourceUrl":[1,"source-url"],"ctaLinkText":[1,"cta-link-text"],"openInNewWindow":[4,"open-in-new-window"]}]]],["p-69a56d5c",[[4,"pn-cta-block",{"heading":[1],"bodyText":[1,"body-text"],"pnBackgroundColor":[1,"pn-background-color"],"isLarge":[4,"is-large"],"isCentered":[4,"is-centered"],"isSmall":[4,"is-small"],"contentTop":[4,"content-top"]}]]],["p-95e054fd",[[4,"pn-customernumber-selector",{"language":[1537],"open":[1540],"heading":[1],"description":[1],"i18n":[32]}]]],["p-09b9cc06",[[4,"pn-customernumber-selector-option",{"heading":[1],"description":[1],"url":[1]}]]],["p-d8a57eba",[[0,"pn-date-and-time",{"languageCode":[1,"language-code"],"dateAndTimeLabel":[1,"date-and-time-label"],"dateDaysFromToday":[2,"date-days-from-today"],"validTimeRangeMinutes":[2,"valid-time-range-minutes"],"errorMessage":[1,"error-message"],"dateHelperText":[1,"date-helper-text"],"timeHelperText":[1,"time-helper-text"],"disableWeekends":[4,"disable-weekends"],"datePlacehodler":[1,"date-placehodler"],"language":[32],"hourArr":[32],"minuteArr":[32],"formValue":[32],"invalidTimespan":[32],"selectedDate":[32],"selectedFromHour":[32],"selectedFromMin":[32],"selectedToHour":[32],"selectedToMin":[32],"firstValidDateString":[32],"lastValidDateString":[32]}]]],["p-fbe70284",[[4,"pn-hero-block-international",{"heading":[1],"subHeading":[1,"sub-heading"],"preamble":[1],"animateLogo":[4,"animate-logo"],"showSideLoader":[4,"show-side-loader"],"centeredLayout":[4,"centered-layout"]}]]],["p-e42f0fbe",[[0,"pn-line-shape"]]],["p-ade7ffcf",[[4,"pn-link-list",{"heading":[1],"label":[1],"preamble":[1],"url":[1],"showMoreLabel":[1,"show-more-label"],"showMoreUrl":[1,"show-more-url"]}]]],["p-c25acf85",[[0,"pn-marketweb-icon",{"symbol":[1],"small":[4],"color":[1]}]]],["p-2044eddc",[[1,"pn-marketweb-search",{"disabled":[4],"placeholder":[1],"inputid":[1],"name":[1],"autocomplete":[1],"list":[1],"value":[1],"label":[1],"loading":[4],"button":[1],"light":[4],"suggestionObserver":[32],"hasClonedInput":[32],"listSuggestion":[32]},[[0,"input","inputHandler"]]]]],["p-c0fd8e61",[[4,"pn-product-tile"]]],["p-90ba1d8e",[[4,"pn-profile-modal",{"heading":[1],"continueCtaText":[1,"continue-cta-text"],"choosenCompanyText":[1,"choosen-company-text"],"toText":[1,"to-text"],"chooseCustomerNumberText":[1,"choose-customer-number-text"],"isLoading":[32]},[[0,"urlSelected","onUrlSelected"]]]]],["p-c9f21ea3",[[4,"pn-profile-modal-customernumber",{"url":[513],"customernumber":[513],"selected":[516]}]]],["p-f62879f6",[[4,"pn-profile-modal-profile",{"heading":[513],"description":[513],"url":[513],"selected":[1028],"showCustomerNumbers":[516,"show-customer-numbers"],"pleaseSelectText":[513,"please-select-text"],"visible":[1540],"identifier":[32]}]]],["p-931d3a9b",[[4,"pn-profile-modal-type",{"typeid":[513],"name":[1025],"selected":[1028],"selectedprofile":[1025]},null,{"selected":["onSelectedChange"]}]]],["p-74203d3e",[[4,"pn-profile-selector",{"language":[1537],"returnUrl":[1,"return-url"],"heading":[1],"i18n":[32],"isLoading":[32],"numberOfProfiles":[32]}]]],["p-f2d0d0cc",[[0,"pn-profile-selector-option",{"heading":[1],"description":[1],"url":[1]}]]],["p-5a467ca6",[[4,"pn-quick-cta",{"heading":[1],"preamble":[1]}]]],["p-e4c7aaec",[[4,"pn-quote-card",{"quote":[1],"name":[1],"occupation":[1]}]]],["p-67d862ac",[[4,"pn-sidenav",{"language":[1],"navLabel":[1,"nav-label"],"i18n":[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["p-1535a09f",[[4,"pn-sidenav-level",{"level":[32],"levelId":[32],"isOpen":[32],"parentName":[32],"parentHref":[32],"parentLinkId":[32],"alignment":[32]},null,{"isOpen":["onOpen"]}]]],["p-6e9875e5",[[4,"pn-sidenav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"icon":[1],"current":[4],"levelId":[32],"open":[32],"hasChildren":[32]}]]],["p-7021985c",[[4,"pn-sidenav-togglebutton",{"label":[1],"i18n":[32]}]]],["p-0a522476",[[4,"pn-spotlight",{"heading":[1],"preamble":[1],"isDynamic":[4,"is-dynamic"],"addDynamic":[32]}]]],["p-73db2c9c",[[4,"pn-teaser-card",{"text":[1],"heading":[1],"label":[1],"dataCardColor":[513,"data-card-color"],"dataCardAlignment":[513,"data-card-alignment"],"hasCtaSlotContent":[32],"hasIllustrationSlot":[32]}]]],["p-69ee0033",[[4,"pn-usp-promoter",{"heading":[1],"headingExtension":[1,"heading-extension"],"bodyText":[1,"body-text"],"backgroundGradient":[1,"background-gradient"],"fullWidth":[4,"full-width"],"rightAlign":[4,"right-align"],"hideMobileImage":[4,"hide-mobile-image"]}]]],["p-9776a1c5",[[0,"pn-proxio-findprice-result",{"item":[1040],"activeweight":[1026],"shownitems":[16],"Usp1":[1,"usp-1"],"Usp2":[1,"usp-2"],"Usp3":[1,"usp-3"],"description":[16],"showMeasurement":[4,"show-measurement"],"showInternational":[4,"show-international"],"selectedCountrycode":[1,"selected-countrycode"],"market":[1],"language":[1025],"weightText":[32],"linkId":[32],"shopLabel":[32],"shopUrl":[32],"shopId":[32],"i18n":[32]},null,{"item":["composeItems"],"activeweight":["getPriceString","getProductLink"]}]]],["p-2f779414",[[0,"pn-find-service-and-price-result",{"item":[1040],"shownitems":[16],"weightText":[32]},null,{"item":["composeItems"]}]]],["p-85d57c9d",[[0,"pn-multi-row-connected-dropdown-row",{"dropdownData":[1,"dropdown-data"],"languageCode":[1,"language-code"],"label":[1],"firstDropdownLabel":[1,"first-dropdown-label"],"secondDropdownLabel":[1,"second-dropdown-label"],"dropdownPlaceholder":[1,"dropdown-placeholder"],"addRowText":[1,"add-row-text"],"inputFildLabel":[1,"input-fild-label"],"inputFildPlaceholder":[1,"input-fild-placeholder"],"dateButtonText":[1,"date-button-text"],"datePlaceholder":[1,"date-placeholder"],"dateDaysFromToday":[2,"date-days-from-today"],"allowMultipleDates":[4,"allow-multiple-dates"],"startDateLabel":[1,"start-date-label"],"endDateLabel":[1,"end-date-label"],"multiDateHelperText":[1,"multi-date-helper-text"],"generateDatesButtonText":[1,"generate-dates-button-text"],"saveDateButtonText":[1,"save-date-button-text"],"noDatesText":[1,"no-dates-text"],"index":[2],"predefinedValue":[1,"predefined-value"],"yearsToAddToEndDate":[2,"years-to-add-to-end-date"],"buttonsArray":[32],"firstDropdownArr":[32],"secondDropdownArr":[32],"firstDropdownClass":[32],"secondDropdownClass":[32],"firstValidDateString":[32],"lastValidDateString":[32],"firstDropdownPlaceholder":[32],"secondDropdownPlaceholder":[32],"starDateValue":[32],"endDateValue":[32],"generatedDatesArr":[32],"selectedButtonValue":[32],"inputFieldValue":[32],"dateValue":[32],"daysArr":[32]},null,{"predefinedValue":["applyPredefinedValue"]}]]],["p-c696bedf",[[0,"pn-play-on-scroll",{"videoSrc":[1,"video-src"],"observerOptions":[16],"showOverlay":[4,"show-overlay"],"videoId":[32],"isManuallyPaused":[32],"isPaused":[32]}]]],["p-d40ff187",[[0,"pn-dropdown-with-multi-input-rows-row",{"languageCode":[1,"language-code"],"fristInputPlaceholder":[1,"frist-input-placeholder"],"firstInputMin":[2,"first-input-min"],"firstInputMax":[2,"first-input-max"],"firstInputWarning":[2,"first-input-warning"],"firstInputWarningText":[1,"first-input-warning-text"],"firstInputLowErrorText":[1,"first-input-low-error-text"],"firstInputHighErrorText":[1,"first-input-high-error-text"],"secondInputPlaceholder":[1,"second-input-placeholder"],"secondInputMin":[2,"second-input-min"],"secondInputMax":[2,"second-input-max"],"secondInputWarning":[2,"second-input-warning"],"secondInputWarningText":[1,"second-input-warning-text"],"secondInputLowErrorText":[1,"second-input-low-error-text"],"secondInputHighErrorText":[1,"second-input-high-error-text"],"dateLabel":[1,"date-label"],"datePlaceholder":[1,"date-placeholder"],"firstValidDate":[1,"first-valid-date"],"lastValidDate":[1,"last-valid-date"],"predefinedValue":[1,"predefined-value"],"rowIndex":[2,"row-index"],"minRowCount":[2,"min-row-count"],"showFirstInputWarning":[32],"showFirstInputLowError":[32],"showFirstInputHighError":[32],"showSecondInputWarning":[32],"showSecondInputLowError":[32],"showSecondInputHighError":[32],"firstInputValue":[32],"secondInputValue":[32],"dateValue":[32]},null,{"predefinedValue":["applyPredefinedValue"]}]]],["p-81b3e038",[[4,"pn-share-item",{"link":[1],"text":[1]}]]],["p-1bd5fa26",[[0,"pn-stats-info-data",{"format":[1],"formatStyle":[1,"format-style"],"startValue":[2,"start-value"],"data":[2],"unit":[1],"preamble":[1],"duration":[2],"index":[2],"hasBeenShown":[32],"compId":[32]},null,{"hasBeenShown":["watchStateHandlder"]}]]],["p-7b598d81",[[0,"pn-find-price-result",{"item":[1040],"shownitems":[16],"Usp1":[1,"usp-1"],"Usp2":[1,"usp-2"],"Usp3":[1,"usp-3"],"description":[16],"showMeasurement":[4,"show-measurement"],"weightText":[32],"linkId":[32],"shopLabel":[32],"shopUrl":[32],"shopId":[32]},null,{"item":["composeItems"]}]]],["p-370829c6",[[1,"pn-filter-checkbox",{"value":[520],"name":[1],"checkboxid":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["p-c224d7c4",[[4,"pn-mainnav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"levelId":[32],"open":[32],"hasChildren":[32]}]]],["p-78fbc88c",[[4,"pn-site-footer",{"url":[1],"linktitle":[1],"theme":[513]}],[4,"pn-site-footer-col",{"theme":[513]}],[0,"pn-swan",{"licenseNumber":[1,"license-number"],"language":[1537],"linkTo":[1,"link-to"],"i18n":[32]},null,{"language":["onLanguageChange"]}]]],["p-9be27d72",[[4,"pn-choice-button",{"value":[520],"name":[1],"choiceid":[1],"type":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["p-1217d60f",[[0,"pn-product-tile-info",{"label":[1],"text":[1],"icon":[1]}],[0,"pn-product-tile-price",{"label":[1],"amount":[1],"currency":[1],"url":[1]}]]],["p-828449da",[[4,"pn-scroll",{"observerOptions":[16],"behaviourClasses":[1,"behaviour-classes"],"transitionDurationSeconds":[2,"transition-duration-seconds"],"shouldLoop":[4,"should-loop"],"intersectFunc":[16],"notIntersectFunc":[16],"compId":[32]}],[0,"pn-video-overlay",{"language":[1],"isPaused":[4,"is-paused"],"showOverlay":[4,"show-overlay"],"i18n":[32]},null,{"language":["onLanguageChange"]}]]],["p-b2dcce7c",[[0,"pn-marketweb-siteheader-login-linklist",{"heading":[1],"links":[16],"idNamespace":[1,"id-namespace"],"showUnifiedLogin":[4,"show-unified-login"]}]]],["p-1578e02e",[[4,"pn-titletag",{"icon":[1],"color":[1537]}]]],["p-9998c29d",[[0,"pn-marketweb-input",{"disabled":[4],"error":[1],"invalid":[4],"helpertext":[1],"label":[1],"placeholder":[1],"inputid":[1],"name":[1],"required":[4],"type":[1025],"autocomplete":[1],"valid":[4],"value":[1],"maxlength":[1],"min":[1],"max":[1],"step":[1],"pattern":[1],"showText":[32]}]]],["p-9a7abcee",[[0,"pn-marketweb-siteheader-unified-login",{"loggedIn":[4,"logged-in"],"myPageLabel":[1,"my-page-label"],"myPageUrl":[1,"my-page-url"],"logInLabel":[1,"log-in-label"]}],[0,"pn-marketweb-siteheader-login-links",{"loginDialog":[1040],"idNamespace":[1,"id-namespace"],"loggedin":[516],"username":[1],"showUnifiedLogin":[4,"show-unified-login"]},null,{"loginDialog":["init"]}],[0,"pn-marketweb-siteheader-login-profileselection",{"loginDialog":[1040],"endpoint":[1],"loggedin":[4],"idNamespace":[1,"id-namespace"],"heading":[1],"i18n":[16],"currentProfile":[1040],"profileoptions":[1040],"user":[32],"logoutLink":[32],"userName":[32],"userEmail":[32]}],[0,"pn-marketweb-siteheader-login-button",{"label":[1]}],[0,"pn-marketweb-siteheader-login-mypage-button",{"label":[1],"myPageUrl":[1,"my-page-url"]}]]],["p-4ea1409d",[[0,"pn-marketweb-siteheader-login",{"endpoint":[1],"token":[1],"i18n":[16],"siteUrl":[1,"site-url"],"emitEvents":[4,"emit-events"],"loginDialog":[1040],"fullname":[1],"loggedin":[4],"showProfileSelection":[1028,"show-profile-selection"],"showUnifiedLogin":[4,"show-unified-login"],"checkUserLoggedInStateInterval":[2,"check-user-logged-in-state-interval"],"environment":[1],"loginLinks":[32],"toggleButtonText":[32],"username":[32]},null,{"i18n":["init"],"loginDialog":["init"]}],[4,"pn-mainnav-level",{"label":[1537],"level":[32],"levelId":[32],"isOpen":[32],"parentName":[32],"parentHref":[32],"parentLinkId":[32],"listCount":[32],"alignment":[32]},null,{"label":["setState"],"isOpen":["onOpen"]}],[4,"pn-language-selector",{"value":[1537],"selectedLanguageName":[32],"options":[32],"i18n":[32]},null,{"value":["setSelectedLanguageName","setTranslations","onValueChange"]}],[0,"pn-language-selector-option",{"name":[1],"code":[1],"url":[1],"selected":[4],"currentLanguage":[1,"current-language"]}],[4,"pn-mainnav",{"market":[1],"language":[1],"navigationId":[1,"navigation-id"],"openMenu":[1028,"open-menu"],"navLabel":[1,"nav-label"]},[[0,"language","setLanguage"],[0,"market","setMarket"],[0,"menuLanguageChange","onLanguageChange"],[0,"setmenuopenstate","setMenuOpenState"],[0,"openMenuLevelChange","onOpenMenuLevelChange"]]],[4,"pn-mainnav-list",{"heading":[1],"linkCount":[32]}],[0,"pn-marketweb-siteheader-search",{"i18n":[8,"i-1-8n"],"showOnlyLink":[1028,"show-only-link"],"hideSearch":[1028,"hide-search"],"language":[1537],"siteid":[1],"search":[1040],"primary":[4],"icononly":[4],"autoCompleteOptions":[32]}],[4,"pn-site-selector",{"buttontext":[1537],"heading":[1537],"language":[1537],"i18n":[32]}],[0,"pn-site-selector-item",{"url":[1],"heading":[1],"description":[1],"newwindow":[4]}]]],["p-75a09bb2",[[4,"pn-proxio-productcard"],[0,"pn-proxio-productcard-description",{"heading":[1],"highlight":[1],"description":[1],"list":[1040]}],[0,"pn-proxio-productcard-information",{"label":[1],"information":[16]}],[0,"pn-proxio-productcard-pricelink",{"price":[1],"vatText":[1,"vat-text"],"link":[1],"linktext":[1]}]]],["p-609da67c",[[0,"pn-product-card-info",{"rulle":[1],"paket":[1],"label":[1],"text":[1]}],[0,"pn-product-card-price",{"label":[1],"amount":[1],"currency":[1],"note":[1],"url":[1],"service":[1],"linkid":[1]}],[4,"pn-product-card"]]]]'),e)}));
1
+ import{p as e,H as t,b as a}from"./p-06555615.js";export{s as setNonce}from"./p-06555615.js";import{g as n}from"./p-e1255160.js";var o=()=>{{r(t.prototype)}const a=import.meta.url;const n={};if(a!==""){n.resourcesUrl=new URL(".",a).href}return e(n)};var r=e=>{const t=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return t.call(this,e)}const a=t.call(this,false);const n=this.childNodes;if(e){for(let e=0;e<n.length;e++){if(n[e].nodeType!==2){a.appendChild(n[e].cloneNode(true))}}}return a}};o().then((async e=>{await n();return a(JSON.parse('[["p-b765e4a9",[[4,"pn-marketweb-siteheader",{"market":[1537],"language":[1537],"siteid":[1],"environment":[1537],"userToken":[1,"user-token"],"userFullname":[1,"user-fullname"],"userLoggedin":[516,"user-loggedin"],"endpoint":[1],"hideSiteSelector":[1540,"hide-site-selector"],"hideHomeMenuItem":[1540,"hide-home-menu-item"],"hideLanguageSelector":[1540,"hide-language-selector"],"hideSearch":[1540,"hide-search"],"hideLogin":[1540,"hide-login"],"showProfileSelection":[1540,"show-profile-selection"],"showUnifiedLogin":[4,"show-unified-login"],"siteDomainInUrls":[4,"site-domain-in-urls"],"AutocompleteEndpoint":[1,"autocomplete-endpoint"],"sessionForward":[4,"session-forward"],"cache":[4],"searchPlaceholder":[1,"search-placeholder"],"spaMode":[4,"spa-mode"],"checkUserLoggedInStateInterval":[2,"check-user-logged-in-state-interval"],"pageId":[1,"page-id"],"i18n":[32],"gotData":[32],"fetchingData":[32],"homePageLink":[32],"menuItems":[32],"siteDefinition":[32],"search":[32],"siteSelector":[32],"languageSelector":[32],"languageOptions":[32],"loginDialog":[32],"minimizeSearch":[32],"loggedIn":[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]],{"language":["onLanguageChange"],"market":["onMarketChange"]}]]],["p-63505736",[[0,"pn-proxio-findprice",{"endpoint":[1025],"language":[1025],"market":[1025],"showMedium":[4,"show-medium"],"showInternational":[4,"show-international"],"maxAbroadKg":[2,"max-abroad-kg"],"weightListName":[1,"weight-list-name"],"cache":[4],"filteredItems":[32],"weight":[32],"weightvalue":[32],"countrycodevalue":[32],"sizecategory":[32],"data":[32]},null,{"market":["setState"],"language":["setState"],"sizecategory":["filterItems"],"weightvalue":["filterItems"],"countrycodevalue":["filterItems"]}]]],["p-4372d10e",[[0,"pn-find-price",{"source":[1],"language":[1025],"market":[1025],"filteredItems":[32],"weight":[32],"weightvalue":[32],"sourceData":[32],"sizecategory":[32]},null,{"market":["setState"],"language":["setState"],"sizecategory":["filterItems"],"weightvalue":["filterItems"]}]]],["p-796ebfee",[[0,"pn-find-service-and-price",{"source":[1],"language":[1025],"market":[1025],"filteredItems":[32],"postagetype":[32],"weight":[32],"weightvalue":[32],"deliveryscope":[32],"sourceData":[32]},null,{"market":["setState"],"language":["setState"],"postagetype":["filterItems"],"deliveryscope":["filterItems"],"weightvalue":["filterItems"]}]]],["p-721598b8",[[4,"pn-product-pricelist",{"source":[1],"language":[1025],"market":[1025],"productid":[1],"filteredItems":[32],"sourceData":[32],"gotData":[32],"loading":[32],"postagetype":[32],"weight":[32],"weightvalue":[32]},null,{"market":["setState"],"language":["setState"],"postagetype":["filterItems"],"weightvalue":["filterItems"]}]]],["p-7b05d7c7",[[0,"pn-proxio-pricegroup",{"endpoint":[1025],"language":[1],"market":[1],"tariffid":[1],"cache":[4],"activeWeightIndex":[32],"data":[32],"i18n":[32]},[[0,"activeWeightIndex","setActiveWeightIndex"],[0,"language","setLanguage"]]]]],["p-f0568315",[[0,"pn-product-pricelist-result",{"item":[1040],"description":[16],"shownitems":[16],"showMeasurement":[4,"show-measurement"],"weightText":[32]},null,{"item":["composeItems"]}]]],["p-e5345c69",[[4,"pn-marketweb-sitefooter",{"market":[1537],"language":[1537],"environment":[1537],"endpoint":[1],"siteDomainInUrls":[4,"site-domain-in-urls"],"cache":[4],"theme":[513],"backgroundcolor":[513],"showSwan":[4,"show-swan"],"siteDefinition":[32],"footerContent":[32],"i18n":[32],"gotData":[32],"fetchingData":[32]},null,{"language":["onLanguageChange"],"market":["onMarketChange"]}]]],["p-42c9386d",[[4,"pn-media-block",{"blockHeight":[1,"block-height"],"imageSrc":[1,"image-src"],"imageSrcSmallScreenFormat":[1,"image-src-small-screen-format"],"imageAltText":[1,"image-alt-text"],"videoSrc":[1,"video-src"],"parallaxScroll":[4,"parallax-scroll"],"showOverlayLayer":[4,"show-overlay-layer"],"customOverlayBackground":[1,"custom-overlay-background"],"animateOverlayBackground":[4,"animate-overlay-background"],"scrollSnapBlock":[4,"scroll-snap-block"],"fixedBackground":[4,"fixed-background"],"blockHeading":[1,"block-heading"],"blockHeadingLevel":[2,"block-heading-level"],"blockPreamble":[1,"block-preamble"],"pnPlayOnScrollObserverOptions":[32],"calculatedBlockHeight":[32],"hasButtonSlot":[32]}]]],["p-5ac23b38",[[0,"pn-multi-row-connected-dropdown",{"dropdownData":[1,"dropdown-data"],"languageCode":[1,"language-code"],"label":[1],"firstDropdownLabel":[1,"first-dropdown-label"],"secondDropdownLabel":[1,"second-dropdown-label"],"dropdownPlaceholder":[1,"dropdown-placeholder"],"addRowText":[1,"add-row-text"],"inputFildLabel":[1,"input-fild-label"],"inputFildPlaceholder":[1,"input-fild-placeholder"],"dateButtonText":[1,"date-button-text"],"datePlaceholder":[1,"date-placeholder"],"dateDaysFromToday":[2,"date-days-from-today"],"allowMultipleRows":[4,"allow-multiple-rows"],"allowMultipleDates":[4,"allow-multiple-dates"],"startDateLabel":[1,"start-date-label"],"endDateLabel":[1,"end-date-label"],"multiDateHelperText":[1,"multi-date-helper-text"],"generateDatesButtonText":[1,"generate-dates-button-text"],"saveDateButtonText":[1,"save-date-button-text"],"noDatesText":[1,"no-dates-text"],"yearsToAddToEndDate":[2,"years-to-add-to-end-date"],"rowCount":[32],"rowData":[32],"formValues":[32]},[[0,"rowValueChange","predefinedValueChange"],[0,"deleteRowEvent","deleteRowEvent"]]]]],["p-781ef432",[[0,"pn-dropdown-with-multi-input-rows",{"dropdownData":[1,"dropdown-data"],"languageCode":[1,"language-code"],"firstDropdownLabel":[1,"first-dropdown-label"],"firstDropdownHelperText":[1,"first-dropdown-helper-text"],"secondDropdownLabel":[1,"second-dropdown-label"],"secondDropdownHelperText":[1,"second-dropdown-helper-text"],"secondDropdownMax":[2,"second-dropdown-max"],"deleteMultipleRowsWarningText":[1,"delete-multiple-rows-warning-text"],"confirmDeleteButtonText":[1,"confirm-delete-button-text"],"abortDeleteButtonText":[1,"abort-delete-button-text"],"fristInputLabel":[1,"frist-input-label"],"fristInputPlaceholder":[1,"frist-input-placeholder"],"firstInputMin":[2,"first-input-min"],"firstInputMax":[2,"first-input-max"],"firstInputWarning":[2,"first-input-warning"],"firstInputWarningText":[1,"first-input-warning-text"],"firstInputLowErrorText":[1,"first-input-low-error-text"],"firstInputHighErrorText":[1,"first-input-high-error-text"],"secondInputLabel":[1,"second-input-label"],"secondInputPlaceholder":[1,"second-input-placeholder"],"secondInputMin":[2,"second-input-min"],"secondInputMax":[2,"second-input-max"],"secondInputWarning":[2,"second-input-warning"],"secondInputWarningText":[1,"second-input-warning-text"],"secondInputLowErrorText":[1,"second-input-low-error-text"],"secondInputHighErrorText":[1,"second-input-high-error-text"],"dateLabel":[1,"date-label"],"datePlaceholder":[1,"date-placeholder"],"dateDaysFromToday":[2,"date-days-from-today"],"yearsToAddToEndDate":[2,"years-to-add-to-end-date"],"sumFieldLabel":[1,"sum-field-label"],"addRowText":[1,"add-row-text"],"elementHelperText":[1,"element-helper-text"],"dropdownDataRoot":[32],"secondDropdownArr":[32],"rowCount":[32],"rowData":[32],"formValues":[32],"firstValidDateString":[32],"lastValidDateString":[32],"rowSum":[32],"minRowCount":[32],"showDelteConfirm":[32]},[[0,"rowValueChange","predefinedValueChange"],[0,"firstInputChange","predefinedValueChange"],[0,"secondInputChange","predefinedValueChange"],[0,"deleteRowEvent","deleteRowEvent"]]]]],["p-d5a4ada5",[[0,"pn-address-autofill",{"market":[1537],"environment":[1537],"endpoint":[1],"cache":[4],"countryCode":[1,"country-code"],"postalCodeProps":[1,"postal-code-props"],"cityProps":[1,"city-props"],"streetAddressProps":[1,"street-address-props"],"streetNumberProps":[1,"street-number-props"],"streetAdressArr":[32],"streetNumberArr":[32],"city":[32],"postalCode":[32],"streetAddress":[32],"streetNumber":[32],"fullAddress":[32]}]]],["p-e9501c6f",[[4,"pn-dropdown-choice-adds-row",{"dropdownData":[1,"dropdown-data"],"languageCode":[1,"language-code"],"addRowDropdownName":[1,"add-row-dropdown-name"],"addRowDropdownPlaceholder":[1,"add-row-dropdown-placeholder"],"addRowDropdownLabel":[1,"add-row-dropdown-label"],"rowNameLabel":[1,"row-name-label"],"rowHasDropdown":[4,"row-has-dropdown"],"rowDropdownLabel":[1,"row-dropdown-label"],"rowDropdownPlaceholder":[1,"row-dropdown-placeholder"],"rowInputLabel":[1,"row-input-label"],"rowDeleteButtonText":[1,"row-delete-button-text"],"totalInputLimit":[2,"total-input-limit"],"inputLimitWarning":[1,"input-limit-warning"],"nextRowIndex":[32],"rowSelectDropdownArr":[32],"columnCount":[32],"showWarning":[32],"formValue":[32]},null,{"dropdownData":["dropdownDataWatcher"]}]]],["p-391970af",[[0,"pn-multiple-input",{"label":[1],"placeholder":[1],"addRowButtonText":[1,"add-row-button-text"],"rowData":[32]}]]],["p-ebaeee5e",[[0,"pn-parcel-tracker",{"formActionUrl":[1,"form-action-url"],"heading":[1],"buttonLabel":[1,"button-label"],"locale":[1],"placeholder":[1],"inputName":[1,"input-name"],"currentWidth":[32]},[[9,"resize","handleViewportSizeChange"]]]]],["p-95c10b7e",[[0,"pn-pex-pricefinder",{"language":[1],"currency":[1],"apiUrl":[1,"api-url"],"i18n":[32],"fromzip":[32],"tozip":[32],"weight":[32],"when":[32],"response":[32]},[[0,"language","setLanguage"]]]]],["p-40538914",[[0,"pn-share",{"link":[1],"language":[1537],"i18n":[32]},null,{"language":["onLanguageChange"]}]]],["p-34689c97",[[4,"pn-stats-info",{"heading":[1],"dataArray":[1,"data-array"],"backgroundUrl":[1,"background-url"],"myParsedArray":[32]},null,{"dataArray":["parseMyArrayProp"]}]]],["p-68aa55f7",[[4,"pn-animated-tile",{"toggled":[32],"transitionClassName":[32],"animateIcon":[32]},null,{"toggled":["onToggledHandler"]}]]],["p-586a1e3c",[[0,"pn-app-banner",{"appName":[1,"app-name"],"appDescription":[1,"app-description"],"ctaText":[1,"cta-text"],"appleStoreLink":[1,"apple-store-link"],"googleStoreLink":[1,"google-store-link"],"isClosed":[32],"storeLink":[32],"isLocalStorageAvailable":[32]}]]],["p-16f70311",[[4,"pn-bonus-progressbar",{"icon":[1],"heading":[1],"sumtext":[513],"theme":[513],"bonuspercentage":[1],"currency":[513],"value":[1538],"min":[1538],"max":[1538],"valuepercentage":[32],"progresspercentage":[32],"levelValues":[32],"currentLevelAdjustedValue":[32]},null,{"currentLevelAdjustedValue":["setValuePercentage"],"value":["setValuePercentage"],"min":["setValuePercentage"],"max":["setValuePercentage"]}]]],["p-a8220c88",[[0,"pn-bonus-progressbar-level",{"current":[516],"value":[1538],"bonuspercentage":[1537],"visualpercentage":[1538],"percentage":[32],"max":[32],"min":[32],"currency":[32]}]]],["p-56bd346e",[[0,"pn-breakpoints",{"breakPointClass":[1,"break-point-class"],"currentWidth":[32]},[[9,"resize","handleViewportSizeChange"]]]]],["p-1317587f",[[0,"pn-chart",{"labels":[1],"dataSets":[1,"data-sets"],"dataChartType":[8,"data-chart-type"],"myChartCtxRef":[32]},null,{"dataSets":["dataChangeHandler"],"labels":["labelsChangeHandler"]}]]],["p-190c671b",[[4,"pn-charts-card",{"header":[1],"highlight":[1],"preamble":[1],"label":[1],"source":[1],"sourceUrl":[1,"source-url"],"ctaLinkText":[1,"cta-link-text"],"openInNewWindow":[4,"open-in-new-window"]}]]],["p-69a56d5c",[[4,"pn-cta-block",{"heading":[1],"bodyText":[1,"body-text"],"pnBackgroundColor":[1,"pn-background-color"],"isLarge":[4,"is-large"],"isCentered":[4,"is-centered"],"isSmall":[4,"is-small"],"contentTop":[4,"content-top"]}]]],["p-95e054fd",[[4,"pn-customernumber-selector",{"language":[1537],"open":[1540],"heading":[1],"description":[1],"i18n":[32]}]]],["p-09b9cc06",[[4,"pn-customernumber-selector-option",{"heading":[1],"description":[1],"url":[1]}]]],["p-bdaf4338",[[0,"pn-date-and-time",{"languageCode":[1,"language-code"],"dateAndTimeLabel":[1,"date-and-time-label"],"dateDaysFromToday":[2,"date-days-from-today"],"validTimeRangeMinutes":[2,"valid-time-range-minutes"],"errorMessage":[1,"error-message"],"dateHelperText":[1,"date-helper-text"],"timeHelperText":[1,"time-helper-text"],"disableWeekends":[4,"disable-weekends"],"datePlacehodler":[1,"date-placehodler"],"language":[32],"hourArr":[32],"minuteArr":[32],"formValue":[32],"invalidTimespan":[32],"selectedDate":[32],"selectedFromHour":[32],"selectedFromMin":[32],"selectedToHour":[32],"selectedToMin":[32],"firstValidDateString":[32],"lastValidDateString":[32]}]]],["p-fbe70284",[[4,"pn-hero-block-international",{"heading":[1],"subHeading":[1,"sub-heading"],"preamble":[1],"animateLogo":[4,"animate-logo"],"showSideLoader":[4,"show-side-loader"],"centeredLayout":[4,"centered-layout"]}]]],["p-e42f0fbe",[[0,"pn-line-shape"]]],["p-ade7ffcf",[[4,"pn-link-list",{"heading":[1],"label":[1],"preamble":[1],"url":[1],"showMoreLabel":[1,"show-more-label"],"showMoreUrl":[1,"show-more-url"]}]]],["p-c25acf85",[[0,"pn-marketweb-icon",{"symbol":[1],"small":[4],"color":[1]}]]],["p-2044eddc",[[1,"pn-marketweb-search",{"disabled":[4],"placeholder":[1],"inputid":[1],"name":[1],"autocomplete":[1],"list":[1],"value":[1],"label":[1],"loading":[4],"button":[1],"light":[4],"suggestionObserver":[32],"hasClonedInput":[32],"listSuggestion":[32]},[[0,"input","inputHandler"]]]]],["p-c0fd8e61",[[4,"pn-product-tile"]]],["p-90ba1d8e",[[4,"pn-profile-modal",{"heading":[1],"continueCtaText":[1,"continue-cta-text"],"choosenCompanyText":[1,"choosen-company-text"],"toText":[1,"to-text"],"chooseCustomerNumberText":[1,"choose-customer-number-text"],"isLoading":[32]},[[0,"urlSelected","onUrlSelected"]]]]],["p-c9f21ea3",[[4,"pn-profile-modal-customernumber",{"url":[513],"customernumber":[513],"selected":[516]}]]],["p-f62879f6",[[4,"pn-profile-modal-profile",{"heading":[513],"description":[513],"url":[513],"selected":[1028],"showCustomerNumbers":[516,"show-customer-numbers"],"pleaseSelectText":[513,"please-select-text"],"visible":[1540],"identifier":[32]}]]],["p-931d3a9b",[[4,"pn-profile-modal-type",{"typeid":[513],"name":[1025],"selected":[1028],"selectedprofile":[1025]},null,{"selected":["onSelectedChange"]}]]],["p-74203d3e",[[4,"pn-profile-selector",{"language":[1537],"returnUrl":[1,"return-url"],"heading":[1],"i18n":[32],"isLoading":[32],"numberOfProfiles":[32]}]]],["p-f2d0d0cc",[[0,"pn-profile-selector-option",{"heading":[1],"description":[1],"url":[1]}]]],["p-5a467ca6",[[4,"pn-quick-cta",{"heading":[1],"preamble":[1]}]]],["p-e4c7aaec",[[4,"pn-quote-card",{"quote":[1],"name":[1],"occupation":[1]}]]],["p-67d862ac",[[4,"pn-sidenav",{"language":[1],"navLabel":[1,"nav-label"],"i18n":[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["p-1535a09f",[[4,"pn-sidenav-level",{"level":[32],"levelId":[32],"isOpen":[32],"parentName":[32],"parentHref":[32],"parentLinkId":[32],"alignment":[32]},null,{"isOpen":["onOpen"]}]]],["p-6e9875e5",[[4,"pn-sidenav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"icon":[1],"current":[4],"levelId":[32],"open":[32],"hasChildren":[32]}]]],["p-7021985c",[[4,"pn-sidenav-togglebutton",{"label":[1],"i18n":[32]}]]],["p-0a522476",[[4,"pn-spotlight",{"heading":[1],"preamble":[1],"isDynamic":[4,"is-dynamic"],"addDynamic":[32]}]]],["p-73db2c9c",[[4,"pn-teaser-card",{"text":[1],"heading":[1],"label":[1],"dataCardColor":[513,"data-card-color"],"dataCardAlignment":[513,"data-card-alignment"],"hasCtaSlotContent":[32],"hasIllustrationSlot":[32]}]]],["p-69ee0033",[[4,"pn-usp-promoter",{"heading":[1],"headingExtension":[1,"heading-extension"],"bodyText":[1,"body-text"],"backgroundGradient":[1,"background-gradient"],"fullWidth":[4,"full-width"],"rightAlign":[4,"right-align"],"hideMobileImage":[4,"hide-mobile-image"]}]]],["p-9776a1c5",[[0,"pn-proxio-findprice-result",{"item":[1040],"activeweight":[1026],"shownitems":[16],"Usp1":[1,"usp-1"],"Usp2":[1,"usp-2"],"Usp3":[1,"usp-3"],"description":[16],"showMeasurement":[4,"show-measurement"],"showInternational":[4,"show-international"],"selectedCountrycode":[1,"selected-countrycode"],"market":[1],"language":[1025],"weightText":[32],"linkId":[32],"shopLabel":[32],"shopUrl":[32],"shopId":[32],"i18n":[32]},null,{"item":["composeItems"],"activeweight":["getPriceString","getProductLink"]}]]],["p-2f779414",[[0,"pn-find-service-and-price-result",{"item":[1040],"shownitems":[16],"weightText":[32]},null,{"item":["composeItems"]}]]],["p-85d57c9d",[[0,"pn-multi-row-connected-dropdown-row",{"dropdownData":[1,"dropdown-data"],"languageCode":[1,"language-code"],"label":[1],"firstDropdownLabel":[1,"first-dropdown-label"],"secondDropdownLabel":[1,"second-dropdown-label"],"dropdownPlaceholder":[1,"dropdown-placeholder"],"addRowText":[1,"add-row-text"],"inputFildLabel":[1,"input-fild-label"],"inputFildPlaceholder":[1,"input-fild-placeholder"],"dateButtonText":[1,"date-button-text"],"datePlaceholder":[1,"date-placeholder"],"dateDaysFromToday":[2,"date-days-from-today"],"allowMultipleDates":[4,"allow-multiple-dates"],"startDateLabel":[1,"start-date-label"],"endDateLabel":[1,"end-date-label"],"multiDateHelperText":[1,"multi-date-helper-text"],"generateDatesButtonText":[1,"generate-dates-button-text"],"saveDateButtonText":[1,"save-date-button-text"],"noDatesText":[1,"no-dates-text"],"index":[2],"predefinedValue":[1,"predefined-value"],"yearsToAddToEndDate":[2,"years-to-add-to-end-date"],"buttonsArray":[32],"firstDropdownArr":[32],"secondDropdownArr":[32],"firstDropdownClass":[32],"secondDropdownClass":[32],"firstValidDateString":[32],"lastValidDateString":[32],"firstDropdownPlaceholder":[32],"secondDropdownPlaceholder":[32],"starDateValue":[32],"endDateValue":[32],"generatedDatesArr":[32],"selectedButtonValue":[32],"inputFieldValue":[32],"dateValue":[32],"daysArr":[32]},null,{"predefinedValue":["applyPredefinedValue"]}]]],["p-c696bedf",[[0,"pn-play-on-scroll",{"videoSrc":[1,"video-src"],"observerOptions":[16],"showOverlay":[4,"show-overlay"],"videoId":[32],"isManuallyPaused":[32],"isPaused":[32]}]]],["p-d40ff187",[[0,"pn-dropdown-with-multi-input-rows-row",{"languageCode":[1,"language-code"],"fristInputPlaceholder":[1,"frist-input-placeholder"],"firstInputMin":[2,"first-input-min"],"firstInputMax":[2,"first-input-max"],"firstInputWarning":[2,"first-input-warning"],"firstInputWarningText":[1,"first-input-warning-text"],"firstInputLowErrorText":[1,"first-input-low-error-text"],"firstInputHighErrorText":[1,"first-input-high-error-text"],"secondInputPlaceholder":[1,"second-input-placeholder"],"secondInputMin":[2,"second-input-min"],"secondInputMax":[2,"second-input-max"],"secondInputWarning":[2,"second-input-warning"],"secondInputWarningText":[1,"second-input-warning-text"],"secondInputLowErrorText":[1,"second-input-low-error-text"],"secondInputHighErrorText":[1,"second-input-high-error-text"],"dateLabel":[1,"date-label"],"datePlaceholder":[1,"date-placeholder"],"firstValidDate":[1,"first-valid-date"],"lastValidDate":[1,"last-valid-date"],"predefinedValue":[1,"predefined-value"],"rowIndex":[2,"row-index"],"minRowCount":[2,"min-row-count"],"showFirstInputWarning":[32],"showFirstInputLowError":[32],"showFirstInputHighError":[32],"showSecondInputWarning":[32],"showSecondInputLowError":[32],"showSecondInputHighError":[32],"firstInputValue":[32],"secondInputValue":[32],"dateValue":[32]},null,{"predefinedValue":["applyPredefinedValue"]}]]],["p-81b3e038",[[4,"pn-share-item",{"link":[1],"text":[1]}]]],["p-1bd5fa26",[[0,"pn-stats-info-data",{"format":[1],"formatStyle":[1,"format-style"],"startValue":[2,"start-value"],"data":[2],"unit":[1],"preamble":[1],"duration":[2],"index":[2],"hasBeenShown":[32],"compId":[32]},null,{"hasBeenShown":["watchStateHandlder"]}]]],["p-7b598d81",[[0,"pn-find-price-result",{"item":[1040],"shownitems":[16],"Usp1":[1,"usp-1"],"Usp2":[1,"usp-2"],"Usp3":[1,"usp-3"],"description":[16],"showMeasurement":[4,"show-measurement"],"weightText":[32],"linkId":[32],"shopLabel":[32],"shopUrl":[32],"shopId":[32]},null,{"item":["composeItems"]}]]],["p-370829c6",[[1,"pn-filter-checkbox",{"value":[520],"name":[1],"checkboxid":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["p-c224d7c4",[[4,"pn-mainnav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"levelId":[32],"open":[32],"hasChildren":[32]}]]],["p-78fbc88c",[[4,"pn-site-footer",{"url":[1],"linktitle":[1],"theme":[513]}],[4,"pn-site-footer-col",{"theme":[513]}],[0,"pn-swan",{"licenseNumber":[1,"license-number"],"language":[1537],"linkTo":[1,"link-to"],"i18n":[32]},null,{"language":["onLanguageChange"]}]]],["p-9be27d72",[[4,"pn-choice-button",{"value":[520],"name":[1],"choiceid":[1],"type":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["p-1217d60f",[[0,"pn-product-tile-info",{"label":[1],"text":[1],"icon":[1]}],[0,"pn-product-tile-price",{"label":[1],"amount":[1],"currency":[1],"url":[1]}]]],["p-828449da",[[4,"pn-scroll",{"observerOptions":[16],"behaviourClasses":[1,"behaviour-classes"],"transitionDurationSeconds":[2,"transition-duration-seconds"],"shouldLoop":[4,"should-loop"],"intersectFunc":[16],"notIntersectFunc":[16],"compId":[32]}],[0,"pn-video-overlay",{"language":[1],"isPaused":[4,"is-paused"],"showOverlay":[4,"show-overlay"],"i18n":[32]},null,{"language":["onLanguageChange"]}]]],["p-b2dcce7c",[[0,"pn-marketweb-siteheader-login-linklist",{"heading":[1],"links":[16],"idNamespace":[1,"id-namespace"],"showUnifiedLogin":[4,"show-unified-login"]}]]],["p-1578e02e",[[4,"pn-titletag",{"icon":[1],"color":[1537]}]]],["p-9998c29d",[[0,"pn-marketweb-input",{"disabled":[4],"error":[1],"invalid":[4],"helpertext":[1],"label":[1],"placeholder":[1],"inputid":[1],"name":[1],"required":[4],"type":[1025],"autocomplete":[1],"valid":[4],"value":[1],"maxlength":[1],"min":[1],"max":[1],"step":[1],"pattern":[1],"showText":[32]}]]],["p-9a7abcee",[[0,"pn-marketweb-siteheader-unified-login",{"loggedIn":[4,"logged-in"],"myPageLabel":[1,"my-page-label"],"myPageUrl":[1,"my-page-url"],"logInLabel":[1,"log-in-label"]}],[0,"pn-marketweb-siteheader-login-links",{"loginDialog":[1040],"idNamespace":[1,"id-namespace"],"loggedin":[516],"username":[1],"showUnifiedLogin":[4,"show-unified-login"]},null,{"loginDialog":["init"]}],[0,"pn-marketweb-siteheader-login-profileselection",{"loginDialog":[1040],"endpoint":[1],"loggedin":[4],"idNamespace":[1,"id-namespace"],"heading":[1],"i18n":[16],"currentProfile":[1040],"profileoptions":[1040],"user":[32],"logoutLink":[32],"userName":[32],"userEmail":[32]}],[0,"pn-marketweb-siteheader-login-button",{"label":[1]}],[0,"pn-marketweb-siteheader-login-mypage-button",{"label":[1],"myPageUrl":[1,"my-page-url"]}]]],["p-4ea1409d",[[0,"pn-marketweb-siteheader-login",{"endpoint":[1],"token":[1],"i18n":[16],"siteUrl":[1,"site-url"],"emitEvents":[4,"emit-events"],"loginDialog":[1040],"fullname":[1],"loggedin":[4],"showProfileSelection":[1028,"show-profile-selection"],"showUnifiedLogin":[4,"show-unified-login"],"checkUserLoggedInStateInterval":[2,"check-user-logged-in-state-interval"],"environment":[1],"loginLinks":[32],"toggleButtonText":[32],"username":[32]},null,{"i18n":["init"],"loginDialog":["init"]}],[4,"pn-mainnav-level",{"label":[1537],"level":[32],"levelId":[32],"isOpen":[32],"parentName":[32],"parentHref":[32],"parentLinkId":[32],"listCount":[32],"alignment":[32]},null,{"label":["setState"],"isOpen":["onOpen"]}],[4,"pn-language-selector",{"value":[1537],"selectedLanguageName":[32],"options":[32],"i18n":[32]},null,{"value":["setSelectedLanguageName","setTranslations","onValueChange"]}],[0,"pn-language-selector-option",{"name":[1],"code":[1],"url":[1],"selected":[4],"currentLanguage":[1,"current-language"]}],[4,"pn-mainnav",{"market":[1],"language":[1],"navigationId":[1,"navigation-id"],"openMenu":[1028,"open-menu"],"navLabel":[1,"nav-label"]},[[0,"language","setLanguage"],[0,"market","setMarket"],[0,"menuLanguageChange","onLanguageChange"],[0,"setmenuopenstate","setMenuOpenState"],[0,"openMenuLevelChange","onOpenMenuLevelChange"]]],[4,"pn-mainnav-list",{"heading":[1],"linkCount":[32]}],[0,"pn-marketweb-siteheader-search",{"i18n":[8,"i-1-8n"],"showOnlyLink":[1028,"show-only-link"],"hideSearch":[1028,"hide-search"],"language":[1537],"siteid":[1],"search":[1040],"primary":[4],"icononly":[4],"autoCompleteOptions":[32]}],[4,"pn-site-selector",{"buttontext":[1537],"heading":[1537],"language":[1537],"i18n":[32]}],[0,"pn-site-selector-item",{"url":[1],"heading":[1],"description":[1],"newwindow":[4]}]]],["p-75a09bb2",[[4,"pn-proxio-productcard"],[0,"pn-proxio-productcard-description",{"heading":[1],"highlight":[1],"description":[1],"list":[1040]}],[0,"pn-proxio-productcard-information",{"label":[1],"information":[16]}],[0,"pn-proxio-productcard-pricelink",{"price":[1],"vatText":[1,"vat-text"],"link":[1],"linktext":[1]}]]],["p-609da67c",[[0,"pn-product-card-info",{"rulle":[1],"paket":[1],"label":[1],"text":[1]}],[0,"pn-product-card-price",{"label":[1],"amount":[1],"currency":[1],"note":[1],"url":[1],"service":[1],"linkid":[1]}],[4,"pn-product-card"]]]]'),e)}));
2
2
  //# sourceMappingURL=pn-market-web-components.esm.js.map
@@ -36,7 +36,6 @@ export declare class PnDateAndTime {
36
36
  setDefaultHiddenValue(): void;
37
37
  addEventHandlers(): void;
38
38
  handleChange(e: any): void;
39
- handleTimeChange(): void;
40
39
  updateHiddenValue(): void;
41
40
  validateTimeRange(from: number, to: number): void;
42
41
  getNumbersAsStringArr(start: number, stop: number, step: number): string[];
@@ -1,2 +0,0 @@
1
- import{r as t,c as i,g as s,h as e,d as l}from"./p-06555615.js";import{F as n,M as o}from"./p-73cef33c.js";import{d as h}from"./p-aed52bc1.js";const a="pn-button-dropdown .pn-button-dropdown>pn-button>.pn-button{min-height:initial}pn-address-autofill pn-marketweb-input{width:50%}pn-address-autofill .input-container-row{display:flex;gap:1rem;margin-bottom:1rem}pn-address-autofill .label-container{color:#5e554a;font-size:0.875em;display:flex;justify-content:space-between;align-items:flex-end}pn-address-autofill .autocomplete-items{position:absolute;border-radius:0.8rem;border:0.1rem solid #5e554a;width:100%;max-height:30rem;overflow-y:auto}pn-address-autofill .autocomplete-items:hover,pn-address-autofill .autocomplete-items :focus{border:0.1rem solid #00a0d6}pn-address-autofill .autocomplete-items div{padding:1.6rem;cursor:pointer;background-color:#fff;border:0.1rem solid transparent}pn-address-autofill .autocomplete-items div:first-child{border-radius:0.8rem 0.8rem 0 0}pn-address-autofill .autocomplete-items div:last-child{border-radius:0 0 0.8rem 0.8rem}pn-address-autofill .autocomplete-items div:hover{background-color:#e0f8ff}pn-address-autofill .autocomplete-items .autocomplete-active{background-color:#e0f8ff}";const r=a;const u=class{constructor(s){t(this,s);this.addresscomplete=i(this,"addresscomplete",7);this.market=null;this.environment=null;this.endpoint=null;this.cache=true;this.countryCode=null;this.postalCodeProps=null;this.cityProps=null;this.streetAddressProps=null;this.streetNumberProps=null;this.streetAdressArr=null;this.streetNumberArr=null;this.city=null;this.postalCode=null;this.streetAddress=null;this.streetNumber=null;this.fullAddress=null}get hostElement(){return s(this)}pnInputPostalCode=null;pnInputCity=null;pnInputStreetAddress=null;pnInputStreetNumber=null;postalCodeInputField=null;streetAddressInputField=null;streetNumberInputField=null;pnInputHiddenValue=null;endpointPath="/api/location/get-by-location";_postalCodeProps=null;_cityProps=null;_streetAddressProps=null;_streetNumberProps=null;addresscomplete;fetchHelper=new n("PostalCodeCityAutofill");componentWillLoad(){this.setInitialValues();this._postalCodeProps=this.setProps(this.postalCodeProps);this._cityProps=this.setProps(this.cityProps);this._streetAddressProps=this.setProps(this.streetAddressProps);this._streetNumberProps=this.setProps(this.streetNumberProps)}setProps(t){if(typeof t==="string"){return JSON.parse(t)}else{return t}}componentDidLoad(){this.postalCodeInputField=this.pnInputPostalCode.querySelector("input");this.streetAddressInputField=this.pnInputStreetAddress.querySelector("input");this.streetNumberInputField=this.pnInputStreetNumber.querySelector("input");this.addEventHandlers()}async setInitialValues(t=window.location.href){const i=new o(t);if(!this.environment){this.environment=await i.getEnvironmentName()}if(!this.endpoint&&this.environment?.indexOf("local")===-1){this.endpoint=await i.getEndpoint(this.environment,this.market)}if(!this.endpoint){this.endpoint=""}}addEventHandlers(){const t=h(this.fetchData.bind(this,this.postalCodeInputField),1e3);this.postalCodeInputField.addEventListener("keyup",t);this.streetAddressInputField.addEventListener("keyup",this.handleStreetAddressDropdown.bind(this));this.streetNumberInputField.addEventListener("focus",this.handleStreetNumberDropdown.bind(this));this.addFormFieldEvent()}addFormFieldEvent(){const t=this.hostElement.querySelectorAll("input");t.forEach((t=>{["keyup","change"].forEach((i=>{const s=h(this.updateHiddenValue.bind(this),1e3);t.addEventListener(i,s)}))}))}updateHiddenValue(t){if(t.target===this.streetNumberInputField){this.streetNumber=this.streetNumberInputField.value}if(this.postalCode&&this.city&&this.streetAddress&&this.streetNumber){this.fullAddress=`${this.streetAddress} ${this.streetNumber}, ${this.city} ${this.postalCode}`}else{this.fullAddress=""}this.addresscomplete.emit(this.fullAddress)}async fetchData(t,i){if(i){i.preventDefault();if(i.key==="Tab"){if(this.city){return}}}let s="";const e=i&&i.target===this.postalCodeInputField;const l=t===this.streetAddressInputField&&this.city&&this.city.length;const n=t===this.streetNumberInputField&&this.city&&this.city.length&&this.streetAddress&&this.streetAddress.length;if(e){s=this.postalCodeInputField.value;this.streetAdressArr=null;this.streetAddressInputField.value="";this.streetNumberArr=null;this.streetNumberInputField.value="";this.city=null;this.streetAddress=null;this.streetNumber=null}if(l){s=`${this.streetAddressInputField.value}, ${this.city}`;this.streetNumberArr=null;this.streetNumberInputField.value="";this.streetNumber=null}if(n){this.streetAdressArr=null;s=`${this.streetAddress}, ${this.city}`}if(s.length>0){const t=this.endpoint.lastIndexOf("/")===this.endpoint.length-1?this.endpoint.substring(0,this.endpoint.length-1):this.endpoint;const i=`${t}${this.endpointPath}?countryCode=${this.countryCode}&query=${s}`;const o=await this.fetchHelper.fetchJson(i,{mode:"cors"},this.cache);if(o){if(e){this.city=o.postalCodes?o.postalCodes[0]?.postalCity:null}if(l&&o.addresses){this.postalCode=this.postalCodeInputField.value;this.filterStreetNames(o)}if(n&&o.addresses){this.filterStreetNumbers(o)}}}}filterStreetNames=t=>{const i=[];this.streetAdressArr=null;t.addresses.forEach((t=>{if(t.postalCode.postalCity===this.city&&!i.includes(t.street)){i.push(t.street)}}));this.streetAdressArr=i};filterStreetNumbers=t=>{const i=[];t.addresses.forEach((t=>{if(t.postalCode.postalCode===this.postalCode){const{numberFrom:s,numberTo:e}=t;const l=parseInt(s);const n=parseInt(e);for(let t=l;t<=n;t++){const s=t.toString();if(!i.includes(s)){i.push(t.toString())}}}}));this.streetNumberArr=i};async handleStreetAddressDropdown(t){const i=t.target;if(i===this.streetAddressInputField&&i.value.length){if(!this.streetAdressArr||!this.streetAdressArr.length){await this.fetchData(this.streetAddressInputField,null)}}if(!i.value||!i.value.length){this.streetAdressArr=null}if(this.streetAdressArr&&this.streetAdressArr.length){this.autoComplete(t,this.streetAdressArr)}}async handleStreetNumberDropdown(t){t.preventDefault();const i=t.target;if(i===this.streetNumberInputField){if(!this.streetNumberArr||!this.streetNumberArr.length){await this.fetchData(this.streetNumberInputField,null)}if(this.streetNumberArr){this.autoComplete(t,this.streetNumberArr)}}}autoComplete(t,i){const s=t.target;if(i.length<1){return}let e=0;s.addEventListener("input",(()=>{const t=s.value;this.closeAllLists(s);if(!t){return}e=-1;let l=document.createElement("div");l.setAttribute("id","autocomplete-list"+s.name);l.setAttribute("class","autocomplete-items");s.parentElement.appendChild(l);for(let e=0;e<i.length;e++){if(i[e].substring(0,t.length).toUpperCase()==t.toUpperCase()){let n=document.createElement("div");n.innerHTML="<strong>"+i[e].substring(0,t.length)+"</strong>";n.innerHTML+=i[e].substring(t.length);n.innerHTML+="<input type='hidden' value='"+i[e]+"'>";n.addEventListener("click",(t=>{const i=s.closest("pn-marketweb-input");let e=t.target;if(e.nodeName==="STRONG"){e=e.parentElement}i.value=e.getElementsByTagName("input")[0].value;if(s===this.streetNumberInputField){this.streetNumber=i.value}if(s===this.streetAddressInputField){this.streetAddress=i.value}this.closeAllLists(t.target);s.focus()}));l.appendChild(n)}}}));s.addEventListener("keydown",(t=>{const i=document.getElementById("autocomplete-list"+s.name);let l;if(i){l=i.getElementsByTagName("div")}else{l=i}if(t.keyCode==40){e++;this.addActive(l,e)}if(t.keyCode==38){e--;this.addActive(l,e)}if(t.keyCode==13){t.preventDefault();if(e>-1){if(l){l[e].click()}}}}))}closeAllLists(t){const i=document.getElementsByClassName("autocomplete-items");for(let s=0;s<i.length;s++){if(t!=i[s]){i[s].parentNode.removeChild(i[s])}}}addActive(t,i){if(!t)return;this.removeActive(t);if(i>=t.length)i=0;if(i<0)i=t.length-1;t[i].classList.add("autocomplete-active")}removeActive(t){for(let i=0;i<t.length;i++){t[i].classList.remove("autocomplete-active")}}render(){return e(l,{key:"31d54cc786afb2a8b9ea3f0122fc146e837e8e97",class:"pn-address-autofill"},this._postalCodeProps?.postalCodeCityLabel?e("div",{class:"label-container"},e("label",null,`${this._postalCodeProps.postalCodeCityLabel}`)):null,e("div",{key:"b4ec3793c6895ba3b52795e80891b842973d6545",class:"input-container-row"},e("pn-marketweb-input",{key:"e1c3e2f0623a2c012c11db7d197f041dbffebcd6",type:"text",name:this._postalCodeProps?.postalCodeInputName,required:this._postalCodeProps?.postalCodeInputRequired,placeholder:this._postalCodeProps?.postalCodeInputPlaceholder,ref:t=>this.pnInputPostalCode=t,autocomplete:"off",helpertext:this._postalCodeProps?.postalCodeInputHelpertext}),e("pn-marketweb-input",{key:"3c88411b408874109fc7014b2306549d6f75cfcd",type:"text",name:this._cityProps?.cityInputName,disabled:true,value:this.city,placeholder:this._cityProps?.cityInputPlaceholder,autocomplete:"off",helpertext:this._cityProps?.cityInputHelpertext})),this._streetAddressProps?.streetAddressNumberLabel?e("div",{class:"label-container"},e("label",null,`${this._streetAddressProps.streetAddressNumberLabel}`)):null,e("div",{key:"1f3f232bebd83bff4d31b3b79a86d03117e2136d",class:"input-container-row"},e("pn-marketweb-input",{key:"3fae08f0de34286a23b145ffdf02d63ba63981ab",type:"text",name:this._streetAddressProps?.streetAddressInputName,required:this._streetAddressProps?.streetAddressInputRequired,value:this.streetAddress,placeholder:this._streetAddressProps?.streetAddressInputPlaceholder,ref:t=>this.pnInputStreetAddress=t,autocomplete:"off",helpertext:this._streetAddressProps?.streetAddressInputHelpertext}),e("pn-marketweb-input",{key:"9293d6d05fea0fb4df8bfb9a45d608efa6feb202",type:"text",name:this._streetNumberProps?.streetNumberInputName,required:this._streetNumberProps?.streetNumberInputRequired,value:this.streetNumber,placeholder:this._streetNumberProps?.streetNumberInputPlaceholder,ref:t=>this.pnInputStreetNumber=t,autocomplete:"off",helpertext:this._streetNumberProps?.streetNumberInputHelpertext})))}};u.style=r;export{u as pn_address_autofill};
2
- //# sourceMappingURL=p-acbe60df.entry.js.map