@salla.sa/twilight-components 1.0.99 → 1.0.104
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-fdf99836.js → index-b4140db0.js} +26 -98
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/salla-add-product-button_6.cjs.entry.js +73 -56
- package/dist/cjs/salla-branches.cjs.entry.js +10 -6
- package/dist/cjs/salla-conditional-fields.cjs.entry.js +4 -5
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +6 -5
- package/dist/cjs/salla-login-modal.cjs.entry.js +4 -4
- package/dist/cjs/salla-offer-modal.cjs.entry.js +4 -3
- package/dist/cjs/salla-quantity-input.cjs.entry.js +3 -3
- package/dist/cjs/salla-rating-modal.cjs.entry.js +5 -5
- package/dist/cjs/salla-rating-stars.cjs.entry.js +27 -36
- package/dist/cjs/{salla-verify-modal.cjs.entry.js → salla-verify.cjs.entry.js} +20 -14
- package/dist/cjs/twilight-components.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +2 -3
- package/dist/collection/components/salla-add-product-button/salla-add-product-button.js +13 -28
- package/dist/collection/components/salla-branches/salla-branches.css +0 -3
- package/dist/collection/components/salla-branches/salla-branches.js +10 -6
- package/dist/collection/components/salla-button/salla-button.css +1 -88
- package/dist/collection/components/salla-button/salla-button.js +2 -26
- package/dist/collection/components/salla-conditional-fields/salla-conditional-fields.js +3 -7
- package/dist/collection/components/salla-infinite-scroll/salla-infinite-scroll.css +0 -3
- package/dist/collection/components/salla-installment/salla-installment.css +4 -3
- package/dist/collection/components/salla-localization-modal/salla-localization-modal.css +2 -16
- package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +4 -3
- package/dist/collection/components/salla-login-modal/salla-login-modal.css +1 -8
- package/dist/collection/components/salla-login-modal/salla-login-modal.js +3 -3
- package/dist/collection/components/salla-modal/salla-modal.css +0 -3
- package/dist/collection/components/salla-modal/salla-modal.js +13 -12
- package/dist/collection/components/salla-offer-modal/salla-offer-modal.css +1 -25
- package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +2 -1
- package/dist/collection/components/salla-product-availability/salla-product-availability.css +0 -3
- package/dist/collection/components/salla-product-availability/salla-product-availability.js +18 -13
- package/dist/collection/components/salla-quantity-input/salla-quantity-input.css +4 -3
- package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +3 -3
- package/dist/collection/components/salla-rating-modal/salla-rating-modal.css +1 -20
- package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +3 -3
- package/dist/collection/components/salla-rating-stars/salla-rating-stars.css +3 -5
- package/dist/collection/components/salla-rating-stars/salla-rating-stars.js +26 -35
- package/dist/collection/components/salla-search/salla-search.css +1 -45
- package/dist/collection/components/salla-search/salla-search.js +35 -16
- package/dist/collection/components/salla-tel-input/salla-tel-input.css +13 -8
- package/dist/collection/components/{salla-verify-modal/salla-verify-modal.css → salla-verify/salla-verify.css} +1 -8
- package/dist/collection/components/{salla-verify-modal/salla-verify-modal.js → salla-verify/salla-verify.js} +33 -26
- package/dist/collection/plugins/tailwind-theme/generator.js +6 -2
- package/dist/collection/plugins/tailwind-theme/index.js +3 -3
- package/dist/components/index.d.ts +17 -5
- package/dist/components/index.js +17 -0
- package/dist/components/salla-add-product-button.js +14 -12
- package/dist/components/salla-branches.js +9 -5
- package/dist/components/salla-button2.js +3 -10
- package/dist/components/salla-conditional-fields.js +3 -4
- package/dist/components/salla-localization-modal.js +5 -4
- package/dist/components/salla-login-modal.js +6 -6
- package/dist/components/salla-modal2.js +7 -7
- package/dist/components/salla-offer-modal.js +3 -2
- package/dist/components/salla-product-availability2.js +17 -12
- package/dist/components/salla-quantity-input.js +2 -2
- package/dist/components/salla-rating-modal.js +4 -4
- package/dist/components/salla-rating-stars2.js +26 -35
- package/dist/components/salla-search.js +33 -15
- package/dist/components/salla-tel-input2.js +3 -3
- package/dist/components/{salla-sizes-table.d.ts → salla-verify.d.ts} +4 -4
- package/dist/components/salla-verify.js +9 -0
- package/dist/components/{salla-verify-modal2.js → salla-verify2.js} +24 -18
- package/dist/esm/{index-4ffd4317.js → index-20b84fd0.js} +26 -98
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/salla-add-product-button_6.entry.js +73 -56
- package/dist/esm/salla-branches.entry.js +10 -6
- package/dist/esm/salla-conditional-fields.entry.js +4 -5
- package/dist/esm/salla-infinite-scroll.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +6 -5
- package/dist/esm/salla-login-modal.entry.js +4 -4
- package/dist/esm/salla-offer-modal.entry.js +4 -3
- package/dist/esm/salla-quantity-input.entry.js +3 -3
- package/dist/esm/salla-rating-modal.entry.js +5 -5
- package/dist/esm/salla-rating-stars.entry.js +27 -36
- package/dist/esm/{salla-verify-modal.entry.js → salla-verify.entry.js} +20 -14
- package/dist/esm/twilight-components.js +3 -3
- package/dist/twilight-components/{p-8c69a096.entry.js → p-15fac4f2.entry.js} +1 -1
- package/dist/twilight-components/p-27d01075.entry.js +4 -0
- package/dist/twilight-components/p-30e63760.entry.js +4 -0
- package/dist/twilight-components/{p-edbb12b2.entry.js → p-5ee94c9e.entry.js} +1 -1
- package/dist/twilight-components/p-799da239.entry.js +4 -0
- package/dist/twilight-components/p-9ff78dd1.entry.js +4 -0
- package/dist/twilight-components/p-c1952856.entry.js +4 -0
- package/dist/twilight-components/p-c2bef5f2.js +5 -0
- package/dist/twilight-components/p-cf143464.entry.js +4 -0
- package/dist/twilight-components/p-d3778858.entry.js +4 -0
- package/dist/twilight-components/p-ebd2e045.entry.js +4 -0
- package/dist/twilight-components/p-ec0a2892.entry.js +4 -0
- package/dist/twilight-components/{p-56065da6.entry.js → p-fab65162.entry.js} +1 -1
- package/dist/twilight-components/twilight-components.esm.js +1 -1
- package/dist/types/components/salla-add-product-button/salla-add-product-button.d.ts +1 -2
- package/dist/types/components/salla-button/salla-button.d.ts +0 -5
- package/dist/types/components/salla-rating-stars/salla-rating-stars.d.ts +1 -0
- package/dist/types/components/salla-search/salla-search.d.ts +6 -1
- package/dist/types/components/{salla-verify-modal/salla-verify-modal.d.ts → salla-verify/salla-verify.d.ts} +3 -2
- package/dist/types/components.d.ts +33 -50
- package/example/dist/translations.js +1 -1
- package/example/index.html +184 -162
- package/example/tailwind.config.js +4 -7
- package/package.json +9 -13
- package/dist/cjs/salla-sizes-table.cjs.entry.js +0 -22
- package/dist/collection/components/salla-conditional-fields/salla-conditional-fields.css +0 -3
- package/dist/collection/components/salla-sizes-table/salla-sizes-table.css +0 -6
- package/dist/collection/components/salla-sizes-table/salla-sizes-table.js +0 -18
- package/dist/components/salla-sizes-table.js +0 -37
- package/dist/components/salla-verify-modal.d.ts +0 -11
- package/dist/components/salla-verify-modal.js +0 -9
- package/dist/esm/salla-sizes-table.entry.js +0 -18
- package/dist/twilight-components/p-1d0e664c.js +0 -4
- package/dist/twilight-components/p-210f5278.entry.js +0 -4
- package/dist/twilight-components/p-2384537d.entry.js +0 -4
- package/dist/twilight-components/p-2b1c3490.entry.js +0 -4
- package/dist/twilight-components/p-7fae6b84.entry.js +0 -4
- package/dist/twilight-components/p-9e05640e.entry.js +0 -4
- package/dist/twilight-components/p-af450175.entry.js +0 -4
- package/dist/twilight-components/p-d762e16f.entry.js +0 -4
- package/dist/twilight-components/p-d77dd260.entry.js +0 -4
- package/dist/twilight-components/p-e435a209.entry.js +0 -4
- package/dist/twilight-components/p-ecaee6a4.entry.js +0 -4
- package/dist/types/components/salla-sizes-table/salla-sizes-table.d.ts +0 -3
- package/example/.DS_Store +0 -0
- package/example/.gitignore +0 -2
- package/example/dist/.DS_Store +0 -0
|
@@ -25,7 +25,6 @@ function _interopNamespace(e) {
|
|
|
25
25
|
|
|
26
26
|
const NAMESPACE = 'twilight-components';
|
|
27
27
|
|
|
28
|
-
let scopeId;
|
|
29
28
|
let contentRef;
|
|
30
29
|
let hostTagName;
|
|
31
30
|
let useNativeShadowDom = false;
|
|
@@ -46,10 +45,10 @@ const plt = {
|
|
|
46
45
|
};
|
|
47
46
|
const supportsShadow = true;
|
|
48
47
|
const promiseResolve = (v) => Promise.resolve(v);
|
|
49
|
-
const
|
|
48
|
+
const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
|
|
50
49
|
try {
|
|
51
50
|
new CSSStyleSheet();
|
|
52
|
-
return typeof new CSSStyleSheet().
|
|
51
|
+
return typeof new CSSStyleSheet().replaceSync === 'function';
|
|
53
52
|
}
|
|
54
53
|
catch (e) { }
|
|
55
54
|
return false;
|
|
@@ -115,9 +114,14 @@ const uniqueTime = (key, measureText) => {
|
|
|
115
114
|
const rootAppliedStyles = new WeakMap();
|
|
116
115
|
const registerStyle = (scopeId, cssText, allowCS) => {
|
|
117
116
|
let style = styles.get(scopeId);
|
|
118
|
-
if (
|
|
117
|
+
if (supportsConstructableStylesheets && allowCS) {
|
|
119
118
|
style = (style || new CSSStyleSheet());
|
|
120
|
-
style
|
|
119
|
+
if (typeof style === 'string') {
|
|
120
|
+
style = cssText;
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
style.replaceSync(cssText);
|
|
124
|
+
}
|
|
121
125
|
}
|
|
122
126
|
else {
|
|
123
127
|
style = cssText;
|
|
@@ -126,7 +130,7 @@ const registerStyle = (scopeId, cssText, allowCS) => {
|
|
|
126
130
|
};
|
|
127
131
|
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
128
132
|
let scopeId = getScopeId(cmpMeta);
|
|
129
|
-
|
|
133
|
+
const style = styles.get(scopeId);
|
|
130
134
|
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
131
135
|
// so the fallback is to always use the document for the root node in those cases
|
|
132
136
|
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
@@ -165,24 +169,11 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
|
165
169
|
const attachStyles = (hostRef) => {
|
|
166
170
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
167
171
|
const elm = hostRef.$hostElement$;
|
|
168
|
-
const flags = cmpMeta.$flags$;
|
|
169
172
|
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
170
|
-
|
|
171
|
-
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
172
|
-
// only required when we're NOT using native shadow dom (slot)
|
|
173
|
-
// or this browser doesn't support native shadow dom
|
|
174
|
-
// and this host element was NOT created with SSR
|
|
175
|
-
// let's pick out the inner content for slot projection
|
|
176
|
-
// create a node to represent where the original
|
|
177
|
-
// content was first placed, which is useful later on
|
|
178
|
-
// DOM WRITE!!
|
|
179
|
-
elm['s-sc'] = scopeId;
|
|
180
|
-
elm.classList.add(scopeId + '-h');
|
|
181
|
-
}
|
|
173
|
+
addStyle(elm.getRootNode(), cmpMeta);
|
|
182
174
|
endAttachStyles();
|
|
183
175
|
};
|
|
184
176
|
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
185
|
-
const convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, '$1{');
|
|
186
177
|
/**
|
|
187
178
|
* Default style mode id
|
|
188
179
|
*/
|
|
@@ -191,7 +182,6 @@ const convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g
|
|
|
191
182
|
* Don't add values to these!!
|
|
192
183
|
*/
|
|
193
184
|
const EMPTY_OBJ = {};
|
|
194
|
-
const isDef = (v) => v != null;
|
|
195
185
|
const isComplexType = (o) => {
|
|
196
186
|
// https://jsperf.com/typeof-fn-object/5
|
|
197
187
|
o = typeof o;
|
|
@@ -214,7 +204,7 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
214
204
|
let slotName = null;
|
|
215
205
|
let simple = false;
|
|
216
206
|
let lastSimple = false;
|
|
217
|
-
|
|
207
|
+
const vNodeChildren = [];
|
|
218
208
|
const walk = (c) => {
|
|
219
209
|
for (let i = 0; i < c.length; i++) {
|
|
220
210
|
child = c[i];
|
|
@@ -389,7 +379,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
389
379
|
if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
|
|
390
380
|
try {
|
|
391
381
|
if (!elm.tagName.includes('-')) {
|
|
392
|
-
|
|
382
|
+
const n = newValue == null ? '' : newValue;
|
|
393
383
|
// Workaround for Safari, moving the <input> caret when re-assigning the same valued
|
|
394
384
|
if (memberName === 'list') {
|
|
395
385
|
isProp = false;
|
|
@@ -466,7 +456,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
466
456
|
};
|
|
467
457
|
const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
468
458
|
// tslint:disable-next-line: prefer-const
|
|
469
|
-
|
|
459
|
+
const newVNode = newParentVNode.$children$[childIndex];
|
|
470
460
|
let i = 0;
|
|
471
461
|
let elm;
|
|
472
462
|
let childNode;
|
|
@@ -475,10 +465,6 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
475
465
|
// remember for later we need to check to relocate nodes
|
|
476
466
|
checkSlotRelocate = true;
|
|
477
467
|
if (newVNode.$tag$ === 'slot') {
|
|
478
|
-
if (scopeId) {
|
|
479
|
-
// scoped css needs to add its scoped id to the parent element
|
|
480
|
-
parentElm.classList.add(scopeId + '-s');
|
|
481
|
-
}
|
|
482
468
|
newVNode.$flags$ |= newVNode.$children$
|
|
483
469
|
? // slot element has fallback content
|
|
484
470
|
2 /* isSlotFallback */
|
|
@@ -504,15 +490,10 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
504
490
|
{
|
|
505
491
|
updateElement(null, newVNode, isSvgMode);
|
|
506
492
|
}
|
|
507
|
-
if (isDef(scopeId) && elm['s-si'] !== scopeId) {
|
|
508
|
-
// if there is a scopeId and this is the initial render
|
|
509
|
-
// then let's add the scopeId as a css class
|
|
510
|
-
elm.classList.add((elm['s-si'] = scopeId));
|
|
511
|
-
}
|
|
512
493
|
if (newVNode.$children$) {
|
|
513
494
|
for (i = 0; i < newVNode.$children$.length; ++i) {
|
|
514
495
|
// create the node
|
|
515
|
-
childNode = createElm(oldParentVNode, newVNode, i
|
|
496
|
+
childNode = createElm(oldParentVNode, newVNode, i);
|
|
516
497
|
// return node could have been null
|
|
517
498
|
if (childNode) {
|
|
518
499
|
// append our new node
|
|
@@ -568,12 +549,9 @@ const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
568
549
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
569
550
|
let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
|
|
570
551
|
let childNode;
|
|
571
|
-
if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
|
|
572
|
-
containerElm = containerElm.shadowRoot;
|
|
573
|
-
}
|
|
574
552
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
575
553
|
if (vnodes[startIdx]) {
|
|
576
|
-
childNode = createElm(null, parentVNode, startIdx
|
|
554
|
+
childNode = createElm(null, parentVNode, startIdx);
|
|
577
555
|
if (childNode) {
|
|
578
556
|
vnodes[startIdx].$elm$ = childNode;
|
|
579
557
|
containerElm.insertBefore(childNode, referenceNode(before) );
|
|
@@ -676,7 +654,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
676
654
|
if (idxInOld >= 0) {
|
|
677
655
|
elmToMove = oldCh[idxInOld];
|
|
678
656
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
679
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld
|
|
657
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld);
|
|
680
658
|
}
|
|
681
659
|
else {
|
|
682
660
|
patch(elmToMove, newStartVnode);
|
|
@@ -687,7 +665,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
687
665
|
}
|
|
688
666
|
else {
|
|
689
667
|
// new element
|
|
690
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx
|
|
668
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
|
|
691
669
|
newStartVnode = newCh[++newStartIdx];
|
|
692
670
|
}
|
|
693
671
|
if (node) {
|
|
@@ -774,7 +752,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
774
752
|
};
|
|
775
753
|
const updateFallbackSlotVisibility = (elm) => {
|
|
776
754
|
// tslint:disable-next-line: prefer-const
|
|
777
|
-
|
|
755
|
+
const childNodes = elm.childNodes;
|
|
778
756
|
let childNode;
|
|
779
757
|
let i;
|
|
780
758
|
let ilen;
|
|
@@ -827,8 +805,8 @@ const relocateSlotContent = (elm) => {
|
|
|
827
805
|
let relocateNodeData;
|
|
828
806
|
let j;
|
|
829
807
|
let i = 0;
|
|
830
|
-
|
|
831
|
-
|
|
808
|
+
const childNodes = elm.childNodes;
|
|
809
|
+
const ilen = childNodes.length;
|
|
832
810
|
for (; i < ilen; i++) {
|
|
833
811
|
childNode = childNodes[i];
|
|
834
812
|
if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
|
|
@@ -922,10 +900,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
922
900
|
rootVnode.$tag$ = null;
|
|
923
901
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
924
902
|
hostRef.$vnode$ = rootVnode;
|
|
925
|
-
rootVnode.$elm$ = oldVNode.$elm$ = (hostElm
|
|
926
|
-
{
|
|
927
|
-
scopeId = hostElm['s-sc'];
|
|
928
|
-
}
|
|
903
|
+
rootVnode.$elm$ = oldVNode.$elm$ = (hostElm);
|
|
929
904
|
{
|
|
930
905
|
contentRef = hostElm['s-cr'];
|
|
931
906
|
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
@@ -1213,7 +1188,7 @@ const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
1213
1188
|
const shadowRoot = hostElm.shadowRoot;
|
|
1214
1189
|
const childRenderNodes = [];
|
|
1215
1190
|
const slotNodes = [];
|
|
1216
|
-
const shadowRootNodes =
|
|
1191
|
+
const shadowRootNodes = null;
|
|
1217
1192
|
const vnode = (hostRef.$vnode$ = newVNode(tagName, null));
|
|
1218
1193
|
if (!plt.$orgLocNodes$) {
|
|
1219
1194
|
initializeDocumentHydrate(doc.body, (plt.$orgLocNodes$ = new Map()));
|
|
@@ -1237,13 +1212,6 @@ const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
1237
1212
|
}
|
|
1238
1213
|
plt.$orgLocNodes$.delete(orgLocationId);
|
|
1239
1214
|
});
|
|
1240
|
-
if (shadowRoot) {
|
|
1241
|
-
shadowRootNodes.map((shadowRootNode) => {
|
|
1242
|
-
if (shadowRootNode) {
|
|
1243
|
-
shadowRoot.appendChild(shadowRootNode);
|
|
1244
|
-
}
|
|
1245
|
-
});
|
|
1246
|
-
}
|
|
1247
1215
|
endHydrate();
|
|
1248
1216
|
};
|
|
1249
1217
|
const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
|
|
@@ -1347,22 +1315,6 @@ const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes
|
|
|
1347
1315
|
node['s-sn'] = '';
|
|
1348
1316
|
}
|
|
1349
1317
|
node['s-sr'] = true;
|
|
1350
|
-
if (shadowRootNodes) {
|
|
1351
|
-
// browser support shadowRoot and this is a shadow dom component
|
|
1352
|
-
// create an actual slot element
|
|
1353
|
-
childVNode.$elm$ = doc.createElement(childVNode.$tag$);
|
|
1354
|
-
if (childVNode.$name$) {
|
|
1355
|
-
// add the slot name attribute
|
|
1356
|
-
childVNode.$elm$.setAttribute('name', childVNode.$name$);
|
|
1357
|
-
}
|
|
1358
|
-
// insert the new slot element before the slot comment
|
|
1359
|
-
node.parentNode.insertBefore(childVNode.$elm$, node);
|
|
1360
|
-
// remove the slot comment since it's not needed for shadow
|
|
1361
|
-
node.remove();
|
|
1362
|
-
if (childVNode.$depth$ === '0') {
|
|
1363
|
-
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1364
|
-
}
|
|
1365
|
-
}
|
|
1366
1318
|
slotNodes.push(childVNode);
|
|
1367
1319
|
if (!parentVNode.$children$) {
|
|
1368
1320
|
parentVNode.$children$ = [];
|
|
@@ -1371,11 +1323,7 @@ const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes
|
|
|
1371
1323
|
}
|
|
1372
1324
|
else if (childNodeType === CONTENT_REF_ID) {
|
|
1373
1325
|
// `${CONTENT_REF_ID}.${hostId}`;
|
|
1374
|
-
|
|
1375
|
-
// remove the content ref comment since it's not needed for shadow
|
|
1376
|
-
node.remove();
|
|
1377
|
-
}
|
|
1378
|
-
else {
|
|
1326
|
+
{
|
|
1379
1327
|
hostElm['s-cr'] = node;
|
|
1380
1328
|
node['s-cn'] = true;
|
|
1381
1329
|
}
|
|
@@ -1698,10 +1646,6 @@ const connectedCallback = (elm) => {
|
|
|
1698
1646
|
{
|
|
1699
1647
|
hostId = elm.getAttribute(HYDRATE_ID);
|
|
1700
1648
|
if (hostId) {
|
|
1701
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1702
|
-
const scopeId = addStyle(elm.shadowRoot, cmpMeta);
|
|
1703
|
-
elm.classList.remove(scopeId + '-h', scopeId + '-s');
|
|
1704
|
-
}
|
|
1705
1649
|
initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
|
|
1706
1650
|
}
|
|
1707
1651
|
}
|
|
@@ -1787,10 +1731,8 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1787
1731
|
const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
|
|
1788
1732
|
const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
|
|
1789
1733
|
const deferredConnectedCallbacks = [];
|
|
1790
|
-
const styles = /*@__PURE__*/ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
1791
1734
|
let appLoadFallback;
|
|
1792
1735
|
let isBootstrapping = true;
|
|
1793
|
-
let i = 0;
|
|
1794
1736
|
Object.assign(plt, options);
|
|
1795
1737
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
|
|
1796
1738
|
{
|
|
@@ -1798,11 +1740,6 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1798
1740
|
// async queue. This will improve the first input delay
|
|
1799
1741
|
plt.$flags$ |= 2 /* appLoaded */;
|
|
1800
1742
|
}
|
|
1801
|
-
{
|
|
1802
|
-
for (; i < styles.length; i++) {
|
|
1803
|
-
registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);
|
|
1804
|
-
}
|
|
1805
|
-
}
|
|
1806
1743
|
lazyBundles.map((lazyBundle) => {
|
|
1807
1744
|
lazyBundle[1].map((compactMeta) => {
|
|
1808
1745
|
const cmpMeta = {
|
|
@@ -1831,17 +1768,6 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1831
1768
|
super(self);
|
|
1832
1769
|
self = this;
|
|
1833
1770
|
registerHost(self, cmpMeta);
|
|
1834
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1835
|
-
// this component is using shadow dom
|
|
1836
|
-
// and this browser supports shadow dom
|
|
1837
|
-
// add the read-only property "shadowRoot" to the host element
|
|
1838
|
-
// adding the shadow root build conditionals to minimize runtime
|
|
1839
|
-
{
|
|
1840
|
-
{
|
|
1841
|
-
self.attachShadow({ mode: 'open' });
|
|
1842
|
-
}
|
|
1843
|
-
}
|
|
1844
|
-
}
|
|
1845
1771
|
}
|
|
1846
1772
|
connectedCallback() {
|
|
1847
1773
|
if (appLoadFallback) {
|
|
@@ -1920,7 +1846,9 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1920
1846
|
if (module) {
|
|
1921
1847
|
return module[exportName];
|
|
1922
1848
|
}
|
|
1849
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
1923
1850
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1851
|
+
/* @vite-ignore */
|
|
1924
1852
|
/* webpackInclude: /\.entry\.js$/ */
|
|
1925
1853
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
1926
1854
|
/* webpackMode: "lazy" */
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-b4140db0.js');
|
|
9
9
|
|
|
10
10
|
/*
|
|
11
|
-
Stencil Client Patch Esm v2.
|
|
11
|
+
Stencil Client Patch Esm v2.17.1 | MIT Licensed | https://stenciljs.com
|
|
12
12
|
*/
|
|
13
13
|
const patchEsm = () => {
|
|
14
14
|
return index.promiseResolve();
|
|
@@ -17,7 +17,7 @@ const patchEsm = () => {
|
|
|
17
17
|
const defineCustomElements = (win, options) => {
|
|
18
18
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
19
19
|
return patchEsm().then(() => {
|
|
20
|
-
return index.bootstrapLazy([["salla-add-product-button_6.cjs",[[4,"salla-add-product-button",{"channels":[513],"quantity":[514],"donatingAmount":[514,"donating-amount"],"productId":[520,"product-id"],"productStatus":[513,"product-status"],"productType":[513,"product-type"]
|
|
20
|
+
return index.bootstrapLazy([["salla-add-product-button_6.cjs",[[4,"salla-add-product-button",{"channels":[513],"quantity":[514],"donatingAmount":[514,"donating-amount"],"productId":[520,"product-id"],"productStatus":[513,"product-status"],"productType":[513,"product-type"]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"results":[32],"placeholder":[32],"noResultsText":[32],"typing":[32],"debounce":[32],"search_term":[32]}],[0,"salla-product-availability",{"channels":[1],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"subTitle":[32],"mobileLabel":[32],"emailLabel":[32],"emailPlaceholder":[32],"subscribedMessage":[32],"title_":[32],"emailErrorMsg":[32],"isVisitorSubscribed":[32]}],[0,"salla-tel-input",{"phone":[1025],"name":[1],"countryCode":[1025,"country-code"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}],[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"icon":[1],"iconStyle":[1,"icon-style"],"imageIcon":[1,"image-icon"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}]]],["salla-login-modal.cjs",[[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"title":[32],"loginTypeTitle":[32],"loginText":[32],"smsLabel":[32],"mobileLabel":[32],"emailLabel":[32],"enterText":[32],"bySMSText":[32],"byEmailText":[32],"emailErrorMsg":[32],"firstNameLabel":[32],"lastNameLabel":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"open":[64]},[[8,"verified","onVerified"]]]]],["salla-rating-modal.cjs",[[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"open":[64],"close":[64]}]]],["salla-branches.cjs",[[4,"salla-branches",{"position":[1],"displayAs":[1,"display-as"],"browseProductsFrom":[1,"browse-products-from"],"branches":[16],"current":[1026],"open":[32],"selected":[32],"isOpenedBefore":[32],"show":[64],"hide":[64]}]]],["salla-localization-modal.cjs",[[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"open":[64],"close":[64],"submit":[64]}]]],["salla-offer-modal.cjs",[[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"offer_expires_in":[32],"remember_my_choice":[32],"add_to_cart":[32],"out_of_stock":[32],"open":[64],"showOffer":[64]}]]],["salla-conditional-fields.cjs",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["salla-infinite-scroll.cjs",[[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}]]],["salla-installment.cjs",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["salla-quantity-input.cjs",[[4,"salla-quantity-input",{"quantity":[32],"decrease":[64],"increase":[64],"setValue":[64]}]]],["salla-verify.cjs",[[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"title":[32],"resendAfter":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}]]],["salla-rating-stars.cjs",[[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2]}]]]], options);
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
|