lwc 2.29.0 → 2.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/engine-dom/esm/es2017/engine-dom.js +319 -683
- package/dist/engine-dom/iife/es2017/engine-dom.js +319 -683
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +201 -624
- package/dist/engine-dom/iife/es5/engine-dom.js +1138 -2843
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +892 -2428
- package/dist/engine-dom/umd/es2017/engine-dom.js +319 -683
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +201 -624
- package/dist/engine-dom/umd/es5/engine-dom.js +1138 -2843
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +892 -2428
- package/dist/engine-server/commonjs/es2017/engine-server.js +204 -584
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
- package/dist/engine-server/esm/es2017/engine-server.js +204 -584
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +99 -323
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +99 -323
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +98 -316
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +483 -1220
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +470 -1187
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +99 -323
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +98 -316
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +483 -1220
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +470 -1187
- package/dist/wire-service/esm/es2017/wire-service.js +2 -2
- package/dist/wire-service/iife/es2017/wire-service.js +2 -2
- package/dist/wire-service/iife/es2017/wire-service.min.js +1 -1
- package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
- package/dist/wire-service/iife/es5/wire-service.js +13 -68
- package/dist/wire-service/iife/es5/wire-service_debug.js +13 -68
- package/dist/wire-service/umd/es2017/wire-service.js +2 -2
- package/dist/wire-service/umd/es2017/wire-service.min.js +1 -1
- package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
- package/dist/wire-service/umd/es5/wire-service.js +13 -68
- package/dist/wire-service/umd/es5/wire-service_debug.js +13 -68
- package/package.json +7 -7
|
@@ -5,38 +5,26 @@
|
|
|
5
5
|
})(this, (function (exports) { 'use strict';
|
|
6
6
|
|
|
7
7
|
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); }
|
|
8
|
-
|
|
9
8
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
10
|
-
|
|
11
9
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
12
|
-
|
|
13
10
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
14
|
-
|
|
15
11
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
16
|
-
|
|
17
12
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
18
|
-
|
|
19
13
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
20
|
-
|
|
21
14
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
22
|
-
|
|
23
15
|
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, descriptor.key, descriptor); } }
|
|
24
|
-
|
|
25
16
|
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
|
-
|
|
27
17
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
28
|
-
|
|
29
18
|
/**
|
|
30
19
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
31
20
|
*/
|
|
32
|
-
|
|
33
21
|
/**
|
|
34
22
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
35
23
|
*/
|
|
36
24
|
function isUndefined(obj) {
|
|
37
25
|
return obj === undefined;
|
|
38
26
|
}
|
|
39
|
-
/** version: 2.
|
|
27
|
+
/** version: 2.30.0 */
|
|
40
28
|
|
|
41
29
|
/*
|
|
42
30
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -44,16 +32,12 @@
|
|
|
44
32
|
* SPDX-License-Identifier: MIT
|
|
45
33
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
46
34
|
*/
|
|
47
|
-
|
|
48
|
-
|
|
49
35
|
var ValueChangedEventType = 'ValueChangedEvent';
|
|
50
36
|
/**
|
|
51
37
|
* Event fired by wire adapters to emit a new value.
|
|
52
38
|
*/
|
|
53
|
-
|
|
54
39
|
var ValueChangedEvent = /*#__PURE__*/_createClass(function ValueChangedEvent(value) {
|
|
55
40
|
_classCallCheck(this, ValueChangedEvent);
|
|
56
|
-
|
|
57
41
|
this.type = ValueChangedEventType;
|
|
58
42
|
this.value = value;
|
|
59
43
|
});
|
|
@@ -63,50 +47,38 @@
|
|
|
63
47
|
* SPDX-License-Identifier: MIT
|
|
64
48
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
65
49
|
*/
|
|
66
|
-
|
|
67
|
-
|
|
68
50
|
var freeze = Object.freeze,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
51
|
+
defineProperty = Object.defineProperty,
|
|
52
|
+
isExtensible = Object.isExtensible;
|
|
53
|
+
// This value needs to be in sync with wiring.ts from @lwc/engine-core
|
|
72
54
|
var DeprecatedWiredElementHost = '$$DeprecatedWiredElementHostKey$$';
|
|
73
55
|
var DeprecatedWiredParamsMeta = '$$DeprecatedWiredParamsMetaKey$$';
|
|
74
56
|
/**
|
|
75
57
|
* Registers a wire adapter factory for Lightning Platform.
|
|
76
58
|
* @deprecated
|
|
77
59
|
*/
|
|
78
|
-
|
|
79
60
|
function register(adapterId, adapterEventTargetCallback) {
|
|
80
61
|
if (adapterId == null || !isExtensible(adapterId)) {
|
|
81
62
|
throw new TypeError('adapter id must be extensible');
|
|
82
63
|
}
|
|
83
|
-
|
|
84
64
|
if (typeof adapterEventTargetCallback !== 'function') {
|
|
85
65
|
throw new TypeError('adapter factory must be a callable');
|
|
86
66
|
}
|
|
87
|
-
|
|
88
67
|
if ('adapter' in adapterId) {
|
|
89
68
|
throw new TypeError('adapter id is already associated to an adapter factory');
|
|
90
69
|
}
|
|
91
|
-
|
|
92
70
|
var AdapterClass = /*#__PURE__*/function (_LegacyWireAdapterBri) {
|
|
93
71
|
_inherits(AdapterClass, _LegacyWireAdapterBri);
|
|
94
|
-
|
|
95
72
|
var _super = _createSuper(AdapterClass);
|
|
96
|
-
|
|
97
73
|
function AdapterClass(dataCallback) {
|
|
98
74
|
var _this;
|
|
99
|
-
|
|
100
75
|
_classCallCheck(this, AdapterClass);
|
|
101
|
-
|
|
102
76
|
_this = _super.call(this, dataCallback);
|
|
103
77
|
adapterEventTargetCallback(_this.eventTarget);
|
|
104
78
|
return _this;
|
|
105
79
|
}
|
|
106
|
-
|
|
107
80
|
return _createClass(AdapterClass);
|
|
108
81
|
}(LegacyWireAdapterBridge);
|
|
109
|
-
|
|
110
82
|
freeze(AdapterClass);
|
|
111
83
|
freeze(AdapterClass.prototype);
|
|
112
84
|
defineProperty(adapterId, 'adapter', {
|
|
@@ -119,52 +91,41 @@
|
|
|
119
91
|
* Registers the wire service. noop
|
|
120
92
|
* @deprecated
|
|
121
93
|
*/
|
|
122
|
-
|
|
123
|
-
|
|
124
94
|
function registerWireService() {}
|
|
125
|
-
|
|
126
95
|
var _Array$prototype = Array.prototype,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
var CONNECT = 'connect';
|
|
132
|
-
|
|
133
|
-
var DISCONNECT = 'disconnect';
|
|
134
|
-
|
|
96
|
+
forEach = _Array$prototype.forEach,
|
|
97
|
+
ArraySplice = _Array$prototype.splice,
|
|
98
|
+
ArrayIndexOf = _Array$prototype.indexOf;
|
|
99
|
+
// wire event target life cycle connectedCallback hook event type
|
|
100
|
+
var CONNECT = 'connect';
|
|
101
|
+
// wire event target life cycle disconnectedCallback hook event type
|
|
102
|
+
var DISCONNECT = 'disconnect';
|
|
103
|
+
// wire event target life cycle config changed hook event type
|
|
135
104
|
var CONFIG = 'config';
|
|
136
|
-
|
|
137
105
|
function removeListener(listeners, toRemove) {
|
|
138
106
|
var idx = ArrayIndexOf.call(listeners, toRemove);
|
|
139
|
-
|
|
140
107
|
if (idx > -1) {
|
|
141
108
|
ArraySplice.call(listeners, idx, 1);
|
|
142
109
|
}
|
|
143
110
|
}
|
|
144
|
-
|
|
145
111
|
function isEmptyConfig(config) {
|
|
146
112
|
return Object.keys(config).length === 0;
|
|
147
113
|
}
|
|
148
|
-
|
|
149
114
|
function isValidConfig(config, params) {
|
|
150
115
|
// The config is valid if there is no params, or if exist a param for which config[param] !== undefined.
|
|
151
116
|
return params.length === 0 || params.some(function (param) {
|
|
152
117
|
return !isUndefined(config[param]);
|
|
153
118
|
});
|
|
154
119
|
}
|
|
155
|
-
|
|
156
120
|
function isDifferentConfig(newConfig, oldConfig, params) {
|
|
157
121
|
return params.some(function (param) {
|
|
158
122
|
return newConfig[param] !== oldConfig[param];
|
|
159
123
|
});
|
|
160
124
|
}
|
|
161
|
-
|
|
162
125
|
var LegacyWireAdapterBridge = /*#__PURE__*/function () {
|
|
163
126
|
function LegacyWireAdapterBridge(callback) {
|
|
164
127
|
var _this2 = this;
|
|
165
|
-
|
|
166
128
|
_classCallCheck(this, LegacyWireAdapterBridge);
|
|
167
|
-
|
|
168
129
|
this.connecting = [];
|
|
169
130
|
this.disconnecting = [];
|
|
170
131
|
this.configuring = [];
|
|
@@ -178,28 +139,21 @@
|
|
|
178
139
|
case CONNECT:
|
|
179
140
|
{
|
|
180
141
|
_this2.connecting.push(listener);
|
|
181
|
-
|
|
182
142
|
break;
|
|
183
143
|
}
|
|
184
|
-
|
|
185
144
|
case DISCONNECT:
|
|
186
145
|
{
|
|
187
146
|
_this2.disconnecting.push(listener);
|
|
188
|
-
|
|
189
147
|
break;
|
|
190
148
|
}
|
|
191
|
-
|
|
192
149
|
case CONFIG:
|
|
193
150
|
{
|
|
194
151
|
_this2.configuring.push(listener);
|
|
195
|
-
|
|
196
152
|
if (_this2.currentConfig !== undefined) {
|
|
197
153
|
listener.call(undefined, _this2.currentConfig);
|
|
198
154
|
}
|
|
199
|
-
|
|
200
155
|
break;
|
|
201
156
|
}
|
|
202
|
-
|
|
203
157
|
default:
|
|
204
158
|
throw new Error("Invalid event type ".concat(type, "."));
|
|
205
159
|
}
|
|
@@ -211,19 +165,16 @@
|
|
|
211
165
|
removeListener(_this2.connecting, listener);
|
|
212
166
|
break;
|
|
213
167
|
}
|
|
214
|
-
|
|
215
168
|
case DISCONNECT:
|
|
216
169
|
{
|
|
217
170
|
removeListener(_this2.disconnecting, listener);
|
|
218
171
|
break;
|
|
219
172
|
}
|
|
220
|
-
|
|
221
173
|
case CONFIG:
|
|
222
174
|
{
|
|
223
175
|
removeListener(_this2.configuring, listener);
|
|
224
176
|
break;
|
|
225
177
|
}
|
|
226
|
-
|
|
227
178
|
default:
|
|
228
179
|
throw new Error("Invalid event type ".concat(type, "."));
|
|
229
180
|
}
|
|
@@ -231,7 +182,6 @@
|
|
|
231
182
|
dispatchEvent: function dispatchEvent(evt) {
|
|
232
183
|
if (evt instanceof ValueChangedEvent) {
|
|
233
184
|
var value = evt.value;
|
|
234
|
-
|
|
235
185
|
_this2.callback(value);
|
|
236
186
|
} else if (evt.type === 'wirecontextevent') {
|
|
237
187
|
// TODO [#1357]: remove this branch
|
|
@@ -239,12 +189,10 @@
|
|
|
239
189
|
} else {
|
|
240
190
|
throw new Error("Invalid event type ".concat(evt.type, "."));
|
|
241
191
|
}
|
|
242
|
-
|
|
243
192
|
return false; // canceling signal since we don't want this to propagate
|
|
244
193
|
}
|
|
245
194
|
};
|
|
246
195
|
}
|
|
247
|
-
|
|
248
196
|
_createClass(LegacyWireAdapterBridge, [{
|
|
249
197
|
key: "update",
|
|
250
198
|
value: function update(config) {
|
|
@@ -252,12 +200,10 @@
|
|
|
252
200
|
// this is a special case for legacy wire adapters: when all the config params are undefined,
|
|
253
201
|
// the config on the wire adapter should not be called until one of them changes.
|
|
254
202
|
this.isFirstUpdate = false;
|
|
255
|
-
|
|
256
203
|
if (!isEmptyConfig(config) && !isValidConfig(config, this.dynamicParamsNames)) {
|
|
257
204
|
return;
|
|
258
205
|
}
|
|
259
206
|
}
|
|
260
|
-
|
|
261
207
|
if (isUndefined(this.currentConfig) || isDifferentConfig(config, this.currentConfig, this.dynamicParamsNames)) {
|
|
262
208
|
this.currentConfig = config;
|
|
263
209
|
forEach.call(this.configuring, function (listener) {
|
|
@@ -280,10 +226,9 @@
|
|
|
280
226
|
});
|
|
281
227
|
}
|
|
282
228
|
}]);
|
|
283
|
-
|
|
284
229
|
return LegacyWireAdapterBridge;
|
|
285
230
|
}();
|
|
286
|
-
/** version: 2.
|
|
231
|
+
/** version: 2.30.0 */
|
|
287
232
|
|
|
288
233
|
exports.ValueChangedEvent = ValueChangedEvent;
|
|
289
234
|
exports.register = register;
|
|
@@ -5,38 +5,26 @@
|
|
|
5
5
|
})(this, (function (exports) { 'use strict';
|
|
6
6
|
|
|
7
7
|
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); }
|
|
8
|
-
|
|
9
8
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
10
|
-
|
|
11
9
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
12
|
-
|
|
13
10
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
14
|
-
|
|
15
11
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
16
|
-
|
|
17
12
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
18
|
-
|
|
19
13
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
20
|
-
|
|
21
14
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
22
|
-
|
|
23
15
|
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, descriptor.key, descriptor); } }
|
|
24
|
-
|
|
25
16
|
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
|
-
|
|
27
17
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
28
|
-
|
|
29
18
|
/**
|
|
30
19
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
31
20
|
*/
|
|
32
|
-
|
|
33
21
|
/**
|
|
34
22
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
35
23
|
*/
|
|
36
24
|
function isUndefined(obj) {
|
|
37
25
|
return obj === undefined;
|
|
38
26
|
}
|
|
39
|
-
/** version: 2.
|
|
27
|
+
/** version: 2.30.0 */
|
|
40
28
|
|
|
41
29
|
/*
|
|
42
30
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -44,16 +32,12 @@
|
|
|
44
32
|
* SPDX-License-Identifier: MIT
|
|
45
33
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
46
34
|
*/
|
|
47
|
-
|
|
48
|
-
|
|
49
35
|
var ValueChangedEventType = 'ValueChangedEvent';
|
|
50
36
|
/**
|
|
51
37
|
* Event fired by wire adapters to emit a new value.
|
|
52
38
|
*/
|
|
53
|
-
|
|
54
39
|
var ValueChangedEvent = /*#__PURE__*/_createClass(function ValueChangedEvent(value) {
|
|
55
40
|
_classCallCheck(this, ValueChangedEvent);
|
|
56
|
-
|
|
57
41
|
this.type = ValueChangedEventType;
|
|
58
42
|
this.value = value;
|
|
59
43
|
});
|
|
@@ -63,50 +47,38 @@
|
|
|
63
47
|
* SPDX-License-Identifier: MIT
|
|
64
48
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
65
49
|
*/
|
|
66
|
-
|
|
67
|
-
|
|
68
50
|
var freeze = Object.freeze,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
51
|
+
defineProperty = Object.defineProperty,
|
|
52
|
+
isExtensible = Object.isExtensible;
|
|
53
|
+
// This value needs to be in sync with wiring.ts from @lwc/engine-core
|
|
72
54
|
var DeprecatedWiredElementHost = '$$DeprecatedWiredElementHostKey$$';
|
|
73
55
|
var DeprecatedWiredParamsMeta = '$$DeprecatedWiredParamsMetaKey$$';
|
|
74
56
|
/**
|
|
75
57
|
* Registers a wire adapter factory for Lightning Platform.
|
|
76
58
|
* @deprecated
|
|
77
59
|
*/
|
|
78
|
-
|
|
79
60
|
function register(adapterId, adapterEventTargetCallback) {
|
|
80
61
|
if (adapterId == null || !isExtensible(adapterId)) {
|
|
81
62
|
throw new TypeError('adapter id must be extensible');
|
|
82
63
|
}
|
|
83
|
-
|
|
84
64
|
if (typeof adapterEventTargetCallback !== 'function') {
|
|
85
65
|
throw new TypeError('adapter factory must be a callable');
|
|
86
66
|
}
|
|
87
|
-
|
|
88
67
|
if ('adapter' in adapterId) {
|
|
89
68
|
throw new TypeError('adapter id is already associated to an adapter factory');
|
|
90
69
|
}
|
|
91
|
-
|
|
92
70
|
var AdapterClass = /*#__PURE__*/function (_LegacyWireAdapterBri) {
|
|
93
71
|
_inherits(AdapterClass, _LegacyWireAdapterBri);
|
|
94
|
-
|
|
95
72
|
var _super = _createSuper(AdapterClass);
|
|
96
|
-
|
|
97
73
|
function AdapterClass(dataCallback) {
|
|
98
74
|
var _this;
|
|
99
|
-
|
|
100
75
|
_classCallCheck(this, AdapterClass);
|
|
101
|
-
|
|
102
76
|
_this = _super.call(this, dataCallback);
|
|
103
77
|
adapterEventTargetCallback(_this.eventTarget);
|
|
104
78
|
return _this;
|
|
105
79
|
}
|
|
106
|
-
|
|
107
80
|
return _createClass(AdapterClass);
|
|
108
81
|
}(LegacyWireAdapterBridge);
|
|
109
|
-
|
|
110
82
|
freeze(AdapterClass);
|
|
111
83
|
freeze(AdapterClass.prototype);
|
|
112
84
|
defineProperty(adapterId, 'adapter', {
|
|
@@ -119,52 +91,41 @@
|
|
|
119
91
|
* Registers the wire service. noop
|
|
120
92
|
* @deprecated
|
|
121
93
|
*/
|
|
122
|
-
|
|
123
|
-
|
|
124
94
|
function registerWireService() {}
|
|
125
|
-
|
|
126
95
|
var _Array$prototype = Array.prototype,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
var CONNECT = 'connect';
|
|
132
|
-
|
|
133
|
-
var DISCONNECT = 'disconnect';
|
|
134
|
-
|
|
96
|
+
forEach = _Array$prototype.forEach,
|
|
97
|
+
ArraySplice = _Array$prototype.splice,
|
|
98
|
+
ArrayIndexOf = _Array$prototype.indexOf;
|
|
99
|
+
// wire event target life cycle connectedCallback hook event type
|
|
100
|
+
var CONNECT = 'connect';
|
|
101
|
+
// wire event target life cycle disconnectedCallback hook event type
|
|
102
|
+
var DISCONNECT = 'disconnect';
|
|
103
|
+
// wire event target life cycle config changed hook event type
|
|
135
104
|
var CONFIG = 'config';
|
|
136
|
-
|
|
137
105
|
function removeListener(listeners, toRemove) {
|
|
138
106
|
var idx = ArrayIndexOf.call(listeners, toRemove);
|
|
139
|
-
|
|
140
107
|
if (idx > -1) {
|
|
141
108
|
ArraySplice.call(listeners, idx, 1);
|
|
142
109
|
}
|
|
143
110
|
}
|
|
144
|
-
|
|
145
111
|
function isEmptyConfig(config) {
|
|
146
112
|
return Object.keys(config).length === 0;
|
|
147
113
|
}
|
|
148
|
-
|
|
149
114
|
function isValidConfig(config, params) {
|
|
150
115
|
// The config is valid if there is no params, or if exist a param for which config[param] !== undefined.
|
|
151
116
|
return params.length === 0 || params.some(function (param) {
|
|
152
117
|
return !isUndefined(config[param]);
|
|
153
118
|
});
|
|
154
119
|
}
|
|
155
|
-
|
|
156
120
|
function isDifferentConfig(newConfig, oldConfig, params) {
|
|
157
121
|
return params.some(function (param) {
|
|
158
122
|
return newConfig[param] !== oldConfig[param];
|
|
159
123
|
});
|
|
160
124
|
}
|
|
161
|
-
|
|
162
125
|
var LegacyWireAdapterBridge = /*#__PURE__*/function () {
|
|
163
126
|
function LegacyWireAdapterBridge(callback) {
|
|
164
127
|
var _this2 = this;
|
|
165
|
-
|
|
166
128
|
_classCallCheck(this, LegacyWireAdapterBridge);
|
|
167
|
-
|
|
168
129
|
this.connecting = [];
|
|
169
130
|
this.disconnecting = [];
|
|
170
131
|
this.configuring = [];
|
|
@@ -178,28 +139,21 @@
|
|
|
178
139
|
case CONNECT:
|
|
179
140
|
{
|
|
180
141
|
_this2.connecting.push(listener);
|
|
181
|
-
|
|
182
142
|
break;
|
|
183
143
|
}
|
|
184
|
-
|
|
185
144
|
case DISCONNECT:
|
|
186
145
|
{
|
|
187
146
|
_this2.disconnecting.push(listener);
|
|
188
|
-
|
|
189
147
|
break;
|
|
190
148
|
}
|
|
191
|
-
|
|
192
149
|
case CONFIG:
|
|
193
150
|
{
|
|
194
151
|
_this2.configuring.push(listener);
|
|
195
|
-
|
|
196
152
|
if (_this2.currentConfig !== undefined) {
|
|
197
153
|
listener.call(undefined, _this2.currentConfig);
|
|
198
154
|
}
|
|
199
|
-
|
|
200
155
|
break;
|
|
201
156
|
}
|
|
202
|
-
|
|
203
157
|
default:
|
|
204
158
|
throw new Error("Invalid event type ".concat(type, "."));
|
|
205
159
|
}
|
|
@@ -211,19 +165,16 @@
|
|
|
211
165
|
removeListener(_this2.connecting, listener);
|
|
212
166
|
break;
|
|
213
167
|
}
|
|
214
|
-
|
|
215
168
|
case DISCONNECT:
|
|
216
169
|
{
|
|
217
170
|
removeListener(_this2.disconnecting, listener);
|
|
218
171
|
break;
|
|
219
172
|
}
|
|
220
|
-
|
|
221
173
|
case CONFIG:
|
|
222
174
|
{
|
|
223
175
|
removeListener(_this2.configuring, listener);
|
|
224
176
|
break;
|
|
225
177
|
}
|
|
226
|
-
|
|
227
178
|
default:
|
|
228
179
|
throw new Error("Invalid event type ".concat(type, "."));
|
|
229
180
|
}
|
|
@@ -231,7 +182,6 @@
|
|
|
231
182
|
dispatchEvent: function dispatchEvent(evt) {
|
|
232
183
|
if (evt instanceof ValueChangedEvent) {
|
|
233
184
|
var value = evt.value;
|
|
234
|
-
|
|
235
185
|
_this2.callback(value);
|
|
236
186
|
} else if (evt.type === 'wirecontextevent') {
|
|
237
187
|
// TODO [#1357]: remove this branch
|
|
@@ -239,12 +189,10 @@
|
|
|
239
189
|
} else {
|
|
240
190
|
throw new Error("Invalid event type ".concat(evt.type, "."));
|
|
241
191
|
}
|
|
242
|
-
|
|
243
192
|
return false; // canceling signal since we don't want this to propagate
|
|
244
193
|
}
|
|
245
194
|
};
|
|
246
195
|
}
|
|
247
|
-
|
|
248
196
|
_createClass(LegacyWireAdapterBridge, [{
|
|
249
197
|
key: "update",
|
|
250
198
|
value: function update(config) {
|
|
@@ -252,12 +200,10 @@
|
|
|
252
200
|
// this is a special case for legacy wire adapters: when all the config params are undefined,
|
|
253
201
|
// the config on the wire adapter should not be called until one of them changes.
|
|
254
202
|
this.isFirstUpdate = false;
|
|
255
|
-
|
|
256
203
|
if (!isEmptyConfig(config) && !isValidConfig(config, this.dynamicParamsNames)) {
|
|
257
204
|
return;
|
|
258
205
|
}
|
|
259
206
|
}
|
|
260
|
-
|
|
261
207
|
if (isUndefined(this.currentConfig) || isDifferentConfig(config, this.currentConfig, this.dynamicParamsNames)) {
|
|
262
208
|
this.currentConfig = config;
|
|
263
209
|
forEach.call(this.configuring, function (listener) {
|
|
@@ -280,10 +226,9 @@
|
|
|
280
226
|
});
|
|
281
227
|
}
|
|
282
228
|
}]);
|
|
283
|
-
|
|
284
229
|
return LegacyWireAdapterBridge;
|
|
285
230
|
}();
|
|
286
|
-
/** version: 2.
|
|
231
|
+
/** version: 2.30.0 */
|
|
287
232
|
|
|
288
233
|
exports.ValueChangedEvent = ValueChangedEvent;
|
|
289
234
|
exports.register = register;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lwc",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.30.0",
|
|
4
4
|
"description": "Lightning Web Components (LWC)",
|
|
5
5
|
"homepage": "https://lwc.dev/",
|
|
6
6
|
"repository": {
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
]
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@lwc/compiler": "2.
|
|
45
|
-
"@lwc/engine-dom": "2.
|
|
46
|
-
"@lwc/engine-server": "2.
|
|
47
|
-
"@lwc/features": "2.
|
|
48
|
-
"@lwc/synthetic-shadow": "2.
|
|
49
|
-
"@lwc/wire-service": "2.
|
|
44
|
+
"@lwc/compiler": "2.30.0",
|
|
45
|
+
"@lwc/engine-dom": "2.30.0",
|
|
46
|
+
"@lwc/engine-server": "2.30.0",
|
|
47
|
+
"@lwc/features": "2.30.0",
|
|
48
|
+
"@lwc/synthetic-shadow": "2.30.0",
|
|
49
|
+
"@lwc/wire-service": "2.30.0"
|
|
50
50
|
},
|
|
51
51
|
"nx": {
|
|
52
52
|
"targets": {
|