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
|
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
|
|
57
57
|
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; }
|
|
58
58
|
|
|
59
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
59
|
+
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); }
|
|
60
60
|
|
|
61
61
|
/* proxy-compat-disable */
|
|
62
62
|
|
|
@@ -344,7 +344,7 @@
|
|
|
344
344
|
CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
|
|
345
345
|
return attributeName;
|
|
346
346
|
}
|
|
347
|
-
/** version: 2.
|
|
347
|
+
/** version: 2.6.3 */
|
|
348
348
|
|
|
349
349
|
/*
|
|
350
350
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -456,8 +456,6 @@
|
|
|
456
456
|
ENABLE_NODE_LIST_PATCH: null,
|
|
457
457
|
ENABLE_HTML_COLLECTIONS_PATCH: null,
|
|
458
458
|
ENABLE_NODE_PATCH: null,
|
|
459
|
-
ENABLE_NON_COMPOSED_EVENTS_LEAKAGE: null,
|
|
460
|
-
ENABLE_MIXED_SHADOW_MODE: null,
|
|
461
459
|
ENABLE_WIRE_SYNC_EMIT: null
|
|
462
460
|
};
|
|
463
461
|
|
|
@@ -516,7 +514,7 @@
|
|
|
516
514
|
|
|
517
515
|
function setFeatureFlagForTest(name, value) {
|
|
518
516
|
}
|
|
519
|
-
/** version: 2.
|
|
517
|
+
/** version: 2.6.3 */
|
|
520
518
|
|
|
521
519
|
/* proxy-compat-disable */
|
|
522
520
|
|
|
@@ -559,6 +557,243 @@
|
|
|
559
557
|
|
|
560
558
|
return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
|
|
561
559
|
} // Borrowed from Vue template compiler.
|
|
560
|
+
// Primitives
|
|
561
|
+
//
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
var ssr$1;
|
|
565
|
+
|
|
566
|
+
function setSsr(ssrImpl) {
|
|
567
|
+
ssr$1 = ssrImpl;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
var isNativeShadowDefined$1;
|
|
571
|
+
|
|
572
|
+
function setIsNativeShadowDefined(isNativeShadowDefinedImpl) {
|
|
573
|
+
isNativeShadowDefined$1 = isNativeShadowDefinedImpl;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
var isSyntheticShadowDefined$1;
|
|
577
|
+
|
|
578
|
+
function setIsSyntheticShadowDefined(isSyntheticShadowDefinedImpl) {
|
|
579
|
+
isSyntheticShadowDefined$1 = isSyntheticShadowDefinedImpl;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
var HTMLElementExported$1;
|
|
583
|
+
|
|
584
|
+
function setHTMLElement(HTMLElementImpl) {
|
|
585
|
+
HTMLElementExported$1 = HTMLElementImpl;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
var isHydrating$1;
|
|
589
|
+
|
|
590
|
+
function setIsHydrating$1(isHydratingImpl) {
|
|
591
|
+
isHydrating$1 = isHydratingImpl;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
var insert$1;
|
|
595
|
+
|
|
596
|
+
function setInsert(insertImpl) {
|
|
597
|
+
insert$1 = insertImpl;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
var remove$1;
|
|
601
|
+
|
|
602
|
+
function setRemove(removeImpl) {
|
|
603
|
+
remove$1 = removeImpl;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
var createElement$2;
|
|
607
|
+
|
|
608
|
+
function setCreateElement(createElementImpl) {
|
|
609
|
+
createElement$2 = createElementImpl;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
var createText$1;
|
|
613
|
+
|
|
614
|
+
function setCreateText(createTextImpl) {
|
|
615
|
+
createText$1 = createTextImpl;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
var createComment$1;
|
|
619
|
+
|
|
620
|
+
function setCreateComment(createCommentImpl) {
|
|
621
|
+
createComment$1 = createCommentImpl;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
var nextSibling$1;
|
|
625
|
+
|
|
626
|
+
function setNextSibling(nextSiblingImpl) {
|
|
627
|
+
nextSibling$1 = nextSiblingImpl;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
var attachShadow$1;
|
|
631
|
+
|
|
632
|
+
function setAttachShadow(attachShadowImpl) {
|
|
633
|
+
attachShadow$1 = attachShadowImpl;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
var getProperty$1;
|
|
637
|
+
|
|
638
|
+
function setGetProperty(getPropertyImpl) {
|
|
639
|
+
getProperty$1 = getPropertyImpl;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
var setProperty$1;
|
|
643
|
+
|
|
644
|
+
function setSetProperty(setPropertyImpl) {
|
|
645
|
+
setProperty$1 = setPropertyImpl;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
var setText$1;
|
|
649
|
+
|
|
650
|
+
function setSetText(setTextImpl) {
|
|
651
|
+
setText$1 = setTextImpl;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
var getAttribute$1;
|
|
655
|
+
|
|
656
|
+
function setGetAttribute(getAttributeImpl) {
|
|
657
|
+
getAttribute$1 = getAttributeImpl;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
var setAttribute$1;
|
|
661
|
+
|
|
662
|
+
function setSetAttribute(setAttributeImpl) {
|
|
663
|
+
setAttribute$1 = setAttributeImpl;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
var removeAttribute$1;
|
|
667
|
+
|
|
668
|
+
function setRemoveAttribute(removeAttributeImpl) {
|
|
669
|
+
removeAttribute$1 = removeAttributeImpl;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
var addEventListener$1;
|
|
673
|
+
|
|
674
|
+
function setAddEventListener(addEventListenerImpl) {
|
|
675
|
+
addEventListener$1 = addEventListenerImpl;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
var removeEventListener$1;
|
|
679
|
+
|
|
680
|
+
function setRemoveEventListener(removeEventListenerImpl) {
|
|
681
|
+
removeEventListener$1 = removeEventListenerImpl;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
var dispatchEvent$1;
|
|
685
|
+
|
|
686
|
+
function setDispatchEvent(dispatchEventImpl) {
|
|
687
|
+
dispatchEvent$1 = dispatchEventImpl;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
var getClassList$1;
|
|
691
|
+
|
|
692
|
+
function setGetClassList(getClassListImpl) {
|
|
693
|
+
getClassList$1 = getClassListImpl;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
var setCSSStyleProperty$1;
|
|
697
|
+
|
|
698
|
+
function setSetCSSStyleProperty(setCSSStylePropertyImpl) {
|
|
699
|
+
setCSSStyleProperty$1 = setCSSStylePropertyImpl;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
var getBoundingClientRect$1;
|
|
703
|
+
|
|
704
|
+
function setGetBoundingClientRect(getBoundingClientRectImpl) {
|
|
705
|
+
getBoundingClientRect$1 = getBoundingClientRectImpl;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
var querySelector$1;
|
|
709
|
+
|
|
710
|
+
function setQuerySelector(querySelectorImpl) {
|
|
711
|
+
querySelector$1 = querySelectorImpl;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
var querySelectorAll$1;
|
|
715
|
+
|
|
716
|
+
function setQuerySelectorAll(querySelectorAllImpl) {
|
|
717
|
+
querySelectorAll$1 = querySelectorAllImpl;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
var getElementsByTagName$1;
|
|
721
|
+
|
|
722
|
+
function setGetElementsByTagName(getElementsByTagNameImpl) {
|
|
723
|
+
getElementsByTagName$1 = getElementsByTagNameImpl;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
var getElementsByClassName$1;
|
|
727
|
+
|
|
728
|
+
function setGetElementsByClassName(getElementsByClassNameImpl) {
|
|
729
|
+
getElementsByClassName$1 = getElementsByClassNameImpl;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
var getChildren$1;
|
|
733
|
+
|
|
734
|
+
function setGetChildren(getChildrenImpl) {
|
|
735
|
+
getChildren$1 = getChildrenImpl;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
var getChildNodes$1;
|
|
739
|
+
|
|
740
|
+
function setGetChildNodes(getChildNodesImpl) {
|
|
741
|
+
getChildNodes$1 = getChildNodesImpl;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
var getFirstChild$1;
|
|
745
|
+
|
|
746
|
+
function setGetFirstChild(getFirstChildImpl) {
|
|
747
|
+
getFirstChild$1 = getFirstChildImpl;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
var getFirstElementChild$1;
|
|
751
|
+
|
|
752
|
+
function setGetFirstElementChild(getFirstElementChildImpl) {
|
|
753
|
+
getFirstElementChild$1 = getFirstElementChildImpl;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
var getLastChild$1;
|
|
757
|
+
|
|
758
|
+
function setGetLastChild(getLastChildImpl) {
|
|
759
|
+
getLastChild$1 = getLastChildImpl;
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
var getLastElementChild$1;
|
|
763
|
+
|
|
764
|
+
function setGetLastElementChild(getLastElementChildImpl) {
|
|
765
|
+
getLastElementChild$1 = getLastElementChildImpl;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
var isConnected$1;
|
|
769
|
+
|
|
770
|
+
function setIsConnected(isConnectedImpl) {
|
|
771
|
+
isConnected$1 = isConnectedImpl;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
var insertGlobalStylesheet$1;
|
|
775
|
+
|
|
776
|
+
function setInsertGlobalStylesheet(insertGlobalStylesheetImpl) {
|
|
777
|
+
insertGlobalStylesheet$1 = insertGlobalStylesheetImpl;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
var insertStylesheet$1;
|
|
781
|
+
|
|
782
|
+
function setInsertStylesheet(insertStylesheetImpl) {
|
|
783
|
+
insertStylesheet$1 = insertStylesheetImpl;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
var defineCustomElement$1;
|
|
787
|
+
|
|
788
|
+
function setDefineCustomElement(defineCustomElementImpl) {
|
|
789
|
+
defineCustomElement$1 = defineCustomElementImpl;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
var getCustomElement$1;
|
|
793
|
+
|
|
794
|
+
function setGetCustomElement(getCustomElementImpl) {
|
|
795
|
+
getCustomElement$1 = getCustomElementImpl;
|
|
796
|
+
}
|
|
562
797
|
/*
|
|
563
798
|
* Copyright (c) 2019, salesforce.com, inc.
|
|
564
799
|
* All rights reserved.
|
|
@@ -799,8 +1034,7 @@
|
|
|
799
1034
|
|
|
800
1035
|
function createAllEventListeners(vnode) {
|
|
801
1036
|
var elm = vnode.elm,
|
|
802
|
-
on = vnode.data.on
|
|
803
|
-
renderer = vnode.owner.renderer;
|
|
1037
|
+
on = vnode.data.on;
|
|
804
1038
|
|
|
805
1039
|
if (isUndefined$1(on)) {
|
|
806
1040
|
return;
|
|
@@ -811,7 +1045,7 @@
|
|
|
811
1045
|
var name;
|
|
812
1046
|
|
|
813
1047
|
for (name in on) {
|
|
814
|
-
|
|
1048
|
+
addEventListener$1(elm, name, listener);
|
|
815
1049
|
}
|
|
816
1050
|
}
|
|
817
1051
|
|
|
@@ -950,8 +1184,7 @@
|
|
|
950
1184
|
var ColonCharCode = 58;
|
|
951
1185
|
|
|
952
1186
|
function updateAttrs(oldVnode, vnode) {
|
|
953
|
-
var attrs = vnode.data.attrs
|
|
954
|
-
renderer = vnode.owner.renderer;
|
|
1187
|
+
var attrs = vnode.data.attrs;
|
|
955
1188
|
|
|
956
1189
|
if (isUndefined$1(attrs)) {
|
|
957
1190
|
return;
|
|
@@ -964,8 +1197,6 @@
|
|
|
964
1197
|
}
|
|
965
1198
|
|
|
966
1199
|
var elm = vnode.elm;
|
|
967
|
-
var setAttribute = renderer.setAttribute,
|
|
968
|
-
removeAttribute = renderer.removeAttribute;
|
|
969
1200
|
var key;
|
|
970
1201
|
oldAttrs = isUndefined$1(oldAttrs) ? EmptyObject : oldAttrs; // update modified attributes, add new attributes
|
|
971
1202
|
// this routine is only useful for data-* attributes in all kind of elements
|
|
@@ -980,14 +1211,14 @@
|
|
|
980
1211
|
|
|
981
1212
|
if (StringCharCodeAt.call(key, 3) === ColonCharCode) {
|
|
982
1213
|
// Assume xml namespace
|
|
983
|
-
setAttribute(elm, key, cur, xmlNS);
|
|
1214
|
+
setAttribute$1(elm, key, cur, xmlNS);
|
|
984
1215
|
} else if (StringCharCodeAt.call(key, 5) === ColonCharCode) {
|
|
985
1216
|
// Assume xlink namespace
|
|
986
|
-
setAttribute(elm, key, cur, xlinkNS);
|
|
987
|
-
} else if (isNull(cur)) {
|
|
988
|
-
removeAttribute(elm, key);
|
|
1217
|
+
setAttribute$1(elm, key, cur, xlinkNS);
|
|
1218
|
+
} else if (isNull(cur) || isUndefined$1(cur)) {
|
|
1219
|
+
removeAttribute$1(elm, key);
|
|
989
1220
|
} else {
|
|
990
|
-
setAttribute(elm, key, cur);
|
|
1221
|
+
setAttribute$1(elm, key, cur);
|
|
991
1222
|
}
|
|
992
1223
|
|
|
993
1224
|
lockAttribute();
|
|
@@ -1032,14 +1263,13 @@
|
|
|
1032
1263
|
|
|
1033
1264
|
var isFirstPatch = isUndefined$1(oldProps);
|
|
1034
1265
|
var elm = vnode.elm,
|
|
1035
|
-
sel = vnode.sel
|
|
1036
|
-
renderer = vnode.owner.renderer;
|
|
1266
|
+
sel = vnode.sel;
|
|
1037
1267
|
|
|
1038
1268
|
for (var key in props) {
|
|
1039
1269
|
var cur = props[key]; // if it is the first time this element is patched, or the current value is different to the previous value...
|
|
1040
1270
|
|
|
1041
|
-
if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ?
|
|
1042
|
-
|
|
1271
|
+
if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ? getProperty$1(elm, key) : oldProps[key])) {
|
|
1272
|
+
setProperty$1(elm, key, cur);
|
|
1043
1273
|
}
|
|
1044
1274
|
}
|
|
1045
1275
|
}
|
|
@@ -1102,15 +1332,14 @@
|
|
|
1102
1332
|
|
|
1103
1333
|
function updateClassAttribute(oldVnode, vnode) {
|
|
1104
1334
|
var elm = vnode.elm,
|
|
1105
|
-
newClass = vnode.data.className
|
|
1106
|
-
renderer = vnode.owner.renderer;
|
|
1335
|
+
newClass = vnode.data.className;
|
|
1107
1336
|
var oldClass = oldVnode.data.className;
|
|
1108
1337
|
|
|
1109
1338
|
if (oldClass === newClass) {
|
|
1110
1339
|
return;
|
|
1111
1340
|
}
|
|
1112
1341
|
|
|
1113
|
-
var classList =
|
|
1342
|
+
var classList = getClassList$1(elm);
|
|
1114
1343
|
var newClassMap = getMapFromClassName(newClass);
|
|
1115
1344
|
var oldClassMap = getMapFromClassName(oldClass);
|
|
1116
1345
|
var name;
|
|
@@ -1147,19 +1376,16 @@
|
|
|
1147
1376
|
|
|
1148
1377
|
function updateStyleAttribute(oldVnode, vnode) {
|
|
1149
1378
|
var elm = vnode.elm,
|
|
1150
|
-
newStyle = vnode.data.style
|
|
1151
|
-
renderer = vnode.owner.renderer;
|
|
1152
|
-
var setAttribute = renderer.setAttribute,
|
|
1153
|
-
removeAttribute = renderer.removeAttribute;
|
|
1379
|
+
newStyle = vnode.data.style;
|
|
1154
1380
|
|
|
1155
1381
|
if (oldVnode.data.style === newStyle) {
|
|
1156
1382
|
return;
|
|
1157
1383
|
}
|
|
1158
1384
|
|
|
1159
1385
|
if (!isString(newStyle) || newStyle === '') {
|
|
1160
|
-
removeAttribute(elm, 'style');
|
|
1386
|
+
removeAttribute$1(elm, 'style');
|
|
1161
1387
|
} else {
|
|
1162
|
-
setAttribute(elm, 'style', newStyle);
|
|
1388
|
+
setAttribute$1(elm, 'style', newStyle);
|
|
1163
1389
|
}
|
|
1164
1390
|
}
|
|
1165
1391
|
|
|
@@ -1183,14 +1409,13 @@
|
|
|
1183
1409
|
|
|
1184
1410
|
function createClassAttribute(vnode) {
|
|
1185
1411
|
var elm = vnode.elm,
|
|
1186
|
-
classMap = vnode.data.classMap
|
|
1187
|
-
renderer = vnode.owner.renderer;
|
|
1412
|
+
classMap = vnode.data.classMap;
|
|
1188
1413
|
|
|
1189
1414
|
if (isUndefined$1(classMap)) {
|
|
1190
1415
|
return;
|
|
1191
1416
|
}
|
|
1192
1417
|
|
|
1193
|
-
var classList =
|
|
1418
|
+
var classList = getClassList$1(elm);
|
|
1194
1419
|
|
|
1195
1420
|
for (var name in classMap) {
|
|
1196
1421
|
classList.add(name);
|
|
@@ -1211,8 +1436,7 @@
|
|
|
1211
1436
|
|
|
1212
1437
|
function createStyleAttribute(vnode) {
|
|
1213
1438
|
var elm = vnode.elm,
|
|
1214
|
-
styleDecls = vnode.data.styleDecls
|
|
1215
|
-
renderer = vnode.owner.renderer;
|
|
1439
|
+
styleDecls = vnode.data.styleDecls;
|
|
1216
1440
|
|
|
1217
1441
|
if (isUndefined$1(styleDecls)) {
|
|
1218
1442
|
return;
|
|
@@ -1224,7 +1448,7 @@
|
|
|
1224
1448
|
value = _styleDecls$_i[1],
|
|
1225
1449
|
important = _styleDecls$_i[2];
|
|
1226
1450
|
|
|
1227
|
-
|
|
1451
|
+
setCSSStyleProperty$1(elm, prop, value, important);
|
|
1228
1452
|
}
|
|
1229
1453
|
}
|
|
1230
1454
|
|
|
@@ -1238,15 +1462,6 @@
|
|
|
1238
1462
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
1239
1463
|
*/
|
|
1240
1464
|
|
|
1241
|
-
/**
|
|
1242
|
-
@license
|
|
1243
|
-
Copyright (c) 2015 Simon Friis Vindum.
|
|
1244
|
-
This code may only be used under the MIT License found at
|
|
1245
|
-
https://github.com/snabbdom/snabbdom/blob/master/LICENSE
|
|
1246
|
-
Code distributed by Snabbdom as part of the Snabbdom project at
|
|
1247
|
-
https://github.com/snabbdom/snabbdom/
|
|
1248
|
-
*/
|
|
1249
|
-
|
|
1250
1465
|
function isUndef(s) {
|
|
1251
1466
|
return s === undefined;
|
|
1252
1467
|
}
|
|
@@ -1334,7 +1549,7 @@
|
|
|
1334
1549
|
} else if (sameVnode(oldStartVnode, newEndVnode)) {
|
|
1335
1550
|
// Vnode moved right
|
|
1336
1551
|
patchVnode(oldStartVnode, newEndVnode);
|
|
1337
|
-
newEndVnode.hook.move(oldStartVnode, parentElm,
|
|
1552
|
+
newEndVnode.hook.move(oldStartVnode, parentElm, nextSibling$1(oldEndVnode.elm));
|
|
1338
1553
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
1339
1554
|
newEndVnode = newCh[--newEndIdx];
|
|
1340
1555
|
} else if (sameVnode(oldEndVnode, newStartVnode)) {
|
|
@@ -1447,7 +1662,7 @@
|
|
|
1447
1662
|
}
|
|
1448
1663
|
}
|
|
1449
1664
|
/*
|
|
1450
|
-
* Copyright (c)
|
|
1665
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
1451
1666
|
* All rights reserved.
|
|
1452
1667
|
* SPDX-License-Identifier: MIT
|
|
1453
1668
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
@@ -1497,7 +1712,8 @@
|
|
|
1497
1712
|
*/
|
|
1498
1713
|
|
|
1499
1714
|
var isArray = Array.isArray;
|
|
1500
|
-
var
|
|
1715
|
+
var ObjectDotPrototype = Object.prototype,
|
|
1716
|
+
_getPrototypeOf = Object.getPrototypeOf,
|
|
1501
1717
|
ObjectCreate = Object.create,
|
|
1502
1718
|
ObjectDefineProperty = Object.defineProperty,
|
|
1503
1719
|
_isExtensible = Object.isExtensible,
|
|
@@ -2011,8 +2227,6 @@
|
|
|
2011
2227
|
return ReadOnlyHandler;
|
|
2012
2228
|
}(BaseProxyHandler);
|
|
2013
2229
|
|
|
2014
|
-
var ObjectDotPrototype = Object.prototype;
|
|
2015
|
-
|
|
2016
2230
|
function defaultValueIsObservable(value) {
|
|
2017
2231
|
// intentionally checking for null
|
|
2018
2232
|
if (value === null) {
|
|
@@ -2041,68 +2255,54 @@
|
|
|
2041
2255
|
/* do nothing */
|
|
2042
2256
|
};
|
|
2043
2257
|
|
|
2044
|
-
var defaultValueDistortion = function defaultValueDistortion(value) {
|
|
2045
|
-
return value;
|
|
2046
|
-
};
|
|
2047
|
-
|
|
2048
2258
|
function createShadowTarget(value) {
|
|
2049
2259
|
return isArray(value) ? [] : {};
|
|
2050
2260
|
}
|
|
2051
2261
|
|
|
2052
|
-
var
|
|
2053
|
-
function
|
|
2054
|
-
|
|
2262
|
+
var ObservableMembrane = /*#__PURE__*/function () {
|
|
2263
|
+
function ObservableMembrane() {
|
|
2264
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2265
|
+
|
|
2266
|
+
_classCallCheck(this, ObservableMembrane);
|
|
2055
2267
|
|
|
2056
|
-
this.valueDistortion = defaultValueDistortion;
|
|
2057
|
-
this.valueMutated = defaultValueMutated;
|
|
2058
|
-
this.valueObserved = defaultValueObserved;
|
|
2059
|
-
this.valueIsObservable = defaultValueIsObservable;
|
|
2060
2268
|
this.readOnlyObjectGraph = new WeakMap();
|
|
2061
2269
|
this.reactiveObjectGraph = new WeakMap();
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
this.valueMutated = isFunction(_valueMutated) ? _valueMutated : defaultValueMutated;
|
|
2071
|
-
this.valueObserved = isFunction(_valueObserved) ? _valueObserved : defaultValueObserved;
|
|
2072
|
-
this.valueIsObservable = isFunction(valueIsObservable) ? valueIsObservable : defaultValueIsObservable;
|
|
2073
|
-
this.tagPropertyKey = tagPropertyKey;
|
|
2074
|
-
}
|
|
2270
|
+
var valueMutated = options.valueMutated,
|
|
2271
|
+
valueObserved = options.valueObserved,
|
|
2272
|
+
valueIsObservable = options.valueIsObservable,
|
|
2273
|
+
tagPropertyKey = options.tagPropertyKey;
|
|
2274
|
+
this.valueMutated = isFunction(valueMutated) ? valueMutated : defaultValueMutated;
|
|
2275
|
+
this.valueObserved = isFunction(valueObserved) ? valueObserved : defaultValueObserved;
|
|
2276
|
+
this.valueIsObservable = isFunction(valueIsObservable) ? valueIsObservable : defaultValueIsObservable;
|
|
2277
|
+
this.tagPropertyKey = tagPropertyKey;
|
|
2075
2278
|
}
|
|
2076
2279
|
|
|
2077
|
-
_createClass(
|
|
2280
|
+
_createClass(ObservableMembrane, [{
|
|
2078
2281
|
key: "getProxy",
|
|
2079
2282
|
value: function getProxy(value) {
|
|
2080
2283
|
var unwrappedValue = unwrap$1(value);
|
|
2081
|
-
var distorted = this.valueDistortion(unwrappedValue);
|
|
2082
2284
|
|
|
2083
|
-
if (this.valueIsObservable(
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
// we return the readonly.
|
|
2285
|
+
if (this.valueIsObservable(unwrappedValue)) {
|
|
2286
|
+
// When trying to extract the writable version of a readonly we return the readonly.
|
|
2287
|
+
if (this.readOnlyObjectGraph.get(unwrappedValue) === value) {
|
|
2087
2288
|
return value;
|
|
2088
2289
|
}
|
|
2089
2290
|
|
|
2090
|
-
return this.getReactiveHandler(unwrappedValue
|
|
2291
|
+
return this.getReactiveHandler(unwrappedValue);
|
|
2091
2292
|
}
|
|
2092
2293
|
|
|
2093
|
-
return
|
|
2294
|
+
return unwrappedValue;
|
|
2094
2295
|
}
|
|
2095
2296
|
}, {
|
|
2096
2297
|
key: "getReadOnlyProxy",
|
|
2097
2298
|
value: function getReadOnlyProxy(value) {
|
|
2098
2299
|
value = unwrap$1(value);
|
|
2099
|
-
var distorted = this.valueDistortion(value);
|
|
2100
2300
|
|
|
2101
|
-
if (this.valueIsObservable(
|
|
2102
|
-
return this.getReadOnlyHandler(value
|
|
2301
|
+
if (this.valueIsObservable(value)) {
|
|
2302
|
+
return this.getReadOnlyHandler(value);
|
|
2103
2303
|
}
|
|
2104
2304
|
|
|
2105
|
-
return
|
|
2305
|
+
return value;
|
|
2106
2306
|
}
|
|
2107
2307
|
}, {
|
|
2108
2308
|
key: "unwrapProxy",
|
|
@@ -2111,39 +2311,39 @@
|
|
|
2111
2311
|
}
|
|
2112
2312
|
}, {
|
|
2113
2313
|
key: "getReactiveHandler",
|
|
2114
|
-
value: function getReactiveHandler(value
|
|
2115
|
-
var proxy = this.reactiveObjectGraph.get(
|
|
2314
|
+
value: function getReactiveHandler(value) {
|
|
2315
|
+
var proxy = this.reactiveObjectGraph.get(value);
|
|
2116
2316
|
|
|
2117
2317
|
if (isUndefined(proxy)) {
|
|
2118
2318
|
// caching the proxy after the first time it is accessed
|
|
2119
|
-
var handler = new ReactiveProxyHandler(this,
|
|
2120
|
-
proxy = new Proxy(createShadowTarget(
|
|
2319
|
+
var handler = new ReactiveProxyHandler(this, value);
|
|
2320
|
+
proxy = new Proxy(createShadowTarget(value), handler);
|
|
2121
2321
|
registerProxy(proxy, value);
|
|
2122
|
-
this.reactiveObjectGraph.set(
|
|
2322
|
+
this.reactiveObjectGraph.set(value, proxy);
|
|
2123
2323
|
}
|
|
2124
2324
|
|
|
2125
2325
|
return proxy;
|
|
2126
2326
|
}
|
|
2127
2327
|
}, {
|
|
2128
2328
|
key: "getReadOnlyHandler",
|
|
2129
|
-
value: function getReadOnlyHandler(value
|
|
2130
|
-
var proxy = this.readOnlyObjectGraph.get(
|
|
2329
|
+
value: function getReadOnlyHandler(value) {
|
|
2330
|
+
var proxy = this.readOnlyObjectGraph.get(value);
|
|
2131
2331
|
|
|
2132
2332
|
if (isUndefined(proxy)) {
|
|
2133
2333
|
// caching the proxy after the first time it is accessed
|
|
2134
|
-
var handler = new ReadOnlyHandler(this,
|
|
2135
|
-
proxy = new Proxy(createShadowTarget(
|
|
2334
|
+
var handler = new ReadOnlyHandler(this, value);
|
|
2335
|
+
proxy = new Proxy(createShadowTarget(value), handler);
|
|
2136
2336
|
registerProxy(proxy, value);
|
|
2137
|
-
this.readOnlyObjectGraph.set(
|
|
2337
|
+
this.readOnlyObjectGraph.set(value, proxy);
|
|
2138
2338
|
}
|
|
2139
2339
|
|
|
2140
2340
|
return proxy;
|
|
2141
2341
|
}
|
|
2142
2342
|
}]);
|
|
2143
2343
|
|
|
2144
|
-
return
|
|
2344
|
+
return ObservableMembrane;
|
|
2145
2345
|
}();
|
|
2146
|
-
/** version:
|
|
2346
|
+
/** version: 2.0.0 */
|
|
2147
2347
|
|
|
2148
2348
|
/*
|
|
2149
2349
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -2154,15 +2354,9 @@
|
|
|
2154
2354
|
|
|
2155
2355
|
|
|
2156
2356
|
var lockerLivePropertyKey = Symbol.for('@@lockerLiveValue');
|
|
2157
|
-
|
|
2158
|
-
function valueDistortion(value) {
|
|
2159
|
-
return value;
|
|
2160
|
-
}
|
|
2161
|
-
|
|
2162
|
-
var reactiveMembrane = new ReactiveMembrane({
|
|
2357
|
+
var reactiveMembrane = new ObservableMembrane({
|
|
2163
2358
|
valueObserved: valueObserved,
|
|
2164
2359
|
valueMutated: valueMutated,
|
|
2165
|
-
valueDistortion: valueDistortion,
|
|
2166
2360
|
tagPropertyKey: lockerLivePropertyKey
|
|
2167
2361
|
});
|
|
2168
2362
|
/**
|
|
@@ -2171,16 +2365,9 @@
|
|
|
2171
2365
|
* change or being removed.
|
|
2172
2366
|
*/
|
|
2173
2367
|
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
if (unwrapped !== value) {
|
|
2178
|
-
// if value is a proxy, unwrap to access original value and apply distortion
|
|
2179
|
-
return valueDistortion(unwrapped);
|
|
2180
|
-
}
|
|
2181
|
-
|
|
2182
|
-
return value;
|
|
2183
|
-
};
|
|
2368
|
+
function unwrap(value) {
|
|
2369
|
+
return reactiveMembrane.unwrapProxy(value);
|
|
2370
|
+
}
|
|
2184
2371
|
/*
|
|
2185
2372
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
2186
2373
|
* All rights reserved.
|
|
@@ -2246,8 +2433,7 @@
|
|
|
2246
2433
|
|
|
2247
2434
|
|
|
2248
2435
|
var LightningElement = function LightningElement() {
|
|
2249
|
-
|
|
2250
|
-
|
|
2436
|
+
// This should be as performant as possible, while any initialization should be done lazily
|
|
2251
2437
|
if (isNull(vmBeingConstructed)) {
|
|
2252
2438
|
throw new ReferenceError('Illegal constructor');
|
|
2253
2439
|
}
|
|
@@ -2255,7 +2441,6 @@
|
|
|
2255
2441
|
var vm = vmBeingConstructed;
|
|
2256
2442
|
var def = vm.def,
|
|
2257
2443
|
elm = vm.elm;
|
|
2258
|
-
vm.renderer;
|
|
2259
2444
|
var bridge = def.bridge;
|
|
2260
2445
|
|
|
2261
2446
|
var component = this;
|
|
@@ -2284,21 +2469,20 @@
|
|
|
2284
2469
|
if (vm.renderMode === 1
|
|
2285
2470
|
/* Shadow */
|
|
2286
2471
|
) {
|
|
2287
|
-
|
|
2472
|
+
doAttachShadow(vm);
|
|
2288
2473
|
} // Adding extra guard rails in DEV mode.
|
|
2289
2474
|
|
|
2290
2475
|
return this;
|
|
2291
2476
|
};
|
|
2292
2477
|
|
|
2293
|
-
function
|
|
2294
|
-
var
|
|
2478
|
+
function doAttachShadow(vm) {
|
|
2479
|
+
var _attachShadow$;
|
|
2295
2480
|
|
|
2296
2481
|
var elm = vm.elm,
|
|
2297
2482
|
mode = vm.mode,
|
|
2298
|
-
renderer = vm.renderer,
|
|
2299
2483
|
shadowMode = vm.shadowMode,
|
|
2300
2484
|
ctor = vm.def.ctor;
|
|
2301
|
-
var cmpRoot =
|
|
2485
|
+
var cmpRoot = attachShadow$1(elm, (_attachShadow$ = {}, _defineProperty(_attachShadow$, KEY__SYNTHETIC_MODE, shadowMode === 1), _defineProperty(_attachShadow$, "delegatesFocus", Boolean(ctor.delegatesFocus)), _defineProperty(_attachShadow$, "mode", mode), _attachShadow$));
|
|
2302
2486
|
vm.cmpRoot = cmpRoot;
|
|
2303
2487
|
associateVM(cmpRoot, vm);
|
|
2304
2488
|
}
|
|
@@ -2308,112 +2492,98 @@
|
|
|
2308
2492
|
constructor: LightningElement,
|
|
2309
2493
|
dispatchEvent: function dispatchEvent(event) {
|
|
2310
2494
|
var _getAssociatedVM = getAssociatedVM(this),
|
|
2311
|
-
elm = _getAssociatedVM.elm
|
|
2312
|
-
dispatchEvent = _getAssociatedVM.renderer.dispatchEvent;
|
|
2495
|
+
elm = _getAssociatedVM.elm;
|
|
2313
2496
|
|
|
2314
|
-
return dispatchEvent(elm, event);
|
|
2497
|
+
return dispatchEvent$1(elm, event);
|
|
2315
2498
|
},
|
|
2316
2499
|
addEventListener: function addEventListener(type, listener, options) {
|
|
2317
2500
|
var vm = getAssociatedVM(this);
|
|
2318
|
-
var elm = vm.elm
|
|
2319
|
-
addEventListener = vm.renderer.addEventListener;
|
|
2501
|
+
var elm = vm.elm;
|
|
2320
2502
|
|
|
2321
2503
|
var wrappedListener = getWrappedComponentsListener(vm, listener);
|
|
2322
|
-
addEventListener(elm, type, wrappedListener, options);
|
|
2504
|
+
addEventListener$1(elm, type, wrappedListener, options);
|
|
2323
2505
|
},
|
|
2324
2506
|
removeEventListener: function removeEventListener(type, listener, options) {
|
|
2325
2507
|
var vm = getAssociatedVM(this);
|
|
2326
|
-
var elm = vm.elm
|
|
2327
|
-
removeEventListener = vm.renderer.removeEventListener;
|
|
2508
|
+
var elm = vm.elm;
|
|
2328
2509
|
var wrappedListener = getWrappedComponentsListener(vm, listener);
|
|
2329
|
-
removeEventListener(elm, type, wrappedListener, options);
|
|
2510
|
+
removeEventListener$1(elm, type, wrappedListener, options);
|
|
2330
2511
|
},
|
|
2331
2512
|
hasAttribute: function hasAttribute(name) {
|
|
2332
2513
|
var _getAssociatedVM2 = getAssociatedVM(this),
|
|
2333
|
-
elm = _getAssociatedVM2.elm
|
|
2334
|
-
getAttribute = _getAssociatedVM2.renderer.getAttribute;
|
|
2514
|
+
elm = _getAssociatedVM2.elm;
|
|
2335
2515
|
|
|
2336
|
-
return !isNull(getAttribute(elm, name));
|
|
2516
|
+
return !isNull(getAttribute$1(elm, name));
|
|
2337
2517
|
},
|
|
2338
2518
|
hasAttributeNS: function hasAttributeNS(namespace, name) {
|
|
2339
2519
|
var _getAssociatedVM3 = getAssociatedVM(this),
|
|
2340
|
-
elm = _getAssociatedVM3.elm
|
|
2341
|
-
getAttribute = _getAssociatedVM3.renderer.getAttribute;
|
|
2520
|
+
elm = _getAssociatedVM3.elm;
|
|
2342
2521
|
|
|
2343
|
-
return !isNull(getAttribute(elm, name, namespace));
|
|
2522
|
+
return !isNull(getAttribute$1(elm, name, namespace));
|
|
2344
2523
|
},
|
|
2345
2524
|
removeAttribute: function removeAttribute(name) {
|
|
2346
2525
|
var _getAssociatedVM4 = getAssociatedVM(this),
|
|
2347
|
-
elm = _getAssociatedVM4.elm
|
|
2348
|
-
removeAttribute = _getAssociatedVM4.renderer.removeAttribute;
|
|
2526
|
+
elm = _getAssociatedVM4.elm;
|
|
2349
2527
|
|
|
2350
2528
|
unlockAttribute(elm, name);
|
|
2351
|
-
removeAttribute(elm, name);
|
|
2529
|
+
removeAttribute$1(elm, name);
|
|
2352
2530
|
lockAttribute();
|
|
2353
2531
|
},
|
|
2354
2532
|
removeAttributeNS: function removeAttributeNS(namespace, name) {
|
|
2355
2533
|
var _getAssociatedVM5 = getAssociatedVM(this),
|
|
2356
|
-
elm = _getAssociatedVM5.elm
|
|
2357
|
-
removeAttribute = _getAssociatedVM5.renderer.removeAttribute;
|
|
2534
|
+
elm = _getAssociatedVM5.elm;
|
|
2358
2535
|
|
|
2359
2536
|
unlockAttribute(elm, name);
|
|
2360
|
-
removeAttribute(elm, name, namespace);
|
|
2537
|
+
removeAttribute$1(elm, name, namespace);
|
|
2361
2538
|
lockAttribute();
|
|
2362
2539
|
},
|
|
2363
2540
|
getAttribute: function getAttribute(name) {
|
|
2364
2541
|
var _getAssociatedVM6 = getAssociatedVM(this),
|
|
2365
|
-
elm = _getAssociatedVM6.elm
|
|
2366
|
-
getAttribute = _getAssociatedVM6.renderer.getAttribute;
|
|
2542
|
+
elm = _getAssociatedVM6.elm;
|
|
2367
2543
|
|
|
2368
|
-
return getAttribute(elm, name);
|
|
2544
|
+
return getAttribute$1(elm, name);
|
|
2369
2545
|
},
|
|
2370
2546
|
getAttributeNS: function getAttributeNS(namespace, name) {
|
|
2371
2547
|
var _getAssociatedVM7 = getAssociatedVM(this),
|
|
2372
|
-
elm = _getAssociatedVM7.elm
|
|
2373
|
-
getAttribute = _getAssociatedVM7.renderer.getAttribute;
|
|
2548
|
+
elm = _getAssociatedVM7.elm;
|
|
2374
2549
|
|
|
2375
|
-
return getAttribute(elm, name, namespace);
|
|
2550
|
+
return getAttribute$1(elm, name, namespace);
|
|
2376
2551
|
},
|
|
2377
2552
|
setAttribute: function setAttribute(name, value) {
|
|
2378
2553
|
var vm = getAssociatedVM(this);
|
|
2379
|
-
var elm = vm.elm
|
|
2380
|
-
setAttribute = vm.renderer.setAttribute;
|
|
2554
|
+
var elm = vm.elm;
|
|
2381
2555
|
|
|
2382
2556
|
unlockAttribute(elm, name);
|
|
2383
|
-
setAttribute(elm, name, value);
|
|
2557
|
+
setAttribute$1(elm, name, value);
|
|
2384
2558
|
lockAttribute();
|
|
2385
2559
|
},
|
|
2386
2560
|
setAttributeNS: function setAttributeNS(namespace, name, value) {
|
|
2387
2561
|
var vm = getAssociatedVM(this);
|
|
2388
|
-
var elm = vm.elm
|
|
2389
|
-
setAttribute = vm.renderer.setAttribute;
|
|
2562
|
+
var elm = vm.elm;
|
|
2390
2563
|
|
|
2391
2564
|
unlockAttribute(elm, name);
|
|
2392
|
-
setAttribute(elm, name, value, namespace);
|
|
2565
|
+
setAttribute$1(elm, name, value, namespace);
|
|
2393
2566
|
lockAttribute();
|
|
2394
2567
|
},
|
|
2395
2568
|
getBoundingClientRect: function getBoundingClientRect() {
|
|
2396
2569
|
var vm = getAssociatedVM(this);
|
|
2397
|
-
var elm = vm.elm
|
|
2398
|
-
getBoundingClientRect = vm.renderer.getBoundingClientRect;
|
|
2570
|
+
var elm = vm.elm;
|
|
2399
2571
|
|
|
2400
|
-
return getBoundingClientRect(elm);
|
|
2572
|
+
return getBoundingClientRect$1(elm);
|
|
2401
2573
|
},
|
|
2402
2574
|
|
|
2403
2575
|
get isConnected() {
|
|
2404
2576
|
var _getAssociatedVM8 = getAssociatedVM(this),
|
|
2405
|
-
elm = _getAssociatedVM8.elm
|
|
2406
|
-
isConnected = _getAssociatedVM8.renderer.isConnected;
|
|
2577
|
+
elm = _getAssociatedVM8.elm;
|
|
2407
2578
|
|
|
2408
|
-
return isConnected(elm);
|
|
2579
|
+
return isConnected$1(elm);
|
|
2409
2580
|
},
|
|
2410
2581
|
|
|
2411
2582
|
get classList() {
|
|
2412
2583
|
var vm = getAssociatedVM(this);
|
|
2413
|
-
var elm = vm.elm
|
|
2414
|
-
getClassList = vm.renderer.getClassList;
|
|
2584
|
+
var elm = vm.elm;
|
|
2415
2585
|
|
|
2416
|
-
return getClassList(elm);
|
|
2586
|
+
return getClassList$1(elm);
|
|
2417
2587
|
},
|
|
2418
2588
|
|
|
2419
2589
|
get template() {
|
|
@@ -2437,21 +2607,43 @@
|
|
|
2437
2607
|
return "[object ".concat(vm.def.name, "]");
|
|
2438
2608
|
}
|
|
2439
2609
|
};
|
|
2440
|
-
var queryAndChildGetterDescriptors = create(null);
|
|
2441
|
-
|
|
2610
|
+
var queryAndChildGetterDescriptors = create(null); // The reason we don't just call `import * as renderer from '../renderer'` here is that the bundle size
|
|
2611
|
+
// is smaller if we reference each function individually. Otherwise Rollup will create one big frozen
|
|
2612
|
+
// object representing the renderer, with a lot of methods we don't actually need.
|
|
2442
2613
|
|
|
2443
|
-
var
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2614
|
+
var childGetters = ['children', 'childNodes', 'firstChild', 'firstElementChild', 'lastChild', 'lastElementChild'];
|
|
2615
|
+
|
|
2616
|
+
function getChildGetter(methodName) {
|
|
2617
|
+
switch (methodName) {
|
|
2618
|
+
case 'children':
|
|
2619
|
+
return getChildren$1;
|
|
2447
2620
|
|
|
2448
|
-
|
|
2621
|
+
case 'childNodes':
|
|
2622
|
+
return getChildNodes$1;
|
|
2623
|
+
|
|
2624
|
+
case 'firstChild':
|
|
2625
|
+
return getFirstChild$1;
|
|
2626
|
+
|
|
2627
|
+
case 'firstElementChild':
|
|
2628
|
+
return getFirstElementChild$1;
|
|
2629
|
+
|
|
2630
|
+
case 'lastChild':
|
|
2631
|
+
return getLastChild$1;
|
|
2632
|
+
|
|
2633
|
+
case 'lastElementChild':
|
|
2634
|
+
return getLastElementChild$1;
|
|
2635
|
+
}
|
|
2636
|
+
} // Generic passthrough for child getters on HTMLElement to the relevant Renderer APIs
|
|
2637
|
+
|
|
2638
|
+
|
|
2639
|
+
var _loop = function _loop() {
|
|
2640
|
+
var childGetter = _childGetters[_i9];
|
|
2641
|
+
queryAndChildGetterDescriptors[childGetter] = {
|
|
2449
2642
|
get: function get() {
|
|
2450
2643
|
var vm = getAssociatedVM(this);
|
|
2451
|
-
var elm = vm.elm
|
|
2452
|
-
renderer = vm.renderer;
|
|
2644
|
+
var elm = vm.elm;
|
|
2453
2645
|
|
|
2454
|
-
return
|
|
2646
|
+
return getChildGetter(childGetter)(elm);
|
|
2455
2647
|
},
|
|
2456
2648
|
configurable: true,
|
|
2457
2649
|
enumerable: true
|
|
@@ -2462,17 +2654,33 @@
|
|
|
2462
2654
|
_loop();
|
|
2463
2655
|
}
|
|
2464
2656
|
|
|
2465
|
-
var queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll'];
|
|
2657
|
+
var queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll'];
|
|
2658
|
+
|
|
2659
|
+
function getQueryMethod(methodName) {
|
|
2660
|
+
switch (methodName) {
|
|
2661
|
+
case 'getElementsByClassName':
|
|
2662
|
+
return getElementsByClassName$1;
|
|
2663
|
+
|
|
2664
|
+
case 'getElementsByTagName':
|
|
2665
|
+
return getElementsByTagName$1;
|
|
2666
|
+
|
|
2667
|
+
case 'querySelector':
|
|
2668
|
+
return querySelector$1;
|
|
2669
|
+
|
|
2670
|
+
case 'querySelectorAll':
|
|
2671
|
+
return querySelectorAll$1;
|
|
2672
|
+
}
|
|
2673
|
+
} // Generic passthrough for query APIs on HTMLElement to the relevant Renderer APIs
|
|
2674
|
+
|
|
2466
2675
|
|
|
2467
2676
|
var _loop2 = function _loop2() {
|
|
2468
2677
|
var queryMethod = _queryMethods[_i10];
|
|
2469
2678
|
queryAndChildGetterDescriptors[queryMethod] = {
|
|
2470
2679
|
value: function value(arg) {
|
|
2471
2680
|
var vm = getAssociatedVM(this);
|
|
2472
|
-
var elm = vm.elm
|
|
2473
|
-
renderer = vm.renderer;
|
|
2681
|
+
var elm = vm.elm;
|
|
2474
2682
|
|
|
2475
|
-
return
|
|
2683
|
+
return getQueryMethod(queryMethod)(elm, arg);
|
|
2476
2684
|
},
|
|
2477
2685
|
configurable: true,
|
|
2478
2686
|
enumerable: true,
|
|
@@ -3032,7 +3240,7 @@
|
|
|
3032
3240
|
return _super4.apply(this, arguments);
|
|
3033
3241
|
}
|
|
3034
3242
|
|
|
3035
|
-
return HTMLBridgeElement;
|
|
3243
|
+
return _createClass(HTMLBridgeElement);
|
|
3036
3244
|
}(SuperClass);
|
|
3037
3245
|
} else {
|
|
3038
3246
|
HTMLBridgeElement = function HTMLBridgeElement() {
|
|
@@ -3400,31 +3608,28 @@
|
|
|
3400
3608
|
var token = cmpTemplate === null || cmpTemplate === void 0 ? void 0 : cmpTemplate.stylesheetToken;
|
|
3401
3609
|
|
|
3402
3610
|
if (!isUndefined$1(token) && context.hasScopedStyles) {
|
|
3403
|
-
|
|
3611
|
+
getClassList$1(elm).add(token);
|
|
3404
3612
|
}
|
|
3405
3613
|
}
|
|
3406
3614
|
|
|
3407
3615
|
function updateNodeHook(oldVnode, vnode) {
|
|
3408
3616
|
var elm = vnode.elm,
|
|
3409
|
-
text = vnode.text
|
|
3410
|
-
renderer = vnode.owner.renderer;
|
|
3617
|
+
text = vnode.text;
|
|
3411
3618
|
|
|
3412
3619
|
if (oldVnode.text !== text) {
|
|
3413
3620
|
|
|
3414
|
-
|
|
3621
|
+
setText$1(elm, text);
|
|
3415
3622
|
}
|
|
3416
3623
|
}
|
|
3417
3624
|
|
|
3418
3625
|
function insertNodeHook(vnode, parentNode, referenceNode) {
|
|
3419
|
-
var renderer = vnode.owner.renderer;
|
|
3420
3626
|
|
|
3421
|
-
|
|
3627
|
+
insert$1(vnode.elm, parentNode, referenceNode);
|
|
3422
3628
|
}
|
|
3423
3629
|
|
|
3424
3630
|
function removeNodeHook(vnode, parentNode) {
|
|
3425
|
-
var renderer = vnode.owner.renderer;
|
|
3426
3631
|
|
|
3427
|
-
|
|
3632
|
+
remove$1(vnode.elm, parentNode);
|
|
3428
3633
|
}
|
|
3429
3634
|
|
|
3430
3635
|
function createElmHook(vnode) {
|
|
@@ -3485,12 +3690,14 @@
|
|
|
3485
3690
|
}
|
|
3486
3691
|
|
|
3487
3692
|
function updateChildrenHook(oldVnode, vnode) {
|
|
3488
|
-
var
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
}
|
|
3693
|
+
var elm = vnode.elm,
|
|
3694
|
+
children = vnode.children;
|
|
3695
|
+
|
|
3696
|
+
if (hasDynamicChildren(children)) {
|
|
3697
|
+
updateDynamicChildren(elm, oldVnode.children, children);
|
|
3698
|
+
} else {
|
|
3699
|
+
updateStaticChildren(elm, oldVnode.children, children);
|
|
3700
|
+
}
|
|
3494
3701
|
}
|
|
3495
3702
|
|
|
3496
3703
|
function allocateChildrenHook(vnode, vm) {
|
|
@@ -3550,8 +3757,7 @@
|
|
|
3550
3757
|
createVM(elm, def, {
|
|
3551
3758
|
mode: mode,
|
|
3552
3759
|
owner: owner,
|
|
3553
|
-
tagName: sel
|
|
3554
|
-
renderer: owner.renderer
|
|
3760
|
+
tagName: sel
|
|
3555
3761
|
});
|
|
3556
3762
|
}
|
|
3557
3763
|
|
|
@@ -3643,12 +3849,12 @@
|
|
|
3643
3849
|
*/
|
|
3644
3850
|
|
|
3645
3851
|
|
|
3646
|
-
function getUpgradableConstructor(tagName
|
|
3852
|
+
function getUpgradableConstructor(tagName) {
|
|
3647
3853
|
// Should never get a tag with upper case letter at this point, the compiler should
|
|
3648
3854
|
// produce only tags with lowercase letters
|
|
3649
3855
|
// But, for backwards compatibility, we will lower case the tagName
|
|
3650
3856
|
tagName = tagName.toLowerCase();
|
|
3651
|
-
var CE =
|
|
3857
|
+
var CE = getCustomElement$1(tagName);
|
|
3652
3858
|
|
|
3653
3859
|
if (!isUndefined$1(CE)) {
|
|
3654
3860
|
return CE;
|
|
@@ -3659,8 +3865,8 @@
|
|
|
3659
3865
|
*/
|
|
3660
3866
|
|
|
3661
3867
|
|
|
3662
|
-
CE = /*#__PURE__*/function (
|
|
3663
|
-
_inherits(LWCUpgradableElement,
|
|
3868
|
+
CE = /*#__PURE__*/function (_HTMLElementExported$) {
|
|
3869
|
+
_inherits(LWCUpgradableElement, _HTMLElementExported$);
|
|
3664
3870
|
|
|
3665
3871
|
var _super5 = _createSuper(LWCUpgradableElement);
|
|
3666
3872
|
|
|
@@ -3678,10 +3884,10 @@
|
|
|
3678
3884
|
return _this4;
|
|
3679
3885
|
}
|
|
3680
3886
|
|
|
3681
|
-
return LWCUpgradableElement;
|
|
3682
|
-
}(
|
|
3887
|
+
return _createClass(LWCUpgradableElement);
|
|
3888
|
+
}(HTMLElementExported$1);
|
|
3683
3889
|
|
|
3684
|
-
|
|
3890
|
+
defineCustomElement$1(tagName, CE);
|
|
3685
3891
|
return CE;
|
|
3686
3892
|
}
|
|
3687
3893
|
/*
|
|
@@ -3697,8 +3903,7 @@
|
|
|
3697
3903
|
var TextHook = {
|
|
3698
3904
|
create: function create(vnode) {
|
|
3699
3905
|
var owner = vnode.owner;
|
|
3700
|
-
var
|
|
3701
|
-
var elm = renderer.createText(vnode.text);
|
|
3906
|
+
var elm = createText$1(vnode.text);
|
|
3702
3907
|
linkNodeToShadow(elm, owner);
|
|
3703
3908
|
vnode.elm = elm;
|
|
3704
3909
|
},
|
|
@@ -3718,8 +3923,7 @@
|
|
|
3718
3923
|
create: function create(vnode) {
|
|
3719
3924
|
var owner = vnode.owner,
|
|
3720
3925
|
text = vnode.text;
|
|
3721
|
-
var
|
|
3722
|
-
var elm = renderer.createComment(text);
|
|
3926
|
+
var elm = createComment$1(text);
|
|
3723
3927
|
linkNodeToShadow(elm, owner);
|
|
3724
3928
|
vnode.elm = elm;
|
|
3725
3929
|
},
|
|
@@ -3745,9 +3949,8 @@
|
|
|
3745
3949
|
var sel = vnode.sel,
|
|
3746
3950
|
owner = vnode.owner,
|
|
3747
3951
|
svg = vnode.data.svg;
|
|
3748
|
-
var renderer = owner.renderer;
|
|
3749
3952
|
var namespace = isTrue(svg) ? SVG_NAMESPACE : undefined;
|
|
3750
|
-
var elm =
|
|
3953
|
+
var elm = createElement$2(sel, namespace);
|
|
3751
3954
|
linkNodeToShadow(elm, owner);
|
|
3752
3955
|
fallbackElmHook(elm, vnode);
|
|
3753
3956
|
vnode.elm = elm;
|
|
@@ -3801,8 +4004,7 @@
|
|
|
3801
4004
|
create: function create(vnode) {
|
|
3802
4005
|
var sel = vnode.sel,
|
|
3803
4006
|
owner = vnode.owner;
|
|
3804
|
-
var
|
|
3805
|
-
var UpgradableConstructor = getUpgradableConstructor(sel, renderer);
|
|
4007
|
+
var UpgradableConstructor = getUpgradableConstructor(sel);
|
|
3806
4008
|
/**
|
|
3807
4009
|
* Note: if the upgradable constructor does not expect, or throw when we new it
|
|
3808
4010
|
* with a callback as the first argument, we could implement a more advanced
|
|
@@ -3885,8 +4087,7 @@
|
|
|
3885
4087
|
createVM(elm, def, {
|
|
3886
4088
|
mode: mode,
|
|
3887
4089
|
owner: owner,
|
|
3888
|
-
tagName: sel
|
|
3889
|
-
renderer: owner.renderer
|
|
4090
|
+
tagName: sel
|
|
3890
4091
|
});
|
|
3891
4092
|
vnode.elm = elm;
|
|
3892
4093
|
var vm = getAssociatedVM(elm);
|
|
@@ -3908,11 +4109,10 @@
|
|
|
3908
4109
|
};
|
|
3909
4110
|
|
|
3910
4111
|
function linkNodeToShadow(elm, owner) {
|
|
3911
|
-
var
|
|
3912
|
-
renderMode = owner.renderMode,
|
|
4112
|
+
var renderMode = owner.renderMode,
|
|
3913
4113
|
shadowMode = owner.shadowMode; // TODO [#1164]: this should eventually be done by the polyfill directly
|
|
3914
4114
|
|
|
3915
|
-
if (
|
|
4115
|
+
if (isSyntheticShadowDefined$1) {
|
|
3916
4116
|
if (shadowMode === 1
|
|
3917
4117
|
/* Synthetic */
|
|
3918
4118
|
|| renderMode === 0
|
|
@@ -4311,7 +4511,6 @@
|
|
|
4311
4511
|
function updateStylesheetToken(vm, template) {
|
|
4312
4512
|
var elm = vm.elm,
|
|
4313
4513
|
context = vm.context,
|
|
4314
|
-
renderer = vm.renderer,
|
|
4315
4514
|
renderMode = vm.renderMode,
|
|
4316
4515
|
shadowMode = vm.shadowMode;
|
|
4317
4516
|
var newStylesheets = template.stylesheets,
|
|
@@ -4331,11 +4530,11 @@
|
|
|
4331
4530
|
oldHasTokenInAttribute = context.hasTokenInAttribute;
|
|
4332
4531
|
|
|
4333
4532
|
if (oldHasTokenInClass) {
|
|
4334
|
-
|
|
4533
|
+
getClassList$1(elm).remove(makeHostToken(oldToken));
|
|
4335
4534
|
}
|
|
4336
4535
|
|
|
4337
4536
|
if (oldHasTokenInAttribute) {
|
|
4338
|
-
|
|
4537
|
+
removeAttribute$1(elm, makeHostToken(oldToken));
|
|
4339
4538
|
} // Apply the new template styling token to the host element, if the new template has any
|
|
4340
4539
|
// associated stylesheets. In the case of light DOM, also ensure there is at least one scoped stylesheet.
|
|
4341
4540
|
|
|
@@ -4347,12 +4546,12 @@
|
|
|
4347
4546
|
|
|
4348
4547
|
if (!isUndefined$1(newToken)) {
|
|
4349
4548
|
if (hasScopedStyles) {
|
|
4350
|
-
|
|
4549
|
+
getClassList$1(elm).add(makeHostToken(newToken));
|
|
4351
4550
|
newHasTokenInClass = true;
|
|
4352
4551
|
}
|
|
4353
4552
|
|
|
4354
4553
|
if (isSyntheticShadow) {
|
|
4355
|
-
|
|
4554
|
+
setAttribute$1(elm, makeHostToken(newToken), '');
|
|
4356
4555
|
newHasTokenInAttribute = true;
|
|
4357
4556
|
}
|
|
4358
4557
|
} // Update the styling tokens present on the context object.
|
|
@@ -4365,6 +4564,7 @@
|
|
|
4365
4564
|
|
|
4366
4565
|
function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
|
|
4367
4566
|
var content = [];
|
|
4567
|
+
var root;
|
|
4368
4568
|
|
|
4369
4569
|
for (var _i16 = 0; _i16 < stylesheets.length; _i16++) {
|
|
4370
4570
|
var stylesheet = stylesheets[_i16];
|
|
@@ -4372,22 +4572,45 @@
|
|
|
4372
4572
|
if (isArray$1(stylesheet)) {
|
|
4373
4573
|
ArrayPush$1.apply(content, evaluateStylesheetsContent(stylesheet, stylesheetToken, vm));
|
|
4374
4574
|
} else {
|
|
4375
|
-
// native shadow DOM. Synthetic shadow DOM never uses `:host`.
|
|
4376
4575
|
|
|
4576
|
+
var isScopedCss = stylesheet[KEY__SCOPED_CSS]; // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
|
|
4577
|
+
|
|
4578
|
+
var scopeToken = isScopedCss || vm.shadowMode === 1
|
|
4579
|
+
/* Synthetic */
|
|
4580
|
+
&& vm.renderMode === 1
|
|
4581
|
+
/* Shadow */
|
|
4582
|
+
? stylesheetToken : undefined; // Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
|
|
4583
|
+
// native shadow DOM. Synthetic shadow DOM never uses `:host`.
|
|
4377
4584
|
|
|
4378
|
-
var isScopedCss = stylesheet[KEY__SCOPED_CSS];
|
|
4379
4585
|
var useActualHostSelector = vm.renderMode === 0
|
|
4380
4586
|
/* Light */
|
|
4381
4587
|
? !isScopedCss : vm.shadowMode === 0
|
|
4382
4588
|
/* Native */
|
|
4383
|
-
; //
|
|
4589
|
+
; // Use the native :dir() pseudoclass only in native shadow DOM. Otherwise, in synthetic shadow,
|
|
4590
|
+
// we use an attribute selector on the host to simulate :dir().
|
|
4384
4591
|
|
|
4385
|
-
var
|
|
4386
|
-
|
|
4387
|
-
|
|
4592
|
+
var useNativeDirPseudoclass = void 0;
|
|
4593
|
+
|
|
4594
|
+
if (vm.renderMode === 1
|
|
4388
4595
|
/* Shadow */
|
|
4389
|
-
|
|
4390
|
-
|
|
4596
|
+
) {
|
|
4597
|
+
useNativeDirPseudoclass = vm.shadowMode === 0
|
|
4598
|
+
/* Native */
|
|
4599
|
+
;
|
|
4600
|
+
} else {
|
|
4601
|
+
// Light DOM components should only render `[dir]` if they're inside of a synthetic shadow root.
|
|
4602
|
+
// At the top level (root is null) or inside of a native shadow root, they should use `:dir()`.
|
|
4603
|
+
if (isUndefined$1(root)) {
|
|
4604
|
+
// Only calculate the root once as necessary
|
|
4605
|
+
root = getNearestShadowComponent(vm);
|
|
4606
|
+
}
|
|
4607
|
+
|
|
4608
|
+
useNativeDirPseudoclass = isNull(root) || root.shadowMode === 0
|
|
4609
|
+
/* Native */
|
|
4610
|
+
;
|
|
4611
|
+
}
|
|
4612
|
+
|
|
4613
|
+
ArrayPush$1.call(content, stylesheet(scopeToken, useActualHostSelector, useNativeDirPseudoclass));
|
|
4391
4614
|
}
|
|
4392
4615
|
}
|
|
4393
4616
|
|
|
@@ -4409,14 +4632,12 @@
|
|
|
4409
4632
|
// https://github.com/salesforce/lwc/pull/2460#discussion_r691208892
|
|
4410
4633
|
|
|
4411
4634
|
|
|
4412
|
-
function
|
|
4635
|
+
function getNearestShadowComponent(vm) {
|
|
4413
4636
|
var owner = vm;
|
|
4414
4637
|
|
|
4415
4638
|
while (!isNull(owner)) {
|
|
4416
4639
|
if (owner.renderMode === 1
|
|
4417
4640
|
/* Shadow */
|
|
4418
|
-
&& owner.shadowMode === 0
|
|
4419
|
-
/* Native */
|
|
4420
4641
|
) {
|
|
4421
4642
|
return owner;
|
|
4422
4643
|
}
|
|
@@ -4427,9 +4648,22 @@
|
|
|
4427
4648
|
return owner;
|
|
4428
4649
|
}
|
|
4429
4650
|
|
|
4651
|
+
function getNearestNativeShadowComponent(vm) {
|
|
4652
|
+
var owner = getNearestShadowComponent(vm);
|
|
4653
|
+
|
|
4654
|
+
if (!isNull(owner) && owner.shadowMode === 1
|
|
4655
|
+
/* Synthetic */
|
|
4656
|
+
) {
|
|
4657
|
+
// Synthetic-within-native is impossible. So if the nearest shadow component is
|
|
4658
|
+
// synthetic, we know we won't find a native component if we go any further.
|
|
4659
|
+
return null;
|
|
4660
|
+
}
|
|
4661
|
+
|
|
4662
|
+
return owner;
|
|
4663
|
+
}
|
|
4664
|
+
|
|
4430
4665
|
function createStylesheet(vm, stylesheets) {
|
|
4431
|
-
var
|
|
4432
|
-
renderMode = vm.renderMode,
|
|
4666
|
+
var renderMode = vm.renderMode,
|
|
4433
4667
|
shadowMode = vm.shadowMode;
|
|
4434
4668
|
|
|
4435
4669
|
if (renderMode === 1
|
|
@@ -4438,9 +4672,9 @@
|
|
|
4438
4672
|
/* Synthetic */
|
|
4439
4673
|
) {
|
|
4440
4674
|
for (var _i17 = 0; _i17 < stylesheets.length; _i17++) {
|
|
4441
|
-
|
|
4675
|
+
insertGlobalStylesheet$1(stylesheets[_i17]);
|
|
4442
4676
|
}
|
|
4443
|
-
} else if (
|
|
4677
|
+
} else if (ssr$1 || isHydrating$1()) {
|
|
4444
4678
|
// Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
|
|
4445
4679
|
// This works in the client, because the stylesheets are created, and cached in the VM
|
|
4446
4680
|
// the first time the VM renders.
|
|
@@ -4454,10 +4688,10 @@
|
|
|
4454
4688
|
|
|
4455
4689
|
for (var _i18 = 0; _i18 < stylesheets.length; _i18++) {
|
|
4456
4690
|
if (isGlobal) {
|
|
4457
|
-
|
|
4691
|
+
insertGlobalStylesheet$1(stylesheets[_i18]);
|
|
4458
4692
|
} else {
|
|
4459
4693
|
// local level
|
|
4460
|
-
|
|
4694
|
+
insertStylesheet$1(stylesheets[_i18], root.cmpRoot);
|
|
4461
4695
|
}
|
|
4462
4696
|
}
|
|
4463
4697
|
}
|
|
@@ -4494,7 +4728,7 @@
|
|
|
4494
4728
|
if (isProfilerEnabled) {
|
|
4495
4729
|
currentDispatcher(opId, 0
|
|
4496
4730
|
/* Start */
|
|
4497
|
-
, vm.tagName, vm.idx);
|
|
4731
|
+
, vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
|
|
4498
4732
|
}
|
|
4499
4733
|
}
|
|
4500
4734
|
|
|
@@ -4503,7 +4737,7 @@
|
|
|
4503
4737
|
if (isProfilerEnabled) {
|
|
4504
4738
|
currentDispatcher(opId, 1
|
|
4505
4739
|
/* Stop */
|
|
4506
|
-
, vm.tagName, vm.idx);
|
|
4740
|
+
, vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
|
|
4507
4741
|
}
|
|
4508
4742
|
}
|
|
4509
4743
|
|
|
@@ -4512,7 +4746,7 @@
|
|
|
4512
4746
|
if (isProfilerEnabled) {
|
|
4513
4747
|
currentDispatcher(opId, 0
|
|
4514
4748
|
/* Start */
|
|
4515
|
-
, vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx);
|
|
4749
|
+
, 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);
|
|
4516
4750
|
}
|
|
4517
4751
|
}
|
|
4518
4752
|
|
|
@@ -4521,7 +4755,7 @@
|
|
|
4521
4755
|
if (isProfilerEnabled) {
|
|
4522
4756
|
currentDispatcher(opId, 1
|
|
4523
4757
|
/* Stop */
|
|
4524
|
-
, vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx);
|
|
4758
|
+
, 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);
|
|
4525
4759
|
}
|
|
4526
4760
|
}
|
|
4527
4761
|
/*
|
|
@@ -4984,7 +5218,6 @@
|
|
|
4984
5218
|
function createVM(elm, def, options) {
|
|
4985
5219
|
var mode = options.mode,
|
|
4986
5220
|
owner = options.owner,
|
|
4987
|
-
renderer = options.renderer,
|
|
4988
5221
|
tagName = options.tagName;
|
|
4989
5222
|
var vm = {
|
|
4990
5223
|
elm: elm,
|
|
@@ -4998,7 +5231,6 @@
|
|
|
4998
5231
|
tagName: tagName,
|
|
4999
5232
|
mode: mode,
|
|
5000
5233
|
owner: owner,
|
|
5001
|
-
renderer: renderer,
|
|
5002
5234
|
children: EmptyArray,
|
|
5003
5235
|
aChildren: EmptyArray,
|
|
5004
5236
|
velements: EmptyArray,
|
|
@@ -5040,13 +5272,10 @@
|
|
|
5040
5272
|
}
|
|
5041
5273
|
|
|
5042
5274
|
function computeShadowMode(vm) {
|
|
5043
|
-
var def = vm.def
|
|
5044
|
-
renderer = vm.renderer;
|
|
5045
|
-
var isNativeShadowDefined = renderer.isNativeShadowDefined,
|
|
5046
|
-
isSyntheticShadowDefined = renderer.isSyntheticShadowDefined;
|
|
5275
|
+
var def = vm.def;
|
|
5047
5276
|
var shadowMode;
|
|
5048
5277
|
|
|
5049
|
-
if (isSyntheticShadowDefined) {
|
|
5278
|
+
if (isSyntheticShadowDefined$1) {
|
|
5050
5279
|
if (def.renderMode === 0
|
|
5051
5280
|
/* Light */
|
|
5052
5281
|
) {
|
|
@@ -5055,7 +5284,7 @@
|
|
|
5055
5284
|
shadowMode = 0
|
|
5056
5285
|
/* Native */
|
|
5057
5286
|
;
|
|
5058
|
-
} else if (isNativeShadowDefined) {
|
|
5287
|
+
} else if (isNativeShadowDefined$1) {
|
|
5059
5288
|
if (def.shadowSupportMode === "any"
|
|
5060
5289
|
/* Any */
|
|
5061
5290
|
) {
|
|
@@ -5176,10 +5405,9 @@
|
|
|
5176
5405
|
}
|
|
5177
5406
|
|
|
5178
5407
|
function runRenderedCallback(vm) {
|
|
5179
|
-
var
|
|
5180
|
-
renderedCallback = vm.def.renderedCallback;
|
|
5408
|
+
var renderedCallback = vm.def.renderedCallback;
|
|
5181
5409
|
|
|
5182
|
-
if (isTrue(
|
|
5410
|
+
if (isTrue(ssr$1)) {
|
|
5183
5411
|
return;
|
|
5184
5412
|
}
|
|
5185
5413
|
|
|
@@ -5379,15 +5607,14 @@
|
|
|
5379
5607
|
|
|
5380
5608
|
|
|
5381
5609
|
function resetComponentRoot(vm) {
|
|
5382
|
-
var children = vm.children
|
|
5383
|
-
renderer = vm.renderer;
|
|
5610
|
+
var children = vm.children;
|
|
5384
5611
|
var rootNode = getRenderRoot(vm);
|
|
5385
5612
|
|
|
5386
5613
|
for (var _i25 = 0, _len9 = children.length; _i25 < _len9; _i25++) {
|
|
5387
5614
|
var child = children[_i25];
|
|
5388
5615
|
|
|
5389
5616
|
if (!isNull(child) && !isUndefined$1(child.elm)) {
|
|
5390
|
-
|
|
5617
|
+
remove$1(child.elm, rootNode);
|
|
5391
5618
|
}
|
|
5392
5619
|
}
|
|
5393
5620
|
|
|
@@ -5397,7 +5624,7 @@
|
|
|
5397
5624
|
}
|
|
5398
5625
|
|
|
5399
5626
|
function scheduleRehydration(vm) {
|
|
5400
|
-
if (isTrue(
|
|
5627
|
+
if (isTrue(ssr$1) || isTrue(vm.isScheduled)) {
|
|
5401
5628
|
return;
|
|
5402
5629
|
}
|
|
5403
5630
|
|
|
@@ -5560,7 +5787,7 @@
|
|
|
5560
5787
|
return _this5;
|
|
5561
5788
|
}
|
|
5562
5789
|
|
|
5563
|
-
return WireContextRegistrationEvent;
|
|
5790
|
+
return _createClass(WireContextRegistrationEvent);
|
|
5564
5791
|
}( /*#__PURE__*/_wrapNativeSuper(CustomEvent));
|
|
5565
5792
|
|
|
5566
5793
|
function createFieldDataCallback(vm, name) {
|
|
@@ -5627,7 +5854,6 @@
|
|
|
5627
5854
|
}
|
|
5628
5855
|
|
|
5629
5856
|
var elm = vm.elm,
|
|
5630
|
-
renderer = vm.renderer,
|
|
5631
5857
|
_vm$context = vm.context,
|
|
5632
5858
|
wiredConnecting = _vm$context.wiredConnecting,
|
|
5633
5859
|
wiredDisconnecting = _vm$context.wiredDisconnecting; // waiting for the component to be connected to formally request the context via the token
|
|
@@ -5650,7 +5876,7 @@
|
|
|
5650
5876
|
ArrayPush$1.call(wiredDisconnecting, disconnectCallback);
|
|
5651
5877
|
}
|
|
5652
5878
|
});
|
|
5653
|
-
|
|
5879
|
+
dispatchEvent$1(elm, contextRegistrationEvent);
|
|
5654
5880
|
});
|
|
5655
5881
|
}
|
|
5656
5882
|
|
|
@@ -5894,7 +6120,7 @@
|
|
|
5894
6120
|
hooksAreSet = true;
|
|
5895
6121
|
setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
|
|
5896
6122
|
}
|
|
5897
|
-
/* version: 2.
|
|
6123
|
+
/* version: 2.6.3 */
|
|
5898
6124
|
|
|
5899
6125
|
/*
|
|
5900
6126
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -5914,7 +6140,9 @@
|
|
|
5914
6140
|
var styleElements = create(null);
|
|
5915
6141
|
var styleSheets = create(null);
|
|
5916
6142
|
var nodesToStyleSheets = new WeakMap();
|
|
5917
|
-
var getCustomElement
|
|
6143
|
+
var getCustomElement;
|
|
6144
|
+
var defineCustomElement;
|
|
6145
|
+
var HTMLElementConstructor;
|
|
5918
6146
|
|
|
5919
6147
|
function isCustomElementRegistryAvailable() {
|
|
5920
6148
|
if (typeof customElements === 'undefined') {
|
|
@@ -5941,7 +6169,7 @@
|
|
|
5941
6169
|
return _super7.apply(this, arguments);
|
|
5942
6170
|
}
|
|
5943
6171
|
|
|
5944
|
-
return clazz;
|
|
6172
|
+
return _createClass(clazz);
|
|
5945
6173
|
}(HTMLElementAlias);
|
|
5946
6174
|
|
|
5947
6175
|
customElements.define('lwc-test-' + Math.floor(Math.random() * 1000000), clazz);
|
|
@@ -6039,146 +6267,213 @@
|
|
|
6039
6267
|
HTMLElementConstructor.prototype = HTMLElement.prototype;
|
|
6040
6268
|
}
|
|
6041
6269
|
|
|
6042
|
-
var
|
|
6270
|
+
var hydrating = false;
|
|
6043
6271
|
|
|
6044
|
-
function setIsHydrating(
|
|
6045
|
-
|
|
6272
|
+
function setIsHydrating(value) {
|
|
6273
|
+
hydrating = value;
|
|
6046
6274
|
}
|
|
6047
6275
|
|
|
6048
|
-
var
|
|
6049
|
-
ssr: false,
|
|
6050
|
-
isHydrating: function isHydrating() {
|
|
6051
|
-
return _isHydrating;
|
|
6052
|
-
},
|
|
6053
|
-
isNativeShadowDefined: _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED],
|
|
6054
|
-
isSyntheticShadowDefined: hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN),
|
|
6055
|
-
createElement: function createElement(tagName, namespace) {
|
|
6056
|
-
return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
|
|
6057
|
-
},
|
|
6058
|
-
createText: function createText(content) {
|
|
6059
|
-
return document.createTextNode(content);
|
|
6060
|
-
},
|
|
6061
|
-
createComment: function createComment(content) {
|
|
6062
|
-
return document.createComment(content);
|
|
6063
|
-
},
|
|
6064
|
-
insert: function insert(node, parent, anchor) {
|
|
6065
|
-
parent.insertBefore(node, anchor);
|
|
6066
|
-
},
|
|
6067
|
-
remove: function remove(node, parent) {
|
|
6068
|
-
parent.removeChild(node);
|
|
6069
|
-
},
|
|
6070
|
-
nextSibling: function nextSibling(node) {
|
|
6071
|
-
return node.nextSibling;
|
|
6072
|
-
},
|
|
6073
|
-
attachShadow: function attachShadow(element, options) {
|
|
6074
|
-
if (_isHydrating) {
|
|
6075
|
-
return element.shadowRoot;
|
|
6076
|
-
}
|
|
6276
|
+
var ssr = false;
|
|
6077
6277
|
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
node.nodeValue = content;
|
|
6082
|
-
},
|
|
6083
|
-
getProperty: function getProperty(node, key) {
|
|
6084
|
-
return node[key];
|
|
6085
|
-
},
|
|
6086
|
-
setProperty: function setProperty(node, key, value) {
|
|
6278
|
+
function isHydrating() {
|
|
6279
|
+
return hydrating;
|
|
6280
|
+
}
|
|
6087
6281
|
|
|
6088
|
-
|
|
6089
|
-
|
|
6090
|
-
getAttribute: function getAttribute(element, name, namespace) {
|
|
6091
|
-
return isUndefined$1(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
|
|
6092
|
-
},
|
|
6093
|
-
setAttribute: function setAttribute(element, name, value, namespace) {
|
|
6094
|
-
return isUndefined$1(namespace) ? element.setAttribute(name, value) : element.setAttributeNS(namespace, name, value);
|
|
6095
|
-
},
|
|
6096
|
-
removeAttribute: function removeAttribute(element, name, namespace) {
|
|
6097
|
-
if (isUndefined$1(namespace)) {
|
|
6098
|
-
element.removeAttribute(name);
|
|
6099
|
-
} else {
|
|
6100
|
-
element.removeAttributeNS(namespace, name);
|
|
6101
|
-
}
|
|
6102
|
-
},
|
|
6103
|
-
addEventListener: function addEventListener(target, type, callback, options) {
|
|
6104
|
-
target.addEventListener(type, callback, options);
|
|
6105
|
-
},
|
|
6106
|
-
removeEventListener: function removeEventListener(target, type, callback, options) {
|
|
6107
|
-
target.removeEventListener(type, callback, options);
|
|
6108
|
-
},
|
|
6109
|
-
dispatchEvent: function dispatchEvent(target, event) {
|
|
6110
|
-
return target.dispatchEvent(event);
|
|
6111
|
-
},
|
|
6112
|
-
getClassList: function getClassList(element) {
|
|
6113
|
-
return element.classList;
|
|
6114
|
-
},
|
|
6115
|
-
setCSSStyleProperty: function setCSSStyleProperty(element, name, value, important) {
|
|
6116
|
-
// TODO [#0]: How to avoid this type casting? Shall we use a different type interface to
|
|
6117
|
-
// represent elements in the engine?
|
|
6118
|
-
element.style.setProperty(name, value, important ? 'important' : '');
|
|
6119
|
-
},
|
|
6120
|
-
getBoundingClientRect: function getBoundingClientRect(element) {
|
|
6121
|
-
return element.getBoundingClientRect();
|
|
6122
|
-
},
|
|
6123
|
-
querySelector: function querySelector(element, selectors) {
|
|
6124
|
-
return element.querySelector(selectors);
|
|
6125
|
-
},
|
|
6126
|
-
querySelectorAll: function querySelectorAll(element, selectors) {
|
|
6127
|
-
return element.querySelectorAll(selectors);
|
|
6128
|
-
},
|
|
6129
|
-
getElementsByTagName: function getElementsByTagName(element, tagNameOrWildCard) {
|
|
6130
|
-
return element.getElementsByTagName(tagNameOrWildCard);
|
|
6131
|
-
},
|
|
6132
|
-
getElementsByClassName: function getElementsByClassName(element, names) {
|
|
6133
|
-
return element.getElementsByClassName(names);
|
|
6134
|
-
},
|
|
6135
|
-
getChildren: function getChildren(element) {
|
|
6136
|
-
return element.children;
|
|
6137
|
-
},
|
|
6138
|
-
getChildNodes: function getChildNodes(element) {
|
|
6139
|
-
return element.childNodes;
|
|
6140
|
-
},
|
|
6141
|
-
getFirstChild: function getFirstChild(element) {
|
|
6142
|
-
return element.firstChild;
|
|
6143
|
-
},
|
|
6144
|
-
getFirstElementChild: function getFirstElementChild(element) {
|
|
6145
|
-
return element.firstElementChild;
|
|
6146
|
-
},
|
|
6147
|
-
getLastChild: function getLastChild(element) {
|
|
6148
|
-
return element.lastChild;
|
|
6149
|
-
},
|
|
6150
|
-
getLastElementChild: function getLastElementChild(element) {
|
|
6151
|
-
return element.lastElementChild;
|
|
6152
|
-
},
|
|
6153
|
-
isConnected: function isConnected(node) {
|
|
6154
|
-
return node.isConnected;
|
|
6155
|
-
},
|
|
6156
|
-
insertGlobalStylesheet: function insertGlobalStylesheet(content) {
|
|
6157
|
-
if (!isUndefined$1(globalStylesheets[content])) {
|
|
6158
|
-
return;
|
|
6159
|
-
}
|
|
6282
|
+
var isNativeShadowDefined = _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED];
|
|
6283
|
+
var isSyntheticShadowDefined = hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN);
|
|
6160
6284
|
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6285
|
+
function createElement$1(tagName, namespace) {
|
|
6286
|
+
return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
|
|
6287
|
+
}
|
|
6288
|
+
|
|
6289
|
+
function createText(content) {
|
|
6290
|
+
return document.createTextNode(content);
|
|
6291
|
+
}
|
|
6292
|
+
|
|
6293
|
+
function createComment(content) {
|
|
6294
|
+
return document.createComment(content);
|
|
6295
|
+
}
|
|
6296
|
+
|
|
6297
|
+
function insert(node, parent, anchor) {
|
|
6298
|
+
parent.insertBefore(node, anchor);
|
|
6299
|
+
}
|
|
6300
|
+
|
|
6301
|
+
function remove(node, parent) {
|
|
6302
|
+
parent.removeChild(node);
|
|
6303
|
+
}
|
|
6304
|
+
|
|
6305
|
+
function nextSibling(node) {
|
|
6306
|
+
return node.nextSibling;
|
|
6307
|
+
}
|
|
6308
|
+
|
|
6309
|
+
function attachShadow(element, options) {
|
|
6310
|
+
if (hydrating) {
|
|
6311
|
+
return element.shadowRoot;
|
|
6312
|
+
}
|
|
6313
|
+
|
|
6314
|
+
return element.attachShadow(options);
|
|
6315
|
+
}
|
|
6316
|
+
|
|
6317
|
+
function setText(node, content) {
|
|
6318
|
+
node.nodeValue = content;
|
|
6319
|
+
}
|
|
6320
|
+
|
|
6321
|
+
function getProperty(node, key) {
|
|
6322
|
+
return node[key];
|
|
6323
|
+
}
|
|
6324
|
+
|
|
6325
|
+
function setProperty(node, key, value) {
|
|
6326
|
+
|
|
6327
|
+
node[key] = value;
|
|
6328
|
+
}
|
|
6329
|
+
|
|
6330
|
+
function getAttribute(element, name, namespace) {
|
|
6331
|
+
return isUndefined$1(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
|
|
6332
|
+
}
|
|
6333
|
+
|
|
6334
|
+
function setAttribute(element, name, value, namespace) {
|
|
6335
|
+
return isUndefined$1(namespace) ? element.setAttribute(name, value) : element.setAttributeNS(namespace, name, value);
|
|
6336
|
+
}
|
|
6337
|
+
|
|
6338
|
+
function removeAttribute(element, name, namespace) {
|
|
6339
|
+
if (isUndefined$1(namespace)) {
|
|
6340
|
+
element.removeAttribute(name);
|
|
6341
|
+
} else {
|
|
6342
|
+
element.removeAttributeNS(namespace, name);
|
|
6343
|
+
}
|
|
6344
|
+
}
|
|
6345
|
+
|
|
6346
|
+
function addEventListener(target, type, callback, options) {
|
|
6347
|
+
target.addEventListener(type, callback, options);
|
|
6348
|
+
}
|
|
6349
|
+
|
|
6350
|
+
function removeEventListener(target, type, callback, options) {
|
|
6351
|
+
target.removeEventListener(type, callback, options);
|
|
6352
|
+
}
|
|
6353
|
+
|
|
6354
|
+
function dispatchEvent(target, event) {
|
|
6355
|
+
return target.dispatchEvent(event);
|
|
6356
|
+
}
|
|
6357
|
+
|
|
6358
|
+
function getClassList(element) {
|
|
6359
|
+
return element.classList;
|
|
6360
|
+
}
|
|
6361
|
+
|
|
6362
|
+
function setCSSStyleProperty(element, name, value, important) {
|
|
6363
|
+
// TODO [#0]: How to avoid this type casting? Shall we use a different type interface to
|
|
6364
|
+
// represent elements in the engine?
|
|
6365
|
+
element.style.setProperty(name, value, important ? 'important' : '');
|
|
6366
|
+
}
|
|
6367
|
+
|
|
6368
|
+
function getBoundingClientRect(element) {
|
|
6369
|
+
return element.getBoundingClientRect();
|
|
6370
|
+
}
|
|
6371
|
+
|
|
6372
|
+
function querySelector(element, selectors) {
|
|
6373
|
+
return element.querySelector(selectors);
|
|
6374
|
+
}
|
|
6375
|
+
|
|
6376
|
+
function querySelectorAll(element, selectors) {
|
|
6377
|
+
return element.querySelectorAll(selectors);
|
|
6378
|
+
}
|
|
6379
|
+
|
|
6380
|
+
function getElementsByTagName(element, tagNameOrWildCard) {
|
|
6381
|
+
return element.getElementsByTagName(tagNameOrWildCard);
|
|
6382
|
+
}
|
|
6383
|
+
|
|
6384
|
+
function getElementsByClassName(element, names) {
|
|
6385
|
+
return element.getElementsByClassName(names);
|
|
6386
|
+
}
|
|
6387
|
+
|
|
6388
|
+
function getChildren(element) {
|
|
6389
|
+
return element.children;
|
|
6390
|
+
}
|
|
6391
|
+
|
|
6392
|
+
function getChildNodes(element) {
|
|
6393
|
+
return element.childNodes;
|
|
6394
|
+
}
|
|
6395
|
+
|
|
6396
|
+
function getFirstChild(element) {
|
|
6397
|
+
return element.firstChild;
|
|
6398
|
+
}
|
|
6399
|
+
|
|
6400
|
+
function getFirstElementChild(element) {
|
|
6401
|
+
return element.firstElementChild;
|
|
6402
|
+
}
|
|
6403
|
+
|
|
6404
|
+
function getLastChild(element) {
|
|
6405
|
+
return element.lastChild;
|
|
6406
|
+
}
|
|
6407
|
+
|
|
6408
|
+
function getLastElementChild(element) {
|
|
6409
|
+
return element.lastElementChild;
|
|
6410
|
+
}
|
|
6411
|
+
|
|
6412
|
+
function isConnected(node) {
|
|
6413
|
+
return node.isConnected;
|
|
6414
|
+
}
|
|
6415
|
+
|
|
6416
|
+
function insertGlobalStylesheet(content) {
|
|
6417
|
+
if (!isUndefined$1(globalStylesheets[content])) {
|
|
6418
|
+
return;
|
|
6419
|
+
}
|
|
6420
|
+
|
|
6421
|
+
globalStylesheets[content] = true;
|
|
6422
|
+
var elm = document.createElement('style');
|
|
6423
|
+
elm.type = 'text/css';
|
|
6424
|
+
elm.textContent = content;
|
|
6425
|
+
globalStylesheetsParentElement.appendChild(elm);
|
|
6426
|
+
}
|
|
6427
|
+
|
|
6428
|
+
function insertStylesheet(content, target) {
|
|
6429
|
+
if (supportsConstructableStyleSheets) {
|
|
6430
|
+
insertConstructableStyleSheet(content, target);
|
|
6431
|
+
} else {
|
|
6432
|
+
// Fall back to <style> element
|
|
6433
|
+
insertStyleElement(content, target);
|
|
6434
|
+
}
|
|
6435
|
+
}
|
|
6436
|
+
|
|
6437
|
+
var HTMLElementExported = HTMLElementConstructor;
|
|
6438
|
+
setAttachShadow(attachShadow);
|
|
6439
|
+
setCreateComment(createComment);
|
|
6440
|
+
setCreateElement(createElement$1);
|
|
6441
|
+
setCreateText(createText);
|
|
6442
|
+
setDefineCustomElement(defineCustomElement);
|
|
6443
|
+
setDispatchEvent(dispatchEvent);
|
|
6444
|
+
setGetAttribute(getAttribute);
|
|
6445
|
+
setGetBoundingClientRect(getBoundingClientRect);
|
|
6446
|
+
setGetChildNodes(getChildNodes);
|
|
6447
|
+
setGetChildren(getChildren);
|
|
6448
|
+
setGetClassList(getClassList);
|
|
6449
|
+
setGetCustomElement(getCustomElement);
|
|
6450
|
+
setGetElementsByClassName(getElementsByClassName);
|
|
6451
|
+
setGetElementsByTagName(getElementsByTagName);
|
|
6452
|
+
setGetFirstChild(getFirstChild);
|
|
6453
|
+
setGetFirstElementChild(getFirstElementChild);
|
|
6454
|
+
setGetLastChild(getLastChild);
|
|
6455
|
+
setGetLastElementChild(getLastElementChild);
|
|
6456
|
+
setGetProperty(getProperty);
|
|
6457
|
+
setHTMLElement(HTMLElementExported);
|
|
6458
|
+
setInsert(insert);
|
|
6459
|
+
setInsertGlobalStylesheet(insertGlobalStylesheet);
|
|
6460
|
+
setInsertStylesheet(insertStylesheet);
|
|
6461
|
+
setIsConnected(isConnected);
|
|
6462
|
+
setIsHydrating$1(isHydrating);
|
|
6463
|
+
setIsNativeShadowDefined(isNativeShadowDefined);
|
|
6464
|
+
setIsSyntheticShadowDefined(isSyntheticShadowDefined);
|
|
6465
|
+
setNextSibling(nextSibling);
|
|
6466
|
+
setQuerySelector(querySelector);
|
|
6467
|
+
setQuerySelectorAll(querySelectorAll);
|
|
6468
|
+
setRemove(remove);
|
|
6469
|
+
setRemoveAttribute(removeAttribute);
|
|
6470
|
+
setRemoveEventListener(removeEventListener);
|
|
6471
|
+
setSetAttribute(setAttribute);
|
|
6472
|
+
setSetCSSStyleProperty(setCSSStyleProperty);
|
|
6473
|
+
setSetProperty(setProperty);
|
|
6474
|
+
setSetText(setText);
|
|
6475
|
+
setSsr(ssr);
|
|
6476
|
+
setAddEventListener(addEventListener);
|
|
6182
6477
|
/*
|
|
6183
6478
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
6184
6479
|
* All rights reserved.
|
|
@@ -6257,7 +6552,7 @@
|
|
|
6257
6552
|
throw new TypeError("\"createElement\" function expects an \"is\" option with a valid component constructor.");
|
|
6258
6553
|
}
|
|
6259
6554
|
|
|
6260
|
-
var UpgradableConstructor = getUpgradableConstructor(sel
|
|
6555
|
+
var UpgradableConstructor = getUpgradableConstructor(sel);
|
|
6261
6556
|
var wasComponentUpgraded = false; // the custom element from the registry is expecting an upgrade callback
|
|
6262
6557
|
|
|
6263
6558
|
/**
|
|
@@ -6272,8 +6567,7 @@
|
|
|
6272
6567
|
createVM(elm, def, {
|
|
6273
6568
|
tagName: sel,
|
|
6274
6569
|
mode: options.mode !== 'closed' ? 'open' : 'closed',
|
|
6275
|
-
owner: null
|
|
6276
|
-
renderer: renderer
|
|
6570
|
+
owner: null
|
|
6277
6571
|
});
|
|
6278
6572
|
ConnectingSlot.set(elm, connectRootElement);
|
|
6279
6573
|
DisconnectingSlot.set(elm, disconnectRootElement);
|
|
@@ -6298,6 +6592,10 @@
|
|
|
6298
6592
|
function hydrateComponent(element, Ctor) {
|
|
6299
6593
|
var props = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
6300
6594
|
|
|
6595
|
+
if (!(element instanceof Element)) {
|
|
6596
|
+
throw new TypeError("\"hydrateComponent\" expects a valid DOM element as the first parameter but instead received ".concat(element, "."));
|
|
6597
|
+
}
|
|
6598
|
+
|
|
6301
6599
|
if (!isFunction$1(Ctor)) {
|
|
6302
6600
|
throw new TypeError("\"hydrateComponent\" expects a valid component constructor as the second parameter but instead received ".concat(Ctor, "."));
|
|
6303
6601
|
}
|
|
@@ -6315,7 +6613,6 @@
|
|
|
6315
6613
|
createVM(element, def, {
|
|
6316
6614
|
mode: 'open',
|
|
6317
6615
|
owner: null,
|
|
6318
|
-
renderer: renderer,
|
|
6319
6616
|
tagName: element.tagName.toLowerCase()
|
|
6320
6617
|
});
|
|
6321
6618
|
|
|
@@ -6398,8 +6695,7 @@
|
|
|
6398
6695
|
createVM(_assertThisInitialized(_this6), def, {
|
|
6399
6696
|
mode: 'open',
|
|
6400
6697
|
owner: null,
|
|
6401
|
-
tagName: _this6.tagName
|
|
6402
|
-
renderer: renderer
|
|
6698
|
+
tagName: _this6.tagName
|
|
6403
6699
|
});
|
|
6404
6700
|
return _this6;
|
|
6405
6701
|
}
|
|
@@ -6472,7 +6768,7 @@
|
|
|
6472
6768
|
return false;
|
|
6473
6769
|
}
|
|
6474
6770
|
|
|
6475
|
-
if (
|
|
6771
|
+
if (isSyntheticShadowDefined) {
|
|
6476
6772
|
// TODO [#1252]: old behavior that is still used by some pieces of the platform,
|
|
6477
6773
|
// specifically, nodes inserted manually on places where `lwc:dom="manual"` directive is not
|
|
6478
6774
|
// used, will be considered global elements.
|
|
@@ -6524,7 +6820,7 @@
|
|
|
6524
6820
|
});
|
|
6525
6821
|
freeze(LightningElement);
|
|
6526
6822
|
seal(LightningElement.prototype);
|
|
6527
|
-
/* version: 2.
|
|
6823
|
+
/* version: 2.6.3 */
|
|
6528
6824
|
|
|
6529
6825
|
exports.LightningElement = LightningElement;
|
|
6530
6826
|
exports.__unstable__ProfilerControl = profilerControl;
|