@everymatrix/general-slider-navigation 1.56.0 → 1.56.2
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 +20 -51
- package/dist/cjs/general-slider-navigation.cjs.js +2 -2
- package/dist/cjs/{index-75dd98ba.js → index-7d6bdd9d.js} +72 -209
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/carousel-component/carousel-component.js +17 -38
- package/dist/collection/components/general-slider-navigation/general-slider-navigation.js +3 -51
- package/dist/esm/carousel-component_2.entry.js +20 -51
- package/dist/esm/general-slider-navigation.js +3 -3
- package/dist/esm/{index-172d2d6e.js → index-0133b6d8.js} +72 -209
- 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-35251bc7.entry.js +1 -0
- package/dist/general-slider-navigation/p-b76b8539.js +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-slider-navigation/.stencil/packages/stencil/general-slider-navigation/stencil.config.d.ts +2 -0
- 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 +2 -0
- package/dist/types/stencil-public-runtime.d.ts +0 -6
- package/package.json +1 -1
- package/dist/general-slider-navigation/p-5090827e.js +0 -2
- package/dist/general-slider-navigation/p-cbf1d138.entry.js +0 -1
- 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 +0 -2
- 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 +0 -2
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-slider-navigation/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-slider-navigation/.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/general-slider-navigation/.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/general-slider-navigation/.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-7d6bdd9d.js');
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @name isMobile
|
|
@@ -132,29 +132,6 @@ 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;
|
|
158
135
|
this.userAgent = window.navigator.userAgent;
|
|
159
136
|
this.isMobile = isMobile(this.userAgent);
|
|
160
137
|
this.touchStartX = 0;
|
|
@@ -221,6 +198,22 @@ const CarouselComponent = class {
|
|
|
221
198
|
}
|
|
222
199
|
return source;
|
|
223
200
|
};
|
|
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;
|
|
224
217
|
}
|
|
225
218
|
handleNewTranslations() {
|
|
226
219
|
getTranslations(this.translationUrl);
|
|
@@ -421,41 +414,17 @@ const GeneralSliderNavigationStyle0 = generalSliderNavigationCss;
|
|
|
421
414
|
const GeneralSliderNavigation = class {
|
|
422
415
|
constructor(hostRef) {
|
|
423
416
|
index.registerInstance(this, hostRef);
|
|
424
|
-
|
|
425
|
-
* Client custom styling via inline style
|
|
426
|
-
*/
|
|
417
|
+
this.mbSource = undefined;
|
|
427
418
|
this.clientStyling = '';
|
|
428
|
-
/**
|
|
429
|
-
* Client custom styling via url
|
|
430
|
-
*/
|
|
431
419
|
this.clientStylingUrl = '';
|
|
432
|
-
|
|
433
|
-
* CMS Endpoint stage
|
|
434
|
-
*/
|
|
420
|
+
this.cmsEndpoint = undefined;
|
|
435
421
|
this.cmsEnv = 'stage';
|
|
436
|
-
/**
|
|
437
|
-
* Language of the widget
|
|
438
|
-
*/
|
|
439
422
|
this.language = 'en';
|
|
440
|
-
/**
|
|
441
|
-
* User roles
|
|
442
|
-
*/
|
|
443
423
|
this.userRoles = 'everyone';
|
|
444
|
-
/**
|
|
445
|
-
* Show bullet navigation under slides
|
|
446
|
-
*/
|
|
447
424
|
this.bulletNavigation = true;
|
|
448
|
-
|
|
449
|
-
* Mobile width for sliders
|
|
450
|
-
*/
|
|
425
|
+
this.slideTimer = undefined;
|
|
451
426
|
this.sliderMobileWidth = 200;
|
|
452
|
-
/**
|
|
453
|
-
* Desktop width for sliders
|
|
454
|
-
*/
|
|
455
427
|
this.sliderDesktopWidth = 300;
|
|
456
|
-
/**
|
|
457
|
-
* Translation via url
|
|
458
|
-
*/
|
|
459
428
|
this.translationUrl = '';
|
|
460
429
|
this.isLoading = true;
|
|
461
430
|
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-7d6bdd9d.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('general-slider-navigation.cjs.js', document.baseURI).href));
|
|
@@ -21,27 +21,19 @@ 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,
|
|
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 };
|
|
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/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
|
|
40
34
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
41
35
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
42
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
43
|
-
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
44
|
-
};
|
|
36
|
+
var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
45
37
|
var registerHost = (hostElement, cmpMeta) => {
|
|
46
38
|
const hostRef = {
|
|
47
39
|
$flags$: 0,
|
|
@@ -54,8 +46,7 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
54
46
|
hostElement["s-p"] = [];
|
|
55
47
|
hostElement["s-rc"] = [];
|
|
56
48
|
}
|
|
57
|
-
|
|
58
|
-
return ref;
|
|
49
|
+
return hostRefs.set(hostElement, hostRef);
|
|
59
50
|
};
|
|
60
51
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
61
52
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -92,22 +83,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
92
83
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
93
84
|
/* webpackMode: "lazy" */
|
|
94
85
|
`./${bundleId}.entry.js${""}`
|
|
95
|
-
)); }).then(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
cmpModules.set(bundleId, importedModule);
|
|
99
|
-
}
|
|
100
|
-
return importedModule[exportName];
|
|
101
|
-
},
|
|
102
|
-
(e) => {
|
|
103
|
-
consoleError(e, hostRef.$hostElement$);
|
|
86
|
+
)); }).then((importedModule) => {
|
|
87
|
+
{
|
|
88
|
+
cmpModules.set(bundleId, importedModule);
|
|
104
89
|
}
|
|
105
|
-
|
|
90
|
+
return importedModule[exportName];
|
|
91
|
+
}, consoleError);
|
|
106
92
|
};
|
|
107
93
|
|
|
108
94
|
// src/client/client-style.ts
|
|
109
95
|
var styles = /* @__PURE__ */ new Map();
|
|
110
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
|
111
96
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
112
97
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
113
98
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -165,6 +150,14 @@ var flush = () => {
|
|
|
165
150
|
};
|
|
166
151
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
167
152
|
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;
|
|
168
161
|
var isComplexType = (o) => {
|
|
169
162
|
o = typeof o;
|
|
170
163
|
return o === "object" || o === "function";
|
|
@@ -353,40 +346,13 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
353
346
|
}
|
|
354
347
|
if (!appliedStyles.has(scopeId2)) {
|
|
355
348
|
{
|
|
356
|
-
styleElm =
|
|
349
|
+
styleElm = doc.createElement("style");
|
|
357
350
|
styleElm.innerHTML = style;
|
|
358
351
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
359
352
|
if (nonce != null) {
|
|
360
353
|
styleElm.setAttribute("nonce", nonce);
|
|
361
354
|
}
|
|
362
|
-
|
|
363
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
|
364
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
365
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
366
|
-
styleContainerNode.insertBefore(
|
|
367
|
-
styleElm,
|
|
368
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
369
|
-
);
|
|
370
|
-
} else if ("host" in styleContainerNode) {
|
|
371
|
-
if (supportsConstructableStylesheets) {
|
|
372
|
-
const stylesheet = new CSSStyleSheet();
|
|
373
|
-
stylesheet.replaceSync(style);
|
|
374
|
-
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
375
|
-
} else {
|
|
376
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
377
|
-
if (existingStyleContainer) {
|
|
378
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
379
|
-
} else {
|
|
380
|
-
styleContainerNode.prepend(styleElm);
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
} else {
|
|
384
|
-
styleContainerNode.append(styleElm);
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
388
|
-
styleContainerNode.insertBefore(styleElm, null);
|
|
389
|
-
}
|
|
355
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
|
|
390
356
|
}
|
|
391
357
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
392
358
|
styleElm.innerHTML += SLOT_FB_CSS;
|
|
@@ -409,25 +375,23 @@ var attachStyles = (hostRef) => {
|
|
|
409
375
|
const scopeId2 = addStyle(
|
|
410
376
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
411
377
|
cmpMeta);
|
|
412
|
-
if (
|
|
378
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
413
379
|
elm["s-sc"] = scopeId2;
|
|
414
380
|
elm.classList.add(scopeId2 + "-h");
|
|
415
381
|
}
|
|
416
382
|
endAttachStyles();
|
|
417
383
|
};
|
|
418
384
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
419
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags
|
|
385
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
420
386
|
if (oldValue !== newValue) {
|
|
421
387
|
let isProp = isMemberInElement(elm, memberName);
|
|
422
388
|
let ln = memberName.toLowerCase();
|
|
423
389
|
if (memberName === "class") {
|
|
424
390
|
const classList = elm.classList;
|
|
425
391
|
const oldClasses = parseClassList(oldValue);
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
430
|
-
}
|
|
392
|
+
const newClasses = parseClassList(newValue);
|
|
393
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
394
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
431
395
|
} else if (memberName === "style") {
|
|
432
396
|
{
|
|
433
397
|
for (const prop in oldValue) {
|
|
@@ -480,13 +444,9 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
480
444
|
if (memberName === "list") {
|
|
481
445
|
isProp = false;
|
|
482
446
|
} else if (oldValue == null || elm[memberName] != n) {
|
|
483
|
-
|
|
484
|
-
elm[memberName] = n;
|
|
485
|
-
} else {
|
|
486
|
-
elm.setAttribute(memberName, n);
|
|
487
|
-
}
|
|
447
|
+
elm[memberName] = n;
|
|
488
448
|
}
|
|
489
|
-
} else
|
|
449
|
+
} else {
|
|
490
450
|
elm[memberName] = newValue;
|
|
491
451
|
}
|
|
492
452
|
} catch (e) {
|
|
@@ -508,44 +468,24 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
508
468
|
}
|
|
509
469
|
};
|
|
510
470
|
var parseClassListRegex = /\s/;
|
|
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
|
-
};
|
|
471
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
520
472
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
521
473
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
522
474
|
|
|
523
475
|
// src/runtime/vdom/update-element.ts
|
|
524
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2
|
|
476
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
525
477
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
526
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
527
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
478
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
479
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
528
480
|
{
|
|
529
481
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
530
482
|
if (!(memberName in newVnodeAttrs)) {
|
|
531
|
-
setAccessor(
|
|
532
|
-
elm,
|
|
533
|
-
memberName,
|
|
534
|
-
oldVnodeAttrs[memberName],
|
|
535
|
-
void 0,
|
|
536
|
-
isSvgMode2,
|
|
537
|
-
newVnode.$flags$);
|
|
483
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
538
484
|
}
|
|
539
485
|
}
|
|
540
486
|
}
|
|
541
487
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
542
|
-
setAccessor(
|
|
543
|
-
elm,
|
|
544
|
-
memberName,
|
|
545
|
-
oldVnodeAttrs[memberName],
|
|
546
|
-
newVnodeAttrs[memberName],
|
|
547
|
-
isSvgMode2,
|
|
548
|
-
newVnode.$flags$);
|
|
488
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
549
489
|
}
|
|
550
490
|
};
|
|
551
491
|
function sortedAttrNames(attrNames) {
|
|
@@ -557,10 +497,13 @@ function sortedAttrNames(attrNames) {
|
|
|
557
497
|
attrNames
|
|
558
498
|
);
|
|
559
499
|
}
|
|
500
|
+
|
|
501
|
+
// src/runtime/vdom/vdom-render.ts
|
|
502
|
+
var scopeId;
|
|
560
503
|
var hostTagName;
|
|
561
504
|
var useNativeShadowDom = false;
|
|
562
505
|
var isSvgMode = false;
|
|
563
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
506
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
564
507
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
565
508
|
let i2 = 0;
|
|
566
509
|
let elm;
|
|
@@ -581,6 +524,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
581
524
|
{
|
|
582
525
|
updateElement(null, newVNode2, isSvgMode);
|
|
583
526
|
}
|
|
527
|
+
if (isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
528
|
+
elm.classList.add(elm["s-si"] = scopeId);
|
|
529
|
+
}
|
|
584
530
|
if (newVNode2.$children$) {
|
|
585
531
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
586
532
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -717,9 +663,6 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
717
663
|
if (!isInitialRender) {
|
|
718
664
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
719
665
|
}
|
|
720
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
721
|
-
leftVNode.$key$ = rightVNode.$key$;
|
|
722
|
-
}
|
|
723
666
|
return true;
|
|
724
667
|
}
|
|
725
668
|
return false;
|
|
@@ -746,10 +689,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
746
689
|
elm.textContent = "";
|
|
747
690
|
}
|
|
748
691
|
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
749
|
-
} else if (
|
|
750
|
-
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
751
|
-
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
752
|
-
) {
|
|
692
|
+
} else if (oldChildren !== null) {
|
|
753
693
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
754
694
|
}
|
|
755
695
|
if (isSvgMode && tag === "svg") {
|
|
@@ -766,9 +706,8 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
766
706
|
}
|
|
767
707
|
};
|
|
768
708
|
var insertBefore = (parent, newNode, reference) => {
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
}
|
|
709
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
710
|
+
return inserted;
|
|
772
711
|
};
|
|
773
712
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
774
713
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -793,21 +732,17 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
793
732
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
794
733
|
hostRef.$vnode$ = rootVnode;
|
|
795
734
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
796
|
-
|
|
735
|
+
{
|
|
736
|
+
scopeId = hostElm["s-sc"];
|
|
737
|
+
}
|
|
738
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
797
739
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
798
740
|
};
|
|
799
741
|
|
|
800
742
|
// src/runtime/update-component.ts
|
|
801
743
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
802
744
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
803
|
-
|
|
804
|
-
new Promise(
|
|
805
|
-
(r) => hostRef.$onRenderResolve$ = () => {
|
|
806
|
-
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
807
|
-
r();
|
|
808
|
-
}
|
|
809
|
-
)
|
|
810
|
-
);
|
|
745
|
+
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
|
811
746
|
}
|
|
812
747
|
};
|
|
813
748
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -834,7 +769,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
834
769
|
let maybePromise;
|
|
835
770
|
if (isInitialLoad) {
|
|
836
771
|
{
|
|
837
|
-
maybePromise = safeCall(instance, "componentWillLoad"
|
|
772
|
+
maybePromise = safeCall(instance, "componentWillLoad");
|
|
838
773
|
}
|
|
839
774
|
}
|
|
840
775
|
endSchedule();
|
|
@@ -903,7 +838,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
903
838
|
const instance = hostRef.$lazyInstance$ ;
|
|
904
839
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
905
840
|
{
|
|
906
|
-
safeCall(instance, "componentDidRender"
|
|
841
|
+
safeCall(instance, "componentDidRender");
|
|
907
842
|
}
|
|
908
843
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
909
844
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -911,7 +846,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
911
846
|
addHydratedFlag(elm);
|
|
912
847
|
}
|
|
913
848
|
{
|
|
914
|
-
safeCall(instance, "componentDidLoad"
|
|
849
|
+
safeCall(instance, "componentDidLoad");
|
|
915
850
|
}
|
|
916
851
|
endPostUpdate();
|
|
917
852
|
{
|
|
@@ -935,14 +870,17 @@ var postUpdateComponent = (hostRef) => {
|
|
|
935
870
|
}
|
|
936
871
|
};
|
|
937
872
|
var appDidLoad = (who) => {
|
|
873
|
+
{
|
|
874
|
+
addHydratedFlag(doc.documentElement);
|
|
875
|
+
}
|
|
938
876
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
939
877
|
};
|
|
940
|
-
var safeCall = (instance, method, arg
|
|
878
|
+
var safeCall = (instance, method, arg) => {
|
|
941
879
|
if (instance && instance[method]) {
|
|
942
880
|
try {
|
|
943
881
|
return instance[method](arg);
|
|
944
882
|
} catch (e) {
|
|
945
|
-
consoleError(e
|
|
883
|
+
consoleError(e);
|
|
946
884
|
}
|
|
947
885
|
}
|
|
948
886
|
return void 0;
|
|
@@ -1001,68 +939,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1001
939
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1002
940
|
members.map(([memberName, [memberFlags]]) => {
|
|
1003
941
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1004
|
-
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1005
|
-
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1006
|
-
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1007
|
-
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1008
|
-
Object.defineProperty(prototype, memberName, {
|
|
1009
|
-
get() {
|
|
1010
|
-
{
|
|
1011
|
-
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1012
|
-
return getValue(this, memberName);
|
|
1013
|
-
}
|
|
1014
|
-
const ref = getHostRef(this);
|
|
1015
|
-
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1016
|
-
if (!instance) return;
|
|
1017
|
-
return instance[memberName];
|
|
1018
|
-
}
|
|
1019
|
-
},
|
|
1020
|
-
configurable: true,
|
|
1021
|
-
enumerable: true
|
|
1022
|
-
});
|
|
1023
|
-
}
|
|
1024
942
|
Object.defineProperty(prototype, memberName, {
|
|
943
|
+
get() {
|
|
944
|
+
return getValue(this, memberName);
|
|
945
|
+
},
|
|
1025
946
|
set(newValue) {
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
newValue = ref.$instanceValues$.get(memberName);
|
|
1031
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1032
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
1033
|
-
}
|
|
1034
|
-
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1035
|
-
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1036
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
1037
|
-
return;
|
|
1038
|
-
}
|
|
1039
|
-
{
|
|
1040
|
-
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1041
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
1042
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1043
|
-
ref.$onReadyPromise$.then(() => {
|
|
1044
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1045
|
-
ref.$lazyInstance$[memberName] = newValue;
|
|
1046
|
-
}
|
|
1047
|
-
});
|
|
1048
|
-
}
|
|
1049
|
-
return;
|
|
1050
|
-
}
|
|
1051
|
-
const setterSetVal = () => {
|
|
1052
|
-
const currentValue = ref.$lazyInstance$[memberName];
|
|
1053
|
-
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1054
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
1055
|
-
}
|
|
1056
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1057
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1058
|
-
};
|
|
1059
|
-
if (ref.$lazyInstance$) {
|
|
1060
|
-
setterSetVal();
|
|
1061
|
-
} else {
|
|
1062
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1065
|
-
}
|
|
947
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
948
|
+
},
|
|
949
|
+
configurable: true,
|
|
950
|
+
enumerable: true
|
|
1066
951
|
});
|
|
1067
952
|
}
|
|
1068
953
|
});
|
|
@@ -1072,11 +957,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1072
957
|
plt.jmp(() => {
|
|
1073
958
|
var _a2;
|
|
1074
959
|
const propName = attrNameToPropName.get(attrName);
|
|
1075
|
-
if (this.hasOwnProperty(propName)
|
|
960
|
+
if (this.hasOwnProperty(propName)) {
|
|
1076
961
|
newValue = this[propName];
|
|
1077
962
|
delete this[propName];
|
|
1078
|
-
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" &&
|
|
1079
|
-
this[propName] == newValue) {
|
|
963
|
+
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
|
|
1080
964
|
return;
|
|
1081
965
|
} else if (propName == null) {
|
|
1082
966
|
const hostRef = getHostRef(this);
|
|
@@ -1092,11 +976,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1092
976
|
}
|
|
1093
977
|
return;
|
|
1094
978
|
}
|
|
1095
|
-
|
|
1096
|
-
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1097
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1098
|
-
this[propName] = newValue;
|
|
1099
|
-
}
|
|
979
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1100
980
|
});
|
|
1101
981
|
};
|
|
1102
982
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1125,7 +1005,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1125
1005
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1126
1006
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1127
1007
|
if (bundleId) {
|
|
1128
|
-
const CstrImport = loadModule(cmpMeta
|
|
1008
|
+
const CstrImport = loadModule(cmpMeta);
|
|
1129
1009
|
if (CstrImport && "then" in CstrImport) {
|
|
1130
1010
|
const endLoad = uniqueTime();
|
|
1131
1011
|
Cstr = await CstrImport;
|
|
@@ -1150,7 +1030,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1150
1030
|
try {
|
|
1151
1031
|
new Cstr(hostRef);
|
|
1152
1032
|
} catch (e) {
|
|
1153
|
-
consoleError(e
|
|
1033
|
+
consoleError(e);
|
|
1154
1034
|
}
|
|
1155
1035
|
{
|
|
1156
1036
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1185,7 +1065,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1185
1065
|
schedule();
|
|
1186
1066
|
}
|
|
1187
1067
|
};
|
|
1188
|
-
var fireConnectedCallback = (instance
|
|
1068
|
+
var fireConnectedCallback = (instance) => {
|
|
1189
1069
|
};
|
|
1190
1070
|
|
|
1191
1071
|
// src/runtime/connected-callback.ts
|
|
@@ -1225,26 +1105,20 @@ var connectedCallback = (elm) => {
|
|
|
1225
1105
|
endConnected();
|
|
1226
1106
|
}
|
|
1227
1107
|
};
|
|
1228
|
-
var disconnectInstance = (instance
|
|
1108
|
+
var disconnectInstance = (instance) => {
|
|
1229
1109
|
{
|
|
1230
|
-
safeCall(instance, "disconnectedCallback"
|
|
1110
|
+
safeCall(instance, "disconnectedCallback");
|
|
1231
1111
|
}
|
|
1232
1112
|
};
|
|
1233
1113
|
var disconnectedCallback = async (elm) => {
|
|
1234
1114
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1235
1115
|
const hostRef = getHostRef(elm);
|
|
1236
1116
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1237
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
1117
|
+
disconnectInstance(hostRef.$lazyInstance$);
|
|
1238
1118
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1239
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
1119
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
|
|
1240
1120
|
}
|
|
1241
1121
|
}
|
|
1242
|
-
if (rootAppliedStyles.has(elm)) {
|
|
1243
|
-
rootAppliedStyles.delete(elm);
|
|
1244
|
-
}
|
|
1245
|
-
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1246
|
-
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1247
|
-
}
|
|
1248
1122
|
};
|
|
1249
1123
|
|
|
1250
1124
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1325,17 +1199,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1325
1199
|
}
|
|
1326
1200
|
disconnectedCallback() {
|
|
1327
1201
|
plt.jmp(() => disconnectedCallback(this));
|
|
1328
|
-
plt.raf(() => {
|
|
1329
|
-
var _a3;
|
|
1330
|
-
const hostRef = getHostRef(this);
|
|
1331
|
-
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1332
|
-
if (i2 > -1) {
|
|
1333
|
-
deferredConnectedCallbacks.splice(i2, 1);
|
|
1334
|
-
}
|
|
1335
|
-
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1336
|
-
delete hostRef.$vnode$.$elm$;
|
|
1337
|
-
}
|
|
1338
|
-
});
|
|
1339
1202
|
}
|
|
1340
1203
|
componentOnReady() {
|
|
1341
1204
|
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-7d6bdd9d.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|