@postnord/pn-marketweb-components 2.4.21 → 2.4.23

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 (83) hide show
  1. package/cjs/index-4199ff85.js +8 -4
  2. package/cjs/loader.cjs.js +1 -1
  3. package/cjs/pn-address-autofill.cjs.entry.js +322 -0
  4. package/cjs/pn-market-web-components.cjs.js +1 -1
  5. package/cjs/pn-marketweb-input.cjs.entry.js +36 -25
  6. package/cjs/pn-marketweb-sitefooter.cjs.entry.js +6 -6
  7. package/cjs/pn-marketweb-siteheader.cjs.entry.js +3 -3
  8. package/cjs/pn-proxio-findprice.cjs.entry.js +3 -3
  9. package/cjs/pn-proxio-pricegroup.cjs.entry.js +3 -3
  10. package/collection/collection-manifest.json +2 -1
  11. package/collection/components/input/pn-address-autofill/pn-address-autofill.css +45 -0
  12. package/collection/components/input/pn-address-autofill/pn-address-autofill.js +537 -0
  13. package/collection/components/input/pn-address-autofill/pn-address-autofill.stories.js +40 -0
  14. package/collection/components/input/pn-marketweb-input/pn-marketweb-input.js +50 -39
  15. package/collection/components/input/pn-multi-formfield/types.js +1 -0
  16. package/collection/components/layout-components/pn-marketweb-sitefooter/socialMediaIcons.js +3 -3
  17. package/components/index.d.ts +2 -1
  18. package/components/index.js +1 -0
  19. package/components/index2.js +63 -52
  20. package/components/index3.js +52 -63
  21. package/components/pn-address-autofill.d.ts +11 -0
  22. package/components/pn-address-autofill.js +359 -0
  23. package/components/pn-animated-tile.js +1 -1
  24. package/components/pn-dropdown-choice-adds-row.js +1 -1
  25. package/components/pn-marketweb-input2.js +36 -25
  26. package/components/pn-marketweb-sitefooter.js +4 -4
  27. package/components/pn-marketweb-siteheader.js +1 -1
  28. package/components/pn-multi-formfield.js +1 -1
  29. package/components/pn-proxio-findprice.js +1 -1
  30. package/components/pn-proxio-pricegroup.js +1 -1
  31. package/components/pn-spotlight.js +1 -1
  32. package/esm/index-ee44c065.js +8 -4
  33. package/esm/loader.js +1 -1
  34. package/esm/pn-address-autofill.entry.js +318 -0
  35. package/esm/pn-market-web-components.js +1 -1
  36. package/esm/pn-marketweb-input.entry.js +36 -25
  37. package/esm/pn-marketweb-sitefooter.entry.js +4 -4
  38. package/esm/pn-marketweb-siteheader.entry.js +1 -1
  39. package/esm/pn-proxio-findprice.entry.js +1 -1
  40. package/esm/pn-proxio-pricegroup.entry.js +1 -1
  41. package/esm-es5/FetchHelper-62dc55bf.js +1 -0
  42. package/esm-es5/index-ee44c065.js +1 -1
  43. package/esm-es5/loader.js +1 -1
  44. package/esm-es5/pn-address-autofill.entry.js +1 -0
  45. package/esm-es5/pn-market-web-components.js +1 -1
  46. package/esm-es5/pn-marketweb-input.entry.js +1 -1
  47. package/esm-es5/pn-marketweb-sitefooter.entry.js +1 -1
  48. package/esm-es5/pn-marketweb-siteheader.entry.js +1 -1
  49. package/esm-es5/pn-proxio-findprice.entry.js +1 -1
  50. package/esm-es5/pn-proxio-pricegroup.entry.js +1 -1
  51. package/package.json +1 -1
  52. package/pn-market-web-components/{p-7e99f631.system.entry.js → p-18aca162.system.entry.js} +1 -1
  53. package/pn-market-web-components/{p-6e11edfe.entry.js → p-1b282c2b.entry.js} +1 -1
  54. package/pn-market-web-components/{p-3c38a67e.system.entry.js → p-256ba011.system.entry.js} +1 -1
  55. package/pn-market-web-components/{p-21bf0e64.system.entry.js → p-356a937e.system.entry.js} +1 -1
  56. package/pn-market-web-components/{p-1a8d7eb8.entry.js → p-372b4cad.entry.js} +1 -1
  57. package/{esm-es5/MarketWebContextService-f6a33f17.js → pn-market-web-components/p-439d5d73.system.js} +1 -1
  58. package/pn-market-web-components/p-4afba818.entry.js +1 -0
  59. package/pn-market-web-components/p-592b66fc.system.entry.js +1 -0
  60. package/pn-market-web-components/p-7a4a7a83.system.entry.js +1 -0
  61. package/pn-market-web-components/{p-5427a6ba.entry.js → p-90d2fb46.entry.js} +1 -1
  62. package/pn-market-web-components/p-9ad0ceb0.js +1 -0
  63. package/pn-market-web-components/p-b1527c0c.entry.js +1 -0
  64. package/pn-market-web-components/{p-0ae0b140.system.entry.js → p-c06e3588.system.entry.js} +1 -1
  65. package/pn-market-web-components/{p-9ae49b8a.entry.js → p-f8a13e03.entry.js} +1 -1
  66. package/pn-market-web-components/p-fcdb7381.system.js +1 -1
  67. package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
  68. package/types/components/input/pn-address-autofill/pn-address-autofill.d.ts +56 -0
  69. package/types/components/input/pn-address-autofill/types.d.ts +40 -0
  70. package/types/components.d.ts +50 -1
  71. package/pn-market-web-components/p-1e5756b9.system.entry.js +0 -1
  72. package/pn-market-web-components/p-33322417.system.js +0 -1
  73. package/pn-market-web-components/p-5d21372b.js +0 -1
  74. package/pn-market-web-components/p-f0078106.entry.js +0 -1
  75. package/cjs/{MarketWebContextService-17053565.js → FetchHelper-2130dacf.js} +84 -84
  76. package/collection/components/{layout-components/pn-multi-formfield → input/pn-address-autofill}/types.js +0 -0
  77. package/collection/components/{layout-components → input}/pn-multi-formfield/multi-formfield.stories.js +0 -0
  78. package/collection/components/{layout-components → input}/pn-multi-formfield/pn-multi-formfield.css +0 -0
  79. package/collection/components/{layout-components → input}/pn-multi-formfield/pn-multi-formfield.js +0 -0
  80. package/components/{MarketWebContextService.js → FetchHelper.js} +84 -84
  81. package/esm/{MarketWebContextService-f6a33f17.js → FetchHelper-62dc55bf.js} +84 -84
  82. /package/types/components/{layout-components → input}/pn-multi-formfield/pn-multi-formfield.d.ts +0 -0
  83. /package/types/components/{layout-components → input}/pn-multi-formfield/types.d.ts +0 -0
