@sankhyalabs/sankhyablocks 1.3.31-beta.2 → 1.3.31-beta.20
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-7717f1e4.js +326 -0
- 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 +1041 -177
- package/dist/cjs/snk-crud.cjs.entry.js +65 -0
- package/dist/cjs/snk-data-unit.cjs.entry.js +276 -0
- package/dist/cjs/snk-filter-bar.cjs.entry.js +265 -0
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +47 -0
- package/dist/cjs/snk-filter-detail.cjs.entry.js +49 -0
- package/dist/cjs/snk-filter-item.cjs.entry.js +143 -0
- package/dist/cjs/snk-filter-list.cjs.entry.js +91 -0
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +23 -0
- package/dist/cjs/snk-filter-number.cjs.entry.js +24 -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.cjs.entry.js +133 -0
- package/dist/cjs/snk-grid.cjs.entry.js +79 -0
- package/dist/cjs/snk-pesquisa.cjs.entry.js +10 -7
- package/dist/cjs/snk-taskbar.cjs.entry.js +160 -0
- package/dist/cjs/taskbar-elements-283c737e.js +93 -0
- package/dist/cjs/taskbar-processor-6bd0d35c.js +47 -0
- package/dist/cjs/teste-pesquisa.cjs.entry.js +5 -5
- package/dist/collection/collection-manifest.json +17 -2
- package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +9 -2
- package/dist/collection/components/snk-application/snk-application.js +1061 -629
- package/dist/collection/components/snk-crud/snk-crud.css +6 -0
- package/dist/collection/components/snk-crud/snk-crud.js +176 -0
- package/dist/collection/components/snk-data-unit/snk-data-unit.css +6 -0
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +540 -0
- 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-multi-select.js +64 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +65 -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 +118 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +244 -0
- package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js +233 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +114 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +323 -0
- package/dist/collection/components/snk-form/snk-form.css +34 -0
- package/dist/collection/components/snk-form/snk-form.js +258 -0
- package/dist/collection/components/snk-grid/snk-grid.css +18 -0
- package/dist/collection/components/snk-grid/snk-grid.js +183 -0
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +56 -13
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +81 -76
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +86 -0
- package/dist/collection/components/snk-taskbar/processor/taskbar-processor.js +43 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +3 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +307 -0
- package/dist/collection/components/teste-pesquisa/teste-pesquisa.js +12 -9
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +38 -13
- package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +52 -21
- package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +388 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +4 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +2 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/totals-fetcher.js +47 -0
- package/dist/collection/lib/index.js +1 -0
- package/dist/collection/lib/message/SnkMessageBuilder.js +121 -0
- package/dist/collection/lib/message/resources/snk-data-unit.msg.js +23 -0
- package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +18 -0
- package/dist/collection/lib/message/resources/snk-form.msg.js +10 -0
- package/dist/collection/lib/message/resources/snk-taskbar.msg.js +17 -0
- package/dist/components/SnkMessageBuilder.js +303 -0
- package/dist/components/filter-item-type.enum.js +12 -0
- package/dist/components/index.d.ts +18 -5
- package/dist/components/index.js +22 -0
- package/dist/components/index2.js +2384 -0
- package/dist/components/snk-application2.js +1019 -148
- package/dist/components/snk-crud.d.ts +11 -0
- package/dist/components/snk-crud.js +127 -0
- package/dist/components/snk-data-unit.d.ts +11 -0
- package/dist/components/snk-data-unit.js +299 -0
- 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 +296 -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 +63 -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 +164 -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 +111 -0
- package/dist/components/snk-filter-multi-select.d.ts +11 -0
- package/dist/components/snk-filter-multi-select.js +39 -0
- package/dist/components/snk-filter-number.d.ts +11 -0
- package/dist/components/snk-filter-number.js +40 -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-form.d.ts +11 -0
- package/dist/components/snk-form.js +6 -0
- package/dist/components/snk-form2.js +159 -0
- package/dist/components/snk-grid.d.ts +11 -0
- package/dist/components/snk-grid.js +6 -0
- package/dist/components/snk-grid2.js +126 -0
- package/dist/components/snk-pesquisa2.js +6 -3
- package/dist/components/snk-taskbar.d.ts +11 -0
- package/dist/components/snk-taskbar.js +6 -0
- package/dist/components/snk-taskbar2.js +264 -0
- package/dist/components/taskbar-processor.js +45 -0
- package/dist/components/teste-pesquisa.js +1 -1
- package/dist/esm/SnkMessageBuilder-a7da466b.js +303 -0
- 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 +1013 -149
- package/dist/esm/snk-crud.entry.js +61 -0
- package/dist/esm/snk-data-unit.entry.js +272 -0
- package/dist/esm/snk-filter-bar.entry.js +261 -0
- package/dist/esm/snk-filter-binary-select.entry.js +43 -0
- package/dist/esm/snk-filter-detail.entry.js +45 -0
- package/dist/esm/snk-filter-item.entry.js +139 -0
- package/dist/esm/snk-filter-list.entry.js +87 -0
- package/dist/esm/snk-filter-multi-select.entry.js +19 -0
- package/dist/esm/snk-filter-number.entry.js +20 -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.entry.js +129 -0
- package/dist/esm/snk-grid.entry.js +75 -0
- package/dist/esm/snk-pesquisa.entry.js +7 -4
- package/dist/esm/snk-taskbar.entry.js +156 -0
- package/dist/esm/taskbar-elements-35d64ff9.js +90 -0
- package/dist/esm/taskbar-processor-aa6772c9.js +45 -0
- package/dist/esm/teste-pesquisa.entry.js +2 -2
- package/dist/sankhyablocks/SnkMessageBuilder-a7da466b.js +303 -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 +8452 -0
- package/dist/sankhyablocks/snk-crud.entry.js +61 -0
- package/dist/sankhyablocks/snk-data-unit.entry.js +272 -0
- package/dist/sankhyablocks/snk-filter-bar.entry.js +261 -0
- package/dist/sankhyablocks/snk-filter-binary-select.entry.js +43 -0
- package/dist/sankhyablocks/snk-filter-detail.entry.js +45 -0
- package/dist/sankhyablocks/snk-filter-item.entry.js +139 -0
- package/dist/sankhyablocks/snk-filter-list.entry.js +87 -0
- package/dist/sankhyablocks/snk-filter-multi-select.entry.js +19 -0
- package/dist/sankhyablocks/snk-filter-number.entry.js +20 -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 +129 -0
- package/dist/sankhyablocks/snk-grid.entry.js +75 -0
- package/dist/sankhyablocks/snk-pesquisa.entry.js +311 -0
- package/dist/sankhyablocks/snk-taskbar.entry.js +156 -0
- package/dist/sankhyablocks/taskbar-elements-35d64ff9.js +90 -0
- package/dist/sankhyablocks/taskbar-processor-aa6772c9.js +45 -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 +141 -20
- 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-multi-select.d.ts +7 -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 +14 -0
- package/dist/types/components/snk-filter-bar/filter-list/snk-filter-list.d.ts +40 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +46 -0
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +29 -0
- package/dist/types/components/snk-taskbar/processor/taskbar-processor.d.ts +12 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +84 -0
- package/dist/types/components.d.ts +662 -9
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +7 -6
- package/dist/types/lib/http/data-fetcher/fetchers/dataunit-fetcher.d.ts +2 -0
- package/dist/types/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.d.ts +5 -0
- package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +3 -3
- package/dist/types/lib/http/data-fetcher/fetchers/totals-fetcher.d.ts +8 -0
- package/dist/types/lib/index.d.ts +1 -0
- package/dist/types/lib/message/SnkMessageBuilder.d.ts +42 -0
- package/dist/types/lib/message/resources/snk-data-unit.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/snk-filter-bar.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/snk-form.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/snk-taskbar.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 -2
- package/react/components.js +0 -2
- package/react/components.js.map +1 -1
- package/dist/cjs/index-1133bc2a.js +0 -1235
- package/dist/esm/index-ffda6382.js +0 -1208
- package/dist/sankhyablocks/p-2a7b4cb3.entry.js +0 -1
- package/dist/sankhyablocks/p-d62412bb.entry.js +0 -1
- package/dist/sankhyablocks/p-e6e91d5f.entry.js +0 -69
- package/dist/sankhyablocks/p-edcb9d8e.js +0 -2
|
@@ -1,20 +1,47 @@
|
|
|
1
|
-
import { r as registerInstance,
|
|
2
|
-
import { ErrorException, StringUtils, DataUnit, DataType, ChangeOperation, DateUtils, ObjectUtils, WaitingChangeException,
|
|
3
|
-
import { ApplicationUtils } from '
|
|
4
|
-
import {
|
|
1
|
+
import { r as registerInstance, e as createEvent, h } from './index-2b4d2d14.js';
|
|
2
|
+
import { E as ErrorException, W as WarningException, S as StringUtils, D as DataUnit, b as DataType, C as ChangeOperation, c as DateUtils, O as ObjectUtils, d as WaitingChangeException, e as DependencyType, a as ApplicationContext, f as ErrorTracking } from './index-e5b61043.js';
|
|
3
|
+
import { A as ApplicationUtils, S as SnkMessageBuilder } from './SnkMessageBuilder-a7da466b.js';
|
|
4
|
+
import { F as FilterItemType } from './filter-item-type.enum-61fbf80a.js';
|
|
5
5
|
|
|
6
6
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
7
7
|
|
|
8
|
+
function getDefaultExportFromCjs (x) {
|
|
9
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
10
|
+
}
|
|
11
|
+
|
|
8
12
|
function createCommonjsModule(fn, basedir, module) {
|
|
9
13
|
return module = {
|
|
10
14
|
path: basedir,
|
|
11
15
|
exports: {},
|
|
12
16
|
require: function (path, base) {
|
|
13
|
-
return commonjsRequire();
|
|
17
|
+
return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
|
|
14
18
|
}
|
|
15
19
|
}, fn(module, module.exports), module.exports;
|
|
16
20
|
}
|
|
17
21
|
|
|
22
|
+
function getDefaultExportFromNamespaceIfPresent (n) {
|
|
23
|
+
return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function getDefaultExportFromNamespaceIfNotNamed (n) {
|
|
27
|
+
return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function getAugmentedNamespace(n) {
|
|
31
|
+
if (n.__esModule) return n;
|
|
32
|
+
var a = Object.defineProperty({}, '__esModule', {value: true});
|
|
33
|
+
Object.keys(n).forEach(function (k) {
|
|
34
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
35
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () {
|
|
38
|
+
return n[k];
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
return a;
|
|
43
|
+
}
|
|
44
|
+
|
|
18
45
|
function commonjsRequire () {
|
|
19
46
|
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
20
47
|
}
|
|
@@ -31,7 +58,7 @@ return new F();
|
|
|
31
58
|
})();
|
|
32
59
|
(function(self) {
|
|
33
60
|
|
|
34
|
-
(
|
|
61
|
+
var irrelevant = (function (exports) {
|
|
35
62
|
|
|
36
63
|
var support = {
|
|
37
64
|
searchParams: 'URLSearchParams' in self,
|
|
@@ -559,7 +586,7 @@ return new F();
|
|
|
559
586
|
|
|
560
587
|
return exports;
|
|
561
588
|
|
|
562
|
-
})
|
|
589
|
+
})({});
|
|
563
590
|
})(__self__);
|
|
564
591
|
__self__.fetch.ponyfill = true;
|
|
565
592
|
// Remove "polyfill" property added by whatwg-fetch
|
|
@@ -576,7 +603,10 @@ exports.Response = ctx.Response;
|
|
|
576
603
|
module.exports = exports;
|
|
577
604
|
});
|
|
578
605
|
|
|
606
|
+
const browserPonyfill$1 = /*@__PURE__*/getDefaultExportFromCjs(browserPonyfill);
|
|
607
|
+
|
|
579
608
|
var isObjectLike_1 = createCommonjsModule(function (module, exports) {
|
|
609
|
+
'use strict';
|
|
580
610
|
|
|
581
611
|
Object.defineProperty(exports, '__esModule', {
|
|
582
612
|
value: true,
|
|
@@ -592,7 +622,10 @@ function isObjectLike(value) {
|
|
|
592
622
|
}
|
|
593
623
|
});
|
|
594
624
|
|
|
625
|
+
const isObjectLike = /*@__PURE__*/getDefaultExportFromCjs(isObjectLike_1);
|
|
626
|
+
|
|
595
627
|
var invariant_1 = createCommonjsModule(function (module, exports) {
|
|
628
|
+
'use strict';
|
|
596
629
|
|
|
597
630
|
Object.defineProperty(exports, '__esModule', {
|
|
598
631
|
value: true,
|
|
@@ -610,7 +643,10 @@ function invariant(condition, message) {
|
|
|
610
643
|
}
|
|
611
644
|
});
|
|
612
645
|
|
|
646
|
+
const invariant = /*@__PURE__*/getDefaultExportFromCjs(invariant_1);
|
|
647
|
+
|
|
613
648
|
var location_1 = createCommonjsModule(function (module, exports) {
|
|
649
|
+
'use strict';
|
|
614
650
|
|
|
615
651
|
Object.defineProperty(exports, '__esModule', {
|
|
616
652
|
value: true,
|
|
@@ -650,7 +686,10 @@ function getLocation(source, position) {
|
|
|
650
686
|
}
|
|
651
687
|
});
|
|
652
688
|
|
|
689
|
+
const location$1 = /*@__PURE__*/getDefaultExportFromCjs(location_1);
|
|
690
|
+
|
|
653
691
|
var printLocation_1 = createCommonjsModule(function (module, exports) {
|
|
692
|
+
'use strict';
|
|
654
693
|
|
|
655
694
|
Object.defineProperty(exports, '__esModule', {
|
|
656
695
|
value: true,
|
|
@@ -726,7 +765,10 @@ function printPrefixedLines(lines) {
|
|
|
726
765
|
}
|
|
727
766
|
});
|
|
728
767
|
|
|
768
|
+
const printLocation = /*@__PURE__*/getDefaultExportFromCjs(printLocation_1);
|
|
769
|
+
|
|
729
770
|
var GraphQLError_1 = createCommonjsModule(function (module, exports) {
|
|
771
|
+
'use strict';
|
|
730
772
|
|
|
731
773
|
Object.defineProperty(exports, '__esModule', {
|
|
732
774
|
value: true,
|
|
@@ -995,7 +1037,10 @@ function formatError(error) {
|
|
|
995
1037
|
}
|
|
996
1038
|
});
|
|
997
1039
|
|
|
1040
|
+
const GraphQLError = /*@__PURE__*/getDefaultExportFromCjs(GraphQLError_1);
|
|
1041
|
+
|
|
998
1042
|
var syntaxError_1 = createCommonjsModule(function (module, exports) {
|
|
1043
|
+
'use strict';
|
|
999
1044
|
|
|
1000
1045
|
Object.defineProperty(exports, '__esModule', {
|
|
1001
1046
|
value: true,
|
|
@@ -1016,7 +1061,10 @@ function syntaxError(source, position, description) {
|
|
|
1016
1061
|
}
|
|
1017
1062
|
});
|
|
1018
1063
|
|
|
1064
|
+
const syntaxError = /*@__PURE__*/getDefaultExportFromCjs(syntaxError_1);
|
|
1065
|
+
|
|
1019
1066
|
var ast = createCommonjsModule(function (module, exports) {
|
|
1067
|
+
'use strict';
|
|
1020
1068
|
|
|
1021
1069
|
Object.defineProperty(exports, '__esModule', {
|
|
1022
1070
|
value: true,
|
|
@@ -1232,7 +1280,7 @@ function isNode(maybeNode) {
|
|
|
1232
1280
|
}
|
|
1233
1281
|
/** Name */
|
|
1234
1282
|
|
|
1235
|
-
|
|
1283
|
+
var OperationTypeNode;
|
|
1236
1284
|
exports.OperationTypeNode = OperationTypeNode;
|
|
1237
1285
|
|
|
1238
1286
|
(function (OperationTypeNode) {
|
|
@@ -1242,7 +1290,10 @@ exports.OperationTypeNode = OperationTypeNode;
|
|
|
1242
1290
|
})(OperationTypeNode || (exports.OperationTypeNode = OperationTypeNode = {}));
|
|
1243
1291
|
});
|
|
1244
1292
|
|
|
1293
|
+
const ast$1 = /*@__PURE__*/getDefaultExportFromCjs(ast);
|
|
1294
|
+
|
|
1245
1295
|
var directiveLocation = createCommonjsModule(function (module, exports) {
|
|
1296
|
+
'use strict';
|
|
1246
1297
|
|
|
1247
1298
|
Object.defineProperty(exports, '__esModule', {
|
|
1248
1299
|
value: true,
|
|
@@ -1252,13 +1303,7 @@ exports.DirectiveLocation = void 0;
|
|
|
1252
1303
|
/**
|
|
1253
1304
|
* The set of allowed directive location values.
|
|
1254
1305
|
*/
|
|
1255
|
-
|
|
1256
|
-
/**
|
|
1257
|
-
* The enum type representing the directive location values.
|
|
1258
|
-
*
|
|
1259
|
-
* @deprecated Please use `DirectiveLocation`. Will be remove in v17.
|
|
1260
|
-
*/
|
|
1261
|
-
|
|
1306
|
+
var DirectiveLocation;
|
|
1262
1307
|
exports.DirectiveLocation = DirectiveLocation;
|
|
1263
1308
|
|
|
1264
1309
|
(function (DirectiveLocation) {
|
|
@@ -1282,9 +1327,17 @@ exports.DirectiveLocation = DirectiveLocation;
|
|
|
1282
1327
|
DirectiveLocation['INPUT_OBJECT'] = 'INPUT_OBJECT';
|
|
1283
1328
|
DirectiveLocation['INPUT_FIELD_DEFINITION'] = 'INPUT_FIELD_DEFINITION';
|
|
1284
1329
|
})(DirectiveLocation || (exports.DirectiveLocation = DirectiveLocation = {}));
|
|
1330
|
+
/**
|
|
1331
|
+
* The enum type representing the directive location values.
|
|
1332
|
+
*
|
|
1333
|
+
* @deprecated Please use `DirectiveLocation`. Will be remove in v17.
|
|
1334
|
+
*/
|
|
1285
1335
|
});
|
|
1286
1336
|
|
|
1337
|
+
const directiveLocation$1 = /*@__PURE__*/getDefaultExportFromCjs(directiveLocation);
|
|
1338
|
+
|
|
1287
1339
|
var kinds = createCommonjsModule(function (module, exports) {
|
|
1340
|
+
'use strict';
|
|
1288
1341
|
|
|
1289
1342
|
Object.defineProperty(exports, '__esModule', {
|
|
1290
1343
|
value: true,
|
|
@@ -1294,13 +1347,7 @@ exports.Kind = void 0;
|
|
|
1294
1347
|
/**
|
|
1295
1348
|
* The set of allowed kind values for AST nodes.
|
|
1296
1349
|
*/
|
|
1297
|
-
|
|
1298
|
-
/**
|
|
1299
|
-
* The enum type representing the possible kind values of AST nodes.
|
|
1300
|
-
*
|
|
1301
|
-
* @deprecated Please use `Kind`. Will be remove in v17.
|
|
1302
|
-
*/
|
|
1303
|
-
|
|
1350
|
+
var Kind;
|
|
1304
1351
|
exports.Kind = Kind;
|
|
1305
1352
|
|
|
1306
1353
|
(function (Kind) {
|
|
@@ -1348,9 +1395,17 @@ exports.Kind = Kind;
|
|
|
1348
1395
|
Kind['ENUM_TYPE_EXTENSION'] = 'EnumTypeExtension';
|
|
1349
1396
|
Kind['INPUT_OBJECT_TYPE_EXTENSION'] = 'InputObjectTypeExtension';
|
|
1350
1397
|
})(Kind || (exports.Kind = Kind = {}));
|
|
1398
|
+
/**
|
|
1399
|
+
* The enum type representing the possible kind values of AST nodes.
|
|
1400
|
+
*
|
|
1401
|
+
* @deprecated Please use `Kind`. Will be remove in v17.
|
|
1402
|
+
*/
|
|
1351
1403
|
});
|
|
1352
1404
|
|
|
1405
|
+
const kinds$1 = /*@__PURE__*/getDefaultExportFromCjs(kinds);
|
|
1406
|
+
|
|
1353
1407
|
var characterClasses = createCommonjsModule(function (module, exports) {
|
|
1408
|
+
'use strict';
|
|
1354
1409
|
|
|
1355
1410
|
Object.defineProperty(exports, '__esModule', {
|
|
1356
1411
|
value: true,
|
|
@@ -1427,7 +1482,10 @@ function isNameContinue(code) {
|
|
|
1427
1482
|
}
|
|
1428
1483
|
});
|
|
1429
1484
|
|
|
1485
|
+
const characterClasses$1 = /*@__PURE__*/getDefaultExportFromCjs(characterClasses);
|
|
1486
|
+
|
|
1430
1487
|
var blockString = createCommonjsModule(function (module, exports) {
|
|
1488
|
+
'use strict';
|
|
1431
1489
|
|
|
1432
1490
|
Object.defineProperty(exports, '__esModule', {
|
|
1433
1491
|
value: true,
|
|
@@ -1624,7 +1682,10 @@ function printBlockString(value, options) {
|
|
|
1624
1682
|
}
|
|
1625
1683
|
});
|
|
1626
1684
|
|
|
1685
|
+
const blockString$1 = /*@__PURE__*/getDefaultExportFromCjs(blockString);
|
|
1686
|
+
|
|
1627
1687
|
var tokenKind = createCommonjsModule(function (module, exports) {
|
|
1688
|
+
'use strict';
|
|
1628
1689
|
|
|
1629
1690
|
Object.defineProperty(exports, '__esModule', {
|
|
1630
1691
|
value: true,
|
|
@@ -1635,13 +1696,7 @@ exports.TokenKind = void 0;
|
|
|
1635
1696
|
* An exported enum describing the different kinds of tokens that the
|
|
1636
1697
|
* lexer emits.
|
|
1637
1698
|
*/
|
|
1638
|
-
|
|
1639
|
-
/**
|
|
1640
|
-
* The enum type representing the token kinds values.
|
|
1641
|
-
*
|
|
1642
|
-
* @deprecated Please use `TokenKind`. Will be remove in v17.
|
|
1643
|
-
*/
|
|
1644
|
-
|
|
1699
|
+
var TokenKind;
|
|
1645
1700
|
exports.TokenKind = TokenKind;
|
|
1646
1701
|
|
|
1647
1702
|
(function (TokenKind) {
|
|
@@ -1668,9 +1723,17 @@ exports.TokenKind = TokenKind;
|
|
|
1668
1723
|
TokenKind['BLOCK_STRING'] = 'BlockString';
|
|
1669
1724
|
TokenKind['COMMENT'] = 'Comment';
|
|
1670
1725
|
})(TokenKind || (exports.TokenKind = TokenKind = {}));
|
|
1726
|
+
/**
|
|
1727
|
+
* The enum type representing the token kinds values.
|
|
1728
|
+
*
|
|
1729
|
+
* @deprecated Please use `TokenKind`. Will be remove in v17.
|
|
1730
|
+
*/
|
|
1671
1731
|
});
|
|
1672
1732
|
|
|
1733
|
+
const tokenKind$1 = /*@__PURE__*/getDefaultExportFromCjs(tokenKind);
|
|
1734
|
+
|
|
1673
1735
|
var lexer = createCommonjsModule(function (module, exports) {
|
|
1736
|
+
'use strict';
|
|
1674
1737
|
|
|
1675
1738
|
Object.defineProperty(exports, '__esModule', {
|
|
1676
1739
|
value: true,
|
|
@@ -2678,7 +2741,10 @@ function readName(lexer, start) {
|
|
|
2678
2741
|
}
|
|
2679
2742
|
});
|
|
2680
2743
|
|
|
2744
|
+
const lexer$1 = /*@__PURE__*/getDefaultExportFromCjs(lexer);
|
|
2745
|
+
|
|
2681
2746
|
var devAssert_1 = createCommonjsModule(function (module, exports) {
|
|
2747
|
+
'use strict';
|
|
2682
2748
|
|
|
2683
2749
|
Object.defineProperty(exports, '__esModule', {
|
|
2684
2750
|
value: true,
|
|
@@ -2694,7 +2760,10 @@ function devAssert(condition, message) {
|
|
|
2694
2760
|
}
|
|
2695
2761
|
});
|
|
2696
2762
|
|
|
2763
|
+
const devAssert = /*@__PURE__*/getDefaultExportFromCjs(devAssert_1);
|
|
2764
|
+
|
|
2697
2765
|
var inspect_1 = createCommonjsModule(function (module, exports) {
|
|
2766
|
+
'use strict';
|
|
2698
2767
|
|
|
2699
2768
|
Object.defineProperty(exports, '__esModule', {
|
|
2700
2769
|
value: true,
|
|
@@ -2817,7 +2886,10 @@ function getObjectTag(object) {
|
|
|
2817
2886
|
}
|
|
2818
2887
|
});
|
|
2819
2888
|
|
|
2889
|
+
const inspect = /*@__PURE__*/getDefaultExportFromCjs(inspect_1);
|
|
2890
|
+
|
|
2820
2891
|
var instanceOf_1 = createCommonjsModule(function (module, exports) {
|
|
2892
|
+
'use strict';
|
|
2821
2893
|
|
|
2822
2894
|
Object.defineProperty(exports, '__esModule', {
|
|
2823
2895
|
value: true,
|
|
@@ -2836,14 +2908,54 @@ const instanceOf =
|
|
|
2836
2908
|
/* c8 ignore next 6 */
|
|
2837
2909
|
// FIXME: https://github.com/graphql/graphql-js/issues/2317
|
|
2838
2910
|
// eslint-disable-next-line no-undef
|
|
2839
|
-
|
|
2911
|
+
"development" === 'production'
|
|
2912
|
+
? function instanceOf(value, constructor) {
|
|
2840
2913
|
return value instanceof constructor;
|
|
2841
2914
|
}
|
|
2842
|
-
|
|
2915
|
+
: function instanceOf(value, constructor) {
|
|
2916
|
+
if (value instanceof constructor) {
|
|
2917
|
+
return true;
|
|
2918
|
+
}
|
|
2919
|
+
|
|
2920
|
+
if (typeof value === 'object' && value !== null) {
|
|
2921
|
+
var _value$constructor;
|
|
2922
|
+
|
|
2923
|
+
// Prefer Symbol.toStringTag since it is immune to minification.
|
|
2924
|
+
const className = constructor.prototype[Symbol.toStringTag];
|
|
2925
|
+
const valueClassName = // We still need to support constructor's name to detect conflicts with older versions of this library.
|
|
2926
|
+
Symbol.toStringTag in value // @ts-expect-error TS bug see, https://github.com/microsoft/TypeScript/issues/38009
|
|
2927
|
+
? value[Symbol.toStringTag]
|
|
2928
|
+
: (_value$constructor = value.constructor) === null ||
|
|
2929
|
+
_value$constructor === void 0
|
|
2930
|
+
? void 0
|
|
2931
|
+
: _value$constructor.name;
|
|
2932
|
+
|
|
2933
|
+
if (className === valueClassName) {
|
|
2934
|
+
const stringifiedValue = (0, inspect_1.inspect)(value);
|
|
2935
|
+
throw new Error(`Cannot use ${className} "${stringifiedValue}" from another module or realm.
|
|
2936
|
+
|
|
2937
|
+
Ensure that there is only one instance of "graphql" in the node_modules
|
|
2938
|
+
directory. If different versions of "graphql" are the dependencies of other
|
|
2939
|
+
relied on modules, use "resolutions" to ensure only one version is installed.
|
|
2940
|
+
|
|
2941
|
+
https://yarnpkg.com/en/docs/selective-version-resolutions
|
|
2942
|
+
|
|
2943
|
+
Duplicate "graphql" modules cannot be used at the same time since different
|
|
2944
|
+
versions may have different capabilities and behavior. The data from one
|
|
2945
|
+
version used in the function from another could produce confusing and
|
|
2946
|
+
spurious results.`);
|
|
2947
|
+
}
|
|
2948
|
+
}
|
|
2949
|
+
|
|
2950
|
+
return false;
|
|
2951
|
+
};
|
|
2843
2952
|
exports.instanceOf = instanceOf;
|
|
2844
2953
|
});
|
|
2845
2954
|
|
|
2955
|
+
const instanceOf = /*@__PURE__*/getDefaultExportFromCjs(instanceOf_1);
|
|
2956
|
+
|
|
2846
2957
|
var source = createCommonjsModule(function (module, exports) {
|
|
2958
|
+
'use strict';
|
|
2847
2959
|
|
|
2848
2960
|
Object.defineProperty(exports, '__esModule', {
|
|
2849
2961
|
value: true,
|
|
@@ -2910,7 +3022,10 @@ function isSource(source) {
|
|
|
2910
3022
|
}
|
|
2911
3023
|
});
|
|
2912
3024
|
|
|
3025
|
+
const source$1 = /*@__PURE__*/getDefaultExportFromCjs(source);
|
|
3026
|
+
|
|
2913
3027
|
var parser = createCommonjsModule(function (module, exports) {
|
|
3028
|
+
'use strict';
|
|
2914
3029
|
|
|
2915
3030
|
Object.defineProperty(exports, '__esModule', {
|
|
2916
3031
|
value: true,
|
|
@@ -3004,12 +3119,13 @@ function parseType(source, options) {
|
|
|
3004
3119
|
*/
|
|
3005
3120
|
|
|
3006
3121
|
class Parser {
|
|
3007
|
-
constructor(source$1, options) {
|
|
3122
|
+
constructor(source$1, options = {}) {
|
|
3008
3123
|
const sourceObj = (0, source.isSource)(source$1)
|
|
3009
3124
|
? source$1
|
|
3010
3125
|
: new source.Source(source$1);
|
|
3011
3126
|
this._lexer = new lexer.Lexer(sourceObj);
|
|
3012
3127
|
this._options = options;
|
|
3128
|
+
this._tokenCounter = 0;
|
|
3013
3129
|
}
|
|
3014
3130
|
/**
|
|
3015
3131
|
* Converts a name lex token into a name parse node.
|
|
@@ -3344,18 +3460,12 @@ class Parser {
|
|
|
3344
3460
|
*/
|
|
3345
3461
|
|
|
3346
3462
|
parseFragmentDefinition() {
|
|
3347
|
-
var _this$_options;
|
|
3348
|
-
|
|
3349
3463
|
const start = this._lexer.token;
|
|
3350
3464
|
this.expectKeyword('fragment'); // Legacy support for defining variables within fragments changes
|
|
3351
3465
|
// the grammar of FragmentDefinition:
|
|
3352
3466
|
// - fragment FragmentName VariableDefinitions? on TypeCondition Directives? SelectionSet
|
|
3353
3467
|
|
|
3354
|
-
if (
|
|
3355
|
-
((_this$_options = this._options) === null || _this$_options === void 0
|
|
3356
|
-
? void 0
|
|
3357
|
-
: _this$_options.allowLegacyFragmentVariables) === true
|
|
3358
|
-
) {
|
|
3468
|
+
if (this._options.allowLegacyFragmentVariables === true) {
|
|
3359
3469
|
return this.node(start, {
|
|
3360
3470
|
kind: kinds.Kind.FRAGMENT_DEFINITION,
|
|
3361
3471
|
name: this.parseFragmentName(),
|
|
@@ -3416,16 +3526,14 @@ class Parser {
|
|
|
3416
3526
|
return this.parseObject(isConst);
|
|
3417
3527
|
|
|
3418
3528
|
case tokenKind.TokenKind.INT:
|
|
3419
|
-
this.
|
|
3420
|
-
|
|
3529
|
+
this.advanceLexer();
|
|
3421
3530
|
return this.node(token, {
|
|
3422
3531
|
kind: kinds.Kind.INT,
|
|
3423
3532
|
value: token.value,
|
|
3424
3533
|
});
|
|
3425
3534
|
|
|
3426
3535
|
case tokenKind.TokenKind.FLOAT:
|
|
3427
|
-
this.
|
|
3428
|
-
|
|
3536
|
+
this.advanceLexer();
|
|
3429
3537
|
return this.node(token, {
|
|
3430
3538
|
kind: kinds.Kind.FLOAT,
|
|
3431
3539
|
value: token.value,
|
|
@@ -3436,7 +3544,7 @@ class Parser {
|
|
|
3436
3544
|
return this.parseStringLiteral();
|
|
3437
3545
|
|
|
3438
3546
|
case tokenKind.TokenKind.NAME:
|
|
3439
|
-
this.
|
|
3547
|
+
this.advanceLexer();
|
|
3440
3548
|
|
|
3441
3549
|
switch (token.value) {
|
|
3442
3550
|
case 'true':
|
|
@@ -3492,9 +3600,7 @@ class Parser {
|
|
|
3492
3600
|
|
|
3493
3601
|
parseStringLiteral() {
|
|
3494
3602
|
const token = this._lexer.token;
|
|
3495
|
-
|
|
3496
|
-
this._lexer.advance();
|
|
3497
|
-
|
|
3603
|
+
this.advanceLexer();
|
|
3498
3604
|
return this.node(token, {
|
|
3499
3605
|
kind: kinds.Kind.STRING,
|
|
3500
3606
|
value: token.value,
|
|
@@ -4285,13 +4391,7 @@ class Parser {
|
|
|
4285
4391
|
*/
|
|
4286
4392
|
|
|
4287
4393
|
node(startToken, node) {
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
if (
|
|
4291
|
-
((_this$_options2 = this._options) === null || _this$_options2 === void 0
|
|
4292
|
-
? void 0
|
|
4293
|
-
: _this$_options2.noLocation) !== true
|
|
4294
|
-
) {
|
|
4394
|
+
if (this._options.noLocation !== true) {
|
|
4295
4395
|
node.loc = new ast.Location(
|
|
4296
4396
|
startToken,
|
|
4297
4397
|
this._lexer.lastToken,
|
|
@@ -4317,8 +4417,7 @@ class Parser {
|
|
|
4317
4417
|
const token = this._lexer.token;
|
|
4318
4418
|
|
|
4319
4419
|
if (token.kind === kind) {
|
|
4320
|
-
this.
|
|
4321
|
-
|
|
4420
|
+
this.advanceLexer();
|
|
4322
4421
|
return token;
|
|
4323
4422
|
}
|
|
4324
4423
|
|
|
@@ -4337,8 +4436,7 @@ class Parser {
|
|
|
4337
4436
|
const token = this._lexer.token;
|
|
4338
4437
|
|
|
4339
4438
|
if (token.kind === kind) {
|
|
4340
|
-
this.
|
|
4341
|
-
|
|
4439
|
+
this.advanceLexer();
|
|
4342
4440
|
return true;
|
|
4343
4441
|
}
|
|
4344
4442
|
|
|
@@ -4353,7 +4451,7 @@ class Parser {
|
|
|
4353
4451
|
const token = this._lexer.token;
|
|
4354
4452
|
|
|
4355
4453
|
if (token.kind === tokenKind.TokenKind.NAME && token.value === value) {
|
|
4356
|
-
this.
|
|
4454
|
+
this.advanceLexer();
|
|
4357
4455
|
} else {
|
|
4358
4456
|
throw (0, syntaxError_1.syntaxError)(
|
|
4359
4457
|
this._lexer.source,
|
|
@@ -4371,8 +4469,7 @@ class Parser {
|
|
|
4371
4469
|
const token = this._lexer.token;
|
|
4372
4470
|
|
|
4373
4471
|
if (token.kind === tokenKind.TokenKind.NAME && token.value === value) {
|
|
4374
|
-
this.
|
|
4375
|
-
|
|
4472
|
+
this.advanceLexer();
|
|
4376
4473
|
return true;
|
|
4377
4474
|
}
|
|
4378
4475
|
|
|
@@ -4459,6 +4556,24 @@ class Parser {
|
|
|
4459
4556
|
|
|
4460
4557
|
return nodes;
|
|
4461
4558
|
}
|
|
4559
|
+
|
|
4560
|
+
advanceLexer() {
|
|
4561
|
+
const { maxTokens } = this._options;
|
|
4562
|
+
|
|
4563
|
+
const token = this._lexer.advance();
|
|
4564
|
+
|
|
4565
|
+
if (maxTokens !== undefined && token.kind !== tokenKind.TokenKind.EOF) {
|
|
4566
|
+
++this._tokenCounter;
|
|
4567
|
+
|
|
4568
|
+
if (this._tokenCounter > maxTokens) {
|
|
4569
|
+
throw (0, syntaxError_1.syntaxError)(
|
|
4570
|
+
this._lexer.source,
|
|
4571
|
+
token.start,
|
|
4572
|
+
`Document contains more that ${maxTokens} tokens. Parsing aborted.`,
|
|
4573
|
+
);
|
|
4574
|
+
}
|
|
4575
|
+
}
|
|
4576
|
+
}
|
|
4462
4577
|
}
|
|
4463
4578
|
/**
|
|
4464
4579
|
* A helper function to describe a token as a string for debugging.
|
|
@@ -4479,7 +4594,10 @@ function getTokenKindDesc(kind) {
|
|
|
4479
4594
|
}
|
|
4480
4595
|
});
|
|
4481
4596
|
|
|
4597
|
+
const parser$1 = /*@__PURE__*/getDefaultExportFromCjs(parser);
|
|
4598
|
+
|
|
4482
4599
|
var printString_1 = createCommonjsModule(function (module, exports) {
|
|
4600
|
+
'use strict';
|
|
4483
4601
|
|
|
4484
4602
|
Object.defineProperty(exports, '__esModule', {
|
|
4485
4603
|
value: true,
|
|
@@ -4664,7 +4782,10 @@ const escapeSequences = [
|
|
|
4664
4782
|
];
|
|
4665
4783
|
});
|
|
4666
4784
|
|
|
4785
|
+
const printString = /*@__PURE__*/getDefaultExportFromCjs(printString_1);
|
|
4786
|
+
|
|
4667
4787
|
var visitor = createCommonjsModule(function (module, exports) {
|
|
4788
|
+
'use strict';
|
|
4668
4789
|
|
|
4669
4790
|
Object.defineProperty(exports, '__esModule', {
|
|
4670
4791
|
value: true,
|
|
@@ -5043,7 +5164,10 @@ function getVisitFn(visitor, kind, isLeaving) {
|
|
|
5043
5164
|
}
|
|
5044
5165
|
});
|
|
5045
5166
|
|
|
5167
|
+
const visitor$1 = /*@__PURE__*/getDefaultExportFromCjs(visitor);
|
|
5168
|
+
|
|
5046
5169
|
var printer = createCommonjsModule(function (module, exports) {
|
|
5170
|
+
'use strict';
|
|
5047
5171
|
|
|
5048
5172
|
Object.defineProperty(exports, '__esModule', {
|
|
5049
5173
|
value: true,
|
|
@@ -5396,6 +5520,10 @@ function hasMultilineItems(maybeArray) {
|
|
|
5396
5520
|
}
|
|
5397
5521
|
});
|
|
5398
5522
|
|
|
5523
|
+
const printer$1 = /*@__PURE__*/getDefaultExportFromCjs(printer);
|
|
5524
|
+
|
|
5525
|
+
'use strict';
|
|
5526
|
+
|
|
5399
5527
|
var ReactNativeFile$1 = function ReactNativeFile(_ref) {
|
|
5400
5528
|
var uri = _ref.uri,
|
|
5401
5529
|
name = _ref.name,
|
|
@@ -5405,6 +5533,10 @@ var ReactNativeFile$1 = function ReactNativeFile(_ref) {
|
|
|
5405
5533
|
this.type = type;
|
|
5406
5534
|
};
|
|
5407
5535
|
|
|
5536
|
+
'use strict';
|
|
5537
|
+
|
|
5538
|
+
|
|
5539
|
+
|
|
5408
5540
|
var isExtractableFile$1 = function isExtractableFile(value) {
|
|
5409
5541
|
return (
|
|
5410
5542
|
(typeof File !== 'undefined' && value instanceof File) ||
|
|
@@ -5413,6 +5545,10 @@ var isExtractableFile$1 = function isExtractableFile(value) {
|
|
|
5413
5545
|
);
|
|
5414
5546
|
};
|
|
5415
5547
|
|
|
5548
|
+
'use strict';
|
|
5549
|
+
|
|
5550
|
+
|
|
5551
|
+
|
|
5416
5552
|
var extractFiles$1 = function extractFiles(value, path, isExtractableFile) {
|
|
5417
5553
|
if (path === void 0) {
|
|
5418
5554
|
path = '';
|
|
@@ -5464,6 +5600,8 @@ var extractFiles$1 = function extractFiles(value, path, isExtractableFile) {
|
|
|
5464
5600
|
};
|
|
5465
5601
|
};
|
|
5466
5602
|
|
|
5603
|
+
'use strict';
|
|
5604
|
+
|
|
5467
5605
|
var ReactNativeFile = ReactNativeFile$1;
|
|
5468
5606
|
var extractFiles = extractFiles$1;
|
|
5469
5607
|
var isExtractableFile = isExtractableFile$1;
|
|
@@ -5478,6 +5616,7 @@ var _public = {
|
|
|
5478
5616
|
var browser = typeof self == 'object' ? self.FormData : window.FormData;
|
|
5479
5617
|
|
|
5480
5618
|
var defaultJsonSerializer = createCommonjsModule(function (module, exports) {
|
|
5619
|
+
"use strict";
|
|
5481
5620
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5482
5621
|
exports.defaultJsonSerializer = void 0;
|
|
5483
5622
|
exports.defaultJsonSerializer = {
|
|
@@ -5487,7 +5626,10 @@ exports.defaultJsonSerializer = {
|
|
|
5487
5626
|
//# sourceMappingURL=defaultJsonSerializer.js.map
|
|
5488
5627
|
});
|
|
5489
5628
|
|
|
5629
|
+
const defaultJsonSerializer$1 = /*@__PURE__*/getDefaultExportFromCjs(defaultJsonSerializer);
|
|
5630
|
+
|
|
5490
5631
|
var createRequestBody_1 = createCommonjsModule(function (module, exports) {
|
|
5632
|
+
"use strict";
|
|
5491
5633
|
var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
5492
5634
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5493
5635
|
};
|
|
@@ -5544,7 +5686,10 @@ exports.default = createRequestBody;
|
|
|
5544
5686
|
//# sourceMappingURL=createRequestBody.js.map
|
|
5545
5687
|
});
|
|
5546
5688
|
|
|
5689
|
+
const createRequestBody = /*@__PURE__*/getDefaultExportFromCjs(createRequestBody_1);
|
|
5690
|
+
|
|
5547
5691
|
var parseArgs = createCommonjsModule(function (module, exports) {
|
|
5692
|
+
"use strict";
|
|
5548
5693
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5549
5694
|
exports.parseBatchRequestsExtendedArgs = exports.parseRawRequestExtendedArgs = exports.parseRequestExtendedArgs = exports.parseBatchRequestArgs = exports.parseRawRequestArgs = exports.parseRequestArgs = void 0;
|
|
5550
5695
|
function parseRequestArgs(documentOrOptions, variables, requestHeaders) {
|
|
@@ -5617,7 +5762,10 @@ exports.parseBatchRequestsExtendedArgs = parseBatchRequestsExtendedArgs;
|
|
|
5617
5762
|
//# sourceMappingURL=parseArgs.js.map
|
|
5618
5763
|
});
|
|
5619
5764
|
|
|
5765
|
+
const parseArgs$1 = /*@__PURE__*/getDefaultExportFromCjs(parseArgs);
|
|
5766
|
+
|
|
5620
5767
|
var types = createCommonjsModule(function (module, exports) {
|
|
5768
|
+
"use strict";
|
|
5621
5769
|
var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () {
|
|
5622
5770
|
var extendStatics = function (d, b) {
|
|
5623
5771
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -5667,7 +5815,10 @@ exports.ClientError = ClientError;
|
|
|
5667
5815
|
//# sourceMappingURL=types.js.map
|
|
5668
5816
|
});
|
|
5669
5817
|
|
|
5818
|
+
const types$1 = /*@__PURE__*/getDefaultExportFromCjs(types);
|
|
5819
|
+
|
|
5670
5820
|
var graphqlWs = createCommonjsModule(function (module, exports) {
|
|
5821
|
+
"use strict";
|
|
5671
5822
|
var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
|
|
5672
5823
|
__assign = Object.assign || function(t) {
|
|
5673
5824
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -5847,6 +5998,8 @@ var GraphQLWebSocketClient = /** @class */ (function () {
|
|
|
5847
5998
|
if (message.payload.errors) {
|
|
5848
5999
|
subscriber.error && subscriber.error(new types.ClientError(__assign(__assign({}, message.payload), { status: 200 }), { query: query, variables: variables }));
|
|
5849
6000
|
}
|
|
6001
|
+
else {
|
|
6002
|
+
}
|
|
5850
6003
|
return;
|
|
5851
6004
|
}
|
|
5852
6005
|
case ERROR: {
|
|
@@ -5941,7 +6094,10 @@ function Complete(id) {
|
|
|
5941
6094
|
//# sourceMappingURL=graphql-ws.js.map
|
|
5942
6095
|
});
|
|
5943
6096
|
|
|
6097
|
+
const graphqlWs$1 = /*@__PURE__*/getDefaultExportFromCjs(graphqlWs);
|
|
6098
|
+
|
|
5944
6099
|
var dist = createCommonjsModule(function (module, exports) {
|
|
6100
|
+
"use strict";
|
|
5945
6101
|
var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
|
|
5946
6102
|
__assign = Object.assign || function(t) {
|
|
5947
6103
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -6266,7 +6422,7 @@ exports.GraphQLClient = GraphQLClient;
|
|
|
6266
6422
|
function makeRequest(_a) {
|
|
6267
6423
|
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;
|
|
6268
6424
|
return __awaiter(this, void 0, void 0, function () {
|
|
6269
|
-
var fetcher, isBathchingQuery, response, result, successfullyReceivedData, successfullyPassedErrorPolicy, headers_1, status_1, rest, data, errorResult;
|
|
6425
|
+
var fetcher, isBathchingQuery, response, result, successfullyReceivedData, successfullyPassedErrorPolicy, headers_1, status_1, errors, rest, data, errorResult;
|
|
6270
6426
|
return __generator(this, function (_c) {
|
|
6271
6427
|
switch (_c.label) {
|
|
6272
6428
|
case 0:
|
|
@@ -6293,7 +6449,7 @@ function makeRequest(_a) {
|
|
|
6293
6449
|
successfullyPassedErrorPolicy = !result.errors || fetchOptions.errorPolicy === 'all' || fetchOptions.errorPolicy === 'ignore';
|
|
6294
6450
|
if (response.ok && successfullyPassedErrorPolicy && successfullyReceivedData) {
|
|
6295
6451
|
headers_1 = response.headers, status_1 = response.status;
|
|
6296
|
-
rest = __rest(result, ["errors"]);
|
|
6452
|
+
errors = result.errors, rest = __rest(result, ["errors"]);
|
|
6297
6453
|
data = fetchOptions.errorPolicy === 'ignore' ? rest : result;
|
|
6298
6454
|
return [2 /*return*/, __assign(__assign({}, (isBathchingQuery ? { data: data } : data)), { headers: headers_1, status: status_1 })];
|
|
6299
6455
|
}
|
|
@@ -6301,6 +6457,7 @@ function makeRequest(_a) {
|
|
|
6301
6457
|
errorResult = typeof result === 'string' ? { error: result } : result;
|
|
6302
6458
|
throw new types.ClientError(__assign(__assign({}, errorResult), { status: response.status, headers: response.headers }), { query: query, variables: variables });
|
|
6303
6459
|
}
|
|
6460
|
+
return [2 /*return*/];
|
|
6304
6461
|
}
|
|
6305
6462
|
});
|
|
6306
6463
|
});
|
|
@@ -6430,6 +6587,8 @@ Object.defineProperty(exports, "GraphQLWebSocketClient", { enumerable: true, get
|
|
|
6430
6587
|
//# sourceMappingURL=index.js.map
|
|
6431
6588
|
});
|
|
6432
6589
|
|
|
6590
|
+
const index = /*@__PURE__*/getDefaultExportFromCjs(dist);
|
|
6591
|
+
|
|
6433
6592
|
class UrlUtils {
|
|
6434
6593
|
static getQueryParams(queryString) {
|
|
6435
6594
|
const params = new Map();
|
|
@@ -6458,7 +6617,7 @@ class UrlUtils {
|
|
|
6458
6617
|
|
|
6459
6618
|
class DataFetcher {
|
|
6460
6619
|
constructor() {
|
|
6461
|
-
this.GRAPHQL_PATH =
|
|
6620
|
+
this.GRAPHQL_PATH = "/mge/graphql";
|
|
6462
6621
|
this.watingRequestsById = new Map();
|
|
6463
6622
|
}
|
|
6464
6623
|
static get() {
|
|
@@ -6487,6 +6646,27 @@ class DataFetcher {
|
|
|
6487
6646
|
DataFetcher.requestListener.splice(index, 1);
|
|
6488
6647
|
}
|
|
6489
6648
|
}
|
|
6649
|
+
processErrorInfo(errors) {
|
|
6650
|
+
var _a, _b;
|
|
6651
|
+
const POSITION_ERROR_INFO = 0;
|
|
6652
|
+
const errorTitle = "Falha detectada";
|
|
6653
|
+
const error = errors[POSITION_ERROR_INFO];
|
|
6654
|
+
if (error.length > 0) { //As informações do erro vem no primeiro indice de um array
|
|
6655
|
+
const errorInfo = error[POSITION_ERROR_INFO];
|
|
6656
|
+
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";
|
|
6657
|
+
const errorLevel = ((_a = errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.extensions) === null || _a === void 0 ? void 0 : _a.level) ? errorInfo.extensions.level : "ERROR";
|
|
6658
|
+
const errorCode = ((_b = errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.extensions) === null || _b === void 0 ? void 0 : _b.code) ? errorInfo.extensions.code : "";
|
|
6659
|
+
switch (errorLevel) {
|
|
6660
|
+
case "WARNING":
|
|
6661
|
+
return new WarningException(errorTitle, errorMessage, errorCode);
|
|
6662
|
+
default:
|
|
6663
|
+
return new ErrorException(errorTitle, errorMessage, errorCode);
|
|
6664
|
+
}
|
|
6665
|
+
}
|
|
6666
|
+
else {
|
|
6667
|
+
return new ErrorException(errorTitle, "Não há informações sobre o erro");
|
|
6668
|
+
}
|
|
6669
|
+
}
|
|
6490
6670
|
async callGraphQL(req) {
|
|
6491
6671
|
var _a;
|
|
6492
6672
|
const reqKey = this.getReqKey(req);
|
|
@@ -6497,7 +6677,8 @@ class DataFetcher {
|
|
|
6497
6677
|
let query = this.getQueryTemplate(req);
|
|
6498
6678
|
const res = await this.fecthGrapql([{ document: query, variables: req.values }]);
|
|
6499
6679
|
if (res.errors.length > 0) {
|
|
6500
|
-
|
|
6680
|
+
const error = this.processErrorInfo(res.errors);
|
|
6681
|
+
reject(error);
|
|
6501
6682
|
}
|
|
6502
6683
|
else {
|
|
6503
6684
|
resolve(res.data[0][reqKey]);
|
|
@@ -6514,23 +6695,26 @@ class DataFetcher {
|
|
|
6514
6695
|
resolveURL() {
|
|
6515
6696
|
return UrlUtils.getUrlBase();
|
|
6516
6697
|
}
|
|
6517
|
-
getContext() {
|
|
6698
|
+
getContext(module) {
|
|
6518
6699
|
const urlParams = UrlUtils.getQueryParams(location.search);
|
|
6519
6700
|
return {
|
|
6520
|
-
baseUrl: `${this.resolveURL()}/
|
|
6701
|
+
baseUrl: `${this.resolveURL()}/${module}/service.sbr`,
|
|
6521
6702
|
appName: "SankhyaBlocks",
|
|
6522
6703
|
mgeSession: `${window['skw_session'] || urlParams.mgeSession}`,
|
|
6523
6704
|
globalID: "85C0093DFA240EAB699B4E47A10215BD",
|
|
6705
|
+
//FIXME: Precisamos ajustar para buscar o resourceId pela aplicação
|
|
6524
6706
|
resourceID: "br.com.sankhya.mov.bancaria"
|
|
6525
6707
|
};
|
|
6526
6708
|
}
|
|
6527
6709
|
async callServiceBroker(serviceName, payload) {
|
|
6528
6710
|
return new Promise((accept, reject) => {
|
|
6529
|
-
const
|
|
6530
|
-
const
|
|
6711
|
+
const parts = serviceName.split("@");
|
|
6712
|
+
const [module, name] = parts.length === 2 ? parts : ['mge', serviceName];
|
|
6713
|
+
const ctx = this.getContext(module);
|
|
6714
|
+
const url = `${ctx.baseUrl}?serviceName=${name}&counter=21&application=${ctx.appName}&outputType=json&preventTransform=false&mgeSession=${ctx.mgeSession}&resourceID=${ctx.resourceID}&globalID=${ctx.globalID}&allowConcurrentCalls=true`;
|
|
6531
6715
|
document.cookie = `JSESSIONID=${ctx.mgeSession};`;
|
|
6532
6716
|
const http = new XMLHttpRequest();
|
|
6533
|
-
DataFetcher.requestListener.forEach(listener => listener.onRequestStart({ url }));
|
|
6717
|
+
DataFetcher.requestListener.forEach(listener => listener.onRequestStart({ url: url, requestBody: payload }));
|
|
6534
6718
|
http.open("POST", url, true);
|
|
6535
6719
|
http.withCredentials = true;
|
|
6536
6720
|
http.send(payload);
|
|
@@ -6549,11 +6733,11 @@ class DataFetcher {
|
|
|
6549
6733
|
console.warn(`callServiceBroker error to parser response to JSON ${e}`);
|
|
6550
6734
|
reject(this.responseText);
|
|
6551
6735
|
}
|
|
6552
|
-
DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url }));
|
|
6736
|
+
DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url: url, requestBody: payload }));
|
|
6553
6737
|
}
|
|
6554
6738
|
else if (this.readyState == 4 && this.status != 200) {
|
|
6555
6739
|
reject(this.responseText);
|
|
6556
|
-
DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url }));
|
|
6740
|
+
DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url: url, requestBody: payload }));
|
|
6557
6741
|
}
|
|
6558
6742
|
};
|
|
6559
6743
|
});
|
|
@@ -6609,7 +6793,7 @@ class DataFetcher {
|
|
|
6609
6793
|
if (window['skw_session']) {
|
|
6610
6794
|
url += `?mgeSession=${window['skw_session']}`;
|
|
6611
6795
|
}
|
|
6612
|
-
DataFetcher.requestListener.forEach(listener => listener.onRequestStart({ url }));
|
|
6796
|
+
DataFetcher.requestListener.forEach(listener => listener.onRequestStart({ url: url, requestBody: request }));
|
|
6613
6797
|
try {
|
|
6614
6798
|
res = await dist.batchRequests(url, request, { 'Content-Type': `application/json; charset=${window['SERVER_ENCODING'] || 'UTF-8'}` });
|
|
6615
6799
|
res.forEach((resItem, index) => {
|
|
@@ -6640,11 +6824,11 @@ class DataFetcher {
|
|
|
6640
6824
|
});
|
|
6641
6825
|
}
|
|
6642
6826
|
else {
|
|
6643
|
-
DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url }));
|
|
6827
|
+
DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url: url, requestBody: request }));
|
|
6644
6828
|
throw new ErrorException("Falha de comunicação", err.message);
|
|
6645
6829
|
}
|
|
6646
6830
|
}
|
|
6647
|
-
DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url }));
|
|
6831
|
+
DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url: url, requestBody: request }));
|
|
6648
6832
|
return { data: dataResponse, errors: errorsResponse };
|
|
6649
6833
|
}
|
|
6650
6834
|
isHttpError(err) {
|
|
@@ -6691,6 +6875,7 @@ class WaitingRequest {
|
|
|
6691
6875
|
class DataUnitFetcher {
|
|
6692
6876
|
constructor() {
|
|
6693
6877
|
this.templateByQuery = new Map();
|
|
6878
|
+
this._loadDataTimeout = {};
|
|
6694
6879
|
this.buldTemplates();
|
|
6695
6880
|
}
|
|
6696
6881
|
buldTemplates() {
|
|
@@ -6719,9 +6904,9 @@ class DataUnitFetcher {
|
|
|
6719
6904
|
}
|
|
6720
6905
|
}
|
|
6721
6906
|
}`);
|
|
6722
|
-
this.templateByQuery.set("fetchData", dist.gql `query($dataunit: String! $limit: Int $offset:Int $
|
|
6907
|
+
this.templateByQuery.set("fetchData", dist.gql `query($dataunit: String! $limit: Int $offset:Int $filters: [InputFilter!] $sort: [InputSort!]) {
|
|
6723
6908
|
$queryAlias$: fetchDataUnit(name: $dataunit){
|
|
6724
|
-
data(limit: $limit offset: $offset filters: $
|
|
6909
|
+
data(limit: $limit offset: $offset filters: $filters sort: $sort){
|
|
6725
6910
|
limit
|
|
6726
6911
|
offset
|
|
6727
6912
|
total
|
|
@@ -6750,7 +6935,7 @@ class DataUnitFetcher {
|
|
|
6750
6935
|
getDataUnit(entityName, resourceID) {
|
|
6751
6936
|
const dataUnit = new DataUnit(`dd://${entityName}/${resourceID}`);
|
|
6752
6937
|
dataUnit.metadataLoader = (dataUnit) => this.loadMetadata(dataUnit);
|
|
6753
|
-
dataUnit.dataLoader = (dataUnit,
|
|
6938
|
+
dataUnit.dataLoader = (dataUnit, request) => this.loadData(dataUnit, request);
|
|
6754
6939
|
dataUnit.saveLoader = (dataUnit, changes) => this.saveData(dataUnit, changes);
|
|
6755
6940
|
dataUnit.removeLoader = (dataUnit, recordIds) => this.removeRecords(dataUnit, recordIds);
|
|
6756
6941
|
return dataUnit;
|
|
@@ -6787,25 +6972,39 @@ class DataUnitFetcher {
|
|
|
6787
6972
|
});
|
|
6788
6973
|
});
|
|
6789
6974
|
}
|
|
6790
|
-
loadData(dataUnit,
|
|
6975
|
+
loadData(dataUnit, request) {
|
|
6976
|
+
const duName = dataUnit.name;
|
|
6977
|
+
if (this._loadDataTimeout[duName]) {
|
|
6978
|
+
clearTimeout(this._loadDataTimeout[duName]);
|
|
6979
|
+
delete this._loadDataTimeout[duName];
|
|
6980
|
+
}
|
|
6791
6981
|
return new Promise((resolve, reject) => {
|
|
6792
|
-
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
|
|
6796
|
-
|
|
6797
|
-
}
|
|
6798
|
-
|
|
6982
|
+
this._loadDataTimeout[duName] = setTimeout(() => {
|
|
6983
|
+
delete this._loadDataTimeout[duName];
|
|
6984
|
+
this.doLoadData(dataUnit, request)
|
|
6985
|
+
.then(result => resolve(result))
|
|
6986
|
+
.catch(reason => reject(reason));
|
|
6987
|
+
}, 200);
|
|
6988
|
+
});
|
|
6989
|
+
}
|
|
6990
|
+
doLoadData(dataUnit, request) {
|
|
6991
|
+
return new Promise((resolve, reject) => {
|
|
6992
|
+
var _a;
|
|
6993
|
+
const { sort, filters, limit, offset, quickFilter } = request;
|
|
6994
|
+
const variables = { dataunit: dataUnit.name, sort, filters };
|
|
6995
|
+
variables.limit = limit;
|
|
6996
|
+
variables.offset = offset;
|
|
6997
|
+
if (!StringUtils.isEmpty(quickFilter === null || quickFilter === void 0 ? void 0 : quickFilter.term)) {
|
|
6799
6998
|
if (variables.filter === undefined) {
|
|
6800
6999
|
variables.filter = [];
|
|
6801
7000
|
}
|
|
6802
7001
|
const quickFilterCriteria = {
|
|
6803
7002
|
name: "__QUICK_FILTER__",
|
|
6804
7003
|
expression: "__QUICK_FILTER__",
|
|
6805
|
-
params: [{ name: "term", dataType: DataType.TEXT, value:
|
|
7004
|
+
params: [{ name: "term", dataType: DataType.TEXT, value: quickFilter.term }]
|
|
6806
7005
|
};
|
|
6807
|
-
if (((
|
|
6808
|
-
quickFilterCriteria.params.push({ name: "fields", dataType: DataType.OBJECT, value:
|
|
7006
|
+
if (((_a = quickFilter === null || quickFilter === void 0 ? void 0 : quickFilter.fields) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
7007
|
+
quickFilterCriteria.params.push({ name: "fields", dataType: DataType.OBJECT, value: quickFilter.fields });
|
|
6809
7008
|
}
|
|
6810
7009
|
variables.filter.push(quickFilterCriteria);
|
|
6811
7010
|
}
|
|
@@ -6815,16 +7014,32 @@ class DataUnitFetcher {
|
|
|
6815
7014
|
query: this.templateByQuery.get("fetchData"),
|
|
6816
7015
|
})
|
|
6817
7016
|
.then((resp) => {
|
|
6818
|
-
const
|
|
6819
|
-
|
|
6820
|
-
|
|
7017
|
+
const { limit, offset, total, hasMore, records } = resp.data;
|
|
7018
|
+
let paginationInfo;
|
|
7019
|
+
if (limit) {
|
|
7020
|
+
const firstRecord = total == 0 ? 0 : offset + 1;
|
|
7021
|
+
const lastRecord = offset + Math.min(records.length, limit);
|
|
7022
|
+
const currentPage = offset / limit;
|
|
7023
|
+
paginationInfo = {
|
|
7024
|
+
firstRecord,
|
|
7025
|
+
lastRecord,
|
|
7026
|
+
total,
|
|
7027
|
+
currentPage,
|
|
7028
|
+
hasMore
|
|
7029
|
+
};
|
|
7030
|
+
}
|
|
7031
|
+
const processedRecords = [];
|
|
7032
|
+
records.forEach((responseRecord) => {
|
|
6821
7033
|
const duRecord = { __record__id__: responseRecord.id };
|
|
6822
7034
|
responseRecord.fields.forEach(({ name, value }) => {
|
|
6823
7035
|
duRecord[name] = dataUnit.valueFromString(name, value);
|
|
6824
7036
|
});
|
|
6825
|
-
|
|
7037
|
+
processedRecords.push(duRecord);
|
|
7038
|
+
});
|
|
7039
|
+
resolve({
|
|
7040
|
+
paginationInfo,
|
|
7041
|
+
records: processedRecords
|
|
6826
7042
|
});
|
|
6827
|
-
resolve(Object.assign(Object.assign({}, pageResult), { records }));
|
|
6828
7043
|
})
|
|
6829
7044
|
.catch((error) => {
|
|
6830
7045
|
reject(error);
|
|
@@ -7050,15 +7265,16 @@ class GridConfigFetcher extends ResourceFetcher {
|
|
|
7050
7265
|
super(...arguments);
|
|
7051
7266
|
this.GRID_CONFIG_VERSION = "V3:";
|
|
7052
7267
|
}
|
|
7053
|
-
getConfig(resourceID) {
|
|
7268
|
+
getConfig(_gridName, resourceID) {
|
|
7054
7269
|
const completePath = `cfg://grid/${this.GRID_CONFIG_VERSION}${resourceID}`;
|
|
7055
7270
|
return new Promise((resolve, reject) => {
|
|
7056
7271
|
this.loadResource(completePath)
|
|
7057
7272
|
.then(loadedResource => {
|
|
7273
|
+
let config = undefined;
|
|
7058
7274
|
if (loadedResource) {
|
|
7059
|
-
|
|
7060
|
-
resolve(config);
|
|
7275
|
+
config = JSON.parse(loadedResource);
|
|
7061
7276
|
}
|
|
7277
|
+
resolve(config);
|
|
7062
7278
|
}).catch((error) => {
|
|
7063
7279
|
reject(error);
|
|
7064
7280
|
});
|
|
@@ -7093,6 +7309,8 @@ class PesquisaFetcher {
|
|
|
7093
7309
|
}`);
|
|
7094
7310
|
}
|
|
7095
7311
|
loadSearchOptions(entityName, argument, criteria, options) {
|
|
7312
|
+
const cleanText = (argument === null || argument === void 0 ? void 0 : argument.trim()) || undefined;
|
|
7313
|
+
argument = isNaN(Number(cleanText)) && cleanText ? `%${cleanText}` : cleanText;
|
|
7096
7314
|
return new Promise((resolve, reject) => {
|
|
7097
7315
|
DataFetcher.get()
|
|
7098
7316
|
.callGraphQL({
|
|
@@ -7215,7 +7433,14 @@ class SnkErrorHandler {
|
|
|
7215
7433
|
errorHandler(evt) {
|
|
7216
7434
|
this.processException(evt.error);
|
|
7217
7435
|
}
|
|
7436
|
+
buildErrorCodeHTML(exception) {
|
|
7437
|
+
const onclick = 'try{window.workspace.openHelp(\'_tbcode:' + exception.errorCode + '\')} catch(e){alert(\'Não é possível abrir a ajuda fora do workspace Sankhya\');}';
|
|
7438
|
+
return '<br><a href="#" onclick="' + onclick + '">Código: ' + exception.errorCode + '</a>';
|
|
7439
|
+
}
|
|
7218
7440
|
processException(exception) {
|
|
7441
|
+
if (exception.errorCode != "") {
|
|
7442
|
+
exception.message += this.buildErrorCodeHTML(exception);
|
|
7443
|
+
}
|
|
7219
7444
|
if (exception instanceof WaitingChangeException) {
|
|
7220
7445
|
this._app.alert(exception.title, exception.message);
|
|
7221
7446
|
}
|
|
@@ -7233,7 +7458,7 @@ class SnkErrorHandler {
|
|
|
7233
7458
|
}
|
|
7234
7459
|
else {
|
|
7235
7460
|
const title = (exception === null || exception === void 0 ? void 0 : exception.title) || "Erro detectado";
|
|
7236
|
-
const message = (typeof exception === "string") ? exception : exception.message || `Erro interno "${exception}"`;
|
|
7461
|
+
const message = (typeof exception === "string") ? exception : exception.message || `Erro interno "${ObjectUtils.objectToString(exception)}"`;
|
|
7237
7462
|
this._app.error(title, message);
|
|
7238
7463
|
}
|
|
7239
7464
|
}
|
|
@@ -7244,6 +7469,439 @@ class SnkErrorHandler {
|
|
|
7244
7469
|
|
|
7245
7470
|
function _0x53e1(){const _0x340df8=['2909523kXwted','CompanyName=Sankhya\x20Jiva\x20Tecnologia\x20e\x20Inovao\x20Ltda,LicensedApplication=Sankhya\x20Gestao,LicenseType=SingleApplication,LicensedConcurrentDeveloperCount=2,LicensedProductionInstancesCount=0,AssetReference=AG-019460,ExpiryDate=9_November_2022_[v2]_MTY2Nzk1MjAwMDAwMA==10487151e296ee4360f80961ca960869','1131048CARoeW','502909mLEPmu','447255iQEXuN','428UHbJwW','270AFTxAV','194369jhGqTI','1540nWuTrj','2044062GicUQI','30CkXPWg'];_0x53e1=function(){return _0x340df8;};return _0x53e1();}const _0xc7632f=_0x15c2;function _0x15c2(_0x353a9c,_0x3e4a5a){const _0x53e110=_0x53e1();return _0x15c2=function(_0x15c2aa,_0x219858){_0x15c2aa=_0x15c2aa-0x188;let _0x307231=_0x53e110[_0x15c2aa];return _0x307231;},_0x15c2(_0x353a9c,_0x3e4a5a);}(function(_0x42617e,_0x57debe){const _0x31061a=_0x15c2,_0x128d7d=_0x42617e();while(!![]){try{const _0x1c9bb1=-parseInt(_0x31061a(0x18e))/0x1+-parseInt(_0x31061a(0x189))/0x2+parseInt(_0x31061a(0x18b))/0x3+-parseInt(_0x31061a(0x190))/0x4*(parseInt(_0x31061a(0x188))/0x5)+-parseInt(_0x31061a(0x191))/0x6*(-parseInt(_0x31061a(0x192))/0x7)+parseInt(_0x31061a(0x18d))/0x8+-parseInt(_0x31061a(0x18f))/0x9*(-parseInt(_0x31061a(0x18a))/0xa);if(_0x1c9bb1===_0x57debe)break;else _0x128d7d['push'](_0x128d7d['shift']());}catch(_0x1bd816){_0x128d7d['push'](_0x128d7d['shift']());}}}(_0x53e1,0xe8676));const agGridLicense=_0xc7632f(0x18c);
|
|
7246
7471
|
|
|
7472
|
+
class TotalsFetcher {
|
|
7473
|
+
constructor() {
|
|
7474
|
+
this.templateByQuery = new Map();
|
|
7475
|
+
this.buldTemplates();
|
|
7476
|
+
}
|
|
7477
|
+
buldTemplates() {
|
|
7478
|
+
this.templateByQuery.set("fetchTotals", dist.gql `query($filters: [InputFilter!] $name: String!) {
|
|
7479
|
+
$queryAlias$: fetchTotals(name: $name, filters: $filters ){
|
|
7480
|
+
name
|
|
7481
|
+
value
|
|
7482
|
+
}
|
|
7483
|
+
}`);
|
|
7484
|
+
}
|
|
7485
|
+
async getTotals(name, resourceID, filters) {
|
|
7486
|
+
const path = `totals://${name}/${resourceID}`;
|
|
7487
|
+
let variables = {
|
|
7488
|
+
name: path,
|
|
7489
|
+
filters: filters
|
|
7490
|
+
};
|
|
7491
|
+
return DataFetcher.get().callGraphQL({
|
|
7492
|
+
values: variables,
|
|
7493
|
+
query: this.templateByQuery.get("fetchTotals"),
|
|
7494
|
+
});
|
|
7495
|
+
}
|
|
7496
|
+
fetchTotals(name, resourceID, filters = []) {
|
|
7497
|
+
return new Promise((accept, reject) => {
|
|
7498
|
+
this.getTotals(name, resourceID, filters)
|
|
7499
|
+
.then((result) => {
|
|
7500
|
+
if (result.length > 0) {
|
|
7501
|
+
const totalsData = new Map();
|
|
7502
|
+
result.forEach(total => {
|
|
7503
|
+
totalsData.set(total.name, parseFloat(total.value));
|
|
7504
|
+
});
|
|
7505
|
+
accept(totalsData);
|
|
7506
|
+
}
|
|
7507
|
+
else {
|
|
7508
|
+
reject(`Não foi possível recuperar os totalizadores`);
|
|
7509
|
+
}
|
|
7510
|
+
})
|
|
7511
|
+
.catch((error) => {
|
|
7512
|
+
reject(error);
|
|
7513
|
+
});
|
|
7514
|
+
});
|
|
7515
|
+
}
|
|
7516
|
+
}
|
|
7517
|
+
|
|
7518
|
+
class FilterBarConfigFetcher extends ResourceFetcher {
|
|
7519
|
+
getConfig(resourceID) {
|
|
7520
|
+
return new Promise((resolve) => {
|
|
7521
|
+
if (resourceID === "br.com.sankhya.fin.cad.movimentacaoFinanceira") {
|
|
7522
|
+
resolve(getFiltrosMovFin());
|
|
7523
|
+
}
|
|
7524
|
+
else if (resourceID === "br.com.sankhya.fin.cad.movimentacaoBancaria") {
|
|
7525
|
+
resolve(getFiltrosMovBan());
|
|
7526
|
+
}
|
|
7527
|
+
else {
|
|
7528
|
+
resolve(undefined);
|
|
7529
|
+
}
|
|
7530
|
+
});
|
|
7531
|
+
}
|
|
7532
|
+
}
|
|
7533
|
+
function getFiltrosMovBan() {
|
|
7534
|
+
return [{
|
|
7535
|
+
"id": "DTLANC",
|
|
7536
|
+
"visible": true,
|
|
7537
|
+
"type": FilterItemType.PERIOD,
|
|
7538
|
+
"label": "Dt Lançamento",
|
|
7539
|
+
"detailTitle": "Informe a data ou período",
|
|
7540
|
+
"props": {
|
|
7541
|
+
"expression": {
|
|
7542
|
+
"fullfill": "onlydate(this.DTLANC) >= :DTLANC.START AND onlydate(this.DTLANC) <= :DTLANC.END",
|
|
7543
|
+
"onlystart": "onlydate(this.DTLANC) >= :DTLANC",
|
|
7544
|
+
"onlyend": "onlydate(this.DTLANC) <= :DTLANC"
|
|
7545
|
+
}
|
|
7546
|
+
}
|
|
7547
|
+
},
|
|
7548
|
+
{
|
|
7549
|
+
"id": "CODCTABCOINT",
|
|
7550
|
+
"visible": true,
|
|
7551
|
+
"type": FilterItemType.SEARCH,
|
|
7552
|
+
"label": "Conta origem",
|
|
7553
|
+
"detailTitle": "Informe a conta de origem",
|
|
7554
|
+
"props": {
|
|
7555
|
+
"expression": "this.CODCTABCOINT = :CODCTABCOINT",
|
|
7556
|
+
"searchContext": {
|
|
7557
|
+
"entity": "ImplantacaoSaldoConta",
|
|
7558
|
+
"entityDescription": "Conta origem",
|
|
7559
|
+
"searchOptions": {
|
|
7560
|
+
"rootEntity": "MovimentoBancario",
|
|
7561
|
+
"descriptionFieldName": "DESCRICAO",
|
|
7562
|
+
"codeFieldName": "CODCTABCOINT",
|
|
7563
|
+
"showInactives": false
|
|
7564
|
+
}
|
|
7565
|
+
}
|
|
7566
|
+
}
|
|
7567
|
+
},
|
|
7568
|
+
{
|
|
7569
|
+
"id": "CODTIPOPER",
|
|
7570
|
+
"visible": false,
|
|
7571
|
+
"type": FilterItemType.SEARCH,
|
|
7572
|
+
"label": "Tipo de operação",
|
|
7573
|
+
"detailTitle": "Informe o tipo de operação",
|
|
7574
|
+
"props": {
|
|
7575
|
+
"expression": "this.CODTIPOPER = :CODTIPOPER",
|
|
7576
|
+
"searchContext": {
|
|
7577
|
+
"entity": "TipoOperacao",
|
|
7578
|
+
"entityDescription": "Tipo de operação",
|
|
7579
|
+
"searchOptions": {
|
|
7580
|
+
"rootEntity": "MovimentoBancario",
|
|
7581
|
+
"descriptionFieldName": "DESCROPER",
|
|
7582
|
+
"codeFieldName": "CODTIPOPER",
|
|
7583
|
+
"showInactives": false
|
|
7584
|
+
}
|
|
7585
|
+
}
|
|
7586
|
+
}
|
|
7587
|
+
},
|
|
7588
|
+
{
|
|
7589
|
+
"id": "ORIGMOV",
|
|
7590
|
+
"visible": false,
|
|
7591
|
+
"type": FilterItemType.MULTI_SELECT,
|
|
7592
|
+
"label": "Tipo de movimento",
|
|
7593
|
+
"detailTitle": "Escolha um tipo de movimento",
|
|
7594
|
+
"props": {
|
|
7595
|
+
"expression": "this.ORIGMOV = :ORIGMOV",
|
|
7596
|
+
"options": [
|
|
7597
|
+
{ "value": "A", "label": "Aplicação" },
|
|
7598
|
+
{ "value": "R", "label": "Resgate" },
|
|
7599
|
+
{ "value": "S", "label": "Saque" },
|
|
7600
|
+
{ "value": "D", "label": "Depósito" },
|
|
7601
|
+
{ "value": "T", "label": "Transferência" }
|
|
7602
|
+
]
|
|
7603
|
+
}
|
|
7604
|
+
},
|
|
7605
|
+
{
|
|
7606
|
+
"id": "NUBCO",
|
|
7607
|
+
"type": FilterItemType.NUMBER,
|
|
7608
|
+
"visible": false,
|
|
7609
|
+
"label": "Nr. único",
|
|
7610
|
+
"detailTitle": "Informe o número único",
|
|
7611
|
+
"props": {
|
|
7612
|
+
"expression": "this.NUBCO = :NUBCO"
|
|
7613
|
+
}
|
|
7614
|
+
},
|
|
7615
|
+
{
|
|
7616
|
+
"id": "VLRLANC",
|
|
7617
|
+
"type": FilterItemType.NUMBER,
|
|
7618
|
+
"visible": false,
|
|
7619
|
+
"label": "Vlr. Lançamento",
|
|
7620
|
+
"detailTitle": "Informe o valor do lançamento",
|
|
7621
|
+
"props": {
|
|
7622
|
+
"expression": "this.VLRLANC = :VLRLANC",
|
|
7623
|
+
"precision": 2
|
|
7624
|
+
}
|
|
7625
|
+
},
|
|
7626
|
+
{
|
|
7627
|
+
"id": "CODLANC",
|
|
7628
|
+
"visible": false,
|
|
7629
|
+
"type": FilterItemType.SEARCH,
|
|
7630
|
+
"label": "Lançamento origem",
|
|
7631
|
+
"detailTitle": "Informe o lançamento de origem",
|
|
7632
|
+
"props": {
|
|
7633
|
+
"expression": "this.CODLANC = :CODLANC",
|
|
7634
|
+
"searchContext": {
|
|
7635
|
+
"entity": "HistoricoBancario",
|
|
7636
|
+
"entityDescription": "Lançamento origem",
|
|
7637
|
+
"searchOptions": {
|
|
7638
|
+
"rootEntity": "MovimentoBancario",
|
|
7639
|
+
"descriptionFieldName": "DESCRLANCBCO",
|
|
7640
|
+
"codeFieldName": "CODLANC",
|
|
7641
|
+
"showInactives": false
|
|
7642
|
+
}
|
|
7643
|
+
}
|
|
7644
|
+
}
|
|
7645
|
+
}];
|
|
7646
|
+
}
|
|
7647
|
+
function getFiltrosMovFin() {
|
|
7648
|
+
return [{
|
|
7649
|
+
id: "RECDESP",
|
|
7650
|
+
visible: true,
|
|
7651
|
+
label: "Receitas + Despesas",
|
|
7652
|
+
detailTitle: "Selecione o que deseja ver",
|
|
7653
|
+
type: FilterItemType.BINARY_SELECT,
|
|
7654
|
+
hardFixed: true,
|
|
7655
|
+
props: {
|
|
7656
|
+
options: [
|
|
7657
|
+
{ name: "RECEITA", expression: "this.RECDESP = 1", label: "Receitas" },
|
|
7658
|
+
{ name: "DESPESA", expression: "this.RECDESP = -1", label: "Despesas" }
|
|
7659
|
+
]
|
|
7660
|
+
}
|
|
7661
|
+
},
|
|
7662
|
+
{
|
|
7663
|
+
id: "PROVISAO",
|
|
7664
|
+
visible: true,
|
|
7665
|
+
label: "Real + Provisão",
|
|
7666
|
+
detailTitle: "Selecione o que deseja ver",
|
|
7667
|
+
type: FilterItemType.BINARY_SELECT,
|
|
7668
|
+
hardFixed: true,
|
|
7669
|
+
props: {
|
|
7670
|
+
options: [
|
|
7671
|
+
{ name: "REAL", expression: "nullvalue(this.PROVISAO, 'N') = 'N'", label: "Real" },
|
|
7672
|
+
{ name: "PROVISAO", expression: "nullvalue(this.PROVISAO, 'N') = 'S'", label: "Provisão" }
|
|
7673
|
+
]
|
|
7674
|
+
}
|
|
7675
|
+
},
|
|
7676
|
+
{
|
|
7677
|
+
id: "BAIXADO",
|
|
7678
|
+
visible: true,
|
|
7679
|
+
label: "Pendentes + Baixados",
|
|
7680
|
+
detailTitle: "Selecione o que deseja ver",
|
|
7681
|
+
type: FilterItemType.BINARY_SELECT,
|
|
7682
|
+
hardFixed: true,
|
|
7683
|
+
props: {
|
|
7684
|
+
options: [
|
|
7685
|
+
{ name: "PENDENTE", expression: "this.DHBAIXA IS NULL", label: "Pendentes" },
|
|
7686
|
+
{ name: "BAIXADO", expression: "this.DHBAIXA IS NOT NULL", label: "Baixados" }
|
|
7687
|
+
]
|
|
7688
|
+
}
|
|
7689
|
+
},
|
|
7690
|
+
{
|
|
7691
|
+
id: "DTVENC",
|
|
7692
|
+
visible: true,
|
|
7693
|
+
type: FilterItemType.PERIOD,
|
|
7694
|
+
label: "Dt. Vencimento",
|
|
7695
|
+
detailTitle: "Informe a data ou período",
|
|
7696
|
+
props: {
|
|
7697
|
+
expression: {
|
|
7698
|
+
fullfill: "onlydate(this.DTVENC) >= :DTVENC.START AND onlydate(this.DTVENC) <= :DTVENC.END",
|
|
7699
|
+
onlystart: "onlydate(this.DTVENC) >= :DTVENC",
|
|
7700
|
+
onlyend: "onlydate(this.DTVENC) <= :DTVENC"
|
|
7701
|
+
}
|
|
7702
|
+
}
|
|
7703
|
+
},
|
|
7704
|
+
{
|
|
7705
|
+
id: "CODPARC",
|
|
7706
|
+
visible: true,
|
|
7707
|
+
type: FilterItemType.SEARCH,
|
|
7708
|
+
label: "Parceiro",
|
|
7709
|
+
detailTitle: "Informe o parceiro",
|
|
7710
|
+
props: {
|
|
7711
|
+
expression: "this.CODPARC = :CODPARC",
|
|
7712
|
+
searchContext: {
|
|
7713
|
+
entity: "Parceiro",
|
|
7714
|
+
entityDescription: "Parceiro",
|
|
7715
|
+
searchOptions: {
|
|
7716
|
+
rootEntity: "Financeiro",
|
|
7717
|
+
descriptionFieldName: "NOMEPARC",
|
|
7718
|
+
codeFieldName: "CODPARC",
|
|
7719
|
+
showInactives: false
|
|
7720
|
+
}
|
|
7721
|
+
}
|
|
7722
|
+
}
|
|
7723
|
+
},
|
|
7724
|
+
{
|
|
7725
|
+
id: "NUFIN",
|
|
7726
|
+
type: FilterItemType.NUMBER,
|
|
7727
|
+
visible: true,
|
|
7728
|
+
label: "Nr. único",
|
|
7729
|
+
detailTitle: "Informe o número único",
|
|
7730
|
+
props: {
|
|
7731
|
+
expression: "this.NUFIN = :NUFIN"
|
|
7732
|
+
}
|
|
7733
|
+
},
|
|
7734
|
+
{
|
|
7735
|
+
id: "NUMNOTA",
|
|
7736
|
+
visible: true,
|
|
7737
|
+
type: FilterItemType.NUMBER,
|
|
7738
|
+
label: "Nr. Nota",
|
|
7739
|
+
detailTitle: "Informe o número da nota",
|
|
7740
|
+
props: {
|
|
7741
|
+
expression: "this.NUMNOTA = :NUMNOTA"
|
|
7742
|
+
}
|
|
7743
|
+
},
|
|
7744
|
+
{
|
|
7745
|
+
id: "DHBAIXA",
|
|
7746
|
+
visible: true,
|
|
7747
|
+
type: FilterItemType.PERIOD,
|
|
7748
|
+
label: "Data da Baixa",
|
|
7749
|
+
detailTitle: "Informe a data ou período",
|
|
7750
|
+
props: {
|
|
7751
|
+
expression: {
|
|
7752
|
+
fullfill: "onlydate(this.DHBAIXA) >= :DHBAIXA.START AND onlydate(this.DHBAIXA) <= :DHBAIXA.END",
|
|
7753
|
+
onlystart: "onlydate(this.DHBAIXA) >= :DHBAIXA",
|
|
7754
|
+
onlyend: "onlydate(this.DHBAIXA) <= :DHBAIXA"
|
|
7755
|
+
}
|
|
7756
|
+
}
|
|
7757
|
+
},
|
|
7758
|
+
{
|
|
7759
|
+
id: "CODEMP",
|
|
7760
|
+
visible: false,
|
|
7761
|
+
type: FilterItemType.SEARCH,
|
|
7762
|
+
label: "Empresa",
|
|
7763
|
+
detailTitle: "Informe a empresa",
|
|
7764
|
+
props: {
|
|
7765
|
+
expression: "this.CODEMP = :CODEMP",
|
|
7766
|
+
searchContext: {
|
|
7767
|
+
entity: "Empresa",
|
|
7768
|
+
entityDescription: "Empresa",
|
|
7769
|
+
searchOptions: {
|
|
7770
|
+
rootEntity: "Financeiro",
|
|
7771
|
+
descriptionFieldName: "NOMEFANTASIA",
|
|
7772
|
+
codeFieldName: "CODEMP",
|
|
7773
|
+
showInactives: false
|
|
7774
|
+
}
|
|
7775
|
+
}
|
|
7776
|
+
}
|
|
7777
|
+
},
|
|
7778
|
+
{
|
|
7779
|
+
id: "CODNAT",
|
|
7780
|
+
visible: false,
|
|
7781
|
+
type: FilterItemType.SEARCH,
|
|
7782
|
+
label: "Natureza",
|
|
7783
|
+
detailTitle: "Informe a natureza",
|
|
7784
|
+
props: {
|
|
7785
|
+
expression: "this.CODNAT = :CODNAT",
|
|
7786
|
+
searchContext: {
|
|
7787
|
+
entity: "Natureza",
|
|
7788
|
+
entityDescription: "Natureza",
|
|
7789
|
+
searchOptions: {
|
|
7790
|
+
rootEntity: "Financeiro",
|
|
7791
|
+
descriptionFieldName: "DESCRNAT",
|
|
7792
|
+
codeFieldName: "CODNAT",
|
|
7793
|
+
showInactives: false
|
|
7794
|
+
}
|
|
7795
|
+
}
|
|
7796
|
+
}
|
|
7797
|
+
},
|
|
7798
|
+
{
|
|
7799
|
+
id: "DTNEG",
|
|
7800
|
+
visible: false,
|
|
7801
|
+
type: FilterItemType.PERIOD,
|
|
7802
|
+
label: "Dt. Negociação",
|
|
7803
|
+
detailTitle: "Informe a data ou período",
|
|
7804
|
+
props: {
|
|
7805
|
+
expression: {
|
|
7806
|
+
fullfill: "onlydate(this.DTNEG) >= :DTNEG.START AND onlydate(this.DTNEG) <= :DTNEG.END",
|
|
7807
|
+
onlystart: "onlydate(this.DTNEG) >= :DTNEG",
|
|
7808
|
+
onlyend: "onlydate(this.DTNEG) <= :DTNEG"
|
|
7809
|
+
}
|
|
7810
|
+
}
|
|
7811
|
+
},
|
|
7812
|
+
{
|
|
7813
|
+
id: "NUNOTA",
|
|
7814
|
+
visible: false,
|
|
7815
|
+
type: FilterItemType.NUMBER,
|
|
7816
|
+
label: "Nro Único do Pedido",
|
|
7817
|
+
detailTitle: "Informe o número único do pedido",
|
|
7818
|
+
props: {
|
|
7819
|
+
expression: "this.NUNOTA = :NUNOTA"
|
|
7820
|
+
}
|
|
7821
|
+
},
|
|
7822
|
+
{
|
|
7823
|
+
id: "CODCENCUS",
|
|
7824
|
+
visible: false,
|
|
7825
|
+
type: FilterItemType.SEARCH,
|
|
7826
|
+
label: "Centro de resultado",
|
|
7827
|
+
detailTitle: "Informe o centro de resultado",
|
|
7828
|
+
props: {
|
|
7829
|
+
expression: "this.CODCENCUS = :CODCENCUS",
|
|
7830
|
+
searchContext: {
|
|
7831
|
+
entity: "CentroResultado",
|
|
7832
|
+
entityDescription: "Centro de resultado",
|
|
7833
|
+
searchOptions: {
|
|
7834
|
+
rootEntity: "Financeiro",
|
|
7835
|
+
descriptionFieldName: "DESCRCENCUS",
|
|
7836
|
+
codeFieldName: "CODCENCUS",
|
|
7837
|
+
showInactives: false
|
|
7838
|
+
}
|
|
7839
|
+
}
|
|
7840
|
+
}
|
|
7841
|
+
},
|
|
7842
|
+
{
|
|
7843
|
+
id: "CODCTABCOINT",
|
|
7844
|
+
visible: false,
|
|
7845
|
+
type: FilterItemType.SEARCH,
|
|
7846
|
+
label: "Conta bancária",
|
|
7847
|
+
detailTitle: "Informe a conta bancária",
|
|
7848
|
+
props: {
|
|
7849
|
+
expression: "this.CODCTABCOINT = :CODCTABCOINT",
|
|
7850
|
+
searchContext: {
|
|
7851
|
+
entity: "ContaBancaria",
|
|
7852
|
+
entityDescription: "Conta bancária",
|
|
7853
|
+
searchOptions: {
|
|
7854
|
+
rootEntity: "Financeiro",
|
|
7855
|
+
descriptionFieldName: "DESCRICAO",
|
|
7856
|
+
codeFieldName: "CODCTABCOINT",
|
|
7857
|
+
showInactives: false
|
|
7858
|
+
}
|
|
7859
|
+
}
|
|
7860
|
+
}
|
|
7861
|
+
},
|
|
7862
|
+
{
|
|
7863
|
+
id: "CODBCO",
|
|
7864
|
+
visible: false,
|
|
7865
|
+
type: FilterItemType.SEARCH,
|
|
7866
|
+
label: "Banco",
|
|
7867
|
+
detailTitle: "Informe o banco",
|
|
7868
|
+
props: {
|
|
7869
|
+
expression: "this.CODBCO = :CODBCO",
|
|
7870
|
+
searchContext: {
|
|
7871
|
+
entity: "Banco",
|
|
7872
|
+
entityDescription: "Banco",
|
|
7873
|
+
searchOptions: {
|
|
7874
|
+
rootEntity: "Financeiro",
|
|
7875
|
+
descriptionFieldName: "NOMEBCO",
|
|
7876
|
+
codeFieldName: "CODBCO",
|
|
7877
|
+
showInactives: false
|
|
7878
|
+
}
|
|
7879
|
+
}
|
|
7880
|
+
}
|
|
7881
|
+
},
|
|
7882
|
+
{
|
|
7883
|
+
id: "CODPROJ",
|
|
7884
|
+
visible: false,
|
|
7885
|
+
type: FilterItemType.SEARCH,
|
|
7886
|
+
label: "Projeto",
|
|
7887
|
+
detailTitle: "Informe o projeto",
|
|
7888
|
+
props: {
|
|
7889
|
+
expression: "this.CODPROJ = :CODPROJ",
|
|
7890
|
+
searchContext: {
|
|
7891
|
+
entity: "Projeto",
|
|
7892
|
+
entityDescription: "Projeto",
|
|
7893
|
+
searchOptions: {
|
|
7894
|
+
rootEntity: "Financeiro",
|
|
7895
|
+
descriptionFieldName: "IDENTIFICACAO",
|
|
7896
|
+
codeFieldName: "CODPROJ",
|
|
7897
|
+
showInactives: false
|
|
7898
|
+
}
|
|
7899
|
+
}
|
|
7900
|
+
}
|
|
7901
|
+
}
|
|
7902
|
+
];
|
|
7903
|
+
}
|
|
7904
|
+
|
|
7247
7905
|
const snkApplicationCss = ".sc-snk-application-h{display:flex;flex-direction:column;height:100%}";
|
|
7248
7906
|
|
|
7249
7907
|
const SnkApplication = class {
|
|
@@ -7251,6 +7909,9 @@ const SnkApplication = class {
|
|
|
7251
7909
|
registerInstance(this, hostRef);
|
|
7252
7910
|
this.applicationLoaded = createEvent(this, "applicationLoaded", 7);
|
|
7253
7911
|
this.applicationLoading = createEvent(this, "applicationLoading", 7);
|
|
7912
|
+
this._authPromises = [];
|
|
7913
|
+
this._duCache = new Map();
|
|
7914
|
+
this._duPromises = new Map();
|
|
7254
7915
|
this._requestListener = new RequestListenerLoadingBar();
|
|
7255
7916
|
}
|
|
7256
7917
|
get parameters() {
|
|
@@ -7269,18 +7930,31 @@ const SnkApplication = class {
|
|
|
7269
7930
|
return this._resourceID;
|
|
7270
7931
|
}
|
|
7271
7932
|
get auth() {
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7277
|
-
this.
|
|
7278
|
-
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
|
|
7933
|
+
if (this._auth) {
|
|
7934
|
+
return Promise.resolve(this._auth);
|
|
7935
|
+
}
|
|
7936
|
+
else {
|
|
7937
|
+
return new Promise((resolve, reject) => {
|
|
7938
|
+
const waitingAuth = this._authPromises.length > 0;
|
|
7939
|
+
this._authPromises.push(new PendingPromise(resolve, reject));
|
|
7940
|
+
if (!waitingAuth) {
|
|
7941
|
+
this.authFetcher.getData(this.resourceID).then((authList) => {
|
|
7942
|
+
this._auth = authList;
|
|
7943
|
+
while (this._authPromises.length > 0) {
|
|
7944
|
+
this._authPromises.pop().resolve(this._auth);
|
|
7945
|
+
}
|
|
7946
|
+
}).catch(error => {
|
|
7947
|
+
while (this._authPromises.length > 0) {
|
|
7948
|
+
this._authPromises.pop().reject(error);
|
|
7949
|
+
}
|
|
7950
|
+
});
|
|
7951
|
+
}
|
|
7952
|
+
});
|
|
7953
|
+
}
|
|
7283
7954
|
}
|
|
7955
|
+
/**
|
|
7956
|
+
* Caso o usuário logado seja o SUP.
|
|
7957
|
+
*/
|
|
7284
7958
|
async isUserSup() {
|
|
7285
7959
|
return new Promise((resolve, reject) => {
|
|
7286
7960
|
this.auth.then((authorization) => {
|
|
@@ -7290,6 +7964,9 @@ const SnkApplication = class {
|
|
|
7290
7964
|
});
|
|
7291
7965
|
});
|
|
7292
7966
|
}
|
|
7967
|
+
/**
|
|
7968
|
+
* Se o usuário logado tem permissão pra determinada ação.
|
|
7969
|
+
*/
|
|
7293
7970
|
async hasAccess(access) {
|
|
7294
7971
|
return new Promise((resolve, reject) => {
|
|
7295
7972
|
this.auth.then((authorization) => {
|
|
@@ -7299,6 +7976,9 @@ const SnkApplication = class {
|
|
|
7299
7976
|
});
|
|
7300
7977
|
});
|
|
7301
7978
|
}
|
|
7979
|
+
/**
|
|
7980
|
+
* Retorna todos os acessos do usuário logado.
|
|
7981
|
+
*/
|
|
7302
7982
|
async getAllAccess() {
|
|
7303
7983
|
return new Promise((resolve, reject) => {
|
|
7304
7984
|
this.auth.then((authorization) => {
|
|
@@ -7313,34 +7993,54 @@ const SnkApplication = class {
|
|
|
7313
7993
|
});
|
|
7314
7994
|
});
|
|
7315
7995
|
}
|
|
7316
|
-
|
|
7317
|
-
|
|
7318
|
-
|
|
7996
|
+
/**
|
|
7997
|
+
* Retorna o valor de um parâmetro do tipo string.
|
|
7998
|
+
*/
|
|
7319
7999
|
async getStringParam(name) {
|
|
7320
8000
|
return this.parameters.asString(name, this.resourceID);
|
|
7321
8001
|
}
|
|
8002
|
+
/**
|
|
8003
|
+
* Retorna o valor de um parâmetro do tipo Inteiro.
|
|
8004
|
+
*/
|
|
7322
8005
|
async getIntParam(name) {
|
|
7323
8006
|
return this.parameters.asInteger(name, this.resourceID);
|
|
7324
8007
|
}
|
|
8008
|
+
/**
|
|
8009
|
+
* Retorna o valor de um parâmetro do tipo Decimal.
|
|
8010
|
+
*/
|
|
7325
8011
|
async getFloatParam(name) {
|
|
7326
8012
|
return this.parameters.asFloat(name, this.resourceID);
|
|
7327
8013
|
}
|
|
8014
|
+
/**
|
|
8015
|
+
* Retorna o valor de um parâmetro do tipo booleano.
|
|
8016
|
+
*/
|
|
7328
8017
|
async getBooleanParam(name) {
|
|
7329
8018
|
return this.parameters.asBoolean(name, this.resourceID);
|
|
7330
8019
|
}
|
|
8020
|
+
/**
|
|
8021
|
+
* Retorna o valor de um parâmetro do tipo data.
|
|
8022
|
+
*/
|
|
7331
8023
|
async getDateParam(name) {
|
|
7332
8024
|
return this.parameters.asDate(name, this.resourceID);
|
|
7333
8025
|
}
|
|
8026
|
+
/**
|
|
8027
|
+
* Mostra o conteúdo passado em um Popup
|
|
8028
|
+
*/
|
|
7334
8029
|
async showPopUp(content) {
|
|
8030
|
+
this.clearPopUpContent();
|
|
7335
8031
|
this._popUp.appendChild(content);
|
|
7336
|
-
this._popUp
|
|
8032
|
+
this._popUp.opened = true;
|
|
7337
8033
|
}
|
|
8034
|
+
/**
|
|
8035
|
+
* Fecha o popup, liberando o conteúdo.
|
|
8036
|
+
*/
|
|
7338
8037
|
async closePopUp() {
|
|
7339
|
-
|
|
7340
|
-
|
|
7341
|
-
});
|
|
7342
|
-
this._popUp["opened"] = false;
|
|
8038
|
+
this.clearPopUpContent();
|
|
8039
|
+
this._popUp.opened = false;
|
|
7343
8040
|
}
|
|
8041
|
+
/**
|
|
8042
|
+
* Verifica se a licença do cliente tem determinado opcional (produto)
|
|
8043
|
+
*/
|
|
7344
8044
|
async temOpcional(opcional) {
|
|
7345
8045
|
const opts = opcional.split(",");
|
|
7346
8046
|
return new Promise((resolve, reject) => {
|
|
@@ -7364,6 +8064,10 @@ const SnkApplication = class {
|
|
|
7364
8064
|
});
|
|
7365
8065
|
});
|
|
7366
8066
|
}
|
|
8067
|
+
/**
|
|
8068
|
+
* Retorna a configuração de um recurso por service broker
|
|
8069
|
+
* Veja também o método "loadConfig"
|
|
8070
|
+
*/
|
|
7367
8071
|
async getConfig(key) {
|
|
7368
8072
|
let payload = {
|
|
7369
8073
|
"serviceName": "SystemUtilsSP.getConf",
|
|
@@ -7381,6 +8085,9 @@ const SnkApplication = class {
|
|
|
7381
8085
|
.catch(error => reject(error));
|
|
7382
8086
|
});
|
|
7383
8087
|
}
|
|
8088
|
+
/**
|
|
8089
|
+
* Salva a configuração de determinado recurso.
|
|
8090
|
+
*/
|
|
7384
8091
|
async saveConfig(key, data) {
|
|
7385
8092
|
let payload = {
|
|
7386
8093
|
"serviceName": "SystemUtilsSP.saveConf",
|
|
@@ -7399,42 +8106,146 @@ const SnkApplication = class {
|
|
|
7399
8106
|
.catch(error => reject(error));
|
|
7400
8107
|
});
|
|
7401
8108
|
}
|
|
8109
|
+
/**
|
|
8110
|
+
* Acessa informações de contexto "empurrados" na abertura da tela
|
|
8111
|
+
*/
|
|
7402
8112
|
async getAttributeFromHTMLWrapper(attribName) {
|
|
7403
8113
|
return Promise.resolve(window[attribName]);
|
|
7404
8114
|
}
|
|
8115
|
+
/**
|
|
8116
|
+
* Abre determinada tela, repassando pkObject
|
|
8117
|
+
*/
|
|
7405
8118
|
async openApp(resourceId, pkObject) {
|
|
7406
8119
|
Workspace.openAppActivity(resourceId, pkObject);
|
|
7407
8120
|
}
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
8121
|
+
getDuPromissesStack(dataUnitName) {
|
|
8122
|
+
let stack;
|
|
8123
|
+
if (dataUnitName) {
|
|
8124
|
+
stack = this._duPromises.get(dataUnitName);
|
|
8125
|
+
if (!stack) {
|
|
8126
|
+
stack = [];
|
|
8127
|
+
this._duPromises.set(dataUnitName, stack);
|
|
8128
|
+
}
|
|
8129
|
+
}
|
|
8130
|
+
return stack || [];
|
|
8131
|
+
}
|
|
8132
|
+
/**
|
|
8133
|
+
* Cria o DataUnit a partir do nome da entidade. É possível armazená-lo no cache
|
|
8134
|
+
* passando o dataUnitName, assim, se mais de uma chamada for feita, o mesmo DataUnit será usado
|
|
8135
|
+
*/
|
|
8136
|
+
async createDataunit(entityName, dataUnitName) {
|
|
8137
|
+
return new Promise((resolve, reject) => {
|
|
8138
|
+
const duPromisses = this.getDuPromissesStack(dataUnitName);
|
|
8139
|
+
const waitingDu = duPromisses.length > 0;
|
|
8140
|
+
duPromisses.push(new PendingPromise(resolve, reject));
|
|
8141
|
+
if (!waitingDu) {
|
|
8142
|
+
const dataUnit = this.dataUnitFetcher.getDataUnit(entityName, this.resourceID);
|
|
8143
|
+
dataUnit.loadMetadata().then(() => {
|
|
8144
|
+
if (dataUnitName) {
|
|
8145
|
+
this._duCache.set(dataUnitName, dataUnit);
|
|
8146
|
+
}
|
|
8147
|
+
while (duPromisses.length > 0) {
|
|
8148
|
+
duPromisses.pop().resolve(dataUnit);
|
|
8149
|
+
}
|
|
8150
|
+
}).catch(reason => {
|
|
8151
|
+
while (duPromisses.length > 0) {
|
|
8152
|
+
duPromisses.pop().reject(reason);
|
|
8153
|
+
}
|
|
8154
|
+
});
|
|
8155
|
+
}
|
|
8156
|
+
});
|
|
8157
|
+
}
|
|
8158
|
+
/**
|
|
8159
|
+
* Obtem um DataUnit do cache ou cria um caso ainda não tenha sido criado.
|
|
8160
|
+
*/
|
|
8161
|
+
async getDataUnit(entityName, dataUnitName) {
|
|
8162
|
+
return new Promise((resolve, reject) => {
|
|
8163
|
+
const dataUnit = this._duCache.get(dataUnitName);
|
|
8164
|
+
if (dataUnit) {
|
|
8165
|
+
resolve(dataUnit);
|
|
8166
|
+
}
|
|
8167
|
+
else {
|
|
8168
|
+
this.createDataunit(entityName, dataUnitName).then(dataUnit => {
|
|
8169
|
+
resolve(dataUnit);
|
|
8170
|
+
}).catch(reason => reject(reason));
|
|
8171
|
+
}
|
|
7412
8172
|
});
|
|
7413
8173
|
}
|
|
8174
|
+
/**
|
|
8175
|
+
* Retorna o resourceID da tela em questão.
|
|
8176
|
+
*/
|
|
7414
8177
|
async getResourceID() {
|
|
7415
8178
|
return Promise.resolve(this.resourceID);
|
|
7416
8179
|
}
|
|
8180
|
+
/**
|
|
8181
|
+
* Mostra o diálogo de alerta de acordo com os parâmetros passados.
|
|
8182
|
+
*/
|
|
7417
8183
|
async alert(title, message, icon, options) {
|
|
7418
8184
|
return ApplicationUtils.alert(title, message, icon, options);
|
|
7419
8185
|
}
|
|
8186
|
+
/**
|
|
8187
|
+
* Mostra o diálogo de erro de acordo com os parâmetros passados.
|
|
8188
|
+
*/
|
|
7420
8189
|
async error(title, message, icon, options) {
|
|
7421
8190
|
return ApplicationUtils.error(title, message, icon, options);
|
|
7422
8191
|
}
|
|
7423
|
-
|
|
7424
|
-
|
|
8192
|
+
/**
|
|
8193
|
+
* Mostra o diálogo de sucesso de acordo com os parâmetros passados.
|
|
8194
|
+
*/
|
|
8195
|
+
async success(title, message, icon, options) {
|
|
8196
|
+
return ApplicationUtils.success(title, message, icon, options);
|
|
8197
|
+
}
|
|
8198
|
+
/**
|
|
8199
|
+
* Exibe um diálogo de mensagem comum
|
|
8200
|
+
*/
|
|
8201
|
+
async message(title, message, icon, options) {
|
|
8202
|
+
return ApplicationUtils.message(title, message, icon, options);
|
|
7425
8203
|
}
|
|
8204
|
+
/**
|
|
8205
|
+
* Exibe um diálogo de confirmação
|
|
8206
|
+
*/
|
|
8207
|
+
async confirm(title, message, icon, dialogType, options) {
|
|
8208
|
+
return ApplicationUtils.confirm(title, message, icon, dialogType, options);
|
|
8209
|
+
}
|
|
8210
|
+
/**
|
|
8211
|
+
* Mostra uma informação efêmera (de segundo plano).
|
|
8212
|
+
*/
|
|
7426
8213
|
async info(message, options) {
|
|
7427
8214
|
return ApplicationUtils.info(message, options);
|
|
7428
8215
|
}
|
|
8216
|
+
/**
|
|
8217
|
+
* Busca a configuração de formulário.
|
|
8218
|
+
*/
|
|
7429
8219
|
async loadFormConfig(name) {
|
|
7430
8220
|
return this.formConfigFetcher.loadFormConfig(name, this.resourceID);
|
|
7431
8221
|
}
|
|
7432
|
-
|
|
7433
|
-
|
|
8222
|
+
/**
|
|
8223
|
+
* Busca a configuração de grade.
|
|
8224
|
+
*/
|
|
8225
|
+
async loadGridConfig(name) {
|
|
8226
|
+
return this.gridConfigFetcher.getConfig(name, this.resourceID);
|
|
8227
|
+
}
|
|
8228
|
+
/**
|
|
8229
|
+
* Busca os totalizadores da grade.
|
|
8230
|
+
*/
|
|
8231
|
+
async loadTotals(name, resourceID, filters) {
|
|
8232
|
+
return this.totalsFetcher.fetchTotals(name, resourceID, filters);
|
|
7434
8233
|
}
|
|
8234
|
+
/**
|
|
8235
|
+
* Salva a configuração de grade.
|
|
8236
|
+
*/
|
|
7435
8237
|
async saveGridConfig(config) {
|
|
7436
8238
|
return this.gridConfigFetcher.saveConfig(config, this.resourceID);
|
|
7437
8239
|
}
|
|
8240
|
+
/**
|
|
8241
|
+
* Obtém as configurações da barra de filtros
|
|
8242
|
+
*/
|
|
8243
|
+
async getFilterBarConfig() {
|
|
8244
|
+
return this.filterBarConfigFetcher.getConfig(this.resourceID);
|
|
8245
|
+
}
|
|
8246
|
+
async getAuthList(_auth) {
|
|
8247
|
+
return await (new MGEAuthorization()).parseFromJSON(_auth);
|
|
8248
|
+
}
|
|
7438
8249
|
get urlParams() {
|
|
7439
8250
|
if (!this._urlParams) {
|
|
7440
8251
|
this._urlParams = UrlUtils.getQueryParams(location.search);
|
|
@@ -7459,6 +8270,12 @@ const SnkApplication = class {
|
|
|
7459
8270
|
}
|
|
7460
8271
|
return this._gridConfigFetcher;
|
|
7461
8272
|
}
|
|
8273
|
+
get totalsFetcher() {
|
|
8274
|
+
if (!this._totalsFetcher) {
|
|
8275
|
+
this._totalsFetcher = new TotalsFetcher();
|
|
8276
|
+
}
|
|
8277
|
+
return this._totalsFetcher;
|
|
8278
|
+
}
|
|
7462
8279
|
get pesquisaFetcher() {
|
|
7463
8280
|
if (!this._pesquisaFetcher) {
|
|
7464
8281
|
this._pesquisaFetcher = new PesquisaFetcher();
|
|
@@ -7471,9 +8288,17 @@ const SnkApplication = class {
|
|
|
7471
8288
|
}
|
|
7472
8289
|
return this._authFetcher;
|
|
7473
8290
|
}
|
|
8291
|
+
get filterBarConfigFetcher() {
|
|
8292
|
+
if (!this._filterBarConfigFetcher) {
|
|
8293
|
+
this._filterBarConfigFetcher = new FilterBarConfigFetcher();
|
|
8294
|
+
}
|
|
8295
|
+
return this._filterBarConfigFetcher;
|
|
8296
|
+
}
|
|
7474
8297
|
async executeSearch(searchArgument, fieldName, dataUnit) {
|
|
7475
8298
|
const descriptor = dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.getField(fieldName);
|
|
7476
|
-
if (!descriptor)
|
|
8299
|
+
if (!descriptor) {
|
|
8300
|
+
//TODO: Implementar mensagem de erro
|
|
8301
|
+
}
|
|
7477
8302
|
else {
|
|
7478
8303
|
const { mode, argument } = searchArgument;
|
|
7479
8304
|
const { ENTITYNAME, CODEFIELD, DESCRIPTIONFIELD, ROOTENTITY, DESCRIPTIONENTITY } = descriptor.properties;
|
|
@@ -7505,23 +8330,27 @@ const SnkApplication = class {
|
|
|
7505
8330
|
}
|
|
7506
8331
|
}
|
|
7507
8332
|
});
|
|
7508
|
-
|
|
7509
|
-
|
|
7510
|
-
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
|
|
7519
|
-
|
|
7520
|
-
|
|
7521
|
-
|
|
7522
|
-
|
|
7523
|
-
|
|
7524
|
-
|
|
8333
|
+
return this.executePreparedSearch(mode, argument, { entity: ENTITYNAME, entityDescription: DESCRIPTIONENTITY, criteria, searchOptions });
|
|
8334
|
+
}
|
|
8335
|
+
}
|
|
8336
|
+
async executePreparedSearch(mode, argument, options) {
|
|
8337
|
+
const { entity, entityDescription, criteria, searchOptions } = options;
|
|
8338
|
+
if (mode === "ADVANCED") {
|
|
8339
|
+
return new Promise(accept => {
|
|
8340
|
+
const pesquisaContent = document.createElement("snk-pesquisa");
|
|
8341
|
+
pesquisaContent.argument = argument;
|
|
8342
|
+
pesquisaContent.searchLoader = (text) => this.pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
|
|
8343
|
+
pesquisaContent.selectItem = (option) => {
|
|
8344
|
+
accept(option);
|
|
8345
|
+
this.clearPopUpTitle();
|
|
8346
|
+
this.closePopUp();
|
|
8347
|
+
};
|
|
8348
|
+
this.setPopUpTitle(entityDescription);
|
|
8349
|
+
this.showPopUp(pesquisaContent);
|
|
8350
|
+
});
|
|
8351
|
+
}
|
|
8352
|
+
else {
|
|
8353
|
+
return this.pesquisaFetcher.loadSearchOptions(entity, argument, criteria, searchOptions);
|
|
7525
8354
|
}
|
|
7526
8355
|
}
|
|
7527
8356
|
async isDebugMode() {
|
|
@@ -7529,14 +8358,22 @@ const SnkApplication = class {
|
|
|
7529
8358
|
accept(window['isDebugMode']);
|
|
7530
8359
|
});
|
|
7531
8360
|
}
|
|
7532
|
-
|
|
7533
|
-
this._popUp
|
|
8361
|
+
clearPopUpContent() {
|
|
8362
|
+
if (this._popUp) {
|
|
8363
|
+
Array.from(this._popUp.children).forEach(c => {
|
|
8364
|
+
this._popUp.removeChild(c);
|
|
8365
|
+
});
|
|
8366
|
+
}
|
|
8367
|
+
}
|
|
8368
|
+
clearPopUpTitle() {
|
|
8369
|
+
this._popUp.ezTitle = "";
|
|
7534
8370
|
}
|
|
7535
8371
|
setPopUpTitle(title) {
|
|
7536
|
-
this._popUp
|
|
8372
|
+
this._popUp.ezTitle = title;
|
|
7537
8373
|
}
|
|
7538
8374
|
componentWillLoad() {
|
|
7539
8375
|
this._errorHandler = new SnkErrorHandler(this);
|
|
8376
|
+
this.messagesBuilder = new SnkMessageBuilder();
|
|
7540
8377
|
ApplicationContext.setContextValue("__EZUI__UPLOAD__ADD__URL__", `${UrlUtils.getUrlBase()}/mge/upload/file`);
|
|
7541
8378
|
ApplicationContext.setContextValue("__EZUI__SEARCH__OPTION__LOADER__", (searchArgument, fieldName, dataUnit) => {
|
|
7542
8379
|
return this.executeSearch(searchArgument, fieldName, dataUnit);
|
|
@@ -7545,6 +8382,7 @@ const SnkApplication = class {
|
|
|
7545
8382
|
ErrorTracking.init();
|
|
7546
8383
|
}
|
|
7547
8384
|
connectedCallback() {
|
|
8385
|
+
ApplicationContext.setContextValue("__SNK__APPLICATION__", this);
|
|
7548
8386
|
DataFetcher.addRequestListener(this._requestListener);
|
|
7549
8387
|
}
|
|
7550
8388
|
disconnectedCallback() {
|
|
@@ -7563,17 +8401,24 @@ const SnkApplication = class {
|
|
|
7563
8401
|
class RequestListenerLoadingBar {
|
|
7564
8402
|
constructor() {
|
|
7565
8403
|
this._debounceTime = 1000;
|
|
8404
|
+
this._ignoredNameTypes = ["totals"];
|
|
7566
8405
|
this._countRequest = 0;
|
|
7567
8406
|
}
|
|
7568
|
-
onRequestStart() {
|
|
7569
|
-
this.
|
|
8407
|
+
onRequestStart(param) {
|
|
8408
|
+
if (this.isIgnoreLoadingOnRequest(param)) {
|
|
8409
|
+
return;
|
|
8410
|
+
}
|
|
7570
8411
|
this._countRequest++;
|
|
8412
|
+
this.loadingBar.show();
|
|
7571
8413
|
if (this._timerLoading) {
|
|
7572
8414
|
clearTimeout(this._timerLoading);
|
|
7573
8415
|
}
|
|
7574
8416
|
}
|
|
7575
8417
|
;
|
|
7576
|
-
onRequestEnd() {
|
|
8418
|
+
onRequestEnd(param) {
|
|
8419
|
+
if (this.isIgnoreLoadingOnRequest(param)) {
|
|
8420
|
+
return;
|
|
8421
|
+
}
|
|
7577
8422
|
this._countRequest--;
|
|
7578
8423
|
this._timerLoading = setTimeout(() => {
|
|
7579
8424
|
if (this._countRequest <= 0) {
|
|
@@ -7582,6 +8427,25 @@ class RequestListenerLoadingBar {
|
|
|
7582
8427
|
}, this._debounceTime);
|
|
7583
8428
|
}
|
|
7584
8429
|
;
|
|
8430
|
+
isIgnoreLoadingOnRequest(param) {
|
|
8431
|
+
var _a;
|
|
8432
|
+
if (((_a = param === null || param === void 0 ? void 0 : param.requestBody) === null || _a === void 0 ? void 0 : _a.length) == 1) {
|
|
8433
|
+
const { name } = param.requestBody[0].variables;
|
|
8434
|
+
if (name) {
|
|
8435
|
+
const nameParts = name.split(":");
|
|
8436
|
+
const nameType = nameParts[0];
|
|
8437
|
+
return this._ignoredNameTypes.indexOf(nameType) >= 0;
|
|
8438
|
+
}
|
|
8439
|
+
}
|
|
8440
|
+
return false;
|
|
8441
|
+
}
|
|
8442
|
+
;
|
|
8443
|
+
}
|
|
8444
|
+
class PendingPromise {
|
|
8445
|
+
constructor(resolve, reject) {
|
|
8446
|
+
this.resolve = resolve;
|
|
8447
|
+
this.reject = reject;
|
|
8448
|
+
}
|
|
7585
8449
|
}
|
|
7586
8450
|
SnkApplication.style = snkApplicationCss;
|
|
7587
8451
|
|