@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-74224.0 → 0.0.0-bugfix-dev-KB-75070.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ConfigStorage-ecc0ed20.js → ConfigStorage-f079f5fd.js} +2 -2
- package/dist/cjs/{ContinuousInsertUtils-29b65619.js → ContinuousInsertUtils-64e47516.js} +29 -20
- package/dist/cjs/{DataFetcher-cadeef8e.js → DataFetcher-e059eb72.js} +7 -5
- package/dist/cjs/{SnkFormConfigManager-f1c92f79.js → SnkFormConfigManager-63369164.js} +2 -2
- package/dist/cjs/{auth-fetcher-d68841bc.js → auth-fetcher-4f853233.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-f89461c1.js → dataunit-fetcher-228016f4.js} +3 -3
- package/dist/cjs/{form-config-fetcher-ed497282.js → form-config-fetcher-39397ac5.js} +1 -1
- package/dist/cjs/index-f9e81701.js +8 -28
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-ca89181c.js → pesquisa-fetcher-a9bfeb22.js} +7 -2
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_4.cjs.entry.js +6 -6
- package/dist/cjs/snk-application.cjs.entry.js +111 -59
- package/dist/cjs/snk-attach.cjs.entry.js +5 -5
- package/dist/cjs/{snk-form-config.cjs.entry.js → snk-config-options_3.cjs.entry.js} +365 -3
- package/dist/cjs/snk-crud.cjs.entry.js +13 -7
- package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
- package/dist/cjs/{snk-data-unit-668dc5e8.js → snk-data-unit-3d9b6ed4.js} +26 -14
- package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
- package/dist/cjs/snk-detail-view.cjs.entry.js +7 -7
- package/dist/cjs/{snk-filter-bar.cjs.entry.js → snk-filter-bar_4.cjs.entry.js} +691 -3
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-grid.cjs.entry.js +16 -8
- package/dist/cjs/{snk-guides-viewer-4236cb9d.js → snk-guides-viewer-eee43c8b.js} +8 -5
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-simple-crud.cjs.entry.js +45 -10
- package/dist/cjs/snk-taskbar.cjs.entry.js +37 -35
- package/dist/collection/collection-manifest.json +11 -31
- package/dist/collection/components/snk-actions-button/snk-actions-button.js +1 -1
- package/dist/collection/components/snk-application/request-listener/DebouncedRequestListener.js +28 -0
- package/dist/collection/components/snk-application/request-listener/RequestListenerFactory.js +16 -0
- package/dist/collection/components/snk-application/request-listener/RequestListenerLoadingBar.js +52 -0
- package/dist/collection/components/snk-application/snk-application.js +44 -54
- package/dist/collection/components/snk-crud/snk-crud.js +26 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +3 -0
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +25 -13
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +18 -0
- package/dist/collection/components/snk-grid/snk-grid.js +28 -2
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +57 -4
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +38 -36
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +8 -6
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +2 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +6 -1
- package/dist/collection/lib/utils/CrudUtils.js +25 -16
- package/dist/collection/sw.js +46 -0
- package/dist/components/ContinuousInsertUtils.js +25 -16
- package/dist/components/DataFetcher.js +7 -5
- package/dist/components/dataunit-fetcher.js +2 -2
- package/dist/components/pesquisa-fetcher.js +6 -1
- package/dist/components/snk-actions-button2.js +1 -1
- package/dist/components/snk-application2.js +107 -54
- package/dist/components/snk-crud.js +9 -2
- package/dist/components/snk-data-unit2.js +25 -13
- package/dist/components/snk-detail-view2.js +3 -0
- package/dist/components/snk-filter-bar2.js +4 -0
- package/dist/components/snk-grid2.js +11 -2
- package/dist/components/snk-simple-crud2.js +40 -4
- package/dist/components/snk-taskbar2.js +38 -36
- package/dist/esm/{ConfigStorage-7b36d041.js → ConfigStorage-6514d66e.js} +2 -2
- package/dist/esm/{ContinuousInsertUtils-30caa626.js → ContinuousInsertUtils-b62906f9.js} +29 -20
- package/dist/esm/{DataFetcher-a9c598f2.js → DataFetcher-5034df59.js} +7 -5
- package/dist/esm/{SnkFormConfigManager-139f09fa.js → SnkFormConfigManager-b409c745.js} +3 -3
- package/dist/esm/{auth-fetcher-749d880f.js → auth-fetcher-ca5d3a49.js} +1 -1
- package/dist/esm/{constants-8457af36.js → constants-7302ee87.js} +1 -1
- package/dist/esm/{dataunit-fetcher-c24c76c6.js → dataunit-fetcher-56cb648b.js} +3 -3
- package/dist/esm/{form-config-fetcher-adbe5d34.js → form-config-fetcher-a7d3e277.js} +1 -1
- package/dist/esm/index-a7d3d3f1.js +8 -28
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{pesquisa-fetcher-8edaa8cd.js → pesquisa-fetcher-6bc2e41a.js} +7 -2
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_4.entry.js +7 -7
- package/dist/esm/snk-application.entry.js +111 -59
- package/dist/esm/snk-attach.entry.js +6 -6
- package/dist/esm/{snk-form-config.entry.js → snk-config-options_3.entry.js} +366 -6
- package/dist/esm/snk-configurator.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +14 -8
- package/dist/esm/snk-data-exporter.entry.js +6 -6
- package/dist/esm/{snk-data-unit-0fdfb6c2.js → snk-data-unit-9fa7d2b9.js} +26 -14
- package/dist/esm/snk-data-unit.entry.js +3 -3
- package/dist/esm/snk-detail-view.entry.js +8 -8
- package/dist/esm/snk-field-config.entry.js +1 -1
- package/dist/esm/{snk-filter-bar.entry.js → snk-filter-bar_4.entry.js} +690 -5
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-grid.entry.js +16 -8
- package/dist/esm/{snk-guides-viewer-8934c537.js → snk-guides-viewer-e8ca764a.js} +9 -6
- package/dist/esm/snk-guides-viewer.entry.js +8 -8
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-simple-crud.entry.js +47 -12
- package/dist/esm/snk-tab-config.entry.js +1 -1
- package/dist/esm/snk-taskbar.entry.js +38 -36
- package/dist/sankhyablocks/{p-f3434fc4.js → p-00278e07.js} +1 -1
- package/dist/sankhyablocks/{p-b9c67e45.entry.js → p-0d2a2e9e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-afbb070d.js → p-0e206e62.js} +1 -1
- package/dist/sankhyablocks/{p-06421fdb.js → p-126c58ea.js} +1 -1
- package/dist/sankhyablocks/p-200a5481.entry.js +11 -0
- package/dist/sankhyablocks/{p-8eb67fa4.entry.js → p-2d3f9482.entry.js} +1 -1
- package/dist/sankhyablocks/p-30ebcbe0.entry.js +1 -0
- package/dist/sankhyablocks/{p-1bf06cd3.js → p-341465ce.js} +2 -2
- package/dist/sankhyablocks/p-342eeb3b.js +1 -0
- package/dist/sankhyablocks/{p-7663f597.entry.js → p-41793e17.entry.js} +1 -1
- package/dist/sankhyablocks/p-42130213.entry.js +1 -0
- package/dist/sankhyablocks/{p-be5d8fcb.entry.js → p-43353d86.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7ac7932c.js → p-47d24ac8.js} +2 -2
- package/dist/sankhyablocks/p-520c7c38.entry.js +1 -0
- package/dist/sankhyablocks/{p-430e4d3c.entry.js → p-7075b789.entry.js} +1 -1
- package/dist/sankhyablocks/p-83e71703.entry.js +1 -0
- package/dist/sankhyablocks/{p-95df461f.entry.js → p-8b4fc28f.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b0ef4383.js → p-95ce311a.js} +1 -1
- package/dist/sankhyablocks/{p-4d9549cf.js → p-9ffd9fc7.js} +1 -1
- package/dist/sankhyablocks/{p-dcead955.entry.js → p-a2c790ac.entry.js} +1 -1
- package/dist/sankhyablocks/p-a3fadd0b.entry.js +1 -0
- package/dist/sankhyablocks/{p-212213d9.entry.js → p-aa003d4e.entry.js} +1 -1
- package/dist/sankhyablocks/p-aaf94476.js +1 -0
- package/dist/sankhyablocks/p-ac26df7a.entry.js +1 -0
- package/dist/sankhyablocks/{p-4f35399c.entry.js → p-af7f7b3e.entry.js} +1 -1
- package/dist/sankhyablocks/p-c51ad0e7.entry.js +1 -0
- package/dist/sankhyablocks/{p-16869f77.js → p-e3a285a2.js} +1 -1
- package/dist/sankhyablocks/p-e4391e16.js +1 -0
- package/dist/sankhyablocks/{p-fb34e0cf.entry.js → p-fca0e5cc.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/request-listener/DebouncedRequestListener.d.ts +11 -0
- package/dist/types/components/snk-application/request-listener/RequestListenerFactory.d.ts +12 -0
- package/dist/types/components/snk-application/request-listener/RequestListenerLoadingBar.d.ts +13 -0
- package/dist/types/components/snk-application/snk-application.d.ts +9 -13
- package/dist/types/components/snk-crud/snk-crud.d.ts +4 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +4 -0
- package/dist/types/components/snk-grid/snk-grid.d.ts +4 -0
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +2 -0
- package/dist/types/components.d.ts +30 -0
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -0
- package/dist/types/lib/utils/CrudUtils.d.ts +1 -0
- package/package.json +3 -2
- package/dist/cjs/snk-config-options.cjs.entry.js +0 -239
- package/dist/cjs/snk-filter-item.cjs.entry.js +0 -312
- package/dist/cjs/snk-filter-list.cjs.entry.js +0 -152
- package/dist/cjs/snk-filter-modal.cjs.entry.js +0 -249
- package/dist/cjs/snk-form.cjs.entry.js +0 -144
- package/dist/esm/snk-config-options.entry.js +0 -235
- package/dist/esm/snk-filter-item.entry.js +0 -308
- package/dist/esm/snk-filter-list.entry.js +0 -148
- package/dist/esm/snk-filter-modal.entry.js +0 -245
- package/dist/esm/snk-form.entry.js +0 -140
- package/dist/sankhyablocks/p-01086ff7.entry.js +0 -1
- package/dist/sankhyablocks/p-2923c1b5.js +0 -1
- package/dist/sankhyablocks/p-2aae03a1.entry.js +0 -1
- package/dist/sankhyablocks/p-3b60db06.entry.js +0 -1
- package/dist/sankhyablocks/p-5dd8cf4f.js +0 -1
- package/dist/sankhyablocks/p-60b29483.entry.js +0 -1
- package/dist/sankhyablocks/p-70a4af56.entry.js +0 -1
- package/dist/sankhyablocks/p-92eadb1c.entry.js +0 -1
- package/dist/sankhyablocks/p-a42e7a1e.entry.js +0 -11
- package/dist/sankhyablocks/p-a724e798.entry.js +0 -1
- package/dist/sankhyablocks/p-a75d242d.entry.js +0 -1
- package/dist/sankhyablocks/p-b9679243.entry.js +0 -1
- package/dist/sankhyablocks/p-ca5ec380.js +0 -1
- package/dist/sankhyablocks/p-d3f53df2.entry.js +0 -1
- package/dist/sankhyablocks/p-e8763234.entry.js +0 -1
- package/dist/sankhyablocks/p-feba9d4b.entry.js +0 -1
|
@@ -6,10 +6,10 @@ const index = require('./index-f9e81701.js');
|
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
|
|
8
8
|
const presentationMode = require('./presentationMode-52ec3bdd.js');
|
|
9
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
9
|
+
const ConfigStorage = require('./ConfigStorage-f079f5fd.js');
|
|
10
10
|
const filterType_enum = require('./filter-type.enum-b14ce507.js');
|
|
11
|
-
require('./form-config-fetcher-
|
|
12
|
-
require('./DataFetcher-
|
|
11
|
+
require('./form-config-fetcher-39397ac5.js');
|
|
12
|
+
require('./DataFetcher-e059eb72.js');
|
|
13
13
|
require('./PrintUtils-bcaeb82f.js');
|
|
14
14
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
15
15
|
|
|
@@ -5,20 +5,20 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
|
|
8
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
8
|
+
const ConfigStorage = require('./ConfigStorage-f079f5fd.js');
|
|
9
9
|
const index$1 = require('./index-1dfc7a6e.js');
|
|
10
10
|
const fieldSearch = require('./field-search-68e34bf4.js');
|
|
11
11
|
const index$2 = require('./index-102ba62d.js');
|
|
12
|
-
const ContinuousInsertUtils = require('./ContinuousInsertUtils-
|
|
12
|
+
const ContinuousInsertUtils = require('./ContinuousInsertUtils-64e47516.js');
|
|
13
13
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
14
|
-
require('./DataFetcher-
|
|
15
|
-
require('./pesquisa-fetcher-
|
|
14
|
+
require('./DataFetcher-e059eb72.js');
|
|
15
|
+
require('./pesquisa-fetcher-a9bfeb22.js');
|
|
16
16
|
require('./ISave-e91b70a7.js');
|
|
17
17
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
18
18
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
19
|
-
require('./dataunit-fetcher-
|
|
19
|
+
require('./dataunit-fetcher-228016f4.js');
|
|
20
20
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
21
|
-
require('./form-config-fetcher-
|
|
21
|
+
require('./form-config-fetcher-39397ac5.js');
|
|
22
22
|
const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
|
|
23
23
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
|
|
24
24
|
require('./PrintUtils-bcaeb82f.js');
|
|
@@ -146,6 +146,7 @@ const SnkGrid = class {
|
|
|
146
146
|
this.autoLoad = undefined;
|
|
147
147
|
this.autoFocus = true;
|
|
148
148
|
this.enableGridInsert = false;
|
|
149
|
+
this.enableLockManger = false;
|
|
149
150
|
}
|
|
150
151
|
/**
|
|
151
152
|
* Exibe a janela de configurações da grade.
|
|
@@ -233,10 +234,17 @@ const SnkGrid = class {
|
|
|
233
234
|
this._grid.setFocus();
|
|
234
235
|
}
|
|
235
236
|
async handleClick(event) {
|
|
237
|
+
var _a;
|
|
236
238
|
if (this.hasToBlockEvent(event)) {
|
|
237
239
|
event.preventDefault();
|
|
238
240
|
event.stopPropagation();
|
|
239
|
-
await this._dataUnit.cancelEdition()
|
|
241
|
+
if (!await this._dataUnit.cancelEdition())
|
|
242
|
+
return;
|
|
243
|
+
const newEvent = new event.constructor(event.type, event);
|
|
244
|
+
(_a = event.target) === null || _a === void 0 ? void 0 : _a.dispatchEvent(newEvent);
|
|
245
|
+
}
|
|
246
|
+
if (this._grid && !this._grid.contains(event.target)) {
|
|
247
|
+
this._grid.stopEdit();
|
|
240
248
|
}
|
|
241
249
|
}
|
|
242
250
|
hasToBlockEvent(event) {
|
|
@@ -527,7 +535,7 @@ const SnkGrid = class {
|
|
|
527
535
|
return undefined;
|
|
528
536
|
}
|
|
529
537
|
return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, index.h("div", { class: "snk-grid__header ez-margin-bottom--extra-small" }, this._showSnkFilterBar &&
|
|
530
|
-
index.h(index.Fragment, null, index.h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad }), index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), index.h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none' }, index.h("slot", { name: this.topTaskbarCustomSlotId }))), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert }, index.h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this.getGridHeaderButtons(), presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, index.h("slot", { name: this.gridHeaderCustomSlotId }))), index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
|
|
538
|
+
index.h(index.Fragment, null, index.h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad }), index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), index.h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none' }, index.h("slot", { name: this.topTaskbarCustomSlotId }))), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManger: this.enableLockManger }, index.h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this.getGridHeaderButtons(), presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, index.h("slot", { name: this.gridHeaderCustomSlotId }))), index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
|
|
531
539
|
}
|
|
532
540
|
get _element() { return index.getElement(this); }
|
|
533
541
|
static get watchers() { return {
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
const index = require('./index-f9e81701.js');
|
|
4
4
|
const core = require('@sankhyalabs/core');
|
|
5
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
5
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-63369164.js');
|
|
6
6
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
7
7
|
const fieldSearch = require('./field-search-68e34bf4.js');
|
|
8
8
|
const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
|
|
9
9
|
const constants = require('./constants-35ddd366.js');
|
|
10
|
-
require('./DataFetcher-
|
|
11
|
-
require('./pesquisa-fetcher-
|
|
10
|
+
require('./DataFetcher-e059eb72.js');
|
|
11
|
+
require('./pesquisa-fetcher-a9bfeb22.js');
|
|
12
12
|
const index$1 = require('./index-1dfc7a6e.js');
|
|
13
13
|
require('./ISave-e91b70a7.js');
|
|
14
14
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
15
15
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
16
|
-
require('./dataunit-fetcher-
|
|
16
|
+
require('./dataunit-fetcher-228016f4.js');
|
|
17
17
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
18
|
-
require('./form-config-fetcher-
|
|
18
|
+
require('./form-config-fetcher-39397ac5.js');
|
|
19
19
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
20
20
|
|
|
21
21
|
const snkGuidesViewerCss = ".sc-snk-guides-viewer-h{--snk-guides-viewer--space-large:var(--space--large, 24px);--snk-guides-viewer--space-small:var(--space--2xs, 8px);--snk-guides-viewer__header--min-height:68px;--snk-guides-viewer__header--z-index:var(--more-visible, 2);--snk-guides-viewer__header--background-color:var(--background--body, #fafcff);--snk-guides-viewer__guide-navigator--width:340px;display:block}snk-form-view.sc-snk-guides-viewer{width:100%}.snk-guides-viewer.sc-snk-guides-viewer{position:relative;padding-left:0px;padding-top:0px;padding-right:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__detail-container.sc-snk-guides-viewer{display:flex;row-gap:24px;flex-direction:column}.snk-guides-viewer__header.sc-snk-guides-viewer{position:sticky;align-items:center;top:0;z-index:var(--snk-guides-viewer__header--z-index);background-color:var(--snk-guides-viewer__header--background-color);min-height:var(--snk-guides-viewer__header--min-height);width:calc(100% + (var(--snk-guides-viewer--space-large) * 2));padding-left:var(--snk-guides-viewer--space-large);padding-right:var(--snk-guides-viewer--space-large);padding-top:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-small);margin-left:calc(var(--snk-guides-viewer--space-large) * -1);margin-right:calc(var(--snk-guides-viewer--space-large) * -1);margin-bottom:var(--snk-guides-viewer--space-small)}.snk-guides-viewer__header-breadcrumb.sc-snk-guides-viewer{width:25%;display:flex}.snk-guides-viewer__header-taskbar.sc-snk-guides-viewer{width:75%}.snk-guides-viewer__container.sc-snk-guides-viewer{display:grid;grid-template-columns:minmax(0, auto) minmax(0, 100%);height:100%;column-gap:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__guide-navigator.sc-snk-guides-viewer{position:sticky;top:calc(var(--snk-guides-viewer__header--min-height) + var(--snk-guides-viewer--space-small));height:calc(100vh - var(--snk-guides-viewer__header--min-height) - var(--snk-guides-viewer--space-large) - var(--snk-guides-viewer--space-small))}.snk-guides-viewer__guide-navigator[open].sc-snk-guides-viewer{width:var(--snk-guides-viewer__guide-navigator--width);max-width:var(--snk-guides-viewer__guide-navigator--width);min-width:var(--snk-guides-viewer__guide-navigator--width)}.snk-guides-viewer__detail-content.sc-snk-guides-viewer{min-height:100%;align-items:flex-start;align-content:flex-start}";
|
|
@@ -455,6 +455,9 @@ const SnkGuidesViewer = class {
|
|
|
455
455
|
await this.addErrorBadgeToGuide(guideName);
|
|
456
456
|
await this.openGuideNavigator(guideName);
|
|
457
457
|
}
|
|
458
|
+
if (action.type === core.Action.METADATA_LOADED) {
|
|
459
|
+
this.loadGuides(false);
|
|
460
|
+
}
|
|
458
461
|
}
|
|
459
462
|
async addErrorBadgeToGuide(guideName) {
|
|
460
463
|
var _a;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const snkGuidesViewer = require('./snk-guides-viewer-
|
|
5
|
+
const snkGuidesViewer = require('./snk-guides-viewer-eee43c8b.js');
|
|
6
6
|
require('./index-f9e81701.js');
|
|
7
7
|
require('@sankhyalabs/core');
|
|
8
|
-
require('./SnkFormConfigManager-
|
|
9
|
-
require('./ConfigStorage-
|
|
10
|
-
require('./form-config-fetcher-
|
|
11
|
-
require('./DataFetcher-
|
|
8
|
+
require('./SnkFormConfigManager-63369164.js');
|
|
9
|
+
require('./ConfigStorage-f079f5fd.js');
|
|
10
|
+
require('./form-config-fetcher-39397ac5.js');
|
|
11
|
+
require('./DataFetcher-e059eb72.js');
|
|
12
12
|
require('./PrintUtils-bcaeb82f.js');
|
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
14
14
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
@@ -18,10 +18,10 @@ require('./field-search-68e34bf4.js');
|
|
|
18
18
|
require('./taskbar-elements-9ad1f9c0.js');
|
|
19
19
|
require('./index-1dfc7a6e.js');
|
|
20
20
|
require('./index-102ba62d.js');
|
|
21
|
-
require('./pesquisa-fetcher-
|
|
21
|
+
require('./pesquisa-fetcher-a9bfeb22.js');
|
|
22
22
|
require('./ISave-e91b70a7.js');
|
|
23
23
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
24
|
-
require('./dataunit-fetcher-
|
|
24
|
+
require('./dataunit-fetcher-228016f4.js');
|
|
25
25
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
26
26
|
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
|
27
27
|
require('./ResourceIDUtils-5ff86aa7.js');
|
|
@@ -5,13 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-0184ffbb.js');
|
|
8
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
8
|
+
const ConfigStorage = require('./ConfigStorage-f079f5fd.js');
|
|
9
9
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
10
10
|
const index$1 = require('./index-c5771aba.js');
|
|
11
11
|
const index$2 = require('./index-102ba62d.js');
|
|
12
12
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
13
|
-
require('./form-config-fetcher-
|
|
14
|
-
require('./DataFetcher-
|
|
13
|
+
require('./form-config-fetcher-39397ac5.js');
|
|
14
|
+
require('./DataFetcher-e059eb72.js');
|
|
15
15
|
require('./PrintUtils-bcaeb82f.js');
|
|
16
16
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
17
17
|
|
|
@@ -7,19 +7,19 @@ const core = require('@sankhyalabs/core');
|
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
8
|
const constants = require('./constants-35ddd366.js');
|
|
9
9
|
const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
|
|
10
|
-
require('./DataFetcher-
|
|
11
|
-
require('./pesquisa-fetcher-
|
|
12
|
-
const ContinuousInsertUtils = require('./ContinuousInsertUtils-
|
|
10
|
+
require('./DataFetcher-e059eb72.js');
|
|
11
|
+
require('./pesquisa-fetcher-a9bfeb22.js');
|
|
12
|
+
const ContinuousInsertUtils = require('./ContinuousInsertUtils-64e47516.js');
|
|
13
13
|
const index = require('./index-1dfc7a6e.js');
|
|
14
14
|
require('./ISave-e91b70a7.js');
|
|
15
15
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
16
16
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
17
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
|
17
|
+
const dataunitFetcher = require('./dataunit-fetcher-228016f4.js');
|
|
18
18
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
19
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
|
19
|
+
const formConfigFetcher = require('./form-config-fetcher-39397ac5.js');
|
|
20
20
|
const fieldSearch = require('./field-search-68e34bf4.js');
|
|
21
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
22
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
21
|
+
const ConfigStorage = require('./ConfigStorage-f079f5fd.js');
|
|
22
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-63369164.js');
|
|
23
23
|
const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
|
|
24
24
|
const index$2 = require('./index-102ba62d.js');
|
|
25
25
|
require('./PrintUtils-bcaeb82f.js');
|
|
@@ -121,6 +121,7 @@ const SnkSimpleCrud = class {
|
|
|
121
121
|
this.mode = constants.SIMPLE_CRUD_MODE.SERVER;
|
|
122
122
|
this.gridConfig = undefined;
|
|
123
123
|
this.formConfig = undefined;
|
|
124
|
+
this.enableLockManger = false;
|
|
124
125
|
this._formFields = [];
|
|
125
126
|
this._fieldsProps = new Map();
|
|
126
127
|
this._enableContinuousInsert = true;
|
|
@@ -420,6 +421,7 @@ const SnkSimpleCrud = class {
|
|
|
420
421
|
}
|
|
421
422
|
componentDidLoad() {
|
|
422
423
|
utils.CSSVarsUtils.applyVarsGrid(this._element, this._grid);
|
|
424
|
+
this.initKeyboardManager();
|
|
423
425
|
}
|
|
424
426
|
setCustomRenders() {
|
|
425
427
|
if (!this._grid) {
|
|
@@ -724,9 +726,11 @@ const SnkSimpleCrud = class {
|
|
|
724
726
|
window.removeEventListener("keydown", this._keyDownHandler);
|
|
725
727
|
}
|
|
726
728
|
gridConfigChangeHandler(evt) {
|
|
729
|
+
evt.stopPropagation();
|
|
730
|
+
if (!this.configName)
|
|
731
|
+
return;
|
|
727
732
|
const config = evt.detail;
|
|
728
733
|
ConfigStorage.ConfigStorage.saveGridConfig(config, this.configName, this.resolveResourceID());
|
|
729
|
-
evt.stopPropagation();
|
|
730
734
|
}
|
|
731
735
|
modalConfigChangeHandler(evt) {
|
|
732
736
|
const config = evt.detail;
|
|
@@ -803,6 +807,37 @@ const SnkSimpleCrud = class {
|
|
|
803
807
|
return;
|
|
804
808
|
this.goToView(constants.VIEW_MODE.FORM);
|
|
805
809
|
}
|
|
810
|
+
async initKeyboardManager() {
|
|
811
|
+
const keyboardManager = new core.KeyboardManager();
|
|
812
|
+
if (keyboardManager) {
|
|
813
|
+
const dataUnit = this.dataUnit || await this._snkDataUnit.getDataUnit();
|
|
814
|
+
async function saveDataUnitHandlingFocus() {
|
|
815
|
+
const element = document.activeElement;
|
|
816
|
+
const isDocumentBody = (element == document.body);
|
|
817
|
+
if (!isDocumentBody)
|
|
818
|
+
element.blur();
|
|
819
|
+
await dataUnit.saveData();
|
|
820
|
+
if (!isDocumentBody && element.setFocus != undefined) {
|
|
821
|
+
element.setFocus();
|
|
822
|
+
return;
|
|
823
|
+
}
|
|
824
|
+
if (!isDocumentBody)
|
|
825
|
+
element.focus();
|
|
826
|
+
}
|
|
827
|
+
keyboardManager
|
|
828
|
+
.bind("F7", saveDataUnitHandlingFocus.bind(this), { description: "Salva os dados.", element: this._element })
|
|
829
|
+
.bind("F8", dataUnit.addRecord.bind(dataUnit), { description: "Adiciona um novo registro.", element: this._element })
|
|
830
|
+
.bind("F9", dataUnit.removeSelectedRecords.bind(dataUnit), { description: "Remove o registro selecionado.", element: this._element })
|
|
831
|
+
.bind("Escape", () => {
|
|
832
|
+
if (dataUnit.isDirty()) {
|
|
833
|
+
dataUnit.cancelEdition();
|
|
834
|
+
}
|
|
835
|
+
}, {
|
|
836
|
+
debounceTime: 1000,
|
|
837
|
+
description: "Cancela uma ação.", element: this._element
|
|
838
|
+
});
|
|
839
|
+
}
|
|
840
|
+
}
|
|
806
841
|
renderTaskbarContent() {
|
|
807
842
|
var _a;
|
|
808
843
|
return (index$1.h("snk-taskbar", { class: this._currentViewMode === constants.VIEW_MODE.FORM && "ez-box ez-box--shadow ez-padding--small", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, "data-exporter-store-key": this.getDataExporterStoreKey(), slot: "leftButtons", presentationMode: index.PresentationMode.SECONDARY }, index$1.h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })));
|
|
@@ -812,9 +847,9 @@ const SnkSimpleCrud = class {
|
|
|
812
847
|
if (this.dataUnit == undefined) {
|
|
813
848
|
return;
|
|
814
849
|
}
|
|
815
|
-
return (index$1.h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode: this.handleDataUnitOnInsertionMode.bind(this), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === constants.VIEW_MODE.GRID
|
|
850
|
+
return (index$1.h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode: this.handleDataUnitOnInsertionMode.bind(this), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === constants.VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, index$1.h("header", null, index$1.h("slot", { name: "snkSimpleCrudHeader" })), index$1.h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, index$1.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, index$1.h("stack-item", null, index$1.h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(constants.VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(dataunitFetcher.InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
|
|
816
851
|
? undefined
|
|
817
|
-
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert }, this.renderTaskbarContent(), index$1.h("div", { slot: "footer" }, index$1.h("slot", { name: "snkSimpleCrudFooter" })))), index$1.h("stack-item", null, this.renderTaskbarContent(), index$1.h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large ${this.handleShowFormConfig() ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this.handleShowFormConfig() && index$1.h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && index$1.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), index$1.h("div", { id: `${this._customContainerId}` }, index$1.h("slot", { name: "SnkConfigContainerSlot" }))), index$1.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index$1.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
|
|
852
|
+
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManger: this.enableLockManger }, this.renderTaskbarContent(), index$1.h("div", { slot: "footer" }, index$1.h("slot", { name: "snkSimpleCrudFooter" })))), index$1.h("stack-item", null, this.renderTaskbarContent(), index$1.h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large ${this.handleShowFormConfig() ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this.handleShowFormConfig() && index$1.h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && index$1.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), index$1.h("div", { id: `${this._customContainerId}` }, index$1.h("slot", { name: "SnkConfigContainerSlot" }))), index$1.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index$1.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
|
|
818
853
|
}
|
|
819
854
|
get _element() { return index$1.getElement(this); }
|
|
820
855
|
static get watchers() { return {
|
|
@@ -160,42 +160,44 @@ const SnkTaskbar = class {
|
|
|
160
160
|
return key ? (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, {}) : "";
|
|
161
161
|
}
|
|
162
162
|
elementClick(elem) {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
this._isWaitingForSave
|
|
189
|
-
|
|
190
|
-
.
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
163
|
+
core.LockManager.whenResolve(this._element, core.LockManagerOperation.TASKBAR_CLICK).then(() => {
|
|
164
|
+
if (this.dataUnit) {
|
|
165
|
+
switch (elem) {
|
|
166
|
+
case taskbarElements.TaskbarElement.PREVIOUS:
|
|
167
|
+
this.dataUnit.previousRecord();
|
|
168
|
+
break;
|
|
169
|
+
case taskbarElements.TaskbarElement.NEXT:
|
|
170
|
+
this.dataUnit.nextRecord();
|
|
171
|
+
break;
|
|
172
|
+
case taskbarElements.TaskbarElement.REFRESH:
|
|
173
|
+
this.dataUnit.loadData();
|
|
174
|
+
break;
|
|
175
|
+
case taskbarElements.TaskbarElement.CLONE:
|
|
176
|
+
this.dataUnit.copySelected();
|
|
177
|
+
break;
|
|
178
|
+
case taskbarElements.TaskbarElement.REMOVE:
|
|
179
|
+
this.dataUnit.removeSelectedRecords();
|
|
180
|
+
break;
|
|
181
|
+
case taskbarElements.TaskbarElement.INSERT:
|
|
182
|
+
this.dataUnit.addRecord();
|
|
183
|
+
break;
|
|
184
|
+
case taskbarElements.TaskbarElement.CANCEL:
|
|
185
|
+
this.dataUnit.cancelEdition();
|
|
186
|
+
break;
|
|
187
|
+
case taskbarElements.TaskbarElement.SAVE:
|
|
188
|
+
if (!this._isWaitingForSave) {
|
|
189
|
+
this._isWaitingForSave = true;
|
|
190
|
+
this.dataUnit.saveData()
|
|
191
|
+
.finally(() => {
|
|
192
|
+
this._isWaitingForSave = false;
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
break;
|
|
196
|
+
}
|
|
195
197
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
198
|
+
if (this.isEnabled(elem))
|
|
199
|
+
this.actionClick.emit(elem);
|
|
200
|
+
});
|
|
199
201
|
}
|
|
200
202
|
isEnabled(elem) {
|
|
201
203
|
if (!this.isAllowed(elem)) {
|
|
@@ -65,21 +65,6 @@
|
|
|
65
65
|
"snk-application"
|
|
66
66
|
]
|
|
67
67
|
},
|
|
68
|
-
{
|
|
69
|
-
"components": [
|
|
70
|
-
"snk-form"
|
|
71
|
-
]
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"components": [
|
|
75
|
-
"snk-form-config"
|
|
76
|
-
]
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"components": [
|
|
80
|
-
"snk-config-options"
|
|
81
|
-
]
|
|
82
|
-
},
|
|
83
68
|
{
|
|
84
69
|
"components": [
|
|
85
70
|
"snk-tab-config"
|
|
@@ -132,42 +117,37 @@
|
|
|
132
117
|
},
|
|
133
118
|
{
|
|
134
119
|
"components": [
|
|
135
|
-
"snk-
|
|
136
|
-
]
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
"components": [
|
|
140
|
-
"snk-filter-item"
|
|
141
|
-
]
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
"components": [
|
|
145
|
-
"snk-filter-list"
|
|
120
|
+
"snk-field-config"
|
|
146
121
|
]
|
|
147
122
|
},
|
|
148
123
|
{
|
|
149
124
|
"components": [
|
|
150
|
-
"snk-
|
|
125
|
+
"snk-grid"
|
|
151
126
|
]
|
|
152
127
|
},
|
|
153
128
|
{
|
|
154
129
|
"components": [
|
|
155
|
-
"snk-
|
|
130
|
+
"snk-pesquisa"
|
|
156
131
|
]
|
|
157
132
|
},
|
|
158
133
|
{
|
|
159
134
|
"components": [
|
|
160
|
-
"snk-
|
|
135
|
+
"snk-taskbar"
|
|
161
136
|
]
|
|
162
137
|
},
|
|
163
138
|
{
|
|
164
139
|
"components": [
|
|
165
|
-
"snk-
|
|
140
|
+
"snk-config-options",
|
|
141
|
+
"snk-form",
|
|
142
|
+
"snk-form-config"
|
|
166
143
|
]
|
|
167
144
|
},
|
|
168
145
|
{
|
|
169
146
|
"components": [
|
|
170
|
-
"snk-
|
|
147
|
+
"snk-filter-bar",
|
|
148
|
+
"snk-filter-item",
|
|
149
|
+
"snk-filter-list",
|
|
150
|
+
"snk-filter-modal"
|
|
171
151
|
]
|
|
172
152
|
}
|
|
173
153
|
]
|
|
@@ -30,7 +30,7 @@ export class SnkActionsButton {
|
|
|
30
30
|
};
|
|
31
31
|
const result = await DataFetcher.get().callServiceBroker('ActionButtonsSP.getActions', param);
|
|
32
32
|
return ((_a = result.actions) === null || _a === void 0 ? void 0 : _a.action) || [];
|
|
33
|
-
}, StorageType.
|
|
33
|
+
}, StorageType.IN_MEMORY_CACHE);
|
|
34
34
|
this._actions = SnkActionsButton.parameters.isOrderActions
|
|
35
35
|
? ArrayUtils.sortAlphabetically(actions, 'description')
|
|
36
36
|
: actions;
|
package/dist/collection/components/snk-application/request-listener/DebouncedRequestListener.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
class DebouncedRequestListener {
|
|
2
|
+
constructor() {
|
|
3
|
+
this._debounceTime = 1500;
|
|
4
|
+
this.requests = new Map();
|
|
5
|
+
this.requestsLoadingBar = [];
|
|
6
|
+
}
|
|
7
|
+
onRequestStart(param) {
|
|
8
|
+
if (param.url.includes("quietMode=true")) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
this.requestsLoadingBar.push(param.requestId);
|
|
12
|
+
const timeout = setTimeout(() => {
|
|
13
|
+
this.ezLoadingBar.show();
|
|
14
|
+
}, this._debounceTime);
|
|
15
|
+
this.requests.set(param.requestId, timeout);
|
|
16
|
+
}
|
|
17
|
+
;
|
|
18
|
+
onRequestEnd(param) {
|
|
19
|
+
const timeoutId = this.requests.get(param.requestId);
|
|
20
|
+
clearTimeout(timeoutId);
|
|
21
|
+
if (this.requestsLoadingBar.includes(param.requestId)) {
|
|
22
|
+
this.requestsLoadingBar = this.requestsLoadingBar.filter(id => id !== param.requestId);
|
|
23
|
+
!this.requestsLoadingBar.length && this.ezLoadingBar.hide();
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
;
|
|
27
|
+
}
|
|
28
|
+
export default DebouncedRequestListener;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import DebouncedRequestListener from "./DebouncedRequestListener";
|
|
2
|
+
import RequestListenerLoadingBar from "./RequestListenerLoadingBar";
|
|
3
|
+
class RequestListenerFactory {
|
|
4
|
+
static create({ strategy }) {
|
|
5
|
+
switch (strategy) {
|
|
6
|
+
case 'request_name':
|
|
7
|
+
return new RequestListenerLoadingBar();
|
|
8
|
+
case 'request_time':
|
|
9
|
+
return new DebouncedRequestListener();
|
|
10
|
+
default:
|
|
11
|
+
throw new Error('Strategy not found');
|
|
12
|
+
}
|
|
13
|
+
;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export default RequestListenerFactory;
|
package/dist/collection/components/snk-application/request-listener/RequestListenerLoadingBar.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
class RequestListenerLoadingBar {
|
|
2
|
+
constructor() {
|
|
3
|
+
this._debounceTime = 1000;
|
|
4
|
+
this._ignoredNameTypes = ["totals"];
|
|
5
|
+
this._countRequest = 0;
|
|
6
|
+
}
|
|
7
|
+
onRequestStart(param) {
|
|
8
|
+
if (this.isIgnoreLoadingOnRequest(param)) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
this._countRequest++;
|
|
12
|
+
this.ezLoadingBar.show();
|
|
13
|
+
if (this._timerLoading) {
|
|
14
|
+
clearTimeout(this._timerLoading);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
;
|
|
18
|
+
onRequestEnd(param) {
|
|
19
|
+
if (this.isIgnoreLoadingOnRequest(param)) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
this._countRequest--;
|
|
23
|
+
this._timerLoading = setTimeout(() => {
|
|
24
|
+
if (this._countRequest <= 0) {
|
|
25
|
+
this.ezLoadingBar.hide();
|
|
26
|
+
}
|
|
27
|
+
}, this._debounceTime);
|
|
28
|
+
}
|
|
29
|
+
;
|
|
30
|
+
isIgnoreLoadingOnRequest(param) {
|
|
31
|
+
if (param == undefined) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
if (param.url.includes("quietMode=true")) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
if (param.requestBody == undefined) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
if (param.requestBody.length == 1) {
|
|
41
|
+
const { name } = param.requestBody[0].variables;
|
|
42
|
+
if (name) {
|
|
43
|
+
const nameParts = name.split(":");
|
|
44
|
+
const nameType = nameParts[0];
|
|
45
|
+
return this._ignoredNameTypes.indexOf(nameType) >= 0;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
;
|
|
51
|
+
}
|
|
52
|
+
export default RequestListenerLoadingBar;
|