lwc 2.6.2 → 2.6.3
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/engine-dom/esm/es2017/engine-dom.js +578 -384
- package/dist/engine-dom/iife/es2017/engine-dom.js +578 -384
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -9
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +552 -360
- package/dist/engine-dom/iife/es5/engine-dom.js +630 -335
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -9
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +598 -311
- package/dist/engine-dom/umd/es2017/engine-dom.js +578 -384
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -9
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +552 -360
- package/dist/engine-dom/umd/es5/engine-dom.js +630 -335
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -9
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +598 -311
- package/dist/engine-server/commonjs/es2017/engine-server.js +647 -454
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -9
- package/dist/engine-server/esm/es2017/engine-server.js +647 -454
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +115 -13
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +115 -13
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +115 -13
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +119 -13
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +119 -13
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +115 -13
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +115 -13
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +119 -13
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +119 -13
- package/dist/wire-service/esm/es2017/wire-service.js +2 -2
- package/dist/wire-service/iife/es2017/wire-service.js +2 -2
- package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
- package/dist/wire-service/iife/es5/wire-service.js +3 -3
- package/dist/wire-service/iife/es5/wire-service.min.js +1 -1
- package/dist/wire-service/iife/es5/wire-service_debug.js +3 -3
- package/dist/wire-service/umd/es2017/wire-service.js +2 -2
- package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
- package/dist/wire-service/umd/es5/wire-service.js +3 -3
- package/dist/wire-service/umd/es5/wire-service.min.js +1 -1
- package/dist/wire-service/umd/es5/wire-service_debug.js +3 -3
- package/package.json +8 -8
|
@@ -305,7 +305,7 @@
|
|
|
305
305
|
CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
|
|
306
306
|
return attributeName;
|
|
307
307
|
}
|
|
308
|
-
/** version: 2.6.
|
|
308
|
+
/** version: 2.6.3 */
|
|
309
309
|
|
|
310
310
|
/*
|
|
311
311
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -419,7 +419,6 @@
|
|
|
419
419
|
ENABLE_NODE_LIST_PATCH: null,
|
|
420
420
|
ENABLE_HTML_COLLECTIONS_PATCH: null,
|
|
421
421
|
ENABLE_NODE_PATCH: null,
|
|
422
|
-
ENABLE_MIXED_SHADOW_MODE: null,
|
|
423
422
|
ENABLE_WIRE_SYNC_EMIT: null
|
|
424
423
|
};
|
|
425
424
|
|
|
@@ -484,7 +483,7 @@
|
|
|
484
483
|
setFeatureFlag(name, value);
|
|
485
484
|
}
|
|
486
485
|
}
|
|
487
|
-
/** version: 2.6.
|
|
486
|
+
/** version: 2.6.3 */
|
|
488
487
|
|
|
489
488
|
/* proxy-compat-disable */
|
|
490
489
|
|
|
@@ -558,6 +557,249 @@
|
|
|
558
557
|
}
|
|
559
558
|
|
|
560
559
|
return styleMap;
|
|
560
|
+
} //
|
|
561
|
+
// Primitives
|
|
562
|
+
//
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
let ssr$1;
|
|
566
|
+
|
|
567
|
+
function setSsr(ssrImpl) {
|
|
568
|
+
ssr$1 = ssrImpl;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
let isNativeShadowDefined$1;
|
|
572
|
+
|
|
573
|
+
function setIsNativeShadowDefined(isNativeShadowDefinedImpl) {
|
|
574
|
+
isNativeShadowDefined$1 = isNativeShadowDefinedImpl;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
let isSyntheticShadowDefined$1;
|
|
578
|
+
|
|
579
|
+
function setIsSyntheticShadowDefined(isSyntheticShadowDefinedImpl) {
|
|
580
|
+
isSyntheticShadowDefined$1 = isSyntheticShadowDefinedImpl;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
let HTMLElementExported$1;
|
|
584
|
+
|
|
585
|
+
function setHTMLElement(HTMLElementImpl) {
|
|
586
|
+
HTMLElementExported$1 = HTMLElementImpl;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
let isHydrating$1;
|
|
590
|
+
|
|
591
|
+
function setIsHydrating$1(isHydratingImpl) {
|
|
592
|
+
isHydrating$1 = isHydratingImpl;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
let insert$1;
|
|
596
|
+
|
|
597
|
+
function setInsert(insertImpl) {
|
|
598
|
+
insert$1 = insertImpl;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
let remove$1;
|
|
602
|
+
|
|
603
|
+
function setRemove(removeImpl) {
|
|
604
|
+
remove$1 = removeImpl;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
let createElement$2;
|
|
608
|
+
|
|
609
|
+
function setCreateElement(createElementImpl) {
|
|
610
|
+
createElement$2 = createElementImpl;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
let createText$1;
|
|
614
|
+
|
|
615
|
+
function setCreateText(createTextImpl) {
|
|
616
|
+
createText$1 = createTextImpl;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
let createComment$1;
|
|
620
|
+
|
|
621
|
+
function setCreateComment(createCommentImpl) {
|
|
622
|
+
createComment$1 = createCommentImpl;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
let nextSibling$1;
|
|
626
|
+
|
|
627
|
+
function setNextSibling(nextSiblingImpl) {
|
|
628
|
+
nextSibling$1 = nextSiblingImpl;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
let attachShadow$1;
|
|
632
|
+
|
|
633
|
+
function setAttachShadow(attachShadowImpl) {
|
|
634
|
+
attachShadow$1 = attachShadowImpl;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
let getProperty$1;
|
|
638
|
+
|
|
639
|
+
function setGetProperty(getPropertyImpl) {
|
|
640
|
+
getProperty$1 = getPropertyImpl;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
let setProperty$1;
|
|
644
|
+
|
|
645
|
+
function setSetProperty(setPropertyImpl) {
|
|
646
|
+
setProperty$1 = setPropertyImpl;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
let setText$1;
|
|
650
|
+
|
|
651
|
+
function setSetText(setTextImpl) {
|
|
652
|
+
setText$1 = setTextImpl;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
let getAttribute$1;
|
|
656
|
+
|
|
657
|
+
function setGetAttribute(getAttributeImpl) {
|
|
658
|
+
getAttribute$1 = getAttributeImpl;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
let setAttribute$1;
|
|
662
|
+
|
|
663
|
+
function setSetAttribute(setAttributeImpl) {
|
|
664
|
+
setAttribute$1 = setAttributeImpl;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
let removeAttribute$1;
|
|
668
|
+
|
|
669
|
+
function setRemoveAttribute(removeAttributeImpl) {
|
|
670
|
+
removeAttribute$1 = removeAttributeImpl;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
let addEventListener$1;
|
|
674
|
+
|
|
675
|
+
function setAddEventListener(addEventListenerImpl) {
|
|
676
|
+
addEventListener$1 = addEventListenerImpl;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
let removeEventListener$1;
|
|
680
|
+
|
|
681
|
+
function setRemoveEventListener(removeEventListenerImpl) {
|
|
682
|
+
removeEventListener$1 = removeEventListenerImpl;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
let dispatchEvent$1;
|
|
686
|
+
|
|
687
|
+
function setDispatchEvent(dispatchEventImpl) {
|
|
688
|
+
dispatchEvent$1 = dispatchEventImpl;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
let getClassList$1;
|
|
692
|
+
|
|
693
|
+
function setGetClassList(getClassListImpl) {
|
|
694
|
+
getClassList$1 = getClassListImpl;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
let setCSSStyleProperty$1;
|
|
698
|
+
|
|
699
|
+
function setSetCSSStyleProperty(setCSSStylePropertyImpl) {
|
|
700
|
+
setCSSStyleProperty$1 = setCSSStylePropertyImpl;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
let getBoundingClientRect$1;
|
|
704
|
+
|
|
705
|
+
function setGetBoundingClientRect(getBoundingClientRectImpl) {
|
|
706
|
+
getBoundingClientRect$1 = getBoundingClientRectImpl;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
let querySelector$1;
|
|
710
|
+
|
|
711
|
+
function setQuerySelector(querySelectorImpl) {
|
|
712
|
+
querySelector$1 = querySelectorImpl;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
let querySelectorAll$1;
|
|
716
|
+
|
|
717
|
+
function setQuerySelectorAll(querySelectorAllImpl) {
|
|
718
|
+
querySelectorAll$1 = querySelectorAllImpl;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
let getElementsByTagName$1;
|
|
722
|
+
|
|
723
|
+
function setGetElementsByTagName(getElementsByTagNameImpl) {
|
|
724
|
+
getElementsByTagName$1 = getElementsByTagNameImpl;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
let getElementsByClassName$1;
|
|
728
|
+
|
|
729
|
+
function setGetElementsByClassName(getElementsByClassNameImpl) {
|
|
730
|
+
getElementsByClassName$1 = getElementsByClassNameImpl;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
let getChildren$1;
|
|
734
|
+
|
|
735
|
+
function setGetChildren(getChildrenImpl) {
|
|
736
|
+
getChildren$1 = getChildrenImpl;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
let getChildNodes$1;
|
|
740
|
+
|
|
741
|
+
function setGetChildNodes(getChildNodesImpl) {
|
|
742
|
+
getChildNodes$1 = getChildNodesImpl;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
let getFirstChild$1;
|
|
746
|
+
|
|
747
|
+
function setGetFirstChild(getFirstChildImpl) {
|
|
748
|
+
getFirstChild$1 = getFirstChildImpl;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
let getFirstElementChild$1;
|
|
752
|
+
|
|
753
|
+
function setGetFirstElementChild(getFirstElementChildImpl) {
|
|
754
|
+
getFirstElementChild$1 = getFirstElementChildImpl;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
let getLastChild$1;
|
|
758
|
+
|
|
759
|
+
function setGetLastChild(getLastChildImpl) {
|
|
760
|
+
getLastChild$1 = getLastChildImpl;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
let getLastElementChild$1;
|
|
764
|
+
|
|
765
|
+
function setGetLastElementChild(getLastElementChildImpl) {
|
|
766
|
+
getLastElementChild$1 = getLastElementChildImpl;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
let isConnected$1;
|
|
770
|
+
|
|
771
|
+
function setIsConnected(isConnectedImpl) {
|
|
772
|
+
isConnected$1 = isConnectedImpl;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
let insertGlobalStylesheet$1;
|
|
776
|
+
|
|
777
|
+
function setInsertGlobalStylesheet(insertGlobalStylesheetImpl) {
|
|
778
|
+
insertGlobalStylesheet$1 = insertGlobalStylesheetImpl;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
let insertStylesheet$1;
|
|
782
|
+
|
|
783
|
+
function setInsertStylesheet(insertStylesheetImpl) {
|
|
784
|
+
insertStylesheet$1 = insertStylesheetImpl;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
let assertInstanceOfHTMLElement$1;
|
|
788
|
+
|
|
789
|
+
function setAssertInstanceOfHTMLElement(assertInstanceOfHTMLElementImpl) {
|
|
790
|
+
assertInstanceOfHTMLElement$1 = assertInstanceOfHTMLElementImpl;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
let defineCustomElement$1;
|
|
794
|
+
|
|
795
|
+
function setDefineCustomElement(defineCustomElementImpl) {
|
|
796
|
+
defineCustomElement$1 = defineCustomElementImpl;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
let getCustomElement$1;
|
|
800
|
+
|
|
801
|
+
function setGetCustomElement(getCustomElementImpl) {
|
|
802
|
+
getCustomElement$1 = getCustomElementImpl;
|
|
561
803
|
}
|
|
562
804
|
/*
|
|
563
805
|
* Copyright (c) 2019, salesforce.com, inc.
|
|
@@ -811,9 +1053,6 @@
|
|
|
811
1053
|
elm,
|
|
812
1054
|
data: {
|
|
813
1055
|
on
|
|
814
|
-
},
|
|
815
|
-
owner: {
|
|
816
|
-
renderer
|
|
817
1056
|
}
|
|
818
1057
|
} = vnode;
|
|
819
1058
|
|
|
@@ -826,7 +1065,7 @@
|
|
|
826
1065
|
let name;
|
|
827
1066
|
|
|
828
1067
|
for (name in on) {
|
|
829
|
-
|
|
1068
|
+
addEventListener$1(elm, name, listener);
|
|
830
1069
|
}
|
|
831
1070
|
}
|
|
832
1071
|
|
|
@@ -968,9 +1207,6 @@
|
|
|
968
1207
|
const {
|
|
969
1208
|
data: {
|
|
970
1209
|
attrs
|
|
971
|
-
},
|
|
972
|
-
owner: {
|
|
973
|
-
renderer
|
|
974
1210
|
}
|
|
975
1211
|
} = vnode;
|
|
976
1212
|
|
|
@@ -993,10 +1229,6 @@
|
|
|
993
1229
|
}
|
|
994
1230
|
|
|
995
1231
|
const elm = vnode.elm;
|
|
996
|
-
const {
|
|
997
|
-
setAttribute,
|
|
998
|
-
removeAttribute
|
|
999
|
-
} = renderer;
|
|
1000
1232
|
let key;
|
|
1001
1233
|
oldAttrs = isUndefined$1(oldAttrs) ? EmptyObject : oldAttrs; // update modified attributes, add new attributes
|
|
1002
1234
|
// this routine is only useful for data-* attributes in all kind of elements
|
|
@@ -1011,14 +1243,14 @@
|
|
|
1011
1243
|
|
|
1012
1244
|
if (StringCharCodeAt.call(key, 3) === ColonCharCode) {
|
|
1013
1245
|
// Assume xml namespace
|
|
1014
|
-
setAttribute(elm, key, cur, xmlNS);
|
|
1246
|
+
setAttribute$1(elm, key, cur, xmlNS);
|
|
1015
1247
|
} else if (StringCharCodeAt.call(key, 5) === ColonCharCode) {
|
|
1016
1248
|
// Assume xlink namespace
|
|
1017
|
-
setAttribute(elm, key, cur, xlinkNS);
|
|
1018
|
-
} else if (isNull(cur)) {
|
|
1019
|
-
removeAttribute(elm, key);
|
|
1249
|
+
setAttribute$1(elm, key, cur, xlinkNS);
|
|
1250
|
+
} else if (isNull(cur) || isUndefined$1(cur)) {
|
|
1251
|
+
removeAttribute$1(elm, key);
|
|
1020
1252
|
} else {
|
|
1021
|
-
setAttribute(elm, key, cur);
|
|
1253
|
+
setAttribute$1(elm, key, cur);
|
|
1022
1254
|
}
|
|
1023
1255
|
|
|
1024
1256
|
lockAttribute();
|
|
@@ -1066,17 +1298,14 @@
|
|
|
1066
1298
|
const isFirstPatch = isUndefined$1(oldProps);
|
|
1067
1299
|
const {
|
|
1068
1300
|
elm,
|
|
1069
|
-
sel
|
|
1070
|
-
owner: {
|
|
1071
|
-
renderer
|
|
1072
|
-
}
|
|
1301
|
+
sel
|
|
1073
1302
|
} = vnode;
|
|
1074
1303
|
|
|
1075
1304
|
for (const key in props) {
|
|
1076
1305
|
const cur = props[key]; // if it is the first time this element is patched, or the current value is different to the previous value...
|
|
1077
1306
|
|
|
1078
|
-
if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ?
|
|
1079
|
-
|
|
1307
|
+
if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ? getProperty$1(elm, key) : oldProps[key])) {
|
|
1308
|
+
setProperty$1(elm, key, cur);
|
|
1080
1309
|
}
|
|
1081
1310
|
}
|
|
1082
1311
|
}
|
|
@@ -1145,9 +1374,6 @@
|
|
|
1145
1374
|
elm,
|
|
1146
1375
|
data: {
|
|
1147
1376
|
className: newClass
|
|
1148
|
-
},
|
|
1149
|
-
owner: {
|
|
1150
|
-
renderer
|
|
1151
1377
|
}
|
|
1152
1378
|
} = vnode;
|
|
1153
1379
|
const {
|
|
@@ -1160,7 +1386,7 @@
|
|
|
1160
1386
|
return;
|
|
1161
1387
|
}
|
|
1162
1388
|
|
|
1163
|
-
const classList =
|
|
1389
|
+
const classList = getClassList$1(elm);
|
|
1164
1390
|
const newClassMap = getMapFromClassName(newClass);
|
|
1165
1391
|
const oldClassMap = getMapFromClassName(oldClass);
|
|
1166
1392
|
let name;
|
|
@@ -1198,24 +1424,17 @@
|
|
|
1198
1424
|
elm,
|
|
1199
1425
|
data: {
|
|
1200
1426
|
style: newStyle
|
|
1201
|
-
},
|
|
1202
|
-
owner: {
|
|
1203
|
-
renderer
|
|
1204
1427
|
}
|
|
1205
1428
|
} = vnode;
|
|
1206
|
-
const {
|
|
1207
|
-
setAttribute,
|
|
1208
|
-
removeAttribute
|
|
1209
|
-
} = renderer;
|
|
1210
1429
|
|
|
1211
1430
|
if (oldVnode.data.style === newStyle) {
|
|
1212
1431
|
return;
|
|
1213
1432
|
}
|
|
1214
1433
|
|
|
1215
1434
|
if (!isString(newStyle) || newStyle === '') {
|
|
1216
|
-
removeAttribute(elm, 'style');
|
|
1435
|
+
removeAttribute$1(elm, 'style');
|
|
1217
1436
|
} else {
|
|
1218
|
-
setAttribute(elm, 'style', newStyle);
|
|
1437
|
+
setAttribute$1(elm, 'style', newStyle);
|
|
1219
1438
|
}
|
|
1220
1439
|
}
|
|
1221
1440
|
|
|
@@ -1240,9 +1459,6 @@
|
|
|
1240
1459
|
elm,
|
|
1241
1460
|
data: {
|
|
1242
1461
|
classMap
|
|
1243
|
-
},
|
|
1244
|
-
owner: {
|
|
1245
|
-
renderer
|
|
1246
1462
|
}
|
|
1247
1463
|
} = vnode;
|
|
1248
1464
|
|
|
@@ -1250,7 +1466,7 @@
|
|
|
1250
1466
|
return;
|
|
1251
1467
|
}
|
|
1252
1468
|
|
|
1253
|
-
const classList =
|
|
1469
|
+
const classList = getClassList$1(elm);
|
|
1254
1470
|
|
|
1255
1471
|
for (const name in classMap) {
|
|
1256
1472
|
classList.add(name);
|
|
@@ -1274,9 +1490,6 @@
|
|
|
1274
1490
|
elm,
|
|
1275
1491
|
data: {
|
|
1276
1492
|
styleDecls
|
|
1277
|
-
},
|
|
1278
|
-
owner: {
|
|
1279
|
-
renderer
|
|
1280
1493
|
}
|
|
1281
1494
|
} = vnode;
|
|
1282
1495
|
|
|
@@ -1286,7 +1499,7 @@
|
|
|
1286
1499
|
|
|
1287
1500
|
for (let i = 0; i < styleDecls.length; i++) {
|
|
1288
1501
|
const [prop, value, important] = styleDecls[i];
|
|
1289
|
-
|
|
1502
|
+
setCSSStyleProperty$1(elm, prop, value, important);
|
|
1290
1503
|
}
|
|
1291
1504
|
}
|
|
1292
1505
|
|
|
@@ -1300,15 +1513,6 @@
|
|
|
1300
1513
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
1301
1514
|
*/
|
|
1302
1515
|
|
|
1303
|
-
/**
|
|
1304
|
-
@license
|
|
1305
|
-
Copyright (c) 2015 Simon Friis Vindum.
|
|
1306
|
-
This code may only be used under the MIT License found at
|
|
1307
|
-
https://github.com/snabbdom/snabbdom/blob/master/LICENSE
|
|
1308
|
-
Code distributed by Snabbdom as part of the Snabbdom project at
|
|
1309
|
-
https://github.com/snabbdom/snabbdom/
|
|
1310
|
-
*/
|
|
1311
|
-
|
|
1312
1516
|
function isUndef(s) {
|
|
1313
1517
|
return s === undefined;
|
|
1314
1518
|
}
|
|
@@ -1396,7 +1600,7 @@
|
|
|
1396
1600
|
} else if (sameVnode(oldStartVnode, newEndVnode)) {
|
|
1397
1601
|
// Vnode moved right
|
|
1398
1602
|
patchVnode(oldStartVnode, newEndVnode);
|
|
1399
|
-
newEndVnode.hook.move(oldStartVnode, parentElm,
|
|
1603
|
+
newEndVnode.hook.move(oldStartVnode, parentElm, nextSibling$1(oldEndVnode.elm));
|
|
1400
1604
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
1401
1605
|
newEndVnode = newCh[--newEndIdx];
|
|
1402
1606
|
} else if (sameVnode(oldEndVnode, newStartVnode)) {
|
|
@@ -1878,7 +2082,7 @@
|
|
|
1878
2082
|
defineProperties(proto, getLightningElementPrototypeRestrictionsDescriptors(proto));
|
|
1879
2083
|
}
|
|
1880
2084
|
/*
|
|
1881
|
-
* Copyright (c)
|
|
2085
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
1882
2086
|
* All rights reserved.
|
|
1883
2087
|
* SPDX-License-Identifier: MIT
|
|
1884
2088
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
@@ -2798,9 +3002,7 @@
|
|
|
2798
3002
|
|
|
2799
3003
|
|
|
2800
3004
|
const LightningElement = function () {
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
3005
|
+
// This should be as performant as possible, while any initialization should be done lazily
|
|
2804
3006
|
if (isNull(vmBeingConstructed)) {
|
|
2805
3007
|
throw new ReferenceError('Illegal constructor');
|
|
2806
3008
|
}
|
|
@@ -2808,15 +3010,14 @@
|
|
|
2808
3010
|
const vm = vmBeingConstructed;
|
|
2809
3011
|
const {
|
|
2810
3012
|
def,
|
|
2811
|
-
elm
|
|
2812
|
-
renderer
|
|
3013
|
+
elm
|
|
2813
3014
|
} = vm;
|
|
2814
3015
|
const {
|
|
2815
3016
|
bridge
|
|
2816
3017
|
} = def;
|
|
2817
3018
|
|
|
2818
3019
|
if (process.env.NODE_ENV !== 'production') {
|
|
2819
|
-
|
|
3020
|
+
assertInstanceOfHTMLElement$1(vm.elm, `Component creation requires a DOM element to be associated to ${vm}.`);
|
|
2820
3021
|
}
|
|
2821
3022
|
|
|
2822
3023
|
const component = this;
|
|
@@ -2846,7 +3047,7 @@
|
|
|
2846
3047
|
if (vm.renderMode === 1
|
|
2847
3048
|
/* Shadow */
|
|
2848
3049
|
) {
|
|
2849
|
-
|
|
3050
|
+
doAttachShadow(vm);
|
|
2850
3051
|
} // Adding extra guard rails in DEV mode.
|
|
2851
3052
|
|
|
2852
3053
|
|
|
@@ -2858,17 +3059,16 @@
|
|
|
2858
3059
|
return this;
|
|
2859
3060
|
};
|
|
2860
3061
|
|
|
2861
|
-
function
|
|
3062
|
+
function doAttachShadow(vm) {
|
|
2862
3063
|
const {
|
|
2863
3064
|
elm,
|
|
2864
3065
|
mode,
|
|
2865
|
-
renderer,
|
|
2866
3066
|
shadowMode,
|
|
2867
3067
|
def: {
|
|
2868
3068
|
ctor
|
|
2869
3069
|
}
|
|
2870
3070
|
} = vm;
|
|
2871
|
-
const cmpRoot =
|
|
3071
|
+
const cmpRoot = attachShadow$1(elm, {
|
|
2872
3072
|
[KEY__SYNTHETIC_MODE]: shadowMode === 1
|
|
2873
3073
|
/* Synthetic */
|
|
2874
3074
|
,
|
|
@@ -2895,21 +3095,15 @@
|
|
|
2895
3095
|
|
|
2896
3096
|
dispatchEvent(event) {
|
|
2897
3097
|
const {
|
|
2898
|
-
elm
|
|
2899
|
-
renderer: {
|
|
2900
|
-
dispatchEvent
|
|
2901
|
-
}
|
|
3098
|
+
elm
|
|
2902
3099
|
} = getAssociatedVM(this);
|
|
2903
|
-
return dispatchEvent(elm, event);
|
|
3100
|
+
return dispatchEvent$1(elm, event);
|
|
2904
3101
|
},
|
|
2905
3102
|
|
|
2906
3103
|
addEventListener(type, listener, options) {
|
|
2907
3104
|
const vm = getAssociatedVM(this);
|
|
2908
3105
|
const {
|
|
2909
|
-
elm
|
|
2910
|
-
renderer: {
|
|
2911
|
-
addEventListener
|
|
2912
|
-
}
|
|
3106
|
+
elm
|
|
2913
3107
|
} = vm;
|
|
2914
3108
|
|
|
2915
3109
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2920,92 +3114,68 @@
|
|
|
2920
3114
|
}
|
|
2921
3115
|
|
|
2922
3116
|
const wrappedListener = getWrappedComponentsListener(vm, listener);
|
|
2923
|
-
addEventListener(elm, type, wrappedListener, options);
|
|
3117
|
+
addEventListener$1(elm, type, wrappedListener, options);
|
|
2924
3118
|
},
|
|
2925
3119
|
|
|
2926
3120
|
removeEventListener(type, listener, options) {
|
|
2927
3121
|
const vm = getAssociatedVM(this);
|
|
2928
3122
|
const {
|
|
2929
|
-
elm
|
|
2930
|
-
renderer: {
|
|
2931
|
-
removeEventListener
|
|
2932
|
-
}
|
|
3123
|
+
elm
|
|
2933
3124
|
} = vm;
|
|
2934
3125
|
const wrappedListener = getWrappedComponentsListener(vm, listener);
|
|
2935
|
-
removeEventListener(elm, type, wrappedListener, options);
|
|
3126
|
+
removeEventListener$1(elm, type, wrappedListener, options);
|
|
2936
3127
|
},
|
|
2937
3128
|
|
|
2938
3129
|
hasAttribute(name) {
|
|
2939
3130
|
const {
|
|
2940
|
-
elm
|
|
2941
|
-
renderer: {
|
|
2942
|
-
getAttribute
|
|
2943
|
-
}
|
|
3131
|
+
elm
|
|
2944
3132
|
} = getAssociatedVM(this);
|
|
2945
|
-
return !isNull(getAttribute(elm, name));
|
|
3133
|
+
return !isNull(getAttribute$1(elm, name));
|
|
2946
3134
|
},
|
|
2947
3135
|
|
|
2948
3136
|
hasAttributeNS(namespace, name) {
|
|
2949
3137
|
const {
|
|
2950
|
-
elm
|
|
2951
|
-
renderer: {
|
|
2952
|
-
getAttribute
|
|
2953
|
-
}
|
|
3138
|
+
elm
|
|
2954
3139
|
} = getAssociatedVM(this);
|
|
2955
|
-
return !isNull(getAttribute(elm, name, namespace));
|
|
3140
|
+
return !isNull(getAttribute$1(elm, name, namespace));
|
|
2956
3141
|
},
|
|
2957
3142
|
|
|
2958
3143
|
removeAttribute(name) {
|
|
2959
3144
|
const {
|
|
2960
|
-
elm
|
|
2961
|
-
renderer: {
|
|
2962
|
-
removeAttribute
|
|
2963
|
-
}
|
|
3145
|
+
elm
|
|
2964
3146
|
} = getAssociatedVM(this);
|
|
2965
3147
|
unlockAttribute(elm, name);
|
|
2966
|
-
removeAttribute(elm, name);
|
|
3148
|
+
removeAttribute$1(elm, name);
|
|
2967
3149
|
lockAttribute();
|
|
2968
3150
|
},
|
|
2969
3151
|
|
|
2970
3152
|
removeAttributeNS(namespace, name) {
|
|
2971
3153
|
const {
|
|
2972
|
-
elm
|
|
2973
|
-
renderer: {
|
|
2974
|
-
removeAttribute
|
|
2975
|
-
}
|
|
3154
|
+
elm
|
|
2976
3155
|
} = getAssociatedVM(this);
|
|
2977
3156
|
unlockAttribute(elm, name);
|
|
2978
|
-
removeAttribute(elm, name, namespace);
|
|
3157
|
+
removeAttribute$1(elm, name, namespace);
|
|
2979
3158
|
lockAttribute();
|
|
2980
3159
|
},
|
|
2981
3160
|
|
|
2982
3161
|
getAttribute(name) {
|
|
2983
3162
|
const {
|
|
2984
|
-
elm
|
|
2985
|
-
renderer: {
|
|
2986
|
-
getAttribute
|
|
2987
|
-
}
|
|
3163
|
+
elm
|
|
2988
3164
|
} = getAssociatedVM(this);
|
|
2989
|
-
return getAttribute(elm, name);
|
|
3165
|
+
return getAttribute$1(elm, name);
|
|
2990
3166
|
},
|
|
2991
3167
|
|
|
2992
3168
|
getAttributeNS(namespace, name) {
|
|
2993
3169
|
const {
|
|
2994
|
-
elm
|
|
2995
|
-
renderer: {
|
|
2996
|
-
getAttribute
|
|
2997
|
-
}
|
|
3170
|
+
elm
|
|
2998
3171
|
} = getAssociatedVM(this);
|
|
2999
|
-
return getAttribute(elm, name, namespace);
|
|
3172
|
+
return getAttribute$1(elm, name, namespace);
|
|
3000
3173
|
},
|
|
3001
3174
|
|
|
3002
3175
|
setAttribute(name, value) {
|
|
3003
3176
|
const vm = getAssociatedVM(this);
|
|
3004
3177
|
const {
|
|
3005
|
-
elm
|
|
3006
|
-
renderer: {
|
|
3007
|
-
setAttribute
|
|
3008
|
-
}
|
|
3178
|
+
elm
|
|
3009
3179
|
} = vm;
|
|
3010
3180
|
|
|
3011
3181
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3013,17 +3183,14 @@
|
|
|
3013
3183
|
}
|
|
3014
3184
|
|
|
3015
3185
|
unlockAttribute(elm, name);
|
|
3016
|
-
setAttribute(elm, name, value);
|
|
3186
|
+
setAttribute$1(elm, name, value);
|
|
3017
3187
|
lockAttribute();
|
|
3018
3188
|
},
|
|
3019
3189
|
|
|
3020
3190
|
setAttributeNS(namespace, name, value) {
|
|
3021
3191
|
const vm = getAssociatedVM(this);
|
|
3022
3192
|
const {
|
|
3023
|
-
elm
|
|
3024
|
-
renderer: {
|
|
3025
|
-
setAttribute
|
|
3026
|
-
}
|
|
3193
|
+
elm
|
|
3027
3194
|
} = vm;
|
|
3028
3195
|
|
|
3029
3196
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3031,43 +3198,34 @@
|
|
|
3031
3198
|
}
|
|
3032
3199
|
|
|
3033
3200
|
unlockAttribute(elm, name);
|
|
3034
|
-
setAttribute(elm, name, value, namespace);
|
|
3201
|
+
setAttribute$1(elm, name, value, namespace);
|
|
3035
3202
|
lockAttribute();
|
|
3036
3203
|
},
|
|
3037
3204
|
|
|
3038
3205
|
getBoundingClientRect() {
|
|
3039
3206
|
const vm = getAssociatedVM(this);
|
|
3040
3207
|
const {
|
|
3041
|
-
elm
|
|
3042
|
-
renderer: {
|
|
3043
|
-
getBoundingClientRect
|
|
3044
|
-
}
|
|
3208
|
+
elm
|
|
3045
3209
|
} = vm;
|
|
3046
3210
|
|
|
3047
3211
|
if (process.env.NODE_ENV !== 'production') {
|
|
3048
3212
|
warnIfInvokedDuringConstruction(vm, 'getBoundingClientRect()');
|
|
3049
3213
|
}
|
|
3050
3214
|
|
|
3051
|
-
return getBoundingClientRect(elm);
|
|
3215
|
+
return getBoundingClientRect$1(elm);
|
|
3052
3216
|
},
|
|
3053
3217
|
|
|
3054
3218
|
get isConnected() {
|
|
3055
3219
|
const {
|
|
3056
|
-
elm
|
|
3057
|
-
renderer: {
|
|
3058
|
-
isConnected
|
|
3059
|
-
}
|
|
3220
|
+
elm
|
|
3060
3221
|
} = getAssociatedVM(this);
|
|
3061
|
-
return isConnected(elm);
|
|
3222
|
+
return isConnected$1(elm);
|
|
3062
3223
|
},
|
|
3063
3224
|
|
|
3064
3225
|
get classList() {
|
|
3065
3226
|
const vm = getAssociatedVM(this);
|
|
3066
3227
|
const {
|
|
3067
|
-
elm
|
|
3068
|
-
renderer: {
|
|
3069
|
-
getClassList
|
|
3070
|
-
}
|
|
3228
|
+
elm
|
|
3071
3229
|
} = vm;
|
|
3072
3230
|
|
|
3073
3231
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3076,7 +3234,7 @@
|
|
|
3076
3234
|
assert.isFalse(isBeingConstructed(vm), `Failed to construct ${vm}: The result must not have attributes. Adding or tampering with classname in constructor is not allowed in a web component, use connectedCallback() instead.`);
|
|
3077
3235
|
}
|
|
3078
3236
|
|
|
3079
|
-
return getClassList(elm);
|
|
3237
|
+
return getClassList$1(elm);
|
|
3080
3238
|
},
|
|
3081
3239
|
|
|
3082
3240
|
get template() {
|
|
@@ -3110,23 +3268,48 @@
|
|
|
3110
3268
|
}
|
|
3111
3269
|
|
|
3112
3270
|
};
|
|
3113
|
-
const queryAndChildGetterDescriptors = create(null);
|
|
3114
|
-
|
|
3271
|
+
const queryAndChildGetterDescriptors = create(null); // The reason we don't just call `import * as renderer from '../renderer'` here is that the bundle size
|
|
3272
|
+
// is smaller if we reference each function individually. Otherwise Rollup will create one big frozen
|
|
3273
|
+
// object representing the renderer, with a lot of methods we don't actually need.
|
|
3274
|
+
|
|
3275
|
+
const childGetters = ['children', 'childNodes', 'firstChild', 'firstElementChild', 'lastChild', 'lastElementChild'];
|
|
3276
|
+
|
|
3277
|
+
function getChildGetter(methodName) {
|
|
3278
|
+
switch (methodName) {
|
|
3279
|
+
case 'children':
|
|
3280
|
+
return getChildren$1;
|
|
3281
|
+
|
|
3282
|
+
case 'childNodes':
|
|
3283
|
+
return getChildNodes$1;
|
|
3284
|
+
|
|
3285
|
+
case 'firstChild':
|
|
3286
|
+
return getFirstChild$1;
|
|
3115
3287
|
|
|
3116
|
-
|
|
3117
|
-
|
|
3288
|
+
case 'firstElementChild':
|
|
3289
|
+
return getFirstElementChild$1;
|
|
3290
|
+
|
|
3291
|
+
case 'lastChild':
|
|
3292
|
+
return getLastChild$1;
|
|
3293
|
+
|
|
3294
|
+
case 'lastElementChild':
|
|
3295
|
+
return getLastElementChild$1;
|
|
3296
|
+
}
|
|
3297
|
+
} // Generic passthrough for child getters on HTMLElement to the relevant Renderer APIs
|
|
3298
|
+
|
|
3299
|
+
|
|
3300
|
+
for (const childGetter of childGetters) {
|
|
3301
|
+
queryAndChildGetterDescriptors[childGetter] = {
|
|
3118
3302
|
get() {
|
|
3119
3303
|
const vm = getAssociatedVM(this);
|
|
3120
3304
|
const {
|
|
3121
|
-
elm
|
|
3122
|
-
renderer
|
|
3305
|
+
elm
|
|
3123
3306
|
} = vm;
|
|
3124
3307
|
|
|
3125
3308
|
if (process.env.NODE_ENV !== 'production') {
|
|
3126
|
-
warnIfInvokedDuringConstruction(vm,
|
|
3309
|
+
warnIfInvokedDuringConstruction(vm, childGetter);
|
|
3127
3310
|
}
|
|
3128
3311
|
|
|
3129
|
-
return
|
|
3312
|
+
return getChildGetter(childGetter)(elm);
|
|
3130
3313
|
},
|
|
3131
3314
|
|
|
3132
3315
|
configurable: true,
|
|
@@ -3134,22 +3317,38 @@
|
|
|
3134
3317
|
};
|
|
3135
3318
|
}
|
|
3136
3319
|
|
|
3137
|
-
const queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll'];
|
|
3320
|
+
const queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll'];
|
|
3321
|
+
|
|
3322
|
+
function getQueryMethod(methodName) {
|
|
3323
|
+
switch (methodName) {
|
|
3324
|
+
case 'getElementsByClassName':
|
|
3325
|
+
return getElementsByClassName$1;
|
|
3326
|
+
|
|
3327
|
+
case 'getElementsByTagName':
|
|
3328
|
+
return getElementsByTagName$1;
|
|
3329
|
+
|
|
3330
|
+
case 'querySelector':
|
|
3331
|
+
return querySelector$1;
|
|
3332
|
+
|
|
3333
|
+
case 'querySelectorAll':
|
|
3334
|
+
return querySelectorAll$1;
|
|
3335
|
+
}
|
|
3336
|
+
} // Generic passthrough for query APIs on HTMLElement to the relevant Renderer APIs
|
|
3337
|
+
|
|
3138
3338
|
|
|
3139
3339
|
for (const queryMethod of queryMethods) {
|
|
3140
3340
|
queryAndChildGetterDescriptors[queryMethod] = {
|
|
3141
3341
|
value(arg) {
|
|
3142
3342
|
const vm = getAssociatedVM(this);
|
|
3143
3343
|
const {
|
|
3144
|
-
elm
|
|
3145
|
-
renderer
|
|
3344
|
+
elm
|
|
3146
3345
|
} = vm;
|
|
3147
3346
|
|
|
3148
3347
|
if (process.env.NODE_ENV !== 'production') {
|
|
3149
3348
|
warnIfInvokedDuringConstruction(vm, `${queryMethod}()`);
|
|
3150
3349
|
}
|
|
3151
3350
|
|
|
3152
|
-
return
|
|
3351
|
+
return getQueryMethod(queryMethod)(elm, arg);
|
|
3153
3352
|
},
|
|
3154
3353
|
|
|
3155
3354
|
configurable: true,
|
|
@@ -4305,10 +4504,6 @@
|
|
|
4305
4504
|
|
|
4306
4505
|
assert.isTrue(Ctor.constructor, `Missing ${ctorName}.constructor, ${ctorName} should have a "constructor" property.`);
|
|
4307
4506
|
|
|
4308
|
-
if (!runtimeFlags.ENABLE_MIXED_SHADOW_MODE) {
|
|
4309
|
-
assert.isFalse('shadowSupportMode' in Ctor, `${ctorName || 'Anonymous class'} is an invalid LWC component. The shadowSupportMode static property is not available in this environment.`);
|
|
4310
|
-
}
|
|
4311
|
-
|
|
4312
4507
|
if (!isUndefined$1(ctorShadowSupportMode)) {
|
|
4313
4508
|
assert.invariant(ctorShadowSupportMode === "any"
|
|
4314
4509
|
/* Any */
|
|
@@ -4552,17 +4747,14 @@
|
|
|
4552
4747
|
const token = cmpTemplate === null || cmpTemplate === void 0 ? void 0 : cmpTemplate.stylesheetToken;
|
|
4553
4748
|
|
|
4554
4749
|
if (!isUndefined$1(token) && context.hasScopedStyles) {
|
|
4555
|
-
|
|
4750
|
+
getClassList$1(elm).add(token);
|
|
4556
4751
|
}
|
|
4557
4752
|
}
|
|
4558
4753
|
|
|
4559
4754
|
function updateNodeHook(oldVnode, vnode) {
|
|
4560
4755
|
const {
|
|
4561
4756
|
elm,
|
|
4562
|
-
text
|
|
4563
|
-
owner: {
|
|
4564
|
-
renderer
|
|
4565
|
-
}
|
|
4757
|
+
text
|
|
4566
4758
|
} = vnode;
|
|
4567
4759
|
|
|
4568
4760
|
if (oldVnode.text !== text) {
|
|
@@ -4570,7 +4762,7 @@
|
|
|
4570
4762
|
unlockDomMutation();
|
|
4571
4763
|
}
|
|
4572
4764
|
|
|
4573
|
-
|
|
4765
|
+
setText$1(elm, text);
|
|
4574
4766
|
|
|
4575
4767
|
if (process.env.NODE_ENV !== 'production') {
|
|
4576
4768
|
lockDomMutation();
|
|
@@ -4579,15 +4771,11 @@
|
|
|
4579
4771
|
}
|
|
4580
4772
|
|
|
4581
4773
|
function insertNodeHook(vnode, parentNode, referenceNode) {
|
|
4582
|
-
const {
|
|
4583
|
-
renderer
|
|
4584
|
-
} = vnode.owner;
|
|
4585
|
-
|
|
4586
4774
|
if (process.env.NODE_ENV !== 'production') {
|
|
4587
4775
|
unlockDomMutation();
|
|
4588
4776
|
}
|
|
4589
4777
|
|
|
4590
|
-
|
|
4778
|
+
insert$1(vnode.elm, parentNode, referenceNode);
|
|
4591
4779
|
|
|
4592
4780
|
if (process.env.NODE_ENV !== 'production') {
|
|
4593
4781
|
lockDomMutation();
|
|
@@ -4595,15 +4783,11 @@
|
|
|
4595
4783
|
}
|
|
4596
4784
|
|
|
4597
4785
|
function removeNodeHook(vnode, parentNode) {
|
|
4598
|
-
const {
|
|
4599
|
-
renderer
|
|
4600
|
-
} = vnode.owner;
|
|
4601
|
-
|
|
4602
4786
|
if (process.env.NODE_ENV !== 'production') {
|
|
4603
4787
|
unlockDomMutation();
|
|
4604
4788
|
}
|
|
4605
4789
|
|
|
4606
|
-
|
|
4790
|
+
remove$1(vnode.elm, parentNode);
|
|
4607
4791
|
|
|
4608
4792
|
if (process.env.NODE_ENV !== 'production') {
|
|
4609
4793
|
lockDomMutation();
|
|
@@ -4769,8 +4953,7 @@
|
|
|
4769
4953
|
createVM(elm, def, {
|
|
4770
4954
|
mode,
|
|
4771
4955
|
owner,
|
|
4772
|
-
tagName: sel
|
|
4773
|
-
renderer: owner.renderer
|
|
4956
|
+
tagName: sel
|
|
4774
4957
|
});
|
|
4775
4958
|
|
|
4776
4959
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4816,16 +4999,13 @@
|
|
|
4816
4999
|
const {
|
|
4817
5000
|
data: {
|
|
4818
5001
|
attrs = {}
|
|
4819
|
-
},
|
|
4820
|
-
owner: {
|
|
4821
|
-
renderer
|
|
4822
5002
|
}
|
|
4823
5003
|
} = vnode;
|
|
4824
5004
|
let nodesAreCompatible = true; // Validate attributes, though we could always recovery from those by running the update mods.
|
|
4825
5005
|
// Note: intentionally ONLY matching vnodes.attrs to elm.attrs, in case SSR is adding extra attributes.
|
|
4826
5006
|
|
|
4827
5007
|
for (const [attrName, attrValue] of Object.entries(attrs)) {
|
|
4828
|
-
const elmAttrValue =
|
|
5008
|
+
const elmAttrValue = getAttribute$1(elm, attrName);
|
|
4829
5009
|
|
|
4830
5010
|
if (String(attrValue) !== elmAttrValue) {
|
|
4831
5011
|
logError(`Mismatch hydrating element <${elm.tagName.toLowerCase()}>: attribute "${attrName}" has different values, expected "${attrValue}" but found "${elmAttrValue}"`, vnode.owner);
|
|
@@ -4841,9 +5021,6 @@
|
|
|
4841
5021
|
data: {
|
|
4842
5022
|
className,
|
|
4843
5023
|
classMap
|
|
4844
|
-
},
|
|
4845
|
-
owner: {
|
|
4846
|
-
renderer
|
|
4847
5024
|
}
|
|
4848
5025
|
} = vnode;
|
|
4849
5026
|
let nodesAreCompatible = true;
|
|
@@ -4855,7 +5032,7 @@
|
|
|
4855
5032
|
vnodeClassName = className;
|
|
4856
5033
|
} else if (!isUndefined$1(classMap)) {
|
|
4857
5034
|
// classMap is used when class is set to static value.
|
|
4858
|
-
const classList =
|
|
5035
|
+
const classList = getClassList$1(elm);
|
|
4859
5036
|
let computedClassName = ''; // all classes from the vnode should be in the element.classList
|
|
4860
5037
|
|
|
4861
5038
|
for (const name in classMap) {
|
|
@@ -4885,12 +5062,9 @@
|
|
|
4885
5062
|
data: {
|
|
4886
5063
|
style,
|
|
4887
5064
|
styleDecls
|
|
4888
|
-
},
|
|
4889
|
-
owner: {
|
|
4890
|
-
renderer
|
|
4891
5065
|
}
|
|
4892
5066
|
} = vnode;
|
|
4893
|
-
const elmStyle =
|
|
5067
|
+
const elmStyle = getAttribute$1(elm, 'style') || '';
|
|
4894
5068
|
let vnodeStyle;
|
|
4895
5069
|
let nodesAreCompatible = true;
|
|
4896
5070
|
|
|
@@ -5027,12 +5201,12 @@
|
|
|
5027
5201
|
*/
|
|
5028
5202
|
|
|
5029
5203
|
|
|
5030
|
-
function getUpgradableConstructor(tagName
|
|
5204
|
+
function getUpgradableConstructor(tagName) {
|
|
5031
5205
|
// Should never get a tag with upper case letter at this point, the compiler should
|
|
5032
5206
|
// produce only tags with lowercase letters
|
|
5033
5207
|
// But, for backwards compatibility, we will lower case the tagName
|
|
5034
5208
|
tagName = tagName.toLowerCase();
|
|
5035
|
-
let CE =
|
|
5209
|
+
let CE = getCustomElement$1(tagName);
|
|
5036
5210
|
|
|
5037
5211
|
if (!isUndefined$1(CE)) {
|
|
5038
5212
|
return CE;
|
|
@@ -5043,7 +5217,7 @@
|
|
|
5043
5217
|
*/
|
|
5044
5218
|
|
|
5045
5219
|
|
|
5046
|
-
CE = class LWCUpgradableElement extends
|
|
5220
|
+
CE = class LWCUpgradableElement extends HTMLElementExported$1 {
|
|
5047
5221
|
constructor(upgradeCallback) {
|
|
5048
5222
|
super();
|
|
5049
5223
|
|
|
@@ -5053,7 +5227,7 @@
|
|
|
5053
5227
|
}
|
|
5054
5228
|
|
|
5055
5229
|
};
|
|
5056
|
-
|
|
5230
|
+
defineCustomElement$1(tagName, CE);
|
|
5057
5231
|
return CE;
|
|
5058
5232
|
}
|
|
5059
5233
|
/*
|
|
@@ -5071,10 +5245,7 @@
|
|
|
5071
5245
|
const {
|
|
5072
5246
|
owner
|
|
5073
5247
|
} = vnode;
|
|
5074
|
-
const
|
|
5075
|
-
renderer
|
|
5076
|
-
} = owner;
|
|
5077
|
-
const elm = renderer.createText(vnode.text);
|
|
5248
|
+
const elm = createText$1(vnode.text);
|
|
5078
5249
|
linkNodeToShadow(elm, owner);
|
|
5079
5250
|
vnode.elm = elm;
|
|
5080
5251
|
},
|
|
@@ -5108,10 +5279,7 @@
|
|
|
5108
5279
|
owner,
|
|
5109
5280
|
text
|
|
5110
5281
|
} = vnode;
|
|
5111
|
-
const
|
|
5112
|
-
renderer
|
|
5113
|
-
} = owner;
|
|
5114
|
-
const elm = renderer.createComment(text);
|
|
5282
|
+
const elm = createComment$1(text);
|
|
5115
5283
|
linkNodeToShadow(elm, owner);
|
|
5116
5284
|
vnode.elm = elm;
|
|
5117
5285
|
},
|
|
@@ -5153,11 +5321,8 @@
|
|
|
5153
5321
|
svg
|
|
5154
5322
|
}
|
|
5155
5323
|
} = vnode;
|
|
5156
|
-
const {
|
|
5157
|
-
renderer
|
|
5158
|
-
} = owner;
|
|
5159
5324
|
const namespace = isTrue(svg) ? SVG_NAMESPACE : undefined;
|
|
5160
|
-
const elm =
|
|
5325
|
+
const elm = createElement$2(sel, namespace);
|
|
5161
5326
|
linkNodeToShadow(elm, owner);
|
|
5162
5327
|
fallbackElmHook(elm, vnode);
|
|
5163
5328
|
vnode.elm = elm;
|
|
@@ -5217,10 +5382,7 @@
|
|
|
5217
5382
|
sel,
|
|
5218
5383
|
owner
|
|
5219
5384
|
} = vnode;
|
|
5220
|
-
const
|
|
5221
|
-
renderer
|
|
5222
|
-
} = owner;
|
|
5223
|
-
const UpgradableConstructor = getUpgradableConstructor(sel, renderer);
|
|
5385
|
+
const UpgradableConstructor = getUpgradableConstructor(sel);
|
|
5224
5386
|
/**
|
|
5225
5387
|
* Note: if the upgradable constructor does not expect, or throw when we new it
|
|
5226
5388
|
* with a callback as the first argument, we could implement a more advanced
|
|
@@ -5313,8 +5475,7 @@
|
|
|
5313
5475
|
createVM(elm, def, {
|
|
5314
5476
|
mode,
|
|
5315
5477
|
owner,
|
|
5316
|
-
tagName: sel
|
|
5317
|
-
renderer: owner.renderer
|
|
5478
|
+
tagName: sel
|
|
5318
5479
|
});
|
|
5319
5480
|
vnode.elm = elm;
|
|
5320
5481
|
const vm = getAssociatedVM(elm);
|
|
@@ -5343,12 +5504,11 @@
|
|
|
5343
5504
|
|
|
5344
5505
|
function linkNodeToShadow(elm, owner) {
|
|
5345
5506
|
const {
|
|
5346
|
-
renderer,
|
|
5347
5507
|
renderMode,
|
|
5348
5508
|
shadowMode
|
|
5349
5509
|
} = owner; // TODO [#1164]: this should eventually be done by the polyfill directly
|
|
5350
5510
|
|
|
5351
|
-
if (
|
|
5511
|
+
if (isSyntheticShadowDefined$1) {
|
|
5352
5512
|
if (shadowMode === 1
|
|
5353
5513
|
/* Synthetic */
|
|
5354
5514
|
|| renderMode === 0
|
|
@@ -5880,7 +6040,6 @@
|
|
|
5880
6040
|
const {
|
|
5881
6041
|
elm,
|
|
5882
6042
|
context,
|
|
5883
|
-
renderer,
|
|
5884
6043
|
renderMode,
|
|
5885
6044
|
shadowMode
|
|
5886
6045
|
} = vm;
|
|
@@ -5907,11 +6066,11 @@
|
|
|
5907
6066
|
} = context;
|
|
5908
6067
|
|
|
5909
6068
|
if (oldHasTokenInClass) {
|
|
5910
|
-
|
|
6069
|
+
getClassList$1(elm).remove(makeHostToken(oldToken));
|
|
5911
6070
|
}
|
|
5912
6071
|
|
|
5913
6072
|
if (oldHasTokenInAttribute) {
|
|
5914
|
-
|
|
6073
|
+
removeAttribute$1(elm, makeHostToken(oldToken));
|
|
5915
6074
|
} // Apply the new template styling token to the host element, if the new template has any
|
|
5916
6075
|
// associated stylesheets. In the case of light DOM, also ensure there is at least one scoped stylesheet.
|
|
5917
6076
|
|
|
@@ -5923,12 +6082,12 @@
|
|
|
5923
6082
|
|
|
5924
6083
|
if (!isUndefined$1(newToken)) {
|
|
5925
6084
|
if (hasScopedStyles) {
|
|
5926
|
-
|
|
6085
|
+
getClassList$1(elm).add(makeHostToken(newToken));
|
|
5927
6086
|
newHasTokenInClass = true;
|
|
5928
6087
|
}
|
|
5929
6088
|
|
|
5930
6089
|
if (isSyntheticShadow) {
|
|
5931
|
-
|
|
6090
|
+
setAttribute$1(elm, makeHostToken(newToken), '');
|
|
5932
6091
|
newHasTokenInAttribute = true;
|
|
5933
6092
|
}
|
|
5934
6093
|
} // Update the styling tokens present on the context object.
|
|
@@ -6049,7 +6208,6 @@
|
|
|
6049
6208
|
|
|
6050
6209
|
function createStylesheet(vm, stylesheets) {
|
|
6051
6210
|
const {
|
|
6052
|
-
renderer,
|
|
6053
6211
|
renderMode,
|
|
6054
6212
|
shadowMode
|
|
6055
6213
|
} = vm;
|
|
@@ -6060,9 +6218,9 @@
|
|
|
6060
6218
|
/* Synthetic */
|
|
6061
6219
|
) {
|
|
6062
6220
|
for (let i = 0; i < stylesheets.length; i++) {
|
|
6063
|
-
|
|
6221
|
+
insertGlobalStylesheet$1(stylesheets[i]);
|
|
6064
6222
|
}
|
|
6065
|
-
} else if (
|
|
6223
|
+
} else if (ssr$1 || isHydrating$1()) {
|
|
6066
6224
|
// Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
|
|
6067
6225
|
// This works in the client, because the stylesheets are created, and cached in the VM
|
|
6068
6226
|
// the first time the VM renders.
|
|
@@ -6076,10 +6234,10 @@
|
|
|
6076
6234
|
|
|
6077
6235
|
for (let i = 0; i < stylesheets.length; i++) {
|
|
6078
6236
|
if (isGlobal) {
|
|
6079
|
-
|
|
6237
|
+
insertGlobalStylesheet$1(stylesheets[i]);
|
|
6080
6238
|
} else {
|
|
6081
6239
|
// local level
|
|
6082
|
-
|
|
6240
|
+
insertStylesheet$1(stylesheets[i], root.cmpRoot);
|
|
6083
6241
|
}
|
|
6084
6242
|
}
|
|
6085
6243
|
}
|
|
@@ -6771,7 +6929,6 @@
|
|
|
6771
6929
|
const {
|
|
6772
6930
|
mode,
|
|
6773
6931
|
owner,
|
|
6774
|
-
renderer,
|
|
6775
6932
|
tagName
|
|
6776
6933
|
} = options;
|
|
6777
6934
|
const vm = {
|
|
@@ -6786,7 +6943,6 @@
|
|
|
6786
6943
|
tagName,
|
|
6787
6944
|
mode,
|
|
6788
6945
|
owner,
|
|
6789
|
-
renderer,
|
|
6790
6946
|
children: EmptyArray,
|
|
6791
6947
|
aChildren: EmptyArray,
|
|
6792
6948
|
velements: EmptyArray,
|
|
@@ -6841,16 +6997,11 @@
|
|
|
6841
6997
|
|
|
6842
6998
|
function computeShadowMode(vm) {
|
|
6843
6999
|
const {
|
|
6844
|
-
def
|
|
6845
|
-
renderer
|
|
7000
|
+
def
|
|
6846
7001
|
} = vm;
|
|
6847
|
-
const {
|
|
6848
|
-
isNativeShadowDefined,
|
|
6849
|
-
isSyntheticShadowDefined
|
|
6850
|
-
} = renderer;
|
|
6851
7002
|
let shadowMode;
|
|
6852
7003
|
|
|
6853
|
-
if (isSyntheticShadowDefined) {
|
|
7004
|
+
if (isSyntheticShadowDefined$1) {
|
|
6854
7005
|
if (def.renderMode === 0
|
|
6855
7006
|
/* Light */
|
|
6856
7007
|
) {
|
|
@@ -6859,7 +7010,7 @@
|
|
|
6859
7010
|
shadowMode = 0
|
|
6860
7011
|
/* Native */
|
|
6861
7012
|
;
|
|
6862
|
-
} else if (isNativeShadowDefined) {
|
|
7013
|
+
} else if (isNativeShadowDefined$1) {
|
|
6863
7014
|
if (def.shadowSupportMode === "any"
|
|
6864
7015
|
/* Any */
|
|
6865
7016
|
) {
|
|
@@ -6999,13 +7150,12 @@
|
|
|
6999
7150
|
|
|
7000
7151
|
function runRenderedCallback(vm) {
|
|
7001
7152
|
const {
|
|
7002
|
-
renderer,
|
|
7003
7153
|
def: {
|
|
7004
7154
|
renderedCallback
|
|
7005
7155
|
}
|
|
7006
7156
|
} = vm;
|
|
7007
7157
|
|
|
7008
|
-
if (isTrue(
|
|
7158
|
+
if (isTrue(ssr$1)) {
|
|
7009
7159
|
return;
|
|
7010
7160
|
}
|
|
7011
7161
|
|
|
@@ -7231,8 +7381,7 @@
|
|
|
7231
7381
|
|
|
7232
7382
|
function resetComponentRoot(vm) {
|
|
7233
7383
|
const {
|
|
7234
|
-
children
|
|
7235
|
-
renderer
|
|
7384
|
+
children
|
|
7236
7385
|
} = vm;
|
|
7237
7386
|
const rootNode = getRenderRoot(vm);
|
|
7238
7387
|
|
|
@@ -7240,7 +7389,7 @@
|
|
|
7240
7389
|
const child = children[i];
|
|
7241
7390
|
|
|
7242
7391
|
if (!isNull(child) && !isUndefined$1(child.elm)) {
|
|
7243
|
-
|
|
7392
|
+
remove$1(child.elm, rootNode);
|
|
7244
7393
|
}
|
|
7245
7394
|
}
|
|
7246
7395
|
|
|
@@ -7250,7 +7399,7 @@
|
|
|
7250
7399
|
}
|
|
7251
7400
|
|
|
7252
7401
|
function scheduleRehydration(vm) {
|
|
7253
|
-
if (isTrue(
|
|
7402
|
+
if (isTrue(ssr$1) || isTrue(vm.isScheduled)) {
|
|
7254
7403
|
return;
|
|
7255
7404
|
}
|
|
7256
7405
|
|
|
@@ -7495,7 +7644,6 @@
|
|
|
7495
7644
|
|
|
7496
7645
|
const {
|
|
7497
7646
|
elm,
|
|
7498
|
-
renderer,
|
|
7499
7647
|
context: {
|
|
7500
7648
|
wiredConnecting,
|
|
7501
7649
|
wiredDisconnecting
|
|
@@ -7522,7 +7670,7 @@
|
|
|
7522
7670
|
}
|
|
7523
7671
|
|
|
7524
7672
|
});
|
|
7525
|
-
|
|
7673
|
+
dispatchEvent$1(elm, contextRegistrationEvent);
|
|
7526
7674
|
});
|
|
7527
7675
|
}
|
|
7528
7676
|
|
|
@@ -7787,7 +7935,7 @@
|
|
|
7787
7935
|
hooksAreSet = true;
|
|
7788
7936
|
setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
|
|
7789
7937
|
}
|
|
7790
|
-
/* version: 2.6.
|
|
7938
|
+
/* version: 2.6.3 */
|
|
7791
7939
|
|
|
7792
7940
|
/*
|
|
7793
7941
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -7816,7 +7964,9 @@
|
|
|
7816
7964
|
const styleElements = create(null);
|
|
7817
7965
|
const styleSheets = create(null);
|
|
7818
7966
|
const nodesToStyleSheets = new WeakMap();
|
|
7819
|
-
let getCustomElement
|
|
7967
|
+
let getCustomElement;
|
|
7968
|
+
let defineCustomElement;
|
|
7969
|
+
let HTMLElementConstructor;
|
|
7820
7970
|
|
|
7821
7971
|
function isCustomElementRegistryAvailable() {
|
|
7822
7972
|
if (typeof customElements === 'undefined') {
|
|
@@ -7931,188 +8081,231 @@
|
|
|
7931
8081
|
HTMLElementConstructor.prototype = HTMLElement.prototype;
|
|
7932
8082
|
}
|
|
7933
8083
|
|
|
7934
|
-
let
|
|
8084
|
+
let hydrating = false;
|
|
7935
8085
|
|
|
7936
|
-
function setIsHydrating(
|
|
7937
|
-
|
|
8086
|
+
function setIsHydrating(value) {
|
|
8087
|
+
hydrating = value;
|
|
7938
8088
|
}
|
|
7939
8089
|
|
|
7940
|
-
const
|
|
7941
|
-
ssr: false,
|
|
8090
|
+
const ssr = false;
|
|
7942
8091
|
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
8092
|
+
function isHydrating() {
|
|
8093
|
+
return hydrating;
|
|
8094
|
+
}
|
|
7946
8095
|
|
|
7947
|
-
|
|
7948
|
-
|
|
8096
|
+
const isNativeShadowDefined = _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED];
|
|
8097
|
+
const isSyntheticShadowDefined = hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN);
|
|
7949
8098
|
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
|
|
8099
|
+
function createElement$1(tagName, namespace) {
|
|
8100
|
+
return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
|
|
8101
|
+
}
|
|
7953
8102
|
|
|
7954
|
-
|
|
7955
|
-
|
|
7956
|
-
|
|
8103
|
+
function createText(content) {
|
|
8104
|
+
return document.createTextNode(content);
|
|
8105
|
+
}
|
|
7957
8106
|
|
|
7958
|
-
|
|
7959
|
-
|
|
7960
|
-
|
|
8107
|
+
function createComment(content) {
|
|
8108
|
+
return document.createComment(content);
|
|
8109
|
+
}
|
|
7961
8110
|
|
|
7962
|
-
|
|
7963
|
-
|
|
7964
|
-
|
|
8111
|
+
function insert(node, parent, anchor) {
|
|
8112
|
+
parent.insertBefore(node, anchor);
|
|
8113
|
+
}
|
|
7965
8114
|
|
|
7966
|
-
|
|
7967
|
-
|
|
7968
|
-
|
|
8115
|
+
function remove(node, parent) {
|
|
8116
|
+
parent.removeChild(node);
|
|
8117
|
+
}
|
|
7969
8118
|
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
8119
|
+
function nextSibling(node) {
|
|
8120
|
+
return node.nextSibling;
|
|
8121
|
+
}
|
|
7973
8122
|
|
|
7974
|
-
|
|
7975
|
-
|
|
7976
|
-
|
|
7977
|
-
|
|
8123
|
+
function attachShadow(element, options) {
|
|
8124
|
+
if (hydrating) {
|
|
8125
|
+
return element.shadowRoot;
|
|
8126
|
+
}
|
|
7978
8127
|
|
|
7979
|
-
|
|
7980
|
-
|
|
8128
|
+
return element.attachShadow(options);
|
|
8129
|
+
}
|
|
7981
8130
|
|
|
7982
|
-
|
|
7983
|
-
|
|
7984
|
-
|
|
8131
|
+
function setText(node, content) {
|
|
8132
|
+
node.nodeValue = content;
|
|
8133
|
+
}
|
|
7985
8134
|
|
|
7986
|
-
|
|
7987
|
-
|
|
7988
|
-
|
|
8135
|
+
function getProperty(node, key) {
|
|
8136
|
+
return node[key];
|
|
8137
|
+
}
|
|
7989
8138
|
|
|
7990
|
-
|
|
7991
|
-
|
|
7992
|
-
|
|
7993
|
-
|
|
7994
|
-
|
|
7995
|
-
}
|
|
8139
|
+
function setProperty(node, key, value) {
|
|
8140
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
8141
|
+
if (node instanceof Element && !(key in node)) {
|
|
8142
|
+
// TODO [#1297]: Move this validation to the compiler
|
|
8143
|
+
assert.fail(`Unknown public property "${key}" of element <${node.tagName}>. This is likely a typo on the corresponding attribute "${htmlPropertyToAttribute(key)}".`);
|
|
7996
8144
|
}
|
|
8145
|
+
}
|
|
7997
8146
|
|
|
7998
|
-
|
|
7999
|
-
|
|
8147
|
+
node[key] = value;
|
|
8148
|
+
}
|
|
8000
8149
|
|
|
8001
|
-
|
|
8002
|
-
|
|
8003
|
-
|
|
8150
|
+
function getAttribute(element, name, namespace) {
|
|
8151
|
+
return isUndefined$1(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
|
|
8152
|
+
}
|
|
8004
8153
|
|
|
8005
|
-
|
|
8006
|
-
|
|
8007
|
-
|
|
8154
|
+
function setAttribute(element, name, value, namespace) {
|
|
8155
|
+
return isUndefined$1(namespace) ? element.setAttribute(name, value) : element.setAttributeNS(namespace, name, value);
|
|
8156
|
+
}
|
|
8008
8157
|
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8158
|
+
function removeAttribute(element, name, namespace) {
|
|
8159
|
+
if (isUndefined$1(namespace)) {
|
|
8160
|
+
element.removeAttribute(name);
|
|
8161
|
+
} else {
|
|
8162
|
+
element.removeAttributeNS(namespace, name);
|
|
8163
|
+
}
|
|
8164
|
+
}
|
|
8016
8165
|
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8166
|
+
function addEventListener(target, type, callback, options) {
|
|
8167
|
+
target.addEventListener(type, callback, options);
|
|
8168
|
+
}
|
|
8020
8169
|
|
|
8021
|
-
|
|
8022
|
-
|
|
8023
|
-
|
|
8170
|
+
function removeEventListener(target, type, callback, options) {
|
|
8171
|
+
target.removeEventListener(type, callback, options);
|
|
8172
|
+
}
|
|
8024
8173
|
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
|
|
8174
|
+
function dispatchEvent(target, event) {
|
|
8175
|
+
return target.dispatchEvent(event);
|
|
8176
|
+
}
|
|
8028
8177
|
|
|
8029
|
-
|
|
8030
|
-
|
|
8031
|
-
|
|
8178
|
+
function getClassList(element) {
|
|
8179
|
+
return element.classList;
|
|
8180
|
+
}
|
|
8032
8181
|
|
|
8033
|
-
|
|
8034
|
-
|
|
8035
|
-
|
|
8036
|
-
|
|
8037
|
-
|
|
8182
|
+
function setCSSStyleProperty(element, name, value, important) {
|
|
8183
|
+
// TODO [#0]: How to avoid this type casting? Shall we use a different type interface to
|
|
8184
|
+
// represent elements in the engine?
|
|
8185
|
+
element.style.setProperty(name, value, important ? 'important' : '');
|
|
8186
|
+
}
|
|
8038
8187
|
|
|
8039
|
-
|
|
8040
|
-
|
|
8041
|
-
|
|
8188
|
+
function getBoundingClientRect(element) {
|
|
8189
|
+
return element.getBoundingClientRect();
|
|
8190
|
+
}
|
|
8042
8191
|
|
|
8043
|
-
|
|
8044
|
-
|
|
8045
|
-
|
|
8192
|
+
function querySelector(element, selectors) {
|
|
8193
|
+
return element.querySelector(selectors);
|
|
8194
|
+
}
|
|
8046
8195
|
|
|
8047
|
-
|
|
8048
|
-
|
|
8049
|
-
|
|
8196
|
+
function querySelectorAll(element, selectors) {
|
|
8197
|
+
return element.querySelectorAll(selectors);
|
|
8198
|
+
}
|
|
8050
8199
|
|
|
8051
|
-
|
|
8052
|
-
|
|
8053
|
-
|
|
8200
|
+
function getElementsByTagName(element, tagNameOrWildCard) {
|
|
8201
|
+
return element.getElementsByTagName(tagNameOrWildCard);
|
|
8202
|
+
}
|
|
8054
8203
|
|
|
8055
|
-
|
|
8056
|
-
|
|
8057
|
-
|
|
8204
|
+
function getElementsByClassName(element, names) {
|
|
8205
|
+
return element.getElementsByClassName(names);
|
|
8206
|
+
}
|
|
8058
8207
|
|
|
8059
|
-
|
|
8060
|
-
|
|
8061
|
-
|
|
8208
|
+
function getChildren(element) {
|
|
8209
|
+
return element.children;
|
|
8210
|
+
}
|
|
8062
8211
|
|
|
8063
|
-
|
|
8064
|
-
|
|
8065
|
-
|
|
8212
|
+
function getChildNodes(element) {
|
|
8213
|
+
return element.childNodes;
|
|
8214
|
+
}
|
|
8066
8215
|
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
|
|
8216
|
+
function getFirstChild(element) {
|
|
8217
|
+
return element.firstChild;
|
|
8218
|
+
}
|
|
8070
8219
|
|
|
8071
|
-
|
|
8072
|
-
|
|
8073
|
-
|
|
8220
|
+
function getFirstElementChild(element) {
|
|
8221
|
+
return element.firstElementChild;
|
|
8222
|
+
}
|
|
8074
8223
|
|
|
8075
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8224
|
+
function getLastChild(element) {
|
|
8225
|
+
return element.lastChild;
|
|
8226
|
+
}
|
|
8078
8227
|
|
|
8079
|
-
|
|
8080
|
-
|
|
8081
|
-
|
|
8228
|
+
function getLastElementChild(element) {
|
|
8229
|
+
return element.lastElementChild;
|
|
8230
|
+
}
|
|
8082
8231
|
|
|
8083
|
-
|
|
8084
|
-
|
|
8085
|
-
|
|
8232
|
+
function isConnected(node) {
|
|
8233
|
+
return node.isConnected;
|
|
8234
|
+
}
|
|
8086
8235
|
|
|
8087
|
-
|
|
8088
|
-
|
|
8089
|
-
|
|
8090
|
-
|
|
8236
|
+
function insertGlobalStylesheet(content) {
|
|
8237
|
+
if (!isUndefined$1(globalStylesheets[content])) {
|
|
8238
|
+
return;
|
|
8239
|
+
}
|
|
8091
8240
|
|
|
8092
|
-
|
|
8093
|
-
|
|
8094
|
-
|
|
8095
|
-
|
|
8096
|
-
|
|
8097
|
-
|
|
8241
|
+
globalStylesheets[content] = true;
|
|
8242
|
+
const elm = document.createElement('style');
|
|
8243
|
+
elm.type = 'text/css';
|
|
8244
|
+
elm.textContent = content;
|
|
8245
|
+
globalStylesheetsParentElement.appendChild(elm);
|
|
8246
|
+
}
|
|
8098
8247
|
|
|
8099
|
-
|
|
8100
|
-
|
|
8101
|
-
|
|
8102
|
-
|
|
8103
|
-
|
|
8104
|
-
|
|
8105
|
-
|
|
8106
|
-
|
|
8248
|
+
function insertStylesheet(content, target) {
|
|
8249
|
+
if (supportsConstructableStyleSheets) {
|
|
8250
|
+
insertConstructableStyleSheet(content, target);
|
|
8251
|
+
} else {
|
|
8252
|
+
// Fall back to <style> element
|
|
8253
|
+
insertStyleElement(content, target);
|
|
8254
|
+
}
|
|
8255
|
+
}
|
|
8107
8256
|
|
|
8108
|
-
|
|
8109
|
-
|
|
8110
|
-
|
|
8257
|
+
function assertInstanceOfHTMLElement(elm, msg) {
|
|
8258
|
+
assert.invariant(elm instanceof HTMLElement, msg);
|
|
8259
|
+
}
|
|
8111
8260
|
|
|
8112
|
-
|
|
8113
|
-
|
|
8114
|
-
|
|
8115
|
-
|
|
8261
|
+
const HTMLElementExported = HTMLElementConstructor;
|
|
8262
|
+
/*
|
|
8263
|
+
* Copyright (c) 2020, salesforce.com, inc.
|
|
8264
|
+
* All rights reserved.
|
|
8265
|
+
* SPDX-License-Identifier: MIT
|
|
8266
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
8267
|
+
*/
|
|
8268
|
+
|
|
8269
|
+
setAssertInstanceOfHTMLElement(assertInstanceOfHTMLElement);
|
|
8270
|
+
setAttachShadow(attachShadow);
|
|
8271
|
+
setCreateComment(createComment);
|
|
8272
|
+
setCreateElement(createElement$1);
|
|
8273
|
+
setCreateText(createText);
|
|
8274
|
+
setDefineCustomElement(defineCustomElement);
|
|
8275
|
+
setDispatchEvent(dispatchEvent);
|
|
8276
|
+
setGetAttribute(getAttribute);
|
|
8277
|
+
setGetBoundingClientRect(getBoundingClientRect);
|
|
8278
|
+
setGetChildNodes(getChildNodes);
|
|
8279
|
+
setGetChildren(getChildren);
|
|
8280
|
+
setGetClassList(getClassList);
|
|
8281
|
+
setGetCustomElement(getCustomElement);
|
|
8282
|
+
setGetElementsByClassName(getElementsByClassName);
|
|
8283
|
+
setGetElementsByTagName(getElementsByTagName);
|
|
8284
|
+
setGetFirstChild(getFirstChild);
|
|
8285
|
+
setGetFirstElementChild(getFirstElementChild);
|
|
8286
|
+
setGetLastChild(getLastChild);
|
|
8287
|
+
setGetLastElementChild(getLastElementChild);
|
|
8288
|
+
setGetProperty(getProperty);
|
|
8289
|
+
setHTMLElement(HTMLElementExported);
|
|
8290
|
+
setInsert(insert);
|
|
8291
|
+
setInsertGlobalStylesheet(insertGlobalStylesheet);
|
|
8292
|
+
setInsertStylesheet(insertStylesheet);
|
|
8293
|
+
setIsConnected(isConnected);
|
|
8294
|
+
setIsHydrating$1(isHydrating);
|
|
8295
|
+
setIsNativeShadowDefined(isNativeShadowDefined);
|
|
8296
|
+
setIsSyntheticShadowDefined(isSyntheticShadowDefined);
|
|
8297
|
+
setNextSibling(nextSibling);
|
|
8298
|
+
setQuerySelector(querySelector);
|
|
8299
|
+
setQuerySelectorAll(querySelectorAll);
|
|
8300
|
+
setRemove(remove);
|
|
8301
|
+
setRemoveAttribute(removeAttribute);
|
|
8302
|
+
setRemoveEventListener(removeEventListener);
|
|
8303
|
+
setSetAttribute(setAttribute);
|
|
8304
|
+
setSetCSSStyleProperty(setCSSStyleProperty);
|
|
8305
|
+
setSetProperty(setProperty);
|
|
8306
|
+
setSetText(setText);
|
|
8307
|
+
setSsr(ssr);
|
|
8308
|
+
setAddEventListener(addEventListener);
|
|
8116
8309
|
/*
|
|
8117
8310
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
8118
8311
|
* All rights reserved.
|
|
@@ -8195,7 +8388,7 @@
|
|
|
8195
8388
|
throw new TypeError(`"createElement" function expects an "is" option with a valid component constructor.`);
|
|
8196
8389
|
}
|
|
8197
8390
|
|
|
8198
|
-
const UpgradableConstructor = getUpgradableConstructor(sel
|
|
8391
|
+
const UpgradableConstructor = getUpgradableConstructor(sel);
|
|
8199
8392
|
let wasComponentUpgraded = false; // the custom element from the registry is expecting an upgrade callback
|
|
8200
8393
|
|
|
8201
8394
|
/**
|
|
@@ -8210,8 +8403,7 @@
|
|
|
8210
8403
|
createVM(elm, def, {
|
|
8211
8404
|
tagName: sel,
|
|
8212
8405
|
mode: options.mode !== 'closed' ? 'open' : 'closed',
|
|
8213
|
-
owner: null
|
|
8214
|
-
renderer
|
|
8406
|
+
owner: null
|
|
8215
8407
|
});
|
|
8216
8408
|
ConnectingSlot.set(elm, connectRootElement);
|
|
8217
8409
|
DisconnectingSlot.set(elm, disconnectRootElement);
|
|
@@ -8234,6 +8426,10 @@
|
|
|
8234
8426
|
|
|
8235
8427
|
|
|
8236
8428
|
function hydrateComponent(element, Ctor, props = {}) {
|
|
8429
|
+
if (!(element instanceof Element)) {
|
|
8430
|
+
throw new TypeError(`"hydrateComponent" expects a valid DOM element as the first parameter but instead received ${element}.`);
|
|
8431
|
+
}
|
|
8432
|
+
|
|
8237
8433
|
if (!isFunction$1(Ctor)) {
|
|
8238
8434
|
throw new TypeError(`"hydrateComponent" expects a valid component constructor as the second parameter but instead received ${Ctor}.`);
|
|
8239
8435
|
}
|
|
@@ -8251,7 +8447,6 @@
|
|
|
8251
8447
|
createVM(element, def, {
|
|
8252
8448
|
mode: 'open',
|
|
8253
8449
|
owner: null,
|
|
8254
|
-
renderer,
|
|
8255
8450
|
tagName: element.tagName.toLowerCase()
|
|
8256
8451
|
});
|
|
8257
8452
|
|
|
@@ -8322,8 +8517,7 @@
|
|
|
8322
8517
|
createVM(this, def, {
|
|
8323
8518
|
mode: 'open',
|
|
8324
8519
|
owner: null,
|
|
8325
|
-
tagName: this.tagName
|
|
8326
|
-
renderer
|
|
8520
|
+
tagName: this.tagName
|
|
8327
8521
|
});
|
|
8328
8522
|
}
|
|
8329
8523
|
|
|
@@ -8390,7 +8584,7 @@
|
|
|
8390
8584
|
return false;
|
|
8391
8585
|
}
|
|
8392
8586
|
|
|
8393
|
-
if (
|
|
8587
|
+
if (isSyntheticShadowDefined) {
|
|
8394
8588
|
// TODO [#1252]: old behavior that is still used by some pieces of the platform,
|
|
8395
8589
|
// specifically, nodes inserted manually on places where `lwc:dom="manual"` directive is not
|
|
8396
8590
|
// used, will be considered global elements.
|
|
@@ -8443,7 +8637,7 @@
|
|
|
8443
8637
|
});
|
|
8444
8638
|
freeze(LightningElement);
|
|
8445
8639
|
seal(LightningElement.prototype);
|
|
8446
|
-
/* version: 2.6.
|
|
8640
|
+
/* version: 2.6.3 */
|
|
8447
8641
|
|
|
8448
8642
|
exports.LightningElement = LightningElement;
|
|
8449
8643
|
exports.__unstable__ProfilerControl = profilerControl;
|