@sankhyalabs/sankhyablocks 2.0.0 → 2.0.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-6c2f7bcd.js → SnkMessageBuilder-89482d28.js} +8 -4
- package/dist/cjs/snk-application.cjs.entry.js +13 -2
- package/dist/cjs/snk-configurator_6.cjs.entry.js +1 -1
- package/dist/cjs/snk-crud.cjs.entry.js +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +8 -2
- package/dist/cjs/snk-form-config.cjs.entry.js +4 -4
- package/dist/cjs/snk-pesquisa.cjs.entry.js +2 -2
- package/dist/cjs/{taskbar-elements-9a4b1e19.js → taskbar-elements-90350a55.js} +2 -2
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +7 -1
- package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +4 -4
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +2 -2
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +2 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +12 -1
- package/dist/collection/lib/message/resources/snk-data-unit.msg.js +5 -1
- package/dist/collection/lib/message/resources/snk-form.msg.js +3 -3
- package/dist/components/SnkMessageBuilder.js +8 -4
- package/dist/components/snk-application2.js +12 -1
- package/dist/components/snk-data-unit.js +7 -1
- package/dist/components/snk-form-config2.js +4 -4
- package/dist/components/snk-pesquisa2.js +2 -2
- package/dist/components/snk-taskbar2.js +2 -2
- package/dist/esm/{SnkMessageBuilder-5792c260.js → SnkMessageBuilder-a27fc561.js} +8 -4
- package/dist/esm/snk-application.entry.js +13 -2
- package/dist/esm/snk-configurator_6.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +1 -1
- package/dist/esm/snk-data-unit.entry.js +8 -2
- package/dist/esm/snk-form-config.entry.js +4 -4
- package/dist/esm/snk-pesquisa.entry.js +2 -2
- package/dist/esm/{taskbar-elements-e2ed0536.js → taskbar-elements-0f41cd77.js} +2 -2
- package/dist/sankhyablocks/p-2517529d.js +1 -0
- package/dist/sankhyablocks/{p-d690b6b5.entry.js → p-4c887c1f.entry.js} +5 -5
- package/dist/sankhyablocks/p-59d8c47a.js +1 -0
- package/dist/sankhyablocks/{p-4392f13f.entry.js → p-626cf022.entry.js} +1 -1
- package/dist/sankhyablocks/{p-400cc777.entry.js → p-92782503.entry.js} +1 -1
- package/dist/sankhyablocks/p-ac71ef38.entry.js +1 -0
- package/dist/sankhyablocks/{p-a17a4fca.entry.js → p-e128f747.entry.js} +1 -1
- package/dist/sankhyablocks/{p-521c96f0.entry.js → p-e8591491.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +3 -3
- package/package.json +1 -1
- package/dist/sankhyablocks/p-21c8929b.js +0 -1
- package/dist/sankhyablocks/p-6988f4a6.entry.js +0 -1
- package/dist/sankhyablocks/p-d9fbb26f.js +0 -1
|
@@ -31,10 +31,14 @@ const snkDataUnitMessages = {
|
|
|
31
31
|
insert: "A inclusão descartada!",
|
|
32
32
|
update: "A edição foi descartada!"
|
|
33
33
|
},
|
|
34
|
+
confirm: {
|
|
35
|
+
cancel: "Cancelar",
|
|
36
|
+
delete: "Excluir"
|
|
37
|
+
},
|
|
34
38
|
removeInfo: "Registro removido com sucesso!",
|
|
35
39
|
cancelConfirmationTitle: "Aviso",
|
|
36
40
|
cancelConfirmation: "As alterações realizadas serão descartadas<br/><br/><b>Você realmente gostaria de cancelar?",
|
|
37
|
-
removeConfirmationTitle: "
|
|
41
|
+
removeConfirmationTitle: "Aviso",
|
|
38
42
|
removeConfirmation: "Deseja realmente excluir o registro atual?",
|
|
39
43
|
forbidden: "Sem permissão",
|
|
40
44
|
forbiddenUpdate: "Não é possível fazer alterações. Verifique as permissões de acesso.",
|
|
@@ -136,13 +140,13 @@ const snkFormConfigMessages = {
|
|
|
136
140
|
},
|
|
137
141
|
confirm: {
|
|
138
142
|
title: "Aviso",
|
|
139
|
-
deleteTab: "
|
|
143
|
+
deleteTab: "Você realmente deseja excluir a aba",
|
|
140
144
|
cancel: "As alterações realizadas serão descartadas.<br/><br/><b>Gostaria de continuar?</b>",
|
|
141
145
|
exit: "Ao sair as alterações serão descartadas.<br/><br/><b>Você realmente gostaria de sair?</b>",
|
|
142
146
|
apply: "A <b>{0}</b> irá substituir a sua configuração {1}!<br/><br/><b>Deseja continuar?</b>",
|
|
143
147
|
group: "Não é possível salvar as configurações com um grupo vazio!",
|
|
144
|
-
|
|
145
|
-
|
|
148
|
+
labelCancel: "Cancelar",
|
|
149
|
+
labelDelete: "Excluir"
|
|
146
150
|
},
|
|
147
151
|
alert: {
|
|
148
152
|
titleGroupExists: "Já existe um grupo com título",
|
|
@@ -6,7 +6,7 @@ const index = require('./index-20e8b68a.js');
|
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const formConfigFetcher = require('./form-config-fetcher-2de7c16a.js');
|
|
8
8
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
9
|
-
const SnkMessageBuilder = require('./SnkMessageBuilder-
|
|
9
|
+
const SnkMessageBuilder = require('./SnkMessageBuilder-89482d28.js');
|
|
10
10
|
require('./_commonjsHelpers-537d719a.js');
|
|
11
11
|
|
|
12
12
|
class SnkErrorHandler {
|
|
@@ -109,7 +109,18 @@ class PesquisaFetcher {
|
|
|
109
109
|
};
|
|
110
110
|
if ((criteria === null || criteria === void 0 ? void 0 : criteria.params.length) > 0) {
|
|
111
111
|
externalCriteria.params = {
|
|
112
|
-
param: criteria.params.map(
|
|
112
|
+
param: criteria.params.map(param => {
|
|
113
|
+
let value = param.value;
|
|
114
|
+
let type = param.dataType;
|
|
115
|
+
if (type === core.DataType.OBJECT) {
|
|
116
|
+
value = value.value;
|
|
117
|
+
type = "S";
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
type = convertParamType(param.dataType);
|
|
121
|
+
}
|
|
122
|
+
return { $: value, type };
|
|
123
|
+
})
|
|
113
124
|
};
|
|
114
125
|
}
|
|
115
126
|
const reqBody = {
|
|
@@ -10,7 +10,7 @@ const configurableElementsStorage = require('./configurableElementsStorage-93459
|
|
|
10
10
|
const filterItemType_enum = require('./filter-item-type.enum-3daf58d3.js');
|
|
11
11
|
const ezModalContainer = require('@sankhyalabs/ezui/dist/collection/components/ez-modal-container');
|
|
12
12
|
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
13
|
-
const taskbarElements = require('./taskbar-elements-
|
|
13
|
+
const taskbarElements = require('./taskbar-elements-90350a55.js');
|
|
14
14
|
|
|
15
15
|
const GRID_MODE = constants.VIEW_MODE.grid;
|
|
16
16
|
const FORM_MODE = constants.VIEW_MODE.form;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-20e8b68a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const constants = require('./constants-9056ca9e.js');
|
|
8
|
-
const taskbarElements = require('./taskbar-elements-
|
|
8
|
+
const taskbarElements = require('./taskbar-elements-90350a55.js');
|
|
9
9
|
|
|
10
10
|
const snkCrudCss = ".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%}";
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-20e8b68a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
|
-
const SnkMessageBuilder = require('./SnkMessageBuilder-
|
|
8
|
+
const SnkMessageBuilder = require('./SnkMessageBuilder-89482d28.js');
|
|
9
9
|
|
|
10
10
|
const snkDataUnitCss = ".sc-snk-data-unit-h{display:flex;flex-direction:column;height:100%}";
|
|
11
11
|
|
|
@@ -179,8 +179,14 @@ const SnkDataUnit = class {
|
|
|
179
179
|
resolve(action);
|
|
180
180
|
}
|
|
181
181
|
else {
|
|
182
|
+
const options = {
|
|
183
|
+
canClose: false,
|
|
184
|
+
labelCancel: this.getMessage("snkDataUnit.confirm.cancel"),
|
|
185
|
+
labelConfirm: this.getMessage("snkDataUnit.confirm.delete"),
|
|
186
|
+
btnConfirmDanger: false
|
|
187
|
+
};
|
|
182
188
|
const removeConfirmationTitle = this.getMessage("snkDataUnit.removeConfirmationTitle");
|
|
183
|
-
utils.ApplicationUtils.confirm(removeConfirmationTitle, removeConfirmation,
|
|
189
|
+
utils.ApplicationUtils.confirm(removeConfirmationTitle, removeConfirmation, null, utils.DialogType.WARN, options)
|
|
184
190
|
.then((result) => resolve(result ? action : undefined));
|
|
185
191
|
}
|
|
186
192
|
}
|
|
@@ -881,13 +881,13 @@ const SnkFormConfig = class {
|
|
|
881
881
|
handleDeleteTab(tabSelected) {
|
|
882
882
|
let options = {
|
|
883
883
|
canClose: false,
|
|
884
|
-
labelCancel: this.getMessage("snkFormConfig.confirm.
|
|
885
|
-
labelConfirm: this.getMessage("snkFormConfig.confirm.
|
|
884
|
+
labelCancel: this.getMessage("snkFormConfig.confirm.labelCancel"),
|
|
885
|
+
labelConfirm: this.getMessage("snkFormConfig.confirm.labelDelete"),
|
|
886
886
|
btnConfirmDanger: false
|
|
887
887
|
};
|
|
888
888
|
const title = this.getMessage("snkFormConfig.confirm.title");
|
|
889
|
-
const deleteTab = this.getMessage("snkFormConfig.confirm.deleteTab")
|
|
890
|
-
utils.ApplicationUtils.confirm(title,
|
|
889
|
+
const deleteTab = this.getMessage("snkFormConfig.confirm.deleteTab") + ` <b>${tabSelected.detail.label}</b>?`;
|
|
890
|
+
utils.ApplicationUtils.confirm(title, deleteTab, null, utils.DialogType.WARN, options)
|
|
891
891
|
.then(response => {
|
|
892
892
|
var _a;
|
|
893
893
|
if (response) {
|
|
@@ -62,7 +62,7 @@ const SnkPesquisa = class {
|
|
|
62
62
|
resp = core.ObjectUtils.stringToObject(resp.json.$);
|
|
63
63
|
let descriptionField = resp.descriptionField;
|
|
64
64
|
let pkField = resp.pkField;
|
|
65
|
-
if (
|
|
65
|
+
if (pkField) {
|
|
66
66
|
let newItemList = [];
|
|
67
67
|
resp.data.forEach((item) => {
|
|
68
68
|
var _a;
|
|
@@ -70,7 +70,7 @@ const SnkPesquisa = class {
|
|
|
70
70
|
let fields = this.buildFirstFields(item['__matchFields'], fieldsMetadata);
|
|
71
71
|
let exibitionItem = {
|
|
72
72
|
key: this.highlightValue(item['__matchFields'], (_a = item[pkField]) === null || _a === void 0 ? void 0 : _a.toString(), fields, true),
|
|
73
|
-
title: this.highlightValue(item['__matchFields'], item[descriptionField], fields, true),
|
|
73
|
+
title: descriptionField ? this.highlightValue(item['__matchFields'], item[descriptionField], fields, true) : "",
|
|
74
74
|
details: this.buildDetails(fields, item)
|
|
75
75
|
};
|
|
76
76
|
newItemList.push(exibitionItem);
|
|
@@ -15,6 +15,7 @@ exports.TaskbarElement = void 0;
|
|
|
15
15
|
TaskbarElement["SAVE"] = "SAVE";
|
|
16
16
|
TaskbarElement["GRID_MODE"] = "GRID_MODE";
|
|
17
17
|
TaskbarElement["FORM_MODE"] = "FORM_MODE";
|
|
18
|
+
TaskbarElement["CONFIG_GRID"] = "CONFIG_GRID";
|
|
18
19
|
TaskbarElement["MORE_OPTIONS"] = "MORE_OPTIONS";
|
|
19
20
|
TaskbarElement["DIVIDER"] = "DIVIDER";
|
|
20
21
|
TaskbarElement["CONFIGURATOR"] = "CONFIGURATOR";
|
|
@@ -25,12 +26,11 @@ exports.AuthorizationElements = void 0;
|
|
|
25
26
|
AuthorizationElements["CLONE"] = "CLONE";
|
|
26
27
|
AuthorizationElements["REMOVE"] = "REMOVE";
|
|
27
28
|
AuthorizationElements["INSERT"] = "INSERT";
|
|
28
|
-
AuthorizationElements["
|
|
29
|
+
AuthorizationElements["CONFIG_GRID"] = "CONFIG_GRID";
|
|
29
30
|
})(exports.AuthorizationElements || (exports.AuthorizationElements = {}));
|
|
30
31
|
exports.VisibleWhenForbidden = void 0;
|
|
31
32
|
(function (VisibleWhenForbidden) {
|
|
32
33
|
VisibleWhenForbidden["CONFIG_GRID"] = "CONFIG_GRID";
|
|
33
|
-
VisibleWhenForbidden["CONFIGURATOR"] = "CONFIGURATOR";
|
|
34
34
|
})(exports.VisibleWhenForbidden || (exports.VisibleWhenForbidden = {}));
|
|
35
35
|
const buildCustomButton = (def, className, action, isEnabled) => {
|
|
36
36
|
const { hint, text, iconName } = def;
|
|
@@ -167,8 +167,14 @@ export class SnkDataUnit {
|
|
|
167
167
|
resolve(action);
|
|
168
168
|
}
|
|
169
169
|
else {
|
|
170
|
+
const options = {
|
|
171
|
+
canClose: false,
|
|
172
|
+
labelCancel: this.getMessage("snkDataUnit.confirm.cancel"),
|
|
173
|
+
labelConfirm: this.getMessage("snkDataUnit.confirm.delete"),
|
|
174
|
+
btnConfirmDanger: false
|
|
175
|
+
};
|
|
170
176
|
const removeConfirmationTitle = this.getMessage("snkDataUnit.removeConfirmationTitle");
|
|
171
|
-
ApplicationUtils.confirm(removeConfirmationTitle, removeConfirmation,
|
|
177
|
+
ApplicationUtils.confirm(removeConfirmationTitle, removeConfirmation, null, DialogType.WARN, options)
|
|
172
178
|
.then((result) => resolve(result ? action : undefined));
|
|
173
179
|
}
|
|
174
180
|
}
|
package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js
CHANGED
|
@@ -874,13 +874,13 @@ export class SnkFormConfig {
|
|
|
874
874
|
handleDeleteTab(tabSelected) {
|
|
875
875
|
let options = {
|
|
876
876
|
canClose: false,
|
|
877
|
-
labelCancel: this.getMessage("snkFormConfig.confirm.
|
|
878
|
-
labelConfirm: this.getMessage("snkFormConfig.confirm.
|
|
877
|
+
labelCancel: this.getMessage("snkFormConfig.confirm.labelCancel"),
|
|
878
|
+
labelConfirm: this.getMessage("snkFormConfig.confirm.labelDelete"),
|
|
879
879
|
btnConfirmDanger: false
|
|
880
880
|
};
|
|
881
881
|
const title = this.getMessage("snkFormConfig.confirm.title");
|
|
882
|
-
const deleteTab = this.getMessage("snkFormConfig.confirm.deleteTab")
|
|
883
|
-
ApplicationUtils.confirm(title,
|
|
882
|
+
const deleteTab = this.getMessage("snkFormConfig.confirm.deleteTab") + ` <b>${tabSelected.detail.label}</b>?`;
|
|
883
|
+
ApplicationUtils.confirm(title, deleteTab, null, DialogType.WARN, options)
|
|
884
884
|
.then(response => {
|
|
885
885
|
var _a;
|
|
886
886
|
if (response) {
|
|
@@ -54,7 +54,7 @@ export class SnkPesquisa {
|
|
|
54
54
|
resp = ObjectUtils.stringToObject(resp.json.$);
|
|
55
55
|
let descriptionField = resp.descriptionField;
|
|
56
56
|
let pkField = resp.pkField;
|
|
57
|
-
if (
|
|
57
|
+
if (pkField) {
|
|
58
58
|
let newItemList = [];
|
|
59
59
|
resp.data.forEach((item) => {
|
|
60
60
|
var _a;
|
|
@@ -62,7 +62,7 @@ export class SnkPesquisa {
|
|
|
62
62
|
let fields = this.buildFirstFields(item['__matchFields'], fieldsMetadata);
|
|
63
63
|
let exibitionItem = {
|
|
64
64
|
key: this.highlightValue(item['__matchFields'], (_a = item[pkField]) === null || _a === void 0 ? void 0 : _a.toString(), fields, true),
|
|
65
|
-
title: this.highlightValue(item['__matchFields'], item[descriptionField], fields, true),
|
|
65
|
+
title: descriptionField ? this.highlightValue(item['__matchFields'], item[descriptionField], fields, true) : "",
|
|
66
66
|
details: this.buildDetails(fields, item)
|
|
67
67
|
};
|
|
68
68
|
newItemList.push(exibitionItem);
|
|
@@ -12,6 +12,7 @@ export var TaskbarElement;
|
|
|
12
12
|
TaskbarElement["SAVE"] = "SAVE";
|
|
13
13
|
TaskbarElement["GRID_MODE"] = "GRID_MODE";
|
|
14
14
|
TaskbarElement["FORM_MODE"] = "FORM_MODE";
|
|
15
|
+
TaskbarElement["CONFIG_GRID"] = "CONFIG_GRID";
|
|
15
16
|
TaskbarElement["MORE_OPTIONS"] = "MORE_OPTIONS";
|
|
16
17
|
TaskbarElement["DIVIDER"] = "DIVIDER";
|
|
17
18
|
TaskbarElement["CONFIGURATOR"] = "CONFIGURATOR";
|
|
@@ -22,12 +23,11 @@ export var AuthorizationElements;
|
|
|
22
23
|
AuthorizationElements["CLONE"] = "CLONE";
|
|
23
24
|
AuthorizationElements["REMOVE"] = "REMOVE";
|
|
24
25
|
AuthorizationElements["INSERT"] = "INSERT";
|
|
25
|
-
AuthorizationElements["
|
|
26
|
+
AuthorizationElements["CONFIG_GRID"] = "CONFIG_GRID";
|
|
26
27
|
})(AuthorizationElements || (AuthorizationElements = {}));
|
|
27
28
|
export var VisibleWhenForbidden;
|
|
28
29
|
(function (VisibleWhenForbidden) {
|
|
29
30
|
VisibleWhenForbidden["CONFIG_GRID"] = "CONFIG_GRID";
|
|
30
|
-
VisibleWhenForbidden["CONFIGURATOR"] = "CONFIGURATOR";
|
|
31
31
|
})(VisibleWhenForbidden || (VisibleWhenForbidden = {}));
|
|
32
32
|
export const buildCustomButton = (def, className, action, isEnabled) => {
|
|
33
33
|
const { hint, text, iconName } = def;
|
|
@@ -41,7 +41,18 @@ export class PesquisaFetcher {
|
|
|
41
41
|
};
|
|
42
42
|
if ((criteria === null || criteria === void 0 ? void 0 : criteria.params.length) > 0) {
|
|
43
43
|
externalCriteria.params = {
|
|
44
|
-
param: criteria.params.map(
|
|
44
|
+
param: criteria.params.map(param => {
|
|
45
|
+
let value = param.value;
|
|
46
|
+
let type = param.dataType;
|
|
47
|
+
if (type === DataType.OBJECT) {
|
|
48
|
+
value = value.value;
|
|
49
|
+
type = "S";
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
type = convertParamType(param.dataType);
|
|
53
|
+
}
|
|
54
|
+
return { $: value, type };
|
|
55
|
+
})
|
|
45
56
|
};
|
|
46
57
|
}
|
|
47
58
|
const reqBody = {
|
|
@@ -9,10 +9,14 @@ const snkDataUnitMessages = {
|
|
|
9
9
|
insert: "A inclusão descartada!",
|
|
10
10
|
update: "A edição foi descartada!"
|
|
11
11
|
},
|
|
12
|
+
confirm: {
|
|
13
|
+
cancel: "Cancelar",
|
|
14
|
+
delete: "Excluir"
|
|
15
|
+
},
|
|
12
16
|
removeInfo: "Registro removido com sucesso!",
|
|
13
17
|
cancelConfirmationTitle: "Aviso",
|
|
14
18
|
cancelConfirmation: "As alterações realizadas serão descartadas<br/><br/><b>Você realmente gostaria de cancelar?",
|
|
15
|
-
removeConfirmationTitle: "
|
|
19
|
+
removeConfirmationTitle: "Aviso",
|
|
16
20
|
removeConfirmation: "Deseja realmente excluir o registro atual?",
|
|
17
21
|
forbidden: "Sem permissão",
|
|
18
22
|
forbiddenUpdate: "Não é possível fazer alterações. Verifique as permissões de acesso.",
|
|
@@ -40,13 +40,13 @@ export const snkFormConfigMessages = {
|
|
|
40
40
|
},
|
|
41
41
|
confirm: {
|
|
42
42
|
title: "Aviso",
|
|
43
|
-
deleteTab: "
|
|
43
|
+
deleteTab: "Você realmente deseja excluir a aba",
|
|
44
44
|
cancel: "As alterações realizadas serão descartadas.<br/><br/><b>Gostaria de continuar?</b>",
|
|
45
45
|
exit: "Ao sair as alterações serão descartadas.<br/><br/><b>Você realmente gostaria de sair?</b>",
|
|
46
46
|
apply: "A <b>{0}</b> irá substituir a sua configuração {1}!<br/><br/><b>Deseja continuar?</b>",
|
|
47
47
|
group: "Não é possível salvar as configurações com um grupo vazio!",
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
labelCancel: "Cancelar",
|
|
49
|
+
labelDelete: "Excluir"
|
|
50
50
|
},
|
|
51
51
|
alert: {
|
|
52
52
|
titleGroupExists: "Já existe um grupo com título",
|
|
@@ -9,10 +9,14 @@ const snkDataUnitMessages = {
|
|
|
9
9
|
insert: "A inclusão descartada!",
|
|
10
10
|
update: "A edição foi descartada!"
|
|
11
11
|
},
|
|
12
|
+
confirm: {
|
|
13
|
+
cancel: "Cancelar",
|
|
14
|
+
delete: "Excluir"
|
|
15
|
+
},
|
|
12
16
|
removeInfo: "Registro removido com sucesso!",
|
|
13
17
|
cancelConfirmationTitle: "Aviso",
|
|
14
18
|
cancelConfirmation: "As alterações realizadas serão descartadas<br/><br/><b>Você realmente gostaria de cancelar?",
|
|
15
|
-
removeConfirmationTitle: "
|
|
19
|
+
removeConfirmationTitle: "Aviso",
|
|
16
20
|
removeConfirmation: "Deseja realmente excluir o registro atual?",
|
|
17
21
|
forbidden: "Sem permissão",
|
|
18
22
|
forbiddenUpdate: "Não é possível fazer alterações. Verifique as permissões de acesso.",
|
|
@@ -114,13 +118,13 @@ const snkFormConfigMessages = {
|
|
|
114
118
|
},
|
|
115
119
|
confirm: {
|
|
116
120
|
title: "Aviso",
|
|
117
|
-
deleteTab: "
|
|
121
|
+
deleteTab: "Você realmente deseja excluir a aba",
|
|
118
122
|
cancel: "As alterações realizadas serão descartadas.<br/><br/><b>Gostaria de continuar?</b>",
|
|
119
123
|
exit: "Ao sair as alterações serão descartadas.<br/><br/><b>Você realmente gostaria de sair?</b>",
|
|
120
124
|
apply: "A <b>{0}</b> irá substituir a sua configuração {1}!<br/><br/><b>Deseja continuar?</b>",
|
|
121
125
|
group: "Não é possível salvar as configurações com um grupo vazio!",
|
|
122
|
-
|
|
123
|
-
|
|
126
|
+
labelCancel: "Cancelar",
|
|
127
|
+
labelDelete: "Excluir"
|
|
124
128
|
},
|
|
125
129
|
alert: {
|
|
126
130
|
titleGroupExists: "Já existe um grupo com título",
|
|
@@ -105,7 +105,18 @@ class PesquisaFetcher {
|
|
|
105
105
|
};
|
|
106
106
|
if ((criteria === null || criteria === void 0 ? void 0 : criteria.params.length) > 0) {
|
|
107
107
|
externalCriteria.params = {
|
|
108
|
-
param: criteria.params.map(
|
|
108
|
+
param: criteria.params.map(param => {
|
|
109
|
+
let value = param.value;
|
|
110
|
+
let type = param.dataType;
|
|
111
|
+
if (type === DataType.OBJECT) {
|
|
112
|
+
value = value.value;
|
|
113
|
+
type = "S";
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
type = convertParamType(param.dataType);
|
|
117
|
+
}
|
|
118
|
+
return { $: value, type };
|
|
119
|
+
})
|
|
109
120
|
};
|
|
110
121
|
}
|
|
111
122
|
const reqBody = {
|
|
@@ -176,8 +176,14 @@ const SnkDataUnit$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
176
176
|
resolve(action);
|
|
177
177
|
}
|
|
178
178
|
else {
|
|
179
|
+
const options = {
|
|
180
|
+
canClose: false,
|
|
181
|
+
labelCancel: this.getMessage("snkDataUnit.confirm.cancel"),
|
|
182
|
+
labelConfirm: this.getMessage("snkDataUnit.confirm.delete"),
|
|
183
|
+
btnConfirmDanger: false
|
|
184
|
+
};
|
|
179
185
|
const removeConfirmationTitle = this.getMessage("snkDataUnit.removeConfirmationTitle");
|
|
180
|
-
ApplicationUtils.confirm(removeConfirmationTitle, removeConfirmation,
|
|
186
|
+
ApplicationUtils.confirm(removeConfirmationTitle, removeConfirmation, null, DialogType.WARN, options)
|
|
181
187
|
.then((result) => resolve(result ? action : undefined));
|
|
182
188
|
}
|
|
183
189
|
}
|
|
@@ -879,13 +879,13 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
879
879
|
handleDeleteTab(tabSelected) {
|
|
880
880
|
let options = {
|
|
881
881
|
canClose: false,
|
|
882
|
-
labelCancel: this.getMessage("snkFormConfig.confirm.
|
|
883
|
-
labelConfirm: this.getMessage("snkFormConfig.confirm.
|
|
882
|
+
labelCancel: this.getMessage("snkFormConfig.confirm.labelCancel"),
|
|
883
|
+
labelConfirm: this.getMessage("snkFormConfig.confirm.labelDelete"),
|
|
884
884
|
btnConfirmDanger: false
|
|
885
885
|
};
|
|
886
886
|
const title = this.getMessage("snkFormConfig.confirm.title");
|
|
887
|
-
const deleteTab = this.getMessage("snkFormConfig.confirm.deleteTab")
|
|
888
|
-
ApplicationUtils.confirm(title,
|
|
887
|
+
const deleteTab = this.getMessage("snkFormConfig.confirm.deleteTab") + ` <b>${tabSelected.detail.label}</b>?`;
|
|
888
|
+
ApplicationUtils.confirm(title, deleteTab, null, DialogType.WARN, options)
|
|
889
889
|
.then(response => {
|
|
890
890
|
var _a;
|
|
891
891
|
if (response) {
|
|
@@ -59,7 +59,7 @@ const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
59
59
|
resp = ObjectUtils.stringToObject(resp.json.$);
|
|
60
60
|
let descriptionField = resp.descriptionField;
|
|
61
61
|
let pkField = resp.pkField;
|
|
62
|
-
if (
|
|
62
|
+
if (pkField) {
|
|
63
63
|
let newItemList = [];
|
|
64
64
|
resp.data.forEach((item) => {
|
|
65
65
|
var _a;
|
|
@@ -67,7 +67,7 @@ const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
67
67
|
let fields = this.buildFirstFields(item['__matchFields'], fieldsMetadata);
|
|
68
68
|
let exibitionItem = {
|
|
69
69
|
key: this.highlightValue(item['__matchFields'], (_a = item[pkField]) === null || _a === void 0 ? void 0 : _a.toString(), fields, true),
|
|
70
|
-
title: this.highlightValue(item['__matchFields'], item[descriptionField], fields, true),
|
|
70
|
+
title: descriptionField ? this.highlightValue(item['__matchFields'], item[descriptionField], fields, true) : "",
|
|
71
71
|
details: this.buildDetails(fields, item)
|
|
72
72
|
};
|
|
73
73
|
newItemList.push(exibitionItem);
|
|
@@ -16,6 +16,7 @@ var TaskbarElement;
|
|
|
16
16
|
TaskbarElement["SAVE"] = "SAVE";
|
|
17
17
|
TaskbarElement["GRID_MODE"] = "GRID_MODE";
|
|
18
18
|
TaskbarElement["FORM_MODE"] = "FORM_MODE";
|
|
19
|
+
TaskbarElement["CONFIG_GRID"] = "CONFIG_GRID";
|
|
19
20
|
TaskbarElement["MORE_OPTIONS"] = "MORE_OPTIONS";
|
|
20
21
|
TaskbarElement["DIVIDER"] = "DIVIDER";
|
|
21
22
|
TaskbarElement["CONFIGURATOR"] = "CONFIGURATOR";
|
|
@@ -26,12 +27,11 @@ var AuthorizationElements;
|
|
|
26
27
|
AuthorizationElements["CLONE"] = "CLONE";
|
|
27
28
|
AuthorizationElements["REMOVE"] = "REMOVE";
|
|
28
29
|
AuthorizationElements["INSERT"] = "INSERT";
|
|
29
|
-
AuthorizationElements["
|
|
30
|
+
AuthorizationElements["CONFIG_GRID"] = "CONFIG_GRID";
|
|
30
31
|
})(AuthorizationElements || (AuthorizationElements = {}));
|
|
31
32
|
var VisibleWhenForbidden;
|
|
32
33
|
(function (VisibleWhenForbidden) {
|
|
33
34
|
VisibleWhenForbidden["CONFIG_GRID"] = "CONFIG_GRID";
|
|
34
|
-
VisibleWhenForbidden["CONFIGURATOR"] = "CONFIGURATOR";
|
|
35
35
|
})(VisibleWhenForbidden || (VisibleWhenForbidden = {}));
|
|
36
36
|
const buildCustomButton = (def, className, action, isEnabled) => {
|
|
37
37
|
const { hint, text, iconName } = def;
|
|
@@ -9,10 +9,14 @@ const snkDataUnitMessages = {
|
|
|
9
9
|
insert: "A inclusão descartada!",
|
|
10
10
|
update: "A edição foi descartada!"
|
|
11
11
|
},
|
|
12
|
+
confirm: {
|
|
13
|
+
cancel: "Cancelar",
|
|
14
|
+
delete: "Excluir"
|
|
15
|
+
},
|
|
12
16
|
removeInfo: "Registro removido com sucesso!",
|
|
13
17
|
cancelConfirmationTitle: "Aviso",
|
|
14
18
|
cancelConfirmation: "As alterações realizadas serão descartadas<br/><br/><b>Você realmente gostaria de cancelar?",
|
|
15
|
-
removeConfirmationTitle: "
|
|
19
|
+
removeConfirmationTitle: "Aviso",
|
|
16
20
|
removeConfirmation: "Deseja realmente excluir o registro atual?",
|
|
17
21
|
forbidden: "Sem permissão",
|
|
18
22
|
forbiddenUpdate: "Não é possível fazer alterações. Verifique as permissões de acesso.",
|
|
@@ -114,13 +118,13 @@ const snkFormConfigMessages = {
|
|
|
114
118
|
},
|
|
115
119
|
confirm: {
|
|
116
120
|
title: "Aviso",
|
|
117
|
-
deleteTab: "
|
|
121
|
+
deleteTab: "Você realmente deseja excluir a aba",
|
|
118
122
|
cancel: "As alterações realizadas serão descartadas.<br/><br/><b>Gostaria de continuar?</b>",
|
|
119
123
|
exit: "Ao sair as alterações serão descartadas.<br/><br/><b>Você realmente gostaria de sair?</b>",
|
|
120
124
|
apply: "A <b>{0}</b> irá substituir a sua configuração {1}!<br/><br/><b>Deseja continuar?</b>",
|
|
121
125
|
group: "Não é possível salvar as configurações com um grupo vazio!",
|
|
122
|
-
|
|
123
|
-
|
|
126
|
+
labelCancel: "Cancelar",
|
|
127
|
+
labelDelete: "Excluir"
|
|
124
128
|
},
|
|
125
129
|
alert: {
|
|
126
130
|
titleGroupExists: "Já existe um grupo com título",
|
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h } from './index-e4121713.js'
|
|
|
2
2
|
import { WaitingChangeException, WarningException, ErrorException, ObjectUtils, DataType, DataUnit, StringUtils, ChangeOperation, DateUtils, DependencyType, ApplicationContext, ErrorTracking } from '@sankhyalabs/core';
|
|
3
3
|
import { d as dist, D as DataFetcher, R as ResourceFetcher, U as UrlUtils, F as FormConfigFetcher } from './form-config-fetcher-96c6c2dc.js';
|
|
4
4
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
5
|
-
import { S as SnkMessageBuilder } from './SnkMessageBuilder-
|
|
5
|
+
import { S as SnkMessageBuilder } from './SnkMessageBuilder-a27fc561.js';
|
|
6
6
|
import './_commonjsHelpers-9943807e.js';
|
|
7
7
|
|
|
8
8
|
class SnkErrorHandler {
|
|
@@ -105,7 +105,18 @@ class PesquisaFetcher {
|
|
|
105
105
|
};
|
|
106
106
|
if ((criteria === null || criteria === void 0 ? void 0 : criteria.params.length) > 0) {
|
|
107
107
|
externalCriteria.params = {
|
|
108
|
-
param: criteria.params.map(
|
|
108
|
+
param: criteria.params.map(param => {
|
|
109
|
+
let value = param.value;
|
|
110
|
+
let type = param.dataType;
|
|
111
|
+
if (type === DataType.OBJECT) {
|
|
112
|
+
value = value.value;
|
|
113
|
+
type = "S";
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
type = convertParamType(param.dataType);
|
|
117
|
+
}
|
|
118
|
+
return { $: value, type };
|
|
119
|
+
})
|
|
109
120
|
};
|
|
110
121
|
}
|
|
111
122
|
const reqBody = {
|
|
@@ -6,7 +6,7 @@ import { C as ConfigurableElementsStorage } from './configurableElementsStorage-
|
|
|
6
6
|
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
7
7
|
import { ModalAction, ModalButtonStatus } from '@sankhyalabs/ezui/dist/collection/components/ez-modal-container';
|
|
8
8
|
import { toString } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
9
|
-
import { T as TaskbarElement, V as VisibleWhenForbidden, A as AuthorizationElements, b as buildElem, a as buildCustomButton } from './taskbar-elements-
|
|
9
|
+
import { T as TaskbarElement, V as VisibleWhenForbidden, A as AuthorizationElements, b as buildElem, a as buildCustomButton } from './taskbar-elements-0f41cd77.js';
|
|
10
10
|
|
|
11
11
|
const GRID_MODE = VIEW_MODE.grid;
|
|
12
12
|
const FORM_MODE = VIEW_MODE.form;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-e4121713.js';
|
|
2
2
|
import { ApplicationContext } from '@sankhyalabs/core';
|
|
3
3
|
import { c as VIEW_MODE } from './constants-c6039d3d.js';
|
|
4
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
|
4
|
+
import { T as TaskbarElement } from './taskbar-elements-0f41cd77.js';
|
|
5
5
|
|
|
6
6
|
const snkCrudCss = ".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%}";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-e4121713.js';
|
|
2
2
|
import { Action, ApplicationContext } from '@sankhyalabs/core';
|
|
3
3
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
|
-
import { O as OperationMap } from './SnkMessageBuilder-
|
|
4
|
+
import { O as OperationMap } from './SnkMessageBuilder-a27fc561.js';
|
|
5
5
|
|
|
6
6
|
const snkDataUnitCss = ".sc-snk-data-unit-h{display:flex;flex-direction:column;height:100%}";
|
|
7
7
|
|
|
@@ -175,8 +175,14 @@ const SnkDataUnit = class {
|
|
|
175
175
|
resolve(action);
|
|
176
176
|
}
|
|
177
177
|
else {
|
|
178
|
+
const options = {
|
|
179
|
+
canClose: false,
|
|
180
|
+
labelCancel: this.getMessage("snkDataUnit.confirm.cancel"),
|
|
181
|
+
labelConfirm: this.getMessage("snkDataUnit.confirm.delete"),
|
|
182
|
+
btnConfirmDanger: false
|
|
183
|
+
};
|
|
178
184
|
const removeConfirmationTitle = this.getMessage("snkDataUnit.removeConfirmationTitle");
|
|
179
|
-
ApplicationUtils.confirm(removeConfirmationTitle, removeConfirmation,
|
|
185
|
+
ApplicationUtils.confirm(removeConfirmationTitle, removeConfirmation, null, DialogType.WARN, options)
|
|
180
186
|
.then((result) => resolve(result ? action : undefined));
|
|
181
187
|
}
|
|
182
188
|
}
|
|
@@ -877,13 +877,13 @@ const SnkFormConfig = class {
|
|
|
877
877
|
handleDeleteTab(tabSelected) {
|
|
878
878
|
let options = {
|
|
879
879
|
canClose: false,
|
|
880
|
-
labelCancel: this.getMessage("snkFormConfig.confirm.
|
|
881
|
-
labelConfirm: this.getMessage("snkFormConfig.confirm.
|
|
880
|
+
labelCancel: this.getMessage("snkFormConfig.confirm.labelCancel"),
|
|
881
|
+
labelConfirm: this.getMessage("snkFormConfig.confirm.labelDelete"),
|
|
882
882
|
btnConfirmDanger: false
|
|
883
883
|
};
|
|
884
884
|
const title = this.getMessage("snkFormConfig.confirm.title");
|
|
885
|
-
const deleteTab = this.getMessage("snkFormConfig.confirm.deleteTab")
|
|
886
|
-
ApplicationUtils.confirm(title,
|
|
885
|
+
const deleteTab = this.getMessage("snkFormConfig.confirm.deleteTab") + ` <b>${tabSelected.detail.label}</b>?`;
|
|
886
|
+
ApplicationUtils.confirm(title, deleteTab, null, DialogType.WARN, options)
|
|
887
887
|
.then(response => {
|
|
888
888
|
var _a;
|
|
889
889
|
if (response) {
|
|
@@ -58,7 +58,7 @@ const SnkPesquisa = class {
|
|
|
58
58
|
resp = ObjectUtils.stringToObject(resp.json.$);
|
|
59
59
|
let descriptionField = resp.descriptionField;
|
|
60
60
|
let pkField = resp.pkField;
|
|
61
|
-
if (
|
|
61
|
+
if (pkField) {
|
|
62
62
|
let newItemList = [];
|
|
63
63
|
resp.data.forEach((item) => {
|
|
64
64
|
var _a;
|
|
@@ -66,7 +66,7 @@ const SnkPesquisa = class {
|
|
|
66
66
|
let fields = this.buildFirstFields(item['__matchFields'], fieldsMetadata);
|
|
67
67
|
let exibitionItem = {
|
|
68
68
|
key: this.highlightValue(item['__matchFields'], (_a = item[pkField]) === null || _a === void 0 ? void 0 : _a.toString(), fields, true),
|
|
69
|
-
title: this.highlightValue(item['__matchFields'], item[descriptionField], fields, true),
|
|
69
|
+
title: descriptionField ? this.highlightValue(item['__matchFields'], item[descriptionField], fields, true) : "",
|
|
70
70
|
details: this.buildDetails(fields, item)
|
|
71
71
|
};
|
|
72
72
|
newItemList.push(exibitionItem);
|
|
@@ -13,6 +13,7 @@ var TaskbarElement;
|
|
|
13
13
|
TaskbarElement["SAVE"] = "SAVE";
|
|
14
14
|
TaskbarElement["GRID_MODE"] = "GRID_MODE";
|
|
15
15
|
TaskbarElement["FORM_MODE"] = "FORM_MODE";
|
|
16
|
+
TaskbarElement["CONFIG_GRID"] = "CONFIG_GRID";
|
|
16
17
|
TaskbarElement["MORE_OPTIONS"] = "MORE_OPTIONS";
|
|
17
18
|
TaskbarElement["DIVIDER"] = "DIVIDER";
|
|
18
19
|
TaskbarElement["CONFIGURATOR"] = "CONFIGURATOR";
|
|
@@ -23,12 +24,11 @@ var AuthorizationElements;
|
|
|
23
24
|
AuthorizationElements["CLONE"] = "CLONE";
|
|
24
25
|
AuthorizationElements["REMOVE"] = "REMOVE";
|
|
25
26
|
AuthorizationElements["INSERT"] = "INSERT";
|
|
26
|
-
AuthorizationElements["
|
|
27
|
+
AuthorizationElements["CONFIG_GRID"] = "CONFIG_GRID";
|
|
27
28
|
})(AuthorizationElements || (AuthorizationElements = {}));
|
|
28
29
|
var VisibleWhenForbidden;
|
|
29
30
|
(function (VisibleWhenForbidden) {
|
|
30
31
|
VisibleWhenForbidden["CONFIG_GRID"] = "CONFIG_GRID";
|
|
31
|
-
VisibleWhenForbidden["CONFIGURATOR"] = "CONFIGURATOR";
|
|
32
32
|
})(VisibleWhenForbidden || (VisibleWhenForbidden = {}));
|
|
33
33
|
const buildCustomButton = (def, className, action, isEnabled) => {
|
|
34
34
|
const { hint, text, iconName } = def;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={saveInfo:{clone:"Duplicação realizada!",insert:"Inclusão realizada!",update:"Aleração realizada!"},cancelInfo:{clone:"Duplicação descartada!",insert:"A inclusão descartada!",update:"A edição foi descartada!"},confirm:{cancel:"Cancelar",delete:"Excluir"},removeInfo:"Registro removido com sucesso!",cancelConfirmationTitle:"Aviso",cancelConfirmation:"As alterações realizadas serão descartadas<br/><br/><b>Você realmente gostaria de cancelar?",removeConfirmationTitle:"Aviso",removeConfirmation:"Deseja realmente excluir o registro atual?",forbidden:"Sem permissão",forbiddenUpdate:"Não é possível fazer alterações. Verifique as permissões de acesso.",forbiddenInsert:"Não é possível incluir. Verifique as permissões de acesso.",forbiddenClone:"Não é possível duplicar. Verifique as permissões de acesso.",forbiddenRemove:"Não é possível remover. Verifique as permissões de acesso."},a={addFilter:"Adicionar filtro",pinFilter:"Fixar filtro",unpinFilter:"Desfixar filtro",removeFilter:"Remover filtro",cleanFilter:"Limpar",applyFilter:"Aplicar",findFilter:"Buscar filtros...",findField:"Buscar filtros...",modalFindFilter:"Buscar filtro",emptyFiltersList:"Não há filtros disponíveis",emptyAppliedFiltersList:"Não há filtros aplicados",customFilter:"Filtro personalizado",defaultFilter:"Filtro padrão",failToLoadConfig:"Falha ao buscar configuração de filtros",clearAllFilters:"Limpar todos os filtros",successfullyCleaned:"Filtro limpo com sucesso!",activeFilter:"{{ACTIVE_FILTERS}} filtro aplicado",activeFilters:"{{ACTIVE_FILTERS}} filtros aplicados",noActiveFilters:"Nenhum filtro aplicado",modalDefaultFilterTitle:"Filtro padrão",modalInfoTextEditDefault:"Use o layout antigo para editar o seu filtro padrão, em breve traremos uma nova experiência.",modalInfoTextCreateDefault:"Use o layout antigo para criar o seu filtro padrão, em breve traremos uma nova experiência.",modalPersonalizedFilterTitle:"Filtro personalizado",modalPersonalizedFilterSubTitle:"Gerencie seus filtros",modalInfoTextCreateEditPersonalized:"Use o layout antigo para criar ou editar filtros, em breve traremos uma nova experiência",modalOkButtonLabel:"Aplicar",modalCancelButtonLabel:"Limpar"},r={titleUpdate:"Editar",titlePrevious:"Anterior",titleNext:"Próximo",titleRefresh:"Atualizar",titleClone:"Duplicar",titleRemove:"Excluir",titleMoreOptions:"Mais Opções",titleInsert:"Cadastrar",titleCancel:"Cancelar",titleSave:"Salvar",titleGridMode:"Modo Grade",titleFormMode:"Modo Formulário",titleConfigurator:"Configurações",forbidden:"Permissão não liberada"},o={errorArray:"CrudUtils.find deve receber um array de fields, ou uma lista separada por virgula."},i={title:{clone:"Duplicar registro",insert:"Cadastrar registro",update:"Alterar registro",clean:"{{ENTITY_NAME}}"},goBackTitle:"Voltar"},l={label:{nameField:"Nome do Campo *",typeValueDefault:"Tipo de valor padrão *",valueDefault:"Valor Padrão",clearDuplicate:"Limpar ao Duplicar",requiredField:"Campo Obrigatório",protectedField:"Campo Protegido"},options:{valueFixed:"Valor Fixo",variable:"Variável"}},s={title:"Configuração do formulário",applyConfig:"Aplicar configuração",availableFields:{title:"Campos disponíveis",labelNoFields:"Nenhum campo disponível",labelOneField:"1 campo disponível",labelAvailableFields:"Campos disponíveis",labelSearchField:"Procurar campo"},form:{subTitleInfo:"Inclua estes campos nos grupos ou deixe-os separados no topo do formulário!",labelDropField:"Arraste e solte um campo aqui",labelNewGroup:"Adicionar novo grupo",mainArea:"Área principal",tabGeneral:"Geral"},confirm:{title:"Aviso",deleteTab:"Você realmente deseja excluir a aba",cancel:"As alterações realizadas serão descartadas.<br/><br/><b>Gostaria de continuar?</b>",exit:"Ao sair as alterações serão descartadas.<br/><br/><b>Você realmente gostaria de sair?</b>",apply:"A <b>{0}</b> irá substituir a sua configuração {1}!<br/><br/><b>Deseja continuar?</b>",group:"Não é possível salvar as configurações com um grupo vazio!",labelCancel:"Cancelar",labelDelete:"Excluir"},alert:{titleGroupExists:"Já existe um grupo com título",infoValidTitle:"Por favor, digite um título válido.",inTab:"na aba"}},t={titleRemove:"Remover",titleConfigurations:"Configurações",titleAdd:"Adicionar"},n={labelRename:"Renomear",labelHide:"Ocultar",labelShow:"Exibir",labelDelete:"Excluir"},d={msgSaveSuccessfully:"As configurações foram salvas com sucesso!"},u={titleConfigurations:"Configurações",subTitleModeConfig:"Modo de visualização",labelConfigGrid:"Configurar grade",labelConfigForm:"Configurar formulário",labelGrid:"Grade",labelForm:"Formulário"};class c{constructor(){this._defaults={snkDataUnit:e,snkForm:i,snkFormConfig:s,snkConfigOptions:l,snkTaskbar:r,snkConfigModal:u,snkFieldConfig:t,snkFilterBar:a,snkConfigurator:d,snkTabConfig:n,crudUtils:o},this._currentOperation=p.CLEAN,this.loadAppMessages().then((e=>{this._appMessages=e}),(e=>{console.info("O arquivo de mensagens personalizadas não foi encontrado no caminho /messages/appmessages.js",e)}))}set currentOperation(e){this._currentOperation=e}getMessage(e,a){if(null==e)return;var r=e.split(".");let o=this.resolveMessage(r,this._appMessages);if(null==o&&(o=this.resolveMessage(r,this._defaults)),this.customMessageBuilder){const r=this.customMessageBuilder(e,o,a);o=r.message,a=r.params}return this.postProcess(o,a)}resolveMessage(e,a){if(null==a)return;const r=a[e[0]];return r?this.isOperationSensitive(r)?r[this._currentOperation]:1===e.length||null==r||"string"==typeof r?r:this.resolveMessage(e.slice(1),r):void 0}isOperationSensitive(e){return null!=e[p.CLONE]||null!=e[p.INSERT]||null!=e[p.UPDATE]||null!=e[p.CLEAN]}postProcess(e,a){if(e){const r=/(.*?)\{\{(.+?)\}\}/g;let o,i="",l=e;for(;null!==(o=r.exec(e));){const[r,s,t]=o,n=o.index+r.length;l=n<e.length?e.substring(n):"";let d=a?a[t]:void 0;null==d&&(d=""),i+=s+d}return i+l}return e}loadAppMessages(){return new Promise(((e,a)=>{const r="dev"!==window.applicationenv?`/${window.MGE_MODULE_NAME}/labsApps/${window.APPLICATION_NAME}/build/messages/appmessages.js`:"/messages/appmessages.js";import(r).then((a=>{e(a.default)})).catch((e=>{a(e)}))}))}}var p;!function(e){e.CLONE="clone",e.INSERT="insert",e.UPDATE="update",e.CLEAN="clean"}(p||(p={}));export{p as O,c as S}
|