@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-49699.1 → 0.0.0-bugfix-dev-KB-50737.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-34be11ce.js → ConfigStorage-8d4e9d53.js} +1 -1
- package/dist/cjs/{SnkFormConfigManager-531a191c.js → SnkFormConfigManager-33995e92.js} +2 -2
- package/dist/cjs/{SnkMultiSelectionListDataSource-5213120b.js → SnkMultiSelectionListDataSource-1438f8f2.js} +1 -1
- package/dist/cjs/{auth-fetcher-5161d082.js → auth-fetcher-bb8e9ae4.js} +1 -1
- package/dist/cjs/{form-config-fetcher-9f1a13ca.js → form-config-fetcher-d73f4449.js} +12 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_4.cjs.entry.js +2 -2
- package/dist/cjs/snk-application.cjs.entry.js +3 -3
- package/dist/cjs/snk-attach.cjs.entry.js +2 -2
- package/dist/cjs/snk-crud.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +4 -4
- package/dist/cjs/snk-filter-bar.cjs.entry.js +18 -6
- package/dist/cjs/snk-filter-detail.cjs.entry.js +4 -1
- package/dist/cjs/snk-filter-item.cjs.entry.js +2 -1
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +2 -2
- package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-form.cjs.entry.js +3 -3
- package/dist/cjs/snk-grid.cjs.entry.js +4 -7
- package/dist/cjs/{snk-guides-viewer-76b4c346.js → snk-guides-viewer-25721856.js} +2 -2
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +4 -4
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +2 -2
- package/dist/cjs/snk-simple-crud.cjs.entry.js +60 -48
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +22 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +20 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +2 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +15 -3
- package/dist/collection/components/snk-grid/snk-grid.js +1 -4
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +76 -45
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +12 -0
- package/dist/components/form-config-fetcher.js +12 -0
- package/dist/components/snk-filter-bar2.js +16 -4
- package/dist/components/snk-filter-detail2.js +5 -1
- package/dist/components/snk-filter-item2.js +3 -1
- package/dist/components/snk-grid2.js +1 -4
- package/dist/components/snk-simple-crud2.js +58 -45
- package/dist/esm/{ConfigStorage-101a2b4c.js → ConfigStorage-6e241cd7.js} +1 -1
- package/dist/esm/{SnkFormConfigManager-02ecf57f.js → SnkFormConfigManager-7a4e678f.js} +2 -2
- package/dist/esm/{SnkMultiSelectionListDataSource-7e7eada5.js → SnkMultiSelectionListDataSource-aad5d4ff.js} +1 -1
- package/dist/esm/{auth-fetcher-17dc5b5e.js → auth-fetcher-8ec448b0.js} +1 -1
- package/dist/esm/{form-config-fetcher-f121f880.js → form-config-fetcher-765b8498.js} +12 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_4.entry.js +2 -2
- package/dist/esm/snk-application.entry.js +3 -3
- package/dist/esm/snk-attach.entry.js +2 -2
- package/dist/esm/snk-crud.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +4 -4
- package/dist/esm/snk-filter-bar.entry.js +18 -6
- package/dist/esm/snk-filter-detail.entry.js +4 -1
- package/dist/esm/snk-filter-item.entry.js +2 -1
- package/dist/esm/snk-filter-modal-item.entry.js +2 -2
- package/dist/esm/snk-form-config.entry.js +1 -1
- package/dist/esm/snk-form.entry.js +3 -3
- package/dist/esm/snk-grid.entry.js +4 -7
- package/dist/esm/{snk-guides-viewer-90ca9105.js → snk-guides-viewer-b94752f2.js} +2 -2
- package/dist/esm/snk-guides-viewer.entry.js +4 -4
- package/dist/esm/snk-personalized-filter.entry.js +2 -2
- package/dist/esm/snk-simple-crud.entry.js +60 -48
- package/dist/sankhyablocks/p-004c356e.js +26 -0
- package/dist/sankhyablocks/{p-5c0b53ce.js → p-0624f62d.js} +1 -1
- package/dist/sankhyablocks/{p-d01ceda6.entry.js → p-0bba5c9f.entry.js} +1 -1
- package/dist/sankhyablocks/{p-663ff67b.entry.js → p-1048bd26.entry.js} +1 -1
- package/dist/sankhyablocks/p-125bb902.js +1 -0
- package/dist/sankhyablocks/{p-7ddd95b6.entry.js → p-24ed6ad6.entry.js} +1 -1
- package/dist/sankhyablocks/{p-1fa5a18c.entry.js → p-400097f2.entry.js} +1 -1
- package/dist/sankhyablocks/p-54a5d52a.entry.js +1 -0
- package/dist/sankhyablocks/p-5c8b136d.entry.js +1 -0
- package/dist/sankhyablocks/{p-2897fb8c.js → p-6c9adfca.js} +1 -1
- package/dist/sankhyablocks/p-85af23fe.entry.js +1 -0
- package/dist/sankhyablocks/{p-b41a622a.entry.js → p-85ba3d6b.entry.js} +1 -1
- package/dist/sankhyablocks/{p-384fd6ae.js → p-88b29791.js} +1 -1
- package/dist/sankhyablocks/{p-ba4871b5.entry.js → p-9e8618ec.entry.js} +1 -1
- package/dist/sankhyablocks/p-a043314f.entry.js +1 -0
- package/dist/sankhyablocks/{p-7f97fee2.entry.js → p-a1642e7c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-6b28cc74.entry.js → p-ac77949b.entry.js} +1 -1
- package/dist/sankhyablocks/{p-2cfe0c2c.entry.js → p-b47c2963.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7e05bd83.entry.js → p-bf39bdb8.entry.js} +1 -1
- package/dist/sankhyablocks/{p-8111f63f.entry.js → p-d5cb4b5a.entry.js} +1 -1
- package/dist/sankhyablocks/{p-fad4c2fe.js → p-efeca7ba.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +4 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +4 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +2 -0
- package/dist/types/components/snk-grid/snk-grid.d.ts +0 -1
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +11 -4
- package/dist/types/components.d.ts +24 -0
- package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +2 -0
- package/package.json +1 -1
- package/dist/sankhyablocks/p-1f3174cb.entry.js +0 -1
- package/dist/sankhyablocks/p-50783a8b.js +0 -1
- package/dist/sankhyablocks/p-7c501259.entry.js +0 -1
- package/dist/sankhyablocks/p-86801b08.entry.js +0 -1
- package/dist/sankhyablocks/p-a13ccb86.js +0 -26
- package/dist/sankhyablocks/p-d6317851.entry.js +0 -1
|
@@ -6,18 +6,18 @@ const index = require('./index-f9e81701.js');
|
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
8
8
|
const taskbarElements = require('./taskbar-elements-3ecd1278.js');
|
|
9
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
9
|
+
const ConfigStorage = require('./ConfigStorage-8d4e9d53.js');
|
|
10
10
|
const index$1 = require('./index-0922807b.js');
|
|
11
11
|
const fieldSearch = require('./field-search-f56aa7d6.js');
|
|
12
12
|
const index$2 = require('./index-102ba62d.js');
|
|
13
|
-
const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-
|
|
13
|
+
const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-1438f8f2.js');
|
|
14
14
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
15
15
|
require('./DataFetcher-99f0f6ed.js');
|
|
16
16
|
require('./pesquisa-fetcher-94f6b316.js');
|
|
17
17
|
require('./ISave-e91b70a7.js');
|
|
18
18
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
19
19
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
20
|
-
require('./form-config-fetcher-
|
|
20
|
+
require('./form-config-fetcher-d73f4449.js');
|
|
21
21
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
|
|
22
22
|
require('./PrintUtils-bcaeb82f.js');
|
|
23
23
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
@@ -422,15 +422,12 @@ const SnkGrid = class {
|
|
|
422
422
|
}
|
|
423
423
|
this._showSnkFilterBar = true;
|
|
424
424
|
}
|
|
425
|
-
getConfig() {
|
|
426
|
-
return this._gridConfig == undefined ? undefined : Object.assign({}, this._gridConfig);
|
|
427
|
-
}
|
|
428
425
|
render() {
|
|
429
426
|
if (!this._dataUnit) {
|
|
430
427
|
return undefined;
|
|
431
428
|
}
|
|
432
429
|
return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, index.h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, this._showSnkFilterBar &&
|
|
433
|
-
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 }), 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.
|
|
430
|
+
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 }), index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), index.h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none' }, index.h("slot", { name: this.topTaskbarCustomSlotId }))), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit }, index.h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, index.h("slot", { name: this.gridHeaderCustomSlotId }))), index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
|
|
434
431
|
}
|
|
435
432
|
get _element() { return index.getElement(this); }
|
|
436
433
|
static get watchers() { return {
|
|
@@ -2,7 +2,7 @@
|
|
|
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-33995e92.js');
|
|
6
6
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
7
7
|
const fieldSearch = require('./field-search-f56aa7d6.js');
|
|
8
8
|
const taskbarElements = require('./taskbar-elements-3ecd1278.js');
|
|
@@ -14,7 +14,7 @@ require('./ISave-e91b70a7.js');
|
|
|
14
14
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
15
15
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
16
16
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
17
|
-
require('./form-config-fetcher-
|
|
17
|
+
require('./form-config-fetcher-d73f4449.js');
|
|
18
18
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
19
19
|
|
|
20
20
|
const snkGuidesViewerCss = ".sc-snk-guides-viewer-h{--snk-guides-viewer--space-large:var(--space--large, 24px);--snk-guides-viewer--space-medium:var(--space--medium, 12px);--snk-guides-viewer__header--min-height:94px;--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-medium);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-medium)}.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-medium));height:calc(100vh - var(--snk-guides-viewer__header--min-height) - var(--snk-guides-viewer--space-large) - var(--snk-guides-viewer--space-medium))}.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}";
|
|
@@ -2,12 +2,12 @@
|
|
|
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-25721856.js');
|
|
6
6
|
require('./index-f9e81701.js');
|
|
7
7
|
require('@sankhyalabs/core');
|
|
8
|
-
require('./SnkFormConfigManager-
|
|
9
|
-
require('./ConfigStorage-
|
|
10
|
-
require('./form-config-fetcher-
|
|
8
|
+
require('./SnkFormConfigManager-33995e92.js');
|
|
9
|
+
require('./ConfigStorage-8d4e9d53.js');
|
|
10
|
+
require('./form-config-fetcher-d73f4449.js');
|
|
11
11
|
require('./DataFetcher-99f0f6ed.js');
|
|
12
12
|
require('./PrintUtils-bcaeb82f.js');
|
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
@@ -5,12 +5,12 @@ 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-8d4e9d53.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-
|
|
13
|
+
require('./form-config-fetcher-d73f4449.js');
|
|
14
14
|
require('./DataFetcher-99f0f6ed.js');
|
|
15
15
|
require('./PrintUtils-bcaeb82f.js');
|
|
16
16
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
@@ -8,16 +8,16 @@ const constants = require('./constants-35ddd366.js');
|
|
|
8
8
|
const taskbarElements = require('./taskbar-elements-3ecd1278.js');
|
|
9
9
|
require('./DataFetcher-99f0f6ed.js');
|
|
10
10
|
const pesquisaFetcher = require('./pesquisa-fetcher-94f6b316.js');
|
|
11
|
-
const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-
|
|
11
|
+
const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-1438f8f2.js');
|
|
12
12
|
const index$1 = require('./index-0922807b.js');
|
|
13
13
|
require('./ISave-e91b70a7.js');
|
|
14
14
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
15
15
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
16
16
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
17
|
-
require('./form-config-fetcher-
|
|
17
|
+
const formConfigFetcher = require('./form-config-fetcher-d73f4449.js');
|
|
18
18
|
const fieldSearch = require('./field-search-f56aa7d6.js');
|
|
19
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
20
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
19
|
+
const ConfigStorage = require('./ConfigStorage-8d4e9d53.js');
|
|
20
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-33995e92.js');
|
|
21
21
|
require('./index-102ba62d.js');
|
|
22
22
|
require('./PrintUtils-bcaeb82f.js');
|
|
23
23
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
@@ -40,6 +40,7 @@ const SnkSimpleCrud = class {
|
|
|
40
40
|
this.configuratorCancel = index.createEvent(this, "configuratorCancel", 7);
|
|
41
41
|
this._multiSelectionListDataSource = new SnkMultiSelectionListDataSource.SnkMultiSelectionListDataSource();
|
|
42
42
|
this._keyDownHandler = (event) => this.keyDownListener(event);
|
|
43
|
+
this._formConfigFetcher = new formConfigFetcher.FormConfigFetcher();
|
|
43
44
|
this._taskbarProcessor = new fieldSearch.TaskbarProcessor({
|
|
44
45
|
"snkSimpleCrudTaskbar.form_regular": this.getButtons(false, taskbarElements.TaskbarElement.GRID_MODE),
|
|
45
46
|
"snkSimpleCrudTaskbar.grid_regular": this.getButtons(false, taskbarElements.TaskbarElement.FORM_MODE),
|
|
@@ -61,6 +62,7 @@ const SnkSimpleCrud = class {
|
|
|
61
62
|
this._formFields = [];
|
|
62
63
|
this.multipleSelection = undefined;
|
|
63
64
|
this.useCancelConfirm = true;
|
|
65
|
+
this.resourceID = undefined;
|
|
64
66
|
this.taskbarManager = undefined;
|
|
65
67
|
this.messagesBuilder = undefined;
|
|
66
68
|
this.useEnterLikeTab = false;
|
|
@@ -71,6 +73,16 @@ const SnkSimpleCrud = class {
|
|
|
71
73
|
this.formLegacyConfigName = undefined;
|
|
72
74
|
this.ignoreReadOnlyFormFields = false;
|
|
73
75
|
}
|
|
76
|
+
handleResourceIDChanged(newValue, oldValue) {
|
|
77
|
+
if (core.StringUtils.isEmpty(newValue)) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (newValue === oldValue) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
this.loadFormConfig(true);
|
|
84
|
+
this.loadGridConfig(true);
|
|
85
|
+
}
|
|
74
86
|
getButtons(selected, changeModeBtn) {
|
|
75
87
|
return this.addConfigButton(this.resolveInMemoryBtns(selected ? REGULAR_SELECTED_BTNS : REGULAR_DEFAULT_BTNS)
|
|
76
88
|
.concat(changeModeBtn));
|
|
@@ -123,45 +135,29 @@ const SnkSimpleCrud = class {
|
|
|
123
135
|
this.dataStateChange.emit(newValue);
|
|
124
136
|
}
|
|
125
137
|
}
|
|
126
|
-
async observeFormLegacy() {
|
|
127
|
-
await this.handleUpdateFormLegacyConfig();
|
|
138
|
+
async observeFormLegacy(newValue, oldValue) {
|
|
139
|
+
await this.handleUpdateFormLegacyConfig(newValue, oldValue);
|
|
128
140
|
}
|
|
129
|
-
async observeGridLegacy() {
|
|
130
|
-
await this.handleUpdateGridLegacyConfig();
|
|
141
|
+
async observeGridLegacy(newValue, oldValue) {
|
|
142
|
+
await this.handleUpdateGridLegacyConfig(newValue, oldValue);
|
|
131
143
|
}
|
|
132
|
-
async handleUpdateGridLegacyConfig() {
|
|
133
|
-
if (
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
144
|
+
async handleUpdateGridLegacyConfig(newValue, oldValue) {
|
|
145
|
+
if (newValue == undefined || newValue == oldValue) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
if (!this._gridConfigAlreadyLoaded) {
|
|
149
|
+
return;
|
|
138
150
|
}
|
|
151
|
+
await this.loadGridConfig(true);
|
|
139
152
|
}
|
|
140
|
-
async handleUpdateFormLegacyConfig() {
|
|
141
|
-
|
|
142
|
-
if (!this.formLegacyConfigName) {
|
|
153
|
+
async handleUpdateFormLegacyConfig(newValue, oldValue) {
|
|
154
|
+
if (newValue == undefined || newValue == oldValue) {
|
|
143
155
|
return;
|
|
144
156
|
}
|
|
145
|
-
|
|
146
|
-
if (!legacyConfig)
|
|
157
|
+
if (!this._formConfigAlreadyLoaded) {
|
|
147
158
|
return;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
const newConfig = { emptyConfig: false, fields: fields };
|
|
151
|
-
this.setFormConfig(newConfig, true);
|
|
152
|
-
const formConfigManager = this.getFormConfigManger();
|
|
153
|
-
formConfigManager.setConfig(this.formConfig);
|
|
154
|
-
}
|
|
155
|
-
async fetchFormLegacyConfig() {
|
|
156
|
-
const payload = {
|
|
157
|
-
'requestBody': {
|
|
158
|
-
'config': {
|
|
159
|
-
'chave': this.formLegacyConfigName,
|
|
160
|
-
'tipo': 'T',
|
|
161
|
-
},
|
|
162
|
-
},
|
|
163
|
-
};
|
|
164
|
-
return await this.application.callServiceBroker('SystemUtilsSP.getConf', JSON.stringify(payload));
|
|
159
|
+
}
|
|
160
|
+
this.loadFormConfig(true);
|
|
165
161
|
}
|
|
166
162
|
openConfig(viewMode) {
|
|
167
163
|
this._snkConfigurator.close();
|
|
@@ -192,12 +188,16 @@ const SnkSimpleCrud = class {
|
|
|
192
188
|
}
|
|
193
189
|
}
|
|
194
190
|
loadGridConfig(forceUpdate) {
|
|
191
|
+
if (this.configName === undefined) {
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
195
194
|
if ((this.gridConfig != undefined || this._gridConfigAlreadyLoaded) && !forceUpdate) {
|
|
196
195
|
return;
|
|
197
196
|
}
|
|
197
|
+
this.addGridLegacyConfigName();
|
|
198
198
|
this._gridConfigAlreadyLoaded = true;
|
|
199
199
|
return new Promise((accept, reject) => {
|
|
200
|
-
ConfigStorage.ConfigStorage.loadGridConfig(this.configName, this.
|
|
200
|
+
ConfigStorage.ConfigStorage.loadGridConfig(this.configName, this.resolveResourceID())
|
|
201
201
|
.then(config => {
|
|
202
202
|
this.setGridConfig(config);
|
|
203
203
|
accept();
|
|
@@ -207,20 +207,28 @@ const SnkSimpleCrud = class {
|
|
|
207
207
|
});
|
|
208
208
|
});
|
|
209
209
|
}
|
|
210
|
-
|
|
210
|
+
formConfigIsLoaded() {
|
|
211
|
+
return this.formConfig != undefined || this._formConfigAlreadyLoaded;
|
|
212
|
+
}
|
|
213
|
+
async loadFormConfig(forceLoad = false) {
|
|
214
|
+
if (this.configName === undefined) {
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
211
217
|
if (this._formConfigManager == undefined) {
|
|
212
|
-
this._formConfigManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this.
|
|
218
|
+
this._formConfigManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this.resolveResourceID());
|
|
219
|
+
this._formConfigManager.setConfig(this.formConfig);
|
|
213
220
|
}
|
|
214
|
-
|
|
215
|
-
}
|
|
216
|
-
async loadFormConfig() {
|
|
217
|
-
const formConfigManager = this.getFormConfigManger();
|
|
218
|
-
formConfigManager.setConfig(this.formConfig);
|
|
219
|
-
if (this.formConfig != undefined || this._formConfigAlreadyLoaded) {
|
|
221
|
+
if (this.formConfigIsLoaded() && !forceLoad) {
|
|
220
222
|
return;
|
|
221
223
|
}
|
|
222
224
|
this._formConfigAlreadyLoaded = true;
|
|
223
|
-
this.
|
|
225
|
+
let loadedLegacyConfig = await this._formConfigFetcher.fetchLegacyConfigurableForm(this.formLegacyConfigName);
|
|
226
|
+
if (loadedLegacyConfig != undefined) {
|
|
227
|
+
this._formConfigManager.setConfig(loadedLegacyConfig);
|
|
228
|
+
this.setFormConfig(loadedLegacyConfig);
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
this.setFormConfig(await this._formConfigManager.loadConfig());
|
|
224
232
|
}
|
|
225
233
|
async componentWillRender() {
|
|
226
234
|
this._resourceID = await this.application.getResourceID();
|
|
@@ -475,7 +483,7 @@ const SnkSimpleCrud = class {
|
|
|
475
483
|
}
|
|
476
484
|
gridConfigChangeHandler(evt) {
|
|
477
485
|
const config = evt.detail;
|
|
478
|
-
ConfigStorage.ConfigStorage.saveGridConfig(config, this.configName, this.
|
|
486
|
+
ConfigStorage.ConfigStorage.saveGridConfig(config, this.configName, this.resolveResourceID());
|
|
479
487
|
evt.stopPropagation();
|
|
480
488
|
}
|
|
481
489
|
modalConfigChangeHandler(evt) {
|
|
@@ -506,6 +514,9 @@ const SnkSimpleCrud = class {
|
|
|
506
514
|
handleShowFormConfig() {
|
|
507
515
|
return this._showFormConfig && !this.formLegacyConfigName;
|
|
508
516
|
}
|
|
517
|
+
resolveResourceID() {
|
|
518
|
+
return core.StringUtils.isEmpty(this.resourceID) ? this._resourceID : this.resourceID;
|
|
519
|
+
}
|
|
509
520
|
/* istanbul ignore next */
|
|
510
521
|
render() {
|
|
511
522
|
var _a, _b, _c;
|
|
@@ -514,10 +525,11 @@ const SnkSimpleCrud = class {
|
|
|
514
525
|
}
|
|
515
526
|
return (index.h("snk-data-unit", { class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), onInsertionMode: () => this.goToView(constants.VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === constants.VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail }, index.h("header", null, index.h("slot", { name: "snkSimpleCrudHeader" })), index.h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, index.h("snk-taskbar", { class: "ez-box ez-box--shadow ez-padding--medium", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, slot: "leftButtons", presentationMode: index$1.PresentationMode.SECONDARY }, index.h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })), index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, index.h("stack-item", null, index.h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(constants.VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(pesquisaFetcher.InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
|
|
516
527
|
? undefined
|
|
517
|
-
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab }, index.h("div", { slot: "footer" }, index.h("slot", { name: "snkSimpleCrudFooter" })))), index.h("stack-item", null, index.h("ez-form", { class: `ez-margin-top--large ${this.handleShowFormConfig() ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: (_b = this._formConfigManager) === null || _b === void 0 ? void 0 : _b.getConfig((_c = this.dataState) === null || _c === void 0 ? void 0 : _c.insertionMode, this.dataUnit, this.ignoreReadOnlyFormFields), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this.handleShowFormConfig() && index.h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.
|
|
528
|
+
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab }, index.h("div", { slot: "footer" }, index.h("slot", { name: "snkSimpleCrudFooter" })))), index.h("stack-item", null, index.h("ez-form", { class: `ez-margin-top--large ${this.handleShowFormConfig() ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: (_b = this._formConfigManager) === null || _b === void 0 ? void 0 : _b.getConfig((_c = this.dataState) === null || _c === void 0 ? void 0 : _c.insertionMode, this.dataUnit, this.ignoreReadOnlyFormFields), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this.handleShowFormConfig() && index.h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), index.h("div", { id: `${this._customContainerId}` }, index.h("slot", { name: "SnkConfigContainerSlot" }))), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
|
|
518
529
|
}
|
|
519
530
|
get _element() { return index.getElement(this); }
|
|
520
531
|
static get watchers() { return {
|
|
532
|
+
"resourceID": ["handleResourceIDChanged"],
|
|
521
533
|
"mode": ["onModeChange"],
|
|
522
534
|
"dataState": ["observeDataState"],
|
|
523
535
|
"formLegacyConfigName": ["observeFormLegacy"],
|
|
@@ -8,6 +8,7 @@ export class SnkFilterDetail {
|
|
|
8
8
|
constructor() {
|
|
9
9
|
this.config = undefined;
|
|
10
10
|
this.getMessage = undefined;
|
|
11
|
+
this.showHardFixed = true;
|
|
11
12
|
}
|
|
12
13
|
/**
|
|
13
14
|
* Exibe o componente snk-filter-detail.
|
|
@@ -85,7 +86,9 @@ export class SnkFilterDetail {
|
|
|
85
86
|
return Object.assign(Object.assign({}, item), { visible: false, fixed: false, value: undefined });
|
|
86
87
|
}
|
|
87
88
|
getPopUpHeaderButtons() {
|
|
88
|
-
return (h(Fragment, null, !this.config.removalBlocked &&
|
|
89
|
+
return (h(Fragment, null, !this.config.removalBlocked &&
|
|
90
|
+
this.buildIcon(this.getMessage("snkFilterBar.removeFilter"), "delete", () => this.removeItem()), this.showHardFixed && !this.config.hardFixed &&
|
|
91
|
+
this.buildIcon(this.getMessage(this.config.fixed ? "snkFilterBar.unpinFilter" : "snkFilterBar.pinFilter"), this.config.fixed ? "un-pin" : "push-pin", () => this.changeConfig(Object.assign(Object.assign({}, this.config), { fixed: !this.config.fixed })))));
|
|
89
92
|
}
|
|
90
93
|
buildIcon(title, iconName, action) {
|
|
91
94
|
return (h("button", { onClick: () => action(), class: "sc-snk-filter-bar snk-filter-item__editor-header-button", ref: elem => elem && this.buildIdButton(elem, title) }, h("ez-icon", Object.assign({ title: title, iconName: iconName }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo(`_${title}`)}` }))));
|
|
@@ -196,6 +199,24 @@ export class SnkFilterDetail {
|
|
|
196
199
|
"tags": [],
|
|
197
200
|
"text": "Usado pra flexibilizar os verbetes e mensagens de acordo com o SnkMessageBuilder."
|
|
198
201
|
}
|
|
202
|
+
},
|
|
203
|
+
"showHardFixed": {
|
|
204
|
+
"type": "boolean",
|
|
205
|
+
"mutable": false,
|
|
206
|
+
"complexType": {
|
|
207
|
+
"original": "boolean",
|
|
208
|
+
"resolved": "boolean",
|
|
209
|
+
"references": {}
|
|
210
|
+
},
|
|
211
|
+
"required": false,
|
|
212
|
+
"optional": false,
|
|
213
|
+
"docs": {
|
|
214
|
+
"tags": [],
|
|
215
|
+
"text": "Controla a visibilidade do bot\u00E3o de fixar elemento"
|
|
216
|
+
},
|
|
217
|
+
"attribute": "show-hard-fixed",
|
|
218
|
+
"reflect": false,
|
|
219
|
+
"defaultValue": "true"
|
|
199
220
|
}
|
|
200
221
|
};
|
|
201
222
|
}
|
|
@@ -14,6 +14,7 @@ export class SnkFilterItem {
|
|
|
14
14
|
this.detailIsVisible = undefined;
|
|
15
15
|
this.config = undefined;
|
|
16
16
|
this.getMessage = undefined;
|
|
17
|
+
this.showChips = true;
|
|
17
18
|
}
|
|
18
19
|
observeDetailIsVisible(value) {
|
|
19
20
|
this.visibleChanged.emit(value);
|
|
@@ -289,7 +290,7 @@ export class SnkFilterItem {
|
|
|
289
290
|
}
|
|
290
291
|
render() {
|
|
291
292
|
const leftIcon = this.getLeftIconName();
|
|
292
|
-
return (h(Host, null, h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.getEnabledChip() }, leftIcon
|
|
293
|
+
return (h(Host, null, this.showChips && (h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.getEnabledChip() }, leftIcon && (h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" })), h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon", id: "removeFilter" }))), h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, h("snk-filter-detail", { config: this.config, getMessage: this.getMessage, class: "sc-snk-filter-bar snk-filter__popover ez-padding--small ez-elevation--16", ref: elem => this._popover = elem, key: this.config.id, "data-element-id": this._idSnkFilterDetail, showHardFixed: this.showChips }))));
|
|
293
294
|
}
|
|
294
295
|
static get is() { return "snk-filter-item"; }
|
|
295
296
|
static get properties() {
|
|
@@ -327,6 +328,24 @@ export class SnkFilterItem {
|
|
|
327
328
|
"tags": [],
|
|
328
329
|
"text": "Usado pra flexibilizar os verbetes e mensagens de acordo com o SnkMessageBuilder."
|
|
329
330
|
}
|
|
331
|
+
},
|
|
332
|
+
"showChips": {
|
|
333
|
+
"type": "boolean",
|
|
334
|
+
"mutable": false,
|
|
335
|
+
"complexType": {
|
|
336
|
+
"original": "boolean",
|
|
337
|
+
"resolved": "boolean",
|
|
338
|
+
"references": {}
|
|
339
|
+
},
|
|
340
|
+
"required": false,
|
|
341
|
+
"optional": false,
|
|
342
|
+
"docs": {
|
|
343
|
+
"tags": [],
|
|
344
|
+
"text": "Usado para controlar a visibilidade dos chips de filtros"
|
|
345
|
+
},
|
|
346
|
+
"attribute": "show-chips",
|
|
347
|
+
"reflect": false,
|
|
348
|
+
"defaultValue": "true"
|
|
330
349
|
}
|
|
331
350
|
};
|
|
332
351
|
}
|
|
@@ -245,6 +245,17 @@ export class SnkFilterBar {
|
|
|
245
245
|
filterActiveFilter(item) {
|
|
246
246
|
return item.visible || item.removalBlocked;
|
|
247
247
|
}
|
|
248
|
+
filterPersonalizedItems(item) {
|
|
249
|
+
return item.type === FilterItemType.PERSONALIZED;
|
|
250
|
+
}
|
|
251
|
+
getPersonalizedFilterVariableItems() {
|
|
252
|
+
return this.filterConfig
|
|
253
|
+
.filter(this.filterPersonalizedItems)
|
|
254
|
+
.map(item => {
|
|
255
|
+
const itemId = `filter-${item.id}`;
|
|
256
|
+
return (h("snk-filter-item", { key: item.id, id: itemId, config: Object.assign({}, item), onFocusin: () => this.itemFocused(itemId), onVisibleChanged: (evt) => this.scrollerLocked = evt.detail, onFilterChange: (event) => this.updateFilter(event.detail), getMessage: (key, props) => this.getMessage(key, props), showChips: false }));
|
|
257
|
+
});
|
|
258
|
+
}
|
|
248
259
|
getFilterItems() {
|
|
249
260
|
const pinnedItems = [];
|
|
250
261
|
const unpinnedItems = [];
|
|
@@ -430,9 +441,10 @@ export class SnkFilterBar {
|
|
|
430
441
|
if (this.showPersonalizedFilter) {
|
|
431
442
|
return h("snk-personalized-filter", { class: "filter-bar__personalized-filter", filterId: this.personalizedFilterId, ref: (el) => this._elPersonalizedFilter = el, onEzCancel: () => this.handleHidePersonalizedFilter(false), onEzAfterSave: () => this.handleHidePersonalizedFilter(true), entityUri: this.dataUnit.name, configName: this.configName, resourceID: this.resourceID });
|
|
432
443
|
}
|
|
433
|
-
if (this.mode
|
|
434
|
-
return (h(Host, { "data-mode": this.mode }, h("ez-button", { class: "ez-margin-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) })));
|
|
435
|
-
|
|
444
|
+
if (this.mode !== "regular") {
|
|
445
|
+
return (h(Host, { "data-mode": this.mode }, this.getPersonalizedFilterVariableItems(), this.mode === 'button' && (h("ez-button", { class: "ez-margin-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }))));
|
|
446
|
+
}
|
|
447
|
+
return (h(Host, null, h("div", null, h("span", { class: "snk-filter-bar__title", title: this.title, "data-tooltip": this.title, "data-flow": "bottom" }, this.title)), h("ez-scroller", { class: "snk-filter-bar__scroller", direction: EzScrollDirection.HORIZONTAL, activeShadow: true, locked: this.scrollerLocked }, h("section", { class: "snk-filter-bar__filter-item-container" }, this.getFilterItems())), h("ez-button", { class: "ez-padding-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" }))));
|
|
436
448
|
}
|
|
437
449
|
static get is() { return "snk-filter-bar"; }
|
|
438
450
|
static get encapsulation() { return "scoped"; }
|
|
@@ -404,15 +404,12 @@ export class SnkGrid {
|
|
|
404
404
|
}
|
|
405
405
|
this._showSnkFilterBar = true;
|
|
406
406
|
}
|
|
407
|
-
getConfig() {
|
|
408
|
-
return this._gridConfig == undefined ? undefined : Object.assign({}, this._gridConfig);
|
|
409
|
-
}
|
|
410
407
|
render() {
|
|
411
408
|
if (!this._dataUnit) {
|
|
412
409
|
return undefined;
|
|
413
410
|
}
|
|
414
411
|
return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, this._showSnkFilterBar &&
|
|
415
|
-
h(Fragment, null, 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 }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), 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' }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this.
|
|
412
|
+
h(Fragment, null, 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 }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), 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' }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === 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 }, h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
|
|
416
413
|
}
|
|
417
414
|
static get is() { return "snk-grid"; }
|
|
418
415
|
static get encapsulation() { return "scoped"; }
|