lwc 2.5.10-alpha1 → 2.7.0
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 +168 -134
- package/dist/engine-dom/iife/es2017/engine-dom.js +169 -135
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +2 -2
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +154 -133
- package/dist/engine-dom/iife/es5/engine-dom.js +185 -145
- package/dist/engine-dom/iife/es5/engine-dom.min.js +2 -2
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +172 -145
- package/dist/engine-dom/umd/es2017/engine-dom.js +170 -136
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +2 -2
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +155 -134
- package/dist/engine-dom/umd/es5/engine-dom.js +186 -146
- package/dist/engine-dom/umd/es5/engine-dom.min.js +2 -2
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +173 -146
- package/dist/engine-server/commonjs/es2017/engine-server.js +179 -142
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +2 -2
- package/dist/engine-server/esm/es2017/engine-server.js +179 -142
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +29 -130
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +30 -131
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +30 -131
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +37 -128
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +37 -128
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +31 -132
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +31 -132
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +38 -129
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +38 -129
- package/dist/wire-service/esm/es2017/wire-service.js +2 -2
- package/dist/wire-service/iife/es2017/wire-service.js +3 -3
- package/dist/wire-service/iife/es2017/wire-service_debug.js +3 -3
- package/dist/wire-service/iife/es5/wire-service.js +12 -12
- package/dist/wire-service/iife/es5/wire-service.min.js +1 -1
- package/dist/wire-service/iife/es5/wire-service_debug.js +12 -12
- package/dist/wire-service/umd/es2017/wire-service.js +4 -4
- package/dist/wire-service/umd/es2017/wire-service_debug.js +4 -4
- package/dist/wire-service/umd/es5/wire-service.js +13 -13
- package/dist/wire-service/umd/es5/wire-service.min.js +1 -1
- package/dist/wire-service/umd/es5/wire-service_debug.js +13 -13
- package/package.json +8 -8
- package/dist/engine/esm/es2017/engine.js +0 -7981
- package/dist/engine/iife/es2017/engine.js +0 -8013
- package/dist/engine/iife/es2017/engine.min.js +0 -9
- package/dist/engine/iife/es2017/engine_debug.js +0 -6541
- package/dist/engine/iife/es5/engine.js +0 -6060
- package/dist/engine/iife/es5/engine.min.js +0 -23
- package/dist/engine/iife/es5/engine_debug.js +0 -4856
- package/dist/engine/umd/es2017/engine.js +0 -8014
- package/dist/engine/umd/es2017/engine.min.js +0 -9
- package/dist/engine/umd/es2017/engine_debug.js +0 -6542
- package/dist/engine/umd/es5/engine.js +0 -6061
- package/dist/engine/umd/es5/engine.min.js +0 -23
- package/dist/engine/umd/es5/engine_debug.js +0 -4857
|
@@ -194,7 +194,7 @@ const KEY__SYNTHETIC_MODE = '$$lwc-synthetic-mode';
|
|
|
194
194
|
// we can't use typeof since it will fail when transpiling.
|
|
195
195
|
|
|
196
196
|
const hasNativeSymbolSupport = /*@__PURE__*/(() => Symbol('x').toString() === 'Symbol(x)')();
|
|
197
|
-
/** version: 2.
|
|
197
|
+
/** version: 2.7.0 */
|
|
198
198
|
|
|
199
199
|
/*
|
|
200
200
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -521,20 +521,6 @@ function arrayFromCollection(collection) {
|
|
|
521
521
|
|
|
522
522
|
return cloned;
|
|
523
523
|
}
|
|
524
|
-
/**
|
|
525
|
-
* Copyright (C) 2018 salesforce.com, inc.
|
|
526
|
-
*/
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
if (!_globalThis.lwcRuntimeFlags) {
|
|
530
|
-
Object.defineProperty(_globalThis, 'lwcRuntimeFlags', {
|
|
531
|
-
value: create(null)
|
|
532
|
-
});
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
const runtimeFlags = _globalThis.lwcRuntimeFlags;
|
|
536
|
-
/** version: 2.5.10-alpha1 */
|
|
537
|
-
|
|
538
524
|
/*
|
|
539
525
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
540
526
|
* All rights reserved.
|
|
@@ -542,6 +528,7 @@ const runtimeFlags = _globalThis.lwcRuntimeFlags;
|
|
|
542
528
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
543
529
|
*/
|
|
544
530
|
|
|
531
|
+
|
|
545
532
|
const eventTargetPrototype = typeof EventTarget !== 'undefined' ? EventTarget.prototype : _Node.prototype;
|
|
546
533
|
const {
|
|
547
534
|
addEventListener,
|
|
@@ -596,19 +583,9 @@ function getEventListenerWrapper(fnOrObj) {
|
|
|
596
583
|
assert.invariant(isFalse(isSyntheticShadowHost(currentTarget)), 'This routine should not be used to wrap event listeners for host elements and shadow roots.');
|
|
597
584
|
}
|
|
598
585
|
|
|
599
|
-
const
|
|
600
|
-
composed
|
|
601
|
-
} = event;
|
|
602
|
-
let shouldInvoke;
|
|
603
|
-
|
|
604
|
-
if (runtimeFlags.ENABLE_NON_COMPOSED_EVENTS_LEAKAGE) {
|
|
605
|
-
shouldInvoke = !(eventToShadowRootMap.has(event) && isFalse(composed));
|
|
606
|
-
} else {
|
|
607
|
-
const actualTarget = getActualTarget(event);
|
|
608
|
-
shouldInvoke = shouldInvokeListener(event, actualTarget, currentTarget);
|
|
609
|
-
}
|
|
586
|
+
const actualTarget = getActualTarget(event);
|
|
610
587
|
|
|
611
|
-
if (!
|
|
588
|
+
if (!shouldInvokeListener(event, actualTarget, currentTarget)) {
|
|
612
589
|
return;
|
|
613
590
|
}
|
|
614
591
|
|
|
@@ -629,25 +606,6 @@ function getEventListenerWrapper(fnOrObj) {
|
|
|
629
606
|
|
|
630
607
|
|
|
631
608
|
const eventToContextMap = new WeakMap();
|
|
632
|
-
|
|
633
|
-
function isChildNode(root, node) {
|
|
634
|
-
return !!(compareDocumentPosition.call(root, node) & DOCUMENT_POSITION_CONTAINED_BY);
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
const GET_ROOT_NODE_CONFIG_FALSE = {
|
|
638
|
-
composed: false
|
|
639
|
-
};
|
|
640
|
-
|
|
641
|
-
function getRootNodeHost(node, options) {
|
|
642
|
-
let rootNode = node.getRootNode(options);
|
|
643
|
-
|
|
644
|
-
if (isSyntheticShadowRoot(rootNode)) {
|
|
645
|
-
rootNode = getHost(rootNode);
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
return rootNode;
|
|
649
|
-
}
|
|
650
|
-
|
|
651
609
|
const customElementToWrappedListeners = new WeakMap();
|
|
652
610
|
|
|
653
611
|
function getEventMap(elm) {
|
|
@@ -692,16 +650,9 @@ function getWrappedShadowRootListener(listener) {
|
|
|
692
650
|
currentTarget = getShadowRoot(currentTarget);
|
|
693
651
|
}
|
|
694
652
|
|
|
695
|
-
|
|
653
|
+
const actualTarget = getActualTarget(event);
|
|
696
654
|
|
|
697
|
-
if (
|
|
698
|
-
shouldInvoke = shouldInvokeShadowRootListener(event);
|
|
699
|
-
} else {
|
|
700
|
-
const actualTarget = getActualTarget(event);
|
|
701
|
-
shouldInvoke = shouldInvokeListener(event, actualTarget, currentTarget);
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
if (shouldInvoke) {
|
|
655
|
+
if (shouldInvokeListener(event, actualTarget, currentTarget)) {
|
|
705
656
|
listener.call(currentTarget, event);
|
|
706
657
|
}
|
|
707
658
|
};
|
|
@@ -728,16 +679,9 @@ function getWrappedCustomElementListener(listener) {
|
|
|
728
679
|
customElementWrappedListener = function (event) {
|
|
729
680
|
// currentTarget is always defined inside an event listener
|
|
730
681
|
const currentTarget = eventCurrentTargetGetter.call(event);
|
|
731
|
-
|
|
682
|
+
const actualTarget = getActualTarget(event);
|
|
732
683
|
|
|
733
|
-
if (
|
|
734
|
-
shouldInvoke = shouldInvokeCustomElementListener(event);
|
|
735
|
-
} else {
|
|
736
|
-
const actualTarget = getActualTarget(event);
|
|
737
|
-
shouldInvoke = shouldInvokeListener(event, actualTarget, currentTarget);
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
if (shouldInvoke) {
|
|
684
|
+
if (shouldInvokeListener(event, actualTarget, currentTarget)) {
|
|
741
685
|
listener.call(currentTarget, event);
|
|
742
686
|
}
|
|
743
687
|
};
|
|
@@ -858,70 +802,6 @@ function detachDOMListener(elm, type, wrappedListener) {
|
|
|
858
802
|
}
|
|
859
803
|
}
|
|
860
804
|
|
|
861
|
-
function shouldInvokeCustomElementListener(event) {
|
|
862
|
-
const {
|
|
863
|
-
composed
|
|
864
|
-
} = event;
|
|
865
|
-
|
|
866
|
-
if (isTrue(composed)) {
|
|
867
|
-
// Listeners on host elements should always be invoked for {composed: true} events.
|
|
868
|
-
return true;
|
|
869
|
-
} // If this {composed: false} event was dispatched on any root.
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
if (eventToShadowRootMap.has(event)) {
|
|
873
|
-
return false;
|
|
874
|
-
}
|
|
875
|
-
|
|
876
|
-
const target = eventTargetGetter.call(event);
|
|
877
|
-
const currentTarget = eventCurrentTargetGetter.call(event); // If this {composed: false} event was dispatched on the current target host.
|
|
878
|
-
|
|
879
|
-
if (target === currentTarget) {
|
|
880
|
-
return true;
|
|
881
|
-
} // At this point the event must be {bubbles: true, composed: false} and was dispatched from a
|
|
882
|
-
// shadow-excluding descendant node. In this case, we only invoke the listener if the target
|
|
883
|
-
// host was assigned to a slot in the composed subtree of the current target host.
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
const targetHost = getRootNodeHost(target, GET_ROOT_NODE_CONFIG_FALSE);
|
|
887
|
-
const currentTargetHost = currentTarget;
|
|
888
|
-
return isChildNode(targetHost, currentTargetHost);
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
function shouldInvokeShadowRootListener(event) {
|
|
892
|
-
const {
|
|
893
|
-
composed
|
|
894
|
-
} = event;
|
|
895
|
-
const target = eventTargetGetter.call(event);
|
|
896
|
-
const currentTarget = eventCurrentTargetGetter.call(event); // If the event was dispatched on the host or its root.
|
|
897
|
-
|
|
898
|
-
if (target === currentTarget) {
|
|
899
|
-
// Invoke the listener if the event was dispatched directly on the root.
|
|
900
|
-
return eventToShadowRootMap.get(event) === getShadowRoot(target);
|
|
901
|
-
} // At this point the event is {bubbles: true} and was dispatched from a shadow-including descendant node.
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
if (isTrue(composed)) {
|
|
905
|
-
// Invoke the listener if the event is {composed: true}.
|
|
906
|
-
return true;
|
|
907
|
-
} // At this point the event must be {bubbles: true, composed: false}.
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
if (isTrue(eventToShadowRootMap.has(event))) {
|
|
911
|
-
// Don't invoke the listener because the event was dispatched on a descendant root.
|
|
912
|
-
return false;
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
const targetHost = getRootNodeHost(target, GET_ROOT_NODE_CONFIG_FALSE);
|
|
916
|
-
const currentTargetHost = currentTarget;
|
|
917
|
-
const isCurrentTargetSlotted = isChildNode(targetHost, currentTargetHost); // At this point the event must be {bubbles: true, composed: false} and was dispatched from a
|
|
918
|
-
// shadow-excluding descendant node. In this case, we only invoke the listener if the target
|
|
919
|
-
// host was assigned to a slot in the composed subtree of the current target host, or the
|
|
920
|
-
// descendant node is in the shadow tree of the current root.
|
|
921
|
-
|
|
922
|
-
return isCurrentTargetSlotted || targetHost === currentTargetHost;
|
|
923
|
-
}
|
|
924
|
-
|
|
925
805
|
function addCustomElementEventListener(type, listener, _options) {
|
|
926
806
|
if (process.env.NODE_ENV !== 'production') {
|
|
927
807
|
if (!isFunction(listener)) {
|
|
@@ -1669,6 +1549,20 @@ function getOuterHTML(node) {
|
|
|
1669
1549
|
}
|
|
1670
1550
|
}
|
|
1671
1551
|
}
|
|
1552
|
+
/**
|
|
1553
|
+
* Copyright (C) 2018 salesforce.com, inc.
|
|
1554
|
+
*/
|
|
1555
|
+
|
|
1556
|
+
|
|
1557
|
+
if (!_globalThis.lwcRuntimeFlags) {
|
|
1558
|
+
Object.defineProperty(_globalThis, 'lwcRuntimeFlags', {
|
|
1559
|
+
value: create(null)
|
|
1560
|
+
});
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
const runtimeFlags = _globalThis.lwcRuntimeFlags;
|
|
1564
|
+
/** version: 2.7.0 */
|
|
1565
|
+
|
|
1672
1566
|
/*
|
|
1673
1567
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
1674
1568
|
* All rights reserved.
|
|
@@ -1683,7 +1577,6 @@ function getOuterHTML(node) {
|
|
|
1683
1577
|
* because we don't want to patch the children getters for those elements.
|
|
1684
1578
|
*/
|
|
1685
1579
|
|
|
1686
|
-
|
|
1687
1580
|
function hasMountedChildren(node) {
|
|
1688
1581
|
return isSyntheticSlotElement(node) || isSyntheticShadowHost(node);
|
|
1689
1582
|
}
|
|
@@ -2302,6 +2195,12 @@ const SyntheticShadowRootDescriptors = {
|
|
|
2302
2195
|
return `[object ShadowRoot]`;
|
|
2303
2196
|
}
|
|
2304
2197
|
|
|
2198
|
+
},
|
|
2199
|
+
synthetic: {
|
|
2200
|
+
writable: false,
|
|
2201
|
+
enumerable: false,
|
|
2202
|
+
configurable: false,
|
|
2203
|
+
value: true
|
|
2305
2204
|
}
|
|
2306
2205
|
};
|
|
2307
2206
|
const ShadowRootDescriptors = {
|
|
@@ -5829,4 +5728,4 @@ defineProperty(Element.prototype, '$domManual$', {
|
|
|
5829
5728
|
|
|
5830
5729
|
configurable: true
|
|
5831
5730
|
});
|
|
5832
|
-
/** version: 2.
|
|
5731
|
+
/** version: 2.7.0 */
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
// we can't use typeof since it will fail when transpiling.
|
|
198
198
|
|
|
199
199
|
const hasNativeSymbolSupport = /*@__PURE__*/(() => Symbol('x').toString() === 'Symbol(x)')();
|
|
200
|
-
/** version: 2.
|
|
200
|
+
/** version: 2.7.0 */
|
|
201
201
|
|
|
202
202
|
/*
|
|
203
203
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -524,20 +524,6 @@
|
|
|
524
524
|
|
|
525
525
|
return cloned;
|
|
526
526
|
}
|
|
527
|
-
/**
|
|
528
|
-
* Copyright (C) 2018 salesforce.com, inc.
|
|
529
|
-
*/
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
if (!_globalThis.lwcRuntimeFlags) {
|
|
533
|
-
Object.defineProperty(_globalThis, 'lwcRuntimeFlags', {
|
|
534
|
-
value: create(null)
|
|
535
|
-
});
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
const runtimeFlags = _globalThis.lwcRuntimeFlags;
|
|
539
|
-
/** version: 2.5.10-alpha1 */
|
|
540
|
-
|
|
541
527
|
/*
|
|
542
528
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
543
529
|
* All rights reserved.
|
|
@@ -545,6 +531,7 @@
|
|
|
545
531
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
546
532
|
*/
|
|
547
533
|
|
|
534
|
+
|
|
548
535
|
const eventTargetPrototype = typeof EventTarget !== 'undefined' ? EventTarget.prototype : _Node.prototype;
|
|
549
536
|
const {
|
|
550
537
|
addEventListener,
|
|
@@ -599,19 +586,9 @@
|
|
|
599
586
|
assert.invariant(isFalse(isSyntheticShadowHost(currentTarget)), 'This routine should not be used to wrap event listeners for host elements and shadow roots.');
|
|
600
587
|
}
|
|
601
588
|
|
|
602
|
-
const
|
|
603
|
-
composed
|
|
604
|
-
} = event;
|
|
605
|
-
let shouldInvoke;
|
|
606
|
-
|
|
607
|
-
if (runtimeFlags.ENABLE_NON_COMPOSED_EVENTS_LEAKAGE) {
|
|
608
|
-
shouldInvoke = !(eventToShadowRootMap.has(event) && isFalse(composed));
|
|
609
|
-
} else {
|
|
610
|
-
const actualTarget = getActualTarget(event);
|
|
611
|
-
shouldInvoke = shouldInvokeListener(event, actualTarget, currentTarget);
|
|
612
|
-
}
|
|
589
|
+
const actualTarget = getActualTarget(event);
|
|
613
590
|
|
|
614
|
-
if (!
|
|
591
|
+
if (!shouldInvokeListener(event, actualTarget, currentTarget)) {
|
|
615
592
|
return;
|
|
616
593
|
}
|
|
617
594
|
|
|
@@ -632,25 +609,6 @@
|
|
|
632
609
|
|
|
633
610
|
|
|
634
611
|
const eventToContextMap = new WeakMap();
|
|
635
|
-
|
|
636
|
-
function isChildNode(root, node) {
|
|
637
|
-
return !!(compareDocumentPosition.call(root, node) & DOCUMENT_POSITION_CONTAINED_BY);
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
const GET_ROOT_NODE_CONFIG_FALSE = {
|
|
641
|
-
composed: false
|
|
642
|
-
};
|
|
643
|
-
|
|
644
|
-
function getRootNodeHost(node, options) {
|
|
645
|
-
let rootNode = node.getRootNode(options);
|
|
646
|
-
|
|
647
|
-
if (isSyntheticShadowRoot(rootNode)) {
|
|
648
|
-
rootNode = getHost(rootNode);
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
return rootNode;
|
|
652
|
-
}
|
|
653
|
-
|
|
654
612
|
const customElementToWrappedListeners = new WeakMap();
|
|
655
613
|
|
|
656
614
|
function getEventMap(elm) {
|
|
@@ -695,16 +653,9 @@
|
|
|
695
653
|
currentTarget = getShadowRoot(currentTarget);
|
|
696
654
|
}
|
|
697
655
|
|
|
698
|
-
|
|
656
|
+
const actualTarget = getActualTarget(event);
|
|
699
657
|
|
|
700
|
-
if (
|
|
701
|
-
shouldInvoke = shouldInvokeShadowRootListener(event);
|
|
702
|
-
} else {
|
|
703
|
-
const actualTarget = getActualTarget(event);
|
|
704
|
-
shouldInvoke = shouldInvokeListener(event, actualTarget, currentTarget);
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
if (shouldInvoke) {
|
|
658
|
+
if (shouldInvokeListener(event, actualTarget, currentTarget)) {
|
|
708
659
|
listener.call(currentTarget, event);
|
|
709
660
|
}
|
|
710
661
|
};
|
|
@@ -731,16 +682,9 @@
|
|
|
731
682
|
customElementWrappedListener = function (event) {
|
|
732
683
|
// currentTarget is always defined inside an event listener
|
|
733
684
|
const currentTarget = eventCurrentTargetGetter.call(event);
|
|
734
|
-
|
|
685
|
+
const actualTarget = getActualTarget(event);
|
|
735
686
|
|
|
736
|
-
if (
|
|
737
|
-
shouldInvoke = shouldInvokeCustomElementListener(event);
|
|
738
|
-
} else {
|
|
739
|
-
const actualTarget = getActualTarget(event);
|
|
740
|
-
shouldInvoke = shouldInvokeListener(event, actualTarget, currentTarget);
|
|
741
|
-
}
|
|
742
|
-
|
|
743
|
-
if (shouldInvoke) {
|
|
687
|
+
if (shouldInvokeListener(event, actualTarget, currentTarget)) {
|
|
744
688
|
listener.call(currentTarget, event);
|
|
745
689
|
}
|
|
746
690
|
};
|
|
@@ -861,70 +805,6 @@
|
|
|
861
805
|
}
|
|
862
806
|
}
|
|
863
807
|
|
|
864
|
-
function shouldInvokeCustomElementListener(event) {
|
|
865
|
-
const {
|
|
866
|
-
composed
|
|
867
|
-
} = event;
|
|
868
|
-
|
|
869
|
-
if (isTrue(composed)) {
|
|
870
|
-
// Listeners on host elements should always be invoked for {composed: true} events.
|
|
871
|
-
return true;
|
|
872
|
-
} // If this {composed: false} event was dispatched on any root.
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
if (eventToShadowRootMap.has(event)) {
|
|
876
|
-
return false;
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
const target = eventTargetGetter.call(event);
|
|
880
|
-
const currentTarget = eventCurrentTargetGetter.call(event); // If this {composed: false} event was dispatched on the current target host.
|
|
881
|
-
|
|
882
|
-
if (target === currentTarget) {
|
|
883
|
-
return true;
|
|
884
|
-
} // At this point the event must be {bubbles: true, composed: false} and was dispatched from a
|
|
885
|
-
// shadow-excluding descendant node. In this case, we only invoke the listener if the target
|
|
886
|
-
// host was assigned to a slot in the composed subtree of the current target host.
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
const targetHost = getRootNodeHost(target, GET_ROOT_NODE_CONFIG_FALSE);
|
|
890
|
-
const currentTargetHost = currentTarget;
|
|
891
|
-
return isChildNode(targetHost, currentTargetHost);
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
function shouldInvokeShadowRootListener(event) {
|
|
895
|
-
const {
|
|
896
|
-
composed
|
|
897
|
-
} = event;
|
|
898
|
-
const target = eventTargetGetter.call(event);
|
|
899
|
-
const currentTarget = eventCurrentTargetGetter.call(event); // If the event was dispatched on the host or its root.
|
|
900
|
-
|
|
901
|
-
if (target === currentTarget) {
|
|
902
|
-
// Invoke the listener if the event was dispatched directly on the root.
|
|
903
|
-
return eventToShadowRootMap.get(event) === getShadowRoot(target);
|
|
904
|
-
} // At this point the event is {bubbles: true} and was dispatched from a shadow-including descendant node.
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
if (isTrue(composed)) {
|
|
908
|
-
// Invoke the listener if the event is {composed: true}.
|
|
909
|
-
return true;
|
|
910
|
-
} // At this point the event must be {bubbles: true, composed: false}.
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
if (isTrue(eventToShadowRootMap.has(event))) {
|
|
914
|
-
// Don't invoke the listener because the event was dispatched on a descendant root.
|
|
915
|
-
return false;
|
|
916
|
-
}
|
|
917
|
-
|
|
918
|
-
const targetHost = getRootNodeHost(target, GET_ROOT_NODE_CONFIG_FALSE);
|
|
919
|
-
const currentTargetHost = currentTarget;
|
|
920
|
-
const isCurrentTargetSlotted = isChildNode(targetHost, currentTargetHost); // At this point the event must be {bubbles: true, composed: false} and was dispatched from a
|
|
921
|
-
// shadow-excluding descendant node. In this case, we only invoke the listener if the target
|
|
922
|
-
// host was assigned to a slot in the composed subtree of the current target host, or the
|
|
923
|
-
// descendant node is in the shadow tree of the current root.
|
|
924
|
-
|
|
925
|
-
return isCurrentTargetSlotted || targetHost === currentTargetHost;
|
|
926
|
-
}
|
|
927
|
-
|
|
928
808
|
function addCustomElementEventListener(type, listener, _options) {
|
|
929
809
|
if (process.env.NODE_ENV !== 'production') {
|
|
930
810
|
if (!isFunction(listener)) {
|
|
@@ -1672,6 +1552,20 @@
|
|
|
1672
1552
|
}
|
|
1673
1553
|
}
|
|
1674
1554
|
}
|
|
1555
|
+
/**
|
|
1556
|
+
* Copyright (C) 2018 salesforce.com, inc.
|
|
1557
|
+
*/
|
|
1558
|
+
|
|
1559
|
+
|
|
1560
|
+
if (!_globalThis.lwcRuntimeFlags) {
|
|
1561
|
+
Object.defineProperty(_globalThis, 'lwcRuntimeFlags', {
|
|
1562
|
+
value: create(null)
|
|
1563
|
+
});
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
const runtimeFlags = _globalThis.lwcRuntimeFlags;
|
|
1567
|
+
/** version: 2.7.0 */
|
|
1568
|
+
|
|
1675
1569
|
/*
|
|
1676
1570
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
1677
1571
|
* All rights reserved.
|
|
@@ -1686,7 +1580,6 @@
|
|
|
1686
1580
|
* because we don't want to patch the children getters for those elements.
|
|
1687
1581
|
*/
|
|
1688
1582
|
|
|
1689
|
-
|
|
1690
1583
|
function hasMountedChildren(node) {
|
|
1691
1584
|
return isSyntheticSlotElement(node) || isSyntheticShadowHost(node);
|
|
1692
1585
|
}
|
|
@@ -2305,6 +2198,12 @@
|
|
|
2305
2198
|
return `[object ShadowRoot]`;
|
|
2306
2199
|
}
|
|
2307
2200
|
|
|
2201
|
+
},
|
|
2202
|
+
synthetic: {
|
|
2203
|
+
writable: false,
|
|
2204
|
+
enumerable: false,
|
|
2205
|
+
configurable: false,
|
|
2206
|
+
value: true
|
|
2308
2207
|
}
|
|
2309
2208
|
};
|
|
2310
2209
|
const ShadowRootDescriptors = {
|
|
@@ -5832,6 +5731,6 @@
|
|
|
5832
5731
|
|
|
5833
5732
|
configurable: true
|
|
5834
5733
|
});
|
|
5835
|
-
/** version: 2.
|
|
5734
|
+
/** version: 2.7.0 */
|
|
5836
5735
|
|
|
5837
|
-
}()
|
|
5736
|
+
})();
|