@everymatrix/lottery-pagination 1.54.12 → 1.55.0

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 (33) hide show
  1. package/dist/cjs/{index-ddbadb0f.js → index-6e6ef6de.js} +67 -168
  2. package/dist/cjs/index.cjs.js +2 -2
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{lottery-pagination-038b9722.js → lottery-pagination-a3dc058a.js} +22 -51
  5. package/dist/cjs/lottery-pagination.cjs.entry.js +2 -2
  6. package/dist/cjs/lottery-pagination.cjs.js +2 -2
  7. package/dist/collection/collection-manifest.json +1 -1
  8. package/dist/collection/components/lottery-pagination/lottery-pagination.js +21 -76
  9. package/dist/esm/{index-893d5ea1.js → index-d339423e.js} +67 -168
  10. package/dist/esm/index.js +2 -2
  11. package/dist/esm/loader.js +2 -2
  12. package/dist/esm/{lottery-pagination-d8ef15e4.js → lottery-pagination-55f8c7a0.js} +22 -51
  13. package/dist/esm/lottery-pagination.entry.js +2 -2
  14. package/dist/esm/lottery-pagination.js +3 -3
  15. package/dist/lottery-pagination/index.esm.js +1 -1
  16. package/dist/lottery-pagination/lottery-pagination.esm.js +1 -1
  17. package/dist/lottery-pagination/p-70ca4bf8.js +1 -0
  18. package/dist/lottery-pagination/p-fa51c61f.js +2 -0
  19. package/dist/lottery-pagination/p-fad681ff.entry.js +1 -0
  20. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/lottery-pagination/.stencil/packages/stencil/lottery-pagination/stencil.config.d.ts +2 -0
  21. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/lottery-pagination/.stencil/packages/stencil/lottery-pagination/stencil.config.dev.d.ts +2 -0
  22. package/package.json +1 -1
  23. package/dist/lottery-pagination/p-5eeb537f.js +0 -2
  24. package/dist/lottery-pagination/p-6bb4c606.js +0 -1
  25. package/dist/lottery-pagination/p-716cfefa.entry.js +0 -1
  26. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-pagination/.stencil/packages/stencil/lottery-pagination/stencil.config.d.ts +0 -2
  27. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-pagination/.stencil/packages/stencil/lottery-pagination/stencil.config.dev.d.ts +0 -2
  28. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/lottery-pagination/.stencil/packages/stencil/lottery-pagination/storybook/main.d.ts +0 -0
  29. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/lottery-pagination/.stencil/packages/stencil/lottery-pagination/storybook/preview.d.ts +0 -0
  30. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/lottery-pagination/.stencil/tools/plugins/index.d.ts +0 -0
  31. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/lottery-pagination/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  32. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/lottery-pagination/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  33. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/lottery-pagination/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -3,58 +3,8 @@ import { isMobile } from "../../utils/utils";
3
3
  import { translate, getTranslations } from "../../utils/locale.utils";
4
4
  export class LotteryPagination {
5
5
  constructor() {
6
- /**
7
- * Next page string value - determines if the next page is disabled or active
8
- */
9
- this.nextPage = false;
10
- /**
11
- * Previous page string value - determines if the previous page is disabled or active
12
- */
13
- this.prevPage = false;
14
- /**
15
- * The received offset
16
- */
17
- this.offset = 0;
18
- /**
19
- * The received limit for the number of pages
20
- */
21
- this.limit = 10;
22
- /**
23
- * The received total number of pages
24
- */
25
- this.total = 1;
26
- /**
27
- * Language
28
- */
29
- this.language = 'en';
30
- /**
31
- * Client custom styling via string
32
- */
33
- this.clientStyling = '';
34
- /**
35
- * Client custom styling via url content
36
- */
37
- this.clientStylingUrlContent = '';
38
- this.isReset = false;
39
- /**
40
- * Component working variable for last page
41
- */
42
- this.lastPage = false;
43
- /**
44
- * Component working variable for prvious page
45
- */
46
- this.previousPage = false;
47
- /**
48
- * In component working variable for the array of pages
49
- */
50
- this.pagesArray = [];
51
- /**
52
- * In component working variable for last page
53
- */
54
- this.endInt = 0;
55
6
  this.userAgent = window.navigator.userAgent;
56
7
  this.currentPage = 1;
57
- this.limitStylingAppends = false;
58
8
  /**
59
9
  * Navigation logic
60
10
  */
@@ -132,6 +82,27 @@ export class LotteryPagination {
132
82
  this.stylingContainer.prepend(cssFile);
133
83
  }, 1);
134
84
  };
