@everymatrix/helper-pagination 1.56.0 → 1.56.3
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 -49
- package/dist/cjs/helper-pagination.cjs.js +2 -2
- package/dist/cjs/{index-5d7ac0d5.js → index-d76910e9.js} +69 -204
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/helper-pagination/helper-pagination.js +19 -72
- package/dist/esm/helper-pagination.entry.js +20 -49
- package/dist/esm/helper-pagination.js +3 -3
- package/dist/esm/{index-49bd7818.js → index-0483e183.js} +69 -204
- package/dist/esm/loader.js +2 -2
- package/dist/helper-pagination/helper-pagination.esm.js +1 -1
- package/dist/helper-pagination/p-b696341a.entry.js +1 -0
- package/dist/helper-pagination/p-fcde97c1.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/dist/types/stencil-public-runtime.d.ts +0 -6
- package/package.json +1 -1
- package/dist/helper-pagination/p-645aa72c.entry.js +0 -1
- package/dist/helper-pagination/p-d28f6456.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-d76910e9.js');
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @name setClientStyling
|
|
@@ -125,54 +125,6 @@ const HelperPagination = class {
|
|
|
125
125
|
constructor(hostRef) {
|
|
126
126
|
index.registerInstance(this, hostRef);
|
|
127
127
|
this.hpPageChange = index.createEvent(this, "hpPageChange", 7);
|
|
128
|
-
/**
|
|
129
|
-
* Next page string value - determines if the next page is disabled or active
|
|
130
|
-
*/
|
|
131
|
-
this.nextPage = '';
|
|
132
|
-
/**
|
|
133
|
-
* Previous page string value - determines if the previous page is disabled or active
|
|
134
|
-
*/
|
|
135
|
-
this.prevPage = '';
|
|
136
|
-
/**
|
|
137
|
-
* The received offset
|
|
138
|
-
*/
|
|
139
|
-
this.offset = 0;
|
|
140
|
-
/**
|
|
141
|
-
* The received limit for the number of pages
|
|
142
|
-
*/
|
|
143
|
-
this.limit = 1;
|
|
144
|
-
/**
|
|
145
|
-
* The received total number of pages
|
|
146
|
-
*/
|
|
147
|
-
this.total = 1;
|
|
148
|
-
/**
|
|
149
|
-
* Language
|
|
150
|
-
*/
|
|
151
|
-
this.language = 'en';
|
|
152
|
-
/**
|
|
153
|
-
* Client custom styling via string
|
|
154
|
-
*/
|
|
155
|
-
this.clientStyling = '';
|
|
156
|
-
/**
|
|
157
|
-
* Client custom styling via url content
|
|
158
|
-
*/
|
|
159
|
-
this.clientStylingUrl = '';
|
|
160
|
-
/**
|
|
161
|
-
* Component working variable for last page
|
|
162
|
-
*/
|
|
163
|
-
this.lastPage = false;
|
|
164
|
-
/**
|
|
165
|
-
* Component working variable for prvious page
|
|
166
|
-
*/
|
|
167
|
-
this.previousPage = false;
|
|
168
|
-
/**
|
|
169
|
-
* In component working variable for the array of pages
|
|
170
|
-
*/
|
|
171
|
-
this.pagesArray = [];
|
|
172
|
-
/**
|
|
173
|
-
* In component working variable for last page
|
|
174
|
-
*/
|
|
175
|
-
this.endInt = 0;
|
|
176
128
|
this.userAgent = window.navigator.userAgent;
|
|
177
129
|
this.currentPage = 1;
|
|
178
130
|
/**
|
|
@@ -231,6 +183,25 @@ const HelperPagination = class {
|
|
|
231
183
|
}
|
|
232
184
|
this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
|
|
233
185
|
};
|
|
186
|
+
this.nextPage = '';
|
|
187
|
+
this.prevPage = '';
|
|
188
|
+
this.offset = 0;
|
|
189
|
+
this.limit = 1;
|
|
190
|
+
this.total = 1;
|
|
191
|
+
this.language = 'en';
|
|
192
|
+
this.mbSource = undefined;
|
|
193
|
+
this.clientStyling = '';
|
|
194
|
+
this.clientStylingUrl = '';
|
|
195
|
+
this.arrowsActive = undefined;
|
|
196
|
+
this.secondaryArrowsActive = undefined;
|
|
197
|
+
this.numberedNavActive = undefined;
|
|
198
|
+
this.offsetInt = undefined;
|
|
199
|
+
this.lastPage = false;
|
|
200
|
+
this.previousPage = false;
|
|
201
|
+
this.limitInt = undefined;
|
|
202
|
+
this.totalInt = undefined;
|
|
203
|
+
this.pagesArray = [];
|
|
204
|
+
this.endInt = 0;
|
|
234
205
|
}
|
|
235
206
|
handleClientStylingChange(newValue, oldValue) {
|
|
236
207
|
if (newValue != oldValue) {
|
|
@@ -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-d76910e9.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.19.2 | 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: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, 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: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, 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: true };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
27
|
+
Stencil Client Platform v4.19.2 | 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,40 +349,13 @@ 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) {
|
|
361
356
|
styleElm.setAttribute("nonce", nonce);
|
|
362
357
|
}
|
|
363
|
-
|
|
364
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
|
365
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
366
|
-
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
|
-
);
|
|
371
|
-
} else if ("host" in styleContainerNode) {
|
|
372
|
-
if (supportsConstructableStylesheets) {
|
|
373
|
-
const stylesheet = new CSSStyleSheet();
|
|
374
|
-
stylesheet.replaceSync(style);
|
|
375
|
-
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
376
|
-
} else {
|
|
377
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
378
|
-
if (existingStyleContainer) {
|
|
379
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
380
|
-
} else {
|
|
381
|
-
styleContainerNode.prepend(styleElm);
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
} else {
|
|
385
|
-
styleContainerNode.append(styleElm);
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
389
|
-
styleContainerNode.insertBefore(styleElm, null);
|
|
390
|
-
}
|
|
358
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
|
|
391
359
|
}
|
|
392
360
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
393
361
|
styleElm.innerHTML += SLOT_FB_CSS;
|
|
@@ -410,25 +378,23 @@ var attachStyles = (hostRef) => {
|
|
|
410
378
|
const scopeId2 = addStyle(
|
|
411
379
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
412
380
|
cmpMeta);
|
|
413
|
-
if (
|
|
381
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
414
382
|
elm["s-sc"] = scopeId2;
|
|
415
383
|
elm.classList.add(scopeId2 + "-h");
|
|
416
384
|
}
|
|
417
385
|
endAttachStyles();
|
|
418
386
|
};
|
|
419
387
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
420
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags
|
|
388
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
421
389
|
if (oldValue !== newValue) {
|
|
422
390
|
let isProp = isMemberInElement(elm, memberName);
|
|
423
391
|
let ln = memberName.toLowerCase();
|
|
424
392
|
if (memberName === "class") {
|
|
425
393
|
const classList = elm.classList;
|
|
426
394
|
const oldClasses = parseClassList(oldValue);
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
431
|
-
}
|
|
395
|
+
const newClasses = parseClassList(newValue);
|
|
396
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
397
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
432
398
|
} else if (memberName === "ref") {
|
|
433
399
|
if (newValue) {
|
|
434
400
|
newValue(elm);
|
|
@@ -460,13 +426,9 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
460
426
|
if (memberName === "list") {
|
|
461
427
|
isProp = false;
|
|
462
428
|
} else if (oldValue == null || elm[memberName] != n) {
|
|
463
|
-
|
|
464
|
-
elm[memberName] = n;
|
|
465
|
-
} else {
|
|
466
|
-
elm.setAttribute(memberName, n);
|
|
467
|
-
}
|
|
429
|
+
elm[memberName] = n;
|
|
468
430
|
}
|
|
469
|
-
} else
|
|
431
|
+
} else {
|
|
470
432
|
elm[memberName] = newValue;
|
|
471
433
|
}
|
|
472
434
|
} catch (e) {
|
|
@@ -488,44 +450,24 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
488
450
|
}
|
|
489
451
|
};
|
|
490
452
|
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
|
-
};
|
|
453
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
500
454
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
501
455
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
502
456
|
|
|
503
457
|
// src/runtime/vdom/update-element.ts
|
|
504
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2
|
|
458
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
505
459
|
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$ ||
|
|
460
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
461
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
508
462
|
{
|
|
509
463
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
510
464
|
if (!(memberName in newVnodeAttrs)) {
|
|
511
|
-
setAccessor(
|
|
512
|
-
elm,
|
|
513
|
-
memberName,
|
|
514
|
-
oldVnodeAttrs[memberName],
|
|
515
|
-
void 0,
|
|
516
|
-
isSvgMode2,
|
|
517
|
-
newVnode.$flags$);
|
|
465
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
518
466
|
}
|
|
519
467
|
}
|
|
520
468
|
}
|
|
521
469
|
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$);
|
|
470
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
529
471
|
}
|
|
530
472
|
};
|
|
531
473
|
function sortedAttrNames(attrNames) {
|
|
@@ -537,10 +479,13 @@ function sortedAttrNames(attrNames) {
|
|
|
537
479
|
attrNames
|
|
538
480
|
);
|
|
539
481
|
}
|
|
482
|
+
|
|
483
|
+
// src/runtime/vdom/vdom-render.ts
|
|
484
|
+
var scopeId;
|
|
540
485
|
var hostTagName;
|
|
541
486
|
var useNativeShadowDom = false;
|
|
542
487
|
var isSvgMode = false;
|
|
543
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
488
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
544
489
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
545
490
|
let i2 = 0;
|
|
546
491
|
let elm;
|
|
@@ -554,6 +499,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
554
499
|
{
|
|
555
500
|
updateElement(null, newVNode2, isSvgMode);
|
|
556
501
|
}
|
|
502
|
+
if (isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
503
|
+
elm.classList.add(elm["s-si"] = scopeId);
|
|
504
|
+
}
|
|
557
505
|
if (newVNode2.$children$) {
|
|
558
506
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
559
507
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -658,9 +606,6 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
658
606
|
};
|
|
659
607
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
660
608
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
661
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
662
|
-
leftVNode.$key$ = rightVNode.$key$;
|
|
663
|
-
}
|
|
664
609
|
return true;
|
|
665
610
|
}
|
|
666
611
|
return false;
|
|
@@ -683,10 +628,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
683
628
|
elm.textContent = "";
|
|
684
629
|
}
|
|
685
630
|
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
686
|
-
} else if (
|
|
687
|
-
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
688
|
-
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
689
|
-
) {
|
|
631
|
+
} else if (oldChildren !== null) {
|
|
690
632
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
691
633
|
}
|
|
692
634
|
} else if (oldVNode.$text$ !== text) {
|
|
@@ -700,9 +642,8 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
700
642
|
}
|
|
701
643
|
};
|
|
702
644
|
var insertBefore = (parent, newNode, reference) => {
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
}
|
|
645
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
646
|
+
return inserted;
|
|
706
647
|
};
|
|
707
648
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
708
649
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -727,21 +668,17 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
727
668
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
728
669
|
hostRef.$vnode$ = rootVnode;
|
|
729
670
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
730
|
-
|
|
671
|
+
{
|
|
672
|
+
scopeId = hostElm["s-sc"];
|
|
673
|
+
}
|
|
674
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
731
675
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
732
676
|
};
|
|
733
677
|
|
|
734
678
|
// src/runtime/update-component.ts
|
|
735
679
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
736
680
|
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
|
-
);
|
|
681
|
+
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
|
745
682
|
}
|
|
746
683
|
};
|
|
747
684
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -767,7 +704,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
767
704
|
}
|
|
768
705
|
let maybePromise;
|
|
769
706
|
{
|
|
770
|
-
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"
|
|
707
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
|
|
771
708
|
}
|
|
772
709
|
endSchedule();
|
|
773
710
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
@@ -840,7 +777,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
840
777
|
addHydratedFlag(elm);
|
|
841
778
|
}
|
|
842
779
|
{
|
|
843
|
-
safeCall(instance, "componentDidLoad"
|
|
780
|
+
safeCall(instance, "componentDidLoad");
|
|
844
781
|
}
|
|
845
782
|
endPostUpdate();
|
|
846
783
|
{
|
|
@@ -864,14 +801,17 @@ var postUpdateComponent = (hostRef) => {
|
|
|
864
801
|
}
|
|
865
802
|
};
|
|
866
803
|
var appDidLoad = (who) => {
|
|
804
|
+
{
|
|
805
|
+
addHydratedFlag(doc.documentElement);
|
|
806
|
+
}
|
|
867
807
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
868
808
|
};
|
|
869
|
-
var safeCall = (instance, method, arg
|
|
809
|
+
var safeCall = (instance, method, arg) => {
|
|
870
810
|
if (instance && instance[method]) {
|
|
871
811
|
try {
|
|
872
812
|
return instance[method](arg);
|
|
873
813
|
} catch (e) {
|
|
874
|
-
consoleError(e
|
|
814
|
+
consoleError(e);
|
|
875
815
|
}
|
|
876
816
|
}
|
|
877
817
|
return void 0;
|
|
@@ -930,68 +870,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
930
870
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
931
871
|
members.map(([memberName, [memberFlags]]) => {
|
|
932
872
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
933
|
-
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
934
|
-
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
935
|
-
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
936
|
-
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
937
|
-
Object.defineProperty(prototype, memberName, {
|
|
938
|
-
get() {
|
|
939
|
-
{
|
|
940
|
-
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
941
|
-
return getValue(this, memberName);
|
|
942
|
-
}
|
|
943
|
-
const ref = getHostRef(this);
|
|
944
|
-
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
945
|
-
if (!instance) return;
|
|
946
|
-
return instance[memberName];
|
|
947
|
-
}
|
|
948
|
-
},
|
|
949
|
-
configurable: true,
|
|
950
|
-
enumerable: true
|
|
951
|
-
});
|
|
952
|
-
}
|
|
953
873
|
Object.defineProperty(prototype, memberName, {
|
|
874
|
+
get() {
|
|
875
|
+
return getValue(this, memberName);
|
|
876
|
+
},
|
|
954
877
|
set(newValue) {
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
newValue = ref.$instanceValues$.get(memberName);
|
|
960
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
961
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
962
|
-
}
|
|
963
|
-
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
964
|
-
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
965
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
966
|
-
return;
|
|
967
|
-
}
|
|
968
|
-
{
|
|
969
|
-
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
970
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
971
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
972
|
-
ref.$onReadyPromise$.then(() => {
|
|
973
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
974
|
-
ref.$lazyInstance$[memberName] = newValue;
|
|
975
|
-
}
|
|
976
|
-
});
|
|
977
|
-
}
|
|
978
|
-
return;
|
|
979
|
-
}
|
|
980
|
-
const setterSetVal = () => {
|
|
981
|
-
const currentValue = ref.$lazyInstance$[memberName];
|
|
982
|
-
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
983
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
984
|
-
}
|
|
985
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
986
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
987
|
-
};
|
|
988
|
-
if (ref.$lazyInstance$) {
|
|
989
|
-
setterSetVal();
|
|
990
|
-
} else {
|
|
991
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
992
|
-
}
|
|
993
|
-
}
|
|
994
|
-
}
|
|
878
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
879
|
+
},
|
|
880
|
+
configurable: true,
|
|
881
|
+
enumerable: true
|
|
995
882
|
});
|
|
996
883
|
}
|
|
997
884
|
});
|
|
@@ -1001,11 +888,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1001
888
|
plt.jmp(() => {
|
|
1002
889
|
var _a2;
|
|
1003
890
|
const propName = attrNameToPropName.get(attrName);
|
|
1004
|
-
if (this.hasOwnProperty(propName)
|
|
891
|
+
if (this.hasOwnProperty(propName)) {
|
|
1005
892
|
newValue = this[propName];
|
|
1006
893
|
delete this[propName];
|
|
1007
|
-
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" &&
|
|
1008
|
-
this[propName] == newValue) {
|
|
894
|
+
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
|
|
1009
895
|
return;
|
|
1010
896
|
} else if (propName == null) {
|
|
1011
897
|
const hostRef = getHostRef(this);
|
|
@@ -1021,11 +907,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1021
907
|
}
|
|
1022
908
|
return;
|
|
1023
909
|
}
|
|
1024
|
-
|
|
1025
|
-
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1026
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1027
|
-
this[propName] = newValue;
|
|
1028
|
-
}
|
|
910
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1029
911
|
});
|
|
1030
912
|
};
|
|
1031
913
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1054,7 +936,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1054
936
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1055
937
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1056
938
|
if (bundleId) {
|
|
1057
|
-
const CstrImport = loadModule(cmpMeta
|
|
939
|
+
const CstrImport = loadModule(cmpMeta);
|
|
1058
940
|
if (CstrImport && "then" in CstrImport) {
|
|
1059
941
|
const endLoad = uniqueTime();
|
|
1060
942
|
Cstr = await CstrImport;
|
|
@@ -1079,7 +961,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1079
961
|
try {
|
|
1080
962
|
new Cstr(hostRef);
|
|
1081
963
|
} catch (e) {
|
|
1082
|
-
consoleError(e
|
|
964
|
+
consoleError(e);
|
|
1083
965
|
}
|
|
1084
966
|
{
|
|
1085
967
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1114,7 +996,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1114
996
|
schedule();
|
|
1115
997
|
}
|
|
1116
998
|
};
|
|
1117
|
-
var fireConnectedCallback = (instance
|
|
999
|
+
var fireConnectedCallback = (instance) => {
|
|
1118
1000
|
};
|
|
1119
1001
|
|
|
1120
1002
|
// src/runtime/connected-callback.ts
|
|
@@ -1154,26 +1036,20 @@ var connectedCallback = (elm) => {
|
|
|
1154
1036
|
endConnected();
|
|
1155
1037
|
}
|
|
1156
1038
|
};
|
|
1157
|
-
var disconnectInstance = (instance
|
|
1039
|
+
var disconnectInstance = (instance) => {
|
|
1158
1040
|
{
|
|
1159
|
-
safeCall(instance, "disconnectedCallback"
|
|
1041
|
+
safeCall(instance, "disconnectedCallback");
|
|
1160
1042
|
}
|
|
1161
1043
|
};
|
|
1162
1044
|
var disconnectedCallback = async (elm) => {
|
|
1163
1045
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1164
1046
|
const hostRef = getHostRef(elm);
|
|
1165
1047
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1166
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
1048
|
+
disconnectInstance(hostRef.$lazyInstance$);
|
|
1167
1049
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1168
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
1050
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
|
|
1169
1051
|
}
|
|
1170
1052
|
}
|
|
1171
|
-
if (rootAppliedStyles.has(elm)) {
|
|
1172
|
-
rootAppliedStyles.delete(elm);
|
|
1173
|
-
}
|
|
1174
|
-
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1175
|
-
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1176
|
-
}
|
|
1177
1053
|
};
|
|
1178
1054
|
|
|
1179
1055
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1254,17 +1130,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1254
1130
|
}
|
|
1255
1131
|
disconnectedCallback() {
|
|
1256
1132
|
plt.jmp(() => disconnectedCallback(this));
|
|
1257
|
-
plt.raf(() => {
|
|
1258
|
-
var _a3;
|
|
1259
|
-
const hostRef = getHostRef(this);
|
|
1260
|
-
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1261
|
-
if (i2 > -1) {
|
|
1262
|
-
deferredConnectedCallbacks.splice(i2, 1);
|
|
1263
|
-
}
|
|
1264
|
-
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1265
|
-
delete hostRef.$vnode$.$elm$;
|
|
1266
|
-
}
|
|
1267
|
-
});
|
|
1268
1133
|
}
|
|
1269
1134
|
componentOnReady() {
|
|
1270
1135
|
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-d76910e9.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|