@lwrjs/everywhere 0.13.0-alpha.2 → 0.13.0-alpha.20
Sign up to get free protection for your applications and to get access to all the features.
- package/build/__generated_site_amd_modules__/1/application/amd/l/en-US/ai/amd-bootstrap/configuration/ci/-/-/s/4f954a44b801b9d82c819dff25671ebb/config.js +12 -0
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/@lwrjs/app-service/amd-bootstrap/module/amd/v/0_13_0-alpha_20/s/272183c0b6e02561b7c96a1b23473837/@lwrjs_app-service_amd-bootstrap_module_amd.js +14 -0
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwc/v/{6_6_1/s/eeee3bb1f188f86a6a28e9d5c983706c → 7_0_0/s/ed008935d51f911e7bc67e4820765193}/lwc.js +193 -72
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/everywhereAmd/v/{0_13_0-alpha_2 → 0_13_0-alpha_20}/s/cb931ebef2b89dcf8ab51456e3a68864/lwr_everywhereAmd.js +3 -3
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/init/v/{0_13_0-alpha_2/s/f30361ad8ff7af505bf4d465c8499181 → 0_13_0-alpha_20/s/d7186d4fbbc58762dab0d51cc1f0afb8}/lwr_init.js +21 -25
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/loader/v/{0_13_0-alpha_2/s/e307ee0231427b79178dc8789d2591fc → 0_13_0-alpha_20/s/049f521eaf1c318c7c2edb3908c93ce6}/lwr_loader.js +17 -10
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/metrics/v/{0_13_0-alpha_2/s/274c8343f810353bbad085a79709395f → 0_13_0-alpha_20/s/fb8c5dd340c69fdf7ded52d3eba633b9}/lwr_metrics.js +2 -2
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/preInit/v/{0_13_0-alpha_2 → 0_13_0-alpha_20}/s/ec0fad0e38a96bb0b88c9f4553460347/lwr_preInit.js +1 -1
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/profiler/v/{0_13_0-alpha_2 → 0_13_0-alpha_20}/s/a152b8d35f12ca1b5147c5cd1ee155fb/lwr_profiler.js +1 -1
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/vault/v/{0_13_0-alpha_2 → 0_13_0-alpha_20}/s/c92abd8c1fec2d7eff62e4b097abbe14/lwr_vault.js +1 -1
- package/build/__generated_site_amd_modules__/1/resource/amd/lwr-error-shim.js/v/0_13_0-alpha_20/lwr-error-shim.js +8 -0
- package/build/__generated_site_amd_modules__/1/resource/amd/lwr-loader-shim.bundle.js/v/{0_13_0-alpha_2 → 0_13_0-alpha_20}/lwr-loader-shim.bundle.js +45 -23
- package/build/amd-client.js +1 -1
- package/build/assets/amd/lwr-everywhere-debug.js +25 -18
- package/build/assets/amd/lwr-everywhere-min.js +2 -2
- package/build/assets/amd/lwr-everywhere.js +25 -18
- package/build/assets/core/lwr-everywhere-debug.js +21 -14
- package/build/assets/core/lwr-everywhere-min.js +2 -2
- package/build/assets/core/lwr-everywhere.js +21 -14
- package/build/assets/esm/lwr-everywhere-debug.js +1 -1
- package/build/assets/esm/lwr-everywhere-min.js +1 -1
- package/build/assets/esm/lwr-everywhere.js +1 -1
- package/build/esm-client.js +1 -1
- package/build/generate.d.ts +1 -1
- package/build/modules/lwr/everywhere/everywhere.js +1 -1
- package/build/modules/lwr/host/host.js +1 -1
- package/build/modules/lwr/setupLDS/setupLDS.js +1 -1
- package/package.json +10 -10
- package/src/amd-client.ts +2 -2
- package/src/esm-client.ts +2 -2
- package/src/generate.ts +1 -1
- package/build/__generated_site_amd_modules__/1/application/amd/l/en-US/ai/amd-bootstrap/configuration/ci/-/-/s/86e5b35c91b01b4b7df42aded40a3e5d/config.js +0 -12
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/@lwrjs/app-service/amd-bootstrap/module/amd/v/0_13_0-alpha_2/s/8bce578258518655194bd71d1d72aad5/@lwrjs_app-service_amd-bootstrap_module_amd.js +0 -14
- package/build/__generated_site_amd_modules__/1/resource/amd/lwr-error-shim.js/v/0_13_0-alpha_2/lwr-error-shim.js +0 -8
@@ -1,4 +1,4 @@
|
|
1
|
-
LWR.define('lwc/v/
|
1
|
+
LWR.define('lwc/v/7_0_0', ['exports'], (function (exports) { 'use strict';
|
2
2
|
|
3
3
|
/**
|
4
4
|
* Copyright (c) 2024 Salesforce, Inc.
|
@@ -153,7 +153,8 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
153
153
|
replace: StringReplace,
|
154
154
|
split: StringSplit,
|
155
155
|
slice: StringSlice,
|
156
|
-
toLowerCase: StringToLowerCase
|
156
|
+
toLowerCase: StringToLowerCase,
|
157
|
+
trim: StringTrim
|
157
158
|
} = String.prototype;
|
158
159
|
/**
|
159
160
|
* Determines whether the argument is `undefined`.
|
@@ -313,6 +314,10 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
313
314
|
case 7 /* APIFeature.ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE */:
|
314
315
|
case 6 /* APIFeature.USE_LIGHT_DOM_SLOT_FORWARDING */:
|
315
316
|
return apiVersion >= 61 /* APIVersion.V61_250_SUMMER_24 */;
|
317
|
+
case 9 /* APIFeature.ENABLE_THIS_DOT_HOST_ELEMENT */:
|
318
|
+
case 10 /* APIFeature.ENABLE_THIS_DOT_STYLE */:
|
319
|
+
case 11 /* APIFeature.TEMPLATE_CLASS_NAME_OBJECT_BINDING */:
|
320
|
+
return apiVersion >= 62 /* APIVersion.V62_252_WINTER_25 */;
|
316
321
|
}
|
317
322
|
}
|
318
323
|
|
@@ -442,9 +447,9 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
442
447
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
443
448
|
*/
|
444
449
|
// Increment whenever the LWC template compiler changes
|
445
|
-
const LWC_VERSION = "
|
450
|
+
const LWC_VERSION = "7.0.0";
|
446
451
|
const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
447
|
-
/** version:
|
452
|
+
/** version: 7.0.0 */
|
448
453
|
|
449
454
|
/**
|
450
455
|
* Copyright (c) 2024 Salesforce, Inc.
|
@@ -530,7 +535,7 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
530
535
|
setFeatureFlag(name, value);
|
531
536
|
}
|
532
537
|
}
|
533
|
-
/** version:
|
538
|
+
/** version: 7.0.0 */
|
534
539
|
|
535
540
|
/**
|
536
541
|
* Copyright (c) 2024 Salesforce, Inc.
|
@@ -1722,7 +1727,7 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
1722
1727
|
valueMutated(originalTarget, key);
|
1723
1728
|
return true;
|
1724
1729
|
}
|
1725
|
-
/*LWC compiler
|
1730
|
+
/*LWC compiler v7.0.0*/
|
1726
1731
|
}
|
1727
1732
|
const getterMap = new WeakMap();
|
1728
1733
|
const setterMap = new WeakMap();
|
@@ -1815,7 +1820,7 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
1815
1820
|
/* istanbul ignore next */
|
1816
1821
|
return false;
|
1817
1822
|
}
|
1818
|
-
/*LWC compiler
|
1823
|
+
/*LWC compiler v7.0.0*/
|
1819
1824
|
}
|
1820
1825
|
function extract(objectOrArray) {
|
1821
1826
|
if (isArray(objectOrArray)) {
|
@@ -2097,7 +2102,7 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
2097
2102
|
}
|
2098
2103
|
|
2099
2104
|
/*
|
2100
|
-
* Copyright (c)
|
2105
|
+
* Copyright (c) 2024, Salesforce, Inc.
|
2101
2106
|
* All rights reserved.
|
2102
2107
|
* SPDX-License-Identifier: MIT
|
2103
2108
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
@@ -2459,6 +2464,21 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
2459
2464
|
}
|
2460
2465
|
return vm.shadowRoot;
|
2461
2466
|
},
|
2467
|
+
get hostElement() {
|
2468
|
+
const vm = getAssociatedVM(this);
|
2469
|
+
const apiVersion = getComponentAPIVersion(vm.def.ctor);
|
2470
|
+
if (!isAPIFeatureEnabled(9 /* APIFeature.ENABLE_THIS_DOT_HOST_ELEMENT */, apiVersion)) {
|
2471
|
+
if (process.env.NODE_ENV !== 'production') {
|
2472
|
+
logWarnOnce('The `this.hostElement` API within LightningElement is ' + 'only supported in API version 62 and above. Increase the API version to use it.');
|
2473
|
+
}
|
2474
|
+
// Simulate the old behavior for `this.hostElement` to avoid a breaking change
|
2475
|
+
return undefined;
|
2476
|
+
}
|
2477
|
+
if (process.env.NODE_ENV !== 'production') {
|
2478
|
+
assert.isTrue(vm.elm instanceof Element, `this.hostElement should be an Element, found: ${vm.elm}`);
|
2479
|
+
}
|
2480
|
+
return vm.elm;
|
2481
|
+
},
|
2462
2482
|
get refs() {
|
2463
2483
|
const vm = getAssociatedVM(this);
|
2464
2484
|
if (isUpdatingTemplate) {
|
@@ -2587,6 +2607,22 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
2587
2607
|
} = getAssociatedVM(this);
|
2588
2608
|
return renderer.getTagName(elm);
|
2589
2609
|
},
|
2610
|
+
get style() {
|
2611
|
+
const {
|
2612
|
+
elm,
|
2613
|
+
renderer,
|
2614
|
+
def
|
2615
|
+
} = getAssociatedVM(this);
|
2616
|
+
const apiVersion = getComponentAPIVersion(def.ctor);
|
2617
|
+
if (!isAPIFeatureEnabled(10 /* APIFeature.ENABLE_THIS_DOT_STYLE */, apiVersion)) {
|
2618
|
+
if (process.env.NODE_ENV !== 'production') {
|
2619
|
+
logWarnOnce('The `this.style` API within LightningElement returning the CSSStyleDeclaration is ' + 'only supported in API version 62 and above. Increase the API version to use it.');
|
2620
|
+
}
|
2621
|
+
// Simulate the old behavior for `this.style` to avoid a breaking change
|
2622
|
+
return undefined;
|
2623
|
+
}
|
2624
|
+
return renderer.getStyle(elm);
|
2625
|
+
},
|
2590
2626
|
render() {
|
2591
2627
|
const vm = getAssociatedVM(this);
|
2592
2628
|
return vm.def.template;
|
@@ -2968,12 +3004,21 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
2968
3004
|
}
|
2969
3005
|
|
2970
3006
|
/*
|
2971
|
-
* Copyright (c)
|
3007
|
+
* Copyright (c) 2024, Salesforce, Inc.
|
2972
3008
|
* All rights reserved.
|
2973
3009
|
* SPDX-License-Identifier: MIT
|
2974
3010
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
2975
3011
|
*/
|
2976
|
-
|
3012
|
+
/**
|
3013
|
+
* The `@api` decorator marks public fields and public methods in
|
3014
|
+
* LWC Components. This function implements the internals of this
|
3015
|
+
* decorator.
|
3016
|
+
*/
|
3017
|
+
function api$1(
|
3018
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
3019
|
+
value,
|
3020
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
3021
|
+
context) {
|
2977
3022
|
if (process.env.NODE_ENV !== 'production') {
|
2978
3023
|
assert.fail(`@api decorator can only be used as a decorator function.`);
|
2979
3024
|
}
|
@@ -3050,7 +3095,7 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
3050
3095
|
}
|
3051
3096
|
|
3052
3097
|
/*
|
3053
|
-
* Copyright (c)
|
3098
|
+
* Copyright (c) 2024, Salesforce, Inc.
|
3054
3099
|
* All rights reserved.
|
3055
3100
|
* SPDX-License-Identifier: MIT
|
3056
3101
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
@@ -3092,19 +3137,27 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
3092
3137
|
}
|
3093
3138
|
|
3094
3139
|
/*
|
3095
|
-
* Copyright (c)
|
3140
|
+
* Copyright (c) 2024, Salesforce, Inc.
|
3096
3141
|
* All rights reserved.
|
3097
3142
|
* SPDX-License-Identifier: MIT
|
3098
3143
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
3099
3144
|
*/
|
3100
3145
|
/**
|
3101
|
-
*
|
3102
|
-
*
|
3103
|
-
*
|
3104
|
-
* @
|
3105
|
-
* @
|
3106
|
-
|
3107
|
-
|
3146
|
+
* Decorator factory to wire a property or method to a wire adapter data source.
|
3147
|
+
* @param adapter the adapter used to provision data
|
3148
|
+
* @param config configuration object for the adapter
|
3149
|
+
* @returns A decorator function
|
3150
|
+
* @example
|
3151
|
+
* export default class WireExample extends LightningElement {
|
3152
|
+
* \@api bookId;
|
3153
|
+
* \@wire(getBook, { id: '$bookId'}) book;
|
3154
|
+
* }
|
3155
|
+
*/
|
3156
|
+
function wire(
|
3157
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
3158
|
+
adapter,
|
3159
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
3160
|
+
config) {
|
3108
3161
|
if (process.env.NODE_ENV !== 'production') {
|
3109
3162
|
assert.fail('@wire(adapter, config?) may only be used as a decorator.');
|
3110
3163
|
}
|
@@ -3140,11 +3193,11 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
3140
3193
|
*/
|
3141
3194
|
function getClassDescriptorType(descriptor) {
|
3142
3195
|
if (isFunction$1(descriptor.value)) {
|
3143
|
-
return
|
3196
|
+
return 'method';
|
3144
3197
|
} else if (isFunction$1(descriptor.set) || isFunction$1(descriptor.get)) {
|
3145
|
-
return
|
3198
|
+
return 'accessor';
|
3146
3199
|
} else {
|
3147
|
-
return
|
3200
|
+
return 'field';
|
3148
3201
|
}
|
3149
3202
|
}
|
3150
3203
|
function validateObservedField(Ctor, fieldName, descriptor) {
|
@@ -3381,9 +3434,7 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
3381
3434
|
const versionMatcher = func.toString().match(LWC_VERSION_COMMENT_REGEX);
|
3382
3435
|
if (!isNull(versionMatcher) && !warned) {
|
3383
3436
|
const version = versionMatcher[1];
|
3384
|
-
|
3385
|
-
const [expectedMajor, expectedMinor] = LWC_VERSION.split('.');
|
3386
|
-
if (major !== expectedMajor || minor !== expectedMinor) {
|
3437
|
+
if (version !== LWC_VERSION) {
|
3387
3438
|
warned = true; // only warn once to avoid flooding the console
|
3388
3439
|
// stylesheets and templates do not have user-meaningful names, but components do
|
3389
3440
|
const friendlyName = type === 'component' ? `${type} ${func.name}` : type;
|
@@ -3522,7 +3573,7 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
3522
3573
|
}
|
3523
3574
|
function HTMLBridgeElementFactory(SuperClass, publicProperties, methods, observedFields, proto, hasCustomSuperClass) {
|
3524
3575
|
const HTMLBridgeElement = class extends SuperClass {
|
3525
|
-
/*LWC compiler
|
3576
|
+
/*LWC compiler v7.0.0*/
|
3526
3577
|
};
|
3527
3578
|
// generating the hash table for attributes to avoid duplicate fields and facilitate validation
|
3528
3579
|
// and false positives in case of inheritance.
|
@@ -4040,7 +4091,7 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
4040
4091
|
let swappedStyleMap = /*@__PURE__@*/new WeakMap();
|
4041
4092
|
// The important thing here is the weak values – VMs are transient (one per component instance) and should be GC'ed,
|
4042
4093
|
// so we don't want to create strong references to them.
|
4043
|
-
// The weak keys are kind of useless, because Templates, LightningElementConstructors, and
|
4094
|
+
// The weak keys are kind of useless, because Templates, LightningElementConstructors, and Stylesheets are
|
4044
4095
|
// never GC'ed. But maybe they will be someday, so we may as well use weak keys too.
|
4045
4096
|
// The "pure" annotations are so that Rollup knows for sure it can remove these from prod mode
|
4046
4097
|
let activeTemplates = /*@__PURE__@*/new WeakMultiMap();
|
@@ -4074,6 +4125,9 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
4074
4125
|
}
|
4075
4126
|
function rehydrateHotStyle(style) {
|
4076
4127
|
const activeVMs = activeStyles.get(style);
|
4128
|
+
if (!activeVMs.size) {
|
4129
|
+
return true;
|
4130
|
+
}
|
4077
4131
|
unrenderStylesheet(style);
|
4078
4132
|
for (const vm of activeVMs) {
|
4079
4133
|
// if a style definition is swapped, we must reset
|
@@ -4188,11 +4242,22 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
4188
4242
|
}
|
4189
4243
|
function swapComponent(oldComponent, newComponent) {
|
4190
4244
|
if (process.env.NODE_ENV !== 'production') {
|
4191
|
-
|
4245
|
+
const isOldCtorAComponent = isComponentConstructor(oldComponent);
|
4246
|
+
const isNewCtorAComponent = isComponentConstructor(newComponent);
|
4247
|
+
if (isOldCtorAComponent && isNewCtorAComponent) {
|
4192
4248
|
swappedComponentMap.set(oldComponent, newComponent);
|
4193
4249
|
return rehydrateHotComponent(oldComponent);
|
4250
|
+
} else if (isOldCtorAComponent === false && isNewCtorAComponent === true) {
|
4251
|
+
throw new TypeError(`Invalid Component: Attempting to swap a non-component with a component`);
|
4252
|
+
} else if (isOldCtorAComponent === true && isNewCtorAComponent === false) {
|
4253
|
+
throw new TypeError(`Invalid Component: Attempting to swap a component with a non-component`);
|
4194
4254
|
} else {
|
4195
|
-
|
4255
|
+
// The dev-server relies on the presence of registerComponent() as a way to determine a
|
4256
|
+
// component module. However, the compiler cannot definitively add registerComponent()
|
4257
|
+
// transformation only to a component constructor. Hence the dev-server may attempt to
|
4258
|
+
// hot swap javascript modules that look like a component and should not cause the app
|
4259
|
+
// to fail. To allow that, this api ignores such hot swap attempts.
|
4260
|
+
return false;
|
4196
4261
|
}
|
4197
4262
|
}
|
4198
4263
|
return false;
|
@@ -4258,11 +4323,11 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
4258
4323
|
// But we keep it here just in case.
|
4259
4324
|
logError(`Missing ${ctorName}.constructor, ${ctorName} should have a "constructor" property.`);
|
4260
4325
|
}
|
4261
|
-
if (!isUndefined$1(ctorShadowSupportMode) && ctorShadowSupportMode !==
|
4326
|
+
if (!isUndefined$1(ctorShadowSupportMode) && ctorShadowSupportMode !== 'any' && ctorShadowSupportMode !== 'reset' && ctorShadowSupportMode !== 'native') {
|
4262
4327
|
logError(`Invalid value for static property shadowSupportMode: '${ctorShadowSupportMode}'`);
|
4263
4328
|
}
|
4264
4329
|
// TODO [#3971]: Completely remove shadowSupportMode "any"
|
4265
|
-
if (ctorShadowSupportMode ===
|
4330
|
+
if (ctorShadowSupportMode === 'any') {
|
4266
4331
|
logWarn(`Invalid value 'any' for static property shadowSupportMode. 'any' is deprecated and will be removed in a future release--use 'native' instead.`);
|
4267
4332
|
}
|
4268
4333
|
if (!isUndefined$1(ctorRenderMode) && ctorRenderMode !== 'light' && ctorRenderMode !== 'shadow') {
|
@@ -4310,7 +4375,7 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
4310
4375
|
let shadowSupportMode = superDef.shadowSupportMode;
|
4311
4376
|
if (!isUndefined$1(ctorShadowSupportMode)) {
|
4312
4377
|
shadowSupportMode = ctorShadowSupportMode;
|
4313
|
-
if (isReportingEnabled() && (shadowSupportMode ===
|
4378
|
+
if (isReportingEnabled() && (shadowSupportMode === 'any' || shadowSupportMode === 'native')) {
|
4314
4379
|
report("ShadowSupportModeUsage" /* ReportingEventId.ShadowSupportModeUsage */, {
|
4315
4380
|
tagName: Ctor.name,
|
4316
4381
|
mode: shadowSupportMode
|
@@ -4425,7 +4490,7 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
4425
4490
|
propsConfig: EmptyObject,
|
4426
4491
|
methods: EmptyObject,
|
4427
4492
|
renderMode: 1 /* RenderMode.Shadow */,
|
4428
|
-
shadowSupportMode:
|
4493
|
+
shadowSupportMode: 'reset',
|
4429
4494
|
formAssociated: undefined,
|
4430
4495
|
wire: EmptyObject,
|
4431
4496
|
bridge: BaseBridgeElement,
|
@@ -4456,7 +4521,7 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
4456
4521
|
publicProps[key] = {
|
4457
4522
|
config: propsConfig[key] || 0,
|
4458
4523
|
// a property by default
|
4459
|
-
type:
|
4524
|
+
type: 'any',
|
4460
4525
|
// no type inference for public services
|
4461
4526
|
attr: htmlPropertyToAttribute(key)
|
4462
4527
|
};
|
@@ -5552,14 +5617,14 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
5552
5617
|
context
|
5553
5618
|
}
|
5554
5619
|
} = vnode;
|
5555
|
-
if (owner.shadowMode === 1 /* ShadowMode.Synthetic */ && context?.lwc?.dom ===
|
5620
|
+
if (owner.shadowMode === 1 /* ShadowMode.Synthetic */ && context?.lwc?.dom === 'manual') {
|
5556
5621
|
elm.$domManual$ = true;
|
5557
5622
|
}
|
5558
5623
|
}
|
5559
5624
|
function applyElementRestrictions(elm, vnode) {
|
5560
5625
|
if (process.env.NODE_ENV !== 'production') {
|
5561
5626
|
const isSynthetic = vnode.owner.shadowMode === 1 /* ShadowMode.Synthetic */;
|
5562
|
-
const isPortal = vnode.type === 2 /* VNodeType.Element */ && vnode.data.context?.lwc?.dom ===
|
5627
|
+
const isPortal = vnode.type === 2 /* VNodeType.Element */ && vnode.data.context?.lwc?.dom === 'manual';
|
5563
5628
|
const isLight = vnode.owner.renderMode === 0 /* RenderMode.Light */;
|
5564
5629
|
patchElementWithRestrictions(elm, {
|
5565
5630
|
isPortal,
|
@@ -5933,7 +5998,7 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
5933
5998
|
factory,
|
5934
5999
|
owner: getVMBeingRendered(),
|
5935
6000
|
elm: undefined,
|
5936
|
-
sel:
|
6001
|
+
sel: '__scoped_slot_fragment__',
|
5937
6002
|
key: undefined,
|
5938
6003
|
slotName
|
5939
6004
|
};
|
@@ -5944,7 +6009,7 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
5944
6009
|
const fragment = fragmentFactory(parts);
|
5945
6010
|
const vnode = {
|
5946
6011
|
type: 4 /* VNodeType.Static */,
|
5947
|
-
sel:
|
6012
|
+
sel: '__static__',
|
5948
6013
|
key,
|
5949
6014
|
elm: undefined,
|
5950
6015
|
fragment,
|
@@ -5962,7 +6027,7 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
5962
6027
|
const trailing = useCommentNodes ? co('') : t('');
|
5963
6028
|
return {
|
5964
6029
|
type: 5 /* VNodeType.Fragment */,
|
5965
|
-
sel:
|
6030
|
+
sel: '__fragment__',
|
5966
6031
|
key,
|
5967
6032
|
elm: undefined,
|
5968
6033
|
children: [leading, ...children, trailing],
|
@@ -6077,10 +6142,18 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
6077
6142
|
// to the vnode because the current way the diffing algo works, it will replace the original reference
|
6078
6143
|
// to the host element with a new one. This means the new element will be mounted and immediately unmounted.
|
6079
6144
|
// Creating a copy of the vnode to preserve a reference to the previous host element.
|
6080
|
-
|
6081
|
-
|
6082
|
-
|
6083
|
-
|
6145
|
+
if (isUndefined$1(vnode.elm)) {
|
6146
|
+
// vnode.elm is undefined during initial render.
|
6147
|
+
// We don't need to clone at this point because it doesn't need to be unmounted.
|
6148
|
+
vnode.slotAssignment = data.slotAssignment;
|
6149
|
+
} else {
|
6150
|
+
// Clone when the vnode.elm is defined to ensure we don't lose reference to the previous element.
|
6151
|
+
// This is specifically for slot forwarding.
|
6152
|
+
clonedVNode = {
|
6153
|
+
...vnode,
|
6154
|
+
slotAssignment: data.slotAssignment
|
6155
|
+
};
|
6156
|
+
}
|
6084
6157
|
}
|
6085
6158
|
// If the slot content is standard type, the content is static, no additional
|
6086
6159
|
// processing needed on the vnode
|
@@ -6254,10 +6327,10 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
6254
6327
|
}
|
6255
6328
|
// [t]ext node
|
6256
6329
|
function t(text) {
|
6257
|
-
let
|
6330
|
+
let key, elm;
|
6258
6331
|
return {
|
6259
6332
|
type: 0 /* VNodeType.Text */,
|
6260
|
-
sel,
|
6333
|
+
sel: '__text__',
|
6261
6334
|
text,
|
6262
6335
|
elm,
|
6263
6336
|
key,
|
@@ -6266,13 +6339,13 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
6266
6339
|
}
|
6267
6340
|
// [co]mment node
|
6268
6341
|
function co(text) {
|
6269
|
-
let
|
6342
|
+
let elm, key;
|
6270
6343
|
return {
|
6271
6344
|
type: 1 /* VNodeType.Comment */,
|
6272
|
-
sel,
|
6345
|
+
sel: '__comment__',
|
6273
6346
|
text,
|
6274
6347
|
elm,
|
6275
|
-
key
|
6348
|
+
key,
|
6276
6349
|
owner: getVMBeingRendered()
|
6277
6350
|
};
|
6278
6351
|
}
|
@@ -6445,6 +6518,35 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
6445
6518
|
function shc(content) {
|
6446
6519
|
return sanitizeHtmlContentHook(content);
|
6447
6520
|
}
|
6521
|
+
/**
|
6522
|
+
* [ncls] - Normalize class name attribute.
|
6523
|
+
*
|
6524
|
+
* Transforms the provided class property value from an object/string into a string the diffing algo
|
6525
|
+
* can operate on.
|
6526
|
+
*
|
6527
|
+
* This implementation is borrowed from Vue:
|
6528
|
+
* https://github.com/vuejs/core/blob/e790e1bdd7df7be39e14780529db86e4da47a3db/packages/shared/src/normalizeProp.ts#L63-L82
|
6529
|
+
*/
|
6530
|
+
function ncls(value) {
|
6531
|
+
let res = '';
|
6532
|
+
if (isString(value)) {
|
6533
|
+
res = value;
|
6534
|
+
} else if (isArray$1(value)) {
|
6535
|
+
for (let i = 0; i < value.length; i++) {
|
6536
|
+
const normalized = ncls(value[i]);
|
6537
|
+
if (normalized) {
|
6538
|
+
res += normalized + ' ';
|
6539
|
+
}
|
6540
|
+
}
|
6541
|
+
} else if (isObject(value)) {
|
6542
|
+
for (const key in value) {
|
6543
|
+
if (value[key]) {
|
6544
|
+
res += key + ' ';
|
6545
|
+
}
|
6546
|
+
}
|
6547
|
+
}
|
6548
|
+
return StringTrim.call(res);
|
6549
|
+
}
|
6448
6550
|
const api = freeze({
|
6449
6551
|
s,
|
6450
6552
|
h,
|
@@ -6465,7 +6567,8 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
6465
6567
|
shc,
|
6466
6568
|
ssf,
|
6467
6569
|
ddc,
|
6468
|
-
sp
|
6570
|
+
sp,
|
6571
|
+
ncls
|
6469
6572
|
});
|
6470
6573
|
|
6471
6574
|
/*
|
@@ -7300,7 +7403,7 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
7300
7403
|
// ShadowMode.Native implies "not synthetic shadow" which is consistent with how
|
7301
7404
|
// everything defaults to native when the synthetic shadow polyfill is unavailable.
|
7302
7405
|
shadowMode = 0 /* ShadowMode.Native */;
|
7303
|
-
} else if (def.shadowSupportMode ===
|
7406
|
+
} else if (def.shadowSupportMode === 'native') {
|
7304
7407
|
shadowMode = 0 /* ShadowMode.Native */;
|
7305
7408
|
} else {
|
7306
7409
|
const shadowAncestor = getNearestShadowAncestor(owner);
|
@@ -8131,7 +8234,7 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
8131
8234
|
const {
|
8132
8235
|
context
|
8133
8236
|
} = vnode.data;
|
8134
|
-
const isDomManual = Boolean(!isUndefined$1(context) && !isUndefined$1(context.lwc) && context.lwc.dom ===
|
8237
|
+
const isDomManual = Boolean(!isUndefined$1(context) && !isUndefined$1(context.lwc) && context.lwc.dom === 'manual');
|
8135
8238
|
if (isDomManual) {
|
8136
8239
|
// it may be that this element has lwc:inner-html, we need to diff and in case are the same,
|
8137
8240
|
// remove the innerHTML from props so it reuses the existing dom elements.
|
@@ -8552,6 +8655,7 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
8552
8655
|
if (isUndefined$1(parts)) {
|
8553
8656
|
return true;
|
8554
8657
|
}
|
8658
|
+
const shouldValidateAttr = (data, attrName) => attrName in data;
|
8555
8659
|
// The validation here relies on 2 key invariants:
|
8556
8660
|
// 1. It's never the case that `parts` is undefined on the server but defined on the client (or vice-versa)
|
8557
8661
|
// 2. It's never the case that `parts` has one length on the server but another on the client
|
@@ -8567,8 +8671,11 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
8567
8671
|
data
|
8568
8672
|
} = part;
|
8569
8673
|
const hasMatchingAttrs = validateAttrs(vnode, elm, data, renderer, () => true);
|
8570
|
-
|
8571
|
-
|
8674
|
+
// Explicitly skip hydration validation when static parts don't contain `style` or `className`.
|
8675
|
+
// This means the style/class attributes are either static or don't exist on the element and
|
8676
|
+
// cannot be affected by hydration.
|
8677
|
+
const hasMatchingStyleAttr = shouldValidateAttr(data, 'style') ? validateStyleAttr(vnode, elm, data, renderer) : true;
|
8678
|
+
const hasMatchingClass = shouldValidateAttr(data, 'className') ? validateClassAttr(vnode, elm, data, renderer) : true;
|
8572
8679
|
if (isFalse(hasMatchingAttrs && hasMatchingStyleAttr && hasMatchingClass)) {
|
8573
8680
|
return false;
|
8574
8681
|
}
|
@@ -8838,7 +8945,7 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
8838
8945
|
}
|
8839
8946
|
return getReadOnlyProxy(obj);
|
8840
8947
|
}
|
8841
|
-
/** version:
|
8948
|
+
/** version: 7.0.0 */
|
8842
8949
|
|
8843
8950
|
/*
|
8844
8951
|
* Copyright (c) 2018, salesforce.com, inc.
|
@@ -9109,36 +9216,30 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
9109
9216
|
// Do we want to support this? Throw an error? Currently for backwards compat it's a no-op.
|
9110
9217
|
}
|
9111
9218
|
connectedCallback() {
|
9219
|
+
// native `connectedCallback`/`disconnectedCallback` are only enabled in native lifecycle mode
|
9112
9220
|
if (isTrue(nativeLifecycleElementsToUpgradedByLWC.get(this))) {
|
9113
9221
|
connectRootElement(this);
|
9114
9222
|
}
|
9115
9223
|
}
|
9116
9224
|
disconnectedCallback() {
|
9225
|
+
// native `connectedCallback`/`disconnectedCallback` are only enabled in native lifecycle mode
|
9117
9226
|
if (isTrue(nativeLifecycleElementsToUpgradedByLWC.get(this))) {
|
9118
9227
|
disconnectRootElement(this);
|
9119
9228
|
}
|
9120
9229
|
}
|
9121
9230
|
formAssociatedCallback(form) {
|
9122
|
-
|
9123
|
-
runFormAssociatedCallback(this, form);
|
9124
|
-
}
|
9231
|
+
runFormAssociatedCallback(this, form);
|
9125
9232
|
}
|
9126
9233
|
formDisabledCallback(disabled) {
|
9127
|
-
|
9128
|
-
runFormDisabledCallback(this, disabled);
|
9129
|
-
}
|
9234
|
+
runFormDisabledCallback(this, disabled);
|
9130
9235
|
}
|
9131
9236
|
formResetCallback() {
|
9132
|
-
|
9133
|
-
runFormResetCallback(this);
|
9134
|
-
}
|
9237
|
+
runFormResetCallback(this);
|
9135
9238
|
}
|
9136
9239
|
formStateRestoreCallback(state, reason) {
|
9137
|
-
|
9138
|
-
runFormStateRestoreCallback(this, state, reason);
|
9139
|
-
}
|
9240
|
+
runFormStateRestoreCallback(this, state, reason);
|
9140
9241
|
}
|
9141
|
-
/*LWC compiler
|
9242
|
+
/*LWC compiler v7.0.0*/
|
9142
9243
|
};
|
9143
9244
|
BaseHTMLElement = HTMLElement; // cache to track if it changes
|
9144
9245
|
}
|
@@ -9153,7 +9254,7 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
9153
9254
|
// Using a BaseUpgradableConstructor superclass here is a perf optimization to avoid
|
9154
9255
|
// re-defining the same logic (connectedCallback, disconnectedCallback, etc.) over and over.
|
9155
9256
|
class UpgradableConstructor extends BaseUpgradableConstructor {
|
9156
|
-
/*LWC compiler
|
9257
|
+
/*LWC compiler v7.0.0*/
|
9157
9258
|
}
|
9158
9259
|
if (isFormAssociated) {
|
9159
9260
|
// Perf optimization - the vast majority of components have formAssociated=false,
|
@@ -9276,7 +9377,7 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
9276
9377
|
function isNull(obj) {
|
9277
9378
|
return obj === null;
|
9278
9379
|
}
|
9279
|
-
/** version:
|
9380
|
+
/** version: 7.0.0 */
|
9280
9381
|
|
9281
9382
|
/*
|
9282
9383
|
* Copyright (c) 2023, salesforce.com, inc.
|
@@ -9296,7 +9397,7 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
9296
9397
|
this.setNewContext = setNewContext;
|
9297
9398
|
this.setDisconnectedCallback = setDisconnectedCallback;
|
9298
9399
|
}
|
9299
|
-
/*LWC compiler
|
9400
|
+
/*LWC compiler v7.0.0*/
|
9300
9401
|
}
|
9301
9402
|
function registerContextConsumer(elm, adapterContextToken, subscriptionPayload) {
|
9302
9403
|
dispatchEvent(elm, new WireContextSubscriptionEvent(adapterContextToken, subscriptionPayload));
|
@@ -9448,6 +9549,9 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
9448
9549
|
function getTagName(elm) {
|
9449
9550
|
return elm.tagName;
|
9450
9551
|
}
|
9552
|
+
function getStyle(elm) {
|
9553
|
+
return elm.style;
|
9554
|
+
}
|
9451
9555
|
function attachInternals(elm) {
|
9452
9556
|
return attachInternalsFunc.call(elm);
|
9453
9557
|
}
|
@@ -9480,6 +9584,7 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
9480
9584
|
exports.getLastElementChild = getLastElementChild;
|
9481
9585
|
exports.getParentNode = getParentNode;
|
9482
9586
|
exports.getProperty = getProperty;
|
9587
|
+
exports.getStyle = getStyle;
|
9483
9588
|
exports.getTagName = getTagName;
|
9484
9589
|
exports.insert = insert;
|
9485
9590
|
exports.isConnected = isConnected;
|
@@ -9710,7 +9815,7 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
9710
9815
|
formStateRestoreCallback(state, reason) {
|
9711
9816
|
runFormStateRestoreCallback(this, state, reason);
|
9712
9817
|
}
|
9713
|
-
/*LWC compiler
|
9818
|
+
/*LWC compiler v7.0.0*/
|
9714
9819
|
}, _a.observedAttributes = observedAttributes,
|
9715
9820
|
// Note CustomElementConstructor is not upgraded by LWC and inherits directly from HTMLElement which means it calls the native
|
9716
9821
|
// attachInternals API.
|
@@ -9774,11 +9879,27 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
9774
9879
|
}
|
9775
9880
|
});
|
9776
9881
|
}
|
9882
|
+
if (process.env.NODE_ENV !== 'production') {
|
9883
|
+
// In dev mode, we must eagerly patch these DOM APIs because `restrictions.ts` in `@lwc/engine-core` does
|
9884
|
+
// its own monkey-patching, and the assumption is that its monkey patches will apply on top of our own.
|
9885
|
+
// If we _don't_ eagerly monkey-patch, then APIs like `element.appendChild` could end up calling through
|
9886
|
+
// directly to the native DOM APIs instead, which would bypass synthetic custom element lifecycle
|
9887
|
+
// and cause rendering/`connectedCallback`/`disconnectedCallback` not to fire.
|
9888
|
+
// In prod mode, we avoid global patching as a slight perf optimization and because it's good practice
|
9889
|
+
// in general to avoid global patching.
|
9890
|
+
// See issue #4242 for details.
|
9891
|
+
monkeyPatchDomAPIs();
|
9892
|
+
}
|
9777
9893
|
/**
|
9778
9894
|
* EXPERIMENTAL: This function is almost identical to document.createElement with the slightly
|
9779
9895
|
* difference that in the options, you can pass the `is` property set to a Constructor instead of
|
9780
9896
|
* just a string value. The intent is to allow the creation of an element controlled by LWC without
|
9781
9897
|
* having to register the element as a custom element.
|
9898
|
+
*
|
9899
|
+
* NOTE: The returned type incorrectly includes _all_ properties defined on the component class,
|
9900
|
+
* even though the runtime object only uses those decorated with `@api`. This is due to a
|
9901
|
+
* limitation of TypeScript. To avoid inferring incorrect properties, provide an explicit generic
|
9902
|
+
* parameter, e.g. `createElement<typeof LightningElement>('x-foo', { is: FooCtor })`.
|
9782
9903
|
* @param sel The tagname of the element to create
|
9783
9904
|
* @param options Control the behavior of the created element
|
9784
9905
|
* @param options.is The LWC component that the element should be
|
@@ -9939,7 +10060,7 @@ LWR.define('lwc/v/6_6_1', ['exports'], (function (exports) { 'use strict';
|
|
9939
10060
|
});
|
9940
10061
|
});
|
9941
10062
|
}
|
9942
|
-
/** version:
|
10063
|
+
/** version: 7.0.0 */
|
9943
10064
|
|
9944
10065
|
exports.LightningElement = LightningElement;
|
9945
10066
|
exports.__unstable__ProfilerControl = profilerControl;
|
@@ -1,10 +1,10 @@
|
|
1
|
-
LWR.define('lwr/everywhereAmd/v/0_13_0-
|
1
|
+
LWR.define('lwr/everywhereAmd/v/0_13_0-alpha_20', ['exports', 'lwr/vault/v/0_13_0-alpha_20'], (function (exports, _0_13_0Alpha_20) { 'use strict';
|
2
2
|
|
3
3
|
// IMPORTANT: Do not add any static imports to this file that are not bundled with the amd-client
|
4
4
|
|
5
5
|
// Do an OAuthed fetch
|
6
6
|
async function authFetch(url, accept = 'javascript') {
|
7
|
-
const authInfo =
|
7
|
+
const authInfo = _0_13_0Alpha_20.getAuthInfo();
|
8
8
|
if (authInfo) {
|
9
9
|
return fetch(url, {
|
10
10
|
headers: {
|
@@ -53,7 +53,7 @@ LWR.define('lwr/everywhereAmd/v/0_13_0-alpha_2', ['exports', 'lwr/vault/v/0_13_0
|
|
53
53
|
function authenticate(authInfo) {
|
54
54
|
// Put OAuth info into the vault
|
55
55
|
if (authInfo) {
|
56
|
-
|
56
|
+
_0_13_0Alpha_20.setAuthInfo(authInfo);
|
57
57
|
}
|
58
58
|
}
|
59
59
|
|