85
+ this.nextPage = false;
86
+ this.prevPage = false;
87
+ this.offset = 0;
88
+ this.limit = 10;
89
+ this.total = 1;
90
+ this.language = 'en';
91
+ this.clientStyling = '';
92
+ this.clientStylingUrlContent = '';
93
+ this.arrowsActive = undefined;
94
+ this.secondaryArrowsActive = undefined;
95
+ this.numberedNavActive = undefined;
96
+ this.isReset = false;
97
+ this.translationUrl = undefined;
98
+ this.offsetInt = undefined;
99
+ this.lastPage = false;
100
+ this.previousPage = false;
101
+ this.limitInt = undefined;
102
+ this.totalInt = undefined;
103
+ this.pagesArray = [];
104
+ this.endInt = 0;
105
+ this.limitStylingAppends = false;
135
106
  }
136
107
  componentWillLoad() {
137
108
  if (this.translationUrl) {
@@ -241,8 +212,6 @@ export class LotteryPagination {
241
212
  "tags": [],
242
213
  "text": "Next page string value - determines if the next page is disabled or active"
243
214
  },
244
- "getter": false,
245
- "setter": false,
246
215
  "attribute": "next-page",
247
216
  "reflect": true,
248
217
  "defaultValue": "false"
@@ -261,8 +230,6 @@ export class LotteryPagination {
261
230
  "tags": [],
262
231
  "text": "Previous page string value - determines if the previous page is disabled or active"
263
232
  },
264
- "getter": false,
265
- "setter": false,
266
233
  "attribute": "prev-page",
267
234
  "reflect": true,
268
235
  "defaultValue": "false"
@@ -281,8 +248,6 @@ export class LotteryPagination {
281
248
  "tags": [],
282
249
  "text": "The received offset"
283
250
  },
284
- "getter": false,
285
- "setter": false,
286
251
  "attribute": "offset",
287
252
  "reflect": true,
288
253
  "defaultValue": "0"
@@ -301,8 +266,6 @@ export class LotteryPagination {
301
266
  "tags": [],
302
267
  "text": "The received limit for the number of pages"
303
268
  },
304
- "getter": false,
305
- "setter": false,
306
269
  "attribute": "limit",
307
270
  "reflect": true,
308
271
  "defaultValue": "10"
@@ -321,8 +284,6 @@ export class LotteryPagination {
321
284
  "tags": [],
322
285
  "text": "The received total number of pages"
323
286
  },
324
- "getter": false,
325
- "setter": false,
326
287
  "attribute": "total",
327
288
  "reflect": true,
328
289
  "defaultValue": "1"
@@ -341,8 +302,6 @@ export class LotteryPagination {
341
302
  "tags": [],
342
303
  "text": "Language"
343
304
  },
344
- "getter": false,
345
- "setter": false,
346
305
  "attribute": "language",
347
306
  "reflect": true,
348
307
  "defaultValue": "'en'"
@@ -361,8 +320,6 @@ export class LotteryPagination {
361
320
  "tags": [],
362
321
  "text": "Client custom styling via string"
363
322
  },
364
- "getter": false,
365
- "setter": false,
366
323
  "attribute": "client-styling",
367
324
  "reflect": true,
368
325
  "defaultValue": "''"
@@ -381,8 +338,6 @@ export class LotteryPagination {
381
338
  "tags": [],
382
339
  "text": "Client custom styling via url content"
383
340
  },
384
- "getter": false,
385
- "setter": false,
386
341
  "attribute": "client-styling-url-content",
387
342
  "reflect": true,
388
343
  "defaultValue": "''"
@@ -401,8 +356,6 @@ export class LotteryPagination {
401
356
  "tags": [],
402
357
  "text": "Customize pagination: Activate pagination arrows"
403
358
  },
404
- "getter": false,
405
- "setter": false,
406
359
  "attribute": "arrows-active",
407
360
  "reflect": true
408
361
  },
@@ -420,8 +373,6 @@ export class LotteryPagination {
420
373
  "tags": [],
421
374
  "text": "Customize pagination: Activate pagination secondary arrows"
422
375
  },
423
- "getter": false,
424
- "setter": false,
425
376
  "attribute": "secondary-arrows-active",
426
377
  "reflect": true
427
378
  },
