@plasmicpkgs/airtable 0.0.175 → 0.0.176

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.
@@ -4,6 +4,307 @@ import registerGlobalContext from '@plasmicapp/host/registerGlobalContext';
4
4
  import { usePlasmicQueryData } from '@plasmicapp/query';
5
5
  import React from 'react';
6
6
 
7
+ function _regeneratorRuntime() {
8
+ _regeneratorRuntime = function () {
9
+ return e;
10
+ };
11
+ var t,
12
+ e = {},
13
+ r = Object.prototype,
14
+ n = r.hasOwnProperty,
15
+ o = Object.defineProperty || function (t, e, r) {
16
+ t[e] = r.value;
17
+ },
18
+ i = "function" == typeof Symbol ? Symbol : {},
19
+ a = i.iterator || "@@iterator",
20
+ c = i.asyncIterator || "@@asyncIterator",
21
+ u = i.toStringTag || "@@toStringTag";
22
+ function define(t, e, r) {
23
+ return Object.defineProperty(t, e, {
24
+ value: r,
25
+ enumerable: !0,
26
+ configurable: !0,
27
+ writable: !0
28
+ }), t[e];
29
+ }
30
+ try {
31
+ define({}, "");
32
+ } catch (t) {
33
+ define = function (t, e, r) {
34
+ return t[e] = r;
35
+ };
36
+ }
37
+ function wrap(t, e, r, n) {
38
+ var i = e && e.prototype instanceof Generator ? e : Generator,
39
+ a = Object.create(i.prototype),
40
+ c = new Context(n || []);
41
+ return o(a, "_invoke", {
42
+ value: makeInvokeMethod(t, r, c)
43
+ }), a;
44
+ }
45
+ function tryCatch(t, e, r) {
46
+ try {
47
+ return {
48
+ type: "normal",
49
+ arg: t.call(e, r)
50
+ };
51
+ } catch (t) {
52
+ return {
53
+ type: "throw",
54
+ arg: t
55
+ };
56
+ }
57
+ }
58
+ e.wrap = wrap;
59
+ var h = "suspendedStart",
60
+ l = "suspendedYield",
61
+ f = "executing",
62
+ s = "completed",
63
+ y = {};
64
+ function Generator() {}
65
+ function GeneratorFunction() {}
66
+ function GeneratorFunctionPrototype() {}
67
+ var p = {};
68
+ define(p, a, function () {
69
+ return this;
70
+ });
71
+ var d = Object.getPrototypeOf,
72
+ v = d && d(d(values([])));
73
+ v && v !== r && n.call(v, a) && (p = v);
74
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
75
+ function defineIteratorMethods(t) {
76
+ ["next", "throw", "return"].forEach(function (e) {
77
+ define(t, e, function (t) {
78
+ return this._invoke(e, t);
79
+ });
80
+ });
81
+ }
82
+ function AsyncIterator(t, e) {
83
+ function invoke(r, o, i, a) {
84
+ var c = tryCatch(t[r], t, o);
85
+ if ("throw" !== c.type) {
86
+ var u = c.arg,
87
+ h = u.value;
88
+ return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
89
+ invoke("next", t, i, a);
90
+ }, function (t) {
91
+ invoke("throw", t, i, a);
92
+ }) : e.resolve(h).then(function (t) {
93
+ u.value = t, i(u);
94
+ }, function (t) {
95
+ return invoke("throw", t, i, a);
96
+ });
97
+ }
98
+ a(c.arg);
99
+ }
100
+ var r;
101
+ o(this, "_invoke", {
102
+ value: function (t, n) {
103
+ function callInvokeWithMethodAndArg() {
104
+ return new e(function (e, r) {
105
+ invoke(t, n, e, r);
106
+ });
107
+ }
108
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
109
+ }
110
+ });
111
+ }
112
+ function makeInvokeMethod(e, r, n) {
113
+ var o = h;
114
+ return function (i, a) {
115
+ if (o === f) throw new Error("Generator is already running");
116
+ if (o === s) {
117
+ if ("throw" === i) throw a;
118
+ return {
119
+ value: t,
120
+ done: !0
121
+ };
122
+ }
123
+ for (n.method = i, n.arg = a;;) {
124
+ var c = n.delegate;
125
+ if (c) {
126
+ var u = maybeInvokeDelegate(c, n);
127
+ if (u) {
128
+ if (u === y) continue;
129
+ return u;
130
+ }
131
+ }
132
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
133
+ if (o === h) throw o = s, n.arg;
134
+ n.dispatchException(n.arg);
135
+ } else "return" === n.method && n.abrupt("return", n.arg);
136
+ o = f;
137
+ var p = tryCatch(e, r, n);
138
+ if ("normal" === p.type) {
139
+ if (o = n.done ? s : l, p.arg === y) continue;
140
+ return {
141
+ value: p.arg,
142
+ done: n.done
143
+ };
144
+ }
145
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
146
+ }
147
+ };
148
+ }
149
+ function maybeInvokeDelegate(e, r) {
150
+ var n = r.method,
151
+ o = e.iterator[n];
152
+ if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
153
+ var i = tryCatch(o, e.iterator, r.arg);
154
+ if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
155
+ var a = i.arg;
156
+ return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
157
+ }
158
+ function pushTryEntry(t) {
159
+ var e = {
160
+ tryLoc: t[0]
161
+ };
162
+ 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
163
+ }
164
+ function resetTryEntry(t) {
165
+ var e = t.completion || {};
166
+ e.type = "normal", delete e.arg, t.completion = e;
167
+ }
168
+ function Context(t) {
169
+ this.tryEntries = [{
170
+ tryLoc: "root"
171
+ }], t.forEach(pushTryEntry, this), this.reset(!0);
172
+ }
173
+ function values(e) {
174
+ if (e || "" === e) {
175
+ var r = e[a];
176
+ if (r) return r.call(e);
177
+ if ("function" == typeof e.next) return e;
178
+ if (!isNaN(e.length)) {
179
+ var o = -1,
180
+ i = function next() {
181
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
182
+ return next.value = t, next.done = !0, next;
183
+ };
184
+ return i.next = i;
185
+ }
186
+ }
187
+ throw new TypeError(typeof e + " is not iterable");
188
+ }
189
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
190
+ value: GeneratorFunctionPrototype,
191
+ configurable: !0
192
+ }), o(GeneratorFunctionPrototype, "constructor", {
193
+ value: GeneratorFunction,
194
+ configurable: !0
195
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
196
+ var e = "function" == typeof t && t.constructor;
197
+ return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
198
+ }, e.mark = function (t) {
199
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
200
+ }, e.awrap = function (t) {
201
+ return {
202
+ __await: t
203
+ };
204
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
205
+ return this;
206
+ }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
207
+ void 0 === i && (i = Promise);
208
+ var a = new AsyncIterator(wrap(t, r, n, o), i);
209
+ return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
210
+ return t.done ? t.value : a.next();
211
+ });
212
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
213
+ return this;
214
+ }), define(g, "toString", function () {
215
+ return "[object Generator]";
216
+ }), e.keys = function (t) {
217
+ var e = Object(t),
218
+ r = [];
219
+ for (var n in e) r.push(n);
220
+ return r.reverse(), function next() {
221
+ for (; r.length;) {
222
+ var t = r.pop();
223
+ if (t in e) return next.value = t, next.done = !1, next;
224
+ }
225
+ return next.done = !0, next;
226
+ };
227
+ }, e.values = values, Context.prototype = {
228
+ constructor: Context,
229
+ reset: function (e) {
230
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
231
+ },
232
+ stop: function () {
233
+ this.done = !0;
234
+ var t = this.tryEntries[0].completion;
235
+ if ("throw" === t.type) throw t.arg;
236
+ return this.rval;
237
+ },
238
+ dispatchException: function (e) {
239
+ if (this.done) throw e;
240
+ var r = this;
241
+ function handle(n, o) {
242
+ return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
243
+ }
244
+ for (var o = this.tryEntries.length - 1; o >= 0; --o) {
245
+ var i = this.tryEntries[o],
246
+ a = i.completion;
247
+ if ("root" === i.tryLoc) return handle("end");
248
+ if (i.tryLoc <= this.prev) {
249
+ var c = n.call(i, "catchLoc"),
250
+ u = n.call(i, "finallyLoc");
251
+ if (c && u) {
252
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
253
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
254
+ } else if (c) {
255
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
256
+ } else {
257
+ if (!u) throw new Error("try statement without catch or finally");
258
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
259
+ }
260
+ }
261
+ }
262
+ },
263
+ abrupt: function (t, e) {
264
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
265
+ var o = this.tryEntries[r];
266
+ if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
267
+ var i = o;
268
+ break;
269
+ }
270
+ }
271
+ i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
272
+ var a = i ? i.completion : {};
273
+ return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
274
+ },
275
+ complete: function (t, e) {
276
+ if ("throw" === t.type) throw t.arg;
277
+ return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
278
+ },
279
+ finish: function (t) {
280
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
281
+ var r = this.tryEntries[e];
282
+ if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
283
+ }
284
+ },
285
+ catch: function (t) {
286
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
287
+ var r = this.tryEntries[e];
288
+ if (r.tryLoc === t) {
289
+ var n = r.completion;
290
+ if ("throw" === n.type) {
291
+ var o = n.arg;
292
+ resetTryEntry(r);
293
+ }
294
+ return o;
295
+ }
296
+ }
297
+ throw new Error("illegal catch attempt");
298
+ },
299
+ delegateYield: function (e, r, n) {
300
+ return this.delegate = {
301
+ iterator: values(e),
302
+ resultName: r,
303
+ nextLoc: n
304
+ }, "next" === this.method && (this.arg = t), y;
305
+ }
306
+ }, e;
307
+ }
7
308
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
8
309
  try {
9
310
  var info = gen[key](arg);
@@ -61,664 +362,6 @@ function _objectWithoutPropertiesLoose(source, excluded) {
61
362
  return target;
62
363
  }
63
364
 
64
- function createCommonjsModule(fn, module) {
65
- return module = { exports: {} }, fn(module, module.exports), module.exports;
66
- }
67
-
68
- var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
69
- /**
70
- * Copyright (c) 2014-present, Facebook, Inc.
71
- *
72
- * This source code is licensed under the MIT license found in the
73
- * LICENSE file in the root directory of this source tree.
74
- */
75
-
76
- var runtime = function (exports) {
77
-
78
- var Op = Object.prototype;
79
- var hasOwn = Op.hasOwnProperty;
80
- var undefined$1; // More compressible than void 0.
81
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
82
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
83
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
84
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
85
- function define(obj, key, value) {
86
- Object.defineProperty(obj, key, {
87
- value: value,
88
- enumerable: true,
89
- configurable: true,
90
- writable: true
91
- });
92
- return obj[key];
93
- }
94
- try {
95
- // IE 8 has a broken Object.defineProperty that only works on DOM objects.
96
- define({}, "");
97
- } catch (err) {
98
- define = function define(obj, key, value) {
99
- return obj[key] = value;
100
- };
101
- }
102
- function wrap(innerFn, outerFn, self, tryLocsList) {
103
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
104
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
105
- var generator = Object.create(protoGenerator.prototype);
106
- var context = new Context(tryLocsList || []);
107
-
108
- // The ._invoke method unifies the implementations of the .next,
109
- // .throw, and .return methods.
110
- generator._invoke = makeInvokeMethod(innerFn, self, context);
111
- return generator;
112
- }
113
- exports.wrap = wrap;
114
-
115
- // Try/catch helper to minimize deoptimizations. Returns a completion
116
- // record like context.tryEntries[i].completion. This interface could
117
- // have been (and was previously) designed to take a closure to be
118
- // invoked without arguments, but in all the cases we care about we
119
- // already have an existing method we want to call, so there's no need
120
- // to create a new function object. We can even get away with assuming
121
- // the method takes exactly one argument, since that happens to be true
122
- // in every case, so we don't have to touch the arguments object. The
123
- // only additional allocation required is the completion record, which
124
- // has a stable shape and so hopefully should be cheap to allocate.
125
- function tryCatch(fn, obj, arg) {
126
- try {
127
- return {
128
- type: "normal",
129
- arg: fn.call(obj, arg)
130
- };
131
- } catch (err) {
132
- return {
133
- type: "throw",
134
- arg: err
135
- };
136
- }
137
- }
138
- var GenStateSuspendedStart = "suspendedStart";
139
- var GenStateSuspendedYield = "suspendedYield";
140
- var GenStateExecuting = "executing";
141
- var GenStateCompleted = "completed";
142
-
143
- // Returning this object from the innerFn has the same effect as
144
- // breaking out of the dispatch switch statement.
145
- var ContinueSentinel = {};
146
-
147
- // Dummy constructor functions that we use as the .constructor and
148
- // .constructor.prototype properties for functions that return Generator
149
- // objects. For full spec compliance, you may wish to configure your
150
- // minifier not to mangle the names of these two functions.
151
- function Generator() {}
152
- function GeneratorFunction() {}
153
- function GeneratorFunctionPrototype() {}
154
-
155
- // This is a polyfill for %IteratorPrototype% for environments that
156
- // don't natively support it.
157
- var IteratorPrototype = {};
158
- define(IteratorPrototype, iteratorSymbol, function () {
159
- return this;
160
- });
161
- var getProto = Object.getPrototypeOf;
162
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
163
- if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
164
- // This environment has a native %IteratorPrototype%; use it instead
165
- // of the polyfill.
166
- IteratorPrototype = NativeIteratorPrototype;
167
- }
168
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
169
- GeneratorFunction.prototype = GeneratorFunctionPrototype;
170
- define(Gp, "constructor", GeneratorFunctionPrototype);
171
- define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
172
- GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction");
173
-
174
- // Helper for defining the .next, .throw, and .return methods of the
175
- // Iterator interface in terms of a single ._invoke method.
176
- function defineIteratorMethods(prototype) {
177
- ["next", "throw", "return"].forEach(function (method) {
178
- define(prototype, method, function (arg) {
179
- return this._invoke(method, arg);
180
- });
181
- });
182
- }
183
- exports.isGeneratorFunction = function (genFun) {
184
- var ctor = typeof genFun === "function" && genFun.constructor;
185
- return ctor ? ctor === GeneratorFunction ||
186
- // For the native GeneratorFunction constructor, the best we can
187
- // do is to check its .name property.
188
- (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
189
- };
190
- exports.mark = function (genFun) {
191
- if (Object.setPrototypeOf) {
192
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
193
- } else {
194
- genFun.__proto__ = GeneratorFunctionPrototype;
195
- define(genFun, toStringTagSymbol, "GeneratorFunction");
196
- }
197
- genFun.prototype = Object.create(Gp);
198
- return genFun;
199
- };
200
-
201
- // Within the body of any async function, `await x` is transformed to
202
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
203
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
204
- // meant to be awaited.
205
- exports.awrap = function (arg) {
206
- return {
207
- __await: arg
208
- };
209
- };
210
- function AsyncIterator(generator, PromiseImpl) {
211
- function invoke(method, arg, resolve, reject) {
212
- var record = tryCatch(generator[method], generator, arg);
213
- if (record.type === "throw") {
214
- reject(record.arg);
215
- } else {
216
- var result = record.arg;
217
- var value = result.value;
218
- if (value && typeof value === "object" && hasOwn.call(value, "__await")) {
219
- return PromiseImpl.resolve(value.__await).then(function (value) {
220
- invoke("next", value, resolve, reject);
221
- }, function (err) {
222
- invoke("throw", err, resolve, reject);
223
- });
224
- }
225
- return PromiseImpl.resolve(value).then(function (unwrapped) {
226
- // When a yielded Promise is resolved, its final value becomes
227
- // the .value of the Promise<{value,done}> result for the
228
- // current iteration.
229
- result.value = unwrapped;
230
- resolve(result);
231
- }, function (error) {
232
- // If a rejected Promise was yielded, throw the rejection back
233
- // into the async generator function so it can be handled there.
234
- return invoke("throw", error, resolve, reject);
235
- });
236
- }
237
- }
238
- var previousPromise;
239
- function enqueue(method, arg) {
240
- function callInvokeWithMethodAndArg() {
241
- return new PromiseImpl(function (resolve, reject) {
242
- invoke(method, arg, resolve, reject);
243
- });
244
- }
245
- return previousPromise =
246
- // If enqueue has been called before, then we want to wait until
247
- // all previous Promises have been resolved before calling invoke,
248
- // so that results are always delivered in the correct order. If
249
- // enqueue has not been called before, then it is important to
250
- // call invoke immediately, without waiting on a callback to fire,
251
- // so that the async generator function has the opportunity to do
252
- // any necessary setup in a predictable way. This predictability
253
- // is why the Promise constructor synchronously invokes its
254
- // executor callback, and why async functions synchronously
255
- // execute code before the first await. Since we implement simple
256
- // async functions in terms of async generators, it is especially
257
- // important to get this right, even though it requires care.
258
- previousPromise ? previousPromise.then(callInvokeWithMethodAndArg,
259
- // Avoid propagating failures to Promises returned by later
260
- // invocations of the iterator.
261
- callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
262
- }
263
-
264
- // Define the unified helper method that is used to implement .next,
265
- // .throw, and .return (see defineIteratorMethods).
266
- this._invoke = enqueue;
267
- }
268
- defineIteratorMethods(AsyncIterator.prototype);
269
- define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
270
- return this;
271
- });
272
- exports.AsyncIterator = AsyncIterator;
273
-
274
- // Note that simple async functions are implemented on top of
275
- // AsyncIterator objects; they just return a Promise for the value of
276
- // the final result produced by the iterator.
277
- exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
278
- if (PromiseImpl === void 0) PromiseImpl = Promise;
279
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
280
- return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
281
- : iter.next().then(function (result) {
282
- return result.done ? result.value : iter.next();
283
- });
284
- };
285
- function makeInvokeMethod(innerFn, self, context) {
286
- var state = GenStateSuspendedStart;
287
- return function invoke(method, arg) {
288
- if (state === GenStateExecuting) {
289
- throw new Error("Generator is already running");
290
- }
291
- if (state === GenStateCompleted) {
292
- if (method === "throw") {
293
- throw arg;
294
- }
295
-
296
- // Be forgiving, per 25.3.3.3.3 of the spec:
297
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
298
- return doneResult();
299
- }
300
- context.method = method;
301
- context.arg = arg;
302
- while (true) {
303
- var delegate = context.delegate;
304
- if (delegate) {
305
- var delegateResult = maybeInvokeDelegate(delegate, context);
306
- if (delegateResult) {
307
- if (delegateResult === ContinueSentinel) continue;
308
- return delegateResult;
309
- }
310
- }
311
- if (context.method === "next") {
312
- // Setting context._sent for legacy support of Babel's
313
- // function.sent implementation.
314
- context.sent = context._sent = context.arg;
315
- } else if (context.method === "throw") {
316
- if (state === GenStateSuspendedStart) {
317
- state = GenStateCompleted;
318
- throw context.arg;
319
- }
320
- context.dispatchException(context.arg);
321
- } else if (context.method === "return") {
322
- context.abrupt("return", context.arg);
323
- }
324
- state = GenStateExecuting;
325
- var record = tryCatch(innerFn, self, context);
326
- if (record.type === "normal") {
327
- // If an exception is thrown from innerFn, we leave state ===
328
- // GenStateExecuting and loop back for another invocation.
329
- state = context.done ? GenStateCompleted : GenStateSuspendedYield;
330
- if (record.arg === ContinueSentinel) {
331
- continue;
332
- }
333
- return {
334
- value: record.arg,
335
- done: context.done
336
- };
337
- } else if (record.type === "throw") {
338
- state = GenStateCompleted;
339
- // Dispatch the exception by looping back around to the
340
- // context.dispatchException(context.arg) call above.
341
- context.method = "throw";
342
- context.arg = record.arg;
343
- }
344
- }
345
- };
346
- }
347
-
348
- // Call delegate.iterator[context.method](context.arg) and handle the
349
- // result, either by returning a { value, done } result from the
350
- // delegate iterator, or by modifying context.method and context.arg,
351
- // setting context.delegate to null, and returning the ContinueSentinel.
352
- function maybeInvokeDelegate(delegate, context) {
353
- var method = delegate.iterator[context.method];
354
- if (method === undefined$1) {
355
- // A .throw or .return when the delegate iterator has no .throw
356
- // method always terminates the yield* loop.
357
- context.delegate = null;
358
- if (context.method === "throw") {
359
- // Note: ["return"] must be used for ES3 parsing compatibility.
360
- if (delegate.iterator["return"]) {
361
- // If the delegate iterator has a return method, give it a
362
- // chance to clean up.
363
- context.method = "return";
364
- context.arg = undefined$1;
365
- maybeInvokeDelegate(delegate, context);
366
- if (context.method === "throw") {
367
- // If maybeInvokeDelegate(context) changed context.method from
368
- // "return" to "throw", let that override the TypeError below.
369
- return ContinueSentinel;
370
- }
371
- }
372
- context.method = "throw";
373
- context.arg = new TypeError("The iterator does not provide a 'throw' method");
374
- }
375
- return ContinueSentinel;
376
- }
377
- var record = tryCatch(method, delegate.iterator, context.arg);
378
- if (record.type === "throw") {
379
- context.method = "throw";
380
- context.arg = record.arg;
381
- context.delegate = null;
382
- return ContinueSentinel;
383
- }
384
- var info = record.arg;
385
- if (!info) {
386
- context.method = "throw";
387
- context.arg = new TypeError("iterator result is not an object");
388
- context.delegate = null;
389
- return ContinueSentinel;
390
- }
391
- if (info.done) {
392
- // Assign the result of the finished delegate to the temporary
393
- // variable specified by delegate.resultName (see delegateYield).
394
- context[delegate.resultName] = info.value;
395
-
396
- // Resume execution at the desired location (see delegateYield).
397
- context.next = delegate.nextLoc;
398
-
399
- // If context.method was "throw" but the delegate handled the
400
- // exception, let the outer generator proceed normally. If
401
- // context.method was "next", forget context.arg since it has been
402
- // "consumed" by the delegate iterator. If context.method was
403
- // "return", allow the original .return call to continue in the
404
- // outer generator.
405
- if (context.method !== "return") {
406
- context.method = "next";
407
- context.arg = undefined$1;
408
- }
409
- } else {
410
- // Re-yield the result returned by the delegate method.
411
- return info;
412
- }
413
-
414
- // The delegate iterator is finished, so forget it and continue with
415
- // the outer generator.
416
- context.delegate = null;
417
- return ContinueSentinel;
418
- }
419
-
420
- // Define Generator.prototype.{next,throw,return} in terms of the
421
- // unified ._invoke helper method.
422
- defineIteratorMethods(Gp);
423
- define(Gp, toStringTagSymbol, "Generator");
424
-
425
- // A Generator should always return itself as the iterator object when the
426
- // @@iterator function is called on it. Some browsers' implementations of the
427
- // iterator prototype chain incorrectly implement this, causing the Generator
428
- // object to not be returned from this call. This ensures that doesn't happen.
429
- // See https://github.com/facebook/regenerator/issues/274 for more details.
430
- define(Gp, iteratorSymbol, function () {
431
- return this;
432
- });
433
- define(Gp, "toString", function () {
434
- return "[object Generator]";
435
- });
436
- function pushTryEntry(locs) {
437
- var entry = {
438
- tryLoc: locs[0]
439
- };
440
- if (1 in locs) {
441
- entry.catchLoc = locs[1];
442
- }
443
- if (2 in locs) {
444
- entry.finallyLoc = locs[2];
445
- entry.afterLoc = locs[3];
446
- }
447
- this.tryEntries.push(entry);
448
- }
449
- function resetTryEntry(entry) {
450
- var record = entry.completion || {};
451
- record.type = "normal";
452
- delete record.arg;
453
- entry.completion = record;
454
- }
455
- function Context(tryLocsList) {
456
- // The root entry object (effectively a try statement without a catch
457
- // or a finally block) gives us a place to store values thrown from
458
- // locations where there is no enclosing try statement.
459
- this.tryEntries = [{
460
- tryLoc: "root"
461
- }];
462
- tryLocsList.forEach(pushTryEntry, this);
463
- this.reset(true);
464
- }
465
- exports.keys = function (object) {
466
- var keys = [];
467
- for (var key in object) {
468
- keys.push(key);
469
- }
470
- keys.reverse();
471
-
472
- // Rather than returning an object with a next method, we keep
473
- // things simple and return the next function itself.
474
- return function next() {
475
- while (keys.length) {
476
- var key = keys.pop();
477
- if (key in object) {
478
- next.value = key;
479
- next.done = false;
480
- return next;
481
- }
482
- }
483
-
484
- // To avoid creating an additional object, we just hang the .value
485
- // and .done properties off the next function object itself. This
486
- // also ensures that the minifier will not anonymize the function.
487
- next.done = true;
488
- return next;
489
- };
490
- };
491
- function values(iterable) {
492
- if (iterable) {
493
- var iteratorMethod = iterable[iteratorSymbol];
494
- if (iteratorMethod) {
495
- return iteratorMethod.call(iterable);
496
- }
497
- if (typeof iterable.next === "function") {
498
- return iterable;
499
- }
500
- if (!isNaN(iterable.length)) {
501
- var i = -1,
502
- next = function next() {
503
- while (++i < iterable.length) {
504
- if (hasOwn.call(iterable, i)) {
505
- next.value = iterable[i];
506
- next.done = false;
507
- return next;
508
- }
509
- }
510
- next.value = undefined$1;
511
- next.done = true;
512
- return next;
513
- };
514
- return next.next = next;
515
- }
516
- }
517
-
518
- // Return an iterator with no values.
519
- return {
520
- next: doneResult
521
- };
522
- }
523
- exports.values = values;
524
- function doneResult() {
525
- return {
526
- value: undefined$1,
527
- done: true
528
- };
529
- }
530
- Context.prototype = {
531
- constructor: Context,
532
- reset: function reset(skipTempReset) {
533
- this.prev = 0;
534
- this.next = 0;
535
- // Resetting context._sent for legacy support of Babel's
536
- // function.sent implementation.
537
- this.sent = this._sent = undefined$1;
538
- this.done = false;
539
- this.delegate = null;
540
- this.method = "next";
541
- this.arg = undefined$1;
542
- this.tryEntries.forEach(resetTryEntry);
543
- if (!skipTempReset) {
544
- for (var name in this) {
545
- // Not sure about the optimal order of these conditions:
546
- if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
547
- this[name] = undefined$1;
548
- }
549
- }
550
- }
551
- },
552
- stop: function stop() {
553
- this.done = true;
554
- var rootEntry = this.tryEntries[0];
555
- var rootRecord = rootEntry.completion;
556
- if (rootRecord.type === "throw") {
557
- throw rootRecord.arg;
558
- }
559
- return this.rval;
560
- },
561
- dispatchException: function dispatchException(exception) {
562
- if (this.done) {
563
- throw exception;
564
- }
565
- var context = this;
566
- function handle(loc, caught) {
567
- record.type = "throw";
568
- record.arg = exception;
569
- context.next = loc;
570
- if (caught) {
571
- // If the dispatched exception was caught by a catch block,
572
- // then let that catch block handle the exception normally.
573
- context.method = "next";
574
- context.arg = undefined$1;
575
- }
576
- return !!caught;
577
- }
578
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
579
- var entry = this.tryEntries[i];
580
- var record = entry.completion;
581
- if (entry.tryLoc === "root") {
582
- // Exception thrown outside of any try block that could handle
583
- // it, so set the completion value of the entire function to
584
- // throw the exception.
585
- return handle("end");
586
- }
587
- if (entry.tryLoc <= this.prev) {
588
- var hasCatch = hasOwn.call(entry, "catchLoc");
589
- var hasFinally = hasOwn.call(entry, "finallyLoc");
590
- if (hasCatch && hasFinally) {
591
- if (this.prev < entry.catchLoc) {
592
- return handle(entry.catchLoc, true);
593
- } else if (this.prev < entry.finallyLoc) {
594
- return handle(entry.finallyLoc);
595
- }
596
- } else if (hasCatch) {
597
- if (this.prev < entry.catchLoc) {
598
- return handle(entry.catchLoc, true);
599
- }
600
- } else if (hasFinally) {
601
- if (this.prev < entry.finallyLoc) {
602
- return handle(entry.finallyLoc);
603
- }
604
- } else {
605
- throw new Error("try statement without catch or finally");
606
- }
607
- }
608
- }
609
- },
610
- abrupt: function abrupt(type, arg) {
611
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
612
- var entry = this.tryEntries[i];
613
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
614
- var finallyEntry = entry;
615
- break;
616
- }
617
- }
618
- if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
619
- // Ignore the finally entry if control is not jumping to a
620
- // location outside the try/catch block.
621
- finallyEntry = null;
622
- }
623
- var record = finallyEntry ? finallyEntry.completion : {};
624
- record.type = type;
625
- record.arg = arg;
626
- if (finallyEntry) {
627
- this.method = "next";
628
- this.next = finallyEntry.finallyLoc;
629
- return ContinueSentinel;
630
- }
631
- return this.complete(record);
632
- },
633
- complete: function complete(record, afterLoc) {
634
- if (record.type === "throw") {
635
- throw record.arg;
636
- }
637
- if (record.type === "break" || record.type === "continue") {
638
- this.next = record.arg;
639
- } else if (record.type === "return") {
640
- this.rval = this.arg = record.arg;
641
- this.method = "return";
642
- this.next = "end";
643
- } else if (record.type === "normal" && afterLoc) {
644
- this.next = afterLoc;
645
- }
646
- return ContinueSentinel;
647
- },
648
- finish: function finish(finallyLoc) {
649
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
650
- var entry = this.tryEntries[i];
651
- if (entry.finallyLoc === finallyLoc) {
652
- this.complete(entry.completion, entry.afterLoc);
653
- resetTryEntry(entry);
654
- return ContinueSentinel;
655
- }
656
- }
657
- },
658
- "catch": function _catch(tryLoc) {
659
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
660
- var entry = this.tryEntries[i];
661
- if (entry.tryLoc === tryLoc) {
662
- var record = entry.completion;
663
- if (record.type === "throw") {
664
- var thrown = record.arg;
665
- resetTryEntry(entry);
666
- }
667
- return thrown;
668
- }
669
- }
670
-
671
- // The context.catch method must only be called with a location
672
- // argument that corresponds to a known catch block.
673
- throw new Error("illegal catch attempt");
674
- },
675
- delegateYield: function delegateYield(iterable, resultName, nextLoc) {
676
- this.delegate = {
677
- iterator: values(iterable),
678
- resultName: resultName,
679
- nextLoc: nextLoc
680
- };
681
- if (this.method === "next") {
682
- // Deliberately forget the last sent value so that we don't
683
- // accidentally pass it on to the delegate.
684
- this.arg = undefined$1;
685
- }
686
- return ContinueSentinel;
687
- }
688
- };
689
-
690
- // Regardless of whether this script is executing as a CommonJS module
691
- // or not, return the runtime object so that we can declare the variable
692
- // regeneratorRuntime in the outer scope, which allows this module to be
693
- // injected easily by `bin/regenerator --include-runtime script.js`.
694
- return exports;
695
- }(
696
- // If this script is executing as a CommonJS module, use module.exports
697
- // as the regeneratorRuntime namespace. Otherwise create a new empty
698
- // object. Either way, the resulting object will be used to initialize
699
- // the regeneratorRuntime variable at the top of this file.
700
- module.exports );
701
- try {
702
- regeneratorRuntime = runtime;
703
- } catch (accidentalStrictMode) {
704
- // This module should not be running in strict mode, so the above
705
- // assignment should always work unless something is misconfigured. Just
706
- // in case runtime.js accidentally runs in strict mode, in modern engines
707
- // we can explicitly access globalThis. In older engines we can escape
708
- // strict mode using a global Function call. This could conceivably fail
709
- // if a Content Security Policy forbids using Function, but in that case
710
- // the proper solution is to fix the accidental strict mode problem. If
711
- // you've misconfigured your bundler to force strict mode and applied a
712
- // CSP to forbid Function, and you're not willing to fix either of those
713
- // problems, please detail your unique predicament in a GitHub issue.
714
- if (typeof globalThis === "object") {
715
- globalThis.regeneratorRuntime = runtime;
716
- } else {
717
- Function("r", "regeneratorRuntime = r")(runtime);
718
- }
719
- }
720
- });
721
-
722
365
  var _excluded = ["table", "children"];
