@sankhyalabs/sankhyablocks 3.4.0 → 3.4.2
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-8b5e3261.js → ConfigStorage-cfac5a0b.js} +184 -36
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +1 -111
- package/dist/cjs/snk-configurator_3.cjs.entry.js +9 -8
- package/dist/cjs/snk-data-exporter_8.cjs.entry.js +23 -33
- package/dist/cjs/snk-form-config.cjs.entry.js +3 -5
- package/dist/cjs/snk-form.cjs.entry.js +10 -12
- package/dist/collection/components/snk-application/snk-application.js +2 -129
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +15 -12
- package/dist/collection/components/snk-form/snk-form.js +9 -11
- package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +2 -4
- package/dist/collection/components/snk-grid/snk-grid.js +8 -7
- package/dist/collection/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.js +23 -45
- package/dist/collection/lib/configs/ConfigStorage.js +22 -12
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +49 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +8 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +23 -18
- package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +11 -5
- package/dist/collection/lib/http/data-fetcher/interfaces/IClientEventResponse.js +1 -0
- package/dist/collection/lib/http/data-fetcher/recaller/DataFetcherRecaller.js +14 -0
- package/dist/components/ConfigStorage.js +123 -35
- package/dist/components/DataFetcher.js +62 -2
- package/dist/components/index.d.ts +1 -1
- package/dist/components/snk-application2.js +0 -113
- package/dist/components/snk-filter-bar2.js +15 -12
- package/dist/components/snk-form-config2.js +2 -4
- package/dist/components/snk-form2.js +9 -11
- package/dist/components/snk-grid-config.js +2 -2
- package/dist/components/snk-grid-config2.js +9 -21
- package/dist/components/snk-grid2.js +8 -7
- package/dist/esm/{ConfigStorage-4654f57b.js → ConfigStorage-77bd9902.js} +185 -37
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-application.entry.js +1 -111
- package/dist/esm/snk-configurator_3.entry.js +9 -8
- package/dist/esm/snk-data-exporter_8.entry.js +23 -33
- package/dist/esm/snk-form-config.entry.js +3 -5
- package/dist/esm/snk-form.entry.js +10 -12
- package/dist/sankhyablocks/p-032e1308.entry.js +1 -0
- package/dist/sankhyablocks/{p-e906ba66.entry.js → p-32f9dc8a.entry.js} +5 -5
- package/dist/sankhyablocks/p-43c135c4.entry.js +1 -0
- package/dist/sankhyablocks/{p-f559c71a.entry.js → p-705b7671.entry.js} +1 -1
- package/dist/sankhyablocks/{p-93d8ea09.js → p-bbd0cf7a.js} +6 -6
- package/dist/sankhyablocks/p-db6d6b59.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +1 -16
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +1 -1
- package/dist/types/components/snk-grid/snk-grid.d.ts +2 -2
- package/dist/types/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.d.ts +5 -5
- package/dist/types/components.d.ts +8 -16
- package/dist/types/lib/configs/ConfigStorage.d.ts +7 -2
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +7 -1
- package/dist/types/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.d.ts +3 -2
- package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +2 -1
- package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +3 -2
- package/dist/types/lib/http/data-fetcher/fetchers/resource-fetcher.d.ts +5 -1
- package/dist/types/lib/http/data-fetcher/interfaces/IClientEventResponse.d.ts +4 -0
- package/dist/types/lib/http/data-fetcher/recaller/DataFetcherRecaller.d.ts +7 -0
- package/package.json +1 -1
- package/dist/sankhyablocks/p-125c2d01.entry.js +0 -1
- package/dist/sankhyablocks/p-a2ea13ed.entry.js +0 -1
- package/dist/sankhyablocks/p-b326cf51.entry.js +0 -1
|
@@ -7,7 +7,7 @@ const core = require('@sankhyalabs/core');
|
|
|
7
7
|
const constants = require('./constants-8f3504ec.js');
|
|
8
8
|
const AuthorizationConfig = require('./AuthorizationConfig-79ffae4b.js');
|
|
9
9
|
const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
10
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
10
|
+
const ConfigStorage = require('./ConfigStorage-cfac5a0b.js');
|
|
11
11
|
const index$1 = require('./index-f400b1d6.js');
|
|
12
12
|
const taskbarProcessor = require('./taskbar-processor-6f3d2a75.js');
|
|
13
13
|
const index$2 = require('./index-fc7ca86c.js');
|
|
@@ -218,9 +218,6 @@ const SnkGrid = class {
|
|
|
218
218
|
this._gridConfig = config;
|
|
219
219
|
}
|
|
220
220
|
loadConfig() {
|
|
221
|
-
if (this.configName == undefined) {
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
224
221
|
ConfigStorage.ConfigStorage.get()
|
|
225
222
|
.then((instance) => {
|
|
226
223
|
instance.loadGridConfig(this.configName)
|
|
@@ -232,16 +229,20 @@ const SnkGrid = class {
|
|
|
232
229
|
});
|
|
233
230
|
});
|
|
234
231
|
}
|
|
235
|
-
|
|
236
|
-
|
|
232
|
+
gridConfigChangeHandler(evt) {
|
|
233
|
+
const config = evt.detail;
|
|
234
|
+
ConfigStorage.ConfigStorage.saveGridConfig(config, this.configName);
|
|
235
|
+
evt.stopPropagation();
|
|
237
236
|
}
|
|
238
|
-
|
|
237
|
+
modalConfigChangeHandler(evt) {
|
|
238
|
+
const config = evt.detail;
|
|
239
239
|
this._grid.setColumnsState(config.columns)
|
|
240
240
|
.then(() => {
|
|
241
241
|
this.setGridConfig(config);
|
|
242
242
|
this.closeGridConfig();
|
|
243
243
|
this.dataExporterProviderStore();
|
|
244
244
|
});
|
|
245
|
+
evt.stopPropagation();
|
|
245
246
|
}
|
|
246
247
|
buildColumnsMetadata(columnsMetadata, gridColumns) {
|
|
247
248
|
gridColumns === null || gridColumns === void 0 ? void 0 : gridColumns.forEach((column) => {
|
|
@@ -388,7 +389,7 @@ const SnkGrid = class {
|
|
|
388
389
|
if (!this._dataUnit) {
|
|
389
390
|
return undefined;
|
|
390
391
|
}
|
|
391
|
-
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" }, index.h("snk-filter-bar", { dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName }), 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, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton() })), index.h("ez-grid", { ref: ref => this._grid = ref, "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.
|
|
392
|
+
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" }, index.h("snk-filter-bar", { dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName }), 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, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton() })), index.h("ez-grid", { ref: ref => this._grid = ref, "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: () => this.gridDoubleClick.emit(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection }, index.h("snk-taskbar", { dataUnit: this._dataUnit, configName: this.configName, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.actionsList })), 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), application: this._application, selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig() }))));
|
|
392
393
|
}
|
|
393
394
|
get _element() { return index.getElement(this); }
|
|
394
395
|
};
|
|
@@ -7,7 +7,7 @@ const core = require('@sankhyalabs/core');
|
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
8
|
const index = require('./index-f400b1d6.js');
|
|
9
9
|
const constants = require('./constants-8f3504ec.js');
|
|
10
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
10
|
+
const ConfigStorage = require('./ConfigStorage-cfac5a0b.js');
|
|
11
11
|
const EzScrollDirection = require('@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection');
|
|
12
12
|
const filterItemType_enum = require('./filter-item-type.enum-3daf58d3.js');
|
|
13
13
|
const ezModalContainer = require('@sankhyalabs/ezui/dist/collection/components/ez-modal-container');
|
|
@@ -701,7 +701,7 @@ const SnkFilterBar = class {
|
|
|
701
701
|
}
|
|
702
702
|
if (this._configUpdated) {
|
|
703
703
|
this._configUpdated = false;
|
|
704
|
-
|
|
704
|
+
ConfigStorage.ConfigStorage.saveFilterBarConfig(this.filterConfig, this.configName);
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
707
|
/**
|
|
@@ -907,16 +907,18 @@ const SnkFilterBar = class {
|
|
|
907
907
|
loadPermitions() {
|
|
908
908
|
this._application.isUserSup().then(value => this.allowDefault = value);
|
|
909
909
|
}
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
.
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
this.dataUnit
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
910
|
+
loadConfigFromStorage() {
|
|
911
|
+
ConfigStorage.ConfigStorage.get().then(instance => {
|
|
912
|
+
instance.loadFilterBarConfig(this.configName)
|
|
913
|
+
.then((filters) => {
|
|
914
|
+
this.filterConfig = filters.map(item => this.normalizeItem(item));
|
|
915
|
+
if (this.dataUnit) {
|
|
916
|
+
this.dataUnit.loadData(undefined, undefined);
|
|
917
|
+
}
|
|
918
|
+
})
|
|
919
|
+
.catch(reason => {
|
|
920
|
+
throw new core.ErrorException(this.getMessage("snkFilterBar.failToLoadConfig"), reason);
|
|
921
|
+
});
|
|
920
922
|
});
|
|
921
923
|
}
|
|
922
924
|
attachDataUnit() {
|
|
@@ -980,7 +982,7 @@ const SnkFilterBar = class {
|
|
|
980
982
|
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
981
983
|
if (this._application) {
|
|
982
984
|
this.loadPermitions();
|
|
983
|
-
this.
|
|
985
|
+
this.loadConfigFromStorage();
|
|
984
986
|
}
|
|
985
987
|
this.attachDataUnit();
|
|
986
988
|
}
|
|
@@ -1421,7 +1423,7 @@ SnkFilterModal.style = snkFilterModalCss;
|
|
|
1421
1423
|
|
|
1422
1424
|
const snkGridConfigCss = ".sc-snk-grid-config-h{--snk-grid-config__footer--padding-top:var(--space--medium, 12px);--snk-grid-config__main--padding-right:var(--space--medium, 12px);--snk-grid-config__tabselector-container--padding:var(--space--medium, 12px);--snk-grid-config__button-close--padding-left:var(--space--medium, 12px);--snk-grid-config__title--color:var(--title--primary, #2B3A54);--snk-grid-config__title--font-family:var(--font-pattern, \"Roboto\");--snk-grid-config__title--font-size:var(--title--large, 20px);--snk-grid-config__title--font-weight:var(--text-weight--extra-large, 700);--snk-grid-config__subtitle--font-family:var(--font-pattern, \"Roboto\");--snk-grid-config__subtitle--font-size:var(--text--medium, 14px);--snk-grid-config__group--font-family:var(--font-pattern, \"Roboto\");--snk-grid-config__group--font-size:var(--text--medium, 14px);--snk-grid-config__group--font-weight:var(--text-weight--large, 600);--snk-grid-config__group--padding-bottom:var(--space-small, 6px);--snk-grid-config__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-grid-config__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-grid-config__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-grid-config__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-grid-config__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-grid-config__scrollbar--width:var(--space--medium, 12px);display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}@media screen and (min-width: 480px){.sc-snk-grid-config-h{width:359px;max-width:359px}}.padding-right--medium.sc-snk-grid-config{padding-right:var(--space--medium)}ez-list.sc-snk-grid-config{height:100%}.height-calc.sc-snk-grid-config{max-height:calc(100% - 24px)}.grid-config__footer.sc-snk-grid-config{display:flex;justify-content:flex-end;width:100%;padding-top:var(--snk-grid-config__footer--padding-top)}.hidden.sc-snk-grid-config{display:none}.tabselector-container.sc-snk-grid-config{padding:var(--snk-grid-config__tabselector-container--padding) 0}.button-close.sc-snk-grid-config{padding-left:var(--snk-grid-config__button-close--padding-left)}.title-container.sc-snk-grid-config{display:flex;justify-content:space-between;align-items:center;width:100%}.title.sc-snk-grid-config{display:flex;margin:0;line-height:normal;letter-spacing:0em;text-align:left;color:var(--snk-grid-config__title--color);font-size:var(--snk-grid-config__title--font-size);font-family:var(--snk-grid-config__title--font-family);font-weight:var(--snk-grid-config__title--font-weight)}.subtitle.sc-snk-grid-config{color:var(--text--primary);font-size:var(--snk-grid-config__subtitle--font-size);font-family:var(--snk-grid-config__subtitle--font-family)}.grid-config__main.sc-snk-grid-config{overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--snk-grid-config__scrollbar--color-clicked) var(--snk-grid-config__scrollbar--color-background);padding-right:var(--snk-grid-config__main--padding-right)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar{width:var(--snk-grid-config__scrollbar--width);max-width:var(--snk-grid-config__scrollbar--width);min-width:var(--snk-grid-config__scrollbar--width);background-color:var(--snk-grid-config__scrollbar--color-background)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-track{background-color:var(--snk-grid-config__scrollbar--color-background);border-radius:var(--snk-grid-config__scrollbar--border-radius)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb{background-color:var(--snk-grid-config__scrollbar--color-default);border-radius:var(--snk-grid-config__scrollbar--border-radius)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb:vertical:hover,.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-grid-config__scrollbar--color-hover)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb:vertical:active,.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-grid-config__scrollbar--color-clicked)}.group-name.sc-snk-grid-config{font-family:var(--snk-grid-config__group--font-family);font-size:var(--snk-grid-config__group--font-size);font-weight:var(--snk-grid-config__group--font-weight);padding-bottom:var(--snk-grid-config__group--padding-bottom)}";
|
|
1423
1425
|
|
|
1424
|
-
const
|
|
1426
|
+
const SnkGridConfig = class {
|
|
1425
1427
|
constructor(hostRef) {
|
|
1426
1428
|
index$1.registerInstance(this, hostRef);
|
|
1427
1429
|
this.configChange = index$1.createEvent(this, "configChange", 7);
|
|
@@ -1436,24 +1438,9 @@ const EzGridConfig = class {
|
|
|
1436
1438
|
this.application = undefined;
|
|
1437
1439
|
this.columns = undefined;
|
|
1438
1440
|
this.config = undefined;
|
|
1441
|
+
this.configName = undefined;
|
|
1439
1442
|
}
|
|
1440
1443
|
/* Creation Methods */
|
|
1441
|
-
/**
|
|
1442
|
-
* Salva as configurações da grade.
|
|
1443
|
-
*/
|
|
1444
|
-
async saveConfig(config) {
|
|
1445
|
-
var _a;
|
|
1446
|
-
if (config == undefined || ((_a = this.application) === null || _a === void 0 ? void 0 : _a.configName) == undefined) {
|
|
1447
|
-
return;
|
|
1448
|
-
}
|
|
1449
|
-
ConfigStorage.ConfigStorage.saveGridConfig(config, this.application.configName)
|
|
1450
|
-
.then((response) => {
|
|
1451
|
-
if ((response === null || response === void 0 ? void 0 : response.resource) != undefined) {
|
|
1452
|
-
this.configChange.emit(config);
|
|
1453
|
-
this._orderList.clearHistory();
|
|
1454
|
-
}
|
|
1455
|
-
});
|
|
1456
|
-
}
|
|
1457
1444
|
/**
|
|
1458
1445
|
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
|
1459
1446
|
* através de um pequeno modulo na estrutura da aplicação:
|
|
@@ -1675,8 +1662,11 @@ const EzGridConfig = class {
|
|
|
1675
1662
|
}
|
|
1676
1663
|
}
|
|
1677
1664
|
_newConfig.columns = _newColumnConfigList;
|
|
1678
|
-
|
|
1665
|
+
ConfigStorage.ConfigStorage.saveGridConfig(_newConfig, this.configName)
|
|
1666
|
+
.then((response) => {
|
|
1679
1667
|
utils.ApplicationUtils.info(this.getMessage("snkGridConfig.info.successfullyConfigSaved"), { iconName: "check" });
|
|
1668
|
+
this.configChange.emit(response);
|
|
1669
|
+
this._orderList.clearHistory();
|
|
1680
1670
|
});
|
|
1681
1671
|
function adjustPriorityOrder(column, _newColumnConfig) {
|
|
1682
1672
|
if (orderArray) {
|
|
@@ -1892,7 +1882,7 @@ const EzGridConfig = class {
|
|
|
1892
1882
|
static get assetsDirs() { return ["../assets"]; }
|
|
1893
1883
|
get _element() { return index$1.getElement(this); }
|
|
1894
1884
|
};
|
|
1895
|
-
|
|
1885
|
+
SnkGridConfig.style = snkGridConfigCss;
|
|
1896
1886
|
|
|
1897
1887
|
const snkSelectBoxCss = "ez-combo-box{width:100px}.grid-config-combo{--ez-text-input--height:28px;--ez-text-input__input--background-color:#fff;--ez-text-input__input--border-color:#dce0e8}";
|
|
1898
1888
|
|
|
@@ -2120,6 +2110,6 @@ exports.snk_filter_bar = SnkFilterBar;
|
|
|
2120
2110
|
exports.snk_filter_item = SnkFilterItem;
|
|
2121
2111
|
exports.snk_filter_list = SnkFilterList;
|
|
2122
2112
|
exports.snk_filter_modal = SnkFilterModal;
|
|
2123
|
-
exports.snk_grid_config =
|
|
2113
|
+
exports.snk_grid_config = SnkGridConfig;
|
|
2124
2114
|
exports.snk_select_box = SelectBox;
|
|
2125
2115
|
exports.snk_taskbar = SnkTaskbar;
|
|
@@ -7,7 +7,7 @@ const draggable_bundle = require('./draggable.bundle-82a25c06.js');
|
|
|
7
7
|
const core = require('@sankhyalabs/core');
|
|
8
8
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
9
9
|
const constants = require('./constants-8f3504ec.js');
|
|
10
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
10
|
+
const ConfigStorage = require('./ConfigStorage-cfac5a0b.js');
|
|
11
11
|
require('./_commonjsHelpers-537d719a.js');
|
|
12
12
|
|
|
13
13
|
const snkFormConfigCss = ".sc-snk-form-config-h{--snk-form-config--z-index:var(--more-visible, 2);--snk-form-config--background-color:var(--background--xlight, #fff);--snk-form-config__icon--color:var(--text--disable, #AFB6C0);--snk-form-config__label-counter--font-weight:var(--text-weight--extra-small, 200);--snk-form-config__add-group-container--border-radius:var(--border--radius-medium, 12px);--snk-form-config__add-group-container--background-color:var(--background--medium, #d2dce9);--snk-form-config__add-group-container--padding:var(--space--small, 6px);--snk-form-config__add-group-content--border:2px dashed var(--color-strokes, #DCE0E8);--snk-form-config__add-group-content--border-radius:var(--border--radius-small, 6px);--snk-form-config__add-group-label--padding:var(--space--large, 24px);--snk-form-config__btn-add-group--padding:var(--space--large, 24px) var(--space--medium, 12px) 0;--snk-form-config__btn-add-group-container--padding:var(--space--medium, 12px);--snk-form-config__btn-add-group-container--border-radius:var(--border--radius-medium, 12px);--snk-form-config__btn-add-group-container--border:2px solid var(--color-strokes, #DCE0E8);--snk-form-config__btn-add-group-container--background-color:var(--background--body, #fafcff);display:flex;flex-direction:column;position:fixed;top:0;left:0;width:100%;height:100%;z-index:var(--snk-form-config--z-index);background-color:var(--snk-form-config--background-color)}.form-config__header-container.sc-snk-form-config{display:flex}.form-config__field-container.sc-snk-form-config{width:32%;padding:6px}.form-config__hide-content.sc-snk-form-config{display:none}ez-icon.sc-snk-form-config .left-icon.sc-snk-form-config{--ez-icon--color:var(--snk-form-config__icon--color)}.ez-box__label-counter.sc-snk-form-config{margin-top:-7px;font-weight:var(--snk-form-config__label-counter--font-weight)}.form-config__btn-options.sc-snk-form-config{--ez-button--min-width:300px;--ez-button--background-color:var(--snk-form-config--background-color)}[data-draggable-parent].sc-snk-form-config{position:relative}.form-config__field-config--selected.sc-snk-form-config{position:static}.form-config__field-config--dragged.sc-snk-form-config .draggable-mirror.sc-snk-form-config{z-index:var(--snk-form-config--z-index)}.form-config__config-options.sc-snk-form-config{position:relative;margin-top:-3px;min-width:100%;z-index:1}.form-config__tab-container.sc-snk-form-config,.form-config__fields-available.sc-snk-form-config{position:relative;height:100%;max-height:calc(100vh - 92px)}.form-config__tab-container.sc-snk-form-config .ez-box__container.sc-snk-form-config,.form-config__fields-available.sc-snk-form-config .ez-box__container.sc-snk-form-config{align-content:flex-start;height:100%}.form-config__fields-available.sc-snk-form-config [data-draggable-parent].sc-snk-form-config{align-content:flex-start;overflow-y:auto;height:100%;max-height:calc(100% - 122px)}.form-config__tab-content.sc-snk-form-config{align-content:flex-start;overflow-y:auto;height:auto;max-height:calc(100% - 128px)}[data-draggable-element].sc-snk-form-config{cursor:grab}.form-config__actions-button.sc-snk-form-config{--ez-actions-button__btn-action--min-width:235px}.form-config__add-group.sc-snk-form-config{position:relative;min-height:120px;margin-bottom:10px}.form-config__add-group-container.sc-snk-form-config{position:absolute;display:flex;flex-wrap:wrap;width:100%;box-sizing:border-box;border-radius:var(--snk-form-config__add-group-container--border-radius);background-color:var(--snk-form-config__add-group-container--background-color);padding:var(--snk-form-config__add-group-container--padding)}.form-config__add-group-content.sc-snk-form-config{width:100%;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;box-sizing:border-box;border:var(--snk-form-config__add-group-content--border);border-radius:var(--snk-form-config__add-group-content--border-radius)}.form-config__add-group-label.sc-snk-form-config{display:flex;justify-content:center;box-sizing:border-box;padding:var(--snk-form-config__add-group-label--padding)}.form-config__btn-add-group.sc-snk-form-config{position:relative;padding:var(--snk-form-config__btn-add-group--padding)}.form-config__btn-add-group-container.sc-snk-form-config{padding:var(--snk-form-config__btn-add-group-container--padding);border-radius:var(--snk-form-config__btn-add-group-container--border-radius);border:var(--snk-form-config__btn-add-group-container--border);background-color:var(--snk-form-config__btn-add-group-container--background-color)}ez-collapsible-box.draggable-mirror.sc-snk-form-config{display:table;background-color:var(--snk-form-config--background-color)}ez-collapsible-box.sc-snk-form-config{margin-bottom:10px}@media screen and (min-width: 480px){.form-config__field-config--selected.sc-snk-form-config .ez-flex.form-config__config-options.sc-snk-form-config{min-width:calc(300% + 12px)}.form-config__field-config--selected.sc-snk-form-config:nth-child(3n+2) .ez-flex.form-config__config-options.sc-snk-form-config{transform:translate(calc(100% / 3 * -1))}.form-config__field-config--selected.sc-snk-form-config:nth-child(3n+3) .ez-flex.form-config__config-options.sc-snk-form-config{transform:translate(calc(100% / 3 * -2))}}";
|
|
@@ -202,10 +202,8 @@ const SnkFormConfig = class {
|
|
|
202
202
|
this._optionFormConfigChanged = false;
|
|
203
203
|
ConfigStorage.ConfigStorage.saveFormConfig(formConfig, this.configName)
|
|
204
204
|
.then((response) => {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
this.configChange.emit(formConfig);
|
|
208
|
-
}
|
|
205
|
+
utils.ApplicationUtils.info(this.getMessage("snkFormConfig.info.successfullyConfigSaved"), { iconName: "check" });
|
|
206
|
+
this.configChange.emit(response);
|
|
209
207
|
});
|
|
210
208
|
}
|
|
211
209
|
applyOptionConfig() {
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-21bd01e1.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
7
|
+
const ConfigStorage = require('./ConfigStorage-cfac5a0b.js');
|
|
8
8
|
const index$1 = require('./index-f400b1d6.js');
|
|
9
9
|
const taskbarProcessor = require('./taskbar-processor-6f3d2a75.js');
|
|
10
10
|
require('./_commonjsHelpers-537d719a.js');
|
|
@@ -57,9 +57,6 @@ const SnkForm = class {
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
loadConfig() {
|
|
60
|
-
if (this.configName == undefined) {
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
60
|
ConfigStorage.ConfigStorage.get()
|
|
64
61
|
.then((instance) => {
|
|
65
62
|
instance.loadFormConfig(this.configName)
|
|
@@ -115,16 +112,17 @@ const SnkForm = class {
|
|
|
115
112
|
}
|
|
116
113
|
}
|
|
117
114
|
loadInsertionConfig() {
|
|
118
|
-
var _a;
|
|
119
115
|
if (this._dataUnit) {
|
|
120
116
|
const copyFormConfig = core.ObjectUtils.copy(this._editionFormConfig || {});
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
117
|
+
if (copyFormConfig.fields) {
|
|
118
|
+
copyFormConfig.fields = copyFormConfig.fields.filter(field => {
|
|
119
|
+
const def = this._dataUnit.getField(field.name);
|
|
120
|
+
if (def === null || def === void 0 ? void 0 : def.readOnly) {
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
return true;
|
|
124
|
+
});
|
|
125
|
+
}
|
|
128
126
|
this._insertionFormConfig = copyFormConfig;
|
|
129
127
|
}
|
|
130
128
|
}
|
|
@@ -18,7 +18,6 @@ import ParametersFetcher from "../../lib/http/data-fetcher/fetchers/parameters-f
|
|
|
18
18
|
import MGEAuthorization from '../../lib/auth/mgeauthorization.module';
|
|
19
19
|
import GridConfigFetcher from "../../lib/http/data-fetcher/fetchers/grid-config-fetcher";
|
|
20
20
|
import AuthFetcher, { AutorizationType } from "../../lib/http/data-fetcher/fetchers/auth-fetcher";
|
|
21
|
-
import FilterBarConfigFetcher from "../../lib/http/data-fetcher/fetchers/filter-bar-config-fetcher";
|
|
22
21
|
/**
|
|
23
22
|
* É possível customizar as mensagens dos blocos de construção através de um pequeno modulo na estrutura da aplicação:
|
|
24
23
|
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
|
@@ -406,38 +405,6 @@ export class SnkApplication {
|
|
|
406
405
|
async loadTotals(name, resourceID, filters) {
|
|
407
406
|
return this.totalsFetcher.fetchTotals(name, resourceID, filters);
|
|
408
407
|
}
|
|
409
|
-
/**
|
|
410
|
-
* Salva a configuração de grade.
|
|
411
|
-
*/
|
|
412
|
-
async saveGridConfig(config) {
|
|
413
|
-
return this.gridConfigFetcher.saveConfig(config, this.resourceID);
|
|
414
|
-
}
|
|
415
|
-
/**
|
|
416
|
-
* Obtém as configurações da barra de filtros
|
|
417
|
-
*/
|
|
418
|
-
async getFilterBarConfig(name) {
|
|
419
|
-
return new Promise((accept, reject) => {
|
|
420
|
-
if (this.configName === name && this._filterBarConfig) {
|
|
421
|
-
accept(this._filterBarConfig);
|
|
422
|
-
}
|
|
423
|
-
else if (this.configName === name && this._filterConfigPromise != undefined) {
|
|
424
|
-
Promise.all([this._filterConfigPromise])
|
|
425
|
-
.then(result => accept(result[0]))
|
|
426
|
-
.catch(reason => reject(reason[0]));
|
|
427
|
-
}
|
|
428
|
-
else {
|
|
429
|
-
this.filterBarConfigFetcher.getConfig(this.resourceID, name)
|
|
430
|
-
.then(config => accept(config))
|
|
431
|
-
.catch(reason => reject(reason));
|
|
432
|
-
}
|
|
433
|
-
});
|
|
434
|
-
}
|
|
435
|
-
/**
|
|
436
|
-
* Salva as configurações da barra de filtros
|
|
437
|
-
*/
|
|
438
|
-
async saveFilterBarConfig(config, name) {
|
|
439
|
-
return this.filterBarConfigFetcher.saveConfig(config, this.resourceID, name);
|
|
440
|
-
}
|
|
441
408
|
/**
|
|
442
409
|
* Salva a configuração de formulário.
|
|
443
410
|
*/
|
|
@@ -501,12 +468,6 @@ export class SnkApplication {
|
|
|
501
468
|
}
|
|
502
469
|
return this._authFetcher;
|
|
503
470
|
}
|
|
504
|
-
get filterBarConfigFetcher() {
|
|
505
|
-
if (!this._filterBarConfigFetcher) {
|
|
506
|
-
this._filterBarConfigFetcher = new FilterBarConfigFetcher();
|
|
507
|
-
}
|
|
508
|
-
return this._filterBarConfigFetcher;
|
|
509
|
-
}
|
|
510
471
|
get defaultValuesFetcher() {
|
|
511
472
|
if (!this._defaultValuesFetcher) {
|
|
512
473
|
this._defaultValuesFetcher = new DefaultValuesFetcher();
|
|
@@ -616,16 +577,6 @@ export class SnkApplication {
|
|
|
616
577
|
return this.executeSearch(searchArgument, fieldName, dataUnit);
|
|
617
578
|
});
|
|
618
579
|
ApplicationContext.setContextValue("__EZUI__GRID_LICENSE__", agGridLicense);
|
|
619
|
-
if (this.configName) {
|
|
620
|
-
this._filterConfigPromise = new Promise((accept, reject) => {
|
|
621
|
-
this.filterBarConfigFetcher.getConfig(this.resourceID, this.configName)
|
|
622
|
-
.then(config => {
|
|
623
|
-
this._filterBarConfig = config;
|
|
624
|
-
accept(config);
|
|
625
|
-
})
|
|
626
|
-
.catch(reason => reject(reason));
|
|
627
|
-
});
|
|
628
|
-
}
|
|
629
580
|
ErrorTracking.init();
|
|
630
581
|
ConfigStorage.get();
|
|
631
582
|
this.getDefaultValues().then((defaultValues) => {
|
|
@@ -1562,87 +1513,9 @@ export class SnkApplication {
|
|
|
1562
1513
|
"tags": []
|
|
1563
1514
|
}
|
|
1564
1515
|
},
|
|
1565
|
-
"saveGridConfig": {
|
|
1566
|
-
"complexType": {
|
|
1567
|
-
"signature": "(config: IGridConfig) => Promise<boolean>",
|
|
1568
|
-
"parameters": [{
|
|
1569
|
-
"tags": [],
|
|
1570
|
-
"text": ""
|
|
1571
|
-
}],
|
|
1572
|
-
"references": {
|
|
1573
|
-
"Promise": {
|
|
1574
|
-
"location": "global"
|
|
1575
|
-
},
|
|
1576
|
-
"IGridConfig": {
|
|
1577
|
-
"location": "import",
|
|
1578
|
-
"path": "@sankhyalabs/ezui/dist/types/components/ez-grid/controller/EzGridController"
|
|
1579
|
-
}
|
|
1580
|
-
},
|
|
1581
|
-
"return": "Promise<boolean>"
|
|
1582
|
-
},
|
|
1583
|
-
"docs": {
|
|
1584
|
-
"text": "Salva a configura\u00E7\u00E3o de grade.",
|
|
1585
|
-
"tags": []
|
|
1586
|
-
}
|
|
1587
|
-
},
|
|
1588
|
-
"getFilterBarConfig": {
|
|
1589
|
-
"complexType": {
|
|
1590
|
-
"signature": "(name: string) => Promise<Array<SnkFilterItemConfig>>",
|
|
1591
|
-
"parameters": [{
|
|
1592
|
-
"tags": [],
|
|
1593
|
-
"text": ""
|
|
1594
|
-
}],
|
|
1595
|
-
"references": {
|
|
1596
|
-
"Promise": {
|
|
1597
|
-
"location": "global"
|
|
1598
|
-
},
|
|
1599
|
-
"SnkFilterItemConfig": {
|
|
1600
|
-
"location": "import",
|
|
1601
|
-
"path": "../snk-filter-bar/filter-item/snk-filter-item"
|
|
1602
|
-
},
|
|
1603
|
-
"Array": {
|
|
1604
|
-
"location": "global"
|
|
1605
|
-
}
|
|
1606
|
-
},
|
|
1607
|
-
"return": "Promise<SnkFilterItemConfig[]>"
|
|
1608
|
-
},
|
|
1609
|
-
"docs": {
|
|
1610
|
-
"text": "Obt\u00E9m as configura\u00E7\u00F5es da barra de filtros",
|
|
1611
|
-
"tags": []
|
|
1612
|
-
}
|
|
1613
|
-
},
|
|
1614
|
-
"saveFilterBarConfig": {
|
|
1615
|
-
"complexType": {
|
|
1616
|
-
"signature": "(config: Array<SnkFilterItemConfig>, name: string) => Promise<boolean>",
|
|
1617
|
-
"parameters": [{
|
|
1618
|
-
"tags": [],
|
|
1619
|
-
"text": ""
|
|
1620
|
-
}, {
|
|
1621
|
-
"tags": [],
|
|
1622
|
-
"text": ""
|
|
1623
|
-
}],
|
|
1624
|
-
"references": {
|
|
1625
|
-
"Promise": {
|
|
1626
|
-
"location": "global"
|
|
1627
|
-
},
|
|
1628
|
-
"Array": {
|
|
1629
|
-
"location": "global"
|
|
1630
|
-
},
|
|
1631
|
-
"SnkFilterItemConfig": {
|
|
1632
|
-
"location": "import",
|
|
1633
|
-
"path": "../snk-filter-bar/filter-item/snk-filter-item"
|
|
1634
|
-
}
|
|
1635
|
-
},
|
|
1636
|
-
"return": "Promise<boolean>"
|
|
1637
|
-
},
|
|
1638
|
-
"docs": {
|
|
1639
|
-
"text": "Salva as configura\u00E7\u00F5es da barra de filtros",
|
|
1640
|
-
"tags": []
|
|
1641
|
-
}
|
|
1642
|
-
},
|
|
1643
1516
|
"saveFormConfig": {
|
|
1644
1517
|
"complexType": {
|
|
1645
|
-
"signature": "(config: IFormConfig, name: string) => Promise<
|
|
1518
|
+
"signature": "(config: IFormConfig, name: string) => Promise<IFormConfig>",
|
|
1646
1519
|
"parameters": [{
|
|
1647
1520
|
"tags": [],
|
|
1648
1521
|
"text": ""
|
|
@@ -1659,7 +1532,7 @@ export class SnkApplication {
|
|
|
1659
1532
|
"path": "@sankhyalabs/ezui/dist/types/components/ez-form/interfaces"
|
|
1660
1533
|
}
|
|
1661
1534
|
},
|
|
1662
|
-
"return": "Promise<
|
|
1535
|
+
"return": "Promise<IFormConfig>"
|
|
1663
1536
|
},
|
|
1664
1537
|
"docs": {
|
|
1665
1538
|
"text": "Salva a configura\u00E7\u00E3o de formul\u00E1rio.",
|
|
@@ -4,6 +4,7 @@ import { EzScrollDirection } from '@sankhyalabs/ezui/dist/collection/components/
|
|
|
4
4
|
import FilterItemType from './filter-item/filter-item-type.enum';
|
|
5
5
|
import { ModalAction } from '@sankhyalabs/ezui/dist/collection/components/ez-modal-container';
|
|
6
6
|
import buildFilter from './filter-item/dataunitfilter/data-unit-filter-builder';
|
|
7
|
+
import { ConfigStorage } from '../../lib/configs/ConfigStorage';
|
|
7
8
|
const PERSONALIZED_FILTER = "PERSONALIZED_FILTER";
|
|
8
9
|
const DEFAULT_FILTER = "DEFAULT_FILTER";
|
|
9
10
|
const CLEAR_ALL_FILTERS = "CLEAR_ALL_FILTERS";
|
|
@@ -85,7 +86,7 @@ export class SnkFilterBar {
|
|
|
85
86
|
}
|
|
86
87
|
if (this._configUpdated) {
|
|
87
88
|
this._configUpdated = false;
|
|
88
|
-
|
|
89
|
+
ConfigStorage.saveFilterBarConfig(this.filterConfig, this.configName);
|
|
89
90
|
}
|
|
90
91
|
}
|
|
91
92
|
/**
|
|
@@ -291,16 +292,18 @@ export class SnkFilterBar {
|
|
|
291
292
|
loadPermitions() {
|
|
292
293
|
this._application.isUserSup().then(value => this.allowDefault = value);
|
|
293
294
|
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
.
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
this.dataUnit
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
295
|
+
loadConfigFromStorage() {
|
|
296
|
+
ConfigStorage.get().then(instance => {
|
|
297
|
+
instance.loadFilterBarConfig(this.configName)
|
|
298
|
+
.then((filters) => {
|
|
299
|
+
this.filterConfig = filters.map(item => this.normalizeItem(item));
|
|
300
|
+
if (this.dataUnit) {
|
|
301
|
+
this.dataUnit.loadData(undefined, undefined);
|
|
302
|
+
}
|
|
303
|
+
})
|
|
304
|
+
.catch(reason => {
|
|
305
|
+
throw new ErrorException(this.getMessage("snkFilterBar.failToLoadConfig"), reason);
|
|
306
|
+
});
|
|
304
307
|
});
|
|
305
308
|
}
|
|
306
309
|
attachDataUnit() {
|
|
@@ -364,7 +367,7 @@ export class SnkFilterBar {
|
|
|
364
367
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
365
368
|
if (this._application) {
|
|
366
369
|
this.loadPermitions();
|
|
367
|
-
this.
|
|
370
|
+
this.loadConfigFromStorage();
|
|
368
371
|
}
|
|
369
372
|
this.attachDataUnit();
|
|
370
373
|
}
|
|
@@ -46,9 +46,6 @@ export class SnkForm {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
loadConfig() {
|
|
49
|
-
if (this.configName == undefined) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
49
|
ConfigStorage.get()
|
|
53
50
|
.then((instance) => {
|
|
54
51
|
instance.loadFormConfig(this.configName)
|
|
@@ -104,16 +101,17 @@ export class SnkForm {
|
|
|
104
101
|
}
|
|
105
102
|
}
|
|
106
103
|
loadInsertionConfig() {
|
|
107
|
-
var _a;
|
|
108
104
|
if (this._dataUnit) {
|
|
109
105
|
const copyFormConfig = ObjectUtils.copy(this._editionFormConfig || {});
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
106
|
+
if (copyFormConfig.fields) {
|
|
107
|
+
copyFormConfig.fields = copyFormConfig.fields.filter(field => {
|
|
108
|
+
const def = this._dataUnit.getField(field.name);
|
|
109
|
+
if (def === null || def === void 0 ? void 0 : def.readOnly) {
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
return true;
|
|
113
|
+
});
|
|
114
|
+
}
|
|
117
115
|
this._insertionFormConfig = copyFormConfig;
|
|
118
116
|
}
|
|
119
117
|
}
|
package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js
CHANGED
|
@@ -192,10 +192,8 @@ export class SnkFormConfig {
|
|
|
192
192
|
this._optionFormConfigChanged = false;
|
|
193
193
|
ConfigStorage.saveFormConfig(formConfig, this.configName)
|
|
194
194
|
.then((response) => {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
this.configChange.emit(formConfig);
|
|
198
|
-
}
|
|
195
|
+
ApplicationUtils.info(this.getMessage("snkFormConfig.info.successfullyConfigSaved"), { iconName: "check" });
|
|
196
|
+
this.configChange.emit(response);
|
|
199
197
|
});
|
|
200
198
|
}
|
|
201
199
|
applyOptionConfig() {
|
|
@@ -64,9 +64,6 @@ export class SnkGrid {
|
|
|
64
64
|
this._gridConfig = config;
|
|
65
65
|
}
|
|
66
66
|
loadConfig() {
|
|
67
|
-
if (this.configName == undefined) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
67
|
ConfigStorage.get()
|
|
71
68
|
.then((instance) => {
|
|
72
69
|
instance.loadGridConfig(this.configName)
|
|
@@ -78,16 +75,20 @@ export class SnkGrid {
|
|
|
78
75
|
});
|
|
79
76
|
});
|
|
80
77
|
}
|
|
81
|
-
|
|
82
|
-
|
|
78
|
+
gridConfigChangeHandler(evt) {
|
|
79
|
+
const config = evt.detail;
|
|
80
|
+
ConfigStorage.saveGridConfig(config, this.configName);
|
|
81
|
+
evt.stopPropagation();
|
|
83
82
|
}
|
|
84
|
-
|
|
83
|
+
modalConfigChangeHandler(evt) {
|
|
84
|
+
const config = evt.detail;
|
|
85
85
|
this._grid.setColumnsState(config.columns)
|
|
86
86
|
.then(() => {
|
|
87
87
|
this.setGridConfig(config);
|
|
88
88
|
this.closeGridConfig();
|
|
89
89
|
this.dataExporterProviderStore();
|
|
90
90
|
});
|
|
91
|
+
evt.stopPropagation();
|
|
91
92
|
}
|
|
92
93
|
buildColumnsMetadata(columnsMetadata, gridColumns) {
|
|
93
94
|
gridColumns === null || gridColumns === void 0 ? void 0 : gridColumns.forEach((column) => {
|
|
@@ -234,7 +235,7 @@ export class SnkGrid {
|
|
|
234
235
|
if (!this._dataUnit) {
|
|
235
236
|
return undefined;
|
|
236
237
|
}
|
|
237
|
-
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" }, h("snk-filter-bar", { dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName }), 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, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton() })), h("ez-grid", { ref: ref => this._grid = ref, "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.
|
|
238
|
+
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" }, h("snk-filter-bar", { dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName }), 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, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton() })), h("ez-grid", { ref: ref => this._grid = ref, "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: () => this.gridDoubleClick.emit(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection }, h("snk-taskbar", { dataUnit: this._dataUnit, configName: this.configName, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.actionsList })), 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), application: this._application, selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig() }))));
|
|
238
239
|
}
|
|
239
240
|
static get is() { return "snk-grid"; }
|
|
240
241
|
static get encapsulation() { return "scoped"; }
|