@sankhyalabs/sankhyablocks 1.1.25 → 1.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{AssetsUtils-7e3c38f9.js → AssetsUtils-bd004f63.js} +1 -1
- package/dist/cjs/_commonjsHelpers-537d719a.js +20 -0
- package/dist/cjs/ez-action-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-application.cjs.entry.js +1 -1
- package/dist/cjs/ez-button_4.cjs.entry.js +1 -1
- package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-combo-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-form.cjs.entry.js +325 -3
- package/dist/cjs/ez-grid.cjs.entry.js +109843 -5
- package/dist/cjs/ez-icon.cjs.entry.js +1 -1
- package/dist/cjs/ez-label-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal_2.cjs.entry.js +2 -2
- package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +1 -1
- package/dist/cjs/ez-search.cjs.entry.js +1 -1
- package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-area.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-time-input.cjs.entry.js +2 -2
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/ez-upload.cjs.entry.js +1 -1
- package/dist/cjs/{index-682c98b2.js → index-6ac5268e.js} +7 -9
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/sankhyablocks.cjs.js +2 -2
- package/dist/cjs/snk-application.cjs.entry.js +47 -345
- package/dist/cjs/test-du.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/components/_commonjsHelpers.js +17 -0
- package/dist/components/ez-form2.js +323 -1
- package/dist/components/ez-grid.js +109844 -6
- package/dist/components/snk-application.js +8 -306
- package/dist/esm/{AssetsUtils-6e6624dc.js → AssetsUtils-98074c9c.js} +1 -1
- package/dist/esm/_commonjsHelpers-9943807e.js +17 -0
- package/dist/esm/ez-action-chip.entry.js +1 -1
- package/dist/esm/ez-application.entry.js +1 -1
- package/dist/esm/ez-button_4.entry.js +1 -1
- package/dist/esm/ez-calendar.entry.js +1 -1
- package/dist/esm/ez-collapsible-box.entry.js +1 -1
- package/dist/esm/ez-combo-box.entry.js +1 -1
- package/dist/esm/ez-date-input.entry.js +1 -1
- package/dist/esm/ez-date-time-input.entry.js +1 -1
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-form.entry.js +324 -2
- package/dist/esm/ez-grid.entry.js +109843 -5
- package/dist/esm/ez-icon.entry.js +1 -1
- package/dist/esm/ez-label-chip.entry.js +1 -1
- package/dist/esm/ez-modal_2.entry.js +2 -2
- package/dist/esm/ez-number-input.entry.js +1 -1
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +1 -1
- package/dist/esm/ez-search.entry.js +1 -1
- package/dist/esm/ez-tabselector.entry.js +1 -1
- package/dist/esm/ez-text-area.entry.js +1 -1
- package/dist/esm/ez-text-input.entry.js +1 -1
- package/dist/esm/ez-time-input.entry.js +2 -2
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/ez-upload.entry.js +1 -1
- package/dist/esm/{index-35088a3f.js → index-df166135.js} +7 -9
- package/dist/esm/loader.js +2 -2
- package/dist/esm/sankhyablocks.js +2 -2
- package/dist/esm/snk-application.entry.js +9 -307
- package/dist/esm/test-du.entry.js +1 -1
- package/dist/sankhyablocks/{p-9750632b.entry.js → p-08e1cded.entry.js} +1 -1
- package/dist/sankhyablocks/p-0a77ac95.entry.js +57 -0
- package/dist/sankhyablocks/p-112455b1.js +1 -0
- package/dist/sankhyablocks/p-126c4aaa.entry.js +1 -0
- package/dist/sankhyablocks/{p-f6db07fb.entry.js → p-1421b89a.entry.js} +1 -1
- package/dist/sankhyablocks/{p-8b543003.entry.js → p-1beadcaf.entry.js} +1 -1
- package/dist/sankhyablocks/{p-89a1100f.entry.js → p-1c423f5d.entry.js} +1 -1
- package/dist/sankhyablocks/{p-0183d259.entry.js → p-28a0dbf0.entry.js} +1 -1
- package/dist/sankhyablocks/p-4763d5c2.js +1 -0
- package/dist/sankhyablocks/{p-ba64cc41.entry.js → p-4c66200a.entry.js} +1 -1
- package/dist/sankhyablocks/{p-ac8842e5.entry.js → p-5dc772be.entry.js} +1 -1
- package/dist/sankhyablocks/p-5ff3e300.entry.js +1 -0
- package/dist/sankhyablocks/{p-710bfffe.entry.js → p-7122cec4.entry.js} +1 -1
- package/dist/sankhyablocks/{p-5f9af495.entry.js → p-9b33a005.entry.js} +1 -1
- package/dist/sankhyablocks/{p-01f23a70.entry.js → p-9e22ec87.entry.js} +1 -1
- package/dist/sankhyablocks/{p-105724a3.entry.js → p-9f7239df.entry.js} +1 -1
- package/dist/sankhyablocks/p-9f7e6e48.js +1 -0
- package/dist/sankhyablocks/{p-ef04b633.entry.js → p-a47e0537.entry.js} +1 -1
- package/dist/sankhyablocks/{p-c1ede043.entry.js → p-a9aba60a.entry.js} +1 -1
- package/dist/sankhyablocks/{p-3f6aa9a7.entry.js → p-afda7940.entry.js} +1 -1
- package/dist/sankhyablocks/{p-07c32f68.entry.js → p-b3a83eaf.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e5355a29.entry.js → p-b96a8d40.entry.js} +1 -1
- package/dist/sankhyablocks/{p-70ad6c16.entry.js → p-c61c0e40.entry.js} +1 -1
- package/dist/sankhyablocks/{p-35364a97.entry.js → p-ca29d028.entry.js} +1 -1
- package/dist/sankhyablocks/{p-fcd9bd92.entry.js → p-cd17abb1.entry.js} +1 -1
- package/dist/sankhyablocks/p-d3a5366d.entry.js +369 -0
- package/dist/sankhyablocks/{p-a96272f7.entry.js → p-d5703a41.entry.js} +1 -1
- package/dist/sankhyablocks/{p-2ac02d48.entry.js → p-e5f77a59.entry.js} +1 -1
- package/dist/sankhyablocks/{p-d90ebb85.entry.js → p-e9e94d51.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components.d.ts +2 -6
- package/package.json +10 -7
- package/dist/sankhyablocks/p-0f90499d.entry.js +0 -1
- package/dist/sankhyablocks/p-60967cf0.js +0 -1
- package/dist/sankhyablocks/p-6ce33b60.entry.js +0 -57
- package/dist/sankhyablocks/p-735440c1.entry.js +0 -1
- package/dist/sankhyablocks/p-85a9446b.js +0 -2
- package/dist/sankhyablocks/p-e17dfaae.entry.js +0 -1
|
@@ -2,28 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-6ac5268e.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
+
const _commonjsHelpers = require('./_commonjsHelpers-537d719a.js');
|
|
7
8
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
9
|
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
function createCommonjsModule(fn, basedir, module) {
|
|
12
|
-
return module = {
|
|
13
|
-
path: basedir,
|
|
14
|
-
exports: {},
|
|
15
|
-
require: function (path, base) {
|
|
16
|
-
return commonjsRequire();
|
|
17
|
-
}
|
|
18
|
-
}, fn(module, module.exports), module.exports;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function commonjsRequire () {
|
|
22
|
-
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
var browserPonyfill = createCommonjsModule(function (module, exports) {
|
|
26
|
-
var global = typeof self !== 'undefined' ? self : commonjsGlobal;
|
|
10
|
+
var browserPonyfill = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
11
|
+
var global = typeof self !== 'undefined' ? self : _commonjsHelpers.commonjsGlobal;
|
|
27
12
|
var __self__ = (function () {
|
|
28
13
|
function F() {
|
|
29
14
|
this.fetch = false;
|
|
@@ -579,7 +564,7 @@ exports.Response = ctx.Response;
|
|
|
579
564
|
module.exports = exports;
|
|
580
565
|
});
|
|
581
566
|
|
|
582
|
-
var isObjectLike_1 = createCommonjsModule(function (module, exports) {
|
|
567
|
+
var isObjectLike_1 = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
583
568
|
|
|
584
569
|
Object.defineProperty(exports, '__esModule', {
|
|
585
570
|
value: true,
|
|
@@ -595,7 +580,7 @@ function isObjectLike(value) {
|
|
|
595
580
|
}
|
|
596
581
|
});
|
|
597
582
|
|
|
598
|
-
var invariant_1 = createCommonjsModule(function (module, exports) {
|
|
583
|
+
var invariant_1 = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
599
584
|
|
|
600
585
|
Object.defineProperty(exports, '__esModule', {
|
|
601
586
|
value: true,
|
|
@@ -613,7 +598,7 @@ function invariant(condition, message) {
|
|
|
613
598
|
}
|
|
614
599
|
});
|
|
615
600
|
|
|
616
|
-
var location_1 = createCommonjsModule(function (module, exports) {
|
|
601
|
+
var location_1 = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
617
602
|
|
|
618
603
|
Object.defineProperty(exports, '__esModule', {
|
|
619
604
|
value: true,
|
|
@@ -653,7 +638,7 @@ function getLocation(source, position) {
|
|
|
653
638
|
}
|
|
654
639
|
});
|
|
655
640
|
|
|
656
|
-
var printLocation_1 = createCommonjsModule(function (module, exports) {
|
|
641
|
+
var printLocation_1 = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
657
642
|
|
|
658
643
|
Object.defineProperty(exports, '__esModule', {
|
|
659
644
|
value: true,
|
|
@@ -729,7 +714,7 @@ function printPrefixedLines(lines) {
|
|
|
729
714
|
}
|
|
730
715
|
});
|
|
731
716
|
|
|
732
|
-
var GraphQLError_1 = createCommonjsModule(function (module, exports) {
|
|
717
|
+
var GraphQLError_1 = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
733
718
|
|
|
734
719
|
Object.defineProperty(exports, '__esModule', {
|
|
735
720
|
value: true,
|
|
@@ -998,7 +983,7 @@ function formatError(error) {
|
|
|
998
983
|
}
|
|
999
984
|
});
|
|
1000
985
|
|
|
1001
|
-
var syntaxError_1 = createCommonjsModule(function (module, exports) {
|
|
986
|
+
var syntaxError_1 = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
1002
987
|
|
|
1003
988
|
Object.defineProperty(exports, '__esModule', {
|
|
1004
989
|
value: true,
|
|
@@ -1019,7 +1004,7 @@ function syntaxError(source, position, description) {
|
|
|
1019
1004
|
}
|
|
1020
1005
|
});
|
|
1021
1006
|
|
|
1022
|
-
var ast = createCommonjsModule(function (module, exports) {
|
|
1007
|
+
var ast = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
1023
1008
|
|
|
1024
1009
|
Object.defineProperty(exports, '__esModule', {
|
|
1025
1010
|
value: true,
|
|
@@ -1245,7 +1230,7 @@ exports.OperationTypeNode = OperationTypeNode;
|
|
|
1245
1230
|
})(OperationTypeNode || (exports.OperationTypeNode = OperationTypeNode = {}));
|
|
1246
1231
|
});
|
|
1247
1232
|
|
|
1248
|
-
var directiveLocation = createCommonjsModule(function (module, exports) {
|
|
1233
|
+
var directiveLocation = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
1249
1234
|
|
|
1250
1235
|
Object.defineProperty(exports, '__esModule', {
|
|
1251
1236
|
value: true,
|
|
@@ -1287,7 +1272,7 @@ exports.DirectiveLocation = DirectiveLocation;
|
|
|
1287
1272
|
})(DirectiveLocation || (exports.DirectiveLocation = DirectiveLocation = {}));
|
|
1288
1273
|
});
|
|
1289
1274
|
|
|
1290
|
-
var kinds = createCommonjsModule(function (module, exports) {
|
|
1275
|
+
var kinds = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
1291
1276
|
|
|
1292
1277
|
Object.defineProperty(exports, '__esModule', {
|
|
1293
1278
|
value: true,
|
|
@@ -1353,7 +1338,7 @@ exports.Kind = Kind;
|
|
|
1353
1338
|
})(Kind || (exports.Kind = Kind = {}));
|
|
1354
1339
|
});
|
|
1355
1340
|
|
|
1356
|
-
var characterClasses = createCommonjsModule(function (module, exports) {
|
|
1341
|
+
var characterClasses = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
1357
1342
|
|
|
1358
1343
|
Object.defineProperty(exports, '__esModule', {
|
|
1359
1344
|
value: true,
|
|
@@ -1430,7 +1415,7 @@ function isNameContinue(code) {
|
|
|
1430
1415
|
}
|
|
1431
1416
|
});
|
|
1432
1417
|
|
|
1433
|
-
var blockString = createCommonjsModule(function (module, exports) {
|
|
1418
|
+
var blockString = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
1434
1419
|
|
|
1435
1420
|
Object.defineProperty(exports, '__esModule', {
|
|
1436
1421
|
value: true,
|
|
@@ -1627,7 +1612,7 @@ function printBlockString(value, options) {
|
|
|
1627
1612
|
}
|
|
1628
1613
|
});
|
|
1629
1614
|
|
|
1630
|
-
var tokenKind = createCommonjsModule(function (module, exports) {
|
|
1615
|
+
var tokenKind = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
1631
1616
|
|
|
1632
1617
|
Object.defineProperty(exports, '__esModule', {
|
|
1633
1618
|
value: true,
|
|
@@ -1673,7 +1658,7 @@ exports.TokenKind = TokenKind;
|
|
|
1673
1658
|
})(TokenKind || (exports.TokenKind = TokenKind = {}));
|
|
1674
1659
|
});
|
|
1675
1660
|
|
|
1676
|
-
var lexer = createCommonjsModule(function (module, exports) {
|
|
1661
|
+
var lexer = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
1677
1662
|
|
|
1678
1663
|
Object.defineProperty(exports, '__esModule', {
|
|
1679
1664
|
value: true,
|
|
@@ -2681,7 +2666,7 @@ function readName(lexer, start) {
|
|
|
2681
2666
|
}
|
|
2682
2667
|
});
|
|
2683
2668
|
|
|
2684
|
-
var devAssert_1 = createCommonjsModule(function (module, exports) {
|
|
2669
|
+
var devAssert_1 = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
2685
2670
|
|
|
2686
2671
|
Object.defineProperty(exports, '__esModule', {
|
|
2687
2672
|
value: true,
|
|
@@ -2697,7 +2682,7 @@ function devAssert(condition, message) {
|
|
|
2697
2682
|
}
|
|
2698
2683
|
});
|
|
2699
2684
|
|
|
2700
|
-
var inspect_1 = createCommonjsModule(function (module, exports) {
|
|
2685
|
+
var inspect_1 = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
2701
2686
|
|
|
2702
2687
|
Object.defineProperty(exports, '__esModule', {
|
|
2703
2688
|
value: true,
|
|
@@ -2820,7 +2805,7 @@ function getObjectTag(object) {
|
|
|
2820
2805
|
}
|
|
2821
2806
|
});
|
|
2822
2807
|
|
|
2823
|
-
var instanceOf_1 = createCommonjsModule(function (module, exports) {
|
|
2808
|
+
var instanceOf_1 = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
2824
2809
|
|
|
2825
2810
|
Object.defineProperty(exports, '__esModule', {
|
|
2826
2811
|
value: true,
|
|
@@ -2846,7 +2831,7 @@ const instanceOf =
|
|
|
2846
2831
|
exports.instanceOf = instanceOf;
|
|
2847
2832
|
});
|
|
2848
2833
|
|
|
2849
|
-
var source = createCommonjsModule(function (module, exports) {
|
|
2834
|
+
var source = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
2850
2835
|
|
|
2851
2836
|
Object.defineProperty(exports, '__esModule', {
|
|
2852
2837
|
value: true,
|
|
@@ -2913,7 +2898,7 @@ function isSource(source) {
|
|
|
2913
2898
|
}
|
|
2914
2899
|
});
|
|
2915
2900
|
|
|
2916
|
-
var parser = createCommonjsModule(function (module, exports) {
|
|
2901
|
+
var parser = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
2917
2902
|
|
|
2918
2903
|
Object.defineProperty(exports, '__esModule', {
|
|
2919
2904
|
value: true,
|
|
@@ -4482,7 +4467,7 @@ function getTokenKindDesc(kind) {
|
|
|
4482
4467
|
}
|
|
4483
4468
|
});
|
|
4484
4469
|
|
|
4485
|
-
var printString_1 = createCommonjsModule(function (module, exports) {
|
|
4470
|
+
var printString_1 = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
4486
4471
|
|
|
4487
4472
|
Object.defineProperty(exports, '__esModule', {
|
|
4488
4473
|
value: true,
|
|
@@ -4667,7 +4652,7 @@ const escapeSequences = [
|
|
|
4667
4652
|
];
|
|
4668
4653
|
});
|
|
4669
4654
|
|
|
4670
|
-
var visitor = createCommonjsModule(function (module, exports) {
|
|
4655
|
+
var visitor = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
4671
4656
|
|
|
4672
4657
|
Object.defineProperty(exports, '__esModule', {
|
|
4673
4658
|
value: true,
|
|
@@ -5046,7 +5031,7 @@ function getVisitFn(visitor, kind, isLeaving) {
|
|
|
5046
5031
|
}
|
|
5047
5032
|
});
|
|
5048
5033
|
|
|
5049
|
-
var printer = createCommonjsModule(function (module, exports) {
|
|
5034
|
+
var printer = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
5050
5035
|
|
|
5051
5036
|
Object.defineProperty(exports, '__esModule', {
|
|
5052
5037
|
value: true,
|
|
@@ -5480,7 +5465,7 @@ var _public = {
|
|
|
5480
5465
|
/* eslint-env browser */
|
|
5481
5466
|
var browser = typeof self == 'object' ? self.FormData : window.FormData;
|
|
5482
5467
|
|
|
5483
|
-
var defaultJsonSerializer = createCommonjsModule(function (module, exports) {
|
|
5468
|
+
var defaultJsonSerializer = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
5484
5469
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5485
5470
|
exports.defaultJsonSerializer = void 0;
|
|
5486
5471
|
exports.defaultJsonSerializer = {
|
|
@@ -5490,8 +5475,8 @@ exports.defaultJsonSerializer = {
|
|
|
5490
5475
|
//# sourceMappingURL=defaultJsonSerializer.js.map
|
|
5491
5476
|
});
|
|
5492
5477
|
|
|
5493
|
-
var createRequestBody_1 = createCommonjsModule(function (module, exports) {
|
|
5494
|
-
var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
5478
|
+
var createRequestBody_1 = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
5479
|
+
var __importDefault = (_commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.__importDefault) || function (mod) {
|
|
5495
5480
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5496
5481
|
};
|
|
5497
5482
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -5547,7 +5532,7 @@ exports.default = createRequestBody;
|
|
|
5547
5532
|
//# sourceMappingURL=createRequestBody.js.map
|
|
5548
5533
|
});
|
|
5549
5534
|
|
|
5550
|
-
var parseArgs = createCommonjsModule(function (module, exports) {
|
|
5535
|
+
var parseArgs = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
5551
5536
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5552
5537
|
exports.parseBatchRequestsExtendedArgs = exports.parseRawRequestExtendedArgs = exports.parseRequestExtendedArgs = exports.parseBatchRequestArgs = exports.parseRawRequestArgs = exports.parseRequestArgs = void 0;
|
|
5553
5538
|
function parseRequestArgs(documentOrOptions, variables, requestHeaders) {
|
|
@@ -5620,8 +5605,8 @@ exports.parseBatchRequestsExtendedArgs = parseBatchRequestsExtendedArgs;
|
|
|
5620
5605
|
//# sourceMappingURL=parseArgs.js.map
|
|
5621
5606
|
});
|
|
5622
5607
|
|
|
5623
|
-
var types = createCommonjsModule(function (module, exports) {
|
|
5624
|
-
var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () {
|
|
5608
|
+
var types = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
5609
|
+
var __extends = (_commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.__extends) || (function () {
|
|
5625
5610
|
var extendStatics = function (d, b) {
|
|
5626
5611
|
extendStatics = Object.setPrototypeOf ||
|
|
5627
5612
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -5670,282 +5655,8 @@ exports.ClientError = ClientError;
|
|
|
5670
5655
|
//# sourceMappingURL=types.js.map
|
|
5671
5656
|
});
|
|
5672
5657
|
|
|
5673
|
-
var
|
|
5674
|
-
var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
|
|
5675
|
-
__assign = Object.assign || function(t) {
|
|
5676
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5677
|
-
s = arguments[i];
|
|
5678
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
5679
|
-
t[p] = s[p];
|
|
5680
|
-
}
|
|
5681
|
-
return t;
|
|
5682
|
-
};
|
|
5683
|
-
return __assign.apply(this, arguments);
|
|
5684
|
-
};
|
|
5685
|
-
var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5686
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
5687
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5688
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5689
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
5690
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
5691
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
5692
|
-
});
|
|
5693
|
-
};
|
|
5694
|
-
var __generator = (commonjsGlobal && commonjsGlobal.__generator) || function (thisArg, body) {
|
|
5695
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
5696
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
5697
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
5698
|
-
function step(op) {
|
|
5699
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
5700
|
-
while (_) try {
|
|
5701
|
-
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;
|
|
5702
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
5703
|
-
switch (op[0]) {
|
|
5704
|
-
case 0: case 1: t = op; break;
|
|
5705
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
5706
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
5707
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
5708
|
-
default:
|
|
5709
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
5710
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
5711
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
5712
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
5713
|
-
if (t[2]) _.ops.pop();
|
|
5714
|
-
_.trys.pop(); continue;
|
|
5715
|
-
}
|
|
5716
|
-
op = body.call(thisArg, _);
|
|
5717
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
5718
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
5719
|
-
}
|
|
5720
|
-
};
|
|
5721
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5722
|
-
exports.GraphQLWebSocketClient = void 0;
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
var CONNECTION_INIT = 'connection_init';
|
|
5726
|
-
var CONNECTION_ACK = 'connection_ack';
|
|
5727
|
-
var PING = 'ping';
|
|
5728
|
-
var PONG = 'pong';
|
|
5729
|
-
var SUBSCRIBE = 'subscribe';
|
|
5730
|
-
var NEXT = 'next';
|
|
5731
|
-
var ERROR = 'error';
|
|
5732
|
-
var COMPLETE = 'complete';
|
|
5733
|
-
var GraphQLWebSocketMessage = /** @class */ (function () {
|
|
5734
|
-
function GraphQLWebSocketMessage(type, payload, id) {
|
|
5735
|
-
this._type = type;
|
|
5736
|
-
this._payload = payload;
|
|
5737
|
-
this._id = id;
|
|
5738
|
-
}
|
|
5739
|
-
Object.defineProperty(GraphQLWebSocketMessage.prototype, "type", {
|
|
5740
|
-
get: function () { return this._type; },
|
|
5741
|
-
enumerable: false,
|
|
5742
|
-
configurable: true
|
|
5743
|
-
});
|
|
5744
|
-
Object.defineProperty(GraphQLWebSocketMessage.prototype, "id", {
|
|
5745
|
-
get: function () { return this._id; },
|
|
5746
|
-
enumerable: false,
|
|
5747
|
-
configurable: true
|
|
5748
|
-
});
|
|
5749
|
-
Object.defineProperty(GraphQLWebSocketMessage.prototype, "payload", {
|
|
5750
|
-
get: function () { return this._payload; },
|
|
5751
|
-
enumerable: false,
|
|
5752
|
-
configurable: true
|
|
5753
|
-
});
|
|
5754
|
-
Object.defineProperty(GraphQLWebSocketMessage.prototype, "text", {
|
|
5755
|
-
get: function () {
|
|
5756
|
-
var result = { type: this.type };
|
|
5757
|
-
if (this.id != null && this.id != undefined)
|
|
5758
|
-
result.id = this.id;
|
|
5759
|
-
if (this.payload != null && this.payload != undefined)
|
|
5760
|
-
result.payload = this.payload;
|
|
5761
|
-
return JSON.stringify(result);
|
|
5762
|
-
},
|
|
5763
|
-
enumerable: false,
|
|
5764
|
-
configurable: true
|
|
5765
|
-
});
|
|
5766
|
-
GraphQLWebSocketMessage.parse = function (data, f) {
|
|
5767
|
-
var _a = JSON.parse(data), type = _a.type, payload = _a.payload, id = _a.id;
|
|
5768
|
-
return new GraphQLWebSocketMessage(type, f(payload), id);
|
|
5769
|
-
};
|
|
5770
|
-
return GraphQLWebSocketMessage;
|
|
5771
|
-
}());
|
|
5772
|
-
var GraphQLWebSocketClient = /** @class */ (function () {
|
|
5773
|
-
function GraphQLWebSocketClient(socket, _a) {
|
|
5774
|
-
var _this = this;
|
|
5775
|
-
var onInit = _a.onInit, onAcknowledged = _a.onAcknowledged, onPing = _a.onPing, onPong = _a.onPong;
|
|
5776
|
-
this.socketState = { acknowledged: false, lastRequestId: 0, subscriptions: {} };
|
|
5777
|
-
this.socket = socket;
|
|
5778
|
-
socket.onopen = function (e) { return __awaiter(_this, void 0, void 0, function () {
|
|
5779
|
-
var _a, _b, _c, _d;
|
|
5780
|
-
return __generator(this, function (_e) {
|
|
5781
|
-
switch (_e.label) {
|
|
5782
|
-
case 0:
|
|
5783
|
-
this.socketState.acknowledged = false;
|
|
5784
|
-
this.socketState.subscriptions = {};
|
|
5785
|
-
_b = (_a = socket).send;
|
|
5786
|
-
_c = ConnectionInit;
|
|
5787
|
-
if (!onInit) return [3 /*break*/, 2];
|
|
5788
|
-
return [4 /*yield*/, onInit()];
|
|
5789
|
-
case 1:
|
|
5790
|
-
_d = _e.sent();
|
|
5791
|
-
return [3 /*break*/, 3];
|
|
5792
|
-
case 2:
|
|
5793
|
-
_d = null;
|
|
5794
|
-
_e.label = 3;
|
|
5795
|
-
case 3:
|
|
5796
|
-
_b.apply(_a, [_c.apply(void 0, [_d]).text]);
|
|
5797
|
-
return [2 /*return*/];
|
|
5798
|
-
}
|
|
5799
|
-
});
|
|
5800
|
-
}); };
|
|
5801
|
-
socket.onclose = function (e) {
|
|
5802
|
-
_this.socketState.acknowledged = false;
|
|
5803
|
-
_this.socketState.subscriptions = {};
|
|
5804
|
-
};
|
|
5805
|
-
socket.onerror = function (e) {
|
|
5806
|
-
console.error(e);
|
|
5807
|
-
};
|
|
5808
|
-
socket.onmessage = function (e) {
|
|
5809
|
-
try {
|
|
5810
|
-
var message = parseMessage(e.data);
|
|
5811
|
-
switch (message.type) {
|
|
5812
|
-
case CONNECTION_ACK: {
|
|
5813
|
-
if (_this.socketState.acknowledged) {
|
|
5814
|
-
console.warn("Duplicate CONNECTION_ACK message ignored");
|
|
5815
|
-
}
|
|
5816
|
-
else {
|
|
5817
|
-
_this.socketState.acknowledged = true;
|
|
5818
|
-
if (onAcknowledged)
|
|
5819
|
-
onAcknowledged(message.payload);
|
|
5820
|
-
}
|
|
5821
|
-
return;
|
|
5822
|
-
}
|
|
5823
|
-
case PING: {
|
|
5824
|
-
if (onPing)
|
|
5825
|
-
onPing(message.payload).then(function (r) { return socket.send(Pong(r).text); });
|
|
5826
|
-
else
|
|
5827
|
-
socket.send(Pong(null).text);
|
|
5828
|
-
return;
|
|
5829
|
-
}
|
|
5830
|
-
case PONG: {
|
|
5831
|
-
if (onPong)
|
|
5832
|
-
onPong(message.payload);
|
|
5833
|
-
return;
|
|
5834
|
-
}
|
|
5835
|
-
}
|
|
5836
|
-
if (!_this.socketState.acknowledged) {
|
|
5837
|
-
// Web-socket connection not acknowledged
|
|
5838
|
-
return;
|
|
5839
|
-
}
|
|
5840
|
-
if (message.id === undefined || message.id === null || !_this.socketState.subscriptions[message.id]) {
|
|
5841
|
-
// No subscription identifer or subscription indentifier is not found
|
|
5842
|
-
return;
|
|
5843
|
-
}
|
|
5844
|
-
var _a = _this.socketState.subscriptions[message.id], query = _a.query, variables = _a.variables, subscriber = _a.subscriber;
|
|
5845
|
-
switch (message.type) {
|
|
5846
|
-
case NEXT: {
|
|
5847
|
-
if (!message.payload.errors && message.payload.data) {
|
|
5848
|
-
subscriber.next && subscriber.next(message.payload.data);
|
|
5849
|
-
}
|
|
5850
|
-
if (message.payload.errors) {
|
|
5851
|
-
subscriber.error && subscriber.error(new types.ClientError(__assign(__assign({}, message.payload), { status: 200 }), { query: query, variables: variables }));
|
|
5852
|
-
}
|
|
5853
|
-
return;
|
|
5854
|
-
}
|
|
5855
|
-
case ERROR: {
|
|
5856
|
-
subscriber.error && subscriber.error(new types.ClientError({ errors: message.payload, status: 200 }, { query: query, variables: variables }));
|
|
5857
|
-
return;
|
|
5858
|
-
}
|
|
5859
|
-
case COMPLETE: {
|
|
5860
|
-
subscriber.complete && subscriber.complete();
|
|
5861
|
-
delete _this.socketState.subscriptions[message.id];
|
|
5862
|
-
return;
|
|
5863
|
-
}
|
|
5864
|
-
}
|
|
5865
|
-
}
|
|
5866
|
-
catch (e) {
|
|
5867
|
-
// Unexpected errors while handling graphql-ws message
|
|
5868
|
-
console.error(e);
|
|
5869
|
-
socket.close(1006);
|
|
5870
|
-
}
|
|
5871
|
-
socket.close(4400, "Unknown graphql-ws message.");
|
|
5872
|
-
};
|
|
5873
|
-
}
|
|
5874
|
-
GraphQLWebSocketClient.prototype.makeSubscribe = function (query, operationName, variables, subscriber) {
|
|
5875
|
-
var _this = this;
|
|
5876
|
-
var subscriptionId = (this.socketState.lastRequestId++).toString();
|
|
5877
|
-
this.socketState.subscriptions[subscriptionId] = { query: query, variables: variables, subscriber: subscriber };
|
|
5878
|
-
this.socket.send(Subscribe(subscriptionId, { query: query, operationName: operationName, variables: variables }).text);
|
|
5879
|
-
return function () {
|
|
5880
|
-
_this.socket.send(Complete(subscriptionId).text);
|
|
5881
|
-
delete _this.socketState.subscriptions[subscriptionId];
|
|
5882
|
-
};
|
|
5883
|
-
};
|
|
5884
|
-
GraphQLWebSocketClient.prototype.rawRequest = function (query, variables) {
|
|
5885
|
-
var _this = this;
|
|
5886
|
-
return new Promise(function (resolve, reject) {
|
|
5887
|
-
var result;
|
|
5888
|
-
_this.rawSubscribe(query, {
|
|
5889
|
-
next: function (data, extensions) { return (result = { data: data, extensions: extensions }); },
|
|
5890
|
-
error: reject,
|
|
5891
|
-
complete: function () { return resolve(result); },
|
|
5892
|
-
}, variables);
|
|
5893
|
-
});
|
|
5894
|
-
};
|
|
5895
|
-
GraphQLWebSocketClient.prototype.request = function (document, variables) {
|
|
5896
|
-
var _this = this;
|
|
5897
|
-
return new Promise(function (resolve, reject) {
|
|
5898
|
-
var result;
|
|
5899
|
-
_this.subscribe(document, {
|
|
5900
|
-
next: function (data) { return (result = data); },
|
|
5901
|
-
error: reject,
|
|
5902
|
-
complete: function () { return resolve(result); },
|
|
5903
|
-
}, variables);
|
|
5904
|
-
});
|
|
5905
|
-
};
|
|
5906
|
-
GraphQLWebSocketClient.prototype.subscribe = function (document, subscriber, variables) {
|
|
5907
|
-
var _a = dist.resolveRequestDocument(document), query = _a.query, operationName = _a.operationName;
|
|
5908
|
-
return this.makeSubscribe(query, operationName, variables, subscriber);
|
|
5909
|
-
};
|
|
5910
|
-
GraphQLWebSocketClient.prototype.rawSubscribe = function (query, subscriber, variables) {
|
|
5911
|
-
return this.makeSubscribe(query, undefined, variables, subscriber);
|
|
5912
|
-
};
|
|
5913
|
-
GraphQLWebSocketClient.prototype.ping = function (payload) {
|
|
5914
|
-
this.socket.send(Ping(payload).text);
|
|
5915
|
-
};
|
|
5916
|
-
GraphQLWebSocketClient.prototype.close = function () {
|
|
5917
|
-
this.socket.close(1000);
|
|
5918
|
-
};
|
|
5919
|
-
GraphQLWebSocketClient.PROTOCOL = "graphql-transport-ws";
|
|
5920
|
-
return GraphQLWebSocketClient;
|
|
5921
|
-
}());
|
|
5922
|
-
exports.GraphQLWebSocketClient = GraphQLWebSocketClient;
|
|
5923
|
-
// Helper functions
|
|
5924
|
-
function parseMessage(data, f) {
|
|
5925
|
-
if (f === void 0) { f = function (a) { return a; }; }
|
|
5926
|
-
var m = GraphQLWebSocketMessage.parse(data, f);
|
|
5927
|
-
return m;
|
|
5928
|
-
}
|
|
5929
|
-
function ConnectionInit(payload) {
|
|
5930
|
-
return new GraphQLWebSocketMessage(CONNECTION_INIT, payload);
|
|
5931
|
-
}
|
|
5932
|
-
function Ping(payload) {
|
|
5933
|
-
return new GraphQLWebSocketMessage(PING, payload, undefined);
|
|
5934
|
-
}
|
|
5935
|
-
function Pong(payload) {
|
|
5936
|
-
return new GraphQLWebSocketMessage(PONG, payload, undefined);
|
|
5937
|
-
}
|
|
5938
|
-
function Subscribe(id, payload) {
|
|
5939
|
-
return new GraphQLWebSocketMessage(SUBSCRIBE, payload, id);
|
|
5940
|
-
}
|
|
5941
|
-
function Complete(id) {
|
|
5942
|
-
return new GraphQLWebSocketMessage(COMPLETE, undefined, id);
|
|
5943
|
-
}
|
|
5944
|
-
//# sourceMappingURL=graphql-ws.js.map
|
|
5945
|
-
});
|
|
5946
|
-
|
|
5947
|
-
var dist = createCommonjsModule(function (module, exports) {
|
|
5948
|
-
var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
|
|
5658
|
+
var dist = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
5659
|
+
var __assign = (_commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.__assign) || function () {
|
|
5949
5660
|
__assign = Object.assign || function(t) {
|
|
5950
5661
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5951
5662
|
s = arguments[i];
|
|
@@ -5956,26 +5667,26 @@ var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
|
|
|
5956
5667
|
};
|
|
5957
5668
|
return __assign.apply(this, arguments);
|
|
5958
5669
|
};
|
|
5959
|
-
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5670
|
+
var __createBinding = (_commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5960
5671
|
if (k2 === undefined) k2 = k;
|
|
5961
5672
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5962
5673
|
}) : (function(o, m, k, k2) {
|
|
5963
5674
|
if (k2 === undefined) k2 = k;
|
|
5964
5675
|
o[k2] = m[k];
|
|
5965
5676
|
}));
|
|
5966
|
-
var __setModuleDefault = (commonjsGlobal && commonjsGlobal.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
5677
|
+
var __setModuleDefault = (_commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
5967
5678
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
5968
5679
|
}) : function(o, v) {
|
|
5969
5680
|
o["default"] = v;
|
|
5970
5681
|
});
|
|
5971
|
-
var __importStar = (commonjsGlobal && commonjsGlobal.__importStar) || function (mod) {
|
|
5682
|
+
var __importStar = (_commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.__importStar) || function (mod) {
|
|
5972
5683
|
if (mod && mod.__esModule) return mod;
|
|
5973
5684
|
var result = {};
|
|
5974
5685
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
5975
5686
|
__setModuleDefault(result, mod);
|
|
5976
5687
|
return result;
|
|
5977
5688
|
};
|
|
5978
|
-
var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5689
|
+
var __awaiter = (_commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5979
5690
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
5980
5691
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5981
5692
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -5984,7 +5695,7 @@ var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisAr
|
|
|
5984
5695
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
5985
5696
|
});
|
|
5986
5697
|
};
|
|
5987
|
-
var __generator = (commonjsGlobal && commonjsGlobal.__generator) || function (thisArg, body) {
|
|
5698
|
+
var __generator = (_commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.__generator) || function (thisArg, body) {
|
|
5988
5699
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
5989
5700
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
5990
5701
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -6011,7 +5722,7 @@ var __generator = (commonjsGlobal && commonjsGlobal.__generator) || function (th
|
|
|
6011
5722
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
6012
5723
|
}
|
|
6013
5724
|
};
|
|
6014
|
-
var __rest = (commonjsGlobal && commonjsGlobal.__rest) || function (s, e) {
|
|
5725
|
+
var __rest = (_commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.__rest) || function (s, e) {
|
|
6015
5726
|
var t = {};
|
|
6016
5727
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
6017
5728
|
t[p] = s[p];
|
|
@@ -6022,11 +5733,11 @@ var __rest = (commonjsGlobal && commonjsGlobal.__rest) || function (s, e) {
|
|
|
6022
5733
|
}
|
|
6023
5734
|
return t;
|
|
6024
5735
|
};
|
|
6025
|
-
var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
5736
|
+
var __importDefault = (_commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.__importDefault) || function (mod) {
|
|
6026
5737
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
6027
5738
|
};
|
|
6028
5739
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6029
|
-
exports.
|
|
5740
|
+
exports.gql = exports.batchRequests = exports.request = exports.rawRequest = exports.GraphQLClient = exports.ClientError = void 0;
|
|
6030
5741
|
var cross_fetch_1 = __importStar(browserPonyfill), CrossFetch = cross_fetch_1;
|
|
6031
5742
|
|
|
6032
5743
|
|
|
@@ -6160,7 +5871,7 @@ var GraphQLClient = /** @class */ (function () {
|
|
|
6160
5871
|
url: url,
|
|
6161
5872
|
query: rawRequestOptions.query,
|
|
6162
5873
|
variables: rawRequestOptions.variables,
|
|
6163
|
-
headers: __assign(__assign({}, resolveHeaders(
|
|
5874
|
+
headers: __assign(__assign({}, resolveHeaders(headers)), resolveHeaders(rawRequestOptions.requestHeaders)),
|
|
6164
5875
|
operationName: operationName,
|
|
6165
5876
|
fetch: fetch,
|
|
6166
5877
|
method: method,
|
|
@@ -6186,7 +5897,7 @@ var GraphQLClient = /** @class */ (function () {
|
|
|
6186
5897
|
url: url,
|
|
6187
5898
|
query: query,
|
|
6188
5899
|
variables: requestOptions.variables,
|
|
6189
|
-
headers: __assign(__assign({}, resolveHeaders(
|
|
5900
|
+
headers: __assign(__assign({}, resolveHeaders(headers)), resolveHeaders(requestOptions.requestHeaders)),
|
|
6190
5901
|
operationName: operationName,
|
|
6191
5902
|
fetch: fetch,
|
|
6192
5903
|
method: method,
|
|
@@ -6223,7 +5934,7 @@ var GraphQLClient = /** @class */ (function () {
|
|
|
6223
5934
|
url: url,
|
|
6224
5935
|
query: queries,
|
|
6225
5936
|
variables: variables,
|
|
6226
|
-
headers: __assign(__assign({}, resolveHeaders(
|
|
5937
|
+
headers: __assign(__assign({}, resolveHeaders(headers)), resolveHeaders(batchRequestOptions.requestHeaders)),
|
|
6227
5938
|
operationName: undefined,
|
|
6228
5939
|
fetch: fetch,
|
|
6229
5940
|
method: method,
|
|
@@ -6269,7 +5980,7 @@ exports.GraphQLClient = GraphQLClient;
|
|
|
6269
5980
|
function makeRequest(_a) {
|
|
6270
5981
|
var url = _a.url, query = _a.query, variables = _a.variables, headers = _a.headers, operationName = _a.operationName, fetch = _a.fetch, _b = _a.method, method = _b === void 0 ? 'POST' : _b, fetchOptions = _a.fetchOptions;
|
|
6271
5982
|
return __awaiter(this, void 0, void 0, function () {
|
|
6272
|
-
var fetcher, isBathchingQuery, response, result, successfullyReceivedData,
|
|
5983
|
+
var fetcher, isBathchingQuery, response, result, successfullyReceivedData, headers_1, status_1, errorResult;
|
|
6273
5984
|
return __generator(this, function (_c) {
|
|
6274
5985
|
switch (_c.label) {
|
|
6275
5986
|
case 0:
|
|
@@ -6293,12 +6004,9 @@ function makeRequest(_a) {
|
|
|
6293
6004
|
var data = _a.data;
|
|
6294
6005
|
return !data;
|
|
6295
6006
|
}) : !!result.data;
|
|
6296
|
-
|
|
6297
|
-
if (response.ok && successfullyPassedErrorPolicy && successfullyReceivedData) {
|
|
6007
|
+
if (response.ok && !result.errors && successfullyReceivedData) {
|
|
6298
6008
|
headers_1 = response.headers, status_1 = response.status;
|
|
6299
|
-
|
|
6300
|
-
data = fetchOptions.errorPolicy === 'ignore' ? rest : result;
|
|
6301
|
-
return [2 /*return*/, __assign(__assign({}, (isBathchingQuery ? { data: data } : data)), { headers: headers_1, status: status_1 })];
|
|
6009
|
+
return [2 /*return*/, __assign(__assign({}, (isBathchingQuery ? { data: result } : result)), { headers: headers_1, status: status_1 })];
|
|
6302
6010
|
}
|
|
6303
6011
|
else {
|
|
6304
6012
|
errorResult = typeof result === 'string' ? { error: result } : result;
|
|
@@ -6393,10 +6101,6 @@ function resolveRequestDocument(document) {
|
|
|
6393
6101
|
var operationName = extractOperationName(document);
|
|
6394
6102
|
return { query: printer.print(document), operationName: operationName };
|
|
6395
6103
|
}
|
|
6396
|
-
exports.resolveRequestDocument = resolveRequestDocument;
|
|
6397
|
-
function callOrIdentity(value) {
|
|
6398
|
-
return typeof value === 'function' ? value() : value;
|
|
6399
|
-
}
|
|
6400
6104
|
/**
|
|
6401
6105
|
* Convenience passthrough template tag to get the benefits of tooling for the gql template tag. This does not actually parse the input into a GraphQL DocumentNode like graphql-tag package does. It just returns the string with any variables given interpolated. Can save you a bit of performance and having to install another package.
|
|
6402
6106
|
*
|
|
@@ -6428,8 +6132,6 @@ function HeadersInstanceToPlainObject(headers) {
|
|
|
6428
6132
|
});
|
|
6429
6133
|
return o;
|
|
6430
6134
|
}
|
|
6431
|
-
|
|
6432
|
-
Object.defineProperty(exports, "GraphQLWebSocketClient", { enumerable: true, get: function () { return graphqlWs.GraphQLWebSocketClient; } });
|
|
6433
6135
|
//# sourceMappingURL=index.js.map
|
|
6434
6136
|
});
|
|
6435
6137
|
|