@everymatrix/general-slider 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/general-slider.cjs.entry.js +9 -39
- package/dist/cjs/general-slider.cjs.js +2 -2
- package/dist/cjs/{index-1e31d6e0.js → index-2e6eeb26.js} +71 -206
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/general-slider/general-slider.js +8 -58
- package/dist/esm/general-slider.entry.js +9 -39
- package/dist/esm/general-slider.js +3 -3
- package/dist/esm/{index-69022c20.js → index-616f5c12.js} +71 -206
- package/dist/esm/loader.js +2 -2
- package/dist/general-slider/general-slider.esm.js +1 -1
- package/dist/general-slider/{p-983490d7.entry.js → p-044ca50c.entry.js} +1 -1
- package/dist/general-slider/p-f8262766.js +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-slider/.stencil/packages/stencil/general-slider/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-slider/.stencil/packages/stencil/general-slider/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/p-4b3cc973.js +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-slider/.stencil/packages/stencil/general-slider/stencil.config.d.ts +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-slider/.stencil/packages/stencil/general-slider/stencil.config.dev.d.ts +0 -2
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-slider/.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/.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/.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/.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-2e6eeb26.js');
|
|
6
6
|
|
|
7
7
|
const generalSliderCss = ":host{display:block}.GeneralSlider{position:relative}.Slider{position:relative;width:100%;margin:0 auto;overflow:hidden}.SliderList{display:flex;margin:0;padding:0;list-style:none;transition:transform 0.5s ease-in-out}.SliderList.Static{transition-duration:0ms}::slotted(li){flex:1 0 auto;width:100%;margin:auto}::slotted(li.hide){visibility:hidden;height:0;transition-delay:500ms}.Col-2 ::slotted(li){flex:2 0 auto;width:50%}.Col-3 ::slotted(li){flex:3 0 auto;width:33.3333333333%}.Col-4 ::slotted(li){flex:4 0 auto;width:25%}.Col-5 ::slotted(li){flex:5 0 auto;width:20%}.Col-6 ::slotted(li){flex:6 0 auto;width:16.6666666667%}.Col-7 ::slotted(li){flex:7 0 auto;width:14.2857142857%}.Col-8 ::slotted(li){flex:8 0 auto;width:12.5%}.Col-9 ::slotted(li){flex:9 0 auto;width:11.1111111111%}.Col-10 ::slotted(li){flex:10 0 auto;width:10%}.Col-11 ::slotted(li){flex:11 0 auto;width:9.0909090909%}.Col-12 ::slotted(li){flex:12 0 auto;width:8.3333333333%}.Button{position:absolute;z-index:1;top:calc(50% - 32px);padding:20px;font-size:20px;line-height:20px;opacity:0.5;border:none;background:var(--emw--color-contrast, #07072A);color:var(--emw--color-white, #FFFFFF);cursor:pointer}.Button:hover{opacity:1;transition:opacity 0.5s ease-in-out}.Button[disabled],.Button[disabled]:hover{color:var(--emw--color-gray-150, #828282);opacity:0.25}.Button.ButtonNext{right:0}.PageButtons{display:flex;gap:4px;margin-top:8px}.PageButton{width:15px;height:4px;border-radius:4px;background-color:var(--emw--tournament-color-primary, #0072ed);opacity:0.2;cursor:pointer;float:right}.PageButton.active{width:45px;opacity:1}";
|
|
8
8
|
const GeneralSliderStyle0 = generalSliderCss;
|
|
@@ -10,57 +10,27 @@ const GeneralSliderStyle0 = generalSliderCss;
|
|
|
10
10
|
const GeneralSlider = class {
|
|
11
11
|
constructor(hostRef) {
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
this.slides = null;
|
|
14
|
+
this.slideWidth = 0;
|
|
15
|
+
this.controls = {
|
|
16
|
+
Prev: null,
|
|
17
|
+
Next: null
|
|
18
|
+
};
|
|
19
|
+
this.xDown = null;
|
|
20
|
+
this.yDown = null;
|
|
16
21
|
this.slideNumber = 3;
|
|
17
|
-
/**
|
|
18
|
-
* Slides to show
|
|
19
|
-
*/
|
|
20
22
|
this.slideShow = 3;
|
|
21
|
-
/**
|
|
22
|
-
* Display the arrow icon
|
|
23
|
-
*/
|
|
24
23
|
this.showArrow = true;
|
|
25
|
-
/**
|
|
26
|
-
* Display the button
|
|
27
|
-
*/
|
|
28
24
|
this.showButton = false;
|
|
29
|
-
/**
|
|
30
|
-
* Auto Slide
|
|
31
|
-
*/
|
|
32
25
|
this.autoSlide = false;
|
|
33
|
-
/**
|
|
34
|
-
* Auto Slide loop time
|
|
35
|
-
*/
|
|
36
26
|
this.loopTime = 1;
|
|
37
|
-
/**
|
|
38
|
-
* Auto fill the Item height
|
|
39
|
-
*/
|
|
40
27
|
this.autoItemHeight = false;
|
|
41
|
-
/**
|
|
42
|
-
* Client custom styling via inline styles
|
|
43
|
-
*/
|
|
44
28
|
this.clientStyling = '';
|
|
45
|
-
/**
|
|
46
|
-
* Client custom styling via url
|
|
47
|
-
*/
|
|
48
29
|
this.clientStylingUrl = '';
|
|
49
|
-
/**
|
|
50
|
-
* Current page of slider
|
|
51
|
-
*/
|
|
52
30
|
this.currentPage = 0;
|
|
53
31
|
this.currentSlideNumber = 0;
|
|
54
32
|
this.slidesCount = 0;
|
|
55
33
|
this.limitStylingAppends = false;
|
|
56
|
-
this.slides = null;
|
|
57
|
-
this.slideWidth = 0;
|
|
58
|
-
this.controls = {
|
|
59
|
-
Prev: null,
|
|
60
|
-
Next: null
|
|
61
|
-
};
|
|
62
|
-
this.xDown = null;
|
|
63
|
-
this.yDown = null;
|
|
64
34
|
}
|
|
65
35
|
slide(next) {
|
|
66
36
|
this.sliderEl.classList.remove('Static');
|
|
@@ -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-2e6eeb26.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.cjs.js', document.baseURI).href));
|
|
@@ -21,23 +21,19 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'general-slider';
|
|
24
|
-
const BUILD = /* general-slider */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, 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 */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, 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: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
27
|
+
Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
28
28
|
*/
|
|
29
29
|
var __defProp = Object.defineProperty;
|
|
30
30
|
var __export = (target, all) => {
|
|
31
31
|
for (var name in all)
|
|
32
32
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
33
33
|
};
|
|
34
|
-
|
|
35
|
-
// src/client/client-host-ref.ts
|
|
36
34
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
37
35
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
38
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
39
|
-
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
40
|
-
};
|
|
36
|
+
var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
41
37
|
var registerHost = (hostElement, cmpMeta) => {
|
|
42
38
|
const hostRef = {
|
|
43
39
|
$flags$: 0,
|
|
@@ -50,8 +46,7 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
50
46
|
hostElement["s-p"] = [];
|
|
51
47
|
hostElement["s-rc"] = [];
|
|
52
48
|
}
|
|
53
|
-
|
|
54
|
-
return ref;
|
|
49
|
+
return hostRefs.set(hostElement, hostRef);
|
|
55
50
|
};
|
|
56
51
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
57
52
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -88,22 +83,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
88
83
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
89
84
|
/* webpackMode: "lazy" */
|
|
90
85
|
`./${bundleId}.entry.js${""}`
|
|
91
|
-
)); }).then(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
cmpModules.set(bundleId, importedModule);
|
|
95
|
-
}
|
|
96
|
-
return importedModule[exportName];
|
|
97
|
-
},
|
|
98
|
-
(e) => {
|
|
99
|
-
consoleError(e, hostRef.$hostElement$);
|
|
86
|
+
)); }).then((importedModule) => {
|
|
87
|
+
{
|
|
88
|
+
cmpModules.set(bundleId, importedModule);
|
|
100
89
|
}
|
|
101
|
-
|
|
90
|
+
return importedModule[exportName];
|
|
91
|
+
}, consoleError);
|
|
102
92
|
};
|
|
103
93
|
|
|
104
94
|
// src/client/client-style.ts
|
|
105
95
|
var styles = /* @__PURE__ */ new Map();
|
|
106
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
|
107
96
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
108
97
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
109
98
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -161,6 +150,12 @@ var flush = () => {
|
|
|
161
150
|
};
|
|
162
151
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
163
152
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
153
|
+
|
|
154
|
+
// src/utils/constants.ts
|
|
155
|
+
var EMPTY_OBJ = {};
|
|
156
|
+
|
|
157
|
+
// src/utils/helpers.ts
|
|
158
|
+
var isDef = (v) => v != null;
|
|
164
159
|
var isComplexType = (o) => {
|
|
165
160
|
o = typeof o;
|
|
166
161
|
return o === "object" || o === "function";
|
|
@@ -349,40 +344,13 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
349
344
|
}
|
|
350
345
|
if (!appliedStyles.has(scopeId2)) {
|
|
351
346
|
{
|
|
352
|
-
styleElm =
|
|
347
|
+
styleElm = doc.createElement("style");
|
|
353
348
|
styleElm.innerHTML = style;
|
|
354
349
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
355
350
|
if (nonce != null) {
|
|
356
351
|
styleElm.setAttribute("nonce", nonce);
|
|
357
352
|
}
|
|
358
|
-
|
|
359
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
|
360
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
361
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
362
|
-
styleContainerNode.insertBefore(
|
|
363
|
-
styleElm,
|
|
364
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
365
|
-
);
|
|
366
|
-
} else if ("host" in styleContainerNode) {
|
|
367
|
-
if (supportsConstructableStylesheets) {
|
|
368
|
-
const stylesheet = new CSSStyleSheet();
|
|
369
|
-
stylesheet.replaceSync(style);
|
|
370
|
-
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
371
|
-
} else {
|
|
372
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
373
|
-
if (existingStyleContainer) {
|
|
374
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
375
|
-
} else {
|
|
376
|
-
styleContainerNode.prepend(styleElm);
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
} else {
|
|
380
|
-
styleContainerNode.append(styleElm);
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
384
|
-
styleContainerNode.insertBefore(styleElm, null);
|
|
385
|
-
}
|
|
353
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
|
|
386
354
|
}
|
|
387
355
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
388
356
|
styleElm.innerHTML += SLOT_FB_CSS;
|
|
@@ -405,25 +373,23 @@ var attachStyles = (hostRef) => {
|
|
|
405
373
|
const scopeId2 = addStyle(
|
|
406
374
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
407
375
|
cmpMeta);
|
|
408
|
-
if (
|
|
376
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
409
377
|
elm["s-sc"] = scopeId2;
|
|
410
378
|
elm.classList.add(scopeId2 + "-h");
|
|
411
379
|
}
|
|
412
380
|
endAttachStyles();
|
|
413
381
|
};
|
|
414
382
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
415
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags
|
|
383
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
416
384
|
if (oldValue !== newValue) {
|
|
417
385
|
let isProp = isMemberInElement(elm, memberName);
|
|
418
386
|
let ln = memberName.toLowerCase();
|
|
419
387
|
if (memberName === "class") {
|
|
420
388
|
const classList = elm.classList;
|
|
421
389
|
const oldClasses = parseClassList(oldValue);
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
426
|
-
}
|
|
390
|
+
const newClasses = parseClassList(newValue);
|
|
391
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
392
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
427
393
|
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
428
394
|
if (newValue) {
|
|
429
395
|
newValue(elm);
|
|
@@ -455,13 +421,9 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
455
421
|
if (memberName === "list") {
|
|
456
422
|
isProp = false;
|
|
457
423
|
} else if (oldValue == null || elm[memberName] != n) {
|
|
458
|
-
|
|
459
|
-
elm[memberName] = n;
|
|
460
|
-
} else {
|
|
461
|
-
elm.setAttribute(memberName, n);
|
|
462
|
-
}
|
|
424
|
+
elm[memberName] = n;
|
|
463
425
|
}
|
|
464
|
-
} else
|
|
426
|
+
} else {
|
|
465
427
|
elm[memberName] = newValue;
|
|
466
428
|
}
|
|
467
429
|
} catch (e) {
|
|
@@ -483,44 +445,24 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
483
445
|
}
|
|
484
446
|
};
|
|
485
447
|
var parseClassListRegex = /\s/;
|
|
486
|
-
var parseClassList = (value) =>
|
|
487
|
-
if (typeof value === "object" && value && "baseVal" in value) {
|
|
488
|
-
value = value.baseVal;
|
|
489
|
-
}
|
|
490
|
-
if (!value || typeof value !== "string") {
|
|
491
|
-
return [];
|
|
492
|
-
}
|
|
493
|
-
return value.split(parseClassListRegex);
|
|
494
|
-
};
|
|
448
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
495
449
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
496
450
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
497
451
|
|
|
498
452
|
// src/runtime/vdom/update-element.ts
|
|
499
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2
|
|
453
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
500
454
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
501
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
502
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
455
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
456
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
503
457
|
{
|
|
504
458
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
505
459
|
if (!(memberName in newVnodeAttrs)) {
|
|
506
|
-
setAccessor(
|
|
507
|
-
elm,
|
|
508
|
-
memberName,
|
|
509
|
-
oldVnodeAttrs[memberName],
|
|
510
|
-
void 0,
|
|
511
|
-
isSvgMode2,
|
|
512
|
-
newVnode.$flags$);
|
|
460
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
513
461
|
}
|
|
514
462
|
}
|
|
515
463
|
}
|
|
516
464
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
517
|
-
setAccessor(
|
|
518
|
-
elm,
|
|
519
|
-
memberName,
|
|
520
|
-
oldVnodeAttrs[memberName],
|
|
521
|
-
newVnodeAttrs[memberName],
|
|
522
|
-
isSvgMode2,
|
|
523
|
-
newVnode.$flags$);
|
|
465
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
524
466
|
}
|
|
525
467
|
};
|
|
526
468
|
function sortedAttrNames(attrNames) {
|
|
@@ -532,10 +474,13 @@ function sortedAttrNames(attrNames) {
|
|
|
532
474
|
attrNames
|
|
533
475
|
);
|
|
534
476
|
}
|
|
477
|
+
|
|
478
|
+
// src/runtime/vdom/vdom-render.ts
|
|
479
|
+
var scopeId;
|
|
535
480
|
var hostTagName;
|
|
536
481
|
var useNativeShadowDom = false;
|
|
537
482
|
var isSvgMode = false;
|
|
538
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
483
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
539
484
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
540
485
|
let i2 = 0;
|
|
541
486
|
let elm;
|
|
@@ -549,6 +494,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
549
494
|
{
|
|
550
495
|
updateElement(null, newVNode2, isSvgMode);
|
|
551
496
|
}
|
|
497
|
+
if (isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
498
|
+
elm.classList.add(elm["s-si"] = scopeId);
|
|
499
|
+
}
|
|
552
500
|
if (newVNode2.$children$) {
|
|
553
501
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
554
502
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -678,9 +626,6 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
678
626
|
if (!isInitialRender) {
|
|
679
627
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
680
628
|
}
|
|
681
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
682
|
-
leftVNode.$key$ = rightVNode.$key$;
|
|
683
|
-
}
|
|
684
629
|
return true;
|
|
685
630
|
}
|
|
686
631
|
return false;
|
|
@@ -704,10 +649,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
704
649
|
elm.textContent = "";
|
|
705
650
|
}
|
|
706
651
|
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
707
|
-
} else if (
|
|
708
|
-
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
709
|
-
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
710
|
-
) {
|
|
652
|
+
} else if (oldChildren !== null) {
|
|
711
653
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
712
654
|
}
|
|
713
655
|
} else if (oldVNode.$text$ !== text) {
|
|
@@ -721,9 +663,8 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
721
663
|
}
|
|
722
664
|
};
|
|
723
665
|
var insertBefore = (parent, newNode, reference) => {
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
}
|
|
666
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
667
|
+
return inserted;
|
|
727
668
|
};
|
|
728
669
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
729
670
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -742,21 +683,17 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
742
683
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
743
684
|
hostRef.$vnode$ = rootVnode;
|
|
744
685
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
745
|
-
|
|
686
|
+
{
|
|
687
|
+
scopeId = hostElm["s-sc"];
|
|
688
|
+
}
|
|
689
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
746
690
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
747
691
|
};
|
|
748
692
|
|
|
749
693
|
// src/runtime/update-component.ts
|
|
750
694
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
751
695
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
752
|
-
|
|
753
|
-
new Promise(
|
|
754
|
-
(r) => hostRef.$onRenderResolve$ = () => {
|
|
755
|
-
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
756
|
-
r();
|
|
757
|
-
}
|
|
758
|
-
)
|
|
759
|
-
);
|
|
696
|
+
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
|
760
697
|
}
|
|
761
698
|
};
|
|
762
699
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -783,7 +720,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
783
720
|
let maybePromise;
|
|
784
721
|
if (isInitialLoad) {
|
|
785
722
|
{
|
|
786
|
-
maybePromise = safeCall(instance, "componentWillLoad"
|
|
723
|
+
maybePromise = safeCall(instance, "componentWillLoad");
|
|
787
724
|
}
|
|
788
725
|
}
|
|
789
726
|
endSchedule();
|
|
@@ -852,7 +789,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
852
789
|
const instance = hostRef.$lazyInstance$ ;
|
|
853
790
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
854
791
|
{
|
|
855
|
-
safeCall(instance, "componentDidRender"
|
|
792
|
+
safeCall(instance, "componentDidRender");
|
|
856
793
|
}
|
|
857
794
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
858
795
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -860,7 +797,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
860
797
|
addHydratedFlag(elm);
|
|
861
798
|
}
|
|
862
799
|
{
|
|
863
|
-
safeCall(instance, "componentDidLoad"
|
|
800
|
+
safeCall(instance, "componentDidLoad");
|
|
864
801
|
}
|
|
865
802
|
endPostUpdate();
|
|
866
803
|
{
|
|
@@ -871,7 +808,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
871
808
|
}
|
|
872
809
|
} else {
|
|
873
810
|
{
|
|
874
|
-
safeCall(instance, "componentDidUpdate"
|
|
811
|
+
safeCall(instance, "componentDidUpdate");
|
|
875
812
|
}
|
|
876
813
|
endPostUpdate();
|
|
877
814
|
}
|
|
@@ -887,14 +824,17 @@ var postUpdateComponent = (hostRef) => {
|
|
|
887
824
|
}
|
|
888
825
|
};
|
|
889
826
|
var appDidLoad = (who) => {
|
|
827
|
+
{
|
|
828
|
+
addHydratedFlag(doc.documentElement);
|
|
829
|
+
}
|
|
890
830
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
891
831
|
};
|
|
892
|
-
var safeCall = (instance, method, arg
|
|
832
|
+
var safeCall = (instance, method, arg) => {
|
|
893
833
|
if (instance && instance[method]) {
|
|
894
834
|
try {
|
|
895
835
|
return instance[method](arg);
|
|
896
836
|
} catch (e) {
|
|
897
|
-
consoleError(e
|
|
837
|
+
consoleError(e);
|
|
898
838
|
}
|
|
899
839
|
}
|
|
900
840
|
return void 0;
|
|
@@ -937,68 +877,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
937
877
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
938
878
|
members.map(([memberName, [memberFlags]]) => {
|
|
939
879
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
940
|
-
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
941
|
-
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
942
|
-
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
943
|
-
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
944
|
-
Object.defineProperty(prototype, memberName, {
|
|
945
|
-
get() {
|
|
946
|
-
{
|
|
947
|
-
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
948
|
-
return getValue(this, memberName);
|
|
949
|
-
}
|
|
950
|
-
const ref = getHostRef(this);
|
|
951
|
-
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
952
|
-
if (!instance) return;
|
|
953
|
-
return instance[memberName];
|
|
954
|
-
}
|
|
955
|
-
},
|
|
956
|
-
configurable: true,
|
|
957
|
-
enumerable: true
|
|
958
|
-
});
|
|
959
|
-
}
|
|
960
880
|
Object.defineProperty(prototype, memberName, {
|
|
881
|
+
get() {
|
|
882
|
+
return getValue(this, memberName);
|
|
883
|
+
},
|
|
961
884
|
set(newValue) {
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
newValue = ref.$instanceValues$.get(memberName);
|
|
967
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
968
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
969
|
-
}
|
|
970
|
-
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
971
|
-
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
972
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
973
|
-
return;
|
|
974
|
-
}
|
|
975
|
-
{
|
|
976
|
-
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
977
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
978
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
979
|
-
ref.$onReadyPromise$.then(() => {
|
|
980
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
981
|
-
ref.$lazyInstance$[memberName] = newValue;
|
|
982
|
-
}
|
|
983
|
-
});
|
|
984
|
-
}
|
|
985
|
-
return;
|
|
986
|
-
}
|
|
987
|
-
const setterSetVal = () => {
|
|
988
|
-
const currentValue = ref.$lazyInstance$[memberName];
|
|
989
|
-
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
990
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
991
|
-
}
|
|
992
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
993
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
994
|
-
};
|
|
995
|
-
if (ref.$lazyInstance$) {
|
|
996
|
-
setterSetVal();
|
|
997
|
-
} else {
|
|
998
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
999
|
-
}
|
|
1000
|
-
}
|
|
1001
|
-
}
|
|
885
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
886
|
+
},
|
|
887
|
+
configurable: true,
|
|
888
|
+
enumerable: true
|
|
1002
889
|
});
|
|
1003
890
|
}
|
|
1004
891
|
});
|
|
@@ -1008,11 +895,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1008
895
|
plt.jmp(() => {
|
|
1009
896
|
var _a2;
|
|
1010
897
|
const propName = attrNameToPropName.get(attrName);
|
|
1011
|
-
if (this.hasOwnProperty(propName)
|
|
898
|
+
if (this.hasOwnProperty(propName)) {
|
|
1012
899
|
newValue = this[propName];
|
|
1013
900
|
delete this[propName];
|
|
1014
|
-
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" &&
|
|
1015
|
-
this[propName] == newValue) {
|
|
901
|
+
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
|
|
1016
902
|
return;
|
|
1017
903
|
} else if (propName == null) {
|
|
1018
904
|
const hostRef = getHostRef(this);
|
|
@@ -1028,11 +914,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1028
914
|
}
|
|
1029
915
|
return;
|
|
1030
916
|
}
|
|
1031
|
-
|
|
1032
|
-
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1033
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1034
|
-
this[propName] = newValue;
|
|
1035
|
-
}
|
|
917
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1036
918
|
});
|
|
1037
919
|
};
|
|
1038
920
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1057,7 +939,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1057
939
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1058
940
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1059
941
|
if (bundleId) {
|
|
1060
|
-
const CstrImport = loadModule(cmpMeta
|
|
942
|
+
const CstrImport = loadModule(cmpMeta);
|
|
1061
943
|
if (CstrImport && "then" in CstrImport) {
|
|
1062
944
|
const endLoad = uniqueTime();
|
|
1063
945
|
Cstr = await CstrImport;
|
|
@@ -1079,7 +961,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1079
961
|
try {
|
|
1080
962
|
new Cstr(hostRef);
|
|
1081
963
|
} catch (e) {
|
|
1082
|
-
consoleError(e
|
|
964
|
+
consoleError(e);
|
|
1083
965
|
}
|
|
1084
966
|
{
|
|
1085
967
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1111,7 +993,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1111
993
|
schedule();
|
|
1112
994
|
}
|
|
1113
995
|
};
|
|
1114
|
-
var fireConnectedCallback = (instance
|
|
996
|
+
var fireConnectedCallback = (instance) => {
|
|
1115
997
|
};
|
|
1116
998
|
|
|
1117
999
|
// src/runtime/connected-callback.ts
|
|
@@ -1151,26 +1033,20 @@ var connectedCallback = (elm) => {
|
|
|
1151
1033
|
endConnected();
|
|
1152
1034
|
}
|
|
1153
1035
|
};
|
|
1154
|
-
var disconnectInstance = (instance
|
|
1036
|
+
var disconnectInstance = (instance) => {
|
|
1155
1037
|
{
|
|
1156
|
-
safeCall(instance, "disconnectedCallback"
|
|
1038
|
+
safeCall(instance, "disconnectedCallback");
|
|
1157
1039
|
}
|
|
1158
1040
|
};
|
|
1159
1041
|
var disconnectedCallback = async (elm) => {
|
|
1160
1042
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1161
1043
|
const hostRef = getHostRef(elm);
|
|
1162
1044
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1163
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
1045
|
+
disconnectInstance(hostRef.$lazyInstance$);
|
|
1164
1046
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1165
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
1047
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
|
|
1166
1048
|
}
|
|
1167
1049
|
}
|
|
1168
|
-
if (rootAppliedStyles.has(elm)) {
|
|
1169
|
-
rootAppliedStyles.delete(elm);
|
|
1170
|
-
}
|
|
1171
|
-
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1172
|
-
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1173
|
-
}
|
|
1174
1050
|
};
|
|
1175
1051
|
|
|
1176
1052
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1244,17 +1120,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1244
1120
|
}
|
|
1245
1121
|
disconnectedCallback() {
|
|
1246
1122
|
plt.jmp(() => disconnectedCallback(this));
|
|
1247
|
-
plt.raf(() => {
|
|
1248
|
-
var _a3;
|
|
1249
|
-
const hostRef = getHostRef(this);
|
|
1250
|
-
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1251
|
-
if (i2 > -1) {
|
|
1252
|
-
deferredConnectedCallbacks.splice(i2, 1);
|
|
1253
|
-
}
|
|
1254
|
-
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1255
|
-
delete hostRef.$vnode$.$elm$;
|
|
1256
|
-
}
|
|
1257
|
-
});
|
|
1258
1123
|
}
|
|
1259
1124
|
componentOnReady() {
|
|
1260
1125
|
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-2e6eeb26.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|