@@ -439,8 +390,6 @@ export class LotteryPagination {
439
390
  "tags": [],
440
391
  "text": "Customize pagination: Activate pagination numbered navigation"
441
392
  },
442
- "getter": false,
443
- "setter": false,
444
393
  "attribute": "numbered-nav-active",
445
394
  "reflect": true
446
395
  },
@@ -458,8 +407,6 @@ export class LotteryPagination {
458
407
  "tags": [],
459
408
  "text": ""
460
409
  },
461
- "getter": false,
462
- "setter": false,
463
410
  "attribute": "is-reset",
464
411
  "reflect": true,
465
412
  "defaultValue": "false"
@@ -478,8 +425,6 @@ export class LotteryPagination {
478
425
  "tags": [],
479
426
  "text": "Translations via parent component"
480
427
  },
481
- "getter": false,
482
- "setter": false,
483
428
  "attribute": "translation-url",
484
429
  "reflect": true
485
430
  }
@@ -1,21 +1,17 @@
1
1
  const NAMESPACE = 'lottery-pagination';
2
- const BUILD = /* lottery-pagination */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
2
+ const BUILD = /* lottery-pagination */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
3
3
 
4
4
  /*
5
- Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
  var __defProp = Object.defineProperty;
8
8
  var __export = (target, all) => {
9
9
  for (var name in all)
10
10
  __defProp(target, name, { get: all[name], enumerable: true });
11
11
  };
12
-
13
- // src/client/client-host-ref.ts
14
12
  var hostRefs = /* @__PURE__ */ new WeakMap();
15
13
  var getHostRef = (ref) => hostRefs.get(ref);
16
- var registerInstance = (lazyInstance, hostRef) => {
17
- hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
18
- };
14
+ var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
19
15
  var registerHost = (hostElement, cmpMeta) => {
20
16
  const hostRef = {
21
17
  $flags$: 0,
@@ -28,8 +24,7 @@ var registerHost = (hostElement, cmpMeta) => {
28
24
  hostElement["s-p"] = [];
29
25
  hostElement["s-rc"] = [];
30
26
  }
31
- const ref = hostRefs.set(hostElement, hostRef);
32
- return ref;
27
+ return hostRefs.set(hostElement, hostRef);
33
28
  };
34
29
  var isMemberInElement = (elm, memberName) => memberName in elm;
35
30
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -66,22 +61,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
66
61
  /* webpackExclude: /\.system\.entry\.js$/ */
67
62
  /* webpackMode: "lazy" */
68
63
  `./${bundleId}.entry.js${""}`
69
- ).then(
70
- (importedModule) => {
71
- {
72
- cmpModules.set(bundleId, importedModule);
73
- }
74
- return importedModule[exportName];
75
- },
76
- (e) => {
77
- consoleError(e, hostRef.$hostElement$);
64
+ ).then((importedModule) => {
65
+ {
66
+ cmpModules.set(bundleId, importedModule);
78
67
  }
79
- );
68
+ return importedModule[exportName];
69
+ }, consoleError);
80
70
  };
81
71
 
82
72
  // src/client/client-style.ts
83
73
  var styles = /* @__PURE__ */ new Map();
84
- var HYDRATED_STYLE_ID = "sty-id";
85
74
  var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
86
75
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
87
76
  var win = typeof window !== "undefined" ? window : {};
@@ -139,6 +128,12 @@ var flush = () => {
139
128
  };
140
129
  var nextTick = (cb) => promiseResolve().then(cb);
141
130
  var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
131
+
132
+ // src/utils/constants.ts
133
+ var EMPTY_OBJ = {};
134
+
135
+ // src/utils/helpers.ts
136
+ var isDef = (v) => v != null;
142
137
  var isComplexType = (o) => {
143
138
  o = typeof o;
144
139
  return o === "object" || o === "function";
@@ -332,7 +327,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
332
327
  }
