@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-47082.0 → 0.0.0-bugfix-dev-KB-46492.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{SnkMessageBuilder-e7dcf408.js → SnkMessageBuilder-141aa18d.js} +2 -1
- package/dist/cjs/SnkMultiSelectionListDataSource-5213120b.js +140 -0
- package/dist/cjs/index-f9e81701.js +2 -10
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-c416a6b7.js → pesquisa-fetcher-94f6b316.js} +231 -20
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/{snk-actions-button_2.cjs.entry.js → snk-actions-button_4.cjs.entry.js} +517 -2
- package/dist/cjs/snk-application.cjs.entry.js +2 -3
- package/dist/cjs/snk-attach.cjs.entry.js +3 -4
- package/dist/cjs/snk-crud.cjs.entry.js +2 -3
- package/dist/cjs/snk-data-exporter.cjs.entry.js +7 -3
- package/dist/cjs/{snk-data-unit-82c08a8c.js → snk-data-unit-6026a9f7.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +5 -6
- package/dist/cjs/snk-form-config.cjs.entry.js +6 -0
- package/dist/cjs/snk-form.cjs.entry.js +1 -1
- package/dist/cjs/snk-grid.cjs.entry.js +10 -19
- package/dist/cjs/{snk-guides-viewer-bd69fce4.js → snk-guides-viewer-c7293cfa.js} +2 -3
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +3 -4
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +3 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +147 -16
- package/dist/cjs/snk-taskbar.cjs.entry.js +5 -1
- package/dist/collection/collection-manifest.json +6 -6
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +2 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +1 -1
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +5 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js +3 -1
- package/dist/collection/components/snk-form/snk-form.js +1 -1
- package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.js +11 -5
- package/dist/collection/components/snk-grid/snk-grid.js +5 -16
- package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.js +130 -123
- package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.js +1 -1
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +5 -0
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +226 -14
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +6 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +1 -8
- package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +2 -1
- package/dist/collection/lib/utils/CrudUtils.js +13 -1
- package/dist/components/SnkMessageBuilder.js +2 -1
- package/dist/components/dataunit-fetcher.js +1 -8
- package/dist/components/field-search.js +93 -3
- package/dist/components/index.d.ts +6 -6
- package/dist/components/snk-attach2.js +54 -12
- package/dist/components/snk-data-exporter2.js +5 -1
- package/dist/components/snk-detail-view2.js +29 -4
- package/dist/components/snk-form-config2.js +7 -1
- package/dist/components/snk-grid-config2.js +128 -102
- package/dist/components/snk-grid2.js +10 -17
- package/dist/components/snk-personalized-filter-editor.js +3 -1
- package/dist/components/snk-simple-crud2.js +204 -24
- package/dist/components/snk-taskbar2.js +5 -1
- package/dist/esm/{SnkMessageBuilder-0fb796b9.js → SnkMessageBuilder-9747ddd2.js} +2 -1
- package/dist/esm/SnkMultiSelectionListDataSource-7e7eada5.js +133 -0
- package/dist/esm/index-a7d3d3f1.js +2 -10
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{pesquisa-fetcher-ab16a2e8.js → pesquisa-fetcher-f05a12ca.js} +222 -12
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/{snk-actions-button_2.entry.js → snk-actions-button_4.entry.js} +516 -3
- package/dist/esm/snk-application.entry.js +2 -3
- package/dist/esm/snk-attach.entry.js +2 -3
- package/dist/esm/snk-crud.entry.js +2 -3
- package/dist/esm/snk-data-exporter.entry.js +7 -3
- package/dist/esm/{snk-data-unit-5d201fb3.js → snk-data-unit-4c343635.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +5 -6
- package/dist/esm/snk-form-config.entry.js +7 -1
- package/dist/esm/snk-form.entry.js +1 -1
- package/dist/esm/snk-grid.entry.js +11 -20
- package/dist/esm/{snk-guides-viewer-fde82cc1.js → snk-guides-viewer-47443f7c.js} +2 -3
- package/dist/esm/snk-guides-viewer.entry.js +3 -4
- package/dist/esm/snk-personalized-filter-editor.entry.js +3 -1
- package/dist/esm/snk-simple-crud.entry.js +148 -17
- package/dist/esm/snk-taskbar.entry.js +5 -1
- package/dist/sankhyablocks/p-0c9dd95e.entry.js +1 -0
- package/dist/sankhyablocks/p-20b46647.entry.js +1 -0
- package/dist/sankhyablocks/p-2897fb8c.js +1 -0
- package/dist/sankhyablocks/{p-05243555.js → p-2936303b.js} +1 -1
- package/dist/sankhyablocks/p-30735d1e.entry.js +1 -0
- package/dist/sankhyablocks/p-3c5b7cfc.entry.js +1 -0
- package/dist/sankhyablocks/p-6ae58da0.js +1 -0
- package/dist/sankhyablocks/{p-fcdcb0e2.entry.js → p-746fc99e.entry.js} +1 -1
- package/dist/sankhyablocks/p-7e05bd83.entry.js +1 -0
- package/dist/sankhyablocks/p-99b1926b.entry.js +1 -0
- package/dist/sankhyablocks/{p-f3d1c48e.js → p-9a5d1b39.js} +1 -1
- package/dist/sankhyablocks/p-9fb97691.entry.js +1 -0
- package/dist/sankhyablocks/p-a9aec34d.entry.js +1 -0
- package/dist/sankhyablocks/p-b11aa1e0.entry.js +1 -0
- package/dist/sankhyablocks/{p-fd0a8d68.entry.js → p-c4bcdd4b.entry.js} +3 -3
- package/dist/sankhyablocks/p-d78d4062.js +65 -0
- package/dist/sankhyablocks/p-e7dbe53a.entry.js +1 -0
- package/dist/sankhyablocks/p-eefe9954.entry.js +1 -0
- package/dist/sankhyablocks/p-fca66dda.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +1 -1
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +1 -1
- package/dist/types/components/snk-form/snk-form.d.ts +1 -1
- package/dist/types/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.d.ts +4 -3
- package/dist/types/components/snk-grid/snk-grid.d.ts +0 -1
- package/dist/types/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.d.ts +11 -6
- package/dist/types/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.d.ts +1 -1
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +46 -1
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +1 -0
- package/dist/types/components.d.ts +26 -10
- package/dist/types/lib/utils/CrudUtils.d.ts +3 -0
- package/package.json +1 -1
- package/dist/cjs/PreloadManager-84466da6.js +0 -224
- package/dist/cjs/SnkMultiSelectionListDataSource-ba5838c2.js +0 -49
- package/dist/cjs/snk-grid-config.cjs.entry.js +0 -483
- package/dist/cjs/snk-select-box.cjs.entry.js +0 -25
- package/dist/esm/PreloadManager-c1c2f2b4.js +0 -222
- package/dist/esm/SnkMultiSelectionListDataSource-44494b0e.js +0 -43
- package/dist/esm/snk-grid-config.entry.js +0 -479
- package/dist/esm/snk-select-box.entry.js +0 -21
- package/dist/sankhyablocks/p-094c30cb.js +0 -1
- package/dist/sankhyablocks/p-11ad137d.entry.js +0 -1
- package/dist/sankhyablocks/p-3e91d5ea.entry.js +0 -1
- package/dist/sankhyablocks/p-57212bb5.js +0 -1
- package/dist/sankhyablocks/p-5f5b58b6.entry.js +0 -1
- package/dist/sankhyablocks/p-84bb8f47.entry.js +0 -1
- package/dist/sankhyablocks/p-8c13d8d6.entry.js +0 -1
- package/dist/sankhyablocks/p-91b7f78a.entry.js +0 -1
- package/dist/sankhyablocks/p-98674137.entry.js +0 -1
- package/dist/sankhyablocks/p-b7004423.entry.js +0 -1
- package/dist/sankhyablocks/p-c22c1d8e.js +0 -1
- package/dist/sankhyablocks/p-c4874327.entry.js +0 -1
- package/dist/sankhyablocks/p-c6247955.js +0 -65
- package/dist/sankhyablocks/p-c758265f.entry.js +0 -1
- package/dist/sankhyablocks/p-d4802f81.entry.js +0 -1
- package/dist/sankhyablocks/p-e3bd000e.entry.js +0 -1
- package/dist/sankhyablocks/p-fb842329.entry.js +0 -1
- package/dist/sankhyablocks/p-fdc4cb9b.entry.js +0 -1
- /package/dist/cjs/{SnkFormConfigManager-3621bfc4.js → SnkFormConfigManager-0ffd098d.js} +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/SnkFormConfigManager.js +0 -0
- /package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.js +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.js +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.js +0 -0
- /package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.css +0 -0
- /package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.css +0 -0
- /package/dist/esm/{SnkFormConfigManager-692e20c7.js → SnkFormConfigManager-dd450734.js} +0 -0
- /package/dist/sankhyablocks/{p-725d04ba.js → p-9ea14b61.js} +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/SnkFormConfigManager.d.ts +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.d.ts +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.d.ts +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.d.ts +0 -0
|
@@ -8,14 +8,13 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
|
8
8
|
const ConfigStorage = require('./ConfigStorage-d4c99a5e.js');
|
|
9
9
|
const DataFetcher = require('./DataFetcher-99f0f6ed.js');
|
|
10
10
|
const authFetcher = require('./auth-fetcher-5161d082.js');
|
|
11
|
-
const pesquisaFetcher = require('./pesquisa-fetcher-
|
|
12
|
-
const SnkMessageBuilder = require('./SnkMessageBuilder-
|
|
11
|
+
const pesquisaFetcher = require('./pesquisa-fetcher-94f6b316.js');
|
|
12
|
+
const SnkMessageBuilder = require('./SnkMessageBuilder-141aa18d.js');
|
|
13
13
|
require('./form-config-fetcher-9f1a13ca.js');
|
|
14
14
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
15
15
|
require('./PrintUtils-bcaeb82f.js');
|
|
16
16
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
17
17
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
18
|
-
require('./PreloadManager-84466da6.js');
|
|
19
18
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
20
19
|
require('./ResourceIDUtils-5ff86aa7.js');
|
|
21
20
|
|
|
@@ -5,20 +5,19 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const DataFetcher = require('./DataFetcher-99f0f6ed.js');
|
|
8
|
-
const pesquisaFetcher = require('./pesquisa-fetcher-
|
|
8
|
+
const pesquisaFetcher = require('./pesquisa-fetcher-94f6b316.js');
|
|
9
9
|
require('./index-0922807b.js');
|
|
10
10
|
const ISave = require('./ISave-e91b70a7.js');
|
|
11
11
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
12
12
|
require('./form-config-fetcher-9f1a13ca.js');
|
|
13
13
|
const constants = require('./constants-35ddd366.js');
|
|
14
|
-
const PreloadManager = require('./PreloadManager-84466da6.js');
|
|
15
14
|
const authFetcher = require('./auth-fetcher-5161d082.js');
|
|
16
15
|
const taskbarElements = require('./taskbar-elements-1e4fb2e0.js');
|
|
17
16
|
require('./PrintUtils-bcaeb82f.js');
|
|
18
17
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
19
18
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
20
|
-
require('./ResourceIDUtils-5ff86aa7.js');
|
|
21
19
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
20
|
+
require('./ResourceIDUtils-5ff86aa7.js');
|
|
22
21
|
require('./index-102ba62d.js');
|
|
23
22
|
|
|
24
23
|
const SERVICE$1 = {
|
|
@@ -314,7 +313,7 @@ class AnexoSistemaDataUnitFactory {
|
|
|
314
313
|
const { records } = dataUnit.getSelectionInfo();
|
|
315
314
|
const recordToDelete = records[0];
|
|
316
315
|
fetcher.delete(recordToDelete).then(() => {
|
|
317
|
-
|
|
316
|
+
pesquisaFetcher.PreloadManager.removeRecords(dataUnit, [recordToDelete]);
|
|
318
317
|
return resolve(ids);
|
|
319
318
|
});
|
|
320
319
|
});
|
|
@@ -6,20 +6,19 @@ const index = require('./index-f9e81701.js');
|
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const taskbarElements = require('./taskbar-elements-1e4fb2e0.js');
|
|
8
8
|
require('./DataFetcher-99f0f6ed.js');
|
|
9
|
-
require('./pesquisa-fetcher-
|
|
9
|
+
require('./pesquisa-fetcher-94f6b316.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');
|
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
14
|
-
require('./PreloadManager-84466da6.js');
|
|
15
14
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
16
15
|
require('./form-config-fetcher-9f1a13ca.js');
|
|
17
16
|
const constants = require('./constants-35ddd366.js');
|
|
18
17
|
const authFetcher = require('./auth-fetcher-5161d082.js');
|
|
19
18
|
require('./index-102ba62d.js');
|
|
20
19
|
require('./PrintUtils-bcaeb82f.js');
|
|
21
|
-
require('./ResourceIDUtils-5ff86aa7.js');
|
|
22
20
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
21
|
+
require('./ResourceIDUtils-5ff86aa7.js');
|
|
23
22
|
|
|
24
23
|
const snkCrudCss = ".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%}";
|
|
25
24
|
|
|
@@ -8,10 +8,10 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
|
8
8
|
const index = require('./index-0922807b.js');
|
|
9
9
|
const constants = require('./constants-35ddd366.js');
|
|
10
10
|
const DataFetcher = require('./DataFetcher-99f0f6ed.js');
|
|
11
|
-
const snkDataUnit = require('./snk-data-unit-
|
|
11
|
+
const snkDataUnit = require('./snk-data-unit-6026a9f7.js');
|
|
12
12
|
require('./PrintUtils-bcaeb82f.js');
|
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
14
|
-
require('./SnkMessageBuilder-
|
|
14
|
+
require('./SnkMessageBuilder-141aa18d.js');
|
|
15
15
|
|
|
16
16
|
class ItemBuilder {
|
|
17
17
|
constructor(getMessage, selectedNumber) {
|
|
@@ -328,7 +328,11 @@ const SnkDataExporter = class {
|
|
|
328
328
|
}
|
|
329
329
|
fetchDataExporter(params)
|
|
330
330
|
.then((result) => callbackResolver(result))
|
|
331
|
-
.catch((exception) =>
|
|
331
|
+
.catch((exception) => {
|
|
332
|
+
console.error(exception);
|
|
333
|
+
let { title, message, statusMessage } = exception || {};
|
|
334
|
+
utils.ApplicationUtils.error(title || this.getMessage("snkDataExporter.message.exportError"), statusMessage || message || this.getMessage("snkDataExporter.message.unknownFailure"));
|
|
335
|
+
});
|
|
332
336
|
}
|
|
333
337
|
getOptionKey(option) {
|
|
334
338
|
return Object.keys(index.DataExporterOption)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const index = require('./index-f9e81701.js');
|
|
4
4
|
const core = require('@sankhyalabs/core');
|
|
5
5
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
6
|
-
const SnkMessageBuilder = require('./SnkMessageBuilder-
|
|
6
|
+
const SnkMessageBuilder = require('./SnkMessageBuilder-141aa18d.js');
|
|
7
7
|
|
|
8
8
|
const SnkDataUnit = class {
|
|
9
9
|
constructor(hostRef) {
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const snkDataUnit = require('./snk-data-unit-
|
|
5
|
+
const snkDataUnit = require('./snk-data-unit-6026a9f7.js');
|
|
6
6
|
require('./index-f9e81701.js');
|
|
7
7
|
require('@sankhyalabs/core');
|
|
8
8
|
require('@sankhyalabs/ezui/dist/collection/utils');
|
|
9
|
-
require('./SnkMessageBuilder-
|
|
9
|
+
require('./SnkMessageBuilder-141aa18d.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -4,25 +4,24 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
7
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-0ffd098d.js');
|
|
8
8
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
9
9
|
require('./DataFetcher-99f0f6ed.js');
|
|
10
|
-
require('./pesquisa-fetcher-
|
|
10
|
+
require('./pesquisa-fetcher-94f6b316.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');
|
|
14
14
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
15
|
-
require('./PreloadManager-84466da6.js');
|
|
16
15
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
17
16
|
require('./form-config-fetcher-9f1a13ca.js');
|
|
18
17
|
const taskbarElements = require('./taskbar-elements-1e4fb2e0.js');
|
|
19
18
|
const constants = require('./constants-35ddd366.js');
|
|
20
|
-
const snkGuidesViewer = require('./snk-guides-viewer-
|
|
21
|
-
const SnkMessageBuilder = require('./SnkMessageBuilder-
|
|
19
|
+
const snkGuidesViewer = require('./snk-guides-viewer-c7293cfa.js');
|
|
20
|
+
const SnkMessageBuilder = require('./SnkMessageBuilder-141aa18d.js');
|
|
22
21
|
require('./ConfigStorage-d4c99a5e.js');
|
|
23
22
|
require('./PrintUtils-bcaeb82f.js');
|
|
24
|
-
require('./ResourceIDUtils-5ff86aa7.js');
|
|
25
23
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
24
|
+
require('./ResourceIDUtils-5ff86aa7.js');
|
|
26
25
|
require('./index-102ba62d.js');
|
|
27
26
|
require('./field-search-f56aa7d6.js');
|
|
28
27
|
require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
@@ -956,6 +956,12 @@ const SnkFormConfig = class {
|
|
|
956
956
|
this.controlSortableField();
|
|
957
957
|
this.controlSortableGroup();
|
|
958
958
|
}
|
|
959
|
+
async componentWillRender() {
|
|
960
|
+
if (this.messagesBuilder == undefined) {
|
|
961
|
+
const application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
962
|
+
this.messagesBuilder = application.messagesBuilder;
|
|
963
|
+
}
|
|
964
|
+
}
|
|
959
965
|
componentWillLoad() {
|
|
960
966
|
this.loadConfig();
|
|
961
967
|
}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
7
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-0ffd098d.js');
|
|
8
8
|
const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
|
|
9
9
|
require('./ConfigStorage-d4c99a5e.js');
|
|
10
10
|
require('./form-config-fetcher-9f1a13ca.js');
|
|
@@ -10,15 +10,18 @@ const ConfigStorage = require('./ConfigStorage-d4c99a5e.js');
|
|
|
10
10
|
const index$1 = require('./index-0922807b.js');
|
|
11
11
|
const fieldSearch = require('./field-search-f56aa7d6.js');
|
|
12
12
|
const index$2 = require('./index-102ba62d.js');
|
|
13
|
-
const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-
|
|
13
|
+
const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-5213120b.js');
|
|
14
14
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
15
|
-
require('./form-config-fetcher-9f1a13ca.js');
|
|
16
15
|
require('./DataFetcher-99f0f6ed.js');
|
|
17
|
-
require('./
|
|
16
|
+
require('./pesquisa-fetcher-94f6b316.js');
|
|
17
|
+
require('./ISave-e91b70a7.js');
|
|
18
|
+
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
18
19
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
20
|
+
require('./form-config-fetcher-9f1a13ca.js');
|
|
19
21
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
|
|
20
|
-
require('./
|
|
22
|
+
require('./PrintUtils-bcaeb82f.js');
|
|
21
23
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
24
|
+
require('./ResourceIDUtils-5ff86aa7.js');
|
|
22
25
|
|
|
23
26
|
const snkGridCss = ".sc-snk-grid-h{--snk-grid-min-height:300px}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%}.snk-grid__header.sc-snk-grid{width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-end}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium)}.snk-grid__table.sc-snk-grid{min-height:var(--snk-grid-min-height)}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}";
|
|
24
27
|
|
|
@@ -127,19 +130,7 @@ const SnkGrid = class {
|
|
|
127
130
|
}
|
|
128
131
|
setGridConfig(config) {
|
|
129
132
|
this._gridConfig = config;
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
assertDefaultSorting() {
|
|
133
|
-
if (this._gridConfig && this._dataUnit) {
|
|
134
|
-
this._dataUnit.defaultSorting = this._gridConfig
|
|
135
|
-
.columns
|
|
136
|
-
.filter(col => col.ascending != undefined)
|
|
137
|
-
.sort((colA, colB) => colA.orderIndex - colB.orderIndex)
|
|
138
|
-
.map(({ name: field, ascending }) => {
|
|
139
|
-
const { dataType } = this._dataUnit.getField(field);
|
|
140
|
-
return { field, dataType, mode: ascending ? UnitMetadata.SortMode.ASC : UnitMetadata.SortMode.DESC };
|
|
141
|
-
});
|
|
142
|
-
}
|
|
133
|
+
SnkMultiSelectionListDataSource.CrudUtils.assertDefaultSorting(this._gridConfig, this._dataUnit);
|
|
143
134
|
}
|
|
144
135
|
loadConfig() {
|
|
145
136
|
ConfigStorage.ConfigStorage.loadGridConfig(this.configName, this.resourceID)
|
|
@@ -265,7 +256,7 @@ const SnkGrid = class {
|
|
|
265
256
|
core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
266
257
|
}
|
|
267
258
|
finshLoading() {
|
|
268
|
-
|
|
259
|
+
SnkMultiSelectionListDataSource.CrudUtils.assertDefaultSorting(this._gridConfig, this._dataUnit);
|
|
269
260
|
this.addElementID();
|
|
270
261
|
if (this.columnFilterDataSource != undefined) {
|
|
271
262
|
this.columnFilterDataSource.setApplication(this._application);
|
|
@@ -417,7 +408,7 @@ const SnkGrid = class {
|
|
|
417
408
|
return undefined;
|
|
418
409
|
}
|
|
419
410
|
return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, index.h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, this._showSnkFilterBar &&
|
|
420
|
-
index.h(index.Fragment, null, index.h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter }), index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), index.h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none' }, index.h("slot", { name: this.topTaskbarCustomSlotId }))), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit }, index.h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, index.h("slot", { name: this.gridHeaderCustomSlotId }))), index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME),
|
|
411
|
+
index.h(index.Fragment, null, index.h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter }), index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), index.h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none' }, index.h("slot", { name: this.topTaskbarCustomSlotId }))), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit }, index.h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, index.h("slot", { name: this.gridHeaderCustomSlotId }))), index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
|
|
421
412
|
}
|
|
422
413
|
get _element() { return index.getElement(this); }
|
|
423
414
|
};
|
|
@@ -2,18 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
const index = require('./index-f9e81701.js');
|
|
4
4
|
const core = require('@sankhyalabs/core');
|
|
5
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
5
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-0ffd098d.js');
|
|
6
6
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
7
7
|
const fieldSearch = require('./field-search-f56aa7d6.js');
|
|
8
8
|
const taskbarElements = require('./taskbar-elements-1e4fb2e0.js');
|
|
9
9
|
const constants = require('./constants-35ddd366.js');
|
|
10
10
|
require('./DataFetcher-99f0f6ed.js');
|
|
11
|
-
require('./pesquisa-fetcher-
|
|
11
|
+
require('./pesquisa-fetcher-94f6b316.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');
|
|
15
15
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
16
|
-
require('./PreloadManager-84466da6.js');
|
|
17
16
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
18
17
|
require('./form-config-fetcher-9f1a13ca.js');
|
|
19
18
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
@@ -2,10 +2,10 @@
|
|
|
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-c7293cfa.js');
|
|
6
6
|
require('./index-f9e81701.js');
|
|
7
7
|
require('@sankhyalabs/core');
|
|
8
|
-
require('./SnkFormConfigManager-
|
|
8
|
+
require('./SnkFormConfigManager-0ffd098d.js');
|
|
9
9
|
require('./ConfigStorage-d4c99a5e.js');
|
|
10
10
|
require('./form-config-fetcher-9f1a13ca.js');
|
|
11
11
|
require('./DataFetcher-99f0f6ed.js');
|
|
@@ -18,9 +18,8 @@ require('./taskbar-elements-1e4fb2e0.js');
|
|
|
18
18
|
require('./index-0922807b.js');
|
|
19
19
|
require('./index-102ba62d.js');
|
|
20
20
|
require('./constants-35ddd366.js');
|
|
21
|
-
require('./pesquisa-fetcher-
|
|
21
|
+
require('./pesquisa-fetcher-94f6b316.js');
|
|
22
22
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
23
|
-
require('./PreloadManager-84466da6.js');
|
|
24
23
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
25
24
|
require('./ResourceIDUtils-5ff86aa7.js');
|
|
26
25
|
require('./ISave-e91b70a7.js');
|
|
@@ -67,8 +67,10 @@ const SnkFilterPersonalized = class {
|
|
|
67
67
|
return this.presentationMode === presentationMode.EPresentationMode.MODAL;
|
|
68
68
|
}
|
|
69
69
|
doSearch(mode, argument, param) {
|
|
70
|
+
const context = Object.assign({}, param.searchContext);
|
|
71
|
+
context.searchOptions = Object.assign(Object.assign({}, context.searchOptions), { showInactives: "true" });
|
|
70
72
|
return new Promise((resolve, reject) => {
|
|
71
|
-
this._application.executePreparedSearch(mode, argument,
|
|
73
|
+
this._application.executePreparedSearch(mode, argument, context)
|
|
72
74
|
.then(result => {
|
|
73
75
|
resolve(result);
|
|
74
76
|
}).catch(reason => {
|
|
@@ -7,23 +7,24 @@ const core = require('@sankhyalabs/core');
|
|
|
7
7
|
const constants = require('./constants-35ddd366.js');
|
|
8
8
|
const taskbarElements = require('./taskbar-elements-1e4fb2e0.js');
|
|
9
9
|
require('./DataFetcher-99f0f6ed.js');
|
|
10
|
-
const pesquisaFetcher = require('./pesquisa-fetcher-
|
|
10
|
+
const pesquisaFetcher = require('./pesquisa-fetcher-94f6b316.js');
|
|
11
|
+
const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-5213120b.js');
|
|
11
12
|
const index$1 = require('./index-0922807b.js');
|
|
12
13
|
require('./ISave-e91b70a7.js');
|
|
13
14
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
14
15
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
15
|
-
require('./PreloadManager-84466da6.js');
|
|
16
16
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
17
17
|
require('./form-config-fetcher-9f1a13ca.js');
|
|
18
18
|
const fieldSearch = require('./field-search-f56aa7d6.js');
|
|
19
|
-
const
|
|
19
|
+
const ConfigStorage = require('./ConfigStorage-d4c99a5e.js');
|
|
20
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-0ffd098d.js');
|
|
20
21
|
require('./index-102ba62d.js');
|
|
21
22
|
require('./PrintUtils-bcaeb82f.js');
|
|
22
|
-
require('./ResourceIDUtils-5ff86aa7.js');
|
|
23
23
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
24
|
+
require('./ResourceIDUtils-5ff86aa7.js');
|
|
24
25
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
|
|
25
26
|
|
|
26
|
-
const snkSimpleCrudCss = ".sc-snk-simple-crud-h{display:flex;height:100%;width:100%}.simple-crud__container.sc-snk-simple-crud{display:grid;grid-template-rows:max-content;row-gap:12px;height:100%;width:100%}.simple-crud__container-section.sc-snk-simple-crud{flex-wrap:unset;flex-direction:column}ez-grid.sc-snk-simple-crud{--ez-grid__container--shadow:none;min-height:300px}ez-form.sc-snk-simple-crud{min-height:300px}";
|
|
27
|
+
const snkSimpleCrudCss = ".sc-snk-simple-crud-h{display:flex;height:100%;width:100%}.simple-crud__container.sc-snk-simple-crud{display:grid;grid-template-rows:max-content;row-gap:12px;height:100%;width:100%}.simple-crud__container-section.sc-snk-simple-crud{flex-wrap:unset;flex-direction:column}.simple-crud__form--hidden.sc-snk-simple-crud{display:none}ez-grid.sc-snk-simple-crud{--ez-grid__container--shadow:none;min-height:300px}ez-form.sc-snk-simple-crud{min-height:300px}";
|
|
27
28
|
|
|
28
29
|
const SnkSimpleCrud = class {
|
|
29
30
|
constructor(hostRef) {
|
|
@@ -32,20 +33,25 @@ const SnkSimpleCrud = class {
|
|
|
32
33
|
this.dataUnitReady = index.createEvent(this, "dataUnitReady", 3);
|
|
33
34
|
this.actionClick = index.createEvent(this, "actionClick", 7);
|
|
34
35
|
this.formItemsReady = index.createEvent(this, "formItemsReady", 7);
|
|
36
|
+
this.configuratorSave = index.createEvent(this, "configuratorSave", 7);
|
|
37
|
+
this.configuratorCancel = index.createEvent(this, "configuratorCancel", 7);
|
|
35
38
|
this.REGULAR_DEFAULT_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "MORE_OPTIONS"];
|
|
36
39
|
this.REGULAR_SELECTED_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "DIVIDER", "MORE_OPTIONS"];
|
|
37
40
|
this._multiSelectionListDataSource = new SnkMultiSelectionListDataSource.SnkMultiSelectionListDataSource();
|
|
38
41
|
this._keyDownHandler = (event) => this.keyDownListener(event);
|
|
39
42
|
this._taskbarProcessor = new fieldSearch.TaskbarProcessor({
|
|
40
|
-
"snkSimpleCrudTaskbar.form_regular": this.
|
|
41
|
-
"snkSimpleCrudTaskbar.grid_regular": this.
|
|
42
|
-
"snkSimpleCrudTaskbar.form_selected": this.
|
|
43
|
-
"snkSimpleCrudTaskbar.grid_selected": this.
|
|
43
|
+
"snkSimpleCrudTaskbar.form_regular": this.getButtons(false, taskbarElements.TaskbarElement.GRID_MODE),
|
|
44
|
+
"snkSimpleCrudTaskbar.grid_regular": this.getButtons(false, taskbarElements.TaskbarElement.FORM_MODE),
|
|
45
|
+
"snkSimpleCrudTaskbar.form_selected": this.getButtons(true, taskbarElements.TaskbarElement.GRID_MODE),
|
|
46
|
+
"snkSimpleCrudTaskbar.grid_selected": this.getButtons(true, taskbarElements.TaskbarElement.FORM_MODE),
|
|
44
47
|
"snkSimpleCrudTaskbar.finish_edition": ["CANCEL", "SAVE"]
|
|
45
48
|
});
|
|
49
|
+
this._showPopUpGridConfig = false;
|
|
50
|
+
this._showFormConfig = false;
|
|
46
51
|
this._currentViewMode = constants.VIEW_MODE.GRID;
|
|
47
52
|
this._config = undefined;
|
|
48
53
|
this._fieldToGetFocus = undefined;
|
|
54
|
+
this._customContainerId = `SNK-SIMPLE-CRUD-CUSTOM-CONTAINER-${core.StringUtils.generateUUID()}`;
|
|
49
55
|
this.dataState = undefined;
|
|
50
56
|
this.dataUnit = undefined;
|
|
51
57
|
this.mode = constants.SIMPLE_CRUD_MODE.SERVER;
|
|
@@ -59,6 +65,20 @@ const SnkSimpleCrud = class {
|
|
|
59
65
|
this.useEnterLikeTab = false;
|
|
60
66
|
this.actionsList = undefined;
|
|
61
67
|
this.configName = undefined;
|
|
68
|
+
this.showConfiguratorButtons = undefined;
|
|
69
|
+
}
|
|
70
|
+
getButtons(selected, changeModeBtn) {
|
|
71
|
+
return this.addConfigButton(this.resolveInMemoryBtns(selected ? this.REGULAR_DEFAULT_BTNS : this.REGULAR_SELECTED_BTNS)
|
|
72
|
+
.concat(changeModeBtn));
|
|
73
|
+
}
|
|
74
|
+
addConfigButton(buttons) {
|
|
75
|
+
if (this.configName === undefined) {
|
|
76
|
+
return buttons;
|
|
77
|
+
}
|
|
78
|
+
return buttons.concat(taskbarElements.TaskbarElement.CONFIGURATOR);
|
|
79
|
+
}
|
|
80
|
+
get application() {
|
|
81
|
+
return core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
62
82
|
}
|
|
63
83
|
resolveInMemoryBtns(taskbarButtons) {
|
|
64
84
|
const newTaskBarConfig = [...taskbarButtons];
|
|
@@ -78,7 +98,10 @@ const SnkSimpleCrud = class {
|
|
|
78
98
|
}
|
|
79
99
|
actionClickListener(evt) {
|
|
80
100
|
const act = evt.detail;
|
|
81
|
-
if (act === taskbarElements.TaskbarElement.
|
|
101
|
+
if (act === taskbarElements.TaskbarElement.CONFIGURATOR) {
|
|
102
|
+
this._snkConfigurator.open();
|
|
103
|
+
}
|
|
104
|
+
else if (act === taskbarElements.TaskbarElement.GRID_MODE) {
|
|
82
105
|
this.goToView(constants.VIEW_MODE.GRID);
|
|
83
106
|
}
|
|
84
107
|
else if (act === taskbarElements.TaskbarElement.FORM_MODE) {
|
|
@@ -96,8 +119,64 @@ const SnkSimpleCrud = class {
|
|
|
96
119
|
this.dataStateChange.emit(newValue);
|
|
97
120
|
}
|
|
98
121
|
}
|
|
99
|
-
|
|
122
|
+
openConfig(viewMode) {
|
|
123
|
+
this._snkConfigurator.close();
|
|
124
|
+
if (viewMode === constants.VIEW_MODE.GRID) {
|
|
125
|
+
this.openGridConfig();
|
|
126
|
+
}
|
|
127
|
+
else if (viewMode === constants.VIEW_MODE.FORM) {
|
|
128
|
+
this.openFormConfig();
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
openGridConfig() {
|
|
132
|
+
this._grid.getColumnsState()
|
|
133
|
+
.then((gridColumns) => {
|
|
134
|
+
this._snkGridConfig.columns = gridColumns.filter(c => c.name);
|
|
135
|
+
this._snkGridConfig.selectedIndex = 0;
|
|
136
|
+
this._showPopUpGridConfig = true;
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
openFormConfig() {
|
|
140
|
+
this._showFormConfig = true;
|
|
141
|
+
}
|
|
142
|
+
loadGridConfig() {
|
|
143
|
+
if (this.gridConfig != undefined || this._gridConfigAlreadyLoaded) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
this._gridConfigAlreadyLoaded = true;
|
|
147
|
+
return new Promise((accept, reject) => {
|
|
148
|
+
ConfigStorage.ConfigStorage.loadGridConfig(this.configName, this._resourceID)
|
|
149
|
+
.then(config => {
|
|
150
|
+
this.setGridConfig(config);
|
|
151
|
+
accept();
|
|
152
|
+
})
|
|
153
|
+
.catch(reason => {
|
|
154
|
+
reject(reason);
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
async loadFormConfig() {
|
|
159
|
+
if (this._formConfigManager == undefined) {
|
|
160
|
+
this._formConfigManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this._resourceID);
|
|
161
|
+
this._formConfigManager.setConfig(this.formConfig);
|
|
162
|
+
}
|
|
163
|
+
if (this.formConfig != undefined || this._formConfigAlreadyLoaded) {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
this._formConfigAlreadyLoaded = true;
|
|
167
|
+
this.setFormConfig(await this._formConfigManager.loadConfig());
|
|
168
|
+
}
|
|
169
|
+
async componentWillRender() {
|
|
170
|
+
this._resourceID = await this.application.getResourceID();
|
|
100
171
|
this._taskbarProcessor.process(this.getTaskBarId(), this.taskbarManager, this.dataState, this.getTaskBarDisabledButtons());
|
|
172
|
+
if (this.configName === undefined) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
if (this.gridConfig != undefined || this._gridConfigAlreadyLoaded) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
this.loadGridConfig();
|
|
179
|
+
this.loadFormConfig();
|
|
101
180
|
}
|
|
102
181
|
componentWillLoad() {
|
|
103
182
|
this.processMetadata();
|
|
@@ -105,8 +184,7 @@ const SnkSimpleCrud = class {
|
|
|
105
184
|
this.configDatasource();
|
|
106
185
|
}
|
|
107
186
|
configDatasource() {
|
|
108
|
-
|
|
109
|
-
this._multiSelectionListDataSource.setApplication(application);
|
|
187
|
+
this._multiSelectionListDataSource.setApplication(this.application);
|
|
110
188
|
this._multiSelectionListDataSource.setDataUnit(this.dataUnit);
|
|
111
189
|
}
|
|
112
190
|
getTaskBarId() {
|
|
@@ -147,6 +225,20 @@ const SnkSimpleCrud = class {
|
|
|
147
225
|
getRecords() {
|
|
148
226
|
return Promise.resolve(this.dataUnit.records);
|
|
149
227
|
}
|
|
228
|
+
/**
|
|
229
|
+
* Usado para abrir o configurator do CRUD
|
|
230
|
+
*/
|
|
231
|
+
async openConfigurator() {
|
|
232
|
+
var _a;
|
|
233
|
+
(_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.open();
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Usado para fechar o configurator do CRUD
|
|
237
|
+
*/
|
|
238
|
+
async closeConfigurator() {
|
|
239
|
+
var _a;
|
|
240
|
+
(_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.close();
|
|
241
|
+
}
|
|
150
242
|
processMetadata() {
|
|
151
243
|
const fieldsMetadataElem = this._element.querySelectorAll("snk-field-metadata");
|
|
152
244
|
const fieldMetadata = [];
|
|
@@ -201,6 +293,14 @@ const SnkSimpleCrud = class {
|
|
|
201
293
|
this.dataUnit.clearSelection();
|
|
202
294
|
}
|
|
203
295
|
}
|
|
296
|
+
handleConfiguratorEvent(evt, type) {
|
|
297
|
+
evt.stopImmediatePropagation();
|
|
298
|
+
if (type === 'SAVE') {
|
|
299
|
+
this.configuratorSave.emit();
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
this.configuratorCancel.emit();
|
|
303
|
+
}
|
|
204
304
|
getColumnSearch(actionButton, item) {
|
|
205
305
|
if (this._columnSearch != undefined) {
|
|
206
306
|
return this._columnSearch;
|
|
@@ -314,11 +414,42 @@ const SnkSimpleCrud = class {
|
|
|
314
414
|
disconnectedCallback() {
|
|
315
415
|
window.removeEventListener("keydown", this._keyDownHandler);
|
|
316
416
|
}
|
|
417
|
+
gridConfigChangeHandler(evt) {
|
|
418
|
+
const config = evt.detail;
|
|
419
|
+
ConfigStorage.ConfigStorage.saveGridConfig(config, this.configName, this._resourceID);
|
|
420
|
+
evt.stopPropagation();
|
|
421
|
+
}
|
|
422
|
+
modalConfigChangeHandler(evt) {
|
|
423
|
+
const config = evt.detail;
|
|
424
|
+
this._grid.setColumnsState(config.columns)
|
|
425
|
+
.then(() => {
|
|
426
|
+
this.setGridConfig(config);
|
|
427
|
+
this.closeGridConfig();
|
|
428
|
+
});
|
|
429
|
+
evt.stopPropagation();
|
|
430
|
+
}
|
|
431
|
+
setGridConfig(config) {
|
|
432
|
+
this.gridConfig = config;
|
|
433
|
+
SnkMultiSelectionListDataSource.CrudUtils.assertDefaultSorting(this.gridConfig, this.dataUnit);
|
|
434
|
+
}
|
|
435
|
+
setFormConfig(config) {
|
|
436
|
+
this.formConfig = config;
|
|
437
|
+
}
|
|
438
|
+
closeGridConfig() {
|
|
439
|
+
this._showPopUpGridConfig = false;
|
|
440
|
+
}
|
|
441
|
+
closeFormConfig() {
|
|
442
|
+
this._showFormConfig = false;
|
|
443
|
+
}
|
|
444
|
+
/* istanbul ignore next */
|
|
317
445
|
render() {
|
|
318
|
-
var _a;
|
|
319
|
-
|
|
446
|
+
var _a, _b, _c;
|
|
447
|
+
if (this.dataUnit == undefined) {
|
|
448
|
+
return;
|
|
449
|
+
}
|
|
450
|
+
return (index.h("snk-data-unit", { class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), onInsertionMode: () => this.goToView(constants.VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === constants.VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail }, index.h("header", null, index.h("slot", { name: "snkSimpleCrudHeader" })), index.h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, index.h("snk-taskbar", { class: "ez-box ez-box--shadow ez-padding--medium", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, slot: "leftButtons", presentationMode: index$1.PresentationMode.SECONDARY }, index.h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })), index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, index.h("stack-item", null, index.h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(constants.VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(pesquisaFetcher.InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
|
|
320
451
|
? undefined
|
|
321
|
-
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab }, index.h("div", { slot: "footer" }, index.h("slot", { name: "snkSimpleCrudFooter" })))), index.h("stack-item", null, index.h("ez-form", { class:
|
|
452
|
+
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab }, index.h("div", { slot: "footer" }, index.h("slot", { name: "snkSimpleCrudFooter" })))), index.h("stack-item", null, index.h("ez-form", { class: `ez-margin-top--large ${this._showFormConfig ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: (_b = this._formConfigManager) === null || _b === void 0 ? void 0 : _b.getConfig((_c = this.dataState) === null || _c === void 0 ? void 0 : _c.insertionMode, this.dataUnit), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this._showFormConfig && index.h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this._customContainerId })), index.h("div", { id: `${this._customContainerId}` }, index.h("slot", { name: "SnkConfigContainerSlot" }))), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this._resourceID }))));
|
|
322
453
|
}
|
|
323
454
|
get _element() { return index.getElement(this); }
|
|
324
455
|
static get watchers() { return {
|
|
@@ -60,6 +60,9 @@ const SnkTaskbar = class {
|
|
|
60
60
|
this._definitions = undefined;
|
|
61
61
|
requestAnimationFrame(() => { var _a; return (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.forceUpdate(); });
|
|
62
62
|
}
|
|
63
|
+
observeDisabledButtons() {
|
|
64
|
+
requestAnimationFrame(() => { var _a; return (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.forceUpdate(); });
|
|
65
|
+
}
|
|
63
66
|
// Internal methods
|
|
64
67
|
elementsFromString(strButtons) {
|
|
65
68
|
const elements = [];
|
|
@@ -363,7 +366,8 @@ const SnkTaskbar = class {
|
|
|
363
366
|
}
|
|
364
367
|
get _element() { return index.getElement(this); }
|
|
365
368
|
static get watchers() { return {
|
|
366
|
-
"buttons": ["observeButtons"]
|
|
369
|
+
"buttons": ["observeButtons"],
|
|
370
|
+
"disabledButtons": ["observeDisabledButtons"]
|
|
367
371
|
}; }
|
|
368
372
|
};
|
|
369
373
|
SnkTaskbar.style = snkTaskbarCss;
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
"./components/snk-taskbar/snk-taskbar.js",
|
|
7
7
|
"./components/snk-filter-bar/filter-list/snk-filter-list.js",
|
|
8
8
|
"./components/snk-print-selector/snk-print-selector.js",
|
|
9
|
-
"./components/snk-form/subcomponents/snk-tab-config/snk-tab-config.js",
|
|
10
9
|
"./components/snk-actions-button/snk-actions-button.js",
|
|
11
10
|
"./components/snk-actions-button/subcomponents/snk-actions-form.js",
|
|
12
11
|
"./components/snk-actions-button/subcomponents/snk-client-confirm.js",
|
|
@@ -35,12 +34,13 @@
|
|
|
35
34
|
"./components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js",
|
|
36
35
|
"./components/snk-filter-field-search/snk-filter-field-search.js",
|
|
37
36
|
"./components/snk-form/snk-form.js",
|
|
38
|
-
"./components/snk-form/subcomponents/snk-config
|
|
39
|
-
"./components/snk-form
|
|
40
|
-
"./components/snk-form/subcomponents/snk-
|
|
37
|
+
"./components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.js",
|
|
38
|
+
"./components/snk-form-config/snk-form-config.js",
|
|
39
|
+
"./components/snk-form-config/subcomponents/snk-config-options/snk-config-options.js",
|
|
40
|
+
"./components/snk-form-config/subcomponents/snk-field-config/snk-field-config.js",
|
|
41
41
|
"./components/snk-grid/snk-grid.js",
|
|
42
|
-
"./components/snk-grid
|
|
43
|
-
"./components/snk-grid/
|
|
42
|
+
"./components/snk-grid-config/snk-grid-config.js",
|
|
43
|
+
"./components/snk-grid-config/snk-select-box/snk-select-box.js",
|
|
44
44
|
"./components/snk-personalized-filter/snk-personalized-filter.js",
|
|
45
45
|
"./components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js",
|
|
46
46
|
"./components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js",
|