lwc 2.5.10 → 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 +674 -471
- package/dist/engine-dom/iife/es2017/engine-dom.js +674 -471
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -9
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +647 -446
- package/dist/engine-dom/iife/es5/engine-dom.js +737 -433
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -9
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +704 -408
- package/dist/engine-dom/umd/es2017/engine-dom.js +674 -471
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -9
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +647 -446
- package/dist/engine-dom/umd/es5/engine-dom.js +737 -433
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -9
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +704 -408
- package/dist/engine-server/commonjs/es2017/engine-server.js +754 -549
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -9
- package/dist/engine-server/esm/es2017/engine-server.js +754 -549
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +135 -140
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +135 -140
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +135 -140
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +146 -137
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +146 -137
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +135 -140
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +135 -140
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +146 -137
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +146 -137
- 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
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
|
|
19
19
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
20
20
|
|
|
21
|
-
function _get2(
|
|
21
|
+
function _get2() { if (typeof Reflect !== "undefined" && Reflect.get) { _get2 = Reflect.get; } else { _get2 = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get2.apply(this, arguments); }
|
|
22
22
|
|
|
23
23
|
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf2(object); if (object === null) break; } return object; }
|
|
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"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
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
|
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
|
|
43
43
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
44
44
|
|
|
45
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
45
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
46
46
|
|
|
47
47
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
48
48
|
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
|
|
59
59
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
60
60
|
|
|
61
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
61
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
62
62
|
|
|
63
63
|
/* proxy-compat-disable */
|
|
64
64
|
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
|
|
352
352
|
return attributeName;
|
|
353
353
|
}
|
|
354
|
-
/** version: 2.
|
|
354
|
+
/** version: 2.6.3 */
|
|
355
355
|
|
|
356
356
|
/*
|
|
357
357
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -463,8 +463,6 @@
|
|
|
463
463
|
ENABLE_NODE_LIST_PATCH: null,
|
|
464
464
|
ENABLE_HTML_COLLECTIONS_PATCH: null,
|
|
465
465
|
ENABLE_NODE_PATCH: null,
|
|
466
|
-
ENABLE_NON_COMPOSED_EVENTS_LEAKAGE: null,
|
|
467
|
-
ENABLE_MIXED_SHADOW_MODE: null,
|
|
468
466
|
ENABLE_WIRE_SYNC_EMIT: null
|
|
469
467
|
};
|
|
470
468
|
|
|
@@ -531,7 +529,7 @@
|
|
|
531
529
|
setFeatureFlag(name, value);
|
|
532
530
|
}
|
|
533
531
|
}
|
|
534
|
-
/** version: 2.
|
|
532
|
+
/** version: 2.6.3 */
|
|
535
533
|
|
|
536
534
|
/* proxy-compat-disable */
|
|
537
535
|
|
|
@@ -619,6 +617,249 @@
|
|
|
619
617
|
}
|
|
620
618
|
|
|
621
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;
|
|
622
863
|
}
|
|
623
864
|
/*
|
|
624
865
|
* Copyright (c) 2019, salesforce.com, inc.
|
|
@@ -870,8 +1111,7 @@
|
|
|
870
1111
|
|
|
871
1112
|
function createAllEventListeners(vnode) {
|
|
872
1113
|
var elm = vnode.elm,
|
|
873
|
-
on = vnode.data.on
|
|
874
|
-
renderer = vnode.owner.renderer;
|
|
1114
|
+
on = vnode.data.on;
|
|
875
1115
|
|
|
876
1116
|
if (isUndefined$1(on)) {
|
|
877
1117
|
return;
|
|
@@ -882,7 +1122,7 @@
|
|
|
882
1122
|
var name;
|
|
883
1123
|
|
|
884
1124
|
for (name in on) {
|
|
885
|
-
|
|
1125
|
+
addEventListener$1(elm, name, listener);
|
|
886
1126
|
}
|
|
887
1127
|
}
|
|
888
1128
|
|
|
@@ -1021,8 +1261,7 @@
|
|
|
1021
1261
|
var ColonCharCode = 58;
|
|
1022
1262
|
|
|
1023
1263
|
function updateAttrs(oldVnode, vnode) {
|
|
1024
|
-
var attrs = vnode.data.attrs
|
|
1025
|
-
renderer = vnode.owner.renderer;
|
|
1264
|
+
var attrs = vnode.data.attrs;
|
|
1026
1265
|
|
|
1027
1266
|
if (isUndefined$1(attrs)) {
|
|
1028
1267
|
return;
|
|
@@ -1039,8 +1278,6 @@
|
|
|
1039
1278
|
}
|
|
1040
1279
|
|
|
1041
1280
|
var elm = vnode.elm;
|
|
1042
|
-
var setAttribute = renderer.setAttribute,
|
|
1043
|
-
removeAttribute = renderer.removeAttribute;
|
|
1044
1281
|
var key;
|
|
1045
1282
|
oldAttrs = isUndefined$1(oldAttrs) ? EmptyObject : oldAttrs; // update modified attributes, add new attributes
|
|
1046
1283
|
// this routine is only useful for data-* attributes in all kind of elements
|
|
@@ -1055,14 +1292,14 @@
|
|
|
1055
1292
|
|
|
1056
1293
|
if (StringCharCodeAt.call(key, 3) === ColonCharCode) {
|
|
1057
1294
|
// Assume xml namespace
|
|
1058
|
-
setAttribute(elm, key, cur, xmlNS);
|
|
1295
|
+
setAttribute$1(elm, key, cur, xmlNS);
|
|
1059
1296
|
} else if (StringCharCodeAt.call(key, 5) === ColonCharCode) {
|
|
1060
1297
|
// Assume xlink namespace
|
|
1061
|
-
setAttribute(elm, key, cur, xlinkNS);
|
|
1062
|
-
} else if (isNull(cur)) {
|
|
1063
|
-
removeAttribute(elm, key);
|
|
1298
|
+
setAttribute$1(elm, key, cur, xlinkNS);
|
|
1299
|
+
} else if (isNull(cur) || isUndefined$1(cur)) {
|
|
1300
|
+
removeAttribute$1(elm, key);
|
|
1064
1301
|
} else {
|
|
1065
|
-
setAttribute(elm, key, cur);
|
|
1302
|
+
setAttribute$1(elm, key, cur);
|
|
1066
1303
|
}
|
|
1067
1304
|
|
|
1068
1305
|
lockAttribute();
|
|
@@ -1111,14 +1348,13 @@
|
|
|
1111
1348
|
|
|
1112
1349
|
var isFirstPatch = isUndefined$1(oldProps);
|
|
1113
1350
|
var elm = vnode.elm,
|
|
1114
|
-
sel = vnode.sel
|
|
1115
|
-
renderer = vnode.owner.renderer;
|
|
1351
|
+
sel = vnode.sel;
|
|
1116
1352
|
|
|
1117
1353
|
for (var key in props) {
|
|
1118
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...
|
|
1119
1355
|
|
|
1120
|
-
if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ?
|
|
1121
|
-
|
|
1356
|
+
if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ? getProperty$1(elm, key) : oldProps[key])) {
|
|
1357
|
+
setProperty$1(elm, key, cur);
|
|
1122
1358
|
}
|
|
1123
1359
|
}
|
|
1124
1360
|
}
|
|
@@ -1186,15 +1422,14 @@
|
|
|
1186
1422
|
|
|
1187
1423
|
function updateClassAttribute(oldVnode, vnode) {
|
|
1188
1424
|
var elm = vnode.elm,
|
|
1189
|
-
newClass = vnode.data.className
|
|
1190
|
-
renderer = vnode.owner.renderer;
|
|
1425
|
+
newClass = vnode.data.className;
|
|
1191
1426
|
var oldClass = oldVnode.data.className;
|
|
1192
1427
|
|
|
1193
1428
|
if (oldClass === newClass) {
|
|
1194
1429
|
return;
|
|
1195
1430
|
}
|
|
1196
1431
|
|
|
1197
|
-
var classList =
|
|
1432
|
+
var classList = getClassList$1(elm);
|
|
1198
1433
|
var newClassMap = getMapFromClassName(newClass);
|
|
1199
1434
|
var oldClassMap = getMapFromClassName(oldClass);
|
|
1200
1435
|
var name;
|
|
@@ -1231,19 +1466,16 @@
|
|
|
1231
1466
|
|
|
1232
1467
|
function updateStyleAttribute(oldVnode, vnode) {
|
|
1233
1468
|
var elm = vnode.elm,
|
|
1234
|
-
newStyle = vnode.data.style
|
|
1235
|
-
renderer = vnode.owner.renderer;
|
|
1236
|
-
var setAttribute = renderer.setAttribute,
|
|
1237
|
-
removeAttribute = renderer.removeAttribute;
|
|
1469
|
+
newStyle = vnode.data.style;
|
|
1238
1470
|
|
|
1239
1471
|
if (oldVnode.data.style === newStyle) {
|
|
1240
1472
|
return;
|
|
1241
1473
|
}
|
|
1242
1474
|
|
|
1243
1475
|
if (!isString(newStyle) || newStyle === '') {
|
|
1244
|
-
removeAttribute(elm, 'style');
|
|
1476
|
+
removeAttribute$1(elm, 'style');
|
|
1245
1477
|
} else {
|
|
1246
|
-
setAttribute(elm, 'style', newStyle);
|
|
1478
|
+
setAttribute$1(elm, 'style', newStyle);
|
|
1247
1479
|
}
|
|
1248
1480
|
}
|
|
1249
1481
|
|
|
@@ -1267,14 +1499,13 @@
|
|
|
1267
1499
|
|
|
1268
1500
|
function createClassAttribute(vnode) {
|
|
1269
1501
|
var elm = vnode.elm,
|
|
1270
|
-
classMap = vnode.data.classMap
|
|
1271
|
-
renderer = vnode.owner.renderer;
|
|
1502
|
+
classMap = vnode.data.classMap;
|
|
1272
1503
|
|
|
1273
1504
|
if (isUndefined$1(classMap)) {
|
|
1274
1505
|
return;
|
|
1275
1506
|
}
|
|
1276
1507
|
|
|
1277
|
-
var classList =
|
|
1508
|
+
var classList = getClassList$1(elm);
|
|
1278
1509
|
|
|
1279
1510
|
for (var name in classMap) {
|
|
1280
1511
|
classList.add(name);
|
|
@@ -1295,8 +1526,7 @@
|
|
|
1295
1526
|
|
|
1296
1527
|
function createStyleAttribute(vnode) {
|
|
1297
1528
|
var elm = vnode.elm,
|
|
1298
|
-
styleDecls = vnode.data.styleDecls
|
|
1299
|
-
renderer = vnode.owner.renderer;
|
|
1529
|
+
styleDecls = vnode.data.styleDecls;
|
|
1300
1530
|
|
|
1301
1531
|
if (isUndefined$1(styleDecls)) {
|
|
1302
1532
|
return;
|
|
@@ -1308,7 +1538,7 @@
|
|
|
1308
1538
|
value = _styleDecls$_i[1],
|
|
1309
1539
|
important = _styleDecls$_i[2];
|
|
1310
1540
|
|
|
1311
|
-
|
|
1541
|
+
setCSSStyleProperty$1(elm, prop, value, important);
|
|
1312
1542
|
}
|
|
1313
1543
|
}
|
|
1314
1544
|
|
|
@@ -1322,15 +1552,6 @@
|
|
|
1322
1552
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
1323
1553
|
*/
|
|
1324
1554
|
|
|
1325
|
-
/**
|
|
1326
|
-
@license
|
|
1327
|
-
Copyright (c) 2015 Simon Friis Vindum.
|
|
1328
|
-
This code may only be used under the MIT License found at
|
|
1329
|
-
https://github.com/snabbdom/snabbdom/blob/master/LICENSE
|
|
1330
|
-
Code distributed by Snabbdom as part of the Snabbdom project at
|
|
1331
|
-
https://github.com/snabbdom/snabbdom/
|
|
1332
|
-
*/
|
|
1333
|
-
|
|
1334
1555
|
function isUndef(s) {
|
|
1335
1556
|
return s === undefined;
|
|
1336
1557
|
}
|
|
@@ -1418,7 +1639,7 @@
|
|
|
1418
1639
|
} else if (sameVnode(oldStartVnode, newEndVnode)) {
|
|
1419
1640
|
// Vnode moved right
|
|
1420
1641
|
patchVnode(oldStartVnode, newEndVnode);
|
|
1421
|
-
newEndVnode.hook.move(oldStartVnode, parentElm,
|
|
1642
|
+
newEndVnode.hook.move(oldStartVnode, parentElm, nextSibling$1(oldEndVnode.elm));
|
|
1422
1643
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
1423
1644
|
newEndVnode = newCh[--newEndIdx];
|
|
1424
1645
|
} else if (sameVnode(oldEndVnode, newStartVnode)) {
|
|
@@ -1865,7 +2086,7 @@
|
|
|
1865
2086
|
defineProperties(proto, getLightningElementPrototypeRestrictionsDescriptors(proto));
|
|
1866
2087
|
}
|
|
1867
2088
|
/*
|
|
1868
|
-
* Copyright (c)
|
|
2089
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
1869
2090
|
* All rights reserved.
|
|
1870
2091
|
* SPDX-License-Identifier: MIT
|
|
1871
2092
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
@@ -1915,7 +2136,8 @@
|
|
|
1915
2136
|
*/
|
|
1916
2137
|
|
|
1917
2138
|
var isArray = Array.isArray;
|
|
1918
|
-
var
|
|
2139
|
+
var ObjectDotPrototype = Object.prototype,
|
|
2140
|
+
_getPrototypeOf = Object.getPrototypeOf,
|
|
1919
2141
|
ObjectCreate = Object.create,
|
|
1920
2142
|
ObjectDefineProperty = Object.defineProperty,
|
|
1921
2143
|
_isExtensible = Object.isExtensible,
|
|
@@ -2576,8 +2798,6 @@
|
|
|
2576
2798
|
init();
|
|
2577
2799
|
}
|
|
2578
2800
|
|
|
2579
|
-
var ObjectDotPrototype = Object.prototype;
|
|
2580
|
-
|
|
2581
2801
|
function defaultValueIsObservable(value) {
|
|
2582
2802
|
// intentionally checking for null
|
|
2583
2803
|
if (value === null) {
|
|
@@ -2606,68 +2826,54 @@
|
|
|
2606
2826
|
/* do nothing */
|
|
2607
2827
|
};
|
|
2608
2828
|
|
|
2609
|
-
var defaultValueDistortion = function defaultValueDistortion(value) {
|
|
2610
|
-
return value;
|
|
2611
|
-
};
|
|
2612
|
-
|
|
2613
2829
|
function createShadowTarget(value) {
|
|
2614
2830
|
return isArray(value) ? [] : {};
|
|
2615
2831
|
}
|
|
2616
2832
|
|
|
2617
|
-
var
|
|
2618
|
-
function
|
|
2619
|
-
|
|
2833
|
+
var ObservableMembrane = /*#__PURE__*/function () {
|
|
2834
|
+
function ObservableMembrane() {
|
|
2835
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2836
|
+
|
|
2837
|
+
_classCallCheck(this, ObservableMembrane);
|
|
2620
2838
|
|
|
2621
|
-
this.valueDistortion = defaultValueDistortion;
|
|
2622
|
-
this.valueMutated = defaultValueMutated;
|
|
2623
|
-
this.valueObserved = defaultValueObserved;
|
|
2624
|
-
this.valueIsObservable = defaultValueIsObservable;
|
|
2625
2839
|
this.readOnlyObjectGraph = new WeakMap();
|
|
2626
2840
|
this.reactiveObjectGraph = new WeakMap();
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
this.valueMutated = isFunction(_valueMutated) ? _valueMutated : defaultValueMutated;
|
|
2636
|
-
this.valueObserved = isFunction(_valueObserved) ? _valueObserved : defaultValueObserved;
|
|
2637
|
-
this.valueIsObservable = isFunction(valueIsObservable) ? valueIsObservable : defaultValueIsObservable;
|
|
2638
|
-
this.tagPropertyKey = tagPropertyKey;
|
|
2639
|
-
}
|
|
2841
|
+
var valueMutated = options.valueMutated,
|
|
2842
|
+
valueObserved = options.valueObserved,
|
|
2843
|
+
valueIsObservable = options.valueIsObservable,
|
|
2844
|
+
tagPropertyKey = options.tagPropertyKey;
|
|
2845
|
+
this.valueMutated = isFunction(valueMutated) ? valueMutated : defaultValueMutated;
|
|
2846
|
+
this.valueObserved = isFunction(valueObserved) ? valueObserved : defaultValueObserved;
|
|
2847
|
+
this.valueIsObservable = isFunction(valueIsObservable) ? valueIsObservable : defaultValueIsObservable;
|
|
2848
|
+
this.tagPropertyKey = tagPropertyKey;
|
|
2640
2849
|
}
|
|
2641
2850
|
|
|
2642
|
-
_createClass(
|
|
2851
|
+
_createClass(ObservableMembrane, [{
|
|
2643
2852
|
key: "getProxy",
|
|
2644
2853
|
value: function getProxy(value) {
|
|
2645
2854
|
var unwrappedValue = unwrap$1(value);
|
|
2646
|
-
var distorted = this.valueDistortion(unwrappedValue);
|
|
2647
2855
|
|
|
2648
|
-
if (this.valueIsObservable(
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
// we return the readonly.
|
|
2856
|
+
if (this.valueIsObservable(unwrappedValue)) {
|
|
2857
|
+
// When trying to extract the writable version of a readonly we return the readonly.
|
|
2858
|
+
if (this.readOnlyObjectGraph.get(unwrappedValue) === value) {
|
|
2652
2859
|
return value;
|
|
2653
2860
|
}
|
|
2654
2861
|
|
|
2655
|
-
return this.getReactiveHandler(unwrappedValue
|
|
2862
|
+
return this.getReactiveHandler(unwrappedValue);
|
|
2656
2863
|
}
|
|
2657
2864
|
|
|
2658
|
-
return
|
|
2865
|
+
return unwrappedValue;
|
|
2659
2866
|
}
|
|
2660
2867
|
}, {
|
|
2661
2868
|
key: "getReadOnlyProxy",
|
|
2662
2869
|
value: function getReadOnlyProxy(value) {
|
|
2663
2870
|
value = unwrap$1(value);
|
|
2664
|
-
var distorted = this.valueDistortion(value);
|
|
2665
2871
|
|
|
2666
|
-
if (this.valueIsObservable(
|
|
2667
|
-
return this.getReadOnlyHandler(value
|
|
2872
|
+
if (this.valueIsObservable(value)) {
|
|
2873
|
+
return this.getReadOnlyHandler(value);
|
|
2668
2874
|
}
|
|
2669
2875
|
|
|
2670
|
-
return
|
|
2876
|
+
return value;
|
|
2671
2877
|
}
|
|
2672
2878
|
}, {
|
|
2673
2879
|
key: "unwrapProxy",
|
|
@@ -2676,39 +2882,39 @@
|
|
|
2676
2882
|
}
|
|
2677
2883
|
}, {
|
|
2678
2884
|
key: "getReactiveHandler",
|
|
2679
|
-
value: function getReactiveHandler(value
|
|
2680
|
-
var proxy = this.reactiveObjectGraph.get(
|
|
2885
|
+
value: function getReactiveHandler(value) {
|
|
2886
|
+
var proxy = this.reactiveObjectGraph.get(value);
|
|
2681
2887
|
|
|
2682
2888
|
if (isUndefined(proxy)) {
|
|
2683
2889
|
// caching the proxy after the first time it is accessed
|
|
2684
|
-
var handler = new ReactiveProxyHandler(this,
|
|
2685
|
-
proxy = new Proxy(createShadowTarget(
|
|
2890
|
+
var handler = new ReactiveProxyHandler(this, value);
|
|
2891
|
+
proxy = new Proxy(createShadowTarget(value), handler);
|
|
2686
2892
|
registerProxy(proxy, value);
|
|
2687
|
-
this.reactiveObjectGraph.set(
|
|
2893
|
+
this.reactiveObjectGraph.set(value, proxy);
|
|
2688
2894
|
}
|
|
2689
2895
|
|
|
2690
2896
|
return proxy;
|
|
2691
2897
|
}
|
|
2692
2898
|
}, {
|
|
2693
2899
|
key: "getReadOnlyHandler",
|
|
2694
|
-
value: function getReadOnlyHandler(value
|
|
2695
|
-
var proxy = this.readOnlyObjectGraph.get(
|
|
2900
|
+
value: function getReadOnlyHandler(value) {
|
|
2901
|
+
var proxy = this.readOnlyObjectGraph.get(value);
|
|
2696
2902
|
|
|
2697
2903
|
if (isUndefined(proxy)) {
|
|
2698
2904
|
// caching the proxy after the first time it is accessed
|
|
2699
|
-
var handler = new ReadOnlyHandler(this,
|
|
2700
|
-
proxy = new Proxy(createShadowTarget(
|
|
2905
|
+
var handler = new ReadOnlyHandler(this, value);
|
|
2906
|
+
proxy = new Proxy(createShadowTarget(value), handler);
|
|
2701
2907
|
registerProxy(proxy, value);
|
|
2702
|
-
this.readOnlyObjectGraph.set(
|
|
2908
|
+
this.readOnlyObjectGraph.set(value, proxy);
|
|
2703
2909
|
}
|
|
2704
2910
|
|
|
2705
2911
|
return proxy;
|
|
2706
2912
|
}
|
|
2707
2913
|
}]);
|
|
2708
2914
|
|
|
2709
|
-
return
|
|
2915
|
+
return ObservableMembrane;
|
|
2710
2916
|
}();
|
|
2711
|
-
/** version:
|
|
2917
|
+
/** version: 2.0.0 */
|
|
2712
2918
|
|
|
2713
2919
|
/*
|
|
2714
2920
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -2719,15 +2925,9 @@
|
|
|
2719
2925
|
|
|
2720
2926
|
|
|
2721
2927
|
var lockerLivePropertyKey = Symbol.for('@@lockerLiveValue');
|
|
2722
|
-
|
|
2723
|
-
function valueDistortion(value) {
|
|
2724
|
-
return value;
|
|
2725
|
-
}
|
|
2726
|
-
|
|
2727
|
-
var reactiveMembrane = new ReactiveMembrane({
|
|
2928
|
+
var reactiveMembrane = new ObservableMembrane({
|
|
2728
2929
|
valueObserved: valueObserved,
|
|
2729
2930
|
valueMutated: valueMutated,
|
|
2730
|
-
valueDistortion: valueDistortion,
|
|
2731
2931
|
tagPropertyKey: lockerLivePropertyKey
|
|
2732
2932
|
});
|
|
2733
2933
|
/**
|
|
@@ -2736,16 +2936,9 @@
|
|
|
2736
2936
|
* change or being removed.
|
|
2737
2937
|
*/
|
|
2738
2938
|
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
if (unwrapped !== value) {
|
|
2743
|
-
// if value is a proxy, unwrap to access original value and apply distortion
|
|
2744
|
-
return valueDistortion(unwrapped);
|
|
2745
|
-
}
|
|
2746
|
-
|
|
2747
|
-
return value;
|
|
2748
|
-
};
|
|
2939
|
+
function unwrap(value) {
|
|
2940
|
+
return reactiveMembrane.unwrapProxy(value);
|
|
2941
|
+
}
|
|
2749
2942
|
/*
|
|
2750
2943
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
2751
2944
|
* All rights reserved.
|
|
@@ -2829,21 +3022,18 @@
|
|
|
2829
3022
|
|
|
2830
3023
|
|
|
2831
3024
|
var LightningElement = function LightningElement() {
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
3025
|
+
// This should be as performant as possible, while any initialization should be done lazily
|
|
2835
3026
|
if (isNull(vmBeingConstructed)) {
|
|
2836
3027
|
throw new ReferenceError('Illegal constructor');
|
|
2837
3028
|
}
|
|
2838
3029
|
|
|
2839
3030
|
var vm = vmBeingConstructed;
|
|
2840
3031
|
var def = vm.def,
|
|
2841
|
-
elm = vm.elm
|
|
2842
|
-
renderer = vm.renderer;
|
|
3032
|
+
elm = vm.elm;
|
|
2843
3033
|
var bridge = def.bridge;
|
|
2844
3034
|
|
|
2845
3035
|
if (process.env.NODE_ENV !== 'production') {
|
|
2846
|
-
|
|
3036
|
+
assertInstanceOfHTMLElement$1(vm.elm, "Component creation requires a DOM element to be associated to ".concat(vm, "."));
|
|
2847
3037
|
}
|
|
2848
3038
|
|
|
2849
3039
|
var component = this;
|
|
@@ -2872,7 +3062,7 @@
|
|
|
2872
3062
|
if (vm.renderMode === 1
|
|
2873
3063
|
/* Shadow */
|
|
2874
3064
|
) {
|
|
2875
|
-
|
|
3065
|
+
doAttachShadow(vm);
|
|
2876
3066
|
} // Adding extra guard rails in DEV mode.
|
|
2877
3067
|
|
|
2878
3068
|
|
|
@@ -2884,15 +3074,14 @@
|
|
|
2884
3074
|
return this;
|
|
2885
3075
|
};
|
|
2886
3076
|
|
|
2887
|
-
function
|
|
2888
|
-
var
|
|
3077
|
+
function doAttachShadow(vm) {
|
|
3078
|
+
var _attachShadow$;
|
|
2889
3079
|
|
|
2890
3080
|
var elm = vm.elm,
|
|
2891
3081
|
mode = vm.mode,
|
|
2892
|
-
renderer = vm.renderer,
|
|
2893
3082
|
shadowMode = vm.shadowMode,
|
|
2894
3083
|
ctor = vm.def.ctor;
|
|
2895
|
-
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$));
|
|
2896
3085
|
vm.cmpRoot = cmpRoot;
|
|
2897
3086
|
associateVM(cmpRoot, vm);
|
|
2898
3087
|
|
|
@@ -2912,15 +3101,13 @@
|
|
|
2912
3101
|
constructor: LightningElement,
|
|
2913
3102
|
dispatchEvent: function dispatchEvent(event) {
|
|
2914
3103
|
var _getAssociatedVM = getAssociatedVM(this),
|
|
2915
|
-
elm = _getAssociatedVM.elm
|
|
2916
|
-
dispatchEvent = _getAssociatedVM.renderer.dispatchEvent;
|
|
3104
|
+
elm = _getAssociatedVM.elm;
|
|
2917
3105
|
|
|
2918
|
-
return dispatchEvent(elm, event);
|
|
3106
|
+
return dispatchEvent$1(elm, event);
|
|
2919
3107
|
},
|
|
2920
3108
|
addEventListener: function addEventListener(type, listener, options) {
|
|
2921
3109
|
var vm = getAssociatedVM(this);
|
|
2922
|
-
var elm = vm.elm
|
|
2923
|
-
addEventListener = vm.renderer.addEventListener;
|
|
3110
|
+
var elm = vm.elm;
|
|
2924
3111
|
|
|
2925
3112
|
if (process.env.NODE_ENV !== 'production') {
|
|
2926
3113
|
var _vmBeingRendered2 = getVMBeingRendered();
|
|
@@ -2931,111 +3118,99 @@
|
|
|
2931
3118
|
}
|
|
2932
3119
|
|
|
2933
3120
|
var wrappedListener = getWrappedComponentsListener(vm, listener);
|
|
2934
|
-
addEventListener(elm, type, wrappedListener, options);
|
|
3121
|
+
addEventListener$1(elm, type, wrappedListener, options);
|
|
2935
3122
|
},
|
|
2936
3123
|
removeEventListener: function removeEventListener(type, listener, options) {
|
|
2937
3124
|
var vm = getAssociatedVM(this);
|
|
2938
|
-
var elm = vm.elm
|
|
2939
|
-
removeEventListener = vm.renderer.removeEventListener;
|
|
3125
|
+
var elm = vm.elm;
|
|
2940
3126
|
var wrappedListener = getWrappedComponentsListener(vm, listener);
|
|
2941
|
-
removeEventListener(elm, type, wrappedListener, options);
|
|
3127
|
+
removeEventListener$1(elm, type, wrappedListener, options);
|
|
2942
3128
|
},
|
|
2943
3129
|
hasAttribute: function hasAttribute(name) {
|
|
2944
3130
|
var _getAssociatedVM2 = getAssociatedVM(this),
|
|
2945
|
-
elm = _getAssociatedVM2.elm
|
|
2946
|
-
getAttribute = _getAssociatedVM2.renderer.getAttribute;
|
|
3131
|
+
elm = _getAssociatedVM2.elm;
|
|
2947
3132
|
|
|
2948
|
-
return !isNull(getAttribute(elm, name));
|
|
3133
|
+
return !isNull(getAttribute$1(elm, name));
|
|
2949
3134
|
},
|
|
2950
3135
|
hasAttributeNS: function hasAttributeNS(namespace, name) {
|
|
2951
3136
|
var _getAssociatedVM3 = getAssociatedVM(this),
|
|
2952
|
-
elm = _getAssociatedVM3.elm
|
|
2953
|
-
getAttribute = _getAssociatedVM3.renderer.getAttribute;
|
|
3137
|
+
elm = _getAssociatedVM3.elm;
|
|
2954
3138
|
|
|
2955
|
-
return !isNull(getAttribute(elm, name, namespace));
|
|
3139
|
+
return !isNull(getAttribute$1(elm, name, namespace));
|
|
2956
3140
|
},
|
|
2957
3141
|
removeAttribute: function removeAttribute(name) {
|
|
2958
3142
|
var _getAssociatedVM4 = getAssociatedVM(this),
|
|
2959
|
-
elm = _getAssociatedVM4.elm
|
|
2960
|
-
removeAttribute = _getAssociatedVM4.renderer.removeAttribute;
|
|
3143
|
+
elm = _getAssociatedVM4.elm;
|
|
2961
3144
|
|
|
2962
3145
|
unlockAttribute(elm, name);
|
|
2963
|
-
removeAttribute(elm, name);
|
|
3146
|
+
removeAttribute$1(elm, name);
|
|
2964
3147
|
lockAttribute();
|
|
2965
3148
|
},
|
|
2966
3149
|
removeAttributeNS: function removeAttributeNS(namespace, name) {
|
|
2967
3150
|
var _getAssociatedVM5 = getAssociatedVM(this),
|
|
2968
|
-
elm = _getAssociatedVM5.elm
|
|
2969
|
-
removeAttribute = _getAssociatedVM5.renderer.removeAttribute;
|
|
3151
|
+
elm = _getAssociatedVM5.elm;
|
|
2970
3152
|
|
|
2971
3153
|
unlockAttribute(elm, name);
|
|
2972
|
-
removeAttribute(elm, name, namespace);
|
|
3154
|
+
removeAttribute$1(elm, name, namespace);
|
|
2973
3155
|
lockAttribute();
|
|
2974
3156
|
},
|
|
2975
3157
|
getAttribute: function getAttribute(name) {
|
|
2976
3158
|
var _getAssociatedVM6 = getAssociatedVM(this),
|
|
2977
|
-
elm = _getAssociatedVM6.elm
|
|
2978
|
-
getAttribute = _getAssociatedVM6.renderer.getAttribute;
|
|
3159
|
+
elm = _getAssociatedVM6.elm;
|
|
2979
3160
|
|
|
2980
|
-
return getAttribute(elm, name);
|
|
3161
|
+
return getAttribute$1(elm, name);
|
|
2981
3162
|
},
|
|
2982
3163
|
getAttributeNS: function getAttributeNS(namespace, name) {
|
|
2983
3164
|
var _getAssociatedVM7 = getAssociatedVM(this),
|
|
2984
|
-
elm = _getAssociatedVM7.elm
|
|
2985
|
-
getAttribute = _getAssociatedVM7.renderer.getAttribute;
|
|
3165
|
+
elm = _getAssociatedVM7.elm;
|
|
2986
3166
|
|
|
2987
|
-
return getAttribute(elm, name, namespace);
|
|
3167
|
+
return getAttribute$1(elm, name, namespace);
|
|
2988
3168
|
},
|
|
2989
3169
|
setAttribute: function setAttribute(name, value) {
|
|
2990
3170
|
var vm = getAssociatedVM(this);
|
|
2991
|
-
var elm = vm.elm
|
|
2992
|
-
setAttribute = vm.renderer.setAttribute;
|
|
3171
|
+
var elm = vm.elm;
|
|
2993
3172
|
|
|
2994
3173
|
if (process.env.NODE_ENV !== 'production') {
|
|
2995
3174
|
assert.isFalse(isBeingConstructed(vm), "Failed to construct '".concat(getComponentTag(vm), "': The result must not have attributes."));
|
|
2996
3175
|
}
|
|
2997
3176
|
|
|
2998
3177
|
unlockAttribute(elm, name);
|
|
2999
|
-
setAttribute(elm, name, value);
|
|
3178
|
+
setAttribute$1(elm, name, value);
|
|
3000
3179
|
lockAttribute();
|
|
3001
3180
|
},
|
|
3002
3181
|
setAttributeNS: function setAttributeNS(namespace, name, value) {
|
|
3003
3182
|
var vm = getAssociatedVM(this);
|
|
3004
|
-
var elm = vm.elm
|
|
3005
|
-
setAttribute = vm.renderer.setAttribute;
|
|
3183
|
+
var elm = vm.elm;
|
|
3006
3184
|
|
|
3007
3185
|
if (process.env.NODE_ENV !== 'production') {
|
|
3008
3186
|
assert.isFalse(isBeingConstructed(vm), "Failed to construct '".concat(getComponentTag(vm), "': The result must not have attributes."));
|
|
3009
3187
|
}
|
|
3010
3188
|
|
|
3011
3189
|
unlockAttribute(elm, name);
|
|
3012
|
-
setAttribute(elm, name, value, namespace);
|
|
3190
|
+
setAttribute$1(elm, name, value, namespace);
|
|
3013
3191
|
lockAttribute();
|
|
3014
3192
|
},
|
|
3015
3193
|
getBoundingClientRect: function getBoundingClientRect() {
|
|
3016
3194
|
var vm = getAssociatedVM(this);
|
|
3017
|
-
var elm = vm.elm
|
|
3018
|
-
getBoundingClientRect = vm.renderer.getBoundingClientRect;
|
|
3195
|
+
var elm = vm.elm;
|
|
3019
3196
|
|
|
3020
3197
|
if (process.env.NODE_ENV !== 'production') {
|
|
3021
3198
|
warnIfInvokedDuringConstruction(vm, 'getBoundingClientRect()');
|
|
3022
3199
|
}
|
|
3023
3200
|
|
|
3024
|
-
return getBoundingClientRect(elm);
|
|
3201
|
+
return getBoundingClientRect$1(elm);
|
|
3025
3202
|
},
|
|
3026
3203
|
|
|
3027
3204
|
get isConnected() {
|
|
3028
3205
|
var _getAssociatedVM8 = getAssociatedVM(this),
|
|
3029
|
-
elm = _getAssociatedVM8.elm
|
|
3030
|
-
isConnected = _getAssociatedVM8.renderer.isConnected;
|
|
3206
|
+
elm = _getAssociatedVM8.elm;
|
|
3031
3207
|
|
|
3032
|
-
return isConnected(elm);
|
|
3208
|
+
return isConnected$1(elm);
|
|
3033
3209
|
},
|
|
3034
3210
|
|
|
3035
3211
|
get classList() {
|
|
3036
3212
|
var vm = getAssociatedVM(this);
|
|
3037
|
-
var elm = vm.elm
|
|
3038
|
-
getClassList = vm.renderer.getClassList;
|
|
3213
|
+
var elm = vm.elm;
|
|
3039
3214
|
|
|
3040
3215
|
if (process.env.NODE_ENV !== 'production') {
|
|
3041
3216
|
// TODO [#1290]: this still fails in dev but works in production, eventually, we should
|
|
@@ -3043,7 +3218,7 @@
|
|
|
3043
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."));
|
|
3044
3219
|
}
|
|
3045
3220
|
|
|
3046
|
-
return getClassList(elm);
|
|
3221
|
+
return getClassList$1(elm);
|
|
3047
3222
|
},
|
|
3048
3223
|
|
|
3049
3224
|
get template() {
|
|
@@ -3075,25 +3250,47 @@
|
|
|
3075
3250
|
return "[object ".concat(vm.def.name, "]");
|
|
3076
3251
|
}
|
|
3077
3252
|
};
|
|
3078
|
-
var queryAndChildGetterDescriptors = create(null);
|
|
3079
|
-
|
|
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.
|
|
3080
3256
|
|
|
3081
|
-
var
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
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;
|
|
3085
3275
|
|
|
3086
|
-
|
|
3276
|
+
case 'lastElementChild':
|
|
3277
|
+
return getLastElementChild$1;
|
|
3278
|
+
}
|
|
3279
|
+
} // Generic passthrough for child getters on HTMLElement to the relevant Renderer APIs
|
|
3280
|
+
|
|
3281
|
+
|
|
3282
|
+
var _loop = function _loop() {
|
|
3283
|
+
var childGetter = _childGetters[_i9];
|
|
3284
|
+
queryAndChildGetterDescriptors[childGetter] = {
|
|
3087
3285
|
get: function get() {
|
|
3088
3286
|
var vm = getAssociatedVM(this);
|
|
3089
|
-
var elm = vm.elm
|
|
3090
|
-
renderer = vm.renderer;
|
|
3287
|
+
var elm = vm.elm;
|
|
3091
3288
|
|
|
3092
3289
|
if (process.env.NODE_ENV !== 'production') {
|
|
3093
|
-
warnIfInvokedDuringConstruction(vm,
|
|
3290
|
+
warnIfInvokedDuringConstruction(vm, childGetter);
|
|
3094
3291
|
}
|
|
3095
3292
|
|
|
3096
|
-
return
|
|
3293
|
+
return getChildGetter(childGetter)(elm);
|
|
3097
3294
|
},
|
|
3098
3295
|
configurable: true,
|
|
3099
3296
|
enumerable: true
|
|
@@ -3104,21 +3301,37 @@
|
|
|
3104
3301
|
_loop();
|
|
3105
3302
|
}
|
|
3106
3303
|
|
|
3107
|
-
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
|
+
|
|
3108
3322
|
|
|
3109
3323
|
var _loop2 = function _loop2() {
|
|
3110
3324
|
var queryMethod = _queryMethods[_i10];
|
|
3111
3325
|
queryAndChildGetterDescriptors[queryMethod] = {
|
|
3112
3326
|
value: function value(arg) {
|
|
3113
3327
|
var vm = getAssociatedVM(this);
|
|
3114
|
-
var elm = vm.elm
|
|
3115
|
-
renderer = vm.renderer;
|
|
3328
|
+
var elm = vm.elm;
|
|
3116
3329
|
|
|
3117
3330
|
if (process.env.NODE_ENV !== 'production') {
|
|
3118
3331
|
warnIfInvokedDuringConstruction(vm, "".concat(queryMethod, "()"));
|
|
3119
3332
|
}
|
|
3120
3333
|
|
|
3121
|
-
return
|
|
3334
|
+
return getQueryMethod(queryMethod)(elm, arg);
|
|
3122
3335
|
},
|
|
3123
3336
|
configurable: true,
|
|
3124
3337
|
enumerable: true,
|
|
@@ -3844,7 +4057,7 @@
|
|
|
3844
4057
|
return _super4.apply(this, arguments);
|
|
3845
4058
|
}
|
|
3846
4059
|
|
|
3847
|
-
return HTMLBridgeElement;
|
|
4060
|
+
return _createClass(HTMLBridgeElement);
|
|
3848
4061
|
}(SuperClass);
|
|
3849
4062
|
} else {
|
|
3850
4063
|
HTMLBridgeElement = function HTMLBridgeElement() {
|
|
@@ -4288,10 +4501,6 @@
|
|
|
4288
4501
|
|
|
4289
4502
|
assert.isTrue(Ctor.constructor, "Missing ".concat(ctorName, ".constructor, ").concat(ctorName, " should have a \"constructor\" property."));
|
|
4290
4503
|
|
|
4291
|
-
if (!runtimeFlags.ENABLE_MIXED_SHADOW_MODE) {
|
|
4292
|
-
assert.isFalse('shadowSupportMode' in Ctor, "".concat(ctorName || 'Anonymous class', " is an invalid LWC component. The shadowSupportMode static property is not available in this environment."));
|
|
4293
|
-
}
|
|
4294
|
-
|
|
4295
4504
|
if (!isUndefined$1(ctorShadowSupportMode)) {
|
|
4296
4505
|
assert.invariant(ctorShadowSupportMode === "any"
|
|
4297
4506
|
/* Any */
|
|
@@ -4527,21 +4736,20 @@
|
|
|
4527
4736
|
var token = cmpTemplate === null || cmpTemplate === void 0 ? void 0 : cmpTemplate.stylesheetToken;
|
|
4528
4737
|
|
|
4529
4738
|
if (!isUndefined$1(token) && context.hasScopedStyles) {
|
|
4530
|
-
|
|
4739
|
+
getClassList$1(elm).add(token);
|
|
4531
4740
|
}
|
|
4532
4741
|
}
|
|
4533
4742
|
|
|
4534
4743
|
function updateNodeHook(oldVnode, vnode) {
|
|
4535
4744
|
var elm = vnode.elm,
|
|
4536
|
-
text = vnode.text
|
|
4537
|
-
renderer = vnode.owner.renderer;
|
|
4745
|
+
text = vnode.text;
|
|
4538
4746
|
|
|
4539
4747
|
if (oldVnode.text !== text) {
|
|
4540
4748
|
if (process.env.NODE_ENV !== 'production') {
|
|
4541
4749
|
unlockDomMutation();
|
|
4542
4750
|
}
|
|
4543
4751
|
|
|
4544
|
-
|
|
4752
|
+
setText$1(elm, text);
|
|
4545
4753
|
|
|
4546
4754
|
if (process.env.NODE_ENV !== 'production') {
|
|
4547
4755
|
lockDomMutation();
|
|
@@ -4550,13 +4758,11 @@
|
|
|
4550
4758
|
}
|
|
4551
4759
|
|
|
4552
4760
|
function insertNodeHook(vnode, parentNode, referenceNode) {
|
|
4553
|
-
var renderer = vnode.owner.renderer;
|
|
4554
|
-
|
|
4555
4761
|
if (process.env.NODE_ENV !== 'production') {
|
|
4556
4762
|
unlockDomMutation();
|
|
4557
4763
|
}
|
|
4558
4764
|
|
|
4559
|
-
|
|
4765
|
+
insert$1(vnode.elm, parentNode, referenceNode);
|
|
4560
4766
|
|
|
4561
4767
|
if (process.env.NODE_ENV !== 'production') {
|
|
4562
4768
|
lockDomMutation();
|
|
@@ -4564,13 +4770,11 @@
|
|
|
4564
4770
|
}
|
|
4565
4771
|
|
|
4566
4772
|
function removeNodeHook(vnode, parentNode) {
|
|
4567
|
-
var renderer = vnode.owner.renderer;
|
|
4568
|
-
|
|
4569
4773
|
if (process.env.NODE_ENV !== 'production') {
|
|
4570
4774
|
unlockDomMutation();
|
|
4571
4775
|
}
|
|
4572
4776
|
|
|
4573
|
-
|
|
4777
|
+
remove$1(vnode.elm, parentNode);
|
|
4574
4778
|
|
|
4575
4779
|
if (process.env.NODE_ENV !== 'production') {
|
|
4576
4780
|
lockDomMutation();
|
|
@@ -4649,12 +4853,14 @@
|
|
|
4649
4853
|
}
|
|
4650
4854
|
|
|
4651
4855
|
function updateChildrenHook(oldVnode, vnode) {
|
|
4652
|
-
var
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
}
|
|
4856
|
+
var elm = vnode.elm,
|
|
4857
|
+
children = vnode.children;
|
|
4858
|
+
|
|
4859
|
+
if (hasDynamicChildren(children)) {
|
|
4860
|
+
updateDynamicChildren(elm, oldVnode.children, children);
|
|
4861
|
+
} else {
|
|
4862
|
+
updateStaticChildren(elm, oldVnode.children, children);
|
|
4863
|
+
}
|
|
4658
4864
|
}
|
|
4659
4865
|
|
|
4660
4866
|
function allocateChildrenHook(vnode, vm) {
|
|
@@ -4714,8 +4920,7 @@
|
|
|
4714
4920
|
createVM(elm, def, {
|
|
4715
4921
|
mode: mode,
|
|
4716
4922
|
owner: owner,
|
|
4717
|
-
tagName: sel
|
|
4718
|
-
renderer: owner.renderer
|
|
4923
|
+
tagName: sel
|
|
4719
4924
|
});
|
|
4720
4925
|
|
|
4721
4926
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4757,8 +4962,7 @@
|
|
|
4757
4962
|
|
|
4758
4963
|
function vnodesAndElementHaveCompatibleAttrs(vnode, elm) {
|
|
4759
4964
|
var _vnode$data$attrs = vnode.data.attrs,
|
|
4760
|
-
attrs = _vnode$data$attrs === void 0 ? {} : _vnode$data$attrs
|
|
4761
|
-
renderer = vnode.owner.renderer;
|
|
4965
|
+
attrs = _vnode$data$attrs === void 0 ? {} : _vnode$data$attrs;
|
|
4762
4966
|
var nodesAreCompatible = true; // Validate attributes, though we could always recovery from those by running the update mods.
|
|
4763
4967
|
// Note: intentionally ONLY matching vnodes.attrs to elm.attrs, in case SSR is adding extra attributes.
|
|
4764
4968
|
|
|
@@ -4767,7 +4971,7 @@
|
|
|
4767
4971
|
attrName = _Object$entries$_i[0],
|
|
4768
4972
|
attrValue = _Object$entries$_i[1];
|
|
4769
4973
|
|
|
4770
|
-
var elmAttrValue =
|
|
4974
|
+
var elmAttrValue = getAttribute$1(elm, attrName);
|
|
4771
4975
|
|
|
4772
4976
|
if (String(attrValue) !== elmAttrValue) {
|
|
4773
4977
|
logError("Mismatch hydrating element <".concat(elm.tagName.toLowerCase(), ">: attribute \"").concat(attrName, "\" has different values, expected \"").concat(attrValue, "\" but found \"").concat(elmAttrValue, "\""), vnode.owner);
|
|
@@ -4781,8 +4985,7 @@
|
|
|
4781
4985
|
function vnodesAndElementHaveCompatibleClass(vnode, elm) {
|
|
4782
4986
|
var _vnode$data = vnode.data,
|
|
4783
4987
|
className = _vnode$data.className,
|
|
4784
|
-
classMap = _vnode$data.classMap
|
|
4785
|
-
renderer = vnode.owner.renderer;
|
|
4988
|
+
classMap = _vnode$data.classMap;
|
|
4786
4989
|
var nodesAreCompatible = true;
|
|
4787
4990
|
var vnodeClassName;
|
|
4788
4991
|
|
|
@@ -4792,7 +4995,7 @@
|
|
|
4792
4995
|
vnodeClassName = className;
|
|
4793
4996
|
} else if (!isUndefined$1(classMap)) {
|
|
4794
4997
|
// classMap is used when class is set to static value.
|
|
4795
|
-
var classList =
|
|
4998
|
+
var classList = getClassList$1(elm);
|
|
4796
4999
|
var computedClassName = ''; // all classes from the vnode should be in the element.classList
|
|
4797
5000
|
|
|
4798
5001
|
for (var name in classMap) {
|
|
@@ -4820,9 +5023,8 @@
|
|
|
4820
5023
|
function vnodesAndElementHaveCompatibleStyle(vnode, elm) {
|
|
4821
5024
|
var _vnode$data2 = vnode.data,
|
|
4822
5025
|
style = _vnode$data2.style,
|
|
4823
|
-
styleDecls = _vnode$data2.styleDecls
|
|
4824
|
-
|
|
4825
|
-
var elmStyle = renderer.getAttribute(elm, 'style') || '';
|
|
5026
|
+
styleDecls = _vnode$data2.styleDecls;
|
|
5027
|
+
var elmStyle = getAttribute$1(elm, 'style') || '';
|
|
4826
5028
|
var vnodeStyle;
|
|
4827
5029
|
var nodesAreCompatible = true;
|
|
4828
5030
|
|
|
@@ -4963,12 +5165,12 @@
|
|
|
4963
5165
|
*/
|
|
4964
5166
|
|
|
4965
5167
|
|
|
4966
|
-
function getUpgradableConstructor(tagName
|
|
5168
|
+
function getUpgradableConstructor(tagName) {
|
|
4967
5169
|
// Should never get a tag with upper case letter at this point, the compiler should
|
|
4968
5170
|
// produce only tags with lowercase letters
|
|
4969
5171
|
// But, for backwards compatibility, we will lower case the tagName
|
|
4970
5172
|
tagName = tagName.toLowerCase();
|
|
4971
|
-
var CE =
|
|
5173
|
+
var CE = getCustomElement$1(tagName);
|
|
4972
5174
|
|
|
4973
5175
|
if (!isUndefined$1(CE)) {
|
|
4974
5176
|
return CE;
|
|
@@ -4979,8 +5181,8 @@
|
|
|
4979
5181
|
*/
|
|
4980
5182
|
|
|
4981
5183
|
|
|
4982
|
-
CE = /*#__PURE__*/function (
|
|
4983
|
-
_inherits(LWCUpgradableElement,
|
|
5184
|
+
CE = /*#__PURE__*/function (_HTMLElementExported$) {
|
|
5185
|
+
_inherits(LWCUpgradableElement, _HTMLElementExported$);
|
|
4984
5186
|
|
|
4985
5187
|
var _super5 = _createSuper(LWCUpgradableElement);
|
|
4986
5188
|
|
|
@@ -4998,10 +5200,10 @@
|
|
|
4998
5200
|
return _this4;
|
|
4999
5201
|
}
|
|
5000
5202
|
|
|
5001
|
-
return LWCUpgradableElement;
|
|
5002
|
-
}(
|
|
5203
|
+
return _createClass(LWCUpgradableElement);
|
|
5204
|
+
}(HTMLElementExported$1);
|
|
5003
5205
|
|
|
5004
|
-
|
|
5206
|
+
defineCustomElement$1(tagName, CE);
|
|
5005
5207
|
return CE;
|
|
5006
5208
|
}
|
|
5007
5209
|
/*
|
|
@@ -5017,8 +5219,7 @@
|
|
|
5017
5219
|
var TextHook = {
|
|
5018
5220
|
create: function create(vnode) {
|
|
5019
5221
|
var owner = vnode.owner;
|
|
5020
|
-
var
|
|
5021
|
-
var elm = renderer.createText(vnode.text);
|
|
5222
|
+
var elm = createText$1(vnode.text);
|
|
5022
5223
|
linkNodeToShadow(elm, owner);
|
|
5023
5224
|
vnode.elm = elm;
|
|
5024
5225
|
},
|
|
@@ -5050,8 +5251,7 @@
|
|
|
5050
5251
|
create: function create(vnode) {
|
|
5051
5252
|
var owner = vnode.owner,
|
|
5052
5253
|
text = vnode.text;
|
|
5053
|
-
var
|
|
5054
|
-
var elm = renderer.createComment(text);
|
|
5254
|
+
var elm = createComment$1(text);
|
|
5055
5255
|
linkNodeToShadow(elm, owner);
|
|
5056
5256
|
vnode.elm = elm;
|
|
5057
5257
|
},
|
|
@@ -5089,9 +5289,8 @@
|
|
|
5089
5289
|
var sel = vnode.sel,
|
|
5090
5290
|
owner = vnode.owner,
|
|
5091
5291
|
svg = vnode.data.svg;
|
|
5092
|
-
var renderer = owner.renderer;
|
|
5093
5292
|
var namespace = isTrue(svg) ? SVG_NAMESPACE : undefined;
|
|
5094
|
-
var elm =
|
|
5293
|
+
var elm = createElement$2(sel, namespace);
|
|
5095
5294
|
linkNodeToShadow(elm, owner);
|
|
5096
5295
|
fallbackElmHook(elm, vnode);
|
|
5097
5296
|
vnode.elm = elm;
|
|
@@ -5145,8 +5344,7 @@
|
|
|
5145
5344
|
create: function create(vnode) {
|
|
5146
5345
|
var sel = vnode.sel,
|
|
5147
5346
|
owner = vnode.owner;
|
|
5148
|
-
var
|
|
5149
|
-
var UpgradableConstructor = getUpgradableConstructor(sel, renderer);
|
|
5347
|
+
var UpgradableConstructor = getUpgradableConstructor(sel);
|
|
5150
5348
|
/**
|
|
5151
5349
|
* Note: if the upgradable constructor does not expect, or throw when we new it
|
|
5152
5350
|
* with a callback as the first argument, we could implement a more advanced
|
|
@@ -5237,8 +5435,7 @@
|
|
|
5237
5435
|
createVM(elm, def, {
|
|
5238
5436
|
mode: mode,
|
|
5239
5437
|
owner: owner,
|
|
5240
|
-
tagName: sel
|
|
5241
|
-
renderer: owner.renderer
|
|
5438
|
+
tagName: sel
|
|
5242
5439
|
});
|
|
5243
5440
|
vnode.elm = elm;
|
|
5244
5441
|
var vm = getAssociatedVM(elm);
|
|
@@ -5266,11 +5463,10 @@
|
|
|
5266
5463
|
};
|
|
5267
5464
|
|
|
5268
5465
|
function linkNodeToShadow(elm, owner) {
|
|
5269
|
-
var
|
|
5270
|
-
renderMode = owner.renderMode,
|
|
5466
|
+
var renderMode = owner.renderMode,
|
|
5271
5467
|
shadowMode = owner.shadowMode; // TODO [#1164]: this should eventually be done by the polyfill directly
|
|
5272
5468
|
|
|
5273
|
-
if (
|
|
5469
|
+
if (isSyntheticShadowDefined$1) {
|
|
5274
5470
|
if (shadowMode === 1
|
|
5275
5471
|
/* Synthetic */
|
|
5276
5472
|
|| renderMode === 0
|
|
@@ -5791,7 +5987,6 @@
|
|
|
5791
5987
|
function updateStylesheetToken(vm, template) {
|
|
5792
5988
|
var elm = vm.elm,
|
|
5793
5989
|
context = vm.context,
|
|
5794
|
-
renderer = vm.renderer,
|
|
5795
5990
|
renderMode = vm.renderMode,
|
|
5796
5991
|
shadowMode = vm.shadowMode;
|
|
5797
5992
|
var newStylesheets = template.stylesheets,
|
|
@@ -5811,11 +6006,11 @@
|
|
|
5811
6006
|
oldHasTokenInAttribute = context.hasTokenInAttribute;
|
|
5812
6007
|
|
|
5813
6008
|
if (oldHasTokenInClass) {
|
|
5814
|
-
|
|
6009
|
+
getClassList$1(elm).remove(makeHostToken(oldToken));
|
|
5815
6010
|
}
|
|
5816
6011
|
|
|
5817
6012
|
if (oldHasTokenInAttribute) {
|
|
5818
|
-
|
|
6013
|
+
removeAttribute$1(elm, makeHostToken(oldToken));
|
|
5819
6014
|
} // Apply the new template styling token to the host element, if the new template has any
|
|
5820
6015
|
// associated stylesheets. In the case of light DOM, also ensure there is at least one scoped stylesheet.
|
|
5821
6016
|
|
|
@@ -5827,12 +6022,12 @@
|
|
|
5827
6022
|
|
|
5828
6023
|
if (!isUndefined$1(newToken)) {
|
|
5829
6024
|
if (hasScopedStyles) {
|
|
5830
|
-
|
|
6025
|
+
getClassList$1(elm).add(makeHostToken(newToken));
|
|
5831
6026
|
newHasTokenInClass = true;
|
|
5832
6027
|
}
|
|
5833
6028
|
|
|
5834
6029
|
if (isSyntheticShadow) {
|
|
5835
|
-
|
|
6030
|
+
setAttribute$1(elm, makeHostToken(newToken), '');
|
|
5836
6031
|
newHasTokenInAttribute = true;
|
|
5837
6032
|
}
|
|
5838
6033
|
} // Update the styling tokens present on the context object.
|
|
@@ -5845,6 +6040,7 @@
|
|
|
5845
6040
|
|
|
5846
6041
|
function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
|
|
5847
6042
|
var content = [];
|
|
6043
|
+
var root;
|
|
5848
6044
|
|
|
5849
6045
|
for (var _i16 = 0; _i16 < stylesheets.length; _i16++) {
|
|
5850
6046
|
var stylesheet = stylesheets[_i16];
|
|
@@ -5857,23 +6053,46 @@
|
|
|
5857
6053
|
// the component instance might be attempting to use an old version of
|
|
5858
6054
|
// the stylesheet, while internally, we have a replacement for it.
|
|
5859
6055
|
stylesheet = getStyleOrSwappedStyle(stylesheet);
|
|
5860
|
-
}
|
|
5861
|
-
// native shadow DOM. Synthetic shadow DOM never uses `:host`.
|
|
6056
|
+
}
|
|
5862
6057
|
|
|
6058
|
+
var isScopedCss = stylesheet[KEY__SCOPED_CSS]; // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
|
|
6059
|
+
|
|
6060
|
+
var scopeToken = isScopedCss || vm.shadowMode === 1
|
|
6061
|
+
/* Synthetic */
|
|
6062
|
+
&& vm.renderMode === 1
|
|
6063
|
+
/* Shadow */
|
|
6064
|
+
? stylesheetToken : undefined; // Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
|
|
6065
|
+
// native shadow DOM. Synthetic shadow DOM never uses `:host`.
|
|
5863
6066
|
|
|
5864
|
-
var isScopedCss = stylesheet[KEY__SCOPED_CSS];
|
|
5865
6067
|
var useActualHostSelector = vm.renderMode === 0
|
|
5866
6068
|
/* Light */
|
|
5867
6069
|
? !isScopedCss : vm.shadowMode === 0
|
|
5868
6070
|
/* Native */
|
|
5869
|
-
; //
|
|
6071
|
+
; // Use the native :dir() pseudoclass only in native shadow DOM. Otherwise, in synthetic shadow,
|
|
6072
|
+
// we use an attribute selector on the host to simulate :dir().
|
|
5870
6073
|
|
|
5871
|
-
var
|
|
5872
|
-
|
|
5873
|
-
|
|
6074
|
+
var useNativeDirPseudoclass = void 0;
|
|
6075
|
+
|
|
6076
|
+
if (vm.renderMode === 1
|
|
5874
6077
|
/* Shadow */
|
|
5875
|
-
|
|
5876
|
-
|
|
6078
|
+
) {
|
|
6079
|
+
useNativeDirPseudoclass = vm.shadowMode === 0
|
|
6080
|
+
/* Native */
|
|
6081
|
+
;
|
|
6082
|
+
} else {
|
|
6083
|
+
// Light DOM components should only render `[dir]` if they're inside of a synthetic shadow root.
|
|
6084
|
+
// At the top level (root is null) or inside of a native shadow root, they should use `:dir()`.
|
|
6085
|
+
if (isUndefined$1(root)) {
|
|
6086
|
+
// Only calculate the root once as necessary
|
|
6087
|
+
root = getNearestShadowComponent(vm);
|
|
6088
|
+
}
|
|
6089
|
+
|
|
6090
|
+
useNativeDirPseudoclass = isNull(root) || root.shadowMode === 0
|
|
6091
|
+
/* Native */
|
|
6092
|
+
;
|
|
6093
|
+
}
|
|
6094
|
+
|
|
6095
|
+
ArrayPush$1.call(content, stylesheet(scopeToken, useActualHostSelector, useNativeDirPseudoclass));
|
|
5877
6096
|
}
|
|
5878
6097
|
}
|
|
5879
6098
|
|
|
@@ -5895,14 +6114,12 @@
|
|
|
5895
6114
|
// https://github.com/salesforce/lwc/pull/2460#discussion_r691208892
|
|
5896
6115
|
|
|
5897
6116
|
|
|
5898
|
-
function
|
|
6117
|
+
function getNearestShadowComponent(vm) {
|
|
5899
6118
|
var owner = vm;
|
|
5900
6119
|
|
|
5901
6120
|
while (!isNull(owner)) {
|
|
5902
6121
|
if (owner.renderMode === 1
|
|
5903
6122
|
/* Shadow */
|
|
5904
|
-
&& owner.shadowMode === 0
|
|
5905
|
-
/* Native */
|
|
5906
6123
|
) {
|
|
5907
6124
|
return owner;
|
|
5908
6125
|
}
|
|
@@ -5913,9 +6130,22 @@
|
|
|
5913
6130
|
return owner;
|
|
5914
6131
|
}
|
|
5915
6132
|
|
|
6133
|
+
function getNearestNativeShadowComponent(vm) {
|
|
6134
|
+
var owner = getNearestShadowComponent(vm);
|
|
6135
|
+
|
|
6136
|
+
if (!isNull(owner) && owner.shadowMode === 1
|
|
6137
|
+
/* Synthetic */
|
|
6138
|
+
) {
|
|
6139
|
+
// Synthetic-within-native is impossible. So if the nearest shadow component is
|
|
6140
|
+
// synthetic, we know we won't find a native component if we go any further.
|
|
6141
|
+
return null;
|
|
6142
|
+
}
|
|
6143
|
+
|
|
6144
|
+
return owner;
|
|
6145
|
+
}
|
|
6146
|
+
|
|
5916
6147
|
function createStylesheet(vm, stylesheets) {
|
|
5917
|
-
var
|
|
5918
|
-
renderMode = vm.renderMode,
|
|
6148
|
+
var renderMode = vm.renderMode,
|
|
5919
6149
|
shadowMode = vm.shadowMode;
|
|
5920
6150
|
|
|
5921
6151
|
if (renderMode === 1
|
|
@@ -5924,9 +6154,9 @@
|
|
|
5924
6154
|
/* Synthetic */
|
|
5925
6155
|
) {
|
|
5926
6156
|
for (var _i17 = 0; _i17 < stylesheets.length; _i17++) {
|
|
5927
|
-
|
|
6157
|
+
insertGlobalStylesheet$1(stylesheets[_i17]);
|
|
5928
6158
|
}
|
|
5929
|
-
} else if (
|
|
6159
|
+
} else if (ssr$1 || isHydrating$1()) {
|
|
5930
6160
|
// Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
|
|
5931
6161
|
// This works in the client, because the stylesheets are created, and cached in the VM
|
|
5932
6162
|
// the first time the VM renders.
|
|
@@ -5940,10 +6170,10 @@
|
|
|
5940
6170
|
|
|
5941
6171
|
for (var _i18 = 0; _i18 < stylesheets.length; _i18++) {
|
|
5942
6172
|
if (isGlobal) {
|
|
5943
|
-
|
|
6173
|
+
insertGlobalStylesheet$1(stylesheets[_i18]);
|
|
5944
6174
|
} else {
|
|
5945
6175
|
// local level
|
|
5946
|
-
|
|
6176
|
+
insertStylesheet$1(stylesheets[_i18], root.cmpRoot);
|
|
5947
6177
|
}
|
|
5948
6178
|
}
|
|
5949
6179
|
}
|
|
@@ -6024,7 +6254,7 @@
|
|
|
6024
6254
|
if (isProfilerEnabled) {
|
|
6025
6255
|
currentDispatcher(opId, 0
|
|
6026
6256
|
/* Start */
|
|
6027
|
-
, vm.tagName, vm.idx);
|
|
6257
|
+
, vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
|
|
6028
6258
|
}
|
|
6029
6259
|
}
|
|
6030
6260
|
|
|
@@ -6038,7 +6268,7 @@
|
|
|
6038
6268
|
if (isProfilerEnabled) {
|
|
6039
6269
|
currentDispatcher(opId, 1
|
|
6040
6270
|
/* Stop */
|
|
6041
|
-
, vm.tagName, vm.idx);
|
|
6271
|
+
, vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
|
|
6042
6272
|
}
|
|
6043
6273
|
}
|
|
6044
6274
|
|
|
@@ -6052,7 +6282,7 @@
|
|
|
6052
6282
|
if (isProfilerEnabled) {
|
|
6053
6283
|
currentDispatcher(opId, 0
|
|
6054
6284
|
/* Start */
|
|
6055
|
-
, vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx);
|
|
6285
|
+
, 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);
|
|
6056
6286
|
}
|
|
6057
6287
|
}
|
|
6058
6288
|
|
|
@@ -6066,7 +6296,7 @@
|
|
|
6066
6296
|
if (isProfilerEnabled) {
|
|
6067
6297
|
currentDispatcher(opId, 1
|
|
6068
6298
|
/* Stop */
|
|
6069
|
-
, vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx);
|
|
6299
|
+
, 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);
|
|
6070
6300
|
}
|
|
6071
6301
|
}
|
|
6072
6302
|
/*
|
|
@@ -6605,7 +6835,6 @@
|
|
|
6605
6835
|
function createVM(elm, def, options) {
|
|
6606
6836
|
var mode = options.mode,
|
|
6607
6837
|
owner = options.owner,
|
|
6608
|
-
renderer = options.renderer,
|
|
6609
6838
|
tagName = options.tagName;
|
|
6610
6839
|
var vm = {
|
|
6611
6840
|
elm: elm,
|
|
@@ -6619,7 +6848,6 @@
|
|
|
6619
6848
|
tagName: tagName,
|
|
6620
6849
|
mode: mode,
|
|
6621
6850
|
owner: owner,
|
|
6622
|
-
renderer: renderer,
|
|
6623
6851
|
children: EmptyArray,
|
|
6624
6852
|
aChildren: EmptyArray,
|
|
6625
6853
|
velements: EmptyArray,
|
|
@@ -6673,13 +6901,10 @@
|
|
|
6673
6901
|
}
|
|
6674
6902
|
|
|
6675
6903
|
function computeShadowMode(vm) {
|
|
6676
|
-
var def = vm.def
|
|
6677
|
-
renderer = vm.renderer;
|
|
6678
|
-
var isNativeShadowDefined = renderer.isNativeShadowDefined,
|
|
6679
|
-
isSyntheticShadowDefined = renderer.isSyntheticShadowDefined;
|
|
6904
|
+
var def = vm.def;
|
|
6680
6905
|
var shadowMode;
|
|
6681
6906
|
|
|
6682
|
-
if (isSyntheticShadowDefined) {
|
|
6907
|
+
if (isSyntheticShadowDefined$1) {
|
|
6683
6908
|
if (def.renderMode === 0
|
|
6684
6909
|
/* Light */
|
|
6685
6910
|
) {
|
|
@@ -6688,7 +6913,7 @@
|
|
|
6688
6913
|
shadowMode = 0
|
|
6689
6914
|
/* Native */
|
|
6690
6915
|
;
|
|
6691
|
-
} else if (isNativeShadowDefined) {
|
|
6916
|
+
} else if (isNativeShadowDefined$1) {
|
|
6692
6917
|
if (def.shadowSupportMode === "any"
|
|
6693
6918
|
/* Any */
|
|
6694
6919
|
) {
|
|
@@ -6825,10 +7050,9 @@
|
|
|
6825
7050
|
}
|
|
6826
7051
|
|
|
6827
7052
|
function runRenderedCallback(vm) {
|
|
6828
|
-
var
|
|
6829
|
-
renderedCallback = vm.def.renderedCallback;
|
|
7053
|
+
var renderedCallback = vm.def.renderedCallback;
|
|
6830
7054
|
|
|
6831
|
-
if (isTrue(
|
|
7055
|
+
if (isTrue(ssr$1)) {
|
|
6832
7056
|
return;
|
|
6833
7057
|
}
|
|
6834
7058
|
|
|
@@ -7037,15 +7261,14 @@
|
|
|
7037
7261
|
|
|
7038
7262
|
|
|
7039
7263
|
function resetComponentRoot(vm) {
|
|
7040
|
-
var children = vm.children
|
|
7041
|
-
renderer = vm.renderer;
|
|
7264
|
+
var children = vm.children;
|
|
7042
7265
|
var rootNode = getRenderRoot(vm);
|
|
7043
7266
|
|
|
7044
7267
|
for (var _i25 = 0, _len9 = children.length; _i25 < _len9; _i25++) {
|
|
7045
7268
|
var child = children[_i25];
|
|
7046
7269
|
|
|
7047
7270
|
if (!isNull(child) && !isUndefined$1(child.elm)) {
|
|
7048
|
-
|
|
7271
|
+
remove$1(child.elm, rootNode);
|
|
7049
7272
|
}
|
|
7050
7273
|
}
|
|
7051
7274
|
|
|
@@ -7055,7 +7278,7 @@
|
|
|
7055
7278
|
}
|
|
7056
7279
|
|
|
7057
7280
|
function scheduleRehydration(vm) {
|
|
7058
|
-
if (isTrue(
|
|
7281
|
+
if (isTrue(ssr$1) || isTrue(vm.isScheduled)) {
|
|
7059
7282
|
return;
|
|
7060
7283
|
}
|
|
7061
7284
|
|
|
@@ -7238,7 +7461,7 @@
|
|
|
7238
7461
|
return _this5;
|
|
7239
7462
|
}
|
|
7240
7463
|
|
|
7241
|
-
return WireContextRegistrationEvent;
|
|
7464
|
+
return _createClass(WireContextRegistrationEvent);
|
|
7242
7465
|
}( /*#__PURE__*/_wrapNativeSuper(CustomEvent));
|
|
7243
7466
|
|
|
7244
7467
|
function createFieldDataCallback(vm, name) {
|
|
@@ -7305,7 +7528,6 @@
|
|
|
7305
7528
|
}
|
|
7306
7529
|
|
|
7307
7530
|
var elm = vm.elm,
|
|
7308
|
-
renderer = vm.renderer,
|
|
7309
7531
|
_vm$context = vm.context,
|
|
7310
7532
|
wiredConnecting = _vm$context.wiredConnecting,
|
|
7311
7533
|
wiredDisconnecting = _vm$context.wiredDisconnecting; // waiting for the component to be connected to formally request the context via the token
|
|
@@ -7328,7 +7550,7 @@
|
|
|
7328
7550
|
ArrayPush$1.call(wiredDisconnecting, disconnectCallback);
|
|
7329
7551
|
}
|
|
7330
7552
|
});
|
|
7331
|
-
|
|
7553
|
+
dispatchEvent$1(elm, contextRegistrationEvent);
|
|
7332
7554
|
});
|
|
7333
7555
|
}
|
|
7334
7556
|
|
|
@@ -7582,7 +7804,7 @@
|
|
|
7582
7804
|
hooksAreSet = true;
|
|
7583
7805
|
setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
|
|
7584
7806
|
}
|
|
7585
|
-
/* version: 2.
|
|
7807
|
+
/* version: 2.6.3 */
|
|
7586
7808
|
|
|
7587
7809
|
/*
|
|
7588
7810
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -7612,7 +7834,9 @@
|
|
|
7612
7834
|
var styleElements = create(null);
|
|
7613
7835
|
var styleSheets = create(null);
|
|
7614
7836
|
var nodesToStyleSheets = new WeakMap();
|
|
7615
|
-
var getCustomElement
|
|
7837
|
+
var getCustomElement;
|
|
7838
|
+
var defineCustomElement;
|
|
7839
|
+
var HTMLElementConstructor;
|
|
7616
7840
|
|
|
7617
7841
|
function isCustomElementRegistryAvailable() {
|
|
7618
7842
|
if (typeof customElements === 'undefined') {
|
|
@@ -7639,7 +7863,7 @@
|
|
|
7639
7863
|
return _super7.apply(this, arguments);
|
|
7640
7864
|
}
|
|
7641
7865
|
|
|
7642
|
-
return clazz;
|
|
7866
|
+
return _createClass(clazz);
|
|
7643
7867
|
}(HTMLElementAlias);
|
|
7644
7868
|
|
|
7645
7869
|
customElements.define('lwc-test-' + Math.floor(Math.random() * 1000000), clazz);
|
|
@@ -7737,152 +7961,231 @@
|
|
|
7737
7961
|
HTMLElementConstructor.prototype = HTMLElement.prototype;
|
|
7738
7962
|
}
|
|
7739
7963
|
|
|
7740
|
-
var
|
|
7964
|
+
var hydrating = false;
|
|
7741
7965
|
|
|
7742
|
-
function setIsHydrating(
|
|
7743
|
-
|
|
7966
|
+
function setIsHydrating(value) {
|
|
7967
|
+
hydrating = value;
|
|
7744
7968
|
}
|
|
7745
7969
|
|
|
7746
|
-
var
|
|
7747
|
-
ssr: false,
|
|
7748
|
-
isHydrating: function isHydrating() {
|
|
7749
|
-
return _isHydrating;
|
|
7750
|
-
},
|
|
7751
|
-
isNativeShadowDefined: _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED],
|
|
7752
|
-
isSyntheticShadowDefined: hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN),
|
|
7753
|
-
createElement: function createElement(tagName, namespace) {
|
|
7754
|
-
return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
|
|
7755
|
-
},
|
|
7756
|
-
createText: function createText(content) {
|
|
7757
|
-
return document.createTextNode(content);
|
|
7758
|
-
},
|
|
7759
|
-
createComment: function createComment(content) {
|
|
7760
|
-
return document.createComment(content);
|
|
7761
|
-
},
|
|
7762
|
-
insert: function insert(node, parent, anchor) {
|
|
7763
|
-
parent.insertBefore(node, anchor);
|
|
7764
|
-
},
|
|
7765
|
-
remove: function remove(node, parent) {
|
|
7766
|
-
parent.removeChild(node);
|
|
7767
|
-
},
|
|
7768
|
-
nextSibling: function nextSibling(node) {
|
|
7769
|
-
return node.nextSibling;
|
|
7770
|
-
},
|
|
7771
|
-
attachShadow: function attachShadow(element, options) {
|
|
7772
|
-
if (_isHydrating) {
|
|
7773
|
-
return element.shadowRoot;
|
|
7774
|
-
}
|
|
7970
|
+
var ssr = false;
|
|
7775
7971
|
|
|
7776
|
-
|
|
7777
|
-
|
|
7778
|
-
|
|
7779
|
-
node.nodeValue = content;
|
|
7780
|
-
},
|
|
7781
|
-
getProperty: function getProperty(node, key) {
|
|
7782
|
-
return node[key];
|
|
7783
|
-
},
|
|
7784
|
-
setProperty: function setProperty(node, key, value) {
|
|
7785
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
7786
|
-
if (node instanceof Element && !(key in node)) {
|
|
7787
|
-
// TODO [#1297]: Move this validation to the compiler
|
|
7788
|
-
assert.fail("Unknown public property \"".concat(key, "\" of element <").concat(node.tagName, ">. This is likely a typo on the corresponding attribute \"").concat(htmlPropertyToAttribute(key), "\"."));
|
|
7789
|
-
}
|
|
7790
|
-
}
|
|
7972
|
+
function isHydrating() {
|
|
7973
|
+
return hydrating;
|
|
7974
|
+
}
|
|
7791
7975
|
|
|
7792
|
-
|
|
7793
|
-
|
|
7794
|
-
getAttribute: function getAttribute(element, name, namespace) {
|
|
7795
|
-
return isUndefined$1(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
|
|
7796
|
-
},
|
|
7797
|
-
setAttribute: function setAttribute(element, name, value, namespace) {
|
|
7798
|
-
return isUndefined$1(namespace) ? element.setAttribute(name, value) : element.setAttributeNS(namespace, name, value);
|
|
7799
|
-
},
|
|
7800
|
-
removeAttribute: function removeAttribute(element, name, namespace) {
|
|
7801
|
-
if (isUndefined$1(namespace)) {
|
|
7802
|
-
element.removeAttribute(name);
|
|
7803
|
-
} else {
|
|
7804
|
-
element.removeAttributeNS(namespace, name);
|
|
7805
|
-
}
|
|
7806
|
-
},
|
|
7807
|
-
addEventListener: function addEventListener(target, type, callback, options) {
|
|
7808
|
-
target.addEventListener(type, callback, options);
|
|
7809
|
-
},
|
|
7810
|
-
removeEventListener: function removeEventListener(target, type, callback, options) {
|
|
7811
|
-
target.removeEventListener(type, callback, options);
|
|
7812
|
-
},
|
|
7813
|
-
dispatchEvent: function dispatchEvent(target, event) {
|
|
7814
|
-
return target.dispatchEvent(event);
|
|
7815
|
-
},
|
|
7816
|
-
getClassList: function getClassList(element) {
|
|
7817
|
-
return element.classList;
|
|
7818
|
-
},
|
|
7819
|
-
setCSSStyleProperty: function setCSSStyleProperty(element, name, value, important) {
|
|
7820
|
-
// TODO [#0]: How to avoid this type casting? Shall we use a different type interface to
|
|
7821
|
-
// represent elements in the engine?
|
|
7822
|
-
element.style.setProperty(name, value, important ? 'important' : '');
|
|
7823
|
-
},
|
|
7824
|
-
getBoundingClientRect: function getBoundingClientRect(element) {
|
|
7825
|
-
return element.getBoundingClientRect();
|
|
7826
|
-
},
|
|
7827
|
-
querySelector: function querySelector(element, selectors) {
|
|
7828
|
-
return element.querySelector(selectors);
|
|
7829
|
-
},
|
|
7830
|
-
querySelectorAll: function querySelectorAll(element, selectors) {
|
|
7831
|
-
return element.querySelectorAll(selectors);
|
|
7832
|
-
},
|
|
7833
|
-
getElementsByTagName: function getElementsByTagName(element, tagNameOrWildCard) {
|
|
7834
|
-
return element.getElementsByTagName(tagNameOrWildCard);
|
|
7835
|
-
},
|
|
7836
|
-
getElementsByClassName: function getElementsByClassName(element, names) {
|
|
7837
|
-
return element.getElementsByClassName(names);
|
|
7838
|
-
},
|
|
7839
|
-
getChildren: function getChildren(element) {
|
|
7840
|
-
return element.children;
|
|
7841
|
-
},
|
|
7842
|
-
getChildNodes: function getChildNodes(element) {
|
|
7843
|
-
return element.childNodes;
|
|
7844
|
-
},
|
|
7845
|
-
getFirstChild: function getFirstChild(element) {
|
|
7846
|
-
return element.firstChild;
|
|
7847
|
-
},
|
|
7848
|
-
getFirstElementChild: function getFirstElementChild(element) {
|
|
7849
|
-
return element.firstElementChild;
|
|
7850
|
-
},
|
|
7851
|
-
getLastChild: function getLastChild(element) {
|
|
7852
|
-
return element.lastChild;
|
|
7853
|
-
},
|
|
7854
|
-
getLastElementChild: function getLastElementChild(element) {
|
|
7855
|
-
return element.lastElementChild;
|
|
7856
|
-
},
|
|
7857
|
-
isConnected: function isConnected(node) {
|
|
7858
|
-
return node.isConnected;
|
|
7859
|
-
},
|
|
7860
|
-
insertGlobalStylesheet: function insertGlobalStylesheet(content) {
|
|
7861
|
-
if (!isUndefined$1(globalStylesheets[content])) {
|
|
7862
|
-
return;
|
|
7863
|
-
}
|
|
7976
|
+
var isNativeShadowDefined = _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED];
|
|
7977
|
+
var isSyntheticShadowDefined = hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN);
|
|
7864
7978
|
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
|
|
7873
|
-
|
|
7874
|
-
|
|
7875
|
-
|
|
7876
|
-
|
|
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), "\"."));
|
|
7877
8024
|
}
|
|
7878
|
-
}
|
|
7879
|
-
|
|
7880
|
-
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
|
|
7885
|
-
}
|
|
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);
|
|
7886
8189
|
/*
|
|
7887
8190
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
7888
8191
|
* All rights reserved.
|
|
@@ -7964,7 +8267,7 @@
|
|
|
7964
8267
|
throw new TypeError("\"createElement\" function expects an \"is\" option with a valid component constructor.");
|
|
7965
8268
|
}
|
|
7966
8269
|
|
|
7967
|
-
var UpgradableConstructor = getUpgradableConstructor(sel
|
|
8270
|
+
var UpgradableConstructor = getUpgradableConstructor(sel);
|
|
7968
8271
|
var wasComponentUpgraded = false; // the custom element from the registry is expecting an upgrade callback
|
|
7969
8272
|
|
|
7970
8273
|
/**
|
|
@@ -7979,8 +8282,7 @@
|
|
|
7979
8282
|
createVM(elm, def, {
|
|
7980
8283
|
tagName: sel,
|
|
7981
8284
|
mode: options.mode !== 'closed' ? 'open' : 'closed',
|
|
7982
|
-
owner: null
|
|
7983
|
-
renderer: renderer
|
|
8285
|
+
owner: null
|
|
7984
8286
|
});
|
|
7985
8287
|
ConnectingSlot.set(elm, connectRootElement);
|
|
7986
8288
|
DisconnectingSlot.set(elm, disconnectRootElement);
|
|
@@ -8005,6 +8307,10 @@
|
|
|
8005
8307
|
function hydrateComponent(element, Ctor) {
|
|
8006
8308
|
var props = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
8007
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
|
+
|
|
8008
8314
|
if (!isFunction$1(Ctor)) {
|
|
8009
8315
|
throw new TypeError("\"hydrateComponent\" expects a valid component constructor as the second parameter but instead received ".concat(Ctor, "."));
|
|
8010
8316
|
}
|
|
@@ -8022,7 +8328,6 @@
|
|
|
8022
8328
|
createVM(element, def, {
|
|
8023
8329
|
mode: 'open',
|
|
8024
8330
|
owner: null,
|
|
8025
|
-
renderer: renderer,
|
|
8026
8331
|
tagName: element.tagName.toLowerCase()
|
|
8027
8332
|
});
|
|
8028
8333
|
|
|
@@ -8109,8 +8414,7 @@
|
|
|
8109
8414
|
createVM(_assertThisInitialized(_this6), def, {
|
|
8110
8415
|
mode: 'open',
|
|
8111
8416
|
owner: null,
|
|
8112
|
-
tagName: _this6.tagName
|
|
8113
|
-
renderer: renderer
|
|
8417
|
+
tagName: _this6.tagName
|
|
8114
8418
|
});
|
|
8115
8419
|
return _this6;
|
|
8116
8420
|
}
|
|
@@ -8183,7 +8487,7 @@
|
|
|
8183
8487
|
return false;
|
|
8184
8488
|
}
|
|
8185
8489
|
|
|
8186
|
-
if (
|
|
8490
|
+
if (isSyntheticShadowDefined) {
|
|
8187
8491
|
// TODO [#1252]: old behavior that is still used by some pieces of the platform,
|
|
8188
8492
|
// specifically, nodes inserted manually on places where `lwc:dom="manual"` directive is not
|
|
8189
8493
|
// used, will be considered global elements.
|
|
@@ -8235,7 +8539,7 @@
|
|
|
8235
8539
|
});
|
|
8236
8540
|
freeze(LightningElement);
|
|
8237
8541
|
seal(LightningElement.prototype);
|
|
8238
|
-
/* version: 2.
|
|
8542
|
+
/* version: 2.6.3 */
|
|
8239
8543
|
|
|
8240
8544
|
exports.LightningElement = LightningElement;
|
|
8241
8545
|
exports.__unstable__ProfilerControl = profilerControl;
|