@sankhyalabs/sankhyablocks 8.3.0 → 8.4.0-dev.1
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-e9d7fa82.js → ConfigStorage-f0f89379.js} +163 -51
- package/dist/cjs/{DataFetcher-39b63a1e.js → DataFetcher-4798bac3.js} +136 -244
- package/dist/cjs/ISave-d68ce3cd.js +8 -0
- package/dist/cjs/PrintUtils-bcaeb82f.js +215 -0
- package/dist/cjs/ResourceIDUtils-5ff86aa7.js +12 -0
- package/dist/cjs/{SnkFormConfigManager-2f8eccd9.js → SnkFormConfigManager-d5fd8800.js} +19 -21
- package/dist/cjs/{auth-fetcher-d407c31c.js → auth-fetcher-f2967437.js} +2 -2
- package/dist/cjs/{dataunit-fetcher-15a7cc88.js → dataunit-fetcher-959c9a00.js} +1 -1
- package/dist/cjs/{form-config-fetcher-ab3ce222.js → form-config-fetcher-5e3d3b87.js} +66 -3
- package/dist/cjs/index-f9e81701.js +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-96c042aa.js → pesquisa-fetcher-7973c081.js} +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button.cjs.entry.js +19 -11
- package/dist/cjs/snk-application.cjs.entry.js +60 -44
- package/dist/cjs/snk-attach.cjs.entry.js +9 -14
- package/dist/cjs/snk-configurator.cjs.entry.js +2 -1
- package/dist/cjs/snk-crud.cjs.entry.js +28 -11
- package/dist/cjs/snk-data-exporter.cjs.entry.js +3 -2
- package/dist/cjs/{snk-data-unit-e89e07bd.js → snk-data-unit-7cc1846d.js} +5 -5
- package/dist/cjs/snk-data-unit.cjs.entry.js +1 -1
- package/dist/cjs/snk-detail-view.cjs.entry.js +17 -13
- package/dist/cjs/snk-entity-list.cjs.entry.js +0 -4
- package/dist/cjs/snk-filter-bar.cjs.entry.js +15 -17
- package/dist/cjs/snk-filter-detail.cjs.entry.js +7 -16
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +6 -19
- package/dist/cjs/snk-form-config.cjs.entry.js +7 -17
- package/dist/cjs/snk-form-view.cjs.entry.js +6 -1
- package/dist/cjs/snk-form.cjs.entry.js +13 -8
- package/dist/cjs/snk-grid-config.cjs.entry.js +6 -6
- package/dist/cjs/snk-grid.cjs.entry.js +23 -22
- package/dist/cjs/{snk-guides-viewer-8518c61b.js → snk-guides-viewer-b7b680d2.js} +19 -8
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +10 -9
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +14 -16
- package/dist/cjs/snk-print-selector.cjs.entry.js +2 -4
- package/dist/cjs/snk-simple-crud.cjs.entry.js +43 -85
- package/dist/cjs/snk-taskbar-custom-elements.cjs.entry.js +20 -0
- package/dist/cjs/snk-taskbar.cjs.entry.js +71 -5
- package/dist/cjs/{taskbar-elements-b98dd6e9.js → taskbar-elements-39949c7a.js} +4 -4
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/snk-actions-button/actions/index.js +3 -4
- package/dist/collection/components/snk-actions-button/snk-actions-button.js +8 -4
- package/dist/collection/components/snk-application/snk-application.js +120 -65
- package/dist/collection/components/snk-configurator/snk-configurator.js +19 -1
- package/dist/collection/components/snk-crud/snk-crud.js +44 -8
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +60 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +27 -1
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +65 -28
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +22 -6
- package/dist/collection/components/snk-entity-list/snk-entity-list.js +0 -23
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +8 -13
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +21 -16
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +28 -12
- package/dist/collection/components/snk-form/SnkFormConfigManager.js +17 -19
- package/dist/collection/components/snk-form/snk-form.js +46 -2
- package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +5 -15
- package/dist/collection/components/snk-grid/snk-grid.js +108 -16
- package/dist/collection/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.js +19 -1
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +28 -12
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +23 -1
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +4 -4
- package/dist/collection/components/snk-taskbar/snk-taskbar-custom-elements.js +43 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +4 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +126 -5
- package/dist/collection/lib/configs/ConfigStorage.js +33 -44
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +23 -71
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +118 -42
- package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +0 -24
- package/dist/collection/lib/index.js +10 -0
- package/dist/collection/lib/resourceid/ResourceIDUtils.js +7 -0
- package/dist/collection/lib/utils/PrintUtils.js +18 -9
- package/dist/collection/lib/utils/urlutils.js +29 -0
- package/dist/components/ConfigStorage.js +161 -48
- package/dist/components/DataFetcher.js +137 -244
- package/dist/components/PrintUtils.js +213 -0
- package/dist/components/ResourceIDUtils.js +10 -0
- package/dist/components/SnkFormConfigManager.js +17 -19
- package/dist/components/auth-fetcher.js +1 -1
- package/dist/components/form-config-fetcher.js +64 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/snk-actions-button2.js +23 -9
- package/dist/components/snk-application2.js +145 -129
- package/dist/components/snk-attach2.js +1 -8
- package/dist/components/snk-configurator2.js +3 -1
- package/dist/components/snk-crud.js +27 -8
- package/dist/components/snk-data-unit2.js +6 -5
- package/dist/components/snk-detail-view2.js +26 -10
- package/dist/components/snk-entity-list.js +0 -4
- package/dist/components/snk-filter-bar2.js +12 -12
- package/dist/components/snk-filter-detail2.js +8 -13
- package/dist/components/snk-filter-modal-item2.js +5 -16
- package/dist/components/snk-form-config2.js +5 -15
- package/dist/components/snk-form-view2.js +6 -1
- package/dist/components/snk-form.js +9 -2
- package/dist/components/snk-grid-config2.js +4 -2
- package/dist/components/snk-grid2.js +24 -17
- package/dist/components/snk-personalized-filter2.js +11 -11
- package/dist/components/snk-print-selector.js +1 -1
- package/dist/components/snk-simple-crud2.js +30 -73
- package/dist/components/snk-taskbar-custom-elements.d.ts +11 -0
- package/dist/components/snk-taskbar-custom-elements.js +35 -0
- package/dist/components/snk-taskbar2.js +81 -9
- package/dist/esm/{ConfigStorage-1090289a.js → ConfigStorage-4441aa3d.js} +162 -49
- package/dist/esm/{DataFetcher-a4ed43e7.js → DataFetcher-1618bffe.js} +137 -244
- package/dist/esm/ISave-4412b20c.js +8 -0
- package/dist/esm/PrintUtils-3e4ff0f5.js +213 -0
- package/dist/esm/ResourceIDUtils-a114189a.js +10 -0
- package/dist/esm/{SnkFormConfigManager-de537eca.js → SnkFormConfigManager-5a5f85a3.js} +19 -21
- package/dist/esm/{auth-fetcher-c53e0d6c.js → auth-fetcher-7861187e.js} +1 -1
- package/dist/esm/{dataunit-fetcher-8d0bfa4a.js → dataunit-fetcher-53c007be.js} +1 -1
- package/dist/esm/{form-config-fetcher-4065db9a.js → form-config-fetcher-2fe67341.js} +65 -3
- package/dist/esm/index-a7d3d3f1.js +4 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{pesquisa-fetcher-7460b876.js → pesquisa-fetcher-19e81fc8.js} +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button.entry.js +19 -11
- package/dist/esm/snk-application.entry.js +60 -44
- package/dist/esm/snk-attach.entry.js +5 -10
- package/dist/esm/snk-configurator.entry.js +2 -1
- package/dist/esm/snk-crud.entry.js +30 -13
- package/dist/esm/snk-data-exporter.entry.js +3 -2
- package/dist/esm/{snk-data-unit-8c4d944d.js → snk-data-unit-1715d2f1.js} +5 -5
- package/dist/esm/snk-data-unit.entry.js +1 -1
- package/dist/esm/snk-detail-view.entry.js +17 -13
- package/dist/esm/snk-entity-list.entry.js +0 -4
- package/dist/esm/snk-filter-bar.entry.js +15 -17
- package/dist/esm/snk-filter-detail.entry.js +8 -17
- package/dist/esm/snk-filter-modal-item.entry.js +7 -20
- package/dist/esm/snk-form-config.entry.js +8 -18
- package/dist/esm/snk-form-view.entry.js +6 -1
- package/dist/esm/snk-form.entry.js +13 -8
- package/dist/esm/snk-grid-config.entry.js +6 -6
- package/dist/esm/snk-grid.entry.js +23 -22
- package/dist/esm/{snk-guides-viewer-cdecff6e.js → snk-guides-viewer-e4fe884d.js} +19 -8
- package/dist/esm/snk-guides-viewer.entry.js +10 -9
- package/dist/esm/snk-personalized-filter.entry.js +14 -16
- package/dist/esm/snk-print-selector.entry.js +1 -3
- package/dist/esm/snk-simple-crud.entry.js +34 -76
- package/dist/esm/snk-taskbar-custom-elements.entry.js +16 -0
- package/dist/esm/snk-taskbar.entry.js +71 -5
- package/dist/esm/{taskbar-elements-2c761819.js → taskbar-elements-0a6b8b95.js} +4 -4
- package/dist/sankhyablocks/p-0b99a775.entry.js +1 -0
- package/dist/sankhyablocks/p-1e30c376.entry.js +1 -0
- package/dist/sankhyablocks/p-1fa3acbe.entry.js +1 -0
- package/dist/sankhyablocks/p-27dbbb3a.entry.js +1 -0
- package/dist/sankhyablocks/p-29b1d77b.entry.js +11 -0
- package/dist/sankhyablocks/p-324ce41e.entry.js +1 -0
- package/dist/sankhyablocks/p-34604220.entry.js +1 -0
- package/dist/sankhyablocks/p-41820e28.entry.js +1 -0
- package/dist/sankhyablocks/p-4352324d.entry.js +1 -0
- package/dist/sankhyablocks/{p-9d18017a.js → p-449d25e0.js} +2 -2
- package/dist/sankhyablocks/p-5051a23a.entry.js +1 -0
- package/dist/sankhyablocks/p-5526ab67.js +1 -0
- package/dist/sankhyablocks/p-5b2ee1d3.js +1 -0
- package/dist/sankhyablocks/p-5da848bb.js +26 -0
- package/dist/sankhyablocks/p-6098d844.entry.js +1 -0
- package/dist/sankhyablocks/p-648a7c72.entry.js +1 -0
- package/dist/sankhyablocks/p-688dcb4c.js +1 -0
- package/dist/sankhyablocks/p-72fc257b.entry.js +1 -0
- package/dist/sankhyablocks/p-7d6eca73.entry.js +1 -0
- package/dist/sankhyablocks/p-81a7f74c.js +1 -0
- package/dist/sankhyablocks/p-8d884fab.js +1 -0
- package/dist/sankhyablocks/p-90b5d1af.entry.js +1 -0
- package/dist/sankhyablocks/p-989937ee.entry.js +1 -0
- package/dist/sankhyablocks/p-9a270401.entry.js +1 -0
- package/dist/sankhyablocks/p-9e7d65a4.js +1 -0
- package/dist/sankhyablocks/{p-b978da60.js → p-a75e892a.js} +1 -1
- package/dist/sankhyablocks/p-a81996df.js +1 -0
- package/dist/sankhyablocks/p-c555075c.entry.js +1 -0
- package/dist/sankhyablocks/{p-a2493d11.js → p-c9841939.js} +1 -1
- package/dist/sankhyablocks/p-ca1522bc.entry.js +1 -0
- package/dist/sankhyablocks/p-cbed6235.entry.js +1 -0
- package/dist/sankhyablocks/p-d4f9ee17.entry.js +1 -0
- package/dist/sankhyablocks/p-daa687aa.js +56 -0
- package/dist/sankhyablocks/p-e1cb1f0b.js +1 -0
- package/dist/sankhyablocks/p-eb1a650a.entry.js +1 -0
- package/dist/sankhyablocks/p-f784010c.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-actions-button/actions/index.d.ts +2 -1
- package/dist/types/components/snk-application/snk-application.d.ts +9 -22
- package/dist/types/components/snk-configurator/snk-configurator.d.ts +4 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +6 -0
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +12 -0
- package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +5 -0
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +13 -2
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +4 -0
- package/dist/types/components/snk-entity-list/snk-entity-list.d.ts +0 -4
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +0 -3
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +1 -1
- package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.d.ts +5 -4
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +4 -0
- package/dist/types/components/snk-form/SnkFormConfigManager.d.ts +5 -4
- package/dist/types/components/snk-form/snk-form.d.ts +9 -1
- package/dist/types/components/snk-form/subcomponents/snk-form-config/snk-form-config.d.ts +0 -2
- package/dist/types/components/snk-grid/snk-grid.d.ts +17 -1
- package/dist/types/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.d.ts +4 -0
- package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +5 -1
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +4 -0
- package/dist/types/components/snk-taskbar/processor/taskbar-processor.d.ts +2 -2
- package/dist/types/components/snk-taskbar/snk-taskbar-custom-elements.d.ts +7 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +27 -0
- package/dist/types/components.d.ts +203 -22
- package/dist/types/lib/configs/ConfigStorage.d.ts +11 -13
- package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +2 -8
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +2 -2
- package/dist/types/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.d.ts +0 -1
- package/dist/types/lib/index.d.ts +11 -0
- package/dist/types/lib/resourceid/ResourceIDUtils.d.ts +3 -0
- package/dist/types/lib/utils/PrintUtils.d.ts +1 -0
- package/dist/types/lib/utils/urlutils.d.ts +14 -0
- package/package.json +2 -2
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/filter-bar-config-fetcher-24548cec.js +0 -155
- package/dist/cjs/resource-fetcher-64102551.js +0 -68
- package/dist/components/filter-bar-config-fetcher.js +0 -153
- package/dist/components/resource-fetcher.js +0 -66
- package/dist/esm/filter-bar-config-fetcher-2417b8cf.js +0 -153
- package/dist/esm/resource-fetcher-45a70066.js +0 -66
- package/dist/sankhyablocks/p-0848ee4d.entry.js +0 -1
- package/dist/sankhyablocks/p-0bd9c412.js +0 -1
- package/dist/sankhyablocks/p-0fb83448.js +0 -1
- package/dist/sankhyablocks/p-10b2aedc.entry.js +0 -1
- package/dist/sankhyablocks/p-1f63dcd4.entry.js +0 -1
- package/dist/sankhyablocks/p-216b2102.entry.js +0 -1
- package/dist/sankhyablocks/p-216f081a.entry.js +0 -1
- package/dist/sankhyablocks/p-44e66c8d.js +0 -1
- package/dist/sankhyablocks/p-4514fc6a.entry.js +0 -1
- package/dist/sankhyablocks/p-50c13cc8.entry.js +0 -1
- package/dist/sankhyablocks/p-52c6b2e7.js +0 -1
- package/dist/sankhyablocks/p-564efc43.js +0 -1
- package/dist/sankhyablocks/p-5994af77.js +0 -56
- package/dist/sankhyablocks/p-6bb904bb.entry.js +0 -1
- package/dist/sankhyablocks/p-6e06175e.entry.js +0 -1
- package/dist/sankhyablocks/p-6f0795c8.entry.js +0 -1
- package/dist/sankhyablocks/p-7588f006.entry.js +0 -1
- package/dist/sankhyablocks/p-847e6c20.js +0 -17
- package/dist/sankhyablocks/p-8f3652bf.entry.js +0 -11
- package/dist/sankhyablocks/p-9471cbc9.entry.js +0 -1
- package/dist/sankhyablocks/p-a42dd503.entry.js +0 -1
- package/dist/sankhyablocks/p-b04fb9d4.js +0 -1
- package/dist/sankhyablocks/p-befbc9ee.entry.js +0 -1
- package/dist/sankhyablocks/p-c32b9d7c.entry.js +0 -1
- package/dist/sankhyablocks/p-c6380ea2.entry.js +0 -1
- package/dist/sankhyablocks/p-c6feb995.entry.js +0 -1
- package/dist/sankhyablocks/p-d7c7a289.entry.js +0 -1
- package/dist/sankhyablocks/p-de69b4b0.entry.js +0 -1
- package/dist/sankhyablocks/p-f3b7b69e.js +0 -10
- package/dist/sankhyablocks/p-f7eded3a.entry.js +0 -1
- package/dist/sankhyablocks/p-ff7383b0.entry.js +0 -1
@@ -1,11 +1,17 @@
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
|
2
2
|
import { ApplicationContext, StringUtils, ErrorException, WarningException, ObjectUtils, DateUtils, ArrayUtils, ElementIDUtils } from '@sankhyalabs/core';
|
3
|
-
import { D as DataFetcher } from './DataFetcher-
|
3
|
+
import { D as DataFetcher } from './DataFetcher-1618bffe.js';
|
4
4
|
import { P as ParamType } from './ParamType-d5152b06.js';
|
5
|
-
import './pesquisa-fetcher-
|
5
|
+
import './pesquisa-fetcher-19e81fc8.js';
|
6
6
|
import './index-1564817d.js';
|
7
|
-
import './
|
7
|
+
import './ISave-4412b20c.js';
|
8
|
+
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
8
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
10
|
+
import './filter-item-type.enum-5028ed3f.js';
|
11
|
+
import './form-config-fetcher-2fe67341.js';
|
12
|
+
import { R as ResourceIDUtils } from './ResourceIDUtils-a114189a.js';
|
13
|
+
import './_commonjsHelpers-9943807e.js';
|
14
|
+
import './PrintUtils-3e4ff0f5.js';
|
9
15
|
|
10
16
|
const SERVICE_ACTION_EXECUTE_JAVA = 'ActionButtonsSP.executeJava';
|
11
17
|
class JavaExecutor {
|
@@ -160,13 +166,14 @@ const ENTITY_NAME_PROPERTY = '__ENTITY_NAME__';
|
|
160
166
|
const NUFIN_COLUMN = 'NUFIN';
|
161
167
|
const SERVICE_GET_CONFIGURATIONS = 'SystemUtilsSP.getConf';
|
162
168
|
class Actions {
|
163
|
-
constructor(actionsExecuteInterface, dataUnit) {
|
169
|
+
constructor(actionsExecuteInterface, dataUnit, appResourceId) {
|
164
170
|
var _a;
|
165
171
|
this._lastValuesCache = {};
|
166
172
|
this._actionsExecuteInterface = actionsExecuteInterface;
|
167
173
|
this._dataUnit = dataUnit;
|
168
174
|
this._selectedRows = ((_a = dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.getSelectionInfo()) === null || _a === void 0 ? void 0 : _a.isAllRecords()) ? [] : dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.getSelectionInfo().records;
|
169
175
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
176
|
+
this._appResourceId = appResourceId;
|
170
177
|
}
|
171
178
|
apply(action, hasParamsToSave) {
|
172
179
|
this._application.closePopUp();
|
@@ -429,9 +436,7 @@ class Actions {
|
|
429
436
|
}
|
430
437
|
}
|
431
438
|
async buildResourceId(actionId) {
|
432
|
-
|
433
|
-
appResId = await this._application.getResourceID();
|
434
|
-
return appResId + '.actionconfig.' + actionId;
|
439
|
+
return this._appResourceId + '.actionconfig.' + actionId;
|
435
440
|
}
|
436
441
|
prepareAndExecute(execSource, executeAction) {
|
437
442
|
this.addRows(execSource);
|
@@ -589,7 +594,7 @@ const SnkActionsButton = class {
|
|
589
594
|
this.handleClick = (evt) => {
|
590
595
|
const selectedAction = this._actions.find((action) => action.actionID == evt.detail.id);
|
591
596
|
const executor = new ExecutorFactory(selectedAction.type).executor;
|
592
|
-
const action = new Actions(executor, this._dataUnit);
|
597
|
+
const action = new Actions(executor, this._dataUnit, this._resourceID);
|
593
598
|
action.execute(Object.assign({}, selectedAction));
|
594
599
|
this._showDropdown = false;
|
595
600
|
};
|
@@ -647,12 +652,15 @@ const SnkActionsButton = class {
|
|
647
652
|
document.addEventListener("scroll", this.positionDropdown.bind(this));
|
648
653
|
}
|
649
654
|
async componentWillLoad() {
|
650
|
-
var _a;
|
651
655
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
652
|
-
this._resourceID = await this._application.getResourceID();
|
653
656
|
this._isOrderActions = await this._application.getBooleanParam('global.ordenar.acoes.personalizadas');
|
654
|
-
|
657
|
+
const snkDataUnit = this._element.parentElement;
|
658
|
+
this._dataUnit = snkDataUnit === null || snkDataUnit === void 0 ? void 0 : snkDataUnit.dataUnit;
|
659
|
+
this._resourceID = snkDataUnit === null || snkDataUnit === void 0 ? void 0 : snkDataUnit.resourceID;
|
655
660
|
this._entityName = this._dataUnit.name.split('/')[2];
|
661
|
+
if (this._resourceID == undefined) {
|
662
|
+
this._resourceID = await ResourceIDUtils.getResourceID();
|
663
|
+
}
|
656
664
|
this.setEvents();
|
657
665
|
this.getActions().then(() => {
|
658
666
|
this.loadItems();
|
@@ -1,17 +1,16 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a7d3d3f1.js';
|
2
2
|
import { WaitingChangeException, WarningException, ErrorException, ObjectUtils, DateUtils, StringUtils, OnboardingUtils, DependencyType, ElementIDUtils, ApplicationContext, ErrorTracking, DataType } from '@sankhyalabs/core';
|
3
|
-
import { d as dist, D as DataFetcher, U as UrlUtils } from './DataFetcher-
|
3
|
+
import { d as dist, D as DataFetcher, U as UrlUtils } from './DataFetcher-1618bffe.js';
|
4
4
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
5
|
-
import { P as PesquisaFetcher } from './pesquisa-fetcher-
|
6
|
-
import {
|
7
|
-
import { D as DataUnitFetcher } from './dataunit-fetcher-
|
8
|
-
import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher-
|
5
|
+
import { P as PesquisaFetcher } from './pesquisa-fetcher-19e81fc8.js';
|
6
|
+
import { C as ConfigStorage } from './ConfigStorage-4441aa3d.js';
|
7
|
+
import { D as DataUnitFetcher } from './dataunit-fetcher-53c007be.js';
|
8
|
+
import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher-7861187e.js';
|
9
9
|
import { S as SnkMessageBuilder } from './SnkMessageBuilder-68c1c25a.js';
|
10
10
|
import './_commonjsHelpers-9943807e.js';
|
11
11
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
12
|
-
import './
|
13
|
-
import './
|
14
|
-
import './filter-bar-config-fetcher-2417b8cf.js';
|
12
|
+
import './PrintUtils-3e4ff0f5.js';
|
13
|
+
import './form-config-fetcher-2fe67341.js';
|
15
14
|
import './filter-item-type.enum-5028ed3f.js';
|
16
15
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
17
16
|
|
@@ -252,16 +251,21 @@ const SnkApplication = class {
|
|
252
251
|
}
|
253
252
|
return this._parameters;
|
254
253
|
}
|
255
|
-
|
256
|
-
if (
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
254
|
+
async getAuth(resourceID) {
|
255
|
+
if (resourceID == undefined) {
|
256
|
+
return this.getApplicationAuth();
|
257
|
+
}
|
258
|
+
else {
|
259
|
+
return new Promise((resolve, reject) => {
|
260
|
+
this.authFetcher.getData(resourceID).then((authList) => {
|
261
|
+
resolve(authList);
|
262
|
+
}).catch(error => {
|
263
|
+
reject(error);
|
264
|
+
});
|
265
|
+
});
|
261
266
|
}
|
262
|
-
return this._resourceID;
|
263
267
|
}
|
264
|
-
|
268
|
+
async getApplicationAuth() {
|
265
269
|
if (this._auth) {
|
266
270
|
return Promise.resolve(this._auth);
|
267
271
|
}
|
@@ -270,7 +274,7 @@ const SnkApplication = class {
|
|
270
274
|
const waitingAuth = this._authPromises.length > 0;
|
271
275
|
this._authPromises.push(new PendingPromise(resolve, reject));
|
272
276
|
if (!waitingAuth) {
|
273
|
-
this.authFetcher.getData(this.
|
277
|
+
this.authFetcher.getData(this.applicationResourceID).then((authList) => {
|
274
278
|
this._auth = authList;
|
275
279
|
while (this._authPromises.length > 0) {
|
276
280
|
this._authPromises.pop().resolve(this._auth);
|
@@ -289,13 +293,23 @@ const SnkApplication = class {
|
|
289
293
|
*/
|
290
294
|
async isUserSup() {
|
291
295
|
return new Promise((resolve, reject) => {
|
292
|
-
this.
|
296
|
+
this.getAuth().then((authorization) => {
|
293
297
|
this.getAuthList(authorization).then((auths) => {
|
294
298
|
resolve(auths.isSup);
|
295
299
|
}).catch(error => reject(error));
|
296
300
|
});
|
297
301
|
});
|
298
302
|
}
|
303
|
+
/**
|
304
|
+
* Realiza a chamada ao Service Broker conforme o nome do serviço.
|
305
|
+
*
|
306
|
+
* @param serviceName - Nome do serviço
|
307
|
+
* @param payload - Dados que serão processados na ação
|
308
|
+
* @param options - Parâmetros de URL
|
309
|
+
*/
|
310
|
+
async callServiceBroker(serviceName, payload, options) {
|
311
|
+
return DataFetcher.get().callServiceBroker(serviceName, payload, options);
|
312
|
+
}
|
299
313
|
initOnboarding(onboardingKey) {
|
300
314
|
OnboardingUtils.getInstance().init(onboardingKey, window.envContext);
|
301
315
|
return Promise.resolve();
|
@@ -303,9 +317,9 @@ const SnkApplication = class {
|
|
303
317
|
/**
|
304
318
|
* Obtém `true` caso o usuário logado tem permissão pra determinada ação.
|
305
319
|
*/
|
306
|
-
async hasAccess(access) {
|
320
|
+
async hasAccess(access, resourceID) {
|
307
321
|
return new Promise((resolve, reject) => {
|
308
|
-
this.
|
322
|
+
this.getAuth(resourceID).then((authorization) => {
|
309
323
|
this.getAuthList(authorization).then((auths) => {
|
310
324
|
resolve(auths.isSup || auths.actions[access]);
|
311
325
|
}).catch(error => reject(error));
|
@@ -315,9 +329,9 @@ const SnkApplication = class {
|
|
315
329
|
/**
|
316
330
|
* Obtém todos os acessos do usuário logado.
|
317
331
|
*/
|
318
|
-
async getAllAccess() {
|
332
|
+
async getAllAccess(resourceID) {
|
319
333
|
return new Promise((resolve, reject) => {
|
320
|
-
this.
|
334
|
+
this.getAuth(resourceID).then((authorization) => {
|
321
335
|
this.getAuthList(authorization).then((auths) => {
|
322
336
|
const allAccess = {};
|
323
337
|
allAccess['isSup'] = auths.isSup;
|
@@ -501,13 +515,16 @@ const SnkApplication = class {
|
|
501
515
|
* Cria o DataUnit a partir do nome da entidade. É possível armazená-lo no cache
|
502
516
|
* passando o dataUnitName, assim, se mais de uma chamada for feita, o mesmo DataUnit será usado.
|
503
517
|
*/
|
504
|
-
async createDataunit(entityName, dataUnitName, parentDataUnit, configName) {
|
518
|
+
async createDataunit(entityName, dataUnitName, parentDataUnit, configName, resourceID) {
|
519
|
+
if (resourceID == undefined) {
|
520
|
+
resourceID = this.applicationResourceID;
|
521
|
+
}
|
505
522
|
return new Promise((resolve, reject) => {
|
506
523
|
const duPromisses = this.getDuPromissesStack(dataUnitName);
|
507
524
|
const waitingDu = duPromisses.length > 0;
|
508
525
|
duPromisses.push(new PendingPromise(resolve, reject));
|
509
526
|
if (!waitingDu) {
|
510
|
-
const dataUnit = this.dataUnitFetcher.getDataUnit(entityName,
|
527
|
+
const dataUnit = this.dataUnitFetcher.getDataUnit(entityName, resourceID, parentDataUnit, configName);
|
511
528
|
dataUnit.loadMetadata().then(() => {
|
512
529
|
if (dataUnitName) {
|
513
530
|
this.updateDataunitCache(undefined, dataUnitName, dataUnit);
|
@@ -538,14 +555,14 @@ const SnkApplication = class {
|
|
538
555
|
/**
|
539
556
|
* Obtem um DataUnit do cache ou cria um caso ainda não tenha sido criado.
|
540
557
|
*/
|
541
|
-
async getDataUnit(entityName, dataUnitName, parentDataUnit, configName) {
|
558
|
+
async getDataUnit(entityName, dataUnitName, parentDataUnit, configName, resourceID) {
|
542
559
|
return new Promise((resolve, reject) => {
|
543
560
|
const dataUnit = this._duCache.get(dataUnitName);
|
544
561
|
if (dataUnit) {
|
545
562
|
resolve(dataUnit);
|
546
563
|
}
|
547
564
|
else {
|
548
|
-
this.createDataunit(entityName, dataUnitName, parentDataUnit, configName).then(dataUnit => {
|
565
|
+
this.createDataunit(entityName, dataUnitName, parentDataUnit, configName, resourceID).then(dataUnit => {
|
549
566
|
resolve(dataUnit);
|
550
567
|
}).catch(reason => reject(reason));
|
551
568
|
}
|
@@ -594,11 +611,20 @@ const SnkApplication = class {
|
|
594
611
|
async callServiceBroker(serviceName, payload, options) {
|
595
612
|
return DataFetcher.get().callServiceBroker(serviceName, payload, options);
|
596
613
|
}
|
614
|
+
get applicationResourceID() {
|
615
|
+
if (!this._applicationResourceID) {
|
616
|
+
this._applicationResourceID = this.urlParams.get("workspaceResourceID") ||
|
617
|
+
this.urlParams.get("resourceID") ||
|
618
|
+
Workspace.resourceID ||
|
619
|
+
"unknown.resource.id";
|
620
|
+
}
|
621
|
+
return this._applicationResourceID;
|
622
|
+
}
|
597
623
|
/**
|
598
624
|
* Obtém o resourceID da tela em questão.
|
599
625
|
*/
|
600
626
|
async getResourceID() {
|
601
|
-
return Promise.resolve(this.
|
627
|
+
return Promise.resolve(this.applicationResourceID);
|
602
628
|
}
|
603
629
|
/**
|
604
630
|
* Obtém o UserId da tela em questão.
|
@@ -642,20 +668,14 @@ const SnkApplication = class {
|
|
642
668
|
async info(message, options) {
|
643
669
|
return ApplicationUtils.info(message, options);
|
644
670
|
}
|
645
|
-
/**
|
646
|
-
* Obtém a configuração de grade.
|
647
|
-
*/
|
648
|
-
async loadGridConfig(name) {
|
649
|
-
return this.gridConfigFetcher.getConfig(name, this.resourceID);
|
650
|
-
}
|
651
671
|
/**
|
652
672
|
* Obtém os totalizadores da grade.
|
653
673
|
*/
|
654
674
|
async loadTotals(name, resourceID, filters) {
|
655
675
|
return this.totalsFetcher.fetchTotals(name, resourceID, filters);
|
656
676
|
}
|
657
|
-
async getAuthList(
|
658
|
-
return await (new MGEAuthorization()).parseFromJSON(
|
677
|
+
async getAuthList(auth) {
|
678
|
+
return await (new MGEAuthorization()).parseFromJSON(auth);
|
659
679
|
}
|
660
680
|
get urlParams() {
|
661
681
|
if (!this._urlParams) {
|
@@ -669,12 +689,6 @@ const SnkApplication = class {
|
|
669
689
|
}
|
670
690
|
return this._dataUnitFetcher;
|
671
691
|
}
|
672
|
-
get gridConfigFetcher() {
|
673
|
-
if (!this._gridConfigFetcher) {
|
674
|
-
this._gridConfigFetcher = new GridConfigFetcher();
|
675
|
-
}
|
676
|
-
return this._gridConfigFetcher;
|
677
|
-
}
|
678
692
|
get totalsFetcher() {
|
679
693
|
if (!this._totalsFetcher) {
|
680
694
|
this._totalsFetcher = new TotalsFetcher();
|
@@ -772,7 +786,7 @@ const SnkApplication = class {
|
|
772
786
|
* Obtém o nome das telas da aplicação
|
773
787
|
*/
|
774
788
|
async getAppLabel() {
|
775
|
-
return Workspace.getAppLabel(this.
|
789
|
+
return Workspace.getAppLabel(this.applicationResourceID);
|
776
790
|
}
|
777
791
|
/**
|
778
792
|
* Adiciona um listener no fetcher de Pesquisa
|
@@ -844,6 +858,7 @@ const SnkApplication = class {
|
|
844
858
|
this._popUp.ezTitle = title;
|
845
859
|
}
|
846
860
|
componentWillLoad() {
|
861
|
+
ApplicationContext.setContextValue("__SNK__APPLICATION__LOADING__", true);
|
847
862
|
this._errorHandler = new SnkErrorHandler(this);
|
848
863
|
this.messagesBuilder = new SnkMessageBuilder();
|
849
864
|
ApplicationContext.setContextValue("__EZUI__UPLOAD__ADD__URL__", `${UrlUtils.getUrlBase()}/mge/upload/file`);
|
@@ -852,7 +867,7 @@ const SnkApplication = class {
|
|
852
867
|
});
|
853
868
|
ApplicationContext.setContextValue("__EZUI__GRID_LICENSE__", agGridLicense);
|
854
869
|
ErrorTracking.init();
|
855
|
-
ConfigStorage.
|
870
|
+
ConfigStorage.preload(this.applicationResourceID, this.configName);
|
856
871
|
}
|
857
872
|
connectedCallback() {
|
858
873
|
ApplicationContext.setContextValue("__SNK__APPLICATION__", this);
|
@@ -864,9 +879,10 @@ const SnkApplication = class {
|
|
864
879
|
componentDidLoad() {
|
865
880
|
this.applicationLoading.emit(true);
|
866
881
|
window.requestAnimationFrame(() => {
|
882
|
+
ApplicationContext.setContextValue("__SNK__APPLICATION__LOADING__", false);
|
867
883
|
this.applicationLoaded.emit(true);
|
868
884
|
});
|
869
|
-
ElementIDUtils.addIDInfo(this._element, `resource_${this.
|
885
|
+
ElementIDUtils.addIDInfo(this._element, `resource_${this.applicationResourceID}`);
|
870
886
|
}
|
871
887
|
render() {
|
872
888
|
return (h("div", null, h("ez-loading-bar", { ref: (ref) => this._requestListener.loadingBar = ref }), h("ez-popup", { opened: false, ref: (ref) => this._popUp = ref, onEzClosePopup: () => this.closePopUp() }), h("ez-modal", { opened: false, ref: (ref) => this._rightModal = ref, "modal-size": "small", closeOutsideClick: true, closeEsc: true })));
|
@@ -1,22 +1,17 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-a7d3d3f1.js';
|
2
2
|
import { ApplicationContext, DataType, Action } from '@sankhyalabs/core';
|
3
|
-
import { D as DataFetcher } from './DataFetcher-
|
3
|
+
import { D as DataFetcher } from './DataFetcher-1618bffe.js';
|
4
|
+
import { S as SaveErrorsEnum } from './ISave-4412b20c.js';
|
4
5
|
import { c as VIEW_MODE } from './constants-3644f1b6.js';
|
5
|
-
import { D as DataUnitFetcher } from './dataunit-fetcher-
|
6
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
6
|
+
import { D as DataUnitFetcher } from './dataunit-fetcher-53c007be.js';
|
7
|
+
import { T as TaskbarElement } from './taskbar-elements-0a6b8b95.js';
|
7
8
|
import './_commonjsHelpers-9943807e.js';
|
8
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
10
|
+
import './PrintUtils-3e4ff0f5.js';
|
9
11
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
10
12
|
import './index-1564817d.js';
|
11
13
|
import './index-bdf75557.js';
|
12
14
|
|
13
|
-
var SaveErrorsEnum;
|
14
|
-
(function (SaveErrorsEnum) {
|
15
|
-
SaveErrorsEnum["LINK_AND_FILE_AT_THE_SAME_TIME"] = "LINK_AND_FILE_AT_THE_SAME_TIME";
|
16
|
-
SaveErrorsEnum["ANY_LINK_OR_FILE_FILLED"] = "ANY_LINK_OR_FILE_FILLED";
|
17
|
-
SaveErrorsEnum["UNKNOWN"] = "UNKNOWN";
|
18
|
-
})(SaveErrorsEnum || (SaveErrorsEnum = {}));
|
19
|
-
|
20
15
|
class AttachFetcher {
|
21
16
|
constructor(entityName, registerKey, dataUnitName) {
|
22
17
|
var _a;
|
@@ -16,6 +16,7 @@ const SnkConfigurator = class {
|
|
16
16
|
this._permissions = undefined;
|
17
17
|
this.showActionButtons = false;
|
18
18
|
this.configName = undefined;
|
19
|
+
this.resourceID = undefined;
|
19
20
|
this.viewMode = VIEW_MODE.GRID;
|
20
21
|
this.messagesBuilder = undefined;
|
21
22
|
}
|
@@ -80,7 +81,7 @@ const SnkConfigurator = class {
|
|
80
81
|
componentWillLoad() {
|
81
82
|
this._application = ApplicationContext.getContextValue('__SNK__APPLICATION__');
|
82
83
|
if (this._application) {
|
83
|
-
this._application.getAllAccess().then(access => (this._permissions = access));
|
84
|
+
this._application.getAllAccess(this.resourceID).then(access => (this._permissions = access));
|
84
85
|
}
|
85
86
|
else {
|
86
87
|
this._permissions = {};
|
@@ -1,15 +1,19 @@
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a7d3d3f1.js';
|
2
|
-
import { ElementIDUtils, ApplicationContext } from '@sankhyalabs/core';
|
3
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
4
|
-
import './DataFetcher-
|
5
|
-
import './pesquisa-fetcher-
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
|
2
|
+
import { StringUtils, ElementIDUtils, ApplicationContext } from '@sankhyalabs/core';
|
3
|
+
import { T as TaskbarElement } from './taskbar-elements-0a6b8b95.js';
|
4
|
+
import './DataFetcher-1618bffe.js';
|
5
|
+
import './pesquisa-fetcher-19e81fc8.js';
|
6
6
|
import { P as PresentationMode } from './index-1564817d.js';
|
7
|
+
import './ISave-4412b20c.js';
|
8
|
+
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
9
|
+
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
10
|
+
import './filter-item-type.enum-5028ed3f.js';
|
11
|
+
import './form-config-fetcher-2fe67341.js';
|
7
12
|
import { c as VIEW_MODE } from './constants-3644f1b6.js';
|
8
|
-
import { A as AutorizationType } from './auth-fetcher-
|
13
|
+
import { A as AutorizationType } from './auth-fetcher-7861187e.js';
|
9
14
|
import './index-bdf75557.js';
|
10
15
|
import './_commonjsHelpers-9943807e.js';
|
11
|
-
import '
|
12
|
-
import './resource-fetcher-45a70066.js';
|
16
|
+
import './PrintUtils-3e4ff0f5.js';
|
13
17
|
|
14
18
|
const snkCrudCss = ".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%}";
|
15
19
|
|
@@ -19,12 +23,14 @@ const SnkCrud = class {
|
|
19
23
|
this.actionClick = createEvent(this, "actionClick", 7);
|
20
24
|
this.configuratorSave = createEvent(this, "configuratorSave", 7);
|
21
25
|
this.configuratorCancel = createEvent(this, "configuratorCancel", 7);
|
26
|
+
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
22
27
|
this._viewHistory = [];
|
23
28
|
this._dataUnit = undefined;
|
24
29
|
this._dataState = undefined;
|
25
30
|
this.attachmentRegisterKey = undefined;
|
26
31
|
this._currentViewMode = VIEW_MODE.GRID;
|
27
32
|
this._canEdit = undefined;
|
33
|
+
this._resourceID = undefined;
|
28
34
|
this.configName = undefined;
|
29
35
|
this.selectionToastConfig = undefined;
|
30
36
|
this.showActionButtons = false;
|
@@ -36,6 +42,7 @@ const SnkCrud = class {
|
|
36
42
|
this.presentationMode = PresentationMode.PRIMARY;
|
37
43
|
this.messagesBuilder = undefined;
|
38
44
|
this.useEnterLikeTab = false;
|
45
|
+
this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
|
39
46
|
}
|
40
47
|
/**
|
41
48
|
* Usado para alternar a visão entre GRID e FORM externamente.
|
@@ -119,7 +126,7 @@ const SnkCrud = class {
|
|
119
126
|
}
|
120
127
|
componentWillLoad() {
|
121
128
|
const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
122
|
-
application.hasAccess(AutorizationType.UPDATE).then(canEdit => this._canEdit = canEdit);
|
129
|
+
application.hasAccess(AutorizationType.UPDATE, this._resourceID).then(canEdit => this._canEdit = canEdit);
|
123
130
|
let parent = this._element.parentElement;
|
124
131
|
while (parent) {
|
125
132
|
if (parent.tagName.toUpperCase() === "SNK-DATA-UNIT") {
|
@@ -131,11 +138,11 @@ const SnkCrud = class {
|
|
131
138
|
if (!this._dataUnit) {
|
132
139
|
this._snkDataUnit.addEventListener("dataUnitReady", (evt) => {
|
133
140
|
this._dataUnit = evt.detail;
|
134
|
-
this.initDataUnit();
|
141
|
+
this.initDataUnit(application);
|
135
142
|
});
|
136
143
|
}
|
137
144
|
else {
|
138
|
-
this.initDataUnit();
|
145
|
+
this.initDataUnit(application);
|
139
146
|
}
|
140
147
|
this._snkDataUnit.addEventListener("dataStateChange", async ({ detail: dataState }) => {
|
141
148
|
this._dataState = dataState;
|
@@ -151,11 +158,18 @@ const SnkCrud = class {
|
|
151
158
|
this.configName = application.configName;
|
152
159
|
}
|
153
160
|
}
|
154
|
-
initDataUnit() {
|
161
|
+
async initDataUnit(application) {
|
155
162
|
this.addDataElementID();
|
156
163
|
if (!this.messagesBuilder) {
|
157
164
|
this.messagesBuilder = this._snkDataUnit.messagesBuilder;
|
158
165
|
}
|
166
|
+
if (this._resourceID == undefined) {
|
167
|
+
//Tenta pegar o resourceID do snkDataUnit;
|
168
|
+
this._resourceID = this._snkDataUnit.resourceID;
|
169
|
+
if (this._resourceID == undefined) {
|
170
|
+
this._resourceID = await application.getResourceID();
|
171
|
+
}
|
172
|
+
}
|
159
173
|
}
|
160
174
|
handleConfiguratorEvent(evt, type) {
|
161
175
|
evt.stopImmediatePropagation();
|
@@ -166,8 +180,11 @@ const SnkCrud = class {
|
|
166
180
|
this.configuratorCancel.emit();
|
167
181
|
}
|
168
182
|
render() {
|
183
|
+
if (this._resourceID == undefined) {
|
184
|
+
return;
|
185
|
+
}
|
169
186
|
this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
|
170
|
-
return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit }, h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit }, h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL') }, h("div", { slot: "SnkConfigContainerSlot" }, h("slot", { name: "SnkConfigContainerSlot" })))));
|
187
|
+
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID }, h("div", { slot: "SnkConfigContainerSlot" }, h("slot", { name: "SnkConfigContainerSlot" })))), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
171
188
|
}
|
172
189
|
get _element() { return getElement(this); }
|
173
190
|
static get watchers() { return {
|
@@ -3,10 +3,11 @@ import { ObjectUtils, ApplicationContext, DataType, ElementIDUtils } from '@sank
|
|
3
3
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
4
4
|
import { D as DataExporterOption, a as DataExporterFormat, b as DataExporterType } from './index-1564817d.js';
|
5
5
|
import { R as REPORT_LAUNCHER_RESOURCE_ID } from './constants-3644f1b6.js';
|
6
|
-
import { D as DataFetcher } from './DataFetcher-
|
7
|
-
import { S as SnkDataUnit } from './snk-data-unit-
|
6
|
+
import { D as DataFetcher } from './DataFetcher-1618bffe.js';
|
7
|
+
import { S as SnkDataUnit } from './snk-data-unit-1715d2f1.js';
|
8
8
|
import './_commonjsHelpers-9943807e.js';
|
9
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
10
|
+
import './PrintUtils-3e4ff0f5.js';
|
10
11
|
import './SnkMessageBuilder-68c1c25a.js';
|
11
12
|
|
12
13
|
class ItemBuilder {
|
@@ -70,6 +70,7 @@ const SnkDataUnit = class {
|
|
70
70
|
this.useCancelConfirm = true;
|
71
71
|
this.ignoreSaveMessage = undefined;
|
72
72
|
this.configName = undefined;
|
73
|
+
this.resourceID = undefined;
|
73
74
|
}
|
74
75
|
observePageSize() {
|
75
76
|
if (this.dataUnit) {
|
@@ -333,10 +334,10 @@ const SnkDataUnit = class {
|
|
333
334
|
const cacheName = this.dataUnitName ? this.dataUnitName : this.entityName;
|
334
335
|
if (this._parentSnkDataUnit) {
|
335
336
|
this._parentDataUnit = await ((_a = this._parentSnkDataUnit) === null || _a === void 0 ? void 0 : _a.getDataUnit());
|
336
|
-
return await this._application.getDataUnit(this.entityName, cacheName, this._parentDataUnit, this.configName);
|
337
|
+
return await this._application.getDataUnit(this.entityName, cacheName, this._parentDataUnit, this.configName, this.resourceID);
|
337
338
|
}
|
338
339
|
else {
|
339
|
-
return await this._application.getDataUnit(this.entityName, cacheName, null, this.configName);
|
340
|
+
return await this._application.getDataUnit(this.entityName, cacheName, null, this.configName, this.resourceID);
|
340
341
|
}
|
341
342
|
}
|
342
343
|
async loadDataUnit() {
|
@@ -395,7 +396,7 @@ const SnkDataUnit = class {
|
|
395
396
|
//---------------------------------------------
|
396
397
|
componentWillLoad() {
|
397
398
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
398
|
-
this._application.getAllAccess().then(access => this._permissions = access);
|
399
|
+
this._application.getAllAccess(this.resourceID).then(access => this._permissions = access);
|
399
400
|
this._parentSnkDataUnit = this.getParentSnkDataUnit();
|
400
401
|
if (this.messagesBuilder == undefined) {
|
401
402
|
this.messagesBuilder = new SnkMessageBuilder(this.entityName);
|
@@ -403,8 +404,7 @@ const SnkDataUnit = class {
|
|
403
404
|
}
|
404
405
|
disconnectedCallback() {
|
405
406
|
if (this.dataUnit) {
|
406
|
-
this.dataUnit.
|
407
|
-
this.dataUnit.removeInterceptor(this);
|
407
|
+
this.dataUnit.releaseCallbacks();
|
408
408
|
}
|
409
409
|
}
|
410
410
|
componentDidLoad() {
|
@@ -1,21 +1,22 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host } from './index-a7d3d3f1.js';
|
2
|
-
import { S as SnkFormConfigManager } from './SnkFormConfigManager-
|
2
|
+
import { S as SnkFormConfigManager } from './SnkFormConfigManager-5a5f85a3.js';
|
3
3
|
import { FormMetadata, buildFormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
4
|
-
import './DataFetcher-
|
5
|
-
import './pesquisa-fetcher-
|
4
|
+
import './DataFetcher-1618bffe.js';
|
5
|
+
import './pesquisa-fetcher-19e81fc8.js';
|
6
6
|
import '@sankhyalabs/core';
|
7
7
|
import { P as PresentationMode } from './index-1564817d.js';
|
8
|
-
import
|
8
|
+
import './ISave-4412b20c.js';
|
9
|
+
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
10
|
+
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
11
|
+
import './filter-item-type.enum-5028ed3f.js';
|
12
|
+
import './form-config-fetcher-2fe67341.js';
|
13
|
+
import { T as TaskbarElement } from './taskbar-elements-0a6b8b95.js';
|
9
14
|
import { c as VIEW_MODE } from './constants-3644f1b6.js';
|
10
|
-
import { S as SnkGuidesViewer } from './snk-guides-viewer-
|
15
|
+
import { S as SnkGuidesViewer } from './snk-guides-viewer-e4fe884d.js';
|
11
16
|
import { S as SnkMessageBuilder } from './SnkMessageBuilder-68c1c25a.js';
|
12
|
-
import './ConfigStorage-
|
13
|
-
import './form-config-fetcher-4065db9a.js';
|
14
|
-
import './resource-fetcher-45a70066.js';
|
15
|
-
import './filter-bar-config-fetcher-2417b8cf.js';
|
16
|
-
import './filter-item-type.enum-5028ed3f.js';
|
17
|
+
import './ConfigStorage-4441aa3d.js';
|
17
18
|
import './_commonjsHelpers-9943807e.js';
|
18
|
-
import '
|
19
|
+
import './PrintUtils-3e4ff0f5.js';
|
19
20
|
import './index-bdf75557.js';
|
20
21
|
import './taskbar-processor-94402e6e.js';
|
21
22
|
import '@sankhyalabs/core/dist/dataunit/DataUnit';
|
@@ -70,11 +71,13 @@ const SnkDetailView = class {
|
|
70
71
|
registerInstance(this, hostRef);
|
71
72
|
this.snkDetailGuidesChange = createEvent(this, "snkDetailGuidesChange", 7);
|
72
73
|
this.snkSwitchGuide = createEvent(this, "snkSwitchGuide", 7);
|
74
|
+
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
73
75
|
this._disabledButtons = undefined;
|
74
76
|
this._currentView = undefined;
|
75
77
|
this.attachmentRegisterKey = undefined;
|
76
78
|
this.formConfigManager = undefined;
|
77
79
|
this.dataUnitName = undefined;
|
80
|
+
this.resourceID = undefined;
|
78
81
|
this.guideItemPath = undefined;
|
79
82
|
this.entityName = undefined;
|
80
83
|
this.label = undefined;
|
@@ -84,6 +87,7 @@ const SnkDetailView = class {
|
|
84
87
|
this.messagesBuilder = undefined;
|
85
88
|
this.branchGuide = undefined;
|
86
89
|
this.canEdit = true;
|
90
|
+
this.taskbarCustomContainerId = undefined;
|
87
91
|
}
|
88
92
|
observerDataState(newValue, oldValue) {
|
89
93
|
const openInsertion = !(oldValue === null || oldValue === void 0 ? void 0 : oldValue.insertionMode) && (newValue === null || newValue === void 0 ? void 0 : newValue.insertionMode);
|
@@ -244,7 +248,7 @@ const SnkDetailView = class {
|
|
244
248
|
}
|
245
249
|
componentWillLoad() {
|
246
250
|
this._configName = `dynaform.${this.entityName}`;
|
247
|
-
this.formConfigManager = new SnkFormConfigManager(this._configName, () => this.loadMetadata());
|
251
|
+
this.formConfigManager = new SnkFormConfigManager(this._configName, this.resourceID, () => this.loadMetadata());
|
248
252
|
this.formConfigManager.loadConfig();
|
249
253
|
if (this.messagesBuilder == undefined) {
|
250
254
|
this.messagesBuilder = new SnkMessageBuilder(this.entityName);
|
@@ -253,7 +257,7 @@ const SnkDetailView = class {
|
|
253
257
|
render() {
|
254
258
|
this.updateLabel();
|
255
259
|
//const cardConfig: IFormCardConfig = this._cardsState?.get(this.selectedForm);
|
256
|
-
return (h(Host, null, 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 === VIEW_MODE.GRID, messagesBuilder: this.messagesBuilder, configName: this._configName }, h("ez-view-stack", { ref: (ref) => this.updateViewStack(ref) }, h("stack-item", null, h("div", { class: "ez-box ez-box--shadow grid-container" }, h("div", { class: "ez-flex ez-title--primary ez-size-width--full ez-padding--large detail-header" }, h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center" }, this._levelPath ? h("span", { class: "level-path" }, this._levelPath + " /") : undefined, this.label)), h("snk-grid", { class: "ez-size-width--full ez-size-height--full", ref: (ref) => this._snkGrid = ref, configName: this._configName, messagesBuilder: this.messagesBuilder, onGridDoubleClick: () => this.emitSwitchEvent(VIEW_MODE.FORM), onActionClick: (evt) => this.executeActionHandler(evt), presentationMode: PresentationMode.SECONDARY, canEdit: this.canEdit, isDetail: true }))), h("stack-item", null, 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(), label: this.label, levelPath: this._levelPath }, 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: PresentationMode.SECONDARY, onActionClick: evt => this.executeActionHandler(evt), dataUnit: this.dataUnit }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this.entityName, onBack: this.handleAttachBack.bind(this) }))))));
|
260
|
+
return (h(Host, null, 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 === VIEW_MODE.GRID, messagesBuilder: this.messagesBuilder, configName: this._configName }, h("ez-view-stack", { ref: (ref) => this.updateViewStack(ref) }, h("stack-item", null, h("div", { class: "ez-box ez-box--shadow grid-container" }, h("div", { class: "ez-flex ez-title--primary ez-size-width--full ez-padding--large detail-header" }, h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center" }, this._levelPath ? h("span", { class: "level-path" }, this._levelPath + " /") : undefined, this.label)), h("snk-grid", { class: "ez-size-width--full ez-size-height--full", ref: (ref) => this._snkGrid = ref, configName: this._configName, messagesBuilder: this.messagesBuilder, onGridDoubleClick: () => this.emitSwitchEvent(VIEW_MODE.FORM), onActionClick: (evt) => this.executeActionHandler(evt), presentationMode: PresentationMode.SECONDARY, canEdit: this.canEdit, isDetail: true, taskbarCustomContainerId: this.taskbarCustomContainerId, gridHeaderCustomSlotId: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS", topTaskbarCustomSlotId: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }))), h("stack-item", null, 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(), label: this.label, levelPath: this._levelPath, onFormItemsReady: ({ detail: formItems }) => this.formItemsReady.emit(formItems) }, 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: PresentationMode.SECONDARY, onActionClick: evt => this.executeActionHandler(evt), dataUnit: this.dataUnit, resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }, h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" })))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this.entityName, onBack: this.handleAttachBack.bind(this) }))))));
|
257
261
|
}
|
258
262
|
static get watchers() { return {
|
259
263
|
"dataState": ["observerDataState"]
|
@@ -7,7 +7,6 @@ const SnkEntityList = class {
|
|
7
7
|
constructor(hostRef) {
|
8
8
|
registerInstance(this, hostRef);
|
9
9
|
this.valueChanged = createEvent(this, "valueChanged", 7);
|
10
|
-
this.saveConfig = createEvent(this, "saveConfig", 7);
|
11
10
|
this._searchValue = undefined;
|
12
11
|
this._ezListSource = [];
|
13
12
|
this.config = undefined;
|
@@ -16,7 +15,6 @@ const SnkEntityList = class {
|
|
16
15
|
}
|
17
16
|
async reloadList() {
|
18
17
|
this.loadListSource();
|
19
|
-
this.saveConfig.emit(this.config);
|
20
18
|
}
|
21
19
|
observeConfig() {
|
22
20
|
var _a, _b;
|
@@ -32,7 +30,6 @@ const SnkEntityList = class {
|
|
32
30
|
}
|
33
31
|
});
|
34
32
|
this.config = ObjectUtils.copy(configCopy);
|
35
|
-
this.saveConfig.emit(this.config);
|
36
33
|
this.valueChanged.emit((_b = this.config) === null || _b === void 0 ? void 0 : _b.value);
|
37
34
|
}
|
38
35
|
loadListSource() {
|
@@ -89,7 +86,6 @@ const SnkEntityList = class {
|
|
89
86
|
}
|
90
87
|
] });
|
91
88
|
this.loadListSource();
|
92
|
-
this.saveConfig.emit(this.config);
|
93
89
|
this.valueChanged.emit((_d = this.config) === null || _d === void 0 ? void 0 : _d.value);
|
94
90
|
}
|
95
91
|
}
|