@@ -2,23 +2,23 @@ import { h, Host } from "@stencil/core";
2
2
  export class PnMarketwebInput {
3
3
  constructor() {
4
4
  this.disabled = false;
5
- this.error = '';
5
+ this.error = "";
6
6
  this.invalid = false;
7
- this.helpertext = '';
8
- this.label = '';
9
- this.placeholder = '';
7
+ this.helpertext = "";
8
+ this.label = "";
9
+ this.placeholder = "";
10
10
  this.inputid = `${Math.random()}`;
11
- this.name = '';
12
- this.required = null;
13
- this.type = 'text';
14
- this.autocomplete = '';
11
+ this.name = "";
12
+ this.required = false;
13
+ this.type = "text";
14
+ this.autocomplete = "";
15
15
  this.valid = null;
16
- this.value = '';
17
- this.maxlength = '';
18
- this.min = '';
19
- this.max = '';
20
- this.step = '';
21
- this.pattern = '';
16
+ this.value = "";
17
+ this.maxlength = "";
18
+ this.min = "";
19
+ this.max = "";
20
+ this.step = "";
21
+ this.pattern = "";
22
22
  this.showText = false;
23
23
  }
24
24
  getTextMessage() {
@@ -32,8 +32,21 @@ export class PnMarketwebInput {
32
32
  this.showText = !this.showText;
33
33
  }
34
34
  getInputType() {
35
- let types = ['text', 'password', 'url', 'tel', 'search', 'number', 'email', 'date', 'datetime-local', 'month', 'week', 'time'];
36
- return (types.includes(this.type) && !this.showText) ? this.type : 'text';
35
+ let types = [
36
+ "text",
37
+ "password",
38
+ "url",
39
+ "tel",
40
+ "search",
41
+ "number",
42
+ "email",
43
+ "date",
44
+ "datetime-local",
45
+ "month",
46
+ "week",
47
+ "time",
48
+ ];
49
+ return types.includes(this.type) && !this.showText ? this.type : "text";
37
50
  }
38
51
  setVal(e) {
39
52
  var _a;
@@ -41,21 +54,19 @@ export class PnMarketwebInput {
41
54
  this.value = target.value;
42
55
  }
43
56
  getClassNames() {
44
- let classNames = 'pn-input ';
57
+ let classNames = "pn-input ";
45
58
  if (this.error.length > 0 || this.invalid)
46
- classNames += 'error ';
59
+ classNames += "error ";
47
60
  if (this.valid)
48
- classNames += 'valid ';
49
- if (this.type === 'password')
50
- classNames += 'password ';
61
+ classNames += "valid ";
62
+ if (this.type === "password")
63
+ classNames += "password ";
51
64
  if (this.error || this.invalid || this.valid)
52
- classNames += 'icon ';
65
+ classNames += "icon ";
53
66
  return classNames;
54
67
  }
55
68
  render() {
56
- return (h(Host, { class: this.getClassNames() }, (this.label || this.maxlength) &&
57
- h("div", { class: "label-container" }, this.label && h("label", { htmlFor: this.inputid }, this.label), parseInt(this.maxlength) > 0 && h("label", { class: "char-count", htmlFor: this.inputid }, `${this.value.length}/${this.maxlength}`)), h("div", { class: "input-container" }, h("input", { type: this.getInputType(), value: this.value, id: this.inputid, name: this.name, placeholder: this.placeholder, disabled: this.disabled, autocomplete: this.autocomplete, onInput: (e) => this.setVal(e), maxlength: this.maxlength ? this.maxlength : null, min: (this.min ? this.min : null), max: (this.max ? this.max : null), step: (this.step ? this.step : null), pattern: (this.pattern ? this.pattern : null) }), h("svg", { class: "pn-input-checkmark", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none" }, h("polyline", { class: "checkmark-path", points: "4,12 9,17 20,6", "stroke-width": "3" })), this.type === 'password' && !this.disabled && h("button", { onClick: () => this.toggleTextVisibility() }, "Show")), this.getTextMessage() &&
58
- h("small", null, this.error && h("pn-icon", { symbol: "alert-exclamation-circle", small: true, color: "warning" }), this.getTextMessage())));
69
+ return (h(Host, { class: this.getClassNames() }, (this.label || this.maxlength) && (h("div", { class: "label-container" }, this.label && h("label", { htmlFor: this.inputid }, this.label), parseInt(this.maxlength) > 0 && (h("label", { class: "char-count", htmlFor: this.inputid }, `${this.value.length}/${this.maxlength}`)))), h("div", { class: "input-container" }, h("input", { type: this.getInputType(), value: this.value, id: this.inputid, name: this.name, placeholder: this.placeholder, disabled: this.disabled, required: this.required, autocomplete: this.autocomplete, onInput: (e) => this.setVal(e), maxlength: this.maxlength ? this.maxlength : null, min: this.min ? this.min : null, max: this.max ? this.max : null, step: this.step ? this.step : null, pattern: this.pattern ? this.pattern : null }), h("svg", { class: "pn-input-checkmark", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none" }, h("polyline", { class: "checkmark-path", points: "4,12 9,17 20,6", "stroke-width": "3" })), this.type === "password" && !this.disabled && (h("button", { onClick: () => this.toggleTextVisibility() }, "Show"))), this.getTextMessage() && (h("small", null, this.error && h("pn-icon", { symbol: "alert-exclamation-circle", small: true, color: "warning" }), this.getTextMessage()))));
59
70
  }
60
71
  static get is() { return "pn-marketweb-input"; }
61
72
  static get originalStyleUrls() {
@@ -104,7 +115,7 @@ export class PnMarketwebInput {
104
115
  },
105
116
  "attribute": "error",
106
117
  "reflect": false,
107
- "defaultValue": "''"
118
+ "defaultValue": "\"\""
108
119
  },
109
120
  "invalid": {
110
121
  "type": "boolean",
@@ -140,7 +151,7 @@ export class PnMarketwebInput {
140
151
  },
141
152
  "attribute": "helpertext",
142
153
  "reflect": false,
143
- "defaultValue": "''"
154
+ "defaultValue": "\"\""
144
155
  },
145
156
  "label": {
146
157
  "type": "string",
@@ -158,7 +169,7 @@ export class PnMarketwebInput {
158
169
  },
159
170
  "attribute": "label",
160
171
  "reflect": false,
161
- "defaultValue": "''"
172
+ "defaultValue": "\"\""
162
173
  },
163
174
  "placeholder": {
164
175
  "type": "string",
@@ -176,7 +187,7 @@ export class PnMarketwebInput {
176
187
  },
177
188
  "attribute": "placeholder",
178
189
  "reflect": false,
179
- "defaultValue": "''"
190
+ "defaultValue": "\"\""
180
191
  },
181
192
  "inputid": {
182
193
  "type": "string",
@@ -212,7 +223,7 @@ export class PnMarketwebInput {
212
223
  },
213
224
  "attribute": "name",
214
225
  "reflect": false,
215
- "defaultValue": "''"
226
+ "defaultValue": "\"\""
216
227
  },
217
228
  "required": {
218
229
  "type": "boolean",
@@ -230,7 +241,7 @@ export class PnMarketwebInput {
230
241
  },
231
242
  "attribute": "required",
232
243
  "reflect": false,
233
- "defaultValue": "null"
244
+ "defaultValue": "false"
234
245
  },
235
246
  "type": {
236
247
  "type": "string",
@@ -248,7 +259,7 @@ export class PnMarketwebInput {
248
259
  },
249
260
  "attribute": "type",
250
261
  "reflect": false,
251
- "defaultValue": "'text'"
262
+ "defaultValue": "\"text\""
252
263
  },
253
264
  "autocomplete": {
254
265
  "type": "string",
@@ -266,7 +277,7 @@ export class PnMarketwebInput {
266
277
  },
267
278
  "attribute": "autocomplete",
268
279
  "reflect": false,
269
- "defaultValue": "''"
280
+ "defaultValue": "\"\""
270
281
  },
271
282
  "valid": {
272
283
  "type": "boolean",
@@ -302,7 +313,7 @@ export class PnMarketwebInput {
302
313
  },
303
314
  "attribute": "value",
304
315
  "reflect": false,
305
- "defaultValue": "''"
316
+ "defaultValue": "\"\""
306
317
  },
307
318
  "maxlength": {
308
319
  "type": "string",
@@ -320,7 +331,7 @@ export class PnMarketwebInput {
320
331
  },
321
332
  "attribute": "maxlength",
322
333
  "reflect": false,
323
- "defaultValue": "''"
334
+ "defaultValue": "\"\""
324
335
  },
325
336
  "min": {
326
337
  "type": "string",
@@ -338,7 +349,7 @@ export class PnMarketwebInput {
338
349
  },
339
350
  "attribute": "min",
340
351
  "reflect": false,
341
- "defaultValue": "''"
352
+ "defaultValue": "\"\""
342
353
  },
343
354
  "max": {
344
355
  "type": "string",
@@ -356,7 +367,7 @@ export class PnMarketwebInput {
356
367
  },
357
368
  "attribute": "max",
358
369
  "reflect": false,
359
- "defaultValue": "''"
370
+ "defaultValue": "\"\""
360
371
  },
361
372
  "step": {
362
373
  "type": "string",
@@ -374,7 +385,7 @@ export class PnMarketwebInput {
374
385
  },
375
386
  "attribute": "step",
376
387
  "reflect": false,
377
- "defaultValue": "''"
388
+ "defaultValue": "\"\""
378
389
  },
379
390
  "pattern": {
380
391
  "type": "string",
@@ -392,7 +403,7 @@ export class PnMarketwebInput {
392
403
  },
393
404
  "attribute": "pattern",
394
405
  "reflect": false,
395
- "defaultValue": "''"
406
+ "defaultValue": "\"\""
396
407
  }
397
408
  };
398
409
  }
@@ -7,9 +7,9 @@ export const getSocialMediaIconsByType = (linkType = '', fill = '#005D92') => {
7
7
  </svg>`;
8
8
  case 'twitter':
9
9
  return `<svg width="56" height="56" viewBox="0 0 56 56" fill="none" xmlns="http://www.w3.org/2000/svg">
10
- <circle cx="28" cy="28" r="28" fill="${fill}" />
11
- <path fill-rule="evenodd" clip-rule="evenodd" d="M41.3337 19.8587C40.3525 20.2871 39.2981 20.5766 38.1914 20.7068C39.321 20.0402 40.1884 18.9847 40.5969 17.7272C39.5399 18.3443 38.369 18.7925 37.1228 19.0341C36.1248 17.9874 34.7029 17.3333 33.1294 17.3333C30.1079 17.3333 27.6583 19.7446 27.6583 22.7188C27.6583 23.1409 27.7067 23.552 27.8 23.9461C23.253 23.7216 19.2218 21.5775 16.5234 18.3191C16.0525 19.1146 15.7827 20.0397 15.7827 21.0267C15.7827 22.8951 16.7486 24.5436 18.2166 25.5093C17.3197 25.4814 16.4762 25.2391 15.7385 24.8358C15.7381 24.8582 15.7381 24.8808 15.7381 24.9035C15.7381 27.5129 17.6239 29.6896 20.1267 30.1843C19.6676 30.3074 19.1843 30.3732 18.6853 30.3732C18.3328 30.3732 17.99 30.3395 17.656 30.2766C18.3522 32.4163 20.3726 33.9733 22.7667 34.0168C20.8943 35.4612 18.5353 36.3222 15.9721 36.3222C15.5305 36.3222 15.095 36.2968 14.667 36.2471C17.0881 37.7751 19.9639 38.6666 23.0535 38.6666C33.1166 38.6666 38.6195 30.4602 38.6195 23.3433C38.6195 23.1098 38.6142 22.8776 38.6037 22.6466C39.6725 21.8873 40.6002 20.9387 41.3337 19.8587Z" fill="white" />
12
- </svg>`;
10
+ <circle cx="28" cy="28" r="28" fill="#005D92"/>
11
+ <path d="M34.8996 17.5H38.5996L30.5996 26.4L39.9996 38.6H32.5996L26.7996 31.2L20.1996 38.6H16.4996L25.0996 29L16.0996 17.5H23.5996L28.7996 24.2L34.8996 17.5ZM33.5996 36.4H35.5996L22.4996 19.5H20.2996L33.5996 36.4Z" fill="white"/>
12
+ </svg>`;
13
13
  case 'linkedin':
14
14
  return `<svg width="56" height="56" viewBox="0 0 56 56" fill="none" xmlns="http://www.w3.org/2000/svg">
15
15
  <circle cx="28" cy="28" r="28" fill="${fill}" />
@@ -1,4 +1,5 @@
1
1
  /* PnMarketWebComponents custom elements */
2
+ export { PnAddressAutofill as PnAddressAutofill } from '../types/components/input/pn-address-autofill/pn-address-autofill';
2
3
  export { PnAnimatedTile as PnAnimatedTile } from '../types/components/animation/pn-animated-tile/pn-animated-tile';
3
4
  export { PnAppBanner as PnAppBanner } from '../types/components/minor/pn-app-banner/pn-app-banner';
4
5
  export { PnBonusProgressbar as PnBonusProgressbar } from '../types/components/input/pn-bonus-progressbar/pn-bonus-progressbar';
@@ -35,7 +36,7 @@ export { PnMarketwebSiteheaderLoginMypageButton as PnMarketwebSiteheaderLoginMyp
35
36
  export { PnMarketwebSiteheaderLoginProfileselection as PnMarketwebSiteheaderLoginProfileselection } from '../types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection';
36
37
  export { PnMarketwebSiteheaderSearch as PnMarketwebSiteheaderSearch } from '../types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-search';
37
38
  export { PnMarketwebSiteheaderUnifiedLogin as PnMarketwebSiteheaderUnifiedLogin } from '../types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-unified-login';
38
- export { PnMultiFormField as PnMultiFormfield } from '../types/components/layout-components/pn-multi-formfield/pn-multi-formfield';
39
+ export { PnMultiFormField as PnMultiFormfield } from '../types/components/input/pn-multi-formfield/pn-multi-formfield';
39
40
  export { PnSpotlight as PnParcelTracker } from '../types/components/cta/pn-parcel-tracker/pn-parcel-tracker';
40
41
  export { PnPexPricefinder as PnPexPricefinder } from '../types/components/widgets/pn-pex-pricefinder/pn-pex-pricefinder';
41
42
  export { PnPlayOnScroll as PnPlayOnScroll } from '../types/components/animation/pn-play-on-scroll/pn-play-on-scroll';
@@ -1,4 +1,5 @@
1
1
  export { setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
2
+ export { PnAddressAutofill, defineCustomElement as defineCustomElementPnAddressAutofill } from './pn-address-autofill.js';
2
3
  export { PnAnimatedTile, defineCustomElement as defineCustomElementPnAnimatedTile } from './pn-animated-tile.js';
3
4
  export { PnAppBanner, defineCustomElement as defineCustomElementPnAppBanner } from './pn-app-banner.js';
4
5
  export { PnBonusProgressbar, defineCustomElement as defineCustomElementPnBonusProgressbar } from './pn-bonus-progressbar.js';
@@ -1,59 +1,70 @@
1
- import { c as createCommonjsModule } from './_commonjsHelpers.js';
1
+ /**
2
+ * Returns a function, that, as long as it continues to be invoked, will not
3
+ * be triggered. The function will be called after it stops being called for
4
+ * N milliseconds. If `immediate` is passed, trigger the function on the
5
+ * leading edge, instead of the trailing. The function also has a property 'clear'
6
+ * that is a function which will clear the timer to prevent previously scheduled executions.
7
+ *
8
+ * @source underscore.js
9
+ * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/
10
+ * @param {Function} function to wrap
11
+ * @param {Number} timeout in ms (`100`)
12
+ * @param {Boolean} whether to execute at the beginning (`false`)
13
+ * @api public
14
+ */
15
+ function debounce(func, wait, immediate){
16
+ var timeout, args, context, timestamp, result;
17
+ if (null == wait) wait = 100;
2
18
 
3
- var classnames = createCommonjsModule(function (module) {
4
- /*!
5
- Copyright (c) 2018 Jed Watson.
6
- Licensed under the MIT License (MIT), see
7
- http://jedwatson.github.io/classnames
8
- */
9
- /* global define */
19
+ function later() {
20
+ var last = Date.now() - timestamp;
10
21
 
11
- (function () {
22
+ if (last < wait && last >= 0) {
23
+ timeout = setTimeout(later, wait - last);
24
+ } else {
25
+ timeout = null;
26
+ if (!immediate) {
27
+ result = func.apply(context, args);
28
+ context = args = null;
29
+ }
30
+ }
31
+ }
32
+ var debounced = function(){
33
+ context = this;
34
+ args = arguments;
35
+ timestamp = Date.now();
36
+ var callNow = immediate && !timeout;
37
+ if (!timeout) timeout = setTimeout(later, wait);
38
+ if (callNow) {
39
+ result = func.apply(context, args);
40
+ context = args = null;
41
+ }
12
42
 
13
- var hasOwn = {}.hasOwnProperty;
43
+ return result;
44
+ };
14
45
 
15
- function classNames() {
16
- var classes = [];
46
+ debounced.clear = function() {
47
+ if (timeout) {
48
+ clearTimeout(timeout);
49
+ timeout = null;
50
+ }
51
+ };
52
+
53
+ debounced.flush = function() {
54
+ if (timeout) {
55
+ result = func.apply(context, args);
56
+ context = args = null;
57
+
58
+ clearTimeout(timeout);
59
+ timeout = null;
60
+ }
61
+ };
17
62
 
18
- for (var i = 0; i < arguments.length; i++) {
19
- var arg = arguments[i];
20
- if (!arg) continue;
63
+ return debounced;
64
+ }
65
+ // Adds compatibility for ES modules
66
+ debounce.debounce = debounce;
21
67
 
22
- var argType = typeof arg;
68
+ var debounce_1 = debounce;
23
69
 
24
- if (argType === 'string' || argType === 'number') {
25
- classes.push(arg);
26
- } else if (Array.isArray(arg)) {
27
- if (arg.length) {
28
- var inner = classNames.apply(null, arg);
29
- if (inner) {
30
- classes.push(inner);
31
- }
32
- }
33
- } else if (argType === 'object') {
34
- if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
35
- classes.push(arg.toString());
36
- continue;
37
- }
38
-
39
- for (var key in arg) {
40
- if (hasOwn.call(arg, key) && arg[key]) {
41
- classes.push(key);
42
- }
43
- }
44
- }
45
- }
46
-
47
- return classes.join(' ');
48
- }
49
-
50
- if (module.exports) {
51
- classNames.default = classNames;
52
- module.exports = classNames;
53
- } else {
54
- window.classNames = classNames;
55
- }
56
- }());
57
- });
58
-
59
- export { classnames as c };
70
+ export { debounce_1 as d };
@@ -1,70 +1,59 @@
1
- /**
2
- * Returns a function, that, as long as it continues to be invoked, will not
3
- * be triggered. The function will be called after it stops being called for
4
- * N milliseconds. If `immediate` is passed, trigger the function on the
5
- * leading edge, instead of the trailing. The function also has a property 'clear'
6
- * that is a function which will clear the timer to prevent previously scheduled executions.
7
- *
8
- * @source underscore.js
9
- * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/
10
- * @param {Function} function to wrap
11
- * @param {Number} timeout in ms (`100`)
12
- * @param {Boolean} whether to execute at the beginning (`false`)
13
- * @api public
14
- */
15
- function debounce(func, wait, immediate){
16
- var timeout, args, context, timestamp, result;
17
- if (null == wait) wait = 100;
1
+ import { c as createCommonjsModule } from './_commonjsHelpers.js';
18
2
 
19
- function later() {
20
- var last = Date.now() - timestamp;
3
+ var classnames = createCommonjsModule(function (module) {
4
+ /*!
5
+ Copyright (c) 2018 Jed Watson.
6
+ Licensed under the MIT License (MIT), see
7
+ http://jedwatson.github.io/classnames
8
+ */
9
+ /* global define */
21
10
 
22
- if (last < wait && last >= 0) {
23
- timeout = setTimeout(later, wait - last);
24
- } else {
25
- timeout = null;
26
- if (!immediate) {
27
- result = func.apply(context, args);
28
- context = args = null;
29
- }
30
- }
31
- }
32
- var debounced = function(){
33
- context = this;
34
- args = arguments;
35
- timestamp = Date.now();
36
- var callNow = immediate && !timeout;
37
- if (!timeout) timeout = setTimeout(later, wait);
38
- if (callNow) {
39
- result = func.apply(context, args);
40
- context = args = null;
41
- }
11
+ (function () {
42
12
 
43
- return result;
44
- };
13
+ var hasOwn = {}.hasOwnProperty;
45
14
 
46
- debounced.clear = function() {
47
- if (timeout) {
48
- clearTimeout(timeout);
49
- timeout = null;
50
- }
51
- };
52
-
53
- debounced.flush = function() {
54
- if (timeout) {
55
- result = func.apply(context, args);
56
- context = args = null;
57
-
58
- clearTimeout(timeout);
59
- timeout = null;
60
- }
61
- };
15
+ function classNames() {
16
+ var classes = [];
62
17
 
63
- return debounced;
64
- }
65
- // Adds compatibility for ES modules
66
- debounce.debounce = debounce;
18
+ for (var i = 0; i < arguments.length; i++) {
19
+ var arg = arguments[i];
20
+ if (!arg) continue;
67
21
 
68
- var debounce_1 = debounce;
22
+ var argType = typeof arg;
69
23
 
70
- export { debounce_1 as d };
24
+ if (argType === 'string' || argType === 'number') {
25
+ classes.push(arg);
26
+ } else if (Array.isArray(arg)) {
27
+ if (arg.length) {
28
+ var inner = classNames.apply(null, arg);
29
+ if (inner) {
30
+ classes.push(inner);
31
+ }
32
+ }
33
+ } else if (argType === 'object') {
34
+ if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
35
+ classes.push(arg.toString());
36
+ continue;
37
+ }
38
+
39
+ for (var key in arg) {
40
+ if (hasOwn.call(arg, key) && arg[key]) {
41
+ classes.push(key);
42
+ }
43
+ }
44
+ }
45
+ }
46
+
47
+ return classes.join(' ');
48
+ }
49
+
50
+ if (module.exports) {
51
+ classNames.default = classNames;
52
+ module.exports = classNames;
53
+ } else {
54
+ window.classNames = classNames;
55
+ }
56
+ }());
57
+ });
58
+
59
+ export { classnames as c };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface PnAddressAutofill extends Components.PnAddressAutofill, HTMLElement {}
4
+ export const PnAddressAutofill: {
5
+ prototype: PnAddressAutofill;
6
+ new (): PnAddressAutofill;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;