723
366
  var defaultHost = "https://studio.plasmic.app";
724
367
  var CredentialsContext = /*#__PURE__*/React.createContext(undefined);
@@ -730,45 +373,43 @@ function AirtableRecord(_ref) {
730
373
  var dataSourceId = credentialsContext && credentialsContext.id;
731
374
  var base = credentialsContext && credentialsContext.base;
732
375
  var host = credentialsContext && credentialsContext.host || defaultHost;
733
- var data = usePlasmicQueryData(JSON.stringify(["AirtableRecord", host, base, table, record, dataSourceId]), /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
376
+ var data = usePlasmicQueryData(JSON.stringify(["AirtableRecord", host, base, table, record, dataSourceId]), /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
734
377
  var pathname, url;
735
- return runtime_1.wrap(function _callee$(_context) {
736
- while (1) {
737
- switch (_context.prev = _context.next) {
738
- case 0:
739
- if (!(!base || !dataSourceId)) {
740
- _context.next = 2;
741
- break;
742
- }
743
- throw new Error("Missing Data Source. Please select a Data Source from the Airtable Credentials Provider");
744
- case 2:
745
- if (table) {
746
- _context.next = 4;
747
- break;
748
- }
749
- throw new Error("AirtableRecord is missing the table name");
750
- case 4:
751
- if (record) {
752
- _context.next = 6;
753
- break;
754
- }
755
- throw new Error("AirtableRecord is missing the record ID");
756
- case 6:
757
- pathname = "/" + base + "/" + table + "/" + record;
758
- url = host + "/api/v1/server-data/query?pathname=" + encodeURIComponent(pathname) + "&dataSourceId=" + dataSourceId;
759
- _context.next = 10;
760
- return fetch(url, {
761
- method: "GET"
762
- });
763
- case 10:
764
- _context.next = 12;
765
- return _context.sent.json();
766
- case 12:
767
- return _context.abrupt("return", _context.sent.fields);
768
- case 13:
769
- case "end":
770
- return _context.stop();
771
- }
378
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
379
+ while (1) switch (_context.prev = _context.next) {
380
+ case 0:
381
+ if (!(!base || !dataSourceId)) {
382
+ _context.next = 2;
383
+ break;
384
+ }
385
+ throw new Error("Missing Data Source. Please select a Data Source from the Airtable Credentials Provider");
386
+ case 2:
387
+ if (table) {
388
+ _context.next = 4;
389
+ break;
390
+ }
391
+ throw new Error("AirtableRecord is missing the table name");
392
+ case 4:
393
+ if (record) {
394
+ _context.next = 6;
395
+ break;
396
+ }
397
+ throw new Error("AirtableRecord is missing the record ID");
398
+ case 6:
399
+ pathname = "/" + base + "/" + table + "/" + record;
400
+ url = host + "/api/v1/server-data/query?pathname=" + encodeURIComponent(pathname) + "&dataSourceId=" + dataSourceId;
401
+ _context.next = 10;
402
+ return fetch(url, {
403
+ method: "GET"
404
+ });
405
+ case 10:
406
+ _context.next = 12;
407
+ return _context.sent.json();
408
+ case 12:
409
+ return _context.abrupt("return", _context.sent.fields);
410
+ case 13:
411
+ case "end":
412
+ return _context.stop();
772
413
  }
773
414
  }, _callee);
774
415
  })));
