lwc 2.7.1 → 2.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/engine-dom/esm/es2017/engine-dom.js +578 -379
- package/dist/engine-dom/iife/es2017/engine-dom.js +578 -379
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -9
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +552 -359
- package/dist/engine-dom/iife/es5/engine-dom.js +630 -330
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -9
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +598 -310
- package/dist/engine-dom/umd/es2017/engine-dom.js +578 -379
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -9
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +552 -359
- package/dist/engine-dom/umd/es5/engine-dom.js +630 -330
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -9
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +598 -310
- package/dist/engine-server/commonjs/es2017/engine-server.js +647 -449
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -9
- package/dist/engine-server/esm/es2017/engine-server.js +647 -449
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +41 -6
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +41 -6
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +41 -6
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +41 -6
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +41 -6
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +41 -6
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +41 -6
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +41 -6
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +41 -6
- 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.7.
|
|
308
|
+
/** version: 2.7.2 */
|
|
309
309
|
|
|
310
310
|
/*
|
|
311
311
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -483,7 +483,7 @@
|
|
|
483
483
|
setFeatureFlag(name, value);
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
|
-
/** version: 2.7.
|
|
486
|
+
/** version: 2.7.2 */
|
|
487
487
|
|
|
488
488
|
/* proxy-compat-disable */
|
|
489
489
|
|
|
@@ -557,6 +557,249 @@
|
|
|
557
557
|
}
|
|
558
558
|
|
|
559
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;
|
|
560
803
|
}
|
|
561
804
|
/*
|
|
562
805
|
* Copyright (c) 2019, salesforce.com, inc.
|
|
@@ -810,9 +1053,6 @@
|
|
|
810
1053
|
elm,
|
|
811
1054
|
data: {
|
|
812
1055
|
on
|
|
813
|
-
},
|
|
814
|
-
owner: {
|
|
815
|
-
renderer
|
|
816
1056
|
}
|
|
817
1057
|
} = vnode;
|
|
818
1058
|
|
|
@@ -825,7 +1065,7 @@
|
|
|
825
1065
|
let name;
|
|
826
1066
|
|
|
827
1067
|
for (name in on) {
|
|
828
|
-
|
|
1068
|
+
addEventListener$1(elm, name, listener);
|
|
829
1069
|
}
|
|
830
1070
|
}
|
|
831
1071
|
|
|
@@ -967,9 +1207,6 @@
|
|
|
967
1207
|
const {
|
|
968
1208
|
data: {
|
|
969
1209
|
attrs
|
|
970
|
-
},
|
|
971
|
-
owner: {
|
|
972
|
-
renderer
|
|
973
1210
|
}
|
|
974
1211
|
} = vnode;
|
|
975
1212
|
|
|
@@ -992,10 +1229,6 @@
|
|
|
992
1229
|
}
|
|
993
1230
|
|
|
994
1231
|
const elm = vnode.elm;
|
|
995
|
-
const {
|
|
996
|
-
setAttribute,
|
|
997
|
-
removeAttribute
|
|
998
|
-
} = renderer;
|
|
999
1232
|
let key;
|
|
1000
1233
|
oldAttrs = isUndefined$1(oldAttrs) ? EmptyObject : oldAttrs; // update modified attributes, add new attributes
|
|
1001
1234
|
// this routine is only useful for data-* attributes in all kind of elements
|
|
@@ -1010,14 +1243,14 @@
|
|
|
1010
1243
|
|
|
1011
1244
|
if (StringCharCodeAt.call(key, 3) === ColonCharCode) {
|
|
1012
1245
|
// Assume xml namespace
|
|
1013
|
-
setAttribute(elm, key, cur, xmlNS);
|
|
1246
|
+
setAttribute$1(elm, key, cur, xmlNS);
|
|
1014
1247
|
} else if (StringCharCodeAt.call(key, 5) === ColonCharCode) {
|
|
1015
1248
|
// Assume xlink namespace
|
|
1016
|
-
setAttribute(elm, key, cur, xlinkNS);
|
|
1017
|
-
} else if (isNull(cur)) {
|
|
1018
|
-
removeAttribute(elm, key);
|
|
1249
|
+
setAttribute$1(elm, key, cur, xlinkNS);
|
|
1250
|
+
} else if (isNull(cur) || isUndefined$1(cur)) {
|
|
1251
|
+
removeAttribute$1(elm, key);
|
|
1019
1252
|
} else {
|
|
1020
|
-
setAttribute(elm, key, cur);
|
|
1253
|
+
setAttribute$1(elm, key, cur);
|
|
1021
1254
|
}
|
|
1022
1255
|
|
|
1023
1256
|
lockAttribute();
|
|
@@ -1065,17 +1298,14 @@
|
|
|
1065
1298
|
const isFirstPatch = isUndefined$1(oldProps);
|
|
1066
1299
|
const {
|
|
1067
1300
|
elm,
|
|
1068
|
-
sel
|
|
1069
|
-
owner: {
|
|
1070
|
-
renderer
|
|
1071
|
-
}
|
|
1301
|
+
sel
|
|
1072
1302
|
} = vnode;
|
|
1073
1303
|
|
|
1074
1304
|
for (const key in props) {
|
|
1075
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...
|
|
1076
1306
|
|
|
1077
|
-
if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ?
|
|
1078
|
-
|
|
1307
|
+
if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ? getProperty$1(elm, key) : oldProps[key])) {
|
|
1308
|
+
setProperty$1(elm, key, cur);
|
|
1079
1309
|
}
|
|
1080
1310
|
}
|
|
1081
1311
|
}
|
|
@@ -1144,9 +1374,6 @@
|
|
|
1144
1374
|
elm,
|
|
1145
1375
|
data: {
|
|
1146
1376
|
className: newClass
|
|
1147
|
-
},
|
|
1148
|
-
owner: {
|
|
1149
|
-
renderer
|
|
1150
1377
|
}
|
|
1151
1378
|
} = vnode;
|
|
1152
1379
|
const {
|
|
@@ -1159,7 +1386,7 @@
|
|
|
1159
1386
|
return;
|
|
1160
1387
|
}
|
|
1161
1388
|
|
|
1162
|
-
const classList =
|
|
1389
|
+
const classList = getClassList$1(elm);
|
|
1163
1390
|
const newClassMap = getMapFromClassName(newClass);
|
|
1164
1391
|
const oldClassMap = getMapFromClassName(oldClass);
|
|
1165
1392
|
let name;
|
|
@@ -1197,24 +1424,17 @@
|
|
|
1197
1424
|
elm,
|
|
1198
1425
|
data: {
|
|
1199
1426
|
style: newStyle
|
|
1200
|
-
},
|
|
1201
|
-
owner: {
|
|
1202
|
-
renderer
|
|
1203
1427
|
}
|
|
1204
1428
|
} = vnode;
|
|
1205
|
-
const {
|
|
1206
|
-
setAttribute,
|
|
1207
|
-
removeAttribute
|
|
1208
|
-
} = renderer;
|
|
1209
1429
|
|
|
1210
1430
|
if (oldVnode.data.style === newStyle) {
|
|
1211
1431
|
return;
|
|
1212
1432
|
}
|
|
1213
1433
|
|
|
1214
1434
|
if (!isString(newStyle) || newStyle === '') {
|
|
1215
|
-
removeAttribute(elm, 'style');
|
|
1435
|
+
removeAttribute$1(elm, 'style');
|
|
1216
1436
|
} else {
|
|
1217
|
-
setAttribute(elm, 'style', newStyle);
|
|
1437
|
+
setAttribute$1(elm, 'style', newStyle);
|
|
1218
1438
|
}
|
|
1219
1439
|
}
|
|
1220
1440
|
|
|
@@ -1239,9 +1459,6 @@
|
|
|
1239
1459
|
elm,
|
|
1240
1460
|
data: {
|
|
1241
1461
|
classMap
|
|
1242
|
-
},
|
|
1243
|
-
owner: {
|
|
1244
|
-
renderer
|
|
1245
1462
|
}
|
|
1246
1463
|
} = vnode;
|
|
1247
1464
|
|
|
@@ -1249,7 +1466,7 @@
|
|
|
1249
1466
|
return;
|
|
1250
1467
|
}
|
|
1251
1468
|
|
|
1252
|
-
const classList =
|
|
1469
|
+
const classList = getClassList$1(elm);
|
|
1253
1470
|
|
|
1254
1471
|
for (const name in classMap) {
|
|
1255
1472
|
classList.add(name);
|
|
@@ -1273,9 +1490,6 @@
|
|
|
1273
1490
|
elm,
|
|
1274
1491
|
data: {
|
|
1275
1492
|
styleDecls
|
|
1276
|
-
},
|
|
1277
|
-
owner: {
|
|
1278
|
-
renderer
|
|
1279
1493
|
}
|
|
1280
1494
|
} = vnode;
|
|
1281
1495
|
|
|
@@ -1285,7 +1499,7 @@
|
|
|
1285
1499
|
|
|
1286
1500
|
for (let i = 0; i < styleDecls.length; i++) {
|
|
1287
1501
|
const [prop, value, important] = styleDecls[i];
|
|
1288
|
-
|
|
1502
|
+
setCSSStyleProperty$1(elm, prop, value, important);
|
|
1289
1503
|
}
|
|
1290
1504
|
}
|
|
1291
1505
|
|
|
@@ -1299,15 +1513,6 @@
|
|
|
1299
1513
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
1300
1514
|
*/
|
|
1301
1515
|
|
|
1302
|
-
/**
|
|
1303
|
-
@license
|
|
1304
|
-
Copyright (c) 2015 Simon Friis Vindum.
|
|
1305
|
-
This code may only be used under the MIT License found at
|
|
1306
|
-
https://github.com/snabbdom/snabbdom/blob/master/LICENSE
|
|
1307
|
-
Code distributed by Snabbdom as part of the Snabbdom project at
|
|
1308
|
-
https://github.com/snabbdom/snabbdom/
|
|
1309
|
-
*/
|
|
1310
|
-
|
|
1311
1516
|
function isUndef(s) {
|
|
1312
1517
|
return s === undefined;
|
|
1313
1518
|
}
|
|
@@ -1395,7 +1600,7 @@
|
|
|
1395
1600
|
} else if (sameVnode(oldStartVnode, newEndVnode)) {
|
|
1396
1601
|
// Vnode moved right
|
|
1397
1602
|
patchVnode(oldStartVnode, newEndVnode);
|
|
1398
|
-
newEndVnode.hook.move(oldStartVnode, parentElm,
|
|
1603
|
+
newEndVnode.hook.move(oldStartVnode, parentElm, nextSibling$1(oldEndVnode.elm));
|
|
1399
1604
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
1400
1605
|
newEndVnode = newCh[--newEndIdx];
|
|
1401
1606
|
} else if (sameVnode(oldEndVnode, newStartVnode)) {
|
|
@@ -1877,7 +2082,7 @@
|
|
|
1877
2082
|
defineProperties(proto, getLightningElementPrototypeRestrictionsDescriptors(proto));
|
|
1878
2083
|
}
|
|
1879
2084
|
/*
|
|
1880
|
-
* Copyright (c)
|
|
2085
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
1881
2086
|
* All rights reserved.
|
|
1882
2087
|
* SPDX-License-Identifier: MIT
|
|
1883
2088
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
@@ -2797,9 +3002,7 @@
|
|
|
2797
3002
|
|
|
2798
3003
|
|
|
2799
3004
|
const LightningElement = function () {
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
3005
|
+
// This should be as performant as possible, while any initialization should be done lazily
|
|
2803
3006
|
if (isNull(vmBeingConstructed)) {
|
|
2804
3007
|
throw new ReferenceError('Illegal constructor');
|
|
2805
3008
|
}
|
|
@@ -2807,15 +3010,14 @@
|
|
|
2807
3010
|
const vm = vmBeingConstructed;
|
|
2808
3011
|
const {
|
|
2809
3012
|
def,
|
|
2810
|
-
elm
|
|
2811
|
-
renderer
|
|
3013
|
+
elm
|
|
2812
3014
|
} = vm;
|
|
2813
3015
|
const {
|
|
2814
3016
|
bridge
|
|
2815
3017
|
} = def;
|
|
2816
3018
|
|
|
2817
3019
|
if (process.env.NODE_ENV !== 'production') {
|
|
2818
|
-
|
|
3020
|
+
assertInstanceOfHTMLElement$1(vm.elm, `Component creation requires a DOM element to be associated to ${vm}.`);
|
|
2819
3021
|
}
|
|
2820
3022
|
|
|
2821
3023
|
const component = this;
|
|
@@ -2845,7 +3047,7 @@
|
|
|
2845
3047
|
if (vm.renderMode === 1
|
|
2846
3048
|
/* Shadow */
|
|
2847
3049
|
) {
|
|
2848
|
-
|
|
3050
|
+
doAttachShadow(vm);
|
|
2849
3051
|
} // Adding extra guard rails in DEV mode.
|
|
2850
3052
|
|
|
2851
3053
|
|
|
@@ -2857,17 +3059,16 @@
|
|
|
2857
3059
|
return this;
|
|
2858
3060
|
};
|
|
2859
3061
|
|
|
2860
|
-
function
|
|
3062
|
+
function doAttachShadow(vm) {
|
|
2861
3063
|
const {
|
|
2862
3064
|
elm,
|
|
2863
3065
|
mode,
|
|
2864
|
-
renderer,
|
|
2865
3066
|
shadowMode,
|
|
2866
3067
|
def: {
|
|
2867
3068
|
ctor
|
|
2868
3069
|
}
|
|
2869
3070
|
} = vm;
|
|
2870
|
-
const cmpRoot =
|
|
3071
|
+
const cmpRoot = attachShadow$1(elm, {
|
|
2871
3072
|
[KEY__SYNTHETIC_MODE]: shadowMode === 1
|
|
2872
3073
|
/* Synthetic */
|
|
2873
3074
|
,
|
|
@@ -2894,21 +3095,15 @@
|
|
|
2894
3095
|
|
|
2895
3096
|
dispatchEvent(event) {
|
|
2896
3097
|
const {
|
|
2897
|
-
elm
|
|
2898
|
-
renderer: {
|
|
2899
|
-
dispatchEvent
|
|
2900
|
-
}
|
|
3098
|
+
elm
|
|
2901
3099
|
} = getAssociatedVM(this);
|
|
2902
|
-
return dispatchEvent(elm, event);
|
|
3100
|
+
return dispatchEvent$1(elm, event);
|
|
2903
3101
|
},
|
|
2904
3102
|
|
|
2905
3103
|
addEventListener(type, listener, options) {
|
|
2906
3104
|
const vm = getAssociatedVM(this);
|
|
2907
3105
|
const {
|
|
2908
|
-
elm
|
|
2909
|
-
renderer: {
|
|
2910
|
-
addEventListener
|
|
2911
|
-
}
|
|
3106
|
+
elm
|
|
2912
3107
|
} = vm;
|
|
2913
3108
|
|
|
2914
3109
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2919,92 +3114,68 @@
|
|
|
2919
3114
|
}
|
|
2920
3115
|
|
|
2921
3116
|
const wrappedListener = getWrappedComponentsListener(vm, listener);
|
|
2922
|
-
addEventListener(elm, type, wrappedListener, options);
|
|
3117
|
+
addEventListener$1(elm, type, wrappedListener, options);
|
|
2923
3118
|
},
|
|
2924
3119
|
|
|
2925
3120
|
removeEventListener(type, listener, options) {
|
|
2926
3121
|
const vm = getAssociatedVM(this);
|
|
2927
3122
|
const {
|
|
2928
|
-
elm
|
|
2929
|
-
renderer: {
|
|
2930
|
-
removeEventListener
|
|
2931
|
-
}
|
|
3123
|
+
elm
|
|
2932
3124
|
} = vm;
|
|
2933
3125
|
const wrappedListener = getWrappedComponentsListener(vm, listener);
|
|
2934
|
-
removeEventListener(elm, type, wrappedListener, options);
|
|
3126
|
+
removeEventListener$1(elm, type, wrappedListener, options);
|
|
2935
3127
|
},
|
|
2936
3128
|
|
|
2937
3129
|
hasAttribute(name) {
|
|
2938
3130
|
const {
|
|
2939
|
-
elm
|
|
2940
|
-
renderer: {
|
|
2941
|
-
getAttribute
|
|
2942
|
-
}
|
|
3131
|
+
elm
|
|
2943
3132
|
} = getAssociatedVM(this);
|
|
2944
|
-
return !isNull(getAttribute(elm, name));
|
|
3133
|
+
return !isNull(getAttribute$1(elm, name));
|
|
2945
3134
|
},
|
|
2946
3135
|
|
|
2947
3136
|
hasAttributeNS(namespace, name) {
|
|
2948
3137
|
const {
|
|
2949
|
-
elm
|
|
2950
|
-
renderer: {
|
|
2951
|
-
getAttribute
|
|
2952
|
-
}
|
|
3138
|
+
elm
|
|
2953
3139
|
} = getAssociatedVM(this);
|
|
2954
|
-
return !isNull(getAttribute(elm, name, namespace));
|
|
3140
|
+
return !isNull(getAttribute$1(elm, name, namespace));
|
|
2955
3141
|
},
|
|
2956
3142
|
|
|
2957
3143
|
removeAttribute(name) {
|
|
2958
3144
|
const {
|
|
2959
|
-
elm
|
|
2960
|
-
renderer: {
|
|
2961
|
-
removeAttribute
|
|
2962
|
-
}
|
|
3145
|
+
elm
|
|
2963
3146
|
} = getAssociatedVM(this);
|
|
2964
3147
|
unlockAttribute(elm, name);
|
|
2965
|
-
removeAttribute(elm, name);
|
|
3148
|
+
removeAttribute$1(elm, name);
|
|
2966
3149
|
lockAttribute();
|
|
2967
3150
|
},
|
|
2968
3151
|
|
|
2969
3152
|
removeAttributeNS(namespace, name) {
|
|
2970
3153
|
const {
|
|
2971
|
-
elm
|
|
2972
|
-
renderer: {
|
|
2973
|
-
removeAttribute
|
|
2974
|
-
}
|
|
3154
|
+
elm
|
|
2975
3155
|
} = getAssociatedVM(this);
|
|
2976
3156
|
unlockAttribute(elm, name);
|
|
2977
|
-
removeAttribute(elm, name, namespace);
|
|
3157
|
+
removeAttribute$1(elm, name, namespace);
|
|
2978
3158
|
lockAttribute();
|
|
2979
3159
|
},
|
|
2980
3160
|
|
|
2981
3161
|
getAttribute(name) {
|
|
2982
3162
|
const {
|
|
2983
|
-
elm
|
|
2984
|
-
renderer: {
|
|
2985
|
-
getAttribute
|
|
2986
|
-
}
|
|
3163
|
+
elm
|
|
2987
3164
|
} = getAssociatedVM(this);
|
|
2988
|
-
return getAttribute(elm, name);
|
|
3165
|
+
return getAttribute$1(elm, name);
|
|
2989
3166
|
},
|
|
2990
3167
|
|
|
2991
3168
|
getAttributeNS(namespace, name) {
|
|
2992
3169
|
const {
|
|
2993
|
-
elm
|
|
2994
|
-
renderer: {
|
|
2995
|
-
getAttribute
|
|
2996
|
-
}
|
|
3170
|
+
elm
|
|
2997
3171
|
} = getAssociatedVM(this);
|
|
2998
|
-
return getAttribute(elm, name, namespace);
|
|
3172
|
+
return getAttribute$1(elm, name, namespace);
|
|
2999
3173
|
},
|
|
3000
3174
|
|
|
3001
3175
|
setAttribute(name, value) {
|
|
3002
3176
|
const vm = getAssociatedVM(this);
|
|
3003
3177
|
const {
|
|
3004
|
-
elm
|
|
3005
|
-
renderer: {
|
|
3006
|
-
setAttribute
|
|
3007
|
-
}
|
|
3178
|
+
elm
|
|
3008
3179
|
} = vm;
|
|
3009
3180
|
|
|
3010
3181
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3012,17 +3183,14 @@
|
|
|
3012
3183
|
}
|
|
3013
3184
|
|
|
3014
3185
|
unlockAttribute(elm, name);
|
|
3015
|
-
setAttribute(elm, name, value);
|
|
3186
|
+
setAttribute$1(elm, name, value);
|
|
3016
3187
|
lockAttribute();
|
|
3017
3188
|
},
|
|
3018
3189
|
|
|
3019
3190
|
setAttributeNS(namespace, name, value) {
|
|
3020
3191
|
const vm = getAssociatedVM(this);
|
|
3021
3192
|
const {
|
|
3022
|
-
elm
|
|
3023
|
-
renderer: {
|
|
3024
|
-
setAttribute
|
|
3025
|
-
}
|
|
3193
|
+
elm
|
|
3026
3194
|
} = vm;
|
|
3027
3195
|
|
|
3028
3196
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3030,43 +3198,34 @@
|
|
|
3030
3198
|
}
|
|
3031
3199
|
|
|
3032
3200
|
unlockAttribute(elm, name);
|
|
3033
|
-
setAttribute(elm, name, value, namespace);
|
|
3201
|
+
setAttribute$1(elm, name, value, namespace);
|
|
3034
3202
|
lockAttribute();
|
|
3035
3203
|
},
|
|
3036
3204
|
|
|
3037
3205
|
getBoundingClientRect() {
|
|
3038
3206
|
const vm = getAssociatedVM(this);
|
|
3039
3207
|
const {
|
|
3040
|
-
elm
|
|
3041
|
-
renderer: {
|
|
3042
|
-
getBoundingClientRect
|
|
3043
|
-
}
|
|
3208
|
+
elm
|
|
3044
3209
|
} = vm;
|
|
3045
3210
|
|
|
3046
3211
|
if (process.env.NODE_ENV !== 'production') {
|
|
3047
3212
|
warnIfInvokedDuringConstruction(vm, 'getBoundingClientRect()');
|
|
3048
3213
|
}
|
|
3049
3214
|
|
|
3050
|
-
return getBoundingClientRect(elm);
|
|
3215
|
+
return getBoundingClientRect$1(elm);
|
|
3051
3216
|
},
|
|
3052
3217
|
|
|
3053
3218
|
get isConnected() {
|
|
3054
3219
|
const {
|
|
3055
|
-
elm
|
|
3056
|
-
renderer: {
|
|
3057
|
-
isConnected
|
|
3058
|
-
}
|
|
3220
|
+
elm
|
|
3059
3221
|
} = getAssociatedVM(this);
|
|
3060
|
-
return isConnected(elm);
|
|
3222
|
+
return isConnected$1(elm);
|
|
3061
3223
|
},
|
|
3062
3224
|
|
|
3063
3225
|
get classList() {
|
|
3064
3226
|
const vm = getAssociatedVM(this);
|
|
3065
3227
|
const {
|
|
3066
|
-
elm
|
|
3067
|
-
renderer: {
|
|
3068
|
-
getClassList
|
|
3069
|
-
}
|
|
3228
|
+
elm
|
|
3070
3229
|
} = vm;
|
|
3071
3230
|
|
|
3072
3231
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3075,7 +3234,7 @@
|
|
|
3075
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.`);
|
|
3076
3235
|
}
|
|
3077
3236
|
|
|
3078
|
-
return getClassList(elm);
|
|
3237
|
+
return getClassList$1(elm);
|
|
3079
3238
|
},
|
|
3080
3239
|
|
|
3081
3240
|
get template() {
|
|
@@ -3109,23 +3268,48 @@
|
|
|
3109
3268
|
}
|
|
3110
3269
|
|
|
3111
3270
|
};
|
|
3112
|
-
const queryAndChildGetterDescriptors = create(null);
|
|
3113
|
-
|
|
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;
|
|
3114
3284
|
|
|
3115
|
-
|
|
3116
|
-
|
|
3285
|
+
case 'firstChild':
|
|
3286
|
+
return getFirstChild$1;
|
|
3287
|
+
|
|
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] = {
|
|
3117
3302
|
get() {
|
|
3118
3303
|
const vm = getAssociatedVM(this);
|
|
3119
3304
|
const {
|
|
3120
|
-
elm
|
|
3121
|
-
renderer
|
|
3305
|
+
elm
|
|
3122
3306
|
} = vm;
|
|
3123
3307
|
|
|
3124
3308
|
if (process.env.NODE_ENV !== 'production') {
|
|
3125
|
-
warnIfInvokedDuringConstruction(vm,
|
|
3309
|
+
warnIfInvokedDuringConstruction(vm, childGetter);
|
|
3126
3310
|
}
|
|
3127
3311
|
|
|
3128
|
-
return
|
|
3312
|
+
return getChildGetter(childGetter)(elm);
|
|
3129
3313
|
},
|
|
3130
3314
|
|
|
3131
3315
|
configurable: true,
|
|
@@ -3133,22 +3317,38 @@
|
|
|
3133
3317
|
};
|
|
3134
3318
|
}
|
|
3135
3319
|
|
|
3136
|
-
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
|
+
|
|
3137
3338
|
|
|
3138
3339
|
for (const queryMethod of queryMethods) {
|
|
3139
3340
|
queryAndChildGetterDescriptors[queryMethod] = {
|
|
3140
3341
|
value(arg) {
|
|
3141
3342
|
const vm = getAssociatedVM(this);
|
|
3142
3343
|
const {
|
|
3143
|
-
elm
|
|
3144
|
-
renderer
|
|
3344
|
+
elm
|
|
3145
3345
|
} = vm;
|
|
3146
3346
|
|
|
3147
3347
|
if (process.env.NODE_ENV !== 'production') {
|
|
3148
3348
|
warnIfInvokedDuringConstruction(vm, `${queryMethod}()`);
|
|
3149
3349
|
}
|
|
3150
3350
|
|
|
3151
|
-
return
|
|
3351
|
+
return getQueryMethod(queryMethod)(elm, arg);
|
|
3152
3352
|
},
|
|
3153
3353
|
|
|
3154
3354
|
configurable: true,
|
|
@@ -4547,17 +4747,14 @@
|
|
|
4547
4747
|
const token = cmpTemplate === null || cmpTemplate === void 0 ? void 0 : cmpTemplate.stylesheetToken;
|
|
4548
4748
|
|
|
4549
4749
|
if (!isUndefined$1(token) && context.hasScopedStyles) {
|
|
4550
|
-
|
|
4750
|
+
getClassList$1(elm).add(token);
|
|
4551
4751
|
}
|
|
4552
4752
|
}
|
|
4553
4753
|
|
|
4554
4754
|
function updateNodeHook(oldVnode, vnode) {
|
|
4555
4755
|
const {
|
|
4556
4756
|
elm,
|
|
4557
|
-
text
|
|
4558
|
-
owner: {
|
|
4559
|
-
renderer
|
|
4560
|
-
}
|
|
4757
|
+
text
|
|
4561
4758
|
} = vnode;
|
|
4562
4759
|
|
|
4563
4760
|
if (oldVnode.text !== text) {
|
|
@@ -4565,7 +4762,7 @@
|
|
|
4565
4762
|
unlockDomMutation();
|
|
4566
4763
|
}
|
|
4567
4764
|
|
|
4568
|
-
|
|
4765
|
+
setText$1(elm, text);
|
|
4569
4766
|
|
|
4570
4767
|
if (process.env.NODE_ENV !== 'production') {
|
|
4571
4768
|
lockDomMutation();
|
|
@@ -4574,15 +4771,11 @@
|
|
|
4574
4771
|
}
|
|
4575
4772
|
|
|
4576
4773
|
function insertNodeHook(vnode, parentNode, referenceNode) {
|
|
4577
|
-
const {
|
|
4578
|
-
renderer
|
|
4579
|
-
} = vnode.owner;
|
|
4580
|
-
|
|
4581
4774
|
if (process.env.NODE_ENV !== 'production') {
|
|
4582
4775
|
unlockDomMutation();
|
|
4583
4776
|
}
|
|
4584
4777
|
|
|
4585
|
-
|
|
4778
|
+
insert$1(vnode.elm, parentNode, referenceNode);
|
|
4586
4779
|
|
|
4587
4780
|
if (process.env.NODE_ENV !== 'production') {
|
|
4588
4781
|
lockDomMutation();
|
|
@@ -4590,15 +4783,11 @@
|
|
|
4590
4783
|
}
|
|
4591
4784
|
|
|
4592
4785
|
function removeNodeHook(vnode, parentNode) {
|
|
4593
|
-
const {
|
|
4594
|
-
renderer
|
|
4595
|
-
} = vnode.owner;
|
|
4596
|
-
|
|
4597
4786
|
if (process.env.NODE_ENV !== 'production') {
|
|
4598
4787
|
unlockDomMutation();
|
|
4599
4788
|
}
|
|
4600
4789
|
|
|
4601
|
-
|
|
4790
|
+
remove$1(vnode.elm, parentNode);
|
|
4602
4791
|
|
|
4603
4792
|
if (process.env.NODE_ENV !== 'production') {
|
|
4604
4793
|
lockDomMutation();
|
|
@@ -4764,8 +4953,7 @@
|
|
|
4764
4953
|
createVM(elm, def, {
|
|
4765
4954
|
mode,
|
|
4766
4955
|
owner,
|
|
4767
|
-
tagName: sel
|
|
4768
|
-
renderer: owner.renderer
|
|
4956
|
+
tagName: sel
|
|
4769
4957
|
});
|
|
4770
4958
|
|
|
4771
4959
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4811,16 +4999,13 @@
|
|
|
4811
4999
|
const {
|
|
4812
5000
|
data: {
|
|
4813
5001
|
attrs = {}
|
|
4814
|
-
},
|
|
4815
|
-
owner: {
|
|
4816
|
-
renderer
|
|
4817
5002
|
}
|
|
4818
5003
|
} = vnode;
|
|
4819
5004
|
let nodesAreCompatible = true; // Validate attributes, though we could always recovery from those by running the update mods.
|
|
4820
5005
|
// Note: intentionally ONLY matching vnodes.attrs to elm.attrs, in case SSR is adding extra attributes.
|
|
4821
5006
|
|
|
4822
5007
|
for (const [attrName, attrValue] of Object.entries(attrs)) {
|
|
4823
|
-
const elmAttrValue =
|
|
5008
|
+
const elmAttrValue = getAttribute$1(elm, attrName);
|
|
4824
5009
|
|
|
4825
5010
|
if (String(attrValue) !== elmAttrValue) {
|
|
4826
5011
|
logError(`Mismatch hydrating element <${elm.tagName.toLowerCase()}>: attribute "${attrName}" has different values, expected "${attrValue}" but found "${elmAttrValue}"`, vnode.owner);
|
|
@@ -4836,9 +5021,6 @@
|
|
|
4836
5021
|
data: {
|
|
4837
5022
|
className,
|
|
4838
5023
|
classMap
|
|
4839
|
-
},
|
|
4840
|
-
owner: {
|
|
4841
|
-
renderer
|
|
4842
5024
|
}
|
|
4843
5025
|
} = vnode;
|
|
4844
5026
|
let nodesAreCompatible = true;
|
|
@@ -4850,7 +5032,7 @@
|
|
|
4850
5032
|
vnodeClassName = className;
|
|
4851
5033
|
} else if (!isUndefined$1(classMap)) {
|
|
4852
5034
|
// classMap is used when class is set to static value.
|
|
4853
|
-
const classList =
|
|
5035
|
+
const classList = getClassList$1(elm);
|
|
4854
5036
|
let computedClassName = ''; // all classes from the vnode should be in the element.classList
|
|
4855
5037
|
|
|
4856
5038
|
for (const name in classMap) {
|
|
@@ -4880,12 +5062,9 @@
|
|
|
4880
5062
|
data: {
|
|
4881
5063
|
style,
|
|
4882
5064
|
styleDecls
|
|
4883
|
-
},
|
|
4884
|
-
owner: {
|
|
4885
|
-
renderer
|
|
4886
5065
|
}
|
|
4887
5066
|
} = vnode;
|
|
4888
|
-
const elmStyle =
|
|
5067
|
+
const elmStyle = getAttribute$1(elm, 'style') || '';
|
|
4889
5068
|
let vnodeStyle;
|
|
4890
5069
|
let nodesAreCompatible = true;
|
|
4891
5070
|
|
|
@@ -5022,12 +5201,12 @@
|
|
|
5022
5201
|
*/
|
|
5023
5202
|
|
|
5024
5203
|
|
|
5025
|
-
function getUpgradableConstructor(tagName
|
|
5204
|
+
function getUpgradableConstructor(tagName) {
|
|
5026
5205
|
// Should never get a tag with upper case letter at this point, the compiler should
|
|
5027
5206
|
// produce only tags with lowercase letters
|
|
5028
5207
|
// But, for backwards compatibility, we will lower case the tagName
|
|
5029
5208
|
tagName = tagName.toLowerCase();
|
|
5030
|
-
let CE =
|
|
5209
|
+
let CE = getCustomElement$1(tagName);
|
|
5031
5210
|
|
|
5032
5211
|
if (!isUndefined$1(CE)) {
|
|
5033
5212
|
return CE;
|
|
@@ -5038,7 +5217,7 @@
|
|
|
5038
5217
|
*/
|
|
5039
5218
|
|
|
5040
5219
|
|
|
5041
|
-
CE = class LWCUpgradableElement extends
|
|
5220
|
+
CE = class LWCUpgradableElement extends HTMLElementExported$1 {
|
|
5042
5221
|
constructor(upgradeCallback) {
|
|
5043
5222
|
super();
|
|
5044
5223
|
|
|
@@ -5048,7 +5227,7 @@
|
|
|
5048
5227
|
}
|
|
5049
5228
|
|
|
5050
5229
|
};
|
|
5051
|
-
|
|
5230
|
+
defineCustomElement$1(tagName, CE);
|
|
5052
5231
|
return CE;
|
|
5053
5232
|
}
|
|
5054
5233
|
/*
|
|
@@ -5066,10 +5245,7 @@
|
|
|
5066
5245
|
const {
|
|
5067
5246
|
owner
|
|
5068
5247
|
} = vnode;
|
|
5069
|
-
const
|
|
5070
|
-
renderer
|
|
5071
|
-
} = owner;
|
|
5072
|
-
const elm = renderer.createText(vnode.text);
|
|
5248
|
+
const elm = createText$1(vnode.text);
|
|
5073
5249
|
linkNodeToShadow(elm, owner);
|
|
5074
5250
|
vnode.elm = elm;
|
|
5075
5251
|
},
|
|
@@ -5103,10 +5279,7 @@
|
|
|
5103
5279
|
owner,
|
|
5104
5280
|
text
|
|
5105
5281
|
} = vnode;
|
|
5106
|
-
const
|
|
5107
|
-
renderer
|
|
5108
|
-
} = owner;
|
|
5109
|
-
const elm = renderer.createComment(text);
|
|
5282
|
+
const elm = createComment$1(text);
|
|
5110
5283
|
linkNodeToShadow(elm, owner);
|
|
5111
5284
|
vnode.elm = elm;
|
|
5112
5285
|
},
|
|
@@ -5148,11 +5321,8 @@
|
|
|
5148
5321
|
svg
|
|
5149
5322
|
}
|
|
5150
5323
|
} = vnode;
|
|
5151
|
-
const {
|
|
5152
|
-
renderer
|
|
5153
|
-
} = owner;
|
|
5154
5324
|
const namespace = isTrue(svg) ? SVG_NAMESPACE : undefined;
|
|
5155
|
-
const elm =
|
|
5325
|
+
const elm = createElement$2(sel, namespace);
|
|
5156
5326
|
linkNodeToShadow(elm, owner);
|
|
5157
5327
|
fallbackElmHook(elm, vnode);
|
|
5158
5328
|
vnode.elm = elm;
|
|
@@ -5212,10 +5382,7 @@
|
|
|
5212
5382
|
sel,
|
|
5213
5383
|
owner
|
|
5214
5384
|
} = vnode;
|
|
5215
|
-
const
|
|
5216
|
-
renderer
|
|
5217
|
-
} = owner;
|
|
5218
|
-
const UpgradableConstructor = getUpgradableConstructor(sel, renderer);
|
|
5385
|
+
const UpgradableConstructor = getUpgradableConstructor(sel);
|
|
5219
5386
|
/**
|
|
5220
5387
|
* Note: if the upgradable constructor does not expect, or throw when we new it
|
|
5221
5388
|
* with a callback as the first argument, we could implement a more advanced
|
|
@@ -5308,8 +5475,7 @@
|
|
|
5308
5475
|
createVM(elm, def, {
|
|
5309
5476
|
mode,
|
|
5310
5477
|
owner,
|
|
5311
|
-
tagName: sel
|
|
5312
|
-
renderer: owner.renderer
|
|
5478
|
+
tagName: sel
|
|
5313
5479
|
});
|
|
5314
5480
|
vnode.elm = elm;
|
|
5315
5481
|
const vm = getAssociatedVM(elm);
|
|
@@ -5338,12 +5504,11 @@
|
|
|
5338
5504
|
|
|
5339
5505
|
function linkNodeToShadow(elm, owner) {
|
|
5340
5506
|
const {
|
|
5341
|
-
renderer,
|
|
5342
5507
|
renderMode,
|
|
5343
5508
|
shadowMode
|
|
5344
5509
|
} = owner; // TODO [#1164]: this should eventually be done by the polyfill directly
|
|
5345
5510
|
|
|
5346
|
-
if (
|
|
5511
|
+
if (isSyntheticShadowDefined$1) {
|
|
5347
5512
|
if (shadowMode === 1
|
|
5348
5513
|
/* Synthetic */
|
|
5349
5514
|
|| renderMode === 0
|
|
@@ -5875,7 +6040,6 @@
|
|
|
5875
6040
|
const {
|
|
5876
6041
|
elm,
|
|
5877
6042
|
context,
|
|
5878
|
-
renderer,
|
|
5879
6043
|
renderMode,
|
|
5880
6044
|
shadowMode
|
|
5881
6045
|
} = vm;
|
|
@@ -5902,11 +6066,11 @@
|
|
|
5902
6066
|
} = context;
|
|
5903
6067
|
|
|
5904
6068
|
if (oldHasTokenInClass) {
|
|
5905
|
-
|
|
6069
|
+
getClassList$1(elm).remove(makeHostToken(oldToken));
|
|
5906
6070
|
}
|
|
5907
6071
|
|
|
5908
6072
|
if (oldHasTokenInAttribute) {
|
|
5909
|
-
|
|
6073
|
+
removeAttribute$1(elm, makeHostToken(oldToken));
|
|
5910
6074
|
} // Apply the new template styling token to the host element, if the new template has any
|
|
5911
6075
|
// associated stylesheets. In the case of light DOM, also ensure there is at least one scoped stylesheet.
|
|
5912
6076
|
|
|
@@ -5918,12 +6082,12 @@
|
|
|
5918
6082
|
|
|
5919
6083
|
if (!isUndefined$1(newToken)) {
|
|
5920
6084
|
if (hasScopedStyles) {
|
|
5921
|
-
|
|
6085
|
+
getClassList$1(elm).add(makeHostToken(newToken));
|
|
5922
6086
|
newHasTokenInClass = true;
|
|
5923
6087
|
}
|
|
5924
6088
|
|
|
5925
6089
|
if (isSyntheticShadow) {
|
|
5926
|
-
|
|
6090
|
+
setAttribute$1(elm, makeHostToken(newToken), '');
|
|
5927
6091
|
newHasTokenInAttribute = true;
|
|
5928
6092
|
}
|
|
5929
6093
|
} // Update the styling tokens present on the context object.
|
|
@@ -6044,7 +6208,6 @@
|
|
|
6044
6208
|
|
|
6045
6209
|
function createStylesheet(vm, stylesheets) {
|
|
6046
6210
|
const {
|
|
6047
|
-
renderer,
|
|
6048
6211
|
renderMode,
|
|
6049
6212
|
shadowMode
|
|
6050
6213
|
} = vm;
|
|
@@ -6055,9 +6218,9 @@
|
|
|
6055
6218
|
/* Synthetic */
|
|
6056
6219
|
) {
|
|
6057
6220
|
for (let i = 0; i < stylesheets.length; i++) {
|
|
6058
|
-
|
|
6221
|
+
insertGlobalStylesheet$1(stylesheets[i]);
|
|
6059
6222
|
}
|
|
6060
|
-
} else if (
|
|
6223
|
+
} else if (ssr$1 || isHydrating$1()) {
|
|
6061
6224
|
// Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
|
|
6062
6225
|
// This works in the client, because the stylesheets are created, and cached in the VM
|
|
6063
6226
|
// the first time the VM renders.
|
|
@@ -6071,10 +6234,10 @@
|
|
|
6071
6234
|
|
|
6072
6235
|
for (let i = 0; i < stylesheets.length; i++) {
|
|
6073
6236
|
if (isGlobal) {
|
|
6074
|
-
|
|
6237
|
+
insertGlobalStylesheet$1(stylesheets[i]);
|
|
6075
6238
|
} else {
|
|
6076
6239
|
// local level
|
|
6077
|
-
|
|
6240
|
+
insertStylesheet$1(stylesheets[i], root.cmpRoot);
|
|
6078
6241
|
}
|
|
6079
6242
|
}
|
|
6080
6243
|
}
|
|
@@ -6766,7 +6929,6 @@
|
|
|
6766
6929
|
const {
|
|
6767
6930
|
mode,
|
|
6768
6931
|
owner,
|
|
6769
|
-
renderer,
|
|
6770
6932
|
tagName
|
|
6771
6933
|
} = options;
|
|
6772
6934
|
const vm = {
|
|
@@ -6781,7 +6943,6 @@
|
|
|
6781
6943
|
tagName,
|
|
6782
6944
|
mode,
|
|
6783
6945
|
owner,
|
|
6784
|
-
renderer,
|
|
6785
6946
|
children: EmptyArray,
|
|
6786
6947
|
aChildren: EmptyArray,
|
|
6787
6948
|
velements: EmptyArray,
|
|
@@ -6836,16 +6997,11 @@
|
|
|
6836
6997
|
|
|
6837
6998
|
function computeShadowMode(vm) {
|
|
6838
6999
|
const {
|
|
6839
|
-
def
|
|
6840
|
-
renderer
|
|
7000
|
+
def
|
|
6841
7001
|
} = vm;
|
|
6842
|
-
const {
|
|
6843
|
-
isNativeShadowDefined,
|
|
6844
|
-
isSyntheticShadowDefined
|
|
6845
|
-
} = renderer;
|
|
6846
7002
|
let shadowMode;
|
|
6847
7003
|
|
|
6848
|
-
if (isSyntheticShadowDefined) {
|
|
7004
|
+
if (isSyntheticShadowDefined$1) {
|
|
6849
7005
|
if (def.renderMode === 0
|
|
6850
7006
|
/* Light */
|
|
6851
7007
|
) {
|
|
@@ -6854,7 +7010,7 @@
|
|
|
6854
7010
|
shadowMode = 0
|
|
6855
7011
|
/* Native */
|
|
6856
7012
|
;
|
|
6857
|
-
} else if (isNativeShadowDefined) {
|
|
7013
|
+
} else if (isNativeShadowDefined$1) {
|
|
6858
7014
|
if (def.shadowSupportMode === "any"
|
|
6859
7015
|
/* Any */
|
|
6860
7016
|
) {
|
|
@@ -6994,13 +7150,12 @@
|
|
|
6994
7150
|
|
|
6995
7151
|
function runRenderedCallback(vm) {
|
|
6996
7152
|
const {
|
|
6997
|
-
renderer,
|
|
6998
7153
|
def: {
|
|
6999
7154
|
renderedCallback
|
|
7000
7155
|
}
|
|
7001
7156
|
} = vm;
|
|
7002
7157
|
|
|
7003
|
-
if (isTrue(
|
|
7158
|
+
if (isTrue(ssr$1)) {
|
|
7004
7159
|
return;
|
|
7005
7160
|
}
|
|
7006
7161
|
|
|
@@ -7226,8 +7381,7 @@
|
|
|
7226
7381
|
|
|
7227
7382
|
function resetComponentRoot(vm) {
|
|
7228
7383
|
const {
|
|
7229
|
-
children
|
|
7230
|
-
renderer
|
|
7384
|
+
children
|
|
7231
7385
|
} = vm;
|
|
7232
7386
|
const rootNode = getRenderRoot(vm);
|
|
7233
7387
|
|
|
@@ -7235,7 +7389,7 @@
|
|
|
7235
7389
|
const child = children[i];
|
|
7236
7390
|
|
|
7237
7391
|
if (!isNull(child) && !isUndefined$1(child.elm)) {
|
|
7238
|
-
|
|
7392
|
+
remove$1(child.elm, rootNode);
|
|
7239
7393
|
}
|
|
7240
7394
|
}
|
|
7241
7395
|
|
|
@@ -7245,7 +7399,7 @@
|
|
|
7245
7399
|
}
|
|
7246
7400
|
|
|
7247
7401
|
function scheduleRehydration(vm) {
|
|
7248
|
-
if (isTrue(
|
|
7402
|
+
if (isTrue(ssr$1) || isTrue(vm.isScheduled)) {
|
|
7249
7403
|
return;
|
|
7250
7404
|
}
|
|
7251
7405
|
|
|
@@ -7490,7 +7644,6 @@
|
|
|
7490
7644
|
|
|
7491
7645
|
const {
|
|
7492
7646
|
elm,
|
|
7493
|
-
renderer,
|
|
7494
7647
|
context: {
|
|
7495
7648
|
wiredConnecting,
|
|
7496
7649
|
wiredDisconnecting
|
|
@@ -7517,7 +7670,7 @@
|
|
|
7517
7670
|
}
|
|
7518
7671
|
|
|
7519
7672
|
});
|
|
7520
|
-
|
|
7673
|
+
dispatchEvent$1(elm, contextRegistrationEvent);
|
|
7521
7674
|
});
|
|
7522
7675
|
}
|
|
7523
7676
|
|
|
@@ -7782,7 +7935,7 @@
|
|
|
7782
7935
|
hooksAreSet = true;
|
|
7783
7936
|
setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
|
|
7784
7937
|
}
|
|
7785
|
-
/* version: 2.7.
|
|
7938
|
+
/* version: 2.7.2 */
|
|
7786
7939
|
|
|
7787
7940
|
/*
|
|
7788
7941
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -7811,7 +7964,9 @@
|
|
|
7811
7964
|
const styleElements = create(null);
|
|
7812
7965
|
const styleSheets = create(null);
|
|
7813
7966
|
const nodesToStyleSheets = new WeakMap();
|
|
7814
|
-
let getCustomElement
|
|
7967
|
+
let getCustomElement;
|
|
7968
|
+
let defineCustomElement;
|
|
7969
|
+
let HTMLElementConstructor;
|
|
7815
7970
|
|
|
7816
7971
|
function isCustomElementRegistryAvailable() {
|
|
7817
7972
|
if (typeof customElements === 'undefined') {
|
|
@@ -7926,188 +8081,231 @@
|
|
|
7926
8081
|
HTMLElementConstructor.prototype = HTMLElement.prototype;
|
|
7927
8082
|
}
|
|
7928
8083
|
|
|
7929
|
-
let
|
|
8084
|
+
let hydrating = false;
|
|
7930
8085
|
|
|
7931
|
-
function setIsHydrating(
|
|
7932
|
-
|
|
8086
|
+
function setIsHydrating(value) {
|
|
8087
|
+
hydrating = value;
|
|
7933
8088
|
}
|
|
7934
8089
|
|
|
7935
|
-
const
|
|
7936
|
-
ssr: false,
|
|
8090
|
+
const ssr = false;
|
|
7937
8091
|
|
|
7938
|
-
|
|
7939
|
-
|
|
7940
|
-
|
|
8092
|
+
function isHydrating() {
|
|
8093
|
+
return hydrating;
|
|
8094
|
+
}
|
|
7941
8095
|
|
|
7942
|
-
|
|
7943
|
-
|
|
8096
|
+
const isNativeShadowDefined = _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED];
|
|
8097
|
+
const isSyntheticShadowDefined = hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN);
|
|
7944
8098
|
|
|
7945
|
-
|
|
7946
|
-
|
|
7947
|
-
|
|
8099
|
+
function createElement$1(tagName, namespace) {
|
|
8100
|
+
return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
|
|
8101
|
+
}
|
|
7948
8102
|
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
|
|
8103
|
+
function createText(content) {
|
|
8104
|
+
return document.createTextNode(content);
|
|
8105
|
+
}
|
|
7952
8106
|
|
|
7953
|
-
|
|
7954
|
-
|
|
7955
|
-
|
|
8107
|
+
function createComment(content) {
|
|
8108
|
+
return document.createComment(content);
|
|
8109
|
+
}
|
|
7956
8110
|
|
|
7957
|
-
|
|
7958
|
-
|
|
7959
|
-
|
|
8111
|
+
function insert(node, parent, anchor) {
|
|
8112
|
+
parent.insertBefore(node, anchor);
|
|
8113
|
+
}
|
|
7960
8114
|
|
|
7961
|
-
|
|
7962
|
-
|
|
7963
|
-
|
|
8115
|
+
function remove(node, parent) {
|
|
8116
|
+
parent.removeChild(node);
|
|
8117
|
+
}
|
|
7964
8118
|
|
|
7965
|
-
|
|
7966
|
-
|
|
7967
|
-
|
|
8119
|
+
function nextSibling(node) {
|
|
8120
|
+
return node.nextSibling;
|
|
8121
|
+
}
|
|
7968
8122
|
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
8123
|
+
function attachShadow(element, options) {
|
|
8124
|
+
if (hydrating) {
|
|
8125
|
+
return element.shadowRoot;
|
|
8126
|
+
}
|
|
7973
8127
|
|
|
7974
|
-
|
|
7975
|
-
|
|
8128
|
+
return element.attachShadow(options);
|
|
8129
|
+
}
|
|
7976
8130
|
|
|
7977
|
-
|
|
7978
|
-
|
|
7979
|
-
|
|
8131
|
+
function setText(node, content) {
|
|
8132
|
+
node.nodeValue = content;
|
|
8133
|
+
}
|
|
7980
8134
|
|
|
7981
|
-
|
|
7982
|
-
|
|
7983
|
-
|
|
8135
|
+
function getProperty(node, key) {
|
|
8136
|
+
return node[key];
|
|
8137
|
+
}
|
|
7984
8138
|
|
|
7985
|
-
|
|
7986
|
-
|
|
7987
|
-
|
|
7988
|
-
|
|
7989
|
-
|
|
7990
|
-
}
|
|
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)}".`);
|
|
7991
8144
|
}
|
|
8145
|
+
}
|
|
7992
8146
|
|
|
7993
|
-
|
|
7994
|
-
|
|
8147
|
+
node[key] = value;
|
|
8148
|
+
}
|
|
7995
8149
|
|
|
7996
|
-
|
|
7997
|
-
|
|
7998
|
-
|
|
8150
|
+
function getAttribute(element, name, namespace) {
|
|
8151
|
+
return isUndefined$1(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
|
|
8152
|
+
}
|
|
7999
8153
|
|
|
8000
|
-
|
|
8001
|
-
|
|
8002
|
-
|
|
8154
|
+
function setAttribute(element, name, value, namespace) {
|
|
8155
|
+
return isUndefined$1(namespace) ? element.setAttribute(name, value) : element.setAttributeNS(namespace, name, value);
|
|
8156
|
+
}
|
|
8003
8157
|
|
|
8004
|
-
|
|
8005
|
-
|
|
8006
|
-
|
|
8007
|
-
|
|
8008
|
-
|
|
8009
|
-
|
|
8010
|
-
|
|
8158
|
+
function removeAttribute(element, name, namespace) {
|
|
8159
|
+
if (isUndefined$1(namespace)) {
|
|
8160
|
+
element.removeAttribute(name);
|
|
8161
|
+
} else {
|
|
8162
|
+
element.removeAttributeNS(namespace, name);
|
|
8163
|
+
}
|
|
8164
|
+
}
|
|
8011
8165
|
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8166
|
+
function addEventListener(target, type, callback, options) {
|
|
8167
|
+
target.addEventListener(type, callback, options);
|
|
8168
|
+
}
|
|
8015
8169
|
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8170
|
+
function removeEventListener(target, type, callback, options) {
|
|
8171
|
+
target.removeEventListener(type, callback, options);
|
|
8172
|
+
}
|
|
8019
8173
|
|
|
8020
|
-
|
|
8021
|
-
|
|
8022
|
-
|
|
8174
|
+
function dispatchEvent(target, event) {
|
|
8175
|
+
return target.dispatchEvent(event);
|
|
8176
|
+
}
|
|
8023
8177
|
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8178
|
+
function getClassList(element) {
|
|
8179
|
+
return element.classList;
|
|
8180
|
+
}
|
|
8027
8181
|
|
|
8028
|
-
|
|
8029
|
-
|
|
8030
|
-
|
|
8031
|
-
|
|
8032
|
-
|
|
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
|
+
}
|
|
8033
8187
|
|
|
8034
|
-
|
|
8035
|
-
|
|
8036
|
-
|
|
8188
|
+
function getBoundingClientRect(element) {
|
|
8189
|
+
return element.getBoundingClientRect();
|
|
8190
|
+
}
|
|
8037
8191
|
|
|
8038
|
-
|
|
8039
|
-
|
|
8040
|
-
|
|
8192
|
+
function querySelector(element, selectors) {
|
|
8193
|
+
return element.querySelector(selectors);
|
|
8194
|
+
}
|
|
8041
8195
|
|
|
8042
|
-
|
|
8043
|
-
|
|
8044
|
-
|
|
8196
|
+
function querySelectorAll(element, selectors) {
|
|
8197
|
+
return element.querySelectorAll(selectors);
|
|
8198
|
+
}
|
|
8045
8199
|
|
|
8046
|
-
|
|
8047
|
-
|
|
8048
|
-
|
|
8200
|
+
function getElementsByTagName(element, tagNameOrWildCard) {
|
|
8201
|
+
return element.getElementsByTagName(tagNameOrWildCard);
|
|
8202
|
+
}
|
|
8049
8203
|
|
|
8050
|
-
|
|
8051
|
-
|
|
8052
|
-
|
|
8204
|
+
function getElementsByClassName(element, names) {
|
|
8205
|
+
return element.getElementsByClassName(names);
|
|
8206
|
+
}
|
|
8053
8207
|
|
|
8054
|
-
|
|
8055
|
-
|
|
8056
|
-
|
|
8208
|
+
function getChildren(element) {
|
|
8209
|
+
return element.children;
|
|
8210
|
+
}
|
|
8057
8211
|
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
|
|
8212
|
+
function getChildNodes(element) {
|
|
8213
|
+
return element.childNodes;
|
|
8214
|
+
}
|
|
8061
8215
|
|
|
8062
|
-
|
|
8063
|
-
|
|
8064
|
-
|
|
8216
|
+
function getFirstChild(element) {
|
|
8217
|
+
return element.firstChild;
|
|
8218
|
+
}
|
|
8065
8219
|
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
|
|
8220
|
+
function getFirstElementChild(element) {
|
|
8221
|
+
return element.firstElementChild;
|
|
8222
|
+
}
|
|
8069
8223
|
|
|
8070
|
-
|
|
8071
|
-
|
|
8072
|
-
|
|
8224
|
+
function getLastChild(element) {
|
|
8225
|
+
return element.lastChild;
|
|
8226
|
+
}
|
|
8073
8227
|
|
|
8074
|
-
|
|
8075
|
-
|
|
8076
|
-
|
|
8228
|
+
function getLastElementChild(element) {
|
|
8229
|
+
return element.lastElementChild;
|
|
8230
|
+
}
|
|
8077
8231
|
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8232
|
+
function isConnected(node) {
|
|
8233
|
+
return node.isConnected;
|
|
8234
|
+
}
|
|
8081
8235
|
|
|
8082
|
-
|
|
8083
|
-
|
|
8084
|
-
|
|
8085
|
-
|
|
8236
|
+
function insertGlobalStylesheet(content) {
|
|
8237
|
+
if (!isUndefined$1(globalStylesheets[content])) {
|
|
8238
|
+
return;
|
|
8239
|
+
}
|
|
8086
8240
|
|
|
8087
|
-
|
|
8088
|
-
|
|
8089
|
-
|
|
8090
|
-
|
|
8091
|
-
|
|
8092
|
-
|
|
8241
|
+
globalStylesheets[content] = true;
|
|
8242
|
+
const elm = document.createElement('style');
|
|
8243
|
+
elm.type = 'text/css';
|
|
8244
|
+
elm.textContent = content;
|
|
8245
|
+
globalStylesheetsParentElement.appendChild(elm);
|
|
8246
|
+
}
|
|
8093
8247
|
|
|
8094
|
-
|
|
8095
|
-
|
|
8096
|
-
|
|
8097
|
-
|
|
8098
|
-
|
|
8099
|
-
|
|
8100
|
-
|
|
8101
|
-
|
|
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
|
+
}
|
|
8102
8256
|
|
|
8103
|
-
|
|
8104
|
-
|
|
8105
|
-
|
|
8257
|
+
function assertInstanceOfHTMLElement(elm, msg) {
|
|
8258
|
+
assert.invariant(elm instanceof HTMLElement, msg);
|
|
8259
|
+
}
|
|
8106
8260
|
|
|
8107
|
-
|
|
8108
|
-
|
|
8109
|
-
|
|
8110
|
-
|
|
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);
|
|
8111
8309
|
/*
|
|
8112
8310
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
8113
8311
|
* All rights reserved.
|
|
@@ -8190,7 +8388,7 @@
|
|
|
8190
8388
|
throw new TypeError(`"createElement" function expects an "is" option with a valid component constructor.`);
|
|
8191
8389
|
}
|
|
8192
8390
|
|
|
8193
|
-
const UpgradableConstructor = getUpgradableConstructor(sel
|
|
8391
|
+
const UpgradableConstructor = getUpgradableConstructor(sel);
|
|
8194
8392
|
let wasComponentUpgraded = false; // the custom element from the registry is expecting an upgrade callback
|
|
8195
8393
|
|
|
8196
8394
|
/**
|
|
@@ -8205,8 +8403,7 @@
|
|
|
8205
8403
|
createVM(elm, def, {
|
|
8206
8404
|
tagName: sel,
|
|
8207
8405
|
mode: options.mode !== 'closed' ? 'open' : 'closed',
|
|
8208
|
-
owner: null
|
|
8209
|
-
renderer
|
|
8406
|
+
owner: null
|
|
8210
8407
|
});
|
|
8211
8408
|
ConnectingSlot.set(elm, connectRootElement);
|
|
8212
8409
|
DisconnectingSlot.set(elm, disconnectRootElement);
|
|
@@ -8229,6 +8426,10 @@
|
|
|
8229
8426
|
|
|
8230
8427
|
|
|
8231
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
|
+
|
|
8232
8433
|
if (!isFunction$1(Ctor)) {
|
|
8233
8434
|
throw new TypeError(`"hydrateComponent" expects a valid component constructor as the second parameter but instead received ${Ctor}.`);
|
|
8234
8435
|
}
|
|
@@ -8246,7 +8447,6 @@
|
|
|
8246
8447
|
createVM(element, def, {
|
|
8247
8448
|
mode: 'open',
|
|
8248
8449
|
owner: null,
|
|
8249
|
-
renderer,
|
|
8250
8450
|
tagName: element.tagName.toLowerCase()
|
|
8251
8451
|
});
|
|
8252
8452
|
|
|
@@ -8317,8 +8517,7 @@
|
|
|
8317
8517
|
createVM(this, def, {
|
|
8318
8518
|
mode: 'open',
|
|
8319
8519
|
owner: null,
|
|
8320
|
-
tagName: this.tagName
|
|
8321
|
-
renderer
|
|
8520
|
+
tagName: this.tagName
|
|
8322
8521
|
});
|
|
8323
8522
|
}
|
|
8324
8523
|
|
|
@@ -8385,7 +8584,7 @@
|
|
|
8385
8584
|
return false;
|
|
8386
8585
|
}
|
|
8387
8586
|
|
|
8388
|
-
if (
|
|
8587
|
+
if (isSyntheticShadowDefined) {
|
|
8389
8588
|
// TODO [#1252]: old behavior that is still used by some pieces of the platform,
|
|
8390
8589
|
// specifically, nodes inserted manually on places where `lwc:dom="manual"` directive is not
|
|
8391
8590
|
// used, will be considered global elements.
|
|
@@ -8438,7 +8637,7 @@
|
|
|
8438
8637
|
});
|
|
8439
8638
|
freeze(LightningElement);
|
|
8440
8639
|
seal(LightningElement.prototype);
|
|
8441
|
-
/* version: 2.7.
|
|
8640
|
+
/* version: 2.7.2 */
|
|
8442
8641
|
|
|
8443
8642
|
exports.LightningElement = LightningElement;
|
|
8444
8643
|
exports.__unstable__ProfilerControl = profilerControl;
|