333
328
  if (!appliedStyles.has(scopeId2)) {
334
329
  {
335
- styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
330
+ styleElm = doc.createElement("style");
336
331
  styleElm.innerHTML = style;
337
332
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
338
333
  if (nonce != null) {
@@ -342,10 +337,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
342
337
  if (styleContainerNode.nodeName === "HEAD") {
343
338
  const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
344
339
  const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
345
- styleContainerNode.insertBefore(
346
- styleElm,
347
- (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
348
- );
340
+ styleContainerNode.insertBefore(styleElm, referenceNode2);
349
341
  } else if ("host" in styleContainerNode) {
350
342
  if (supportsConstructableStylesheets) {
351
343
  const stylesheet = new CSSStyleSheet();
@@ -363,7 +355,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
363
355
  styleContainerNode.append(styleElm);
364
356
  }
365
357
  }
366
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
358
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
367
359
  styleContainerNode.insertBefore(styleElm, null);
368
360
  }
369
361
  }
@@ -388,25 +380,23 @@ var attachStyles = (hostRef) => {
388
380
  const scopeId2 = addStyle(
389
381
  elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
390
382
  cmpMeta);
391
- if ((flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */ || flags & 128 /* shadowNeedsScopedCss */)) {
383
+ if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
392
384
  elm["s-sc"] = scopeId2;
393
385
  elm.classList.add(scopeId2 + "-h");
394
386
  }
395
387
  endAttachStyles();
396
388
  };
397
389
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
398
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
390
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
399
391
  if (oldValue !== newValue) {
400
392
  let isProp = isMemberInElement(elm, memberName);
401
393
  let ln = memberName.toLowerCase();
402
394
  if (memberName === "class") {
403
395
  const classList = elm.classList;
404
396
  const oldClasses = parseClassList(oldValue);
405
- let newClasses = parseClassList(newValue);
406
- {
407
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
408
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
409
- }
397
+ const newClasses = parseClassList(newValue);
398
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
399
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
410
400
  } else if (memberName === "ref") {
411
401
  if (newValue) {
412
402
  newValue(elm);
@@ -444,7 +434,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
444
434
  elm.setAttribute(memberName, n);
445
435
  }
446
436
  }
447
- } else if (elm[memberName] !== newValue) {
437
+ } else {
448
438
  elm[memberName] = newValue;
449
439
  }
450
440
  } catch (e) {
@@ -466,44 +456,24 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
466
456
  }
467
457
  };
468
458
  var parseClassListRegex = /\s/;
469
- var parseClassList = (value) => {
470
- if (typeof value === "object" && value && "baseVal" in value) {
471
- value = value.baseVal;
472
- }
473
- if (!value || typeof value !== "string") {
474
- return [];
475
- }
476
- return value.split(parseClassListRegex);
477
- };
459
+ var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
478
460
  var CAPTURE_EVENT_SUFFIX = "Capture";
479
461
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
480
462
 
481
463
  // src/runtime/vdom/update-element.ts
482
- var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
464
+ var updateElement = (oldVnode, newVnode, isSvgMode2) => {
483
465
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
484
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
485
- const newVnodeAttrs = newVnode.$attrs$ || {};
466
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
467
+ const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
486
468
  {
487
469
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
488
470
  if (!(memberName in newVnodeAttrs)) {
489
- setAccessor(
490
- elm,
491
- memberName,
492
- oldVnodeAttrs[memberName],
493
- void 0,
494
- isSvgMode2,
495
- newVnode.$flags$);
471
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
496
472
  }
497
473
  }
498
474
  }
499
475
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
500
- setAccessor(
501
- elm,
502
- memberName,
503
- oldVnodeAttrs[memberName],
504
- newVnodeAttrs[memberName],
505
- isSvgMode2,
506
- newVnode.$flags$);
476
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
507
477
  }
508
478
  };
509
479
  function sortedAttrNames(attrNames) {
@@ -515,10 +485,13 @@ function sortedAttrNames(attrNames) {
515
485
  attrNames
516
486
  );
517
487
  }
488
+
489
+ // src/runtime/vdom/vdom-render.ts
490
+ var scopeId;
518
491
  var hostTagName;
519
492
  var useNativeShadowDom = false;
520
493
  var isSvgMode = false;
521
- var createElm = (oldParentVNode, newParentVNode, childIndex) => {
494
+ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
522
495
  const newVNode2 = newParentVNode.$children$[childIndex];
523
496
  let i2 = 0;
524
497
  let elm;
@@ -532,6 +505,11 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
532
505
  {
533
506
  updateElement(null, newVNode2, isSvgMode);
534
507
  }
508
+ const rootNode = elm.getRootNode();
509
+ const isElementWithinShadowRoot = !rootNode.querySelector("body");
510
+ if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
511
+ elm.classList.add(elm["s-si"] = scopeId);
512
+ }
535
513
  if (newVNode2.$children$) {
536
514
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
537
515
  childNode = createElm(oldParentVNode, newVNode2, i2);
@@ -636,9 +614,6 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
636
614
  };
