relay-forms-nodeps 2.0.0 → 2.3.0

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.
Files changed (64) hide show
  1. package/.vscode/settings.json +10 -0
  2. package/eslint.config.js +84 -0
  3. package/lib/RelayFormsTypes.d.ts +17 -10
  4. package/lib/Utils.d.ts +1 -1
  5. package/lib/Utils.js +4 -3
  6. package/lib/es/RelayFormsTypes.d.ts +17 -10
  7. package/lib/es/RelayFormsTypes.js +1 -0
  8. package/lib/es/Utils.d.ts +1 -1
  9. package/lib/es/index.js +3 -1
  10. package/lib/es/relay/RelayModernStore.js +1 -2
  11. package/lib/es/relay/RelayReader.js +0 -1
  12. package/lib/es/relay/RelayStoreProvider.d.ts +1 -1
  13. package/lib/es/relay/RelayTypes.d.ts +7 -7
  14. package/lib/es/relay/RelayTypes.js +1 -0
  15. package/lib/es/relay/queries.js +0 -1
  16. package/lib/es/relay/queryErrorsFieldQuery.graphql.d.ts +27 -0
  17. package/lib/es/relay/queryErrorsFieldQuery.graphql.js +101 -0
  18. package/lib/es/relay/queryFieldFragment.graphql.d.ts +17 -0
  19. package/lib/es/relay/queryFieldFragment.graphql.js +27 -0
  20. package/lib/es/relay/queryFieldQuery.graphql.d.ts +24 -0
  21. package/lib/es/relay/queryFieldQuery.graphql.js +83 -0
  22. package/lib/es/relay/queryValueFieldFragment.graphql.d.ts +19 -0
  23. package/lib/es/relay/queryValueFieldFragment.graphql.js +39 -0
  24. package/lib/es/useForm.js +6 -2
  25. package/lib/es/useFormField.d.ts +1 -1
  26. package/lib/es/useFormField.js +48 -10
  27. package/lib/es/useFormState.d.ts +2 -12
  28. package/lib/index.js +70 -8
  29. package/lib/relay/RelayModernRecord.js +2 -1
  30. package/lib/relay/RelayModernSelector.js +1 -0
  31. package/lib/relay/RelayModernStore.js +7 -7
  32. package/lib/relay/RelayReader.js +1 -1
  33. package/lib/relay/RelayRecordProxy.js +1 -0
  34. package/lib/relay/RelayRecordSource.js +1 -0
  35. package/lib/relay/RelayRecordSourceMutator.js +1 -0
  36. package/lib/relay/RelayRecordSourceProxy.js +1 -0
  37. package/lib/relay/RelayReferenceMarker.js +1 -0
  38. package/lib/relay/RelayStoreProvider.d.ts +1 -1
  39. package/lib/relay/RelayStoreProvider.js +3 -1
  40. package/lib/relay/RelayStoreUtils.js +1 -0
  41. package/lib/relay/RelayTypes.d.ts +7 -7
  42. package/lib/relay/queries.js +1 -1
  43. package/lib/relay/queryErrorsFieldQuery.graphql.d.ts +27 -0
  44. package/lib/relay/queryErrorsFieldQuery.graphql.js +106 -0
  45. package/lib/relay/queryFieldFragment.graphql.d.ts +17 -0
  46. package/lib/relay/queryFieldFragment.graphql.js +32 -0
  47. package/lib/relay/queryFieldQuery.graphql.d.ts +24 -0
  48. package/lib/relay/queryFieldQuery.graphql.js +88 -0
  49. package/lib/relay/queryValueFieldFragment.graphql.d.ts +19 -0
  50. package/lib/relay/queryValueFieldFragment.graphql.js +44 -0
  51. package/lib/umd/relay-forms-nodeps.js +136 -69
  52. package/lib/umd/relay-forms-nodeps.js.map +1 -1
  53. package/lib/umd/relay-forms-nodeps.min.js +1 -1
  54. package/lib/umd/relay-forms-nodeps.min.js.map +1 -1
  55. package/lib/useForceUpdate.js +2 -1
  56. package/lib/useForm.js +17 -11
  57. package/lib/useFormField.d.ts +1 -1
  58. package/lib/useFormField.js +56 -17
  59. package/lib/useFormState.d.ts +2 -12
  60. package/lib/useFormState.js +5 -3
  61. package/lib/useFormValue.js +3 -2
  62. package/package.json +106 -102
  63. package/rollup.config.js +92 -92
  64. package/yarn-error.log +127 -127
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @generated SignedSource<<f339f7f54e87337ad69e9fc4490d6f4e>>
3
+ * @lightSyntaxTransform
4
+ */
5
+ import { ReaderFragment } from 'relay-runtime';
6
+ import { FragmentRefs } from "relay-runtime";
7
+ export type queryFieldFragment$data = {
8
+ readonly check: number | null | undefined;
9
+ readonly id: string;
10
+ readonly " $fragmentType": "queryFieldFragment";
11
+ };
12
+ export type queryFieldFragment$key = {
13
+ readonly " $data"?: queryFieldFragment$data;
14
+ readonly " $fragmentSpreads": FragmentRefs<"queryFieldFragment">;
15
+ };
16
+ declare const node: ReaderFragment;
17
+ export default node;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * @generated SignedSource<<f339f7f54e87337ad69e9fc4490d6f4e>>
5
+ * @lightSyntaxTransform
6
+ */
7
+ Object.defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+ var node = {
11
+ "argumentDefinitions": [],
12
+ "kind": "Fragment",
13
+ "metadata": null,
14
+ "name": "queryFieldFragment",
15
+ "selections": [{
16
+ "alias": null,
17
+ "args": null,
18
+ "kind": "ScalarField",
19
+ "name": "id",
20
+ "storageKey": null
21
+ }, {
22
+ "alias": null,
23
+ "args": null,
24
+ "kind": "ScalarField",
25
+ "name": "check",
26
+ "storageKey": null
27
+ }],
28
+ "type": "Entry",
29
+ "abstractKey": null
30
+ };
31
+ node.hash = "d5b0953bdeb412925ee13444a6be6082";
32
+ exports.default = node;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @generated SignedSource<<1263d9ecd9ad411904cb6c36855bf582>>
3
+ * @relayHash 0b493a6f66e132f2693f91a5da941414
4
+ * @lightSyntaxTransform
5
+ */
6
+ import { ConcreteRequest } from 'relay-runtime';
7
+ export type queryFieldQuery$variables = Record<PropertyKey, never>;
8
+ export type queryFieldQuery$data = {
9
+ readonly form: {
10
+ readonly entries: ReadonlyArray<{
11
+ readonly check: number | null | undefined;
12
+ readonly error: string | null | undefined;
13
+ readonly id: string;
14
+ readonly key: string;
15
+ readonly value: string | null | undefined;
16
+ } | null | undefined> | null | undefined;
17
+ } | null | undefined;
18
+ };
19
+ export type queryFieldQuery = {
20
+ response: queryFieldQuery$data;
21
+ variables: queryFieldQuery$variables;
22
+ };
23
+ declare const node: ConcreteRequest;
24
+ export default node;
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * @generated SignedSource<<1263d9ecd9ad411904cb6c36855bf582>>
5
+ * @relayHash 0b493a6f66e132f2693f91a5da941414
6
+ * @lightSyntaxTransform
7
+ */
8
+ Object.defineProperty(exports, "__esModule", {
9
+ value: true
10
+ });
11
+ var node = function () {
12
+ var v0 = [{
13
+ "alias": null,
14
+ "args": null,
15
+ "concreteType": "EntryForm",
16
+ "kind": "LinkedField",
17
+ "name": "form",
18
+ "plural": false,
19
+ "selections": [{
20
+ "alias": null,
21
+ "args": null,
22
+ "concreteType": "Entry",
23
+ "kind": "LinkedField",
24
+ "name": "entries",
25
+ "plural": true,
26
+ "selections": [{
27
+ "alias": null,
28
+ "args": null,
29
+ "kind": "ScalarField",
30
+ "name": "id",
31
+ "storageKey": null
32
+ }, {
33
+ "alias": null,
34
+ "args": null,
35
+ "kind": "ScalarField",
36
+ "name": "key",
37
+ "storageKey": null
38
+ }, {
39
+ "alias": null,
40
+ "args": null,
41
+ "kind": "ScalarField",
42
+ "name": "value",
43
+ "storageKey": null
44
+ }, {
45
+ "alias": null,
46
+ "args": null,
47
+ "kind": "ScalarField",
48
+ "name": "check",
49
+ "storageKey": null
50
+ }, {
51
+ "alias": null,
52
+ "args": null,
53
+ "kind": "ScalarField",
54
+ "name": "error",
55
+ "storageKey": null
56
+ }],
57
+ "storageKey": null
58
+ }],
59
+ "storageKey": null
60
+ }];
61
+ return {
62
+ "fragment": {
63
+ "argumentDefinitions": [],
64
+ "kind": "Fragment",
65
+ "metadata": null,
66
+ "name": "queryFieldQuery",
67
+ "selections": v0 /*:: as any*/,
68
+ "type": "Query",
69
+ "abstractKey": null
70
+ },
71
+ "kind": "Request",
72
+ "operation": {
73
+ "argumentDefinitions": [],
74
+ "kind": "Operation",
75
+ "name": "queryFieldQuery",
76
+ "selections": v0 /*:: as any*/
77
+ },
78
+ "params": {
79
+ "id": "0b493a6f66e132f2693f91a5da941414",
80
+ "metadata": {},
81
+ "name": "queryFieldQuery",
82
+ "operationKind": "query",
83
+ "text": null
84
+ }
85
+ };
86
+ }();
87
+ node.hash = "f9fd20a80a839dfb51206c305cbb1657";
88
+ exports.default = node;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @generated SignedSource<<69ff99d34e27e6719e62c7c4258f81e8>>
3
+ * @lightSyntaxTransform
4
+ */
5
+ import { ReaderFragment } from 'relay-runtime';
6
+ import { FragmentRefs } from "relay-runtime";
7
+ export type queryValueFieldFragment$data = {
8
+ readonly error: string | null | undefined;
9
+ readonly id: string;
10
+ readonly label: string | null | undefined;
11
+ readonly value: string | null | undefined;
12
+ readonly " $fragmentType": "queryValueFieldFragment";
13
+ };
14
+ export type queryValueFieldFragment$key = {
15
+ readonly " $data"?: queryValueFieldFragment$data;
16
+ readonly " $fragmentSpreads": FragmentRefs<"queryValueFieldFragment">;
17
+ };
18
+ declare const node: ReaderFragment;
19
+ export default node;
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * @generated SignedSource<<69ff99d34e27e6719e62c7c4258f81e8>>
5
+ * @lightSyntaxTransform
6
+ */
7
+ Object.defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+ var node = {
11
+ "argumentDefinitions": [],
12
+ "kind": "Fragment",
13
+ "metadata": null,
14
+ "name": "queryValueFieldFragment",
15
+ "selections": [{
16
+ "alias": null,
17
+ "args": null,
18
+ "kind": "ScalarField",
19
+ "name": "id",
20
+ "storageKey": null
21
+ }, {
22
+ "alias": null,
23
+ "args": null,
24
+ "kind": "ScalarField",
25
+ "name": "value",
26
+ "storageKey": null
27
+ }, {
28
+ "alias": null,
29
+ "args": null,
30
+ "kind": "ScalarField",
31
+ "name": "label",
32
+ "storageKey": null
33
+ }, {
34
+ "alias": null,
35
+ "args": null,
36
+ "kind": "ScalarField",
37
+ "name": "error",
38
+ "storageKey": null
39
+ }],
40
+ "type": "Entry",
41
+ "abstractKey": null
42
+ };
43
+ node.hash = "364beea31c4e318a5241f2bd7d96fbd8";
44
+ exports.default = node;
@@ -264,7 +264,6 @@ var QueryErrors = {
264
264
  }] /*: any*/
