lwc 2.6.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 +590 -394
- package/dist/engine-dom/iife/es2017/engine-dom.js +590 -394
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -9
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +564 -370
- package/dist/engine-dom/iife/es5/engine-dom.js +648 -351
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -9
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +616 -327
- package/dist/engine-dom/umd/es2017/engine-dom.js +590 -394
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -9
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +564 -370
- package/dist/engine-dom/umd/es5/engine-dom.js +648 -351
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -9
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +616 -327
- package/dist/engine-server/commonjs/es2017/engine-server.js +670 -472
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -9
- package/dist/engine-server/esm/es2017/engine-server.js +670 -472
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +74 -9
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +74 -9
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +74 -9
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +85 -12
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +85 -12
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +74 -9
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +74 -9
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +85 -12
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +85 -12
- 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 +11 -11
- package/dist/wire-service/iife/es5/wire-service.min.js +1 -1
- package/dist/wire-service/iife/es5/wire-service_debug.js +11 -11
- 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 +11 -11
- package/dist/wire-service/umd/es5/wire-service.min.js +1 -1
- package/dist/wire-service/umd/es5/wire-service_debug.js +11 -11
- 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.
|
|
304
|
+
/** version: 2.7.2 */
|
|
305
305
|
|
|
306
306
|
/*
|
|
307
307
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -415,7 +415,6 @@
|
|
|
415
415
|
ENABLE_NODE_LIST_PATCH: null,
|
|
416
416
|
ENABLE_HTML_COLLECTIONS_PATCH: null,
|
|
417
417
|
ENABLE_NODE_PATCH: null,
|
|
418
|
-
ENABLE_MIXED_SHADOW_MODE: null,
|
|
419
418
|
ENABLE_WIRE_SYNC_EMIT: null
|
|
420
419
|
};
|
|
421
420
|
|
|
@@ -472,7 +471,7 @@
|
|
|
472
471
|
|
|
473
472
|
function setFeatureFlagForTest(name, value) {
|
|
474
473
|
}
|
|
475
|
-
/** version: 2.
|
|
474
|
+
/** version: 2.7.2 */
|
|
476
475
|
|
|
477
476
|
/* proxy-compat-disable */
|
|
478
477
|
|
|
@@ -515,6 +514,243 @@
|
|
|
515
514
|
|
|
516
515
|
return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
|
|
517
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
|
+
}
|
|
518
754
|
/*
|
|
519
755
|
* Copyright (c) 2019, salesforce.com, inc.
|
|
520
756
|
* All rights reserved.
|
|
@@ -757,9 +993,6 @@
|
|
|
757
993
|
elm,
|
|
758
994
|
data: {
|
|
759
995
|
on
|
|
760
|
-
},
|
|
761
|
-
owner: {
|
|
762
|
-
renderer
|
|
763
996
|
}
|
|
764
997
|
} = vnode;
|
|
765
998
|
|
|
@@ -772,7 +1005,7 @@
|
|
|
772
1005
|
let name;
|
|
773
1006
|
|
|
774
1007
|
for (name in on) {
|
|
775
|
-
|
|
1008
|
+
addEventListener$1(elm, name, listener);
|
|
776
1009
|
}
|
|
777
1010
|
}
|
|
778
1011
|
|
|
@@ -914,9 +1147,6 @@
|
|
|
914
1147
|
const {
|
|
915
1148
|
data: {
|
|
916
1149
|
attrs
|
|
917
|
-
},
|
|
918
|
-
owner: {
|
|
919
|
-
renderer
|
|
920
1150
|
}
|
|
921
1151
|
} = vnode;
|
|
922
1152
|
|
|
@@ -935,10 +1165,6 @@
|
|
|
935
1165
|
}
|
|
936
1166
|
|
|
937
1167
|
const elm = vnode.elm;
|
|
938
|
-
const {
|
|
939
|
-
setAttribute,
|
|
940
|
-
removeAttribute
|
|
941
|
-
} = renderer;
|
|
942
1168
|
let key;
|
|
943
1169
|
oldAttrs = isUndefined$1(oldAttrs) ? EmptyObject : oldAttrs; // update modified attributes, add new attributes
|
|
944
1170
|
// this routine is only useful for data-* attributes in all kind of elements
|
|
@@ -953,14 +1179,14 @@
|
|
|
953
1179
|
|
|
954
1180
|
if (StringCharCodeAt.call(key, 3) === ColonCharCode) {
|
|
955
1181
|
// Assume xml namespace
|
|
956
|
-
setAttribute(elm, key, cur, xmlNS);
|
|
1182
|
+
setAttribute$1(elm, key, cur, xmlNS);
|
|
957
1183
|
} else if (StringCharCodeAt.call(key, 5) === ColonCharCode) {
|
|
958
1184
|
// Assume xlink namespace
|
|
959
|
-
setAttribute(elm, key, cur, xlinkNS);
|
|
960
|
-
} else if (isNull(cur)) {
|
|
961
|
-
removeAttribute(elm, key);
|
|
1185
|
+
setAttribute$1(elm, key, cur, xlinkNS);
|
|
1186
|
+
} else if (isNull(cur) || isUndefined$1(cur)) {
|
|
1187
|
+
removeAttribute$1(elm, key);
|
|
962
1188
|
} else {
|
|
963
|
-
setAttribute(elm, key, cur);
|
|
1189
|
+
setAttribute$1(elm, key, cur);
|
|
964
1190
|
}
|
|
965
1191
|
|
|
966
1192
|
lockAttribute();
|
|
@@ -1004,17 +1230,14 @@
|
|
|
1004
1230
|
const isFirstPatch = isUndefined$1(oldProps);
|
|
1005
1231
|
const {
|
|
1006
1232
|
elm,
|
|
1007
|
-
sel
|
|
1008
|
-
owner: {
|
|
1009
|
-
renderer
|
|
1010
|
-
}
|
|
1233
|
+
sel
|
|
1011
1234
|
} = vnode;
|
|
1012
1235
|
|
|
1013
1236
|
for (const key in props) {
|
|
1014
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...
|
|
1015
1238
|
|
|
1016
|
-
if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ?
|
|
1017
|
-
|
|
1239
|
+
if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ? getProperty$1(elm, key) : oldProps[key])) {
|
|
1240
|
+
setProperty$1(elm, key, cur);
|
|
1018
1241
|
}
|
|
1019
1242
|
}
|
|
1020
1243
|
}
|
|
@@ -1078,9 +1301,6 @@
|
|
|
1078
1301
|
elm,
|
|
1079
1302
|
data: {
|
|
1080
1303
|
className: newClass
|
|
1081
|
-
},
|
|
1082
|
-
owner: {
|
|
1083
|
-
renderer
|
|
1084
1304
|
}
|
|
1085
1305
|
} = vnode;
|
|
1086
1306
|
const {
|
|
@@ -1093,7 +1313,7 @@
|
|
|
1093
1313
|
return;
|
|
1094
1314
|
}
|
|
1095
1315
|
|
|
1096
|
-
const classList =
|
|
1316
|
+
const classList = getClassList$1(elm);
|
|
1097
1317
|
const newClassMap = getMapFromClassName(newClass);
|
|
1098
1318
|
const oldClassMap = getMapFromClassName(oldClass);
|
|
1099
1319
|
let name;
|
|
@@ -1131,24 +1351,17 @@
|
|
|
1131
1351
|
elm,
|
|
1132
1352
|
data: {
|
|
1133
1353
|
style: newStyle
|
|
1134
|
-
},
|
|
1135
|
-
owner: {
|
|
1136
|
-
renderer
|
|
1137
1354
|
}
|
|
1138
1355
|
} = vnode;
|
|
1139
|
-
const {
|
|
1140
|
-
setAttribute,
|
|
1141
|
-
removeAttribute
|
|
1142
|
-
} = renderer;
|
|
1143
1356
|
|
|
1144
1357
|
if (oldVnode.data.style === newStyle) {
|
|
1145
1358
|
return;
|
|
1146
1359
|
}
|
|
1147
1360
|
|
|
1148
1361
|
if (!isString(newStyle) || newStyle === '') {
|
|
1149
|
-
removeAttribute(elm, 'style');
|
|
1362
|
+
removeAttribute$1(elm, 'style');
|
|
1150
1363
|
} else {
|
|
1151
|
-
setAttribute(elm, 'style', newStyle);
|
|
1364
|
+
setAttribute$1(elm, 'style', newStyle);
|
|
1152
1365
|
}
|
|
1153
1366
|
}
|
|
1154
1367
|
|
|
@@ -1173,9 +1386,6 @@
|
|
|
1173
1386
|
elm,
|
|
1174
1387
|
data: {
|
|
1175
1388
|
classMap
|
|
1176
|
-
},
|
|
1177
|
-
owner: {
|
|
1178
|
-
renderer
|
|
1179
1389
|
}
|
|
1180
1390
|
} = vnode;
|
|
1181
1391
|
|
|
@@ -1183,7 +1393,7 @@
|
|
|
1183
1393
|
return;
|
|
1184
1394
|
}
|
|
1185
1395
|
|
|
1186
|
-
const classList =
|
|
1396
|
+
const classList = getClassList$1(elm);
|
|
1187
1397
|
|
|
1188
1398
|
for (const name in classMap) {
|
|
1189
1399
|
classList.add(name);
|
|
@@ -1207,9 +1417,6 @@
|
|
|
1207
1417
|
elm,
|
|
1208
1418
|
data: {
|
|
1209
1419
|
styleDecls
|
|
1210
|
-
},
|
|
1211
|
-
owner: {
|
|
1212
|
-
renderer
|
|
1213
1420
|
}
|
|
1214
1421
|
} = vnode;
|
|
1215
1422
|
|
|
@@ -1219,7 +1426,7 @@
|
|
|
1219
1426
|
|
|
1220
1427
|
for (let i = 0; i < styleDecls.length; i++) {
|
|
1221
1428
|
const [prop, value, important] = styleDecls[i];
|
|
1222
|
-
|
|
1429
|
+
setCSSStyleProperty$1(elm, prop, value, important);
|
|
1223
1430
|
}
|
|
1224
1431
|
}
|
|
1225
1432
|
|
|
@@ -1233,15 +1440,6 @@
|
|
|
1233
1440
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
1234
1441
|
*/
|
|
1235
1442
|
|
|
1236
|
-
/**
|
|
1237
|
-
@license
|
|
1238
|
-
Copyright (c) 2015 Simon Friis Vindum.
|
|
1239
|
-
This code may only be used under the MIT License found at
|
|
1240
|
-
https://github.com/snabbdom/snabbdom/blob/master/LICENSE
|
|
1241
|
-
Code distributed by Snabbdom as part of the Snabbdom project at
|
|
1242
|
-
https://github.com/snabbdom/snabbdom/
|
|
1243
|
-
*/
|
|
1244
|
-
|
|
1245
1443
|
function isUndef(s) {
|
|
1246
1444
|
return s === undefined;
|
|
1247
1445
|
}
|
|
@@ -1329,7 +1527,7 @@
|
|
|
1329
1527
|
} else if (sameVnode(oldStartVnode, newEndVnode)) {
|
|
1330
1528
|
// Vnode moved right
|
|
1331
1529
|
patchVnode(oldStartVnode, newEndVnode);
|
|
1332
|
-
newEndVnode.hook.move(oldStartVnode, parentElm,
|
|
1530
|
+
newEndVnode.hook.move(oldStartVnode, parentElm, nextSibling$1(oldEndVnode.elm));
|
|
1333
1531
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
1334
1532
|
newEndVnode = newCh[--newEndIdx];
|
|
1335
1533
|
} else if (sameVnode(oldEndVnode, newStartVnode)) {
|
|
@@ -1442,7 +1640,7 @@
|
|
|
1442
1640
|
}
|
|
1443
1641
|
}
|
|
1444
1642
|
/*
|
|
1445
|
-
* Copyright (c)
|
|
1643
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
1446
1644
|
* All rights reserved.
|
|
1447
1645
|
* SPDX-License-Identifier: MIT
|
|
1448
1646
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
@@ -2186,8 +2384,7 @@
|
|
|
2186
2384
|
|
|
2187
2385
|
|
|
2188
2386
|
const LightningElement = function () {
|
|
2189
|
-
|
|
2190
|
-
|
|
2387
|
+
// This should be as performant as possible, while any initialization should be done lazily
|
|
2191
2388
|
if (isNull(vmBeingConstructed)) {
|
|
2192
2389
|
throw new ReferenceError('Illegal constructor');
|
|
2193
2390
|
}
|
|
@@ -2195,8 +2392,7 @@
|
|
|
2195
2392
|
const vm = vmBeingConstructed;
|
|
2196
2393
|
const {
|
|
2197
2394
|
def,
|
|
2198
|
-
elm
|
|
2199
|
-
renderer
|
|
2395
|
+
elm
|
|
2200
2396
|
} = vm;
|
|
2201
2397
|
const {
|
|
2202
2398
|
bridge
|
|
@@ -2229,23 +2425,22 @@
|
|
|
2229
2425
|
if (vm.renderMode === 1
|
|
2230
2426
|
/* Shadow */
|
|
2231
2427
|
) {
|
|
2232
|
-
|
|
2428
|
+
doAttachShadow(vm);
|
|
2233
2429
|
} // Adding extra guard rails in DEV mode.
|
|
2234
2430
|
|
|
2235
2431
|
return this;
|
|
2236
2432
|
};
|
|
2237
2433
|
|
|
2238
|
-
function
|
|
2434
|
+
function doAttachShadow(vm) {
|
|
2239
2435
|
const {
|
|
2240
2436
|
elm,
|
|
2241
2437
|
mode,
|
|
2242
|
-
renderer,
|
|
2243
2438
|
shadowMode,
|
|
2244
2439
|
def: {
|
|
2245
2440
|
ctor
|
|
2246
2441
|
}
|
|
2247
2442
|
} = vm;
|
|
2248
|
-
const cmpRoot =
|
|
2443
|
+
const cmpRoot = attachShadow$1(elm, {
|
|
2249
2444
|
[KEY__SYNTHETIC_MODE]: shadowMode === 1
|
|
2250
2445
|
/* Synthetic */
|
|
2251
2446
|
,
|
|
@@ -2262,163 +2457,121 @@
|
|
|
2262
2457
|
|
|
2263
2458
|
dispatchEvent(event) {
|
|
2264
2459
|
const {
|
|
2265
|
-
elm
|
|
2266
|
-
renderer: {
|
|
2267
|
-
dispatchEvent
|
|
2268
|
-
}
|
|
2460
|
+
elm
|
|
2269
2461
|
} = getAssociatedVM(this);
|
|
2270
|
-
return dispatchEvent(elm, event);
|
|
2462
|
+
return dispatchEvent$1(elm, event);
|
|
2271
2463
|
},
|
|
2272
2464
|
|
|
2273
2465
|
addEventListener(type, listener, options) {
|
|
2274
2466
|
const vm = getAssociatedVM(this);
|
|
2275
2467
|
const {
|
|
2276
|
-
elm
|
|
2277
|
-
renderer: {
|
|
2278
|
-
addEventListener
|
|
2279
|
-
}
|
|
2468
|
+
elm
|
|
2280
2469
|
} = vm;
|
|
2281
2470
|
|
|
2282
2471
|
const wrappedListener = getWrappedComponentsListener(vm, listener);
|
|
2283
|
-
addEventListener(elm, type, wrappedListener, options);
|
|
2472
|
+
addEventListener$1(elm, type, wrappedListener, options);
|
|
2284
2473
|
},
|
|
2285
2474
|
|
|
2286
2475
|
removeEventListener(type, listener, options) {
|
|
2287
2476
|
const vm = getAssociatedVM(this);
|
|
2288
2477
|
const {
|
|
2289
|
-
elm
|
|
2290
|
-
renderer: {
|
|
2291
|
-
removeEventListener
|
|
2292
|
-
}
|
|
2478
|
+
elm
|
|
2293
2479
|
} = vm;
|
|
2294
2480
|
const wrappedListener = getWrappedComponentsListener(vm, listener);
|
|
2295
|
-
removeEventListener(elm, type, wrappedListener, options);
|
|
2481
|
+
removeEventListener$1(elm, type, wrappedListener, options);
|
|
2296
2482
|
},
|
|
2297
2483
|
|
|
2298
2484
|
hasAttribute(name) {
|
|
2299
2485
|
const {
|
|
2300
|
-
elm
|
|
2301
|
-
renderer: {
|
|
2302
|
-
getAttribute
|
|
2303
|
-
}
|
|
2486
|
+
elm
|
|
2304
2487
|
} = getAssociatedVM(this);
|
|
2305
|
-
return !isNull(getAttribute(elm, name));
|
|
2488
|
+
return !isNull(getAttribute$1(elm, name));
|
|
2306
2489
|
},
|
|
2307
2490
|
|
|
2308
2491
|
hasAttributeNS(namespace, name) {
|
|
2309
2492
|
const {
|
|
2310
|
-
elm
|
|
2311
|
-
renderer: {
|
|
2312
|
-
getAttribute
|
|
2313
|
-
}
|
|
2493
|
+
elm
|
|
2314
2494
|
} = getAssociatedVM(this);
|
|
2315
|
-
return !isNull(getAttribute(elm, name, namespace));
|
|
2495
|
+
return !isNull(getAttribute$1(elm, name, namespace));
|
|
2316
2496
|
},
|
|
2317
2497
|
|
|
2318
2498
|
removeAttribute(name) {
|
|
2319
2499
|
const {
|
|
2320
|
-
elm
|
|
2321
|
-
renderer: {
|
|
2322
|
-
removeAttribute
|
|
2323
|
-
}
|
|
2500
|
+
elm
|
|
2324
2501
|
} = getAssociatedVM(this);
|
|
2325
2502
|
unlockAttribute(elm, name);
|
|
2326
|
-
removeAttribute(elm, name);
|
|
2503
|
+
removeAttribute$1(elm, name);
|
|
2327
2504
|
lockAttribute();
|
|
2328
2505
|
},
|
|
2329
2506
|
|
|
2330
2507
|
removeAttributeNS(namespace, name) {
|
|
2331
2508
|
const {
|
|
2332
|
-
elm
|
|
2333
|
-
renderer: {
|
|
2334
|
-
removeAttribute
|
|
2335
|
-
}
|
|
2509
|
+
elm
|
|
2336
2510
|
} = getAssociatedVM(this);
|
|
2337
2511
|
unlockAttribute(elm, name);
|
|
2338
|
-
removeAttribute(elm, name, namespace);
|
|
2512
|
+
removeAttribute$1(elm, name, namespace);
|
|
2339
2513
|
lockAttribute();
|
|
2340
2514
|
},
|
|
2341
2515
|
|
|
2342
2516
|
getAttribute(name) {
|
|
2343
2517
|
const {
|
|
2344
|
-
elm
|
|
2345
|
-
renderer: {
|
|
2346
|
-
getAttribute
|
|
2347
|
-
}
|
|
2518
|
+
elm
|
|
2348
2519
|
} = getAssociatedVM(this);
|
|
2349
|
-
return getAttribute(elm, name);
|
|
2520
|
+
return getAttribute$1(elm, name);
|
|
2350
2521
|
},
|
|
2351
2522
|
|
|
2352
2523
|
getAttributeNS(namespace, name) {
|
|
2353
2524
|
const {
|
|
2354
|
-
elm
|
|
2355
|
-
renderer: {
|
|
2356
|
-
getAttribute
|
|
2357
|
-
}
|
|
2525
|
+
elm
|
|
2358
2526
|
} = getAssociatedVM(this);
|
|
2359
|
-
return getAttribute(elm, name, namespace);
|
|
2527
|
+
return getAttribute$1(elm, name, namespace);
|
|
2360
2528
|
},
|
|
2361
2529
|
|
|
2362
2530
|
setAttribute(name, value) {
|
|
2363
2531
|
const vm = getAssociatedVM(this);
|
|
2364
2532
|
const {
|
|
2365
|
-
elm
|
|
2366
|
-
renderer: {
|
|
2367
|
-
setAttribute
|
|
2368
|
-
}
|
|
2533
|
+
elm
|
|
2369
2534
|
} = vm;
|
|
2370
2535
|
|
|
2371
2536
|
unlockAttribute(elm, name);
|
|
2372
|
-
setAttribute(elm, name, value);
|
|
2537
|
+
setAttribute$1(elm, name, value);
|
|
2373
2538
|
lockAttribute();
|
|
2374
2539
|
},
|
|
2375
2540
|
|
|
2376
2541
|
setAttributeNS(namespace, name, value) {
|
|
2377
2542
|
const vm = getAssociatedVM(this);
|
|
2378
2543
|
const {
|
|
2379
|
-
elm
|
|
2380
|
-
renderer: {
|
|
2381
|
-
setAttribute
|
|
2382
|
-
}
|
|
2544
|
+
elm
|
|
2383
2545
|
} = vm;
|
|
2384
2546
|
|
|
2385
2547
|
unlockAttribute(elm, name);
|
|
2386
|
-
setAttribute(elm, name, value, namespace);
|
|
2548
|
+
setAttribute$1(elm, name, value, namespace);
|
|
2387
2549
|
lockAttribute();
|
|
2388
2550
|
},
|
|
2389
2551
|
|
|
2390
2552
|
getBoundingClientRect() {
|
|
2391
2553
|
const vm = getAssociatedVM(this);
|
|
2392
2554
|
const {
|
|
2393
|
-
elm
|
|
2394
|
-
renderer: {
|
|
2395
|
-
getBoundingClientRect
|
|
2396
|
-
}
|
|
2555
|
+
elm
|
|
2397
2556
|
} = vm;
|
|
2398
2557
|
|
|
2399
|
-
return getBoundingClientRect(elm);
|
|
2558
|
+
return getBoundingClientRect$1(elm);
|
|
2400
2559
|
},
|
|
2401
2560
|
|
|
2402
2561
|
get isConnected() {
|
|
2403
2562
|
const {
|
|
2404
|
-
elm
|
|
2405
|
-
renderer: {
|
|
2406
|
-
isConnected
|
|
2407
|
-
}
|
|
2563
|
+
elm
|
|
2408
2564
|
} = getAssociatedVM(this);
|
|
2409
|
-
return isConnected(elm);
|
|
2565
|
+
return isConnected$1(elm);
|
|
2410
2566
|
},
|
|
2411
2567
|
|
|
2412
2568
|
get classList() {
|
|
2413
2569
|
const vm = getAssociatedVM(this);
|
|
2414
2570
|
const {
|
|
2415
|
-
elm
|
|
2416
|
-
renderer: {
|
|
2417
|
-
getClassList
|
|
2418
|
-
}
|
|
2571
|
+
elm
|
|
2419
2572
|
} = vm;
|
|
2420
2573
|
|
|
2421
|
-
return getClassList(elm);
|
|
2574
|
+
return getClassList$1(elm);
|
|
2422
2575
|
},
|
|
2423
2576
|
|
|
2424
2577
|
get template() {
|
|
@@ -2444,19 +2597,44 @@
|
|
|
2444
2597
|
}
|
|
2445
2598
|
|
|
2446
2599
|
};
|
|
2447
|
-
const queryAndChildGetterDescriptors = create(null);
|
|
2448
|
-
|
|
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;
|
|
2616
|
+
|
|
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
|
|
2449
2627
|
|
|
2450
|
-
|
|
2451
|
-
|
|
2628
|
+
|
|
2629
|
+
for (const childGetter of childGetters) {
|
|
2630
|
+
queryAndChildGetterDescriptors[childGetter] = {
|
|
2452
2631
|
get() {
|
|
2453
2632
|
const vm = getAssociatedVM(this);
|
|
2454
2633
|
const {
|
|
2455
|
-
elm
|
|
2456
|
-
renderer
|
|
2634
|
+
elm
|
|
2457
2635
|
} = vm;
|
|
2458
2636
|
|
|
2459
|
-
return
|
|
2637
|
+
return getChildGetter(childGetter)(elm);
|
|
2460
2638
|
},
|
|
2461
2639
|
|
|
2462
2640
|
configurable: true,
|
|
@@ -2464,18 +2642,34 @@
|
|
|
2464
2642
|
};
|
|
2465
2643
|
}
|
|
2466
2644
|
|
|
2467
|
-
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
|
+
|
|
2468
2663
|
|
|
2469
2664
|
for (const queryMethod of queryMethods) {
|
|
2470
2665
|
queryAndChildGetterDescriptors[queryMethod] = {
|
|
2471
2666
|
value(arg) {
|
|
2472
2667
|
const vm = getAssociatedVM(this);
|
|
2473
2668
|
const {
|
|
2474
|
-
elm
|
|
2475
|
-
renderer
|
|
2669
|
+
elm
|
|
2476
2670
|
} = vm;
|
|
2477
2671
|
|
|
2478
|
-
return
|
|
2672
|
+
return getQueryMethod(queryMethod)(elm, arg);
|
|
2479
2673
|
},
|
|
2480
2674
|
|
|
2481
2675
|
configurable: true,
|
|
@@ -3409,39 +3603,30 @@
|
|
|
3409
3603
|
const token = cmpTemplate === null || cmpTemplate === void 0 ? void 0 : cmpTemplate.stylesheetToken;
|
|
3410
3604
|
|
|
3411
3605
|
if (!isUndefined$1(token) && context.hasScopedStyles) {
|
|
3412
|
-
|
|
3606
|
+
getClassList$1(elm).add(token);
|
|
3413
3607
|
}
|
|
3414
3608
|
}
|
|
3415
3609
|
|
|
3416
3610
|
function updateNodeHook(oldVnode, vnode) {
|
|
3417
3611
|
const {
|
|
3418
3612
|
elm,
|
|
3419
|
-
text
|
|
3420
|
-
owner: {
|
|
3421
|
-
renderer
|
|
3422
|
-
}
|
|
3613
|
+
text
|
|
3423
3614
|
} = vnode;
|
|
3424
3615
|
|
|
3425
3616
|
if (oldVnode.text !== text) {
|
|
3426
3617
|
|
|
3427
|
-
|
|
3618
|
+
setText$1(elm, text);
|
|
3428
3619
|
}
|
|
3429
3620
|
}
|
|
3430
3621
|
|
|
3431
3622
|
function insertNodeHook(vnode, parentNode, referenceNode) {
|
|
3432
|
-
const {
|
|
3433
|
-
renderer
|
|
3434
|
-
} = vnode.owner;
|
|
3435
3623
|
|
|
3436
|
-
|
|
3624
|
+
insert$1(vnode.elm, parentNode, referenceNode);
|
|
3437
3625
|
}
|
|
3438
3626
|
|
|
3439
3627
|
function removeNodeHook(vnode, parentNode) {
|
|
3440
|
-
const {
|
|
3441
|
-
renderer
|
|
3442
|
-
} = vnode.owner;
|
|
3443
3628
|
|
|
3444
|
-
|
|
3629
|
+
remove$1(vnode.elm, parentNode);
|
|
3445
3630
|
}
|
|
3446
3631
|
|
|
3447
3632
|
function createElmHook(vnode) {
|
|
@@ -3511,13 +3696,15 @@
|
|
|
3511
3696
|
|
|
3512
3697
|
function updateChildrenHook(oldVnode, vnode) {
|
|
3513
3698
|
const {
|
|
3514
|
-
|
|
3515
|
-
|
|
3699
|
+
elm,
|
|
3700
|
+
children
|
|
3516
3701
|
} = vnode;
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
}
|
|
3702
|
+
|
|
3703
|
+
if (hasDynamicChildren(children)) {
|
|
3704
|
+
updateDynamicChildren(elm, oldVnode.children, children);
|
|
3705
|
+
} else {
|
|
3706
|
+
updateStaticChildren(elm, oldVnode.children, children);
|
|
3707
|
+
}
|
|
3521
3708
|
}
|
|
3522
3709
|
|
|
3523
3710
|
function allocateChildrenHook(vnode, vm) {
|
|
@@ -3583,8 +3770,7 @@
|
|
|
3583
3770
|
createVM(elm, def, {
|
|
3584
3771
|
mode,
|
|
3585
3772
|
owner,
|
|
3586
|
-
tagName: sel
|
|
3587
|
-
renderer: owner.renderer
|
|
3773
|
+
tagName: sel
|
|
3588
3774
|
});
|
|
3589
3775
|
}
|
|
3590
3776
|
|
|
@@ -3680,12 +3866,12 @@
|
|
|
3680
3866
|
*/
|
|
3681
3867
|
|
|
3682
3868
|
|
|
3683
|
-
function getUpgradableConstructor(tagName
|
|
3869
|
+
function getUpgradableConstructor(tagName) {
|
|
3684
3870
|
// Should never get a tag with upper case letter at this point, the compiler should
|
|
3685
3871
|
// produce only tags with lowercase letters
|
|
3686
3872
|
// But, for backwards compatibility, we will lower case the tagName
|
|
3687
3873
|
tagName = tagName.toLowerCase();
|
|
3688
|
-
let CE =
|
|
3874
|
+
let CE = getCustomElement$1(tagName);
|
|
3689
3875
|
|
|
3690
3876
|
if (!isUndefined$1(CE)) {
|
|
3691
3877
|
return CE;
|
|
@@ -3696,7 +3882,7 @@
|
|
|
3696
3882
|
*/
|
|
3697
3883
|
|
|
3698
3884
|
|
|
3699
|
-
CE = class LWCUpgradableElement extends
|
|
3885
|
+
CE = class LWCUpgradableElement extends HTMLElementExported$1 {
|
|
3700
3886
|
constructor(upgradeCallback) {
|
|
3701
3887
|
super();
|
|
3702
3888
|
|
|
@@ -3706,7 +3892,7 @@
|
|
|
3706
3892
|
}
|
|
3707
3893
|
|
|
3708
3894
|
};
|
|
3709
|
-
|
|
3895
|
+
defineCustomElement$1(tagName, CE);
|
|
3710
3896
|
return CE;
|
|
3711
3897
|
}
|
|
3712
3898
|
/*
|
|
@@ -3724,10 +3910,7 @@
|
|
|
3724
3910
|
const {
|
|
3725
3911
|
owner
|
|
3726
3912
|
} = vnode;
|
|
3727
|
-
const
|
|
3728
|
-
renderer
|
|
3729
|
-
} = owner;
|
|
3730
|
-
const elm = renderer.createText(vnode.text);
|
|
3913
|
+
const elm = createText$1(vnode.text);
|
|
3731
3914
|
linkNodeToShadow(elm, owner);
|
|
3732
3915
|
vnode.elm = elm;
|
|
3733
3916
|
},
|
|
@@ -3749,10 +3932,7 @@
|
|
|
3749
3932
|
owner,
|
|
3750
3933
|
text
|
|
3751
3934
|
} = vnode;
|
|
3752
|
-
const
|
|
3753
|
-
renderer
|
|
3754
|
-
} = owner;
|
|
3755
|
-
const elm = renderer.createComment(text);
|
|
3935
|
+
const elm = createComment$1(text);
|
|
3756
3936
|
linkNodeToShadow(elm, owner);
|
|
3757
3937
|
vnode.elm = elm;
|
|
3758
3938
|
},
|
|
@@ -3782,11 +3962,8 @@
|
|
|
3782
3962
|
svg
|
|
3783
3963
|
}
|
|
3784
3964
|
} = vnode;
|
|
3785
|
-
const {
|
|
3786
|
-
renderer
|
|
3787
|
-
} = owner;
|
|
3788
3965
|
const namespace = isTrue(svg) ? SVG_NAMESPACE : undefined;
|
|
3789
|
-
const elm =
|
|
3966
|
+
const elm = createElement$2(sel, namespace);
|
|
3790
3967
|
linkNodeToShadow(elm, owner);
|
|
3791
3968
|
fallbackElmHook(elm, vnode);
|
|
3792
3969
|
vnode.elm = elm;
|
|
@@ -3846,10 +4023,7 @@
|
|
|
3846
4023
|
sel,
|
|
3847
4024
|
owner
|
|
3848
4025
|
} = vnode;
|
|
3849
|
-
const
|
|
3850
|
-
renderer
|
|
3851
|
-
} = owner;
|
|
3852
|
-
const UpgradableConstructor = getUpgradableConstructor(sel, renderer);
|
|
4026
|
+
const UpgradableConstructor = getUpgradableConstructor(sel);
|
|
3853
4027
|
/**
|
|
3854
4028
|
* Note: if the upgradable constructor does not expect, or throw when we new it
|
|
3855
4029
|
* with a callback as the first argument, we could implement a more advanced
|
|
@@ -3934,8 +4108,7 @@
|
|
|
3934
4108
|
createVM(elm, def, {
|
|
3935
4109
|
mode,
|
|
3936
4110
|
owner,
|
|
3937
|
-
tagName: sel
|
|
3938
|
-
renderer: owner.renderer
|
|
4111
|
+
tagName: sel
|
|
3939
4112
|
});
|
|
3940
4113
|
vnode.elm = elm;
|
|
3941
4114
|
const vm = getAssociatedVM(elm);
|
|
@@ -3958,12 +4131,11 @@
|
|
|
3958
4131
|
|
|
3959
4132
|
function linkNodeToShadow(elm, owner) {
|
|
3960
4133
|
const {
|
|
3961
|
-
renderer,
|
|
3962
4134
|
renderMode,
|
|
3963
4135
|
shadowMode
|
|
3964
4136
|
} = owner; // TODO [#1164]: this should eventually be done by the polyfill directly
|
|
3965
4137
|
|
|
3966
|
-
if (
|
|
4138
|
+
if (isSyntheticShadowDefined$1) {
|
|
3967
4139
|
if (shadowMode === 1
|
|
3968
4140
|
/* Synthetic */
|
|
3969
4141
|
|| renderMode === 0
|
|
@@ -4371,7 +4543,6 @@
|
|
|
4371
4543
|
const {
|
|
4372
4544
|
elm,
|
|
4373
4545
|
context,
|
|
4374
|
-
renderer,
|
|
4375
4546
|
renderMode,
|
|
4376
4547
|
shadowMode
|
|
4377
4548
|
} = vm;
|
|
@@ -4398,11 +4569,11 @@
|
|
|
4398
4569
|
} = context;
|
|
4399
4570
|
|
|
4400
4571
|
if (oldHasTokenInClass) {
|
|
4401
|
-
|
|
4572
|
+
getClassList$1(elm).remove(makeHostToken(oldToken));
|
|
4402
4573
|
}
|
|
4403
4574
|
|
|
4404
4575
|
if (oldHasTokenInAttribute) {
|
|
4405
|
-
|
|
4576
|
+
removeAttribute$1(elm, makeHostToken(oldToken));
|
|
4406
4577
|
} // Apply the new template styling token to the host element, if the new template has any
|
|
4407
4578
|
// associated stylesheets. In the case of light DOM, also ensure there is at least one scoped stylesheet.
|
|
4408
4579
|
|
|
@@ -4414,12 +4585,12 @@
|
|
|
4414
4585
|
|
|
4415
4586
|
if (!isUndefined$1(newToken)) {
|
|
4416
4587
|
if (hasScopedStyles) {
|
|
4417
|
-
|
|
4588
|
+
getClassList$1(elm).add(makeHostToken(newToken));
|
|
4418
4589
|
newHasTokenInClass = true;
|
|
4419
4590
|
}
|
|
4420
4591
|
|
|
4421
4592
|
if (isSyntheticShadow) {
|
|
4422
|
-
|
|
4593
|
+
setAttribute$1(elm, makeHostToken(newToken), '');
|
|
4423
4594
|
newHasTokenInAttribute = true;
|
|
4424
4595
|
}
|
|
4425
4596
|
} // Update the styling tokens present on the context object.
|
|
@@ -4534,7 +4705,6 @@
|
|
|
4534
4705
|
|
|
4535
4706
|
function createStylesheet(vm, stylesheets) {
|
|
4536
4707
|
const {
|
|
4537
|
-
renderer,
|
|
4538
4708
|
renderMode,
|
|
4539
4709
|
shadowMode
|
|
4540
4710
|
} = vm;
|
|
@@ -4545,9 +4715,9 @@
|
|
|
4545
4715
|
/* Synthetic */
|
|
4546
4716
|
) {
|
|
4547
4717
|
for (let i = 0; i < stylesheets.length; i++) {
|
|
4548
|
-
|
|
4718
|
+
insertGlobalStylesheet$1(stylesheets[i]);
|
|
4549
4719
|
}
|
|
4550
|
-
} else if (
|
|
4720
|
+
} else if (ssr$1 || isHydrating$1()) {
|
|
4551
4721
|
// Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
|
|
4552
4722
|
// This works in the client, because the stylesheets are created, and cached in the VM
|
|
4553
4723
|
// the first time the VM renders.
|
|
@@ -4561,10 +4731,10 @@
|
|
|
4561
4731
|
|
|
4562
4732
|
for (let i = 0; i < stylesheets.length; i++) {
|
|
4563
4733
|
if (isGlobal) {
|
|
4564
|
-
|
|
4734
|
+
insertGlobalStylesheet$1(stylesheets[i]);
|
|
4565
4735
|
} else {
|
|
4566
4736
|
// local level
|
|
4567
|
-
|
|
4737
|
+
insertStylesheet$1(stylesheets[i], root.cmpRoot);
|
|
4568
4738
|
}
|
|
4569
4739
|
}
|
|
4570
4740
|
}
|
|
@@ -4605,7 +4775,7 @@
|
|
|
4605
4775
|
if (isProfilerEnabled) {
|
|
4606
4776
|
currentDispatcher(opId, 0
|
|
4607
4777
|
/* Start */
|
|
4608
|
-
, vm.tagName, vm.idx);
|
|
4778
|
+
, vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
|
|
4609
4779
|
}
|
|
4610
4780
|
}
|
|
4611
4781
|
|
|
@@ -4614,7 +4784,7 @@
|
|
|
4614
4784
|
if (isProfilerEnabled) {
|
|
4615
4785
|
currentDispatcher(opId, 1
|
|
4616
4786
|
/* Stop */
|
|
4617
|
-
, vm.tagName, vm.idx);
|
|
4787
|
+
, vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
|
|
4618
4788
|
}
|
|
4619
4789
|
}
|
|
4620
4790
|
|
|
@@ -4623,7 +4793,7 @@
|
|
|
4623
4793
|
if (isProfilerEnabled) {
|
|
4624
4794
|
currentDispatcher(opId, 0
|
|
4625
4795
|
/* Start */
|
|
4626
|
-
, vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx);
|
|
4796
|
+
, vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx, vm === null || vm === void 0 ? void 0 : vm.renderMode, vm === null || vm === void 0 ? void 0 : vm.shadowMode);
|
|
4627
4797
|
}
|
|
4628
4798
|
}
|
|
4629
4799
|
|
|
@@ -4632,7 +4802,7 @@
|
|
|
4632
4802
|
if (isProfilerEnabled) {
|
|
4633
4803
|
currentDispatcher(opId, 1
|
|
4634
4804
|
/* Stop */
|
|
4635
|
-
, vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx);
|
|
4805
|
+
, vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx, vm === null || vm === void 0 ? void 0 : vm.renderMode, vm === null || vm === void 0 ? void 0 : vm.shadowMode);
|
|
4636
4806
|
}
|
|
4637
4807
|
}
|
|
4638
4808
|
/*
|
|
@@ -5119,7 +5289,6 @@
|
|
|
5119
5289
|
const {
|
|
5120
5290
|
mode,
|
|
5121
5291
|
owner,
|
|
5122
|
-
renderer,
|
|
5123
5292
|
tagName
|
|
5124
5293
|
} = options;
|
|
5125
5294
|
const vm = {
|
|
@@ -5134,7 +5303,6 @@
|
|
|
5134
5303
|
tagName,
|
|
5135
5304
|
mode,
|
|
5136
5305
|
owner,
|
|
5137
|
-
renderer,
|
|
5138
5306
|
children: EmptyArray,
|
|
5139
5307
|
aChildren: EmptyArray,
|
|
5140
5308
|
velements: EmptyArray,
|
|
@@ -5177,16 +5345,11 @@
|
|
|
5177
5345
|
|
|
5178
5346
|
function computeShadowMode(vm) {
|
|
5179
5347
|
const {
|
|
5180
|
-
def
|
|
5181
|
-
renderer
|
|
5348
|
+
def
|
|
5182
5349
|
} = vm;
|
|
5183
|
-
const {
|
|
5184
|
-
isNativeShadowDefined,
|
|
5185
|
-
isSyntheticShadowDefined
|
|
5186
|
-
} = renderer;
|
|
5187
5350
|
let shadowMode;
|
|
5188
5351
|
|
|
5189
|
-
if (isSyntheticShadowDefined) {
|
|
5352
|
+
if (isSyntheticShadowDefined$1) {
|
|
5190
5353
|
if (def.renderMode === 0
|
|
5191
5354
|
/* Light */
|
|
5192
5355
|
) {
|
|
@@ -5195,7 +5358,7 @@
|
|
|
5195
5358
|
shadowMode = 0
|
|
5196
5359
|
/* Native */
|
|
5197
5360
|
;
|
|
5198
|
-
} else if (isNativeShadowDefined) {
|
|
5361
|
+
} else if (isNativeShadowDefined$1) {
|
|
5199
5362
|
if (def.shadowSupportMode === "any"
|
|
5200
5363
|
/* Any */
|
|
5201
5364
|
) {
|
|
@@ -5319,13 +5482,12 @@
|
|
|
5319
5482
|
|
|
5320
5483
|
function runRenderedCallback(vm) {
|
|
5321
5484
|
const {
|
|
5322
|
-
renderer,
|
|
5323
5485
|
def: {
|
|
5324
5486
|
renderedCallback
|
|
5325
5487
|
}
|
|
5326
5488
|
} = vm;
|
|
5327
5489
|
|
|
5328
|
-
if (isTrue(
|
|
5490
|
+
if (isTrue(ssr$1)) {
|
|
5329
5491
|
return;
|
|
5330
5492
|
}
|
|
5331
5493
|
|
|
@@ -5542,8 +5704,7 @@
|
|
|
5542
5704
|
|
|
5543
5705
|
function resetComponentRoot(vm) {
|
|
5544
5706
|
const {
|
|
5545
|
-
children
|
|
5546
|
-
renderer
|
|
5707
|
+
children
|
|
5547
5708
|
} = vm;
|
|
5548
5709
|
const rootNode = getRenderRoot(vm);
|
|
5549
5710
|
|
|
@@ -5551,7 +5712,7 @@
|
|
|
5551
5712
|
const child = children[i];
|
|
5552
5713
|
|
|
5553
5714
|
if (!isNull(child) && !isUndefined$1(child.elm)) {
|
|
5554
|
-
|
|
5715
|
+
remove$1(child.elm, rootNode);
|
|
5555
5716
|
}
|
|
5556
5717
|
}
|
|
5557
5718
|
|
|
@@ -5561,7 +5722,7 @@
|
|
|
5561
5722
|
}
|
|
5562
5723
|
|
|
5563
5724
|
function scheduleRehydration(vm) {
|
|
5564
|
-
if (isTrue(
|
|
5725
|
+
if (isTrue(ssr$1) || isTrue(vm.isScheduled)) {
|
|
5565
5726
|
return;
|
|
5566
5727
|
}
|
|
5567
5728
|
|
|
@@ -5788,7 +5949,6 @@
|
|
|
5788
5949
|
|
|
5789
5950
|
const {
|
|
5790
5951
|
elm,
|
|
5791
|
-
renderer,
|
|
5792
5952
|
context: {
|
|
5793
5953
|
wiredConnecting,
|
|
5794
5954
|
wiredDisconnecting
|
|
@@ -5815,7 +5975,7 @@
|
|
|
5815
5975
|
}
|
|
5816
5976
|
|
|
5817
5977
|
});
|
|
5818
|
-
|
|
5978
|
+
dispatchEvent$1(elm, contextRegistrationEvent);
|
|
5819
5979
|
});
|
|
5820
5980
|
}
|
|
5821
5981
|
|
|
@@ -6070,7 +6230,7 @@
|
|
|
6070
6230
|
hooksAreSet = true;
|
|
6071
6231
|
setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
|
|
6072
6232
|
}
|
|
6073
|
-
/* version: 2.
|
|
6233
|
+
/* version: 2.7.2 */
|
|
6074
6234
|
|
|
6075
6235
|
/*
|
|
6076
6236
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -6090,7 +6250,9 @@
|
|
|
6090
6250
|
const styleElements = create(null);
|
|
6091
6251
|
const styleSheets = create(null);
|
|
6092
6252
|
const nodesToStyleSheets = new WeakMap();
|
|
6093
|
-
let getCustomElement
|
|
6253
|
+
let getCustomElement;
|
|
6254
|
+
let defineCustomElement;
|
|
6255
|
+
let HTMLElementConstructor;
|
|
6094
6256
|
|
|
6095
6257
|
function isCustomElementRegistryAvailable() {
|
|
6096
6258
|
if (typeof customElements === 'undefined') {
|
|
@@ -6205,182 +6367,213 @@
|
|
|
6205
6367
|
HTMLElementConstructor.prototype = HTMLElement.prototype;
|
|
6206
6368
|
}
|
|
6207
6369
|
|
|
6208
|
-
let
|
|
6370
|
+
let hydrating = false;
|
|
6209
6371
|
|
|
6210
|
-
function setIsHydrating(
|
|
6211
|
-
|
|
6372
|
+
function setIsHydrating(value) {
|
|
6373
|
+
hydrating = value;
|
|
6212
6374
|
}
|
|
6213
6375
|
|
|
6214
|
-
const
|
|
6215
|
-
ssr: false,
|
|
6216
|
-
|
|
6217
|
-
isHydrating() {
|
|
6218
|
-
return isHydrating;
|
|
6219
|
-
},
|
|
6220
|
-
|
|
6221
|
-
isNativeShadowDefined: _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED],
|
|
6222
|
-
isSyntheticShadowDefined: hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN),
|
|
6376
|
+
const ssr = false;
|
|
6223
6377
|
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
|
|
6378
|
+
function isHydrating() {
|
|
6379
|
+
return hydrating;
|
|
6380
|
+
}
|
|
6227
6381
|
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
},
|
|
6382
|
+
const isNativeShadowDefined = _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED];
|
|
6383
|
+
const isSyntheticShadowDefined = hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN);
|
|
6231
6384
|
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6385
|
+
function createElement$1(tagName, namespace) {
|
|
6386
|
+
return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
|
|
6387
|
+
}
|
|
6235
6388
|
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
|
|
6389
|
+
function createText(content) {
|
|
6390
|
+
return document.createTextNode(content);
|
|
6391
|
+
}
|
|
6239
6392
|
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6393
|
+
function createComment(content) {
|
|
6394
|
+
return document.createComment(content);
|
|
6395
|
+
}
|
|
6243
6396
|
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
6397
|
+
function insert(node, parent, anchor) {
|
|
6398
|
+
parent.insertBefore(node, anchor);
|
|
6399
|
+
}
|
|
6247
6400
|
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
}
|
|
6401
|
+
function remove(node, parent) {
|
|
6402
|
+
parent.removeChild(node);
|
|
6403
|
+
}
|
|
6252
6404
|
|
|
6253
|
-
|
|
6254
|
-
|
|
6405
|
+
function nextSibling(node) {
|
|
6406
|
+
return node.nextSibling;
|
|
6407
|
+
}
|
|
6255
6408
|
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6409
|
+
function attachShadow(element, options) {
|
|
6410
|
+
if (hydrating) {
|
|
6411
|
+
return element.shadowRoot;
|
|
6412
|
+
}
|
|
6259
6413
|
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
},
|
|
6414
|
+
return element.attachShadow(options);
|
|
6415
|
+
}
|
|
6263
6416
|
|
|
6264
|
-
|
|
6417
|
+
function setText(node, content) {
|
|
6418
|
+
node.nodeValue = content;
|
|
6419
|
+
}
|
|
6265
6420
|
|
|
6266
|
-
|
|
6267
|
-
|
|
6421
|
+
function getProperty(node, key) {
|
|
6422
|
+
return node[key];
|
|
6423
|
+
}
|
|
6268
6424
|
|
|
6269
|
-
|
|
6270
|
-
return isUndefined$1(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
|
|
6271
|
-
},
|
|
6425
|
+
function setProperty(node, key, value) {
|
|
6272
6426
|
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
},
|
|
6427
|
+
node[key] = value;
|
|
6428
|
+
}
|
|
6276
6429
|
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
} else {
|
|
6281
|
-
element.removeAttributeNS(namespace, name);
|
|
6282
|
-
}
|
|
6283
|
-
},
|
|
6430
|
+
function getAttribute(element, name, namespace) {
|
|
6431
|
+
return isUndefined$1(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
|
|
6432
|
+
}
|
|
6284
6433
|
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6434
|
+
function setAttribute(element, name, value, namespace) {
|
|
6435
|
+
return isUndefined$1(namespace) ? element.setAttribute(name, value) : element.setAttributeNS(namespace, name, value);
|
|
6436
|
+
}
|
|
6288
6437
|
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6438
|
+
function removeAttribute(element, name, namespace) {
|
|
6439
|
+
if (isUndefined$1(namespace)) {
|
|
6440
|
+
element.removeAttribute(name);
|
|
6441
|
+
} else {
|
|
6442
|
+
element.removeAttributeNS(namespace, name);
|
|
6443
|
+
}
|
|
6444
|
+
}
|
|
6292
6445
|
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6446
|
+
function addEventListener(target, type, callback, options) {
|
|
6447
|
+
target.addEventListener(type, callback, options);
|
|
6448
|
+
}
|
|
6296
6449
|
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6450
|
+
function removeEventListener(target, type, callback, options) {
|
|
6451
|
+
target.removeEventListener(type, callback, options);
|
|
6452
|
+
}
|
|
6300
6453
|
|
|
6301
|
-
|
|
6302
|
-
|
|
6303
|
-
|
|
6304
|
-
element.style.setProperty(name, value, important ? 'important' : '');
|
|
6305
|
-
},
|
|
6454
|
+
function dispatchEvent(target, event) {
|
|
6455
|
+
return target.dispatchEvent(event);
|
|
6456
|
+
}
|
|
6306
6457
|
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6458
|
+
function getClassList(element) {
|
|
6459
|
+
return element.classList;
|
|
6460
|
+
}
|
|
6310
6461
|
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
|
|
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
|
+
}
|
|
6314
6467
|
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6468
|
+
function getBoundingClientRect(element) {
|
|
6469
|
+
return element.getBoundingClientRect();
|
|
6470
|
+
}
|
|
6318
6471
|
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6472
|
+
function querySelector(element, selectors) {
|
|
6473
|
+
return element.querySelector(selectors);
|
|
6474
|
+
}
|
|
6322
6475
|
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6476
|
+
function querySelectorAll(element, selectors) {
|
|
6477
|
+
return element.querySelectorAll(selectors);
|
|
6478
|
+
}
|
|
6326
6479
|
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
|
|
6480
|
+
function getElementsByTagName(element, tagNameOrWildCard) {
|
|
6481
|
+
return element.getElementsByTagName(tagNameOrWildCard);
|
|
6482
|
+
}
|
|
6330
6483
|
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
|
|
6484
|
+
function getElementsByClassName(element, names) {
|
|
6485
|
+
return element.getElementsByClassName(names);
|
|
6486
|
+
}
|
|
6334
6487
|
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6488
|
+
function getChildren(element) {
|
|
6489
|
+
return element.children;
|
|
6490
|
+
}
|
|
6338
6491
|
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6492
|
+
function getChildNodes(element) {
|
|
6493
|
+
return element.childNodes;
|
|
6494
|
+
}
|
|
6342
6495
|
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6496
|
+
function getFirstChild(element) {
|
|
6497
|
+
return element.firstChild;
|
|
6498
|
+
}
|
|
6346
6499
|
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6500
|
+
function getFirstElementChild(element) {
|
|
6501
|
+
return element.firstElementChild;
|
|
6502
|
+
}
|
|
6350
6503
|
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6504
|
+
function getLastChild(element) {
|
|
6505
|
+
return element.lastChild;
|
|
6506
|
+
}
|
|
6354
6507
|
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
}
|
|
6508
|
+
function getLastElementChild(element) {
|
|
6509
|
+
return element.lastElementChild;
|
|
6510
|
+
}
|
|
6359
6511
|
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
elm.textContent = content;
|
|
6364
|
-
globalStylesheetsParentElement.appendChild(elm);
|
|
6365
|
-
},
|
|
6512
|
+
function isConnected(node) {
|
|
6513
|
+
return node.isConnected;
|
|
6514
|
+
}
|
|
6366
6515
|
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
// Fall back to <style> element
|
|
6372
|
-
insertStyleElement(content, target);
|
|
6373
|
-
}
|
|
6374
|
-
},
|
|
6516
|
+
function insertGlobalStylesheet(content) {
|
|
6517
|
+
if (!isUndefined$1(globalStylesheets[content])) {
|
|
6518
|
+
return;
|
|
6519
|
+
}
|
|
6375
6520
|
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6521
|
+
globalStylesheets[content] = true;
|
|
6522
|
+
const elm = document.createElement('style');
|
|
6523
|
+
elm.type = 'text/css';
|
|
6524
|
+
elm.textContent = content;
|
|
6525
|
+
globalStylesheetsParentElement.appendChild(elm);
|
|
6526
|
+
}
|
|
6379
6527
|
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
|
|
6383
|
-
|
|
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);
|
|
6384
6577
|
/*
|
|
6385
6578
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
6386
6579
|
* All rights reserved.
|
|
@@ -6460,7 +6653,7 @@
|
|
|
6460
6653
|
throw new TypeError(`"createElement" function expects an "is" option with a valid component constructor.`);
|
|
6461
6654
|
}
|
|
6462
6655
|
|
|
6463
|
-
const UpgradableConstructor = getUpgradableConstructor(sel
|
|
6656
|
+
const UpgradableConstructor = getUpgradableConstructor(sel);
|
|
6464
6657
|
let wasComponentUpgraded = false; // the custom element from the registry is expecting an upgrade callback
|
|
6465
6658
|
|
|
6466
6659
|
/**
|
|
@@ -6475,8 +6668,7 @@
|
|
|
6475
6668
|
createVM(elm, def, {
|
|
6476
6669
|
tagName: sel,
|
|
6477
6670
|
mode: options.mode !== 'closed' ? 'open' : 'closed',
|
|
6478
|
-
owner: null
|
|
6479
|
-
renderer
|
|
6671
|
+
owner: null
|
|
6480
6672
|
});
|
|
6481
6673
|
ConnectingSlot.set(elm, connectRootElement);
|
|
6482
6674
|
DisconnectingSlot.set(elm, disconnectRootElement);
|
|
@@ -6499,6 +6691,10 @@
|
|
|
6499
6691
|
|
|
6500
6692
|
|
|
6501
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
|
+
|
|
6502
6698
|
if (!isFunction$1(Ctor)) {
|
|
6503
6699
|
throw new TypeError(`"hydrateComponent" expects a valid component constructor as the second parameter but instead received ${Ctor}.`);
|
|
6504
6700
|
}
|
|
@@ -6516,7 +6712,6 @@
|
|
|
6516
6712
|
createVM(element, def, {
|
|
6517
6713
|
mode: 'open',
|
|
6518
6714
|
owner: null,
|
|
6519
|
-
renderer,
|
|
6520
6715
|
tagName: element.tagName.toLowerCase()
|
|
6521
6716
|
});
|
|
6522
6717
|
|
|
@@ -6583,8 +6778,7 @@
|
|
|
6583
6778
|
createVM(this, def, {
|
|
6584
6779
|
mode: 'open',
|
|
6585
6780
|
owner: null,
|
|
6586
|
-
tagName: this.tagName
|
|
6587
|
-
renderer
|
|
6781
|
+
tagName: this.tagName
|
|
6588
6782
|
});
|
|
6589
6783
|
}
|
|
6590
6784
|
|
|
@@ -6651,7 +6845,7 @@
|
|
|
6651
6845
|
return false;
|
|
6652
6846
|
}
|
|
6653
6847
|
|
|
6654
|
-
if (
|
|
6848
|
+
if (isSyntheticShadowDefined) {
|
|
6655
6849
|
// TODO [#1252]: old behavior that is still used by some pieces of the platform,
|
|
6656
6850
|
// specifically, nodes inserted manually on places where `lwc:dom="manual"` directive is not
|
|
6657
6851
|
// used, will be considered global elements.
|
|
@@ -6704,7 +6898,7 @@
|
|
|
6704
6898
|
});
|
|
6705
6899
|
freeze(LightningElement);
|
|
6706
6900
|
seal(LightningElement.prototype);
|
|
6707
|
-
/* version: 2.
|
|
6901
|
+
/* version: 2.7.2 */
|
|
6708
6902
|
|
|
6709
6903
|
exports.LightningElement = LightningElement;
|
|
6710
6904
|
exports.__unstable__ProfilerControl = profilerControl;
|