lwc 2.23.4 → 2.23.6
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 -63
- package/dist/engine-dom/iife/es2017/engine-dom.js +168 -63
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +166 -61
- package/dist/engine-dom/iife/es5/engine-dom.js +405 -294
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +403 -292
- package/dist/engine-dom/umd/es2017/engine-dom.js +168 -63
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +166 -61
- package/dist/engine-dom/umd/es5/engine-dom.js +405 -294
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +403 -292
- package/dist/engine-server/commonjs/es2017/engine-server.js +67 -10
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
- package/dist/engine-server/esm/es2017/engine-server.js +67 -10
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +55 -36
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +55 -36
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +52 -32
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +24 -18
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +24 -18
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +55 -36
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +52 -32
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +24 -18
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +24 -18
- 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 +2 -2
- package/dist/wire-service/iife/es5/wire-service_debug.js +2 -2
- 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 +2 -2
- package/dist/wire-service/umd/es5/wire-service_debug.js +2 -2
- package/package.json +7 -7
|
@@ -349,7 +349,7 @@
|
|
|
349
349
|
CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
|
|
350
350
|
return attributeName;
|
|
351
351
|
}
|
|
352
|
-
/** version: 2.23.
|
|
352
|
+
/** version: 2.23.6 */
|
|
353
353
|
|
|
354
354
|
/**
|
|
355
355
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -443,7 +443,7 @@
|
|
|
443
443
|
patch$1(propName);
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
|
-
/** version: 2.23.
|
|
446
|
+
/** version: 2.23.6 */
|
|
447
447
|
|
|
448
448
|
/**
|
|
449
449
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -469,7 +469,8 @@
|
|
|
469
469
|
ENABLE_NODE_LIST_PATCH: null,
|
|
470
470
|
ENABLE_NODE_PATCH: null,
|
|
471
471
|
ENABLE_REACTIVE_SETTER: null,
|
|
472
|
-
ENABLE_WIRE_SYNC_EMIT: null
|
|
472
|
+
ENABLE_WIRE_SYNC_EMIT: null,
|
|
473
|
+
ENABLE_LIGHT_GET_ROOT_NODE_PATCH: null
|
|
473
474
|
};
|
|
474
475
|
|
|
475
476
|
if (!_globalThis.lwcRuntimeFlags) {
|
|
@@ -3578,6 +3579,12 @@
|
|
|
3578
3579
|
n2.elm = n1.elm;
|
|
3579
3580
|
break;
|
|
3580
3581
|
|
|
3582
|
+
case 5
|
|
3583
|
+
/* VNodeType.Fragment */
|
|
3584
|
+
:
|
|
3585
|
+
patchFragment(n1, n2, parent, renderer);
|
|
3586
|
+
break;
|
|
3587
|
+
|
|
3581
3588
|
case 2
|
|
3582
3589
|
/* VNodeType.Element */
|
|
3583
3590
|
:
|
|
@@ -3617,6 +3624,12 @@
|
|
|
3617
3624
|
mountStatic(node, parent, anchor, renderer);
|
|
3618
3625
|
break;
|
|
3619
3626
|
|
|
3627
|
+
case 5
|
|
3628
|
+
/* VNodeType.Fragment */
|
|
3629
|
+
:
|
|
3630
|
+
mountFragment(node, parent, anchor, renderer);
|
|
3631
|
+
break;
|
|
3632
|
+
|
|
3620
3633
|
case 2
|
|
3621
3634
|
/* VNodeType.Element */
|
|
3622
3635
|
:
|
|
@@ -3666,6 +3679,27 @@
|
|
|
3666
3679
|
insertNode(commentNode, parent, anchor, renderer);
|
|
3667
3680
|
}
|
|
3668
3681
|
|
|
3682
|
+
function mountFragment(vnode, parent, anchor, renderer) {
|
|
3683
|
+
var children = vnode.children;
|
|
3684
|
+
mountVNodes(children, parent, renderer, anchor); // children of a fragment will always have at least the two delimiters.
|
|
3685
|
+
|
|
3686
|
+
vnode.elm = children[children.length - 1].elm;
|
|
3687
|
+
}
|
|
3688
|
+
|
|
3689
|
+
function patchFragment(n1, n2, parent, renderer) {
|
|
3690
|
+
var children = n2.children,
|
|
3691
|
+
stable = n2.stable;
|
|
3692
|
+
|
|
3693
|
+
if (stable) {
|
|
3694
|
+
updateStaticChildren(n1.children, children, parent, renderer);
|
|
3695
|
+
} else {
|
|
3696
|
+
updateDynamicChildren(n1.children, children, parent, renderer);
|
|
3697
|
+
} // Note: not reusing n1.elm, because during patching, it may be patched with another text node.
|
|
3698
|
+
|
|
3699
|
+
|
|
3700
|
+
n2.elm = children[children.length - 1].elm;
|
|
3701
|
+
}
|
|
3702
|
+
|
|
3669
3703
|
function mountElement(vnode, parent, anchor, renderer) {
|
|
3670
3704
|
var sel = vnode.sel,
|
|
3671
3705
|
owner = vnode.owner,
|
|
@@ -3808,9 +3842,15 @@
|
|
|
3808
3842
|
// subtree root, is the only element worth unmounting from the subtree.
|
|
3809
3843
|
|
|
3810
3844
|
if (doRemove) {
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3845
|
+
if (type === 5
|
|
3846
|
+
/* VNodeType.Fragment */
|
|
3847
|
+
) {
|
|
3848
|
+
unmountVNodes(vnode.children, parent, renderer, doRemove);
|
|
3849
|
+
} else {
|
|
3850
|
+
// The vnode might or might not have a data.renderer associated to it
|
|
3851
|
+
// but the removal used here is from the owner instead.
|
|
3852
|
+
removeNode(elm, parent, renderer);
|
|
3853
|
+
}
|
|
3814
3854
|
}
|
|
3815
3855
|
|
|
3816
3856
|
switch (type) {
|
|
@@ -4254,6 +4294,21 @@
|
|
|
4254
4294
|
fragment: fragment,
|
|
4255
4295
|
owner: getVMBeingRendered()
|
|
4256
4296
|
};
|
|
4297
|
+
} // [fr]agment node
|
|
4298
|
+
|
|
4299
|
+
|
|
4300
|
+
function fr(key, children, stable) {
|
|
4301
|
+
return {
|
|
4302
|
+
type: 5
|
|
4303
|
+
/* VNodeType.Fragment */
|
|
4304
|
+
,
|
|
4305
|
+
sel: undefined,
|
|
4306
|
+
key: key,
|
|
4307
|
+
elm: undefined,
|
|
4308
|
+
children: [t('')].concat(_toConsumableArray(children), [t('')]),
|
|
4309
|
+
stable: stable,
|
|
4310
|
+
owner: getVMBeingRendered()
|
|
4311
|
+
};
|
|
4257
4312
|
} // [h]tml node
|
|
4258
4313
|
|
|
4259
4314
|
|
|
@@ -4421,7 +4476,7 @@
|
|
|
4421
4476
|
|
|
4422
4477
|
|
|
4423
4478
|
function co(text) {
|
|
4424
|
-
var sel,
|
|
4479
|
+
var sel, elm;
|
|
4425
4480
|
return {
|
|
4426
4481
|
type: 1
|
|
4427
4482
|
/* VNodeType.Comment */
|
|
@@ -4429,7 +4484,7 @@
|
|
|
4429
4484
|
sel: sel,
|
|
4430
4485
|
text: text,
|
|
4431
4486
|
elm: elm,
|
|
4432
|
-
key:
|
|
4487
|
+
key: 'c',
|
|
4433
4488
|
owner: getVMBeingRendered()
|
|
4434
4489
|
};
|
|
4435
4490
|
} // [d]ynamic text
|
|
@@ -4596,6 +4651,7 @@
|
|
|
4596
4651
|
k: k,
|
|
4597
4652
|
co: co,
|
|
4598
4653
|
dc: dc,
|
|
4654
|
+
fr: fr,
|
|
4599
4655
|
ti: ti,
|
|
4600
4656
|
st: st,
|
|
4601
4657
|
gid: gid,
|
|
@@ -6066,6 +6122,13 @@
|
|
|
6066
6122
|
hydratedNode = hydrateStaticElement(node, vnode, renderer);
|
|
6067
6123
|
break;
|
|
6068
6124
|
|
|
6125
|
+
case 5
|
|
6126
|
+
/* VNodeType.Fragment */
|
|
6127
|
+
:
|
|
6128
|
+
// a fragment does not represent any element, therefore there is no need to use a custom renderer.
|
|
6129
|
+
hydratedNode = hydrateFragment(node, vnode, renderer);
|
|
6130
|
+
break;
|
|
6131
|
+
|
|
6069
6132
|
case 2
|
|
6070
6133
|
/* VNodeType.Element */
|
|
6071
6134
|
:
|
|
@@ -6123,6 +6186,13 @@
|
|
|
6123
6186
|
return elm;
|
|
6124
6187
|
}
|
|
6125
6188
|
|
|
6189
|
+
function hydrateFragment(elm, vnode, renderer) {
|
|
6190
|
+
var children = vnode.children,
|
|
6191
|
+
owner = vnode.owner;
|
|
6192
|
+
hydrateChildren(elm, children, renderer.getProperty(elm, 'parentNode'), owner);
|
|
6193
|
+
return vnode.elm = children[children.length - 1].elm;
|
|
6194
|
+
}
|
|
6195
|
+
|
|
6126
6196
|
function hydrateElement(elm, vnode, renderer) {
|
|
6127
6197
|
if (!hasCorrectNodeType(vnode, elm, 1
|
|
6128
6198
|
/* EnvNodeTypes.ELEMENT */
|
|
@@ -6490,7 +6560,7 @@
|
|
|
6490
6560
|
|
|
6491
6561
|
return ctor;
|
|
6492
6562
|
}
|
|
6493
|
-
/* version: 2.23.
|
|
6563
|
+
/* version: 2.23.6 */
|
|
6494
6564
|
|
|
6495
6565
|
/*
|
|
6496
6566
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -6661,356 +6731,397 @@
|
|
|
6661
6731
|
|
|
6662
6732
|
|
|
6663
6733
|
function rendererFactory(baseRenderer) {
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
6734
|
+
var renderer = function (exports) {
|
|
6735
|
+
/**
|
|
6736
|
+
* Copyright (C) 2018 salesforce.com, inc.
|
|
6737
|
+
*/
|
|
6738
|
+
|
|
6739
|
+
/*
|
|
6740
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
6741
|
+
* All rights reserved.
|
|
6742
|
+
* SPDX-License-Identifier: MIT
|
|
6743
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
6744
|
+
*/
|
|
6745
|
+
function invariant(value, msg) {
|
|
6746
|
+
if (!value) {
|
|
6747
|
+
throw new Error("Invariant Violation: ".concat(msg));
|
|
6748
|
+
}
|
|
6668
6749
|
}
|
|
6669
|
-
}
|
|
6670
6750
|
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6751
|
+
function isTrue$1(value, msg) {
|
|
6752
|
+
if (!value) {
|
|
6753
|
+
throw new Error("Assert Violation: ".concat(msg));
|
|
6754
|
+
}
|
|
6755
|
+
}
|
|
6674
6756
|
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6757
|
+
function isFalse$1(value, msg) {
|
|
6758
|
+
if (value) {
|
|
6759
|
+
throw new Error("Assert Violation: ".concat(msg));
|
|
6760
|
+
}
|
|
6761
|
+
}
|
|
6678
6762
|
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6763
|
+
function fail(msg) {
|
|
6764
|
+
throw new Error(msg);
|
|
6765
|
+
}
|
|
6682
6766
|
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
|
|
6767
|
+
var assert = /*#__PURE__*/Object.freeze({
|
|
6768
|
+
__proto__: null,
|
|
6769
|
+
invariant: invariant,
|
|
6770
|
+
isTrue: isTrue$1,
|
|
6771
|
+
isFalse: isFalse$1,
|
|
6772
|
+
fail: fail
|
|
6773
|
+
});
|
|
6774
|
+
|
|
6775
|
+
function isUndefined(obj) {
|
|
6776
|
+
return obj === undefined;
|
|
6686
6777
|
}
|
|
6687
6778
|
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
|
|
6692
|
-
// get wrapped by babel.
|
|
6693
|
-
var HTMLElementAlias = HTMLElement; // In case we use compat mode with a modern browser, the compat mode transformation
|
|
6694
|
-
// invokes the DOM api with an .apply() or .call() to initialize any DOM api sub-classing,
|
|
6695
|
-
// which are not equipped to be initialized that way.
|
|
6779
|
+
function isNull(obj) {
|
|
6780
|
+
return obj === null;
|
|
6781
|
+
}
|
|
6782
|
+
/** version: 2.23.6 */
|
|
6696
6783
|
|
|
6697
|
-
|
|
6698
|
-
|
|
6784
|
+
/*
|
|
6785
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
6786
|
+
* All rights reserved.
|
|
6787
|
+
* SPDX-License-Identifier: MIT
|
|
6788
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
6789
|
+
*/
|
|
6699
6790
|
|
|
6700
|
-
var _super7 = _createSuper(clazz);
|
|
6701
6791
|
|
|
6702
|
-
|
|
6703
|
-
|
|
6792
|
+
exports.getCustomElement = void 0;
|
|
6793
|
+
exports.defineCustomElement = void 0;
|
|
6794
|
+
var HTMLElementConstructor;
|
|
6704
6795
|
|
|
6705
|
-
|
|
6706
|
-
|
|
6796
|
+
function isCustomElementRegistryAvailable() {
|
|
6797
|
+
if (typeof customElements === 'undefined') {
|
|
6798
|
+
return false;
|
|
6799
|
+
}
|
|
6707
6800
|
|
|
6708
|
-
|
|
6709
|
-
|
|
6801
|
+
try {
|
|
6802
|
+
// dereference HTMLElement global because babel wraps globals in compat mode with a
|
|
6803
|
+
// _wrapNativeSuper()
|
|
6804
|
+
// This is a problem because LWCUpgradableElement extends renderer.HTMLElementExported which does not
|
|
6805
|
+
// get wrapped by babel.
|
|
6806
|
+
var HTMLElementAlias = HTMLElement; // In case we use compat mode with a modern browser, the compat mode transformation
|
|
6807
|
+
// invokes the DOM api with an .apply() or .call() to initialize any DOM api sub-classing,
|
|
6808
|
+
// which are not equipped to be initialized that way.
|
|
6710
6809
|
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
return true;
|
|
6714
|
-
} catch (_a) {
|
|
6715
|
-
return false;
|
|
6716
|
-
}
|
|
6717
|
-
}
|
|
6810
|
+
var clazz = /*#__PURE__*/function (_HTMLElementAlias) {
|
|
6811
|
+
_inherits(clazz, _HTMLElementAlias);
|
|
6718
6812
|
|
|
6719
|
-
|
|
6720
|
-
getCustomElement = customElements.get.bind(customElements);
|
|
6721
|
-
defineCustomElement = customElements.define.bind(customElements);
|
|
6722
|
-
HTMLElementConstructor = HTMLElement;
|
|
6723
|
-
} else {
|
|
6724
|
-
var registry = Object.create(null);
|
|
6725
|
-
var reverseRegistry = new WeakMap();
|
|
6813
|
+
var _super7 = _createSuper(clazz);
|
|
6726
6814
|
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
throw new TypeError("Invalid Registration");
|
|
6730
|
-
}
|
|
6815
|
+
function clazz() {
|
|
6816
|
+
_classCallCheck(this, clazz);
|
|
6731
6817
|
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
};
|
|
6818
|
+
return _super7.apply(this, arguments);
|
|
6819
|
+
}
|
|
6735
6820
|
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
};
|
|
6821
|
+
return _createClass(clazz);
|
|
6822
|
+
}(HTMLElementAlias);
|
|
6739
6823
|
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
6824
|
+
customElements.define('lwc-test-' + Math.floor(Math.random() * 1000000), clazz);
|
|
6825
|
+
new clazz();
|
|
6826
|
+
return true;
|
|
6827
|
+
} catch (_a) {
|
|
6828
|
+
return false;
|
|
6743
6829
|
}
|
|
6830
|
+
}
|
|
6744
6831
|
|
|
6745
|
-
|
|
6746
|
-
|
|
6832
|
+
if (isCustomElementRegistryAvailable()) {
|
|
6833
|
+
exports.getCustomElement = customElements.get.bind(customElements);
|
|
6834
|
+
exports.defineCustomElement = customElements.define.bind(customElements);
|
|
6835
|
+
HTMLElementConstructor = HTMLElement;
|
|
6836
|
+
} else {
|
|
6837
|
+
var registry = Object.create(null);
|
|
6838
|
+
var reverseRegistry = new WeakMap();
|
|
6747
6839
|
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6840
|
+
exports.defineCustomElement = function define(name, ctor) {
|
|
6841
|
+
if (name !== String.prototype.toLowerCase.call(name) || registry[name]) {
|
|
6842
|
+
throw new TypeError("Invalid Registration");
|
|
6843
|
+
}
|
|
6751
6844
|
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
};
|
|
6845
|
+
registry[name] = ctor;
|
|
6846
|
+
reverseRegistry.set(ctor, name);
|
|
6847
|
+
};
|
|
6756
6848
|
|
|
6757
|
-
|
|
6758
|
-
|
|
6849
|
+
exports.getCustomElement = function get(name) {
|
|
6850
|
+
return registry[name];
|
|
6851
|
+
};
|
|
6759
6852
|
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
|
|
6853
|
+
HTMLElementConstructor = function HTMLElement() {
|
|
6854
|
+
if (!(this instanceof HTMLElement)) {
|
|
6855
|
+
throw new TypeError("Invalid Invocation");
|
|
6856
|
+
}
|
|
6763
6857
|
|
|
6764
|
-
|
|
6765
|
-
|
|
6766
|
-
}
|
|
6858
|
+
var constructor = this.constructor;
|
|
6859
|
+
var name = reverseRegistry.get(constructor);
|
|
6767
6860
|
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6861
|
+
if (!name) {
|
|
6862
|
+
throw new TypeError("Invalid Construction");
|
|
6863
|
+
}
|
|
6771
6864
|
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
6865
|
+
var elm = document.createElement(name);
|
|
6866
|
+
Object.setPrototypeOf(elm, constructor.prototype);
|
|
6867
|
+
return elm;
|
|
6868
|
+
};
|
|
6775
6869
|
|
|
6776
|
-
|
|
6870
|
+
HTMLElementConstructor.prototype = HTMLElement.prototype;
|
|
6871
|
+
}
|
|
6777
6872
|
|
|
6778
|
-
|
|
6873
|
+
function cloneNode(node, deep) {
|
|
6874
|
+
return node.cloneNode(deep);
|
|
6875
|
+
}
|
|
6779
6876
|
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
return
|
|
6786
|
-
}
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
//
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
|
|
6796
|
-
|
|
6797
|
-
|
|
6798
|
-
|
|
6799
|
-
|
|
6800
|
-
|
|
6801
|
-
|
|
6802
|
-
|
|
6803
|
-
|
|
6804
|
-
|
|
6805
|
-
|
|
6806
|
-
|
|
6807
|
-
|
|
6808
|
-
|
|
6809
|
-
|
|
6810
|
-
|
|
6811
|
-
|
|
6812
|
-
|
|
6813
|
-
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6877
|
+
function createElement(tagName, namespace) {
|
|
6878
|
+
return isUndefined(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
|
|
6879
|
+
}
|
|
6880
|
+
|
|
6881
|
+
function createText(content) {
|
|
6882
|
+
return document.createTextNode(content);
|
|
6883
|
+
}
|
|
6884
|
+
|
|
6885
|
+
function createComment(content) {
|
|
6886
|
+
return document.createComment(content);
|
|
6887
|
+
}
|
|
6888
|
+
|
|
6889
|
+
exports.createFragment = void 0; // IE11 lacks support for this feature
|
|
6890
|
+
|
|
6891
|
+
var SUPPORTS_TEMPLATE = typeof HTMLTemplateElement === 'function';
|
|
6892
|
+
|
|
6893
|
+
if (SUPPORTS_TEMPLATE) {
|
|
6894
|
+
// Parse the fragment HTML string into DOM
|
|
6895
|
+
exports.createFragment = function (html) {
|
|
6896
|
+
var template = document.createElement('template');
|
|
6897
|
+
template.innerHTML = html;
|
|
6898
|
+
return template.content.firstChild;
|
|
6899
|
+
};
|
|
6900
|
+
} else {
|
|
6901
|
+
// In browsers that don't support <template> (e.g. IE11), we need to be careful to wrap elements like
|
|
6902
|
+
// <td> in the proper container elements (e.g. <tbody>), because otherwise they will be parsed as null.
|
|
6903
|
+
// Via https://github.com/webcomponents/polyfills/blob/ee1db33/packages/template/template.js#L273-L280
|
|
6904
|
+
// With other elements added from:
|
|
6905
|
+
// https://github.com/sindresorhus/html-tags/blob/95dcdd5/index.js
|
|
6906
|
+
// Using the test:
|
|
6907
|
+
// document.createRange().createContextualFragment(`<${tag}></${tag}>`).firstChild === null
|
|
6908
|
+
// And omitting <html>, <head>, and <body> as these are not practical in an LWC component.
|
|
6909
|
+
var topLevelWrappingMap = {
|
|
6910
|
+
caption: ['table'],
|
|
6911
|
+
col: ['colgroup', 'table'],
|
|
6912
|
+
colgroup: ['table'],
|
|
6913
|
+
option: ['select'],
|
|
6914
|
+
tbody: ['table'],
|
|
6915
|
+
td: ['tr', 'tbody', 'table'],
|
|
6916
|
+
th: ['tr', 'tbody', 'table'],
|
|
6917
|
+
thead: ['table'],
|
|
6918
|
+
tfoot: ['table'],
|
|
6919
|
+
tr: ['tbody', 'table']
|
|
6920
|
+
}; // Via https://github.com/webcomponents/polyfills/blob/ee1db33/packages/template/template.js#L282-L288
|
|
6921
|
+
|
|
6922
|
+
var getTagName = function getTagName(text) {
|
|
6923
|
+
return (/<([a-z][^/\0>\x20\t\r\n\f]+)/i.exec(text) || ['', ''])[1].toLowerCase();
|
|
6924
|
+
}; // Via https://github.com/webcomponents/polyfills/blob/ee1db33/packages/template/template.js#L295-L320
|
|
6925
|
+
|
|
6926
|
+
|
|
6927
|
+
exports.createFragment = function (html) {
|
|
6928
|
+
var wrapperTags = topLevelWrappingMap[getTagName(html)];
|
|
6929
|
+
|
|
6930
|
+
if (!isUndefined(wrapperTags)) {
|
|
6931
|
+
var _iterator5 = _createForOfIteratorHelper(wrapperTags),
|
|
6932
|
+
_step5;
|
|
6933
|
+
|
|
6934
|
+
try {
|
|
6935
|
+
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
6936
|
+
var wrapperTag = _step5.value;
|
|
6937
|
+
html = "<".concat(wrapperTag, ">").concat(html, "</").concat(wrapperTag, ">");
|
|
6938
|
+
}
|
|
6939
|
+
} catch (err) {
|
|
6940
|
+
_iterator5.e(err);
|
|
6941
|
+
} finally {
|
|
6942
|
+
_iterator5.f();
|
|
6825
6943
|
}
|
|
6826
|
-
}
|
|
6827
|
-
|
|
6828
|
-
} finally {
|
|
6829
|
-
_iterator5.f();
|
|
6830
|
-
}
|
|
6831
|
-
} // For IE11, the document title must not be undefined, but it can be an empty string
|
|
6832
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createHTMLDocument#browser_compatibility
|
|
6944
|
+
} // For IE11, the document title must not be undefined, but it can be an empty string
|
|
6945
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createHTMLDocument#browser_compatibility
|
|
6833
6946
|
|
|
6834
6947
|
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
6948
|
+
var doc = document.implementation.createHTMLDocument('');
|
|
6949
|
+
doc.body.innerHTML = html;
|
|
6950
|
+
var content = doc.body;
|
|
6838
6951
|
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6952
|
+
if (!isUndefined(wrapperTags)) {
|
|
6953
|
+
for (var _i32 = 0; _i32 < wrapperTags.length; _i32++) {
|
|
6954
|
+
content = content.firstChild;
|
|
6955
|
+
}
|
|
6842
6956
|
}
|
|
6843
|
-
}
|
|
6844
6957
|
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6958
|
+
return content.firstChild;
|
|
6959
|
+
};
|
|
6960
|
+
}
|
|
6848
6961
|
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6962
|
+
function insert(node, parent, anchor) {
|
|
6963
|
+
parent.insertBefore(node, anchor);
|
|
6964
|
+
}
|
|
6852
6965
|
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6966
|
+
function remove(node, parent) {
|
|
6967
|
+
parent.removeChild(node);
|
|
6968
|
+
}
|
|
6856
6969
|
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
6970
|
+
function nextSibling(node) {
|
|
6971
|
+
return node.nextSibling;
|
|
6972
|
+
}
|
|
6973
|
+
|
|
6974
|
+
function attachShadow(element, options) {
|
|
6975
|
+
// `shadowRoot` will be non-null in two cases:
|
|
6976
|
+
// 1. upon initial load with an SSR-generated DOM, while in Shadow render mode
|
|
6977
|
+
// 2. when a webapp author places <c-app> in their static HTML and mounts their
|
|
6978
|
+
// root component with customElement.define('c-app', Ctor)
|
|
6979
|
+
if (!isNull(element.shadowRoot)) {
|
|
6980
|
+
return element.shadowRoot;
|
|
6981
|
+
}
|
|
6860
6982
|
|
|
6861
|
-
|
|
6862
|
-
// `shadowRoot` will be non-null in two cases:
|
|
6863
|
-
// 1. upon initial load with an SSR-generated DOM, while in Shadow render mode
|
|
6864
|
-
// 2. when a webapp author places <c-app> in their static HTML and mounts their
|
|
6865
|
-
// root component with customElement.define('c-app', Ctor)
|
|
6866
|
-
if (!isNull(element.shadowRoot)) {
|
|
6867
|
-
return element.shadowRoot;
|
|
6983
|
+
return element.attachShadow(options);
|
|
6868
6984
|
}
|
|
6869
6985
|
|
|
6870
|
-
|
|
6871
|
-
|
|
6986
|
+
function setText(node, content) {
|
|
6987
|
+
node.nodeValue = content;
|
|
6988
|
+
}
|
|
6872
6989
|
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
6990
|
+
function getProperty(node, key) {
|
|
6991
|
+
return node[key];
|
|
6992
|
+
}
|
|
6876
6993
|
|
|
6877
|
-
|
|
6878
|
-
|
|
6879
|
-
|
|
6994
|
+
function setProperty(node, key, value) {
|
|
6995
|
+
node[key] = value;
|
|
6996
|
+
}
|
|
6880
6997
|
|
|
6881
|
-
|
|
6882
|
-
|
|
6883
|
-
|
|
6998
|
+
function getAttribute(element, name, namespace) {
|
|
6999
|
+
return isUndefined(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
|
|
7000
|
+
}
|
|
6884
7001
|
|
|
6885
|
-
|
|
6886
|
-
|
|
6887
|
-
|
|
7002
|
+
function setAttribute(element, name, value, namespace) {
|
|
7003
|
+
return isUndefined(namespace) ? element.setAttribute(name, value) : element.setAttributeNS(namespace, name, value);
|
|
7004
|
+
}
|
|
6888
7005
|
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
|
|
7006
|
+
function removeAttribute(element, name, namespace) {
|
|
7007
|
+
if (isUndefined(namespace)) {
|
|
7008
|
+
element.removeAttribute(name);
|
|
7009
|
+
} else {
|
|
7010
|
+
element.removeAttributeNS(namespace, name);
|
|
7011
|
+
}
|
|
7012
|
+
}
|
|
6892
7013
|
|
|
6893
|
-
|
|
6894
|
-
|
|
6895
|
-
element.removeAttribute(name);
|
|
6896
|
-
} else {
|
|
6897
|
-
element.removeAttributeNS(namespace, name);
|
|
7014
|
+
function addEventListener(target, type, callback, options) {
|
|
7015
|
+
target.addEventListener(type, callback, options);
|
|
6898
7016
|
}
|
|
6899
|
-
}
|
|
6900
7017
|
|
|
6901
|
-
|
|
6902
|
-
|
|
6903
|
-
|
|
7018
|
+
function removeEventListener(target, type, callback, options) {
|
|
7019
|
+
target.removeEventListener(type, callback, options);
|
|
7020
|
+
}
|
|
6904
7021
|
|
|
6905
|
-
|
|
6906
|
-
|
|
6907
|
-
|
|
7022
|
+
function dispatchEvent(target, event) {
|
|
7023
|
+
return target.dispatchEvent(event);
|
|
7024
|
+
}
|
|
6908
7025
|
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
7026
|
+
function getClassList(element) {
|
|
7027
|
+
return element.classList;
|
|
7028
|
+
}
|
|
6912
7029
|
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
7030
|
+
function setCSSStyleProperty(element, name, value, important) {
|
|
7031
|
+
// TODO [#0]: How to avoid this type casting? Shall we use a different type interface to
|
|
7032
|
+
// represent elements in the engine?
|
|
7033
|
+
element.style.setProperty(name, value, important ? 'important' : '');
|
|
7034
|
+
}
|
|
6916
7035
|
|
|
6917
|
-
|
|
6918
|
-
|
|
6919
|
-
|
|
6920
|
-
element.style.setProperty(name, value, important ? 'important' : '');
|
|
6921
|
-
}
|
|
7036
|
+
function getBoundingClientRect(element) {
|
|
7037
|
+
return element.getBoundingClientRect();
|
|
7038
|
+
}
|
|
6922
7039
|
|
|
6923
|
-
|
|
6924
|
-
|
|
6925
|
-
|
|
7040
|
+
function querySelector(element, selectors) {
|
|
7041
|
+
return element.querySelector(selectors);
|
|
7042
|
+
}
|
|
6926
7043
|
|
|
6927
|
-
|
|
6928
|
-
|
|
6929
|
-
|
|
7044
|
+
function querySelectorAll(element, selectors) {
|
|
7045
|
+
return element.querySelectorAll(selectors);
|
|
7046
|
+
}
|
|
6930
7047
|
|
|
6931
|
-
|
|
6932
|
-
|
|
6933
|
-
|
|
7048
|
+
function getElementsByTagName(element, tagNameOrWildCard) {
|
|
7049
|
+
return element.getElementsByTagName(tagNameOrWildCard);
|
|
7050
|
+
}
|
|
6934
7051
|
|
|
6935
|
-
|
|
6936
|
-
|
|
6937
|
-
|
|
7052
|
+
function getElementsByClassName(element, names) {
|
|
7053
|
+
return element.getElementsByClassName(names);
|
|
7054
|
+
}
|
|
6938
7055
|
|
|
6939
|
-
|
|
6940
|
-
|
|
6941
|
-
|
|
7056
|
+
function getChildren(element) {
|
|
7057
|
+
return element.children;
|
|
7058
|
+
}
|
|
6942
7059
|
|
|
6943
|
-
|
|
6944
|
-
|
|
6945
|
-
|
|
7060
|
+
function getChildNodes(element) {
|
|
7061
|
+
return element.childNodes;
|
|
7062
|
+
}
|
|
6946
7063
|
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
7064
|
+
function getFirstChild(element) {
|
|
7065
|
+
return element.firstChild;
|
|
7066
|
+
}
|
|
6950
7067
|
|
|
6951
|
-
|
|
6952
|
-
|
|
6953
|
-
|
|
7068
|
+
function getFirstElementChild(element) {
|
|
7069
|
+
return element.firstElementChild;
|
|
7070
|
+
}
|
|
6954
7071
|
|
|
6955
|
-
|
|
6956
|
-
|
|
6957
|
-
|
|
7072
|
+
function getLastChild(element) {
|
|
7073
|
+
return element.lastChild;
|
|
7074
|
+
}
|
|
6958
7075
|
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
7076
|
+
function getLastElementChild(element) {
|
|
7077
|
+
return element.lastElementChild;
|
|
7078
|
+
}
|
|
6962
7079
|
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
7080
|
+
function isConnected(node) {
|
|
7081
|
+
return node.isConnected;
|
|
7082
|
+
}
|
|
6966
7083
|
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
7084
|
+
function assertInstanceOfHTMLElement(elm, msg) {
|
|
7085
|
+
assert.invariant(elm instanceof HTMLElement, msg);
|
|
7086
|
+
}
|
|
6970
7087
|
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
7088
|
+
var HTMLElementExported = HTMLElementConstructor;
|
|
7089
|
+
exports.HTMLElementExported = HTMLElementExported;
|
|
7090
|
+
exports.addEventListener = addEventListener;
|
|
7091
|
+
exports.assertInstanceOfHTMLElement = assertInstanceOfHTMLElement;
|
|
7092
|
+
exports.attachShadow = attachShadow;
|
|
7093
|
+
exports.cloneNode = cloneNode;
|
|
7094
|
+
exports.createComment = createComment;
|
|
7095
|
+
exports.createElement = createElement;
|
|
7096
|
+
exports.createText = createText;
|
|
7097
|
+
exports.dispatchEvent = dispatchEvent;
|
|
7098
|
+
exports.getAttribute = getAttribute;
|
|
7099
|
+
exports.getBoundingClientRect = getBoundingClientRect;
|
|
7100
|
+
exports.getChildNodes = getChildNodes;
|
|
7101
|
+
exports.getChildren = getChildren;
|
|
7102
|
+
exports.getClassList = getClassList;
|
|
7103
|
+
exports.getElementsByClassName = getElementsByClassName;
|
|
7104
|
+
exports.getElementsByTagName = getElementsByTagName;
|
|
7105
|
+
exports.getFirstChild = getFirstChild;
|
|
7106
|
+
exports.getFirstElementChild = getFirstElementChild;
|
|
7107
|
+
exports.getLastChild = getLastChild;
|
|
7108
|
+
exports.getLastElementChild = getLastElementChild;
|
|
7109
|
+
exports.getProperty = getProperty;
|
|
7110
|
+
exports.insert = insert;
|
|
7111
|
+
exports.isConnected = isConnected;
|
|
7112
|
+
exports.nextSibling = nextSibling;
|
|
7113
|
+
exports.querySelector = querySelector;
|
|
7114
|
+
exports.querySelectorAll = querySelectorAll;
|
|
7115
|
+
exports.remove = remove;
|
|
7116
|
+
exports.removeAttribute = removeAttribute;
|
|
7117
|
+
exports.removeEventListener = removeEventListener;
|
|
7118
|
+
exports.setAttribute = setAttribute;
|
|
7119
|
+
exports.setCSSStyleProperty = setCSSStyleProperty;
|
|
7120
|
+
exports.setProperty = setProperty;
|
|
7121
|
+
exports.setText = setText;
|
|
7122
|
+
return exports;
|
|
7123
|
+
}({}); // Meant to inherit any properties passed via the base renderer as the argument to the factory.
|
|
6974
7124
|
|
|
6975
|
-
var HTMLElementExported = HTMLElementConstructor;
|
|
6976
|
-
var renderer = {
|
|
6977
|
-
HTMLElementExported: HTMLElementExported,
|
|
6978
|
-
insert: insert,
|
|
6979
|
-
remove: remove,
|
|
6980
|
-
cloneNode: cloneNode,
|
|
6981
|
-
createFragment: createFragment,
|
|
6982
|
-
createElement: createElement,
|
|
6983
|
-
createText: createText,
|
|
6984
|
-
createComment: createComment,
|
|
6985
|
-
nextSibling: nextSibling,
|
|
6986
|
-
attachShadow: attachShadow,
|
|
6987
|
-
getProperty: getProperty,
|
|
6988
|
-
setProperty: setProperty,
|
|
6989
|
-
setText: setText,
|
|
6990
|
-
getAttribute: getAttribute,
|
|
6991
|
-
setAttribute: setAttribute,
|
|
6992
|
-
removeAttribute: removeAttribute,
|
|
6993
|
-
addEventListener: addEventListener,
|
|
6994
|
-
removeEventListener: removeEventListener,
|
|
6995
|
-
dispatchEvent: dispatchEvent,
|
|
6996
|
-
getClassList: getClassList,
|
|
6997
|
-
setCSSStyleProperty: setCSSStyleProperty,
|
|
6998
|
-
getBoundingClientRect: getBoundingClientRect,
|
|
6999
|
-
querySelector: querySelector,
|
|
7000
|
-
querySelectorAll: querySelectorAll,
|
|
7001
|
-
getElementsByTagName: getElementsByTagName,
|
|
7002
|
-
getElementsByClassName: getElementsByClassName,
|
|
7003
|
-
getChildren: getChildren,
|
|
7004
|
-
getChildNodes: getChildNodes,
|
|
7005
|
-
getFirstChild: getFirstChild,
|
|
7006
|
-
getFirstElementChild: getFirstElementChild,
|
|
7007
|
-
getLastChild: getLastChild,
|
|
7008
|
-
getLastElementChild: getLastElementChild,
|
|
7009
|
-
isConnected: isConnected,
|
|
7010
|
-
assertInstanceOfHTMLElement: assertInstanceOfHTMLElement,
|
|
7011
|
-
defineCustomElement: defineCustomElement,
|
|
7012
|
-
getCustomElement: getCustomElement
|
|
7013
|
-
}; // Meant to inherit any properties passed via the base renderer as the argument to the factory.
|
|
7014
7125
|
|
|
7015
7126
|
Object.setPrototypeOf(renderer, baseRenderer);
|
|
7016
7127
|
return renderer;
|
|
@@ -7391,7 +7502,7 @@
|
|
|
7391
7502
|
});
|
|
7392
7503
|
freeze(LightningElement);
|
|
7393
7504
|
seal(LightningElement.prototype);
|
|
7394
|
-
/* version: 2.23.
|
|
7505
|
+
/* version: 2.23.6 */
|
|
7395
7506
|
|
|
7396
7507
|
exports.LightningElement = LightningElement;
|
|
7397
7508
|
exports.__unstable__ProfilerControl = profilerControl;
|