lwc 2.30.0 → 2.30.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 +89 -42
- package/dist/engine-dom/iife/es2017/engine-dom.js +89 -44
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +83 -42
- package/dist/engine-dom/iife/es5/engine-dom.js +108 -63
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +102 -61
- package/dist/engine-dom/umd/es2017/engine-dom.js +89 -44
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +83 -42
- package/dist/engine-dom/umd/es5/engine-dom.js +108 -63
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +102 -61
- package/dist/engine-server/commonjs/es2017/engine-server.js +16 -16
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
- package/dist/engine-server/esm/es2017/engine-server.js +16 -14
- 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 -4
- package/dist/wire-service/iife/es2017/wire-service.min.js +1 -1
- package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -4
- package/dist/wire-service/iife/es5/wire-service.js +2 -4
- package/dist/wire-service/iife/es5/wire-service.min.js +1 -1
- package/dist/wire-service/iife/es5/wire-service_debug.js +2 -4
- package/dist/wire-service/umd/es2017/wire-service.js +2 -4
- package/dist/wire-service/umd/es2017/wire-service.min.js +1 -1
- package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -4
- package/dist/wire-service/umd/es5/wire-service.js +2 -4
- package/dist/wire-service/umd/es5/wire-service.min.js +1 -1
- package/dist/wire-service/umd/es5/wire-service_debug.js +2 -4
- package/package.json +7 -7
|
@@ -299,9 +299,9 @@ function htmlPropertyToAttribute(propName) {
|
|
|
299
299
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
300
300
|
*/
|
|
301
301
|
// Increment whenever the LWC template compiler changes
|
|
302
|
-
const LWC_VERSION = "2.30.
|
|
302
|
+
const LWC_VERSION = "2.30.2";
|
|
303
303
|
const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
304
|
-
/** version: 2.30.
|
|
304
|
+
/** version: 2.30.2 */
|
|
305
305
|
|
|
306
306
|
/**
|
|
307
307
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -383,7 +383,7 @@ for (let i = 0, len = ElementPrototypeAriaPropertyNames.length; i < len; i += 1)
|
|
|
383
383
|
patch$1(propName);
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
|
-
/** version: 2.30.
|
|
386
|
+
/** version: 2.30.2 */
|
|
387
387
|
|
|
388
388
|
/**
|
|
389
389
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -463,7 +463,7 @@ function setFeatureFlagForTest(name, value) {
|
|
|
463
463
|
setFeatureFlag(name, value);
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
/** version: 2.30.
|
|
466
|
+
/** version: 2.30.2 */
|
|
467
467
|
|
|
468
468
|
/*
|
|
469
469
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -4060,16 +4060,16 @@ function mountCustomElement(vnode, parent, anchor, renderer) {
|
|
|
4060
4060
|
// the custom element from the registry is expecting an upgrade callback
|
|
4061
4061
|
vm = createViewModelHook(elm, vnode, renderer);
|
|
4062
4062
|
};
|
|
4063
|
-
|
|
4064
|
-
|
|
4063
|
+
let connectedCallback;
|
|
4064
|
+
let disconnectedCallback;
|
|
4065
|
+
if (lwcRuntimeFlags.ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE) {
|
|
4066
|
+
connectedCallback = elm => {
|
|
4065
4067
|
connectRootElement(elm);
|
|
4066
|
-
}
|
|
4067
|
-
|
|
4068
|
-
const disconnectedCallback = elm => {
|
|
4069
|
-
if (lwcRuntimeFlags.ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE) {
|
|
4068
|
+
};
|
|
4069
|
+
disconnectedCallback = elm => {
|
|
4070
4070
|
disconnectRootElement(elm);
|
|
4071
|
-
}
|
|
4072
|
-
}
|
|
4071
|
+
};
|
|
4072
|
+
}
|
|
4073
4073
|
// Should never get a tag with upper case letter at this point; the compiler
|
|
4074
4074
|
// should produce only tags with lowercase letters. However, the Java
|
|
4075
4075
|
// compiler may generate tagnames with uppercase letters so - for backwards
|
|
@@ -6285,7 +6285,9 @@ function installWireAdapters(vm) {
|
|
|
6285
6285
|
wire
|
|
6286
6286
|
}
|
|
6287
6287
|
} = vm;
|
|
6288
|
-
|
|
6288
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6289
|
+
vm.debugInfo[WIRE_DEBUG_ENTRY] = create(null);
|
|
6290
|
+
}
|
|
6289
6291
|
const wiredConnecting = context.wiredConnecting = [];
|
|
6290
6292
|
const wiredDisconnecting = context.wiredDisconnecting = [];
|
|
6291
6293
|
for (const fieldNameOrMethod in wire) {
|
|
@@ -6935,7 +6937,7 @@ function getComponentConstructor(elm) {
|
|
|
6935
6937
|
}
|
|
6936
6938
|
return ctor;
|
|
6937
6939
|
}
|
|
6938
|
-
/* version: 2.30.
|
|
6940
|
+
/* version: 2.30.2 */
|
|
6939
6941
|
|
|
6940
6942
|
/*
|
|
6941
6943
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -7218,8 +7220,10 @@ let elementBeingUpgradedByLWC = false;
|
|
|
7218
7220
|
// `customElements.define('x-foo')`, then you don't have access to the upgradeCallback, so it's a dummy custom element.
|
|
7219
7221
|
// This class should be created once per tag name.
|
|
7220
7222
|
const createUpgradableConstructor = (connectedCallback, disconnectedCallback) => {
|
|
7223
|
+
const hasConnectedCallback = !isUndefined$1(connectedCallback);
|
|
7224
|
+
const hasDisconnectedCallback = !isUndefined$1(disconnectedCallback);
|
|
7221
7225
|
// TODO [#2972]: this class should expose observedAttributes as necessary
|
|
7222
|
-
|
|
7226
|
+
class UpgradableConstructor extends HTMLElement {
|
|
7223
7227
|
constructor(upgradeCallback) {
|
|
7224
7228
|
super();
|
|
7225
7229
|
// If the element is not created using lwc.createElement(), e.g. `document.createElement('x-foo')`,
|
|
@@ -7227,25 +7231,33 @@ const createUpgradableConstructor = (connectedCallback, disconnectedCallback) =>
|
|
|
7227
7231
|
if (elementBeingUpgradedByLWC) {
|
|
7228
7232
|
upgradeCallback(this);
|
|
7229
7233
|
}
|
|
7230
|
-
else {
|
|
7231
|
-
//
|
|
7232
|
-
//
|
|
7234
|
+
else if (hasConnectedCallback || hasDisconnectedCallback) {
|
|
7235
|
+
// If this element has connected or disconnected callbacks, then we need to keep track of
|
|
7236
|
+
// instances that were created outside LWC (i.e. not created by `lwc.createElement()`).
|
|
7237
|
+
// If the element has no connected or disconnected callbacks, then we don't need to track this.
|
|
7233
7238
|
elementsUpgradedOutsideLWC.add(this);
|
|
7234
7239
|
// TODO [#2970]: LWC elements cannot be upgraded via new Ctor()
|
|
7235
7240
|
// Do we want to support this? Throw an error? Currently for backwards compat it's a no-op.
|
|
7236
7241
|
}
|
|
7237
7242
|
}
|
|
7238
|
-
|
|
7243
|
+
}
|
|
7244
|
+
// Do not unnecessarily add a connectedCallback/disconnectedCallback, as it introduces perf overhead
|
|
7245
|
+
// See: https://github.com/salesforce/lwc/pull/3162#issuecomment-1311851174
|
|
7246
|
+
if (hasConnectedCallback) {
|
|
7247
|
+
UpgradableConstructor.prototype.connectedCallback = function () {
|
|
7239
7248
|
if (!elementsUpgradedOutsideLWC.has(this)) {
|
|
7240
7249
|
connectedCallback(this);
|
|
7241
7250
|
}
|
|
7242
|
-
}
|
|
7243
|
-
|
|
7251
|
+
};
|
|
7252
|
+
}
|
|
7253
|
+
if (hasDisconnectedCallback) {
|
|
7254
|
+
UpgradableConstructor.prototype.disconnectedCallback = function () {
|
|
7244
7255
|
if (!elementsUpgradedOutsideLWC.has(this)) {
|
|
7245
7256
|
disconnectedCallback(this);
|
|
7246
7257
|
}
|
|
7247
|
-
}
|
|
7248
|
-
}
|
|
7258
|
+
};
|
|
7259
|
+
}
|
|
7260
|
+
return UpgradableConstructor;
|
|
7249
7261
|
};
|
|
7250
7262
|
const createCustomElementVanilla = (tagName, upgradeCallback, connectedCallback, disconnectedCallback) => {
|
|
7251
7263
|
// use global custom elements registry
|
|
@@ -7298,16 +7310,22 @@ function createScopedRegistry() {
|
|
|
7298
7310
|
const EMPTY_SET = new Set();
|
|
7299
7311
|
function createDefinitionRecord(constructor) {
|
|
7300
7312
|
var _a;
|
|
7301
|
-
const { connectedCallback, disconnectedCallback, adoptedCallback, attributeChangedCallback, } = constructor.prototype;
|
|
7313
|
+
const { connectedCallback, disconnectedCallback, formAssociatedCallback, formDisabledCallback, formResetCallback, formStateRestoreCallback, adoptedCallback, attributeChangedCallback, } = constructor.prototype;
|
|
7314
|
+
const formAssociated = Boolean(constructor.formAssociated);
|
|
7302
7315
|
const observedAttributes = new Set((_a = constructor.observedAttributes) !== null && _a !== void 0 ? _a : []);
|
|
7303
7316
|
return {
|
|
7304
7317
|
UserCtor: constructor,
|
|
7305
7318
|
PivotCtor: undefined,
|
|
7306
7319
|
connectedCallback,
|
|
7307
7320
|
disconnectedCallback,
|
|
7321
|
+
formAssociatedCallback,
|
|
7322
|
+
formDisabledCallback,
|
|
7323
|
+
formResetCallback,
|
|
7324
|
+
formStateRestoreCallback,
|
|
7308
7325
|
adoptedCallback,
|
|
7309
7326
|
attributeChangedCallback,
|
|
7310
7327
|
observedAttributes,
|
|
7328
|
+
formAssociated,
|
|
7311
7329
|
};
|
|
7312
7330
|
}
|
|
7313
7331
|
// Helper to create stand-in element for each tagName registered that delegates out to the registry for the given
|
|
@@ -7382,6 +7400,26 @@ function createScopedRegistry() {
|
|
|
7382
7400
|
}
|
|
7383
7401
|
}
|
|
7384
7402
|
}
|
|
7403
|
+
formAssociatedCallback(form) {
|
|
7404
|
+
var _a;
|
|
7405
|
+
const definition = definitionForElement.get(this);
|
|
7406
|
+
(_a = definition === null || definition === void 0 ? void 0 : definition.formAssociatedCallback) === null || _a === void 0 ? void 0 : _a.call(this, form);
|
|
7407
|
+
}
|
|
7408
|
+
formDisabledCallback(disabled) {
|
|
7409
|
+
var _a;
|
|
7410
|
+
const definition = definitionForElement.get(this);
|
|
7411
|
+
(_a = definition === null || definition === void 0 ? void 0 : definition.formDisabledCallback) === null || _a === void 0 ? void 0 : _a.call(this, disabled);
|
|
7412
|
+
}
|
|
7413
|
+
formResetCallback() {
|
|
7414
|
+
var _a;
|
|
7415
|
+
const definition = definitionForElement.get(this);
|
|
7416
|
+
(_a = definition === null || definition === void 0 ? void 0 : definition.formResetCallback) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
7417
|
+
}
|
|
7418
|
+
formStateRestoreCallback(state, mode) {
|
|
7419
|
+
var _a;
|
|
7420
|
+
const definition = definitionForElement.get(this);
|
|
7421
|
+
(_a = definition === null || definition === void 0 ? void 0 : definition.formStateRestoreCallback) === null || _a === void 0 ? void 0 : _a.call(this, state, mode);
|
|
7422
|
+
}
|
|
7385
7423
|
adoptedCallback() {
|
|
7386
7424
|
var _a;
|
|
7387
7425
|
const definition = definitionForElement.get(this);
|
|
@@ -7400,6 +7438,8 @@ function createScopedRegistry() {
|
|
|
7400
7438
|
}
|
|
7401
7439
|
}
|
|
7402
7440
|
PivotCtor.observedAttributes = [...registeredDefinition.observedAttributes];
|
|
7441
|
+
// TODO [#3000]: support case where registeredDefinition is not form-associated, but later definition is.
|
|
7442
|
+
PivotCtor.formAssociated = registeredDefinition.formAssociated;
|
|
7403
7443
|
registeredPivotCtors.add(PivotCtor);
|
|
7404
7444
|
return PivotCtor;
|
|
7405
7445
|
}
|
|
@@ -7746,27 +7786,34 @@ if (lwcRuntimeFlags.ENABLE_SCOPED_CUSTOM_ELEMENT_REGISTRY) {
|
|
|
7746
7786
|
// Creates a constructor that is intended to be used as the UserConstructor in a scoped (pivots) registry.
|
|
7747
7787
|
// In this case, the upgradeCallback only needs to be defined once because we create these on-demand,
|
|
7748
7788
|
// multiple times per tag name.
|
|
7749
|
-
const createUserConstructor = (upgradeCallback, connectedCallback, disconnectedCallback
|
|
7789
|
+
const createUserConstructor = (HTMLElementToExtend, upgradeCallback, connectedCallback, disconnectedCallback) => {
|
|
7750
7790
|
// TODO [#2972]: this class should expose observedAttributes as necessary
|
|
7751
|
-
|
|
7791
|
+
class UserConstructor extends HTMLElementToExtend {
|
|
7752
7792
|
constructor() {
|
|
7753
7793
|
super();
|
|
7754
7794
|
upgradeCallback(this);
|
|
7755
7795
|
}
|
|
7756
|
-
|
|
7796
|
+
}
|
|
7797
|
+
// Do not unnecessarily add a connectedCallback/disconnectedCallback, as it introduces perf overhead
|
|
7798
|
+
// See: https://github.com/salesforce/lwc/pull/3162#issuecomment-1311851174
|
|
7799
|
+
if (!isUndefined$1(connectedCallback)) {
|
|
7800
|
+
UserConstructor.prototype.connectedCallback = function () {
|
|
7757
7801
|
connectedCallback(this);
|
|
7758
|
-
}
|
|
7759
|
-
|
|
7802
|
+
};
|
|
7803
|
+
}
|
|
7804
|
+
if (!isUndefined$1(disconnectedCallback)) {
|
|
7805
|
+
UserConstructor.prototype.disconnectedCallback = function () {
|
|
7760
7806
|
disconnectedCallback(this);
|
|
7761
|
-
}
|
|
7762
|
-
}
|
|
7807
|
+
};
|
|
7808
|
+
}
|
|
7809
|
+
return UserConstructor;
|
|
7763
7810
|
};
|
|
7764
7811
|
function createCustomElementScoped(tagName, upgradeCallback, connectedCallback, disconnectedCallback) {
|
|
7765
7812
|
if (isUndefined$1(createScopedConstructor) || isUndefined$1(CachedHTMLElement)) {
|
|
7766
7813
|
// This error should be impossible to hit
|
|
7767
7814
|
throw new Error('The flag ENABLE_SCOPED_CUSTOM_ELEMENT_REGISTRY must be set to true to use this feature');
|
|
7768
7815
|
}
|
|
7769
|
-
const UserConstructor = createUserConstructor(upgradeCallback, connectedCallback, disconnectedCallback
|
|
7816
|
+
const UserConstructor = createUserConstructor(CachedHTMLElement, upgradeCallback, connectedCallback, disconnectedCallback);
|
|
7770
7817
|
const ScopedConstructor = createScopedConstructor(tagName, UserConstructor);
|
|
7771
7818
|
return new ScopedConstructor(UserConstructor);
|
|
7772
7819
|
}
|
|
@@ -7863,7 +7910,7 @@ function rendererFactory(baseRenderer) {
|
|
|
7863
7910
|
function isNull(obj) {
|
|
7864
7911
|
return obj === null;
|
|
7865
7912
|
}
|
|
7866
|
-
/** version: 2.30.
|
|
7913
|
+
/** version: 2.30.2 */
|
|
7867
7914
|
|
|
7868
7915
|
/*
|
|
7869
7916
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -8342,16 +8389,16 @@ function createElement(sel, options) {
|
|
|
8342
8389
|
DisconnectingSlot.set(elm, disconnectRootElement);
|
|
8343
8390
|
}
|
|
8344
8391
|
};
|
|
8345
|
-
|
|
8346
|
-
|
|
8392
|
+
let connectedCallback;
|
|
8393
|
+
let disconnectedCallback;
|
|
8394
|
+
if (lwcRuntimeFlags.ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE) {
|
|
8395
|
+
connectedCallback = elm => {
|
|
8347
8396
|
connectRootElement(elm);
|
|
8348
|
-
}
|
|
8349
|
-
|
|
8350
|
-
const disconnectedCallback = elm => {
|
|
8351
|
-
if (lwcRuntimeFlags.ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE) {
|
|
8397
|
+
};
|
|
8398
|
+
disconnectedCallback = elm => {
|
|
8352
8399
|
disconnectRootElement(elm);
|
|
8353
|
-
}
|
|
8354
|
-
}
|
|
8400
|
+
};
|
|
8401
|
+
}
|
|
8355
8402
|
const element = createCustomElement(tagName, upgradeCallback, connectedCallback, disconnectedCallback);
|
|
8356
8403
|
return element;
|
|
8357
8404
|
}
|
|
@@ -8424,6 +8471,6 @@ defineProperty(LightningElement, 'CustomElementConstructor', {
|
|
|
8424
8471
|
});
|
|
8425
8472
|
freeze(LightningElement);
|
|
8426
8473
|
seal(LightningElement.prototype);
|
|
8427
|
-
/* version: 2.30.
|
|
8474
|
+
/* version: 2.30.2 */
|
|
8428
8475
|
|
|
8429
8476
|
export { LightningElement, profilerControl as __unstable__ProfilerControl, api$1 as api, deprecatedBuildCustomElementConstructor as buildCustomElementConstructor, createContextProvider, createElement, freezeTemplate, getComponentConstructor, getComponentDef, hydrateComponent, isComponentConstructor, isNodeShadowed as isNodeFromTemplate, parseFragment, parseSVGFragment, readonly, register, registerComponent, registerDecorators, registerTemplate, renderer, rendererFactory, sanitizeAttribute, setFeatureFlag, setFeatureFlagForTest, setHooks, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };
|
|
@@ -302,9 +302,9 @@ var LWC = (function (exports) {
|
|
|
302
302
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
303
303
|
*/
|
|
304
304
|
// Increment whenever the LWC template compiler changes
|
|
305
|
-
const LWC_VERSION = "2.30.
|
|
305
|
+
const LWC_VERSION = "2.30.2";
|
|
306
306
|
const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
307
|
-
/** version: 2.30.
|
|
307
|
+
/** version: 2.30.2 */
|
|
308
308
|
|
|
309
309
|
/**
|
|
310
310
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -386,7 +386,7 @@ var LWC = (function (exports) {
|
|
|
386
386
|
patch$1(propName);
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
|
-
/** version: 2.30.
|
|
389
|
+
/** version: 2.30.2 */
|
|
390
390
|
|
|
391
391
|
/**
|
|
392
392
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -466,7 +466,7 @@ var LWC = (function (exports) {
|
|
|
466
466
|
setFeatureFlag(name, value);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
/** version: 2.30.
|
|
469
|
+
/** version: 2.30.2 */
|
|
470
470
|
|
|
471
471
|
/*
|
|
472
472
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -4063,16 +4063,16 @@ var LWC = (function (exports) {
|
|
|
4063
4063
|
// the custom element from the registry is expecting an upgrade callback
|
|
4064
4064
|
vm = createViewModelHook(elm, vnode, renderer);
|
|
4065
4065
|
};
|
|
4066
|
-
|
|
4067
|
-
|
|
4066
|
+
let connectedCallback;
|
|
4067
|
+
let disconnectedCallback;
|
|
4068
|
+
if (lwcRuntimeFlags.ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE) {
|
|
4069
|
+
connectedCallback = elm => {
|
|
4068
4070
|
connectRootElement(elm);
|
|
4069
|
-
}
|
|
4070
|
-
|
|
4071
|
-
const disconnectedCallback = elm => {
|
|
4072
|
-
if (lwcRuntimeFlags.ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE) {
|
|
4071
|
+
};
|
|
4072
|
+
disconnectedCallback = elm => {
|
|
4073
4073
|
disconnectRootElement(elm);
|
|
4074
|
-
}
|
|
4075
|
-
}
|
|
4074
|
+
};
|
|
4075
|
+
}
|
|
4076
4076
|
// Should never get a tag with upper case letter at this point; the compiler
|
|
4077
4077
|
// should produce only tags with lowercase letters. However, the Java
|
|
4078
4078
|
// compiler may generate tagnames with uppercase letters so - for backwards
|
|
@@ -6288,7 +6288,9 @@ var LWC = (function (exports) {
|
|
|
6288
6288
|
wire
|
|
6289
6289
|
}
|
|
6290
6290
|
} = vm;
|
|
6291
|
-
|
|
6291
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6292
|
+
vm.debugInfo[WIRE_DEBUG_ENTRY] = create(null);
|
|
6293
|
+
}
|
|
6292
6294
|
const wiredConnecting = context.wiredConnecting = [];
|
|
6293
6295
|
const wiredDisconnecting = context.wiredDisconnecting = [];
|
|
6294
6296
|
for (const fieldNameOrMethod in wire) {
|
|
@@ -6938,7 +6940,7 @@ var LWC = (function (exports) {
|
|
|
6938
6940
|
}
|
|
6939
6941
|
return ctor;
|
|
6940
6942
|
}
|
|
6941
|
-
/* version: 2.30.
|
|
6943
|
+
/* version: 2.30.2 */
|
|
6942
6944
|
|
|
6943
6945
|
/*
|
|
6944
6946
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -7221,8 +7223,10 @@ var LWC = (function (exports) {
|
|
|
7221
7223
|
// `customElements.define('x-foo')`, then you don't have access to the upgradeCallback, so it's a dummy custom element.
|
|
7222
7224
|
// This class should be created once per tag name.
|
|
7223
7225
|
const createUpgradableConstructor = (connectedCallback, disconnectedCallback) => {
|
|
7226
|
+
const hasConnectedCallback = !isUndefined$1(connectedCallback);
|
|
7227
|
+
const hasDisconnectedCallback = !isUndefined$1(disconnectedCallback);
|
|
7224
7228
|
// TODO [#2972]: this class should expose observedAttributes as necessary
|
|
7225
|
-
|
|
7229
|
+
class UpgradableConstructor extends HTMLElement {
|
|
7226
7230
|
constructor(upgradeCallback) {
|
|
7227
7231
|
super();
|
|
7228
7232
|
// If the element is not created using lwc.createElement(), e.g. `document.createElement('x-foo')`,
|
|
@@ -7230,25 +7234,33 @@ var LWC = (function (exports) {
|
|
|
7230
7234
|
if (elementBeingUpgradedByLWC) {
|
|
7231
7235
|
upgradeCallback(this);
|
|
7232
7236
|
}
|
|
7233
|
-
else {
|
|
7234
|
-
//
|
|
7235
|
-
//
|
|
7237
|
+
else if (hasConnectedCallback || hasDisconnectedCallback) {
|
|
7238
|
+
// If this element has connected or disconnected callbacks, then we need to keep track of
|
|
7239
|
+
// instances that were created outside LWC (i.e. not created by `lwc.createElement()`).
|
|
7240
|
+
// If the element has no connected or disconnected callbacks, then we don't need to track this.
|
|
7236
7241
|
elementsUpgradedOutsideLWC.add(this);
|
|
7237
7242
|
// TODO [#2970]: LWC elements cannot be upgraded via new Ctor()
|
|
7238
7243
|
// Do we want to support this? Throw an error? Currently for backwards compat it's a no-op.
|
|
7239
7244
|
}
|
|
7240
7245
|
}
|
|
7241
|
-
|
|
7246
|
+
}
|
|
7247
|
+
// Do not unnecessarily add a connectedCallback/disconnectedCallback, as it introduces perf overhead
|
|
7248
|
+
// See: https://github.com/salesforce/lwc/pull/3162#issuecomment-1311851174
|
|
7249
|
+
if (hasConnectedCallback) {
|
|
7250
|
+
UpgradableConstructor.prototype.connectedCallback = function () {
|
|
7242
7251
|
if (!elementsUpgradedOutsideLWC.has(this)) {
|
|
7243
7252
|
connectedCallback(this);
|
|
7244
7253
|
}
|
|
7245
|
-
}
|
|
7246
|
-
|
|
7254
|
+
};
|
|
7255
|
+
}
|
|
7256
|
+
if (hasDisconnectedCallback) {
|
|
7257
|
+
UpgradableConstructor.prototype.disconnectedCallback = function () {
|
|
7247
7258
|
if (!elementsUpgradedOutsideLWC.has(this)) {
|
|
7248
7259
|
disconnectedCallback(this);
|
|
7249
7260
|
}
|
|
7250
|
-
}
|
|
7251
|
-
}
|
|
7261
|
+
};
|
|
7262
|
+
}
|
|
7263
|
+
return UpgradableConstructor;
|
|
7252
7264
|
};
|
|
7253
7265
|
const createCustomElementVanilla = (tagName, upgradeCallback, connectedCallback, disconnectedCallback) => {
|
|
7254
7266
|
// use global custom elements registry
|
|
@@ -7301,16 +7313,22 @@ var LWC = (function (exports) {
|
|
|
7301
7313
|
const EMPTY_SET = new Set();
|
|
7302
7314
|
function createDefinitionRecord(constructor) {
|
|
7303
7315
|
var _a;
|
|
7304
|
-
const { connectedCallback, disconnectedCallback, adoptedCallback, attributeChangedCallback, } = constructor.prototype;
|
|
7316
|
+
const { connectedCallback, disconnectedCallback, formAssociatedCallback, formDisabledCallback, formResetCallback, formStateRestoreCallback, adoptedCallback, attributeChangedCallback, } = constructor.prototype;
|
|
7317
|
+
const formAssociated = Boolean(constructor.formAssociated);
|
|
7305
7318
|
const observedAttributes = new Set((_a = constructor.observedAttributes) !== null && _a !== void 0 ? _a : []);
|
|
7306
7319
|
return {
|
|
7307
7320
|
UserCtor: constructor,
|
|
7308
7321
|
PivotCtor: undefined,
|
|
7309
7322
|
connectedCallback,
|
|
7310
7323
|
disconnectedCallback,
|
|
7324
|
+
formAssociatedCallback,
|
|
7325
|
+
formDisabledCallback,
|
|
7326
|
+
formResetCallback,
|
|
7327
|
+
formStateRestoreCallback,
|
|
7311
7328
|
adoptedCallback,
|
|
7312
7329
|
attributeChangedCallback,
|
|
7313
7330
|
observedAttributes,
|
|
7331
|
+
formAssociated,
|
|
7314
7332
|
};
|
|
7315
7333
|
}
|
|
7316
7334
|
// Helper to create stand-in element for each tagName registered that delegates out to the registry for the given
|
|
@@ -7385,6 +7403,26 @@ var LWC = (function (exports) {
|
|
|
7385
7403
|
}
|
|
7386
7404
|
}
|
|
7387
7405
|
}
|
|
7406
|
+
formAssociatedCallback(form) {
|
|
7407
|
+
var _a;
|
|
7408
|
+
const definition = definitionForElement.get(this);
|
|
7409
|
+
(_a = definition === null || definition === void 0 ? void 0 : definition.formAssociatedCallback) === null || _a === void 0 ? void 0 : _a.call(this, form);
|
|
7410
|
+
}
|
|
7411
|
+
formDisabledCallback(disabled) {
|
|
7412
|
+
var _a;
|
|
7413
|
+
const definition = definitionForElement.get(this);
|
|
7414
|
+
(_a = definition === null || definition === void 0 ? void 0 : definition.formDisabledCallback) === null || _a === void 0 ? void 0 : _a.call(this, disabled);
|
|
7415
|
+
}
|
|
7416
|
+
formResetCallback() {
|
|
7417
|
+
var _a;
|
|
7418
|
+
const definition = definitionForElement.get(this);
|
|
7419
|
+
(_a = definition === null || definition === void 0 ? void 0 : definition.formResetCallback) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
7420
|
+
}
|
|
7421
|
+
formStateRestoreCallback(state, mode) {
|
|
7422
|
+
var _a;
|
|
7423
|
+
const definition = definitionForElement.get(this);
|
|
7424
|
+
(_a = definition === null || definition === void 0 ? void 0 : definition.formStateRestoreCallback) === null || _a === void 0 ? void 0 : _a.call(this, state, mode);
|
|
7425
|
+
}
|
|
7388
7426
|
adoptedCallback() {
|
|
7389
7427
|
var _a;
|
|
7390
7428
|
const definition = definitionForElement.get(this);
|
|
@@ -7403,6 +7441,8 @@ var LWC = (function (exports) {
|
|
|
7403
7441
|
}
|
|
7404
7442
|
}
|
|
7405
7443
|
PivotCtor.observedAttributes = [...registeredDefinition.observedAttributes];
|
|
7444
|
+
// TODO [#3000]: support case where registeredDefinition is not form-associated, but later definition is.
|
|
7445
|
+
PivotCtor.formAssociated = registeredDefinition.formAssociated;
|
|
7406
7446
|
registeredPivotCtors.add(PivotCtor);
|
|
7407
7447
|
return PivotCtor;
|
|
7408
7448
|
}
|
|
@@ -7749,27 +7789,34 @@ var LWC = (function (exports) {
|
|
|
7749
7789
|
// Creates a constructor that is intended to be used as the UserConstructor in a scoped (pivots) registry.
|
|
7750
7790
|
// In this case, the upgradeCallback only needs to be defined once because we create these on-demand,
|
|
7751
7791
|
// multiple times per tag name.
|
|
7752
|
-
const createUserConstructor = (upgradeCallback, connectedCallback, disconnectedCallback
|
|
7792
|
+
const createUserConstructor = (HTMLElementToExtend, upgradeCallback, connectedCallback, disconnectedCallback) => {
|
|
7753
7793
|
// TODO [#2972]: this class should expose observedAttributes as necessary
|
|
7754
|
-
|
|
7794
|
+
class UserConstructor extends HTMLElementToExtend {
|
|
7755
7795
|
constructor() {
|
|
7756
7796
|
super();
|
|
7757
7797
|
upgradeCallback(this);
|
|
7758
7798
|
}
|
|
7759
|
-
|
|
7799
|
+
}
|
|
7800
|
+
// Do not unnecessarily add a connectedCallback/disconnectedCallback, as it introduces perf overhead
|
|
7801
|
+
// See: https://github.com/salesforce/lwc/pull/3162#issuecomment-1311851174
|
|
7802
|
+
if (!isUndefined$1(connectedCallback)) {
|
|
7803
|
+
UserConstructor.prototype.connectedCallback = function () {
|
|
7760
7804
|
connectedCallback(this);
|
|
7761
|
-
}
|
|
7762
|
-
|
|
7805
|
+
};
|
|
7806
|
+
}
|
|
7807
|
+
if (!isUndefined$1(disconnectedCallback)) {
|
|
7808
|
+
UserConstructor.prototype.disconnectedCallback = function () {
|
|
7763
7809
|
disconnectedCallback(this);
|
|
7764
|
-
}
|
|
7765
|
-
}
|
|
7810
|
+
};
|
|
7811
|
+
}
|
|
7812
|
+
return UserConstructor;
|
|
7766
7813
|
};
|
|
7767
7814
|
function createCustomElementScoped(tagName, upgradeCallback, connectedCallback, disconnectedCallback) {
|
|
7768
7815
|
if (isUndefined$1(createScopedConstructor) || isUndefined$1(CachedHTMLElement)) {
|
|
7769
7816
|
// This error should be impossible to hit
|
|
7770
7817
|
throw new Error('The flag ENABLE_SCOPED_CUSTOM_ELEMENT_REGISTRY must be set to true to use this feature');
|
|
7771
7818
|
}
|
|
7772
|
-
const UserConstructor = createUserConstructor(upgradeCallback, connectedCallback, disconnectedCallback
|
|
7819
|
+
const UserConstructor = createUserConstructor(CachedHTMLElement, upgradeCallback, connectedCallback, disconnectedCallback);
|
|
7773
7820
|
const ScopedConstructor = createScopedConstructor(tagName, UserConstructor);
|
|
7774
7821
|
return new ScopedConstructor(UserConstructor);
|
|
7775
7822
|
}
|
|
@@ -7866,7 +7913,7 @@ var LWC = (function (exports) {
|
|
|
7866
7913
|
function isNull(obj) {
|
|
7867
7914
|
return obj === null;
|
|
7868
7915
|
}
|
|
7869
|
-
/** version: 2.30.
|
|
7916
|
+
/** version: 2.30.2 */
|
|
7870
7917
|
|
|
7871
7918
|
/*
|
|
7872
7919
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -8345,16 +8392,16 @@ var LWC = (function (exports) {
|
|
|
8345
8392
|
DisconnectingSlot.set(elm, disconnectRootElement);
|
|
8346
8393
|
}
|
|
8347
8394
|
};
|
|
8348
|
-
|
|
8349
|
-
|
|
8395
|
+
let connectedCallback;
|
|
8396
|
+
let disconnectedCallback;
|
|
8397
|
+
if (lwcRuntimeFlags.ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE) {
|
|
8398
|
+
connectedCallback = elm => {
|
|
8350
8399
|
connectRootElement(elm);
|
|
8351
|
-
}
|
|
8352
|
-
|
|
8353
|
-
const disconnectedCallback = elm => {
|
|
8354
|
-
if (lwcRuntimeFlags.ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE) {
|
|
8400
|
+
};
|
|
8401
|
+
disconnectedCallback = elm => {
|
|
8355
8402
|
disconnectRootElement(elm);
|
|
8356
|
-
}
|
|
8357
|
-
}
|
|
8403
|
+
};
|
|
8404
|
+
}
|
|
8358
8405
|
const element = createCustomElement(tagName, upgradeCallback, connectedCallback, disconnectedCallback);
|
|
8359
8406
|
return element;
|
|
8360
8407
|
}
|
|
@@ -8427,7 +8474,7 @@ var LWC = (function (exports) {
|
|
|
8427
8474
|
});
|
|
8428
8475
|
freeze(LightningElement);
|
|
8429
8476
|
seal(LightningElement.prototype);
|
|
8430
|
-
/* version: 2.30.
|
|
8477
|
+
/* version: 2.30.2 */
|
|
8431
8478
|
|
|
8432
8479
|
exports.LightningElement = LightningElement;
|
|
8433
8480
|
exports.__unstable__ProfilerControl = profilerControl;
|
|
@@ -8461,8 +8508,6 @@ var LWC = (function (exports) {
|
|
|
8461
8508
|
exports.unwrap = unwrap;
|
|
8462
8509
|
exports.wire = wire;
|
|
8463
8510
|
|
|
8464
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8465
|
-
|
|
8466
8511
|
return exports;
|
|
8467
8512
|
|
|
8468
8513
|
})({});
|