@plasmicapp/data-sources 0.1.22 → 0.1.23
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/data-sources.cjs.development.js +97 -206
- package/dist/data-sources.cjs.development.js.map +1 -1
- package/dist/data-sources.cjs.production.min.js +1 -1
- package/dist/data-sources.cjs.production.min.js.map +1 -1
- package/dist/data-sources.esm.js +97 -206
- package/dist/data-sources.esm.js.map +1 -1
- package/package.json +4 -4
|
@@ -17,49 +17,40 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
17
17
|
reject(error);
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
|
-
|
|
21
20
|
if (info.done) {
|
|
22
21
|
resolve(value);
|
|
23
22
|
} else {
|
|
24
23
|
Promise.resolve(value).then(_next, _throw);
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
|
-
|
|
28
26
|
function _asyncToGenerator(fn) {
|
|
29
27
|
return function () {
|
|
30
28
|
var self = this,
|
|
31
|
-
|
|
29
|
+
args = arguments;
|
|
32
30
|
return new Promise(function (resolve, reject) {
|
|
33
31
|
var gen = fn.apply(self, args);
|
|
34
|
-
|
|
35
32
|
function _next(value) {
|
|
36
33
|
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
37
34
|
}
|
|
38
|
-
|
|
39
35
|
function _throw(err) {
|
|
40
36
|
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
41
37
|
}
|
|
42
|
-
|
|
43
38
|
_next(undefined);
|
|
44
39
|
});
|
|
45
40
|
};
|
|
46
41
|
}
|
|
47
|
-
|
|
48
42
|
function _extends() {
|
|
49
|
-
_extends = Object.assign
|
|
43
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
50
44
|
for (var i = 1; i < arguments.length; i++) {
|
|
51
45
|
var source = arguments[i];
|
|
52
|
-
|
|
53
46
|
for (var key in source) {
|
|
54
47
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
55
48
|
target[key] = source[key];
|
|
56
49
|
}
|
|
57
50
|
}
|
|
58
51
|
}
|
|
59
|
-
|
|
60
52
|
return target;
|
|
61
53
|
};
|
|
62
|
-
|
|
63
54
|
return _extends.apply(this, arguments);
|
|
64
55
|
}
|
|
65
56
|
|
|
@@ -74,17 +65,16 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
74
65
|
* This source code is licensed under the MIT license found in the
|
|
75
66
|
* LICENSE file in the root directory of this source tree.
|
|
76
67
|
*/
|
|
68
|
+
|
|
77
69
|
var runtime = function (exports) {
|
|
78
70
|
|
|
79
71
|
var Op = Object.prototype;
|
|
80
72
|
var hasOwn = Op.hasOwnProperty;
|
|
81
73
|
var undefined$1; // More compressible than void 0.
|
|
82
|
-
|
|
83
74
|
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
84
75
|
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
85
76
|
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
86
77
|
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
87
|
-
|
|
88
78
|
function define(obj, key, value) {
|
|
89
79
|
Object.defineProperty(obj, key, {
|
|
90
80
|
value: value,
|
|
@@ -94,7 +84,6 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
94
84
|
});
|
|
95
85
|
return obj[key];
|
|
96
86
|
}
|
|
97
|
-
|
|
98
87
|
try {
|
|
99
88
|
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
|
100
89
|
define({}, "");
|
|
@@ -103,19 +92,20 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
103
92
|
return obj[key] = value;
|
|
104
93
|
};
|
|
105
94
|
}
|
|
106
|
-
|
|
107
95
|
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
108
96
|
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
109
97
|
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
110
98
|
var generator = Object.create(protoGenerator.prototype);
|
|
111
|
-
var context = new Context(tryLocsList || []);
|
|
112
|
-
// .throw, and .return methods.
|
|
99
|
+
var context = new Context(tryLocsList || []);
|
|
113
100
|
|
|
101
|
+
// The ._invoke method unifies the implementations of the .next,
|
|
102
|
+
// .throw, and .return methods.
|
|
114
103
|
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
115
104
|
return generator;
|
|
116
105
|
}
|
|
106
|
+
exports.wrap = wrap;
|
|
117
107
|
|
|
118
|
-
|
|
108
|
+
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
119
109
|
// record like context.tryEntries[i].completion. This interface could
|
|
120
110
|
// have been (and was previously) designed to take a closure to be
|
|
121
111
|
// invoked without arguments, but in all the cases we care about we
|
|
@@ -125,7 +115,6 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
125
115
|
// in every case, so we don't have to touch the arguments object. The
|
|
126
116
|
// only additional allocation required is the completion record, which
|
|
127
117
|
// has a stable shape and so hopefully should be cheap to allocate.
|
|
128
|
-
|
|
129
118
|
function tryCatch(fn, obj, arg) {
|
|
130
119
|
try {
|
|
131
120
|
return {
|
|
@@ -139,46 +128,44 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
139
128
|
};
|
|
140
129
|
}
|
|
141
130
|
}
|
|
142
|
-
|
|
143
131
|
var GenStateSuspendedStart = "suspendedStart";
|
|
144
132
|
var GenStateSuspendedYield = "suspendedYield";
|
|
145
133
|
var GenStateExecuting = "executing";
|
|
146
|
-
var GenStateCompleted = "completed";
|
|
134
|
+
var GenStateCompleted = "completed";
|
|
135
|
+
|
|
136
|
+
// Returning this object from the innerFn has the same effect as
|
|
147
137
|
// breaking out of the dispatch switch statement.
|
|
138
|
+
var ContinueSentinel = {};
|
|
148
139
|
|
|
149
|
-
|
|
140
|
+
// Dummy constructor functions that we use as the .constructor and
|
|
150
141
|
// .constructor.prototype properties for functions that return Generator
|
|
151
142
|
// objects. For full spec compliance, you may wish to configure your
|
|
152
143
|
// minifier not to mangle the names of these two functions.
|
|
153
|
-
|
|
154
144
|
function Generator() {}
|
|
155
|
-
|
|
156
145
|
function GeneratorFunction() {}
|
|
146
|
+
function GeneratorFunctionPrototype() {}
|
|
157
147
|
|
|
158
|
-
|
|
148
|
+
// This is a polyfill for %IteratorPrototype% for environments that
|
|
159
149
|
// don't natively support it.
|
|
160
|
-
|
|
161
|
-
|
|
162
150
|
var IteratorPrototype = {};
|
|
163
151
|
define(IteratorPrototype, iteratorSymbol, function () {
|
|
164
152
|
return this;
|
|
165
153
|
});
|
|
166
154
|
var getProto = Object.getPrototypeOf;
|
|
167
155
|
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
168
|
-
|
|
169
156
|
if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
170
157
|
// This environment has a native %IteratorPrototype%; use it instead
|
|
171
158
|
// of the polyfill.
|
|
172
159
|
IteratorPrototype = NativeIteratorPrototype;
|
|
173
160
|
}
|
|
174
|
-
|
|
175
161
|
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
176
162
|
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
|
177
163
|
define(Gp, "constructor", GeneratorFunctionPrototype);
|
|
178
164
|
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
|
179
|
-
GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction");
|
|
180
|
-
// Iterator interface in terms of a single ._invoke method.
|
|
165
|
+
GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction");
|
|
181
166
|
|
|
167
|
+
// Helper for defining the .next, .throw, and .return methods of the
|
|
168
|
+
// Iterator interface in terms of a single ._invoke method.
|
|
182
169
|
function defineIteratorMethods(prototype) {
|
|
183
170
|
["next", "throw", "return"].forEach(function (method) {
|
|
184
171
|
define(prototype, method, function (arg) {
|
|
@@ -186,14 +173,13 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
186
173
|
});
|
|
187
174
|
});
|
|
188
175
|
}
|
|
189
|
-
|
|
190
176
|
exports.isGeneratorFunction = function (genFun) {
|
|
191
177
|
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
192
|
-
return ctor ? ctor === GeneratorFunction ||
|
|
178
|
+
return ctor ? ctor === GeneratorFunction ||
|
|
179
|
+
// For the native GeneratorFunction constructor, the best we can
|
|
193
180
|
// do is to check its .name property.
|
|
194
181
|
(ctor.displayName || ctor.name) === "GeneratorFunction" : false;
|
|
195
182
|
};
|
|
196
|
-
|
|
197
183
|
exports.mark = function (genFun) {
|
|
198
184
|
if (Object.setPrototypeOf) {
|
|
199
185
|
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
@@ -201,31 +187,27 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
201
187
|
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
202
188
|
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
|
203
189
|
}
|
|
204
|
-
|
|
205
190
|
genFun.prototype = Object.create(Gp);
|
|
206
191
|
return genFun;
|
|
207
|
-
};
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
// Within the body of any async function, `await x` is transformed to
|
|
208
195
|
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
209
196
|
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
210
197
|
// meant to be awaited.
|
|
211
|
-
|
|
212
|
-
|
|
213
198
|
exports.awrap = function (arg) {
|
|
214
199
|
return {
|
|
215
200
|
__await: arg
|
|
216
201
|
};
|
|
217
202
|
};
|
|
218
|
-
|
|
219
203
|
function AsyncIterator(generator, PromiseImpl) {
|
|
220
204
|
function invoke(method, arg, resolve, reject) {
|
|
221
205
|
var record = tryCatch(generator[method], generator, arg);
|
|
222
|
-
|
|
223
206
|
if (record.type === "throw") {
|
|
224
207
|
reject(record.arg);
|
|
225
208
|
} else {
|
|
226
209
|
var result = record.arg;
|
|
227
210
|
var value = result.value;
|
|
228
|
-
|
|
229
211
|
if (value && typeof value === "object" && hasOwn.call(value, "__await")) {
|
|
230
212
|
return PromiseImpl.resolve(value.__await).then(function (value) {
|
|
231
213
|
invoke("next", value, resolve, reject);
|
|
@@ -233,7 +215,6 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
233
215
|
invoke("throw", err, resolve, reject);
|
|
234
216
|
});
|
|
235
217
|
}
|
|
236
|
-
|
|
237
218
|
return PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
238
219
|
// When a yielded Promise is resolved, its final value becomes
|
|
239
220
|
// the .value of the Promise<{value,done}> result for the
|
|
@@ -247,17 +228,15 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
247
228
|
});
|
|
248
229
|
}
|
|
249
230
|
}
|
|
250
|
-
|
|
251
231
|
var previousPromise;
|
|
252
|
-
|
|
253
232
|
function enqueue(method, arg) {
|
|
254
233
|
function callInvokeWithMethodAndArg() {
|
|
255
234
|
return new PromiseImpl(function (resolve, reject) {
|
|
256
235
|
invoke(method, arg, resolve, reject);
|
|
257
236
|
});
|
|
258
237
|
}
|
|
259
|
-
|
|
260
|
-
|
|
238
|
+
return previousPromise =
|
|
239
|
+
// If enqueue has been called before, then we want to wait until
|
|
261
240
|
// all previous Promises have been resolved before calling invoke,
|
|
262
241
|
// so that results are always delivered in the correct order. If
|
|
263
242
|
// enqueue has not been called before, then it is important to
|
|
@@ -269,24 +248,25 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
269
248
|
// execute code before the first await. Since we implement simple
|
|
270
249
|
// async functions in terms of async generators, it is especially
|
|
271
250
|
// important to get this right, even though it requires care.
|
|
272
|
-
previousPromise ? previousPromise.then(callInvokeWithMethodAndArg,
|
|
251
|
+
previousPromise ? previousPromise.then(callInvokeWithMethodAndArg,
|
|
252
|
+
// Avoid propagating failures to Promises returned by later
|
|
273
253
|
// invocations of the iterator.
|
|
274
254
|
callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
275
|
-
}
|
|
276
|
-
// .throw, and .return (see defineIteratorMethods).
|
|
277
|
-
|
|
255
|
+
}
|
|
278
256
|
|
|
257
|
+
// Define the unified helper method that is used to implement .next,
|
|
258
|
+
// .throw, and .return (see defineIteratorMethods).
|
|
279
259
|
this._invoke = enqueue;
|
|
280
260
|
}
|
|
281
|
-
|
|
282
261
|
defineIteratorMethods(AsyncIterator.prototype);
|
|
283
262
|
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
284
263
|
return this;
|
|
285
264
|
});
|
|
286
|
-
exports.AsyncIterator = AsyncIterator;
|
|
265
|
+
exports.AsyncIterator = AsyncIterator;
|
|
266
|
+
|
|
267
|
+
// Note that simple async functions are implemented on top of
|
|
287
268
|
// AsyncIterator objects; they just return a Promise for the value of
|
|
288
269
|
// the final result produced by the iterator.
|
|
289
|
-
|
|
290
270
|
exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
291
271
|
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
292
272
|
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
@@ -295,39 +275,32 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
295
275
|
return result.done ? result.value : iter.next();
|
|
296
276
|
});
|
|
297
277
|
};
|
|
298
|
-
|
|
299
278
|
function makeInvokeMethod(innerFn, self, context) {
|
|
300
279
|
var state = GenStateSuspendedStart;
|
|
301
280
|
return function invoke(method, arg) {
|
|
302
281
|
if (state === GenStateExecuting) {
|
|
303
282
|
throw new Error("Generator is already running");
|
|
304
283
|
}
|
|
305
|
-
|
|
306
284
|
if (state === GenStateCompleted) {
|
|
307
285
|
if (method === "throw") {
|
|
308
286
|
throw arg;
|
|
309
|
-
}
|
|
310
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
311
|
-
|
|
287
|
+
}
|
|
312
288
|
|
|
289
|
+
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
290
|
+
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
313
291
|
return doneResult();
|
|
314
292
|
}
|
|
315
|
-
|
|
316
293
|
context.method = method;
|
|
317
294
|
context.arg = arg;
|
|
318
|
-
|
|
319
295
|
while (true) {
|
|
320
296
|
var delegate = context.delegate;
|
|
321
|
-
|
|
322
297
|
if (delegate) {
|
|
323
298
|
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
324
|
-
|
|
325
299
|
if (delegateResult) {
|
|
326
300
|
if (delegateResult === ContinueSentinel) continue;
|
|
327
301
|
return delegateResult;
|
|
328
302
|
}
|
|
329
303
|
}
|
|
330
|
-
|
|
331
304
|
if (context.method === "next") {
|
|
332
305
|
// Setting context._sent for legacy support of Babel's
|
|
333
306
|
// function.sent implementation.
|
|
@@ -337,51 +310,44 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
337
310
|
state = GenStateCompleted;
|
|
338
311
|
throw context.arg;
|
|
339
312
|
}
|
|
340
|
-
|
|
341
313
|
context.dispatchException(context.arg);
|
|
342
314
|
} else if (context.method === "return") {
|
|
343
315
|
context.abrupt("return", context.arg);
|
|
344
316
|
}
|
|
345
|
-
|
|
346
317
|
state = GenStateExecuting;
|
|
347
318
|
var record = tryCatch(innerFn, self, context);
|
|
348
|
-
|
|
349
319
|
if (record.type === "normal") {
|
|
350
320
|
// If an exception is thrown from innerFn, we leave state ===
|
|
351
321
|
// GenStateExecuting and loop back for another invocation.
|
|
352
322
|
state = context.done ? GenStateCompleted : GenStateSuspendedYield;
|
|
353
|
-
|
|
354
323
|
if (record.arg === ContinueSentinel) {
|
|
355
324
|
continue;
|
|
356
325
|
}
|
|
357
|
-
|
|
358
326
|
return {
|
|
359
327
|
value: record.arg,
|
|
360
328
|
done: context.done
|
|
361
329
|
};
|
|
362
330
|
} else if (record.type === "throw") {
|
|
363
|
-
state = GenStateCompleted;
|
|
331
|
+
state = GenStateCompleted;
|
|
332
|
+
// Dispatch the exception by looping back around to the
|
|
364
333
|
// context.dispatchException(context.arg) call above.
|
|
365
|
-
|
|
366
334
|
context.method = "throw";
|
|
367
335
|
context.arg = record.arg;
|
|
368
336
|
}
|
|
369
337
|
}
|
|
370
338
|
};
|
|
371
|
-
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
372
342
|
// result, either by returning a { value, done } result from the
|
|
373
343
|
// delegate iterator, or by modifying context.method and context.arg,
|
|
374
344
|
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
375
|
-
|
|
376
|
-
|
|
377
345
|
function maybeInvokeDelegate(delegate, context) {
|
|
378
346
|
var method = delegate.iterator[context.method];
|
|
379
|
-
|
|
380
347
|
if (method === undefined$1) {
|
|
381
348
|
// A .throw or .return when the delegate iterator has no .throw
|
|
382
349
|
// method always terminates the yield* loop.
|
|
383
350
|
context.delegate = null;
|
|
384
|
-
|
|
385
351
|
if (context.method === "throw") {
|
|
386
352
|
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
387
353
|
if (delegate.iterator["return"]) {
|
|
@@ -390,51 +356,45 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
390
356
|
context.method = "return";
|
|
391
357
|
context.arg = undefined$1;
|
|
392
358
|
maybeInvokeDelegate(delegate, context);
|
|
393
|
-
|
|
394
359
|
if (context.method === "throw") {
|
|
395
360
|
// If maybeInvokeDelegate(context) changed context.method from
|
|
396
361
|
// "return" to "throw", let that override the TypeError below.
|
|
397
362
|
return ContinueSentinel;
|
|
398
363
|
}
|
|
399
364
|
}
|
|
400
|
-
|
|
401
365
|
context.method = "throw";
|
|
402
366
|
context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
403
367
|
}
|
|
404
|
-
|
|
405
368
|
return ContinueSentinel;
|
|
406
369
|
}
|
|
407
|
-
|
|
408
370
|
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
409
|
-
|
|
410
371
|
if (record.type === "throw") {
|
|
411
372
|
context.method = "throw";
|
|
412
373
|
context.arg = record.arg;
|
|
413
374
|
context.delegate = null;
|
|
414
375
|
return ContinueSentinel;
|
|
415
376
|
}
|
|
416
|
-
|
|
417
377
|
var info = record.arg;
|
|
418
|
-
|
|
419
378
|
if (!info) {
|
|
420
379
|
context.method = "throw";
|
|
421
380
|
context.arg = new TypeError("iterator result is not an object");
|
|
422
381
|
context.delegate = null;
|
|
423
382
|
return ContinueSentinel;
|
|
424
383
|
}
|
|
425
|
-
|
|
426
384
|
if (info.done) {
|
|
427
385
|
// Assign the result of the finished delegate to the temporary
|
|
428
386
|
// variable specified by delegate.resultName (see delegateYield).
|
|
429
|
-
context[delegate.resultName] = info.value;
|
|
387
|
+
context[delegate.resultName] = info.value;
|
|
388
|
+
|
|
389
|
+
// Resume execution at the desired location (see delegateYield).
|
|
390
|
+
context.next = delegate.nextLoc;
|
|
430
391
|
|
|
431
|
-
|
|
392
|
+
// If context.method was "throw" but the delegate handled the
|
|
432
393
|
// exception, let the outer generator proceed normally. If
|
|
433
394
|
// context.method was "next", forget context.arg since it has been
|
|
434
395
|
// "consumed" by the delegate iterator. If context.method was
|
|
435
396
|
// "return", allow the original .return call to continue in the
|
|
436
397
|
// outer generator.
|
|
437
|
-
|
|
438
398
|
if (context.method !== "return") {
|
|
439
399
|
context.method = "next";
|
|
440
400
|
context.arg = undefined$1;
|
|
@@ -442,54 +402,49 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
442
402
|
} else {
|
|
443
403
|
// Re-yield the result returned by the delegate method.
|
|
444
404
|
return info;
|
|
445
|
-
}
|
|
446
|
-
// the outer generator.
|
|
447
|
-
|
|
405
|
+
}
|
|
448
406
|
|
|
407
|
+
// The delegate iterator is finished, so forget it and continue with
|
|
408
|
+
// the outer generator.
|
|
449
409
|
context.delegate = null;
|
|
450
410
|
return ContinueSentinel;
|
|
451
|
-
}
|
|
452
|
-
// unified ._invoke helper method.
|
|
453
|
-
|
|
411
|
+
}
|
|
454
412
|
|
|
413
|
+
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
414
|
+
// unified ._invoke helper method.
|
|
455
415
|
defineIteratorMethods(Gp);
|
|
456
|
-
define(Gp, toStringTagSymbol, "Generator");
|
|
416
|
+
define(Gp, toStringTagSymbol, "Generator");
|
|
417
|
+
|
|
418
|
+
// A Generator should always return itself as the iterator object when the
|
|
457
419
|
// @@iterator function is called on it. Some browsers' implementations of the
|
|
458
420
|
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
459
421
|
// object to not be returned from this call. This ensures that doesn't happen.
|
|
460
422
|
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
461
|
-
|
|
462
423
|
define(Gp, iteratorSymbol, function () {
|
|
463
424
|
return this;
|
|
464
425
|
});
|
|
465
426
|
define(Gp, "toString", function () {
|
|
466
427
|
return "[object Generator]";
|
|
467
428
|
});
|
|
468
|
-
|
|
469
429
|
function pushTryEntry(locs) {
|
|
470
430
|
var entry = {
|
|
471
431
|
tryLoc: locs[0]
|
|
472
432
|
};
|
|
473
|
-
|
|
474
433
|
if (1 in locs) {
|
|
475
434
|
entry.catchLoc = locs[1];
|
|
476
435
|
}
|
|
477
|
-
|
|
478
436
|
if (2 in locs) {
|
|
479
437
|
entry.finallyLoc = locs[2];
|
|
480
438
|
entry.afterLoc = locs[3];
|
|
481
439
|
}
|
|
482
|
-
|
|
483
440
|
this.tryEntries.push(entry);
|
|
484
441
|
}
|
|
485
|
-
|
|
486
442
|
function resetTryEntry(entry) {
|
|
487
443
|
var record = entry.completion || {};
|
|
488
444
|
record.type = "normal";
|
|
489
445
|
delete record.arg;
|
|
490
446
|
entry.completion = record;
|
|
491
447
|
}
|
|
492
|
-
|
|
493
448
|
function Context(tryLocsList) {
|
|
494
449
|
// The root entry object (effectively a try statement without a catch
|
|
495
450
|
// or a finally block) gives us a place to store values thrown from
|
|
@@ -500,97 +455,84 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
500
455
|
tryLocsList.forEach(pushTryEntry, this);
|
|
501
456
|
this.reset(true);
|
|
502
457
|
}
|
|
503
|
-
|
|
504
458
|
exports.keys = function (object) {
|
|
505
459
|
var keys = [];
|
|
506
|
-
|
|
507
460
|
for (var key in object) {
|
|
508
461
|
keys.push(key);
|
|
509
462
|
}
|
|
463
|
+
keys.reverse();
|
|
510
464
|
|
|
511
|
-
|
|
465
|
+
// Rather than returning an object with a next method, we keep
|
|
512
466
|
// things simple and return the next function itself.
|
|
513
|
-
|
|
514
467
|
return function next() {
|
|
515
468
|
while (keys.length) {
|
|
516
469
|
var key = keys.pop();
|
|
517
|
-
|
|
518
470
|
if (key in object) {
|
|
519
471
|
next.value = key;
|
|
520
472
|
next.done = false;
|
|
521
473
|
return next;
|
|
522
474
|
}
|
|
523
|
-
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
// To avoid creating an additional object, we just hang the .value
|
|
524
478
|
// and .done properties off the next function object itself. This
|
|
525
479
|
// also ensures that the minifier will not anonymize the function.
|
|
526
|
-
|
|
527
|
-
|
|
528
480
|
next.done = true;
|
|
529
481
|
return next;
|
|
530
482
|
};
|
|
531
483
|
};
|
|
532
|
-
|
|
533
484
|
function values(iterable) {
|
|
534
485
|
if (iterable) {
|
|
535
486
|
var iteratorMethod = iterable[iteratorSymbol];
|
|
536
|
-
|
|
537
487
|
if (iteratorMethod) {
|
|
538
488
|
return iteratorMethod.call(iterable);
|
|
539
489
|
}
|
|
540
|
-
|
|
541
490
|
if (typeof iterable.next === "function") {
|
|
542
491
|
return iterable;
|
|
543
492
|
}
|
|
544
|
-
|
|
545
493
|
if (!isNaN(iterable.length)) {
|
|
546
494
|
var i = -1,
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
495
|
+
next = function next() {
|
|
496
|
+
while (++i < iterable.length) {
|
|
497
|
+
if (hasOwn.call(iterable, i)) {
|
|
498
|
+
next.value = iterable[i];
|
|
499
|
+
next.done = false;
|
|
500
|
+
return next;
|
|
501
|
+
}
|
|
553
502
|
}
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
return next;
|
|
559
|
-
};
|
|
560
|
-
|
|
503
|
+
next.value = undefined$1;
|
|
504
|
+
next.done = true;
|
|
505
|
+
return next;
|
|
506
|
+
};
|
|
561
507
|
return next.next = next;
|
|
562
508
|
}
|
|
563
|
-
}
|
|
564
|
-
|
|
509
|
+
}
|
|
565
510
|
|
|
511
|
+
// Return an iterator with no values.
|
|
566
512
|
return {
|
|
567
513
|
next: doneResult
|
|
568
514
|
};
|
|
569
515
|
}
|
|
570
|
-
|
|
571
516
|
exports.values = values;
|
|
572
|
-
|
|
573
517
|
function doneResult() {
|
|
574
518
|
return {
|
|
575
519
|
value: undefined$1,
|
|
576
520
|
done: true
|
|
577
521
|
};
|
|
578
522
|
}
|
|
579
|
-
|
|
580
523
|
Context.prototype = {
|
|
581
524
|
constructor: Context,
|
|
582
525
|
reset: function reset(skipTempReset) {
|
|
583
526
|
this.prev = 0;
|
|
584
|
-
this.next = 0;
|
|
527
|
+
this.next = 0;
|
|
528
|
+
// Resetting context._sent for legacy support of Babel's
|
|
585
529
|
// function.sent implementation.
|
|
586
|
-
|
|
587
530
|
this.sent = this._sent = undefined$1;
|
|
588
531
|
this.done = false;
|
|
589
532
|
this.delegate = null;
|
|
590
533
|
this.method = "next";
|
|
591
534
|
this.arg = undefined$1;
|
|
592
535
|
this.tryEntries.forEach(resetTryEntry);
|
|
593
|
-
|
|
594
536
|
if (!skipTempReset) {
|
|
595
537
|
for (var name in this) {
|
|
596
538
|
// Not sure about the optimal order of these conditions:
|
|
@@ -604,50 +546,40 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
604
546
|
this.done = true;
|
|
605
547
|
var rootEntry = this.tryEntries[0];
|
|
606
548
|
var rootRecord = rootEntry.completion;
|
|
607
|
-
|
|
608
549
|
if (rootRecord.type === "throw") {
|
|
609
550
|
throw rootRecord.arg;
|
|
610
551
|
}
|
|
611
|
-
|
|
612
552
|
return this.rval;
|
|
613
553
|
},
|
|
614
554
|
dispatchException: function dispatchException(exception) {
|
|
615
555
|
if (this.done) {
|
|
616
556
|
throw exception;
|
|
617
557
|
}
|
|
618
|
-
|
|
619
558
|
var context = this;
|
|
620
|
-
|
|
621
559
|
function handle(loc, caught) {
|
|
622
560
|
record.type = "throw";
|
|
623
561
|
record.arg = exception;
|
|
624
562
|
context.next = loc;
|
|
625
|
-
|
|
626
563
|
if (caught) {
|
|
627
564
|
// If the dispatched exception was caught by a catch block,
|
|
628
565
|
// then let that catch block handle the exception normally.
|
|
629
566
|
context.method = "next";
|
|
630
567
|
context.arg = undefined$1;
|
|
631
568
|
}
|
|
632
|
-
|
|
633
569
|
return !!caught;
|
|
634
570
|
}
|
|
635
|
-
|
|
636
571
|
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
637
572
|
var entry = this.tryEntries[i];
|
|
638
573
|
var record = entry.completion;
|
|
639
|
-
|
|
640
574
|
if (entry.tryLoc === "root") {
|
|
641
575
|
// Exception thrown outside of any try block that could handle
|
|
642
576
|
// it, so set the completion value of the entire function to
|
|
643
577
|
// throw the exception.
|
|
644
578
|
return handle("end");
|
|
645
579
|
}
|
|
646
|
-
|
|
647
580
|
if (entry.tryLoc <= this.prev) {
|
|
648
581
|
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
649
582
|
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
650
|
-
|
|
651
583
|
if (hasCatch && hasFinally) {
|
|
652
584
|
if (this.prev < entry.catchLoc) {
|
|
653
585
|
return handle(entry.catchLoc, true);
|
|
@@ -671,36 +603,30 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
671
603
|
abrupt: function abrupt(type, arg) {
|
|
672
604
|
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
673
605
|
var entry = this.tryEntries[i];
|
|
674
|
-
|
|
675
606
|
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
676
607
|
var finallyEntry = entry;
|
|
677
608
|
break;
|
|
678
609
|
}
|
|
679
610
|
}
|
|
680
|
-
|
|
681
611
|
if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
|
|
682
612
|
// Ignore the finally entry if control is not jumping to a
|
|
683
613
|
// location outside the try/catch block.
|
|
684
614
|
finallyEntry = null;
|
|
685
615
|
}
|
|
686
|
-
|
|
687
616
|
var record = finallyEntry ? finallyEntry.completion : {};
|
|
688
617
|
record.type = type;
|
|
689
618
|
record.arg = arg;
|
|
690
|
-
|
|
691
619
|
if (finallyEntry) {
|
|
692
620
|
this.method = "next";
|
|
693
621
|
this.next = finallyEntry.finallyLoc;
|
|
694
622
|
return ContinueSentinel;
|
|
695
623
|
}
|
|
696
|
-
|
|
697
624
|
return this.complete(record);
|
|
698
625
|
},
|
|
699
626
|
complete: function complete(record, afterLoc) {
|
|
700
627
|
if (record.type === "throw") {
|
|
701
628
|
throw record.arg;
|
|
702
629
|
}
|
|
703
|
-
|
|
704
630
|
if (record.type === "break" || record.type === "continue") {
|
|
705
631
|
this.next = record.arg;
|
|
706
632
|
} else if (record.type === "return") {
|
|
@@ -710,13 +636,11 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
710
636
|
} else if (record.type === "normal" && afterLoc) {
|
|
711
637
|
this.next = afterLoc;
|
|
712
638
|
}
|
|
713
|
-
|
|
714
639
|
return ContinueSentinel;
|
|
715
640
|
},
|
|
716
641
|
finish: function finish(finallyLoc) {
|
|
717
642
|
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
718
643
|
var entry = this.tryEntries[i];
|
|
719
|
-
|
|
720
644
|
if (entry.finallyLoc === finallyLoc) {
|
|
721
645
|
this.complete(entry.completion, entry.afterLoc);
|
|
722
646
|
resetTryEntry(entry);
|
|
@@ -727,21 +651,18 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
727
651
|
"catch": function _catch(tryLoc) {
|
|
728
652
|
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
729
653
|
var entry = this.tryEntries[i];
|
|
730
|
-
|
|
731
654
|
if (entry.tryLoc === tryLoc) {
|
|
732
655
|
var record = entry.completion;
|
|
733
|
-
|
|
734
656
|
if (record.type === "throw") {
|
|
735
657
|
var thrown = record.arg;
|
|
736
658
|
resetTryEntry(entry);
|
|
737
659
|
}
|
|
738
|
-
|
|
739
660
|
return thrown;
|
|
740
661
|
}
|
|
741
|
-
}
|
|
742
|
-
// argument that corresponds to a known catch block.
|
|
743
|
-
|
|
662
|
+
}
|
|
744
663
|
|
|
664
|
+
// The context.catch method must only be called with a location
|
|
665
|
+
// argument that corresponds to a known catch block.
|
|
745
666
|
throw new Error("illegal catch attempt");
|
|
746
667
|
},
|
|
747
668
|
delegateYield: function delegateYield(iterable, resultName, nextLoc) {
|
|
@@ -750,27 +671,26 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
750
671
|
resultName: resultName,
|
|
751
672
|
nextLoc: nextLoc
|
|
752
673
|
};
|
|
753
|
-
|
|
754
674
|
if (this.method === "next") {
|
|
755
675
|
// Deliberately forget the last sent value so that we don't
|
|
756
676
|
// accidentally pass it on to the delegate.
|
|
757
677
|
this.arg = undefined$1;
|
|
758
678
|
}
|
|
759
|
-
|
|
760
679
|
return ContinueSentinel;
|
|
761
680
|
}
|
|
762
|
-
};
|
|
681
|
+
};
|
|
682
|
+
|
|
683
|
+
// Regardless of whether this script is executing as a CommonJS module
|
|
763
684
|
// or not, return the runtime object so that we can declare the variable
|
|
764
685
|
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
765
686
|
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
766
|
-
|
|
767
687
|
return exports;
|
|
768
|
-
}(
|
|
688
|
+
}(
|
|
689
|
+
// If this script is executing as a CommonJS module, use module.exports
|
|
769
690
|
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
770
691
|
// object. Either way, the resulting object will be used to initialize
|
|
771
692
|
// the regeneratorRuntime variable at the top of this file.
|
|
772
693
|
module.exports );
|
|
773
|
-
|
|
774
694
|
try {
|
|
775
695
|
regeneratorRuntime = runtime;
|
|
776
696
|
} catch (accidentalStrictMode) {
|
|
@@ -796,7 +716,6 @@ var DEFAULT_HOST = 'https://studio.plasmic.app';
|
|
|
796
716
|
function executePlasmicDataOp(_x, _x2) {
|
|
797
717
|
return _executePlasmicDataOp2.apply(this, arguments);
|
|
798
718
|
}
|
|
799
|
-
|
|
800
719
|
function _executePlasmicDataOp2() {
|
|
801
720
|
_executePlasmicDataOp2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(op, opts) {
|
|
802
721
|
var func;
|
|
@@ -807,10 +726,8 @@ function _executePlasmicDataOp2() {
|
|
|
807
726
|
func = getConfig('__PLASMIC_EXECUTE_DATA_OP', _executePlasmicDataOp);
|
|
808
727
|
_context.next = 3;
|
|
809
728
|
return func(op, opts);
|
|
810
|
-
|
|
811
729
|
case 3:
|
|
812
730
|
return _context.abrupt("return", _context.sent);
|
|
813
|
-
|
|
814
731
|
case 4:
|
|
815
732
|
case "end":
|
|
816
733
|
return _context.stop();
|
|
@@ -820,15 +737,12 @@ function _executePlasmicDataOp2() {
|
|
|
820
737
|
}));
|
|
821
738
|
return _executePlasmicDataOp2.apply(this, arguments);
|
|
822
739
|
}
|
|
823
|
-
|
|
824
740
|
function _executePlasmicDataOp(_x3, _x4) {
|
|
825
741
|
return _executePlasmicDataOp3.apply(this, arguments);
|
|
826
742
|
}
|
|
827
|
-
|
|
828
743
|
function _executePlasmicDataOp3() {
|
|
829
744
|
_executePlasmicDataOp3 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(op, opts) {
|
|
830
745
|
var _op$userArgs;
|
|
831
|
-
|
|
832
746
|
var host, url, resp, text;
|
|
833
747
|
return runtime_1.wrap(function _callee2$(_context2) {
|
|
834
748
|
while (1) {
|
|
@@ -850,29 +764,22 @@ function _executePlasmicDataOp3() {
|
|
|
850
764
|
paginate: opts == null ? void 0 : opts.paginate
|
|
851
765
|
})
|
|
852
766
|
});
|
|
853
|
-
|
|
854
767
|
case 4:
|
|
855
768
|
resp = _context2.sent;
|
|
856
|
-
|
|
857
769
|
if (!(resp.status !== 200)) {
|
|
858
770
|
_context2.next = 10;
|
|
859
771
|
break;
|
|
860
772
|
}
|
|
861
|
-
|
|
862
773
|
_context2.next = 8;
|
|
863
774
|
return resp.text();
|
|
864
|
-
|
|
865
775
|
case 8:
|
|
866
776
|
text = _context2.sent;
|
|
867
777
|
throw new Error(text);
|
|
868
|
-
|
|
869
778
|
case 10:
|
|
870
779
|
_context2.next = 12;
|
|
871
780
|
return resp.json();
|
|
872
|
-
|
|
873
781
|
case 12:
|
|
874
782
|
return _context2.abrupt("return", _context2.sent);
|
|
875
|
-
|
|
876
783
|
case 13:
|
|
877
784
|
case "end":
|
|
878
785
|
return _context2.stop();
|
|
@@ -882,13 +789,11 @@ function _executePlasmicDataOp3() {
|
|
|
882
789
|
}));
|
|
883
790
|
return _executePlasmicDataOp3.apply(this, arguments);
|
|
884
791
|
}
|
|
885
|
-
|
|
886
792
|
function getConfig(key, defaultValue) {
|
|
887
793
|
if (typeof globalThis === 'undefined') {
|
|
888
794
|
return defaultValue;
|
|
889
795
|
} else {
|
|
890
796
|
var _globalThis$key;
|
|
891
|
-
|
|
892
797
|
return (_globalThis$key = globalThis[key]) != null ? _globalThis$key : defaultValue;
|
|
893
798
|
}
|
|
894
799
|
}
|
|
@@ -902,19 +807,15 @@ function swallow(f) {
|
|
|
902
807
|
}
|
|
903
808
|
function pick(obj) {
|
|
904
809
|
var res = {};
|
|
905
|
-
|
|
906
810
|
for (var _len = arguments.length, keys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
907
811
|
keys[_key - 1] = arguments[_key];
|
|
908
812
|
}
|
|
909
|
-
|
|
910
813
|
for (var _i = 0, _keys = keys; _i < _keys.length; _i++) {
|
|
911
814
|
var key = _keys[_i];
|
|
912
|
-
|
|
913
815
|
if (key in obj) {
|
|
914
816
|
res[key] = obj[key];
|
|
915
817
|
}
|
|
916
818
|
}
|
|
917
|
-
|
|
918
819
|
return res;
|
|
919
820
|
}
|
|
920
821
|
|
|
@@ -938,10 +839,8 @@ function usePlasmicDataOp(dataOp, opts) {
|
|
|
938
839
|
userAuthToken: ctx == null ? void 0 : ctx.userAuthToken,
|
|
939
840
|
paginate: opts == null ? void 0 : opts.paginate
|
|
940
841
|
});
|
|
941
|
-
|
|
942
842
|
case 2:
|
|
943
843
|
return _context.abrupt("return", _context.sent);
|
|
944
|
-
|
|
945
844
|
case 3:
|
|
946
845
|
case "end":
|
|
947
846
|
return _context.stop();
|
|
@@ -950,18 +849,17 @@ function usePlasmicDataOp(dataOp, opts) {
|
|
|
950
849
|
}, _callee);
|
|
951
850
|
})));
|
|
952
851
|
var data = res.data,
|
|
953
|
-
|
|
954
|
-
|
|
852
|
+
error = res.error,
|
|
853
|
+
isLoading = res.isLoading;
|
|
955
854
|
return React.useMemo(function () {
|
|
956
855
|
return _extends({}, data != null ? data : {}, pick(res, 'isLoading', 'error'));
|
|
957
856
|
}, [data, error, isLoading]);
|
|
958
857
|
}
|
|
959
858
|
function usePlasmicDataMutationOp(dataOp, opts) {
|
|
960
859
|
var _ref2 = dataOp != null ? dataOp : {},
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
860
|
+
sourceId = _ref2.sourceId,
|
|
861
|
+
opId = _ref2.opId,
|
|
862
|
+
userArgs = _ref2.userArgs;
|
|
965
863
|
var ctx = dataSourcesContext.usePlasmicDataSourceContext();
|
|
966
864
|
var userToken = ctx == null ? void 0 : ctx.userAuthToken;
|
|
967
865
|
return React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2() {
|
|
@@ -973,9 +871,7 @@ function usePlasmicDataMutationOp(dataOp, opts) {
|
|
|
973
871
|
_context2.next = 2;
|
|
974
872
|
break;
|
|
975
873
|
}
|
|
976
|
-
|
|
977
874
|
return _context2.abrupt("return", undefined);
|
|
978
|
-
|
|
979
875
|
case 2:
|
|
980
876
|
return _context2.abrupt("return", executePlasmicDataOp({
|
|
981
877
|
sourceId: sourceId,
|
|
@@ -984,7 +880,6 @@ function usePlasmicDataMutationOp(dataOp, opts) {
|
|
|
984
880
|
}, {
|
|
985
881
|
userAuthToken: userToken
|
|
986
882
|
}));
|
|
987
|
-
|
|
988
883
|
case 3:
|
|
989
884
|
case "end":
|
|
990
885
|
return _context2.stop();
|
|
@@ -996,12 +891,11 @@ function usePlasmicDataMutationOp(dataOp, opts) {
|
|
|
996
891
|
|
|
997
892
|
function Fetcher(props) {
|
|
998
893
|
var _children;
|
|
999
|
-
|
|
1000
894
|
var dataOp = props.dataOp,
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
895
|
+
children = props.children,
|
|
896
|
+
name = props.name,
|
|
897
|
+
pageIndex = props.pageIndex,
|
|
898
|
+
pageSize = props.pageSize;
|
|
1005
899
|
var data = usePlasmicDataOp(dataOp, _extends({}, !!pageIndex && !!pageSize && {
|
|
1006
900
|
paginate: {
|
|
1007
901
|
pageIndex: pageIndex,
|
|
@@ -1010,7 +904,6 @@ function Fetcher(props) {
|
|
|
1010
904
|
}));
|
|
1011
905
|
var $queries = React.useMemo(function () {
|
|
1012
906
|
var _extends2;
|
|
1013
|
-
|
|
1014
907
|
return _extends({}, props.queries, (_extends2 = {}, _extends2[name != null ? name : 'data'] = data, _extends2));
|
|
1015
908
|
}, [props.queries, name, data]);
|
|
1016
909
|
return (_children = children == null ? void 0 : children($queries)) != null ? _children : null;
|
|
@@ -1048,11 +941,11 @@ var FetcherMeta = {
|
|
|
1048
941
|
|
|
1049
942
|
function useDependencyAwareQuery(_ref) {
|
|
1050
943
|
var $queries = _ref.$queries,
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
944
|
+
getDataOp = _ref.getDataOp,
|
|
945
|
+
setDollarQueries = _ref.setDollarQueries,
|
|
946
|
+
name = _ref.name,
|
|
947
|
+
pageIndex = _ref.pageIndex,
|
|
948
|
+
pageSize = _ref.pageSize;
|
|
1056
949
|
var data = usePlasmicDataOp(swallow(getDataOp), _extends({}, !!pageIndex && !!pageSize && {
|
|
1057
950
|
paginate: {
|
|
1058
951
|
pageIndex: pageIndex,
|
|
@@ -1061,10 +954,8 @@ function useDependencyAwareQuery(_ref) {
|
|
|
1061
954
|
}));
|
|
1062
955
|
React.useEffect(function () {
|
|
1063
956
|
var finalName = name != null ? name : 'data';
|
|
1064
|
-
|
|
1065
957
|
if (!(finalName in $queries) || $queries[finalName] !== data) {
|
|
1066
958
|
var _extends2;
|
|
1067
|
-
|
|
1068
959
|
setDollarQueries(_extends({}, $queries, (_extends2 = {}, _extends2[finalName] = data, _extends2)));
|
|
1069
960
|
}
|
|
1070
961
|
}, [name, data, $queries, setDollarQueries]);
|