@plasmicpkgs/airtable 0.0.104 → 0.0.106

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