lwc 2.35.1 → 2.36.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.
Files changed (35) hide show
  1. package/dist/engine-dom/esm/es2017/engine-dom.js +258 -102
  2. package/dist/engine-dom/iife/es2017/engine-dom.js +258 -102
  3. package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
  4. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +286 -58
  5. package/dist/engine-dom/iife/es5/engine-dom.js +365 -202
  6. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
  7. package/dist/engine-dom/iife/es5/engine-dom_debug.js +412 -131
  8. package/dist/engine-dom/umd/es2017/engine-dom.js +258 -102
  9. package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
  10. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +286 -58
  11. package/dist/engine-dom/umd/es5/engine-dom.js +365 -202
  12. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
  13. package/dist/engine-dom/umd/es5/engine-dom_debug.js +412 -131
  14. package/dist/engine-server/commonjs/es2017/engine-server.js +126 -79
  15. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
  16. package/dist/engine-server/esm/es2017/engine-server.js +126 -79
  17. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +5 -5
  18. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +5 -5
  19. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +3 -3
  20. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +9 -9
  21. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +7 -7
  22. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +5 -5
  23. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +3 -3
  24. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +9 -9
  25. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +7 -7
  26. package/dist/wire-service/esm/es2017/wire-service.js +2 -2
  27. package/dist/wire-service/iife/es2017/wire-service.js +2 -2
  28. package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
  29. package/dist/wire-service/iife/es5/wire-service.js +2 -2
  30. package/dist/wire-service/iife/es5/wire-service_debug.js +2 -2
  31. package/dist/wire-service/umd/es2017/wire-service.js +2 -2
  32. package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
  33. package/dist/wire-service/umd/es5/wire-service.js +2 -2
  34. package/dist/wire-service/umd/es5/wire-service_debug.js +2 -2
  35. package/package.json +7 -7
