lwc 2.19.1 → 2.20.2
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 +40 -39
- package/dist/engine-dom/iife/es2017/engine-dom.js +40 -39
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +38 -37
- package/dist/engine-dom/iife/es5/engine-dom.js +41 -40
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +38 -38
- package/dist/engine-dom/umd/es2017/engine-dom.js +40 -39
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +38 -37
- package/dist/engine-dom/umd/es5/engine-dom.js +41 -40
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +38 -38
- package/dist/engine-server/commonjs/es2017/engine-server.js +39 -51
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
- package/dist/engine-server/esm/es2017/engine-server.js +39 -51
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +3 -3
- 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 +3 -3
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +3 -3
- 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
|
@@ -234,6 +234,9 @@ var LWC = (function (exports) {
|
|
|
234
234
|
const KEY__SHADOW_TOKEN = '$shadowToken$';
|
|
235
235
|
const KEY__SYNTHETIC_MODE = '$$lwc-synthetic-mode';
|
|
236
236
|
const KEY__SCOPED_CSS = '$scoped$';
|
|
237
|
+
const XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace';
|
|
238
|
+
const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
|
|
239
|
+
const XLINK_NAMESPACE = 'http://www.w3.org/1999/xlink';
|
|
237
240
|
/**
|
|
238
241
|
* Map composed of properties to attributes not following the HTML property to attribute mapping
|
|
239
242
|
* convention.
|
|
@@ -288,10 +291,7 @@ var LWC = (function (exports) {
|
|
|
288
291
|
CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
|
|
289
292
|
return attributeName;
|
|
290
293
|
}
|
|
291
|
-
|
|
292
|
-
const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
|
|
293
|
-
const XLINK_NAMESPACE = 'http://www.w3.org/1999/xlink';
|
|
294
|
-
/** version: 2.19.1 */
|
|
294
|
+
/** version: 2.20.2 */
|
|
295
295
|
|
|
296
296
|
/*
|
|
297
297
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -5210,7 +5210,7 @@ var LWC = (function (exports) {
|
|
|
5210
5210
|
}
|
|
5211
5211
|
return ctor;
|
|
5212
5212
|
}
|
|
5213
|
-
/* version: 2.
|
|
5213
|
+
/* version: 2.20.2 */
|
|
5214
5214
|
|
|
5215
5215
|
/*
|
|
5216
5216
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -5234,9 +5234,6 @@ var LWC = (function (exports) {
|
|
|
5234
5234
|
// Detect IE, via https://stackoverflow.com/a/9851769
|
|
5235
5235
|
const isIE11 = !isUndefined$1(document.documentMode);
|
|
5236
5236
|
const stylesheetCache = new Map();
|
|
5237
|
-
function isDocument(target) {
|
|
5238
|
-
return !isUndefined$1(target.head);
|
|
5239
|
-
}
|
|
5240
5237
|
function createFreshStyleElement(content) {
|
|
5241
5238
|
const elm = document.createElement('style');
|
|
5242
5239
|
elm.type = 'text/css';
|
|
@@ -5244,10 +5241,10 @@ var LWC = (function (exports) {
|
|
|
5244
5241
|
return elm;
|
|
5245
5242
|
}
|
|
5246
5243
|
function createStyleElement(content, cacheData) {
|
|
5247
|
-
const {
|
|
5244
|
+
const { element, usedElement } = cacheData;
|
|
5248
5245
|
// If the <style> was already used, then we should clone it. We cannot insert
|
|
5249
5246
|
// the same <style> in two places in the DOM.
|
|
5250
|
-
if (
|
|
5247
|
+
if (usedElement) {
|
|
5251
5248
|
// For a mysterious reason, IE11 doesn't like the way we clone <style> nodes
|
|
5252
5249
|
// and will render the incorrect styles if we do things that way. It's just
|
|
5253
5250
|
// a perf optimization, so we can skip it for IE11.
|
|
@@ -5256,11 +5253,11 @@ var LWC = (function (exports) {
|
|
|
5256
5253
|
}
|
|
5257
5254
|
// This `<style>` may be repeated multiple times in the DOM, so cache it. It's a bit
|
|
5258
5255
|
// faster to call `cloneNode()` on an existing node than to recreate it every time.
|
|
5259
|
-
return
|
|
5256
|
+
return element.cloneNode(true);
|
|
5260
5257
|
}
|
|
5261
5258
|
// We don't clone every time, because that would be a perf tax on the first time
|
|
5262
|
-
cacheData.
|
|
5263
|
-
return
|
|
5259
|
+
cacheData.usedElement = true;
|
|
5260
|
+
return element;
|
|
5264
5261
|
}
|
|
5265
5262
|
function createConstructableStylesheet(content) {
|
|
5266
5263
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -5281,47 +5278,42 @@ var LWC = (function (exports) {
|
|
|
5281
5278
|
}
|
|
5282
5279
|
function insertStyleElement(content, target, cacheData) {
|
|
5283
5280
|
const elm = createStyleElement(content, cacheData);
|
|
5284
|
-
|
|
5285
|
-
targetAnchorPoint.appendChild(elm);
|
|
5286
|
-
}
|
|
5287
|
-
function doInsertStylesheet(content, target, cacheData) {
|
|
5288
|
-
// Constructable stylesheets are only supported in certain browsers:
|
|
5289
|
-
// https://caniuse.com/mdn-api_document_adoptedstylesheets
|
|
5290
|
-
// The reason we use it is for perf: https://github.com/salesforce/lwc/pull/2460
|
|
5291
|
-
if (supportsConstructableStylesheets) {
|
|
5292
|
-
insertConstructableStylesheet(content, target, cacheData);
|
|
5293
|
-
}
|
|
5294
|
-
else {
|
|
5295
|
-
// Fall back to <style> element
|
|
5296
|
-
insertStyleElement(content, target, cacheData);
|
|
5297
|
-
}
|
|
5281
|
+
target.appendChild(elm);
|
|
5298
5282
|
}
|
|
5299
|
-
function getCacheData(content) {
|
|
5283
|
+
function getCacheData(content, useConstructableStylesheet) {
|
|
5300
5284
|
let cacheData = stylesheetCache.get(content);
|
|
5301
5285
|
if (isUndefined$1(cacheData)) {
|
|
5302
5286
|
cacheData = {
|
|
5303
|
-
stylesheet:
|
|
5304
|
-
|
|
5305
|
-
: createFreshStyleElement(content),
|
|
5287
|
+
stylesheet: undefined,
|
|
5288
|
+
element: undefined,
|
|
5306
5289
|
roots: undefined,
|
|
5307
5290
|
global: false,
|
|
5308
|
-
|
|
5291
|
+
usedElement: false,
|
|
5309
5292
|
};
|
|
5310
5293
|
stylesheetCache.set(content, cacheData);
|
|
5311
5294
|
}
|
|
5295
|
+
// Create <style> elements or CSSStyleSheets on-demand, as needed
|
|
5296
|
+
if (useConstructableStylesheet && isUndefined$1(cacheData.stylesheet)) {
|
|
5297
|
+
cacheData.stylesheet = createConstructableStylesheet(content);
|
|
5298
|
+
}
|
|
5299
|
+
else if (!useConstructableStylesheet && isUndefined$1(cacheData.element)) {
|
|
5300
|
+
cacheData.element = createFreshStyleElement(content);
|
|
5301
|
+
}
|
|
5312
5302
|
return cacheData;
|
|
5313
5303
|
}
|
|
5314
5304
|
function insertGlobalStylesheet(content) {
|
|
5315
|
-
|
|
5305
|
+
// Force a <style> element for global stylesheets. See comment below.
|
|
5306
|
+
const cacheData = getCacheData(content, false);
|
|
5316
5307
|
if (cacheData.global) {
|
|
5317
5308
|
// already inserted
|
|
5318
5309
|
return;
|
|
5319
5310
|
}
|
|
5320
5311
|
cacheData.global = true; // mark inserted
|
|
5321
|
-
|
|
5312
|
+
// TODO [#2922]: use document.adoptedStyleSheets in supported browsers. Currently we can't, due to backwards compat.
|
|
5313
|
+
insertStyleElement(content, document.head, cacheData);
|
|
5322
5314
|
}
|
|
5323
5315
|
function insertLocalStylesheet(content, target) {
|
|
5324
|
-
const cacheData = getCacheData(content);
|
|
5316
|
+
const cacheData = getCacheData(content, supportsConstructableStylesheets);
|
|
5325
5317
|
let { roots } = cacheData;
|
|
5326
5318
|
if (isUndefined$1(roots)) {
|
|
5327
5319
|
roots = cacheData.roots = new WeakSet(); // lazily initialize (not needed for global styles)
|
|
@@ -5331,7 +5323,16 @@ var LWC = (function (exports) {
|
|
|
5331
5323
|
return;
|
|
5332
5324
|
}
|
|
5333
5325
|
roots.add(target); // mark inserted
|
|
5334
|
-
|
|
5326
|
+
// Constructable stylesheets are only supported in certain browsers:
|
|
5327
|
+
// https://caniuse.com/mdn-api_document_adoptedstylesheets
|
|
5328
|
+
// The reason we use it is for perf: https://github.com/salesforce/lwc/pull/2460
|
|
5329
|
+
if (supportsConstructableStylesheets) {
|
|
5330
|
+
insertConstructableStylesheet(content, target, cacheData);
|
|
5331
|
+
}
|
|
5332
|
+
else {
|
|
5333
|
+
// Fall back to <style> element
|
|
5334
|
+
insertStyleElement(content, target, cacheData);
|
|
5335
|
+
}
|
|
5335
5336
|
}
|
|
5336
5337
|
function insertStylesheet(content, target) {
|
|
5337
5338
|
if (isUndefined$1(target)) {
|
|
@@ -5866,7 +5867,7 @@ var LWC = (function (exports) {
|
|
|
5866
5867
|
});
|
|
5867
5868
|
freeze(LightningElement);
|
|
5868
5869
|
seal(LightningElement.prototype);
|
|
5869
|
-
/* version: 2.
|
|
5870
|
+
/* version: 2.20.2 */
|
|
5870
5871
|
|
|
5871
5872
|
exports.LightningElement = LightningElement;
|
|
5872
5873
|
exports.__unstable__ProfilerControl = profilerControl;
|
|
@@ -305,6 +305,9 @@ var LWC = (function (exports) {
|
|
|
305
305
|
var KEY__SHADOW_TOKEN = '$shadowToken$';
|
|
306
306
|
var KEY__SYNTHETIC_MODE = '$$lwc-synthetic-mode';
|
|
307
307
|
var KEY__SCOPED_CSS = '$scoped$';
|
|
308
|
+
var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace';
|
|
309
|
+
var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
|
|
310
|
+
var XLINK_NAMESPACE = 'http://www.w3.org/1999/xlink';
|
|
308
311
|
/**
|
|
309
312
|
* Map composed of properties to attributes not following the HTML property to attribute mapping
|
|
310
313
|
* convention.
|
|
@@ -353,10 +356,6 @@ var LWC = (function (exports) {
|
|
|
353
356
|
CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
|
|
354
357
|
return attributeName;
|
|
355
358
|
}
|
|
356
|
-
|
|
357
|
-
var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace';
|
|
358
|
-
var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
|
|
359
|
-
var XLINK_NAMESPACE = 'http://www.w3.org/1999/xlink';
|
|
360
359
|
/*
|
|
361
360
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
362
361
|
* All rights reserved.
|
|
@@ -365,9 +364,10 @@ var LWC = (function (exports) {
|
|
|
365
364
|
*/
|
|
366
365
|
// Increment whenever the LWC template compiler changes
|
|
367
366
|
|
|
368
|
-
|
|
367
|
+
|
|
368
|
+
var LWC_VERSION = "2.20.2";
|
|
369
369
|
var LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
370
|
-
/** version: 2.
|
|
370
|
+
/** version: 2.20.2 */
|
|
371
371
|
|
|
372
372
|
/*
|
|
373
373
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -546,7 +546,7 @@ var LWC = (function (exports) {
|
|
|
546
546
|
setFeatureFlag(name, value);
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
|
-
/** version: 2.
|
|
549
|
+
/** version: 2.20.2 */
|
|
550
550
|
|
|
551
551
|
/*
|
|
552
552
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -8268,7 +8268,7 @@ var LWC = (function (exports) {
|
|
|
8268
8268
|
|
|
8269
8269
|
return ctor;
|
|
8270
8270
|
}
|
|
8271
|
-
/* version: 2.
|
|
8271
|
+
/* version: 2.20.2 */
|
|
8272
8272
|
|
|
8273
8273
|
/*
|
|
8274
8274
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -8303,10 +8303,6 @@ var LWC = (function (exports) {
|
|
|
8303
8303
|
};
|
|
8304
8304
|
}
|
|
8305
8305
|
|
|
8306
|
-
function isDocument(target) {
|
|
8307
|
-
return !isUndefined$1(target.head);
|
|
8308
|
-
}
|
|
8309
|
-
|
|
8310
8306
|
function createFreshStyleElement(content) {
|
|
8311
8307
|
var elm = document.createElement('style');
|
|
8312
8308
|
elm.type = 'text/css';
|
|
@@ -8315,11 +8311,11 @@ var LWC = (function (exports) {
|
|
|
8315
8311
|
}
|
|
8316
8312
|
|
|
8317
8313
|
function createStyleElement(content, cacheData) {
|
|
8318
|
-
var
|
|
8319
|
-
|
|
8314
|
+
var element = cacheData.element,
|
|
8315
|
+
usedElement = cacheData.usedElement; // If the <style> was already used, then we should clone it. We cannot insert
|
|
8320
8316
|
// the same <style> in two places in the DOM.
|
|
8321
8317
|
|
|
8322
|
-
if (
|
|
8318
|
+
if (usedElement) {
|
|
8323
8319
|
// For a mysterious reason, IE11 doesn't like the way we clone <style> nodes
|
|
8324
8320
|
// and will render the incorrect styles if we do things that way. It's just
|
|
8325
8321
|
// a perf optimization, so we can skip it for IE11.
|
|
@@ -8329,12 +8325,12 @@ var LWC = (function (exports) {
|
|
|
8329
8325
|
// faster to call `cloneNode()` on an existing node than to recreate it every time.
|
|
8330
8326
|
|
|
8331
8327
|
|
|
8332
|
-
return
|
|
8328
|
+
return element.cloneNode(true);
|
|
8333
8329
|
} // We don't clone every time, because that would be a perf tax on the first time
|
|
8334
8330
|
|
|
8335
8331
|
|
|
8336
|
-
cacheData.
|
|
8337
|
-
return
|
|
8332
|
+
cacheData.usedElement = true;
|
|
8333
|
+
return element;
|
|
8338
8334
|
}
|
|
8339
8335
|
|
|
8340
8336
|
function createConstructableStylesheet(content) {
|
|
@@ -8357,40 +8353,36 @@ var LWC = (function (exports) {
|
|
|
8357
8353
|
|
|
8358
8354
|
function insertStyleElement(content, target, cacheData) {
|
|
8359
8355
|
var elm = createStyleElement(content, cacheData);
|
|
8360
|
-
|
|
8361
|
-
targetAnchorPoint.appendChild(elm);
|
|
8362
|
-
}
|
|
8363
|
-
|
|
8364
|
-
function doInsertStylesheet(content, target, cacheData) {
|
|
8365
|
-
// Constructable stylesheets are only supported in certain browsers:
|
|
8366
|
-
// https://caniuse.com/mdn-api_document_adoptedstylesheets
|
|
8367
|
-
// The reason we use it is for perf: https://github.com/salesforce/lwc/pull/2460
|
|
8368
|
-
if (supportsConstructableStylesheets) {
|
|
8369
|
-
insertConstructableStylesheet(content, target, cacheData);
|
|
8370
|
-
} else {
|
|
8371
|
-
// Fall back to <style> element
|
|
8372
|
-
insertStyleElement(content, target, cacheData);
|
|
8373
|
-
}
|
|
8356
|
+
target.appendChild(elm);
|
|
8374
8357
|
}
|
|
8375
8358
|
|
|
8376
|
-
function getCacheData(content) {
|
|
8359
|
+
function getCacheData(content, useConstructableStylesheet) {
|
|
8377
8360
|
var cacheData = stylesheetCache.get(content);
|
|
8378
8361
|
|
|
8379
8362
|
if (isUndefined$1(cacheData)) {
|
|
8380
8363
|
cacheData = {
|
|
8381
|
-
stylesheet:
|
|
8364
|
+
stylesheet: undefined,
|
|
8365
|
+
element: undefined,
|
|
8382
8366
|
roots: undefined,
|
|
8383
8367
|
global: false,
|
|
8384
|
-
|
|
8368
|
+
usedElement: false
|
|
8385
8369
|
};
|
|
8386
8370
|
stylesheetCache.set(content, cacheData);
|
|
8371
|
+
} // Create <style> elements or CSSStyleSheets on-demand, as needed
|
|
8372
|
+
|
|
8373
|
+
|
|
8374
|
+
if (useConstructableStylesheet && isUndefined$1(cacheData.stylesheet)) {
|
|
8375
|
+
cacheData.stylesheet = createConstructableStylesheet(content);
|
|
8376
|
+
} else if (!useConstructableStylesheet && isUndefined$1(cacheData.element)) {
|
|
8377
|
+
cacheData.element = createFreshStyleElement(content);
|
|
8387
8378
|
}
|
|
8388
8379
|
|
|
8389
8380
|
return cacheData;
|
|
8390
8381
|
}
|
|
8391
8382
|
|
|
8392
8383
|
function insertGlobalStylesheet(content) {
|
|
8393
|
-
|
|
8384
|
+
// Force a <style> element for global stylesheets. See comment below.
|
|
8385
|
+
var cacheData = getCacheData(content, false);
|
|
8394
8386
|
|
|
8395
8387
|
if (cacheData.global) {
|
|
8396
8388
|
// already inserted
|
|
@@ -8398,12 +8390,13 @@ var LWC = (function (exports) {
|
|
|
8398
8390
|
}
|
|
8399
8391
|
|
|
8400
8392
|
cacheData.global = true; // mark inserted
|
|
8393
|
+
// TODO [#2922]: use document.adoptedStyleSheets in supported browsers. Currently we can't, due to backwards compat.
|
|
8401
8394
|
|
|
8402
|
-
|
|
8395
|
+
insertStyleElement(content, document.head, cacheData);
|
|
8403
8396
|
}
|
|
8404
8397
|
|
|
8405
8398
|
function insertLocalStylesheet(content, target) {
|
|
8406
|
-
var cacheData = getCacheData(content);
|
|
8399
|
+
var cacheData = getCacheData(content, supportsConstructableStylesheets);
|
|
8407
8400
|
var roots = cacheData.roots;
|
|
8408
8401
|
|
|
8409
8402
|
if (isUndefined$1(roots)) {
|
|
@@ -8414,8 +8407,16 @@ var LWC = (function (exports) {
|
|
|
8414
8407
|
}
|
|
8415
8408
|
|
|
8416
8409
|
roots.add(target); // mark inserted
|
|
8410
|
+
// Constructable stylesheets are only supported in certain browsers:
|
|
8411
|
+
// https://caniuse.com/mdn-api_document_adoptedstylesheets
|
|
8412
|
+
// The reason we use it is for perf: https://github.com/salesforce/lwc/pull/2460
|
|
8417
8413
|
|
|
8418
|
-
|
|
8414
|
+
if (supportsConstructableStylesheets) {
|
|
8415
|
+
insertConstructableStylesheet(content, target, cacheData);
|
|
8416
|
+
} else {
|
|
8417
|
+
// Fall back to <style> element
|
|
8418
|
+
insertStyleElement(content, target, cacheData);
|
|
8419
|
+
}
|
|
8419
8420
|
}
|
|
8420
8421
|
|
|
8421
8422
|
function insertStylesheet(content, target) {
|
|
@@ -9088,7 +9089,7 @@ var LWC = (function (exports) {
|
|
|
9088
9089
|
});
|
|
9089
9090
|
freeze(LightningElement);
|
|
9090
9091
|
seal(LightningElement.prototype);
|
|
9091
|
-
/* version: 2.
|
|
9092
|
+
/* version: 2.20.2 */
|
|
9092
9093
|
|
|
9093
9094
|
exports.LightningElement = LightningElement;
|
|
9094
9095
|
exports.__unstable__ProfilerControl = profilerControl;
|