@salesforce/lwc-adapters-uiapi 1.128.0 → 1.128.1
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/main.js +341 -341
- package/package.json +2 -2
package/dist/main.js
CHANGED
|
@@ -7,345 +7,345 @@
|
|
|
7
7
|
import { createWireAdapterConstructor, bindWireRefresh } from '@luvio/lwc-luvio';
|
|
8
8
|
import { register, withDefaultLuvio } from '@salesforce/lds-default-luvio';
|
|
9
9
|
|
|
10
|
-
var SnapshotState;
|
|
11
|
-
(function (SnapshotState) {
|
|
12
|
-
SnapshotState["Fulfilled"] = "Fulfilled";
|
|
13
|
-
SnapshotState["Unfulfilled"] = "Unfulfilled";
|
|
14
|
-
SnapshotState["Error"] = "Error";
|
|
15
|
-
SnapshotState["Pending"] = "Pending";
|
|
16
|
-
SnapshotState["Stale"] = "Stale";
|
|
10
|
+
var SnapshotState;
|
|
11
|
+
(function (SnapshotState) {
|
|
12
|
+
SnapshotState["Fulfilled"] = "Fulfilled";
|
|
13
|
+
SnapshotState["Unfulfilled"] = "Unfulfilled";
|
|
14
|
+
SnapshotState["Error"] = "Error";
|
|
15
|
+
SnapshotState["Pending"] = "Pending";
|
|
16
|
+
SnapshotState["Stale"] = "Stale";
|
|
17
17
|
})(SnapshotState || (SnapshotState = {}));
|
|
18
18
|
|
|
19
|
-
const { create: create$1, entries, freeze: freeze$1, keys: keys$1, values } = Object;
|
|
20
|
-
const { isArray: isArray$1 } = Array;
|
|
19
|
+
const { create: create$1, entries, freeze: freeze$1, keys: keys$1, values } = Object;
|
|
20
|
+
const { isArray: isArray$1 } = Array;
|
|
21
21
|
const { parse: parse$2, stringify: stringify$1 } = JSON;
|
|
22
22
|
|
|
23
|
-
Promise.resolve();
|
|
24
|
-
|
|
25
|
-
var StoreErrorStatus;
|
|
26
|
-
(function (StoreErrorStatus) {
|
|
27
|
-
StoreErrorStatus[StoreErrorStatus["RESOURCE_NOT_FOUND"] = 404] = "RESOURCE_NOT_FOUND";
|
|
28
|
-
})(StoreErrorStatus || (StoreErrorStatus = {}));
|
|
29
|
-
var StoreRecordType;
|
|
30
|
-
(function (StoreRecordType) {
|
|
31
|
-
StoreRecordType["Error"] = "error";
|
|
32
|
-
})(StoreRecordType || (StoreRecordType = {}));
|
|
33
|
-
var StoreLinkStateValues$1;
|
|
34
|
-
(function (StoreLinkStateValues) {
|
|
35
|
-
StoreLinkStateValues[StoreLinkStateValues["NotPresent"] = 0] = "NotPresent";
|
|
36
|
-
StoreLinkStateValues[StoreLinkStateValues["RefNotPresent"] = 1] = "RefNotPresent";
|
|
37
|
-
StoreLinkStateValues[StoreLinkStateValues["RefPresent"] = 2] = "RefPresent";
|
|
38
|
-
StoreLinkStateValues[StoreLinkStateValues["Null"] = 3] = "Null";
|
|
39
|
-
StoreLinkStateValues[StoreLinkStateValues["Missing"] = 4] = "Missing";
|
|
40
|
-
StoreLinkStateValues[StoreLinkStateValues["Pending"] = 5] = "Pending";
|
|
41
|
-
})(StoreLinkStateValues$1 || (StoreLinkStateValues$1 = {}));
|
|
42
|
-
var StoreResolveResultState;
|
|
43
|
-
(function (StoreResolveResultState) {
|
|
44
|
-
StoreResolveResultState[StoreResolveResultState["Found"] = 0] = "Found";
|
|
45
|
-
StoreResolveResultState[StoreResolveResultState["Error"] = 1] = "Error";
|
|
46
|
-
StoreResolveResultState[StoreResolveResultState["Null"] = 2] = "Null";
|
|
47
|
-
StoreResolveResultState[StoreResolveResultState["NotPresent"] = 3] = "NotPresent";
|
|
48
|
-
StoreResolveResultState[StoreResolveResultState["Stale"] = 4] = "Stale";
|
|
23
|
+
Promise.resolve();
|
|
24
|
+
|
|
25
|
+
var StoreErrorStatus;
|
|
26
|
+
(function (StoreErrorStatus) {
|
|
27
|
+
StoreErrorStatus[StoreErrorStatus["RESOURCE_NOT_FOUND"] = 404] = "RESOURCE_NOT_FOUND";
|
|
28
|
+
})(StoreErrorStatus || (StoreErrorStatus = {}));
|
|
29
|
+
var StoreRecordType;
|
|
30
|
+
(function (StoreRecordType) {
|
|
31
|
+
StoreRecordType["Error"] = "error";
|
|
32
|
+
})(StoreRecordType || (StoreRecordType = {}));
|
|
33
|
+
var StoreLinkStateValues$1;
|
|
34
|
+
(function (StoreLinkStateValues) {
|
|
35
|
+
StoreLinkStateValues[StoreLinkStateValues["NotPresent"] = 0] = "NotPresent";
|
|
36
|
+
StoreLinkStateValues[StoreLinkStateValues["RefNotPresent"] = 1] = "RefNotPresent";
|
|
37
|
+
StoreLinkStateValues[StoreLinkStateValues["RefPresent"] = 2] = "RefPresent";
|
|
38
|
+
StoreLinkStateValues[StoreLinkStateValues["Null"] = 3] = "Null";
|
|
39
|
+
StoreLinkStateValues[StoreLinkStateValues["Missing"] = 4] = "Missing";
|
|
40
|
+
StoreLinkStateValues[StoreLinkStateValues["Pending"] = 5] = "Pending";
|
|
41
|
+
})(StoreLinkStateValues$1 || (StoreLinkStateValues$1 = {}));
|
|
42
|
+
var StoreResolveResultState;
|
|
43
|
+
(function (StoreResolveResultState) {
|
|
44
|
+
StoreResolveResultState[StoreResolveResultState["Found"] = 0] = "Found";
|
|
45
|
+
StoreResolveResultState[StoreResolveResultState["Error"] = 1] = "Error";
|
|
46
|
+
StoreResolveResultState[StoreResolveResultState["Null"] = 2] = "Null";
|
|
47
|
+
StoreResolveResultState[StoreResolveResultState["NotPresent"] = 3] = "NotPresent";
|
|
48
|
+
StoreResolveResultState[StoreResolveResultState["Stale"] = 4] = "Stale";
|
|
49
49
|
})(StoreResolveResultState || (StoreResolveResultState = {}));
|
|
50
50
|
|
|
51
|
-
/**
|
|
52
|
-
* A deterministic JSON stringify implementation. Heavily adapted from https://github.com/epoberezkin/fast-json-stable-stringify.
|
|
53
|
-
* This is needed because insertion order for JSON.stringify(object) affects output:
|
|
54
|
-
* JSON.stringify({a: 1, b: 2})
|
|
55
|
-
* "{"a":1,"b":2}"
|
|
56
|
-
* JSON.stringify({b: 2, a: 1})
|
|
57
|
-
* "{"b":2,"a":1}"
|
|
58
|
-
* @param data Data to be JSON-stringified.
|
|
59
|
-
* @returns JSON.stringified value with consistent ordering of keys.
|
|
60
|
-
*/
|
|
61
|
-
function stableJSONStringify$1(node) {
|
|
62
|
-
// This is for Date values.
|
|
63
|
-
if (node && node.toJSON && typeof node.toJSON === 'function') {
|
|
64
|
-
// eslint-disable-next-line no-param-reassign
|
|
65
|
-
node = node.toJSON();
|
|
66
|
-
}
|
|
67
|
-
if (node === undefined) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
if (typeof node === 'number') {
|
|
71
|
-
return isFinite(node) ? '' + node : 'null';
|
|
72
|
-
}
|
|
73
|
-
if (typeof node !== 'object') {
|
|
74
|
-
return stringify$1(node);
|
|
75
|
-
}
|
|
76
|
-
let i;
|
|
77
|
-
let out;
|
|
78
|
-
if (isArray$1(node)) {
|
|
79
|
-
out = '[';
|
|
80
|
-
for (i = 0; i < node.length; i++) {
|
|
81
|
-
if (i) {
|
|
82
|
-
out += ',';
|
|
83
|
-
}
|
|
84
|
-
out += stableJSONStringify$1(node[i]) || 'null';
|
|
85
|
-
}
|
|
86
|
-
return out + ']';
|
|
87
|
-
}
|
|
88
|
-
if (node === null) {
|
|
89
|
-
return 'null';
|
|
90
|
-
}
|
|
91
|
-
const keys$1$1 = keys$1(node).sort();
|
|
92
|
-
out = '';
|
|
93
|
-
for (i = 0; i < keys$1$1.length; i++) {
|
|
94
|
-
const key = keys$1$1[i];
|
|
95
|
-
const value = stableJSONStringify$1(node[key]);
|
|
96
|
-
if (!value) {
|
|
97
|
-
continue;
|
|
98
|
-
}
|
|
99
|
-
if (out) {
|
|
100
|
-
out += ',';
|
|
101
|
-
}
|
|
102
|
-
out += stringify$1(key) + ':' + value;
|
|
103
|
-
}
|
|
104
|
-
return '{' + out + '}';
|
|
105
|
-
}
|
|
106
|
-
const structuredKeySerializationCache = new WeakMap();
|
|
107
|
-
function serializeStructuredKey(key) {
|
|
108
|
-
if (typeof key === 'string') {
|
|
109
|
-
return key;
|
|
110
|
-
}
|
|
111
|
-
const cacheValue = structuredKeySerializationCache.get(key);
|
|
112
|
-
if (cacheValue === undefined) {
|
|
113
|
-
const value = stableJSONStringify$1(key);
|
|
114
|
-
structuredKeySerializationCache.set(key, value);
|
|
115
|
-
return value;
|
|
116
|
-
}
|
|
117
|
-
return cacheValue;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
const undefinedKeyError$1 = 'Undefined value used in StoreKeyMap operation';
|
|
121
|
-
class StoreKeyMap {
|
|
122
|
-
constructor() {
|
|
123
|
-
this.keyMap = new Map();
|
|
124
|
-
this.valueMap = new Map();
|
|
125
|
-
}
|
|
126
|
-
clear() {
|
|
127
|
-
this.valueMap.clear();
|
|
128
|
-
this.keyMap.clear();
|
|
129
|
-
}
|
|
130
|
-
delete(key) {
|
|
131
|
-
const stringifiedKey = serializeStructuredKey(key);
|
|
132
|
-
if (stringifiedKey !== undefined) {
|
|
133
|
-
this.keyMap.delete(stringifiedKey);
|
|
134
|
-
return this.valueMap.delete(stringifiedKey);
|
|
135
|
-
}
|
|
136
|
-
else {
|
|
137
|
-
throw new Error(`${undefinedKeyError$1}: delete`);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
entries() {
|
|
141
|
-
const recordEntries = this.valueMap.entries();
|
|
142
|
-
const keyRecordArray = [];
|
|
143
|
-
for (const [stringifiedKey, value] of Array.from(recordEntries)) {
|
|
144
|
-
const structuredKey = this.keyMap.get(stringifiedKey);
|
|
145
|
-
if (structuredKey !== undefined) {
|
|
146
|
-
keyRecordArray.push([structuredKey, value]);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
return keyRecordArray.values();
|
|
150
|
-
}
|
|
151
|
-
forEachKey(callbackFn, thisArg) {
|
|
152
|
-
return this.keyMap.forEach(callbackFn, thisArg);
|
|
153
|
-
}
|
|
154
|
-
forEachValue(callbackFn, thisArg) {
|
|
155
|
-
return this.valueMap.forEach(callbackFn, thisArg);
|
|
156
|
-
}
|
|
157
|
-
get(key) {
|
|
158
|
-
const stringifiedKey = serializeStructuredKey(key);
|
|
159
|
-
if (stringifiedKey !== undefined) {
|
|
160
|
-
return this.valueMap.get(stringifiedKey);
|
|
161
|
-
}
|
|
162
|
-
else {
|
|
163
|
-
throw new Error(`${undefinedKeyError$1}: get`);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
has(key) {
|
|
167
|
-
const stringifiedKey = serializeStructuredKey(key);
|
|
168
|
-
if (stringifiedKey !== undefined) {
|
|
169
|
-
return this.valueMap.has(stringifiedKey);
|
|
170
|
-
}
|
|
171
|
-
else {
|
|
172
|
-
throw new Error(`${undefinedKeyError$1}: has`);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
keys() {
|
|
176
|
-
return this.keyMap.values();
|
|
177
|
-
}
|
|
178
|
-
keysAsArray() {
|
|
179
|
-
return Array.from(this.keys());
|
|
180
|
-
}
|
|
181
|
-
keysAsStrings() {
|
|
182
|
-
return this.keyMap.keys();
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* Merges in the values of the passed-in StoreKeyMap. Overwrites existing values.
|
|
186
|
-
* @param sourceSet - The StoreKeyMap to merge in.
|
|
187
|
-
*/
|
|
188
|
-
merge(sourceMap) {
|
|
189
|
-
sourceMap.keyMap.forEach((value, key) => {
|
|
190
|
-
this.keyMap.set(key, value);
|
|
191
|
-
});
|
|
192
|
-
sourceMap.valueMap.forEach((value, key) => {
|
|
193
|
-
this.valueMap.set(key, value);
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
set(key, value) {
|
|
197
|
-
const stringifiedKey = serializeStructuredKey(key);
|
|
198
|
-
if (stringifiedKey !== undefined) {
|
|
199
|
-
this.keyMap.set(stringifiedKey, key);
|
|
200
|
-
return this.valueMap.set(stringifiedKey, value);
|
|
201
|
-
}
|
|
202
|
-
else {
|
|
203
|
-
throw new Error(`${undefinedKeyError$1}: set`);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
size() {
|
|
207
|
-
return this.valueMap.size;
|
|
208
|
-
}
|
|
209
|
-
values() {
|
|
210
|
-
return this.valueMap.values();
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
const undefinedKeyError = 'Undefined value used in StoreKeySet operation';
|
|
215
|
-
class StoreKeySet {
|
|
216
|
-
constructor() {
|
|
217
|
-
this.set = new Set();
|
|
218
|
-
this.valueMap = new Map();
|
|
219
|
-
}
|
|
220
|
-
add(key) {
|
|
221
|
-
const stringifiedKey = serializeStructuredKey(key);
|
|
222
|
-
if (stringifiedKey !== undefined) {
|
|
223
|
-
this.set.add(stringifiedKey);
|
|
224
|
-
this.valueMap.set(stringifiedKey, key);
|
|
225
|
-
}
|
|
226
|
-
else {
|
|
227
|
-
throw new Error(`${undefinedKeyError}: add`);
|
|
228
|
-
}
|
|
229
|
-
return this;
|
|
230
|
-
}
|
|
231
|
-
clear() {
|
|
232
|
-
this.set.clear();
|
|
233
|
-
this.valueMap.clear();
|
|
234
|
-
}
|
|
235
|
-
delete(key) {
|
|
236
|
-
const stringifiedKey = serializeStructuredKey(key);
|
|
237
|
-
if (stringifiedKey !== undefined) {
|
|
238
|
-
this.set.delete(stringifiedKey);
|
|
239
|
-
return this.valueMap.delete(stringifiedKey);
|
|
240
|
-
}
|
|
241
|
-
else {
|
|
242
|
-
throw new Error(`${undefinedKeyError}: delete`);
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
entries() {
|
|
246
|
-
return this.valueMap.entries();
|
|
247
|
-
}
|
|
248
|
-
forEach(callbackFn, thisArg) {
|
|
249
|
-
return this.valueMap.forEach(callbackFn, thisArg);
|
|
250
|
-
}
|
|
251
|
-
has(key) {
|
|
252
|
-
const stringifiedKey = serializeStructuredKey(key);
|
|
253
|
-
if (stringifiedKey !== undefined) {
|
|
254
|
-
return this.set.has(stringifiedKey);
|
|
255
|
-
}
|
|
256
|
-
else {
|
|
257
|
-
throw new Error(`${undefinedKeyError}: has`);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
keys() {
|
|
261
|
-
return this.valueMap.values();
|
|
262
|
-
}
|
|
263
|
-
keysAsArray() {
|
|
264
|
-
return Array.from(this.keys());
|
|
265
|
-
}
|
|
266
|
-
keysAsStrings() {
|
|
267
|
-
return this.set.keys();
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* Merges in the values of the passed-in StoreKeySet. Overwrites existing values.
|
|
271
|
-
* @param sourceSet - The StoreKeySet to merge in.
|
|
272
|
-
*/
|
|
273
|
-
merge(sourceSet) {
|
|
274
|
-
sourceSet.set.forEach((value) => {
|
|
275
|
-
this.set.add(value);
|
|
276
|
-
});
|
|
277
|
-
sourceSet.valueMap.forEach((value, key) => {
|
|
278
|
-
this.valueMap.set(key, value);
|
|
279
|
-
});
|
|
280
|
-
}
|
|
281
|
-
size() {
|
|
282
|
-
return this.set.size;
|
|
283
|
-
}
|
|
284
|
-
values() {
|
|
285
|
-
return this.valueMap.values();
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
function adapterToNetworkPriority(priority) {
|
|
290
|
-
switch (priority) {
|
|
291
|
-
case 'background':
|
|
292
|
-
return 'background';
|
|
293
|
-
case 'high':
|
|
294
|
-
return 'high';
|
|
295
|
-
case 'normal':
|
|
296
|
-
default:
|
|
297
|
-
return 'normal';
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
var HttpStatusCode;
|
|
301
|
-
(function (HttpStatusCode) {
|
|
302
|
-
HttpStatusCode[HttpStatusCode["Ok"] = 200] = "Ok";
|
|
303
|
-
HttpStatusCode[HttpStatusCode["Created"] = 201] = "Created";
|
|
304
|
-
HttpStatusCode[HttpStatusCode["NoContent"] = 204] = "NoContent";
|
|
305
|
-
HttpStatusCode[HttpStatusCode["NotModified"] = 304] = "NotModified";
|
|
306
|
-
HttpStatusCode[HttpStatusCode["BadRequest"] = 400] = "BadRequest";
|
|
307
|
-
HttpStatusCode[HttpStatusCode["Unauthorized"] = 401] = "Unauthorized";
|
|
308
|
-
HttpStatusCode[HttpStatusCode["Forbidden"] = 403] = "Forbidden";
|
|
309
|
-
HttpStatusCode[HttpStatusCode["NotFound"] = 404] = "NotFound";
|
|
310
|
-
HttpStatusCode[HttpStatusCode["ServerError"] = 500] = "ServerError";
|
|
311
|
-
HttpStatusCode[HttpStatusCode["GatewayTimeout"] = 504] = "GatewayTimeout";
|
|
312
|
-
})(HttpStatusCode || (HttpStatusCode = {}));
|
|
313
|
-
|
|
314
|
-
function coerceAdapterRequestContext(adapterRequestContext) {
|
|
315
|
-
const { priority, requestCorrelator, eventObservers } = adapterRequestContext;
|
|
316
|
-
return {
|
|
317
|
-
networkPriority: adapterToNetworkPriority(priority),
|
|
318
|
-
requestCorrelator,
|
|
319
|
-
eventObservers,
|
|
320
|
-
};
|
|
321
|
-
}
|
|
322
|
-
var GraphNodeType;
|
|
323
|
-
(function (GraphNodeType) {
|
|
324
|
-
GraphNodeType["Link"] = "Link";
|
|
325
|
-
GraphNodeType["Node"] = "Node";
|
|
326
|
-
GraphNodeType["Error"] = "Error";
|
|
327
|
-
GraphNodeType["Locked"] = "Locked";
|
|
328
|
-
})(GraphNodeType || (GraphNodeType = {}));
|
|
329
|
-
|
|
330
|
-
var StoreLinkStateValues;
|
|
331
|
-
(function (StoreLinkStateValues) {
|
|
332
|
-
StoreLinkStateValues[StoreLinkStateValues["NotPresent"] = 0] = "NotPresent";
|
|
333
|
-
StoreLinkStateValues[StoreLinkStateValues["RefNotPresent"] = 1] = "RefNotPresent";
|
|
334
|
-
StoreLinkStateValues[StoreLinkStateValues["RefPresent"] = 2] = "RefPresent";
|
|
335
|
-
StoreLinkStateValues[StoreLinkStateValues["Null"] = 3] = "Null";
|
|
336
|
-
StoreLinkStateValues[StoreLinkStateValues["Missing"] = 4] = "Missing";
|
|
337
|
-
StoreLinkStateValues[StoreLinkStateValues["Pending"] = 5] = "Pending";
|
|
338
|
-
})(StoreLinkStateValues || (StoreLinkStateValues = {}));
|
|
339
|
-
var FragmentReadResultState;
|
|
340
|
-
(function (FragmentReadResultState) {
|
|
341
|
-
FragmentReadResultState[FragmentReadResultState["Missing"] = 0] = "Missing";
|
|
342
|
-
FragmentReadResultState[FragmentReadResultState["Success"] = 1] = "Success";
|
|
343
|
-
FragmentReadResultState[FragmentReadResultState["Error"] = 2] = "Error";
|
|
344
|
-
})(FragmentReadResultState || (FragmentReadResultState = {}));
|
|
345
|
-
({
|
|
346
|
-
state: FragmentReadResultState.Missing,
|
|
347
|
-
});
|
|
348
|
-
// engine version: 0.138.
|
|
51
|
+
/**
|
|
52
|
+
* A deterministic JSON stringify implementation. Heavily adapted from https://github.com/epoberezkin/fast-json-stable-stringify.
|
|
53
|
+
* This is needed because insertion order for JSON.stringify(object) affects output:
|
|
54
|
+
* JSON.stringify({a: 1, b: 2})
|
|
55
|
+
* "{"a":1,"b":2}"
|
|
56
|
+
* JSON.stringify({b: 2, a: 1})
|
|
57
|
+
* "{"b":2,"a":1}"
|
|
58
|
+
* @param data Data to be JSON-stringified.
|
|
59
|
+
* @returns JSON.stringified value with consistent ordering of keys.
|
|
60
|
+
*/
|
|
61
|
+
function stableJSONStringify$1(node) {
|
|
62
|
+
// This is for Date values.
|
|
63
|
+
if (node && node.toJSON && typeof node.toJSON === 'function') {
|
|
64
|
+
// eslint-disable-next-line no-param-reassign
|
|
65
|
+
node = node.toJSON();
|
|
66
|
+
}
|
|
67
|
+
if (node === undefined) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (typeof node === 'number') {
|
|
71
|
+
return isFinite(node) ? '' + node : 'null';
|
|
72
|
+
}
|
|
73
|
+
if (typeof node !== 'object') {
|
|
74
|
+
return stringify$1(node);
|
|
75
|
+
}
|
|
76
|
+
let i;
|
|
77
|
+
let out;
|
|
78
|
+
if (isArray$1(node)) {
|
|
79
|
+
out = '[';
|
|
80
|
+
for (i = 0; i < node.length; i++) {
|
|
81
|
+
if (i) {
|
|
82
|
+
out += ',';
|
|
83
|
+
}
|
|
84
|
+
out += stableJSONStringify$1(node[i]) || 'null';
|
|
85
|
+
}
|
|
86
|
+
return out + ']';
|
|
87
|
+
}
|
|
88
|
+
if (node === null) {
|
|
89
|
+
return 'null';
|
|
90
|
+
}
|
|
91
|
+
const keys$1$1 = keys$1(node).sort();
|
|
92
|
+
out = '';
|
|
93
|
+
for (i = 0; i < keys$1$1.length; i++) {
|
|
94
|
+
const key = keys$1$1[i];
|
|
95
|
+
const value = stableJSONStringify$1(node[key]);
|
|
96
|
+
if (!value) {
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
if (out) {
|
|
100
|
+
out += ',';
|
|
101
|
+
}
|
|
102
|
+
out += stringify$1(key) + ':' + value;
|
|
103
|
+
}
|
|
104
|
+
return '{' + out + '}';
|
|
105
|
+
}
|
|
106
|
+
const structuredKeySerializationCache = new WeakMap();
|
|
107
|
+
function serializeStructuredKey(key) {
|
|
108
|
+
if (typeof key === 'string') {
|
|
109
|
+
return key;
|
|
110
|
+
}
|
|
111
|
+
const cacheValue = structuredKeySerializationCache.get(key);
|
|
112
|
+
if (cacheValue === undefined) {
|
|
113
|
+
const value = stableJSONStringify$1(key);
|
|
114
|
+
structuredKeySerializationCache.set(key, value);
|
|
115
|
+
return value;
|
|
116
|
+
}
|
|
117
|
+
return cacheValue;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const undefinedKeyError$1 = 'Undefined value used in StoreKeyMap operation';
|
|
121
|
+
class StoreKeyMap {
|
|
122
|
+
constructor() {
|
|
123
|
+
this.keyMap = new Map();
|
|
124
|
+
this.valueMap = new Map();
|
|
125
|
+
}
|
|
126
|
+
clear() {
|
|
127
|
+
this.valueMap.clear();
|
|
128
|
+
this.keyMap.clear();
|
|
129
|
+
}
|
|
130
|
+
delete(key) {
|
|
131
|
+
const stringifiedKey = serializeStructuredKey(key);
|
|
132
|
+
if (stringifiedKey !== undefined) {
|
|
133
|
+
this.keyMap.delete(stringifiedKey);
|
|
134
|
+
return this.valueMap.delete(stringifiedKey);
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
throw new Error(`${undefinedKeyError$1}: delete`);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
entries() {
|
|
141
|
+
const recordEntries = this.valueMap.entries();
|
|
142
|
+
const keyRecordArray = [];
|
|
143
|
+
for (const [stringifiedKey, value] of Array.from(recordEntries)) {
|
|
144
|
+
const structuredKey = this.keyMap.get(stringifiedKey);
|
|
145
|
+
if (structuredKey !== undefined) {
|
|
146
|
+
keyRecordArray.push([structuredKey, value]);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return keyRecordArray.values();
|
|
150
|
+
}
|
|
151
|
+
forEachKey(callbackFn, thisArg) {
|
|
152
|
+
return this.keyMap.forEach(callbackFn, thisArg);
|
|
153
|
+
}
|
|
154
|
+
forEachValue(callbackFn, thisArg) {
|
|
155
|
+
return this.valueMap.forEach(callbackFn, thisArg);
|
|
156
|
+
}
|
|
157
|
+
get(key) {
|
|
158
|
+
const stringifiedKey = serializeStructuredKey(key);
|
|
159
|
+
if (stringifiedKey !== undefined) {
|
|
160
|
+
return this.valueMap.get(stringifiedKey);
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
throw new Error(`${undefinedKeyError$1}: get`);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
has(key) {
|
|
167
|
+
const stringifiedKey = serializeStructuredKey(key);
|
|
168
|
+
if (stringifiedKey !== undefined) {
|
|
169
|
+
return this.valueMap.has(stringifiedKey);
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
throw new Error(`${undefinedKeyError$1}: has`);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
keys() {
|
|
176
|
+
return this.keyMap.values();
|
|
177
|
+
}
|
|
178
|
+
keysAsArray() {
|
|
179
|
+
return Array.from(this.keys());
|
|
180
|
+
}
|
|
181
|
+
keysAsStrings() {
|
|
182
|
+
return this.keyMap.keys();
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Merges in the values of the passed-in StoreKeyMap. Overwrites existing values.
|
|
186
|
+
* @param sourceSet - The StoreKeyMap to merge in.
|
|
187
|
+
*/
|
|
188
|
+
merge(sourceMap) {
|
|
189
|
+
sourceMap.keyMap.forEach((value, key) => {
|
|
190
|
+
this.keyMap.set(key, value);
|
|
191
|
+
});
|
|
192
|
+
sourceMap.valueMap.forEach((value, key) => {
|
|
193
|
+
this.valueMap.set(key, value);
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
set(key, value) {
|
|
197
|
+
const stringifiedKey = serializeStructuredKey(key);
|
|
198
|
+
if (stringifiedKey !== undefined) {
|
|
199
|
+
this.keyMap.set(stringifiedKey, key);
|
|
200
|
+
return this.valueMap.set(stringifiedKey, value);
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
throw new Error(`${undefinedKeyError$1}: set`);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
size() {
|
|
207
|
+
return this.valueMap.size;
|
|
208
|
+
}
|
|
209
|
+
values() {
|
|
210
|
+
return this.valueMap.values();
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
const undefinedKeyError = 'Undefined value used in StoreKeySet operation';
|
|
215
|
+
class StoreKeySet {
|
|
216
|
+
constructor() {
|
|
217
|
+
this.set = new Set();
|
|
218
|
+
this.valueMap = new Map();
|
|
219
|
+
}
|
|
220
|
+
add(key) {
|
|
221
|
+
const stringifiedKey = serializeStructuredKey(key);
|
|
222
|
+
if (stringifiedKey !== undefined) {
|
|
223
|
+
this.set.add(stringifiedKey);
|
|
224
|
+
this.valueMap.set(stringifiedKey, key);
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
throw new Error(`${undefinedKeyError}: add`);
|
|
228
|
+
}
|
|
229
|
+
return this;
|
|
230
|
+
}
|
|
231
|
+
clear() {
|
|
232
|
+
this.set.clear();
|
|
233
|
+
this.valueMap.clear();
|
|
234
|
+
}
|
|
235
|
+
delete(key) {
|
|
236
|
+
const stringifiedKey = serializeStructuredKey(key);
|
|
237
|
+
if (stringifiedKey !== undefined) {
|
|
238
|
+
this.set.delete(stringifiedKey);
|
|
239
|
+
return this.valueMap.delete(stringifiedKey);
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
throw new Error(`${undefinedKeyError}: delete`);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
entries() {
|
|
246
|
+
return this.valueMap.entries();
|
|
247
|
+
}
|
|
248
|
+
forEach(callbackFn, thisArg) {
|
|
249
|
+
return this.valueMap.forEach(callbackFn, thisArg);
|
|
250
|
+
}
|
|
251
|
+
has(key) {
|
|
252
|
+
const stringifiedKey = serializeStructuredKey(key);
|
|
253
|
+
if (stringifiedKey !== undefined) {
|
|
254
|
+
return this.set.has(stringifiedKey);
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
throw new Error(`${undefinedKeyError}: has`);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
keys() {
|
|
261
|
+
return this.valueMap.values();
|
|
262
|
+
}
|
|
263
|
+
keysAsArray() {
|
|
264
|
+
return Array.from(this.keys());
|
|
265
|
+
}
|
|
266
|
+
keysAsStrings() {
|
|
267
|
+
return this.set.keys();
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Merges in the values of the passed-in StoreKeySet. Overwrites existing values.
|
|
271
|
+
* @param sourceSet - The StoreKeySet to merge in.
|
|
272
|
+
*/
|
|
273
|
+
merge(sourceSet) {
|
|
274
|
+
sourceSet.set.forEach((value) => {
|
|
275
|
+
this.set.add(value);
|
|
276
|
+
});
|
|
277
|
+
sourceSet.valueMap.forEach((value, key) => {
|
|
278
|
+
this.valueMap.set(key, value);
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
size() {
|
|
282
|
+
return this.set.size;
|
|
283
|
+
}
|
|
284
|
+
values() {
|
|
285
|
+
return this.valueMap.values();
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
function adapterToNetworkPriority(priority) {
|
|
290
|
+
switch (priority) {
|
|
291
|
+
case 'background':
|
|
292
|
+
return 'background';
|
|
293
|
+
case 'high':
|
|
294
|
+
return 'high';
|
|
295
|
+
case 'normal':
|
|
296
|
+
default:
|
|
297
|
+
return 'normal';
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
var HttpStatusCode;
|
|
301
|
+
(function (HttpStatusCode) {
|
|
302
|
+
HttpStatusCode[HttpStatusCode["Ok"] = 200] = "Ok";
|
|
303
|
+
HttpStatusCode[HttpStatusCode["Created"] = 201] = "Created";
|
|
304
|
+
HttpStatusCode[HttpStatusCode["NoContent"] = 204] = "NoContent";
|
|
305
|
+
HttpStatusCode[HttpStatusCode["NotModified"] = 304] = "NotModified";
|
|
306
|
+
HttpStatusCode[HttpStatusCode["BadRequest"] = 400] = "BadRequest";
|
|
307
|
+
HttpStatusCode[HttpStatusCode["Unauthorized"] = 401] = "Unauthorized";
|
|
308
|
+
HttpStatusCode[HttpStatusCode["Forbidden"] = 403] = "Forbidden";
|
|
309
|
+
HttpStatusCode[HttpStatusCode["NotFound"] = 404] = "NotFound";
|
|
310
|
+
HttpStatusCode[HttpStatusCode["ServerError"] = 500] = "ServerError";
|
|
311
|
+
HttpStatusCode[HttpStatusCode["GatewayTimeout"] = 504] = "GatewayTimeout";
|
|
312
|
+
})(HttpStatusCode || (HttpStatusCode = {}));
|
|
313
|
+
|
|
314
|
+
function coerceAdapterRequestContext(adapterRequestContext) {
|
|
315
|
+
const { priority, requestCorrelator, eventObservers } = adapterRequestContext;
|
|
316
|
+
return {
|
|
317
|
+
networkPriority: adapterToNetworkPriority(priority),
|
|
318
|
+
requestCorrelator,
|
|
319
|
+
eventObservers,
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
var GraphNodeType;
|
|
323
|
+
(function (GraphNodeType) {
|
|
324
|
+
GraphNodeType["Link"] = "Link";
|
|
325
|
+
GraphNodeType["Node"] = "Node";
|
|
326
|
+
GraphNodeType["Error"] = "Error";
|
|
327
|
+
GraphNodeType["Locked"] = "Locked";
|
|
328
|
+
})(GraphNodeType || (GraphNodeType = {}));
|
|
329
|
+
|
|
330
|
+
var StoreLinkStateValues;
|
|
331
|
+
(function (StoreLinkStateValues) {
|
|
332
|
+
StoreLinkStateValues[StoreLinkStateValues["NotPresent"] = 0] = "NotPresent";
|
|
333
|
+
StoreLinkStateValues[StoreLinkStateValues["RefNotPresent"] = 1] = "RefNotPresent";
|
|
334
|
+
StoreLinkStateValues[StoreLinkStateValues["RefPresent"] = 2] = "RefPresent";
|
|
335
|
+
StoreLinkStateValues[StoreLinkStateValues["Null"] = 3] = "Null";
|
|
336
|
+
StoreLinkStateValues[StoreLinkStateValues["Missing"] = 4] = "Missing";
|
|
337
|
+
StoreLinkStateValues[StoreLinkStateValues["Pending"] = 5] = "Pending";
|
|
338
|
+
})(StoreLinkStateValues || (StoreLinkStateValues = {}));
|
|
339
|
+
var FragmentReadResultState;
|
|
340
|
+
(function (FragmentReadResultState) {
|
|
341
|
+
FragmentReadResultState[FragmentReadResultState["Missing"] = 0] = "Missing";
|
|
342
|
+
FragmentReadResultState[FragmentReadResultState["Success"] = 1] = "Success";
|
|
343
|
+
FragmentReadResultState[FragmentReadResultState["Error"] = 2] = "Error";
|
|
344
|
+
})(FragmentReadResultState || (FragmentReadResultState = {}));
|
|
345
|
+
({
|
|
346
|
+
state: FragmentReadResultState.Missing,
|
|
347
|
+
});
|
|
348
|
+
// engine version: 0.138.3-dee50acf
|
|
349
349
|
|
|
350
350
|
/**
|
|
351
351
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -44560,23 +44560,23 @@ function ingestPaginationMetadata(astNode, state, key, sink, existingData) {
|
|
|
44560
44560
|
let existingPaginationMetadata = store.readEntry(paginationKey);
|
|
44561
44561
|
const afterArg = (_a = astNode.arguments) === null || _a === void 0 ? void 0 : _a.find(argument => { return argument.name.value === 'after'; });
|
|
44562
44562
|
const afterArgVal = evaluateArgumentValue(afterArg, 'StringValue', state.variables);
|
|
44563
|
-
|
|
44563
|
+
const isPagedResponse = afterArgVal !== undefined &&
|
|
44564
44564
|
existingPaginationMetadata !== undefined &&
|
|
44565
|
-
existingPaginationMetadata[afterArgVal] !== undefined
|
|
44566
|
-
|
|
44565
|
+
existingPaginationMetadata[afterArgVal] !== undefined;
|
|
44566
|
+
if (isPagedResponse && existingPaginationMetadata !== undefined) {
|
|
44567
44567
|
const previousPageOffset = existingPaginationMetadata[afterArgVal];
|
|
44568
44568
|
existingPaginationMetadata = {
|
|
44569
44569
|
...existingPaginationMetadata,
|
|
44570
44570
|
[startCursor]: previousPageOffset + 1,
|
|
44571
44571
|
};
|
|
44572
44572
|
}
|
|
44573
|
-
|
|
44574
|
-
|
|
44575
|
-
|
|
44576
|
-
|
|
44573
|
+
// Default to a zero offset if we're not a result of a paged request
|
|
44574
|
+
const startOffset = isPagedResponse && existingPaginationMetadata !== undefined
|
|
44575
|
+
? offsetFromToken(existingPaginationMetadata, startCursor)
|
|
44576
|
+
: 0;
|
|
44577
44577
|
if (process.env.NODE_ENV !== 'production') {
|
|
44578
44578
|
if (startOffset < 0) {
|
|
44579
|
-
throw new RangeError(
|
|
44579
|
+
throw new RangeError(`Cursor value ${startCursor} is not recognized. Cannot ingest the returned page. After: ${afterArgVal}`);
|
|
44580
44580
|
}
|
|
44581
44581
|
}
|
|
44582
44582
|
const nextOffset = startOffset + edges.length;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lwc-adapters-uiapi",
|
|
3
|
-
"version": "1.128.
|
|
3
|
+
"version": "1.128.1",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "UIAPI adapters with LWC bindings",
|
|
6
6
|
"module": "dist/main.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@salesforce/lds-adapters-uiapi": "*"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@luvio/lwc-luvio": "0.138.
|
|
37
|
+
"@luvio/lwc-luvio": "0.138.3",
|
|
38
38
|
"@salesforce/lds-default-luvio": "*"
|
|
39
39
|
}
|
|
40
40
|
}
|