@sankhyalabs/sankhyablocks 2.1.2 → 2.1.4
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/AuthorizationConfig-79ffae4b.js +7 -0
- package/dist/cjs/{form-config-fetcher-2de7c16a.js → ConfigStorage-c112de1d.js} +101 -1
- package/dist/cjs/{SnkMessageBuilder-89482d28.js → SnkMessageBuilder-61f00e7f.js} +33 -5
- package/dist/cjs/{constants-9056ca9e.js → constants-a47a5190.js} +15 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +32 -65
- package/dist/cjs/snk-config-options.cjs.entry.js +1 -1
- package/dist/cjs/{snk-field-config_2.cjs.entry.js → snk-configurator_3.cjs.entry.js} +134 -13
- package/dist/cjs/snk-crud.cjs.entry.js +23 -6
- package/dist/cjs/snk-data-unit.cjs.entry.js +1 -1
- package/dist/cjs/{snk-configurator_6.cjs.entry.js → snk-filter-bar_7.cjs.entry.js} +528 -198
- package/dist/cjs/snk-form-config.cjs.entry.js +30 -24
- package/dist/cjs/snk-form.cjs.entry.js +30 -17
- package/dist/cjs/snk-tab-config.cjs.entry.js +1 -1
- package/dist/cjs/{taskbar-elements-90350a55.js → taskbar-elements-a0b857c0.js} +5 -9
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/snk-application/snk-application.js +4 -3
- package/dist/collection/components/snk-configurator/AuthorizationConfig.js +5 -0
- package/dist/collection/components/snk-configurator/snk-configurator.css +124 -0
- package/dist/collection/components/snk-configurator/snk-configurator.js +126 -181
- package/dist/collection/components/snk-crud/snk-crud.js +23 -5
- package/dist/collection/components/snk-form/snk-form.js +37 -54
- package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +47 -28
- package/dist/collection/components/snk-grid/snk-grid.js +69 -20
- package/dist/collection/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.css +166 -0
- package/dist/collection/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.js +605 -0
- package/dist/collection/components/snk-grid/subcomponents/snk-select-box/snk-select-box.css +9 -0
- package/dist/collection/components/snk-grid/subcomponents/snk-select-box/snk-select-box.js +70 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +5 -9
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +39 -11
- package/dist/collection/lib/configs/ConfigStorage.js +15 -15
- package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +1 -0
- package/dist/collection/lib/message/SnkMessageBuilder.js +5 -3
- package/dist/collection/lib/message/resources/snk-configurator.msg.js +0 -3
- package/dist/collection/lib/message/resources/snk-form.msg.js +3 -0
- package/dist/collection/lib/message/resources/snk-grid.msg.js +26 -0
- package/dist/collection/lib/utils/constants.js +14 -0
- package/dist/components/AuthorizationConfig.js +7 -0
- package/dist/components/{form-config-fetcher.js → ConfigStorage.js} +100 -2
- package/dist/components/SnkMessageBuilder.js +33 -5
- package/dist/components/constants.js +15 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +2 -1
- package/dist/components/snk-application2.js +4 -37
- package/dist/components/snk-configurator2.js +63 -165
- package/dist/components/snk-crud.js +53 -29
- package/dist/components/snk-form-config2.js +25 -19
- package/dist/components/snk-form2.js +33 -32
- package/dist/components/{snk-config-modal.d.ts → snk-grid-config.d.ts} +4 -4
- package/dist/components/snk-grid-config.js +6 -0
- package/dist/components/snk-grid-config2.js +497 -0
- package/dist/components/snk-grid2.js +65 -27
- package/dist/components/snk-select-box.d.ts +11 -0
- package/dist/components/snk-select-box.js +6 -0
- package/dist/components/snk-select-box2.js +38 -0
- package/dist/components/snk-taskbar2.js +45 -33
- package/dist/esm/AuthorizationConfig-dcbd207a.js +7 -0
- package/dist/esm/{form-config-fetcher-96c6c2dc.js → ConfigStorage-99025655.js} +100 -2
- package/dist/esm/{SnkMessageBuilder-a27fc561.js → SnkMessageBuilder-f5ef87df.js} +33 -5
- package/dist/esm/{constants-c6039d3d.js → constants-babe1a08.js} +15 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-application.entry.js +5 -38
- package/dist/esm/snk-config-options.entry.js +1 -1
- package/dist/esm/{snk-field-config_2.entry.js → snk-configurator_3.entry.js} +134 -14
- package/dist/esm/snk-crud.entry.js +23 -6
- package/dist/esm/snk-data-unit.entry.js +1 -1
- package/dist/esm/{snk-configurator_6.entry.js → snk-filter-bar_7.entry.js} +529 -200
- package/dist/esm/snk-form-config.entry.js +25 -19
- package/dist/esm/snk-form.entry.js +30 -17
- package/dist/esm/snk-tab-config.entry.js +1 -1
- package/dist/esm/{taskbar-elements-0f41cd77.js → taskbar-elements-4d6584cd.js} +5 -9
- package/dist/sankhyablocks/p-105cd4a8.entry.js +1 -0
- package/dist/sankhyablocks/p-4131d41e.entry.js +1 -0
- package/dist/sankhyablocks/{p-8706fe65.entry.js → p-43aff8f5.entry.js} +1 -1
- package/dist/sankhyablocks/p-53f33e9d.entry.js +1 -0
- package/dist/sankhyablocks/p-639b8f6e.entry.js +76 -0
- package/dist/sankhyablocks/{p-a5b26df2.js → p-6673c77c.js} +1 -1
- package/dist/sankhyablocks/p-6ba8f415.js +26 -0
- package/dist/sankhyablocks/{p-2517529d.js → p-877bd6cf.js} +1 -1
- package/dist/sankhyablocks/p-87896198.entry.js +1 -0
- package/dist/sankhyablocks/p-bd6d4a83.js +1 -0
- package/dist/sankhyablocks/p-cae38f51.entry.js +1 -0
- package/dist/sankhyablocks/{p-f37cdeb5.entry.js → p-cd03ea9e.entry.js} +1 -1
- package/dist/sankhyablocks/p-dc36cfbf.js +1 -0
- package/dist/sankhyablocks/{p-92782503.entry.js → p-eb94df0b.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +0 -1
- package/dist/types/components/snk-configurator/AuthorizationConfig.d.ts +4 -0
- package/dist/types/components/snk-configurator/snk-configurator.d.ts +21 -24
- package/dist/types/components/snk-crud/snk-crud.d.ts +6 -0
- package/dist/types/components/snk-form/snk-form.d.ts +6 -9
- package/dist/types/components/snk-form/subcomponents/snk-form-config/snk-form-config.d.ts +7 -3
- package/dist/types/components/snk-grid/snk-grid.d.ts +13 -3
- package/dist/types/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.d.ts +66 -0
- package/dist/types/components/snk-grid/subcomponents/snk-select-box/snk-select-box.d.ts +7 -0
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +3 -4
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +3 -1
- package/dist/types/components.d.ts +104 -74
- package/dist/types/lib/configs/ConfigStorage.d.ts +3 -3
- package/dist/types/lib/message/resources/snk-configurator.msg.d.ts +0 -1
- package/dist/types/lib/message/resources/snk-grid.msg.d.ts +2 -0
- package/dist/types/lib/utils/constants.d.ts +14 -0
- package/package.json +1 -1
- package/react/components.d.ts +2 -1
- package/react/components.js +2 -1
- package/react/components.js.map +1 -1
- package/dist/cjs/configurableElementsStorage-93459c72.js +0 -20
- package/dist/cjs/snk-config-modal.cjs.entry.js +0 -62
- package/dist/collection/components/snk-configurator/subcomponents/configModalProvider/configurableElementsStorage.js +0 -16
- package/dist/collection/components/snk-configurator/subcomponents/snk-config-modal/snk-config-modal.css +0 -122
- package/dist/collection/components/snk-configurator/subcomponents/snk-config-modal/snk-config-modal.js +0 -137
- package/dist/components/snk-config-modal.js +0 -6
- package/dist/components/snk-config-modal2.js +0 -91
- package/dist/esm/configurableElementsStorage-cdc144b5.js +0 -18
- package/dist/esm/snk-config-modal.entry.js +0 -58
- package/dist/sankhyablocks/p-361299e8.js +0 -26
- package/dist/sankhyablocks/p-599846fb.entry.js +0 -75
- package/dist/sankhyablocks/p-59d8c47a.js +0 -1
- package/dist/sankhyablocks/p-60eef7cd.entry.js +0 -1
- package/dist/sankhyablocks/p-626cf022.entry.js +0 -1
- package/dist/sankhyablocks/p-6511d132.entry.js +0 -1
- package/dist/sankhyablocks/p-cb8d71ba.entry.js +0 -1
- package/dist/sankhyablocks/p-ce7c38a1.entry.js +0 -1
- package/dist/sankhyablocks/p-d50651a3.js +0 -1
- package/dist/sankhyablocks/p-e8591491.entry.js +0 -1
- package/dist/types/components/snk-configurator/subcomponents/configModalProvider/configurableElementsStorage.d.ts +0 -8
- package/dist/types/components/snk-configurator/subcomponents/snk-config-modal/snk-config-modal.d.ts +0 -38
package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js
CHANGED
|
@@ -4,6 +4,7 @@ import { ApplicationContext, ObjectUtils, ArrayUtils } from '@sankhyalabs/core';
|
|
|
4
4
|
import { ApplicationUtils, DialogType } from "@sankhyalabs/ezui/dist/collection/utils";
|
|
5
5
|
import { ACTION_CONFIG, CONFIG_EVENTS, DEFAULT_TYPE, TAB_NAMES } from "../../../../lib/utils/constants";
|
|
6
6
|
import { UserConfigType } from "../../../../lib/http/data-fetcher/fetchers/form-config-fetcher";
|
|
7
|
+
import { ConfigStorage } from "../../../../lib/configs/ConfigStorage";
|
|
7
8
|
const CONTAINER_ID = {
|
|
8
9
|
collapsibleBox: "EZ-COLLAPSIBLE-BOX",
|
|
9
10
|
withoutGroup: "fieldsWithoutGroupContainer",
|
|
@@ -155,14 +156,9 @@ export class SnkFormConfig {
|
|
|
155
156
|
&& this._optionFormConfigChanged === true
|
|
156
157
|
&& this._formConfigChanged === false;
|
|
157
158
|
}
|
|
158
|
-
|
|
159
|
-
var _a;
|
|
160
|
-
if (((_a = this._tempGroups) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
161
|
-
ApplicationUtils.alert(this.getMessage("snkFormConfig.confirm.title"), this.getMessage("snkFormConfig.confirm.group"));
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
const isDefault = this.isDefaultConfiguration();
|
|
159
|
+
buildConfigToSave() {
|
|
165
160
|
let formConfig = {};
|
|
161
|
+
const isDefault = this.isDefaultConfiguration();
|
|
166
162
|
if (isDefault) {
|
|
167
163
|
formConfig = ObjectUtils.copy(this.formConfig);
|
|
168
164
|
}
|
|
@@ -180,9 +176,24 @@ export class SnkFormConfig {
|
|
|
180
176
|
}
|
|
181
177
|
}
|
|
182
178
|
formConfig.defaultConfiguration = isDefault;
|
|
183
|
-
|
|
179
|
+
return formConfig;
|
|
180
|
+
}
|
|
181
|
+
saveConfig() {
|
|
182
|
+
var _a;
|
|
183
|
+
if (((_a = this._tempGroups) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
184
|
+
ApplicationUtils.alert(this.getMessage("snkFormConfig.confirm.title"), this.getMessage("snkFormConfig.confirm.group"));
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
const formConfig = this.buildConfigToSave();
|
|
184
188
|
this._formConfigChanged = false;
|
|
185
189
|
this._optionFormConfigChanged = false;
|
|
190
|
+
ConfigStorage.saveFormConfig(formConfig, this.configName)
|
|
191
|
+
.then((response) => {
|
|
192
|
+
if ((response === null || response === void 0 ? void 0 : response.resource) != undefined) {
|
|
193
|
+
ApplicationUtils.info(this.getMessage("snkFormConfig.info.successfullyConfigSaved"), { iconName: "check" });
|
|
194
|
+
this.configChange.emit(formConfig);
|
|
195
|
+
}
|
|
196
|
+
});
|
|
186
197
|
}
|
|
187
198
|
applyOptionConfig() {
|
|
188
199
|
if (this._optionFormConfigChanged === true && this._optionFormConfigSelected != undefined) {
|
|
@@ -239,12 +250,12 @@ export class SnkFormConfig {
|
|
|
239
250
|
this.openConfirmDialog(this.getMessage("snkFormConfig.confirm.exit")).then((canClose) => {
|
|
240
251
|
if (canClose) {
|
|
241
252
|
this._formConfigChanged = false;
|
|
242
|
-
this.
|
|
253
|
+
this.configClose.emit();
|
|
243
254
|
}
|
|
244
255
|
});
|
|
245
256
|
}
|
|
246
257
|
else {
|
|
247
|
-
this.
|
|
258
|
+
this.configClose.emit();
|
|
248
259
|
}
|
|
249
260
|
}
|
|
250
261
|
openConfirmDialog(msg = "", title = this.getMessage("snkFormConfig.confirm.title")) {
|
|
@@ -448,9 +459,8 @@ export class SnkFormConfig {
|
|
|
448
459
|
this._sortableGroup.on(CONFIG_EVENTS.dragStop, (evt) => this.controlStopDraggingGroup(evt));
|
|
449
460
|
}
|
|
450
461
|
loadUserConfig() {
|
|
451
|
-
var _a;
|
|
452
462
|
if (this._application != undefined) {
|
|
453
|
-
this._application.fetchUserAvailableConfigs(
|
|
463
|
+
this._application.fetchUserAvailableConfigs(this.configName)
|
|
454
464
|
.then((userConfig) => {
|
|
455
465
|
this._formConfigOptions = userConfig;
|
|
456
466
|
let isDefault = this._formConfig != undefined ? this._formConfig.defaultConfiguration : true;
|
|
@@ -502,14 +512,13 @@ export class SnkFormConfig {
|
|
|
502
512
|
}
|
|
503
513
|
}
|
|
504
514
|
loadConfigByUser() {
|
|
505
|
-
var _a;
|
|
506
515
|
if (this._application != undefined) {
|
|
507
516
|
const option = this._optionFormConfigSelected;
|
|
508
517
|
const fetchActionName = (option === null || option === void 0 ? void 0 : option.origin) === UserConfigType.DEFAULT ? "fetchDefaultConfig" :
|
|
509
518
|
(option === null || option === void 0 ? void 0 : option.origin) === UserConfigType.USER ? "fetchLegacyConfig" :
|
|
510
519
|
undefined;
|
|
511
520
|
if (fetchActionName != undefined) {
|
|
512
|
-
this._application[fetchActionName](
|
|
521
|
+
this._application[fetchActionName](this.configName)
|
|
513
522
|
.then((formConfig) => {
|
|
514
523
|
if (formConfig != undefined) {
|
|
515
524
|
this._formConfig = formConfig;
|
|
@@ -766,9 +775,6 @@ export class SnkFormConfig {
|
|
|
766
775
|
this.onFilterChange(filterValue);
|
|
767
776
|
}
|
|
768
777
|
}
|
|
769
|
-
setShowFormConfig(value) {
|
|
770
|
-
this.parentForm.setShowFormConfig(value);
|
|
771
|
-
}
|
|
772
778
|
changeTabSelected(tabSelected) {
|
|
773
779
|
this._tabSelected = tabSelected.index;
|
|
774
780
|
const selectorTab = this._formContainer.querySelector("div#tab" + tabSelected.index);
|
|
@@ -1007,24 +1013,22 @@ export class SnkFormConfig {
|
|
|
1007
1013
|
},
|
|
1008
1014
|
"defaultValue": "{} as IFormConfig"
|
|
1009
1015
|
},
|
|
1010
|
-
"
|
|
1011
|
-
"type": "
|
|
1016
|
+
"configName": {
|
|
1017
|
+
"type": "string",
|
|
1012
1018
|
"mutable": false,
|
|
1013
1019
|
"complexType": {
|
|
1014
|
-
"original": "
|
|
1015
|
-
"resolved": "
|
|
1016
|
-
"references": {
|
|
1017
|
-
"HTMLSnkFormElement": {
|
|
1018
|
-
"location": "global"
|
|
1019
|
-
}
|
|
1020
|
-
}
|
|
1020
|
+
"original": "string",
|
|
1021
|
+
"resolved": "string",
|
|
1022
|
+
"references": {}
|
|
1021
1023
|
},
|
|
1022
1024
|
"required": false,
|
|
1023
1025
|
"optional": false,
|
|
1024
1026
|
"docs": {
|
|
1025
1027
|
"tags": [],
|
|
1026
|
-
"text": "
|
|
1027
|
-
}
|
|
1028
|
+
"text": "Nome usado para guardar/recuperar as configura\u00E7\u00F5es do formul\u00E1rio."
|
|
1029
|
+
},
|
|
1030
|
+
"attribute": "config-name",
|
|
1031
|
+
"reflect": true
|
|
1028
1032
|
}
|
|
1029
1033
|
};
|
|
1030
1034
|
}
|
|
@@ -1062,6 +1066,21 @@ export class SnkFormConfig {
|
|
|
1062
1066
|
}
|
|
1063
1067
|
}
|
|
1064
1068
|
}
|
|
1069
|
+
}, {
|
|
1070
|
+
"method": "configClose",
|
|
1071
|
+
"name": "configClose",
|
|
1072
|
+
"bubbles": true,
|
|
1073
|
+
"cancelable": true,
|
|
1074
|
+
"composed": true,
|
|
1075
|
+
"docs": {
|
|
1076
|
+
"tags": [],
|
|
1077
|
+
"text": "Evento disparado ao fechar as configura\u00E7\u00F5es."
|
|
1078
|
+
},
|
|
1079
|
+
"complexType": {
|
|
1080
|
+
"original": "void",
|
|
1081
|
+
"resolved": "void",
|
|
1082
|
+
"references": {}
|
|
1083
|
+
}
|
|
1065
1084
|
}];
|
|
1066
1085
|
}
|
|
1067
1086
|
static get watchers() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from '@stencil/core';
|
|
2
2
|
import TaskbarProcessor from '../snk-taskbar/processor/taskbar-processor';
|
|
3
|
-
import
|
|
3
|
+
import { ConfigStorage } from '../../lib/configs/ConfigStorage';
|
|
4
4
|
export class SnkGrid {
|
|
5
5
|
constructor() {
|
|
6
6
|
this._topTaskbarProcessor = new TaskbarProcessor({
|
|
@@ -10,33 +10,67 @@ export class SnkGrid {
|
|
|
10
10
|
"snkGridHeaderTaskbar.unselected": ["REFRESH"],
|
|
11
11
|
"snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH"]
|
|
12
12
|
});
|
|
13
|
+
this._popUpGridConfig = false;
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
|
-
* Método responsável em abrir
|
|
16
|
+
* Método responsável em abrir o modal de configurações da grade.
|
|
16
17
|
*/
|
|
17
|
-
async
|
|
18
|
+
async showConfig() {
|
|
18
19
|
if (this._grid == undefined) {
|
|
19
20
|
return;
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
this.openGridConfig();
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Método responsável em fechar o modal de configurações da grade.
|
|
26
|
+
*/
|
|
27
|
+
async hideConfig() {
|
|
28
|
+
if (this._grid == undefined) {
|
|
29
|
+
return;
|
|
26
30
|
}
|
|
31
|
+
this.closeGridConfig();
|
|
27
32
|
}
|
|
28
33
|
/**
|
|
29
34
|
* Método responsável por setar as configurações da grade.
|
|
30
35
|
*/
|
|
31
36
|
async setConfig(config) {
|
|
37
|
+
this.setGridConfig(config);
|
|
38
|
+
}
|
|
39
|
+
openGridConfig() {
|
|
40
|
+
this._grid.getColumnsState()
|
|
41
|
+
.then((gridColumns) => {
|
|
42
|
+
this._snkGridConfig.columns = gridColumns.filter(c => c.name);
|
|
43
|
+
this._snkGridConfig.selectedIndex = 0;
|
|
44
|
+
this._popUpGridConfig = true;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
closeGridConfig() {
|
|
48
|
+
this._popUpGridConfig = false;
|
|
49
|
+
}
|
|
50
|
+
setGridConfig(config) {
|
|
32
51
|
this._gridConfig = config;
|
|
33
52
|
}
|
|
53
|
+
loadConfig() {
|
|
54
|
+
ConfigStorage.get()
|
|
55
|
+
.loadGridConfig(this.configName)
|
|
56
|
+
.then((config) => {
|
|
57
|
+
this.setGridConfig(config);
|
|
58
|
+
})
|
|
59
|
+
.catch((error) => {
|
|
60
|
+
console.warn(error);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
saveConfig(config) {
|
|
64
|
+
this._snkGridConfig.saveConfig(config)
|
|
65
|
+
.then(() => {
|
|
66
|
+
this.changeConfig(config);
|
|
67
|
+
});
|
|
68
|
+
}
|
|
34
69
|
changeConfig(config) {
|
|
70
|
+
this._grid.setColumnsState(config.columns);
|
|
71
|
+
this.closeGridConfig();
|
|
35
72
|
this.configChanged.emit(config);
|
|
36
73
|
}
|
|
37
|
-
componentDidRender() {
|
|
38
|
-
ConfigurableElementsStorage.setGrid(this.configName, this._element);
|
|
39
|
-
}
|
|
40
74
|
componentWillLoad() {
|
|
41
75
|
let parent = this._element.parentElement;
|
|
42
76
|
while (parent) {
|
|
@@ -55,6 +89,7 @@ export class SnkGrid {
|
|
|
55
89
|
}
|
|
56
90
|
parent = parent.parentElement;
|
|
57
91
|
}
|
|
92
|
+
this.loadConfig();
|
|
58
93
|
}
|
|
59
94
|
componentWillRender() {
|
|
60
95
|
const headerTaskbarId = this._dataState && this._dataState.selectedRecords.length > 0 ? "snkGridHeaderTaskbar.selected" : "snkGridHeaderTaskbar.unselected";
|
|
@@ -65,7 +100,7 @@ export class SnkGrid {
|
|
|
65
100
|
if (!this._dataUnit) {
|
|
66
101
|
return undefined;
|
|
67
102
|
}
|
|
68
|
-
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-padding-bottom--medium ez-margin-bottom--medium" }, h("snk-filter-bar", { dataUnit: this._dataUnit, 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", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: "INSERT" })), h("ez-grid", { ref: ref => this._grid = ref, dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.
|
|
103
|
+
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-padding-bottom--medium ez-margin-bottom--medium" }, h("snk-filter-bar", { dataUnit: this._dataUnit, 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", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: "INSERT" })), h("ez-grid", { ref: ref => this._grid = ref, dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.saveConfig(evt.detail); }, onEzDoubleClick: () => this.gridDoubleClick.emit(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection }, h("snk-taskbar", { dataUnit: this._dataUnit, 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, selectedIndex: 0, onConfigChange: (evt) => this.changeConfig(evt.detail), onConfigCancel: () => this.closeGridConfig() }))));
|
|
69
104
|
}
|
|
70
105
|
static get is() { return "snk-grid"; }
|
|
71
106
|
static get encapsulation() { return "scoped"; }
|
|
@@ -184,7 +219,8 @@ export class SnkGrid {
|
|
|
184
219
|
return {
|
|
185
220
|
"_dataUnit": {},
|
|
186
221
|
"_dataState": {},
|
|
187
|
-
"_gridConfig": {}
|
|
222
|
+
"_gridConfig": {},
|
|
223
|
+
"_popUpGridConfig": {}
|
|
188
224
|
};
|
|
189
225
|
}
|
|
190
226
|
static get events() {
|
|
@@ -242,13 +278,26 @@ export class SnkGrid {
|
|
|
242
278
|
}
|
|
243
279
|
static get methods() {
|
|
244
280
|
return {
|
|
245
|
-
"
|
|
281
|
+
"showConfig": {
|
|
246
282
|
"complexType": {
|
|
247
|
-
"signature": "(
|
|
248
|
-
"parameters": [
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
283
|
+
"signature": "() => Promise<void>",
|
|
284
|
+
"parameters": [],
|
|
285
|
+
"references": {
|
|
286
|
+
"Promise": {
|
|
287
|
+
"location": "global"
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"return": "Promise<void>"
|
|
291
|
+
},
|
|
292
|
+
"docs": {
|
|
293
|
+
"text": "M\u00E9todo respons\u00E1vel em abrir o modal de configura\u00E7\u00F5es da grade.",
|
|
294
|
+
"tags": []
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
"hideConfig": {
|
|
298
|
+
"complexType": {
|
|
299
|
+
"signature": "() => Promise<void>",
|
|
300
|
+
"parameters": [],
|
|
252
301
|
"references": {
|
|
253
302
|
"Promise": {
|
|
254
303
|
"location": "global"
|
|
@@ -257,7 +306,7 @@ export class SnkGrid {
|
|
|
257
306
|
"return": "Promise<void>"
|
|
258
307
|
},
|
|
259
308
|
"docs": {
|
|
260
|
-
"text": "M\u00E9todo respons\u00E1vel em
|
|
309
|
+
"text": "M\u00E9todo respons\u00E1vel em fechar o modal de configura\u00E7\u00F5es da grade.",
|
|
261
310
|
"tags": []
|
|
262
311
|
}
|
|
263
312
|
},
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
/*@doc Define o espaçamento utilizado no rodapé do componente.*/
|
|
3
|
+
--snk-grid-config__footer--padding-top: var(--space--medium, 12px);
|
|
4
|
+
|
|
5
|
+
/*@doc Define o espaçamento utilizado no centro do componente.*/
|
|
6
|
+
--snk-grid-config__main--padding-right: var(--space--medium, 12px);
|
|
7
|
+
|
|
8
|
+
/*@doc Define o espaçamento utilizado no seletor de abas do componente.*/
|
|
9
|
+
--snk-grid-config__tabselector-container--padding: var(--space--medium, 12px);
|
|
10
|
+
|
|
11
|
+
/*@doc Define o espaçamento utilizado à esquerda do botão de fechar do componente.*/
|
|
12
|
+
--snk-grid-config__button-close--padding-left: var(--space--medium, 12px);
|
|
13
|
+
|
|
14
|
+
/*@doc Define a cor do texto utilizado para o titulo do componente.*/
|
|
15
|
+
--snk-grid-config__title--color: var(--title--primary, #2B3A54);
|
|
16
|
+
|
|
17
|
+
/*@doc Define o estilo da fonte utilizada para o titulo do componente.*/
|
|
18
|
+
--snk-grid-config__title--font-family: var(--font-pattern, "Roboto");
|
|
19
|
+
|
|
20
|
+
/*@doc Define o tamanho da fonte utilizada para o titulo do componente.*/
|
|
21
|
+
--snk-grid-config__title--font-size: var(--title--large, 20px);
|
|
22
|
+
|
|
23
|
+
/*@doc Define o peso do texto utilizado para o titulo do componente.*/
|
|
24
|
+
--snk-grid-config__title--font-weight: var(--text-weight--extra-large, 700);
|
|
25
|
+
|
|
26
|
+
/*@doc Define o estilo da fonte utilizada para o subtitulo do componente.*/
|
|
27
|
+
--snk-grid-config__subtitle--font-family: var(--font-pattern, "Roboto");
|
|
28
|
+
|
|
29
|
+
/*@doc Define o tamanho da fonte utilizada para o subtitulo do componente.*/
|
|
30
|
+
--snk-grid-config__subtitle--font-size: var(--text--medium, 14px);
|
|
31
|
+
|
|
32
|
+
/*@doc Define a largura da barra de rolagem do componente.*/
|
|
33
|
+
--snk-grid-config__scrollbar--width: var(--space--medium, 12px);
|
|
34
|
+
|
|
35
|
+
/*@doc Define a cor da barra de rolagem do componente.*/
|
|
36
|
+
--snk-grid-config__scrollbar--background-color-primary: var(--scrollbar--primary, #2B3A54);
|
|
37
|
+
|
|
38
|
+
/*@doc Define a cor de fundo da barra de rolagem do componente.*/
|
|
39
|
+
--snk-grid-config__scrollbar--background-color-secondary: var(--scrollbar--secondary, #E5EAF0);
|
|
40
|
+
|
|
41
|
+
/*@doc Define o raio da borda da barra de rolagem do componente.*/
|
|
42
|
+
--snk-grid-config__scrollbar--border-radius: var(--border--radius-small, 6px);
|
|
43
|
+
|
|
44
|
+
/* @doc Define o estilo do texto do grupo da lista. */
|
|
45
|
+
--snk-grid-config__group--font-family: var(--font-pattern, "Roboto");
|
|
46
|
+
|
|
47
|
+
/* @doc Define o tamanho do texto do grupo da lista. */
|
|
48
|
+
--snk-grid-config__group--font-size: var(--text--medium, 14px);
|
|
49
|
+
|
|
50
|
+
/* @doc Define o peso do texto do grupo da lista. */
|
|
51
|
+
--snk-grid-config__group--font-weight: var(--text-weight--large, 600);
|
|
52
|
+
|
|
53
|
+
/* @doc Define o espaçamento inferior do grupo da lista. */
|
|
54
|
+
--snk-grid-config__group--padding-bottom: var(--space-small, 6px);
|
|
55
|
+
|
|
56
|
+
display: grid;
|
|
57
|
+
grid-template-rows: auto 1fr auto;
|
|
58
|
+
max-height: 100%;
|
|
59
|
+
width: 100%;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@media screen and (min-width: 480px) {
|
|
63
|
+
:host {
|
|
64
|
+
width: 359px;
|
|
65
|
+
max-width: 359px;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.padding-right--medium {
|
|
70
|
+
padding-right: var(--space--medium);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
ez-list {
|
|
74
|
+
height: 100%;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.height-calc {
|
|
78
|
+
max-height: calc(100% - 24px);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.grid-config__footer {
|
|
82
|
+
display: flex;
|
|
83
|
+
justify-content: flex-end;
|
|
84
|
+
width: 100%;
|
|
85
|
+
|
|
86
|
+
/*public*/
|
|
87
|
+
padding-top: var(--snk-grid-config__footer--padding-top);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.hidden {
|
|
91
|
+
display: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.tabselector-container {
|
|
95
|
+
/*public*/
|
|
96
|
+
padding: var(--snk-grid-config__tabselector-container--padding) 0;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.button-close {
|
|
100
|
+
/*public*/
|
|
101
|
+
padding-left: var(--snk-grid-config__button-close--padding-left);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.title-container {
|
|
105
|
+
display: flex;
|
|
106
|
+
justify-content: space-between;
|
|
107
|
+
align-items: center;
|
|
108
|
+
width: 100%;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.title {
|
|
112
|
+
display: flex;
|
|
113
|
+
margin: 0;
|
|
114
|
+
line-height: normal;
|
|
115
|
+
letter-spacing: 0em;
|
|
116
|
+
text-align: left;
|
|
117
|
+
|
|
118
|
+
/*public*/
|
|
119
|
+
color: var(--snk-grid-config__title--color);
|
|
120
|
+
font-size: var(--snk-grid-config__title--font-size);
|
|
121
|
+
font-family: var(--snk-grid-config__title--font-family);
|
|
122
|
+
font-weight: var(--snk-grid-config__title--font-weight);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.subtitle {
|
|
126
|
+
/*public*/
|
|
127
|
+
color: var(--text--primary);
|
|
128
|
+
font-size: var(--snk-grid-config__subtitle--font-size);
|
|
129
|
+
font-family: var(--snk-grid-config__subtitle--font-family);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.grid-config__main {
|
|
133
|
+
overflow-y: auto;
|
|
134
|
+
scrollbar-width: thin;
|
|
135
|
+
|
|
136
|
+
/*public*/
|
|
137
|
+
scrollbar-color: var(--snk-grid-config__scrollbar--background-color-primary) var(--snk-grid-config__scrollbar--background-color-secondary);
|
|
138
|
+
padding-right: var(--snk-grid-config__main--padding-right);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.grid-config__main::-webkit-scrollbar-track {
|
|
142
|
+
/*public*/
|
|
143
|
+
background-color: var(--snk-grid-config__scrollbar--background-color-secondary);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.grid-config__main::-webkit-scrollbar-thumb {
|
|
147
|
+
/*public*/
|
|
148
|
+
background-color: var(--snk-grid-config__scrollbar--background-color-primary);
|
|
149
|
+
border-radius: var(--snk-grid-config__scrollbar--border-radius);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.grid-config__main::-webkit-scrollbar {
|
|
153
|
+
/*public*/
|
|
154
|
+
width: var(--snk-grid-config__scrollbar--width);
|
|
155
|
+
max-width: var(--snk-grid-config__scrollbar--width);
|
|
156
|
+
min-width: var(--snk-grid-config__scrollbar--width);
|
|
157
|
+
background-color: var(--snk-grid-config__scrollbar--background-color-secondary);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.group-name {
|
|
161
|
+
/*public*/
|
|
162
|
+
font-family: var(--snk-grid-config__group--font-family);
|
|
163
|
+
font-size: var(--snk-grid-config__group--font-size);
|
|
164
|
+
font-weight: var(--snk-grid-config__group--font-weight);
|
|
165
|
+
padding-bottom: var(--snk-grid-config__group--padding-bottom);
|
|
166
|
+
}
|