@everymatrix/general-slider-navigation 1.54.12 → 1.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/carousel-component_2.cjs.entry.js +19 -51
- package/dist/cjs/general-slider-navigation.cjs.js +2 -2
- package/dist/cjs/{index-75dd98ba.js → index-b79a855b.js} +72 -175
- 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 +17 -38
- package/dist/collection/components/general-slider-navigation/general-slider-navigation.js +2 -49
- package/dist/esm/carousel-component_2.entry.js +19 -51
- package/dist/esm/general-slider-navigation.js +3 -3
- package/dist/esm/{index-172d2d6e.js → index-e155c85c.js} +72 -175
- 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-0c4f790f.entry.js +1 -0
- package/dist/general-slider-navigation/p-65c898e4.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/package.json +1 -1
- package/dist/general-slider-navigation/p-5090827e.js +0 -2
- package/dist/general-slider-navigation/p-c30ac2e4.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-b79a855b.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);
|
|
@@ -364,41 +357,16 @@ const GeneralSliderNavigationStyle0 = generalSliderNavigationCss;
|
|
|
364
357
|
const GeneralSliderNavigation = class {
|
|
365
358
|
constructor(hostRef) {
|
|
366
359
|
index.registerInstance(this, hostRef);
|
|
367
|
-
/**
|
|
368
|
-
* Client custom styling via inline style
|
|
369
|
-
*/
|
|
370
360
|
this.clientStyling = '';
|
|
371
|
-
/**
|
|
372
|
-
* Client custom styling via url
|
|
373
|
-
*/
|
|
374
361
|
this.clientStylingUrl = '';
|
|
375
|
-
|
|
376
|
-
* CMS Endpoint stage
|
|
377
|
-
*/
|
|
362
|
+
this.cmsEndpoint = undefined;
|
|
378
363
|
this.cmsEnv = 'stage';
|
|
379
|
-
/**
|
|
380
|
-
* Language of the widget
|
|
381
|
-
*/
|
|
382
364
|
this.language = 'en';
|
|
383
|
-
/**
|
|
384
|
-
* User roles
|
|
385
|
-
*/
|
|
386
365
|
this.userRoles = 'everyone';
|
|
387
|
-
/**
|
|
388
|
-
* Show bullet navigation under slides
|
|
389
|
-
*/
|
|
390
366
|
this.bulletNavigation = true;
|
|
391
|
-
|
|
392
|
-
* Mobile width for sliders
|
|
393
|
-
*/
|
|
367
|
+
this.slideTimer = undefined;
|
|
394
368
|
this.sliderMobileWidth = 200;
|
|
395
|
-
/**
|
|
396
|
-
* Desktop width for sliders
|
|
397
|
-
*/
|
|
398
369
|
this.sliderDesktopWidth = 300;
|
|
399
|
-
/**
|
|
400
|
-
* Translation via url
|
|
401
|
-
*/
|
|
402
370
|
this.translationUrl = '';
|
|
403
371
|
this.isLoading = true;
|
|
404
372
|
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-b79a855b.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
|
-
Stencil Client Patch Browser v4.
|
|
9
|
+
Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com
|
|
10
10
|
*/
|
|
11
11
|
var patchBrowser = () => {
|
|
12
12
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('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.22.3 | MIT Licensed | https://stenciljs.com
|
|
28
28
|
*/
|
|
29
29
|
var __defProp = Object.defineProperty;
|
|
30
30
|
var __export = (target, all) => {
|
|
31
31
|
for (var name in all)
|
|
32
32
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
33
33
|
};
|
|
34
|
-
|
|
35
|
-
// src/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,7 +346,7 @@ 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) {
|
|
@@ -363,10 +356,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
363
356
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
364
357
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
365
358
|
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
|
-
);
|
|
359
|
+
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
370
360
|
} else if ("host" in styleContainerNode) {
|
|
371
361
|
if (supportsConstructableStylesheets) {
|
|
372
362
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -384,7 +374,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
384
374
|
styleContainerNode.append(styleElm);
|
|
385
375
|
}
|
|
386
376
|
}
|
|
387
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
377
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
|
388
378
|
styleContainerNode.insertBefore(styleElm, null);
|
|
389
379
|
}
|
|
390
380
|
}
|
|
@@ -409,25 +399,23 @@ var attachStyles = (hostRef) => {
|
|
|
409
399
|
const scopeId2 = addStyle(
|
|
410
400
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
411
401
|
cmpMeta);
|
|
412
|
-
if (
|
|
402
|
+
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
413
403
|
elm["s-sc"] = scopeId2;
|
|
414
404
|
elm.classList.add(scopeId2 + "-h");
|
|
415
405
|
}
|
|
416
406
|
endAttachStyles();
|
|
417
407
|
};
|
|
418
408
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
419
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags
|
|
409
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
420
410
|
if (oldValue !== newValue) {
|
|
421
411
|
let isProp = isMemberInElement(elm, memberName);
|
|
422
412
|
let ln = memberName.toLowerCase();
|
|
423
413
|
if (memberName === "class") {
|
|
424
414
|
const classList = elm.classList;
|
|
425
415
|
const oldClasses = parseClassList(oldValue);
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
430
|
-
}
|
|
416
|
+
const newClasses = parseClassList(newValue);
|
|
417
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
418
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
431
419
|
} else if (memberName === "style") {
|
|
432
420
|
{
|
|
433
421
|
for (const prop in oldValue) {
|
|
@@ -486,7 +474,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
486
474
|
elm.setAttribute(memberName, n);
|
|
487
475
|
}
|
|
488
476
|
}
|
|
489
|
-
} else
|
|
477
|
+
} else {
|
|
490
478
|
elm[memberName] = newValue;
|
|
491
479
|
}
|
|
492
480
|
} catch (e) {
|
|
@@ -508,44 +496,24 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
508
496
|
}
|
|
509
497
|
};
|
|
510
498
|
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
|
-
};
|
|
499
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
520
500
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
521
501
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
522
502
|
|
|
523
503
|
// src/runtime/vdom/update-element.ts
|
|
524
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2
|
|
504
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
525
505
|
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$ ||
|
|
506
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
507
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
528
508
|
{
|
|
529
509
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
530
510
|
if (!(memberName in newVnodeAttrs)) {
|
|
531
|
-
setAccessor(
|
|
532
|
-
elm,
|
|
533
|
-
memberName,
|
|
534
|
-
oldVnodeAttrs[memberName],
|
|
535
|
-
void 0,
|
|
536
|
-
isSvgMode2,
|
|
537
|
-
newVnode.$flags$);
|
|
511
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
538
512
|
}
|
|
539
513
|
}
|
|
540
514
|
}
|
|
541
515
|
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$);
|
|
516
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
549
517
|
}
|
|
550
518
|
};
|
|
551
519
|
function sortedAttrNames(attrNames) {
|
|
@@ -557,10 +525,13 @@ function sortedAttrNames(attrNames) {
|
|
|
557
525
|
attrNames
|
|
558
526
|
);
|
|
559
527
|
}
|
|
528
|
+
|
|
529
|
+
// src/runtime/vdom/vdom-render.ts
|
|
530
|
+
var scopeId;
|
|
560
531
|
var hostTagName;
|
|
561
532
|
var useNativeShadowDom = false;
|
|
562
533
|
var isSvgMode = false;
|
|
563
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
534
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
564
535
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
565
536
|
let i2 = 0;
|
|
566
537
|
let elm;
|
|
@@ -581,6 +552,11 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
581
552
|
{
|
|
582
553
|
updateElement(null, newVNode2, isSvgMode);
|
|
583
554
|
}
|
|
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
|
+
}
|
|
584
560
|
if (newVNode2.$children$) {
|
|
585
561
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
586
562
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -717,9 +693,6 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
717
693
|
if (!isInitialRender) {
|
|
718
694
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
719
695
|
}
|
|
720
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
721
|
-
leftVNode.$key$ = rightVNode.$key$;
|
|
722
|
-
}
|
|
723
696
|
return true;
|
|
724
697
|
}
|
|
725
698
|
return false;
|
|
@@ -766,9 +739,8 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
766
739
|
}
|
|
767
740
|
};
|
|
768
741
|
var insertBefore = (parent, newNode, reference) => {
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
}
|
|
742
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
743
|
+
return inserted;
|
|
772
744
|
};
|
|
773
745
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
774
746
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -793,21 +765,17 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
793
765
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
794
766
|
hostRef.$vnode$ = rootVnode;
|
|
795
767
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
796
|
-
|
|
768
|
+
{
|
|
769
|
+
scopeId = hostElm["s-sc"];
|
|
770
|
+
}
|
|
771
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
797
772
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
798
773
|
};
|
|
799
774
|
|
|
800
775
|
// src/runtime/update-component.ts
|
|
801
776
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
802
777
|
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
|
-
);
|
|
778
|
+
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
|
811
779
|
}
|
|
812
780
|
};
|
|
813
781
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -834,7 +802,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
834
802
|
let maybePromise;
|
|
835
803
|
if (isInitialLoad) {
|
|
836
804
|
{
|
|
837
|
-
maybePromise = safeCall(instance, "componentWillLoad"
|
|
805
|
+
maybePromise = safeCall(instance, "componentWillLoad");
|
|
838
806
|
}
|
|
839
807
|
}
|
|
840
808
|
endSchedule();
|
|
@@ -903,7 +871,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
903
871
|
const instance = hostRef.$lazyInstance$ ;
|
|
904
872
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
905
873
|
{
|
|
906
|
-
safeCall(instance, "componentDidRender"
|
|
874
|
+
safeCall(instance, "componentDidRender");
|
|
907
875
|
}
|
|
908
876
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
909
877
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -911,7 +879,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
911
879
|
addHydratedFlag(elm);
|
|
912
880
|
}
|
|
913
881
|
{
|
|
914
|
-
safeCall(instance, "componentDidLoad"
|
|
882
|
+
safeCall(instance, "componentDidLoad");
|
|
915
883
|
}
|
|
916
884
|
endPostUpdate();
|
|
917
885
|
{
|
|
@@ -935,14 +903,17 @@ var postUpdateComponent = (hostRef) => {
|
|
|
935
903
|
}
|
|
936
904
|
};
|
|
937
905
|
var appDidLoad = (who) => {
|
|
906
|
+
{
|
|
907
|
+
addHydratedFlag(doc.documentElement);
|
|
908
|
+
}
|
|
938
909
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
939
910
|
};
|
|
940
|
-
var safeCall = (instance, method, arg
|
|
911
|
+
var safeCall = (instance, method, arg) => {
|
|
941
912
|
if (instance && instance[method]) {
|
|
942
913
|
try {
|
|
943
914
|
return instance[method](arg);
|
|
944
915
|
} catch (e) {
|
|
945
|
-
consoleError(e
|
|
916
|
+
consoleError(e);
|
|
946
917
|
}
|
|
947
918
|
}
|
|
948
919
|
return void 0;
|
|
@@ -1001,68 +972,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1001
972
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1002
973
|
members.map(([memberName, [memberFlags]]) => {
|
|
1003
974
|
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
975
|
Object.defineProperty(prototype, memberName, {
|
|
976
|
+
get() {
|
|
977
|
+
return getValue(this, memberName);
|
|
978
|
+
},
|
|
1025
979
|
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
|
-
}
|
|
980
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
981
|
+
},
|
|
982
|
+
configurable: true,
|
|
983
|
+
enumerable: true
|
|
1066
984
|
});
|
|
1067
985
|
}
|
|
1068
986
|
});
|
|
@@ -1072,7 +990,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1072
990
|
plt.jmp(() => {
|
|
1073
991
|
var _a2;
|
|
1074
992
|
const propName = attrNameToPropName.get(attrName);
|
|
1075
|
-
if (this.hasOwnProperty(propName)
|
|
993
|
+
if (this.hasOwnProperty(propName)) {
|
|
1076
994
|
newValue = this[propName];
|
|
1077
995
|
delete this[propName];
|
|
1078
996
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1092,11 +1010,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1092
1010
|
}
|
|
1093
1011
|
return;
|
|
1094
1012
|
}
|
|
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
|
-
}
|
|
1013
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1100
1014
|
});
|
|
1101
1015
|
};
|
|
1102
1016
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1125,7 +1039,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1125
1039
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1126
1040
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1127
1041
|
if (bundleId) {
|
|
1128
|
-
const CstrImport = loadModule(cmpMeta
|
|
1042
|
+
const CstrImport = loadModule(cmpMeta);
|
|
1129
1043
|
if (CstrImport && "then" in CstrImport) {
|
|
1130
1044
|
const endLoad = uniqueTime();
|
|
1131
1045
|
Cstr = await CstrImport;
|
|
@@ -1150,7 +1064,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1150
1064
|
try {
|
|
1151
1065
|
new Cstr(hostRef);
|
|
1152
1066
|
} catch (e) {
|
|
1153
|
-
consoleError(e
|
|
1067
|
+
consoleError(e);
|
|
1154
1068
|
}
|
|
1155
1069
|
{
|
|
1156
1070
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1185,7 +1099,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1185
1099
|
schedule();
|
|
1186
1100
|
}
|
|
1187
1101
|
};
|
|
1188
|
-
var fireConnectedCallback = (instance
|
|
1102
|
+
var fireConnectedCallback = (instance) => {
|
|
1189
1103
|
};
|
|
1190
1104
|
|
|
1191
1105
|
// src/runtime/connected-callback.ts
|
|
@@ -1225,26 +1139,20 @@ var connectedCallback = (elm) => {
|
|
|
1225
1139
|
endConnected();
|
|
1226
1140
|
}
|
|
1227
1141
|
};
|
|
1228
|
-
var disconnectInstance = (instance
|
|
1142
|
+
var disconnectInstance = (instance) => {
|
|
1229
1143
|
{
|
|
1230
|
-
safeCall(instance, "disconnectedCallback"
|
|
1144
|
+
safeCall(instance, "disconnectedCallback");
|
|
1231
1145
|
}
|
|
1232
1146
|
};
|
|
1233
1147
|
var disconnectedCallback = async (elm) => {
|
|
1234
1148
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1235
1149
|
const hostRef = getHostRef(elm);
|
|
1236
1150
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1237
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
1151
|
+
disconnectInstance(hostRef.$lazyInstance$);
|
|
1238
1152
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1239
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
1153
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
|
|
1240
1154
|
}
|
|
1241
1155
|
}
|
|
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
1156
|
};
|
|
1249
1157
|
|
|
1250
1158
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1325,17 +1233,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1325
1233
|
}
|
|
1326
1234
|
disconnectedCallback() {
|
|
1327
1235
|
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
1236
|
}
|
|
1340
1237
|
componentOnReady() {
|
|
1341
1238
|
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-b79a855b.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|