@sankhyalabs/sankhyablocks 1.3.31-beta.14 → 1.3.31-beta.17
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/{SnkMessageBuilder-bb55d4c4.js → SnkMessageBuilder-cb132e6d.js} +134 -1
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/css-shim-b8158822.js +6 -0
- package/dist/cjs/dom-36862b77.js +75 -0
- package/dist/cjs/filter-item-type.enum-e2e1bc5b.js +14 -0
- package/dist/cjs/index-02201bc9.js +2397 -0
- package/dist/cjs/index-b0b676c5.js +3298 -0
- package/dist/cjs/loader.cjs.js +19 -3
- package/dist/cjs/sankhyablocks.cjs.js +117 -5
- package/dist/cjs/shadow-css-346c0795.js +389 -0
- package/dist/cjs/snk-application.cjs.entry.js +542 -66
- package/dist/cjs/snk-crud.cjs.entry.js +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +23 -24
- package/dist/cjs/snk-filter-bar.cjs.entry.js +199 -0
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +47 -0
- package/dist/cjs/snk-filter-detail.cjs.entry.js +44 -0
- package/dist/cjs/snk-filter-item.cjs.entry.js +131 -0
- package/dist/cjs/snk-filter-list.cjs.entry.js +91 -0
- package/dist/cjs/snk-filter-number.cjs.entry.js +23 -0
- package/dist/cjs/snk-filter-period.cjs.entry.js +26 -0
- package/dist/cjs/snk-filter-search.cjs.entry.js +44 -0
- package/dist/cjs/snk-filter-text.cjs.entry.js +22 -0
- package/dist/cjs/{snk-form_2.cjs.entry.js → snk-form.cjs.entry.js} +3 -65
- package/dist/cjs/snk-grid.cjs.entry.js +69 -0
- package/dist/cjs/snk-pesquisa.cjs.entry.js +5 -5
- package/dist/cjs/snk-taskbar.cjs.entry.js +5 -4
- package/dist/cjs/{taskbar-elements-2888ceb6.js → taskbar-elements-efa44ff1.js} +1 -1
- package/dist/cjs/teste-pesquisa.cjs.entry.js +5 -5
- package/dist/collection/collection-manifest.json +11 -2
- package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +7 -0
- package/dist/collection/components/snk-application/snk-application.js +775 -695
- package/dist/collection/components/snk-crud/snk-crud.js +75 -73
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +262 -250
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +88 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +64 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +69 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +118 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +63 -0
- package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type.enum.js +10 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +113 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +209 -0
- package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js +182 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +99 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +257 -0
- package/dist/collection/components/snk-form/snk-form.js +111 -111
- package/dist/collection/components/snk-grid/snk-grid.css +14 -1
- package/dist/collection/components/snk-grid/snk-grid.js +93 -92
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +80 -79
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +1 -2
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +128 -116
- package/dist/collection/components/teste-pesquisa/teste-pesquisa.js +12 -9
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +24 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +1 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +268 -0
- package/dist/collection/lib/message/SnkMessageBuilder.js +3 -1
- package/dist/collection/lib/message/resources/snk-data-unit.msg.js +1 -0
- package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +14 -0
- package/dist/components/SnkMessageBuilder.js +134 -2
- package/dist/components/filter-item-type.enum.js +12 -0
- package/dist/components/index.d.ts +17 -5
- package/dist/components/index.js +21 -0
- package/dist/components/index2.js +2384 -0
- package/dist/components/snk-application2.js +508 -30
- package/dist/components/snk-crud.js +25 -1
- package/dist/components/snk-data-unit.js +3 -4
- package/dist/components/snk-filter-bar.d.ts +11 -0
- package/dist/components/snk-filter-bar.js +6 -0
- package/dist/components/snk-filter-bar2.js +230 -0
- package/dist/components/snk-filter-binary-select.d.ts +11 -0
- package/dist/components/snk-filter-binary-select.js +63 -0
- package/dist/components/snk-filter-detail.d.ts +11 -0
- package/dist/components/snk-filter-detail.js +6 -0
- package/dist/components/snk-filter-detail2.js +58 -0
- package/dist/components/snk-filter-item.d.ts +11 -0
- package/dist/components/snk-filter-item.js +6 -0
- package/dist/components/snk-filter-item2.js +151 -0
- package/dist/components/snk-filter-list.d.ts +11 -0
- package/dist/components/snk-filter-list.js +6 -0
- package/dist/components/snk-filter-list2.js +108 -0
- package/dist/components/snk-filter-number.d.ts +11 -0
- package/dist/components/snk-filter-number.js +39 -0
- package/dist/components/snk-filter-period.d.ts +11 -0
- package/dist/components/snk-filter-period.js +42 -0
- package/dist/components/snk-filter-search.d.ts +11 -0
- package/dist/components/snk-filter-search.js +62 -0
- package/dist/components/snk-filter-text.d.ts +11 -0
- package/dist/components/snk-filter-text.js +38 -0
- package/dist/components/snk-form2.js +1 -1
- package/dist/components/snk-grid2.js +28 -4
- package/dist/components/snk-pesquisa2.js +1 -1
- package/dist/components/snk-taskbar2.js +2 -1
- package/dist/components/teste-pesquisa.js +1 -1
- package/dist/esm/{SnkMessageBuilder-17d91b88.js → SnkMessageBuilder-cff80920.js} +134 -2
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/css-shim-b3f2ee8d.js +4 -0
- package/dist/esm/dom-665d6011.js +73 -0
- package/dist/esm/filter-item-type.enum-61fbf80a.js +12 -0
- package/dist/esm/index-2b4d2d14.js +3262 -0
- package/dist/esm/index-e5b61043.js +2384 -0
- package/dist/esm/loader.js +19 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/sankhyablocks.js +117 -5
- package/dist/esm/shadow-css-b18e99d7.js +387 -0
- package/dist/esm/snk-application.entry.js +507 -31
- package/dist/esm/snk-crud.entry.js +1 -1
- package/dist/esm/snk-data-unit.entry.js +4 -5
- package/dist/esm/snk-filter-bar.entry.js +195 -0
- package/dist/esm/snk-filter-binary-select.entry.js +43 -0
- package/dist/esm/snk-filter-detail.entry.js +40 -0
- package/dist/esm/snk-filter-item.entry.js +127 -0
- package/dist/esm/snk-filter-list.entry.js +87 -0
- package/dist/esm/snk-filter-number.entry.js +19 -0
- package/dist/esm/snk-filter-period.entry.js +22 -0
- package/dist/esm/snk-filter-search.entry.js +40 -0
- package/dist/esm/snk-filter-text.entry.js +18 -0
- package/dist/esm/{snk-form_2.entry.js → snk-form.entry.js} +3 -64
- package/dist/esm/snk-grid.entry.js +65 -0
- package/dist/esm/snk-pesquisa.entry.js +2 -2
- package/dist/esm/snk-taskbar.entry.js +4 -3
- package/dist/esm/{taskbar-elements-5ea74223.js → taskbar-elements-c119510a.js} +1 -1
- package/dist/esm/teste-pesquisa.entry.js +2 -2
- package/dist/sankhyablocks/SnkMessageBuilder-cff80920.js +299 -0
- package/dist/sankhyablocks/app-globals-0f993ce5.js +3 -0
- package/dist/sankhyablocks/css-shim-b3f2ee8d.js +4 -0
- package/dist/sankhyablocks/dom-665d6011.js +73 -0
- package/dist/sankhyablocks/filter-item-type.enum-61fbf80a.js +12 -0
- package/dist/sankhyablocks/index-2b4d2d14.js +3262 -0
- package/dist/sankhyablocks/index-e5b61043.js +2384 -0
- package/dist/sankhyablocks/index.esm.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +129 -1
- package/dist/sankhyablocks/shadow-css-b18e99d7.js +387 -0
- package/dist/sankhyablocks/snk-application.entry.js +8306 -0
- package/dist/sankhyablocks/snk-crud.entry.js +60 -0
- package/dist/sankhyablocks/snk-data-unit.entry.js +272 -0
- package/dist/sankhyablocks/snk-filter-bar.entry.js +195 -0
- package/dist/sankhyablocks/snk-filter-binary-select.entry.js +43 -0
- package/dist/sankhyablocks/snk-filter-detail.entry.js +40 -0
- package/dist/sankhyablocks/snk-filter-item.entry.js +127 -0
- package/dist/sankhyablocks/snk-filter-list.entry.js +87 -0
- package/dist/sankhyablocks/snk-filter-number.entry.js +19 -0
- package/dist/sankhyablocks/snk-filter-period.entry.js +22 -0
- package/dist/sankhyablocks/snk-filter-search.entry.js +40 -0
- package/dist/sankhyablocks/snk-filter-text.entry.js +18 -0
- package/dist/sankhyablocks/snk-form.entry.js +111 -0
- package/dist/sankhyablocks/snk-grid.entry.js +65 -0
- package/dist/sankhyablocks/snk-pesquisa.entry.js +311 -0
- package/dist/sankhyablocks/snk-taskbar.entry.js +153 -0
- package/dist/sankhyablocks/taskbar-elements-c119510a.js +72 -0
- package/dist/sankhyablocks/teste-pesquisa.entry.js +33 -0
- package/dist/types/components/snk-application/errorhandler/snk-error-handler.d.ts +1 -0
- package/dist/types/components/snk-application/snk-application.d.ts +9 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.d.ts +12 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +7 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +13 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +12 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-text.d.ts +7 -0
- package/dist/types/components/snk-filter-bar/filter-item/filter-item-type.enum.d.ts +9 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +13 -0
- package/dist/types/components/snk-filter-bar/filter-list/snk-filter-list.d.ts +37 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +43 -0
- package/dist/types/components.d.ts +199 -0
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.d.ts +5 -0
- package/dist/types/lib/message/resources/snk-filter-bar.msg.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +15 -4
- package/loader/package.json +1 -0
- package/package.json +5 -5
- package/react/components.d.ts +0 -7
- package/react/components.js +0 -7
- package/react/components.js.map +1 -1
- package/dist/cjs/index-c6671817.js +0 -1642
- package/dist/esm/index-6a83ac96.js +0 -1614
- package/dist/sankhyablocks/p-4c7b32d6.entry.js +0 -1
- package/dist/sankhyablocks/p-56a32417.entry.js +0 -1
- package/dist/sankhyablocks/p-825d2c38.entry.js +0 -74
- package/dist/sankhyablocks/p-ab694dbc.js +0 -1
- package/dist/sankhyablocks/p-b559117b.js +0 -1
- package/dist/sankhyablocks/p-cd1dc099.js +0 -2
- package/dist/sankhyablocks/p-ce2d1214.entry.js +0 -1
- package/dist/sankhyablocks/p-d25637c9.entry.js +0 -1
- package/dist/sankhyablocks/p-d25803a1.entry.js +0 -1
- package/dist/sankhyablocks/p-edf81d2c.entry.js +0 -1
|
@@ -2,23 +2,50 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
5
|
+
const index$2 = require('./index-b0b676c5.js');
|
|
6
|
+
const index$1 = require('./index-02201bc9.js');
|
|
7
|
+
const SnkMessageBuilder = require('./SnkMessageBuilder-cb132e6d.js');
|
|
8
|
+
const filterItemType_enum = require('./filter-item-type.enum-e2e1bc5b.js');
|
|
9
9
|
|
|
10
10
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
11
11
|
|
|
12
|
+
function getDefaultExportFromCjs (x) {
|
|
13
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
14
|
+
}
|
|
15
|
+
|
|
12
16
|
function createCommonjsModule(fn, basedir, module) {
|
|
13
17
|
return module = {
|
|
14
18
|
path: basedir,
|
|
15
19
|
exports: {},
|
|
16
20
|
require: function (path, base) {
|
|
17
|
-
return commonjsRequire();
|
|
21
|
+
return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
|
|
18
22
|
}
|
|
19
23
|
}, fn(module, module.exports), module.exports;
|
|
20
24
|
}
|
|
21
25
|
|
|
26
|
+
function getDefaultExportFromNamespaceIfPresent (n) {
|
|
27
|
+
return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function getDefaultExportFromNamespaceIfNotNamed (n) {
|
|
31
|
+
return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function getAugmentedNamespace(n) {
|
|
35
|
+
if (n.__esModule) return n;
|
|
36
|
+
var a = Object.defineProperty({}, '__esModule', {value: true});
|
|
37
|
+
Object.keys(n).forEach(function (k) {
|
|
38
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
39
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function () {
|
|
42
|
+
return n[k];
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
return a;
|
|
47
|
+
}
|
|
48
|
+
|
|
22
49
|
function commonjsRequire () {
|
|
23
50
|
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
24
51
|
}
|
|
@@ -35,7 +62,7 @@ return new F();
|
|
|
35
62
|
})();
|
|
36
63
|
(function(self) {
|
|
37
64
|
|
|
38
|
-
(
|
|
65
|
+
var irrelevant = (function (exports) {
|
|
39
66
|
|
|
40
67
|
var support = {
|
|
41
68
|
searchParams: 'URLSearchParams' in self,
|
|
@@ -563,7 +590,7 @@ return new F();
|
|
|
563
590
|
|
|
564
591
|
return exports;
|
|
565
592
|
|
|
566
|
-
})
|
|
593
|
+
})({});
|
|
567
594
|
})(__self__);
|
|
568
595
|
__self__.fetch.ponyfill = true;
|
|
569
596
|
// Remove "polyfill" property added by whatwg-fetch
|
|
@@ -580,7 +607,10 @@ exports.Response = ctx.Response;
|
|
|
580
607
|
module.exports = exports;
|
|
581
608
|
});
|
|
582
609
|
|
|
610
|
+
const browserPonyfill$1 = /*@__PURE__*/getDefaultExportFromCjs(browserPonyfill);
|
|
611
|
+
|
|
583
612
|
var isObjectLike_1 = createCommonjsModule(function (module, exports) {
|
|
613
|
+
'use strict';
|
|
584
614
|
|
|
585
615
|
Object.defineProperty(exports, '__esModule', {
|
|
586
616
|
value: true,
|
|
@@ -596,7 +626,10 @@ function isObjectLike(value) {
|
|
|
596
626
|
}
|
|
597
627
|
});
|
|
598
628
|
|
|
629
|
+
const isObjectLike = /*@__PURE__*/getDefaultExportFromCjs(isObjectLike_1);
|
|
630
|
+
|
|
599
631
|
var invariant_1 = createCommonjsModule(function (module, exports) {
|
|
632
|
+
'use strict';
|
|
600
633
|
|
|
601
634
|
Object.defineProperty(exports, '__esModule', {
|
|
602
635
|
value: true,
|
|
@@ -614,7 +647,10 @@ function invariant(condition, message) {
|
|
|
614
647
|
}
|
|
615
648
|
});
|
|
616
649
|
|
|
650
|
+
const invariant = /*@__PURE__*/getDefaultExportFromCjs(invariant_1);
|
|
651
|
+
|
|
617
652
|
var location_1 = createCommonjsModule(function (module, exports) {
|
|
653
|
+
'use strict';
|
|
618
654
|
|
|
619
655
|
Object.defineProperty(exports, '__esModule', {
|
|
620
656
|
value: true,
|
|
@@ -654,7 +690,10 @@ function getLocation(source, position) {
|
|
|
654
690
|
}
|
|
655
691
|
});
|
|
656
692
|
|
|
693
|
+
const location$1 = /*@__PURE__*/getDefaultExportFromCjs(location_1);
|
|
694
|
+
|
|
657
695
|
var printLocation_1 = createCommonjsModule(function (module, exports) {
|
|
696
|
+
'use strict';
|
|
658
697
|
|
|
659
698
|
Object.defineProperty(exports, '__esModule', {
|
|
660
699
|
value: true,
|
|
@@ -730,7 +769,10 @@ function printPrefixedLines(lines) {
|
|
|
730
769
|
}
|
|
731
770
|
});
|
|
732
771
|
|
|
772
|
+
const printLocation = /*@__PURE__*/getDefaultExportFromCjs(printLocation_1);
|
|
773
|
+
|
|
733
774
|
var GraphQLError_1 = createCommonjsModule(function (module, exports) {
|
|
775
|
+
'use strict';
|
|
734
776
|
|
|
735
777
|
Object.defineProperty(exports, '__esModule', {
|
|
736
778
|
value: true,
|
|
@@ -999,7 +1041,10 @@ function formatError(error) {
|
|
|
999
1041
|
}
|
|
1000
1042
|
});
|
|
1001
1043
|
|
|
1044
|
+
const GraphQLError = /*@__PURE__*/getDefaultExportFromCjs(GraphQLError_1);
|
|
1045
|
+
|
|
1002
1046
|
var syntaxError_1 = createCommonjsModule(function (module, exports) {
|
|
1047
|
+
'use strict';
|
|
1003
1048
|
|
|
1004
1049
|
Object.defineProperty(exports, '__esModule', {
|
|
1005
1050
|
value: true,
|
|
@@ -1020,7 +1065,10 @@ function syntaxError(source, position, description) {
|
|
|
1020
1065
|
}
|
|
1021
1066
|
});
|
|
1022
1067
|
|
|
1068
|
+
const syntaxError = /*@__PURE__*/getDefaultExportFromCjs(syntaxError_1);
|
|
1069
|
+
|
|
1023
1070
|
var ast = createCommonjsModule(function (module, exports) {
|
|
1071
|
+
'use strict';
|
|
1024
1072
|
|
|
1025
1073
|
Object.defineProperty(exports, '__esModule', {
|
|
1026
1074
|
value: true,
|
|
@@ -1246,7 +1294,10 @@ exports.OperationTypeNode = OperationTypeNode;
|
|
|
1246
1294
|
})(OperationTypeNode || (exports.OperationTypeNode = OperationTypeNode = {}));
|
|
1247
1295
|
});
|
|
1248
1296
|
|
|
1297
|
+
const ast$1 = /*@__PURE__*/getDefaultExportFromCjs(ast);
|
|
1298
|
+
|
|
1249
1299
|
var directiveLocation = createCommonjsModule(function (module, exports) {
|
|
1300
|
+
'use strict';
|
|
1250
1301
|
|
|
1251
1302
|
Object.defineProperty(exports, '__esModule', {
|
|
1252
1303
|
value: true,
|
|
@@ -1287,7 +1338,10 @@ exports.DirectiveLocation = DirectiveLocation;
|
|
|
1287
1338
|
*/
|
|
1288
1339
|
});
|
|
1289
1340
|
|
|
1341
|
+
const directiveLocation$1 = /*@__PURE__*/getDefaultExportFromCjs(directiveLocation);
|
|
1342
|
+
|
|
1290
1343
|
var kinds = createCommonjsModule(function (module, exports) {
|
|
1344
|
+
'use strict';
|
|
1291
1345
|
|
|
1292
1346
|
Object.defineProperty(exports, '__esModule', {
|
|
1293
1347
|
value: true,
|
|
@@ -1352,7 +1406,10 @@ exports.Kind = Kind;
|
|
|
1352
1406
|
*/
|
|
1353
1407
|
});
|
|
1354
1408
|
|
|
1409
|
+
const kinds$1 = /*@__PURE__*/getDefaultExportFromCjs(kinds);
|
|
1410
|
+
|
|
1355
1411
|
var characterClasses = createCommonjsModule(function (module, exports) {
|
|
1412
|
+
'use strict';
|
|
1356
1413
|
|
|
1357
1414
|
Object.defineProperty(exports, '__esModule', {
|
|
1358
1415
|
value: true,
|
|
@@ -1429,7 +1486,10 @@ function isNameContinue(code) {
|
|
|
1429
1486
|
}
|
|
1430
1487
|
});
|
|
1431
1488
|
|
|
1489
|
+
const characterClasses$1 = /*@__PURE__*/getDefaultExportFromCjs(characterClasses);
|
|
1490
|
+
|
|
1432
1491
|
var blockString = createCommonjsModule(function (module, exports) {
|
|
1492
|
+
'use strict';
|
|
1433
1493
|
|
|
1434
1494
|
Object.defineProperty(exports, '__esModule', {
|
|
1435
1495
|
value: true,
|
|
@@ -1626,7 +1686,10 @@ function printBlockString(value, options) {
|
|
|
1626
1686
|
}
|
|
1627
1687
|
});
|
|
1628
1688
|
|
|
1689
|
+
const blockString$1 = /*@__PURE__*/getDefaultExportFromCjs(blockString);
|
|
1690
|
+
|
|
1629
1691
|
var tokenKind = createCommonjsModule(function (module, exports) {
|
|
1692
|
+
'use strict';
|
|
1630
1693
|
|
|
1631
1694
|
Object.defineProperty(exports, '__esModule', {
|
|
1632
1695
|
value: true,
|
|
@@ -1671,7 +1734,10 @@ exports.TokenKind = TokenKind;
|
|
|
1671
1734
|
*/
|
|
1672
1735
|
});
|
|
1673
1736
|
|
|
1737
|
+
const tokenKind$1 = /*@__PURE__*/getDefaultExportFromCjs(tokenKind);
|
|
1738
|
+
|
|
1674
1739
|
var lexer = createCommonjsModule(function (module, exports) {
|
|
1740
|
+
'use strict';
|
|
1675
1741
|
|
|
1676
1742
|
Object.defineProperty(exports, '__esModule', {
|
|
1677
1743
|
value: true,
|
|
@@ -2679,7 +2745,10 @@ function readName(lexer, start) {
|
|
|
2679
2745
|
}
|
|
2680
2746
|
});
|
|
2681
2747
|
|
|
2748
|
+
const lexer$1 = /*@__PURE__*/getDefaultExportFromCjs(lexer);
|
|
2749
|
+
|
|
2682
2750
|
var devAssert_1 = createCommonjsModule(function (module, exports) {
|
|
2751
|
+
'use strict';
|
|
2683
2752
|
|
|
2684
2753
|
Object.defineProperty(exports, '__esModule', {
|
|
2685
2754
|
value: true,
|
|
@@ -2695,7 +2764,10 @@ function devAssert(condition, message) {
|
|
|
2695
2764
|
}
|
|
2696
2765
|
});
|
|
2697
2766
|
|
|
2767
|
+
const devAssert = /*@__PURE__*/getDefaultExportFromCjs(devAssert_1);
|
|
2768
|
+
|
|
2698
2769
|
var inspect_1 = createCommonjsModule(function (module, exports) {
|
|
2770
|
+
'use strict';
|
|
2699
2771
|
|
|
2700
2772
|
Object.defineProperty(exports, '__esModule', {
|
|
2701
2773
|
value: true,
|
|
@@ -2818,7 +2890,10 @@ function getObjectTag(object) {
|
|
|
2818
2890
|
}
|
|
2819
2891
|
});
|
|
2820
2892
|
|
|
2893
|
+
const inspect = /*@__PURE__*/getDefaultExportFromCjs(inspect_1);
|
|
2894
|
+
|
|
2821
2895
|
var instanceOf_1 = createCommonjsModule(function (module, exports) {
|
|
2896
|
+
'use strict';
|
|
2822
2897
|
|
|
2823
2898
|
Object.defineProperty(exports, '__esModule', {
|
|
2824
2899
|
value: true,
|
|
@@ -2837,14 +2912,54 @@ const instanceOf =
|
|
|
2837
2912
|
/* c8 ignore next 6 */
|
|
2838
2913
|
// FIXME: https://github.com/graphql/graphql-js/issues/2317
|
|
2839
2914
|
// eslint-disable-next-line no-undef
|
|
2840
|
-
|
|
2915
|
+
"development" === 'production'
|
|
2916
|
+
? function instanceOf(value, constructor) {
|
|
2841
2917
|
return value instanceof constructor;
|
|
2842
2918
|
}
|
|
2843
|
-
|
|
2919
|
+
: function instanceOf(value, constructor) {
|
|
2920
|
+
if (value instanceof constructor) {
|
|
2921
|
+
return true;
|
|
2922
|
+
}
|
|
2923
|
+
|
|
2924
|
+
if (typeof value === 'object' && value !== null) {
|
|
2925
|
+
var _value$constructor;
|
|
2926
|
+
|
|
2927
|
+
// Prefer Symbol.toStringTag since it is immune to minification.
|
|
2928
|
+
const className = constructor.prototype[Symbol.toStringTag];
|
|
2929
|
+
const valueClassName = // We still need to support constructor's name to detect conflicts with older versions of this library.
|
|
2930
|
+
Symbol.toStringTag in value // @ts-expect-error TS bug see, https://github.com/microsoft/TypeScript/issues/38009
|
|
2931
|
+
? value[Symbol.toStringTag]
|
|
2932
|
+
: (_value$constructor = value.constructor) === null ||
|
|
2933
|
+
_value$constructor === void 0
|
|
2934
|
+
? void 0
|
|
2935
|
+
: _value$constructor.name;
|
|
2936
|
+
|
|
2937
|
+
if (className === valueClassName) {
|
|
2938
|
+
const stringifiedValue = (0, inspect_1.inspect)(value);
|
|
2939
|
+
throw new Error(`Cannot use ${className} "${stringifiedValue}" from another module or realm.
|
|
2940
|
+
|
|
2941
|
+
Ensure that there is only one instance of "graphql" in the node_modules
|
|
2942
|
+
directory. If different versions of "graphql" are the dependencies of other
|
|
2943
|
+
relied on modules, use "resolutions" to ensure only one version is installed.
|
|
2944
|
+
|
|
2945
|
+
https://yarnpkg.com/en/docs/selective-version-resolutions
|
|
2946
|
+
|
|
2947
|
+
Duplicate "graphql" modules cannot be used at the same time since different
|
|
2948
|
+
versions may have different capabilities and behavior. The data from one
|
|
2949
|
+
version used in the function from another could produce confusing and
|
|
2950
|
+
spurious results.`);
|
|
2951
|
+
}
|
|
2952
|
+
}
|
|
2953
|
+
|
|
2954
|
+
return false;
|
|
2955
|
+
};
|
|
2844
2956
|
exports.instanceOf = instanceOf;
|
|
2845
2957
|
});
|
|
2846
2958
|
|
|
2959
|
+
const instanceOf = /*@__PURE__*/getDefaultExportFromCjs(instanceOf_1);
|
|
2960
|
+
|
|
2847
2961
|
var source = createCommonjsModule(function (module, exports) {
|
|
2962
|
+
'use strict';
|
|
2848
2963
|
|
|
2849
2964
|
Object.defineProperty(exports, '__esModule', {
|
|
2850
2965
|
value: true,
|
|
@@ -2911,7 +3026,10 @@ function isSource(source) {
|
|
|
2911
3026
|
}
|
|
2912
3027
|
});
|
|
2913
3028
|
|
|
3029
|
+
const source$1 = /*@__PURE__*/getDefaultExportFromCjs(source);
|
|
3030
|
+
|
|
2914
3031
|
var parser = createCommonjsModule(function (module, exports) {
|
|
3032
|
+
'use strict';
|
|
2915
3033
|
|
|
2916
3034
|
Object.defineProperty(exports, '__esModule', {
|
|
2917
3035
|
value: true,
|
|
@@ -4480,7 +4598,10 @@ function getTokenKindDesc(kind) {
|
|
|
4480
4598
|
}
|
|
4481
4599
|
});
|
|
4482
4600
|
|
|
4601
|
+
const parser$1 = /*@__PURE__*/getDefaultExportFromCjs(parser);
|
|
4602
|
+
|
|
4483
4603
|
var printString_1 = createCommonjsModule(function (module, exports) {
|
|
4604
|
+
'use strict';
|
|
4484
4605
|
|
|
4485
4606
|
Object.defineProperty(exports, '__esModule', {
|
|
4486
4607
|
value: true,
|
|
@@ -4665,7 +4786,10 @@ const escapeSequences = [
|
|
|
4665
4786
|
];
|
|
4666
4787
|
});
|
|
4667
4788
|
|
|
4789
|
+
const printString = /*@__PURE__*/getDefaultExportFromCjs(printString_1);
|
|
4790
|
+
|
|
4668
4791
|
var visitor = createCommonjsModule(function (module, exports) {
|
|
4792
|
+
'use strict';
|
|
4669
4793
|
|
|
4670
4794
|
Object.defineProperty(exports, '__esModule', {
|
|
4671
4795
|
value: true,
|
|
@@ -5044,7 +5168,10 @@ function getVisitFn(visitor, kind, isLeaving) {
|
|
|
5044
5168
|
}
|
|
5045
5169
|
});
|
|
5046
5170
|
|
|
5171
|
+
const visitor$1 = /*@__PURE__*/getDefaultExportFromCjs(visitor);
|
|
5172
|
+
|
|
5047
5173
|
var printer = createCommonjsModule(function (module, exports) {
|
|
5174
|
+
'use strict';
|
|
5048
5175
|
|
|
5049
5176
|
Object.defineProperty(exports, '__esModule', {
|
|
5050
5177
|
value: true,
|
|
@@ -5397,6 +5524,10 @@ function hasMultilineItems(maybeArray) {
|
|
|
5397
5524
|
}
|
|
5398
5525
|
});
|
|
5399
5526
|
|
|
5527
|
+
const printer$1 = /*@__PURE__*/getDefaultExportFromCjs(printer);
|
|
5528
|
+
|
|
5529
|
+
'use strict';
|
|
5530
|
+
|
|
5400
5531
|
var ReactNativeFile$1 = function ReactNativeFile(_ref) {
|
|
5401
5532
|
var uri = _ref.uri,
|
|
5402
5533
|
name = _ref.name,
|
|
@@ -5406,6 +5537,10 @@ var ReactNativeFile$1 = function ReactNativeFile(_ref) {
|
|
|
5406
5537
|
this.type = type;
|
|
5407
5538
|
};
|
|
5408
5539
|
|
|
5540
|
+
'use strict';
|
|
5541
|
+
|
|
5542
|
+
|
|
5543
|
+
|
|
5409
5544
|
var isExtractableFile$1 = function isExtractableFile(value) {
|
|
5410
5545
|
return (
|
|
5411
5546
|
(typeof File !== 'undefined' && value instanceof File) ||
|
|
@@ -5414,6 +5549,10 @@ var isExtractableFile$1 = function isExtractableFile(value) {
|
|
|
5414
5549
|
);
|
|
5415
5550
|
};
|
|
5416
5551
|
|
|
5552
|
+
'use strict';
|
|
5553
|
+
|
|
5554
|
+
|
|
5555
|
+
|
|
5417
5556
|
var extractFiles$1 = function extractFiles(value, path, isExtractableFile) {
|
|
5418
5557
|
if (path === void 0) {
|
|
5419
5558
|
path = '';
|
|
@@ -5465,6 +5604,8 @@ var extractFiles$1 = function extractFiles(value, path, isExtractableFile) {
|
|
|
5465
5604
|
};
|
|
5466
5605
|
};
|
|
5467
5606
|
|
|
5607
|
+
'use strict';
|
|
5608
|
+
|
|
5468
5609
|
var ReactNativeFile = ReactNativeFile$1;
|
|
5469
5610
|
var extractFiles = extractFiles$1;
|
|
5470
5611
|
var isExtractableFile = isExtractableFile$1;
|
|
@@ -5479,6 +5620,7 @@ var _public = {
|
|
|
5479
5620
|
var browser = typeof self == 'object' ? self.FormData : window.FormData;
|
|
5480
5621
|
|
|
5481
5622
|
var defaultJsonSerializer = createCommonjsModule(function (module, exports) {
|
|
5623
|
+
"use strict";
|
|
5482
5624
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5483
5625
|
exports.defaultJsonSerializer = void 0;
|
|
5484
5626
|
exports.defaultJsonSerializer = {
|
|
@@ -5488,7 +5630,10 @@ exports.defaultJsonSerializer = {
|
|
|
5488
5630
|
//# sourceMappingURL=defaultJsonSerializer.js.map
|
|
5489
5631
|
});
|
|
5490
5632
|
|
|
5633
|
+
const defaultJsonSerializer$1 = /*@__PURE__*/getDefaultExportFromCjs(defaultJsonSerializer);
|
|
5634
|
+
|
|
5491
5635
|
var createRequestBody_1 = createCommonjsModule(function (module, exports) {
|
|
5636
|
+
"use strict";
|
|
5492
5637
|
var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
5493
5638
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5494
5639
|
};
|
|
@@ -5545,7 +5690,10 @@ exports.default = createRequestBody;
|
|
|
5545
5690
|
//# sourceMappingURL=createRequestBody.js.map
|
|
5546
5691
|
});
|
|
5547
5692
|
|
|
5693
|
+
const createRequestBody = /*@__PURE__*/getDefaultExportFromCjs(createRequestBody_1);
|
|
5694
|
+
|
|
5548
5695
|
var parseArgs = createCommonjsModule(function (module, exports) {
|
|
5696
|
+
"use strict";
|
|
5549
5697
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5550
5698
|
exports.parseBatchRequestsExtendedArgs = exports.parseRawRequestExtendedArgs = exports.parseRequestExtendedArgs = exports.parseBatchRequestArgs = exports.parseRawRequestArgs = exports.parseRequestArgs = void 0;
|
|
5551
5699
|
function parseRequestArgs(documentOrOptions, variables, requestHeaders) {
|
|
@@ -5618,7 +5766,10 @@ exports.parseBatchRequestsExtendedArgs = parseBatchRequestsExtendedArgs;
|
|
|
5618
5766
|
//# sourceMappingURL=parseArgs.js.map
|
|
5619
5767
|
});
|
|
5620
5768
|
|
|
5769
|
+
const parseArgs$1 = /*@__PURE__*/getDefaultExportFromCjs(parseArgs);
|
|
5770
|
+
|
|
5621
5771
|
var types = createCommonjsModule(function (module, exports) {
|
|
5772
|
+
"use strict";
|
|
5622
5773
|
var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () {
|
|
5623
5774
|
var extendStatics = function (d, b) {
|
|
5624
5775
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -5668,7 +5819,10 @@ exports.ClientError = ClientError;
|
|
|
5668
5819
|
//# sourceMappingURL=types.js.map
|
|
5669
5820
|
});
|
|
5670
5821
|
|
|
5822
|
+
const types$1 = /*@__PURE__*/getDefaultExportFromCjs(types);
|
|
5823
|
+
|
|
5671
5824
|
var graphqlWs = createCommonjsModule(function (module, exports) {
|
|
5825
|
+
"use strict";
|
|
5672
5826
|
var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
|
|
5673
5827
|
__assign = Object.assign || function(t) {
|
|
5674
5828
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -5848,6 +6002,8 @@ var GraphQLWebSocketClient = /** @class */ (function () {
|
|
|
5848
6002
|
if (message.payload.errors) {
|
|
5849
6003
|
subscriber.error && subscriber.error(new types.ClientError(__assign(__assign({}, message.payload), { status: 200 }), { query: query, variables: variables }));
|
|
5850
6004
|
}
|
|
6005
|
+
else {
|
|
6006
|
+
}
|
|
5851
6007
|
return;
|
|
5852
6008
|
}
|
|
5853
6009
|
case ERROR: {
|
|
@@ -5942,7 +6098,10 @@ function Complete(id) {
|
|
|
5942
6098
|
//# sourceMappingURL=graphql-ws.js.map
|
|
5943
6099
|
});
|
|
5944
6100
|
|
|
6101
|
+
const graphqlWs$1 = /*@__PURE__*/getDefaultExportFromCjs(graphqlWs);
|
|
6102
|
+
|
|
5945
6103
|
var dist = createCommonjsModule(function (module, exports) {
|
|
6104
|
+
"use strict";
|
|
5946
6105
|
var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
|
|
5947
6106
|
__assign = Object.assign || function(t) {
|
|
5948
6107
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -6267,7 +6426,7 @@ exports.GraphQLClient = GraphQLClient;
|
|
|
6267
6426
|
function makeRequest(_a) {
|
|
6268
6427
|
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;
|
|
6269
6428
|
return __awaiter(this, void 0, void 0, function () {
|
|
6270
|
-
var fetcher, isBathchingQuery, response, result, successfullyReceivedData, successfullyPassedErrorPolicy, headers_1, status_1, rest, data, errorResult;
|
|
6429
|
+
var fetcher, isBathchingQuery, response, result, successfullyReceivedData, successfullyPassedErrorPolicy, headers_1, status_1, errors, rest, data, errorResult;
|
|
6271
6430
|
return __generator(this, function (_c) {
|
|
6272
6431
|
switch (_c.label) {
|
|
6273
6432
|
case 0:
|
|
@@ -6294,7 +6453,7 @@ function makeRequest(_a) {
|
|
|
6294
6453
|
successfullyPassedErrorPolicy = !result.errors || fetchOptions.errorPolicy === 'all' || fetchOptions.errorPolicy === 'ignore';
|
|
6295
6454
|
if (response.ok && successfullyPassedErrorPolicy && successfullyReceivedData) {
|
|
6296
6455
|
headers_1 = response.headers, status_1 = response.status;
|
|
6297
|
-
rest = __rest(result, ["errors"]);
|
|
6456
|
+
errors = result.errors, rest = __rest(result, ["errors"]);
|
|
6298
6457
|
data = fetchOptions.errorPolicy === 'ignore' ? rest : result;
|
|
6299
6458
|
return [2 /*return*/, __assign(__assign({}, (isBathchingQuery ? { data: data } : data)), { headers: headers_1, status: status_1 })];
|
|
6300
6459
|
}
|
|
@@ -6302,6 +6461,7 @@ function makeRequest(_a) {
|
|
|
6302
6461
|
errorResult = typeof result === 'string' ? { error: result } : result;
|
|
6303
6462
|
throw new types.ClientError(__assign(__assign({}, errorResult), { status: response.status, headers: response.headers }), { query: query, variables: variables });
|
|
6304
6463
|
}
|
|
6464
|
+
return [2 /*return*/];
|
|
6305
6465
|
}
|
|
6306
6466
|
});
|
|
6307
6467
|
});
|
|
@@ -6431,6 +6591,8 @@ Object.defineProperty(exports, "GraphQLWebSocketClient", { enumerable: true, get
|
|
|
6431
6591
|
//# sourceMappingURL=index.js.map
|
|
6432
6592
|
});
|
|
6433
6593
|
|
|
6594
|
+
const index = /*@__PURE__*/getDefaultExportFromCjs(dist);
|
|
6595
|
+
|
|
6434
6596
|
class UrlUtils {
|
|
6435
6597
|
static getQueryParams(queryString) {
|
|
6436
6598
|
const params = new Map();
|
|
@@ -6488,6 +6650,27 @@ class DataFetcher {
|
|
|
6488
6650
|
DataFetcher.requestListener.splice(index, 1);
|
|
6489
6651
|
}
|
|
6490
6652
|
}
|
|
6653
|
+
processErrorInfo(errors) {
|
|
6654
|
+
var _a, _b;
|
|
6655
|
+
const POSITION_ERROR_INFO = 0;
|
|
6656
|
+
const errorTitle = "Falha detectada";
|
|
6657
|
+
const error = errors[POSITION_ERROR_INFO];
|
|
6658
|
+
if (error.length > 0) { //As informações do erro vem no primeiro indice de um array
|
|
6659
|
+
const errorInfo = error[POSITION_ERROR_INFO];
|
|
6660
|
+
const errorMessage = (errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.message) ? errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.message : "Não há mensagem de erro";
|
|
6661
|
+
const errorLevel = ((_a = errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.extensions) === null || _a === void 0 ? void 0 : _a.level) ? errorInfo.extensions.level : "ERROR";
|
|
6662
|
+
const errorCode = ((_b = errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.extensions) === null || _b === void 0 ? void 0 : _b.code) ? errorInfo.extensions.code : "";
|
|
6663
|
+
switch (errorLevel) {
|
|
6664
|
+
case "WARNING":
|
|
6665
|
+
return new index$1.WarningException(errorTitle, errorMessage, errorCode);
|
|
6666
|
+
default:
|
|
6667
|
+
return new index$1.ErrorException(errorTitle, errorMessage, errorCode);
|
|
6668
|
+
}
|
|
6669
|
+
}
|
|
6670
|
+
else {
|
|
6671
|
+
return new index$1.ErrorException(errorTitle, "Não há informações sobre o erro");
|
|
6672
|
+
}
|
|
6673
|
+
}
|
|
6491
6674
|
async callGraphQL(req) {
|
|
6492
6675
|
var _a;
|
|
6493
6676
|
const reqKey = this.getReqKey(req);
|
|
@@ -6498,7 +6681,8 @@ class DataFetcher {
|
|
|
6498
6681
|
let query = this.getQueryTemplate(req);
|
|
6499
6682
|
const res = await this.fecthGrapql([{ document: query, variables: req.values }]);
|
|
6500
6683
|
if (res.errors.length > 0) {
|
|
6501
|
-
|
|
6684
|
+
const error = this.processErrorInfo(res.errors);
|
|
6685
|
+
reject(error);
|
|
6502
6686
|
}
|
|
6503
6687
|
else {
|
|
6504
6688
|
resolve(res.data[0][reqKey]);
|
|
@@ -6563,7 +6747,7 @@ class DataFetcher {
|
|
|
6563
6747
|
});
|
|
6564
6748
|
}
|
|
6565
6749
|
getReqKey(req) {
|
|
6566
|
-
return window.btoa(
|
|
6750
|
+
return window.btoa(index$1.StringUtils.hashCode(`${req.query}${JSON.stringify(req.values || "")}`)).replace(/=/g, "");
|
|
6567
6751
|
}
|
|
6568
6752
|
getQueryTemplate(re) {
|
|
6569
6753
|
return (re.query || "").replaceAll("$queryAlias$", re.queryID);
|
|
@@ -6592,7 +6776,7 @@ class DataFetcher {
|
|
|
6592
6776
|
errorsResponse.forEach((errorResponse) => {
|
|
6593
6777
|
Object.entries(errorResponse).forEach(([_key, val]) => {
|
|
6594
6778
|
var _a;
|
|
6595
|
-
(((_a = this.getWatingRequest(val.request.variables[val.index].queryID)) === null || _a === void 0 ? void 0 : _a.reject) || Promise.reject)(new
|
|
6779
|
+
(((_a = this.getWatingRequest(val.request.variables[val.index].queryID)) === null || _a === void 0 ? void 0 : _a.reject) || Promise.reject)(new index$1.ErrorException("Falha detectada", val.message));
|
|
6596
6780
|
});
|
|
6597
6781
|
});
|
|
6598
6782
|
//Resolve promises with data from query
|
|
@@ -6645,7 +6829,7 @@ class DataFetcher {
|
|
|
6645
6829
|
}
|
|
6646
6830
|
else {
|
|
6647
6831
|
DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url }));
|
|
6648
|
-
throw new
|
|
6832
|
+
throw new index$1.ErrorException("Falha de comunicação", err.message);
|
|
6649
6833
|
}
|
|
6650
6834
|
}
|
|
6651
6835
|
DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url }));
|
|
@@ -6753,7 +6937,7 @@ class DataUnitFetcher {
|
|
|
6753
6937
|
}`);
|
|
6754
6938
|
}
|
|
6755
6939
|
getDataUnit(entityName, resourceID) {
|
|
6756
|
-
const dataUnit = new
|
|
6940
|
+
const dataUnit = new index$1.DataUnit(`dd://${entityName}/${resourceID}`);
|
|
6757
6941
|
dataUnit.metadataLoader = (dataUnit) => this.loadMetadata(dataUnit);
|
|
6758
6942
|
dataUnit.dataLoader = (dataUnit, request) => this.loadData(dataUnit, request);
|
|
6759
6943
|
dataUnit.saveLoader = (dataUnit, changes) => this.saveData(dataUnit, changes);
|
|
@@ -6814,17 +6998,17 @@ class DataUnitFetcher {
|
|
|
6814
6998
|
const variables = { dataunit: dataUnit.name, sort, filters };
|
|
6815
6999
|
variables.limit = limit;
|
|
6816
7000
|
variables.offset = offset;
|
|
6817
|
-
if (!
|
|
7001
|
+
if (!index$1.StringUtils.isEmpty(quickFilter === null || quickFilter === void 0 ? void 0 : quickFilter.term)) {
|
|
6818
7002
|
if (variables.filter === undefined) {
|
|
6819
7003
|
variables.filter = [];
|
|
6820
7004
|
}
|
|
6821
7005
|
const quickFilterCriteria = {
|
|
6822
7006
|
name: "__QUICK_FILTER__",
|
|
6823
7007
|
expression: "__QUICK_FILTER__",
|
|
6824
|
-
params: [{ name: "term", dataType:
|
|
7008
|
+
params: [{ name: "term", dataType: index$1.DataType.TEXT, value: quickFilter.term }]
|
|
6825
7009
|
};
|
|
6826
7010
|
if (((_a = quickFilter === null || quickFilter === void 0 ? void 0 : quickFilter.fields) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
6827
|
-
quickFilterCriteria.params.push({ name: "fields", dataType:
|
|
7011
|
+
quickFilterCriteria.params.push({ name: "fields", dataType: index$1.DataType.OBJECT, value: quickFilter.fields });
|
|
6828
7012
|
}
|
|
6829
7013
|
variables.filter.push(quickFilterCriteria);
|
|
6830
7014
|
}
|
|
@@ -6837,7 +7021,7 @@ class DataUnitFetcher {
|
|
|
6837
7021
|
const { limit, offset, total, hasMore, records } = resp.data;
|
|
6838
7022
|
let paginationInfo;
|
|
6839
7023
|
if (limit) {
|
|
6840
|
-
const firstRecord = offset + 1;
|
|
7024
|
+
const firstRecord = total == 0 ? 0 : offset + 1;
|
|
6841
7025
|
const lastRecord = offset + Math.min(records.length, limit);
|
|
6842
7026
|
const currentPage = offset / limit;
|
|
6843
7027
|
paginationInfo = {
|
|
@@ -6873,7 +7057,7 @@ class DataUnitFetcher {
|
|
|
6873
7057
|
if (updatingFields) {
|
|
6874
7058
|
parsedUpdatingFields = Object.entries(updatingFields).map(([fieldName, value]) => {
|
|
6875
7059
|
const descriptor = dataUnit.getField(fieldName);
|
|
6876
|
-
const dataType = descriptor ? descriptor.dataType :
|
|
7060
|
+
const dataType = descriptor ? descriptor.dataType : index$1.DataType.TEXT;
|
|
6877
7061
|
return { fieldName, dataType, value: dataUnit.valueToString(fieldName, value) };
|
|
6878
7062
|
});
|
|
6879
7063
|
}
|
|
@@ -6910,7 +7094,7 @@ class DataUnitFetcher {
|
|
|
6910
7094
|
}
|
|
6911
7095
|
removeRecords(dataUnit, recordIds) {
|
|
6912
7096
|
const changes = recordIds.map((recordId) => {
|
|
6913
|
-
return { dataUnit: dataUnit.name, operation:
|
|
7097
|
+
return { dataUnit: dataUnit.name, operation: index$1.ChangeOperation.DELETE, recordId };
|
|
6914
7098
|
});
|
|
6915
7099
|
return new Promise((resolve, reject) => {
|
|
6916
7100
|
DataFetcher.get()
|
|
@@ -6975,7 +7159,7 @@ class ParametersFetcher {
|
|
|
6975
7159
|
}
|
|
6976
7160
|
async asDate(name, resourceID) {
|
|
6977
7161
|
const paramArr = await this.getParam(name, resourceID);
|
|
6978
|
-
return
|
|
7162
|
+
return index$1.DateUtils.strToDate(this.getValue(paramArr));
|
|
6979
7163
|
}
|
|
6980
7164
|
async getBatchParams(names, resourceID) {
|
|
6981
7165
|
const paramArr = await this.getParam(names.join(","), resourceID);
|
|
@@ -6988,7 +7172,7 @@ class ParametersFetcher {
|
|
|
6988
7172
|
if (Array.isArray(obj) && obj.length > 0) {
|
|
6989
7173
|
obj = obj[0];
|
|
6990
7174
|
}
|
|
6991
|
-
if (
|
|
7175
|
+
if (index$1.StringUtils.isEmpty(obj.resource))
|
|
6992
7176
|
return "";
|
|
6993
7177
|
return obj.resource;
|
|
6994
7178
|
}
|
|
@@ -7188,9 +7372,9 @@ function convertParamType(dataType) {
|
|
|
7188
7372
|
//atual da pesquisa... em geral, somente inteiros,
|
|
7189
7373
|
//data (com ou sem hora) e string são realmente relevantes
|
|
7190
7374
|
switch (dataType) {
|
|
7191
|
-
case
|
|
7375
|
+
case index$1.DataType.NUMBER:
|
|
7192
7376
|
return "I";
|
|
7193
|
-
case
|
|
7377
|
+
case index$1.DataType.DATE:
|
|
7194
7378
|
return "D";
|
|
7195
7379
|
default:
|
|
7196
7380
|
return "S";
|
|
@@ -7203,7 +7387,7 @@ class AuthFetcher extends ResourceFetcher {
|
|
|
7203
7387
|
return new Promise((resolve, reject) => {
|
|
7204
7388
|
this.loadResource(completePath)
|
|
7205
7389
|
.then((loadedResource) => {
|
|
7206
|
-
let auth =
|
|
7390
|
+
let auth = index$1.ObjectUtils.stringToObject(loadedResource);
|
|
7207
7391
|
if (auth && typeof (auth) === 'object') {
|
|
7208
7392
|
resolve(auth);
|
|
7209
7393
|
}
|
|
@@ -7237,7 +7421,7 @@ class SnkErrorHandler {
|
|
|
7237
7421
|
const reason = evt.reason;
|
|
7238
7422
|
//Promisse rejeitada com WaitingChangeException, não precisam
|
|
7239
7423
|
//ser notificadas pelo usuário.
|
|
7240
|
-
if (!(reason instanceof
|
|
7424
|
+
if (!(reason instanceof index$1.WaitingChangeException)) {
|
|
7241
7425
|
if (reason) {
|
|
7242
7426
|
this.processException(reason);
|
|
7243
7427
|
}
|
|
@@ -7253,14 +7437,21 @@ class SnkErrorHandler {
|
|
|
7253
7437
|
errorHandler(evt) {
|
|
7254
7438
|
this.processException(evt.error);
|
|
7255
7439
|
}
|
|
7440
|
+
buildErrorCodeHTML(exception) {
|
|
7441
|
+
const onclick = 'try{window.workspace.openHelp(\'_tbcode:' + exception.errorCode + '\')} catch(e){alert(\'Não é possível abrir a ajuda fora do workspace Sankhya\');}';
|
|
7442
|
+
return '<br><a href="#" onclick="' + onclick + '">Código: ' + exception.errorCode + '</a>';
|
|
7443
|
+
}
|
|
7256
7444
|
processException(exception) {
|
|
7257
|
-
if (exception
|
|
7445
|
+
if (exception.errorCode != "") {
|
|
7446
|
+
exception.message += this.buildErrorCodeHTML(exception);
|
|
7447
|
+
}
|
|
7448
|
+
if (exception instanceof index$1.WaitingChangeException) {
|
|
7258
7449
|
this._app.alert(exception.title, exception.message);
|
|
7259
7450
|
}
|
|
7260
|
-
else if (exception instanceof
|
|
7451
|
+
else if (exception instanceof index$1.WarningException) {
|
|
7261
7452
|
this._app.alert(exception.title, exception.message);
|
|
7262
7453
|
}
|
|
7263
|
-
else if (exception instanceof
|
|
7454
|
+
else if (exception instanceof index$1.ErrorException) {
|
|
7264
7455
|
this._app.error(exception.title, exception.message);
|
|
7265
7456
|
}
|
|
7266
7457
|
else {
|
|
@@ -7271,7 +7462,7 @@ class SnkErrorHandler {
|
|
|
7271
7462
|
}
|
|
7272
7463
|
else {
|
|
7273
7464
|
const title = (exception === null || exception === void 0 ? void 0 : exception.title) || "Erro detectado";
|
|
7274
|
-
const message = (typeof exception === "string") ? exception : exception.message || `Erro interno "${
|
|
7465
|
+
const message = (typeof exception === "string") ? exception : exception.message || `Erro interno "${index$1.ObjectUtils.objectToString(exception)}"`;
|
|
7275
7466
|
this._app.error(title, message);
|
|
7276
7467
|
}
|
|
7277
7468
|
}
|
|
@@ -7328,13 +7519,280 @@ class TotalsFetcher {
|
|
|
7328
7519
|
}
|
|
7329
7520
|
}
|
|
7330
7521
|
|
|
7522
|
+
class FilterBarConfigFetcher extends ResourceFetcher {
|
|
7523
|
+
getConfig(resourceID) {
|
|
7524
|
+
return new Promise((resolve) => {
|
|
7525
|
+
if (resourceID === "br.com.sankhya.fin.cad.movimentacaoFinanceira") {
|
|
7526
|
+
resolve([{
|
|
7527
|
+
id: "RECDESP",
|
|
7528
|
+
visible: true,
|
|
7529
|
+
label: "Receitas + Despesas",
|
|
7530
|
+
detailTitle: "Selecione o que deseja ver",
|
|
7531
|
+
type: filterItemType_enum.FilterItemType.BINARY_SELECT,
|
|
7532
|
+
hardFixed: true,
|
|
7533
|
+
props: {
|
|
7534
|
+
options: [
|
|
7535
|
+
{ name: "RECEITA", expression: "this.RECDESP = 1", label: "Receitas" },
|
|
7536
|
+
{ name: "DESPESA", expression: "this.RECDESP = -1", label: "Despesas" }
|
|
7537
|
+
]
|
|
7538
|
+
}
|
|
7539
|
+
},
|
|
7540
|
+
{
|
|
7541
|
+
id: "PROVISAO",
|
|
7542
|
+
visible: true,
|
|
7543
|
+
label: "Real + Provisão",
|
|
7544
|
+
detailTitle: "Selecione o que deseja ver",
|
|
7545
|
+
type: filterItemType_enum.FilterItemType.BINARY_SELECT,
|
|
7546
|
+
hardFixed: true,
|
|
7547
|
+
props: {
|
|
7548
|
+
options: [
|
|
7549
|
+
{ name: "REAL", expression: "nullvalue(this.PROVISAO, 'N') = 'N'", label: "Real" },
|
|
7550
|
+
{ name: "PROVISAO", expression: "nullvalue(this.PROVISAO, 'N') = 'S'", label: "Provisão" }
|
|
7551
|
+
]
|
|
7552
|
+
}
|
|
7553
|
+
},
|
|
7554
|
+
{
|
|
7555
|
+
id: "BAIXADO",
|
|
7556
|
+
visible: true,
|
|
7557
|
+
label: "Pendentes + Baixados",
|
|
7558
|
+
detailTitle: "Selecione o que deseja ver",
|
|
7559
|
+
type: filterItemType_enum.FilterItemType.BINARY_SELECT,
|
|
7560
|
+
hardFixed: true,
|
|
7561
|
+
props: {
|
|
7562
|
+
options: [
|
|
7563
|
+
{ name: "PENDENTE", expression: "this.DHBAIXA IS NULL", label: "Pendentes" },
|
|
7564
|
+
{ name: "BAIXADO", expression: "this.DHBAIXA IS NOT NULL", label: "Baixados" }
|
|
7565
|
+
]
|
|
7566
|
+
}
|
|
7567
|
+
},
|
|
7568
|
+
{
|
|
7569
|
+
id: "DTVENC",
|
|
7570
|
+
visible: true,
|
|
7571
|
+
type: filterItemType_enum.FilterItemType.PERIOD,
|
|
7572
|
+
label: "Dt. Vencimento",
|
|
7573
|
+
detailTitle: "Informe a data ou período",
|
|
7574
|
+
props: {
|
|
7575
|
+
expression: {
|
|
7576
|
+
fullfill: "onlydate(this.DTVENC) >= :DTVENC.START AND onlydate(this.DTVENC) <= :DTVENC.END",
|
|
7577
|
+
onlystart: "onlydate(this.DTVENC) >= :DTVENC",
|
|
7578
|
+
onlyend: "onlydate(this.DTVENC) <= :DTVENC"
|
|
7579
|
+
}
|
|
7580
|
+
}
|
|
7581
|
+
},
|
|
7582
|
+
{
|
|
7583
|
+
id: "CODPARC",
|
|
7584
|
+
visible: true,
|
|
7585
|
+
type: filterItemType_enum.FilterItemType.SEARCH,
|
|
7586
|
+
label: "Parceiro",
|
|
7587
|
+
detailTitle: "Informe o parceiro",
|
|
7588
|
+
props: {
|
|
7589
|
+
expression: "this.CODPARC = :CODPARC",
|
|
7590
|
+
searchContext: {
|
|
7591
|
+
entity: "Parceiro",
|
|
7592
|
+
entityDescription: "Parceiro",
|
|
7593
|
+
searchOptions: {
|
|
7594
|
+
rootEntity: "Financeiro",
|
|
7595
|
+
descriptionFieldName: "NOMEPARC",
|
|
7596
|
+
codeFieldName: "CODPARC",
|
|
7597
|
+
showInactives: false
|
|
7598
|
+
}
|
|
7599
|
+
}
|
|
7600
|
+
}
|
|
7601
|
+
},
|
|
7602
|
+
{
|
|
7603
|
+
id: "NUFIN",
|
|
7604
|
+
type: filterItemType_enum.FilterItemType.NUMBER,
|
|
7605
|
+
visible: true,
|
|
7606
|
+
label: "Nr. único",
|
|
7607
|
+
detailTitle: "Informe o número único",
|
|
7608
|
+
props: {
|
|
7609
|
+
expression: "this.NUFIN = :NUFIN"
|
|
7610
|
+
}
|
|
7611
|
+
},
|
|
7612
|
+
{
|
|
7613
|
+
id: "NUMNOTA",
|
|
7614
|
+
visible: true,
|
|
7615
|
+
type: filterItemType_enum.FilterItemType.NUMBER,
|
|
7616
|
+
label: "Nr. Nota",
|
|
7617
|
+
detailTitle: "Informe o número da nota",
|
|
7618
|
+
props: {
|
|
7619
|
+
expression: "this.NUMNOTA = :NUMNOTA"
|
|
7620
|
+
}
|
|
7621
|
+
},
|
|
7622
|
+
{
|
|
7623
|
+
id: "DHBAIXA",
|
|
7624
|
+
visible: true,
|
|
7625
|
+
type: filterItemType_enum.FilterItemType.PERIOD,
|
|
7626
|
+
label: "Data da Baixa",
|
|
7627
|
+
detailTitle: "Informe a data ou período",
|
|
7628
|
+
props: {
|
|
7629
|
+
expression: {
|
|
7630
|
+
fullfill: "onlydate(this.DHBAIXA) >= :DHBAIXA.START AND onlydate(this.DHBAIXA) <= :DHBAIXA.END",
|
|
7631
|
+
onlystart: "onlydate(this.DHBAIXA) >= :DHBAIXA",
|
|
7632
|
+
onlyend: "onlydate(this.DHBAIXA) <= :DHBAIXA"
|
|
7633
|
+
}
|
|
7634
|
+
}
|
|
7635
|
+
},
|
|
7636
|
+
{
|
|
7637
|
+
id: "CODEMP",
|
|
7638
|
+
visible: false,
|
|
7639
|
+
type: filterItemType_enum.FilterItemType.SEARCH,
|
|
7640
|
+
label: "Empresa",
|
|
7641
|
+
detailTitle: "Informe a empresa",
|
|
7642
|
+
props: {
|
|
7643
|
+
expression: "this.CODEMP = :CODEMP",
|
|
7644
|
+
searchContext: {
|
|
7645
|
+
entity: "Empresa",
|
|
7646
|
+
entityDescription: "Empresa",
|
|
7647
|
+
searchOptions: {
|
|
7648
|
+
rootEntity: "Financeiro",
|
|
7649
|
+
descriptionFieldName: "NOMEFANTASIA",
|
|
7650
|
+
codeFieldName: "CODEMP",
|
|
7651
|
+
showInactives: false
|
|
7652
|
+
}
|
|
7653
|
+
}
|
|
7654
|
+
}
|
|
7655
|
+
},
|
|
7656
|
+
{
|
|
7657
|
+
id: "CODNAT",
|
|
7658
|
+
visible: false,
|
|
7659
|
+
type: filterItemType_enum.FilterItemType.SEARCH,
|
|
7660
|
+
label: "Natureza",
|
|
7661
|
+
detailTitle: "Informe a natureza",
|
|
7662
|
+
props: {
|
|
7663
|
+
expression: "this.CODNAT = :CODNAT",
|
|
7664
|
+
searchContext: {
|
|
7665
|
+
entity: "Natureza",
|
|
7666
|
+
entityDescription: "Natureza",
|
|
7667
|
+
searchOptions: {
|
|
7668
|
+
rootEntity: "Financeiro",
|
|
7669
|
+
descriptionFieldName: "DESCRNAT",
|
|
7670
|
+
codeFieldName: "CODNAT",
|
|
7671
|
+
showInactives: false
|
|
7672
|
+
}
|
|
7673
|
+
}
|
|
7674
|
+
}
|
|
7675
|
+
},
|
|
7676
|
+
{
|
|
7677
|
+
id: "DTNEG",
|
|
7678
|
+
visible: false,
|
|
7679
|
+
type: filterItemType_enum.FilterItemType.PERIOD,
|
|
7680
|
+
label: "Dt. Negociação",
|
|
7681
|
+
detailTitle: "Informe a data ou período",
|
|
7682
|
+
props: {
|
|
7683
|
+
expression: {
|
|
7684
|
+
fullfill: "onlydate(this.DTNEG) >= :DTNEG.START AND onlydate(this.DTNEG) <= :DTNEG.END",
|
|
7685
|
+
onlystart: "onlydate(this.DTNEG) >= :DTNEG",
|
|
7686
|
+
onlyend: "onlydate(this.DTNEG) <= :DTNEG"
|
|
7687
|
+
}
|
|
7688
|
+
}
|
|
7689
|
+
},
|
|
7690
|
+
{
|
|
7691
|
+
id: "NUNOTA",
|
|
7692
|
+
visible: false,
|
|
7693
|
+
type: filterItemType_enum.FilterItemType.NUMBER,
|
|
7694
|
+
label: "Nro Único do Pedido",
|
|
7695
|
+
detailTitle: "Informe o número único do pedido",
|
|
7696
|
+
props: {
|
|
7697
|
+
expression: "this.NUNOTA = :NUNOTA"
|
|
7698
|
+
}
|
|
7699
|
+
},
|
|
7700
|
+
{
|
|
7701
|
+
id: "CODCENCUS",
|
|
7702
|
+
visible: false,
|
|
7703
|
+
type: filterItemType_enum.FilterItemType.SEARCH,
|
|
7704
|
+
label: "Centro de resultado",
|
|
7705
|
+
detailTitle: "Informe o centro de resultado",
|
|
7706
|
+
props: {
|
|
7707
|
+
expression: "this.CODCENCUS = :CODCENCUS",
|
|
7708
|
+
searchContext: {
|
|
7709
|
+
entity: "CentroResultado",
|
|
7710
|
+
entityDescription: "Centro de resultado",
|
|
7711
|
+
searchOptions: {
|
|
7712
|
+
rootEntity: "Financeiro",
|
|
7713
|
+
descriptionFieldName: "DESCRCENCUS",
|
|
7714
|
+
codeFieldName: "CODCENCUS",
|
|
7715
|
+
showInactives: false
|
|
7716
|
+
}
|
|
7717
|
+
}
|
|
7718
|
+
}
|
|
7719
|
+
},
|
|
7720
|
+
{
|
|
7721
|
+
id: "CODCTABCOINT",
|
|
7722
|
+
visible: false,
|
|
7723
|
+
type: filterItemType_enum.FilterItemType.SEARCH,
|
|
7724
|
+
label: "Conta bancária",
|
|
7725
|
+
detailTitle: "Informe a conta bancária",
|
|
7726
|
+
props: {
|
|
7727
|
+
expression: "this.CODCTABCOINT = :CODCTABCOINT",
|
|
7728
|
+
searchContext: {
|
|
7729
|
+
entity: "ContaBancaria",
|
|
7730
|
+
entityDescription: "Conta bancária",
|
|
7731
|
+
searchOptions: {
|
|
7732
|
+
rootEntity: "Financeiro",
|
|
7733
|
+
descriptionFieldName: "DESCRICAO",
|
|
7734
|
+
codeFieldName: "CODCTABCOINT",
|
|
7735
|
+
showInactives: false
|
|
7736
|
+
}
|
|
7737
|
+
}
|
|
7738
|
+
}
|
|
7739
|
+
},
|
|
7740
|
+
{
|
|
7741
|
+
id: "CODBCO",
|
|
7742
|
+
visible: false,
|
|
7743
|
+
type: filterItemType_enum.FilterItemType.SEARCH,
|
|
7744
|
+
label: "Banco",
|
|
7745
|
+
detailTitle: "Informe o banco",
|
|
7746
|
+
props: {
|
|
7747
|
+
expression: "this.CODBCO = :CODBCO",
|
|
7748
|
+
searchContext: {
|
|
7749
|
+
entity: "Banco",
|
|
7750
|
+
entityDescription: "Banco",
|
|
7751
|
+
searchOptions: {
|
|
7752
|
+
rootEntity: "Financeiro",
|
|
7753
|
+
descriptionFieldName: "NOMEBCO",
|
|
7754
|
+
codeFieldName: "CODBCO",
|
|
7755
|
+
showInactives: false
|
|
7756
|
+
}
|
|
7757
|
+
}
|
|
7758
|
+
}
|
|
7759
|
+
},
|
|
7760
|
+
{
|
|
7761
|
+
id: "CODPROJ",
|
|
7762
|
+
visible: false,
|
|
7763
|
+
type: filterItemType_enum.FilterItemType.SEARCH,
|
|
7764
|
+
label: "Projeto",
|
|
7765
|
+
detailTitle: "Informe o projeto",
|
|
7766
|
+
props: {
|
|
7767
|
+
expression: "this.CODPROJ = :CODPROJ",
|
|
7768
|
+
searchContext: {
|
|
7769
|
+
entity: "Projeto",
|
|
7770
|
+
entityDescription: "Projeto",
|
|
7771
|
+
searchOptions: {
|
|
7772
|
+
rootEntity: "Financeiro",
|
|
7773
|
+
descriptionFieldName: "IDENTIFICACAO",
|
|
7774
|
+
codeFieldName: "CODPROJ",
|
|
7775
|
+
showInactives: false
|
|
7776
|
+
}
|
|
7777
|
+
}
|
|
7778
|
+
}
|
|
7779
|
+
}
|
|
7780
|
+
]);
|
|
7781
|
+
}
|
|
7782
|
+
else {
|
|
7783
|
+
resolve(undefined);
|
|
7784
|
+
}
|
|
7785
|
+
});
|
|
7786
|
+
}
|
|
7787
|
+
}
|
|
7788
|
+
|
|
7331
7789
|
const snkApplicationCss = ".sc-snk-application-h{display:flex;flex-direction:column;height:100%}";
|
|
7332
7790
|
|
|
7333
7791
|
const SnkApplication = class {
|
|
7334
7792
|
constructor(hostRef) {
|
|
7335
|
-
index.registerInstance(this, hostRef);
|
|
7336
|
-
this.applicationLoaded = index.createEvent(this, "applicationLoaded", 7);
|
|
7337
|
-
this.applicationLoading = index.createEvent(this, "applicationLoading", 7);
|
|
7793
|
+
index$2.registerInstance(this, hostRef);
|
|
7794
|
+
this.applicationLoaded = index$2.createEvent(this, "applicationLoaded", 7);
|
|
7795
|
+
this.applicationLoading = index$2.createEvent(this, "applicationLoading", 7);
|
|
7338
7796
|
this._authPromises = [];
|
|
7339
7797
|
this._duCache = new Map();
|
|
7340
7798
|
this._duPromises = new Map();
|
|
@@ -7607,31 +8065,31 @@ const SnkApplication = class {
|
|
|
7607
8065
|
* Mostra o diálogo de alerta de acordo com os parâmetros passados.
|
|
7608
8066
|
*/
|
|
7609
8067
|
async alert(title, message, icon, options) {
|
|
7610
|
-
return
|
|
8068
|
+
return SnkMessageBuilder.ApplicationUtils.alert(title, message, icon, options);
|
|
7611
8069
|
}
|
|
7612
8070
|
/**
|
|
7613
8071
|
* Mostra o diálogo de erro de acordo com os parâmetros passados.
|
|
7614
8072
|
*/
|
|
7615
8073
|
async error(title, message, icon, options) {
|
|
7616
|
-
return
|
|
8074
|
+
return SnkMessageBuilder.ApplicationUtils.error(title, message, icon, options);
|
|
7617
8075
|
}
|
|
7618
8076
|
/**
|
|
7619
8077
|
* Exibe um diálogo de mensagem comum
|
|
7620
8078
|
*/
|
|
7621
8079
|
async message(title, message, icon, options) {
|
|
7622
|
-
return
|
|
8080
|
+
return SnkMessageBuilder.ApplicationUtils.message(title, message, icon, options);
|
|
7623
8081
|
}
|
|
7624
8082
|
/**
|
|
7625
8083
|
* Exibe um diálogo de confirmação
|
|
7626
8084
|
*/
|
|
7627
8085
|
async confirm(title, message, icon, dialogType, options) {
|
|
7628
|
-
return
|
|
8086
|
+
return SnkMessageBuilder.ApplicationUtils.confirm(title, message, icon, dialogType, options);
|
|
7629
8087
|
}
|
|
7630
8088
|
/**
|
|
7631
8089
|
* Mostra uma informação efêmera (de segundo plano).
|
|
7632
8090
|
*/
|
|
7633
8091
|
async info(message, options) {
|
|
7634
|
-
return
|
|
8092
|
+
return SnkMessageBuilder.ApplicationUtils.info(message, options);
|
|
7635
8093
|
}
|
|
7636
8094
|
/**
|
|
7637
8095
|
* Busca a configuração de formulário.
|
|
@@ -7657,6 +8115,12 @@ const SnkApplication = class {
|
|
|
7657
8115
|
async saveGridConfig(config) {
|
|
7658
8116
|
return this.gridConfigFetcher.saveConfig(config, this.resourceID);
|
|
7659
8117
|
}
|
|
8118
|
+
/**
|
|
8119
|
+
* Obtém as configurações da barra de filtros
|
|
8120
|
+
*/
|
|
8121
|
+
async getFilterBarConfig() {
|
|
8122
|
+
return this.filterBarConfigFetcher.getConfig(this.resourceID);
|
|
8123
|
+
}
|
|
7660
8124
|
async getAuthList(_auth) {
|
|
7661
8125
|
return await (new MGEAuthorization()).parseFromJSON(_auth);
|
|
7662
8126
|
}
|
|
@@ -7702,9 +8166,17 @@ const SnkApplication = class {
|
|
|
7702
8166
|
}
|
|
7703
8167
|
return this._authFetcher;
|
|
7704
8168
|
}
|
|
8169
|
+
get filterBarConfigFetcher() {
|
|
8170
|
+
if (!this._filterBarConfigFetcher) {
|
|
8171
|
+
this._filterBarConfigFetcher = new FilterBarConfigFetcher();
|
|
8172
|
+
}
|
|
8173
|
+
return this._filterBarConfigFetcher;
|
|
8174
|
+
}
|
|
7705
8175
|
async executeSearch(searchArgument, fieldName, dataUnit) {
|
|
7706
8176
|
const descriptor = dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.getField(fieldName);
|
|
7707
|
-
if (!descriptor)
|
|
8177
|
+
if (!descriptor) {
|
|
8178
|
+
//TODO: Implementar mensagem de erro
|
|
8179
|
+
}
|
|
7708
8180
|
else {
|
|
7709
8181
|
const { mode, argument } = searchArgument;
|
|
7710
8182
|
const { ENTITYNAME, CODEFIELD, DESCRIPTIONFIELD, ROOTENTITY, DESCRIPTIONENTITY } = descriptor.properties;
|
|
@@ -7718,13 +8190,13 @@ const SnkApplication = class {
|
|
|
7718
8190
|
};
|
|
7719
8191
|
dependencies === null || dependencies === void 0 ? void 0 : dependencies.filter(dep => { var _a; return (_a = dep.masterFields) === null || _a === void 0 ? void 0 : _a.every(f => { var _a; return (_a = dataUnit.getField(f)) === null || _a === void 0 ? void 0 : _a.visible; }); }).forEach(dependency => {
|
|
7720
8192
|
var _a;
|
|
7721
|
-
if (dependency.type ===
|
|
8193
|
+
if (dependency.type === index$1.DependencyType.SEARCHING) {
|
|
7722
8194
|
if (((_a = dependency.masterFields) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
7723
8195
|
criteria = {
|
|
7724
8196
|
expression: dependency.expression,
|
|
7725
8197
|
params: dependency.masterFields.map(fieldName => {
|
|
7726
8198
|
const masterDescriptor = dataUnit.getField(fieldName);
|
|
7727
|
-
const dataType = (masterDescriptor === null || masterDescriptor === void 0 ? void 0 : masterDescriptor.dataType) ||
|
|
8199
|
+
const dataType = (masterDescriptor === null || masterDescriptor === void 0 ? void 0 : masterDescriptor.dataType) || index$1.DataType.TEXT;
|
|
7728
8200
|
const value = dataUnit.getFieldValue(fieldName);
|
|
7729
8201
|
if (value == undefined) {
|
|
7730
8202
|
this.alert("Erro ao pesquisar", `É necessario informar o campo ${masterDescriptor.label} para executar a pesquisa.`);
|
|
@@ -7736,23 +8208,27 @@ const SnkApplication = class {
|
|
|
7736
8208
|
}
|
|
7737
8209
|
}
|
|
7738
8210
|
});
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
|
|
7751
|
-
|
|
7752
|
-
|
|
7753
|
-
|
|
7754
|
-
|
|
7755
|
-
|
|
8211
|
+
return this.executePreparedSearch(mode, argument, { entity: ENTITYNAME, entityDescription: DESCRIPTIONENTITY, criteria, searchOptions });
|
|
8212
|
+
}
|
|
8213
|
+
}
|
|
8214
|
+
async executePreparedSearch(mode, argument, options) {
|
|
8215
|
+
const { entity, entityDescription, criteria, searchOptions } = options;
|
|
8216
|
+
if (mode === "ADVANCED") {
|
|
8217
|
+
return new Promise(accept => {
|
|
8218
|
+
const pesquisaContent = document.createElement("snk-pesquisa");
|
|
8219
|
+
pesquisaContent.argument = argument;
|
|
8220
|
+
pesquisaContent.searchLoader = (text) => this.pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
|
|
8221
|
+
pesquisaContent.selectItem = (option) => {
|
|
8222
|
+
accept(option);
|
|
8223
|
+
this.clearPopUpTitle();
|
|
8224
|
+
this.closePopUp();
|
|
8225
|
+
};
|
|
8226
|
+
this.setPopUpTitle(entityDescription);
|
|
8227
|
+
this.showPopUp(pesquisaContent);
|
|
8228
|
+
});
|
|
8229
|
+
}
|
|
8230
|
+
else {
|
|
8231
|
+
return this.pesquisaFetcher.loadSearchOptions(entity, argument, criteria, searchOptions);
|
|
7756
8232
|
}
|
|
7757
8233
|
}
|
|
7758
8234
|
async isDebugMode() {
|
|
@@ -7776,15 +8252,15 @@ const SnkApplication = class {
|
|
|
7776
8252
|
componentWillLoad() {
|
|
7777
8253
|
this._errorHandler = new SnkErrorHandler(this);
|
|
7778
8254
|
this.messagesBuilder = new SnkMessageBuilder.SnkMessageBuilder();
|
|
7779
|
-
|
|
7780
|
-
|
|
8255
|
+
index$1.ApplicationContext.setContextValue("__EZUI__UPLOAD__ADD__URL__", `${UrlUtils.getUrlBase()}/mge/upload/file`);
|
|
8256
|
+
index$1.ApplicationContext.setContextValue("__EZUI__SEARCH__OPTION__LOADER__", (searchArgument, fieldName, dataUnit) => {
|
|
7781
8257
|
return this.executeSearch(searchArgument, fieldName, dataUnit);
|
|
7782
8258
|
});
|
|
7783
|
-
|
|
7784
|
-
|
|
8259
|
+
index$1.ApplicationContext.setContextValue("__EZUI__GRID_LICENSE__", agGridLicense);
|
|
8260
|
+
index$1.ErrorTracking.init();
|
|
7785
8261
|
}
|
|
7786
8262
|
connectedCallback() {
|
|
7787
|
-
|
|
8263
|
+
index$1.ApplicationContext.setContextValue("__SNK__APPLICATION__", this);
|
|
7788
8264
|
DataFetcher.addRequestListener(this._requestListener);
|
|
7789
8265
|
}
|
|
7790
8266
|
disconnectedCallback() {
|
|
@@ -7797,7 +8273,7 @@ const SnkApplication = class {
|
|
|
7797
8273
|
});
|
|
7798
8274
|
}
|
|
7799
8275
|
render() {
|
|
7800
|
-
return (index.h("div", null, index.h("ez-loading-bar", { ref: (ref) => this._requestListener.loadingBar = ref }), index.h("ez-popup", { opened: false, ref: (ref) => this._popUp = ref, onEzClosePopup: () => this.closePopUp() })));
|
|
8276
|
+
return (index$2.h("div", null, index$2.h("ez-loading-bar", { ref: (ref) => this._requestListener.loadingBar = ref }), index$2.h("ez-popup", { opened: false, ref: (ref) => this._popUp = ref, onEzClosePopup: () => this.closePopUp() })));
|
|
7801
8277
|
}
|
|
7802
8278
|
};
|
|
7803
8279
|
class RequestListenerLoadingBar {
|