@sankhyalabs/sankhyablocks 8.15.0-dev.56 → 8.15.0-dev.58
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/{IExporterProvider-91e8acd9.js → IExporterProvider-8687eea9.js} +1 -1
- package/dist/cjs/{pesquisa-fetcher-d15951b1.js → pesquisa-fetcher-610c2d29.js} +6 -11
- package/dist/cjs/snk-actions-button_4.cjs.entry.js +2 -1
- package/dist/cjs/snk-application.cjs.entry.js +2 -1
- package/dist/cjs/snk-attach.cjs.entry.js +22 -12
- package/dist/cjs/snk-crud.cjs.entry.js +2 -1
- package/dist/cjs/snk-data-exporter.cjs.entry.js +2 -1
- package/dist/cjs/snk-detail-view.cjs.entry.js +3 -2
- package/dist/cjs/snk-grid.cjs.entry.js +3 -2
- package/dist/cjs/{snk-guides-viewer-eee0b978.js → snk-guides-viewer-caf80b05.js} +1 -1
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +3 -2
- package/dist/cjs/snk-simple-crud.cjs.entry.js +3 -2
- package/dist/collection/components/snk-attach/snk-attach.js +20 -11
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +3 -12
- package/dist/components/dataunit-fetcher.js +3 -12
- package/dist/components/snk-attach2.js +20 -11
- package/dist/esm/{IExporterProvider-c3bd60f3.js → IExporterProvider-0af5ebd3.js} +1 -1
- package/dist/esm/{pesquisa-fetcher-9e18940f.js → pesquisa-fetcher-253715e4.js} +3 -12
- package/dist/esm/snk-actions-button_4.entry.js +2 -1
- package/dist/esm/snk-application.entry.js +2 -1
- package/dist/esm/snk-attach.entry.js +22 -12
- package/dist/esm/snk-crud.entry.js +2 -1
- package/dist/esm/snk-data-exporter.entry.js +2 -1
- package/dist/esm/snk-detail-view.entry.js +3 -2
- package/dist/esm/snk-grid.entry.js +3 -2
- package/dist/esm/{snk-guides-viewer-4fd4e25a.js → snk-guides-viewer-2b12c750.js} +1 -1
- package/dist/esm/snk-guides-viewer.entry.js +3 -2
- package/dist/esm/snk-simple-crud.entry.js +3 -2
- package/dist/sankhyablocks/{p-52ec26b8.entry.js → p-24c3b4cc.entry.js} +1 -1
- package/dist/sankhyablocks/p-4d10e705.entry.js +1 -0
- package/dist/sankhyablocks/p-69bf12f9.js +65 -0
- package/dist/sankhyablocks/p-6e27046b.entry.js +1 -0
- package/dist/sankhyablocks/{p-388d00f5.entry.js → p-733423d2.entry.js} +1 -1
- package/dist/sankhyablocks/p-79bae662.entry.js +1 -0
- package/dist/sankhyablocks/{p-9b94aaa9.js → p-93b9da9b.js} +1 -1
- package/dist/sankhyablocks/{p-e0649a17.js → p-9bd6fd87.js} +1 -1
- package/dist/sankhyablocks/p-a9a26fbb.entry.js +1 -0
- package/dist/sankhyablocks/p-ad73e9d7.entry.js +1 -0
- package/dist/sankhyablocks/p-ddd8200a.entry.js +1 -0
- package/dist/sankhyablocks/p-ecfa87e8.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-attach/snk-attach.d.ts +1 -0
- package/package.json +1 -1
- package/dist/sankhyablocks/p-07d324ba.entry.js +0 -1
- package/dist/sankhyablocks/p-3de247d1.entry.js +0 -1
- package/dist/sankhyablocks/p-56f95797.entry.js +0 -1
- package/dist/sankhyablocks/p-595e7068.entry.js +0 -1
- package/dist/sankhyablocks/p-775253f7.entry.js +0 -1
- package/dist/sankhyablocks/p-7d6897ec.entry.js +0 -1
- package/dist/sankhyablocks/p-81abd586.entry.js +0 -1
- package/dist/sankhyablocks/p-f678bffa.js +0 -65
@@ -1,7 +1,7 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
const formConfigFetcher = require('./form-config-fetcher-3c4daeb5.js');
|
4
|
-
const pesquisaFetcher = require('./pesquisa-fetcher-
|
4
|
+
const pesquisaFetcher = require('./pesquisa-fetcher-610c2d29.js');
|
5
5
|
const core = require('@sankhyalabs/core');
|
6
6
|
require('./index-0922807b.js');
|
7
7
|
require('./ISave-e91b70a7.js');
|
@@ -5,8 +5,13 @@ const formConfigFetcher = require('./form-config-fetcher-3c4daeb5.js');
|
|
5
5
|
const constants = require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
6
6
|
const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
8
|
+
const SortingUtils = require('@sankhyalabs/core/dist/utils/SortingUtils');
|
8
9
|
const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
|
9
10
|
|
11
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
12
|
+
|
13
|
+
const SortingUtils__default = /*#__PURE__*/_interopDefaultLegacy(SortingUtils);
|
14
|
+
|
10
15
|
class ArrayRepository {
|
11
16
|
constructor(equalsFunction) {
|
12
17
|
this._list = [];
|
@@ -110,17 +115,7 @@ class PreloadManager {
|
|
110
115
|
}
|
111
116
|
}
|
112
117
|
static getSortingFunction(dataUnit, sorting) {
|
113
|
-
|
114
|
-
return undefined;
|
115
|
-
}
|
116
|
-
return (recordA, recordB) => {
|
117
|
-
for (const sort of sorting) {
|
118
|
-
const result = core.FieldComparator.compare(dataUnit.getField(sort.field), recordA, recordB, sort.mode === core.SortMode.ASC);
|
119
|
-
if (result != 0) {
|
120
|
-
return result;
|
121
|
-
}
|
122
|
-
}
|
123
|
-
};
|
118
|
+
return SortingUtils__default['default'].getSortingFunction(dataUnit, sorting);
|
124
119
|
}
|
125
120
|
static async getDistinct(dataUnit, fieldName) {
|
126
121
|
if (!PreloadManager.isCacheEnabled(dataUnit)) {
|
@@ -6,7 +6,7 @@ const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const formConfigFetcher = require('./form-config-fetcher-3c4daeb5.js');
|
8
8
|
const ParamType = require('./ParamType-90b440a0.js');
|
9
|
-
require('./pesquisa-fetcher-
|
9
|
+
require('./pesquisa-fetcher-610c2d29.js');
|
10
10
|
require('./index-0922807b.js');
|
11
11
|
require('./ISave-e91b70a7.js');
|
12
12
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
@@ -19,6 +19,7 @@ const ConfigStorage = require('./ConfigStorage-7df9d3bb.js');
|
|
19
19
|
const constants = require('./constants-35ddd366.js');
|
20
20
|
require('./PrintUtils-bcaeb82f.js');
|
21
21
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
22
|
+
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
22
23
|
|
23
24
|
const SERVICE_ACTION_EXECUTE_JAVA = 'ActionButtonsSP.executeJava';
|
24
25
|
class JavaExecutor {
|
@@ -8,13 +8,14 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
8
|
const ConfigStorage = require('./ConfigStorage-7df9d3bb.js');
|
9
9
|
const formConfigFetcher = require('./form-config-fetcher-3c4daeb5.js');
|
10
10
|
const authFetcher = require('./auth-fetcher-e6112be7.js');
|
11
|
-
const pesquisaFetcher = require('./pesquisa-fetcher-
|
11
|
+
const pesquisaFetcher = require('./pesquisa-fetcher-610c2d29.js');
|
12
12
|
const SnkMessageBuilder = require('./SnkMessageBuilder-66aa2557.js');
|
13
13
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
14
14
|
require('./PrintUtils-bcaeb82f.js');
|
15
15
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
16
16
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
17
17
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
18
|
+
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
18
19
|
require('./ResourceIDUtils-5ff86aa7.js');
|
19
20
|
|
20
21
|
class AppletCaller {
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const formConfigFetcher = require('./form-config-fetcher-3c4daeb5.js');
|
8
|
-
const pesquisaFetcher = require('./pesquisa-fetcher-
|
8
|
+
const pesquisaFetcher = require('./pesquisa-fetcher-610c2d29.js');
|
9
9
|
require('./index-0922807b.js');
|
10
10
|
const ISave = require('./ISave-e91b70a7.js');
|
11
11
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
@@ -16,6 +16,7 @@ require('./PrintUtils-bcaeb82f.js');
|
|
16
16
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
17
17
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
18
18
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
19
|
+
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
19
20
|
require('./ResourceIDUtils-5ff86aa7.js');
|
20
21
|
require('./index-102ba62d.js');
|
21
22
|
|
@@ -728,15 +729,13 @@ const SnkAttach = class {
|
|
728
729
|
}
|
729
730
|
}
|
730
731
|
loadAnexoSistema() {
|
731
|
-
var _a;
|
732
732
|
this._currentDataUnit = this._currentDataUnit || new pesquisaFetcher.DataUnitFetcher().getDataUnit(RESOURCE_ID, DATA_UNIT_NAME);
|
733
|
-
this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
|
734
733
|
if (!this._currentDataUnit.metadata) {
|
735
734
|
this._currentDataUnit
|
736
735
|
.loadMetadata()
|
737
736
|
.then(() => this.crudConfig = Object.assign({}, anexoSistemaCrudConfig));
|
738
737
|
}
|
739
|
-
this.
|
738
|
+
this.initDataUnitLoaders();
|
740
739
|
this._currentDataUnit.addFilterProvider({
|
741
740
|
getFilter: () => this._currentDataUnitBuilder.getFilters(this.registerKey)
|
742
741
|
});
|
@@ -746,9 +745,9 @@ const SnkAttach = class {
|
|
746
745
|
this._currentDataUnit.loadData().then(this.disableEditFieldsNotInForm.bind(this));
|
747
746
|
}
|
748
747
|
loadAttach() {
|
749
|
-
var _a, _b
|
750
|
-
this._currentFetcher = new AttachFetcher();
|
748
|
+
var _a, _b;
|
751
749
|
this._currentDataUnit = new core.DataUnit(pesquisaFetcher.InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
|
750
|
+
this.initDataUnitLoaders();
|
752
751
|
this._currentDataUnit.addInterceptor({
|
753
752
|
interceptAction: (action) => {
|
754
753
|
var _a;
|
@@ -759,19 +758,30 @@ const SnkAttach = class {
|
|
759
758
|
return this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement);
|
760
759
|
}
|
761
760
|
});
|
762
|
-
this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
|
763
|
-
(_a = this._currentDataUnitBuilder) === null || _a === void 0 ? void 0 : _a.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
|
764
|
-
this.returnToGridMode();
|
765
|
-
await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
|
766
|
-
});
|
767
761
|
if (!this._currentDataUnit.metadata) {
|
768
|
-
(
|
762
|
+
(_b = (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata()) === null || _b === void 0 ? void 0 : _b.then(() => {
|
769
763
|
var _a, _b;
|
770
764
|
this.crudConfig = Object.assign({}, attachCrudConfig);
|
771
765
|
(_b = (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadData(undefined, undefined, true, this.registerKey)) === null || _b === void 0 ? void 0 : _b.then(this.disableEditFieldsNotInForm.bind(this));
|
772
766
|
});
|
773
767
|
}
|
774
768
|
}
|
769
|
+
initDataUnitLoaders() {
|
770
|
+
var _a, _b, _c;
|
771
|
+
if (this.fetcherType === "AnexoSistema") {
|
772
|
+
this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
|
773
|
+
this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
|
774
|
+
(_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
|
775
|
+
}
|
776
|
+
if (this.fetcherType === "Attach") {
|
777
|
+
this._currentFetcher = new AttachFetcher();
|
778
|
+
this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
|
779
|
+
(_c = this._currentDataUnitBuilder) === null || _c === void 0 ? void 0 : _c.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
|
780
|
+
this.returnToGridMode();
|
781
|
+
await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
|
782
|
+
});
|
783
|
+
}
|
784
|
+
}
|
775
785
|
disableEditFieldsNotInForm() {
|
776
786
|
var _a;
|
777
787
|
(_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid.columns.forEach(column => {
|
@@ -6,7 +6,7 @@ const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const taskbarElements = require('./taskbar-elements-d9392685.js');
|
8
8
|
require('./form-config-fetcher-3c4daeb5.js');
|
9
|
-
require('./pesquisa-fetcher-
|
9
|
+
require('./pesquisa-fetcher-610c2d29.js');
|
10
10
|
const index$1 = require('./index-0922807b.js');
|
11
11
|
require('./ISave-e91b70a7.js');
|
12
12
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
@@ -17,6 +17,7 @@ const authFetcher = require('./auth-fetcher-e6112be7.js');
|
|
17
17
|
require('./index-102ba62d.js');
|
18
18
|
require('./PrintUtils-bcaeb82f.js');
|
19
19
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
20
|
+
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
20
21
|
require('./ResourceIDUtils-5ff86aa7.js');
|
21
22
|
|
22
23
|
const snkCrudCss = ".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%}";
|
@@ -9,7 +9,7 @@ const index = require('./index-0922807b.js');
|
|
9
9
|
const constants = require('./constants-35ddd366.js');
|
10
10
|
const formConfigFetcher = require('./form-config-fetcher-3c4daeb5.js');
|
11
11
|
const snkDataUnit = require('./snk-data-unit-abd2113f.js');
|
12
|
-
require('./pesquisa-fetcher-
|
12
|
+
require('./pesquisa-fetcher-610c2d29.js');
|
13
13
|
require('./ISave-e91b70a7.js');
|
14
14
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
15
15
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
@@ -18,6 +18,7 @@ require('./PrintUtils-bcaeb82f.js');
|
|
18
18
|
require('./SnkMessageBuilder-66aa2557.js');
|
19
19
|
require('./RecordIDUtils-3735135c.js');
|
20
20
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
21
|
+
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
21
22
|
require('./ResourceIDUtils-5ff86aa7.js');
|
22
23
|
|
23
24
|
class ItemBuilder {
|
@@ -7,7 +7,7 @@ const core = require('@sankhyalabs/core');
|
|
7
7
|
const SnkFormConfigManager = require('./SnkFormConfigManager-4259edbe.js');
|
8
8
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
9
9
|
require('./form-config-fetcher-3c4daeb5.js');
|
10
|
-
require('./pesquisa-fetcher-
|
10
|
+
require('./pesquisa-fetcher-610c2d29.js');
|
11
11
|
const index$1 = require('./index-0922807b.js');
|
12
12
|
require('./ISave-e91b70a7.js');
|
13
13
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
@@ -15,11 +15,12 @@ require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
15
15
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
16
16
|
const taskbarElements = require('./taskbar-elements-d9392685.js');
|
17
17
|
const constants = require('./constants-35ddd366.js');
|
18
|
-
const snkGuidesViewer = require('./snk-guides-viewer-
|
18
|
+
const snkGuidesViewer = require('./snk-guides-viewer-caf80b05.js');
|
19
19
|
const SnkMessageBuilder = require('./SnkMessageBuilder-66aa2557.js');
|
20
20
|
require('./ConfigStorage-7df9d3bb.js');
|
21
21
|
require('./PrintUtils-bcaeb82f.js');
|
22
22
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
23
|
+
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
23
24
|
require('./ResourceIDUtils-5ff86aa7.js');
|
24
25
|
require('./index-102ba62d.js');
|
25
26
|
require('./field-search-f56aa7d6.js');
|
@@ -9,10 +9,10 @@ const ConfigStorage = require('./ConfigStorage-7df9d3bb.js');
|
|
9
9
|
const index$1 = require('./index-0922807b.js');
|
10
10
|
const fieldSearch = require('./field-search-f56aa7d6.js');
|
11
11
|
const index$2 = require('./index-102ba62d.js');
|
12
|
-
const IExporterProvider = require('./IExporterProvider-
|
12
|
+
const IExporterProvider = require('./IExporterProvider-8687eea9.js');
|
13
13
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
14
14
|
require('./form-config-fetcher-3c4daeb5.js');
|
15
|
-
require('./pesquisa-fetcher-
|
15
|
+
require('./pesquisa-fetcher-610c2d29.js');
|
16
16
|
require('./ISave-e91b70a7.js');
|
17
17
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
18
18
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
@@ -21,6 +21,7 @@ const RecordIDUtils = require('./RecordIDUtils-3735135c.js');
|
|
21
21
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
|
22
22
|
require('./PrintUtils-bcaeb82f.js');
|
23
23
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
24
|
+
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
24
25
|
require('./ResourceIDUtils-5ff86aa7.js');
|
25
26
|
|
26
27
|
class ServerSideExporterProvider extends IExporterProvider.CommonsExporter {
|
@@ -8,7 +8,7 @@ const fieldSearch = require('./field-search-f56aa7d6.js');
|
|
8
8
|
const taskbarElements = require('./taskbar-elements-d9392685.js');
|
9
9
|
const constants = require('./constants-35ddd366.js');
|
10
10
|
require('./form-config-fetcher-3c4daeb5.js');
|
11
|
-
require('./pesquisa-fetcher-
|
11
|
+
require('./pesquisa-fetcher-610c2d29.js');
|
12
12
|
const index$1 = require('./index-0922807b.js');
|
13
13
|
require('./ISave-e91b70a7.js');
|
14
14
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const snkGuidesViewer = require('./snk-guides-viewer-
|
5
|
+
const snkGuidesViewer = require('./snk-guides-viewer-caf80b05.js');
|
6
6
|
require('./index-f9e81701.js');
|
7
7
|
require('@sankhyalabs/core');
|
8
8
|
require('./SnkFormConfigManager-4259edbe.js');
|
@@ -17,9 +17,10 @@ require('./taskbar-elements-d9392685.js');
|
|
17
17
|
require('./index-0922807b.js');
|
18
18
|
require('./index-102ba62d.js');
|
19
19
|
require('./constants-35ddd366.js');
|
20
|
-
require('./pesquisa-fetcher-
|
20
|
+
require('./pesquisa-fetcher-610c2d29.js');
|
21
21
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
22
22
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
23
|
+
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
23
24
|
require('./ResourceIDUtils-5ff86aa7.js');
|
24
25
|
require('./ISave-e91b70a7.js');
|
25
26
|
require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
@@ -8,8 +8,8 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
8
|
const constants = require('./constants-35ddd366.js');
|
9
9
|
const taskbarElements = require('./taskbar-elements-d9392685.js');
|
10
10
|
const formConfigFetcher = require('./form-config-fetcher-3c4daeb5.js');
|
11
|
-
const pesquisaFetcher = require('./pesquisa-fetcher-
|
12
|
-
const IExporterProvider = require('./IExporterProvider-
|
11
|
+
const pesquisaFetcher = require('./pesquisa-fetcher-610c2d29.js');
|
12
|
+
const IExporterProvider = require('./IExporterProvider-8687eea9.js');
|
13
13
|
const index = require('./index-0922807b.js');
|
14
14
|
require('./ISave-e91b70a7.js');
|
15
15
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
@@ -22,6 +22,7 @@ const RecordIDUtils = require('./RecordIDUtils-3735135c.js');
|
|
22
22
|
const index$2 = require('./index-102ba62d.js');
|
23
23
|
require('./PrintUtils-bcaeb82f.js');
|
24
24
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
25
|
+
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
25
26
|
require('./ResourceIDUtils-5ff86aa7.js');
|
26
27
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
|
27
28
|
|
@@ -117,15 +117,13 @@ export class SnkAttach {
|
|
117
117
|
}
|
118
118
|
}
|
119
119
|
loadAnexoSistema() {
|
120
|
-
var _a;
|
121
120
|
this._currentDataUnit = this._currentDataUnit || new DataUnitFetcher().getDataUnit(RESOURCE_ID, DATA_UNIT_NAME);
|
122
|
-
this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
|
123
121
|
if (!this._currentDataUnit.metadata) {
|
124
122
|
this._currentDataUnit
|
125
123
|
.loadMetadata()
|
126
124
|
.then(() => this.crudConfig = Object.assign({}, anexoSistemaCrudConfig));
|
127
125
|
}
|
128
|
-
this.
|
126
|
+
this.initDataUnitLoaders();
|
129
127
|
this._currentDataUnit.addFilterProvider({
|
130
128
|
getFilter: () => this._currentDataUnitBuilder.getFilters(this.registerKey)
|
131
129
|
});
|
@@ -135,9 +133,9 @@ export class SnkAttach {
|
|
135
133
|
this._currentDataUnit.loadData().then(this.disableEditFieldsNotInForm.bind(this));
|
136
134
|
}
|
137
135
|
loadAttach() {
|
138
|
-
var _a, _b
|
139
|
-
this._currentFetcher = new AttachFetcher();
|
136
|
+
var _a, _b;
|
140
137
|
this._currentDataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
|
138
|
+
this.initDataUnitLoaders();
|
141
139
|
this._currentDataUnit.addInterceptor({
|
142
140
|
interceptAction: (action) => {
|
143
141
|
var _a;
|
@@ -148,19 +146,30 @@ export class SnkAttach {
|
|
148
146
|
return this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement);
|
149
147
|
}
|
150
148
|
});
|
151
|
-
this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
|
152
|
-
(_a = this._currentDataUnitBuilder) === null || _a === void 0 ? void 0 : _a.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
|
153
|
-
this.returnToGridMode();
|
154
|
-
await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
|
155
|
-
});
|
156
149
|
if (!this._currentDataUnit.metadata) {
|
157
|
-
(
|
150
|
+
(_b = (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata()) === null || _b === void 0 ? void 0 : _b.then(() => {
|
158
151
|
var _a, _b;
|
159
152
|
this.crudConfig = Object.assign({}, attachCrudConfig);
|
160
153
|
(_b = (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadData(undefined, undefined, true, this.registerKey)) === null || _b === void 0 ? void 0 : _b.then(this.disableEditFieldsNotInForm.bind(this));
|
161
154
|
});
|
162
155
|
}
|
163
156
|
}
|
157
|
+
initDataUnitLoaders() {
|
158
|
+
var _a, _b, _c;
|
159
|
+
if (this.fetcherType === "AnexoSistema") {
|
160
|
+
this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
|
161
|
+
this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
|
162
|
+
(_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
|
163
|
+
}
|
164
|
+
if (this.fetcherType === "Attach") {
|
165
|
+
this._currentFetcher = new AttachFetcher();
|
166
|
+
this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
|
167
|
+
(_c = this._currentDataUnitBuilder) === null || _c === void 0 ? void 0 : _c.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
|
168
|
+
this.returnToGridMode();
|
169
|
+
await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
|
170
|
+
});
|
171
|
+
}
|
172
|
+
}
|
164
173
|
disableEditFieldsNotInForm() {
|
165
174
|
var _a;
|
166
175
|
(_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid.columns.forEach(column => {
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import { DataUnit
|
1
|
+
import { DataUnit } from "@sankhyalabs/core";
|
2
2
|
import { ArrayRepository } from "./ArrayRepository";
|
3
3
|
import { ColumnFilterManager } from "@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";
|
4
|
+
import SortingUtils from "@sankhyalabs/core/dist/utils/SortingUtils";
|
4
5
|
export default class PreloadManager {
|
5
6
|
static setLoadingStatus(dataUnit, loadingInProgress) {
|
6
7
|
this._loadingStatus.set(dataUnit.name, loadingInProgress);
|
@@ -20,17 +21,7 @@ export default class PreloadManager {
|
|
20
21
|
}
|
21
22
|
}
|
22
23
|
static getSortingFunction(dataUnit, sorting) {
|
23
|
-
|
24
|
-
return undefined;
|
25
|
-
}
|
26
|
-
return (recordA, recordB) => {
|
27
|
-
for (const sort of sorting) {
|
28
|
-
const result = FieldComparator.compare(dataUnit.getField(sort.field), recordA, recordB, sort.mode === SortMode.ASC);
|
29
|
-
if (result != 0) {
|
30
|
-
return result;
|
31
|
-
}
|
32
|
-
}
|
33
|
-
};
|
24
|
+
return SortingUtils.getSortingFunction(dataUnit, sorting);
|
34
25
|
}
|
35
26
|
static async getDistinct(dataUnit, fieldName) {
|
36
27
|
if (!PreloadManager.isCacheEnabled(dataUnit)) {
|
@@ -1,8 +1,9 @@
|
|
1
|
-
import { DataType, ApplicationContext, ObjectUtils,
|
1
|
+
import { DataType, ApplicationContext, ObjectUtils, DataUnit, DateUtils, StringUtils, ChangeOperation, UserInterface, DataUnitStorage } from '@sankhyalabs/core';
|
2
2
|
import { d as dist, D as DataFetcher } from './form-config-fetcher.js';
|
3
3
|
import { DISTINCT_FILTER_NAME_PREFIX } from '@sankhyalabs/ezui/dist/collection/utils/constants';
|
4
4
|
import { DataUnitTransient } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
5
5
|
import { ColumnFilterManager } from '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
6
|
+
import SortingUtils from '@sankhyalabs/core/dist/utils/SortingUtils';
|
6
7
|
import { R as ResourceIDUtils } from './ResourceIDUtils.js';
|
7
8
|
|
8
9
|
class PesquisaFetcher {
|
@@ -268,17 +269,7 @@ class PreloadManager {
|
|
268
269
|
}
|
269
270
|
}
|
270
271
|
static getSortingFunction(dataUnit, sorting) {
|
271
|
-
|
272
|
-
return undefined;
|
273
|
-
}
|
274
|
-
return (recordA, recordB) => {
|
275
|
-
for (const sort of sorting) {
|
276
|
-
const result = FieldComparator.compare(dataUnit.getField(sort.field), recordA, recordB, sort.mode === SortMode.ASC);
|
277
|
-
if (result != 0) {
|
278
|
-
return result;
|
279
|
-
}
|
280
|
-
}
|
281
|
-
};
|
272
|
+
return SortingUtils.getSortingFunction(dataUnit, sorting);
|
282
273
|
}
|
283
274
|
static async getDistinct(dataUnit, fieldName) {
|
284
275
|
if (!PreloadManager.isCacheEnabled(dataUnit)) {
|
@@ -732,15 +732,13 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
732
732
|
}
|
733
733
|
}
|
734
734
|
loadAnexoSistema() {
|
735
|
-
var _a;
|
736
735
|
this._currentDataUnit = this._currentDataUnit || new DataUnitFetcher().getDataUnit(RESOURCE_ID, DATA_UNIT_NAME);
|
737
|
-
this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
|
738
736
|
if (!this._currentDataUnit.metadata) {
|
739
737
|
this._currentDataUnit
|
740
738
|
.loadMetadata()
|
741
739
|
.then(() => this.crudConfig = Object.assign({}, anexoSistemaCrudConfig));
|
742
740
|
}
|
743
|
-
this.
|
741
|
+
this.initDataUnitLoaders();
|
744
742
|
this._currentDataUnit.addFilterProvider({
|
745
743
|
getFilter: () => this._currentDataUnitBuilder.getFilters(this.registerKey)
|
746
744
|
});
|
@@ -750,9 +748,9 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
750
748
|
this._currentDataUnit.loadData().then(this.disableEditFieldsNotInForm.bind(this));
|
751
749
|
}
|
752
750
|
loadAttach() {
|
753
|
-
var _a, _b
|
754
|
-
this._currentFetcher = new AttachFetcher();
|
751
|
+
var _a, _b;
|
755
752
|
this._currentDataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
|
753
|
+
this.initDataUnitLoaders();
|
756
754
|
this._currentDataUnit.addInterceptor({
|
757
755
|
interceptAction: (action) => {
|
758
756
|
var _a;
|
@@ -763,19 +761,30 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
763
761
|
return this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement);
|
764
762
|
}
|
765
763
|
});
|
766
|
-
this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
|
767
|
-
(_a = this._currentDataUnitBuilder) === null || _a === void 0 ? void 0 : _a.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
|
768
|
-
this.returnToGridMode();
|
769
|
-
await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
|
770
|
-
});
|
771
764
|
if (!this._currentDataUnit.metadata) {
|
772
|
-
(
|
765
|
+
(_b = (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata()) === null || _b === void 0 ? void 0 : _b.then(() => {
|
773
766
|
var _a, _b;
|
774
767
|
this.crudConfig = Object.assign({}, attachCrudConfig);
|
775
768
|
(_b = (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadData(undefined, undefined, true, this.registerKey)) === null || _b === void 0 ? void 0 : _b.then(this.disableEditFieldsNotInForm.bind(this));
|
776
769
|
});
|
777
770
|
}
|
778
771
|
}
|
772
|
+
initDataUnitLoaders() {
|
773
|
+
var _a, _b, _c;
|
774
|
+
if (this.fetcherType === "AnexoSistema") {
|
775
|
+
this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
|
776
|
+
this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
|
777
|
+
(_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
|
778
|
+
}
|
779
|
+
if (this.fetcherType === "Attach") {
|
780
|
+
this._currentFetcher = new AttachFetcher();
|
781
|
+
this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
|
782
|
+
(_c = this._currentDataUnitBuilder) === null || _c === void 0 ? void 0 : _c.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
|
783
|
+
this.returnToGridMode();
|
784
|
+
await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
|
785
|
+
});
|
786
|
+
}
|
787
|
+
}
|
779
788
|
disableEditFieldsNotInForm() {
|
780
789
|
var _a;
|
781
790
|
(_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid.columns.forEach(column => {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { D as DataFetcher } from './form-config-fetcher-e3094014.js';
|
2
|
-
import { a as PreloadManager } from './pesquisa-fetcher-
|
2
|
+
import { a as PreloadManager } from './pesquisa-fetcher-253715e4.js';
|
3
3
|
import { SortMode, ApplicationContext, UserInterface, DateUtils, DataType } from '@sankhyalabs/core';
|
4
4
|
import './index-0ece87a6.js';
|
5
5
|
import './ISave-d8c8bc59.js';
|
@@ -1,8 +1,9 @@
|
|
1
|
-
import { ObjectUtils,
|
1
|
+
import { ObjectUtils, DataUnit, DataType, DateUtils, StringUtils, ChangeOperation, ApplicationContext, UserInterface, DataUnitStorage } from '@sankhyalabs/core';
|
2
2
|
import { D as DataFetcher, d as dist } from './form-config-fetcher-e3094014.js';
|
3
3
|
import { DISTINCT_FILTER_NAME_PREFIX } from '@sankhyalabs/ezui/dist/collection/utils/constants';
|
4
4
|
import { DataUnitTransient } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
5
5
|
import { ColumnFilterManager } from '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
6
|
+
import SortingUtils from '@sankhyalabs/core/dist/utils/SortingUtils';
|
6
7
|
import { R as ResourceIDUtils } from './ResourceIDUtils-a114189a.js';
|
7
8
|
|
8
9
|
class ArrayRepository {
|
@@ -108,17 +109,7 @@ class PreloadManager {
|
|
108
109
|
}
|
109
110
|
}
|
110
111
|
static getSortingFunction(dataUnit, sorting) {
|
111
|
-
|
112
|
-
return undefined;
|
113
|
-
}
|
114
|
-
return (recordA, recordB) => {
|
115
|
-
for (const sort of sorting) {
|
116
|
-
const result = FieldComparator.compare(dataUnit.getField(sort.field), recordA, recordB, sort.mode === SortMode.ASC);
|
117
|
-
if (result != 0) {
|
118
|
-
return result;
|
119
|
-
}
|
120
|
-
}
|
121
|
-
};
|
112
|
+
return SortingUtils.getSortingFunction(dataUnit, sorting);
|
122
113
|
}
|
123
114
|
static async getDistinct(dataUnit, fieldName) {
|
124
115
|
if (!PreloadManager.isCacheEnabled(dataUnit)) {
|
@@ -2,7 +2,7 @@ import { r as registerInstance, h, H as Host, g as getElement, c as createEvent
|
|
2
2
|
import { ApplicationContext, StringUtils, ErrorException, WarningException, ObjectUtils, DateUtils, ArrayUtils, ElementIDUtils } from '@sankhyalabs/core';
|
3
3
|
import { D as DataFetcher } from './form-config-fetcher-e3094014.js';
|
4
4
|
import { P as ParamType } from './ParamType-d5152b06.js';
|
5
|
-
import './pesquisa-fetcher-
|
5
|
+
import './pesquisa-fetcher-253715e4.js';
|
6
6
|
import './index-0ece87a6.js';
|
7
7
|
import './ISave-d8c8bc59.js';
|
8
8
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
@@ -15,6 +15,7 @@ import { C as ConfigStorage } from './ConfigStorage-928c3bf4.js';
|
|
15
15
|
import { O as ORDER_VALUES } from './constants-8457af36.js';
|
16
16
|
import './PrintUtils-3e4ff0f5.js';
|
17
17
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
18
|
+
import '@sankhyalabs/core/dist/utils/SortingUtils';
|
18
19
|
|
19
20
|
const SERVICE_ACTION_EXECUTE_JAVA = 'ActionButtonsSP.executeJava';
|
20
21
|
class JavaExecutor {
|
@@ -4,13 +4,14 @@ import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
4
|
import { C as ConfigStorage } from './ConfigStorage-928c3bf4.js';
|
5
5
|
import { d as dist, D as DataFetcher, U as UrlUtils } from './form-config-fetcher-e3094014.js';
|
6
6
|
import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher-e1cb288f.js';
|
7
|
-
import { D as DataUnitFetcher, P as PesquisaFetcher } from './pesquisa-fetcher-
|
7
|
+
import { D as DataUnitFetcher, P as PesquisaFetcher } from './pesquisa-fetcher-253715e4.js';
|
8
8
|
import { S as SnkMessageBuilder } from './SnkMessageBuilder-0a4becdd.js';
|
9
9
|
import './filter-item-type.enum-d45e026f.js';
|
10
10
|
import './PrintUtils-3e4ff0f5.js';
|
11
11
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
12
12
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
13
13
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
14
|
+
import '@sankhyalabs/core/dist/utils/SortingUtils';
|
14
15
|
import './ResourceIDUtils-a114189a.js';
|
15
16
|
|
16
17
|
class AppletCaller {
|