@sankhyalabs/sankhyablocks 5.1.4 → 5.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{SnkMessageBuilder-47185d5d.js → SnkMessageBuilder-c6bd8bc7.js} +9 -2
- 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 -1
- package/dist/cjs/snk-config-options.cjs.entry.js +2 -1
- package/dist/cjs/snk-configurator.cjs.entry.js +3 -2
- package/dist/cjs/snk-crud.cjs.entry.js +10 -3
- package/dist/cjs/snk-data-exporter.cjs.entry.js +10 -1
- package/dist/cjs/snk-data-unit-3b6ab2ad.js +436 -0
- package/dist/cjs/snk-data-unit.cjs.entry.js +6 -411
- package/dist/cjs/snk-detail-view.cjs.entry.js +7 -2
- package/dist/cjs/snk-field-config.cjs.entry.js +2 -4
- package/dist/cjs/snk-filter-bar.cjs.entry.js +3 -1
- package/dist/cjs/snk-filter-param-config.cjs.entry.js +2 -1
- package/dist/cjs/snk-form-config.cjs.entry.js +6 -5
- package/dist/cjs/snk-form.cjs.entry.js +2 -1
- package/dist/cjs/snk-grid.cjs.entry.js +3 -2
- package/dist/cjs/{snk-guides-viewer-6225bb73.js → snk-guides-viewer-21a2c43c.js} +13 -6
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +2 -1
- package/dist/cjs/snk-tab-config.cjs.entry.js +2 -1
- package/dist/cjs/snk-taskbar.cjs.entry.js +3 -1
- package/dist/collection/components/snk-application/snk-application.js +2 -2
- package/dist/collection/components/snk-configurator/snk-configurator.js +23 -2
- package/dist/collection/components/snk-crud/snk-crud.js +30 -3
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view.js +27 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +34 -7
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +29 -1
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +64 -3
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +23 -1
- package/dist/collection/components/snk-form/snk-form.js +22 -1
- package/dist/collection/components/snk-form/subcomponents/snk-config-options/snk-config-options.js +22 -1
- package/dist/collection/components/snk-form/subcomponents/snk-field-config/snk-field-config.js +23 -5
- package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +26 -5
- package/dist/collection/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.js +22 -1
- package/dist/collection/components/snk-grid/snk-grid.js +23 -2
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.js +26 -1
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +22 -1
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +23 -1
- package/dist/collection/lib/message/SnkMessageBuilder.js +9 -2
- package/dist/components/SnkMessageBuilder.js +9 -2
- package/dist/components/snk-application2.js +1 -1
- package/dist/components/snk-config-options2.js +3 -1
- package/dist/components/snk-configurator2.js +4 -2
- package/dist/components/snk-crud.js +11 -3
- package/dist/components/snk-data-exporter2.js +10 -1
- package/dist/components/snk-data-unit2.js +25 -4
- package/dist/components/snk-detail-view2.js +22 -8
- package/dist/components/snk-field-config2.js +5 -6
- package/dist/components/snk-filter-bar2.js +4 -1
- package/dist/components/snk-filter-param-config.js +3 -1
- package/dist/components/snk-form-config2.js +7 -5
- package/dist/components/snk-form.js +3 -1
- package/dist/components/snk-grid2.js +4 -2
- package/dist/components/snk-simple-crud.js +3 -1
- package/dist/components/snk-tab-config2.js +3 -1
- package/dist/components/snk-taskbar2.js +4 -1
- package/dist/esm/{SnkMessageBuilder-ec0850af.js → SnkMessageBuilder-68bbf0ae.js} +9 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-application.entry.js +1 -1
- package/dist/esm/snk-config-options.entry.js +2 -1
- package/dist/esm/snk-configurator.entry.js +3 -2
- package/dist/esm/snk-crud.entry.js +10 -3
- package/dist/esm/snk-data-exporter.entry.js +10 -1
- package/dist/esm/snk-data-unit-a8093f95.js +434 -0
- package/dist/esm/snk-data-unit.entry.js +5 -414
- package/dist/esm/snk-detail-view.entry.js +7 -2
- package/dist/esm/snk-field-config.entry.js +3 -5
- package/dist/esm/snk-filter-bar.entry.js +3 -1
- package/dist/esm/snk-filter-param-config.entry.js +2 -1
- package/dist/esm/snk-form-config.entry.js +6 -5
- package/dist/esm/snk-form.entry.js +2 -1
- package/dist/esm/snk-grid.entry.js +3 -2
- package/dist/esm/{snk-guides-viewer-73b9eb29.js → snk-guides-viewer-c9e5aa60.js} +14 -7
- package/dist/esm/snk-guides-viewer.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +2 -1
- package/dist/esm/snk-tab-config.entry.js +2 -1
- package/dist/esm/snk-taskbar.entry.js +3 -1
- package/dist/sankhyablocks/p-046b2563.entry.js +1 -0
- package/dist/sankhyablocks/p-0a1e7f75.entry.js +1 -0
- package/dist/sankhyablocks/{p-28c800b9.js → p-0d70c017.js} +1 -1
- package/dist/sankhyablocks/p-280b1321.entry.js +1 -0
- package/dist/sankhyablocks/p-32599159.entry.js +1 -0
- package/dist/sankhyablocks/{p-9ce550b7.entry.js → p-374af3cb.entry.js} +1 -1
- package/dist/sankhyablocks/p-39a49898.js +1 -0
- package/dist/sankhyablocks/p-5b84b0c5.entry.js +1 -0
- package/dist/sankhyablocks/p-601e6920.entry.js +1 -0
- package/dist/sankhyablocks/p-69af76d4.entry.js +1 -0
- package/dist/sankhyablocks/p-76f04efe.entry.js +1 -0
- package/dist/sankhyablocks/p-8293879e.entry.js +1 -0
- package/dist/sankhyablocks/p-93d8fe00.entry.js +1 -0
- package/dist/sankhyablocks/p-a12d74dc.entry.js +1 -0
- package/dist/sankhyablocks/p-a7468f4b.js +1 -0
- package/dist/sankhyablocks/p-a80c766c.entry.js +1 -0
- package/dist/sankhyablocks/p-b80cf644.entry.js +1 -0
- package/dist/sankhyablocks/p-d65809d5.entry.js +1 -0
- package/dist/sankhyablocks/{p-b9fe5ed3.entry.js → p-e999631f.entry.js} +2 -2
- package/dist/sankhyablocks/p-f29caa0a.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +1 -4
- package/dist/types/components/snk-configurator/snk-configurator.d.ts +5 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +6 -0
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view.d.ts +2 -3
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +6 -1
- package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +5 -0
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +12 -1
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +5 -0
- package/dist/types/components/snk-form/snk-form.d.ts +5 -0
- package/dist/types/components/snk-form/subcomponents/snk-config-options/snk-config-options.d.ts +5 -0
- package/dist/types/components/snk-form/subcomponents/snk-field-config/snk-field-config.d.ts +5 -2
- package/dist/types/components/snk-form/subcomponents/snk-form-config/snk-form-config.d.ts +5 -0
- package/dist/types/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.d.ts +5 -0
- package/dist/types/components/snk-grid/snk-grid.d.ts +5 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.d.ts +5 -0
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +5 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +5 -0
- package/dist/types/components.d.ts +126 -12
- package/dist/types/lib/message/SnkMessageBuilder.d.ts +4 -2
- package/package.json +1 -1
- package/dist/sankhyablocks/p-0154ae58.entry.js +0 -1
- package/dist/sankhyablocks/p-10be1b2a.entry.js +0 -1
- package/dist/sankhyablocks/p-193b0fa5.entry.js +0 -1
- package/dist/sankhyablocks/p-31d4e5d4.entry.js +0 -1
- package/dist/sankhyablocks/p-68507ace.entry.js +0 -1
- package/dist/sankhyablocks/p-72277163.entry.js +0 -1
- package/dist/sankhyablocks/p-7d4bb27a.entry.js +0 -1
- package/dist/sankhyablocks/p-878a984f.entry.js +0 -1
- package/dist/sankhyablocks/p-94fef424.entry.js +0 -1
- package/dist/sankhyablocks/p-983fef8f.js +0 -1
- package/dist/sankhyablocks/p-af8cf505.entry.js +0 -1
- package/dist/sankhyablocks/p-c88c4f80.entry.js +0 -1
- package/dist/sankhyablocks/p-dd90bd52.entry.js +0 -1
- package/dist/sankhyablocks/p-eb7b2496.entry.js +0 -1
- package/dist/sankhyablocks/p-ecd3cad5.entry.js +0 -1
- package/dist/sankhyablocks/p-f9ca6d74.entry.js +0 -1
@@ -32,6 +32,7 @@ export class SnkFilterBar {
|
|
32
32
|
this.dataUnit = undefined;
|
33
33
|
this.configName = undefined;
|
34
34
|
this.filterConfig = undefined;
|
35
|
+
this.messagesBuilder = undefined;
|
35
36
|
this.allowDefault = undefined;
|
36
37
|
this.scrollerLocked = false;
|
37
38
|
}
|
@@ -96,7 +97,8 @@ export class SnkFilterBar {
|
|
96
97
|
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-filter-bar.msg.ts"
|
97
98
|
*/
|
98
99
|
getMessage(key, params) {
|
99
|
-
|
100
|
+
var _a;
|
101
|
+
return (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params);
|
100
102
|
}
|
101
103
|
getFilter(_dataUnit) {
|
102
104
|
var _a;
|
@@ -453,6 +455,26 @@ export class SnkFilterBar {
|
|
453
455
|
"tags": [],
|
454
456
|
"text": "Lista todos os filtros dispon\u00EDveis ao usu\u00E1rio."
|
455
457
|
}
|
458
|
+
},
|
459
|
+
"messagesBuilder": {
|
460
|
+
"type": "unknown",
|
461
|
+
"mutable": true,
|
462
|
+
"complexType": {
|
463
|
+
"original": "SnkMessageBuilder",
|
464
|
+
"resolved": "SnkMessageBuilder",
|
465
|
+
"references": {
|
466
|
+
"SnkMessageBuilder": {
|
467
|
+
"location": "import",
|
468
|
+
"path": "../../lib/message/SnkMessageBuilder"
|
469
|
+
}
|
470
|
+
}
|
471
|
+
},
|
472
|
+
"required": false,
|
473
|
+
"optional": false,
|
474
|
+
"docs": {
|
475
|
+
"tags": [],
|
476
|
+
"text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
|
477
|
+
}
|
456
478
|
}
|
457
479
|
};
|
458
480
|
}
|
@@ -9,6 +9,7 @@ export class SnkForm {
|
|
9
9
|
this._configManager = undefined;
|
10
10
|
this.configName = undefined;
|
11
11
|
this.recordsValidator = undefined;
|
12
|
+
this.messagesBuilder = undefined;
|
12
13
|
}
|
13
14
|
/**
|
14
15
|
* Exibe a janela de configurações do formulário.
|
@@ -59,7 +60,7 @@ export class SnkForm {
|
|
59
60
|
return undefined;
|
60
61
|
}
|
61
62
|
return (h("section", null, h("div", { class: "ez-row" }, h("div", { class: "ez-col ez-col--sd-12" }, h("ez-form", { key: "ezForm" + this._snkDataUnit.entityName, "data-element-id": "embedded", dataUnit: this._dataUnit, config: this._configManager.getConfig(this._dataState.insertionMode, this._dataUnit), recordsValidator: this.recordsValidator, class: this._showFormConfig ? 'snk-form__form--hidden' : '' }), this._showFormConfig &&
|
62
|
-
h("snk-form-config", { dataUnit: this._dataUnit, configManager: this._configManager, onConfigClose: () => this.closeConfig() })))));
|
63
|
+
h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this._dataUnit, configManager: this._configManager, onConfigClose: () => this.closeConfig() })))));
|
63
64
|
}
|
64
65
|
static get is() { return "snk-form"; }
|
65
66
|
static get encapsulation() { return "scoped"; }
|
@@ -111,6 +112,26 @@ export class SnkForm {
|
|
111
112
|
"tags": [],
|
112
113
|
"text": "Validador respons\u00E1vel por checar a integridade das informa\u00E7\u00F5es do registro."
|
113
114
|
}
|
115
|
+
},
|
116
|
+
"messagesBuilder": {
|
117
|
+
"type": "unknown",
|
118
|
+
"mutable": true,
|
119
|
+
"complexType": {
|
120
|
+
"original": "SnkMessageBuilder",
|
121
|
+
"resolved": "SnkMessageBuilder",
|
122
|
+
"references": {
|
123
|
+
"SnkMessageBuilder": {
|
124
|
+
"location": "import",
|
125
|
+
"path": "../../lib/message/SnkMessageBuilder"
|
126
|
+
}
|
127
|
+
}
|
128
|
+
},
|
129
|
+
"required": false,
|
130
|
+
"optional": false,
|
131
|
+
"docs": {
|
132
|
+
"tags": [],
|
133
|
+
"text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
|
134
|
+
}
|
114
135
|
}
|
115
136
|
};
|
116
137
|
}
|
package/dist/collection/components/snk-form/subcomponents/snk-config-options/snk-config-options.js
CHANGED
@@ -9,6 +9,7 @@ export class SnkConfigOptions {
|
|
9
9
|
this.fieldConfig = {};
|
10
10
|
this.idConfig = undefined;
|
11
11
|
this.dataUnit = undefined;
|
12
|
+
this.messagesBuilder = undefined;
|
12
13
|
}
|
13
14
|
onConfigDefault(optionSelected) {
|
14
15
|
if (optionSelected != undefined) {
|
@@ -73,7 +74,7 @@ export class SnkConfigOptions {
|
|
73
74
|
}
|
74
75
|
}
|
75
76
|
getMessage(key, params) {
|
76
|
-
return this.
|
77
|
+
return this.messagesBuilder.getMessage(key, params);
|
77
78
|
}
|
78
79
|
getDefaultType() {
|
79
80
|
var _a;
|
@@ -292,6 +293,26 @@ export class SnkConfigOptions {
|
|
292
293
|
"tags": [],
|
293
294
|
"text": "Reposit\u00F3rio de dados respons\u00E1vel por controlar a manipula\u00E7\u00E3o dos dados."
|
294
295
|
}
|
296
|
+
},
|
297
|
+
"messagesBuilder": {
|
298
|
+
"type": "unknown",
|
299
|
+
"mutable": true,
|
300
|
+
"complexType": {
|
301
|
+
"original": "SnkMessageBuilder",
|
302
|
+
"resolved": "SnkMessageBuilder",
|
303
|
+
"references": {
|
304
|
+
"SnkMessageBuilder": {
|
305
|
+
"location": "import",
|
306
|
+
"path": "../../../../lib/message/SnkMessageBuilder"
|
307
|
+
}
|
308
|
+
}
|
309
|
+
},
|
310
|
+
"required": false,
|
311
|
+
"optional": false,
|
312
|
+
"docs": {
|
313
|
+
"tags": [],
|
314
|
+
"text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
|
315
|
+
}
|
295
316
|
}
|
296
317
|
};
|
297
318
|
}
|
package/dist/collection/components/snk-form/subcomponents/snk-field-config/snk-field-config.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { ElementIDUtils } from "@sankhyalabs/core";
|
2
2
|
import { h, Host } from "@stencil/core";
|
3
3
|
import { ACTION_CONFIG } from "../../../../lib/utils/constants";
|
4
4
|
export class SnkFieldConfig {
|
@@ -8,6 +8,7 @@ export class SnkFieldConfig {
|
|
8
8
|
this.fieldConfig = undefined;
|
9
9
|
this.modeInsertion = true;
|
10
10
|
this.dataUnit = undefined;
|
11
|
+
this.messagesBuilder = undefined;
|
11
12
|
}
|
12
13
|
handleAction(evt, type) {
|
13
14
|
evt.preventDefault();
|
@@ -25,16 +26,13 @@ export class SnkFieldConfig {
|
|
25
26
|
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-form.msg.ts".
|
26
27
|
*/
|
27
28
|
getMessage(key) {
|
28
|
-
return this.
|
29
|
+
return this.messagesBuilder.getMessage(key, {});
|
29
30
|
}
|
30
31
|
isRequired() {
|
31
32
|
var _a, _b;
|
32
33
|
const fieldMD = this.dataUnit && this.dataUnit.getField((_a = this.fieldConfig) === null || _a === void 0 ? void 0 : _a.name);
|
33
34
|
return (fieldMD === null || fieldMD === void 0 ? void 0 : fieldMD.required) === true || ((_b = this.fieldConfig) === null || _b === void 0 ? void 0 : _b.required) === true;
|
34
35
|
}
|
35
|
-
componentWillLoad() {
|
36
|
-
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
37
|
-
}
|
38
36
|
componentDidLoad() {
|
39
37
|
ElementIDUtils.addIDInfo(this._element);
|
40
38
|
}
|
@@ -137,6 +135,26 @@ export class SnkFieldConfig {
|
|
137
135
|
"tags": [],
|
138
136
|
"text": "Reposit\u00F3rio de dados, controla a manipula\u00E7\u00E3o dos dados."
|
139
137
|
}
|
138
|
+
},
|
139
|
+
"messagesBuilder": {
|
140
|
+
"type": "unknown",
|
141
|
+
"mutable": true,
|
142
|
+
"complexType": {
|
143
|
+
"original": "SnkMessageBuilder",
|
144
|
+
"resolved": "SnkMessageBuilder",
|
145
|
+
"references": {
|
146
|
+
"SnkMessageBuilder": {
|
147
|
+
"location": "import",
|
148
|
+
"path": "../../../../lib/message/SnkMessageBuilder"
|
149
|
+
}
|
150
|
+
}
|
151
|
+
},
|
152
|
+
"required": false,
|
153
|
+
"optional": false,
|
154
|
+
"docs": {
|
155
|
+
"tags": [],
|
156
|
+
"text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
|
157
|
+
}
|
140
158
|
}
|
141
159
|
};
|
142
160
|
}
|
package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js
CHANGED
@@ -37,6 +37,7 @@ export class SnkFormConfig {
|
|
37
37
|
this._tempGroups = [];
|
38
38
|
this.dataUnit = undefined;
|
39
39
|
this.configManager = undefined;
|
40
|
+
this.messagesBuilder = undefined;
|
40
41
|
}
|
41
42
|
observeConfigManager() {
|
42
43
|
this.loadConfig(this._sortableTimer);
|
@@ -241,8 +242,8 @@ export class SnkFormConfig {
|
|
241
242
|
var _a;
|
242
243
|
return ((_a = group.fields) === null || _a === void 0 ? void 0 : _a.length) ? group.fields.map((field) => {
|
243
244
|
var _a, _b;
|
244
|
-
return h("div", { key: field.name, class: this.getFieldConfigStyle(field), "data-draggable-element": "field", onMouseDown: (evt) => this.controlMoveField(evt) }, h("snk-field-config", { onEzClickIcon: (evt) => { this.handleFieldConfigChange(evt); }, modeInsertion: false, fieldConfig: field, dataUnit: this.dataUnit, isConfigActive: ((_a = this._fieldConfigSelected) === null || _a === void 0 ? void 0 : _a.name) === field.name, id: field.name }), ((_b = this._fieldConfigSelected) === null || _b === void 0 ? void 0 : _b.name) === field.name &&
|
245
|
-
h("div", { class: "ez-flex form-config__config-options" }, h("snk-config-options", { idConfig: field.name, dataUnit: this.dataUnit, fieldConfig: this._fieldConfigSelected, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), onConfigOptionsChanged: (evt) => this.handleconfigOptionsChanged(evt.detail) })));
|
245
|
+
return h("div", { key: field.name, class: this.getFieldConfigStyle(field), "data-draggable-element": "field", onMouseDown: (evt) => this.controlMoveField(evt) }, h("snk-field-config", { messagesBuilder: this.messagesBuilder, onEzClickIcon: (evt) => { this.handleFieldConfigChange(evt); }, modeInsertion: false, fieldConfig: field, dataUnit: this.dataUnit, isConfigActive: ((_a = this._fieldConfigSelected) === null || _a === void 0 ? void 0 : _a.name) === field.name, id: field.name }), ((_b = this._fieldConfigSelected) === null || _b === void 0 ? void 0 : _b.name) === field.name &&
|
246
|
+
h("div", { class: "ez-flex form-config__config-options" }, h("snk-config-options", { idConfig: field.name, messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, fieldConfig: this._fieldConfigSelected, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), onConfigOptionsChanged: (evt) => this.handleconfigOptionsChanged(evt.detail) })));
|
246
247
|
}) : h("div", { class: "form-config__add-group-container" }, h("div", { class: "form-config__add-group-content" }, h("div", { class: "form-config__add-group-label" }, h("label", { class: "ez-text ez-text--center ez-text--medium ez-text--primary ez-text--bold" }, this.getMessage("snkFormConfig.form.labelDropField")))));
|
247
248
|
}
|
248
249
|
handleconfigOptionsChanged(fieldEdited) {
|
@@ -952,7 +953,7 @@ export class SnkFormConfig {
|
|
952
953
|
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-form.msg.ts"
|
953
954
|
*/
|
954
955
|
getMessage(key, params) {
|
955
|
-
return this.
|
956
|
+
return this.messagesBuilder.getMessage(key, params);
|
956
957
|
}
|
957
958
|
componentDidRender() {
|
958
959
|
this.controlSortableField();
|
@@ -977,7 +978,7 @@ export class SnkFormConfig {
|
|
977
978
|
}), onEzAction: (evt) => this.controlSelectFormConfig(evt), id: "selectConfig" })), h("div", { class: "ez-col ez-col--sd-5 ez-col--tb-3 ez-align--middle ez-align--right" }, this._formConfigChanged === true && this._optionFormConfigChanged === false &&
|
978
979
|
h("div", { class: "ez-row ez-align--middle ez-align--right" }, h("ez-button", { label: "Cancelar", class: "ez-padding-left--medium", size: "small", onClick: () => this.cancelChangeConfig() }), h("ez-button", { label: "Salvar", class: "ez-button--primary ez-padding-left--medium", size: "small", onClick: () => this.saveConfig() }, h("ez-icon", { class: "ez-margin-right--small", slot: "leftIcon", iconName: "save" }))), this._optionFormConfigChanged === true &&
|
979
980
|
h("div", { class: "ez-row ez-align--middle ez-align--right" }, h("ez-button", { label: "Cancelar", class: "ez-padding-left--medium", size: "small", onClick: () => this.cancelChangeOptionConfig() }), h("ez-button", { label: this.getMessage("snkFormConfig.applyConfig"), class: "ez-button--primary ez-padding-left--medium", size: "small", onClick: () => this.applyOptionConfig() })))), h("div", { class: "ez-row ez-padding--medium", ref: ref => this._sortableContainer = ref }, h("div", { class: "form-config__tab-container ez-col ez-col--sd-9 ez-col--tb-9 ez-padding-right--medium" }, ((_b = this._layoutFormConfig) === null || _b === void 0 ? void 0 : _b.length) > 0 &&
|
980
|
-
h("section", { class: "ez-box__container", ref: ref => this._formContainer = ref }, h("snk-tab-config", { ref: ref => this._tabConfig = ref, selectedIndex: this._tabSelected, onEzTabChange: (ev) => this.changeTabSelected(ev.detail), onEzOrderChange: (ev) => this.changeTabOrder(ev.detail), onEditionTitleTab: (ev) => this.changeTabLabel(ev), onDeleteTab: (ev) => this.handleDeleteTab(ev), onHideTab: (ev) => this.changeHideTab(ev), onCanStartDrag: () => this.handleCanStartDragTab() }, this._layoutFormConfig.map((tab) => h("snk-tab", { tabKey: tab.tab, label: tab.tab, visible: tab.visible }))), this._layoutFormConfig.map((tab, indexTab) => h("div", { id: "tab" + indexTab, "data-draggable-parent": "group", class: this._tabSelected === indexTab
|
981
|
+
h("section", { class: "ez-box__container", ref: ref => this._formContainer = ref }, h("snk-tab-config", { ref: ref => this._tabConfig = ref, selectedIndex: this._tabSelected, messagesBuilder: this.messagesBuilder, onEzTabChange: (ev) => this.changeTabSelected(ev.detail), onEzOrderChange: (ev) => this.changeTabOrder(ev.detail), onEditionTitleTab: (ev) => this.changeTabLabel(ev), onDeleteTab: (ev) => this.handleDeleteTab(ev), onHideTab: (ev) => this.changeHideTab(ev), onCanStartDrag: () => this.handleCanStartDragTab() }, this._layoutFormConfig.map((tab) => h("snk-tab", { tabKey: tab.tab, label: tab.tab, visible: tab.visible }))), this._layoutFormConfig.map((tab, indexTab) => h("div", { id: "tab" + indexTab, "data-draggable-parent": "group", class: this._tabSelected === indexTab
|
981
982
|
? "form-config__tab-content ez-flex ez-flex--column ez-size-width--full ez-padding--medium"
|
982
983
|
: "form-config__hide-content" }, tab.groups.map((group, indexGroup) => {
|
983
984
|
if (group.group) {
|
@@ -990,7 +991,7 @@ export class SnkFormConfig {
|
|
990
991
|
return h("div", { class: "ez-flex ez-flex--column ez-size-width--full" }, h("label", { class: "ez-text ez-text--secondary ez-margin-vertical--small" }, this.getMessage("snkFormConfig.form.subTitleInfo")), h("div", { id: CONTAINER_ID.withoutGroup, class: "ez-row", "data-draggable-parent": "field" }, this.getFieldsByGroup(group)), h("hr", { class: "ez-divider-horizontal ez-margin-vertical--medium" }));
|
991
992
|
}
|
992
993
|
}), this.renderTempGroupByTab(tab.tab))), h("div", { class: "form-config__btn-add-group ez-row" }, h("div", { class: "form-config__btn-add-group-container ez-col ez-col--sd-12 ez-col--tb-12 ez-align--center" }, h("ez-button", { label: this.getMessage("snkFormConfig.form.labelNewGroup"), class: "ez-padding-horizontal--small ez-button--primary", size: "small", onClick: () => this.addNewGroup() }, h("ez-icon", { class: "ez-margin-right--small", slot: "leftIcon", iconName: "plus" })))))), h("div", { class: "form-config__fields-available ez-col ez-col--sd-3 ez-col--tb-3" }, h("section", { class: "ez-box__container ez-col ez-col--pn-12" }, h("h1", { class: "ez-title ez-title--large ez-title--primary ez-padding-bottom--medium" }, this.getMessage("snkFormConfig.availableFields.title")), h("ez-filter-input", { id: "searchFields", ref: ref => this._filterFieldsAvailable = ref, label: this.getMessage("snkFormConfig.availableFields.labelSearchField"), onEzChange: evt => this.onFilterChange(evt.detail) }), h("span", { class: "ez-box__label-counter ez-text ez-text--medium ez-text--primary ez-margin-bottom--medium" }, this.handleLabelCounter((_c = this._fieldsAvailable) === null || _c === void 0 ? void 0 : _c.length)), ((_d = this._layoutFormConfig) === null || _d === void 0 ? void 0 : _d.length) > 0 &&
|
993
|
-
h("div", { id: CONTAINER_ID.fieldsAvailable, class: "ez-row", "data-draggable-parent": "field" }, this.orderFieldsAvailable(this._fieldsAvailable).map((field) => h("div", { key: field.name, class: this._fieldsAvailableStyle, "data-draggable-element": "field", onMouseDown: (evt) => this.controlMoveField(evt) }, h("snk-field-config", { onEzClickIcon: (evt) => { this.handleFieldConfigChange(evt); }, dataUnit: this.dataUnit, fieldConfig: field, id: field.name })))))))));
|
994
|
+
h("div", { id: CONTAINER_ID.fieldsAvailable, class: "ez-row", "data-draggable-parent": "field" }, this.orderFieldsAvailable(this._fieldsAvailable).map((field) => h("div", { key: field.name, class: this._fieldsAvailableStyle, "data-draggable-element": "field", onMouseDown: (evt) => this.controlMoveField(evt) }, h("snk-field-config", { messagesBuilder: this.messagesBuilder, onEzClickIcon: (evt) => { this.handleFieldConfigChange(evt); }, dataUnit: this.dataUnit, fieldConfig: field, id: field.name })))))))));
|
994
995
|
}
|
995
996
|
static get is() { return "snk-form-config"; }
|
996
997
|
static get encapsulation() { return "scoped"; }
|
@@ -1045,6 +1046,26 @@ export class SnkFormConfig {
|
|
1045
1046
|
"tags": [],
|
1046
1047
|
"text": "Campos de configura\u00E7\u00E3o de formul\u00E1rio."
|
1047
1048
|
}
|
1049
|
+
},
|
1050
|
+
"messagesBuilder": {
|
1051
|
+
"type": "unknown",
|
1052
|
+
"mutable": true,
|
1053
|
+
"complexType": {
|
1054
|
+
"original": "SnkMessageBuilder",
|
1055
|
+
"resolved": "SnkMessageBuilder",
|
1056
|
+
"references": {
|
1057
|
+
"SnkMessageBuilder": {
|
1058
|
+
"location": "import",
|
1059
|
+
"path": "../../../../lib/message/SnkMessageBuilder"
|
1060
|
+
}
|
1061
|
+
}
|
1062
|
+
},
|
1063
|
+
"required": false,
|
1064
|
+
"optional": false,
|
1065
|
+
"docs": {
|
1066
|
+
"tags": [],
|
1067
|
+
"text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
|
1068
|
+
}
|
1048
1069
|
}
|
1049
1070
|
};
|
1050
1071
|
}
|
@@ -13,6 +13,7 @@ export class SnkTabConfig {
|
|
13
13
|
this.selectedIndex = undefined;
|
14
14
|
this.selectedTab = undefined;
|
15
15
|
this.tabs = undefined;
|
16
|
+
this.messagesBuilder = undefined;
|
16
17
|
}
|
17
18
|
/**
|
18
19
|
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
@@ -21,7 +22,7 @@ export class SnkTabConfig {
|
|
21
22
|
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-form.msg.ts"
|
22
23
|
*/
|
23
24
|
getMessage(key, params) {
|
24
|
-
return this.
|
25
|
+
return this.messagesBuilder.getMessage(key, params);
|
25
26
|
}
|
26
27
|
controlSortableTab() {
|
27
28
|
if (this._sortableTab) {
|
@@ -380,6 +381,26 @@ export class SnkTabConfig {
|
|
380
381
|
},
|
381
382
|
"attribute": "tabs",
|
382
383
|
"reflect": false
|
384
|
+
},
|
385
|
+
"messagesBuilder": {
|
386
|
+
"type": "unknown",
|
387
|
+
"mutable": true,
|
388
|
+
"complexType": {
|
389
|
+
"original": "SnkMessageBuilder",
|
390
|
+
"resolved": "SnkMessageBuilder",
|
391
|
+
"references": {
|
392
|
+
"SnkMessageBuilder": {
|
393
|
+
"location": "import",
|
394
|
+
"path": "../../../../lib/message/SnkMessageBuilder"
|
395
|
+
}
|
396
|
+
}
|
397
|
+
},
|
398
|
+
"required": false,
|
399
|
+
"optional": false,
|
400
|
+
"docs": {
|
401
|
+
"tags": [],
|
402
|
+
"text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
|
403
|
+
}
|
383
404
|
}
|
384
405
|
};
|
385
406
|
}
|
@@ -30,6 +30,7 @@ export class SnkGrid {
|
|
30
30
|
this.statusResolver = undefined;
|
31
31
|
this.multipleSelection = undefined;
|
32
32
|
this.presentationMode = PresentationMode.PRIMARY;
|
33
|
+
this.messagesBuilder = undefined;
|
33
34
|
}
|
34
35
|
/**
|
35
36
|
* Exibe a janela de configurações da grade.
|
@@ -262,8 +263,8 @@ export class SnkGrid {
|
|
262
263
|
if (!this._dataUnit) {
|
263
264
|
return undefined;
|
264
265
|
}
|
265
|
-
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", { ref: (ref) => this._snkFilterBar = ref, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName }), ((_b = (_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.filterConfig) === null || _b === void 0 ? void 0 : _b.length) > 0 &&
|
266
|
-
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, 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: () => 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() }))));
|
266
|
+
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", { ref: (ref) => this._snkFilterBar = ref, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder }), ((_b = (_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.filterConfig) === null || _b === void 0 ? void 0 : _b.length) > 0 &&
|
267
|
+
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() })), 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: () => this.gridDoubleClick.emit(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection }, h("snk-taskbar", { dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "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() }))));
|
267
268
|
}
|
268
269
|
static get is() { return "snk-grid"; }
|
269
270
|
static get encapsulation() { return "scoped"; }
|
@@ -415,6 +416,26 @@ export class SnkGrid {
|
|
415
416
|
"attribute": "presentation-mode",
|
416
417
|
"reflect": false,
|
417
418
|
"defaultValue": "PresentationMode.PRIMARY"
|
419
|
+
},
|
420
|
+
"messagesBuilder": {
|
421
|
+
"type": "unknown",
|
422
|
+
"mutable": true,
|
423
|
+
"complexType": {
|
424
|
+
"original": "SnkMessageBuilder",
|
425
|
+
"resolved": "SnkMessageBuilder",
|
426
|
+
"references": {
|
427
|
+
"SnkMessageBuilder": {
|
428
|
+
"location": "import",
|
429
|
+
"path": "../../lib/message/SnkMessageBuilder"
|
430
|
+
}
|
431
|
+
}
|
432
|
+
},
|
433
|
+
"required": false,
|
434
|
+
"optional": false,
|
435
|
+
"docs": {
|
436
|
+
"tags": [],
|
437
|
+
"text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
|
438
|
+
}
|
418
439
|
}
|
419
440
|
};
|
420
441
|
}
|
@@ -10,6 +10,7 @@ export class SnkFilterParamConfig {
|
|
10
10
|
this._expressionItem = undefined;
|
11
11
|
this._informedInstance = false;
|
12
12
|
this._canSave = false;
|
13
|
+
this.messagesBuilder = undefined;
|
13
14
|
}
|
14
15
|
open(expressionItem) {
|
15
16
|
this._opened = true;
|
@@ -32,7 +33,7 @@ export class SnkFilterParamConfig {
|
|
32
33
|
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-filter-param-config.msg.ts"
|
33
34
|
*/
|
34
35
|
getMessage(key, params) {
|
35
|
-
return this.
|
36
|
+
return this.messagesBuilder.getMessage(key, params);
|
36
37
|
}
|
37
38
|
getConfigValue(configName, inputName, inputAlias = "") {
|
38
39
|
var _a, _b, _c;
|
@@ -198,6 +199,30 @@ export class SnkFilterParamConfig {
|
|
198
199
|
"$": ["snk-filter-param-config.css"]
|
199
200
|
};
|
200
201
|
}
|
202
|
+
static get properties() {
|
203
|
+
return {
|
204
|
+
"messagesBuilder": {
|
205
|
+
"type": "unknown",
|
206
|
+
"mutable": true,
|
207
|
+
"complexType": {
|
208
|
+
"original": "SnkMessageBuilder",
|
209
|
+
"resolved": "SnkMessageBuilder",
|
210
|
+
"references": {
|
211
|
+
"SnkMessageBuilder": {
|
212
|
+
"location": "import",
|
213
|
+
"path": "../../../../lib/message/SnkMessageBuilder"
|
214
|
+
}
|
215
|
+
}
|
216
|
+
},
|
217
|
+
"required": false,
|
218
|
+
"optional": false,
|
219
|
+
"docs": {
|
220
|
+
"tags": [],
|
221
|
+
"text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
|
222
|
+
}
|
223
|
+
}
|
224
|
+
};
|
225
|
+
}
|
201
226
|
static get states() {
|
202
227
|
return {
|
203
228
|
"_opened": {},
|
@@ -22,6 +22,7 @@ export class SnkSimpleCrud {
|
|
22
22
|
this.dataUnit = undefined;
|
23
23
|
this.mode = SIMPLE_CRUD_MODE.SERVER;
|
24
24
|
this.taskbarManager = undefined;
|
25
|
+
this.messagesBuilder = undefined;
|
25
26
|
}
|
26
27
|
resolveInMemoryBtns(taskbarButtons) {
|
27
28
|
const newTaskBarConfig = [...taskbarButtons];
|
@@ -137,7 +138,7 @@ export class SnkSimpleCrud {
|
|
137
138
|
}
|
138
139
|
render() {
|
139
140
|
var _a;
|
140
|
-
return (h("snk-data-unit", { class: "simple-crud__container", dataUnit: this.dataUnit, onDataStateChange: evt => this.onDataStateChange(evt), onInsertionMode: () => this.goToView(VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail) }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: "ez-flex ez-box ez-box--shadow" }, h("snk-taskbar", { class: "simple-crud__taskbar 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", buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, slot: "leftButtons", presentationMode: PresentationMode.SECONDARY }), h("ez-view-stack", { class: "ez-flex ez-flex--column", ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { dataUnit: this.dataUnit, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), "no-header": true }, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { dataUnit: this.dataUnit, config: this._config }))))));
|
141
|
+
return (h("snk-data-unit", { class: "simple-crud__container", dataUnit: this.dataUnit, onDataStateChange: evt => this.onDataStateChange(evt), onInsertionMode: () => this.goToView(VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: "ez-flex ez-box ez-box--shadow" }, h("snk-taskbar", { class: "simple-crud__taskbar 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, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, slot: "leftButtons", presentationMode: PresentationMode.SECONDARY }), h("ez-view-stack", { class: "ez-flex ez-flex--column", ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { dataUnit: this.dataUnit, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), "no-header": true }, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { dataUnit: this.dataUnit, config: this._config }))))));
|
141
142
|
}
|
142
143
|
static get is() { return "snk-simple-crud"; }
|
143
144
|
static get encapsulation() { return "scoped"; }
|
@@ -235,6 +236,26 @@ export class SnkSimpleCrud {
|
|
235
236
|
"tags": [],
|
236
237
|
"text": "Gerenciador das barras de tarefas. \u00C9 poss\u00EDvel determinar bot\u00F5es espec\u00EDficos\nou mesmo gerenciar o estado dos bot\u00F5es."
|
237
238
|
}
|
239
|
+
},
|
240
|
+
"messagesBuilder": {
|
241
|
+
"type": "unknown",
|
242
|
+
"mutable": true,
|
243
|
+
"complexType": {
|
244
|
+
"original": "SnkMessageBuilder",
|
245
|
+
"resolved": "SnkMessageBuilder",
|
246
|
+
"references": {
|
247
|
+
"SnkMessageBuilder": {
|
248
|
+
"location": "import",
|
249
|
+
"path": "../../lib/message/SnkMessageBuilder"
|
250
|
+
}
|
251
|
+
}
|
252
|
+
},
|
253
|
+
"required": false,
|
254
|
+
"optional": false,
|
255
|
+
"docs": {
|
256
|
+
"tags": [],
|
257
|
+
"text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
|
258
|
+
}
|
238
259
|
}
|
239
260
|
};
|
240
261
|
}
|
@@ -29,6 +29,7 @@ export class SnkTaskbar {
|
|
29
29
|
this.disabledButtons = undefined;
|
30
30
|
this.dataUnit = undefined;
|
31
31
|
this.presentationMode = PresentationMode.PRIMARY;
|
32
|
+
this.messagesBuilder = undefined;
|
32
33
|
}
|
33
34
|
observeButtons() {
|
34
35
|
this._definitions = undefined;
|
@@ -66,6 +67,7 @@ export class SnkTaskbar {
|
|
66
67
|
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-taskbar.msg.ts"
|
67
68
|
*/
|
68
69
|
getTitle(element) {
|
70
|
+
var _a;
|
69
71
|
let key;
|
70
72
|
if (this.isAllowed(element)) {
|
71
73
|
key = this._titleKeyByElement[element];
|
@@ -73,7 +75,7 @@ export class SnkTaskbar {
|
|
73
75
|
else {
|
74
76
|
key = "snkTaskbar.forbidden";
|
75
77
|
}
|
76
|
-
return key ? this.
|
78
|
+
return key ? (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, {}) : "";
|
77
79
|
}
|
78
80
|
elementClick(elem) {
|
79
81
|
if (this.dataUnit) {
|
@@ -366,6 +368,26 @@ export class SnkTaskbar {
|
|
366
368
|
"attribute": "presentation-mode",
|
367
369
|
"reflect": true,
|
368
370
|
"defaultValue": "PresentationMode.PRIMARY"
|
371
|
+
},
|
372
|
+
"messagesBuilder": {
|
373
|
+
"type": "unknown",
|
374
|
+
"mutable": true,
|
375
|
+
"complexType": {
|
376
|
+
"original": "SnkMessageBuilder",
|
377
|
+
"resolved": "SnkMessageBuilder",
|
378
|
+
"references": {
|
379
|
+
"SnkMessageBuilder": {
|
380
|
+
"location": "import",
|
381
|
+
"path": "../../lib/message/SnkMessageBuilder"
|
382
|
+
}
|
383
|
+
}
|
384
|
+
},
|
385
|
+
"required": false,
|
386
|
+
"optional": false,
|
387
|
+
"docs": {
|
388
|
+
"tags": [],
|
389
|
+
"text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
|
390
|
+
}
|
369
391
|
}
|
370
392
|
};
|
371
393
|
}
|
@@ -12,7 +12,7 @@ import { snkDataExporterMessages } from "./resources/snk-data-exporter.msg.js";
|
|
12
12
|
import { snkFilterParamConfigMessages } from "./resources/snk-filter-param-config.msg.js";
|
13
13
|
import { snkFilterFieldSearchMessages } from "./resources/snk-filter-field-search.msg.js";
|
14
14
|
export class SnkMessageBuilder {
|
15
|
-
constructor() {
|
15
|
+
constructor(domainName) {
|
16
16
|
this._defaults = {
|
17
17
|
snkDataUnit: snkDataUnitMessages,
|
18
18
|
snkFormConfig: snkFormConfigMessages,
|
@@ -33,6 +33,7 @@ export class SnkMessageBuilder {
|
|
33
33
|
snkFilterFieldSearch: snkFilterFieldSearchMessages
|
34
34
|
};
|
35
35
|
this._currentOperation = OperationMap.CLEAN;
|
36
|
+
this._domainName = domainName;
|
36
37
|
this.loadAppMessages().then((msgs) => {
|
37
38
|
this._appMessages = msgs;
|
38
39
|
}, error => {
|
@@ -63,7 +64,7 @@ export class SnkMessageBuilder {
|
|
63
64
|
return undefined;
|
64
65
|
}
|
65
66
|
var parts = key.split(".");
|
66
|
-
let msg = this.resolveMessage(parts, this.
|
67
|
+
let msg = this.resolveMessage(parts, this.getDomainMessages());
|
67
68
|
if (msg == undefined) {
|
68
69
|
msg = this.resolveMessage(parts, this._defaults);
|
69
70
|
}
|
@@ -74,6 +75,12 @@ export class SnkMessageBuilder {
|
|
74
75
|
}
|
75
76
|
return this.postProcess(msg, params);
|
76
77
|
}
|
78
|
+
getDomainMessages() {
|
79
|
+
if (this._domainName == undefined) {
|
80
|
+
return this._appMessages['Global'] || this._appMessages;
|
81
|
+
}
|
82
|
+
return (this._appMessages == undefined ? undefined : this._appMessages[this._domainName]);
|
83
|
+
}
|
77
84
|
resolveMessage(keys, object) {
|
78
85
|
if (object == undefined) {
|
79
86
|
return undefined;
|
@@ -279,7 +279,7 @@ const snkFilterFieldSearchMessages = {
|
|
279
279
|
};
|
280
280
|
|
281
281
|
class SnkMessageBuilder {
|
282
|
-
constructor() {
|
282
|
+
constructor(domainName) {
|
283
283
|
this._defaults = {
|
284
284
|
snkDataUnit: snkDataUnitMessages,
|
285
285
|
snkFormConfig: snkFormConfigMessages,
|
@@ -300,6 +300,7 @@ class SnkMessageBuilder {
|
|
300
300
|
snkFilterFieldSearch: snkFilterFieldSearchMessages
|
301
301
|
};
|
302
302
|
this._currentOperation = OperationMap.CLEAN;
|
303
|
+
this._domainName = domainName;
|
303
304
|
this.loadAppMessages().then((msgs) => {
|
304
305
|
this._appMessages = msgs;
|
305
306
|
}, error => {
|
@@ -330,7 +331,7 @@ class SnkMessageBuilder {
|
|
330
331
|
return undefined;
|
331
332
|
}
|
332
333
|
var parts = key.split(".");
|
333
|
-
let msg = this.resolveMessage(parts, this.
|
334
|
+
let msg = this.resolveMessage(parts, this.getDomainMessages());
|
334
335
|
if (msg == undefined) {
|
335
336
|
msg = this.resolveMessage(parts, this._defaults);
|
336
337
|
}
|
@@ -341,6 +342,12 @@ class SnkMessageBuilder {
|
|
341
342
|
}
|
342
343
|
return this.postProcess(msg, params);
|
343
344
|
}
|
345
|
+
getDomainMessages() {
|
346
|
+
if (this._domainName == undefined) {
|
347
|
+
return this._appMessages['Global'] || this._appMessages;
|
348
|
+
}
|
349
|
+
return (this._appMessages == undefined ? undefined : this._appMessages[this._domainName]);
|
350
|
+
}
|
344
351
|
resolveMessage(keys, object) {
|
345
352
|
if (object == undefined) {
|
346
353
|
return undefined;
|
@@ -3,9 +3,9 @@ import { WaitingChangeException, WarningException, ErrorException, ObjectUtils,
|
|
3
3
|
import { d as dist, D as DataFetcher, U as UrlUtils } from './DataFetcher.js';
|
4
4
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
5
5
|
import { P as PesquisaFetcher } from './pesquisa-fetcher.js';
|
6
|
-
import { S as SnkMessageBuilder } from './SnkMessageBuilder.js';
|
7
6
|
import { G as GridConfigFetcher, C as ConfigStorage } from './ConfigStorage.js';
|
8
7
|
import { R as ResourceFetcher } from './form-config-fetcher.js';
|
8
|
+
import { S as SnkMessageBuilder } from './SnkMessageBuilder.js';
|
9
9
|
import { d as defineCustomElement$1 } from './snk-pesquisa2.js';
|
10
10
|
|
11
11
|
class SnkErrorHandler {
|
@@ -15,6 +15,7 @@ const SnkConfigOptions = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
15
15
|
this.fieldConfig = {};
|
16
16
|
this.idConfig = undefined;
|
17
17
|
this.dataUnit = undefined;
|
18
|
+
this.messagesBuilder = undefined;
|
18
19
|
}
|
19
20
|
onConfigDefault(optionSelected) {
|
20
21
|
if (optionSelected != undefined) {
|
@@ -79,7 +80,7 @@ const SnkConfigOptions = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
79
80
|
}
|
80
81
|
}
|
81
82
|
getMessage(key, params) {
|
82
|
-
return this.
|
83
|
+
return this.messagesBuilder.getMessage(key, params);
|
83
84
|
}
|
84
85
|
getDefaultType() {
|
85
86
|
var _a;
|
@@ -233,6 +234,7 @@ const SnkConfigOptions = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
233
234
|
"fieldConfig": [16],
|
234
235
|
"idConfig": [513, "id-config"],
|
235
236
|
"dataUnit": [16],
|
237
|
+
"messagesBuilder": [1040],
|
236
238
|
"_defaultType": [32]
|
237
239
|
}]);
|
238
240
|
function defineCustomElement() {
|