@plasmicpkgs/plasmic-wordpress-graphql 0.0.33 → 0.0.35

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