@everymatrix/helper-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.
- package/dist/cjs/helper-pagination.cjs.entry.js +20 -50
- package/dist/cjs/helper-pagination.cjs.js +2 -2
- package/dist/cjs/{index-3188ceac.js → index-502d881b.js} +66 -167
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/helper-pagination/helper-pagination.js +19 -71
- package/dist/esm/helper-pagination.entry.js +20 -50
- package/dist/esm/helper-pagination.js +3 -3
- package/dist/esm/{index-a5b73fb3.js → index-79ce7f1f.js} +66 -167
- package/dist/esm/loader.js +2 -2
- package/dist/helper-pagination/helper-pagination.esm.js +1 -1
- package/dist/helper-pagination/p-a3272d7a.entry.js +1 -0
- package/dist/helper-pagination/p-ddd49f2d.js +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/helper-pagination/.stencil/packages/stencil/helper-pagination/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/helper-pagination/.stencil/packages/stencil/helper-pagination/stencil.config.dev.d.ts +2 -0
- package/package.json +1 -1
- package/dist/helper-pagination/p-1fe6bfca.entry.js +0 -1
- package/dist/helper-pagination/p-65ba28c7.js +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/helper-pagination/.stencil/packages/stencil/helper-pagination/stencil.config.d.ts +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/helper-pagination/.stencil/packages/stencil/helper-pagination/stencil.config.dev.d.ts +0 -2
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/helper-pagination/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/helper-pagination/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/helper-pagination/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/helper-pagination/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-502d881b.js');
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @name isMobile
|
|
@@ -68,57 +68,8 @@ const HelperPagination = class {
|
|
|
68
68
|
constructor(hostRef) {
|
|
69
69
|
index.registerInstance(this, hostRef);
|
|
70
70
|
this.hpPageChange = index.createEvent(this, "hpPageChange", 7);
|
|
71
|
-
/**
|
|
72
|
-
* Next page string value - determines if the next page is disabled or active
|
|
73
|
-
*/
|
|
74
|
-
this.nextPage = '';
|
|
75
|
-
/**
|
|
76
|
-
* Previous page string value - determines if the previous page is disabled or active
|
|
77
|
-
*/
|
|
78
|
-
this.prevPage = '';
|
|
79
|
-
/**
|
|
80
|
-
* The received offset
|
|
81
|
-
*/
|
|
82
|
-
this.offset = 0;
|
|
83
|
-
/**
|
|
84
|
-
* The received limit for the number of pages
|
|
85
|
-
*/
|
|
86
|
-
this.limit = 1;
|
|
87
|
-
/**
|
|
88
|
-
* The received total number of pages
|
|
89
|
-
*/
|
|
90
|
-
this.total = 1;
|
|
91
|
-
/**
|
|
92
|
-
* Language
|
|
93
|
-
*/
|
|
94
|
-
this.language = 'en';
|
|
95
|
-
/**
|
|
96
|
-
* Client custom styling via string
|
|
97
|
-
*/
|
|
98
|
-
this.clientStyling = '';
|
|
99
|
-
/**
|
|
100
|
-
* Client custom styling via url content
|
|
101
|
-
*/
|
|
102
|
-
this.clientStylingUrlContent = '';
|
|
103
|
-
/**
|
|
104
|
-
* Component working variable for last page
|
|
105
|
-
*/
|
|
106
|
-
this.lastPage = false;
|
|
107
|
-
/**
|
|
108
|
-
* Component working variable for prvious page
|
|
109
|
-
*/
|
|
110
|
-
this.previousPage = false;
|
|
111
|
-
/**
|
|
112
|
-
* In component working variable for the array of pages
|
|
113
|
-
*/
|
|
114
|
-
this.pagesArray = [];
|
|
115
|
-
/**
|
|
116
|
-
* In component working variable for last page
|
|
117
|
-
*/
|
|
118
|
-
this.endInt = 0;
|
|
119
71
|
this.userAgent = window.navigator.userAgent;
|
|
120
72
|
this.currentPage = 1;
|
|
121
|
-
this.limitStylingAppends = false;
|
|
122
73
|
/**
|
|
123
74
|
* Navigation logic
|
|
124
75
|
*/
|
|
@@ -187,6 +138,25 @@ const HelperPagination = class {
|
|
|
187
138
|
this.stylingContainer.prepend(cssFile);
|
|
188
139
|
}, 1);
|
|
189
140
|
};
|
|
141
|
+
this.nextPage = '';
|
|
142
|
+
this.prevPage = '';
|
|
143
|
+
this.offset = 0;
|
|
144
|
+
this.limit = 1;
|
|
145
|
+
this.total = 1;
|
|
146
|
+
this.language = 'en';
|
|
147
|
+
this.clientStyling = '';
|
|
148
|
+
this.clientStylingUrlContent = '';
|
|
149
|
+
this.arrowsActive = undefined;
|
|
150
|
+
this.secondaryArrowsActive = undefined;
|
|
151
|
+
this.numberedNavActive = undefined;
|
|
152
|
+
this.offsetInt = undefined;
|
|
153
|
+
this.lastPage = false;
|
|
154
|
+
this.previousPage = false;
|
|
155
|
+
this.limitInt = undefined;
|
|
156
|
+
this.totalInt = undefined;
|
|
157
|
+
this.pagesArray = [];
|
|
158
|
+
this.endInt = 0;
|
|
159
|
+
this.limitStylingAppends = false;
|
|
190
160
|
}
|
|
191
161
|
componentWillRender() {
|
|
192
162
|
this.offsetInt = this.offset;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-502d881b.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
|
-
Stencil Client Patch Browser v4.
|
|
9
|
+
Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com
|
|
10
10
|
*/
|
|
11
11
|
var patchBrowser = () => {
|
|
12
12
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('helper-pagination.cjs.js', document.baseURI).href));
|
|
@@ -21,23 +21,19 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'helper-pagination';
|
|
24
|
-
const BUILD = /* helper-pagination */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, 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,
|
|
24
|
+
const BUILD = /* helper-pagination */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, 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 };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
27
|
+
Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
|
|
28
28
|
*/
|
|
29
29
|
var __defProp = Object.defineProperty;
|
|
30
30
|
var __export = (target, all) => {
|
|
31
31
|
for (var name in all)
|
|
32
32
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
33
33
|
};
|
|
34
|
-
|
|
35
|
-
// src/client/client-host-ref.ts
|
|
36
34
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
37
35
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
38
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
39
|
-
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
40
|
-
};
|
|
36
|
+
var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
41
37
|
var registerHost = (hostElement, cmpMeta) => {
|
|
42
38
|
const hostRef = {
|
|
43
39
|
$flags$: 0,
|
|
@@ -50,8 +46,7 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
50
46
|
hostElement["s-p"] = [];
|
|
51
47
|
hostElement["s-rc"] = [];
|
|
52
48
|
}
|
|
53
|
-
|
|
54
|
-
return ref;
|
|
49
|
+
return hostRefs.set(hostElement, hostRef);
|
|
55
50
|
};
|
|
56
51
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
57
52
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -88,22 +83,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
88
83
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
89
84
|
/* webpackMode: "lazy" */
|
|
90
85
|
`./${bundleId}.entry.js${""}`
|
|
91
|
-
)); }).then(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
cmpModules.set(bundleId, importedModule);
|
|
95
|
-
}
|
|
96
|
-
return importedModule[exportName];
|
|
97
|
-
},
|
|
98
|
-
(e) => {
|
|
99
|
-
consoleError(e, hostRef.$hostElement$);
|
|
86
|
+
)); }).then((importedModule) => {
|
|
87
|
+
{
|
|
88
|
+
cmpModules.set(bundleId, importedModule);
|
|
100
89
|
}
|
|
101
|
-
|
|
90
|
+
return importedModule[exportName];
|
|
91
|
+
}, consoleError);
|
|
102
92
|
};
|
|
103
93
|
|
|
104
94
|
// src/client/client-style.ts
|
|
105
95
|
var styles = /* @__PURE__ */ new Map();
|
|
106
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
|
107
96
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
108
97
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
109
98
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -161,6 +150,12 @@ var flush = () => {
|
|
|
161
150
|
};
|
|
162
151
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
163
152
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
153
|
+
|
|
154
|
+
// src/utils/constants.ts
|
|
155
|
+
var EMPTY_OBJ = {};
|
|
156
|
+
|
|
157
|
+
// src/utils/helpers.ts
|
|
158
|
+
var isDef = (v) => v != null;
|
|
164
159
|
var isComplexType = (o) => {
|
|
165
160
|
o = typeof o;
|
|
166
161
|
return o === "object" || o === "function";
|
|
@@ -354,7 +349,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
354
349
|
}
|
|
355
350
|
if (!appliedStyles.has(scopeId2)) {
|
|
356
351
|
{
|
|
357
|
-
styleElm =
|
|
352
|
+
styleElm = doc.createElement("style");
|
|
358
353
|
styleElm.innerHTML = style;
|
|
359
354
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
360
355
|
if (nonce != null) {
|
|
@@ -364,10 +359,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
364
359
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
365
360
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
366
361
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
367
|
-
styleContainerNode.insertBefore(
|
|
368
|
-
styleElm,
|
|
369
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
370
|
-
);
|
|
362
|
+
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
371
363
|
} else if ("host" in styleContainerNode) {
|
|
372
364
|
if (supportsConstructableStylesheets) {
|
|
373
365
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -385,7 +377,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
385
377
|
styleContainerNode.append(styleElm);
|
|
386
378
|
}
|
|
387
379
|
}
|
|
388
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
380
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
|
389
381
|
styleContainerNode.insertBefore(styleElm, null);
|
|
390
382
|
}
|
|
391
383
|
}
|
|
@@ -410,25 +402,23 @@ var attachStyles = (hostRef) => {
|
|
|
410
402
|
const scopeId2 = addStyle(
|
|
411
403
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
412
404
|
cmpMeta);
|
|
413
|
-
if (
|
|
405
|
+
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
414
406
|
elm["s-sc"] = scopeId2;
|
|
415
407
|
elm.classList.add(scopeId2 + "-h");
|
|
416
408
|
}
|
|
417
409
|
endAttachStyles();
|
|
418
410
|
};
|
|
419
411
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
420
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags
|
|
412
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
421
413
|
if (oldValue !== newValue) {
|
|
422
414
|
let isProp = isMemberInElement(elm, memberName);
|
|
423
415
|
let ln = memberName.toLowerCase();
|
|
424
416
|
if (memberName === "class") {
|
|
425
417
|
const classList = elm.classList;
|
|
426
418
|
const oldClasses = parseClassList(oldValue);
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
431
|
-
}
|
|
419
|
+
const newClasses = parseClassList(newValue);
|
|
420
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
421
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
432
422
|
} else if (memberName === "ref") {
|
|
433
423
|
if (newValue) {
|
|
434
424
|
newValue(elm);
|
|
@@ -466,7 +456,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
466
456
|
elm.setAttribute(memberName, n);
|
|
467
457
|
}
|
|
468
458
|
}
|
|
469
|
-
} else
|
|
459
|
+
} else {
|
|
470
460
|
elm[memberName] = newValue;
|
|
471
461
|
}
|
|
472
462
|
} catch (e) {
|
|
@@ -488,44 +478,24 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
488
478
|
}
|
|
489
479
|
};
|
|
490
480
|
var parseClassListRegex = /\s/;
|
|
491
|
-
var parseClassList = (value) =>
|
|
492
|
-
if (typeof value === "object" && value && "baseVal" in value) {
|
|
493
|
-
value = value.baseVal;
|
|
494
|
-
}
|
|
495
|
-
if (!value || typeof value !== "string") {
|
|
496
|
-
return [];
|
|
497
|
-
}
|
|
498
|
-
return value.split(parseClassListRegex);
|
|
499
|
-
};
|
|
481
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
500
482
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
501
483
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
502
484
|
|
|
503
485
|
// src/runtime/vdom/update-element.ts
|
|
504
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2
|
|
486
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
505
487
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
506
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
507
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
488
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
489
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
508
490
|
{
|
|
509
491
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
510
492
|
if (!(memberName in newVnodeAttrs)) {
|
|
511
|
-
setAccessor(
|
|
512
|
-
elm,
|
|
513
|
-
memberName,
|
|
514
|
-
oldVnodeAttrs[memberName],
|
|
515
|
-
void 0,
|
|
516
|
-
isSvgMode2,
|
|
517
|
-
newVnode.$flags$);
|
|
493
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
518
494
|
}
|
|
519
495
|
}
|
|
520
496
|
}
|
|
521
497
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
522
|
-
setAccessor(
|
|
523
|
-
elm,
|
|
524
|
-
memberName,
|
|
525
|
-
oldVnodeAttrs[memberName],
|
|
526
|
-
newVnodeAttrs[memberName],
|
|
527
|
-
isSvgMode2,
|
|
528
|
-
newVnode.$flags$);
|
|
498
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
529
499
|
}
|
|
530
500
|
};
|
|
531
501
|
function sortedAttrNames(attrNames) {
|
|
@@ -537,10 +507,13 @@ function sortedAttrNames(attrNames) {
|
|
|
537
507
|
attrNames
|
|
538
508
|
);
|
|
539
509
|
}
|
|
510
|
+
|
|
511
|
+
// src/runtime/vdom/vdom-render.ts
|
|
512
|
+
var scopeId;
|
|
540
513
|
var hostTagName;
|
|
541
514
|
var useNativeShadowDom = false;
|
|
542
515
|
var isSvgMode = false;
|
|
543
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
516
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
544
517
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
545
518
|
let i2 = 0;
|
|
546
519
|
let elm;
|
|
@@ -554,6 +527,11 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
554
527
|
{
|
|
555
528
|
updateElement(null, newVNode2, isSvgMode);
|
|
556
529
|
}
|
|
530
|
+
const rootNode = elm.getRootNode();
|
|
531
|
+
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
532
|
+
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
533
|
+
elm.classList.add(elm["s-si"] = scopeId);
|
|
534
|
+
}
|
|
557
535
|
if (newVNode2.$children$) {
|
|
558
536
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
559
537
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -658,9 +636,6 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
658
636
|
};
|
|
659
637
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
660
638
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
661
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
662
|
-
leftVNode.$key$ = rightVNode.$key$;
|
|
663
|
-
}
|
|
664
639
|
return true;
|
|
665
640
|
}
|
|
666
641
|
return false;
|
|
@@ -700,9 +675,8 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
700
675
|
}
|
|
701
676
|
};
|
|
702
677
|
var insertBefore = (parent, newNode, reference) => {
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
}
|
|
678
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
679
|
+
return inserted;
|
|
706
680
|
};
|
|
707
681
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
708
682
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -727,21 +701,17 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
727
701
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
728
702
|
hostRef.$vnode$ = rootVnode;
|
|
729
703
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
730
|
-
|
|
704
|
+
{
|
|
705
|
+
scopeId = hostElm["s-sc"];
|
|
706
|
+
}
|
|
707
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
731
708
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
732
709
|
};
|
|
733
710
|
|
|
734
711
|
// src/runtime/update-component.ts
|
|
735
712
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
736
713
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
737
|
-
|
|
738
|
-
new Promise(
|
|
739
|
-
(r) => hostRef.$onRenderResolve$ = () => {
|
|
740
|
-
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
741
|
-
r();
|
|
742
|
-
}
|
|
743
|
-
)
|
|
744
|
-
);
|
|
714
|
+
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
|
745
715
|
}
|
|
746
716
|
};
|
|
747
717
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -767,7 +737,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
767
737
|
}
|
|
768
738
|
let maybePromise;
|
|
769
739
|
{
|
|
770
|
-
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"
|
|
740
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
|
|
771
741
|
}
|
|
772
742
|
endSchedule();
|
|
773
743
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
@@ -835,7 +805,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
835
805
|
const instance = hostRef.$lazyInstance$ ;
|
|
836
806
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
837
807
|
{
|
|
838
|
-
safeCall(instance, "componentDidRender"
|
|
808
|
+
safeCall(instance, "componentDidRender");
|
|
839
809
|
}
|
|
840
810
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
841
811
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -864,14 +834,17 @@ var postUpdateComponent = (hostRef) => {
|
|
|
864
834
|
}
|
|
865
835
|
};
|
|
866
836
|
var appDidLoad = (who) => {
|
|
837
|
+
{
|
|
838
|
+
addHydratedFlag(doc.documentElement);
|
|
839
|
+
}
|
|
867
840
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
868
841
|
};
|
|
869
|
-
var safeCall = (instance, method, arg
|
|
842
|
+
var safeCall = (instance, method, arg) => {
|
|
870
843
|
if (instance && instance[method]) {
|
|
871
844
|
try {
|
|
872
845
|
return instance[method](arg);
|
|
873
846
|
} catch (e) {
|
|
874
|
-
consoleError(e
|
|
847
|
+
consoleError(e);
|
|
875
848
|
}
|
|
876
849
|
}
|
|
877
850
|
return void 0;
|
|
@@ -914,68 +887,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
914
887
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
915
888
|
members.map(([memberName, [memberFlags]]) => {
|
|
916
889
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
917
|
-
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
918
|
-
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
919
|
-
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
920
|
-
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
921
|
-
Object.defineProperty(prototype, memberName, {
|
|
922
|
-
get() {
|
|
923
|
-
{
|
|
924
|
-
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
925
|
-
return getValue(this, memberName);
|
|
926
|
-
}
|
|
927
|
-
const ref = getHostRef(this);
|
|
928
|
-
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
929
|
-
if (!instance) return;
|
|
930
|
-
return instance[memberName];
|
|
931
|
-
}
|
|
932
|
-
},
|
|
933
|
-
configurable: true,
|
|
934
|
-
enumerable: true
|
|
935
|
-
});
|
|
936
|
-
}
|
|
937
890
|
Object.defineProperty(prototype, memberName, {
|
|
891
|
+
get() {
|
|
892
|
+
return getValue(this, memberName);
|
|
893
|
+
},
|
|
938
894
|
set(newValue) {
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
newValue = ref.$instanceValues$.get(memberName);
|
|
944
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
945
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
946
|
-
}
|
|
947
|
-
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
948
|
-
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
949
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
950
|
-
return;
|
|
951
|
-
}
|
|
952
|
-
{
|
|
953
|
-
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
954
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
955
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
956
|
-
ref.$onReadyPromise$.then(() => {
|
|
957
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
958
|
-
ref.$lazyInstance$[memberName] = newValue;
|
|
959
|
-
}
|
|
960
|
-
});
|
|
961
|
-
}
|
|
962
|
-
return;
|
|
963
|
-
}
|
|
964
|
-
const setterSetVal = () => {
|
|
965
|
-
const currentValue = ref.$lazyInstance$[memberName];
|
|
966
|
-
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
967
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
968
|
-
}
|
|
969
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
970
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
971
|
-
};
|
|
972
|
-
if (ref.$lazyInstance$) {
|
|
973
|
-
setterSetVal();
|
|
974
|
-
} else {
|
|
975
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
976
|
-
}
|
|
977
|
-
}
|
|
978
|
-
}
|
|
895
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
896
|
+
},
|
|
897
|
+
configurable: true,
|
|
898
|
+
enumerable: true
|
|
979
899
|
});
|
|
980
900
|
}
|
|
981
901
|
});
|
|
@@ -985,7 +905,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
985
905
|
plt.jmp(() => {
|
|
986
906
|
var _a2;
|
|
987
907
|
const propName = attrNameToPropName.get(attrName);
|
|
988
|
-
if (this.hasOwnProperty(propName)
|
|
908
|
+
if (this.hasOwnProperty(propName)) {
|
|
989
909
|
newValue = this[propName];
|
|
990
910
|
delete this[propName];
|
|
991
911
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1005,11 +925,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1005
925
|
}
|
|
1006
926
|
return;
|
|
1007
927
|
}
|
|
1008
|
-
|
|
1009
|
-
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1010
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1011
|
-
this[propName] = newValue;
|
|
1012
|
-
}
|
|
928
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1013
929
|
});
|
|
1014
930
|
};
|
|
1015
931
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1038,7 +954,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1038
954
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1039
955
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1040
956
|
if (bundleId) {
|
|
1041
|
-
const CstrImport = loadModule(cmpMeta
|
|
957
|
+
const CstrImport = loadModule(cmpMeta);
|
|
1042
958
|
if (CstrImport && "then" in CstrImport) {
|
|
1043
959
|
const endLoad = uniqueTime();
|
|
1044
960
|
Cstr = await CstrImport;
|
|
@@ -1060,7 +976,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1060
976
|
try {
|
|
1061
977
|
new Cstr(hostRef);
|
|
1062
978
|
} catch (e) {
|
|
1063
|
-
consoleError(e
|
|
979
|
+
consoleError(e);
|
|
1064
980
|
}
|
|
1065
981
|
{
|
|
1066
982
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1092,7 +1008,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1092
1008
|
schedule();
|
|
1093
1009
|
}
|
|
1094
1010
|
};
|
|
1095
|
-
var fireConnectedCallback = (instance
|
|
1011
|
+
var fireConnectedCallback = (instance) => {
|
|
1096
1012
|
};
|
|
1097
1013
|
|
|
1098
1014
|
// src/runtime/connected-callback.ts
|
|
@@ -1132,7 +1048,7 @@ var connectedCallback = (elm) => {
|
|
|
1132
1048
|
endConnected();
|
|
1133
1049
|
}
|
|
1134
1050
|
};
|
|
1135
|
-
var disconnectInstance = (instance
|
|
1051
|
+
var disconnectInstance = (instance) => {
|
|
1136
1052
|
};
|
|
1137
1053
|
var disconnectedCallback = async (elm) => {
|
|
1138
1054
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1141,12 +1057,6 @@ var disconnectedCallback = async (elm) => {
|
|
|
1141
1057
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1142
1058
|
}
|
|
1143
1059
|
}
|
|
1144
|
-
if (rootAppliedStyles.has(elm)) {
|
|
1145
|
-
rootAppliedStyles.delete(elm);
|
|
1146
|
-
}
|
|
1147
|
-
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1148
|
-
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1149
|
-
}
|
|
1150
1060
|
};
|
|
1151
1061
|
|
|
1152
1062
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1223,17 +1133,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1223
1133
|
}
|
|
1224
1134
|
disconnectedCallback() {
|
|
1225
1135
|
plt.jmp(() => disconnectedCallback(this));
|
|
1226
|
-
plt.raf(() => {
|
|
1227
|
-
var _a3;
|
|
1228
|
-
const hostRef = getHostRef(this);
|
|
1229
|
-
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1230
|
-
if (i2 > -1) {
|
|
1231
|
-
deferredConnectedCallbacks.splice(i2, 1);
|
|
1232
|
-
}
|
|
1233
|
-
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1234
|
-
delete hostRef.$vnode$.$elm$;
|
|
1235
|
-
}
|
|
1236
|
-
});
|
|
1237
1136
|
}
|
|
1238
1137
|
componentOnReady() {
|
|
1239
1138
|
return getHostRef(this).$onReadyPromise$;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-502d881b.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|