265
265
  }
266
266
  };
267
-
268
267
  var QueryFields = {
269
268
  id: '0',
270
269
  fragment: {
@@ -364,6 +363,104 @@ var useFormState = function () {
364
363
  return data;
365
364
  };
366
365
 
366
+ /******************************************************************************
367
+ Copyright (c) Microsoft Corporation.
368
+
369
+ Permission to use, copy, modify, and/or distribute this software for any
370
+ purpose with or without fee is hereby granted.
371
+
372
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
373
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
374
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
375
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
376
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
377
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
378
+ PERFORMANCE OF THIS SOFTWARE.
379
+ ***************************************************************************** */
380
+
381
+ var __assign = function() {
382
+ __assign = Object.assign || function __assign(t) {
383
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
384
+ s = arguments[i];
385
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
386
+ }
387
+ return t;
388
+ };
389
+ return __assign.apply(this, arguments);
390
+ };
391
+
392
+ function __generator(thisArg, body) {
393
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
394
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
395
+ function verb(n) { return function (v) { return step([n, v]); }; }
396
+ function step(op) {
397
+ if (f) throw new TypeError("Generator is already executing.");
398
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
399
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
400
+ if (y = 0, t) op = [op[0] & 2, t.value];
401
+ switch (op[0]) {
402
+ case 0: case 1: t = op; break;
403
+ case 4: _.label++; return { value: op[1], done: false };
404
+ case 5: _.label++; y = op[1]; op = [0]; continue;
405
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
406
+ default:
407
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
408
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
409
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
410
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
411
+ if (t[2]) _.ops.pop();
412
+ _.trys.pop(); continue;
413
+ }
414
+ op = body.call(thisArg, _);
415
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
416
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
417
+ }
418
+ }
419
+
420
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
421
+ var e = new Error(message);
422
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
423
+ };
424
+
425
+ /**
426
+ * @generated SignedSource<<69ff99d34e27e6719e62c7c4258f81e8>>
427
+ * @lightSyntaxTransform
428
+ */
429
+ var node = {
430
+ "argumentDefinitions": [],
431
+ "kind": "Fragment",
432
+ "metadata": null,
433
+ "name": "queryValueFieldFragment",
434
+ "selections": [{
435
+ "alias": null,
436
+ "args": null,
437
+ "kind": "ScalarField",
438
+ "name": "id",
439
+ "storageKey": null
440
+ }, {
441
+ "alias": null,
442
+ "args": null,
443
+ "kind": "ScalarField",
444
+ "name": "value",
445
+ "storageKey": null
446
+ }, {
447
+ "alias": null,
448
+ "args": null,
449
+ "kind": "ScalarField",
450
+ "name": "label",
451
+ "storageKey": null
452
+ }, {
453
+ "alias": null,
454
+ "args": null,
455
+ "kind": "ScalarField",
456
+ "name": "error",
457
+ "storageKey": null
458
+ }],
459
+ "type": "Entry",
460
+ "abstractKey": null
461
+ };
462
+ node.hash = "364beea31c4e318a5241f2bd7d96fbd8";
463
+
367
464
  function useForceUpdate() {
368
465
  var _a = React.useReducer(function (x) {
369
466
  return x + 1;
@@ -390,10 +487,15 @@ function logicSetValue(params) {
390
487
  initialValue = params.initialValue,
391
488
  forceUpdate = params.forceUpdate,
392
489
  validateOnChange = params.validateOnChange,
393
- label = params.label;
490
+ label = params.label,
491
+ dependsOn = params.dependsOn;
394
492
  var validate = undefined;
395
493
  var firstSet = true;
494
+ var deps = {};
396
495
  var localId = getFieldId(key);
496
+ function getDeps() {
497
+ return deps;
498
+ }
397
499
  function getValidate() {
398
500
  return validate;
399
501
  }
@@ -468,13 +570,14 @@ function logicSetValue(params) {
468
570
  }
469
571
  commitField(false);
470
572
  }
471
- function internalValidate(value, validateFunction) {
573
+ function internalValidate(value, validateFunction, depsValidation) {
472
574
  ref.isChecking = true;
473
- var result = validateFunction(value);
575
+ var result = validateFunction(value, deps);
474
576
  function internalFinalize(error) {
475
577
  var validate = getValidate();
476
- if (value !== dataResult.value || validate !== validateFunction) {
477
- internalValidate(dataResult.value, validate);
578
+ var deps = getDeps();
579
+ if (value !== dataResult.value || validate !== validateFunction || deps !== depsValidation) {
580
+ internalValidate(dataResult.value, validate, deps);
478
581
  return;
479
582
  }
480
583
  finalizeCheck(error);
@@ -498,9 +601,23 @@ function logicSetValue(params) {
498
601
  ref.check = getInitCheck(validate);
499
602
  setValueInternal(initialValue);
500
603
  } else if (isValidating && !ref.isChecking) {
501
- internalValidate(dataResult.value, validate);
604
+ internalValidate(dataResult.value, validate, deps);
502
605
  }
503
606
  }).dispose;
607
+ if (dependsOn != null) {
608
+ dependsOn.forEach(function (depKey) {
609
+ var snapshot = getSnapshot(environment, node, depKey);
610
+ environment.subscribe(snapshot, function (s) {
611
+ var _a;
612
+ var data = s.data;
613
+ deps = __assign(__assign({}, deps), (_a = {}, _a[depKey] = data, _a));
614
+ if (ref.check == DONEVALIDATED && !ref.isChecking) {
615
+ ref.check = VALIDATING;
616
+ commitField(false);
617
+ }
618
+ }).dispose;
619
+ });
620
+ }
504
621
  var dispose = function () {
505
622
  disposeSubscrition();
506
623
  commit(environment, function (store, form) {
@@ -513,7 +630,7 @@ function logicSetValue(params) {
513
630
  });
514
631
  };
515
632
  if (validateOnChange) {
516
- internalValidate(initialValue, getValidate());
633
+ internalValidate(initialValue, getValidate(), deps);
517
634
  }
518
635
  return dispose;
519
636
  }
@@ -529,7 +646,8 @@ function useFormField(_a) {
529
646
  initialValue = _a.initialValue,
530
647
  validate = _a.validate,
531
648
  validateOnChange = _a.validateOnChange,
532
- label = _a.label;
649
+ label = _a.label,
650
+ dependsOn = _a.dependsOn;
533
651
  var forceUpdate = useForceUpdate();
534
652
  var environment = useStore();
535
653
  var resolver = React__default["default"].useMemo(function () {
@@ -539,9 +657,10 @@ function useFormField(_a) {
539
657
  label: label,
540
658
  initialValue: initialValue,
541
659
  forceUpdate: forceUpdate,
542
- validateOnChange: validateOnChange
660
+ validateOnChange: validateOnChange,
661
+ dependsOn: dependsOn
543
662
  });
544
- }, [environment, key, initialValue, forceUpdate, validateOnChange, label]);
663
+ }, [environment, key, initialValue, forceUpdate, validateOnChange, label, dependsOn]);
545
664
  resolver.setValidate(validate);
546
665
  React__default["default"].useEffect(function () {
547
666
  return resolver.subscribe();
@@ -551,7 +670,9 @@ function useFormField(_a) {
551
670
 
552
671
  function logicSubmit(environment, onSubmit) {
553
672
  function dispose() {
554
- subscription && subscription.dispose();
673
+ if (subscription) {
674
+ subscription.dispose();
675
+ }
555
676
  subscription = undefined;
556
677
  }
557
678
  var isSubmitting = false;
@@ -627,7 +748,9 @@ function logicSubmit(environment, onSubmit) {
627
748
  execute(snapshot);
628
749
  }
629
750
  function submit(event) {
630
- event && event.preventDefault();
751
+ if (event) {
752
+ event.preventDefault();
753
+ }
631
754
  if (!isSubmitting) {
632
755
  isSubmitting = true;
633
756
  validate();
@@ -681,60 +804,6 @@ function useFormValue(key) {
681
804
  return data;
682
805
  }
683
806
 
684
- /*! *****************************************************************************
685
- Copyright (c) Microsoft Corporation.
686
-
687
- Permission to use, copy, modify, and/or distribute this software for any
688
- purpose with or without fee is hereby granted.
689
-
690
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
691
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
692
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
693
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
694
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
695
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
696
- PERFORMANCE OF THIS SOFTWARE.
697
- ***************************************************************************** */
698
-
699
- var __assign = function() {
700
- __assign = Object.assign || function __assign(t) {
701
- for (var s, i = 1, n = arguments.length; i < n; i++) {
702
- s = arguments[i];
703
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
704
- }
705
- return t;
706
- };
707
- return __assign.apply(this, arguments);
708
- };
709
-
710
- function __generator(thisArg, body) {
711
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
712
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
713
- function verb(n) { return function (v) { return step([n, v]); }; }
714
- function step(op) {
715
- if (f) throw new TypeError("Generator is already executing.");
716
- while (_) try {
717
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
718
- if (y = 0, t) op = [op[0] & 2, t.value];
719
- switch (op[0]) {
720
- case 0: case 1: t = op; break;
721
- case 4: _.label++; return { value: op[1], done: false };
722
- case 5: _.label++; y = op[1]; op = [0]; continue;
723
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
724
- default:
725
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
726
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
727
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
728
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
729
- if (t[2]) _.ops.pop();
730
- _.trys.pop(); continue;
731
- }
732
- op = body.call(thisArg, _);
733
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
734
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
735
- }
736
- }
737
-
738
807
  var ID_KEY = RelayStoreUtils.ID_KEY,
739
808
  REF_KEY = RelayStoreUtils.REF_KEY,
740
809
  REFS_KEY = RelayStoreUtils.REFS_KEY;
@@ -963,7 +1032,6 @@ var RelayReader = /** @class */function () {
963
1032
  value = RelayModernRecord.getValue(record, name_1);
964
1033
  //this._readScalar(selection, record, data);
965
1034
  }
966
-
967
1035
  data[name_1] = value;
968
1036
  };
969
1037
  var this_1 = this;
@@ -1467,7 +1535,6 @@ var RelayModernStore = /** @class */function () {
1467
1535
  }
1468
1536
  });
1469
1537
  };
1470
-
1471
1538
  return RelayModernStore;
1472
1539
  }();
1473
1540
  function initializeRecordSource(target) {