lwc 2.6.2 → 2.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/engine-dom/esm/es2017/engine-dom.js +578 -384
- package/dist/engine-dom/iife/es2017/engine-dom.js +578 -384
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -9
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +552 -360
- package/dist/engine-dom/iife/es5/engine-dom.js +630 -335
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -9
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +598 -311
- package/dist/engine-dom/umd/es2017/engine-dom.js +578 -384
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -9
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +552 -360
- package/dist/engine-dom/umd/es5/engine-dom.js +630 -335
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -9
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +598 -311
- package/dist/engine-server/commonjs/es2017/engine-server.js +647 -454
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -9
- package/dist/engine-server/esm/es2017/engine-server.js +647 -454
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +115 -13
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +115 -13
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +115 -13
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +119 -13
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +119 -13
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +115 -13
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +115 -13
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +119 -13
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +119 -13
- package/dist/wire-service/esm/es2017/wire-service.js +2 -2
- package/dist/wire-service/iife/es2017/wire-service.js +2 -2
- package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
- package/dist/wire-service/iife/es5/wire-service.js +3 -3
- package/dist/wire-service/iife/es5/wire-service.min.js +1 -1
- package/dist/wire-service/iife/es5/wire-service_debug.js +3 -3
- package/dist/wire-service/umd/es2017/wire-service.js +2 -2
- package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
- package/dist/wire-service/umd/es5/wire-service.js +3 -3
- package/dist/wire-service/umd/es5/wire-service.min.js +1 -1
- package/dist/wire-service/umd/es5/wire-service_debug.js +3 -3
- package/package.json +8 -8
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
26
26
|
|
|
27
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); }
|
|
27
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
28
28
|
|
|
29
29
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
30
30
|
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
|
|
352
352
|
return attributeName;
|
|
353
353
|
}
|
|
354
|
-
/** version: 2.6.
|
|
354
|
+
/** version: 2.6.3 */
|
|
355
355
|
|
|
356
356
|
/*
|
|
357
357
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -463,7 +463,6 @@
|
|
|
463
463
|
ENABLE_NODE_LIST_PATCH: null,
|
|
464
464
|
ENABLE_HTML_COLLECTIONS_PATCH: null,
|
|
465
465
|
ENABLE_NODE_PATCH: null,
|
|
466
|
-
ENABLE_MIXED_SHADOW_MODE: null,
|
|
467
466
|
ENABLE_WIRE_SYNC_EMIT: null
|
|
468
467
|
};
|
|
469
468
|
|
|
@@ -530,7 +529,7 @@
|
|
|
530
529
|
setFeatureFlag(name, value);
|
|
531
530
|
}
|
|
532
531
|
}
|
|
533
|
-
/** version: 2.6.
|
|
532
|
+
/** version: 2.6.3 */
|
|
534
533
|
|
|
535
534
|
/* proxy-compat-disable */
|
|
536
535
|
|
|
@@ -618,6 +617,249 @@
|
|
|
618
617
|
}
|
|
619
618
|
|
|
620
619
|
return styleMap;
|
|
620
|
+
} //
|
|
621
|
+
// Primitives
|
|
622
|
+
//
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
var ssr$1;
|
|
626
|
+
|
|
627
|
+
function setSsr(ssrImpl) {
|
|
628
|
+
ssr$1 = ssrImpl;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
var isNativeShadowDefined$1;
|
|
632
|
+
|
|
633
|
+
function setIsNativeShadowDefined(isNativeShadowDefinedImpl) {
|
|
634
|
+
isNativeShadowDefined$1 = isNativeShadowDefinedImpl;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
var isSyntheticShadowDefined$1;
|
|
638
|
+
|
|
639
|
+
function setIsSyntheticShadowDefined(isSyntheticShadowDefinedImpl) {
|
|
640
|
+
isSyntheticShadowDefined$1 = isSyntheticShadowDefinedImpl;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
var HTMLElementExported$1;
|
|
644
|
+
|
|
645
|
+
function setHTMLElement(HTMLElementImpl) {
|
|
646
|
+
HTMLElementExported$1 = HTMLElementImpl;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
var isHydrating$1;
|
|
650
|
+
|
|
651
|
+
function setIsHydrating$1(isHydratingImpl) {
|
|
652
|
+
isHydrating$1 = isHydratingImpl;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
var insert$1;
|
|
656
|
+
|
|
657
|
+
function setInsert(insertImpl) {
|
|
658
|
+
insert$1 = insertImpl;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
var remove$1;
|
|
662
|
+
|
|
663
|
+
function setRemove(removeImpl) {
|
|
664
|
+
remove$1 = removeImpl;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
var createElement$2;
|
|
668
|
+
|
|
669
|
+
function setCreateElement(createElementImpl) {
|
|
670
|
+
createElement$2 = createElementImpl;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
var createText$1;
|
|
674
|
+
|
|
675
|
+
function setCreateText(createTextImpl) {
|
|
676
|
+
createText$1 = createTextImpl;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
var createComment$1;
|
|
680
|
+
|
|
681
|
+
function setCreateComment(createCommentImpl) {
|
|
682
|
+
createComment$1 = createCommentImpl;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
var nextSibling$1;
|
|
686
|
+
|
|
687
|
+
function setNextSibling(nextSiblingImpl) {
|
|
688
|
+
nextSibling$1 = nextSiblingImpl;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
var attachShadow$1;
|
|
692
|
+
|
|
693
|
+
function setAttachShadow(attachShadowImpl) {
|
|
694
|
+
attachShadow$1 = attachShadowImpl;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
var getProperty$1;
|
|
698
|
+
|
|
699
|
+
function setGetProperty(getPropertyImpl) {
|
|
700
|
+
getProperty$1 = getPropertyImpl;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
var setProperty$1;
|
|
704
|
+
|
|
705
|
+
function setSetProperty(setPropertyImpl) {
|
|
706
|
+
setProperty$1 = setPropertyImpl;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
var setText$1;
|
|
710
|
+
|
|
711
|
+
function setSetText(setTextImpl) {
|
|
712
|
+
setText$1 = setTextImpl;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
var getAttribute$1;
|
|
716
|
+
|
|
717
|
+
function setGetAttribute(getAttributeImpl) {
|
|
718
|
+
getAttribute$1 = getAttributeImpl;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
var setAttribute$1;
|
|
722
|
+
|
|
723
|
+
function setSetAttribute(setAttributeImpl) {
|
|
724
|
+
setAttribute$1 = setAttributeImpl;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
var removeAttribute$1;
|
|
728
|
+
|
|
729
|
+
function setRemoveAttribute(removeAttributeImpl) {
|
|
730
|
+
removeAttribute$1 = removeAttributeImpl;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
var addEventListener$1;
|
|
734
|
+
|
|
735
|
+
function setAddEventListener(addEventListenerImpl) {
|
|
736
|
+
addEventListener$1 = addEventListenerImpl;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
var removeEventListener$1;
|
|
740
|
+
|
|
741
|
+
function setRemoveEventListener(removeEventListenerImpl) {
|
|
742
|
+
removeEventListener$1 = removeEventListenerImpl;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
var dispatchEvent$1;
|
|
746
|
+
|
|
747
|
+
function setDispatchEvent(dispatchEventImpl) {
|
|
748
|
+
dispatchEvent$1 = dispatchEventImpl;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
var getClassList$1;
|
|
752
|
+
|
|
753
|
+
function setGetClassList(getClassListImpl) {
|
|
754
|
+
getClassList$1 = getClassListImpl;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
var setCSSStyleProperty$1;
|
|
758
|
+
|
|
759
|
+
function setSetCSSStyleProperty(setCSSStylePropertyImpl) {
|
|
760
|
+
setCSSStyleProperty$1 = setCSSStylePropertyImpl;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
var getBoundingClientRect$1;
|
|
764
|
+
|
|
765
|
+
function setGetBoundingClientRect(getBoundingClientRectImpl) {
|
|
766
|
+
getBoundingClientRect$1 = getBoundingClientRectImpl;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
var querySelector$1;
|
|
770
|
+
|
|
771
|
+
function setQuerySelector(querySelectorImpl) {
|
|
772
|
+
querySelector$1 = querySelectorImpl;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
var querySelectorAll$1;
|
|
776
|
+
|
|
777
|
+
function setQuerySelectorAll(querySelectorAllImpl) {
|
|
778
|
+
querySelectorAll$1 = querySelectorAllImpl;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
var getElementsByTagName$1;
|
|
782
|
+
|
|
783
|
+
function setGetElementsByTagName(getElementsByTagNameImpl) {
|
|
784
|
+
getElementsByTagName$1 = getElementsByTagNameImpl;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
var getElementsByClassName$1;
|
|
788
|
+
|
|
789
|
+
function setGetElementsByClassName(getElementsByClassNameImpl) {
|
|
790
|
+
getElementsByClassName$1 = getElementsByClassNameImpl;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
var getChildren$1;
|
|
794
|
+
|
|
795
|
+
function setGetChildren(getChildrenImpl) {
|
|
796
|
+
getChildren$1 = getChildrenImpl;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
var getChildNodes$1;
|
|
800
|
+
|
|
801
|
+
function setGetChildNodes(getChildNodesImpl) {
|
|
802
|
+
getChildNodes$1 = getChildNodesImpl;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
var getFirstChild$1;
|
|
806
|
+
|
|
807
|
+
function setGetFirstChild(getFirstChildImpl) {
|
|
808
|
+
getFirstChild$1 = getFirstChildImpl;
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
var getFirstElementChild$1;
|
|
812
|
+
|
|
813
|
+
function setGetFirstElementChild(getFirstElementChildImpl) {
|
|
814
|
+
getFirstElementChild$1 = getFirstElementChildImpl;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
var getLastChild$1;
|
|
818
|
+
|
|
819
|
+
function setGetLastChild(getLastChildImpl) {
|
|
820
|
+
getLastChild$1 = getLastChildImpl;
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
var getLastElementChild$1;
|
|
824
|
+
|
|
825
|
+
function setGetLastElementChild(getLastElementChildImpl) {
|
|
826
|
+
getLastElementChild$1 = getLastElementChildImpl;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
var isConnected$1;
|
|
830
|
+
|
|
831
|
+
function setIsConnected(isConnectedImpl) {
|
|
832
|
+
isConnected$1 = isConnectedImpl;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
var insertGlobalStylesheet$1;
|
|
836
|
+
|
|
837
|
+
function setInsertGlobalStylesheet(insertGlobalStylesheetImpl) {
|
|
838
|
+
insertGlobalStylesheet$1 = insertGlobalStylesheetImpl;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
var insertStylesheet$1;
|
|
842
|
+
|
|
843
|
+
function setInsertStylesheet(insertStylesheetImpl) {
|
|
844
|
+
insertStylesheet$1 = insertStylesheetImpl;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
var assertInstanceOfHTMLElement$1;
|
|
848
|
+
|
|
849
|
+
function setAssertInstanceOfHTMLElement(assertInstanceOfHTMLElementImpl) {
|
|
850
|
+
assertInstanceOfHTMLElement$1 = assertInstanceOfHTMLElementImpl;
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
var defineCustomElement$1;
|
|
854
|
+
|
|
855
|
+
function setDefineCustomElement(defineCustomElementImpl) {
|
|
856
|
+
defineCustomElement$1 = defineCustomElementImpl;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
var getCustomElement$1;
|
|
860
|
+
|
|
861
|
+
function setGetCustomElement(getCustomElementImpl) {
|
|
862
|
+
getCustomElement$1 = getCustomElementImpl;
|
|
621
863
|
}
|
|
622
864
|
/*
|
|
623
865
|
* Copyright (c) 2019, salesforce.com, inc.
|
|
@@ -869,8 +1111,7 @@
|
|
|
869
1111
|
|
|
870
1112
|
function createAllEventListeners(vnode) {
|
|
871
1113
|
var elm = vnode.elm,
|
|
872
|
-
on = vnode.data.on
|
|
873
|
-
renderer = vnode.owner.renderer;
|
|
1114
|
+
on = vnode.data.on;
|
|
874
1115
|
|
|
875
1116
|
if (isUndefined$1(on)) {
|
|
876
1117
|
return;
|
|
@@ -881,7 +1122,7 @@
|
|
|
881
1122
|
var name;
|
|
882
1123
|
|
|
883
1124
|
for (name in on) {
|
|
884
|
-
|
|
1125
|
+
addEventListener$1(elm, name, listener);
|
|
885
1126
|
}
|
|
886
1127
|
}
|
|
887
1128
|
|
|
@@ -1020,8 +1261,7 @@
|
|
|
1020
1261
|
var ColonCharCode = 58;
|
|
1021
1262
|
|
|
1022
1263
|
function updateAttrs(oldVnode, vnode) {
|
|
1023
|
-
var attrs = vnode.data.attrs
|
|
1024
|
-
renderer = vnode.owner.renderer;
|
|
1264
|
+
var attrs = vnode.data.attrs;
|
|
1025
1265
|
|
|
1026
1266
|
if (isUndefined$1(attrs)) {
|
|
1027
1267
|
return;
|
|
@@ -1038,8 +1278,6 @@
|
|
|
1038
1278
|
}
|
|
1039
1279
|
|
|
1040
1280
|
var elm = vnode.elm;
|
|
1041
|
-
var setAttribute = renderer.setAttribute,
|
|
1042
|
-
removeAttribute = renderer.removeAttribute;
|
|
1043
1281
|
var key;
|
|
1044
1282
|
oldAttrs = isUndefined$1(oldAttrs) ? EmptyObject : oldAttrs; // update modified attributes, add new attributes
|
|
1045
1283
|
// this routine is only useful for data-* attributes in all kind of elements
|
|
@@ -1054,14 +1292,14 @@
|
|
|
1054
1292
|
|
|
1055
1293
|
if (StringCharCodeAt.call(key, 3) === ColonCharCode) {
|
|
1056
1294
|
// Assume xml namespace
|
|
1057
|
-
setAttribute(elm, key, cur, xmlNS);
|
|
1295
|
+
setAttribute$1(elm, key, cur, xmlNS);
|
|
1058
1296
|
} else if (StringCharCodeAt.call(key, 5) === ColonCharCode) {
|
|
1059
1297
|
// Assume xlink namespace
|
|
1060
|
-
setAttribute(elm, key, cur, xlinkNS);
|
|
1061
|
-
} else if (isNull(cur)) {
|
|
1062
|
-
removeAttribute(elm, key);
|
|
1298
|
+
setAttribute$1(elm, key, cur, xlinkNS);
|
|
1299
|
+
} else if (isNull(cur) || isUndefined$1(cur)) {
|
|
1300
|
+
removeAttribute$1(elm, key);
|
|
1063
1301
|
} else {
|
|
1064
|
-
setAttribute(elm, key, cur);
|
|
1302
|
+
setAttribute$1(elm, key, cur);
|
|
1065
1303
|
}
|
|
1066
1304
|
|
|
1067
1305
|
lockAttribute();
|
|
@@ -1110,14 +1348,13 @@
|
|
|
1110
1348
|
|
|
1111
1349
|
var isFirstPatch = isUndefined$1(oldProps);
|
|
1112
1350
|
var elm = vnode.elm,
|
|
1113
|
-
sel = vnode.sel
|
|
1114
|
-
renderer = vnode.owner.renderer;
|
|
1351
|
+
sel = vnode.sel;
|
|
1115
1352
|
|
|
1116
1353
|
for (var key in props) {
|
|
1117
1354
|
var cur = props[key]; // if it is the first time this element is patched, or the current value is different to the previous value...
|
|
1118
1355
|
|
|
1119
|
-
if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ?
|
|
1120
|
-
|
|
1356
|
+
if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ? getProperty$1(elm, key) : oldProps[key])) {
|
|
1357
|
+
setProperty$1(elm, key, cur);
|
|
1121
1358
|
}
|
|
1122
1359
|
}
|
|
1123
1360
|
}
|
|
@@ -1185,15 +1422,14 @@
|
|
|
1185
1422
|
|
|
1186
1423
|
function updateClassAttribute(oldVnode, vnode) {
|
|
1187
1424
|
var elm = vnode.elm,
|
|
1188
|
-
newClass = vnode.data.className
|
|
1189
|
-
renderer = vnode.owner.renderer;
|
|
1425
|
+
newClass = vnode.data.className;
|
|
1190
1426
|
var oldClass = oldVnode.data.className;
|
|
1191
1427
|
|
|
1192
1428
|
if (oldClass === newClass) {
|
|
1193
1429
|
return;
|
|
1194
1430
|
}
|
|
1195
1431
|
|
|
1196
|
-
var classList =
|
|
1432
|
+
var classList = getClassList$1(elm);
|
|
1197
1433
|
var newClassMap = getMapFromClassName(newClass);
|
|
1198
1434
|
var oldClassMap = getMapFromClassName(oldClass);
|
|
1199
1435
|
var name;
|
|
@@ -1230,19 +1466,16 @@
|
|
|
1230
1466
|
|
|
1231
1467
|
function updateStyleAttribute(oldVnode, vnode) {
|
|
1232
1468
|
var elm = vnode.elm,
|
|
1233
|
-
newStyle = vnode.data.style
|
|
1234
|
-
renderer = vnode.owner.renderer;
|
|
1235
|
-
var setAttribute = renderer.setAttribute,
|
|
1236
|
-
removeAttribute = renderer.removeAttribute;
|
|
1469
|
+
newStyle = vnode.data.style;
|
|
1237
1470
|
|
|
1238
1471
|
if (oldVnode.data.style === newStyle) {
|
|
1239
1472
|
return;
|
|
1240
1473
|
}
|
|
1241
1474
|
|
|
1242
1475
|
if (!isString(newStyle) || newStyle === '') {
|
|
1243
|
-
removeAttribute(elm, 'style');
|
|
1476
|
+
removeAttribute$1(elm, 'style');
|
|
1244
1477
|
} else {
|
|
1245
|
-
setAttribute(elm, 'style', newStyle);
|
|
1478
|
+
setAttribute$1(elm, 'style', newStyle);
|
|
1246
1479
|
}
|
|
1247
1480
|
}
|
|
1248
1481
|
|
|
@@ -1266,14 +1499,13 @@
|
|
|
1266
1499
|
|
|
1267
1500
|
function createClassAttribute(vnode) {
|
|
1268
1501
|
var elm = vnode.elm,
|
|
1269
|
-
classMap = vnode.data.classMap
|
|
1270
|
-
renderer = vnode.owner.renderer;
|
|
1502
|
+
classMap = vnode.data.classMap;
|
|
1271
1503
|
|
|
1272
1504
|
if (isUndefined$1(classMap)) {
|
|
1273
1505
|
return;
|
|
1274
1506
|
}
|
|
1275
1507
|
|
|
1276
|
-
var classList =
|
|
1508
|
+
var classList = getClassList$1(elm);
|
|
1277
1509
|
|
|
1278
1510
|
for (var name in classMap) {
|
|
1279
1511
|
classList.add(name);
|
|
@@ -1294,8 +1526,7 @@
|
|
|
1294
1526
|
|
|
1295
1527
|
function createStyleAttribute(vnode) {
|
|
1296
1528
|
var elm = vnode.elm,
|
|
1297
|
-
styleDecls = vnode.data.styleDecls
|
|
1298
|
-
renderer = vnode.owner.renderer;
|
|
1529
|
+
styleDecls = vnode.data.styleDecls;
|
|
1299
1530
|
|
|
1300
1531
|
if (isUndefined$1(styleDecls)) {
|
|
1301
1532
|
return;
|
|
@@ -1307,7 +1538,7 @@
|
|
|
1307
1538
|
value = _styleDecls$_i[1],
|
|
1308
1539
|
important = _styleDecls$_i[2];
|
|
1309
1540
|
|
|
1310
|
-
|
|
1541
|
+
setCSSStyleProperty$1(elm, prop, value, important);
|
|
1311
1542
|
}
|
|
1312
1543
|
}
|
|
1313
1544
|
|
|
@@ -1321,15 +1552,6 @@
|
|
|
1321
1552
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
1322
1553
|
*/
|
|
1323
1554
|
|
|
1324
|
-
/**
|
|
1325
|
-
@license
|
|
1326
|
-
Copyright (c) 2015 Simon Friis Vindum.
|
|
1327
|
-
This code may only be used under the MIT License found at
|
|
1328
|
-
https://github.com/snabbdom/snabbdom/blob/master/LICENSE
|
|
1329
|
-
Code distributed by Snabbdom as part of the Snabbdom project at
|
|
1330
|
-
https://github.com/snabbdom/snabbdom/
|
|
1331
|
-
*/
|
|
1332
|
-
|
|
1333
1555
|
function isUndef(s) {
|
|
1334
1556
|
return s === undefined;
|
|
1335
1557
|
}
|
|
@@ -1417,7 +1639,7 @@
|
|
|
1417
1639
|
} else if (sameVnode(oldStartVnode, newEndVnode)) {
|
|
1418
1640
|
// Vnode moved right
|
|
1419
1641
|
patchVnode(oldStartVnode, newEndVnode);
|
|
1420
|
-
newEndVnode.hook.move(oldStartVnode, parentElm,
|
|
1642
|
+
newEndVnode.hook.move(oldStartVnode, parentElm, nextSibling$1(oldEndVnode.elm));
|
|
1421
1643
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
1422
1644
|
newEndVnode = newCh[--newEndIdx];
|
|
1423
1645
|
} else if (sameVnode(oldEndVnode, newStartVnode)) {
|
|
@@ -1864,7 +2086,7 @@
|
|
|
1864
2086
|
defineProperties(proto, getLightningElementPrototypeRestrictionsDescriptors(proto));
|
|
1865
2087
|
}
|
|
1866
2088
|
/*
|
|
1867
|
-
* Copyright (c)
|
|
2089
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
1868
2090
|
* All rights reserved.
|
|
1869
2091
|
* SPDX-License-Identifier: MIT
|
|
1870
2092
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
@@ -2800,21 +3022,18 @@
|
|
|
2800
3022
|
|
|
2801
3023
|
|
|
2802
3024
|
var LightningElement = function LightningElement() {
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
3025
|
+
// This should be as performant as possible, while any initialization should be done lazily
|
|
2806
3026
|
if (isNull(vmBeingConstructed)) {
|
|
2807
3027
|
throw new ReferenceError('Illegal constructor');
|
|
2808
3028
|
}
|
|
2809
3029
|
|
|
2810
3030
|
var vm = vmBeingConstructed;
|
|
2811
3031
|
var def = vm.def,
|
|
2812
|
-
elm = vm.elm
|
|
2813
|
-
renderer = vm.renderer;
|
|
3032
|
+
elm = vm.elm;
|
|
2814
3033
|
var bridge = def.bridge;
|
|
2815
3034
|
|
|
2816
3035
|
if (process.env.NODE_ENV !== 'production') {
|
|
2817
|
-
|
|
3036
|
+
assertInstanceOfHTMLElement$1(vm.elm, "Component creation requires a DOM element to be associated to ".concat(vm, "."));
|
|
2818
3037
|
}
|
|
2819
3038
|
|
|
2820
3039
|
var component = this;
|
|
@@ -2843,7 +3062,7 @@
|
|
|
2843
3062
|
if (vm.renderMode === 1
|
|
2844
3063
|
/* Shadow */
|
|
2845
3064
|
) {
|
|
2846
|
-
|
|
3065
|
+
doAttachShadow(vm);
|
|
2847
3066
|
} // Adding extra guard rails in DEV mode.
|
|
2848
3067
|
|
|
2849
3068
|
|
|
@@ -2855,15 +3074,14 @@
|
|
|
2855
3074
|
return this;
|
|
2856
3075
|
};
|
|
2857
3076
|
|
|
2858
|
-
function
|
|
2859
|
-
var
|
|
3077
|
+
function doAttachShadow(vm) {
|
|
3078
|
+
var _attachShadow$;
|
|
2860
3079
|
|
|
2861
3080
|
var elm = vm.elm,
|
|
2862
3081
|
mode = vm.mode,
|
|
2863
|
-
renderer = vm.renderer,
|
|
2864
3082
|
shadowMode = vm.shadowMode,
|
|
2865
3083
|
ctor = vm.def.ctor;
|
|
2866
|
-
var cmpRoot =
|
|
3084
|
+
var cmpRoot = attachShadow$1(elm, (_attachShadow$ = {}, _defineProperty(_attachShadow$, KEY__SYNTHETIC_MODE, shadowMode === 1), _defineProperty(_attachShadow$, "delegatesFocus", Boolean(ctor.delegatesFocus)), _defineProperty(_attachShadow$, "mode", mode), _attachShadow$));
|
|
2867
3085
|
vm.cmpRoot = cmpRoot;
|
|
2868
3086
|
associateVM(cmpRoot, vm);
|
|
2869
3087
|
|
|
@@ -2883,15 +3101,13 @@
|
|
|
2883
3101
|
constructor: LightningElement,
|
|
2884
3102
|
dispatchEvent: function dispatchEvent(event) {
|
|
2885
3103
|
var _getAssociatedVM = getAssociatedVM(this),
|
|
2886
|
-
elm = _getAssociatedVM.elm
|
|
2887
|
-
dispatchEvent = _getAssociatedVM.renderer.dispatchEvent;
|
|
3104
|
+
elm = _getAssociatedVM.elm;
|
|
2888
3105
|
|
|
2889
|
-
return dispatchEvent(elm, event);
|
|
3106
|
+
return dispatchEvent$1(elm, event);
|
|
2890
3107
|
},
|
|
2891
3108
|
addEventListener: function addEventListener(type, listener, options) {
|
|
2892
3109
|
var vm = getAssociatedVM(this);
|
|
2893
|
-
var elm = vm.elm
|
|
2894
|
-
addEventListener = vm.renderer.addEventListener;
|
|
3110
|
+
var elm = vm.elm;
|
|
2895
3111
|
|
|
2896
3112
|
if (process.env.NODE_ENV !== 'production') {
|
|
2897
3113
|
var _vmBeingRendered2 = getVMBeingRendered();
|
|
@@ -2902,111 +3118,99 @@
|
|
|
2902
3118
|
}
|
|
2903
3119
|
|
|
2904
3120
|
var wrappedListener = getWrappedComponentsListener(vm, listener);
|
|
2905
|
-
addEventListener(elm, type, wrappedListener, options);
|
|
3121
|
+
addEventListener$1(elm, type, wrappedListener, options);
|
|
2906
3122
|
},
|
|
2907
3123
|
removeEventListener: function removeEventListener(type, listener, options) {
|
|
2908
3124
|
var vm = getAssociatedVM(this);
|
|
2909
|
-
var elm = vm.elm
|
|
2910
|
-
removeEventListener = vm.renderer.removeEventListener;
|
|
3125
|
+
var elm = vm.elm;
|
|
2911
3126
|
var wrappedListener = getWrappedComponentsListener(vm, listener);
|
|
2912
|
-
removeEventListener(elm, type, wrappedListener, options);
|
|
3127
|
+
removeEventListener$1(elm, type, wrappedListener, options);
|
|
2913
3128
|
},
|
|
2914
3129
|
hasAttribute: function hasAttribute(name) {
|
|
2915
3130
|
var _getAssociatedVM2 = getAssociatedVM(this),
|
|
2916
|
-
elm = _getAssociatedVM2.elm
|
|
2917
|
-
getAttribute = _getAssociatedVM2.renderer.getAttribute;
|
|
3131
|
+
elm = _getAssociatedVM2.elm;
|
|
2918
3132
|
|
|
2919
|
-
return !isNull(getAttribute(elm, name));
|
|
3133
|
+
return !isNull(getAttribute$1(elm, name));
|
|
2920
3134
|
},
|
|
2921
3135
|
hasAttributeNS: function hasAttributeNS(namespace, name) {
|
|
2922
3136
|
var _getAssociatedVM3 = getAssociatedVM(this),
|
|
2923
|
-
elm = _getAssociatedVM3.elm
|
|
2924
|
-
getAttribute = _getAssociatedVM3.renderer.getAttribute;
|
|
3137
|
+
elm = _getAssociatedVM3.elm;
|
|
2925
3138
|
|
|
2926
|
-
return !isNull(getAttribute(elm, name, namespace));
|
|
3139
|
+
return !isNull(getAttribute$1(elm, name, namespace));
|
|
2927
3140
|
},
|
|
2928
3141
|
removeAttribute: function removeAttribute(name) {
|
|
2929
3142
|
var _getAssociatedVM4 = getAssociatedVM(this),
|
|
2930
|
-
elm = _getAssociatedVM4.elm
|
|
2931
|
-
removeAttribute = _getAssociatedVM4.renderer.removeAttribute;
|
|
3143
|
+
elm = _getAssociatedVM4.elm;
|
|
2932
3144
|
|
|
2933
3145
|
unlockAttribute(elm, name);
|
|
2934
|
-
removeAttribute(elm, name);
|
|
3146
|
+
removeAttribute$1(elm, name);
|
|
2935
3147
|
lockAttribute();
|
|
2936
3148
|
},
|
|
2937
3149
|
removeAttributeNS: function removeAttributeNS(namespace, name) {
|
|
2938
3150
|
var _getAssociatedVM5 = getAssociatedVM(this),
|
|
2939
|
-
elm = _getAssociatedVM5.elm
|
|
2940
|
-
removeAttribute = _getAssociatedVM5.renderer.removeAttribute;
|
|
3151
|
+
elm = _getAssociatedVM5.elm;
|
|
2941
3152
|
|
|
2942
3153
|
unlockAttribute(elm, name);
|
|
2943
|
-
removeAttribute(elm, name, namespace);
|
|
3154
|
+
removeAttribute$1(elm, name, namespace);
|
|
2944
3155
|
lockAttribute();
|
|
2945
3156
|
},
|
|
2946
3157
|
getAttribute: function getAttribute(name) {
|
|
2947
3158
|
var _getAssociatedVM6 = getAssociatedVM(this),
|
|
2948
|
-
elm = _getAssociatedVM6.elm
|
|
2949
|
-
getAttribute = _getAssociatedVM6.renderer.getAttribute;
|
|
3159
|
+
elm = _getAssociatedVM6.elm;
|
|
2950
3160
|
|
|
2951
|
-
return getAttribute(elm, name);
|
|
3161
|
+
return getAttribute$1(elm, name);
|
|
2952
3162
|
},
|
|
2953
3163
|
getAttributeNS: function getAttributeNS(namespace, name) {
|
|
2954
3164
|
var _getAssociatedVM7 = getAssociatedVM(this),
|
|
2955
|
-
elm = _getAssociatedVM7.elm
|
|
2956
|
-
getAttribute = _getAssociatedVM7.renderer.getAttribute;
|
|
3165
|
+
elm = _getAssociatedVM7.elm;
|
|
2957
3166
|
|
|
2958
|
-
return getAttribute(elm, name, namespace);
|
|
3167
|
+
return getAttribute$1(elm, name, namespace);
|
|
2959
3168
|
},
|
|
2960
3169
|
setAttribute: function setAttribute(name, value) {
|
|
2961
3170
|
var vm = getAssociatedVM(this);
|
|
2962
|
-
var elm = vm.elm
|
|
2963
|
-
setAttribute = vm.renderer.setAttribute;
|
|
3171
|
+
var elm = vm.elm;
|
|
2964
3172
|
|
|
2965
3173
|
if (process.env.NODE_ENV !== 'production') {
|
|
2966
3174
|
assert.isFalse(isBeingConstructed(vm), "Failed to construct '".concat(getComponentTag(vm), "': The result must not have attributes."));
|
|
2967
3175
|
}
|
|
2968
3176
|
|
|
2969
3177
|
unlockAttribute(elm, name);
|
|
2970
|
-
setAttribute(elm, name, value);
|
|
3178
|
+
setAttribute$1(elm, name, value);
|
|
2971
3179
|
lockAttribute();
|
|
2972
3180
|
},
|
|
2973
3181
|
setAttributeNS: function setAttributeNS(namespace, name, value) {
|
|
2974
3182
|
var vm = getAssociatedVM(this);
|
|
2975
|
-
var elm = vm.elm
|
|
2976
|
-
setAttribute = vm.renderer.setAttribute;
|
|
3183
|
+
var elm = vm.elm;
|
|
2977
3184
|
|
|
2978
3185
|
if (process.env.NODE_ENV !== 'production') {
|
|
2979
3186
|
assert.isFalse(isBeingConstructed(vm), "Failed to construct '".concat(getComponentTag(vm), "': The result must not have attributes."));
|
|
2980
3187
|
}
|
|
2981
3188
|
|
|
2982
3189
|
unlockAttribute(elm, name);
|
|
2983
|
-
setAttribute(elm, name, value, namespace);
|
|
3190
|
+
setAttribute$1(elm, name, value, namespace);
|
|
2984
3191
|
lockAttribute();
|
|
2985
3192
|
},
|
|
2986
3193
|
getBoundingClientRect: function getBoundingClientRect() {
|
|
2987
3194
|
var vm = getAssociatedVM(this);
|
|
2988
|
-
var elm = vm.elm
|
|
2989
|
-
getBoundingClientRect = vm.renderer.getBoundingClientRect;
|
|
3195
|
+
var elm = vm.elm;
|
|
2990
3196
|
|
|
2991
3197
|
if (process.env.NODE_ENV !== 'production') {
|
|
2992
3198
|
warnIfInvokedDuringConstruction(vm, 'getBoundingClientRect()');
|
|
2993
3199
|
}
|
|
2994
3200
|
|
|
2995
|
-
return getBoundingClientRect(elm);
|
|
3201
|
+
return getBoundingClientRect$1(elm);
|
|
2996
3202
|
},
|
|
2997
3203
|
|
|
2998
3204
|
get isConnected() {
|
|
2999
3205
|
var _getAssociatedVM8 = getAssociatedVM(this),
|
|
3000
|
-
elm = _getAssociatedVM8.elm
|
|
3001
|
-
isConnected = _getAssociatedVM8.renderer.isConnected;
|
|
3206
|
+
elm = _getAssociatedVM8.elm;
|
|
3002
3207
|
|
|
3003
|
-
return isConnected(elm);
|
|
3208
|
+
return isConnected$1(elm);
|
|
3004
3209
|
},
|
|
3005
3210
|
|
|
3006
3211
|
get classList() {
|
|
3007
3212
|
var vm = getAssociatedVM(this);
|
|
3008
|
-
var elm = vm.elm
|
|
3009
|
-
getClassList = vm.renderer.getClassList;
|
|
3213
|
+
var elm = vm.elm;
|
|
3010
3214
|
|
|
3011
3215
|
if (process.env.NODE_ENV !== 'production') {
|
|
3012
3216
|
// TODO [#1290]: this still fails in dev but works in production, eventually, we should
|
|
@@ -3014,7 +3218,7 @@
|
|
|
3014
3218
|
assert.isFalse(isBeingConstructed(vm), "Failed to construct ".concat(vm, ": The result must not have attributes. Adding or tampering with classname in constructor is not allowed in a web component, use connectedCallback() instead."));
|
|
3015
3219
|
}
|
|
3016
3220
|
|
|
3017
|
-
return getClassList(elm);
|
|
3221
|
+
return getClassList$1(elm);
|
|
3018
3222
|
},
|
|
3019
3223
|
|
|
3020
3224
|
get template() {
|
|
@@ -3046,25 +3250,47 @@
|
|
|
3046
3250
|
return "[object ".concat(vm.def.name, "]");
|
|
3047
3251
|
}
|
|
3048
3252
|
};
|
|
3049
|
-
var queryAndChildGetterDescriptors = create(null);
|
|
3050
|
-
|
|
3253
|
+
var queryAndChildGetterDescriptors = create(null); // The reason we don't just call `import * as renderer from '../renderer'` here is that the bundle size
|
|
3254
|
+
// is smaller if we reference each function individually. Otherwise Rollup will create one big frozen
|
|
3255
|
+
// object representing the renderer, with a lot of methods we don't actually need.
|
|
3256
|
+
|
|
3257
|
+
var childGetters = ['children', 'childNodes', 'firstChild', 'firstElementChild', 'lastChild', 'lastElementChild'];
|
|
3258
|
+
|
|
3259
|
+
function getChildGetter(methodName) {
|
|
3260
|
+
switch (methodName) {
|
|
3261
|
+
case 'children':
|
|
3262
|
+
return getChildren$1;
|
|
3263
|
+
|
|
3264
|
+
case 'childNodes':
|
|
3265
|
+
return getChildNodes$1;
|
|
3266
|
+
|
|
3267
|
+
case 'firstChild':
|
|
3268
|
+
return getFirstChild$1;
|
|
3269
|
+
|
|
3270
|
+
case 'firstElementChild':
|
|
3271
|
+
return getFirstElementChild$1;
|
|
3272
|
+
|
|
3273
|
+
case 'lastChild':
|
|
3274
|
+
return getLastChild$1;
|
|
3275
|
+
|
|
3276
|
+
case 'lastElementChild':
|
|
3277
|
+
return getLastElementChild$1;
|
|
3278
|
+
}
|
|
3279
|
+
} // Generic passthrough for child getters on HTMLElement to the relevant Renderer APIs
|
|
3051
3280
|
|
|
3052
|
-
var _loop = function _loop() {
|
|
3053
|
-
var _childGetters$_i = _slicedToArray(_childGetters[_i9], 2),
|
|
3054
|
-
elementProp = _childGetters$_i[0],
|
|
3055
|
-
rendererMethod = _childGetters$_i[1];
|
|
3056
3281
|
|
|
3057
|
-
|
|
3282
|
+
var _loop = function _loop() {
|
|
3283
|
+
var childGetter = _childGetters[_i9];
|
|
3284
|
+
queryAndChildGetterDescriptors[childGetter] = {
|
|
3058
3285
|
get: function get() {
|
|
3059
3286
|
var vm = getAssociatedVM(this);
|
|
3060
|
-
var elm = vm.elm
|
|
3061
|
-
renderer = vm.renderer;
|
|
3287
|
+
var elm = vm.elm;
|
|
3062
3288
|
|
|
3063
3289
|
if (process.env.NODE_ENV !== 'production') {
|
|
3064
|
-
warnIfInvokedDuringConstruction(vm,
|
|
3290
|
+
warnIfInvokedDuringConstruction(vm, childGetter);
|
|
3065
3291
|
}
|
|
3066
3292
|
|
|
3067
|
-
return
|
|
3293
|
+
return getChildGetter(childGetter)(elm);
|
|
3068
3294
|
},
|
|
3069
3295
|
configurable: true,
|
|
3070
3296
|
enumerable: true
|
|
@@ -3075,21 +3301,37 @@
|
|
|
3075
3301
|
_loop();
|
|
3076
3302
|
}
|
|
3077
3303
|
|
|
3078
|
-
var queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll'];
|
|
3304
|
+
var queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll'];
|
|
3305
|
+
|
|
3306
|
+
function getQueryMethod(methodName) {
|
|
3307
|
+
switch (methodName) {
|
|
3308
|
+
case 'getElementsByClassName':
|
|
3309
|
+
return getElementsByClassName$1;
|
|
3310
|
+
|
|
3311
|
+
case 'getElementsByTagName':
|
|
3312
|
+
return getElementsByTagName$1;
|
|
3313
|
+
|
|
3314
|
+
case 'querySelector':
|
|
3315
|
+
return querySelector$1;
|
|
3316
|
+
|
|
3317
|
+
case 'querySelectorAll':
|
|
3318
|
+
return querySelectorAll$1;
|
|
3319
|
+
}
|
|
3320
|
+
} // Generic passthrough for query APIs on HTMLElement to the relevant Renderer APIs
|
|
3321
|
+
|
|
3079
3322
|
|
|
3080
3323
|
var _loop2 = function _loop2() {
|
|
3081
3324
|
var queryMethod = _queryMethods[_i10];
|
|
3082
3325
|
queryAndChildGetterDescriptors[queryMethod] = {
|
|
3083
3326
|
value: function value(arg) {
|
|
3084
3327
|
var vm = getAssociatedVM(this);
|
|
3085
|
-
var elm = vm.elm
|
|
3086
|
-
renderer = vm.renderer;
|
|
3328
|
+
var elm = vm.elm;
|
|
3087
3329
|
|
|
3088
3330
|
if (process.env.NODE_ENV !== 'production') {
|
|
3089
3331
|
warnIfInvokedDuringConstruction(vm, "".concat(queryMethod, "()"));
|
|
3090
3332
|
}
|
|
3091
3333
|
|
|
3092
|
-
return
|
|
3334
|
+
return getQueryMethod(queryMethod)(elm, arg);
|
|
3093
3335
|
},
|
|
3094
3336
|
configurable: true,
|
|
3095
3337
|
enumerable: true,
|
|
@@ -4259,10 +4501,6 @@
|
|
|
4259
4501
|
|
|
4260
4502
|
assert.isTrue(Ctor.constructor, "Missing ".concat(ctorName, ".constructor, ").concat(ctorName, " should have a \"constructor\" property."));
|
|
4261
4503
|
|
|
4262
|
-
if (!runtimeFlags.ENABLE_MIXED_SHADOW_MODE) {
|
|
4263
|
-
assert.isFalse('shadowSupportMode' in Ctor, "".concat(ctorName || 'Anonymous class', " is an invalid LWC component. The shadowSupportMode static property is not available in this environment."));
|
|
4264
|
-
}
|
|
4265
|
-
|
|
4266
4504
|
if (!isUndefined$1(ctorShadowSupportMode)) {
|
|
4267
4505
|
assert.invariant(ctorShadowSupportMode === "any"
|
|
4268
4506
|
/* Any */
|
|
@@ -4498,21 +4736,20 @@
|
|
|
4498
4736
|
var token = cmpTemplate === null || cmpTemplate === void 0 ? void 0 : cmpTemplate.stylesheetToken;
|
|
4499
4737
|
|
|
4500
4738
|
if (!isUndefined$1(token) && context.hasScopedStyles) {
|
|
4501
|
-
|
|
4739
|
+
getClassList$1(elm).add(token);
|
|
4502
4740
|
}
|
|
4503
4741
|
}
|
|
4504
4742
|
|
|
4505
4743
|
function updateNodeHook(oldVnode, vnode) {
|
|
4506
4744
|
var elm = vnode.elm,
|
|
4507
|
-
text = vnode.text
|
|
4508
|
-
renderer = vnode.owner.renderer;
|
|
4745
|
+
text = vnode.text;
|
|
4509
4746
|
|
|
4510
4747
|
if (oldVnode.text !== text) {
|
|
4511
4748
|
if (process.env.NODE_ENV !== 'production') {
|
|
4512
4749
|
unlockDomMutation();
|
|
4513
4750
|
}
|
|
4514
4751
|
|
|
4515
|
-
|
|
4752
|
+
setText$1(elm, text);
|
|
4516
4753
|
|
|
4517
4754
|
if (process.env.NODE_ENV !== 'production') {
|
|
4518
4755
|
lockDomMutation();
|
|
@@ -4521,13 +4758,11 @@
|
|
|
4521
4758
|
}
|
|
4522
4759
|
|
|
4523
4760
|
function insertNodeHook(vnode, parentNode, referenceNode) {
|
|
4524
|
-
var renderer = vnode.owner.renderer;
|
|
4525
|
-
|
|
4526
4761
|
if (process.env.NODE_ENV !== 'production') {
|
|
4527
4762
|
unlockDomMutation();
|
|
4528
4763
|
}
|
|
4529
4764
|
|
|
4530
|
-
|
|
4765
|
+
insert$1(vnode.elm, parentNode, referenceNode);
|
|
4531
4766
|
|
|
4532
4767
|
if (process.env.NODE_ENV !== 'production') {
|
|
4533
4768
|
lockDomMutation();
|
|
@@ -4535,13 +4770,11 @@
|
|
|
4535
4770
|
}
|
|
4536
4771
|
|
|
4537
4772
|
function removeNodeHook(vnode, parentNode) {
|
|
4538
|
-
var renderer = vnode.owner.renderer;
|
|
4539
|
-
|
|
4540
4773
|
if (process.env.NODE_ENV !== 'production') {
|
|
4541
4774
|
unlockDomMutation();
|
|
4542
4775
|
}
|
|
4543
4776
|
|
|
4544
|
-
|
|
4777
|
+
remove$1(vnode.elm, parentNode);
|
|
4545
4778
|
|
|
4546
4779
|
if (process.env.NODE_ENV !== 'production') {
|
|
4547
4780
|
lockDomMutation();
|
|
@@ -4687,8 +4920,7 @@
|
|
|
4687
4920
|
createVM(elm, def, {
|
|
4688
4921
|
mode: mode,
|
|
4689
4922
|
owner: owner,
|
|
4690
|
-
tagName: sel
|
|
4691
|
-
renderer: owner.renderer
|
|
4923
|
+
tagName: sel
|
|
4692
4924
|
});
|
|
4693
4925
|
|
|
4694
4926
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4730,8 +4962,7 @@
|
|
|
4730
4962
|
|
|
4731
4963
|
function vnodesAndElementHaveCompatibleAttrs(vnode, elm) {
|
|
4732
4964
|
var _vnode$data$attrs = vnode.data.attrs,
|
|
4733
|
-
attrs = _vnode$data$attrs === void 0 ? {} : _vnode$data$attrs
|
|
4734
|
-
renderer = vnode.owner.renderer;
|
|
4965
|
+
attrs = _vnode$data$attrs === void 0 ? {} : _vnode$data$attrs;
|
|
4735
4966
|
var nodesAreCompatible = true; // Validate attributes, though we could always recovery from those by running the update mods.
|
|
4736
4967
|
// Note: intentionally ONLY matching vnodes.attrs to elm.attrs, in case SSR is adding extra attributes.
|
|
4737
4968
|
|
|
@@ -4740,7 +4971,7 @@
|
|
|
4740
4971
|
attrName = _Object$entries$_i[0],
|
|
4741
4972
|
attrValue = _Object$entries$_i[1];
|
|
4742
4973
|
|
|
4743
|
-
var elmAttrValue =
|
|
4974
|
+
var elmAttrValue = getAttribute$1(elm, attrName);
|
|
4744
4975
|
|
|
4745
4976
|
if (String(attrValue) !== elmAttrValue) {
|
|
4746
4977
|
logError("Mismatch hydrating element <".concat(elm.tagName.toLowerCase(), ">: attribute \"").concat(attrName, "\" has different values, expected \"").concat(attrValue, "\" but found \"").concat(elmAttrValue, "\""), vnode.owner);
|
|
@@ -4754,8 +4985,7 @@
|
|
|
4754
4985
|
function vnodesAndElementHaveCompatibleClass(vnode, elm) {
|
|
4755
4986
|
var _vnode$data = vnode.data,
|
|
4756
4987
|
className = _vnode$data.className,
|
|
4757
|
-
classMap = _vnode$data.classMap
|
|
4758
|
-
renderer = vnode.owner.renderer;
|
|
4988
|
+
classMap = _vnode$data.classMap;
|
|
4759
4989
|
var nodesAreCompatible = true;
|
|
4760
4990
|
var vnodeClassName;
|
|
4761
4991
|
|
|
@@ -4765,7 +4995,7 @@
|
|
|
4765
4995
|
vnodeClassName = className;
|
|
4766
4996
|
} else if (!isUndefined$1(classMap)) {
|
|
4767
4997
|
// classMap is used when class is set to static value.
|
|
4768
|
-
var classList =
|
|
4998
|
+
var classList = getClassList$1(elm);
|
|
4769
4999
|
var computedClassName = ''; // all classes from the vnode should be in the element.classList
|
|
4770
5000
|
|
|
4771
5001
|
for (var name in classMap) {
|
|
@@ -4793,9 +5023,8 @@
|
|
|
4793
5023
|
function vnodesAndElementHaveCompatibleStyle(vnode, elm) {
|
|
4794
5024
|
var _vnode$data2 = vnode.data,
|
|
4795
5025
|
style = _vnode$data2.style,
|
|
4796
|
-
styleDecls = _vnode$data2.styleDecls
|
|
4797
|
-
|
|
4798
|
-
var elmStyle = renderer.getAttribute(elm, 'style') || '';
|
|
5026
|
+
styleDecls = _vnode$data2.styleDecls;
|
|
5027
|
+
var elmStyle = getAttribute$1(elm, 'style') || '';
|
|
4799
5028
|
var vnodeStyle;
|
|
4800
5029
|
var nodesAreCompatible = true;
|
|
4801
5030
|
|
|
@@ -4936,12 +5165,12 @@
|
|
|
4936
5165
|
*/
|
|
4937
5166
|
|
|
4938
5167
|
|
|
4939
|
-
function getUpgradableConstructor(tagName
|
|
5168
|
+
function getUpgradableConstructor(tagName) {
|
|
4940
5169
|
// Should never get a tag with upper case letter at this point, the compiler should
|
|
4941
5170
|
// produce only tags with lowercase letters
|
|
4942
5171
|
// But, for backwards compatibility, we will lower case the tagName
|
|
4943
5172
|
tagName = tagName.toLowerCase();
|
|
4944
|
-
var CE =
|
|
5173
|
+
var CE = getCustomElement$1(tagName);
|
|
4945
5174
|
|
|
4946
5175
|
if (!isUndefined$1(CE)) {
|
|
4947
5176
|
return CE;
|
|
@@ -4952,8 +5181,8 @@
|
|
|
4952
5181
|
*/
|
|
4953
5182
|
|
|
4954
5183
|
|
|
4955
|
-
CE = /*#__PURE__*/function (
|
|
4956
|
-
_inherits(LWCUpgradableElement,
|
|
5184
|
+
CE = /*#__PURE__*/function (_HTMLElementExported$) {
|
|
5185
|
+
_inherits(LWCUpgradableElement, _HTMLElementExported$);
|
|
4957
5186
|
|
|
4958
5187
|
var _super5 = _createSuper(LWCUpgradableElement);
|
|
4959
5188
|
|
|
@@ -4972,9 +5201,9 @@
|
|
|
4972
5201
|
}
|
|
4973
5202
|
|
|
4974
5203
|
return _createClass(LWCUpgradableElement);
|
|
4975
|
-
}(
|
|
5204
|
+
}(HTMLElementExported$1);
|
|
4976
5205
|
|
|
4977
|
-
|
|
5206
|
+
defineCustomElement$1(tagName, CE);
|
|
4978
5207
|
return CE;
|
|
4979
5208
|
}
|
|
4980
5209
|
/*
|
|
@@ -4990,8 +5219,7 @@
|
|
|
4990
5219
|
var TextHook = {
|
|
4991
5220
|
create: function create(vnode) {
|
|
4992
5221
|
var owner = vnode.owner;
|
|
4993
|
-
var
|
|
4994
|
-
var elm = renderer.createText(vnode.text);
|
|
5222
|
+
var elm = createText$1(vnode.text);
|
|
4995
5223
|
linkNodeToShadow(elm, owner);
|
|
4996
5224
|
vnode.elm = elm;
|
|
4997
5225
|
},
|
|
@@ -5023,8 +5251,7 @@
|
|
|
5023
5251
|
create: function create(vnode) {
|
|
5024
5252
|
var owner = vnode.owner,
|
|
5025
5253
|
text = vnode.text;
|
|
5026
|
-
var
|
|
5027
|
-
var elm = renderer.createComment(text);
|
|
5254
|
+
var elm = createComment$1(text);
|
|
5028
5255
|
linkNodeToShadow(elm, owner);
|
|
5029
5256
|
vnode.elm = elm;
|
|
5030
5257
|
},
|
|
@@ -5062,9 +5289,8 @@
|
|
|
5062
5289
|
var sel = vnode.sel,
|
|
5063
5290
|
owner = vnode.owner,
|
|
5064
5291
|
svg = vnode.data.svg;
|
|
5065
|
-
var renderer = owner.renderer;
|
|
5066
5292
|
var namespace = isTrue(svg) ? SVG_NAMESPACE : undefined;
|
|
5067
|
-
var elm =
|
|
5293
|
+
var elm = createElement$2(sel, namespace);
|
|
5068
5294
|
linkNodeToShadow(elm, owner);
|
|
5069
5295
|
fallbackElmHook(elm, vnode);
|
|
5070
5296
|
vnode.elm = elm;
|
|
@@ -5118,8 +5344,7 @@
|
|
|
5118
5344
|
create: function create(vnode) {
|
|
5119
5345
|
var sel = vnode.sel,
|
|
5120
5346
|
owner = vnode.owner;
|
|
5121
|
-
var
|
|
5122
|
-
var UpgradableConstructor = getUpgradableConstructor(sel, renderer);
|
|
5347
|
+
var UpgradableConstructor = getUpgradableConstructor(sel);
|
|
5123
5348
|
/**
|
|
5124
5349
|
* Note: if the upgradable constructor does not expect, or throw when we new it
|
|
5125
5350
|
* with a callback as the first argument, we could implement a more advanced
|
|
@@ -5210,8 +5435,7 @@
|
|
|
5210
5435
|
createVM(elm, def, {
|
|
5211
5436
|
mode: mode,
|
|
5212
5437
|
owner: owner,
|
|
5213
|
-
tagName: sel
|
|
5214
|
-
renderer: owner.renderer
|
|
5438
|
+
tagName: sel
|
|
5215
5439
|
});
|
|
5216
5440
|
vnode.elm = elm;
|
|
5217
5441
|
var vm = getAssociatedVM(elm);
|
|
@@ -5239,11 +5463,10 @@
|
|
|
5239
5463
|
};
|
|
5240
5464
|
|
|
5241
5465
|
function linkNodeToShadow(elm, owner) {
|
|
5242
|
-
var
|
|
5243
|
-
renderMode = owner.renderMode,
|
|
5466
|
+
var renderMode = owner.renderMode,
|
|
5244
5467
|
shadowMode = owner.shadowMode; // TODO [#1164]: this should eventually be done by the polyfill directly
|
|
5245
5468
|
|
|
5246
|
-
if (
|
|
5469
|
+
if (isSyntheticShadowDefined$1) {
|
|
5247
5470
|
if (shadowMode === 1
|
|
5248
5471
|
/* Synthetic */
|
|
5249
5472
|
|| renderMode === 0
|
|
@@ -5764,7 +5987,6 @@
|
|
|
5764
5987
|
function updateStylesheetToken(vm, template) {
|
|
5765
5988
|
var elm = vm.elm,
|
|
5766
5989
|
context = vm.context,
|
|
5767
|
-
renderer = vm.renderer,
|
|
5768
5990
|
renderMode = vm.renderMode,
|
|
5769
5991
|
shadowMode = vm.shadowMode;
|
|
5770
5992
|
var newStylesheets = template.stylesheets,
|
|
@@ -5784,11 +6006,11 @@
|
|
|
5784
6006
|
oldHasTokenInAttribute = context.hasTokenInAttribute;
|
|
5785
6007
|
|
|
5786
6008
|
if (oldHasTokenInClass) {
|
|
5787
|
-
|
|
6009
|
+
getClassList$1(elm).remove(makeHostToken(oldToken));
|
|
5788
6010
|
}
|
|
5789
6011
|
|
|
5790
6012
|
if (oldHasTokenInAttribute) {
|
|
5791
|
-
|
|
6013
|
+
removeAttribute$1(elm, makeHostToken(oldToken));
|
|
5792
6014
|
} // Apply the new template styling token to the host element, if the new template has any
|
|
5793
6015
|
// associated stylesheets. In the case of light DOM, also ensure there is at least one scoped stylesheet.
|
|
5794
6016
|
|
|
@@ -5800,12 +6022,12 @@
|
|
|
5800
6022
|
|
|
5801
6023
|
if (!isUndefined$1(newToken)) {
|
|
5802
6024
|
if (hasScopedStyles) {
|
|
5803
|
-
|
|
6025
|
+
getClassList$1(elm).add(makeHostToken(newToken));
|
|
5804
6026
|
newHasTokenInClass = true;
|
|
5805
6027
|
}
|
|
5806
6028
|
|
|
5807
6029
|
if (isSyntheticShadow) {
|
|
5808
|
-
|
|
6030
|
+
setAttribute$1(elm, makeHostToken(newToken), '');
|
|
5809
6031
|
newHasTokenInAttribute = true;
|
|
5810
6032
|
}
|
|
5811
6033
|
} // Update the styling tokens present on the context object.
|
|
@@ -5923,8 +6145,7 @@
|
|
|
5923
6145
|
}
|
|
5924
6146
|
|
|
5925
6147
|
function createStylesheet(vm, stylesheets) {
|
|
5926
|
-
var
|
|
5927
|
-
renderMode = vm.renderMode,
|
|
6148
|
+
var renderMode = vm.renderMode,
|
|
5928
6149
|
shadowMode = vm.shadowMode;
|
|
5929
6150
|
|
|
5930
6151
|
if (renderMode === 1
|
|
@@ -5933,9 +6154,9 @@
|
|
|
5933
6154
|
/* Synthetic */
|
|
5934
6155
|
) {
|
|
5935
6156
|
for (var _i17 = 0; _i17 < stylesheets.length; _i17++) {
|
|
5936
|
-
|
|
6157
|
+
insertGlobalStylesheet$1(stylesheets[_i17]);
|
|
5937
6158
|
}
|
|
5938
|
-
} else if (
|
|
6159
|
+
} else if (ssr$1 || isHydrating$1()) {
|
|
5939
6160
|
// Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
|
|
5940
6161
|
// This works in the client, because the stylesheets are created, and cached in the VM
|
|
5941
6162
|
// the first time the VM renders.
|
|
@@ -5949,10 +6170,10 @@
|
|
|
5949
6170
|
|
|
5950
6171
|
for (var _i18 = 0; _i18 < stylesheets.length; _i18++) {
|
|
5951
6172
|
if (isGlobal) {
|
|
5952
|
-
|
|
6173
|
+
insertGlobalStylesheet$1(stylesheets[_i18]);
|
|
5953
6174
|
} else {
|
|
5954
6175
|
// local level
|
|
5955
|
-
|
|
6176
|
+
insertStylesheet$1(stylesheets[_i18], root.cmpRoot);
|
|
5956
6177
|
}
|
|
5957
6178
|
}
|
|
5958
6179
|
}
|
|
@@ -6614,7 +6835,6 @@
|
|
|
6614
6835
|
function createVM(elm, def, options) {
|
|
6615
6836
|
var mode = options.mode,
|
|
6616
6837
|
owner = options.owner,
|
|
6617
|
-
renderer = options.renderer,
|
|
6618
6838
|
tagName = options.tagName;
|
|
6619
6839
|
var vm = {
|
|
6620
6840
|
elm: elm,
|
|
@@ -6628,7 +6848,6 @@
|
|
|
6628
6848
|
tagName: tagName,
|
|
6629
6849
|
mode: mode,
|
|
6630
6850
|
owner: owner,
|
|
6631
|
-
renderer: renderer,
|
|
6632
6851
|
children: EmptyArray,
|
|
6633
6852
|
aChildren: EmptyArray,
|
|
6634
6853
|
velements: EmptyArray,
|
|
@@ -6682,13 +6901,10 @@
|
|
|
6682
6901
|
}
|
|
6683
6902
|
|
|
6684
6903
|
function computeShadowMode(vm) {
|
|
6685
|
-
var def = vm.def
|
|
6686
|
-
renderer = vm.renderer;
|
|
6687
|
-
var isNativeShadowDefined = renderer.isNativeShadowDefined,
|
|
6688
|
-
isSyntheticShadowDefined = renderer.isSyntheticShadowDefined;
|
|
6904
|
+
var def = vm.def;
|
|
6689
6905
|
var shadowMode;
|
|
6690
6906
|
|
|
6691
|
-
if (isSyntheticShadowDefined) {
|
|
6907
|
+
if (isSyntheticShadowDefined$1) {
|
|
6692
6908
|
if (def.renderMode === 0
|
|
6693
6909
|
/* Light */
|
|
6694
6910
|
) {
|
|
@@ -6697,7 +6913,7 @@
|
|
|
6697
6913
|
shadowMode = 0
|
|
6698
6914
|
/* Native */
|
|
6699
6915
|
;
|
|
6700
|
-
} else if (isNativeShadowDefined) {
|
|
6916
|
+
} else if (isNativeShadowDefined$1) {
|
|
6701
6917
|
if (def.shadowSupportMode === "any"
|
|
6702
6918
|
/* Any */
|
|
6703
6919
|
) {
|
|
@@ -6834,10 +7050,9 @@
|
|
|
6834
7050
|
}
|
|
6835
7051
|
|
|
6836
7052
|
function runRenderedCallback(vm) {
|
|
6837
|
-
var
|
|
6838
|
-
renderedCallback = vm.def.renderedCallback;
|
|
7053
|
+
var renderedCallback = vm.def.renderedCallback;
|
|
6839
7054
|
|
|
6840
|
-
if (isTrue(
|
|
7055
|
+
if (isTrue(ssr$1)) {
|
|
6841
7056
|
return;
|
|
6842
7057
|
}
|
|
6843
7058
|
|
|
@@ -7046,15 +7261,14 @@
|
|
|
7046
7261
|
|
|
7047
7262
|
|
|
7048
7263
|
function resetComponentRoot(vm) {
|
|
7049
|
-
var children = vm.children
|
|
7050
|
-
renderer = vm.renderer;
|
|
7264
|
+
var children = vm.children;
|
|
7051
7265
|
var rootNode = getRenderRoot(vm);
|
|
7052
7266
|
|
|
7053
7267
|
for (var _i25 = 0, _len9 = children.length; _i25 < _len9; _i25++) {
|
|
7054
7268
|
var child = children[_i25];
|
|
7055
7269
|
|
|
7056
7270
|
if (!isNull(child) && !isUndefined$1(child.elm)) {
|
|
7057
|
-
|
|
7271
|
+
remove$1(child.elm, rootNode);
|
|
7058
7272
|
}
|
|
7059
7273
|
}
|
|
7060
7274
|
|
|
@@ -7064,7 +7278,7 @@
|
|
|
7064
7278
|
}
|
|
7065
7279
|
|
|
7066
7280
|
function scheduleRehydration(vm) {
|
|
7067
|
-
if (isTrue(
|
|
7281
|
+
if (isTrue(ssr$1) || isTrue(vm.isScheduled)) {
|
|
7068
7282
|
return;
|
|
7069
7283
|
}
|
|
7070
7284
|
|
|
@@ -7314,7 +7528,6 @@
|
|
|
7314
7528
|
}
|
|
7315
7529
|
|
|
7316
7530
|
var elm = vm.elm,
|
|
7317
|
-
renderer = vm.renderer,
|
|
7318
7531
|
_vm$context = vm.context,
|
|
7319
7532
|
wiredConnecting = _vm$context.wiredConnecting,
|
|
7320
7533
|
wiredDisconnecting = _vm$context.wiredDisconnecting; // waiting for the component to be connected to formally request the context via the token
|
|
@@ -7337,7 +7550,7 @@
|
|
|
7337
7550
|
ArrayPush$1.call(wiredDisconnecting, disconnectCallback);
|
|
7338
7551
|
}
|
|
7339
7552
|
});
|
|
7340
|
-
|
|
7553
|
+
dispatchEvent$1(elm, contextRegistrationEvent);
|
|
7341
7554
|
});
|
|
7342
7555
|
}
|
|
7343
7556
|
|
|
@@ -7591,7 +7804,7 @@
|
|
|
7591
7804
|
hooksAreSet = true;
|
|
7592
7805
|
setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
|
|
7593
7806
|
}
|
|
7594
|
-
/* version: 2.6.
|
|
7807
|
+
/* version: 2.6.3 */
|
|
7595
7808
|
|
|
7596
7809
|
/*
|
|
7597
7810
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -7621,7 +7834,9 @@
|
|
|
7621
7834
|
var styleElements = create(null);
|
|
7622
7835
|
var styleSheets = create(null);
|
|
7623
7836
|
var nodesToStyleSheets = new WeakMap();
|
|
7624
|
-
var getCustomElement
|
|
7837
|
+
var getCustomElement;
|
|
7838
|
+
var defineCustomElement;
|
|
7839
|
+
var HTMLElementConstructor;
|
|
7625
7840
|
|
|
7626
7841
|
function isCustomElementRegistryAvailable() {
|
|
7627
7842
|
if (typeof customElements === 'undefined') {
|
|
@@ -7746,152 +7961,231 @@
|
|
|
7746
7961
|
HTMLElementConstructor.prototype = HTMLElement.prototype;
|
|
7747
7962
|
}
|
|
7748
7963
|
|
|
7749
|
-
var
|
|
7964
|
+
var hydrating = false;
|
|
7750
7965
|
|
|
7751
|
-
function setIsHydrating(
|
|
7752
|
-
|
|
7966
|
+
function setIsHydrating(value) {
|
|
7967
|
+
hydrating = value;
|
|
7753
7968
|
}
|
|
7754
7969
|
|
|
7755
|
-
var
|
|
7756
|
-
ssr: false,
|
|
7757
|
-
isHydrating: function isHydrating() {
|
|
7758
|
-
return _isHydrating;
|
|
7759
|
-
},
|
|
7760
|
-
isNativeShadowDefined: _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED],
|
|
7761
|
-
isSyntheticShadowDefined: hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN),
|
|
7762
|
-
createElement: function createElement(tagName, namespace) {
|
|
7763
|
-
return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
|
|
7764
|
-
},
|
|
7765
|
-
createText: function createText(content) {
|
|
7766
|
-
return document.createTextNode(content);
|
|
7767
|
-
},
|
|
7768
|
-
createComment: function createComment(content) {
|
|
7769
|
-
return document.createComment(content);
|
|
7770
|
-
},
|
|
7771
|
-
insert: function insert(node, parent, anchor) {
|
|
7772
|
-
parent.insertBefore(node, anchor);
|
|
7773
|
-
},
|
|
7774
|
-
remove: function remove(node, parent) {
|
|
7775
|
-
parent.removeChild(node);
|
|
7776
|
-
},
|
|
7777
|
-
nextSibling: function nextSibling(node) {
|
|
7778
|
-
return node.nextSibling;
|
|
7779
|
-
},
|
|
7780
|
-
attachShadow: function attachShadow(element, options) {
|
|
7781
|
-
if (_isHydrating) {
|
|
7782
|
-
return element.shadowRoot;
|
|
7783
|
-
}
|
|
7970
|
+
var ssr = false;
|
|
7784
7971
|
|
|
7785
|
-
|
|
7786
|
-
|
|
7787
|
-
|
|
7788
|
-
node.nodeValue = content;
|
|
7789
|
-
},
|
|
7790
|
-
getProperty: function getProperty(node, key) {
|
|
7791
|
-
return node[key];
|
|
7792
|
-
},
|
|
7793
|
-
setProperty: function setProperty(node, key, value) {
|
|
7794
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
7795
|
-
if (node instanceof Element && !(key in node)) {
|
|
7796
|
-
// TODO [#1297]: Move this validation to the compiler
|
|
7797
|
-
assert.fail("Unknown public property \"".concat(key, "\" of element <").concat(node.tagName, ">. This is likely a typo on the corresponding attribute \"").concat(htmlPropertyToAttribute(key), "\"."));
|
|
7798
|
-
}
|
|
7799
|
-
}
|
|
7972
|
+
function isHydrating() {
|
|
7973
|
+
return hydrating;
|
|
7974
|
+
}
|
|
7800
7975
|
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
getAttribute: function getAttribute(element, name, namespace) {
|
|
7804
|
-
return isUndefined$1(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
|
|
7805
|
-
},
|
|
7806
|
-
setAttribute: function setAttribute(element, name, value, namespace) {
|
|
7807
|
-
return isUndefined$1(namespace) ? element.setAttribute(name, value) : element.setAttributeNS(namespace, name, value);
|
|
7808
|
-
},
|
|
7809
|
-
removeAttribute: function removeAttribute(element, name, namespace) {
|
|
7810
|
-
if (isUndefined$1(namespace)) {
|
|
7811
|
-
element.removeAttribute(name);
|
|
7812
|
-
} else {
|
|
7813
|
-
element.removeAttributeNS(namespace, name);
|
|
7814
|
-
}
|
|
7815
|
-
},
|
|
7816
|
-
addEventListener: function addEventListener(target, type, callback, options) {
|
|
7817
|
-
target.addEventListener(type, callback, options);
|
|
7818
|
-
},
|
|
7819
|
-
removeEventListener: function removeEventListener(target, type, callback, options) {
|
|
7820
|
-
target.removeEventListener(type, callback, options);
|
|
7821
|
-
},
|
|
7822
|
-
dispatchEvent: function dispatchEvent(target, event) {
|
|
7823
|
-
return target.dispatchEvent(event);
|
|
7824
|
-
},
|
|
7825
|
-
getClassList: function getClassList(element) {
|
|
7826
|
-
return element.classList;
|
|
7827
|
-
},
|
|
7828
|
-
setCSSStyleProperty: function setCSSStyleProperty(element, name, value, important) {
|
|
7829
|
-
// TODO [#0]: How to avoid this type casting? Shall we use a different type interface to
|
|
7830
|
-
// represent elements in the engine?
|
|
7831
|
-
element.style.setProperty(name, value, important ? 'important' : '');
|
|
7832
|
-
},
|
|
7833
|
-
getBoundingClientRect: function getBoundingClientRect(element) {
|
|
7834
|
-
return element.getBoundingClientRect();
|
|
7835
|
-
},
|
|
7836
|
-
querySelector: function querySelector(element, selectors) {
|
|
7837
|
-
return element.querySelector(selectors);
|
|
7838
|
-
},
|
|
7839
|
-
querySelectorAll: function querySelectorAll(element, selectors) {
|
|
7840
|
-
return element.querySelectorAll(selectors);
|
|
7841
|
-
},
|
|
7842
|
-
getElementsByTagName: function getElementsByTagName(element, tagNameOrWildCard) {
|
|
7843
|
-
return element.getElementsByTagName(tagNameOrWildCard);
|
|
7844
|
-
},
|
|
7845
|
-
getElementsByClassName: function getElementsByClassName(element, names) {
|
|
7846
|
-
return element.getElementsByClassName(names);
|
|
7847
|
-
},
|
|
7848
|
-
getChildren: function getChildren(element) {
|
|
7849
|
-
return element.children;
|
|
7850
|
-
},
|
|
7851
|
-
getChildNodes: function getChildNodes(element) {
|
|
7852
|
-
return element.childNodes;
|
|
7853
|
-
},
|
|
7854
|
-
getFirstChild: function getFirstChild(element) {
|
|
7855
|
-
return element.firstChild;
|
|
7856
|
-
},
|
|
7857
|
-
getFirstElementChild: function getFirstElementChild(element) {
|
|
7858
|
-
return element.firstElementChild;
|
|
7859
|
-
},
|
|
7860
|
-
getLastChild: function getLastChild(element) {
|
|
7861
|
-
return element.lastChild;
|
|
7862
|
-
},
|
|
7863
|
-
getLastElementChild: function getLastElementChild(element) {
|
|
7864
|
-
return element.lastElementChild;
|
|
7865
|
-
},
|
|
7866
|
-
isConnected: function isConnected(node) {
|
|
7867
|
-
return node.isConnected;
|
|
7868
|
-
},
|
|
7869
|
-
insertGlobalStylesheet: function insertGlobalStylesheet(content) {
|
|
7870
|
-
if (!isUndefined$1(globalStylesheets[content])) {
|
|
7871
|
-
return;
|
|
7872
|
-
}
|
|
7976
|
+
var isNativeShadowDefined = _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED];
|
|
7977
|
+
var isSyntheticShadowDefined = hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN);
|
|
7873
7978
|
|
|
7874
|
-
|
|
7875
|
-
|
|
7876
|
-
|
|
7877
|
-
|
|
7878
|
-
|
|
7879
|
-
|
|
7880
|
-
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
|
|
7885
|
-
|
|
7979
|
+
function createElement$1(tagName, namespace) {
|
|
7980
|
+
return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
|
|
7981
|
+
}
|
|
7982
|
+
|
|
7983
|
+
function createText(content) {
|
|
7984
|
+
return document.createTextNode(content);
|
|
7985
|
+
}
|
|
7986
|
+
|
|
7987
|
+
function createComment(content) {
|
|
7988
|
+
return document.createComment(content);
|
|
7989
|
+
}
|
|
7990
|
+
|
|
7991
|
+
function insert(node, parent, anchor) {
|
|
7992
|
+
parent.insertBefore(node, anchor);
|
|
7993
|
+
}
|
|
7994
|
+
|
|
7995
|
+
function remove(node, parent) {
|
|
7996
|
+
parent.removeChild(node);
|
|
7997
|
+
}
|
|
7998
|
+
|
|
7999
|
+
function nextSibling(node) {
|
|
8000
|
+
return node.nextSibling;
|
|
8001
|
+
}
|
|
8002
|
+
|
|
8003
|
+
function attachShadow(element, options) {
|
|
8004
|
+
if (hydrating) {
|
|
8005
|
+
return element.shadowRoot;
|
|
8006
|
+
}
|
|
8007
|
+
|
|
8008
|
+
return element.attachShadow(options);
|
|
8009
|
+
}
|
|
8010
|
+
|
|
8011
|
+
function setText(node, content) {
|
|
8012
|
+
node.nodeValue = content;
|
|
8013
|
+
}
|
|
8014
|
+
|
|
8015
|
+
function getProperty(node, key) {
|
|
8016
|
+
return node[key];
|
|
8017
|
+
}
|
|
8018
|
+
|
|
8019
|
+
function setProperty(node, key, value) {
|
|
8020
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
8021
|
+
if (node instanceof Element && !(key in node)) {
|
|
8022
|
+
// TODO [#1297]: Move this validation to the compiler
|
|
8023
|
+
assert.fail("Unknown public property \"".concat(key, "\" of element <").concat(node.tagName, ">. This is likely a typo on the corresponding attribute \"").concat(htmlPropertyToAttribute(key), "\"."));
|
|
7886
8024
|
}
|
|
7887
|
-
}
|
|
7888
|
-
|
|
7889
|
-
|
|
7890
|
-
|
|
7891
|
-
|
|
7892
|
-
|
|
7893
|
-
|
|
7894
|
-
}
|
|
8025
|
+
}
|
|
8026
|
+
|
|
8027
|
+
node[key] = value;
|
|
8028
|
+
}
|
|
8029
|
+
|
|
8030
|
+
function getAttribute(element, name, namespace) {
|
|
8031
|
+
return isUndefined$1(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
|
|
8032
|
+
}
|
|
8033
|
+
|
|
8034
|
+
function setAttribute(element, name, value, namespace) {
|
|
8035
|
+
return isUndefined$1(namespace) ? element.setAttribute(name, value) : element.setAttributeNS(namespace, name, value);
|
|
8036
|
+
}
|
|
8037
|
+
|
|
8038
|
+
function removeAttribute(element, name, namespace) {
|
|
8039
|
+
if (isUndefined$1(namespace)) {
|
|
8040
|
+
element.removeAttribute(name);
|
|
8041
|
+
} else {
|
|
8042
|
+
element.removeAttributeNS(namespace, name);
|
|
8043
|
+
}
|
|
8044
|
+
}
|
|
8045
|
+
|
|
8046
|
+
function addEventListener(target, type, callback, options) {
|
|
8047
|
+
target.addEventListener(type, callback, options);
|
|
8048
|
+
}
|
|
8049
|
+
|
|
8050
|
+
function removeEventListener(target, type, callback, options) {
|
|
8051
|
+
target.removeEventListener(type, callback, options);
|
|
8052
|
+
}
|
|
8053
|
+
|
|
8054
|
+
function dispatchEvent(target, event) {
|
|
8055
|
+
return target.dispatchEvent(event);
|
|
8056
|
+
}
|
|
8057
|
+
|
|
8058
|
+
function getClassList(element) {
|
|
8059
|
+
return element.classList;
|
|
8060
|
+
}
|
|
8061
|
+
|
|
8062
|
+
function setCSSStyleProperty(element, name, value, important) {
|
|
8063
|
+
// TODO [#0]: How to avoid this type casting? Shall we use a different type interface to
|
|
8064
|
+
// represent elements in the engine?
|
|
8065
|
+
element.style.setProperty(name, value, important ? 'important' : '');
|
|
8066
|
+
}
|
|
8067
|
+
|
|
8068
|
+
function getBoundingClientRect(element) {
|
|
8069
|
+
return element.getBoundingClientRect();
|
|
8070
|
+
}
|
|
8071
|
+
|
|
8072
|
+
function querySelector(element, selectors) {
|
|
8073
|
+
return element.querySelector(selectors);
|
|
8074
|
+
}
|
|
8075
|
+
|
|
8076
|
+
function querySelectorAll(element, selectors) {
|
|
8077
|
+
return element.querySelectorAll(selectors);
|
|
8078
|
+
}
|
|
8079
|
+
|
|
8080
|
+
function getElementsByTagName(element, tagNameOrWildCard) {
|
|
8081
|
+
return element.getElementsByTagName(tagNameOrWildCard);
|
|
8082
|
+
}
|
|
8083
|
+
|
|
8084
|
+
function getElementsByClassName(element, names) {
|
|
8085
|
+
return element.getElementsByClassName(names);
|
|
8086
|
+
}
|
|
8087
|
+
|
|
8088
|
+
function getChildren(element) {
|
|
8089
|
+
return element.children;
|
|
8090
|
+
}
|
|
8091
|
+
|
|
8092
|
+
function getChildNodes(element) {
|
|
8093
|
+
return element.childNodes;
|
|
8094
|
+
}
|
|
8095
|
+
|
|
8096
|
+
function getFirstChild(element) {
|
|
8097
|
+
return element.firstChild;
|
|
8098
|
+
}
|
|
8099
|
+
|
|
8100
|
+
function getFirstElementChild(element) {
|
|
8101
|
+
return element.firstElementChild;
|
|
8102
|
+
}
|
|
8103
|
+
|
|
8104
|
+
function getLastChild(element) {
|
|
8105
|
+
return element.lastChild;
|
|
8106
|
+
}
|
|
8107
|
+
|
|
8108
|
+
function getLastElementChild(element) {
|
|
8109
|
+
return element.lastElementChild;
|
|
8110
|
+
}
|
|
8111
|
+
|
|
8112
|
+
function isConnected(node) {
|
|
8113
|
+
return node.isConnected;
|
|
8114
|
+
}
|
|
8115
|
+
|
|
8116
|
+
function insertGlobalStylesheet(content) {
|
|
8117
|
+
if (!isUndefined$1(globalStylesheets[content])) {
|
|
8118
|
+
return;
|
|
8119
|
+
}
|
|
8120
|
+
|
|
8121
|
+
globalStylesheets[content] = true;
|
|
8122
|
+
var elm = document.createElement('style');
|
|
8123
|
+
elm.type = 'text/css';
|
|
8124
|
+
elm.textContent = content;
|
|
8125
|
+
globalStylesheetsParentElement.appendChild(elm);
|
|
8126
|
+
}
|
|
8127
|
+
|
|
8128
|
+
function insertStylesheet(content, target) {
|
|
8129
|
+
if (supportsConstructableStyleSheets) {
|
|
8130
|
+
insertConstructableStyleSheet(content, target);
|
|
8131
|
+
} else {
|
|
8132
|
+
// Fall back to <style> element
|
|
8133
|
+
insertStyleElement(content, target);
|
|
8134
|
+
}
|
|
8135
|
+
}
|
|
8136
|
+
|
|
8137
|
+
function assertInstanceOfHTMLElement(elm, msg) {
|
|
8138
|
+
assert.invariant(elm instanceof HTMLElement, msg);
|
|
8139
|
+
}
|
|
8140
|
+
|
|
8141
|
+
var HTMLElementExported = HTMLElementConstructor;
|
|
8142
|
+
/*
|
|
8143
|
+
* Copyright (c) 2020, salesforce.com, inc.
|
|
8144
|
+
* All rights reserved.
|
|
8145
|
+
* SPDX-License-Identifier: MIT
|
|
8146
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
8147
|
+
*/
|
|
8148
|
+
|
|
8149
|
+
setAssertInstanceOfHTMLElement(assertInstanceOfHTMLElement);
|
|
8150
|
+
setAttachShadow(attachShadow);
|
|
8151
|
+
setCreateComment(createComment);
|
|
8152
|
+
setCreateElement(createElement$1);
|
|
8153
|
+
setCreateText(createText);
|
|
8154
|
+
setDefineCustomElement(defineCustomElement);
|
|
8155
|
+
setDispatchEvent(dispatchEvent);
|
|
8156
|
+
setGetAttribute(getAttribute);
|
|
8157
|
+
setGetBoundingClientRect(getBoundingClientRect);
|
|
8158
|
+
setGetChildNodes(getChildNodes);
|
|
8159
|
+
setGetChildren(getChildren);
|
|
8160
|
+
setGetClassList(getClassList);
|
|
8161
|
+
setGetCustomElement(getCustomElement);
|
|
8162
|
+
setGetElementsByClassName(getElementsByClassName);
|
|
8163
|
+
setGetElementsByTagName(getElementsByTagName);
|
|
8164
|
+
setGetFirstChild(getFirstChild);
|
|
8165
|
+
setGetFirstElementChild(getFirstElementChild);
|
|
8166
|
+
setGetLastChild(getLastChild);
|
|
8167
|
+
setGetLastElementChild(getLastElementChild);
|
|
8168
|
+
setGetProperty(getProperty);
|
|
8169
|
+
setHTMLElement(HTMLElementExported);
|
|
8170
|
+
setInsert(insert);
|
|
8171
|
+
setInsertGlobalStylesheet(insertGlobalStylesheet);
|
|
8172
|
+
setInsertStylesheet(insertStylesheet);
|
|
8173
|
+
setIsConnected(isConnected);
|
|
8174
|
+
setIsHydrating$1(isHydrating);
|
|
8175
|
+
setIsNativeShadowDefined(isNativeShadowDefined);
|
|
8176
|
+
setIsSyntheticShadowDefined(isSyntheticShadowDefined);
|
|
8177
|
+
setNextSibling(nextSibling);
|
|
8178
|
+
setQuerySelector(querySelector);
|
|
8179
|
+
setQuerySelectorAll(querySelectorAll);
|
|
8180
|
+
setRemove(remove);
|
|
8181
|
+
setRemoveAttribute(removeAttribute);
|
|
8182
|
+
setRemoveEventListener(removeEventListener);
|
|
8183
|
+
setSetAttribute(setAttribute);
|
|
8184
|
+
setSetCSSStyleProperty(setCSSStyleProperty);
|
|
8185
|
+
setSetProperty(setProperty);
|
|
8186
|
+
setSetText(setText);
|
|
8187
|
+
setSsr(ssr);
|
|
8188
|
+
setAddEventListener(addEventListener);
|
|
7895
8189
|
/*
|
|
7896
8190
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
7897
8191
|
* All rights reserved.
|
|
@@ -7973,7 +8267,7 @@
|
|
|
7973
8267
|
throw new TypeError("\"createElement\" function expects an \"is\" option with a valid component constructor.");
|
|
7974
8268
|
}
|
|
7975
8269
|
|
|
7976
|
-
var UpgradableConstructor = getUpgradableConstructor(sel
|
|
8270
|
+
var UpgradableConstructor = getUpgradableConstructor(sel);
|
|
7977
8271
|
var wasComponentUpgraded = false; // the custom element from the registry is expecting an upgrade callback
|
|
7978
8272
|
|
|
7979
8273
|
/**
|
|
@@ -7988,8 +8282,7 @@
|
|
|
7988
8282
|
createVM(elm, def, {
|
|
7989
8283
|
tagName: sel,
|
|
7990
8284
|
mode: options.mode !== 'closed' ? 'open' : 'closed',
|
|
7991
|
-
owner: null
|
|
7992
|
-
renderer: renderer
|
|
8285
|
+
owner: null
|
|
7993
8286
|
});
|
|
7994
8287
|
ConnectingSlot.set(elm, connectRootElement);
|
|
7995
8288
|
DisconnectingSlot.set(elm, disconnectRootElement);
|
|
@@ -8014,6 +8307,10 @@
|
|
|
8014
8307
|
function hydrateComponent(element, Ctor) {
|
|
8015
8308
|
var props = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
8016
8309
|
|
|
8310
|
+
if (!(element instanceof Element)) {
|
|
8311
|
+
throw new TypeError("\"hydrateComponent\" expects a valid DOM element as the first parameter but instead received ".concat(element, "."));
|
|
8312
|
+
}
|
|
8313
|
+
|
|
8017
8314
|
if (!isFunction$1(Ctor)) {
|
|
8018
8315
|
throw new TypeError("\"hydrateComponent\" expects a valid component constructor as the second parameter but instead received ".concat(Ctor, "."));
|
|
8019
8316
|
}
|
|
@@ -8031,7 +8328,6 @@
|
|
|
8031
8328
|
createVM(element, def, {
|
|
8032
8329
|
mode: 'open',
|
|
8033
8330
|
owner: null,
|
|
8034
|
-
renderer: renderer,
|
|
8035
8331
|
tagName: element.tagName.toLowerCase()
|
|
8036
8332
|
});
|
|
8037
8333
|
|
|
@@ -8118,8 +8414,7 @@
|
|
|
8118
8414
|
createVM(_assertThisInitialized(_this6), def, {
|
|
8119
8415
|
mode: 'open',
|
|
8120
8416
|
owner: null,
|
|
8121
|
-
tagName: _this6.tagName
|
|
8122
|
-
renderer: renderer
|
|
8417
|
+
tagName: _this6.tagName
|
|
8123
8418
|
});
|
|
8124
8419
|
return _this6;
|
|
8125
8420
|
}
|
|
@@ -8192,7 +8487,7 @@
|
|
|
8192
8487
|
return false;
|
|
8193
8488
|
}
|
|
8194
8489
|
|
|
8195
|
-
if (
|
|
8490
|
+
if (isSyntheticShadowDefined) {
|
|
8196
8491
|
// TODO [#1252]: old behavior that is still used by some pieces of the platform,
|
|
8197
8492
|
// specifically, nodes inserted manually on places where `lwc:dom="manual"` directive is not
|
|
8198
8493
|
// used, will be considered global elements.
|
|
@@ -8244,7 +8539,7 @@
|
|
|
8244
8539
|
});
|
|
8245
8540
|
freeze(LightningElement);
|
|
8246
8541
|
seal(LightningElement.prototype);
|
|
8247
|
-
/* version: 2.6.
|
|
8542
|
+
/* version: 2.6.3 */
|
|
8248
8543
|
|
|
8249
8544
|
exports.LightningElement = LightningElement;
|
|
8250
8545
|
exports.__unstable__ProfilerControl = profilerControl;
|