@salesforce/lds-adapters-uiapi-lex 1.398.0 → 1.400.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-uiapi-lex",
3
- "version": "1.398.0",
3
+ "version": "1.400.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "UIAPI LWC Adapters built for LEX",
6
6
  "repository": {
@@ -19,47 +19,47 @@ import { CommandWireAdapterConstructor } from 'force/luvioLwcBindings5';
19
19
  * All rights reserved.
20
20
  * For full license text, see the LICENSE.txt file
21
21
  */
22
- function resolvedPromiseLike$1(result) {
23
- if (isPromiseLike$1(result)) {
22
+ function resolvedPromiseLike(result) {
23
+ if (isPromiseLike(result)) {
24
24
  return result.then((nextResult) => nextResult);
25
25
  }
26
26
  return {
27
27
  then: (onFulfilled, _onRejected) => {
28
28
  try {
29
- return resolvedPromiseLike$1(onFulfilled(result));
29
+ return resolvedPromiseLike(onFulfilled(result));
30
30
  } catch (e) {
31
31
  if (onFulfilled === void 0) {
32
- return resolvedPromiseLike$1(result);
32
+ return resolvedPromiseLike(result);
33
33
  }
34
- return rejectedPromiseLike$1(e);
34
+ return rejectedPromiseLike(e);
35
35
  }
36
36
  }
37
37
  };
38
38
  }
39
- function rejectedPromiseLike$1(reason) {
40
- if (isPromiseLike$1(reason)) {
39
+ function rejectedPromiseLike(reason) {
40
+ if (isPromiseLike(reason)) {
41
41
  return reason.then((nextResult) => nextResult);
42
42
  }
43
43
  return {
44
44
  then: (_onFulfilled, onRejected) => {
45
45
  if (typeof onRejected === "function") {
46
46
  try {
47
- return resolvedPromiseLike$1(onRejected(reason));
47
+ return resolvedPromiseLike(onRejected(reason));
48
48
  } catch (e) {
49
- return rejectedPromiseLike$1(e);
49
+ return rejectedPromiseLike(e);
50
50
  }
51
51
  }
52
- return rejectedPromiseLike$1(reason);
52
+ return rejectedPromiseLike(reason);
53
53
  }
54
54
  };
55
55
  }
56
- function isPromiseLike$1(x) {
56
+ function isPromiseLike(x) {
57
57
  return typeof (x == null ? void 0 : x.then) === "function";
58
58
  }
59
- function racesync$1(values) {
59
+ function racesync(values) {
60
60
  for (const value of values) {
61
61
  let settled = void 0;
62
- if (isPromiseLike$1(value)) {
62
+ if (isPromiseLike(value)) {
63
63
  value.then(
64
64
  (_) => {
65
65
  settled = value;
@@ -69,7 +69,7 @@ function racesync$1(values) {
69
69
  }
70
70
  );
71
71
  } else {
72
- settled = resolvedPromiseLike$1(value);
72
+ settled = resolvedPromiseLike(value);
73
73
  }
74
74
  if (settled !== void 0) {
75
75
  return settled;
@@ -125,7 +125,7 @@ function getServices(request, timeout = 3e4) {
125
125
  let timeoutPromise = new Promise((_, reject) => {
126
126
  timeoutId = setTimeout(() => reject(new Error("OneStore services unavailable")), timeout);
127
127
  });
128
- return racesync$1([servicesPromise, timeoutPromise]).then(
128
+ return racesync([servicesPromise, timeoutPromise]).then(
129
129
  (value) => {
130
130
  clearTimeout(timeoutId);
131
131
  return value;
@@ -145,100 +145,6 @@ function getServices(request, timeout = 3e4) {
145
145
  */
146
146
 
147
147
 
148
- /**
149
- * Returns a PromiseLike object that resolves with the specified result.
150
- *
151
- * @param result resolved result
152
- * @returns
153
- */
154
- function resolvedPromiseLike(result) {
155
- // Don't nest anything promise like
156
- if (isPromiseLike(result)) {
157
- return result.then((nextResult) => nextResult);
158
- }
159
- return {
160
- then: (onFulfilled, _onRejected) => {
161
- if (onFulfilled) {
162
- try {
163
- return resolvedPromiseLike(onFulfilled(result));
164
- }
165
- catch (e) {
166
- return rejectedPromiseLike(e);
167
- }
168
- }
169
- // assume TResult1 == Result and just pass result down the chain
170
- return resolvedPromiseLike(result);
171
- },
172
- };
173
- }
174
- /**
175
- * Returns a PromiseLike object that rejects with the specified reason.
176
- *
177
- * @param reason rejection value
178
- * @returns PromiseLike that rejects with reason
179
- */
180
- function rejectedPromiseLike(reason) {
181
- if (isPromiseLike(reason)) {
182
- return reason.then((nextResult) => nextResult);
183
- }
184
- return {
185
- then: (_onFulfilled, onRejected) => {
186
- if (onRejected) {
187
- try {
188
- return resolvedPromiseLike(onRejected(reason));
189
- }
190
- catch (e) {
191
- return rejectedPromiseLike(e);
192
- }
193
- }
194
- // assume TResult2 == Result and just pass rejection down the chain
195
- return rejectedPromiseLike(reason);
196
- },
197
- };
198
- }
199
- /**
200
- * Indicates if an object is PromiseLike.
201
- *
202
- * @param x anything
203
- * @returns true if x is PromiseLike; false if not
204
- */
205
- function isPromiseLike(x) {
206
- return typeof x === 'object' && typeof (x === null || x === void 0 ? void 0 : x.then) === 'function';
207
- }
208
- /**
209
- * As Promise.race, but returns sychronously if any of the supplied values resolve/reject
210
- * synchronously.
211
- *
212
- * @param values as Promise.race
213
- * @returns as Promise.race
214
- */
215
- function racesync(values) {
216
- for (const value of values) {
217
- let settled = undefined;
218
- if (isPromiseLike(value)) {
219
- value.then((_) => {
220
- settled = value;
221
- }, (_) => {
222
- settled = value;
223
- });
224
- }
225
- else {
226
- settled = resolvedPromiseLike(value);
227
- }
228
- if (settled !== undefined) {
229
- return settled;
230
- }
231
- }
232
- return Promise.race(values);
233
- }
234
-
235
- /**
236
- * Copyright (c) 2022, Salesforce, Inc.,
237
- * All rights reserved.
238
- * For full license text, see the LICENSE.txt file
239
- */
240
-
241
-
242
148
  function convertAuraResponseToData(data) {
243
149
  return data;
244
150
  }
@@ -587,4 +493,4 @@ racesync([getServices(serviceRequirements)]).then(
587
493
  );
588
494
 
589
495
  export { getObjectInfo, getObjectInfos };
590
- // version: 1.398.0-4adb9f1c88
496
+ // version: 1.400.0-8bade3324c