637
615
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
638
616
  if (leftVNode.$tag$ === rightVNode.$tag$) {
639
- if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
640
- leftVNode.$key$ = rightVNode.$key$;
641
- }
642
617
  return true;
643
618
  }
644
619
  return false;
@@ -678,9 +653,8 @@ var nullifyVNodeRefs = (vNode) => {
678
653
  }
679
654
  };
680
655
  var insertBefore = (parent, newNode, reference) => {
681
- {
682
- return parent == null ? void 0 : parent.insertBefore(newNode, reference);
683
- }
656
+ const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
657
+ return inserted;
684
658
  };
685
659
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
686
660
  const hostElm = hostRef.$hostElement$;
@@ -705,21 +679,17 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
705
679
  rootVnode.$flags$ |= 4 /* isHost */;
706
680
  hostRef.$vnode$ = rootVnode;
707
681
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
708
- useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
682
+ {
683
+ scopeId = hostElm["s-sc"];
684
+ }
685
+ useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
709
686
  patch(oldVNode, rootVnode, isInitialLoad);
710
687
  };
711
688
 
712
689
  // src/runtime/update-component.ts
713
690
  var attachToAncestor = (hostRef, ancestorComponent) => {
714
691
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
715
- const index = ancestorComponent["s-p"].push(
716
- new Promise(
717
- (r) => hostRef.$onRenderResolve$ = () => {
718
- ancestorComponent["s-p"].splice(index - 1, 1);
719
- r();
720
- }
721
- )
722
- );
692
+ ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
723
693
  }
724
694
  };
725
695
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -746,11 +716,11 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
746
716
  let maybePromise;
747
717
  if (isInitialLoad) {
748
718
  {
749
- maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
719
+ maybePromise = safeCall(instance, "componentWillLoad");
750
720
  }
751
721
  }
752
722
  {
753
- maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
723
+ maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
754
724
  }
755
725
  endSchedule();
756
726
  return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
@@ -818,7 +788,7 @@ var postUpdateComponent = (hostRef) => {
818
788
  const instance = hostRef.$lazyInstance$ ;
819
789
  const ancestorComponent = hostRef.$ancestorComponent$;
820
790
  {
821
- safeCall(instance, "componentDidRender", void 0, elm);
791
+ safeCall(instance, "componentDidRender");
822
792
  }
823
793
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
824
794
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
@@ -847,14 +817,17 @@ var postUpdateComponent = (hostRef) => {
847
817
  }
848
818
  };
849
819
  var appDidLoad = (who) => {
820
+ {
821
+ addHydratedFlag(doc.documentElement);
822
+ }
850
823
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
851
824
  };
852
- var safeCall = (instance, method, arg, elm) => {
825
+ var safeCall = (instance, method, arg) => {
853
826
  if (instance && instance[method]) {
854
827
  try {
855
828
  return instance[method](arg);
856
829
  } catch (e) {
857
- consoleError(e, elm);
830
+ consoleError(e);
858
831
  }
859
832
  }
860
833
  return void 0;
@@ -897,68 +870,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
897
870
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
898
871
  members.map(([memberName, [memberFlags]]) => {
899
872
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
900
- const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
901
- if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
902
- if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
903
- if (flags & 1 /* isElementConstructor */ || !origGetter) {
904
- Object.defineProperty(prototype, memberName, {
905
- get() {
906
- {
907
- if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
908
- return getValue(this, memberName);
909
- }
910
- const ref = getHostRef(this);
911
- const instance = ref ? ref.$lazyInstance$ : prototype;
912
- if (!instance) return;
913
- return instance[memberName];
914
- }
915
- },
916
- configurable: true,
917
- enumerable: true
918
- });
919
- }
920
873
  Object.defineProperty(prototype, memberName, {
874
+ get() {
875
+ return getValue(this, memberName);
876
+ },
921
877
  set(newValue) {
922
- const ref = getHostRef(this);
923
- if (origSetter) {
924
- const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
925
- if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
926
- newValue = ref.$instanceValues$.get(memberName);
927
- } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
928
- ref.$instanceValues$.set(memberName, currentValue);
929
- }
930
- origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
931
- newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
932
- setValue(this, memberName, newValue, cmpMeta);
933
- return;
934
- }
935
- {
936
- if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
937
- setValue(this, memberName, newValue, cmpMeta);
938
- if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
939
- ref.$onReadyPromise$.then(() => {
940
- if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
941
- ref.$lazyInstance$[memberName] = newValue;
942
- }
943
- });
944
- }
945
- return;
946
- }
947
- const setterSetVal = () => {
948
- const currentValue = ref.$lazyInstance$[memberName];
949
- if (!ref.$instanceValues$.get(memberName) && currentValue) {
950
- ref.$instanceValues$.set(memberName, currentValue);
951
- }
952
- ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
953
- setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
954
- };
955
- if (ref.$lazyInstance$) {
956
- setterSetVal();
957
- } else {
958
- ref.$onReadyPromise$.then(() => setterSetVal());
959
- }
960
- }
961
- }
878
+ setValue(this, memberName, newValue, cmpMeta);
879
+ },
880
+ configurable: true,
881
+ enumerable: true
962
882
  });
