@everymatrix/general-slider-navigation 1.53.0 → 1.53.10
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/carousel-component_2.cjs.entry.js +51 -19
- package/dist/cjs/general-slider-navigation.cjs.js +2 -2
- package/dist/cjs/{index-b79a855b.js → index-f2e7cf7c.js} +169 -72
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/carousel-component/carousel-component.js +38 -17
- package/dist/collection/components/general-slider-navigation/general-slider-navigation.js +49 -2
- package/dist/esm/carousel-component_2.entry.js +51 -19
- package/dist/esm/general-slider-navigation.js +3 -3
- package/dist/esm/{index-e155c85c.js → index-25441f8f.js} +169 -72
- package/dist/esm/loader.js +2 -2
- package/dist/general-slider-navigation/general-slider-navigation.esm.js +1 -1
- package/dist/general-slider-navigation/p-2402f8e1.js +2 -0
- package/dist/general-slider-navigation/p-3c314697.entry.js +1 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-slider-navigation/.stencil/packages/stencil/general-slider-navigation/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-slider-navigation/.stencil/packages/stencil/general-slider-navigation/stencil.config.dev.d.ts +2 -0
- package/package.json +1 -1
- package/dist/general-slider-navigation/p-0c4f790f.entry.js +0 -1
- package/dist/general-slider-navigation/p-65c898e4.js +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-slider-navigation/.stencil/packages/stencil/general-slider-navigation/stencil.config.d.ts +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-slider-navigation/.stencil/packages/stencil/general-slider-navigation/stencil.config.dev.d.ts +0 -2
|
@@ -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-f2e7cf7c.js');
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @name isMobile
|
|
@@ -132,6 +132,29 @@ const CarouselComponentStyle0 = carouselComponentCss;
|
|
|
132
132
|
const CarouselComponent = class {
|
|
133
133
|
constructor(hostRef) {
|
|
134
134
|
index.registerInstance(this, hostRef);
|
|
135
|
+
/**
|
|
136
|
+
* Client custom styling via inline style
|
|
137
|
+
*/
|
|
138
|
+
this.clientStyling = '';
|
|
139
|
+
/**
|
|
140
|
+
* Client custom styling via url
|
|
141
|
+
*/
|
|
142
|
+
this.clientStylingUrl = '';
|
|
143
|
+
/**
|
|
144
|
+
* Show bullet navigation under slides
|
|
145
|
+
*/
|
|
146
|
+
this.bulletNavigation = true;
|
|
147
|
+
/**
|
|
148
|
+
* Language of the widget
|
|
149
|
+
*/
|
|
150
|
+
this.language = 'en';
|
|
151
|
+
/**
|
|
152
|
+
* Translation via url
|
|
153
|
+
*/
|
|
154
|
+
this.translationUrl = '';
|
|
155
|
+
this.currIndex = 0;
|
|
156
|
+
this.device = '';
|
|
157
|
+
this.stylingAppends = false;
|
|
135
158
|
this.userAgent = window.navigator.userAgent;
|
|
136
159
|
this.isMobile = isMobile(this.userAgent);
|
|
137
160
|
this.touchStartX = 0;
|
|
@@ -198,22 +221,6 @@ const CarouselComponent = class {
|
|
|
198
221
|
}
|
|
199
222
|
return source;
|
|
200
223
|
};
|
|
201
|
-
this.clientStyling = '';
|
|
202
|
-
this.clientStylingUrl = '';
|
|
203
|
-
this.content = undefined;
|
|
204
|
-
this.bulletNavigation = true;
|
|
205
|
-
this.language = 'en';
|
|
206
|
-
this.slideTimer = undefined;
|
|
207
|
-
this.translationUrl = '';
|
|
208
|
-
this.currIndex = 0;
|
|
209
|
-
this.width = undefined;
|
|
210
|
-
this.height = undefined;
|
|
211
|
-
this.margin = undefined;
|
|
212
|
-
this.sliderElement = undefined;
|
|
213
|
-
this.totalWidth = undefined;
|
|
214
|
-
this.device = '';
|
|
215
|
-
this.stylingAppends = false;
|
|
216
|
-
this.innerWidth = undefined;
|
|
217
224
|
}
|
|
218
225
|
handleNewTranslations() {
|
|
219
226
|
getTranslations(this.translationUrl);
|
|
@@ -357,16 +364,41 @@ const GeneralSliderNavigationStyle0 = generalSliderNavigationCss;
|
|
|
357
364
|
const GeneralSliderNavigation = class {
|
|
358
365
|
constructor(hostRef) {
|
|
359
366
|
index.registerInstance(this, hostRef);
|
|
367
|
+
/**
|
|
368
|
+
* Client custom styling via inline style
|
|
369
|
+
*/
|
|
360
370
|
this.clientStyling = '';
|
|
371
|
+
/**
|
|
372
|
+
* Client custom styling via url
|
|
373
|
+
*/
|
|
361
374
|
this.clientStylingUrl = '';
|
|
362
|
-
|
|
375
|
+
/**
|
|
376
|
+
* CMS Endpoint stage
|
|
377
|
+
*/
|
|
363
378
|
this.cmsEnv = 'stage';
|
|
379
|
+
/**
|
|
380
|
+
* Language of the widget
|
|
381
|
+
*/
|
|
364
382
|
this.language = 'en';
|
|
383
|
+
/**
|
|
384
|
+
* User roles
|
|
385
|
+
*/
|
|
365
386
|
this.userRoles = 'everyone';
|
|
387
|
+
/**
|
|
388
|
+
* Show bullet navigation under slides
|
|
389
|
+
*/
|
|
366
390
|
this.bulletNavigation = true;
|
|
367
|
-
|
|
391
|
+
/**
|
|
392
|
+
* Mobile width for sliders
|
|
393
|
+
*/
|
|
368
394
|
this.sliderMobileWidth = 200;
|
|
395
|
+
/**
|
|
396
|
+
* Desktop width for sliders
|
|
397
|
+
*/
|
|
369
398
|
this.sliderDesktopWidth = 300;
|
|
399
|
+
/**
|
|
400
|
+
* Translation via url
|
|
401
|
+
*/
|
|
370
402
|
this.translationUrl = '';
|
|
371
403
|
this.isLoading = true;
|
|
372
404
|
this.hasErrors = false;
|
|
@@ -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-f2e7cf7c.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.25.1 | 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('general-slider-navigation.cjs.js', document.baseURI).href));
|
|
@@ -21,19 +21,27 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'general-slider-navigation';
|
|
24
|
-
const BUILD = /* general-slider-navigation */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, 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: false, 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: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
24
|
+
const BUILD = /* general-slider-navigation */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, 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: false, 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: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
27
|
+
Stencil Client Platform v4.25.1 | 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/utils/constants.ts
|
|
36
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
37
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
38
|
+
|
|
39
|
+
// src/client/client-host-ref.ts
|
|
34
40
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
35
41
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
36
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
42
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
43
|
+
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
44
|
+
};
|
|
37
45
|
var registerHost = (hostElement, cmpMeta) => {
|
|
38
46
|
const hostRef = {
|
|
39
47
|
$flags$: 0,
|
|
@@ -46,7 +54,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
46
54
|
hostElement["s-p"] = [];
|
|
47
55
|
hostElement["s-rc"] = [];
|
|
48
56
|
}
|
|
49
|
-
|
|
57
|
+
const ref = hostRefs.set(hostElement, hostRef);
|
|
58
|
+
return ref;
|
|
50
59
|
};
|
|
51
60
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
52
61
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -83,16 +92,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
83
92
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
84
93
|
/* webpackMode: "lazy" */
|
|
85
94
|
`./${bundleId}.entry.js${""}`
|
|
86
|
-
)); }).then(
|
|
87
|
-
{
|
|
88
|
-
|
|
95
|
+
)); }).then(
|
|
96
|
+
(importedModule) => {
|
|
97
|
+
{
|
|
98
|
+
cmpModules.set(bundleId, importedModule);
|
|
99
|
+
}
|
|
100
|
+
return importedModule[exportName];
|
|
101
|
+
},
|
|
102
|
+
(e) => {
|
|
103
|
+
consoleError(e, hostRef.$hostElement$);
|
|
89
104
|
}
|
|
90
|
-
|
|
91
|
-
}, consoleError);
|
|
105
|
+
);
|
|
92
106
|
};
|
|
93
107
|
|
|
94
108
|
// src/client/client-style.ts
|
|
95
109
|
var styles = /* @__PURE__ */ new Map();
|
|
110
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
96
111
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
97
112
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
98
113
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -150,14 +165,6 @@ var flush = () => {
|
|
|
150
165
|
};
|
|
151
166
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
152
167
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
153
|
-
|
|
154
|
-
// src/utils/constants.ts
|
|
155
|
-
var EMPTY_OBJ = {};
|
|
156
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
157
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
158
|
-
|
|
159
|
-
// src/utils/helpers.ts
|
|
160
|
-
var isDef = (v) => v != null;
|
|
161
168
|
var isComplexType = (o) => {
|
|
162
169
|
o = typeof o;
|
|
163
170
|
return o === "object" || o === "function";
|
|
@@ -346,7 +353,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
346
353
|
}
|
|
347
354
|
if (!appliedStyles.has(scopeId2)) {
|
|
348
355
|
{
|
|
349
|
-
styleElm = doc.createElement("style");
|
|
356
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
|
|
350
357
|
styleElm.innerHTML = style;
|
|
351
358
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
352
359
|
if (nonce != null) {
|
|
@@ -356,7 +363,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
356
363
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
357
364
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
358
365
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
359
|
-
styleContainerNode.insertBefore(
|
|
366
|
+
styleContainerNode.insertBefore(
|
|
367
|
+
styleElm,
|
|
368
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
369
|
+
);
|
|
360
370
|
} else if ("host" in styleContainerNode) {
|
|
361
371
|
if (supportsConstructableStylesheets) {
|
|
362
372
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -406,16 +416,18 @@ var attachStyles = (hostRef) => {
|
|
|
406
416
|
endAttachStyles();
|
|
407
417
|
};
|
|
408
418
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
409
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
419
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
410
420
|
if (oldValue !== newValue) {
|
|
411
421
|
let isProp = isMemberInElement(elm, memberName);
|
|
412
422
|
let ln = memberName.toLowerCase();
|
|
413
423
|
if (memberName === "class") {
|
|
414
424
|
const classList = elm.classList;
|
|
415
425
|
const oldClasses = parseClassList(oldValue);
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
426
|
+
let newClasses = parseClassList(newValue);
|
|
427
|
+
{
|
|
428
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
429
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
430
|
+
}
|
|
419
431
|
} else if (memberName === "style") {
|
|
420
432
|
{
|
|
421
433
|
for (const prop in oldValue) {
|
|
@@ -474,7 +486,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
474
486
|
elm.setAttribute(memberName, n);
|
|
475
487
|
}
|
|
476
488
|
}
|
|
477
|
-
} else {
|
|
489
|
+
} else if (elm[memberName] !== newValue) {
|
|
478
490
|
elm[memberName] = newValue;
|
|
479
491
|
}
|
|
480
492
|
} catch (e) {
|
|
@@ -496,24 +508,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
496
508
|
}
|
|
497
509
|
};
|
|
498
510
|
var parseClassListRegex = /\s/;
|
|
499
|
-
var parseClassList = (value) =>
|
|
511
|
+
var parseClassList = (value) => {
|
|
512
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
513
|
+
value = value.baseVal;
|
|
514
|
+
}
|
|
515
|
+
if (!value || typeof value !== "string") {
|
|
516
|
+
return [];
|
|
517
|
+
}
|
|
518
|
+
return value.split(parseClassListRegex);
|
|
519
|
+
};
|
|
500
520
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
501
521
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
502
522
|
|
|
503
523
|
// src/runtime/vdom/update-element.ts
|
|
504
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
524
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
505
525
|
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$ ||
|
|
526
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
527
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
508
528
|
{
|
|
509
529
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
510
530
|
if (!(memberName in newVnodeAttrs)) {
|
|
511
|
-
setAccessor(
|
|
531
|
+
setAccessor(
|
|
532
|
+
elm,
|
|
533
|
+
memberName,
|
|
534
|
+
oldVnodeAttrs[memberName],
|
|
535
|
+
void 0,
|
|
536
|
+
isSvgMode2,
|
|
537
|
+
newVnode.$flags$);
|
|
512
538
|
}
|
|
513
539
|
}
|
|
514
540
|
}
|
|
515
541
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
516
|
-
setAccessor(
|
|
542
|
+
setAccessor(
|
|
543
|
+
elm,
|
|
544
|
+
memberName,
|
|
545
|
+
oldVnodeAttrs[memberName],
|
|
546
|
+
newVnodeAttrs[memberName],
|
|
547
|
+
isSvgMode2,
|
|
548
|
+
newVnode.$flags$);
|
|
517
549
|
}
|
|
518
550
|
};
|
|
519
551
|
function sortedAttrNames(attrNames) {
|
|
@@ -525,13 +557,10 @@ function sortedAttrNames(attrNames) {
|
|
|
525
557
|
attrNames
|
|
526
558
|
);
|
|
527
559
|
}
|
|
528
|
-
|
|
529
|
-
// src/runtime/vdom/vdom-render.ts
|
|
530
|
-
var scopeId;
|
|
531
560
|
var hostTagName;
|
|
532
561
|
var useNativeShadowDom = false;
|
|
533
562
|
var isSvgMode = false;
|
|
534
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
563
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
535
564
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
536
565
|
let i2 = 0;
|
|
537
566
|
let elm;
|
|
@@ -552,11 +581,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
552
581
|
{
|
|
553
582
|
updateElement(null, newVNode2, isSvgMode);
|
|
554
583
|
}
|
|
555
|
-
const rootNode = elm.getRootNode();
|
|
556
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
557
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
558
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
|
559
|
-
}
|
|
560
584
|
if (newVNode2.$children$) {
|
|
561
585
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
562
586
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -693,6 +717,9 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
693
717
|
if (!isInitialRender) {
|
|
694
718
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
695
719
|
}
|
|
720
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
721
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
722
|
+
}
|
|
696
723
|
return true;
|
|
697
724
|
}
|
|
698
725
|
return false;
|
|
@@ -739,8 +766,9 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
739
766
|
}
|
|
740
767
|
};
|
|
741
768
|
var insertBefore = (parent, newNode, reference) => {
|
|
742
|
-
|
|
743
|
-
|
|
769
|
+
{
|
|
770
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
771
|
+
}
|
|
744
772
|
};
|
|
745
773
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
746
774
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -765,9 +793,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
765
793
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
766
794
|
hostRef.$vnode$ = rootVnode;
|
|
767
795
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
768
|
-
{
|
|
769
|
-
scopeId = hostElm["s-sc"];
|
|
770
|
-
}
|
|
771
796
|
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
772
797
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
773
798
|
};
|
|
@@ -775,7 +800,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
775
800
|
// src/runtime/update-component.ts
|
|
776
801
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
777
802
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
778
|
-
ancestorComponent["s-p"].push(
|
|
803
|
+
const index = ancestorComponent["s-p"].push(
|
|
804
|
+
new Promise(
|
|
805
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
806
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
807
|
+
r();
|
|
808
|
+
}
|
|
809
|
+
)
|
|
810
|
+
);
|
|
779
811
|
}
|
|
780
812
|
};
|
|
781
813
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -802,7 +834,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
802
834
|
let maybePromise;
|
|
803
835
|
if (isInitialLoad) {
|
|
804
836
|
{
|
|
805
|
-
maybePromise = safeCall(instance, "componentWillLoad");
|
|
837
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
806
838
|
}
|
|
807
839
|
}
|
|
808
840
|
endSchedule();
|
|
@@ -871,7 +903,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
871
903
|
const instance = hostRef.$lazyInstance$ ;
|
|
872
904
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
873
905
|
{
|
|
874
|
-
safeCall(instance, "componentDidRender");
|
|
906
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
875
907
|
}
|
|
876
908
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
877
909
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -879,7 +911,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
879
911
|
addHydratedFlag(elm);
|
|
880
912
|
}
|
|
881
913
|
{
|
|
882
|
-
safeCall(instance, "componentDidLoad");
|
|
914
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
883
915
|
}
|
|
884
916
|
endPostUpdate();
|
|
885
917
|
{
|
|
@@ -908,12 +940,12 @@ var appDidLoad = (who) => {
|
|
|
908
940
|
}
|
|
909
941
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
910
942
|
};
|
|
911
|
-
var safeCall = (instance, method, arg) => {
|
|
943
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
912
944
|
if (instance && instance[method]) {
|
|
913
945
|
try {
|
|
914
946
|
return instance[method](arg);
|
|
915
947
|
} catch (e) {
|
|
916
|
-
consoleError(e);
|
|
948
|
+
consoleError(e, elm);
|
|
917
949
|
}
|
|
918
950
|
}
|
|
919
951
|
return void 0;
|
|
@@ -972,15 +1004,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
972
1004
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
973
1005
|
members.map(([memberName, [memberFlags]]) => {
|
|
974
1006
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1007
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1008
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1009
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1010
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1011
|
+
Object.defineProperty(prototype, memberName, {
|
|
1012
|
+
get() {
|
|
1013
|
+
{
|
|
1014
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1015
|
+
return getValue(this, memberName);
|
|
1016
|
+
}
|
|
1017
|
+
const ref = getHostRef(this);
|
|
1018
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1019
|
+
if (!instance) return;
|
|
1020
|
+
return instance[memberName];
|
|
1021
|
+
}
|
|
1022
|
+
},
|
|
1023
|
+
configurable: true,
|
|
1024
|
+
enumerable: true
|
|
1025
|
+
});
|
|
1026
|
+
}
|
|
975
1027
|
Object.defineProperty(prototype, memberName, {
|
|
976
|
-
get() {
|
|
977
|
-
return getValue(this, memberName);
|
|
978
|
-
},
|
|
979
1028
|
set(newValue) {
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
1029
|
+
const ref = getHostRef(this);
|
|
1030
|
+
if (origSetter) {
|
|
1031
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1032
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
1033
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
1034
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1035
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1036
|
+
}
|
|
1037
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1038
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1039
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1040
|
+
return;
|
|
1041
|
+
}
|
|
1042
|
+
{
|
|
1043
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1044
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1045
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1046
|
+
ref.$onReadyPromise$.then(() => {
|
|
1047
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1048
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1049
|
+
}
|
|
1050
|
+
});
|
|
1051
|
+
}
|
|
1052
|
+
return;
|
|
1053
|
+
}
|
|
1054
|
+
const setterSetVal = () => {
|
|
1055
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1056
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1057
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1058
|
+
}
|
|
1059
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1060
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1061
|
+
};
|
|
1062
|
+
if (ref.$lazyInstance$) {
|
|
1063
|
+
setterSetVal();
|
|
1064
|
+
} else {
|
|
1065
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
984
1069
|
});
|
|
985
1070
|
}
|
|
986
1071
|
});
|
|
@@ -990,7 +1075,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
990
1075
|
plt.jmp(() => {
|
|
991
1076
|
var _a2;
|
|
992
1077
|
const propName = attrNameToPropName.get(attrName);
|
|
993
|
-
if (this.hasOwnProperty(propName)) {
|
|
1078
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
994
1079
|
newValue = this[propName];
|
|
995
1080
|
delete this[propName];
|
|
996
1081
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1010,7 +1095,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1010
1095
|
}
|
|
1011
1096
|
return;
|
|
1012
1097
|
}
|
|
1013
|
-
|
|
1098
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1099
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1100
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1101
|
+
this[propName] = newValue;
|
|
1102
|
+
}
|
|
1014
1103
|
});
|
|
1015
1104
|
};
|
|
1016
1105
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1037,9 +1126,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1037
1126
|
let Cstr;
|
|
1038
1127
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1039
1128
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1129
|
+
{
|
|
1130
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1043
1131
|
if (CstrImport && "then" in CstrImport) {
|
|
1044
1132
|
const endLoad = uniqueTime();
|
|
1045
1133
|
Cstr = await CstrImport;
|
|
@@ -1064,7 +1152,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1064
1152
|
try {
|
|
1065
1153
|
new Cstr(hostRef);
|
|
1066
1154
|
} catch (e) {
|
|
1067
|
-
consoleError(e);
|
|
1155
|
+
consoleError(e, elm);
|
|
1068
1156
|
}
|
|
1069
1157
|
{
|
|
1070
1158
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1073,10 +1161,6 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1073
1161
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1074
1162
|
}
|
|
1075
1163
|
endNewInstance();
|
|
1076
|
-
} else {
|
|
1077
|
-
Cstr = elm.constructor;
|
|
1078
|
-
const cmpTag = elm.localName;
|
|
1079
|
-
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1080
1164
|
}
|
|
1081
1165
|
if (Cstr && Cstr.style) {
|
|
1082
1166
|
let style;
|
|
@@ -1099,7 +1183,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1099
1183
|
schedule();
|
|
1100
1184
|
}
|
|
1101
1185
|
};
|
|
1102
|
-
var fireConnectedCallback = (instance) => {
|
|
1186
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1103
1187
|
};
|
|
1104
1188
|
|
|
1105
1189
|
// src/runtime/connected-callback.ts
|
|
@@ -1139,20 +1223,26 @@ var connectedCallback = (elm) => {
|
|
|
1139
1223
|
endConnected();
|
|
1140
1224
|
}
|
|
1141
1225
|
};
|
|
1142
|
-
var disconnectInstance = (instance) => {
|
|
1226
|
+
var disconnectInstance = (instance, elm) => {
|
|
1143
1227
|
{
|
|
1144
|
-
safeCall(instance, "disconnectedCallback");
|
|
1228
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
1145
1229
|
}
|
|
1146
1230
|
};
|
|
1147
1231
|
var disconnectedCallback = async (elm) => {
|
|
1148
1232
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1149
1233
|
const hostRef = getHostRef(elm);
|
|
1150
1234
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1151
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
1235
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
1152
1236
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1153
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
1237
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
1154
1238
|
}
|
|
1155
1239
|
}
|
|
1240
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1241
|
+
rootAppliedStyles.delete(elm);
|
|
1242
|
+
}
|
|
1243
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1244
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1245
|
+
}
|
|
1156
1246
|
};
|
|
1157
1247
|
|
|
1158
1248
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1233,6 +1323,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1233
1323
|
}
|
|
1234
1324
|
disconnectedCallback() {
|
|
1235
1325
|
plt.jmp(() => disconnectedCallback(this));
|
|
1326
|
+
plt.raf(() => {
|
|
1327
|
+
var _a3;
|
|
1328
|
+
const hostRef = getHostRef(this);
|
|
1329
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1330
|
+
delete hostRef.$vnode$.$elm$;
|
|
1331
|
+
}
|
|
1332
|
+
});
|
|
1236
1333
|
}
|
|
1237
1334
|
componentOnReady() {
|
|
1238
1335
|
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-f2e7cf7c.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|