@sankhyalabs/sankhyablocks 10.1.0-dev.23 → 10.1.0-dev.25
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/{ConfigStorage-a4e1e518.js → ConfigStorage-d9d24844.js} +2 -2
- package/dist/cjs/{DataFetcher-0b6aa084.js → DataFetcher-3a8ea521.js} +2 -2743
- package/dist/cjs/{ISave-2c455a77.js → ISave-a66bb65e.js} +1 -1
- package/dist/cjs/ImageUtils-5e3f406b.js +142 -0
- package/dist/cjs/{SnkFormConfigManager-b8c81493.js → SnkFormConfigManager-c88cf1e9.js} +2 -2
- package/dist/cjs/SnkMessageBuilder-d9558dba.js +2809 -0
- package/dist/cjs/{SnkMultiSelectionListDataSource-03b58f5a.js → SnkMultiSelectionListDataSource-a891430e.js} +4 -4
- package/dist/cjs/{auth-fetcher-7e7796c9.js → auth-fetcher-faa61f64.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-8dffbcdf.js → dataunit-fetcher-4320f7ec.js} +3 -2
- package/dist/cjs/{form-config-fetcher-5516d68a.js → form-config-fetcher-72cf0e3d.js} +1 -1
- package/dist/cjs/index-1894343a.js +10 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +5 -4
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/{snk-actions-button_9.cjs.entry.js → snk-actions-button_8.cjs.entry.js} +7 -56
- package/dist/cjs/snk-application.cjs.entry.js +8 -7
- package/dist/cjs/snk-attach.cjs.entry.js +7 -6
- package/dist/cjs/snk-crud.cjs.entry.js +7 -6
- package/dist/cjs/snk-data-exporter.cjs.entry.js +6 -5
- package/dist/cjs/{snk-data-unit-036ce58c.js → snk-data-unit-b54fdf9a.js} +11 -11
- package/dist/cjs/snk-data-unit.cjs.entry.js +4 -3
- package/dist/cjs/snk-detail-view.cjs.entry.js +15 -11
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +4 -3
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +4 -3
- package/dist/cjs/snk-form-view.cjs.entry.js +72 -7
- package/dist/cjs/snk-form_2.cjs.entry.js +5 -4
- package/dist/cjs/snk-grid.cjs.entry.js +10 -7
- package/dist/cjs/{snk-guides-viewer-164c063e.js → snk-guides-viewer-4bbd697f.js} +10 -9
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +8 -7
- package/dist/cjs/snk-image-input.cjs.entry.js +148 -0
- package/dist/cjs/snk-layout-form-config.cjs.entry.js +72 -0
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +4 -3
- package/dist/cjs/snk-pesquisa.cjs.entry.js +5 -4
- package/dist/cjs/snk-simple-crud.cjs.entry.js +8 -7
- package/dist/collection/collection-manifest.json +6 -0
- package/dist/collection/components/snk-application/snk-application.js +1 -1
- package/dist/collection/components/snk-crud/snk-crud.js +2 -2
- package/dist/collection/components/snk-crud/subcomponents/GuideBuilder.js +1 -1
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +4 -1
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +93 -8
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +5 -4
- package/dist/collection/components/snk-grid/snk-grid.js +3 -1
- package/dist/collection/components/snk-image-input/snk-image-input.css +3 -0
- package/dist/collection/components/snk-image-input/snk-image-input.js +326 -0
- package/dist/collection/components/snk-image-input/utils/ImageUtils.js +133 -0
- package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.js +1 -1
- package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.js +1 -1
- package/dist/collection/lib/message/messageResourceEnUSUtils.js +2 -0
- package/dist/collection/lib/message/messageResourceEsESUtils.js +2 -0
- package/dist/collection/lib/message/messageResourcePtBRUtils.js +2 -0
- package/dist/collection/lib/message/resources/en-us/snk-crud.msg.js +1 -1
- package/dist/collection/lib/message/resources/en-us/snk-image-input.msg.js +11 -0
- package/dist/collection/lib/message/resources/en-us/snk-layout-form-config.msg.js +10 -2
- package/dist/collection/lib/message/resources/es-es/snk-crud.msg.js +1 -1
- package/dist/collection/lib/message/resources/es-es/snk-image-input.msg.js +11 -0
- package/dist/collection/lib/message/resources/es-es/snk-layout-form-config.msg.js +8 -0
- package/dist/collection/lib/message/resources/pt-br/snk-configurator.msg.js +1 -1
- package/dist/collection/lib/message/resources/pt-br/snk-crud.msg.js +1 -1
- package/dist/collection/lib/message/resources/pt-br/snk-image-input.msg.js +11 -0
- package/dist/collection/lib/message/resources/pt-br/snk-layout-form-config.msg.js +10 -2
- package/dist/components/DataFetcher.js +3 -2743
- package/dist/components/SnkMessageBuilder.js +2807 -0
- package/dist/components/dataunit-fetcher.js +2 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/snk-application2.js +2 -1
- package/dist/components/snk-attach2.js +2 -1
- package/dist/components/snk-crud.js +70 -64
- package/dist/components/snk-data-unit2.js +1 -1
- package/dist/components/snk-detail-view2.js +105 -89
- package/dist/components/snk-form-view2.js +82 -10
- package/dist/components/snk-grid2.js +3 -1
- package/dist/components/snk-image-input.d.ts +11 -0
- package/dist/components/snk-image-input.js +6 -0
- package/dist/components/snk-image-input2.js +302 -0
- package/dist/components/snk-layout-form-config2.js +1 -1
- package/dist/components/snk-view-representation2.js +1 -1
- package/dist/esm/{ConfigStorage-39ac8fef.js → ConfigStorage-d15d2014.js} +2 -2
- package/dist/esm/{DataFetcher-0b9da57d.js → DataFetcher-1dd7e8c0.js} +3 -2743
- package/dist/esm/{ISave-f1c9269b.js → ISave-498c4831.js} +1 -1
- package/dist/esm/ImageUtils-8fc8d905.js +136 -0
- package/dist/esm/{SnkFormConfigManager-a87566c8.js → SnkFormConfigManager-86befa68.js} +2 -2
- package/dist/esm/SnkMessageBuilder-c0bc4424.js +2807 -0
- package/dist/esm/{SnkMultiSelectionListDataSource-01b3744b.js → SnkMultiSelectionListDataSource-14633bf6.js} +4 -4
- package/dist/esm/{auth-fetcher-acdc1cb4.js → auth-fetcher-69cbda8d.js} +1 -1
- package/dist/esm/{dataunit-fetcher-4c312b43.js → dataunit-fetcher-3d5c4ae4.js} +2 -1
- package/dist/esm/{form-config-fetcher-7cda6254.js → form-config-fetcher-fcc7b62f.js} +1 -1
- package/dist/esm/index-04f73a26.js +10 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pesquisa-grid_2.entry.js +5 -4
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/{snk-actions-button_9.entry.js → snk-actions-button_8.entry.js} +8 -56
- package/dist/esm/snk-application.entry.js +7 -6
- package/dist/esm/snk-attach.entry.js +6 -5
- package/dist/esm/snk-crud.entry.js +7 -6
- package/dist/esm/snk-data-exporter.entry.js +6 -5
- package/dist/esm/{snk-data-unit-130021b3.js → snk-data-unit-363c3551.js} +2 -2
- package/dist/esm/snk-data-unit.entry.js +4 -3
- package/dist/esm/snk-detail-view.entry.js +13 -9
- package/dist/esm/snk-filter-bar_4.entry.js +4 -3
- package/dist/esm/snk-filter-modal-item.entry.js +4 -3
- package/dist/esm/snk-form-view.entry.js +73 -8
- package/dist/esm/snk-form_2.entry.js +5 -4
- package/dist/esm/snk-grid.entry.js +10 -7
- package/dist/esm/{snk-guides-viewer-3fd18298.js → snk-guides-viewer-97708c80.js} +10 -9
- package/dist/esm/snk-guides-viewer.entry.js +8 -7
- package/dist/esm/snk-image-input.entry.js +144 -0
- package/dist/esm/snk-layout-form-config.entry.js +68 -0
- package/dist/esm/snk-personalized-filter.entry.js +4 -3
- package/dist/esm/snk-pesquisa.entry.js +5 -4
- package/dist/esm/snk-simple-crud.entry.js +8 -7
- package/dist/sankhyablocks/p-10cad767.entry.js +1 -0
- package/dist/sankhyablocks/p-18cc9111.entry.js +1 -0
- package/dist/sankhyablocks/{p-5e2dffc1.entry.js → p-1df34264.entry.js} +2 -2
- package/dist/sankhyablocks/p-27d6590e.js +1 -0
- package/dist/sankhyablocks/p-2a356340.entry.js +1 -0
- package/dist/sankhyablocks/{p-998a9d6f.js → p-2ccbbeec.js} +1 -1
- package/dist/sankhyablocks/p-30641d55.entry.js +1 -0
- package/dist/sankhyablocks/{p-48a5c311.js → p-32ad76cc.js} +2 -2
- package/dist/sankhyablocks/p-3b07c117.entry.js +1 -0
- package/dist/sankhyablocks/p-43d84207.entry.js +1 -0
- package/dist/sankhyablocks/p-48c580b9.entry.js +1 -0
- package/dist/sankhyablocks/p-4ff3b494.js +1 -0
- package/dist/sankhyablocks/p-685bc841.js +60 -0
- package/dist/sankhyablocks/{p-d714b6ca.js → p-7c4f4851.js} +1 -1
- package/dist/sankhyablocks/{p-2ac55a5d.js → p-7e9f8fa4.js} +1 -1
- package/dist/sankhyablocks/{p-1f310bc6.js → p-9114e869.js} +1 -1
- package/dist/sankhyablocks/p-a65559fe.entry.js +1 -0
- package/dist/sankhyablocks/{p-7ee6b1bf.js → p-a9839628.js} +1 -1
- package/dist/sankhyablocks/p-b2b56f04.js +1 -0
- package/dist/sankhyablocks/p-bb81a356.entry.js +1 -0
- package/dist/sankhyablocks/p-bdf0077f.js +1 -0
- package/dist/sankhyablocks/p-bf65dcc1.entry.js +1 -0
- package/dist/sankhyablocks/p-c6a97fda.entry.js +1 -0
- package/dist/sankhyablocks/p-c860552e.entry.js +1 -0
- package/dist/sankhyablocks/p-c9316c5d.entry.js +1 -0
- package/dist/sankhyablocks/p-e0a6818c.js +1 -0
- package/dist/sankhyablocks/p-e0e3914e.entry.js +1 -0
- package/dist/sankhyablocks/p-e973a5d4.entry.js +1 -0
- package/dist/sankhyablocks/p-ebce5394.entry.js +1 -0
- package/dist/sankhyablocks/p-fc5e95f4.entry.js +1 -0
- package/dist/sankhyablocks/p-fce86770.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +1 -1
- package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +12 -0
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +1 -0
- package/dist/types/components/snk-image-input/snk-image-input.d.ts +56 -0
- package/dist/types/components/snk-image-input/utils/ImageUtils.d.ts +15 -0
- package/dist/types/components.d.ts +89 -0
- package/dist/types/lib/message/resources/en-us/snk-image-input.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/snk-image-input.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-image-input.msg.d.ts +1 -0
- package/package.json +1 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/sankhyablocks/p-12f595a6.entry.js +0 -1
- package/dist/sankhyablocks/p-18d66638.entry.js +0 -1
- package/dist/sankhyablocks/p-2a33d4cf.entry.js +0 -1
- package/dist/sankhyablocks/p-2c6be187.entry.js +0 -1
- package/dist/sankhyablocks/p-3a443150.entry.js +0 -1
- package/dist/sankhyablocks/p-3b6d8d33.entry.js +0 -1
- package/dist/sankhyablocks/p-3db72758.entry.js +0 -1
- package/dist/sankhyablocks/p-52691b42.js +0 -1
- package/dist/sankhyablocks/p-6768f176.js +0 -1
- package/dist/sankhyablocks/p-6d322b0a.js +0 -1
- package/dist/sankhyablocks/p-877d9614.entry.js +0 -1
- package/dist/sankhyablocks/p-94267a30.entry.js +0 -1
- package/dist/sankhyablocks/p-9e4555ab.js +0 -60
- package/dist/sankhyablocks/p-acd2ba28.entry.js +0 -1
- package/dist/sankhyablocks/p-b533edab.entry.js +0 -1
- package/dist/sankhyablocks/p-c2d33fc8.entry.js +0 -1
- package/dist/sankhyablocks/p-cd40c8cf.entry.js +0 -1
- package/dist/sankhyablocks/p-cd412add.entry.js +0 -1
- package/dist/sankhyablocks/p-d6dad5e4.entry.js +0 -1
- package/dist/sankhyablocks/p-f8c5395a.entry.js +0 -1
|
@@ -5,15 +5,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
9
|
-
const DataFetcher = require('./DataFetcher-
|
|
10
|
-
const authFetcher = require('./auth-fetcher-
|
|
11
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
|
12
|
-
const ISave = require('./ISave-
|
|
8
|
+
const ConfigStorage = require('./ConfigStorage-d9d24844.js');
|
|
9
|
+
const DataFetcher = require('./DataFetcher-3a8ea521.js');
|
|
10
|
+
const authFetcher = require('./auth-fetcher-faa61f64.js');
|
|
11
|
+
const dataunitFetcher = require('./dataunit-fetcher-4320f7ec.js');
|
|
12
|
+
const ISave = require('./ISave-a66bb65e.js');
|
|
13
|
+
const SnkMessageBuilder = require('./SnkMessageBuilder-d9558dba.js');
|
|
13
14
|
const constants = require('./constants-6d82e405.js');
|
|
14
15
|
require('./index-e3e39724.js');
|
|
15
16
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
16
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
|
17
|
+
const formConfigFetcher = require('./form-config-fetcher-72cf0e3d.js');
|
|
17
18
|
require('./PrintUtils-bcaeb82f.js');
|
|
18
19
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
19
20
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
@@ -1760,7 +1761,7 @@ const SnkApplication = class {
|
|
|
1760
1761
|
componentWillLoad() {
|
|
1761
1762
|
core.ApplicationContext.setContextValue("__SNK__APPLICATION__LOADING__", true);
|
|
1762
1763
|
this._errorHandler = new SnkErrorHandler(this);
|
|
1763
|
-
this.messagesBuilder = new
|
|
1764
|
+
this.messagesBuilder = new SnkMessageBuilder.SnkMessageBuilder();
|
|
1764
1765
|
core.ApplicationContext.setContextValue("__EZUI__UPLOAD__ADD__URL__", `${DataFetcher.UrlUtils.getUrlBase()}/mge/upload/file`);
|
|
1765
1766
|
core.ApplicationContext.setContextValue("__EZUI__SEARCH__OPTION__LOADER__", (searchArgument, fieldName, dataUnit, ctxOptions) => {
|
|
1766
1767
|
return this.executeSearch(searchArgument, fieldName, dataUnit, ctxOptions);
|
|
@@ -4,14 +4,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const DataFetcher = require('./DataFetcher-
|
|
8
|
-
const ISave = require('./ISave-
|
|
7
|
+
const DataFetcher = require('./DataFetcher-3a8ea521.js');
|
|
8
|
+
const ISave = require('./ISave-a66bb65e.js');
|
|
9
9
|
require('./index-e3e39724.js');
|
|
10
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
|
10
|
+
const dataunitFetcher = require('./dataunit-fetcher-4320f7ec.js');
|
|
11
11
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
12
|
-
require('./form-config-fetcher-
|
|
12
|
+
require('./form-config-fetcher-72cf0e3d.js');
|
|
13
13
|
const constants = require('./constants-6d82e405.js');
|
|
14
|
-
const authFetcher = require('./auth-fetcher-
|
|
14
|
+
const authFetcher = require('./auth-fetcher-faa61f64.js');
|
|
15
|
+
const SnkMessageBuilder = require('./SnkMessageBuilder-d9558dba.js');
|
|
15
16
|
const taskbarElements = require('./taskbar-elements-8a80420e.js');
|
|
16
17
|
require('./PrintUtils-bcaeb82f.js');
|
|
17
18
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
@@ -359,7 +360,7 @@ class AnexoSistemaDataUnitFactory {
|
|
|
359
360
|
let messageBuilderInstance;
|
|
360
361
|
const getMessage$1 = (key) => {
|
|
361
362
|
if (!messageBuilderInstance) {
|
|
362
|
-
messageBuilderInstance = new
|
|
363
|
+
messageBuilderInstance = new SnkMessageBuilder.SnkMessageBuilder();
|
|
363
364
|
}
|
|
364
365
|
return messageBuilderInstance.getMessage(key);
|
|
365
366
|
};
|
|
@@ -4,19 +4,20 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
require('./DataFetcher-
|
|
8
|
-
require('./ISave-
|
|
7
|
+
require('./DataFetcher-3a8ea521.js');
|
|
8
|
+
require('./ISave-a66bb65e.js');
|
|
9
9
|
const index$1 = require('./index-e3e39724.js');
|
|
10
10
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
11
11
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
12
|
-
require('./dataunit-fetcher-
|
|
12
|
+
require('./dataunit-fetcher-4320f7ec.js');
|
|
13
13
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
14
|
-
require('./form-config-fetcher-
|
|
14
|
+
require('./form-config-fetcher-72cf0e3d.js');
|
|
15
15
|
const constants = require('./constants-6d82e405.js');
|
|
16
|
-
const authFetcher = require('./auth-fetcher-
|
|
16
|
+
const authFetcher = require('./auth-fetcher-faa61f64.js');
|
|
17
17
|
const ServicesNumberingConfig = require('./ServicesNumberingConfig-69038a0f.js');
|
|
18
18
|
const taskbarElements = require('./taskbar-elements-8a80420e.js');
|
|
19
19
|
require('./PrintUtils-bcaeb82f.js');
|
|
20
|
+
require('./SnkMessageBuilder-d9558dba.js');
|
|
20
21
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
21
22
|
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
|
22
23
|
require('./ResourceIDUtils-5ff86aa7.js');
|
|
@@ -92,7 +93,7 @@ const SnkCrud = class {
|
|
|
92
93
|
this.configName = undefined;
|
|
93
94
|
this.filterBarTitle = undefined;
|
|
94
95
|
this.selectionToastConfig = undefined;
|
|
95
|
-
this.showActionButtons =
|
|
96
|
+
this.showActionButtons = true;
|
|
96
97
|
this.actionsList = undefined;
|
|
97
98
|
this.taskbarManager = undefined;
|
|
98
99
|
this.recordsValidator = undefined;
|
|
@@ -8,15 +8,16 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
|
8
8
|
const IFetchDataExporterParams = require('./IFetchDataExporterParams-e78ec415.js');
|
|
9
9
|
const index = require('./index-e3e39724.js');
|
|
10
10
|
const constants = require('./constants-6d82e405.js');
|
|
11
|
-
const DataFetcher = require('./DataFetcher-
|
|
12
|
-
const snkDataUnit = require('./snk-data-unit-
|
|
13
|
-
require('./ISave-
|
|
11
|
+
const DataFetcher = require('./DataFetcher-3a8ea521.js');
|
|
12
|
+
const snkDataUnit = require('./snk-data-unit-b54fdf9a.js');
|
|
13
|
+
require('./ISave-a66bb65e.js');
|
|
14
14
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
15
15
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
16
|
-
require('./dataunit-fetcher-
|
|
16
|
+
require('./dataunit-fetcher-4320f7ec.js');
|
|
17
17
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
18
|
-
require('./form-config-fetcher-
|
|
18
|
+
require('./form-config-fetcher-72cf0e3d.js');
|
|
19
19
|
require('./PrintUtils-bcaeb82f.js');
|
|
20
|
+
require('./SnkMessageBuilder-d9558dba.js');
|
|
20
21
|
require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
21
22
|
require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
|
|
22
23
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
const index = require('./index-1894343a.js');
|
|
4
4
|
const core = require('@sankhyalabs/core');
|
|
5
5
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
6
|
-
const
|
|
7
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
|
6
|
+
const SnkMessageBuilder = require('./SnkMessageBuilder-d9558dba.js');
|
|
7
|
+
const dataunitFetcher = require('./dataunit-fetcher-4320f7ec.js');
|
|
8
8
|
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
9
9
|
const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
|
|
10
10
|
|
|
@@ -700,7 +700,7 @@ const SnkDataUnit = class {
|
|
|
700
700
|
this.dataState = await this.buildDataState();
|
|
701
701
|
let saveOperation = changes[0]._operation.toLowerCase();
|
|
702
702
|
if (saveOperation == 'copy') {
|
|
703
|
-
saveOperation =
|
|
703
|
+
saveOperation = SnkMessageBuilder.OperationMap.CLONE;
|
|
704
704
|
}
|
|
705
705
|
if (this.canIgnoreOperationMessage(saveOperation))
|
|
706
706
|
return;
|
|
@@ -713,7 +713,7 @@ const SnkDataUnit = class {
|
|
|
713
713
|
return this.ignoreSaveMessage && !this.isCloneOrInsertOperation(saveOperation);
|
|
714
714
|
}
|
|
715
715
|
isCloneOrInsertOperation(saveOperation) {
|
|
716
|
-
return [
|
|
716
|
+
return [SnkMessageBuilder.OperationMap.CLONE, SnkMessageBuilder.OperationMap.INSERT].includes(saveOperation);
|
|
717
717
|
}
|
|
718
718
|
buildOperationMessage(saveOperation, records) {
|
|
719
719
|
if (this.isMultiplesUpdate(saveOperation, records)) {
|
|
@@ -728,10 +728,10 @@ const SnkDataUnit = class {
|
|
|
728
728
|
* de um registro se trata de uma chave composta.
|
|
729
729
|
*/
|
|
730
730
|
const key = `snkDataUnit.${isCancel ? 'cancelInfo' : 'saveInfo'}`;
|
|
731
|
-
return this.getMessage(key, { records: records },
|
|
731
|
+
return this.getMessage(key, { records: records }, SnkMessageBuilder.OperationMap.UPDATE_MULTIPLES);
|
|
732
732
|
}
|
|
733
733
|
isMultiplesUpdate(saveOperation, records) {
|
|
734
|
-
return saveOperation ===
|
|
734
|
+
return saveOperation === SnkMessageBuilder.OperationMap.UPDATE && records.length > 1;
|
|
735
735
|
}
|
|
736
736
|
handleRecordsRemoved(action) {
|
|
737
737
|
var _a, _b;
|
|
@@ -776,15 +776,15 @@ const SnkDataUnit = class {
|
|
|
776
776
|
}
|
|
777
777
|
getMessageOperation() {
|
|
778
778
|
if (this.dataState.copyMode) {
|
|
779
|
-
return
|
|
779
|
+
return SnkMessageBuilder.OperationMap.CLONE;
|
|
780
780
|
}
|
|
781
781
|
if (this.dataState.insertionMode || this.dataState.isStartingInsertionMode) {
|
|
782
|
-
return
|
|
782
|
+
return SnkMessageBuilder.OperationMap.INSERT;
|
|
783
783
|
}
|
|
784
784
|
if (this.dataState.isDirty) {
|
|
785
|
-
return
|
|
785
|
+
return SnkMessageBuilder.OperationMap.UPDATE;
|
|
786
786
|
}
|
|
787
|
-
return
|
|
787
|
+
return SnkMessageBuilder.OperationMap.CLEAN;
|
|
788
788
|
}
|
|
789
789
|
async getDataUnitParentOrChild() {
|
|
790
790
|
var _a;
|
|
@@ -887,7 +887,7 @@ const SnkDataUnit = class {
|
|
|
887
887
|
if (this.messagesBuilder) {
|
|
888
888
|
return;
|
|
889
889
|
}
|
|
890
|
-
this.messagesBuilder = new
|
|
890
|
+
this.messagesBuilder = new SnkMessageBuilder.SnkMessageBuilder((_a = this.domainMessagesBuilder) !== null && _a !== void 0 ? _a : this.entityName);
|
|
891
891
|
}
|
|
892
892
|
//---------------------------------------------
|
|
893
893
|
// Lifecycle web component
|
|
@@ -2,14 +2,15 @@
|
|
|
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-b54fdf9a.js');
|
|
6
6
|
require('./index-1894343a.js');
|
|
7
7
|
require('@sankhyalabs/core');
|
|
8
8
|
require('@sankhyalabs/ezui/dist/collection/utils');
|
|
9
|
-
require('./
|
|
9
|
+
require('./SnkMessageBuilder-d9558dba.js');
|
|
10
|
+
require('./dataunit-fetcher-4320f7ec.js');
|
|
11
|
+
require('./DataFetcher-3a8ea521.js');
|
|
10
12
|
require('./PrintUtils-bcaeb82f.js');
|
|
11
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
12
|
-
require('./dataunit-fetcher-8dffbcdf.js');
|
|
13
14
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
14
15
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
15
16
|
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
|
@@ -4,21 +4,22 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
7
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-c88cf1e9.js');
|
|
8
8
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
9
|
-
|
|
10
|
-
require('./ISave-
|
|
9
|
+
require('./DataFetcher-3a8ea521.js');
|
|
10
|
+
require('./ISave-a66bb65e.js');
|
|
11
11
|
const index$1 = require('./index-e3e39724.js');
|
|
12
12
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
14
|
-
require('./dataunit-fetcher-
|
|
14
|
+
require('./dataunit-fetcher-4320f7ec.js');
|
|
15
15
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
16
|
-
require('./form-config-fetcher-
|
|
16
|
+
require('./form-config-fetcher-72cf0e3d.js');
|
|
17
17
|
const constants = require('./constants-6d82e405.js');
|
|
18
18
|
const taskbarElements = require('./taskbar-elements-8a80420e.js');
|
|
19
|
-
const snkGuidesViewer = require('./snk-guides-viewer-
|
|
19
|
+
const snkGuidesViewer = require('./snk-guides-viewer-4bbd697f.js');
|
|
20
|
+
const SnkMessageBuilder = require('./SnkMessageBuilder-d9558dba.js');
|
|
20
21
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
21
|
-
require('./ConfigStorage-
|
|
22
|
+
require('./ConfigStorage-d9d24844.js');
|
|
22
23
|
require('./PrintUtils-bcaeb82f.js');
|
|
23
24
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
24
25
|
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
|
@@ -34,7 +35,7 @@ class GuideBuilder {
|
|
|
34
35
|
this._dataUnit = dataUnit;
|
|
35
36
|
this._messageBuilder = messageBuilder;
|
|
36
37
|
if (!this._messageBuilder) {
|
|
37
|
-
this._messageBuilder = new
|
|
38
|
+
this._messageBuilder = new SnkMessageBuilder.SnkMessageBuilder();
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
41
|
get id() {
|
|
@@ -70,7 +71,7 @@ class GuideBuilder {
|
|
|
70
71
|
};
|
|
71
72
|
});
|
|
72
73
|
const newGuideItem = children.shift();
|
|
73
|
-
newGuideItem.label = isNewRecord ? this.getMessage("snkCrud.
|
|
74
|
+
newGuideItem.label = isNewRecord ? this.getMessage("snkCrud.newRecord") : currentRecord.__record__label__;
|
|
74
75
|
newGuideItem.children = children;
|
|
75
76
|
item.children = [newGuideItem];
|
|
76
77
|
return item;
|
|
@@ -303,7 +304,7 @@ const SnkDetailView = class {
|
|
|
303
304
|
this.formConfigManager = new SnkFormConfigManager.SnkFormConfigManager(this._configName, this.resourceID, () => this.loadMetadata(), this.dataUnit);
|
|
304
305
|
this.formConfigManager.loadConfig();
|
|
305
306
|
if (this.messagesBuilder == undefined) {
|
|
306
|
-
this.messagesBuilder = new
|
|
307
|
+
this.messagesBuilder = new SnkMessageBuilder.SnkMessageBuilder(this.entityName);
|
|
307
308
|
}
|
|
308
309
|
}
|
|
309
310
|
async componentDidLoad() {
|
|
@@ -319,6 +320,9 @@ const SnkDetailView = class {
|
|
|
319
320
|
if (action.type === core.Action.FIELD_INVALIDATED) {
|
|
320
321
|
this.addErrorBadgeToBranchGuide();
|
|
321
322
|
}
|
|
323
|
+
else if (action.type === core.Action.DATA_LOADED) {
|
|
324
|
+
this.dataUnit.selectFirst();
|
|
325
|
+
}
|
|
322
326
|
}
|
|
323
327
|
addErrorBadgeToBranchGuide() {
|
|
324
328
|
this.branchGuide = Object.assign(Object.assign({}, this.branchGuide), { badge: 'error' });
|
|
@@ -373,7 +377,7 @@ const SnkDetailView = class {
|
|
|
373
377
|
render() {
|
|
374
378
|
this.updateLabel();
|
|
375
379
|
//const cardConfig: IFormCardConfig = this._cardsState?.get(this.selectedForm);
|
|
376
|
-
return (index.h(index.Host, null, index.h("snk-data-unit", { ref: (el) => this._snkDataUnit = el, dataUnitName: `${this.dataUnitName}`, onDataUnitReady: evt => this.dataUnitReadyHandler(evt), entityName: this.entityName, onDataStateChange: this.handleDataStateChange.bind(this), ignoreSaveMessage: this._currentView === constants.VIEW_MODE.GRID, messagesBuilder: this.messagesBuilder, configName: this._configName }, index.h("ez-view-stack", { ref: (ref) => this.updateViewStack(ref) }, index.h("stack-item", null, index.h("div", { class: "ez-box ez-box--shadow grid-container" }, index.h("div", { class: "ez-title--primary ez-size-width--full ez-padding--large detail-header" }, index.h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center" }, this._levelPath ? index.h("span", { class: "level-path" }, this._levelPath + " /") : undefined, this.label)), index.h("snk-grid", { class: "ez-size-width--full", ref: (ref) => this._snkGrid = ref, configName: this._configName, messagesBuilder: this.messagesBuilder, onGridDoubleClick: () => this.emitSwitchEvent(constants.VIEW_MODE.FORM), onActionClick: (evt) => this.executeActionHandler(evt), presentationMode: this.presentationMode, canEdit: this.canEdit, isDetail: true, taskbarCustomContainerId: this.taskbarCustomContainerId, gridHeaderCustomSlotId: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS", topTaskbarCustomSlotId: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS", outlineMode: false }))), index.h("stack-item", null, index.h("snk-form-view", { ref: (ref) => this._snkFormView = ref, canExpand: false, canFix: false, name: this.selectedForm, formMetadata: this._formMetadata, dataUnit: this.dataUnit, fields: this.getFormFields(), fieldToFocus: this._fieldToGetFocus, label: this.label, levelPath: this._levelPath, onFormItemsReady: ({ detail: formItems }) => this.formItemsReady.emit(formItems), onSnkRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this), fieldSearch: this._fieldSearch }, index.h("snk-taskbar", { key: "guideViewerTaskbar", class: "form-taskbar", "data-element-id": "guideViewer", configName: this._configName, messagesBuilder: this.messagesBuilder, disabledButtons: this._disabledButtons, buttons: "INSERT,PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,CONFIGURATOR", primaryButton: "INSERT", presentationMode: this.presentationMode, onActionClick: evt => this.executeActionHandler(evt), dataUnit: this.dataUnit, resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: "DETAIL_TASKBAR_CUSTOM_ELEMENTS", actionsSettingsList: this.getSettingsListForm() }, index.h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" })))), index.h("stack-item", null, index.h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this.entityName, onBack: this.handleAttachBack.bind(this) }))))));
|
|
380
|
+
return (index.h(index.Host, null, index.h("snk-data-unit", { ref: (el) => this._snkDataUnit = el, dataUnitName: `${this.dataUnitName}`, onDataUnitReady: evt => this.dataUnitReadyHandler(evt), entityName: this.entityName, onDataStateChange: this.handleDataStateChange.bind(this), ignoreSaveMessage: this._currentView === constants.VIEW_MODE.GRID, messagesBuilder: this.messagesBuilder, configName: this._configName }, index.h("ez-view-stack", { ref: (ref) => this.updateViewStack(ref) }, index.h("stack-item", null, index.h("div", { class: "ez-box ez-box--shadow grid-container" }, index.h("div", { class: "ez-title--primary ez-size-width--full ez-padding--large detail-header" }, index.h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center" }, this._levelPath ? index.h("span", { class: "level-path" }, this._levelPath + " /") : undefined, this.label)), index.h("snk-grid", { class: "ez-size-width--full", ref: (ref) => this._snkGrid = ref, configName: this._configName, messagesBuilder: this.messagesBuilder, onGridDoubleClick: () => this.emitSwitchEvent(constants.VIEW_MODE.FORM), onActionClick: (evt) => this.executeActionHandler(evt), presentationMode: this.presentationMode, canEdit: this.canEdit, isDetail: true, taskbarCustomContainerId: this.taskbarCustomContainerId, gridHeaderCustomSlotId: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS", topTaskbarCustomSlotId: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS", outlineMode: false, enableGridInsert: true }))), index.h("stack-item", null, index.h("snk-form-view", { ref: (ref) => this._snkFormView = ref, canExpand: false, canFix: false, name: this.selectedForm, formMetadata: this._formMetadata, dataUnit: this.dataUnit, fields: this.getFormFields(), fieldToFocus: this._fieldToGetFocus, label: this.label, levelPath: this._levelPath, onFormItemsReady: ({ detail: formItems }) => this.formItemsReady.emit(formItems), onSnkRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this), fieldSearch: this._fieldSearch, entityPath: this.entityName }, index.h("snk-taskbar", { key: "guideViewerTaskbar", class: "form-taskbar", "data-element-id": "guideViewer", configName: this._configName, messagesBuilder: this.messagesBuilder, disabledButtons: this._disabledButtons, buttons: "INSERT,PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,CONFIGURATOR", primaryButton: "INSERT", presentationMode: this.presentationMode, onActionClick: evt => this.executeActionHandler(evt), dataUnit: this.dataUnit, resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: "DETAIL_TASKBAR_CUSTOM_ELEMENTS", actionsSettingsList: this.getSettingsListForm() }, index.h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" })))), index.h("stack-item", null, index.h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this.entityName, onBack: this.handleAttachBack.bind(this) }))))));
|
|
377
381
|
}
|
|
378
382
|
get _element() { return index.getElement(this); }
|
|
379
383
|
static get watchers() { return {
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index$1 = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const EzScrollDirection = require('@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection');
|
|
8
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
8
|
+
const ConfigStorage = require('./ConfigStorage-d9d24844.js');
|
|
9
9
|
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-eccb267a.js');
|
|
10
10
|
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
11
11
|
const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
|
|
@@ -16,9 +16,10 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
|
16
16
|
const defaultFilters = require('./default-filters-a09bf82b.js');
|
|
17
17
|
const filterType_enum = require('./filter-type.enum-2bb46d2a.js');
|
|
18
18
|
const filterValidate = require('./filter-validate-cb4ed41a.js');
|
|
19
|
-
require('./form-config-fetcher-
|
|
20
|
-
require('./DataFetcher-
|
|
19
|
+
require('./form-config-fetcher-72cf0e3d.js');
|
|
20
|
+
require('./DataFetcher-3a8ea521.js');
|
|
21
21
|
require('./PrintUtils-bcaeb82f.js');
|
|
22
|
+
require('./SnkMessageBuilder-d9558dba.js');
|
|
22
23
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
23
24
|
|
|
24
25
|
const buildFilter = (item) => {
|
|
@@ -4,13 +4,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
7
|
+
const ConfigStorage = require('./ConfigStorage-d9d24844.js');
|
|
8
8
|
const presentationMode = require('./presentationMode-52ec3bdd.js');
|
|
9
9
|
const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
|
|
10
10
|
const filterType_enum = require('./filter-type.enum-2bb46d2a.js');
|
|
11
|
-
require('./form-config-fetcher-
|
|
12
|
-
require('./DataFetcher-
|
|
11
|
+
require('./form-config-fetcher-72cf0e3d.js');
|
|
12
|
+
require('./DataFetcher-3a8ea521.js');
|
|
13
13
|
require('./PrintUtils-bcaeb82f.js');
|
|
14
|
+
require('./SnkMessageBuilder-d9558dba.js');
|
|
14
15
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
15
16
|
|
|
16
17
|
const snkFilterModalItemCss = ".grow{flex-grow:1}.gap{gap:4px}";
|
|
@@ -6,9 +6,22 @@ const index = require('./index-1894343a.js');
|
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
8
8
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
9
|
+
const ImageUtils = require('./ImageUtils-5e3f406b.js');
|
|
9
10
|
|
|
10
11
|
const snkFormViewCss = ".sc-snk-form-view-h{display:flex;width:100%;--ez-form-card-summary-field-content-weight:700}.level-path.sc-snk-form-view{color:var(--color--title-primary, #2B3A54);font-weight:var(--text-weight--medium, 400);padding-right:3px}.summary-wrapper.sc-snk-form-view{display:flex;overflow:hidden}.summary-header.sc-snk-form-view{border-bottom:1px solid var(--color--strokes);margin-bottom:var(--space--medium);padding-bottom:var(--space--medium)}.summary-container.sc-snk-form-view{display:flex;flex-direction:column}.summary-container.sc-snk-form-view{padding-right:calc(var(--space--extra-large) / 1.5)}.summary-field.sc-snk-form-view{min-width:30px;max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.summary-field__title.sc-snk-form-view{color:var(--text--primary, #626e82);font-size:var(--title--small);white-space:nowrap;font-weight:var(--text-weight--medium)}.summary-field__content.sc-snk-form-view{color:var(--title--primary, #2b3a54);font-size:var(--text--large);font-weight:var(--ez-form-card-summary-field-content-weight)}";
|
|
11
12
|
|
|
13
|
+
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s)
|
|
16
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
17
|
+
t[p] = s[p];
|
|
18
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
19
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
20
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
21
|
+
t[p[i]] = s[p[i]];
|
|
22
|
+
}
|
|
23
|
+
return t;
|
|
24
|
+
};
|
|
12
25
|
const SnkFormView = class {
|
|
13
26
|
constructor(hostRef) {
|
|
14
27
|
index.registerInstance(this, hostRef);
|
|
@@ -17,7 +30,23 @@ const SnkFormView = class {
|
|
|
17
30
|
this.formItemsReady = index.createEvent(this, "formItemsReady", 7);
|
|
18
31
|
this._customEditors = new Map();
|
|
19
32
|
this._fieldProps = new Map();
|
|
33
|
+
this.dataUnitObserver = async (action) => {
|
|
34
|
+
if (action.type === core.Action.RECORDS_COPIED) {
|
|
35
|
+
const sourcePK = this.buildSourceRecordPK(action);
|
|
36
|
+
this.getImageField().forEach(async (field) => {
|
|
37
|
+
this.dataUnit.setFieldValue(field.name, JSON.stringify(sourcePK));
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
this.customUiBuilders = new Map([
|
|
42
|
+
[core.UserInterface.IMAGE, (_a) => {
|
|
43
|
+
var { name } = _a, props = __rest(_a, ["name"]);
|
|
44
|
+
return index.h("snk-image-input", Object.assign({ dataUnit: this.dataUnit, maxSize: Infinity, fieldName: name, entityName: this.entityPath }, props));
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
]);
|
|
20
48
|
this._singleColumn = false;
|
|
49
|
+
this._currentFormLayout = undefined;
|
|
21
50
|
this.levelPath = undefined;
|
|
22
51
|
this.fieldSearch = undefined;
|
|
23
52
|
this.label = undefined;
|
|
@@ -34,6 +63,7 @@ const SnkFormView = class {
|
|
|
34
63
|
this.fieldToFocus = undefined;
|
|
35
64
|
this.customEditors = undefined;
|
|
36
65
|
this.fieldsProps = undefined;
|
|
66
|
+
this.entityPath = undefined;
|
|
37
67
|
}
|
|
38
68
|
async showUp() {
|
|
39
69
|
if (this._formView) {
|
|
@@ -83,6 +113,11 @@ const SnkFormView = class {
|
|
|
83
113
|
}
|
|
84
114
|
}
|
|
85
115
|
}
|
|
116
|
+
async observeDataUnit(newValue, oldValue) {
|
|
117
|
+
if (newValue !== oldValue && newValue) {
|
|
118
|
+
newValue.subscribe(this.dataUnitObserver);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
86
121
|
changeFix() {
|
|
87
122
|
this.fixed = !this.fixed;
|
|
88
123
|
this.emitEvent("fixed");
|
|
@@ -140,28 +175,41 @@ const SnkFormView = class {
|
|
|
140
175
|
if (this._dataBinder != undefined) {
|
|
141
176
|
this._dataBinder.onDisconnectedCallback();
|
|
142
177
|
}
|
|
178
|
+
if (this.dataUnit) {
|
|
179
|
+
this.dataUnit.unsubscribe(this.dataUnitObserver);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
async componentWillLoad() {
|
|
183
|
+
await this.initLayoutFormConfig();
|
|
184
|
+
}
|
|
185
|
+
async componentWillLoad() {
|
|
186
|
+
await this.initLayoutFormConfig();
|
|
143
187
|
}
|
|
144
188
|
componentDidLoad() {
|
|
145
189
|
this.observePropsCustomEditor(this.customEditors);
|
|
146
190
|
this.observeFieldsProps(this.fieldsProps);
|
|
147
|
-
this.initLayoutFormConfig();
|
|
148
191
|
}
|
|
149
192
|
async initLayoutFormConfig() {
|
|
150
|
-
|
|
151
|
-
|
|
193
|
+
var _a;
|
|
194
|
+
if (!this._application) {
|
|
195
|
+
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
196
|
+
}
|
|
197
|
+
const layoutFormConfig = await ((_a = this._application) === null || _a === void 0 ? void 0 : _a.getLayoutFormConfig());
|
|
152
198
|
if (layoutFormConfig) {
|
|
153
199
|
this.setSingleColumn(layoutFormConfig);
|
|
154
200
|
this.registerNotifyListeners(layoutFormConfig);
|
|
155
201
|
}
|
|
156
202
|
}
|
|
157
203
|
setSingleColumn(layoutFormConfig) {
|
|
158
|
-
this._singleColumn = (layoutFormConfig === null || layoutFormConfig === void 0 ? void 0 : layoutFormConfig.config) === utils.FormLayout.CASCADE;
|
|
204
|
+
this._singleColumn = (layoutFormConfig === null || layoutFormConfig === void 0 ? void 0 : layoutFormConfig.config) === utils.FormLayout.CASCADE || (layoutFormConfig === null || layoutFormConfig === void 0 ? void 0 : layoutFormConfig.config) === utils.FormLayout.CLASSIC_CASCADE;
|
|
205
|
+
this._currentFormLayout = layoutFormConfig === null || layoutFormConfig === void 0 ? void 0 : layoutFormConfig.config;
|
|
159
206
|
}
|
|
160
207
|
registerNotifyListeners(layoutFormConfig) {
|
|
161
208
|
if (!layoutFormConfig)
|
|
162
209
|
return;
|
|
163
210
|
layoutFormConfig.onConfigChange((config) => {
|
|
164
|
-
this._singleColumn = (config === utils.FormLayout.CASCADE);
|
|
211
|
+
this._singleColumn = (config === utils.FormLayout.CASCADE || config === utils.FormLayout.CLASSIC_CASCADE);
|
|
212
|
+
this._currentFormLayout = config;
|
|
165
213
|
});
|
|
166
214
|
}
|
|
167
215
|
componentDidRender() {
|
|
@@ -198,6 +246,22 @@ const SnkFormView = class {
|
|
|
198
246
|
});
|
|
199
247
|
}
|
|
200
248
|
}
|
|
249
|
+
buildSourceRecordPK(action) {
|
|
250
|
+
var _a, _b;
|
|
251
|
+
const currentRecord = ((_a = action.payload) === null || _a === void 0 ? void 0 : _a[0]) || {};
|
|
252
|
+
const sourceBase64 = currentRecord["__record__source__id__"];
|
|
253
|
+
const sourceRecord = JSON.parse(atob(sourceBase64 || ''));
|
|
254
|
+
delete sourceRecord["__DATA_UNIT_NAME__"];
|
|
255
|
+
const pkFields = Object.keys(ImageUtils.getPKs(this.dataUnit));
|
|
256
|
+
const filteredSourceRecord = {};
|
|
257
|
+
for (const pkField of pkFields) {
|
|
258
|
+
filteredSourceRecord[pkField] = (_b = sourceRecord[pkField]) === null || _b === void 0 ? void 0 : _b.value;
|
|
259
|
+
}
|
|
260
|
+
return filteredSourceRecord;
|
|
261
|
+
}
|
|
262
|
+
getImageField() {
|
|
263
|
+
return this.dataUnit.metadata.fields.filter(field => field.userInterface === core.UserInterface.IMAGE);
|
|
264
|
+
}
|
|
201
265
|
render() {
|
|
202
266
|
return (index.h(index.Host, { class: "ez-box__container" }, index.h("div", { class: "summary-header ez-flex ez-size-width--full", ref: ref => this._headerContainer = ref }, index.h("div", { class: "ez-flex ez-text ez-title--primary ez-text--bold ez-flex--justify-start ez-flex--align-items-center ez-col--sd-9" }, this.levelPath ? index.h("span", { class: "level-path" }, this.levelPath + " /") : undefined, this.label), index.h("div", { class: "ez-flex ez-flex--justify-end ez-col--sd-3" }, this.canFix &&
|
|
203
267
|
index.h("ez-button", { class: "ez-padding-left--medium", mode: "icon", size: "small", iconName: this.fixed ? "un-pin" : "push-pin", "data-element-id": core.ElementIDUtils.getInternalIDInfo("toggleFixed_ezFormCard"), onClick: () => this.changeFix(), title: this.fixed ? "Desafixar" : "Fixar" }), this.canExpand &&
|
|
@@ -205,11 +269,12 @@ const SnkFormView = class {
|
|
|
205
269
|
?
|
|
206
270
|
index.h("snk-form-summary", { summary: this.getCardSummary() })
|
|
207
271
|
:
|
|
208
|
-
index.h("ez-form-view", { ref: ref => this._formView = ref, fields: this.fields, onEzContentReady: evt => this.bindFields(evt.detail), onFormItemsReady: (event) => this.handleFormItemsReady(event), singleColumn: this._singleColumn }), this.fieldSearch && index.h("ez-popover", { ref: elem => (this._ezPopoverFieldColumn = elem), overlayType: "none" }, this.fieldSearch)));
|
|
272
|
+
index.h("ez-form-view", { ref: ref => this._formView = ref, fields: this.fields, onEzContentReady: evt => this.bindFields(evt.detail), onFormItemsReady: (event) => this.handleFormItemsReady(event), singleColumn: this._singleColumn, customUiBuilders: this.customUiBuilders, formLayout: this._currentFormLayout }), this.fieldSearch && index.h("ez-popover", { ref: elem => (this._ezPopoverFieldColumn = elem), overlayType: "none" }, this.fieldSearch)));
|
|
209
273
|
}
|
|
210
274
|
static get watchers() { return {
|
|
211
275
|
"customEditors": ["observePropsCustomEditor"],
|
|
212
|
-
"fieldsProps": ["observeFieldsProps"]
|
|
276
|
+
"fieldsProps": ["observeFieldsProps"],
|
|
277
|
+
"dataUnit": ["observeDataUnit"]
|
|
213
278
|
}; }
|
|
214
279
|
};
|
|
215
280
|
SnkFormView.style = snkFormViewCss;
|
|
@@ -4,16 +4,17 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
7
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-c88cf1e9.js');
|
|
8
8
|
const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
|
|
9
9
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
10
10
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
11
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
|
11
|
+
const formConfigFetcher = require('./form-config-fetcher-72cf0e3d.js');
|
|
12
12
|
const constants = require('./constants-6d82e405.js');
|
|
13
13
|
const FormConfigHelper = require('./FormConfigHelper-28fe4668.js');
|
|
14
|
-
require('./ConfigStorage-
|
|
15
|
-
require('./DataFetcher-
|
|
14
|
+
require('./ConfigStorage-d9d24844.js');
|
|
15
|
+
require('./DataFetcher-3a8ea521.js');
|
|
16
16
|
require('./PrintUtils-bcaeb82f.js');
|
|
17
|
+
require('./SnkMessageBuilder-d9558dba.js');
|
|
17
18
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
18
19
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
19
20
|
|
|
@@ -6,23 +6,24 @@ const index = require('./index-1894343a.js');
|
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
8
8
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
9
|
-
require('./DataFetcher-
|
|
10
|
-
require('./ISave-
|
|
11
|
-
const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-
|
|
9
|
+
require('./DataFetcher-3a8ea521.js');
|
|
10
|
+
require('./ISave-a66bb65e.js');
|
|
11
|
+
const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-a891430e.js');
|
|
12
12
|
const index$1 = require('./index-e3e39724.js');
|
|
13
13
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
14
14
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
15
|
-
require('./dataunit-fetcher-
|
|
15
|
+
require('./dataunit-fetcher-4320f7ec.js');
|
|
16
16
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
17
|
-
require('./form-config-fetcher-
|
|
17
|
+
require('./form-config-fetcher-72cf0e3d.js');
|
|
18
18
|
require('./constants-6d82e405.js');
|
|
19
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
19
|
+
const ConfigStorage = require('./ConfigStorage-d9d24844.js');
|
|
20
20
|
const index$2 = require('./index-f0fe7e6e.js');
|
|
21
21
|
const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
|
|
22
22
|
const filterValidate = require('./filter-validate-cb4ed41a.js');
|
|
23
23
|
const taskbarElements = require('./taskbar-elements-8a80420e.js');
|
|
24
24
|
const taskbarProcessor = require('./taskbar-processor-2fba34a8.js');
|
|
25
25
|
require('./PrintUtils-bcaeb82f.js');
|
|
26
|
+
require('./SnkMessageBuilder-d9558dba.js');
|
|
26
27
|
require('./IFetchDataExporterParams-e78ec415.js');
|
|
27
28
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
|
|
28
29
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
@@ -554,7 +555,7 @@ const SnkGrid = class {
|
|
|
554
555
|
return disabledButtons;
|
|
555
556
|
}
|
|
556
557
|
getInvisibleButtons() {
|
|
557
|
-
var _a, _b;
|
|
558
|
+
var _a, _b, _c;
|
|
558
559
|
let invisibleButtons = [];
|
|
559
560
|
if (!this._dataUnit || this._dataUnit.records.length === 0)
|
|
560
561
|
invisibleButtons.push(taskbarElements.TaskbarElement.DATA_EXPORTER);
|
|
@@ -562,6 +563,8 @@ const SnkGrid = class {
|
|
|
562
563
|
invisibleButtons.push(taskbarElements.TaskbarElement.ACTIONS_BUTTON);
|
|
563
564
|
if (((_b = this._dataState) === null || _b === void 0 ? void 0 : _b.selectionInfo.length) === 1)
|
|
564
565
|
invisibleButtons.push(taskbarElements.TaskbarElement.UPDATE_MULTIPLE);
|
|
566
|
+
if (!((_c = this._dataState) === null || _c === void 0 ? void 0 : _c.selectionInfo.length))
|
|
567
|
+
invisibleButtons.push(taskbarElements.TaskbarElement.FORM_MODE);
|
|
565
568
|
return invisibleButtons;
|
|
566
569
|
}
|
|
567
570
|
componentWillRender() {
|
|
@@ -5,16 +5,16 @@ const core = require('@sankhyalabs/core');
|
|
|
5
5
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
6
6
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
7
7
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
8
|
-
require('./DataFetcher-
|
|
9
|
-
require('./ISave-
|
|
8
|
+
require('./DataFetcher-3a8ea521.js');
|
|
9
|
+
require('./ISave-a66bb65e.js');
|
|
10
10
|
const index$1 = require('./index-e3e39724.js');
|
|
11
11
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
12
12
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
13
|
-
require('./dataunit-fetcher-
|
|
13
|
+
require('./dataunit-fetcher-4320f7ec.js');
|
|
14
14
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
15
|
-
require('./form-config-fetcher-
|
|
15
|
+
require('./form-config-fetcher-72cf0e3d.js');
|
|
16
16
|
const constants = require('./constants-6d82e405.js');
|
|
17
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
17
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-c88cf1e9.js');
|
|
18
18
|
const taskbarElements = require('./taskbar-elements-8a80420e.js');
|
|
19
19
|
const taskbarProcessor = require('./taskbar-processor-2fba34a8.js');
|
|
20
20
|
|
|
@@ -302,7 +302,7 @@ const SnkGuidesViewer = class {
|
|
|
302
302
|
if (sheet == undefined) {
|
|
303
303
|
return;
|
|
304
304
|
}
|
|
305
|
-
return index.h("snk-form-view", { levelPath: params.levelPath, label: sheet.label, name: formName, fields: sheet.fields, formMetadata: params.formMetadata, dataUnit: params.dataUnit, recordsValidator: params.recordsValidator, contracted: (cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.presentation) === "CONTRACTED", fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_b = (_a = params.formConfig) === null || _a === void 0 ? void 0 : _a.summary) === null || _b === void 0 ? void 0 : _b.get(formName), fieldToFocus: params.fieldToFocus, key: formName, onSnkRequestClearFieldToFocus: _ => { var _a; return (_a = params.onRequestClearFieldToFocus) === null || _a === void 0 ? void 0 : _a.call(params); }, customEditors: params.propsCustomEditor, fieldsProps: params.fieldsProps });
|
|
305
|
+
return index.h("snk-form-view", { levelPath: params.levelPath, label: sheet.label, name: formName, fields: sheet.fields, formMetadata: params.formMetadata, dataUnit: params.dataUnit, recordsValidator: params.recordsValidator, contracted: (cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.presentation) === "CONTRACTED", fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_b = (_a = params.formConfig) === null || _a === void 0 ? void 0 : _a.summary) === null || _b === void 0 ? void 0 : _b.get(formName), fieldToFocus: params.fieldToFocus, key: formName, onSnkRequestClearFieldToFocus: _ => { var _a; return (_a = params.onRequestClearFieldToFocus) === null || _a === void 0 ? void 0 : _a.call(params); }, customEditors: params.propsCustomEditor, fieldsProps: params.fieldsProps, entityPath: params.entityPath });
|
|
306
306
|
})));
|
|
307
307
|
}
|
|
308
308
|
wrapDetail(levels, content) {
|
|
@@ -347,7 +347,7 @@ const SnkGuidesViewer = class {
|
|
|
347
347
|
if (!sheet)
|
|
348
348
|
return;
|
|
349
349
|
const cardConfig = (_b = (_a = this.masterFormConfig) === null || _a === void 0 ? void 0 : _a.cardsState) === null || _b === void 0 ? void 0 : _b.get(cardId);
|
|
350
|
-
return (index.h("snk-form-view", { ref: ref => this._mainForm = ref, fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_d = (_c = this.masterFormConfig) === null || _c === void 0 ? void 0 : _c.summary) === null || _d === void 0 ? void 0 : _d.get(cardId), name: cardId, label: sheet.label, fields: sheet.fields, dataUnit: this.dataUnit, formMetadata: this._masterFormMetadata, recordsValidator: this.recordsValidator, fieldToFocus: this._fieldToGetFocus, key: cardId, onSnkRequestClearFieldToFocus: _ => this.clearFieldToFocusHandler(), customEditors: this._customEditors, fieldsProps: this._fieldsProps, fieldSearch: this._fieldSearch }, this.presentationMode == index$1.PresentationMode.SECONDARY && this.buildTaskBar()));
|
|
350
|
+
return (index.h("snk-form-view", { ref: ref => this._mainForm = ref, fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_d = (_c = this.masterFormConfig) === null || _c === void 0 ? void 0 : _c.summary) === null || _d === void 0 ? void 0 : _d.get(cardId), name: cardId, label: sheet.label, fields: sheet.fields, dataUnit: this.dataUnit, formMetadata: this._masterFormMetadata, recordsValidator: this.recordsValidator, fieldToFocus: this._fieldToGetFocus, key: cardId, onSnkRequestClearFieldToFocus: _ => this.clearFieldToFocusHandler(), customEditors: this._customEditors, fieldsProps: this._fieldsProps, fieldSearch: this._fieldSearch, entityPath: this.entityPath }, this.presentationMode == index$1.PresentationMode.SECONDARY && this.buildTaskBar()));
|
|
351
351
|
}
|
|
352
352
|
isDetailGuide(childEntityName, levels) {
|
|
353
353
|
return childEntityName || levels.length > 0;
|
|
@@ -619,8 +619,9 @@ const SnkGuidesViewer = class {
|
|
|
619
619
|
fieldToFocus: this._fieldToGetFocus,
|
|
620
620
|
onRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this),
|
|
621
621
|
propsCustomEditor: this._customEditors,
|
|
622
|
-
fieldsProps: this._fieldsProps
|
|
623
|
-
|
|
622
|
+
fieldsProps: this._fieldsProps,
|
|
623
|
+
entityPath: this.entityPath
|
|
624
|
+
}), this.getContent())), index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this.getConfigViewMode(), onConfigSelected: (evt) => this.changeConfigViewMode(evt.detail), messagesBuilder: this.messagesBuilder, onOpenConfig: (evt) => this.openConfig(evt.detail), resourceID: this.resourceID, layoutFormConfig: false, disableNumberingConfig: true })));
|
|
624
625
|
}
|
|
625
626
|
render() {
|
|
626
627
|
if (!this.dataUnit || !this._configManager.isLoaded) {
|