lwc 2.27.0 → 2.28.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 +95 -32
- package/dist/engine-dom/iife/es2017/engine-dom.js +95 -32
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +79 -30
- package/dist/engine-dom/iife/es5/engine-dom.js +134 -46
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +115 -44
- package/dist/engine-dom/umd/es2017/engine-dom.js +95 -32
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +79 -30
- package/dist/engine-dom/umd/es5/engine-dom.js +134 -46
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +115 -44
- package/dist/engine-server/commonjs/es2017/engine-server.js +57 -26
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
- package/dist/engine-server/esm/es2017/engine-server.js +57 -26
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +4 -4
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +4 -4
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +4 -4
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +3 -3
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +4 -4
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +4 -4
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +3 -3
- 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
|
@@ -132,6 +132,7 @@ var LWC = (function (exports) {
|
|
|
132
132
|
ArrayReverse = _Array$prototype.reverse,
|
|
133
133
|
ArrayShift = _Array$prototype.shift,
|
|
134
134
|
ArraySlice = _Array$prototype.slice,
|
|
135
|
+
ArraySome = _Array$prototype.some,
|
|
135
136
|
ArraySort = _Array$prototype.sort,
|
|
136
137
|
ArraySplice = _Array$prototype.splice,
|
|
137
138
|
ArrayUnshift = _Array$prototype.unshift,
|
|
@@ -367,9 +368,9 @@ var LWC = (function (exports) {
|
|
|
367
368
|
// Increment whenever the LWC template compiler changes
|
|
368
369
|
|
|
369
370
|
|
|
370
|
-
var LWC_VERSION = "2.
|
|
371
|
+
var LWC_VERSION = "2.28.0";
|
|
371
372
|
var LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
372
|
-
/** version: 2.
|
|
373
|
+
/** version: 2.28.0 */
|
|
373
374
|
|
|
374
375
|
/**
|
|
375
376
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -463,7 +464,7 @@ var LWC = (function (exports) {
|
|
|
463
464
|
patch$1(propName);
|
|
464
465
|
}
|
|
465
466
|
}
|
|
466
|
-
/** version: 2.
|
|
467
|
+
/** version: 2.28.0 */
|
|
467
468
|
|
|
468
469
|
/**
|
|
469
470
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -557,7 +558,7 @@ var LWC = (function (exports) {
|
|
|
557
558
|
setFeatureFlag(name, value);
|
|
558
559
|
}
|
|
559
560
|
}
|
|
560
|
-
/** version: 2.
|
|
561
|
+
/** version: 2.28.0 */
|
|
561
562
|
|
|
562
563
|
/*
|
|
563
564
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -5079,9 +5080,14 @@ var LWC = (function (exports) {
|
|
|
5079
5080
|
if (lwcRuntimeFlags.ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE) {
|
|
5080
5081
|
disconnectRootElement(elm);
|
|
5081
5082
|
}
|
|
5082
|
-
};
|
|
5083
|
+
}; // Should never get a tag with upper case letter at this point; the compiler
|
|
5084
|
+
// should produce only tags with lowercase letters. However, the Java
|
|
5085
|
+
// compiler may generate tagnames with uppercase letters so - for backwards
|
|
5086
|
+
// compatibility, we lower case the tagname here.
|
|
5087
|
+
|
|
5083
5088
|
|
|
5084
|
-
var
|
|
5089
|
+
var normalizedTagname = sel.toLowerCase();
|
|
5090
|
+
var elm = createCustomElement(normalizedTagname, upgradeCallback, connectedCallback, disconnectedCallback);
|
|
5085
5091
|
vnode.elm = elm;
|
|
5086
5092
|
vnode.vm = vm;
|
|
5087
5093
|
linkNodeToShadow(elm, owner, renderer);
|
|
@@ -5369,6 +5375,19 @@ var LWC = (function (exports) {
|
|
|
5369
5375
|
var renderMode = vm.renderMode,
|
|
5370
5376
|
shadowMode = vm.shadowMode;
|
|
5371
5377
|
|
|
5378
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5379
|
+
// If any of the children being allocated is a scoped slot fragment, make sure the receiving
|
|
5380
|
+
// component is a light DOM component. This is mainly to validate light dom parent running
|
|
5381
|
+
// in native shadow mode.
|
|
5382
|
+
if (renderMode !== 0
|
|
5383
|
+
/* RenderMode.Light */
|
|
5384
|
+
&& ArraySome.call(children, function (child) {
|
|
5385
|
+
return !isNull(child) && isVScopedSlotFragment(child);
|
|
5386
|
+
})) {
|
|
5387
|
+
logError("Invalid usage of 'lwc:slot-data' on ".concat(getComponentTag(vm), " tag. Scoped slot content can only be passed to a light dom child."));
|
|
5388
|
+
}
|
|
5389
|
+
}
|
|
5390
|
+
|
|
5372
5391
|
if (shadowMode === 1
|
|
5373
5392
|
/* ShadowMode.Synthetic */
|
|
5374
5393
|
|| renderMode === 0
|
|
@@ -5777,27 +5796,45 @@ var LWC = (function (exports) {
|
|
|
5777
5796
|
}
|
|
5778
5797
|
|
|
5779
5798
|
if (!isUndefined$1(slotset) && !isUndefined$1(slotset.slotAssignments) && !isUndefined$1(slotset.slotAssignments[slotName]) && slotset.slotAssignments[slotName].length !== 0) {
|
|
5780
|
-
children = slotset.slotAssignments[slotName].reduce(function (
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
var vmBeingRenderedInception = getVMBeingRendered();
|
|
5784
|
-
var _children = []; // Evaluate in the scope of the slot content's owner
|
|
5785
|
-
// if a slotset is provided, there will always be an owner. The only case where owner is
|
|
5786
|
-
// undefined is for root components, but root components cannot accept slotted content
|
|
5787
|
-
|
|
5788
|
-
setVMBeingRendered(slotset.owner);
|
|
5789
|
-
|
|
5790
|
-
try {
|
|
5791
|
-
_children = vnode.factory(data.slotData);
|
|
5792
|
-
} finally {
|
|
5793
|
-
setVMBeingRendered(vmBeingRenderedInception);
|
|
5794
|
-
}
|
|
5799
|
+
children = slotset.slotAssignments[slotName].reduce(function (accumulator, vnode) {
|
|
5800
|
+
if (vnode) {
|
|
5801
|
+
var assignedNodeIsScopedSlot = isVScopedSlotFragment(vnode); // The only sniff test for a scoped <slot> element is the presence of `slotData`
|
|
5795
5802
|
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
5803
|
+
var isScopedSlotElement = !isUndefined$1(data.slotData); // Check if slot types of parent and child are matching
|
|
5804
|
+
|
|
5805
|
+
if (assignedNodeIsScopedSlot !== isScopedSlotElement) {
|
|
5806
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5807
|
+
logError("Mismatched slot types for ".concat(slotName === '' ? '(default)' : slotName, " slot. Both parent and child component must use standard type or scoped type for a given slot."), slotset.owner);
|
|
5808
|
+
} // Ignore slot content from parent
|
|
5809
|
+
|
|
5810
|
+
|
|
5811
|
+
return accumulator;
|
|
5812
|
+
} // If the passed slot content is factory, evaluate it and add the produced vnodes
|
|
5813
|
+
|
|
5814
|
+
|
|
5815
|
+
if (assignedNodeIsScopedSlot) {
|
|
5816
|
+
var vmBeingRenderedInception = getVMBeingRendered();
|
|
5817
|
+
var scopedSlotChildren = []; // Evaluate in the scope of the slot content's owner
|
|
5818
|
+
// if a slotset is provided, there will always be an owner. The only case where owner is
|
|
5819
|
+
// undefined is for root components, but root components cannot accept slotted content
|
|
5820
|
+
|
|
5821
|
+
setVMBeingRendered(slotset.owner);
|
|
5822
|
+
|
|
5823
|
+
try {
|
|
5824
|
+
scopedSlotChildren = vnode.factory(data.slotData);
|
|
5825
|
+
} finally {
|
|
5826
|
+
setVMBeingRendered(vmBeingRenderedInception);
|
|
5827
|
+
}
|
|
5828
|
+
|
|
5829
|
+
return ArrayConcat$1.call(accumulator, scopedSlotChildren);
|
|
5830
|
+
} else {
|
|
5831
|
+
// If the slot content is standard type, the content is static, no additional
|
|
5832
|
+
// processing needed on the vnode
|
|
5833
|
+
return ArrayConcat$1.call(accumulator, vnode);
|
|
5834
|
+
}
|
|
5800
5835
|
}
|
|
5836
|
+
|
|
5837
|
+
return accumulator;
|
|
5801
5838
|
}, []);
|
|
5802
5839
|
}
|
|
5803
5840
|
|
|
@@ -8536,7 +8573,7 @@ var LWC = (function (exports) {
|
|
|
8536
8573
|
|
|
8537
8574
|
return ctor;
|
|
8538
8575
|
}
|
|
8539
|
-
/* version: 2.
|
|
8576
|
+
/* version: 2.28.0 */
|
|
8540
8577
|
|
|
8541
8578
|
/*
|
|
8542
8579
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -8871,10 +8908,12 @@ var LWC = (function (exports) {
|
|
|
8871
8908
|
var pendingRegistryForElement = new WeakMap();
|
|
8872
8909
|
var definitionForConstructor = new WeakMap();
|
|
8873
8910
|
var registeredUserCtors = new WeakSet();
|
|
8911
|
+
var registeredPivotCtors = new WeakSet();
|
|
8874
8912
|
var pivotCtorByTag = new Map();
|
|
8875
8913
|
var globalDefinitionsByTag = new Map();
|
|
8876
8914
|
var globalDefinitionsByClass = new Map();
|
|
8877
8915
|
var awaitingUpgrade = new Map();
|
|
8916
|
+
var pendingWhenDefinedCallbacks = new Map();
|
|
8878
8917
|
var EMPTY_SET = new Set();
|
|
8879
8918
|
|
|
8880
8919
|
function createDefinitionRecord(constructor) {
|
|
@@ -9016,6 +9055,7 @@ var LWC = (function (exports) {
|
|
|
9016
9055
|
}(NativeHTMLElement);
|
|
9017
9056
|
|
|
9018
9057
|
PivotCtor.observedAttributes = _toConsumableArray(registeredDefinition.observedAttributes);
|
|
9058
|
+
registeredPivotCtors.add(PivotCtor);
|
|
9019
9059
|
return PivotCtor;
|
|
9020
9060
|
}
|
|
9021
9061
|
|
|
@@ -9166,6 +9206,43 @@ var LWC = (function (exports) {
|
|
|
9166
9206
|
}
|
|
9167
9207
|
|
|
9168
9208
|
return createDefinitionRecord(constructor);
|
|
9209
|
+
} // Defer a `whenDefined()` callback until an externally-visible custom element is defined
|
|
9210
|
+
|
|
9211
|
+
|
|
9212
|
+
function createPendingWhenDefinedCallback(tagName) {
|
|
9213
|
+
return new Promise(function (resolve) {
|
|
9214
|
+
var resolvers = pendingWhenDefinedCallbacks.get(tagName);
|
|
9215
|
+
|
|
9216
|
+
if (isUndefined$1(resolvers)) {
|
|
9217
|
+
resolvers = [];
|
|
9218
|
+
pendingWhenDefinedCallbacks.set(tagName, resolvers);
|
|
9219
|
+
}
|
|
9220
|
+
|
|
9221
|
+
resolvers.push(resolve);
|
|
9222
|
+
});
|
|
9223
|
+
} // Call any pending `whenDefined()` callbacks
|
|
9224
|
+
|
|
9225
|
+
|
|
9226
|
+
function flushPendingWhenDefinedCallbacks(tagName, ctor) {
|
|
9227
|
+
var resolvers = pendingWhenDefinedCallbacks.get(tagName);
|
|
9228
|
+
|
|
9229
|
+
if (!isUndefined$1(resolvers)) {
|
|
9230
|
+
var _iterator6 = _createForOfIteratorHelper(resolvers),
|
|
9231
|
+
_step6;
|
|
9232
|
+
|
|
9233
|
+
try {
|
|
9234
|
+
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
|
9235
|
+
var resolver = _step6.value;
|
|
9236
|
+
resolver(ctor);
|
|
9237
|
+
}
|
|
9238
|
+
} catch (err) {
|
|
9239
|
+
_iterator6.e(err);
|
|
9240
|
+
} finally {
|
|
9241
|
+
_iterator6.f();
|
|
9242
|
+
}
|
|
9243
|
+
}
|
|
9244
|
+
|
|
9245
|
+
pendingWhenDefinedCallbacks.delete(tagName);
|
|
9169
9246
|
}
|
|
9170
9247
|
|
|
9171
9248
|
var _window2 = window,
|
|
@@ -9220,12 +9297,12 @@ var LWC = (function (exports) {
|
|
|
9220
9297
|
if (!isUndefined$1(awaiting)) {
|
|
9221
9298
|
awaitingUpgrade.delete(tagName);
|
|
9222
9299
|
|
|
9223
|
-
var
|
|
9224
|
-
|
|
9300
|
+
var _iterator7 = _createForOfIteratorHelper(awaiting),
|
|
9301
|
+
_step7;
|
|
9225
9302
|
|
|
9226
9303
|
try {
|
|
9227
|
-
for (
|
|
9228
|
-
var element =
|
|
9304
|
+
for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
|
|
9305
|
+
var element = _step7.value;
|
|
9229
9306
|
var registeredDefinition = pendingRegistryForElement.get(element); // At this point, registeredDefinition should never be undefined because awaitingUpgrade
|
|
9230
9307
|
// is only populated when we haven't run internalUpgrade yet, and we only populate
|
|
9231
9308
|
// pendingRegistryForElement when internalUpgrade hasn't run yet.
|
|
@@ -9237,11 +9314,14 @@ var LWC = (function (exports) {
|
|
|
9237
9314
|
}
|
|
9238
9315
|
}
|
|
9239
9316
|
} catch (err) {
|
|
9240
|
-
|
|
9317
|
+
_iterator7.e(err);
|
|
9241
9318
|
} finally {
|
|
9242
|
-
|
|
9319
|
+
_iterator7.f();
|
|
9243
9320
|
}
|
|
9244
|
-
}
|
|
9321
|
+
} // If anyone called customElements.whenDefined() and is still waiting for a promise resolution, resolve now
|
|
9322
|
+
|
|
9323
|
+
|
|
9324
|
+
flushPendingWhenDefinedCallbacks(tagName, constructor);
|
|
9245
9325
|
};
|
|
9246
9326
|
|
|
9247
9327
|
CustomElementRegistry.prototype.get = function get(tagName) {
|
|
@@ -9252,10 +9332,13 @@ var LWC = (function (exports) {
|
|
|
9252
9332
|
|
|
9253
9333
|
if (!isUndefined$1(definition)) {
|
|
9254
9334
|
return definition.UserCtor; // defined by the patched custom elements registry
|
|
9255
|
-
}
|
|
9335
|
+
}
|
|
9256
9336
|
|
|
9337
|
+
if (registeredPivotCtors.has(NativeCtor)) {
|
|
9338
|
+
return undefined; // pivot constructors should not be observable, return undefined
|
|
9339
|
+
}
|
|
9257
9340
|
|
|
9258
|
-
return NativeCtor; //
|
|
9341
|
+
return NativeCtor; // constructor that existed before patching
|
|
9259
9342
|
}
|
|
9260
9343
|
};
|
|
9261
9344
|
|
|
@@ -9265,15 +9348,20 @@ var LWC = (function (exports) {
|
|
|
9265
9348
|
|
|
9266
9349
|
if (!isUndefined$1(definition)) {
|
|
9267
9350
|
return definition.UserCtor;
|
|
9268
|
-
} //
|
|
9269
|
-
// In this case, the custom element must have been defined before the registry patches
|
|
9351
|
+
} // In this case, the custom element must have been defined before the registry patches
|
|
9270
9352
|
// were applied. So return the non-pivot constructor
|
|
9271
9353
|
|
|
9272
9354
|
|
|
9273
9355
|
if (isUndefined$1(NativeCtor)) {
|
|
9274
9356
|
// Chromium bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1335247
|
|
9275
9357
|
// We can patch the correct behavior using customElements.get()
|
|
9276
|
-
|
|
9358
|
+
NativeCtor = nativeGet.call(nativeRegistry, tagName);
|
|
9359
|
+
}
|
|
9360
|
+
|
|
9361
|
+
if (registeredPivotCtors.has(NativeCtor)) {
|
|
9362
|
+
// Pivot constructors should not be observable. Wait to resolve the promise
|
|
9363
|
+
// if a constructor is ever defined in userland
|
|
9364
|
+
return createPendingWhenDefinedCallback(tagName);
|
|
9277
9365
|
}
|
|
9278
9366
|
|
|
9279
9367
|
return NativeCtor;
|
|
@@ -9537,7 +9625,7 @@ var LWC = (function (exports) {
|
|
|
9537
9625
|
function isNull(obj) {
|
|
9538
9626
|
return obj === null;
|
|
9539
9627
|
}
|
|
9540
|
-
/** version: 2.
|
|
9628
|
+
/** version: 2.28.0 */
|
|
9541
9629
|
|
|
9542
9630
|
/*
|
|
9543
9631
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -9605,18 +9693,18 @@ var LWC = (function (exports) {
|
|
|
9605
9693
|
var wrapperTags = topLevelWrappingMap[getTagName(html)];
|
|
9606
9694
|
|
|
9607
9695
|
if (!isUndefined(wrapperTags)) {
|
|
9608
|
-
var
|
|
9609
|
-
|
|
9696
|
+
var _iterator8 = _createForOfIteratorHelper(wrapperTags),
|
|
9697
|
+
_step8;
|
|
9610
9698
|
|
|
9611
9699
|
try {
|
|
9612
|
-
for (
|
|
9613
|
-
var wrapperTag =
|
|
9700
|
+
for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
|
|
9701
|
+
var wrapperTag = _step8.value;
|
|
9614
9702
|
html = "<".concat(wrapperTag, ">").concat(html, "</").concat(wrapperTag, ">");
|
|
9615
9703
|
}
|
|
9616
9704
|
} catch (err) {
|
|
9617
|
-
|
|
9705
|
+
_iterator8.e(err);
|
|
9618
9706
|
} finally {
|
|
9619
|
-
|
|
9707
|
+
_iterator8.f();
|
|
9620
9708
|
}
|
|
9621
9709
|
} // For IE11, the document title must not be undefined, but it can be an empty string
|
|
9622
9710
|
// https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createHTMLDocument#browser_compatibility
|
|
@@ -10204,7 +10292,7 @@ var LWC = (function (exports) {
|
|
|
10204
10292
|
});
|
|
10205
10293
|
freeze(LightningElement);
|
|
10206
10294
|
seal(LightningElement.prototype);
|
|
10207
|
-
/* version: 2.
|
|
10295
|
+
/* version: 2.28.0 */
|
|
10208
10296
|
|
|
10209
10297
|
exports.LightningElement = LightningElement;
|
|
10210
10298
|
exports.__unstable__ProfilerControl = profilerControl;
|