@@ -18,16 +18,16 @@ var LWC = (function (exports) {
18
18
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
19
19
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
20
20
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
21
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
21
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
22
22
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
23
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
24
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
25
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
23
26
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
24
27
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
25
28
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
26
29
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
27
30
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
28
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
29
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
30
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
31
31
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
32
32
  /* proxy-compat-disable */
33
33
  /**
@@ -59,10 +59,10 @@ var LWC = (function (exports) {
59
59
  }
60
60
  var assert = /*#__PURE__*/Object.freeze({
61
61
  __proto__: null,
62
+ fail: fail,
62
63
  invariant: invariant,
63
- isTrue: isTrue$1,
64
64
  isFalse: isFalse$1,
65
- fail: fail
65
+ isTrue: isTrue$1
66
66
  });
67
67
 
68
68
  /*
@@ -327,9 +327,9 @@ var LWC = (function (exports) {
327
327
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
328
328
  */
329
329
  // Increment whenever the LWC template compiler changes
330
- var LWC_VERSION = "2.35.1";
330
+ var LWC_VERSION = "2.36.0";
331
331
  var LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
332
- /** version: 2.35.1 */
332
+ /** version: 2.36.0 */
333
333
 
334
334
  /**
335
335
  * Copyright (C) 2018 salesforce.com, inc.
@@ -410,7 +410,7 @@ var LWC = (function (exports) {
410
410
  setFeatureFlag(name, value);
411
411
  }
412
412
  }
413
- /** version: 2.35.1 */
413
+ /** version: 2.36.0 */
414
414
 
415
415
  /**
416
416
  * Copyright (C) 2018 salesforce.com, inc.
@@ -474,7 +474,7 @@ var LWC = (function (exports) {
474
474
  }
475
475
  }
476
476
  }
477
- /** version: 2.35.1 */
477
+ /** version: 2.36.0 */
478
478
 
479
479
  /*
480
480
  * Copyright (c) 2018, salesforce.com, inc.
@@ -540,7 +540,6 @@ var LWC = (function (exports) {
540
540
  * SPDX-License-Identifier: MIT
541
541
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
542
542
  */
543
- /** Callbacks to invoke when reporting is enabled **/
544
543
  var onReportingEnabledCallbacks = [];
545
544
  /** The currently assigned reporting dispatcher. */
546
545
  var currentDispatcher$1 = noop;
@@ -560,23 +559,15 @@ var LWC = (function (exports) {
560
559
  attachDispatcher: function attachDispatcher(dispatcher) {
561
560
  enabled$1 = true;
562
561
  currentDispatcher$1 = dispatcher;
563
- var _iterator = _createForOfIteratorHelper(onReportingEnabledCallbacks),
564
- _step;
565
- try {
566
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
567
- var callback = _step.value;
568
- try {
569
- callback();
570
- } catch (err) {
571
- // This should never happen. But if it does, we don't want one callback to cause another to fail
572
- // eslint-disable-next-line no-console
573
- console.error('Could not invoke callback', err);
574
- }
562
+ for (var _i3 = 0, _onReportingEnabledCa = onReportingEnabledCallbacks; _i3 < _onReportingEnabledCa.length; _i3++) {
563
+ var callback = _onReportingEnabledCa[_i3];
564
+ try {
565
+ callback();
566
+ } catch (err) {
567
+ // This should never happen. But if it does, we don't want one callback to cause another to fail
568
+ // eslint-disable-next-line no-console
569
+ console.error('Could not invoke callback', err);
575
570
  }
576
- } catch (err) {
577
- _iterator.e(err);
578
- } finally {
579
- _iterator.f();
580
571
  }
581
572
  onReportingEnabledCallbacks.length = 0; // clear the array
582
573
  },
@@ -605,11 +596,11 @@ var LWC = (function (exports) {
605
596
  /**
606
597
  * Report to the current dispatcher, if there is one.
607
598
  * @param reportingEventId
608
- * @param vm
599
+ * @param payload - data to report
609
600
  */
610
- function report(reportingEventId, vm) {
601
+ function report(reportingEventId, payload) {
611
602
  if (enabled$1) {
612
- currentDispatcher$1(reportingEventId, vm.tagName, vm.idx);
603
+ currentDispatcher$1(reportingEventId, payload);
613
604
  }
614
605
  }
615
606
 
@@ -730,8 +721,8 @@ var LWC = (function (exports) {
730
721
  if (!isUndefined$1(reactiveRecord)) {
731
722
  var reactiveObservers = reactiveRecord[key];
732
723
  if (!isUndefined$1(reactiveObservers)) {
733
- for (var _i3 = 0, len = reactiveObservers.length; _i3 < len; _i3 += 1) {
734
- var ro = reactiveObservers[_i3];
724
+ for (var _i4 = 0, len = reactiveObservers.length; _i4 < len; _i4 += 1) {
725
+ var ro = reactiveObservers[_i4];
735
726
  ro.notify();
736
727
  }
737
728
  }
@@ -790,9 +781,9 @@ var LWC = (function (exports) {
790
781
  var listeners = this.listeners;
791
782
  var len = listeners.length;
792
783
  if (len > 0) {
793
- for (var _i4 = 0; _i4 < len; _i4 += 1) {
794
- var set = listeners[_i4];
795
- var pos = ArrayIndexOf.call(listeners[_i4], this);
784
+ for (var _i5 = 0; _i5 < len; _i5 += 1) {
785
+ var set = listeners[_i5];
786
+ var pos = ArrayIndexOf.call(listeners[_i5], this);
796
787
  ArraySplice.call(set, pos, 1);
797
788
  }
798
789
  listeners.length = 0;
@@ -849,8 +840,8 @@ var LWC = (function (exports) {
849
840
  }
850
841
  var callbacks = nextTickCallbackQueue;
851
842
  nextTickCallbackQueue = []; // reset to a new queue
852
- for (var _i5 = 0, len = callbacks.length; _i5 < len; _i5 += 1) {
853
- callbacks[_i5]();
843
+ for (var _i6 = 0, len = callbacks.length; _i6 < len; _i6 += 1) {
844
+ callbacks[_i6]();
854
845
  }
855
846
  }
856
847
  function addCallbackToNextTick(callback) {
@@ -877,11 +868,11 @@ var LWC = (function (exports) {
877
868
  function parseStyleText(cssText) {
878
869
  var styleMap = {};
879
870
  var declarations = cssText.split(DECLARATION_DELIMITER);
880
- var _iterator2 = _createForOfIteratorHelper(declarations),
881
- _step2;
871
+ var _iterator = _createForOfIteratorHelper(declarations),
872
+ _step;
882
873
  try {
883
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
884
- var declaration = _step2.value;
874
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
875
+ var declaration = _step.value;
885
876
  if (declaration) {
886
877
  var _declaration$split = declaration.split(PROPERTY_DELIMITER),
887
878
  _declaration$split2 = _slicedToArray(_declaration$split, 2),
@@ -893,20 +884,28 @@ var LWC = (function (exports) {
893
884
  }
894
885
  }
895
886
  } catch (err) {
896
- _iterator2.e(err);
887
+ _iterator.e(err);
897
888
  } finally {
898
- _iterator2.f();
889
+ _iterator.f();
899
890
  }
900
891
  return styleMap;
901
892
  }
902
893
  // Make a shallow copy of an object but omit the given key
903
894
  function cloneAndOmitKey(object, keyToOmit) {
904
895
  var result = {};
905
- for (var _i6 = 0, _Object$keys = Object.keys(object); _i6 < _Object$keys.length; _i6++) {
906
- var key = _Object$keys[_i6];
907
- if (key !== keyToOmit) {
908
- result[key] = object[key];
896
+ var _iterator2 = _createForOfIteratorHelper(keys(object)),
897
+ _step2;
898
+ try {
899
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
900
+ var key = _step2.value;
901
+ if (key !== keyToOmit) {
902
+ result[key] = object[key];
903
+ }
909
904
  }
905
+ } catch (err) {
906
+ _iterator2.e(err);
907
+ } finally {
908
+ _iterator2.f();
910
909
  }
911
910
  return result;
912
911
  }
@@ -917,7 +916,7 @@ var LWC = (function (exports) {
917
916
  try {
918
917
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
919
918
  var stylesheet = _step3.value;
920
- if (!Array.isArray(stylesheet)) {
919
+ if (!isArray$1(stylesheet)) {
921
920
  list.push(stylesheet);
922
921
  } else {
923
922
  list.push.apply(list, _toConsumableArray(flattenStylesheets(stylesheet)));
@@ -2792,35 +2791,36 @@ var LWC = (function (exports) {
2792
2791
  }
2793
2792
  var wiredConnecting = context.wiredConnecting = [];
2794
2793
  var wiredDisconnecting = context.wiredDisconnecting = [];
2795
- for (var fieldNameOrMethod in wire) {
2794
+ var _loop2 = function _loop2() {
2796
2795
  var descriptor = wire[fieldNameOrMethod];
2797
2796
  var wireDef = WireMetaMap.get(descriptor);
2798
2797
  if (process.env.NODE_ENV !== 'production') {
2799
2798
  assert.invariant(wireDef, "Internal Error: invalid wire definition found.");
2800
2799
  }
2801
2800
  if (!isUndefined$1(wireDef)) {
2802
- (function () {
2803
- var _createConnector = createConnector(vm, fieldNameOrMethod, wireDef),
2804
- connector = _createConnector.connector,
2805
- computeConfigAndUpdate = _createConnector.computeConfigAndUpdate,
2806
- resetConfigWatcher = _createConnector.resetConfigWatcher;
2807
- var hasDynamicParams = wireDef.dynamic.length > 0;
2808
- ArrayPush$1.call(wiredConnecting, function () {
2809
- connector.connect();
2810
- if (!lwcRuntimeFlags.ENABLE_WIRE_SYNC_EMIT) {
2811
- if (hasDynamicParams) {
2812
- Promise.resolve().then(computeConfigAndUpdate);
2813
- return;
2814
- }
2801
+ var _createConnector = createConnector(vm, fieldNameOrMethod, wireDef),
2802
+ connector = _createConnector.connector,
2803
+ computeConfigAndUpdate = _createConnector.computeConfigAndUpdate,
2804
+ resetConfigWatcher = _createConnector.resetConfigWatcher;
2805
+ var hasDynamicParams = wireDef.dynamic.length > 0;
2806
+ ArrayPush$1.call(wiredConnecting, function () {
2807
+ connector.connect();
2808
+ if (!lwcRuntimeFlags.ENABLE_WIRE_SYNC_EMIT) {
2809
+ if (hasDynamicParams) {
2810
+ Promise.resolve().then(computeConfigAndUpdate);
2811
+ return;
2815
2812
  }
2816
- computeConfigAndUpdate();
2817
- });
2818
- ArrayPush$1.call(wiredDisconnecting, function () {
2819
- connector.disconnect();
2820
- resetConfigWatcher();
2821
- });
2822
- })();
2813
+ }
2814
+ computeConfigAndUpdate();
2815
+ });
2816
+ ArrayPush$1.call(wiredDisconnecting, function () {
2817
+ connector.disconnect();
2818
+ resetConfigWatcher();
2819
+ });
2823
2820
  }
2821
+ };
2822
+ for (var fieldNameOrMethod in wire) {
2823
+ _loop2();
2824
2824
  }
2825
2825
  }
2826
2826
  function connectWireAdapters(vm) {
@@ -3241,6 +3241,10 @@ var LWC = (function (exports) {
3241
3241
  // stylesheets and templates do not have user-meaningful names, but components do
3242
3242
  var friendlyName = type === 'component' ? "".concat(type, " ").concat(func.name) : type;
3243
3243
  logError("LWC WARNING: current engine is v".concat(LWC_VERSION, ", but ").concat(friendlyName, " was compiled with v").concat(version, ".\nPlease update your compiled code or LWC engine so that the versions match.\nNo further warnings will appear."));
3244
+ report(1 /* ReportingEventId.CompilerRuntimeVersionMismatch */, {
3245
+ compilerVersion: version,
3246
+ runtimeVersion: LWC_VERSION
3247
+ });
3244
3248
  }
3245
3249
  }
3246
3250
  }
@@ -4917,7 +4921,12 @@ var LWC = (function (exports) {
4917
4921
  } else if (isVScopedSlotFragment(vnode)) {
4918
4922
  slotName = vnode.slotName;
4919
4923
  }
4920
- var vnodes = cmpSlotsMapping[slotName] = cmpSlotsMapping[slotName] || [];
4924
+ // Can't use toString here because Symbol(1).toString() is 'Symbol(1)'
4925
+ // but elm.setAttribute('slot', Symbol(1)) is an error.
4926
+ // the following line also throws same error for symbols
4927
+ // Similar for Object.create(null)
4928
+ var normalizedSlotName = '' + slotName;
4929
+ var vnodes = cmpSlotsMapping[normalizedSlotName] = cmpSlotsMapping[normalizedSlotName] || [];
4921
4930
  ArrayPush$1.call(vnodes, vnode);
4922
4931
  }
4923
4932
  vm.cmpSlots = {
@@ -5981,6 +5990,8 @@ var LWC = (function (exports) {
5981
5990
  var tmpl = _ref4.tmpl;
5982
5991
  if (isFunction$1(Ctor)) {
5983
5992
  if (process.env.NODE_ENV !== 'production') {
5993
+ // There is no point in running this in production, because the version mismatch check relies
5994
+ // on code comments which are stripped out in production by minifiers
5984
5995
  checkVersionMismatch(Ctor, 'component');
5985
5996
  }
5986
5997
  signedTemplateMap.set(Ctor, tmpl);
@@ -6244,6 +6255,7 @@ var LWC = (function (exports) {
6244
6255
  // Validate and flatten any stylesheets defined as `static stylesheets`
6245
6256
  function computeStylesheets(vm, ctor) {
6246
6257
  if (lwcRuntimeFlags.ENABLE_PROGRAMMATIC_STYLESHEETS) {
6258
+ warnOnStylesheetsMutation(ctor);
6247
6259
  var stylesheets = ctor.stylesheets;
6248
6260
  if (!isUndefined$1(stylesheets)) {
6249
6261
  var valid = validateComponentStylesheets(vm, stylesheets);
@@ -6256,6 +6268,22 @@ var LWC = (function (exports) {
6256
6268
  }
6257
6269
  return null;
6258
6270
  }
6271
+ function warnOnStylesheetsMutation(ctor) {
6272
+ if (process.env.NODE_ENV !== 'production') {
6273
+ var stylesheets = ctor.stylesheets;
6274
+ defineProperty(ctor, 'stylesheets', {
6275
+ enumerable: true,
6276
+ configurable: true,
6277
+ get: function get() {
6278
+ return stylesheets;
6279
+ },
6280
+ set: function set(newValue) {
6281
+ logWarnOnce("Dynamically setting the \"stylesheets\" static property on ".concat(ctor.name, " ") + 'will not affect the stylesheets injected.');
6282
+ stylesheets = newValue;
6283
+ }
6284
+ });
6285
+ }
6286
+ }
6259
6287
  function computeShadowMode(vm, renderer) {
6260
6288
  var def = vm.def;
6261
6289
  var isSyntheticShadowDefined = renderer.isSyntheticShadowDefined,
@@ -6607,7 +6635,7 @@ var LWC = (function (exports) {
6607
6635
  function isSyntheticShadowRootInstance(rootNode) {
6608
6636
  return rootNode !== document && isTrue(rootNode.synthetic);
6609
6637
  }
6610
- function reportViolation(source, target, attrName) {
6638
+ function reportViolation$1(source, target, attrName) {
6611
6639
  // The vm is either for the source, the target, or both. Either one or both must be using synthetic
6612
6640
  // shadow for a violation to be detected.
6613
6641
  var vm = getAssociatedVMIfPresent(source.getRootNode().host);
@@ -6618,7 +6646,10 @@ var LWC = (function (exports) {
6618
6646
  // vm should never be undefined here, but just to be safe, bail out and don't report
6619
6647
  return;
6620
6648
  }
6621
- report(0 /* ReportingEventId.CrossRootAriaInSyntheticShadow */, vm);
6649
+ report(0 /* ReportingEventId.CrossRootAriaInSyntheticShadow */, {
6650
+ tagName: vm.tagName,
6651
+ attributeName: attrName
6652
+ });
6622
6653
  if (process.env.NODE_ENV !== 'production') {
6623
6654
  // Avoid excessively logging to the console in the case of duplicates.
6624
6655
  logWarnOnce("Element <".concat(source.tagName.toLowerCase(), "> uses attribute \"").concat(attrName, "\" to reference element ") + "<".concat(target.tagName.toLowerCase(), ">, which is not in the same shadow root. This will break in native shadow DOM. ") + "For details, see: https://lwc.dev/guide/accessibility#link-ids-and-aria-attributes-from-different-templates", vm);
@@ -6652,7 +6683,7 @@ var LWC = (function (exports) {
6652
6683
  var sourceElement = sourceElements[_i33];
6653
6684
  var sourceRoot = sourceElement.getRootNode();
6654
6685
  if (sourceRoot !== root) {
6655
- reportViolation(sourceElement, elm, idRefAttrName);
6686
+ reportViolation$1(sourceElement, elm, idRefAttrName);
6656
6687
  break;
6657
6688
  }
6658
6689
  }
@@ -6675,7 +6706,7 @@ var LWC = (function (exports) {
6675
6706
  var targetRoot = target.getRootNode();
6676
6707
  if (targetRoot !== root) {
6677
6708
  // target element's shadow root is not the same as ours
6678
- reportViolation(elm, target, attrName);
6709
+ reportViolation$1(elm, target, attrName);
6679
6710
  }
6680
6711
  }
6681
6712
  }
@@ -6689,7 +6720,7 @@ var LWC = (function (exports) {
6689
6720
  var enabled = false;
6690
6721
  // We want to avoid patching globals whenever possible, so this should be tree-shaken out in prod-mode and if
6691
6722
  // reporting is not enabled. It should also only run once
6692
- function enableDetection() {
6723
+ function enableDetection$1() {
6693
6724
  if (enabled) {
6694
6725
  return; // don't double-apply the patches
6695
6726
  }
@@ -6743,10 +6774,116 @@ var LWC = (function (exports) {
6743
6774
  if (supportsCssEscape() && isSyntheticShadowLoaded()) {
6744
6775
  // Always run detection in dev mode, so we can at least print to the console
6745
6776
  if (process.env.NODE_ENV !== 'production') {
6746
- enableDetection();
6777
+ enableDetection$1();
6747
6778
  } else {
6748
6779
  // In prod mode, only enable detection if reporting is enabled
6749
- onReportingEnabled(enableDetection);
6780
+ onReportingEnabled(enableDetection$1);
6781
+ }
6782
+ }
6783
+
6784
+ /*
6785
+ * Copyright (c) 2018, salesforce.com, inc.
6786
+ * All rights reserved.
6787
+ * SPDX-License-Identifier: MIT
6788
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
6789
+ */
6790
+ //
6791
+ // The goal of this code is to detect usages of non-standard reflected ARIA properties. These are caused by
6792
+ // legacy non-standard Element.prototype extensions added by the @lwc/aria-reflection package.
6793
+ //
6794
+ // See the README for @lwc/aria-reflection
6795
+ var NON_STANDARD_ARIA_PROPS = ['ariaActiveDescendant', 'ariaControls', 'ariaDescribedBy', 'ariaDetails', 'ariaErrorMessage', 'ariaFlowTo', 'ariaLabelledBy', 'ariaOwns'];
6796
+ function isLightningElement(elm) {
6797
+ // The former case is for `this.prop` (inside component) and the latter is for `element.prop` (outside component).
6798
+ // In both cases, we apply the non-standard prop even when the global polyfill is disabled, so this is kosher.
6799
+ return elm instanceof LightningElement || elm instanceof BaseBridgeElement;
6800
+ }
6801
+ function findVM(elm) {
6802
+ // If it's a shadow DOM component, then it has a host
6803
+ var _elm$getRootNode = elm.getRootNode(),
6804
+ host = _elm$getRootNode.host;
6805
+ var vm = isUndefined$1(host) ? undefined : getAssociatedVMIfPresent(host);
6806
+ if (!isUndefined$1(vm)) {
6807
+ return vm;
6808
+ }
6809
+ // Else it might be a light DOM component. Walk up the tree trying to find the owner
6810
+ var parentElement = elm;
6811
+ while (!isNull(parentElement = parentElement.parentElement)) {
6812
+ if (isLightningElement(parentElement)) {
6813
+ var _vm = getAssociatedVMIfPresent(parentElement);
6814
+ if (!isUndefined$1(_vm)) {
6815
+ return _vm;
6816
+ }
6817
+ }
6818
+ }
6819
+ // If we return undefined, it's because the element was rendered wholly outside a LightningElement
6820
+ }
6821
+
6822
+ function checkAndReportViolation(elm, prop) {
6823
+ if (!isLightningElement(elm)) {
6824
+ var vm = findVM(elm);
6825
+ if (process.env.NODE_ENV !== 'production') {
6826
+ logWarnOnce("Element <".concat(elm.tagName.toLowerCase(), "> ") + (isUndefined$1(vm) ? '' : "owned by <".concat(vm.elm.tagName.toLowerCase(), "> ")) + "uses non-standard property \"".concat(prop, "\". This will be removed in a future version of LWC. ") + "See https://lwc.dev/guide/accessibility#deprecated-aria-reflected-properties");
6827
+ }
6828
+ report(2 /* ReportingEventId.NonStandardAriaReflection */, {
6829
+ tagName: vm === null || vm === void 0 ? void 0 : vm.tagName,
6830
+ propertyName: prop
6831
+ });
6832
+ }
6833
+ }
6834
+ function enableDetection() {
6835
+ var _Element = Element,
6836
+ prototype = _Element.prototype;
6837
+ var _iterator7 = _createForOfIteratorHelper(NON_STANDARD_ARIA_PROPS),
6838
+ _step7;
6839
+ try {
6840
+ var _loop3 = function _loop3() {
6841
+ var prop = _step7.value;
6842
+ var descriptor = getOwnPropertyDescriptor$1(prototype, prop);
6843
+ // The descriptor should exist because the @lwc/aria-reflection polyfill has run by now.
6844
+ // This happens automatically because of the ordering of imports.
6845
+ if (process.env.NODE_ENV !== 'production') {
6846
+ /* istanbul ignore if */
6847
+ if (isUndefined$1(descriptor) || isUndefined$1(descriptor.get) || isUndefined$1(descriptor.set)) {
6848
+ // should never happen
6849
+ throw new Error('detect-non-standard-aria.ts loaded before @lwc/aria-reflection');
6850
+ }
6851
+ }
6852
+ // @ts-ignore
6853
+ var _get4 = descriptor.get,
6854
+ _set4 = descriptor.set;
6855
+ defineProperty(prototype, prop, {
6856
+ get: function get() {
6857
+ checkAndReportViolation(this, prop);
6858
+ return _get4.call(this);
6859
+ },
6860
+ set: function set(val) {
6861
+ checkAndReportViolation(this, prop);
6862
+ return _set4.call(this, val);
6863
+ },
6864
+ configurable: true,
6865
+ enumerable: true
6866
+ });
6867
+ };
6868
+ for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
6869
+ _loop3();
6870
+ }
6871
+ } catch (err) {
6872
+ _iterator7.e(err);
6873
+ } finally {
6874
+ _iterator7.f();
6875
+ }
6876
+ }
6877
+ // No point in running this code if we're not in a browser, or if the global polyfill is not loaded
6878
+ {
6879
+ if (!lwcRuntimeFlags.DISABLE_ARIA_REFLECTION_POLYFILL) {
6880
+ // Always run detection in dev mode, so we can at least print to the console
6881
+ if (process.env.NODE_ENV !== 'production') {
6882
+ enableDetection();
6883
+ } else {
6884
+ // In prod mode, only enable detection if reporting is enabled
6885
+ onReportingEnabled(enableDetection);
6886
+ }
6750
6887
  }
6751
6888
  }
6752
6889
 
@@ -7249,12 +7386,13 @@ var LWC = (function (exports) {
7249
7386
  */
7250
7387
  // See @lwc/engine-core/src/framework/template.ts
7251
7388
  var TEMPLATE_PROPS = ['slots', 'stylesheetToken', 'stylesheets', 'renderMode'];
7252
- // Via https://www.npmjs.com/package/object-observer
7253
- var ARRAY_MUTATION_METHODS = ['pop', 'push', 'shift', 'unshift', 'reverse', 'sort', 'fill', 'splice', 'copyWithin'];
7254
7389
  // Expandos that may be placed on a stylesheet factory function, and which are meaningful to LWC at runtime
7255
- var STYLESHEET_FUNCTION_EXPANDOS = [
7390
+ var STYLESHEET_PROPS = [
7256
7391
  // SEE `KEY__SCOPED_CSS` in @lwc/style-compiler
7257
7392
  '$scoped$'];
7393
+ // Via https://www.npmjs.com/package/object-observer
7394
+ var ARRAY_MUTATION_METHODS = ['pop', 'push', 'shift', 'unshift', 'reverse', 'sort', 'fill', 'splice', 'copyWithin'];
7395
+ var mutationTrackingDisabled = false;
7258
7396
  function getOriginalArrayMethod(prop) {
7259
7397
  switch (prop) {
7260
7398
  case 'pop':
@@ -7277,42 +7415,54 @@ var LWC = (function (exports) {
7277
7415
  return ArrayCopyWithin;
7278
7416
  }
7279
7417
  }
7280
- var mutationWarningsSilenced = false;
7418
+ function reportViolation(type, eventId, prop) {
7419
+ if (process.env.NODE_ENV !== 'production') {
7420
+ logWarnOnce("Mutating the \"".concat(prop, "\" property on a ").concat(type, " ") + "is deprecated and will be removed in a future version of LWC. " + "See: https://lwc.dev/guide/css#deprecated-template-mutation");
7421
+ }
7422
+ report(eventId, {
7423
+ propertyName: prop
7424
+ });
7425
+ }
7426
+ function reportTemplateViolation(prop) {
7427
+ reportViolation('template', 3 /* ReportingEventId.TemplateMutation */, prop);
7428
+ }
7429
+ function reportStylesheetViolation(prop) {
7430
+ reportViolation('stylesheet', 4 /* ReportingEventId.StylesheetMutation */, prop);
7431
+ }
7281
7432
  // Warn if the user tries to mutate a stylesheets array, e.g.:
7282
7433
  // `tmpl.stylesheets.push(someStylesheetFunction)`
7283
7434
  function warnOnArrayMutation(stylesheets) {
7284
7435
  // We can't handle users calling Array.prototype.slice.call(tmpl.stylesheets), but
7285
7436
  // we can at least warn when they use the most common mutation methods.
7286
- var _iterator7 = _createForOfIteratorHelper(ARRAY_MUTATION_METHODS),
7287
- _step7;
7437
+ var _iterator8 = _createForOfIteratorHelper(ARRAY_MUTATION_METHODS),
7438
+ _step8;
7288
7439
  try {
7289
- var _loop2 = function _loop2() {
7290
- var prop = _step7.value;
7440
+ var _loop4 = function _loop4() {
7441
+ var prop = _step8.value;
7291
7442
  var originalArrayMethod = getOriginalArrayMethod(prop);
7292
7443
  stylesheets[prop] = function arrayMutationWarningWrapper() {
7293
- logError("Mutating the \"stylesheets\" array on a template function " + "is deprecated and may be removed in a future version of LWC.");
7444
+ reportTemplateViolation('stylesheets');
7294
7445
  // @ts-ignore
7295
7446
  return originalArrayMethod.apply(this, arguments);
7296
7447
  };
7297
7448
  };
7298
- for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
7299
- _loop2();
7449
+ for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
7450
+ _loop4();
7300
7451
  }
7301
7452
  } catch (err) {
7302
- _iterator7.e(err);
7453
+ _iterator8.e(err);
7303
7454
  } finally {
7304
- _iterator7.f();
7455
+ _iterator8.f();
7305
7456
  }
7306
7457
  }
7307
7458
  // Warn if the user tries to mutate a stylesheet factory function, e.g.:
7308
7459
  // `stylesheet.$scoped$ = true`
7309
7460
  function warnOnStylesheetFunctionMutation(stylesheet) {
7310
- // We could warn on other properties, but in practice only certain expandos are meaningful to LWC at runtime
7311
- var _iterator8 = _createForOfIteratorHelper(STYLESHEET_FUNCTION_EXPANDOS),
7312
- _step8;
7461
+ var _iterator9 = _createForOfIteratorHelper(STYLESHEET_PROPS),
7462
+ _step9;
7313
7463
  try {
7314
- var _loop3 = function _loop3() {
7315
- var prop = _step8.value;
7464
+ var _loop5 = function _loop5() {
7465
+ var prop = _step9.value;
7316
7466
  var value = stylesheet[prop];
7317
7467
  defineProperty(stylesheet, prop, {
7318
7468
  enumerable: true,
@@ -7321,22 +7471,22 @@ var LWC = (function (exports) {
7321
7471
  return value;
7322
7472
  },
7323
7473
  set: function set(newValue) {
7324
- logError("Dynamically setting the \"".concat(prop, "\" property on a stylesheet function ") + "is deprecated and may be removed in a future version of LWC.");
7474
+ reportStylesheetViolation(prop);
7325
7475
  value = newValue;
7326
7476
  }
7327
7477
  });
7328
7478
  };
7329
- for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
7330
- _loop3();
7479
+ for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
7480
+ _loop5();
7331
7481
  }
7332
7482
  } catch (err) {
7333
- _iterator8.e(err);
7483
+ _iterator9.e(err);
7334
7484
  } finally {
7335
- _iterator8.f();
7485
+ _iterator9.f();
7336
7486
  }
7337
7487
  }
7338
7488
  // Warn on either array or stylesheet (function) mutation, in a deeply-nested array
7339
- function warnOnStylesheetsMutation(stylesheets) {
7489
+ function trackStylesheetsMutation(stylesheets) {
7340
7490
  traverseStylesheets(stylesheets, function (subStylesheets) {
7341
7491
  if (isArray$1(subStylesheets)) {
7342
7492
  warnOnArrayMutation(subStylesheets);
@@ -7363,7 +7513,80 @@ var LWC = (function (exports) {
7363
7513
  }
7364
7514
  }
7365
7515
  }
7516
+ function trackMutations(tmpl) {
7517
+ if (!isUndefined$1(tmpl.stylesheets)) {
7518
+ trackStylesheetsMutation(tmpl.stylesheets);
7519
+ }
7520
+ var _iterator10 = _createForOfIteratorHelper(TEMPLATE_PROPS),
7521
+ _step10;
7522
+ try {
7523
+ var _loop6 = function _loop6() {
7524
+ var prop = _step10.value;
7525
+ var value = tmpl[prop];
7526
+ defineProperty(tmpl, prop, {
7527
+ enumerable: true,
7528
+ configurable: true,
7529
+ get: function get() {
7530
+ return value;
7531
+ },
7532
+ set: function set(newValue) {
7533
+ if (!mutationTrackingDisabled) {
7534
+ reportTemplateViolation(prop);
7535
+ }
7536
+ value = newValue;
7537
+ }
7538
+ });
7539
+ };
7540
+ for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
7541
+ _loop6();
7542
+ }
7543
+ } catch (err) {
7544
+ _iterator10.e(err);
7545
+ } finally {
7546
+ _iterator10.f();
7547
+ }
7548
+ var originalDescriptor = getOwnPropertyDescriptor$1(tmpl, 'stylesheetTokens');
7549
+ defineProperty(tmpl, 'stylesheetTokens', {
7550
+ enumerable: true,
7551
+ configurable: true,
7552
+ get: originalDescriptor.get,
7553
+ set: function set(value) {
7554
+ reportTemplateViolation('stylesheetTokens');
7555
+ // Avoid logging/reporting twice (for both stylesheetToken and stylesheetTokens)
7556
+ mutationTrackingDisabled = true;
7557
+ originalDescriptor.set.call(this, value);
7558
+ mutationTrackingDisabled = false;
7559
+ }
7560
+ });
7561
+ }
7562
+ function addLegacyStylesheetTokensShim(tmpl) {
7563
+ // When ENABLE_FROZEN_TEMPLATE is false, then we shim stylesheetTokens on top of stylesheetToken for anyone who
7564
+ // is accessing the old internal API (backwards compat). Details: https://salesforce.quip.com/v1rmAFu2cKAr
7565
+ defineProperty(tmpl, 'stylesheetTokens', {
7566
+ enumerable: true,
7567
+ configurable: true,
7568
+ get: function get() {
7569
+ var stylesheetToken = this.stylesheetToken;
7570
+ if (isUndefined$1(stylesheetToken)) {
7571
+ return stylesheetToken;
7572
+ }
7573
+ // Shim for the old `stylesheetTokens` property
7574
+ // See https://github.com/salesforce/lwc/pull/2332/files#diff-7901555acef29969adaa6583185b3e9bce475cdc6f23e799a54e0018cb18abaa
7575
+ return {
7576
+ hostAttribute: "".concat(stylesheetToken, "-host"),
7577
+ shadowAttribute: stylesheetToken
7578
+ };
7579
+ },
7580
+ set: function set(value) {
7581
+ // If the value is null or some other exotic object, you would be broken anyway in the past
7582
+ // because the engine would try to access hostAttribute/shadowAttribute, which would throw an error.
7583
+ // However it may be undefined in newer versions of LWC, so we need to guard against that case.
7584
+ this.stylesheetToken = isUndefined$1(value) ? undefined : value.shadowAttribute;
7585
+ }
7586
+ });
7587
+ }
7366
7588
  function freezeTemplate(tmpl) {
7589
+ // TODO [#2782]: remove this flag and delete the legacy behavior
7367
7590
  if (lwcRuntimeFlags.ENABLE_FROZEN_TEMPLATE) {
7368
7591
  // Deep freeze the template
7369
7592
  freeze(tmpl);
@@ -7371,76 +7594,16 @@ var LWC = (function (exports) {
7371
7594
  deepFreeze(tmpl.stylesheets);
7372
7595
  }
7373
7596
  } else {
7374
- // TODO [#2782]: remove this flag and delete the legacy behavior
7375
- // When ENABLE_FROZEN_TEMPLATE is false, then we shim stylesheetTokens on top of stylesheetToken for anyone who
7376
- // is accessing the old internal API (backwards compat). Details: https://salesforce.quip.com/v1rmAFu2cKAr
7377
- defineProperty(tmpl, 'stylesheetTokens', {
7378
- enumerable: true,
7379
- configurable: true,
7380
- get: function get() {
7381
- var stylesheetToken = this.stylesheetToken;
7382
- if (isUndefined$1(stylesheetToken)) {
7383
- return stylesheetToken;
7384
- }
7385
- // Shim for the old `stylesheetTokens` property
7386
- // See https://github.com/salesforce/lwc/pull/2332/files#diff-7901555acef29969adaa6583185b3e9bce475cdc6f23e799a54e0018cb18abaa
7387
- return {
7388
- hostAttribute: "".concat(stylesheetToken, "-host"),
7389
- shadowAttribute: stylesheetToken
7390
- };
7391
- },
7392
- set: function set(value) {
7393
- // If the value is null or some other exotic object, you would be broken anyway in the past
7394
- // because the engine would try to access hostAttribute/shadowAttribute, which would throw an error.
7395
- // However it may be undefined in newer versions of LWC, so we need to guard against that case.
7396
- this.stylesheetToken = isUndefined$1(value) ? undefined : value.shadowAttribute;
7397
- }
7398
- });
7399
- // When ENABLE_FROZEN_TEMPLATE is false, warn in dev mode whenever someone is mutating the template
7597
+ // template is not frozen - shim, report, and warn
7598
+ // this shim should be applied in both dev and prod
7599
+ addLegacyStylesheetTokensShim(tmpl);
7600
+ // When ENABLE_FROZEN_TEMPLATE is false, we want to warn in dev mode whenever someone is mutating the template
7400
7601
  if (process.env.NODE_ENV !== 'production') {
7401
- if (!isUndefined$1(tmpl.stylesheets)) {
7402
- warnOnStylesheetsMutation(tmpl.stylesheets);
7403
- }
7404
- var _iterator9 = _createForOfIteratorHelper(TEMPLATE_PROPS),
7405
- _step9;
7406
- try {
7407
- var _loop4 = function _loop4() {
7408
- var prop = _step9.value;
7409
- var value = tmpl[prop];
7410
- defineProperty(tmpl, prop, {
7411
- enumerable: true,
7412
- configurable: true,
7413
- get: function get() {
7414
- return value;
7415
- },
7416
- set: function set(newValue) {
7417
- if (!mutationWarningsSilenced) {
7418
- logError("Dynamically setting the \"".concat(prop, "\" property on a template function ") + "is deprecated and may be removed in a future version of LWC.");
7419
- }
7420
- value = newValue;
7421
- }
7422
- });
7423
- };
7424
- for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
7425
- _loop4();
7426
- }
7427
- } catch (err) {
7428
- _iterator9.e(err);
7429
- } finally {
7430
- _iterator9.f();
7431
- }
7432
- var originalDescriptor = getOwnPropertyDescriptor$1(tmpl, 'stylesheetTokens');
7433
- defineProperty(tmpl, 'stylesheetTokens', {
7434
- enumerable: true,
7435
- configurable: true,
7436
- get: originalDescriptor.get,
7437
- set: function set(value) {
7438
- logError("Dynamically setting the \"stylesheetTokens\" property on a template function " + "is deprecated and may be removed in a future version of LWC.");
7439
- // Avoid logging twice (for both stylesheetToken and stylesheetTokens)
7440
- mutationWarningsSilenced = true;
7441
- originalDescriptor.set.call(this, value);
7442
- mutationWarningsSilenced = false;
7443
- }
7602
+ trackMutations(tmpl);
7603
+ } else {
7604
+ // In prod mode, we only track mutations if reporting is enabled
7605
+ onReportingEnabled(function () {
7606
+ trackMutations(tmpl);
7444
7607
  });
7445
7608
  }
7446
7609
  }
@@ -7468,7 +7631,7 @@ var LWC = (function (exports) {
7468
7631
  }
7469
7632
  return ctor;
7470
7633
  }
7471
- /* version: 2.35.1 */
7634
+ /* version: 2.36.0 */
7472
7635
 
7473
7636
  /*
7474
7637
  * Copyright (c) 2018, salesforce.com, inc.
@@ -7744,7 +7907,7 @@ var LWC = (function (exports) {
7744
7907
  var cachedConstructors = new Map();
7745
7908
  var elementsUpgradedOutsideLWC = new WeakSet();
7746
7909
  var elementBeingUpgradedByLWC = false;
7747
- // Creates a constructor that is intended to be used as a vanilla custom element, except that the upgradeCallback is
7910
+ // Creates a constructor that is intended to be used directly as a custom element, except that the upgradeCallback is
7748
7911
  // passed in to the constructor so LWC can reuse the same custom element constructor for multiple components.
7749
7912
  // Another benefit is that only LWC can create components that actually do anything – if you do
7750
7913
  // `customElements.define('x-foo')`, then you don't have access to the upgradeCallback, so it's a dummy custom element.
@@ -7793,7 +7956,7 @@ var LWC = (function (exports) {
7793
7956
  }
7794
7957
  return UpgradableConstructor;
7795
7958
  };
7796
- var createCustomElementVanilla = function createCustomElementVanilla(tagName, upgradeCallback, connectedCallback, disconnectedCallback) {
7959
+ var createCustomElementUsingUpgradableConstructor = function createCustomElementUsingUpgradableConstructor(tagName, upgradeCallback, connectedCallback, disconnectedCallback) {
7797
7960
  // use global custom elements registry
7798
7961
  var UpgradableConstructor = cachedConstructors.get(tagName);
7799
7962
  if (isUndefined$1(UpgradableConstructor)) {
@@ -7820,7 +7983,7 @@ var LWC = (function (exports) {
7820
7983
  */
7821
7984
  /**
7822
7985
  * Create a scoped registry, i.e. a function that can create custom elements whose tag names
7823
- * do not conflict with vanilla custom elements having the same tag name.
7986
+ * do not conflict with third-party custom elements having the same tag name.
7824
7987
  */
7825
7988
  function createScopedRegistry() {
7826
7989
  if (!hasCustomElements) {
@@ -8151,17 +8314,17 @@ var LWC = (function (exports) {
8151
8314
  function flushPendingWhenDefinedCallbacks(tagName, ctor) {
8152
8315
  var resolvers = pendingWhenDefinedCallbacks.get(tagName);
8153
8316
  if (!isUndefined$1(resolvers)) {
8154
- var _iterator10 = _createForOfIteratorHelper(resolvers),
8155
- _step10;
8317
+ var _iterator11 = _createForOfIteratorHelper(resolvers),
8318
+ _step11;
8156
8319
  try {
8157
- for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
8158
- var resolver = _step10.value;
8320
+ for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
8321
+ var resolver = _step11.value;
8159
8322
  resolver(ctor);
8160
8323
  }
8161
8324
  } catch (err) {
8162
- _iterator10.e(err);
8325
+ _iterator11.e(err);
8163
8326
  } finally {
8164
- _iterator10.f();
8327
+ _iterator11.f();
8165
8328
  }
8166
8329
  }
8167
8330
  pendingWhenDefinedCallbacks.delete(tagName);
@@ -8211,11 +8374,11 @@ var LWC = (function (exports) {
8211
8374
  var awaiting = awaitingUpgrade.get(tagName);
8212
8375
  if (!isUndefined$1(awaiting)) {
8213
8376
  awaitingUpgrade.delete(tagName);
8214
- var _iterator11 = _createForOfIteratorHelper(awaiting),
8215
- _step11;
8377
+ var _iterator12 = _createForOfIteratorHelper(awaiting),
8378
+ _step12;
8216
8379
  try {
8217
- for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
8218
- var element = _step11.value;
8380
+ for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
8381
+ var element = _step12.value;
8219
8382
  var registeredDefinition = pendingRegistryForElement.get(element);
8220
8383
  // At this point, registeredDefinition should never be undefined because awaitingUpgrade
8221
8384
  // is only populated when we haven't run internalUpgrade yet, and we only populate
@@ -8227,9 +8390,9 @@ var LWC = (function (exports) {
8227
8390
  }
8228
8391
  }
8229
8392
  } catch (err) {
8230
- _iterator11.e(err);
8393
+ _iterator12.e(err);
8231
8394
  } finally {
8232
- _iterator11.f();
8395
+ _iterator12.f();
8233
8396
  }
8234
8397
  }
8235
8398
  // If anyone called customElements.whenDefined() and is still waiting for a promise resolution, resolve now
@@ -8426,10 +8589,10 @@ var LWC = (function (exports) {
8426
8589
  * We have three modes for creating custom elements:
8427
8590
  *
8428
8591
  * 1. Compat (legacy) browser support (e.g. IE11). Totally custom, doesn't rely on native browser APIs.
8429
- * 2. "Vanilla" custom elements registry. This system actually still allows us to have two LWC components with the
8430
- * same tag name, via a simple trick: every custom element constructor we define in the registry is basically
8431
- * the same. It's essentially a dummy `class extends HTMLElement` that accepts an `upgradeCallback` in its
8432
- * constructor, which allows us to have completely customized functionality for different components.
8592
+ * 2. "Upgradable constructor" custom element. This allows us to have two LWC components with the same tag name,
8593
+ * via a trick: every custom element constructor we define in the registry is basically the same. It's essentially
8594
+ * a dummy `class extends HTMLElement` that accepts an `upgradeCallback` in its constructor ("upgradable
8595
+ * constructor"), which allows us to have completely customized functionality for different components.
8433
8596
  * 3. "Scoped" (or "pivot") custom elements. This relies on a sophisticated system that emulates the "scoped custom
8434
8597
  * elements registry" proposal, with support for avoiding conflicts in tag names both between LWC components and
8435
8598
  * between LWC components and third-party elements. This uses a similar trick to #2, but is much more complex
@@ -8440,8 +8603,8 @@ var LWC = (function (exports) {
8440
8603
  if (lwcRuntimeFlags.ENABLE_SCOPED_CUSTOM_ELEMENT_REGISTRY) {
8441
8604
  createCustomElement = createCustomElementScoped;
8442
8605
  } else {
8443
- // use global custom elements registry (vanilla)
8444
- createCustomElement = createCustomElementVanilla;
8606
+ // use the global registry, with an upgradable constructor for the defined custom element
8607
+ createCustomElement = createCustomElementUsingUpgradableConstructor;
8445
8608
  }
8446
8609
  } else {
8447
8610
  // no registry available here
@@ -8495,10 +8658,10 @@ var LWC = (function (exports) {
8495
8658
  }
8496
8659
  var assert = /*#__PURE__*/Object.freeze({
8497
8660
  __proto__: null,
8661
+ fail: fail,
8498
8662
  invariant: invariant,
8499
- isTrue: isTrue$1,
8500
8663
  isFalse: isFalse$1,
8501
- fail: fail
8664
+ isTrue: isTrue$1
8502
8665
  });
8503
8666
  function isUndefined(obj) {
8504
8667
  return obj === undefined;
@@ -8506,7 +8669,7 @@ var LWC = (function (exports) {
8506
8669
  function isNull(obj) {
8507
8670
  return obj === null;
8508
8671
  }
8509
- /** version: 2.35.1 */
8672
+ /** version: 2.36.0 */
8510
8673
 
8511
8674
  /*
8512
8675
  * Copyright (c) 2018, salesforce.com, inc.
@@ -8565,17 +8728,17 @@ var LWC = (function (exports) {
8565
8728
  exports.createFragment = function (html) {
8566
8729
  var wrapperTags = topLevelWrappingMap[getTagName(html)];
8567
8730
  if (!isUndefined(wrapperTags)) {
8568
- var _iterator12 = _createForOfIteratorHelper(wrapperTags),
8569
- _step12;
8731
+ var _iterator13 = _createForOfIteratorHelper(wrapperTags),
8732
+ _step13;
8570
8733
  try {
8571
- for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
8572
- var wrapperTag = _step12.value;
8734
+ for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
8735
+ var wrapperTag = _step13.value;
8573
8736
  html = "<".concat(wrapperTag, ">").concat(html, "</").concat(wrapperTag, ">");
8574
8737
  }
8575
8738
  } catch (err) {
8576
- _iterator12.e(err);
8739
+ _iterator13.e(err);
8577
8740
  } finally {
8578
- _iterator12.f();
8741
+ _iterator13.f();
8579
8742
  }
8580
8743
  }
8581
8744
  // For IE11, the document title must not be undefined, but it can be an empty string
@@ -9072,7 +9235,7 @@ var LWC = (function (exports) {
9072
9235
  });
9073
9236
  freeze(LightningElement);
9074
9237
  seal(LightningElement.prototype);
9075
- /* version: 2.35.1 */
9238
+ /* version: 2.36.0 */
9076
9239
 
9077
9240
  exports.LightningElement = LightningElement;
9078
9241
  exports.__unstable__ProfilerControl = profilerControl;