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
|
@@ -301,7 +301,7 @@
|
|
|
301
301
|
CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
|
|
302
302
|
return attributeName;
|
|
303
303
|
}
|
|
304
|
-
/** version: 2.7.
|
|
304
|
+
/** version: 2.7.2 */
|
|
305
305
|
|
|
306
306
|
/*
|
|
307
307
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -471,7 +471,7 @@
|
|
|
471
471
|
|
|
472
472
|
function setFeatureFlagForTest(name, value) {
|
|
473
473
|
}
|
|
474
|
-
/** version: 2.7.
|
|
474
|
+
/** version: 2.7.2 */
|
|
475
475
|
|
|
476
476
|
/* proxy-compat-disable */
|
|
477
477
|
|
|
@@ -514,6 +514,243 @@
|
|
|
514
514
|
|
|
515
515
|
return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
|
|
516
516
|
} // Borrowed from Vue template compiler.
|
|
517
|
+
// Primitives
|
|
518
|
+
//
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
let ssr$1;
|
|
522
|
+
|
|
523
|
+
function setSsr(ssrImpl) {
|
|
524
|
+
ssr$1 = ssrImpl;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
let isNativeShadowDefined$1;
|
|
528
|
+
|
|
529
|
+
function setIsNativeShadowDefined(isNativeShadowDefinedImpl) {
|
|
530
|
+
isNativeShadowDefined$1 = isNativeShadowDefinedImpl;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
let isSyntheticShadowDefined$1;
|
|
534
|
+
|
|
535
|
+
function setIsSyntheticShadowDefined(isSyntheticShadowDefinedImpl) {
|
|
536
|
+
isSyntheticShadowDefined$1 = isSyntheticShadowDefinedImpl;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
let HTMLElementExported$1;
|
|
540
|
+
|
|
541
|
+
function setHTMLElement(HTMLElementImpl) {
|
|
542
|
+
HTMLElementExported$1 = HTMLElementImpl;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
let isHydrating$1;
|
|
546
|
+
|
|
547
|
+
function setIsHydrating$1(isHydratingImpl) {
|
|
548
|
+
isHydrating$1 = isHydratingImpl;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
let insert$1;
|
|
552
|
+
|
|
553
|
+
function setInsert(insertImpl) {
|
|
554
|
+
insert$1 = insertImpl;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
let remove$1;
|
|
558
|
+
|
|
559
|
+
function setRemove(removeImpl) {
|
|
560
|
+
remove$1 = removeImpl;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
let createElement$2;
|
|
564
|
+
|
|
565
|
+
function setCreateElement(createElementImpl) {
|
|
566
|
+
createElement$2 = createElementImpl;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
let createText$1;
|
|
570
|
+
|
|
571
|
+
function setCreateText(createTextImpl) {
|
|
572
|
+
createText$1 = createTextImpl;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
let createComment$1;
|
|
576
|
+
|
|
577
|
+
function setCreateComment(createCommentImpl) {
|
|
578
|
+
createComment$1 = createCommentImpl;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
let nextSibling$1;
|
|
582
|
+
|
|
583
|
+
function setNextSibling(nextSiblingImpl) {
|
|
584
|
+
nextSibling$1 = nextSiblingImpl;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
let attachShadow$1;
|
|
588
|
+
|
|
589
|
+
function setAttachShadow(attachShadowImpl) {
|
|
590
|
+
attachShadow$1 = attachShadowImpl;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
let getProperty$1;
|
|
594
|
+
|
|
595
|
+
function setGetProperty(getPropertyImpl) {
|
|
596
|
+
getProperty$1 = getPropertyImpl;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
let setProperty$1;
|
|
600
|
+
|
|
601
|
+
function setSetProperty(setPropertyImpl) {
|
|
602
|
+
setProperty$1 = setPropertyImpl;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
let setText$1;
|
|
606
|
+
|
|
607
|
+
function setSetText(setTextImpl) {
|
|
608
|
+
setText$1 = setTextImpl;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
let getAttribute$1;
|
|
612
|
+
|
|
613
|
+
function setGetAttribute(getAttributeImpl) {
|
|
614
|
+
getAttribute$1 = getAttributeImpl;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
let setAttribute$1;
|
|
618
|
+
|
|
619
|
+
function setSetAttribute(setAttributeImpl) {
|
|
620
|
+
setAttribute$1 = setAttributeImpl;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
let removeAttribute$1;
|
|
624
|
+
|
|
625
|
+
function setRemoveAttribute(removeAttributeImpl) {
|
|
626
|
+
removeAttribute$1 = removeAttributeImpl;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
let addEventListener$1;
|
|
630
|
+
|
|
631
|
+
function setAddEventListener(addEventListenerImpl) {
|
|
632
|
+
addEventListener$1 = addEventListenerImpl;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
let removeEventListener$1;
|
|
636
|
+
|
|
637
|
+
function setRemoveEventListener(removeEventListenerImpl) {
|
|
638
|
+
removeEventListener$1 = removeEventListenerImpl;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
let dispatchEvent$1;
|
|
642
|
+
|
|
643
|
+
function setDispatchEvent(dispatchEventImpl) {
|
|
644
|
+
dispatchEvent$1 = dispatchEventImpl;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
let getClassList$1;
|
|
648
|
+
|
|
649
|
+
function setGetClassList(getClassListImpl) {
|
|
650
|
+
getClassList$1 = getClassListImpl;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
let setCSSStyleProperty$1;
|
|
654
|
+
|
|
655
|
+
function setSetCSSStyleProperty(setCSSStylePropertyImpl) {
|
|
656
|
+
setCSSStyleProperty$1 = setCSSStylePropertyImpl;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
let getBoundingClientRect$1;
|
|
660
|
+
|
|
661
|
+
function setGetBoundingClientRect(getBoundingClientRectImpl) {
|
|
662
|
+
getBoundingClientRect$1 = getBoundingClientRectImpl;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
let querySelector$1;
|
|
666
|
+
|
|
667
|
+
function setQuerySelector(querySelectorImpl) {
|
|
668
|
+
querySelector$1 = querySelectorImpl;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
let querySelectorAll$1;
|
|
672
|
+
|
|
673
|
+
function setQuerySelectorAll(querySelectorAllImpl) {
|
|
674
|
+
querySelectorAll$1 = querySelectorAllImpl;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
let getElementsByTagName$1;
|
|
678
|
+
|
|
679
|
+
function setGetElementsByTagName(getElementsByTagNameImpl) {
|
|
680
|
+
getElementsByTagName$1 = getElementsByTagNameImpl;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
let getElementsByClassName$1;
|
|
684
|
+
|
|
685
|
+
function setGetElementsByClassName(getElementsByClassNameImpl) {
|
|
686
|
+
getElementsByClassName$1 = getElementsByClassNameImpl;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
let getChildren$1;
|
|
690
|
+
|
|
691
|
+
function setGetChildren(getChildrenImpl) {
|
|
692
|
+
getChildren$1 = getChildrenImpl;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
let getChildNodes$1;
|
|
696
|
+
|
|
697
|
+
function setGetChildNodes(getChildNodesImpl) {
|
|
698
|
+
getChildNodes$1 = getChildNodesImpl;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
let getFirstChild$1;
|
|
702
|
+
|
|
703
|
+
function setGetFirstChild(getFirstChildImpl) {
|
|
704
|
+
getFirstChild$1 = getFirstChildImpl;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
let getFirstElementChild$1;
|
|
708
|
+
|
|
709
|
+
function setGetFirstElementChild(getFirstElementChildImpl) {
|
|
710
|
+
getFirstElementChild$1 = getFirstElementChildImpl;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
let getLastChild$1;
|
|
714
|
+
|
|
715
|
+
function setGetLastChild(getLastChildImpl) {
|
|
716
|
+
getLastChild$1 = getLastChildImpl;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
let getLastElementChild$1;
|
|
720
|
+
|
|
721
|
+
function setGetLastElementChild(getLastElementChildImpl) {
|
|
722
|
+
getLastElementChild$1 = getLastElementChildImpl;
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
let isConnected$1;
|
|
726
|
+
|
|
727
|
+
function setIsConnected(isConnectedImpl) {
|
|
728
|
+
isConnected$1 = isConnectedImpl;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
let insertGlobalStylesheet$1;
|
|
732
|
+
|
|
733
|
+
function setInsertGlobalStylesheet(insertGlobalStylesheetImpl) {
|
|
734
|
+
insertGlobalStylesheet$1 = insertGlobalStylesheetImpl;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
let insertStylesheet$1;
|
|
738
|
+
|
|
739
|
+
function setInsertStylesheet(insertStylesheetImpl) {
|
|
740
|
+
insertStylesheet$1 = insertStylesheetImpl;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
let defineCustomElement$1;
|
|
744
|
+
|
|
745
|
+
function setDefineCustomElement(defineCustomElementImpl) {
|
|
746
|
+
defineCustomElement$1 = defineCustomElementImpl;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
let getCustomElement$1;
|
|
750
|
+
|
|
751
|
+
function setGetCustomElement(getCustomElementImpl) {
|
|
752
|
+
getCustomElement$1 = getCustomElementImpl;
|
|
753
|
+
}
|
|
517
754
|
/*
|
|
518
755
|
* Copyright (c) 2019, salesforce.com, inc.
|
|
519
756
|
* All rights reserved.
|
|
@@ -756,9 +993,6 @@
|
|
|
756
993
|
elm,
|
|
757
994
|
data: {
|
|
758
995
|
on
|
|
759
|
-
},
|
|
760
|
-
owner: {
|
|
761
|
-
renderer
|
|
762
996
|
}
|
|
763
997
|
} = vnode;
|
|
764
998
|
|
|
@@ -771,7 +1005,7 @@
|
|
|
771
1005
|
let name;
|
|
772
1006
|
|
|
773
1007
|
for (name in on) {
|
|
774
|
-
|
|
1008
|
+
addEventListener$1(elm, name, listener);
|
|
775
1009
|
}
|
|
776
1010
|
}
|
|
777
1011
|
|
|
@@ -913,9 +1147,6 @@
|
|
|
913
1147
|
const {
|
|
914
1148
|
data: {
|
|
915
1149
|
attrs
|
|
916
|
-
},
|
|
917
|
-
owner: {
|
|
918
|
-
renderer
|
|
919
1150
|
}
|
|
920
1151
|
} = vnode;
|
|
921
1152
|
|
|
@@ -934,10 +1165,6 @@
|
|
|
934
1165
|
}
|
|
935
1166
|
|
|
936
1167
|
const elm = vnode.elm;
|
|
937
|
-
const {
|
|
938
|
-
setAttribute,
|
|
939
|
-
removeAttribute
|
|
940
|
-
} = renderer;
|
|
941
1168
|
let key;
|
|
942
1169
|
oldAttrs = isUndefined$1(oldAttrs) ? EmptyObject : oldAttrs; // update modified attributes, add new attributes
|
|
943
1170
|
// this routine is only useful for data-* attributes in all kind of elements
|
|
@@ -952,14 +1179,14 @@
|
|
|
952
1179
|
|
|
953
1180
|
if (StringCharCodeAt.call(key, 3) === ColonCharCode) {
|
|
954
1181
|
// Assume xml namespace
|
|
955
|
-
setAttribute(elm, key, cur, xmlNS);
|
|
1182
|
+
setAttribute$1(elm, key, cur, xmlNS);
|
|
956
1183
|
} else if (StringCharCodeAt.call(key, 5) === ColonCharCode) {
|
|
957
1184
|
// Assume xlink namespace
|
|
958
|
-
setAttribute(elm, key, cur, xlinkNS);
|
|
959
|
-
} else if (isNull(cur)) {
|
|
960
|
-
removeAttribute(elm, key);
|
|
1185
|
+
setAttribute$1(elm, key, cur, xlinkNS);
|
|
1186
|
+
} else if (isNull(cur) || isUndefined$1(cur)) {
|
|
1187
|
+
removeAttribute$1(elm, key);
|
|
961
1188
|
} else {
|
|
962
|
-
setAttribute(elm, key, cur);
|
|
1189
|
+
setAttribute$1(elm, key, cur);
|
|
963
1190
|
}
|
|
964
1191
|
|
|
965
1192
|
lockAttribute();
|
|
@@ -1003,17 +1230,14 @@
|
|
|
1003
1230
|
const isFirstPatch = isUndefined$1(oldProps);
|
|
1004
1231
|
const {
|
|
1005
1232
|
elm,
|
|
1006
|
-
sel
|
|
1007
|
-
owner: {
|
|
1008
|
-
renderer
|
|
1009
|
-
}
|
|
1233
|
+
sel
|
|
1010
1234
|
} = vnode;
|
|
1011
1235
|
|
|
1012
1236
|
for (const key in props) {
|
|
1013
1237
|
const cur = props[key]; // if it is the first time this element is patched, or the current value is different to the previous value...
|
|
1014
1238
|
|
|
1015
|
-
if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ?
|
|
1016
|
-
|
|
1239
|
+
if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ? getProperty$1(elm, key) : oldProps[key])) {
|
|
1240
|
+
setProperty$1(elm, key, cur);
|
|
1017
1241
|
}
|
|
1018
1242
|
}
|
|
1019
1243
|
}
|
|
@@ -1077,9 +1301,6 @@
|
|
|
1077
1301
|
elm,
|
|
1078
1302
|
data: {
|
|
1079
1303
|
className: newClass
|
|
1080
|
-
},
|
|
1081
|
-
owner: {
|
|
1082
|
-
renderer
|
|
1083
1304
|
}
|
|
1084
1305
|
} = vnode;
|
|
1085
1306
|
const {
|
|
@@ -1092,7 +1313,7 @@
|
|
|
1092
1313
|
return;
|
|
1093
1314
|
}
|
|
1094
1315
|
|
|
1095
|
-
const classList =
|
|
1316
|
+
const classList = getClassList$1(elm);
|
|
1096
1317
|
const newClassMap = getMapFromClassName(newClass);
|
|
1097
1318
|
const oldClassMap = getMapFromClassName(oldClass);
|
|
1098
1319
|
let name;
|
|
@@ -1130,24 +1351,17 @@
|
|
|
1130
1351
|
elm,
|
|
1131
1352
|
data: {
|
|
1132
1353
|
style: newStyle
|
|
1133
|
-
},
|
|
1134
|
-
owner: {
|
|
1135
|
-
renderer
|
|
1136
1354
|
}
|
|
1137
1355
|
} = vnode;
|
|
1138
|
-
const {
|
|
1139
|
-
setAttribute,
|
|
1140
|
-
removeAttribute
|
|
1141
|
-
} = renderer;
|
|
1142
1356
|
|
|
1143
1357
|
if (oldVnode.data.style === newStyle) {
|
|
1144
1358
|
return;
|
|
1145
1359
|
}
|
|
1146
1360
|
|
|
1147
1361
|
if (!isString(newStyle) || newStyle === '') {
|
|
1148
|
-
removeAttribute(elm, 'style');
|
|
1362
|
+
removeAttribute$1(elm, 'style');
|
|
1149
1363
|
} else {
|
|
1150
|
-
setAttribute(elm, 'style', newStyle);
|
|
1364
|
+
setAttribute$1(elm, 'style', newStyle);
|
|
1151
1365
|
}
|
|
1152
1366
|
}
|
|
1153
1367
|
|
|
@@ -1172,9 +1386,6 @@
|
|
|
1172
1386
|
elm,
|
|
1173
1387
|
data: {
|
|
1174
1388
|
classMap
|
|
1175
|
-
},
|
|
1176
|
-
owner: {
|
|
1177
|
-
renderer
|
|
1178
1389
|
}
|
|
1179
1390
|
} = vnode;
|
|
1180
1391
|
|
|
@@ -1182,7 +1393,7 @@
|
|
|
1182
1393
|
return;
|
|
1183
1394
|
}
|
|
1184
1395
|
|
|
1185
|
-
const classList =
|
|
1396
|
+
const classList = getClassList$1(elm);
|
|
1186
1397
|
|
|
1187
1398
|
for (const name in classMap) {
|
|
1188
1399
|
classList.add(name);
|
|
@@ -1206,9 +1417,6 @@
|
|
|
1206
1417
|
elm,
|
|
1207
1418
|
data: {
|
|
1208
1419
|
styleDecls
|
|
1209
|
-
},
|
|
1210
|
-
owner: {
|
|
1211
|
-
renderer
|
|
1212
1420
|
}
|
|
1213
1421
|
} = vnode;
|
|
1214
1422
|
|
|
@@ -1218,7 +1426,7 @@
|
|
|
1218
1426
|
|
|
1219
1427
|
for (let i = 0; i < styleDecls.length; i++) {
|
|
1220
1428
|
const [prop, value, important] = styleDecls[i];
|
|
1221
|
-
|
|
1429
|
+
setCSSStyleProperty$1(elm, prop, value, important);
|
|
1222
1430
|
}
|
|
1223
1431
|
}
|
|
1224
1432
|
|
|
@@ -1232,15 +1440,6 @@
|
|
|
1232
1440
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
1233
1441
|
*/
|
|
1234
1442
|
|
|
1235
|
-
/**
|
|
1236
|
-
@license
|
|
1237
|
-
Copyright (c) 2015 Simon Friis Vindum.
|
|
1238
|
-
This code may only be used under the MIT License found at
|
|
1239
|
-
https://github.com/snabbdom/snabbdom/blob/master/LICENSE
|
|
1240
|
-
Code distributed by Snabbdom as part of the Snabbdom project at
|
|
1241
|
-
https://github.com/snabbdom/snabbdom/
|
|
1242
|
-
*/
|
|
1243
|
-
|
|
1244
1443
|
function isUndef(s) {
|
|
1245
1444
|
return s === undefined;
|
|
1246
1445
|
}
|
|
@@ -1328,7 +1527,7 @@
|
|
|
1328
1527
|
} else if (sameVnode(oldStartVnode, newEndVnode)) {
|
|
1329
1528
|
// Vnode moved right
|
|
1330
1529
|
patchVnode(oldStartVnode, newEndVnode);
|
|
1331
|
-
newEndVnode.hook.move(oldStartVnode, parentElm,
|
|
1530
|
+
newEndVnode.hook.move(oldStartVnode, parentElm, nextSibling$1(oldEndVnode.elm));
|
|
1332
1531
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
1333
1532
|
newEndVnode = newCh[--newEndIdx];
|
|
1334
1533
|
} else if (sameVnode(oldEndVnode, newStartVnode)) {
|
|
@@ -1441,7 +1640,7 @@
|
|
|
1441
1640
|
}
|
|
1442
1641
|
}
|
|
1443
1642
|
/*
|
|
1444
|
-
* Copyright (c)
|
|
1643
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
1445
1644
|
* All rights reserved.
|
|
1446
1645
|
* SPDX-License-Identifier: MIT
|
|
1447
1646
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
@@ -2185,8 +2384,7 @@
|
|
|
2185
2384
|
|
|
2186
2385
|
|
|
2187
2386
|
const LightningElement = function () {
|
|
2188
|
-
|
|
2189
|
-
|
|
2387
|
+
// This should be as performant as possible, while any initialization should be done lazily
|
|
2190
2388
|
if (isNull(vmBeingConstructed)) {
|
|
2191
2389
|
throw new ReferenceError('Illegal constructor');
|
|
2192
2390
|
}
|
|
@@ -2194,8 +2392,7 @@
|
|
|
2194
2392
|
const vm = vmBeingConstructed;
|
|
2195
2393
|
const {
|
|
2196
2394
|
def,
|
|
2197
|
-
elm
|
|
2198
|
-
renderer
|
|
2395
|
+
elm
|
|
2199
2396
|
} = vm;
|
|
2200
2397
|
const {
|
|
2201
2398
|
bridge
|
|
@@ -2228,23 +2425,22 @@
|
|
|
2228
2425
|
if (vm.renderMode === 1
|
|
2229
2426
|
/* Shadow */
|
|
2230
2427
|
) {
|
|
2231
|
-
|
|
2428
|
+
doAttachShadow(vm);
|
|
2232
2429
|
} // Adding extra guard rails in DEV mode.
|
|
2233
2430
|
|
|
2234
2431
|
return this;
|
|
2235
2432
|
};
|
|
2236
2433
|
|
|
2237
|
-
function
|
|
2434
|
+
function doAttachShadow(vm) {
|
|
2238
2435
|
const {
|
|
2239
2436
|
elm,
|
|
2240
2437
|
mode,
|
|
2241
|
-
renderer,
|
|
2242
2438
|
shadowMode,
|
|
2243
2439
|
def: {
|
|
2244
2440
|
ctor
|
|
2245
2441
|
}
|
|
2246
2442
|
} = vm;
|
|
2247
|
-
const cmpRoot =
|
|
2443
|
+
const cmpRoot = attachShadow$1(elm, {
|
|
2248
2444
|
[KEY__SYNTHETIC_MODE]: shadowMode === 1
|
|
2249
2445
|
/* Synthetic */
|
|
2250
2446
|
,
|
|
@@ -2261,163 +2457,121 @@
|
|
|
2261
2457
|
|
|
2262
2458
|
dispatchEvent(event) {
|
|
2263
2459
|
const {
|
|
2264
|
-
elm
|
|
2265
|
-
renderer: {
|
|
2266
|
-
dispatchEvent
|
|
2267
|
-
}
|
|
2460
|
+
elm
|
|
2268
2461
|
} = getAssociatedVM(this);
|
|
2269
|
-
return dispatchEvent(elm, event);
|
|
2462
|
+
return dispatchEvent$1(elm, event);
|
|
2270
2463
|
},
|
|
2271
2464
|
|
|
2272
2465
|
addEventListener(type, listener, options) {
|
|
2273
2466
|
const vm = getAssociatedVM(this);
|
|
2274
2467
|
const {
|
|
2275
|
-
elm
|
|
2276
|
-
renderer: {
|
|
2277
|
-
addEventListener
|
|
2278
|
-
}
|
|
2468
|
+
elm
|
|
2279
2469
|
} = vm;
|
|
2280
2470
|
|
|
2281
2471
|
const wrappedListener = getWrappedComponentsListener(vm, listener);
|
|
2282
|
-
addEventListener(elm, type, wrappedListener, options);
|
|
2472
|
+
addEventListener$1(elm, type, wrappedListener, options);
|
|
2283
2473
|
},
|
|
2284
2474
|
|
|
2285
2475
|
removeEventListener(type, listener, options) {
|
|
2286
2476
|
const vm = getAssociatedVM(this);
|
|
2287
2477
|
const {
|
|
2288
|
-
elm
|
|
2289
|
-
renderer: {
|
|
2290
|
-
removeEventListener
|
|
2291
|
-
}
|
|
2478
|
+
elm
|
|
2292
2479
|
} = vm;
|
|
2293
2480
|
const wrappedListener = getWrappedComponentsListener(vm, listener);
|
|
2294
|
-
removeEventListener(elm, type, wrappedListener, options);
|
|
2481
|
+
removeEventListener$1(elm, type, wrappedListener, options);
|
|
2295
2482
|
},
|
|
2296
2483
|
|
|
2297
2484
|
hasAttribute(name) {
|
|
2298
2485
|
const {
|
|
2299
|
-
elm
|
|
2300
|
-
renderer: {
|
|
2301
|
-
getAttribute
|
|
2302
|
-
}
|
|
2486
|
+
elm
|
|
2303
2487
|
} = getAssociatedVM(this);
|
|
2304
|
-
return !isNull(getAttribute(elm, name));
|
|
2488
|
+
return !isNull(getAttribute$1(elm, name));
|
|
2305
2489
|
},
|
|
2306
2490
|
|
|
2307
2491
|
hasAttributeNS(namespace, name) {
|
|
2308
2492
|
const {
|
|
2309
|
-
elm
|
|
2310
|
-
renderer: {
|
|
2311
|
-
getAttribute
|
|
2312
|
-
}
|
|
2493
|
+
elm
|
|
2313
2494
|
} = getAssociatedVM(this);
|
|
2314
|
-
return !isNull(getAttribute(elm, name, namespace));
|
|
2495
|
+
return !isNull(getAttribute$1(elm, name, namespace));
|
|
2315
2496
|
},
|
|
2316
2497
|
|
|
2317
2498
|
removeAttribute(name) {
|
|
2318
2499
|
const {
|
|
2319
|
-
elm
|
|
2320
|
-
renderer: {
|
|
2321
|
-
removeAttribute
|
|
2322
|
-
}
|
|
2500
|
+
elm
|
|
2323
2501
|
} = getAssociatedVM(this);
|
|
2324
2502
|
unlockAttribute(elm, name);
|
|
2325
|
-
removeAttribute(elm, name);
|
|
2503
|
+
removeAttribute$1(elm, name);
|
|
2326
2504
|
lockAttribute();
|
|
2327
2505
|
},
|
|
2328
2506
|
|
|
2329
2507
|
removeAttributeNS(namespace, name) {
|
|
2330
2508
|
const {
|
|
2331
|
-
elm
|
|
2332
|
-
renderer: {
|
|
2333
|
-
removeAttribute
|
|
2334
|
-
}
|
|
2509
|
+
elm
|
|
2335
2510
|
} = getAssociatedVM(this);
|
|
2336
2511
|
unlockAttribute(elm, name);
|
|
2337
|
-
removeAttribute(elm, name, namespace);
|
|
2512
|
+
removeAttribute$1(elm, name, namespace);
|
|
2338
2513
|
lockAttribute();
|
|
2339
2514
|
},
|
|
2340
2515
|
|
|
2341
2516
|
getAttribute(name) {
|
|
2342
2517
|
const {
|
|
2343
|
-
elm
|
|
2344
|
-
renderer: {
|
|
2345
|
-
getAttribute
|
|
2346
|
-
}
|
|
2518
|
+
elm
|
|
2347
2519
|
} = getAssociatedVM(this);
|
|
2348
|
-
return getAttribute(elm, name);
|
|
2520
|
+
return getAttribute$1(elm, name);
|
|
2349
2521
|
},
|
|
2350
2522
|
|
|
2351
2523
|
getAttributeNS(namespace, name) {
|
|
2352
2524
|
const {
|
|
2353
|
-
elm
|
|
2354
|
-
renderer: {
|
|
2355
|
-
getAttribute
|
|
2356
|
-
}
|
|
2525
|
+
elm
|
|
2357
2526
|
} = getAssociatedVM(this);
|
|
2358
|
-
return getAttribute(elm, name, namespace);
|
|
2527
|
+
return getAttribute$1(elm, name, namespace);
|
|
2359
2528
|
},
|
|
2360
2529
|
|
|
2361
2530
|
setAttribute(name, value) {
|
|
2362
2531
|
const vm = getAssociatedVM(this);
|
|
2363
2532
|
const {
|
|
2364
|
-
elm
|
|
2365
|
-
renderer: {
|
|
2366
|
-
setAttribute
|
|
2367
|
-
}
|
|
2533
|
+
elm
|
|
2368
2534
|
} = vm;
|
|
2369
2535
|
|
|
2370
2536
|
unlockAttribute(elm, name);
|
|
2371
|
-
setAttribute(elm, name, value);
|
|
2537
|
+
setAttribute$1(elm, name, value);
|
|
2372
2538
|
lockAttribute();
|
|
2373
2539
|
},
|
|
2374
2540
|
|
|
2375
2541
|
setAttributeNS(namespace, name, value) {
|
|
2376
2542
|
const vm = getAssociatedVM(this);
|
|
2377
2543
|
const {
|
|
2378
|
-
elm
|
|
2379
|
-
renderer: {
|
|
2380
|
-
setAttribute
|
|
2381
|
-
}
|
|
2544
|
+
elm
|
|
2382
2545
|
} = vm;
|
|
2383
2546
|
|
|
2384
2547
|
unlockAttribute(elm, name);
|
|
2385
|
-
setAttribute(elm, name, value, namespace);
|
|
2548
|
+
setAttribute$1(elm, name, value, namespace);
|
|
2386
2549
|
lockAttribute();
|
|
2387
2550
|
},
|
|
2388
2551
|
|
|
2389
2552
|
getBoundingClientRect() {
|
|
2390
2553
|
const vm = getAssociatedVM(this);
|
|
2391
2554
|
const {
|
|
2392
|
-
elm
|
|
2393
|
-
renderer: {
|
|
2394
|
-
getBoundingClientRect
|
|
2395
|
-
}
|
|
2555
|
+
elm
|
|
2396
2556
|
} = vm;
|
|
2397
2557
|
|
|
2398
|
-
return getBoundingClientRect(elm);
|
|
2558
|
+
return getBoundingClientRect$1(elm);
|
|
2399
2559
|
},
|
|
2400
2560
|
|
|
2401
2561
|
get isConnected() {
|
|
2402
2562
|
const {
|
|
2403
|
-
elm
|
|
2404
|
-
renderer: {
|
|
2405
|
-
isConnected
|
|
2406
|
-
}
|
|
2563
|
+
elm
|
|
2407
2564
|
} = getAssociatedVM(this);
|
|
2408
|
-
return isConnected(elm);
|
|
2565
|
+
return isConnected$1(elm);
|
|
2409
2566
|
},
|
|
2410
2567
|
|
|
2411
2568
|
get classList() {
|
|
2412
2569
|
const vm = getAssociatedVM(this);
|
|
2413
2570
|
const {
|
|
2414
|
-
elm
|
|
2415
|
-
renderer: {
|
|
2416
|
-
getClassList
|
|
2417
|
-
}
|
|
2571
|
+
elm
|
|
2418
2572
|
} = vm;
|
|
2419
2573
|
|
|
2420
|
-
return getClassList(elm);
|
|
2574
|
+
return getClassList$1(elm);
|
|
2421
2575
|
},
|
|
2422
2576
|
|
|
2423
2577
|
get template() {
|
|
@@ -2443,19 +2597,44 @@
|
|
|
2443
2597
|
}
|
|
2444
2598
|
|
|
2445
2599
|
};
|
|
2446
|
-
const queryAndChildGetterDescriptors = create(null);
|
|
2447
|
-
|
|
2600
|
+
const queryAndChildGetterDescriptors = create(null); // The reason we don't just call `import * as renderer from '../renderer'` here is that the bundle size
|
|
2601
|
+
// is smaller if we reference each function individually. Otherwise Rollup will create one big frozen
|
|
2602
|
+
// object representing the renderer, with a lot of methods we don't actually need.
|
|
2603
|
+
|
|
2604
|
+
const childGetters = ['children', 'childNodes', 'firstChild', 'firstElementChild', 'lastChild', 'lastElementChild'];
|
|
2605
|
+
|
|
2606
|
+
function getChildGetter(methodName) {
|
|
2607
|
+
switch (methodName) {
|
|
2608
|
+
case 'children':
|
|
2609
|
+
return getChildren$1;
|
|
2610
|
+
|
|
2611
|
+
case 'childNodes':
|
|
2612
|
+
return getChildNodes$1;
|
|
2613
|
+
|
|
2614
|
+
case 'firstChild':
|
|
2615
|
+
return getFirstChild$1;
|
|
2448
2616
|
|
|
2449
|
-
|
|
2450
|
-
|
|
2617
|
+
case 'firstElementChild':
|
|
2618
|
+
return getFirstElementChild$1;
|
|
2619
|
+
|
|
2620
|
+
case 'lastChild':
|
|
2621
|
+
return getLastChild$1;
|
|
2622
|
+
|
|
2623
|
+
case 'lastElementChild':
|
|
2624
|
+
return getLastElementChild$1;
|
|
2625
|
+
}
|
|
2626
|
+
} // Generic passthrough for child getters on HTMLElement to the relevant Renderer APIs
|
|
2627
|
+
|
|
2628
|
+
|
|
2629
|
+
for (const childGetter of childGetters) {
|
|
2630
|
+
queryAndChildGetterDescriptors[childGetter] = {
|
|
2451
2631
|
get() {
|
|
2452
2632
|
const vm = getAssociatedVM(this);
|
|
2453
2633
|
const {
|
|
2454
|
-
elm
|
|
2455
|
-
renderer
|
|
2634
|
+
elm
|
|
2456
2635
|
} = vm;
|
|
2457
2636
|
|
|
2458
|
-
return
|
|
2637
|
+
return getChildGetter(childGetter)(elm);
|
|
2459
2638
|
},
|
|
2460
2639
|
|
|
2461
2640
|
configurable: true,
|
|
@@ -2463,18 +2642,34 @@
|
|
|
2463
2642
|
};
|
|
2464
2643
|
}
|
|
2465
2644
|
|
|
2466
|
-
const queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll'];
|
|
2645
|
+
const queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll'];
|
|
2646
|
+
|
|
2647
|
+
function getQueryMethod(methodName) {
|
|
2648
|
+
switch (methodName) {
|
|
2649
|
+
case 'getElementsByClassName':
|
|
2650
|
+
return getElementsByClassName$1;
|
|
2651
|
+
|
|
2652
|
+
case 'getElementsByTagName':
|
|
2653
|
+
return getElementsByTagName$1;
|
|
2654
|
+
|
|
2655
|
+
case 'querySelector':
|
|
2656
|
+
return querySelector$1;
|
|
2657
|
+
|
|
2658
|
+
case 'querySelectorAll':
|
|
2659
|
+
return querySelectorAll$1;
|
|
2660
|
+
}
|
|
2661
|
+
} // Generic passthrough for query APIs on HTMLElement to the relevant Renderer APIs
|
|
2662
|
+
|
|
2467
2663
|
|
|
2468
2664
|
for (const queryMethod of queryMethods) {
|
|
2469
2665
|
queryAndChildGetterDescriptors[queryMethod] = {
|
|
2470
2666
|
value(arg) {
|
|
2471
2667
|
const vm = getAssociatedVM(this);
|
|
2472
2668
|
const {
|
|
2473
|
-
elm
|
|
2474
|
-
renderer
|
|
2669
|
+
elm
|
|
2475
2670
|
} = vm;
|
|
2476
2671
|
|
|
2477
|
-
return
|
|
2672
|
+
return getQueryMethod(queryMethod)(elm, arg);
|
|
2478
2673
|
},
|
|
2479
2674
|
|
|
2480
2675
|
configurable: true,
|
|
@@ -3408,39 +3603,30 @@
|
|
|
3408
3603
|
const token = cmpTemplate === null || cmpTemplate === void 0 ? void 0 : cmpTemplate.stylesheetToken;
|
|
3409
3604
|
|
|
3410
3605
|
if (!isUndefined$1(token) && context.hasScopedStyles) {
|
|
3411
|
-
|
|
3606
|
+
getClassList$1(elm).add(token);
|
|
3412
3607
|
}
|
|
3413
3608
|
}
|
|
3414
3609
|
|
|
3415
3610
|
function updateNodeHook(oldVnode, vnode) {
|
|
3416
3611
|
const {
|
|
3417
3612
|
elm,
|
|
3418
|
-
text
|
|
3419
|
-
owner: {
|
|
3420
|
-
renderer
|
|
3421
|
-
}
|
|
3613
|
+
text
|
|
3422
3614
|
} = vnode;
|
|
3423
3615
|
|
|
3424
3616
|
if (oldVnode.text !== text) {
|
|
3425
3617
|
|
|
3426
|
-
|
|
3618
|
+
setText$1(elm, text);
|
|
3427
3619
|
}
|
|
3428
3620
|
}
|
|
3429
3621
|
|
|
3430
3622
|
function insertNodeHook(vnode, parentNode, referenceNode) {
|
|
3431
|
-
const {
|
|
3432
|
-
renderer
|
|
3433
|
-
} = vnode.owner;
|
|
3434
3623
|
|
|
3435
|
-
|
|
3624
|
+
insert$1(vnode.elm, parentNode, referenceNode);
|
|
3436
3625
|
}
|
|
3437
3626
|
|
|
3438
3627
|
function removeNodeHook(vnode, parentNode) {
|
|
3439
|
-
const {
|
|
3440
|
-
renderer
|
|
3441
|
-
} = vnode.owner;
|
|
3442
3628
|
|
|
3443
|
-
|
|
3629
|
+
remove$1(vnode.elm, parentNode);
|
|
3444
3630
|
}
|
|
3445
3631
|
|
|
3446
3632
|
function createElmHook(vnode) {
|
|
@@ -3584,8 +3770,7 @@
|
|
|
3584
3770
|
createVM(elm, def, {
|
|
3585
3771
|
mode,
|
|
3586
3772
|
owner,
|
|
3587
|
-
tagName: sel
|
|
3588
|
-
renderer: owner.renderer
|
|
3773
|
+
tagName: sel
|
|
3589
3774
|
});
|
|
3590
3775
|
}
|
|
3591
3776
|
|
|
@@ -3681,12 +3866,12 @@
|
|
|
3681
3866
|
*/
|
|
3682
3867
|
|
|
3683
3868
|
|
|
3684
|
-
function getUpgradableConstructor(tagName
|
|
3869
|
+
function getUpgradableConstructor(tagName) {
|
|
3685
3870
|
// Should never get a tag with upper case letter at this point, the compiler should
|
|
3686
3871
|
// produce only tags with lowercase letters
|
|
3687
3872
|
// But, for backwards compatibility, we will lower case the tagName
|
|
3688
3873
|
tagName = tagName.toLowerCase();
|
|
3689
|
-
let CE =
|
|
3874
|
+
let CE = getCustomElement$1(tagName);
|
|
3690
3875
|
|
|
3691
3876
|
if (!isUndefined$1(CE)) {
|
|
3692
3877
|
return CE;
|
|
@@ -3697,7 +3882,7 @@
|
|
|
3697
3882
|
*/
|
|
3698
3883
|
|
|
3699
3884
|
|
|
3700
|
-
CE = class LWCUpgradableElement extends
|
|
3885
|
+
CE = class LWCUpgradableElement extends HTMLElementExported$1 {
|
|
3701
3886
|
constructor(upgradeCallback) {
|
|
3702
3887
|
super();
|
|
3703
3888
|
|
|
@@ -3707,7 +3892,7 @@
|
|
|
3707
3892
|
}
|
|
3708
3893
|
|
|
3709
3894
|
};
|
|
3710
|
-
|
|
3895
|
+
defineCustomElement$1(tagName, CE);
|
|
3711
3896
|
return CE;
|
|
3712
3897
|
}
|
|
3713
3898
|
/*
|
|
@@ -3725,10 +3910,7 @@
|
|
|
3725
3910
|
const {
|
|
3726
3911
|
owner
|
|
3727
3912
|
} = vnode;
|
|
3728
|
-
const
|
|
3729
|
-
renderer
|
|
3730
|
-
} = owner;
|
|
3731
|
-
const elm = renderer.createText(vnode.text);
|
|
3913
|
+
const elm = createText$1(vnode.text);
|
|
3732
3914
|
linkNodeToShadow(elm, owner);
|
|
3733
3915
|
vnode.elm = elm;
|
|
3734
3916
|
},
|
|
@@ -3750,10 +3932,7 @@
|
|
|
3750
3932
|
owner,
|
|
3751
3933
|
text
|
|
3752
3934
|
} = vnode;
|
|
3753
|
-
const
|
|
3754
|
-
renderer
|
|
3755
|
-
} = owner;
|
|
3756
|
-
const elm = renderer.createComment(text);
|
|
3935
|
+
const elm = createComment$1(text);
|
|
3757
3936
|
linkNodeToShadow(elm, owner);
|
|
3758
3937
|
vnode.elm = elm;
|
|
3759
3938
|
},
|
|
@@ -3783,11 +3962,8 @@
|
|
|
3783
3962
|
svg
|
|
3784
3963
|
}
|
|
3785
3964
|
} = vnode;
|
|
3786
|
-
const {
|
|
3787
|
-
renderer
|
|
3788
|
-
} = owner;
|
|
3789
3965
|
const namespace = isTrue(svg) ? SVG_NAMESPACE : undefined;
|
|
3790
|
-
const elm =
|
|
3966
|
+
const elm = createElement$2(sel, namespace);
|
|
3791
3967
|
linkNodeToShadow(elm, owner);
|
|
3792
3968
|
fallbackElmHook(elm, vnode);
|
|
3793
3969
|
vnode.elm = elm;
|
|
@@ -3847,10 +4023,7 @@
|
|
|
3847
4023
|
sel,
|
|
3848
4024
|
owner
|
|
3849
4025
|
} = vnode;
|
|
3850
|
-
const
|
|
3851
|
-
renderer
|
|
3852
|
-
} = owner;
|
|
3853
|
-
const UpgradableConstructor = getUpgradableConstructor(sel, renderer);
|
|
4026
|
+
const UpgradableConstructor = getUpgradableConstructor(sel);
|
|
3854
4027
|
/**
|
|
3855
4028
|
* Note: if the upgradable constructor does not expect, or throw when we new it
|
|
3856
4029
|
* with a callback as the first argument, we could implement a more advanced
|
|
@@ -3935,8 +4108,7 @@
|
|
|
3935
4108
|
createVM(elm, def, {
|
|
3936
4109
|
mode,
|
|
3937
4110
|
owner,
|
|
3938
|
-
tagName: sel
|
|
3939
|
-
renderer: owner.renderer
|
|
4111
|
+
tagName: sel
|
|
3940
4112
|
});
|
|
3941
4113
|
vnode.elm = elm;
|
|
3942
4114
|
const vm = getAssociatedVM(elm);
|
|
@@ -3959,12 +4131,11 @@
|
|
|
3959
4131
|
|
|
3960
4132
|
function linkNodeToShadow(elm, owner) {
|
|
3961
4133
|
const {
|
|
3962
|
-
renderer,
|
|
3963
4134
|
renderMode,
|
|
3964
4135
|
shadowMode
|
|
3965
4136
|
} = owner; // TODO [#1164]: this should eventually be done by the polyfill directly
|
|
3966
4137
|
|
|
3967
|
-
if (
|
|
4138
|
+
if (isSyntheticShadowDefined$1) {
|
|
3968
4139
|
if (shadowMode === 1
|
|
3969
4140
|
/* Synthetic */
|
|
3970
4141
|
|| renderMode === 0
|
|
@@ -4372,7 +4543,6 @@
|
|
|
4372
4543
|
const {
|
|
4373
4544
|
elm,
|
|
4374
4545
|
context,
|
|
4375
|
-
renderer,
|
|
4376
4546
|
renderMode,
|
|
4377
4547
|
shadowMode
|
|
4378
4548
|
} = vm;
|
|
@@ -4399,11 +4569,11 @@
|
|
|
4399
4569
|
} = context;
|
|
4400
4570
|
|
|
4401
4571
|
if (oldHasTokenInClass) {
|
|
4402
|
-
|
|
4572
|
+
getClassList$1(elm).remove(makeHostToken(oldToken));
|
|
4403
4573
|
}
|
|
4404
4574
|
|
|
4405
4575
|
if (oldHasTokenInAttribute) {
|
|
4406
|
-
|
|
4576
|
+
removeAttribute$1(elm, makeHostToken(oldToken));
|
|
4407
4577
|
} // Apply the new template styling token to the host element, if the new template has any
|
|
4408
4578
|
// associated stylesheets. In the case of light DOM, also ensure there is at least one scoped stylesheet.
|
|
4409
4579
|
|
|
@@ -4415,12 +4585,12 @@
|
|
|
4415
4585
|
|
|
4416
4586
|
if (!isUndefined$1(newToken)) {
|
|
4417
4587
|
if (hasScopedStyles) {
|
|
4418
|
-
|
|
4588
|
+
getClassList$1(elm).add(makeHostToken(newToken));
|
|
4419
4589
|
newHasTokenInClass = true;
|
|
4420
4590
|
}
|
|
4421
4591
|
|
|
4422
4592
|
if (isSyntheticShadow) {
|
|
4423
|
-
|
|
4593
|
+
setAttribute$1(elm, makeHostToken(newToken), '');
|
|
4424
4594
|
newHasTokenInAttribute = true;
|
|
4425
4595
|
}
|
|
4426
4596
|
} // Update the styling tokens present on the context object.
|
|
@@ -4535,7 +4705,6 @@
|
|
|
4535
4705
|
|
|
4536
4706
|
function createStylesheet(vm, stylesheets) {
|
|
4537
4707
|
const {
|
|
4538
|
-
renderer,
|
|
4539
4708
|
renderMode,
|
|
4540
4709
|
shadowMode
|
|
4541
4710
|
} = vm;
|
|
@@ -4546,9 +4715,9 @@
|
|
|
4546
4715
|
/* Synthetic */
|
|
4547
4716
|
) {
|
|
4548
4717
|
for (let i = 0; i < stylesheets.length; i++) {
|
|
4549
|
-
|
|
4718
|
+
insertGlobalStylesheet$1(stylesheets[i]);
|
|
4550
4719
|
}
|
|
4551
|
-
} else if (
|
|
4720
|
+
} else if (ssr$1 || isHydrating$1()) {
|
|
4552
4721
|
// Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
|
|
4553
4722
|
// This works in the client, because the stylesheets are created, and cached in the VM
|
|
4554
4723
|
// the first time the VM renders.
|
|
@@ -4562,10 +4731,10 @@
|
|
|
4562
4731
|
|
|
4563
4732
|
for (let i = 0; i < stylesheets.length; i++) {
|
|
4564
4733
|
if (isGlobal) {
|
|
4565
|
-
|
|
4734
|
+
insertGlobalStylesheet$1(stylesheets[i]);
|
|
4566
4735
|
} else {
|
|
4567
4736
|
// local level
|
|
4568
|
-
|
|
4737
|
+
insertStylesheet$1(stylesheets[i], root.cmpRoot);
|
|
4569
4738
|
}
|
|
4570
4739
|
}
|
|
4571
4740
|
}
|
|
@@ -5120,7 +5289,6 @@
|
|
|
5120
5289
|
const {
|
|
5121
5290
|
mode,
|
|
5122
5291
|
owner,
|
|
5123
|
-
renderer,
|
|
5124
5292
|
tagName
|
|
5125
5293
|
} = options;
|
|
5126
5294
|
const vm = {
|
|
@@ -5135,7 +5303,6 @@
|
|
|
5135
5303
|
tagName,
|
|
5136
5304
|
mode,
|
|
5137
5305
|
owner,
|
|
5138
|
-
renderer,
|
|
5139
5306
|
children: EmptyArray,
|
|
5140
5307
|
aChildren: EmptyArray,
|
|
5141
5308
|
velements: EmptyArray,
|
|
@@ -5178,16 +5345,11 @@
|
|
|
5178
5345
|
|
|
5179
5346
|
function computeShadowMode(vm) {
|
|
5180
5347
|
const {
|
|
5181
|
-
def
|
|
5182
|
-
renderer
|
|
5348
|
+
def
|
|
5183
5349
|
} = vm;
|
|
5184
|
-
const {
|
|
5185
|
-
isNativeShadowDefined,
|
|
5186
|
-
isSyntheticShadowDefined
|
|
5187
|
-
} = renderer;
|
|
5188
5350
|
let shadowMode;
|
|
5189
5351
|
|
|
5190
|
-
if (isSyntheticShadowDefined) {
|
|
5352
|
+
if (isSyntheticShadowDefined$1) {
|
|
5191
5353
|
if (def.renderMode === 0
|
|
5192
5354
|
/* Light */
|
|
5193
5355
|
) {
|
|
@@ -5196,7 +5358,7 @@
|
|
|
5196
5358
|
shadowMode = 0
|
|
5197
5359
|
/* Native */
|
|
5198
5360
|
;
|
|
5199
|
-
} else if (isNativeShadowDefined) {
|
|
5361
|
+
} else if (isNativeShadowDefined$1) {
|
|
5200
5362
|
if (def.shadowSupportMode === "any"
|
|
5201
5363
|
/* Any */
|
|
5202
5364
|
) {
|
|
@@ -5320,13 +5482,12 @@
|
|
|
5320
5482
|
|
|
5321
5483
|
function runRenderedCallback(vm) {
|
|
5322
5484
|
const {
|
|
5323
|
-
renderer,
|
|
5324
5485
|
def: {
|
|
5325
5486
|
renderedCallback
|
|
5326
5487
|
}
|
|
5327
5488
|
} = vm;
|
|
5328
5489
|
|
|
5329
|
-
if (isTrue(
|
|
5490
|
+
if (isTrue(ssr$1)) {
|
|
5330
5491
|
return;
|
|
5331
5492
|
}
|
|
5332
5493
|
|
|
@@ -5543,8 +5704,7 @@
|
|
|
5543
5704
|
|
|
5544
5705
|
function resetComponentRoot(vm) {
|
|
5545
5706
|
const {
|
|
5546
|
-
children
|
|
5547
|
-
renderer
|
|
5707
|
+
children
|
|
5548
5708
|
} = vm;
|
|
5549
5709
|
const rootNode = getRenderRoot(vm);
|
|
5550
5710
|
|
|
@@ -5552,7 +5712,7 @@
|
|
|
5552
5712
|
const child = children[i];
|
|
5553
5713
|
|
|
5554
5714
|
if (!isNull(child) && !isUndefined$1(child.elm)) {
|
|
5555
|
-
|
|
5715
|
+
remove$1(child.elm, rootNode);
|
|
5556
5716
|
}
|
|
5557
5717
|
}
|
|
5558
5718
|
|
|
@@ -5562,7 +5722,7 @@
|
|
|
5562
5722
|
}
|
|
5563
5723
|
|
|
5564
5724
|
function scheduleRehydration(vm) {
|
|
5565
|
-
if (isTrue(
|
|
5725
|
+
if (isTrue(ssr$1) || isTrue(vm.isScheduled)) {
|
|
5566
5726
|
return;
|
|
5567
5727
|
}
|
|
5568
5728
|
|
|
@@ -5789,7 +5949,6 @@
|
|
|
5789
5949
|
|
|
5790
5950
|
const {
|
|
5791
5951
|
elm,
|
|
5792
|
-
renderer,
|
|
5793
5952
|
context: {
|
|
5794
5953
|
wiredConnecting,
|
|
5795
5954
|
wiredDisconnecting
|
|
@@ -5816,7 +5975,7 @@
|
|
|
5816
5975
|
}
|
|
5817
5976
|
|
|
5818
5977
|
});
|
|
5819
|
-
|
|
5978
|
+
dispatchEvent$1(elm, contextRegistrationEvent);
|
|
5820
5979
|
});
|
|
5821
5980
|
}
|
|
5822
5981
|
|
|
@@ -6071,7 +6230,7 @@
|
|
|
6071
6230
|
hooksAreSet = true;
|
|
6072
6231
|
setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
|
|
6073
6232
|
}
|
|
6074
|
-
/* version: 2.7.
|
|
6233
|
+
/* version: 2.7.2 */
|
|
6075
6234
|
|
|
6076
6235
|
/*
|
|
6077
6236
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -6091,7 +6250,9 @@
|
|
|
6091
6250
|
const styleElements = create(null);
|
|
6092
6251
|
const styleSheets = create(null);
|
|
6093
6252
|
const nodesToStyleSheets = new WeakMap();
|
|
6094
|
-
let getCustomElement
|
|
6253
|
+
let getCustomElement;
|
|
6254
|
+
let defineCustomElement;
|
|
6255
|
+
let HTMLElementConstructor;
|
|
6095
6256
|
|
|
6096
6257
|
function isCustomElementRegistryAvailable() {
|
|
6097
6258
|
if (typeof customElements === 'undefined') {
|
|
@@ -6206,182 +6367,213 @@
|
|
|
6206
6367
|
HTMLElementConstructor.prototype = HTMLElement.prototype;
|
|
6207
6368
|
}
|
|
6208
6369
|
|
|
6209
|
-
let
|
|
6370
|
+
let hydrating = false;
|
|
6210
6371
|
|
|
6211
|
-
function setIsHydrating(
|
|
6212
|
-
|
|
6372
|
+
function setIsHydrating(value) {
|
|
6373
|
+
hydrating = value;
|
|
6213
6374
|
}
|
|
6214
6375
|
|
|
6215
|
-
const
|
|
6216
|
-
ssr: false,
|
|
6376
|
+
const ssr = false;
|
|
6217
6377
|
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
isNativeShadowDefined: _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED],
|
|
6223
|
-
isSyntheticShadowDefined: hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN),
|
|
6224
|
-
|
|
6225
|
-
createElement(tagName, namespace) {
|
|
6226
|
-
return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
|
|
6227
|
-
},
|
|
6378
|
+
function isHydrating() {
|
|
6379
|
+
return hydrating;
|
|
6380
|
+
}
|
|
6228
6381
|
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
},
|
|
6382
|
+
const isNativeShadowDefined = _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED];
|
|
6383
|
+
const isSyntheticShadowDefined = hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN);
|
|
6232
6384
|
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
6385
|
+
function createElement$1(tagName, namespace) {
|
|
6386
|
+
return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
|
|
6387
|
+
}
|
|
6236
6388
|
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
|
|
6389
|
+
function createText(content) {
|
|
6390
|
+
return document.createTextNode(content);
|
|
6391
|
+
}
|
|
6240
6392
|
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6393
|
+
function createComment(content) {
|
|
6394
|
+
return document.createComment(content);
|
|
6395
|
+
}
|
|
6244
6396
|
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6397
|
+
function insert(node, parent, anchor) {
|
|
6398
|
+
parent.insertBefore(node, anchor);
|
|
6399
|
+
}
|
|
6248
6400
|
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
}
|
|
6401
|
+
function remove(node, parent) {
|
|
6402
|
+
parent.removeChild(node);
|
|
6403
|
+
}
|
|
6253
6404
|
|
|
6254
|
-
|
|
6255
|
-
|
|
6405
|
+
function nextSibling(node) {
|
|
6406
|
+
return node.nextSibling;
|
|
6407
|
+
}
|
|
6256
6408
|
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6409
|
+
function attachShadow(element, options) {
|
|
6410
|
+
if (hydrating) {
|
|
6411
|
+
return element.shadowRoot;
|
|
6412
|
+
}
|
|
6260
6413
|
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
},
|
|
6414
|
+
return element.attachShadow(options);
|
|
6415
|
+
}
|
|
6264
6416
|
|
|
6265
|
-
|
|
6417
|
+
function setText(node, content) {
|
|
6418
|
+
node.nodeValue = content;
|
|
6419
|
+
}
|
|
6266
6420
|
|
|
6267
|
-
|
|
6268
|
-
|
|
6421
|
+
function getProperty(node, key) {
|
|
6422
|
+
return node[key];
|
|
6423
|
+
}
|
|
6269
6424
|
|
|
6270
|
-
|
|
6271
|
-
return isUndefined$1(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
|
|
6272
|
-
},
|
|
6425
|
+
function setProperty(node, key, value) {
|
|
6273
6426
|
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
},
|
|
6427
|
+
node[key] = value;
|
|
6428
|
+
}
|
|
6277
6429
|
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
} else {
|
|
6282
|
-
element.removeAttributeNS(namespace, name);
|
|
6283
|
-
}
|
|
6284
|
-
},
|
|
6430
|
+
function getAttribute(element, name, namespace) {
|
|
6431
|
+
return isUndefined$1(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
|
|
6432
|
+
}
|
|
6285
6433
|
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6434
|
+
function setAttribute(element, name, value, namespace) {
|
|
6435
|
+
return isUndefined$1(namespace) ? element.setAttribute(name, value) : element.setAttributeNS(namespace, name, value);
|
|
6436
|
+
}
|
|
6289
6437
|
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6438
|
+
function removeAttribute(element, name, namespace) {
|
|
6439
|
+
if (isUndefined$1(namespace)) {
|
|
6440
|
+
element.removeAttribute(name);
|
|
6441
|
+
} else {
|
|
6442
|
+
element.removeAttributeNS(namespace, name);
|
|
6443
|
+
}
|
|
6444
|
+
}
|
|
6293
6445
|
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6446
|
+
function addEventListener(target, type, callback, options) {
|
|
6447
|
+
target.addEventListener(type, callback, options);
|
|
6448
|
+
}
|
|
6297
6449
|
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6450
|
+
function removeEventListener(target, type, callback, options) {
|
|
6451
|
+
target.removeEventListener(type, callback, options);
|
|
6452
|
+
}
|
|
6301
6453
|
|
|
6302
|
-
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
|
-
element.style.setProperty(name, value, important ? 'important' : '');
|
|
6306
|
-
},
|
|
6454
|
+
function dispatchEvent(target, event) {
|
|
6455
|
+
return target.dispatchEvent(event);
|
|
6456
|
+
}
|
|
6307
6457
|
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6458
|
+
function getClassList(element) {
|
|
6459
|
+
return element.classList;
|
|
6460
|
+
}
|
|
6311
6461
|
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
|
|
6462
|
+
function setCSSStyleProperty(element, name, value, important) {
|
|
6463
|
+
// TODO [#0]: How to avoid this type casting? Shall we use a different type interface to
|
|
6464
|
+
// represent elements in the engine?
|
|
6465
|
+
element.style.setProperty(name, value, important ? 'important' : '');
|
|
6466
|
+
}
|
|
6315
6467
|
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
6468
|
+
function getBoundingClientRect(element) {
|
|
6469
|
+
return element.getBoundingClientRect();
|
|
6470
|
+
}
|
|
6319
6471
|
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
|
|
6472
|
+
function querySelector(element, selectors) {
|
|
6473
|
+
return element.querySelector(selectors);
|
|
6474
|
+
}
|
|
6323
6475
|
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6476
|
+
function querySelectorAll(element, selectors) {
|
|
6477
|
+
return element.querySelectorAll(selectors);
|
|
6478
|
+
}
|
|
6327
6479
|
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
|
|
6480
|
+
function getElementsByTagName(element, tagNameOrWildCard) {
|
|
6481
|
+
return element.getElementsByTagName(tagNameOrWildCard);
|
|
6482
|
+
}
|
|
6331
6483
|
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6484
|
+
function getElementsByClassName(element, names) {
|
|
6485
|
+
return element.getElementsByClassName(names);
|
|
6486
|
+
}
|
|
6335
6487
|
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6488
|
+
function getChildren(element) {
|
|
6489
|
+
return element.children;
|
|
6490
|
+
}
|
|
6339
6491
|
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6492
|
+
function getChildNodes(element) {
|
|
6493
|
+
return element.childNodes;
|
|
6494
|
+
}
|
|
6343
6495
|
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6496
|
+
function getFirstChild(element) {
|
|
6497
|
+
return element.firstChild;
|
|
6498
|
+
}
|
|
6347
6499
|
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6500
|
+
function getFirstElementChild(element) {
|
|
6501
|
+
return element.firstElementChild;
|
|
6502
|
+
}
|
|
6351
6503
|
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6504
|
+
function getLastChild(element) {
|
|
6505
|
+
return element.lastChild;
|
|
6506
|
+
}
|
|
6355
6507
|
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
}
|
|
6508
|
+
function getLastElementChild(element) {
|
|
6509
|
+
return element.lastElementChild;
|
|
6510
|
+
}
|
|
6360
6511
|
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
elm.textContent = content;
|
|
6365
|
-
globalStylesheetsParentElement.appendChild(elm);
|
|
6366
|
-
},
|
|
6512
|
+
function isConnected(node) {
|
|
6513
|
+
return node.isConnected;
|
|
6514
|
+
}
|
|
6367
6515
|
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
// Fall back to <style> element
|
|
6373
|
-
insertStyleElement(content, target);
|
|
6374
|
-
}
|
|
6375
|
-
},
|
|
6516
|
+
function insertGlobalStylesheet(content) {
|
|
6517
|
+
if (!isUndefined$1(globalStylesheets[content])) {
|
|
6518
|
+
return;
|
|
6519
|
+
}
|
|
6376
6520
|
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6521
|
+
globalStylesheets[content] = true;
|
|
6522
|
+
const elm = document.createElement('style');
|
|
6523
|
+
elm.type = 'text/css';
|
|
6524
|
+
elm.textContent = content;
|
|
6525
|
+
globalStylesheetsParentElement.appendChild(elm);
|
|
6526
|
+
}
|
|
6380
6527
|
|
|
6381
|
-
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
|
|
6528
|
+
function insertStylesheet(content, target) {
|
|
6529
|
+
if (supportsConstructableStyleSheets) {
|
|
6530
|
+
insertConstructableStyleSheet(content, target);
|
|
6531
|
+
} else {
|
|
6532
|
+
// Fall back to <style> element
|
|
6533
|
+
insertStyleElement(content, target);
|
|
6534
|
+
}
|
|
6535
|
+
}
|
|
6536
|
+
|
|
6537
|
+
const HTMLElementExported = HTMLElementConstructor;
|
|
6538
|
+
setAttachShadow(attachShadow);
|
|
6539
|
+
setCreateComment(createComment);
|
|
6540
|
+
setCreateElement(createElement$1);
|
|
6541
|
+
setCreateText(createText);
|
|
6542
|
+
setDefineCustomElement(defineCustomElement);
|
|
6543
|
+
setDispatchEvent(dispatchEvent);
|
|
6544
|
+
setGetAttribute(getAttribute);
|
|
6545
|
+
setGetBoundingClientRect(getBoundingClientRect);
|
|
6546
|
+
setGetChildNodes(getChildNodes);
|
|
6547
|
+
setGetChildren(getChildren);
|
|
6548
|
+
setGetClassList(getClassList);
|
|
6549
|
+
setGetCustomElement(getCustomElement);
|
|
6550
|
+
setGetElementsByClassName(getElementsByClassName);
|
|
6551
|
+
setGetElementsByTagName(getElementsByTagName);
|
|
6552
|
+
setGetFirstChild(getFirstChild);
|
|
6553
|
+
setGetFirstElementChild(getFirstElementChild);
|
|
6554
|
+
setGetLastChild(getLastChild);
|
|
6555
|
+
setGetLastElementChild(getLastElementChild);
|
|
6556
|
+
setGetProperty(getProperty);
|
|
6557
|
+
setHTMLElement(HTMLElementExported);
|
|
6558
|
+
setInsert(insert);
|
|
6559
|
+
setInsertGlobalStylesheet(insertGlobalStylesheet);
|
|
6560
|
+
setInsertStylesheet(insertStylesheet);
|
|
6561
|
+
setIsConnected(isConnected);
|
|
6562
|
+
setIsHydrating$1(isHydrating);
|
|
6563
|
+
setIsNativeShadowDefined(isNativeShadowDefined);
|
|
6564
|
+
setIsSyntheticShadowDefined(isSyntheticShadowDefined);
|
|
6565
|
+
setNextSibling(nextSibling);
|
|
6566
|
+
setQuerySelector(querySelector);
|
|
6567
|
+
setQuerySelectorAll(querySelectorAll);
|
|
6568
|
+
setRemove(remove);
|
|
6569
|
+
setRemoveAttribute(removeAttribute);
|
|
6570
|
+
setRemoveEventListener(removeEventListener);
|
|
6571
|
+
setSetAttribute(setAttribute);
|
|
6572
|
+
setSetCSSStyleProperty(setCSSStyleProperty);
|
|
6573
|
+
setSetProperty(setProperty);
|
|
6574
|
+
setSetText(setText);
|
|
6575
|
+
setSsr(ssr);
|
|
6576
|
+
setAddEventListener(addEventListener);
|
|
6385
6577
|
/*
|
|
6386
6578
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
6387
6579
|
* All rights reserved.
|
|
@@ -6461,7 +6653,7 @@
|
|
|
6461
6653
|
throw new TypeError(`"createElement" function expects an "is" option with a valid component constructor.`);
|
|
6462
6654
|
}
|
|
6463
6655
|
|
|
6464
|
-
const UpgradableConstructor = getUpgradableConstructor(sel
|
|
6656
|
+
const UpgradableConstructor = getUpgradableConstructor(sel);
|
|
6465
6657
|
let wasComponentUpgraded = false; // the custom element from the registry is expecting an upgrade callback
|
|
6466
6658
|
|
|
6467
6659
|
/**
|
|
@@ -6476,8 +6668,7 @@
|
|
|
6476
6668
|
createVM(elm, def, {
|
|
6477
6669
|
tagName: sel,
|
|
6478
6670
|
mode: options.mode !== 'closed' ? 'open' : 'closed',
|
|
6479
|
-
owner: null
|
|
6480
|
-
renderer
|
|
6671
|
+
owner: null
|
|
6481
6672
|
});
|
|
6482
6673
|
ConnectingSlot.set(elm, connectRootElement);
|
|
6483
6674
|
DisconnectingSlot.set(elm, disconnectRootElement);
|
|
@@ -6500,6 +6691,10 @@
|
|
|
6500
6691
|
|
|
6501
6692
|
|
|
6502
6693
|
function hydrateComponent(element, Ctor, props = {}) {
|
|
6694
|
+
if (!(element instanceof Element)) {
|
|
6695
|
+
throw new TypeError(`"hydrateComponent" expects a valid DOM element as the first parameter but instead received ${element}.`);
|
|
6696
|
+
}
|
|
6697
|
+
|
|
6503
6698
|
if (!isFunction$1(Ctor)) {
|
|
6504
6699
|
throw new TypeError(`"hydrateComponent" expects a valid component constructor as the second parameter but instead received ${Ctor}.`);
|
|
6505
6700
|
}
|
|
@@ -6517,7 +6712,6 @@
|
|
|
6517
6712
|
createVM(element, def, {
|
|
6518
6713
|
mode: 'open',
|
|
6519
6714
|
owner: null,
|
|
6520
|
-
renderer,
|
|
6521
6715
|
tagName: element.tagName.toLowerCase()
|
|
6522
6716
|
});
|
|
6523
6717
|
|
|
@@ -6584,8 +6778,7 @@
|
|
|
6584
6778
|
createVM(this, def, {
|
|
6585
6779
|
mode: 'open',
|
|
6586
6780
|
owner: null,
|
|
6587
|
-
tagName: this.tagName
|
|
6588
|
-
renderer
|
|
6781
|
+
tagName: this.tagName
|
|
6589
6782
|
});
|
|
6590
6783
|
}
|
|
6591
6784
|
|
|
@@ -6652,7 +6845,7 @@
|
|
|
6652
6845
|
return false;
|
|
6653
6846
|
}
|
|
6654
6847
|
|
|
6655
|
-
if (
|
|
6848
|
+
if (isSyntheticShadowDefined) {
|
|
6656
6849
|
// TODO [#1252]: old behavior that is still used by some pieces of the platform,
|
|
6657
6850
|
// specifically, nodes inserted manually on places where `lwc:dom="manual"` directive is not
|
|
6658
6851
|
// used, will be considered global elements.
|
|
@@ -6705,7 +6898,7 @@
|
|
|
6705
6898
|
});
|
|
6706
6899
|
freeze(LightningElement);
|
|
6707
6900
|
seal(LightningElement.prototype);
|
|
6708
|
-
/* version: 2.7.
|
|
6901
|
+
/* version: 2.7.2 */
|
|
6709
6902
|
|
|
6710
6903
|
exports.LightningElement = LightningElement;
|
|
6711
6904
|
exports.__unstable__ProfilerControl = profilerControl;
|