@everymatrix/general-slider-navigation 1.55.0 → 1.56.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 +138 -20
- package/dist/cjs/general-slider-navigation.cjs.js +3 -3
- package/dist/cjs/{index-b79a855b.js → index-75dd98ba.js} +175 -72
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/carousel-component/carousel-component.js +38 -17
- package/dist/collection/components/general-slider-navigation/general-slider-navigation.js +103 -3
- package/dist/esm/carousel-component_2.entry.js +138 -20
- package/dist/esm/general-slider-navigation.js +4 -4
- package/dist/esm/{index-e155c85c.js → index-172d2d6e.js} +175 -72
- package/dist/esm/loader.js +3 -3
- package/dist/general-slider-navigation/general-slider-navigation.esm.js +1 -1
- package/dist/general-slider-navigation/p-5090827e.js +2 -0
- package/dist/general-slider-navigation/p-cbf1d138.entry.js +1 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-slider-navigation/.stencil/packages/stencil/general-slider-navigation/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-slider-navigation/.stencil/packages/stencil/general-slider-navigation/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/general-slider-navigation/general-slider-navigation.d.ts +10 -1
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/dist/general-slider-navigation/p-0c4f790f.entry.js +0 -1
- package/dist/general-slider-navigation/p-65c898e4.js +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-slider-navigation/.stencil/packages/stencil/general-slider-navigation/stencil.config.d.ts +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-slider-navigation/.stencil/packages/stencil/general-slider-navigation/stencil.config.dev.d.ts +0 -2
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-slider-navigation/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-slider-navigation/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-slider-navigation/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-slider-navigation/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -21,19 +21,27 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'general-slider-navigation';
|
|
24
|
-
const BUILD = /* general-slider-navigation */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
24
|
+
const BUILD = /* general-slider-navigation */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
27
|
+
Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
|
|
28
28
|
*/
|
|
29
29
|
var __defProp = Object.defineProperty;
|
|
30
30
|
var __export = (target, all) => {
|
|
31
31
|
for (var name in all)
|
|
32
32
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
33
33
|
};
|
|
34
|
+
|
|
35
|
+
// src/utils/constants.ts
|
|
36
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
37
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
38
|
+
|
|
39
|
+
// src/client/client-host-ref.ts
|
|
34
40
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
35
41
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
36
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
42
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
43
|
+
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
44
|
+
};
|
|
37
45
|
var registerHost = (hostElement, cmpMeta) => {
|
|
38
46
|
const hostRef = {
|
|
39
47
|
$flags$: 0,
|
|
@@ -46,7 +54,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
46
54
|
hostElement["s-p"] = [];
|
|
47
55
|
hostElement["s-rc"] = [];
|
|
48
56
|
}
|
|
49
|
-
|
|
57
|
+
const ref = hostRefs.set(hostElement, hostRef);
|
|
58
|
+
return ref;
|
|
50
59
|
};
|
|
51
60
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
52
61
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -83,16 +92,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
83
92
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
84
93
|
/* webpackMode: "lazy" */
|
|
85
94
|
`./${bundleId}.entry.js${""}`
|
|
86
|
-
)); }).then(
|
|
87
|
-
{
|
|
88
|
-
|
|
95
|
+
)); }).then(
|
|
96
|
+
(importedModule) => {
|
|
97
|
+
{
|
|
98
|
+
cmpModules.set(bundleId, importedModule);
|
|
99
|
+
}
|
|
100
|
+
return importedModule[exportName];
|
|
101
|
+
},
|
|
102
|
+
(e) => {
|
|
103
|
+
consoleError(e, hostRef.$hostElement$);
|
|
89
104
|
}
|
|
90
|
-
|
|
91
|
-
}, consoleError);
|
|
105
|
+
);
|
|
92
106
|
};
|
|
93
107
|
|
|
94
108
|
// src/client/client-style.ts
|
|
95
109
|
var styles = /* @__PURE__ */ new Map();
|
|
110
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
96
111
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
97
112
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
98
113
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -150,14 +165,6 @@ var flush = () => {
|
|
|
150
165
|
};
|
|
151
166
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
152
167
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
153
|
-
|
|
154
|
-
// src/utils/constants.ts
|
|
155
|
-
var EMPTY_OBJ = {};
|
|
156
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
157
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
158
|
-
|
|
159
|
-
// src/utils/helpers.ts
|
|
160
|
-
var isDef = (v) => v != null;
|
|
161
168
|
var isComplexType = (o) => {
|
|
162
169
|
o = typeof o;
|
|
163
170
|
return o === "object" || o === "function";
|
|
@@ -346,7 +353,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
346
353
|
}
|
|
347
354
|
if (!appliedStyles.has(scopeId2)) {
|
|
348
355
|
{
|
|
349
|
-
styleElm = doc.createElement("style");
|
|
356
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
|
|
350
357
|
styleElm.innerHTML = style;
|
|
351
358
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
352
359
|
if (nonce != null) {
|
|
@@ -356,7 +363,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
356
363
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
357
364
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
358
365
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
359
|
-
styleContainerNode.insertBefore(
|
|
366
|
+
styleContainerNode.insertBefore(
|
|
367
|
+
styleElm,
|
|
368
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
369
|
+
);
|
|
360
370
|
} else if ("host" in styleContainerNode) {
|
|
361
371
|
if (supportsConstructableStylesheets) {
|
|
362
372
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -374,7 +384,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
374
384
|
styleContainerNode.append(styleElm);
|
|
375
385
|
}
|
|
376
386
|
}
|
|
377
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */
|
|
387
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
378
388
|
styleContainerNode.insertBefore(styleElm, null);
|
|
379
389
|
}
|
|
380
390
|
}
|
|
@@ -399,23 +409,25 @@ var attachStyles = (hostRef) => {
|
|
|
399
409
|
const scopeId2 = addStyle(
|
|
400
410
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
401
411
|
cmpMeta);
|
|
402
|
-
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
412
|
+
if ((flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */ || flags & 128 /* shadowNeedsScopedCss */)) {
|
|
403
413
|
elm["s-sc"] = scopeId2;
|
|
404
414
|
elm.classList.add(scopeId2 + "-h");
|
|
405
415
|
}
|
|
406
416
|
endAttachStyles();
|
|
407
417
|
};
|
|
408
418
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
409
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
419
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
410
420
|
if (oldValue !== newValue) {
|
|
411
421
|
let isProp = isMemberInElement(elm, memberName);
|
|
412
422
|
let ln = memberName.toLowerCase();
|
|
413
423
|
if (memberName === "class") {
|
|
414
424
|
const classList = elm.classList;
|
|
415
425
|
const oldClasses = parseClassList(oldValue);
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
426
|
+
let newClasses = parseClassList(newValue);
|
|
427
|
+
{
|
|
428
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
429
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
430
|
+
}
|
|
419
431
|
} else if (memberName === "style") {
|
|
420
432
|
{
|
|
421
433
|
for (const prop in oldValue) {
|
|
@@ -474,7 +486,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
474
486
|
elm.setAttribute(memberName, n);
|
|
475
487
|
}
|
|
476
488
|
}
|
|
477
|
-
} else {
|
|
489
|
+
} else if (elm[memberName] !== newValue) {
|
|
478
490
|
elm[memberName] = newValue;
|
|
479
491
|
}
|
|
480
492
|
} catch (e) {
|
|
@@ -496,24 +508,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
496
508
|
}
|
|
497
509
|
};
|
|
498
510
|
var parseClassListRegex = /\s/;
|
|
499
|
-
var parseClassList = (value) =>
|
|
511
|
+
var parseClassList = (value) => {
|
|
512
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
513
|
+
value = value.baseVal;
|
|
514
|
+
}
|
|
515
|
+
if (!value || typeof value !== "string") {
|
|
516
|
+
return [];
|
|
517
|
+
}
|
|
518
|
+
return value.split(parseClassListRegex);
|
|
519
|
+
};
|
|
500
520
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
501
521
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
502
522
|
|
|
503
523
|
// src/runtime/vdom/update-element.ts
|
|
504
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
524
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
505
525
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
506
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
507
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
526
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
527
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
508
528
|
{
|
|
509
529
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
510
530
|
if (!(memberName in newVnodeAttrs)) {
|
|
511
|
-
setAccessor(
|
|
531
|
+
setAccessor(
|
|
532
|
+
elm,
|
|
533
|
+
memberName,
|
|
534
|
+
oldVnodeAttrs[memberName],
|
|
535
|
+
void 0,
|
|
536
|
+
isSvgMode2,
|
|
537
|
+
newVnode.$flags$);
|
|
512
538
|
}
|
|
513
539
|
}
|
|
514
540
|
}
|
|
515
541
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
516
|
-
setAccessor(
|
|
542
|
+
setAccessor(
|
|
543
|
+
elm,
|
|
544
|
+
memberName,
|
|
545
|
+
oldVnodeAttrs[memberName],
|
|
546
|
+
newVnodeAttrs[memberName],
|
|
547
|
+
isSvgMode2,
|
|
548
|
+
newVnode.$flags$);
|
|
517
549
|
}
|
|
518
550
|
};
|
|
519
551
|
function sortedAttrNames(attrNames) {
|
|
@@ -525,13 +557,10 @@ function sortedAttrNames(attrNames) {
|
|
|
525
557
|
attrNames
|
|
526
558
|
);
|
|
527
559
|
}
|
|
528
|
-
|
|
529
|
-
// src/runtime/vdom/vdom-render.ts
|
|
530
|
-
var scopeId;
|
|
531
560
|
var hostTagName;
|
|
532
561
|
var useNativeShadowDom = false;
|
|
533
562
|
var isSvgMode = false;
|
|
534
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
563
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
535
564
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
536
565
|
let i2 = 0;
|
|
537
566
|
let elm;
|
|
@@ -552,11 +581,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
552
581
|
{
|
|
553
582
|
updateElement(null, newVNode2, isSvgMode);
|
|
554
583
|
}
|
|
555
|
-
const rootNode = elm.getRootNode();
|
|
556
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
557
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
558
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
|
559
|
-
}
|
|
560
584
|
if (newVNode2.$children$) {
|
|
561
585
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
562
586
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -693,6 +717,9 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
693
717
|
if (!isInitialRender) {
|
|
694
718
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
695
719
|
}
|
|
720
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
721
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
722
|
+
}
|
|
696
723
|
return true;
|
|
697
724
|
}
|
|
698
725
|
return false;
|
|
@@ -739,8 +766,9 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
739
766
|
}
|
|
740
767
|
};
|
|
741
768
|
var insertBefore = (parent, newNode, reference) => {
|
|
742
|
-
|
|
743
|
-
|
|
769
|
+
{
|
|
770
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
771
|
+
}
|
|
744
772
|
};
|
|
745
773
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
746
774
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -765,17 +793,21 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
765
793
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
766
794
|
hostRef.$vnode$ = rootVnode;
|
|
767
795
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
768
|
-
|
|
769
|
-
scopeId = hostElm["s-sc"];
|
|
770
|
-
}
|
|
771
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
796
|
+
useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
|
|
772
797
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
773
798
|
};
|
|
774
799
|
|
|
775
800
|
// src/runtime/update-component.ts
|
|
776
801
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
777
802
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
778
|
-
ancestorComponent["s-p"].push(
|
|
803
|
+
const index = ancestorComponent["s-p"].push(
|
|
804
|
+
new Promise(
|
|
805
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
806
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
807
|
+
r();
|
|
808
|
+
}
|
|
809
|
+
)
|
|
810
|
+
);
|
|
779
811
|
}
|
|
780
812
|
};
|
|
781
813
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -802,7 +834,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
802
834
|
let maybePromise;
|
|
803
835
|
if (isInitialLoad) {
|
|
804
836
|
{
|
|
805
|
-
maybePromise = safeCall(instance, "componentWillLoad");
|
|
837
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
806
838
|
}
|
|
807
839
|
}
|
|
808
840
|
endSchedule();
|
|
@@ -871,7 +903,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
871
903
|
const instance = hostRef.$lazyInstance$ ;
|
|
872
904
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
873
905
|
{
|
|
874
|
-
safeCall(instance, "componentDidRender");
|
|
906
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
875
907
|
}
|
|
876
908
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
877
909
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -879,7 +911,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
879
911
|
addHydratedFlag(elm);
|
|
880
912
|
}
|
|
881
913
|
{
|
|
882
|
-
safeCall(instance, "componentDidLoad");
|
|
914
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
883
915
|
}
|
|
884
916
|
endPostUpdate();
|
|
885
917
|
{
|
|
@@ -903,17 +935,14 @@ var postUpdateComponent = (hostRef) => {
|
|
|
903
935
|
}
|
|
904
936
|
};
|
|
905
937
|
var appDidLoad = (who) => {
|
|
906
|
-
{
|
|
907
|
-
addHydratedFlag(doc.documentElement);
|
|
908
|
-
}
|
|
909
938
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
910
939
|
};
|
|
911
|
-
var safeCall = (instance, method, arg) => {
|
|
940
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
912
941
|
if (instance && instance[method]) {
|
|
913
942
|
try {
|
|
914
943
|
return instance[method](arg);
|
|
915
944
|
} catch (e) {
|
|
916
|
-
consoleError(e);
|
|
945
|
+
consoleError(e, elm);
|
|
917
946
|
}
|
|
918
947
|
}
|
|
919
948
|
return void 0;
|
|
@@ -972,15 +1001,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
972
1001
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
973
1002
|
members.map(([memberName, [memberFlags]]) => {
|
|
974
1003
|
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
|
+
}
|
|
975
1024
|
Object.defineProperty(prototype, memberName, {
|
|
976
|
-
get() {
|
|
977
|
-
return getValue(this, memberName);
|
|
978
|
-
},
|
|
979
1025
|
set(newValue) {
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
1026
|
+
const ref = getHostRef(this);
|
|
1027
|
+
if (origSetter) {
|
|
1028
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1029
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
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
|
+
}
|
|
984
1066
|
});
|
|
985
1067
|
}
|
|
986
1068
|
});
|
|
@@ -990,7 +1072,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
990
1072
|
plt.jmp(() => {
|
|
991
1073
|
var _a2;
|
|
992
1074
|
const propName = attrNameToPropName.get(attrName);
|
|
993
|
-
if (this.hasOwnProperty(propName)) {
|
|
1075
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
994
1076
|
newValue = this[propName];
|
|
995
1077
|
delete this[propName];
|
|
996
1078
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1010,7 +1092,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1010
1092
|
}
|
|
1011
1093
|
return;
|
|
1012
1094
|
}
|
|
1013
|
-
|
|
1095
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1096
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1097
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1098
|
+
this[propName] = newValue;
|
|
1099
|
+
}
|
|
1014
1100
|
});
|
|
1015
1101
|
};
|
|
1016
1102
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1039,7 +1125,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1039
1125
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1040
1126
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1041
1127
|
if (bundleId) {
|
|
1042
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1128
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1043
1129
|
if (CstrImport && "then" in CstrImport) {
|
|
1044
1130
|
const endLoad = uniqueTime();
|
|
1045
1131
|
Cstr = await CstrImport;
|
|
@@ -1064,7 +1150,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1064
1150
|
try {
|
|
1065
1151
|
new Cstr(hostRef);
|
|
1066
1152
|
} catch (e) {
|
|
1067
|
-
consoleError(e);
|
|
1153
|
+
consoleError(e, elm);
|
|
1068
1154
|
}
|
|
1069
1155
|
{
|
|
1070
1156
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1099,7 +1185,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1099
1185
|
schedule();
|
|
1100
1186
|
}
|
|
1101
1187
|
};
|
|
1102
|
-
var fireConnectedCallback = (instance) => {
|
|
1188
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1103
1189
|
};
|
|
1104
1190
|
|
|
1105
1191
|
// src/runtime/connected-callback.ts
|
|
@@ -1139,20 +1225,26 @@ var connectedCallback = (elm) => {
|
|
|
1139
1225
|
endConnected();
|
|
1140
1226
|
}
|
|
1141
1227
|
};
|
|
1142
|
-
var disconnectInstance = (instance) => {
|
|
1228
|
+
var disconnectInstance = (instance, elm) => {
|
|
1143
1229
|
{
|
|
1144
|
-
safeCall(instance, "disconnectedCallback");
|
|
1230
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
1145
1231
|
}
|
|
1146
1232
|
};
|
|
1147
1233
|
var disconnectedCallback = async (elm) => {
|
|
1148
1234
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1149
1235
|
const hostRef = getHostRef(elm);
|
|
1150
1236
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1151
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
1237
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
1152
1238
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1153
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
1239
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
1154
1240
|
}
|
|
1155
1241
|
}
|
|
1242
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1243
|
+
rootAppliedStyles.delete(elm);
|
|
1244
|
+
}
|
|
1245
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1246
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1247
|
+
}
|
|
1156
1248
|
};
|
|
1157
1249
|
|
|
1158
1250
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1233,6 +1325,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1233
1325
|
}
|
|
1234
1326
|
disconnectedCallback() {
|
|
1235
1327
|
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
|
+
});
|
|
1236
1339
|
}
|
|
1237
1340
|
componentOnReady() {
|
|
1238
1341
|
return getHostRef(this).$onReadyPromise$;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-75dd98ba.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy([["carousel-component_2.cjs",[[1,"general-slider-navigation",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"cmsEndpoint":[513,"cms-endpoint"],"cmsEnv":[513,"cms-env"],"language":[513],"userRoles":[513,"user-roles"],"bulletNavigation":[516,"bullet-navigation"],"slideTimer":[514,"slide-timer"],"sliderMobileWidth":[514,"slider-mobile-width"],"sliderDesktopWidth":[514,"slider-desktop-width"],"translationUrl":[513,"translation-url"],"isLoading":[32],"hasErrors":[32],"device":[32]},null,{"translationUrl":["handleNewTranslations"],"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"]}],[1,"carousel-component",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"content":[16],"bulletNavigation":[516,"bullet-navigation"],"language":[513],"slideTimer":[514,"slide-timer"],"translationUrl":[513,"translation-url"],"currIndex":[32],"width":[32],"height":[32],"margin":[32],"sliderElement":[32],"totalWidth":[32],"device":[32],"stylingAppends":[32],"innerWidth":[32]},null,{"translationUrl":["handleNewTranslations"]}]]]], options);
|
|
11
|
+
return index.bootstrapLazy([["carousel-component_2.cjs",[[1,"general-slider-navigation",{"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"cmsEndpoint":[513,"cms-endpoint"],"cmsEnv":[513,"cms-env"],"language":[513],"userRoles":[513,"user-roles"],"bulletNavigation":[516,"bullet-navigation"],"slideTimer":[514,"slide-timer"],"sliderMobileWidth":[514,"slider-mobile-width"],"sliderDesktopWidth":[514,"slider-desktop-width"],"translationUrl":[513,"translation-url"],"isLoading":[32],"hasErrors":[32],"device":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"],"translationUrl":["handleNewTranslations"],"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"]}],[1,"carousel-component",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"content":[16],"bulletNavigation":[516,"bullet-navigation"],"language":[513],"slideTimer":[514,"slide-timer"],"translationUrl":[513,"translation-url"],"currIndex":[32],"width":[32],"height":[32],"margin":[32],"sliderElement":[32],"totalWidth":[32],"device":[32],"stylingAppends":[32],"innerWidth":[32]},null,{"translationUrl":["handleNewTranslations"]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -3,6 +3,29 @@ import { checkDeviceType, isMobile } from "../../utils/utils";
|
|
|
3
3
|
import { getTranslations, translate } from "../../utils/locale.utils";
|
|
4
4
|
export class CarouselComponent {
|
|
5
5
|
constructor() {
|
|
6
|
+
/**
|
|
7
|
+
* Client custom styling via inline style
|
|
8
|
+
*/
|
|
9
|
+
this.clientStyling = '';
|
|
10
|
+
/**
|
|
11
|
+
* Client custom styling via url
|
|
12
|
+
*/
|
|
13
|
+
this.clientStylingUrl = '';
|
|
14
|
+
/**
|
|
15
|
+
* Show bullet navigation under slides
|
|
16
|
+
*/
|
|
17
|
+
this.bulletNavigation = true;
|
|
18
|
+
/**
|
|
19
|
+
* Language of the widget
|
|
20
|
+
*/
|
|
21
|
+
this.language = 'en';
|
|
22
|
+
/**
|
|
23
|
+
* Translation via url
|
|
24
|
+
*/
|
|
25
|
+
this.translationUrl = '';
|
|
26
|
+
this.currIndex = 0;
|
|
27
|
+
this.device = '';
|
|
28
|
+
this.stylingAppends = false;
|
|
6
29
|
this.userAgent = window.navigator.userAgent;
|
|
7
30
|
this.isMobile = isMobile(this.userAgent);
|
|
8
31
|
this.touchStartX = 0;
|
|
@@ -69,22 +92,6 @@ export class CarouselComponent {
|
|
|
69
92
|
}
|
|
70
93
|
return source;
|
|
71
94
|
};
|
|
72
|
-
this.clientStyling = '';
|
|
73
|
-
this.clientStylingUrl = '';
|
|
74
|
-
this.content = undefined;
|
|
75
|
-
this.bulletNavigation = true;
|
|
76
|
-
this.language = 'en';
|
|
77
|
-
this.slideTimer = undefined;
|
|
78
|
-
this.translationUrl = '';
|
|
79
|
-
this.currIndex = 0;
|
|
80
|
-
this.width = undefined;
|
|
81
|
-
this.height = undefined;
|
|
82
|
-
this.margin = undefined;
|
|
83
|
-
this.sliderElement = undefined;
|
|
84
|
-
this.totalWidth = undefined;
|
|
85
|
-
this.device = '';
|
|
86
|
-
this.stylingAppends = false;
|
|
87
|
-
this.innerWidth = undefined;
|
|
88
95
|
}
|
|
89
96
|
handleNewTranslations() {
|
|
90
97
|
getTranslations(this.translationUrl);
|
|
@@ -243,6 +250,8 @@ export class CarouselComponent {
|
|
|
243
250
|
"tags": [],
|
|
244
251
|
"text": "Client custom styling via inline style"
|
|
245
252
|
},
|
|
253
|
+
"getter": false,
|
|
254
|
+
"setter": false,
|
|
246
255
|
"attribute": "client-styling",
|
|
247
256
|
"reflect": true,
|
|
248
257
|
"defaultValue": "''"
|
|
@@ -261,6 +270,8 @@ export class CarouselComponent {
|
|
|
261
270
|
"tags": [],
|
|
262
271
|
"text": "Client custom styling via url"
|
|
263
272
|
},
|
|
273
|
+
"getter": false,
|
|
274
|
+
"setter": false,
|
|
264
275
|
"attribute": "client-styling-url",
|
|
265
276
|
"reflect": true,
|
|
266
277
|
"defaultValue": "''"
|
|
@@ -283,7 +294,9 @@ export class CarouselComponent {
|
|
|
283
294
|
"docs": {
|
|
284
295
|
"tags": [],
|
|
285
296
|
"text": "Endpoint URL for the source of data"
|
|
286
|
-
}
|
|
297
|
+
},
|
|
298
|
+
"getter": false,
|
|
299
|
+
"setter": false
|
|
287
300
|
},
|
|
288
301
|
"bulletNavigation": {
|
|
289
302
|
"type": "boolean",
|
|
@@ -299,6 +312,8 @@ export class CarouselComponent {
|
|
|
299
312
|
"tags": [],
|
|
300
313
|
"text": "Show bullet navigation under slides"
|
|
301
314
|
},
|
|
315
|
+
"getter": false,
|
|
316
|
+
"setter": false,
|
|
302
317
|
"attribute": "bullet-navigation",
|
|
303
318
|
"reflect": true,
|
|
304
319
|
"defaultValue": "true"
|
|
@@ -317,6 +332,8 @@ export class CarouselComponent {
|
|
|
317
332
|
"tags": [],
|
|
318
333
|
"text": "Language of the widget"
|
|
319
334
|
},
|
|
335
|
+
"getter": false,
|
|
336
|
+
"setter": false,
|
|
320
337
|
"attribute": "language",
|
|
321
338
|
"reflect": true,
|
|
322
339
|
"defaultValue": "'en'"
|
|
@@ -335,6 +352,8 @@ export class CarouselComponent {
|
|
|
335
352
|
"tags": [],
|
|
336
353
|
"text": "Timer for auto sliding"
|
|
337
354
|
},
|
|
355
|
+
"getter": false,
|
|
356
|
+
"setter": false,
|
|
338
357
|
"attribute": "slide-timer",
|
|
339
358
|
"reflect": true
|
|
340
359
|
},
|
|
@@ -352,6 +371,8 @@ export class CarouselComponent {
|
|
|
352
371
|
"tags": [],
|
|
353
372
|
"text": "Translation via url"
|
|
354
373
|
},
|
|
374
|
+
"getter": false,
|
|
375
|
+
"setter": false,
|
|
355
376
|
"attribute": "translation-url",
|
|
356
377
|
"reflect": true,
|
|
357
378
|
"defaultValue": "''"
|