@@ -794,7 +435,7 @@ function AirtableRecordField(_ref3) {
794
435
  style = _ref3.style,
795
436
  setControlContextData = _ref3.setControlContextData;
796
437
  var record = useRecord();
797
- setControlContextData == null ? void 0 : setControlContextData(record);
438
+ setControlContextData == null || setControlContextData(record);
798
439
  return React.createElement("div", {
799
440
  className: className,
800
441
  style: style
@@ -834,39 +475,37 @@ function AirtableCollection(_ref4) {
834
475
  });
835
476
  }
836
477
  var search = searchArray.length === 0 ? "" : "?" + searchArray.join("&");
837
- var _usePlasmicQueryData = usePlasmicQueryData(JSON.stringify(["AirtableCollection", host, base, table, search, dataSourceId]), /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2() {
478
+ var _usePlasmicQueryData = usePlasmicQueryData(JSON.stringify(["AirtableCollection", host, base, table, search, dataSourceId]), /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
838
479
  var pathname, url;
839
- return runtime_1.wrap(function _callee2$(_context2) {
840
- while (1) {
841
- switch (_context2.prev = _context2.next) {
842
- case 0:
843
- if (!(!base || !dataSourceId)) {
844
- _context2.next = 2;
845
- break;
846
- }
847
- throw new Error("Missing Data Source. Please select a Data Source from the Airtable Credentials Provider");
848
- case 2:
849
- if (table) {
850
- _context2.next = 4;
851
- break;
852
- }
853
- throw new Error("AirtableCollection is missing the table name");
854
- case 4:
855
- pathname = "/" + base + "/" + table + search;
856
- url = host + "/api/v1/server-data/query?pathname=" + encodeURIComponent(pathname) + "&dataSourceId=" + dataSourceId;
857
- _context2.next = 8;
858
- return fetch(url, {
859
- method: "GET"
860
- });
861
- case 8:
862
- _context2.next = 10;
863
- return _context2.sent.json();
864
- case 10:
865
- return _context2.abrupt("return", _context2.sent.records);
866
- case 11:
867
- case "end":
868
- return _context2.stop();
869
- }
480
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
481
+ while (1) switch (_context2.prev = _context2.next) {
482
+ case 0:
483
+ if (!(!base || !dataSourceId)) {
484
+ _context2.next = 2;
485
+ break;
486
+ }
487
+ throw new Error("Missing Data Source. Please select a Data Source from the Airtable Credentials Provider");
488
+ case 2:
489
+ if (table) {
490
+ _context2.next = 4;
491
+ break;
492
+ }
493
+ throw new Error("AirtableCollection is missing the table name");
494
+ case 4:
495
+ pathname = "/" + base + "/" + table + search;
496
+ url = host + "/api/v1/server-data/query?pathname=" + encodeURIComponent(pathname) + "&dataSourceId=" + dataSourceId;
497
+ _context2.next = 8;
498
+ return fetch(url, {
499
+ method: "GET"
500
+ });
501
+ case 8:
502
+ _context2.next = 10;
503
+ return _context2.sent.json();
504
+ case 10:
505
+ return _context2.abrupt("return", _context2.sent.records);
506
+ case 11:
507
+ case "end":
508
+ return _context2.stop();
870
509
  }
871
510
  }, _callee2);
872
511
  }))),