@maggioli-design-system/mds-paginator 4.0.2 → 4.2.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/{index-463b21cc.js → index-352b54d9.js} +133 -89
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mds-paginator.cjs.entry.js +2 -2
- package/dist/cjs/mds-paginator.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/common/floating-controller.js +3 -3
- package/dist/collection/common/slot.js +10 -1
- package/dist/collection/common/string.js +30 -0
- package/dist/collection/components/mds-paginator/mds-paginator.css +158 -66
- package/dist/collection/dictionary/keyboard.js +84 -0
- package/dist/collection/type/keyboard.js +1 -0
- package/dist/components/mds-paginator.js +1 -1
- package/dist/documentation.json +7 -2
- package/dist/esm/{index-f3d0e7ab.js → index-fb6d4970.js} +133 -89
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mds-paginator.entry.js +2 -2
- package/dist/esm/mds-paginator.js +3 -3
- package/dist/esm-es5/index-fb6d4970.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-paginator.entry.js +1 -1
- package/dist/esm-es5/mds-paginator.js +1 -1
- package/dist/mds-paginator/mds-paginator.esm.js +1 -1
- package/dist/mds-paginator/mds-paginator.js +1 -1
- package/dist/mds-paginator/p-45933164.js +2 -0
- package/dist/mds-paginator/{p-e9734aa5.system.js → p-6b939a3a.system.js} +1 -1
- package/dist/mds-paginator/p-98f1a03d.system.entry.js +1 -0
- package/dist/mds-paginator/p-b5b88c05.entry.js +1 -0
- package/dist/mds-paginator/p-cc29be08.system.js +2 -0
- package/dist/stats.json +44 -33
- package/dist/types/common/slot.d.ts +2 -1
- package/dist/types/common/string.d.ts +4 -0
- package/dist/types/dictionary/keyboard.d.ts +2 -0
- package/dist/types/type/keyboard.d.ts +12 -0
- package/documentation.json +27 -2
- package/package.json +4 -4
- package/readme.md +4 -3
- package/src/common/floating-controller.ts +6 -6
- package/src/common/slot.ts +11 -0
- package/src/common/string.ts +42 -0
- package/src/components/mds-paginator/css/mds-paginator-pref-animation.css +9 -14
- package/src/components/mds-paginator/css/mds-paginator-pref-contrast.css +23 -34
- package/src/components/mds-paginator/css/mds-paginator-pref-theme.css +10 -22
- package/src/components/mds-paginator/mds-paginator.css +4 -3
- package/src/components/mds-paginator/readme.md +4 -3
- package/src/dictionary/keyboard.ts +87 -0
- package/src/fixtures/icons.json +18 -1
- package/src/meta/keyboard/keys.json +83 -0
- package/src/tailwind/components.css +11 -46
- package/src/tailwind/fouc.css +118 -0
- package/src/tailwind/index.css +4 -0
- package/src/type/keyboard.ts +93 -0
- package/www/build/mds-paginator.esm.js +1 -1
- package/www/build/mds-paginator.js +1 -1
- package/www/build/p-45933164.js +2 -0
- package/www/build/{p-e9734aa5.system.js → p-6b939a3a.system.js} +1 -1
- package/www/build/p-98f1a03d.system.entry.js +1 -0
- package/www/build/p-b5b88c05.entry.js +1 -0
- package/www/build/p-cc29be08.system.js +2 -0
- package/dist/esm-es5/index-f3d0e7ab.js +0 -1
- package/dist/mds-paginator/p-1a397fd4.system.entry.js +0 -1
- package/dist/mds-paginator/p-4399f910.system.js +0 -2
- package/dist/mds-paginator/p-d5ae5457.js +0 -2
- package/dist/mds-paginator/p-dc0daac5.entry.js +0 -1
- package/www/build/p-1a397fd4.system.entry.js +0 -1
- package/www/build/p-4399f910.system.js +0 -2
- package/www/build/p-d5ae5457.js +0 -2
- package/www/build/p-dc0daac5.entry.js +0 -1
|
@@ -21,10 +21,10 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'mds-paginator';
|
|
24
|
-
const BUILD = /* mds-paginator */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false,
|
|
24
|
+
const BUILD = /* mds-paginator */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, constructableCSS: true, cssAnnotations: true, devTools: false, element: false, event: true, 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: true, hydratedClass: false, 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: false, propMutable: true, propNumber: true, propString: false, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: false, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
27
|
+
Stencil Client Platform v4.27.2 | MIT Licensed | https://stenciljs.com
|
|
28
28
|
*/
|
|
29
29
|
var __defProp = Object.defineProperty;
|
|
30
30
|
var __export = (target, all) => {
|
|
@@ -33,10 +33,15 @@ var __export = (target, all) => {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
// src/client/client-host-ref.ts
|
|
36
|
-
var
|
|
37
|
-
|
|
36
|
+
var getHostRef = (ref) => {
|
|
37
|
+
if (ref.__stencil__getHostRef) {
|
|
38
|
+
return ref.__stencil__getHostRef();
|
|
39
|
+
}
|
|
40
|
+
return void 0;
|
|
41
|
+
};
|
|
38
42
|
var registerInstance = (lazyInstance, hostRef) => {
|
|
39
|
-
|
|
43
|
+
lazyInstance.__stencil__getHostRef = () => hostRef;
|
|
44
|
+
hostRef.$lazyInstance$ = lazyInstance;
|
|
40
45
|
};
|
|
41
46
|
var registerHost = (hostElement, cmpMeta) => {
|
|
42
47
|
const hostRef = {
|
|
@@ -50,7 +55,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
50
55
|
hostElement["s-p"] = [];
|
|
51
56
|
hostElement["s-rc"] = [];
|
|
52
57
|
}
|
|
53
|
-
const ref =
|
|
58
|
+
const ref = hostRef;
|
|
59
|
+
hostElement.__stencil__getHostRef = () => ref;
|
|
54
60
|
return ref;
|
|
55
61
|
};
|
|
56
62
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
@@ -107,7 +113,6 @@ var HYDRATED_STYLE_ID = "sty-id";
|
|
|
107
113
|
var HYDRATED_CSS = "{visibility:hidden}[hydrated]{visibility:inherit}";
|
|
108
114
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
109
115
|
var win = typeof window !== "undefined" ? window : {};
|
|
110
|
-
var doc = win.document || { head: {} };
|
|
111
116
|
var plt = {
|
|
112
117
|
$flags$: 0,
|
|
113
118
|
$resourcesUrl$: "",
|
|
@@ -167,9 +172,9 @@ var isComplexType = (o) => {
|
|
|
167
172
|
};
|
|
168
173
|
|
|
169
174
|
// src/utils/query-nonce-meta-tag-content.ts
|
|
170
|
-
function queryNonceMetaTagContent(
|
|
175
|
+
function queryNonceMetaTagContent(doc) {
|
|
171
176
|
var _a, _b, _c;
|
|
172
|
-
return (_c = (_b = (_a =
|
|
177
|
+
return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
|
|
173
178
|
}
|
|
174
179
|
|
|
175
180
|
// src/utils/result.ts
|
|
@@ -347,7 +352,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
347
352
|
var _a;
|
|
348
353
|
const scopeId2 = getScopeId(cmpMeta);
|
|
349
354
|
const style = styles.get(scopeId2);
|
|
350
|
-
|
|
355
|
+
if (!win.document) {
|
|
356
|
+
return scopeId2;
|
|
357
|
+
}
|
|
358
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
351
359
|
if (style) {
|
|
352
360
|
if (typeof style === "string") {
|
|
353
361
|
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
@@ -358,9 +366,9 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
358
366
|
}
|
|
359
367
|
if (!appliedStyles.has(scopeId2)) {
|
|
360
368
|
{
|
|
361
|
-
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) ||
|
|
369
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
|
|
362
370
|
styleElm.innerHTML = style;
|
|
363
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
371
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
364
372
|
if (nonce != null) {
|
|
365
373
|
styleElm.setAttribute("nonce", nonce);
|
|
366
374
|
}
|
|
@@ -389,7 +397,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
389
397
|
styleContainerNode.append(styleElm);
|
|
390
398
|
}
|
|
391
399
|
}
|
|
392
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */
|
|
400
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
393
401
|
styleContainerNode.insertBefore(styleElm, null);
|
|
394
402
|
}
|
|
395
403
|
}
|
|
@@ -414,7 +422,7 @@ var attachStyles = (hostRef) => {
|
|
|
414
422
|
const scopeId2 = addStyle(
|
|
415
423
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
416
424
|
cmpMeta);
|
|
417
|
-
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
425
|
+
if ((flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */ || flags & 128 /* shadowNeedsScopedCss */)) {
|
|
418
426
|
elm["s-sc"] = scopeId2;
|
|
419
427
|
elm.classList.add(scopeId2 + "-h");
|
|
420
428
|
}
|
|
@@ -422,68 +430,69 @@ var attachStyles = (hostRef) => {
|
|
|
422
430
|
};
|
|
423
431
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
424
432
|
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
425
|
-
if (oldValue
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
433
|
+
if (oldValue === newValue) {
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
436
|
+
let isProp = isMemberInElement(elm, memberName);
|
|
437
|
+
let ln = memberName.toLowerCase();
|
|
438
|
+
if (memberName === "class") {
|
|
439
|
+
const classList = elm.classList;
|
|
440
|
+
const oldClasses = parseClassList(oldValue);
|
|
441
|
+
let newClasses = parseClassList(newValue);
|
|
442
|
+
{
|
|
443
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
444
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
445
|
+
}
|
|
446
|
+
} else if (memberName === "key") ; else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
447
|
+
if (memberName[2] === "-") {
|
|
448
|
+
memberName = memberName.slice(3);
|
|
449
|
+
} else if (isMemberInElement(win, ln)) {
|
|
450
|
+
memberName = ln.slice(2);
|
|
451
|
+
} else {
|
|
452
|
+
memberName = ln[2] + memberName.slice(3);
|
|
453
|
+
}
|
|
454
|
+
if (oldValue || newValue) {
|
|
455
|
+
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
456
|
+
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
457
|
+
if (oldValue) {
|
|
458
|
+
plt.rel(elm, memberName, oldValue, capture);
|
|
443
459
|
}
|
|
444
|
-
if (
|
|
445
|
-
|
|
446
|
-
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
447
|
-
if (oldValue) {
|
|
448
|
-
plt.rel(elm, memberName, oldValue, capture);
|
|
449
|
-
}
|
|
450
|
-
if (newValue) {
|
|
451
|
-
plt.ael(elm, memberName, newValue, capture);
|
|
452
|
-
}
|
|
460
|
+
if (newValue) {
|
|
461
|
+
plt.ael(elm, memberName, newValue, capture);
|
|
453
462
|
}
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
463
|
+
}
|
|
464
|
+
} else {
|
|
465
|
+
const isComplex = isComplexType(newValue);
|
|
466
|
+
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
467
|
+
try {
|
|
468
|
+
if (!elm.tagName.includes("-")) {
|
|
469
|
+
const n = newValue == null ? "" : newValue;
|
|
470
|
+
if (memberName === "list") {
|
|
471
|
+
isProp = false;
|
|
472
|
+
} else if (oldValue == null || elm[memberName] != n) {
|
|
473
|
+
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
474
|
+
elm[memberName] = n;
|
|
475
|
+
} else {
|
|
476
|
+
elm.setAttribute(memberName, n);
|
|
468
477
|
}
|
|
469
|
-
} else if (elm[memberName] !== newValue) {
|
|
470
|
-
elm[memberName] = newValue;
|
|
471
478
|
}
|
|
472
|
-
}
|
|
479
|
+
} else if (elm[memberName] !== newValue) {
|
|
480
|
+
elm[memberName] = newValue;
|
|
473
481
|
}
|
|
482
|
+
} catch (e) {
|
|
474
483
|
}
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
elm.removeAttribute(memberName);
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
482
|
-
newValue = newValue === true ? "" : newValue;
|
|
484
|
+
}
|
|
485
|
+
if (newValue == null || newValue === false) {
|
|
486
|
+
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
483
487
|
{
|
|
484
|
-
elm.
|
|
488
|
+
elm.removeAttribute(memberName);
|
|
485
489
|
}
|
|
486
490
|
}
|
|
491
|
+
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
|
|
492
|
+
newValue = newValue === true ? "" : newValue;
|
|
493
|
+
{
|
|
494
|
+
elm.setAttribute(memberName, newValue);
|
|
495
|
+
}
|
|
487
496
|
}
|
|
488
497
|
}
|
|
489
498
|
};
|
|
@@ -546,9 +555,14 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
546
555
|
let elm;
|
|
547
556
|
let childNode;
|
|
548
557
|
if (newVNode2.$text$ !== null) {
|
|
549
|
-
elm = newVNode2.$elm$ =
|
|
558
|
+
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
550
559
|
} else {
|
|
551
|
-
|
|
560
|
+
if (!win.document) {
|
|
561
|
+
throw new Error(
|
|
562
|
+
"You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
|
|
563
|
+
);
|
|
564
|
+
}
|
|
565
|
+
elm = newVNode2.$elm$ = win.document.createElement(
|
|
552
566
|
!useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
553
567
|
);
|
|
554
568
|
{
|
|
@@ -696,9 +710,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
696
710
|
const text = newVNode2.$text$;
|
|
697
711
|
if (text === null) {
|
|
698
712
|
{
|
|
699
|
-
|
|
700
|
-
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
701
|
-
}
|
|
713
|
+
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
702
714
|
}
|
|
703
715
|
if (oldChildren !== null && newChildren !== null) {
|
|
704
716
|
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
|
@@ -745,7 +757,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
745
757
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
746
758
|
hostRef.$vnode$ = rootVnode;
|
|
747
759
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
748
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)
|
|
760
|
+
useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
|
|
749
761
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
750
762
|
};
|
|
751
763
|
|
|
@@ -784,6 +796,12 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
784
796
|
);
|
|
785
797
|
}
|
|
786
798
|
let maybePromise;
|
|
799
|
+
if (isInitialLoad) {
|
|
800
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
801
|
+
} else {
|
|
802
|
+
maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
|
|
803
|
+
}
|
|
804
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
|
|
787
805
|
endSchedule();
|
|
788
806
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
789
807
|
};
|
|
@@ -849,14 +867,13 @@ var postUpdateComponent = (hostRef) => {
|
|
|
849
867
|
const endPostUpdate = createTime("postUpdate", tagName);
|
|
850
868
|
const instance = hostRef.$lazyInstance$ ;
|
|
851
869
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
870
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
852
871
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
853
872
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
854
873
|
{
|
|
855
874
|
addHydratedFlag(elm);
|
|
856
875
|
}
|
|
857
|
-
|
|
858
|
-
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
859
|
-
}
|
|
876
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
860
877
|
endPostUpdate();
|
|
861
878
|
{
|
|
862
879
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -865,6 +882,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
865
882
|
}
|
|
866
883
|
}
|
|
867
884
|
} else {
|
|
885
|
+
safeCall(instance, "componentDidUpdate", void 0, elm);
|
|
868
886
|
endPostUpdate();
|
|
869
887
|
}
|
|
870
888
|
{
|
|
@@ -879,9 +897,6 @@ var postUpdateComponent = (hostRef) => {
|
|
|
879
897
|
}
|
|
880
898
|
};
|
|
881
899
|
var appDidLoad = (who) => {
|
|
882
|
-
{
|
|
883
|
-
addHydratedFlag(doc.documentElement);
|
|
884
|
-
}
|
|
885
900
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
886
901
|
};
|
|
887
902
|
var safeCall = (instance, method, arg, elm) => {
|
|
@@ -905,7 +920,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
905
920
|
const hostRef = getHostRef(ref);
|
|
906
921
|
if (!hostRef) {
|
|
907
922
|
throw new Error(
|
|
908
|
-
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/
|
|
923
|
+
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
|
|
909
924
|
);
|
|
910
925
|
}
|
|
911
926
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
@@ -918,6 +933,11 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
918
933
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
919
934
|
if (instance) {
|
|
920
935
|
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
936
|
+
if (instance.componentShouldUpdate) {
|
|
937
|
+
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
938
|
+
return;
|
|
939
|
+
}
|
|
940
|
+
}
|
|
921
941
|
scheduleUpdate(hostRef, false);
|
|
922
942
|
}
|
|
923
943
|
}
|
|
@@ -1054,7 +1074,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1054
1074
|
let Cstr;
|
|
1055
1075
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1056
1076
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1057
|
-
|
|
1077
|
+
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1078
|
+
if (bundleId) {
|
|
1058
1079
|
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1059
1080
|
if (CstrImport && "then" in CstrImport) {
|
|
1060
1081
|
const endLoad = uniqueTime();
|
|
@@ -1083,6 +1104,11 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1083
1104
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1084
1105
|
}
|
|
1085
1106
|
endNewInstance();
|
|
1107
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1108
|
+
} else {
|
|
1109
|
+
Cstr = elm.constructor;
|
|
1110
|
+
const cmpTag = elm.localName;
|
|
1111
|
+
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1086
1112
|
}
|
|
1087
1113
|
if (Cstr && Cstr.style) {
|
|
1088
1114
|
let style;
|
|
@@ -1106,6 +1132,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1106
1132
|
}
|
|
1107
1133
|
};
|
|
1108
1134
|
var fireConnectedCallback = (instance, elm) => {
|
|
1135
|
+
{
|
|
1136
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
1137
|
+
}
|
|
1109
1138
|
};
|
|
1110
1139
|
|
|
1111
1140
|
// src/runtime/connected-callback.ts
|
|
@@ -1138,20 +1167,27 @@ var connectedCallback = (elm) => {
|
|
|
1138
1167
|
initializeComponent(elm, hostRef, cmpMeta);
|
|
1139
1168
|
}
|
|
1140
1169
|
} else {
|
|
1141
|
-
if (hostRef == null ? void 0 : hostRef.$lazyInstance$)
|
|
1142
|
-
hostRef.$
|
|
1170
|
+
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1171
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1172
|
+
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1173
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
1143
1174
|
}
|
|
1144
1175
|
}
|
|
1145
1176
|
endConnected();
|
|
1146
1177
|
}
|
|
1147
1178
|
};
|
|
1148
1179
|
var disconnectInstance = (instance, elm) => {
|
|
1180
|
+
{
|
|
1181
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
1182
|
+
}
|
|
1149
1183
|
};
|
|
1150
1184
|
var disconnectedCallback = async (elm) => {
|
|
1151
1185
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1152
1186
|
const hostRef = getHostRef(elm);
|
|
1153
|
-
if (hostRef == null ? void 0 : hostRef.$lazyInstance$)
|
|
1154
|
-
hostRef.$
|
|
1187
|
+
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1188
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
1189
|
+
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1190
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
1155
1191
|
}
|
|
1156
1192
|
}
|
|
1157
1193
|
if (rootAppliedStyles.has(elm)) {
|
|
@@ -1165,18 +1201,22 @@ var disconnectedCallback = async (elm) => {
|
|
|
1165
1201
|
// src/runtime/bootstrap-lazy.ts
|
|
1166
1202
|
var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1167
1203
|
var _a;
|
|
1204
|
+
if (!win.document) {
|
|
1205
|
+
console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
|
|
1206
|
+
return;
|
|
1207
|
+
}
|
|
1168
1208
|
const endBootstrap = createTime();
|
|
1169
1209
|
const cmpTags = [];
|
|
1170
1210
|
const exclude = options.exclude || [];
|
|
1171
1211
|
const customElements2 = win.customElements;
|
|
1172
|
-
const head =
|
|
1212
|
+
const head = win.document.head;
|
|
1173
1213
|
const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
|
|
1174
|
-
const dataStyles = /* @__PURE__ */
|
|
1214
|
+
const dataStyles = /* @__PURE__ */ win.document.createElement("style");
|
|
1175
1215
|
const deferredConnectedCallbacks = [];
|
|
1176
1216
|
let appLoadFallback;
|
|
1177
1217
|
let isBootstrapping = true;
|
|
1178
1218
|
Object.assign(plt, options);
|
|
1179
|
-
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./",
|
|
1219
|
+
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
|
|
1180
1220
|
let hasSlotRelocation = false;
|
|
1181
1221
|
lazyBundles.map((lazyBundle) => {
|
|
1182
1222
|
lazyBundle[1].map((compactMeta) => {
|
|
@@ -1239,6 +1279,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1239
1279
|
plt.raf(() => {
|
|
1240
1280
|
var _a3;
|
|
1241
1281
|
const hostRef = getHostRef(this);
|
|
1282
|
+
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1283
|
+
if (i2 > -1) {
|
|
1284
|
+
deferredConnectedCallbacks.splice(i2, 1);
|
|
1285
|
+
}
|
|
1242
1286
|
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1243
1287
|
delete hostRef.$vnode$.$elm$;
|
|
1244
1288
|
}
|
|
@@ -1267,7 +1311,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1267
1311
|
}
|
|
1268
1312
|
if (dataStyles.innerHTML.length) {
|
|
1269
1313
|
dataStyles.setAttribute("data-styles", "");
|
|
1270
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
1314
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
1271
1315
|
if (nonce != null) {
|
|
1272
1316
|
dataStyles.setAttribute("nonce", nonce);
|
|
1273
1317
|
}
|
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-352b54d9.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
@@ -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-352b54d9.js');
|
|
6
6
|
|
|
7
7
|
const miBaselineArrowBack = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8l8 8l1.41-1.41L7.83 13H20v-2z"/></svg>`;
|
|
8
8
|
|
|
9
9
|
const miBaselineArrowForward = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"/></svg>`;
|
|
10
10
|
|
|
11
|
-
const mdsPaginatorCss = "@tailwind components
|
|
11
|
+
const mdsPaginatorCss = "@tailwind components; :host{--mds-paginator-background:rgb(var(--tone-neutral-09));--mds-paginator-scroll-behavior:smooth;gap:0.25rem;-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex}.pages{-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scrollbar-width:none;margin-left:0.5rem;margin-right:0.5rem;border-radius:9999px;padding:0.5rem;-webkit-transition-duration:200ms;transition-duration:200ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-ms-flex-align:center;align-items:center;background-color:var(--mds-paginator-background);display:-ms-flexbox;display:flex;-ms-flex-negative:1;flex-shrink:1;gap:2px;overflow:auto;scroll-behavior:var(--mds-paginator-scroll-behavior);-webkit-transition-property:background-color, -webkit-box-shadow;transition-property:background-color, -webkit-box-shadow;transition-property:background-color, box-shadow;transition-property:background-color, box-shadow, -webkit-box-shadow}.pages::-webkit-scrollbar{display:none}:host-context(.pref-animation-reduce),:host-context(.pref-animation-reduce) .pages{--mds-paginator-scroll-behavior:auto;-webkit-transition-duration:0s;transition-duration:0s}@media (prefers-reduced-motion){:host-context(.pref-animation-system),:host-context(.pref-animation-system) .pages{--mds-paginator-scroll-behavior:auto;-webkit-transition-duration:0s;transition-duration:0s}}:host-context(.pref-theme-dark){--mds-paginator-background:rgb(var(--tone-neutral-09))}:host-context(.pref-theme-dark) .pages{-webkit-box-shadow:0 0 0 1px rgb(var(--tone-neutral-01) / 0.3) inset;box-shadow:0 0 0 1px rgb(var(--tone-neutral-01) / 0.3) inset}@media (prefers-color-scheme: dark){:host-context(.pref-theme-system){--mds-paginator-background:rgb(var(--tone-neutral-09))}:host-context(.pref-theme-system) .pages{-webkit-box-shadow:0 0 0 1px rgb(var(--tone-neutral-01) / 0.3) inset;box-shadow:0 0 0 1px rgb(var(--tone-neutral-01) / 0.3) inset}}:host-context(.pref-contrast-more) .pages{-webkit-box-shadow:0 0 0 2px rgb(var(--tone-neutral-01) / 0.3) inset;box-shadow:0 0 0 2px rgb(var(--tone-neutral-01) / 0.3) inset}:host-context(.pref-contrast-more) .item{--mds-paginator-item-background-hover:rgb(var(--tone-neutral));--mds-paginator-item-shadow-hover:0 0 0 2px rgb(var(--tone-neutral-01) / 0.3) inset;--mds-paginator-item-shadow:none}:host-context(.pref-contrast-more) .item-first,:host-context(.pref-contrast-more) .item-last,:host-context(.pref-contrast-more) .item-icon{--mds-paginator-item-shadow-disabled:0 0 0 2px rgb(var(--tone-neutral-01) / 0.3) inset;--mds-paginator-item-shadow-hover:0 0 0 2px rgb(var(--tone-neutral-01) / 0.3) inset;--mds-paginator-item-shadow:0 0 0 2px rgb(var(--tone-neutral-01) / 0.3) inset}@media (prefers-contrast: more){:host-context(.pref-contrast-system) .pages{-webkit-box-shadow:0 0 0 2px rgb(var(--tone-neutral-01) / 0.3) inset;box-shadow:0 0 0 2px rgb(var(--tone-neutral-01) / 0.3) inset}:host-context(.pref-contrast-system) .item{--mds-paginator-item-background-hover:rgb(var(--tone-neutral));--mds-paginator-item-shadow-hover:0 0 0 2px rgb(var(--tone-neutral-01) / 0.3) inset;--mds-paginator-item-shadow:none}:host-context(.pref-contrast-system) .item-first,:host-context(.pref-contrast-system) .item-last,:host-context(.pref-contrast-system) .item-icon{--mds-paginator-item-shadow-disabled:0 0 0 2px rgb(var(--tone-neutral-01) / 0.3) inset;--mds-paginator-item-shadow-hover:0 0 0 2px rgb(var(--tone-neutral-01) / 0.3) inset;--mds-paginator-item-shadow:0 0 0 2px rgb(var(--tone-neutral-01) / 0.3) inset}}:host(:not(:is([hydrated],.hydrated))){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}mds-accordion:not(:is([hydrated],.hydrated)),mds-accordion-item:not(:is([hydrated],.hydrated)),mds-accordion-timer:not(:is([hydrated],.hydrated)),mds-accordion-timer-item:not(:is([hydrated],.hydrated)),mds-author:not(:is([hydrated],.hydrated)),mds-avatar:not(:is([hydrated],.hydrated)),mds-badge:not(:is([hydrated],.hydrated)),mds-banner:not(:is([hydrated],.hydrated)),mds-benchmark-bar:not(:is([hydrated],.hydrated)),mds-bibliography:not(:is([hydrated],.hydrated)),mds-breadcrumb:not(:is([hydrated],.hydrated)),mds-breadcrumb-item:not(:is([hydrated],.hydrated)),mds-button:not(:is([hydrated],.hydrated)),mds-card:not(:is([hydrated],.hydrated)),mds-card-content:not(:is([hydrated],.hydrated)),mds-card-footer:not(:is([hydrated],.hydrated)),mds-card-header:not(:is([hydrated],.hydrated)),mds-card-media:not(:is([hydrated],.hydrated)),mds-chip:not(:is([hydrated],.hydrated)),mds-details:not(:is([hydrated],.hydrated)),mds-dropdown:not(:is([hydrated],.hydrated)),mds-entity:not(:is([hydrated],.hydrated)),mds-file:not(:is([hydrated],.hydrated)),mds-file-preview:not(:is([hydrated],.hydrated)),mds-filter:not(:is([hydrated],.hydrated)),mds-filter-item:not(:is([hydrated],.hydrated)),mds-header:not(:is([hydrated],.hydrated)),mds-header-bar:not(:is([hydrated],.hydrated)),mds-help:not(:is([hydrated],.hydrated)),mds-horizontal-scroll:not(:is([hydrated],.hydrated)),mds-hr:not(:is([hydrated],.hydrated)),mds-icon:not(:is([hydrated],.hydrated)),mds-img:not(:is([hydrated],.hydrated)),mds-input:not(:is([hydrated],.hydrated)),mds-input-field:not(:is([hydrated],.hydrated)),mds-input-range:not(:is([hydrated],.hydrated)),mds-input-select:not(:is([hydrated],.hydrated)),mds-input-switch:not(:is([hydrated],.hydrated)),mds-input-tip:not(:is([hydrated],.hydrated)),mds-input-tip-item:not(:is([hydrated],.hydrated)),mds-input-upload:not(:is([hydrated],.hydrated)),mds-keyboard:not(:is([hydrated],.hydrated)),mds-keyboard-key:not(:is([hydrated],.hydrated)),mds-kpi:not(:is([hydrated],.hydrated)),mds-kpi-item:not(:is([hydrated],.hydrated)),mds-label:not(:is([hydrated],.hydrated)),mds-list:not(:is([hydrated],.hydrated)),mds-list-item:not(:is([hydrated],.hydrated)),mds-modal:not(:is([hydrated],.hydrated)),mds-note:not(:is([hydrated],.hydrated)),mds-notification:not(:is([hydrated],.hydrated)),mds-paginator:not(:is([hydrated],.hydrated)),mds-paginator-item:not(:is([hydrated],.hydrated)),mds-pref:not(:is([hydrated],.hydrated)),mds-pref-animation:not(:is([hydrated],.hydrated)),mds-pref-consumption:not(:is([hydrated],.hydrated)),mds-pref-contrast:not(:is([hydrated],.hydrated)),mds-pref-language:not(:is([hydrated],.hydrated)),mds-pref-language-item:not(:is([hydrated],.hydrated)),mds-pref-theme:not(:is([hydrated],.hydrated)),mds-price-table:not(:is([hydrated],.hydrated)),mds-price-table-features:not(:is([hydrated],.hydrated)),mds-price-table-features-cell:not(:is([hydrated],.hydrated)),mds-price-table-features-row:not(:is([hydrated],.hydrated)),mds-price-table-header:not(:is([hydrated],.hydrated)),mds-price-table-list:not(:is([hydrated],.hydrated)),mds-price-table-list-item:not(:is([hydrated],.hydrated)),mds-progress:not(:is([hydrated],.hydrated)),mds-push-notification:not(:is([hydrated],.hydrated)),mds-push-notifications:not(:is([hydrated],.hydrated)),mds-quote:not(:is([hydrated],.hydrated)),mds-separator:not(:is([hydrated],.hydrated)),mds-spinner:not(:is([hydrated],.hydrated)),mds-stepper-bar:not(:is([hydrated],.hydrated)),mds-stepper-bar-item:not(:is([hydrated],.hydrated)),mds-tab:not(:is([hydrated],.hydrated)),mds-tab-bar:not(:is([hydrated],.hydrated)),mds-tab-bar-item:not(:is([hydrated],.hydrated)),mds-tab-item:not(:is([hydrated],.hydrated)),mds-table:not(:is([hydrated],.hydrated)),mds-table-body:not(:is([hydrated],.hydrated)),mds-table-cell:not(:is([hydrated],.hydrated)),mds-table-footer:not(:is([hydrated],.hydrated)),mds-table-header:not(:is([hydrated],.hydrated)),mds-table-header-cell:not(:is([hydrated],.hydrated)),mds-table-row:not(:is([hydrated],.hydrated)),mds-text:not(:is([hydrated],.hydrated)),mds-toast:not(:is([hydrated],.hydrated)),mds-tooltip:not(:is([hydrated],.hydrated)),mds-tree:not(:is([hydrated],.hydrated)),mds-tree-item:not(:is([hydrated],.hydrated)),mds-url-view:not(:is([hydrated],.hydrated)),mds-usage:not(:is([hydrated],.hydrated)),mds-video-wall:not(:is([hydrated],.hydrated)),mds-zero:not(:is([hydrated],.hydrated)){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}";
|
|
12
12
|
const MdsPaginatorStyle0 = mdsPaginatorCss;
|
|
13
13
|
|
|
14
14
|
const MdsPaginator = class {
|
|
@@ -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-352b54d9.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.27.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('mds-paginator.cjs.js', document.baseURI).href));
|
|
@@ -143,12 +143,12 @@ export class FloatingController {
|
|
|
143
143
|
}
|
|
144
144
|
export class Backdrop {
|
|
145
145
|
constructor(backdropId) {
|
|
146
|
-
this.defaultBackdropId = '
|
|
146
|
+
this.defaultBackdropId = 'magma-backdrop';
|
|
147
147
|
this.backdropBackgroundVisible = 'rgba(var(--magma-backdrop-color, 0 0 0) / var(--magma-backdrop-opacity, 0.1))';
|
|
148
148
|
this.backdropBackgroundHidden = 'rgba(var(--magma-backdrop-color, 0 0 0) / 0)';
|
|
149
149
|
this.backdropId = backdropId !== null && backdropId !== void 0 ? backdropId : this.defaultBackdropId;
|
|
150
|
-
this.cssBackdropZIndex = `var(--${this.backdropId}-z-index)`;
|
|
151
|
-
this.cssBackdropDuration = `var(--${this.backdropId}-duration)`;
|
|
150
|
+
this.cssBackdropZIndex = `var(--${this.backdropId}-z-index, 4000)`;
|
|
151
|
+
this.cssBackdropDuration = `var(--${this.backdropId}-animation-duration, 300ms)`;
|
|
152
152
|
}
|
|
153
153
|
attachBackdrop() {
|
|
154
154
|
if (!this.backdropEl) {
|
|
@@ -16,4 +16,13 @@ const hasSlottedNodes = (el, name) => {
|
|
|
16
16
|
}
|
|
17
17
|
return false;
|
|
18
18
|
};
|
|
19
|
-
|
|
19
|
+
const hasSlotted = (el, name) => {
|
|
20
|
+
var _a;
|
|
21
|
+
const query = name ? `slot[name="${name}"]` : 'slot:not([name])';
|
|
22
|
+
const slot = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(query);
|
|
23
|
+
if (slot) {
|
|
24
|
+
return slot.assignedNodes().length > 0 || slot.assignedElements().length > 0;
|
|
25
|
+
}
|
|
26
|
+
return false;
|
|
27
|
+
};
|
|
28
|
+
export { hasSlottedElements, hasSlottedNodes, hasSlotted, };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const levenshteinDistance = (a, b) => {
|
|
2
|
+
const dp = Array.from({ length: a.length + 1 }, (_, i) =>
|
|
3
|
+
// eslint-disable-next-line no-nested-ternary
|
|
4
|
+
Array.from({ length: b.length + 1 }, (_, j) => (i === 0 ? j : j === 0 ? i : 0)));
|
|
5
|
+
for (let i = 1; i <= a.length; i++) {
|
|
6
|
+
for (let j = 1; j <= b.length; j++) {
|
|
7
|
+
if (a[i - 1] === b[j - 1]) {
|
|
8
|
+
dp[i][j] = dp[i - 1][j - 1];
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
dp[i][j] = 1 + Math.min(dp[i - 1][j], dp[i][j - 1], dp[i - 1][j - 1]);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return dp[a.length][b.length];
|
|
16
|
+
};
|
|
17
|
+
const closest = (input, validCodes) => {
|
|
18
|
+
let [closest] = validCodes;
|
|
19
|
+
let minDistance = levenshteinDistance(input, closest);
|
|
20
|
+
for (const code of validCodes) {
|
|
21
|
+
const distance = levenshteinDistance(input, code);
|
|
22
|
+
if (distance < minDistance) {
|
|
23
|
+
minDistance = distance;
|
|
24
|
+
closest = code;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return closest;
|
|
28
|
+
};
|
|
29
|
+
const firstLetterUppercase = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
30
|
+
export { closest, firstLetterUppercase, levenshteinDistance, };
|