963
883
  }
964
884
  });
@@ -968,7 +888,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
968
888
  plt.jmp(() => {
969
889
  var _a2;
970
890
  const propName = attrNameToPropName.get(attrName);
971
- if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
891
+ if (this.hasOwnProperty(propName)) {
972
892
  newValue = this[propName];
973
893
  delete this[propName];
974
894
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -988,11 +908,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
988
908
  }
989
909
  return;
990
910
  }
991
- const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
992
- newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
993
- if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
994
- this[propName] = newValue;
995
- }
911
+ this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
996
912
  });
997
913
  };
998
914
  Cstr.observedAttributes = Array.from(
@@ -1021,7 +937,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1021
937
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1022
938
  const bundleId = cmpMeta.$lazyBundleId$;
1023
939
  if (bundleId) {
1024
- const CstrImport = loadModule(cmpMeta, hostRef);
940
+ const CstrImport = loadModule(cmpMeta);
1025
941
  if (CstrImport && "then" in CstrImport) {
1026
942
  const endLoad = uniqueTime();
1027
943
  Cstr = await CstrImport;
@@ -1043,7 +959,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1043
959
  try {
1044
960
  new Cstr(hostRef);
1045
961
  } catch (e) {
1046
- consoleError(e, elm);
962
+ consoleError(e);
1047
963
  }
1048
964
  {
1049
965
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
@@ -1075,7 +991,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1075
991
  schedule();
1076
992
  }
1077
993
  };
1078
- var fireConnectedCallback = (instance, elm) => {
994
+ var fireConnectedCallback = (instance) => {
1079
995
  };
1080
996
 
1081
997
  // src/runtime/connected-callback.ts
@@ -1115,7 +1031,7 @@ var connectedCallback = (elm) => {
1115
1031
  endConnected();
1116
1032
  }
1117
1033
  };
1118
- var disconnectInstance = (instance, elm) => {
1034
+ var disconnectInstance = (instance) => {
1119
1035
  };
1120
1036
  var disconnectedCallback = async (elm) => {
1121
1037
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
@@ -1124,12 +1040,6 @@ var disconnectedCallback = async (elm) => {
1124
1040
  hostRef.$onReadyPromise$.then(() => disconnectInstance());
1125
1041
  }
1126
1042
  }
1127
- if (rootAppliedStyles.has(elm)) {
1128
- rootAppliedStyles.delete(elm);
1129
- }
1130
- if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1131
- rootAppliedStyles.delete(elm.shadowRoot);
1132
- }
1133
1043
  };
1134
1044
 
1135
1045
  // src/runtime/bootstrap-lazy.ts
@@ -1206,17 +1116,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1206
1116
  }
1207
1117
  disconnectedCallback() {
1208
1118
  plt.jmp(() => disconnectedCallback(this));
1209
- plt.raf(() => {
1210
- var _a3;
1211
- const hostRef = getHostRef(this);
1212
- const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
1213
- if (i2 > -1) {
1214
- deferredConnectedCallbacks.splice(i2, 1);
1215
- }
1216
- if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1217
- delete hostRef.$vnode$.$elm$;
1218
- }
1219
- });
1220
1119
  }
1221
1120
  componentOnReady() {
1222
1121
  return getHostRef(this).$onReadyPromise$;
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { L as LotteryPagination } from './lottery-pagination-d8ef15e4.js';
2
- import './index-893d5ea1.js';
1
+ export { L as LotteryPagination } from './lottery-pagination-55f8c7a0.js';
2
+ import './index-d339423e.js';