@sankhyalabs/sankhyablocks 3.3.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{SnkMessageBuilder-424f02f7.js → SnkMessageBuilder-e6dee2c2.js} +21 -1
- package/dist/cjs/{index-0e663819.js → index-f400b1d6.js} +34 -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 +11 -11
- package/dist/cjs/snk-configurator_3.cjs.entry.js +1 -1
- package/dist/cjs/snk-crud.cjs.entry.js +2 -2
- package/dist/cjs/snk-data-exporter_8.cjs.entry.js +2 -2
- package/dist/cjs/snk-data-unit.cjs.entry.js +1 -1
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +3 -2
- package/dist/cjs/snk-filter-param-config.cjs.entry.js +255 -0
- package/dist/cjs/snk-form.cjs.entry.js +1 -1
- package/dist/cjs/{taskbar-elements-d7eb170e.js → taskbar-elements-5e87cf44.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.js +3 -2
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IExpressionItem.js +1 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/ISystemFilterConfig.js +1 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IUserFilterConfig.js +1 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.css +12 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.js +258 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.js +55 -0
- package/dist/collection/lib/@types/index.js +34 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +10 -10
- package/dist/collection/lib/message/SnkMessageBuilder.js +3 -1
- package/dist/collection/lib/message/resources/snk-filter-param-config.msg.js +18 -0
- package/dist/components/SnkMessageBuilder.js +21 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/{esm/index-1564817d.js → components/index2.js} +35 -1
- package/dist/components/snk-application2.js +10 -10
- package/dist/components/snk-crud.js +2 -1
- package/dist/components/snk-data-exporter2.js +2 -33
- package/dist/components/snk-exporter-email-sender2.js +3 -2
- package/dist/components/snk-filter-param-config.d.ts +11 -0
- package/dist/components/snk-filter-param-config.js +276 -0
- package/dist/components/snk-form2.js +2 -1
- package/dist/components/snk-grid2.js +2 -1
- package/dist/components/snk-taskbar2.js +2 -1
- package/dist/esm/{SnkMessageBuilder-64821b88.js → SnkMessageBuilder-f0d50bd6.js} +21 -1
- package/dist/esm/index-bd13bdcf.js +67 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-application.entry.js +11 -11
- package/dist/esm/snk-configurator_3.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +2 -2
- package/dist/esm/snk-data-exporter_8.entry.js +2 -2
- package/dist/esm/snk-data-unit.entry.js +1 -1
- package/dist/esm/snk-exporter-email-sender.entry.js +3 -2
- package/dist/esm/snk-filter-param-config.entry.js +251 -0
- package/dist/esm/snk-form.entry.js +1 -1
- package/dist/esm/{taskbar-elements-dc968d8f.js → taskbar-elements-8400dbe7.js} +1 -1
- package/dist/sankhyablocks/p-22e44b9d.entry.js +1 -0
- package/dist/sankhyablocks/{p-d3fb34cb.js → p-32d02fa4.js} +1 -1
- package/dist/sankhyablocks/p-69562bcf.js +1 -0
- package/dist/sankhyablocks/{p-71b8562d.entry.js → p-69738f28.entry.js} +1 -1
- package/dist/sankhyablocks/{p-31b3217d.entry.js → p-7f195b37.entry.js} +1 -1
- package/dist/sankhyablocks/{p-d9c43eca.js → p-93c271e2.js} +1 -1
- package/dist/sankhyablocks/{p-6878464e.entry.js → p-a2ea13ed.entry.js} +1 -1
- package/dist/sankhyablocks/{p-554db79e.entry.js → p-b326cf51.entry.js} +1 -1
- package/dist/sankhyablocks/p-c81ced8a.entry.js +1 -0
- package/dist/sankhyablocks/{p-a22a3a7a.entry.js → p-e906ba66.entry.js} +4 -4
- package/dist/sankhyablocks/{p-afea1284.entry.js → p-f559c71a.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IExpressionItem.d.ts +13 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/ISystemFilterConfig.d.ts +4 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IUserFilterConfig.d.ts +5 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.d.ts +41 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.d.ts +15 -0
- package/dist/types/components.d.ts +16 -0
- package/dist/types/lib/@types/index.d.ts +30 -0
- package/dist/types/lib/message/resources/snk-filter-param-config.msg.d.ts +1 -0
- package/package.json +1 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/sankhyablocks/p-5534e08c.js +0 -1
- package/dist/sankhyablocks/p-eb08de68.entry.js +0 -1
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { StringUtils, DataType, ElementIDUtils, ApplicationContext } from '@sankhyalabs/core';
|
|
3
|
+
import { ModalAction } from '@sankhyalabs/ezui/dist/collection/components/ez-modal-container';
|
|
4
|
+
import { F as FilterOperand, a as FilterConfigType, b as FilterEntities, c as FilterUserConfigTypes } from './index2.js';
|
|
5
|
+
|
|
6
|
+
class PersonalizedFilterUtils {
|
|
7
|
+
/**
|
|
8
|
+
* Cria uma expressão de filtro a partir de um IExpressionItem.
|
|
9
|
+
* @param expressionItem - Objeto com os parâmetros necessários para montar a expressão.
|
|
10
|
+
* @returns Retorna a expressão de filtro.
|
|
11
|
+
*/
|
|
12
|
+
static buildFilterExpression(expressionItem) {
|
|
13
|
+
if (expressionItem == undefined) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const value = this.buildVariableParameterValue(expressionItem);
|
|
17
|
+
let expression = expressionItem.expression || "";
|
|
18
|
+
switch (expressionItem.operand) {
|
|
19
|
+
case FilterOperand.IN:
|
|
20
|
+
expression += ` ${expressionItem.operand} (${value})`;
|
|
21
|
+
break;
|
|
22
|
+
case FilterOperand.NULL:
|
|
23
|
+
case FilterOperand.NOT_NULL:
|
|
24
|
+
expression += ` IS ${value}`;
|
|
25
|
+
break;
|
|
26
|
+
case FilterOperand.LIKE:
|
|
27
|
+
expression += ` LIKE '%${value}%'`;
|
|
28
|
+
break;
|
|
29
|
+
case FilterOperand.START_WITH:
|
|
30
|
+
expression += ` LIKE '${value}%'`;
|
|
31
|
+
break;
|
|
32
|
+
case FilterOperand.FINISHED_WITH:
|
|
33
|
+
expression += ` LIKE '%${value}'`;
|
|
34
|
+
break;
|
|
35
|
+
default:
|
|
36
|
+
expression += ` ${expressionItem.operand} ${value}`;
|
|
37
|
+
}
|
|
38
|
+
return expression;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Obtém o valor do parâmetro a partir de um IExpressionItem.
|
|
42
|
+
* @param expressionItem - Objeto com os parâmetros necessários para montar a expressão.
|
|
43
|
+
* @returns Retorna o valor do parâmetro.
|
|
44
|
+
*/
|
|
45
|
+
static buildVariableParameterValue(expressionItem) {
|
|
46
|
+
if (expressionItem == undefined) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (expressionItem.systemConfig != undefined) {
|
|
50
|
+
const systemConfig = expressionItem.systemConfig;
|
|
51
|
+
return `?:{entidade=${systemConfig.entity || ""};campo=${systemConfig.fieldName || ""}}`;
|
|
52
|
+
}
|
|
53
|
+
if (expressionItem.userConfig != undefined) {
|
|
54
|
+
const userConfig = expressionItem.userConfig;
|
|
55
|
+
return `?:{desc=${userConfig.description || ""};tipo=${userConfig.type || ""}}`;
|
|
56
|
+
}
|
|
57
|
+
return `?:{entidade=${expressionItem.entityName || ""};campo=${expressionItem.fieldName || ""}}`;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const snkFilterParamConfigCss = ".sc-snk-filter-param-config-h{--snk-filter-param-config__expression--color:var(--title--primary, #2b3a54);display:flex;position:relative}.snk-filter-param-config__expression.sc-snk-filter-param-config{--text-area__input--disabled--color:var(--snk-filter-param-config__expression--color)}";
|
|
62
|
+
|
|
63
|
+
const SnkFilterParamConfig$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
64
|
+
constructor() {
|
|
65
|
+
super();
|
|
66
|
+
this.__registerHost();
|
|
67
|
+
this._opened = false;
|
|
68
|
+
this._configType = FilterConfigType.SYSTEM_CONFIG;
|
|
69
|
+
this._expressionItem = undefined;
|
|
70
|
+
this._informedInstance = false;
|
|
71
|
+
this._canSave = false;
|
|
72
|
+
}
|
|
73
|
+
open(expressionItem) {
|
|
74
|
+
this._opened = true;
|
|
75
|
+
this._expressionItem = expressionItem;
|
|
76
|
+
this.loadValues();
|
|
77
|
+
return new Promise(accept => {
|
|
78
|
+
this._promiseResolver = accept;
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
close() {
|
|
82
|
+
this._opened = false;
|
|
83
|
+
return new Promise(accept => {
|
|
84
|
+
this._promiseResolver = accept;
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
|
89
|
+
* através de um pequeno modulo na estrutura da aplicação:
|
|
90
|
+
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
|
91
|
+
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-filter-param-config.msg.ts"
|
|
92
|
+
*/
|
|
93
|
+
getMessage(key, params) {
|
|
94
|
+
return this._application.messagesBuilder.getMessage(key, params);
|
|
95
|
+
}
|
|
96
|
+
getConfigValue(configName, inputName, inputAlias = "") {
|
|
97
|
+
var _a, _b, _c;
|
|
98
|
+
return ((_b = (_a = this._expressionItem) === null || _a === void 0 ? void 0 : _a[configName]) === null || _b === void 0 ? void 0 : _b[inputName])
|
|
99
|
+
|| ((_c = this._expressionItem) === null || _c === void 0 ? void 0 : _c[inputAlias || inputName]);
|
|
100
|
+
}
|
|
101
|
+
loadValues() {
|
|
102
|
+
var _a;
|
|
103
|
+
const entityName = this.getConfigValue("systemConfig", "entity", "entityName");
|
|
104
|
+
const fieldName = this.getConfigValue("systemConfig", "fieldName");
|
|
105
|
+
const description = this.getConfigValue("userConfig", "description");
|
|
106
|
+
const type = this.getConfigValue("userConfig", "type");
|
|
107
|
+
if (((_a = this._expressionItem) === null || _a === void 0 ? void 0 : _a.userConfig) != undefined) {
|
|
108
|
+
this._configType = FilterConfigType.USER_CONFIG;
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
this._configType = FilterConfigType.SYSTEM_CONFIG;
|
|
112
|
+
}
|
|
113
|
+
if (!StringUtils.isEmpty(entityName) && !StringUtils.isEmpty(fieldName)) {
|
|
114
|
+
this._instanceElement.value = { value: entityName, label: "" };
|
|
115
|
+
this._fieldElement.value = { value: fieldName, label: "" };
|
|
116
|
+
}
|
|
117
|
+
if (!StringUtils.isEmpty(description) && !StringUtils.isEmpty(type)) {
|
|
118
|
+
this._descriptionElement.value = description;
|
|
119
|
+
this._typeElement.value = type;
|
|
120
|
+
}
|
|
121
|
+
this.buildFilterExpression();
|
|
122
|
+
}
|
|
123
|
+
changeDefinitionUsed(option) {
|
|
124
|
+
this._configType = option !== null && option !== void 0 ? option : FilterConfigType.SYSTEM_CONFIG;
|
|
125
|
+
if (this._configType === FilterConfigType.SYSTEM_CONFIG) {
|
|
126
|
+
const entityName = this.getConfigValue("systemConfig", "entity", "entityName");
|
|
127
|
+
const fieldName = this.getConfigValue("systemConfig", "fieldName");
|
|
128
|
+
this._instanceElement.value = this._instanceElement.value || { value: entityName, label: "" };
|
|
129
|
+
this._fieldElement.value = this._fieldElement.value || { value: fieldName, label: "" };
|
|
130
|
+
}
|
|
131
|
+
else if (this._configType === FilterConfigType.USER_CONFIG) {
|
|
132
|
+
const description = this.getConfigValue("userConfig", "description");
|
|
133
|
+
const type = this.getConfigValue("userConfig", "type");
|
|
134
|
+
this._descriptionElement.value = this._descriptionElement.value || description;
|
|
135
|
+
this._typeElement.value = this._typeElement.value || type;
|
|
136
|
+
}
|
|
137
|
+
this.buildFilterExpression();
|
|
138
|
+
}
|
|
139
|
+
getTypeValue() {
|
|
140
|
+
var _a;
|
|
141
|
+
const value = (_a = this._typeElement) === null || _a === void 0 ? void 0 : _a.value;
|
|
142
|
+
return ((value === null || value === void 0 ? void 0 : value.value) || value);
|
|
143
|
+
}
|
|
144
|
+
getExpressionValues() {
|
|
145
|
+
var _a, _b, _c, _d, _e;
|
|
146
|
+
let systemConfig;
|
|
147
|
+
let userConfig;
|
|
148
|
+
if (this._configType === FilterConfigType.SYSTEM_CONFIG) {
|
|
149
|
+
const entity = (_b = (_a = this._instanceElement) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.value;
|
|
150
|
+
const fieldName = (_d = (_c = this._fieldElement) === null || _c === void 0 ? void 0 : _c.value) === null || _d === void 0 ? void 0 : _d.value;
|
|
151
|
+
systemConfig = { entity, fieldName };
|
|
152
|
+
}
|
|
153
|
+
else if (this._configType === FilterConfigType.USER_CONFIG) {
|
|
154
|
+
const description = (_e = this._descriptionElement) === null || _e === void 0 ? void 0 : _e.value;
|
|
155
|
+
const type = this.getTypeValue();
|
|
156
|
+
userConfig = { description, type };
|
|
157
|
+
}
|
|
158
|
+
return Object.assign(Object.assign(Object.assign({}, this._expressionItem), { systemConfig }), { userConfig });
|
|
159
|
+
}
|
|
160
|
+
isEnabled(value) {
|
|
161
|
+
return this._configType === value;
|
|
162
|
+
}
|
|
163
|
+
isInformedInstance() {
|
|
164
|
+
var _a, _b;
|
|
165
|
+
return !StringUtils.isEmpty((_b = (_a = this._instanceElement) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.value);
|
|
166
|
+
}
|
|
167
|
+
save() {
|
|
168
|
+
var _a;
|
|
169
|
+
this._expressionItem = Object.assign(Object.assign({}, this.getExpressionValues()), { expression: (_a = this._expressionElement) === null || _a === void 0 ? void 0 : _a.value });
|
|
170
|
+
this._promiseResolver(this._expressionItem);
|
|
171
|
+
this._opened = false;
|
|
172
|
+
}
|
|
173
|
+
buildFilterExpression() {
|
|
174
|
+
var _a;
|
|
175
|
+
this._informedInstance = this.isInformedInstance();
|
|
176
|
+
const expression = PersonalizedFilterUtils.buildFilterExpression(this.getExpressionValues());
|
|
177
|
+
this._expressionElement.value = expression || ((_a = this._expressionItem) === null || _a === void 0 ? void 0 : _a.expression);
|
|
178
|
+
this._canSave = this.getCanSave();
|
|
179
|
+
}
|
|
180
|
+
handleChangeInstance() {
|
|
181
|
+
this._informedInstance = this.isInformedInstance();
|
|
182
|
+
if (this._fieldElement != undefined && !StringUtils.isEmpty(this._fieldElement.value)) {
|
|
183
|
+
this._fieldElement.value = null;
|
|
184
|
+
}
|
|
185
|
+
this.buildFilterExpression();
|
|
186
|
+
}
|
|
187
|
+
getInstanceCriteria() {
|
|
188
|
+
var _a, _b;
|
|
189
|
+
const value = (_b = (_a = this._instanceElement) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.value;
|
|
190
|
+
return {
|
|
191
|
+
expression: "this.NOMETAB = (SELECT NOMETAB FROM TDDINS WHERE NOMEINSTANCIA = ?)",
|
|
192
|
+
params: [
|
|
193
|
+
{
|
|
194
|
+
name: "NOMEINSTANCIA",
|
|
195
|
+
dataType: DataType.TEXT,
|
|
196
|
+
value
|
|
197
|
+
}
|
|
198
|
+
]
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
onSearch({ mode, argument }, entity) {
|
|
202
|
+
if (this._application == undefined) {
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
const isField = entity === FilterEntities.FIELD;
|
|
206
|
+
const criteria = isField ? this.getInstanceCriteria() : undefined;
|
|
207
|
+
const messageKey = `snkFilterParamConfig.label${isField ? "Field" : "Instance"}`;
|
|
208
|
+
const entityDescription = this.getMessage(messageKey);
|
|
209
|
+
const searchOptions = {
|
|
210
|
+
descriptionFieldName: isField ? "DESCRCAMPO" : "DESCRINSTANCIA",
|
|
211
|
+
codeFieldName: isField ? "NOMECAMPO" : "NOMEINSTANCIA",
|
|
212
|
+
showInactives: false
|
|
213
|
+
};
|
|
214
|
+
const options = {
|
|
215
|
+
entity,
|
|
216
|
+
entityDescription,
|
|
217
|
+
criteria,
|
|
218
|
+
searchOptions
|
|
219
|
+
};
|
|
220
|
+
return this._application.executePreparedSearch(mode, argument, options);
|
|
221
|
+
}
|
|
222
|
+
getElementID(sufix) {
|
|
223
|
+
return {
|
|
224
|
+
[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(sufix)
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
getCanSave() {
|
|
228
|
+
var _a;
|
|
229
|
+
if (this._configType === FilterConfigType.USER_CONFIG) {
|
|
230
|
+
const description = (_a = this._descriptionElement) === null || _a === void 0 ? void 0 : _a.value;
|
|
231
|
+
const type = this.getTypeValue();
|
|
232
|
+
return !StringUtils.isEmpty(description) && !StringUtils.isEmpty(type);
|
|
233
|
+
}
|
|
234
|
+
return true;
|
|
235
|
+
}
|
|
236
|
+
componentWillLoad() {
|
|
237
|
+
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
238
|
+
}
|
|
239
|
+
render() {
|
|
240
|
+
ElementIDUtils.addIDInfoIfNotExists(this._element, 'snkFilterParamConfig');
|
|
241
|
+
return (h("ez-popup", Object.assign({ useHeader: false, size: "small", heightMode: "auto", opened: this._opened }, this.getElementID("popup")), h("ez-modal-container", Object.assign({ onEzModalAction: (evt) => {
|
|
242
|
+
if (evt.detail === ModalAction.CLOSE)
|
|
243
|
+
this.close();
|
|
244
|
+
}, modalTitle: this.getMessage("snkFilterParamConfig.modalTitle") }, this.getElementID("modalContainer")), h("div", { class: "ez-flex" }, h("div", { class: "ez-col ez-col--sd-6 ez-flex--column" }, h("ez-radio-button", Object.assign({ value: this._configType, onEzChange: (evt) => this.changeDefinitionUsed(evt.detail) }, this.getElementID("systemConfigOption")), h("ez-radio-button-option", { label: this.getMessage("snkFilterParamConfig.labelSystemConfig"), value: FilterConfigType.SYSTEM_CONFIG })), h("ez-search", Object.assign({ ref: (ref) => this._instanceElement = ref, label: this.getMessage("snkFilterParamConfig.labelInstance"), enabled: this.isEnabled(FilterConfigType.SYSTEM_CONFIG), suppressEmptyOption: true, showOptionValue: false, showSelectedValue: false, onEzChange: () => this.handleChangeInstance(), optionLoader: (searchArgument) => this.onSearch(searchArgument, FilterEntities.INSTANCE) }, this.getElementID("configFindEntity"))), h("ez-search", Object.assign({ ref: (ref) => this._fieldElement = ref, label: this.getMessage("snkFilterParamConfig.labelField"), enabled: this.isEnabled(FilterConfigType.SYSTEM_CONFIG) && this._informedInstance, suppressEmptyOption: true, showOptionValue: false, showSelectedValue: false, onEzChange: () => this.buildFilterExpression(), optionLoader: (searchArgument) => this.onSearch(searchArgument, FilterEntities.FIELD) }, this.getElementID("configFindField")))), h("div", { class: "ez-flex ez-padding--medium" }, h("hr", { class: "ez-divider-vertical" })), h("div", { class: "ez-col ez-col--sd-6 ez-flex--column" }, h("ez-radio-button", Object.assign({ value: this._configType, onEzChange: (evt) => this.changeDefinitionUsed(evt.detail) }, this.getElementID("userConfigOption")), h("ez-radio-button-option", { label: this.getMessage("snkFilterParamConfig.labelUserConfig"), value: FilterConfigType.USER_CONFIG })), h("ez-text-input", Object.assign({ ref: (ref) => this._descriptionElement = ref, label: this.getMessage("snkFilterParamConfig.labelDescription"), enabled: this.isEnabled(FilterConfigType.USER_CONFIG), onEzChange: () => this.buildFilterExpression() }, this.getElementID("configParamLabel"))), h("ez-combo-box", Object.assign({ ref: (ref) => this._typeElement = ref, label: this.getMessage("snkFilterParamConfig.labelType"), enabled: this.isEnabled(FilterConfigType.USER_CONFIG), suppressEmptyOption: true, onEzChange: () => this.buildFilterExpression() }, this.getElementID("configParamType")), Object.keys(FilterUserConfigTypes).map((configType) => {
|
|
245
|
+
return (h("option", { value: FilterUserConfigTypes[configType] }, this.getMessage(`snkFilterParamConfig.labelTypeValues.${configType.toLowerCase()}`)));
|
|
246
|
+
})))), h("ez-text-area", Object.assign({ ref: (ref) => this._expressionElement = ref, class: "snk-filter-param-config__expression", label: this.getMessage("snkFilterParamConfig.labelExpression"), enabled: false }, this.getElementID("presentationExpression"))), h("div", { class: "ez-col ez-col--sd-12 ez-flex--justify-end ez-margin-vertical--small" }, h("ez-button", Object.assign({ class: "ez-padding-right--medium", label: this.getMessage("snkFilterParamConfig.labelCancel"), onClick: () => this.close() }, this.getElementID("cancelEditParam"))), h("ez-button", Object.assign({ class: "ez-button--primary", label: this.getMessage("snkFilterParamConfig.labelSave"), onClick: () => this.save(), enabled: this._canSave }, this.getElementID("saveEditParam")))))));
|
|
247
|
+
}
|
|
248
|
+
get _element() { return this; }
|
|
249
|
+
static get style() { return snkFilterParamConfigCss; }
|
|
250
|
+
}, [2, "snk-filter-param-config", {
|
|
251
|
+
"_opened": [32],
|
|
252
|
+
"_configType": [32],
|
|
253
|
+
"_expressionItem": [32],
|
|
254
|
+
"_informedInstance": [32],
|
|
255
|
+
"_canSave": [32],
|
|
256
|
+
"open": [64],
|
|
257
|
+
"close": [64]
|
|
258
|
+
}]);
|
|
259
|
+
function defineCustomElement$1() {
|
|
260
|
+
if (typeof customElements === "undefined") {
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
const components = ["snk-filter-param-config"];
|
|
264
|
+
components.forEach(tagName => { switch (tagName) {
|
|
265
|
+
case "snk-filter-param-config":
|
|
266
|
+
if (!customElements.get(tagName)) {
|
|
267
|
+
customElements.define(tagName, SnkFilterParamConfig$1);
|
|
268
|
+
}
|
|
269
|
+
break;
|
|
270
|
+
} });
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
const SnkFilterParamConfig = SnkFilterParamConfig$1;
|
|
274
|
+
const defineCustomElement = defineCustomElement$1;
|
|
275
|
+
|
|
276
|
+
export { SnkFilterParamConfig, defineCustomElement };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { DateUtils, ObjectUtils, ElementIDUtils, ApplicationContext } from '@sankhyalabs/core';
|
|
3
3
|
import { C as ConfigStorage } from './ConfigStorage.js';
|
|
4
|
-
import { P as PresentationMode
|
|
4
|
+
import { P as PresentationMode } from './index2.js';
|
|
5
5
|
import { T as TaskbarProcessor } from './taskbar-processor.js';
|
|
6
6
|
import { d as defineCustomElement$7 } from './snk-config-options2.js';
|
|
7
|
+
import { d as defineCustomElement$6 } from './snk-data-exporter2.js';
|
|
7
8
|
import { d as defineCustomElement$5 } from './snk-exporter-email-sender2.js';
|
|
8
9
|
import { d as defineCustomElement$4 } from './snk-field-config2.js';
|
|
9
10
|
import { d as defineCustomElement$3 } from './snk-form-config2.js';
|
|
@@ -2,9 +2,10 @@ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/i
|
|
|
2
2
|
import { ElementIDUtils, ApplicationContext, DataType } from '@sankhyalabs/core';
|
|
3
3
|
import { UserInterface } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
4
4
|
import { C as ConfigStorage } from './ConfigStorage.js';
|
|
5
|
-
import { P as PresentationMode
|
|
5
|
+
import { P as PresentationMode } from './index2.js';
|
|
6
6
|
import { T as TaskbarProcessor } from './taskbar-processor.js';
|
|
7
7
|
import { s as store, d as defineCustomElement$1 } from './snk-taskbar2.js';
|
|
8
|
+
import { d as defineCustomElement$a } from './snk-data-exporter2.js';
|
|
8
9
|
import { d as defineCustomElement$9 } from './snk-exporter-email-sender2.js';
|
|
9
10
|
import { d as defineCustomElement$8 } from './snk-filter-bar2.js';
|
|
10
11
|
import { d as defineCustomElement$7 } from './snk-filter-detail2.js';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { getRenderingRef, forceUpdate, h, proxyCustomElement, HTMLElement, createEvent, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { StringUtils, ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { A as AuthorizationConfig } from './AuthorizationConfig.js';
|
|
4
|
-
import { P as PresentationMode
|
|
4
|
+
import { P as PresentationMode } from './index2.js';
|
|
5
|
+
import { d as defineCustomElement$2 } from './snk-data-exporter2.js';
|
|
5
6
|
import { d as defineCustomElement$1 } from './snk-exporter-email-sender2.js';
|
|
6
7
|
|
|
7
8
|
const appendToMap = (map, propName, value) => {
|
|
@@ -247,6 +247,25 @@ const snkDataExporterMessages = {
|
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
249
|
|
|
250
|
+
const snkFilterParamConfigMessages = {
|
|
251
|
+
modalTitle: "Configuração de parâmetro variável",
|
|
252
|
+
labelSystemConfig: "Usar definições do sistema",
|
|
253
|
+
labelUserConfig: "Usar definições personalizadas",
|
|
254
|
+
labelInstance: "Categoria",
|
|
255
|
+
labelField: "Campo",
|
|
256
|
+
labelDescription: "Descrição (obrigatório) *",
|
|
257
|
+
labelType: "Tipo (obrigatório) *",
|
|
258
|
+
labelTypeValues: {
|
|
259
|
+
date: "Data",
|
|
260
|
+
text: "Texto",
|
|
261
|
+
integer: "Número Inteiro",
|
|
262
|
+
decimal: "Número com Decimal",
|
|
263
|
+
},
|
|
264
|
+
labelExpression: "Expressão",
|
|
265
|
+
labelCancel: "Cancelar",
|
|
266
|
+
labelSave: "Salvar"
|
|
267
|
+
};
|
|
268
|
+
|
|
250
269
|
class SnkMessageBuilder {
|
|
251
270
|
constructor() {
|
|
252
271
|
this._defaults = {
|
|
@@ -264,7 +283,8 @@ class SnkMessageBuilder {
|
|
|
264
283
|
snkGridConfig: snkGridConfigMessages,
|
|
265
284
|
snkExporter: snkExporterMessages,
|
|
266
285
|
snkDataExporter: snkDataExporterMessages,
|
|
267
|
-
fileViewer: fileViewerMessages
|
|
286
|
+
fileViewer: fileViewerMessages,
|
|
287
|
+
snkFilterParamConfig: snkFilterParamConfigMessages
|
|
268
288
|
};
|
|
269
289
|
this._currentOperation = OperationMap.CLEAN;
|
|
270
290
|
this.loadAppMessages().then((msgs) => {
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var PresentationMode;
|
|
2
|
+
(function (PresentationMode) {
|
|
3
|
+
PresentationMode["PRIMARY"] = "primary";
|
|
4
|
+
PresentationMode["SECONDARY"] = "secondary";
|
|
5
|
+
})(PresentationMode || (PresentationMode = {}));
|
|
6
|
+
var DataExporterOption;
|
|
7
|
+
(function (DataExporterOption) {
|
|
8
|
+
DataExporterOption["EXPORT_TO_PDF"] = "exportToPDF";
|
|
9
|
+
DataExporterOption["EXPORT_TO_XLS"] = "exportToXLS";
|
|
10
|
+
DataExporterOption["EXPORT_CURRENT_PAGE"] = "exportCurrentPage";
|
|
11
|
+
DataExporterOption["EXPORT_PAGE_TO_PDF"] = "exportPageToPDF";
|
|
12
|
+
DataExporterOption["EXPORT_PAGE_TO_XLS"] = "exportPageToXLS";
|
|
13
|
+
DataExporterOption["EXPORT_BY_EMAIL"] = "exportToEmail";
|
|
14
|
+
DataExporterOption["EXPORT_PDF_TO_EMAIL"] = "exportPDFToEmail";
|
|
15
|
+
DataExporterOption["EXPORT_XLS_TO_EMAIL"] = "exportXLSToEmail";
|
|
16
|
+
})(DataExporterOption || (DataExporterOption = {}));
|
|
17
|
+
var DataExporterFormat;
|
|
18
|
+
(function (DataExporterFormat) {
|
|
19
|
+
DataExporterFormat["PDF"] = "exportPDFToEmail";
|
|
20
|
+
DataExporterFormat["XLS"] = "exportXLSToEmail";
|
|
21
|
+
DataExporterFormat["XLSX"] = "exportXLSToEmail";
|
|
22
|
+
})(DataExporterFormat || (DataExporterFormat = {}));
|
|
23
|
+
var DataExporterType;
|
|
24
|
+
(function (DataExporterType) {
|
|
25
|
+
DataExporterType["EXPORT_TO_PDF"] = "PDF";
|
|
26
|
+
DataExporterType["EXPORT_TO_XLS"] = "XLS";
|
|
27
|
+
DataExporterType["EXPORT_PAGE_TO_PDF"] = "PDF";
|
|
28
|
+
DataExporterType["EXPORT_PAGE_TO_XLS"] = "XLS";
|
|
29
|
+
DataExporterType["EXPORT_PDF_TO_EMAIL"] = "PDF";
|
|
30
|
+
DataExporterType["EXPORT_XLS_TO_EMAIL"] = "XLS";
|
|
31
|
+
})(DataExporterType || (DataExporterType = {}));
|
|
32
|
+
var FilterConfigType;
|
|
33
|
+
(function (FilterConfigType) {
|
|
34
|
+
FilterConfigType["SYSTEM_CONFIG"] = "S";
|
|
35
|
+
FilterConfigType["USER_CONFIG"] = "E";
|
|
36
|
+
})(FilterConfigType || (FilterConfigType = {}));
|
|
37
|
+
var FilterUserConfigTypes;
|
|
38
|
+
(function (FilterUserConfigTypes) {
|
|
39
|
+
FilterUserConfigTypes["DATE"] = "D";
|
|
40
|
+
FilterUserConfigTypes["TEXT"] = "S";
|
|
41
|
+
FilterUserConfigTypes["INTEGER"] = "I";
|
|
42
|
+
FilterUserConfigTypes["DECIMAL"] = "F";
|
|
43
|
+
})(FilterUserConfigTypes || (FilterUserConfigTypes = {}));
|
|
44
|
+
var FilterOperand;
|
|
45
|
+
(function (FilterOperand) {
|
|
46
|
+
FilterOperand["AND"] = "AND";
|
|
47
|
+
FilterOperand["OR"] = "OR";
|
|
48
|
+
FilterOperand["IN"] = "IN";
|
|
49
|
+
FilterOperand["DIFFERENT"] = "<>";
|
|
50
|
+
FilterOperand["LIKE"] = "LIKE";
|
|
51
|
+
FilterOperand["START_WITH"] = "LIKE_START";
|
|
52
|
+
FilterOperand["FINISHED_WITH"] = "LIKE_END";
|
|
53
|
+
FilterOperand["NULL"] = "NULL";
|
|
54
|
+
FilterOperand["NOT_NULL"] = "NOT NULL";
|
|
55
|
+
FilterOperand["EQUAL"] = "=";
|
|
56
|
+
FilterOperand["LARGER"] = ">";
|
|
57
|
+
FilterOperand["LARGER_EQUAL"] = ">=";
|
|
58
|
+
FilterOperand["SMALLER"] = "<";
|
|
59
|
+
FilterOperand["SMALLER_EQUAL"] = "<=";
|
|
60
|
+
})(FilterOperand || (FilterOperand = {}));
|
|
61
|
+
var FilterEntities;
|
|
62
|
+
(function (FilterEntities) {
|
|
63
|
+
FilterEntities["FIELD"] = "Campo";
|
|
64
|
+
FilterEntities["INSTANCE"] = "Instancia";
|
|
65
|
+
})(FilterEntities || (FilterEntities = {}));
|
|
66
|
+
|
|
67
|
+
export { DataExporterOption as D, FilterOperand as F, PresentationMode as P, FilterConfigType as a, FilterEntities as b, FilterUserConfigTypes as c, DataExporterFormat as d, DataExporterType as e };
|
package/dist/esm/loader.js
CHANGED
|
@@ -11,7 +11,7 @@ const patchEsm = () => {
|
|
|
11
11
|
const defineCustomElements = (win, options) => {
|
|
12
12
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
13
13
|
return patchEsm().then(() => {
|
|
14
|
-
return bootstrapLazy([["teste-pesquisa",[[1,"teste-pesquisa"]]],["snk-data-unit",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64],"getSelectedRecordsIDsInfo":[64]}]]],["snk-filter-binary-select",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-period",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"fix":[16],"unfix":[16],"show":[64]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-config-options",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"_defaultType":[32]}]]],["snk-tab-config",[[6,"snk-tab-config",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32],"_activeEditText":[32],"_activeEditTextIndex":[32],"_actionsHide":[32],"_actionsShow":[32]}]]],["snk-
|
|
14
|
+
return bootstrapLazy([["teste-pesquisa",[[1,"teste-pesquisa"]]],["snk-data-unit",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64],"getSelectedRecordsIDsInfo":[64]}]]],["snk-filter-binary-select",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-param-config",[[2,"snk-filter-param-config",{"_opened":[32],"_configType":[32],"_expressionItem":[32],"_informedInstance":[32],"_canSave":[32],"open":[64],"close":[64]}]]],["snk-filter-period",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"fix":[16],"unfix":[16],"show":[64]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-config-options",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"_defaultType":[32]}]]],["snk-tab-config",[[6,"snk-tab-config",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32],"_activeEditText":[32],"_activeEditTextIndex":[32],"_actionsHide":[32],"_actionsShow":[32]}]]],["snk-exporter-email-sender",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["snk-configurator_3",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"showConfig":[64],"hideConfig":[64],"setConfig":[64]}],[2,"snk-configurator",{"configName":[1,"config-name"],"viewMode":[1,"view-mode"],"_opened":[32],"_permissions":[32],"open":[64],"close":[64]}],[2,"snk-field-config",{"isConfigActive":[16],"fieldConfig":[16],"modeInsertion":[516,"mode-insertion"],"dataUnit":[16]}]]],["snk-form-config",[[2,"snk-form-config",{"dataUnit":[16],"formConfig":[16],"configName":[513,"config-name"],"_formConfigOptions":[32],"_fieldConfigSelected":[32],"_layoutFormConfig":[32],"_fieldsAvailable":[32],"_formConfig":[32],"_formConfigChanged":[32],"_optionFormConfigSelected":[32],"_optionFormConfigChanged":[32],"_tempGroups":[32]}]]],["snk-data-exporter_8",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32],"scrollerLocked":[32]},[[0,"filterChange","filterChangeListener"]]],[2,"snk-grid-config",{"selectedIndex":[1026,"selected-index"],"application":[16],"columns":[1040],"config":[1040],"saveConfig":[64]}],[6,"snk-taskbar",{"configName":[1,"config-name"],"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"presentationMode":[1537,"presentation-mode"],"_permissions":[32]}],[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]],[4,"snk-filter-list",{"label":[1],"iconName":[1,"icon-name"],"items":[16],"getMessage":[16],"emptyText":[1,"empty-text"],"findFilterText":[1,"find-filter-text"],"buttonClass":[1,"button-class"],"_filterArgument":[32],"_showAll":[32],"hideDetail":[64]},[[2,"keydown","keyDownHandler"]]],[0,"snk-filter-modal",{"getMessage":[16],"items":[1040],"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"infoText":[1,"info-text"],"useSearch":[4,"use-search"],"processModalAction":[16],"_filterArgument":[32]}],[1,"snk-select-box",{"selectedOption":[1,"selected-option"]}],[2,"snk-data-exporter",{"provider":[16],"_items":[32],"_showDropdown":[32],"_releasedToExport":[32]}]]],["snk-form",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"taskbarManager":[16],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32],"_showFormConfig":[32],"showConfig":[64],"hideConfig":[64]}]]],["snk-filter-detail",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-crud",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_viewMode":[32],"goToView":[64]}]]],["snk-application",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"webConnection":[64],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"getUserID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"fetchUserAvailableConfigs":[64],"fetchLegacyConfig":[64],"fetchDefaultConfig":[64],"loadTotals":[64],"saveGridConfig":[64],"getFilterBarConfig":[64],"saveFilterBarConfig":[64],"saveFormConfig":[64],"getDefaultValues":[64],"getDefaultValue":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64],"getAppLabel":[64]}]]]], options);
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
|
|
@@ -14,5 +14,5 @@ const patchBrowser = () => {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
patchBrowser().then(options => {
|
|
17
|
-
return bootstrapLazy([["teste-pesquisa",[[1,"teste-pesquisa"]]],["snk-data-unit",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64],"getSelectedRecordsIDsInfo":[64]}]]],["snk-filter-binary-select",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-period",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"fix":[16],"unfix":[16],"show":[64]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-config-options",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"_defaultType":[32]}]]],["snk-tab-config",[[6,"snk-tab-config",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32],"_activeEditText":[32],"_activeEditTextIndex":[32],"_actionsHide":[32],"_actionsShow":[32]}]]],["snk-
|
|
17
|
+
return bootstrapLazy([["teste-pesquisa",[[1,"teste-pesquisa"]]],["snk-data-unit",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64],"getSelectedRecordsIDsInfo":[64]}]]],["snk-filter-binary-select",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-param-config",[[2,"snk-filter-param-config",{"_opened":[32],"_configType":[32],"_expressionItem":[32],"_informedInstance":[32],"_canSave":[32],"open":[64],"close":[64]}]]],["snk-filter-period",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"fix":[16],"unfix":[16],"show":[64]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-config-options",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"_defaultType":[32]}]]],["snk-tab-config",[[6,"snk-tab-config",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32],"_activeEditText":[32],"_activeEditTextIndex":[32],"_actionsHide":[32],"_actionsShow":[32]}]]],["snk-exporter-email-sender",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["snk-configurator_3",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"showConfig":[64],"hideConfig":[64],"setConfig":[64]}],[2,"snk-configurator",{"configName":[1,"config-name"],"viewMode":[1,"view-mode"],"_opened":[32],"_permissions":[32],"open":[64],"close":[64]}],[2,"snk-field-config",{"isConfigActive":[16],"fieldConfig":[16],"modeInsertion":[516,"mode-insertion"],"dataUnit":[16]}]]],["snk-form-config",[[2,"snk-form-config",{"dataUnit":[16],"formConfig":[16],"configName":[513,"config-name"],"_formConfigOptions":[32],"_fieldConfigSelected":[32],"_layoutFormConfig":[32],"_fieldsAvailable":[32],"_formConfig":[32],"_formConfigChanged":[32],"_optionFormConfigSelected":[32],"_optionFormConfigChanged":[32],"_tempGroups":[32]}]]],["snk-data-exporter_8",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32],"scrollerLocked":[32]},[[0,"filterChange","filterChangeListener"]]],[2,"snk-grid-config",{"selectedIndex":[1026,"selected-index"],"application":[16],"columns":[1040],"config":[1040],"saveConfig":[64]}],[6,"snk-taskbar",{"configName":[1,"config-name"],"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"presentationMode":[1537,"presentation-mode"],"_permissions":[32]}],[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]],[4,"snk-filter-list",{"label":[1],"iconName":[1,"icon-name"],"items":[16],"getMessage":[16],"emptyText":[1,"empty-text"],"findFilterText":[1,"find-filter-text"],"buttonClass":[1,"button-class"],"_filterArgument":[32],"_showAll":[32],"hideDetail":[64]},[[2,"keydown","keyDownHandler"]]],[0,"snk-filter-modal",{"getMessage":[16],"items":[1040],"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"infoText":[1,"info-text"],"useSearch":[4,"use-search"],"processModalAction":[16],"_filterArgument":[32]}],[1,"snk-select-box",{"selectedOption":[1,"selected-option"]}],[2,"snk-data-exporter",{"provider":[16],"_items":[32],"_showDropdown":[32],"_releasedToExport":[32]}]]],["snk-form",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"taskbarManager":[16],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32],"_showFormConfig":[32],"showConfig":[64],"hideConfig":[64]}]]],["snk-filter-detail",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-crud",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_viewMode":[32],"goToView":[64]}]]],["snk-application",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"webConnection":[64],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"getUserID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"fetchUserAvailableConfigs":[64],"fetchLegacyConfig":[64],"fetchDefaultConfig":[64],"loadTotals":[64],"saveGridConfig":[64],"getFilterBarConfig":[64],"saveFilterBarConfig":[64],"saveFormConfig":[64],"getDefaultValues":[64],"getDefaultValue":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64],"getAppLabel":[64]}]]]], options);
|
|
18
18
|
});
|
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, g as getElement } from './i
|
|
|
2
2
|
import { WaitingChangeException, WarningException, ErrorException, ObjectUtils, DataType, DataUnit, StringUtils, ChangeOperation, DateUtils, DependencyType, ElementIDUtils, ApplicationContext, ErrorTracking } from '@sankhyalabs/core';
|
|
3
3
|
import { d as dist, D as DataFetcher, R as ResourceFetcher, U as UrlUtils, F as FormConfigFetcher, G as GridConfigFetcher, C as ConfigStorage } from './ConfigStorage-4654f57b.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-f0d50bd6.js';
|
|
6
6
|
import './_commonjsHelpers-9943807e.js';
|
|
7
7
|
|
|
8
8
|
class SnkErrorHandler {
|
|
@@ -119,19 +119,19 @@ class PesquisaFetcher {
|
|
|
119
119
|
})
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
|
+
const options = searchOptions != undefined
|
|
123
|
+
? {
|
|
124
|
+
"pkFieldName": searchOptions.codeFieldName,
|
|
125
|
+
"label": searchOptions.descriptionFieldName,
|
|
126
|
+
"fieldName": searchOptions.codeFieldName,
|
|
127
|
+
"useDescriptionOptions": false,
|
|
128
|
+
"enableRowsCounter": true
|
|
129
|
+
}
|
|
130
|
+
: undefined;
|
|
122
131
|
const reqBody = {
|
|
123
132
|
"serviceName": serviceName,
|
|
124
133
|
"requestBody": {
|
|
125
|
-
"criteria": {
|
|
126
|
-
"entityName": entityName,
|
|
127
|
-
"compacted": false,
|
|
128
|
-
"ignoreEntityCriteria": false,
|
|
129
|
-
"limit": this._defaultPageSize,
|
|
130
|
-
"query": { "$": argument },
|
|
131
|
-
"orderByDesc": false,
|
|
132
|
-
"externalCriteria": externalCriteria,
|
|
133
|
-
"localEntityName": searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.rootEntity
|
|
134
|
-
},
|
|
134
|
+
"criteria": Object.assign({ "entityName": entityName, "compacted": false, "ignoreEntityCriteria": false, "limit": this._defaultPageSize, "query": { "$": argument }, "orderByDesc": false, "externalCriteria": externalCriteria, "localEntityName": searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.rootEntity }, { options }),
|
|
135
135
|
"clientEventList": {
|
|
136
136
|
"clientEvent": []
|
|
137
137
|
}
|
|
@@ -4,7 +4,7 @@ import { c as VIEW_MODE, A as ACTION_CONFIG } from './constants-965d7a7f.js';
|
|
|
4
4
|
import { A as AuthorizationConfig } from './AuthorizationConfig-dcbd207a.js';
|
|
5
5
|
import { UserInterface } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
6
6
|
import { C as ConfigStorage } from './ConfigStorage-4654f57b.js';
|
|
7
|
-
import { P as PresentationMode } from './index-
|
|
7
|
+
import { P as PresentationMode } from './index-bd13bdcf.js';
|
|
8
8
|
import { T as TaskbarProcessor } from './taskbar-processor-c2a99aba.js';
|
|
9
9
|
import { s as store } from './index-e467ade5.js';
|
|
10
10
|
import './_commonjsHelpers-9943807e.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-cfd4bb13.js';
|
|
2
2
|
import { ElementIDUtils, ApplicationContext } from '@sankhyalabs/core';
|
|
3
3
|
import { c as VIEW_MODE } from './constants-965d7a7f.js';
|
|
4
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
|
5
|
-
import { P as PresentationMode } from './index-
|
|
4
|
+
import { T as TaskbarElement } from './taskbar-elements-8400dbe7.js';
|
|
5
|
+
import { P as PresentationMode } from './index-bd13bdcf.js';
|
|
6
6
|
import './index-e467ade5.js';
|
|
7
7
|
|
|
8
8
|
const snkCrudCss = ".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%}";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-cfd4bb13.js';
|
|
2
2
|
import { ObjectUtils, ApplicationContext, ElementIDUtils, DataType, StringUtils, ErrorException, FloatingManager, ArrayUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { ApplicationUtils, DialogType, CheckMode } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
|
-
import { D as DataExporterOption,
|
|
4
|
+
import { D as DataExporterOption, d as DataExporterFormat, e as DataExporterType, P as PresentationMode } from './index-bd13bdcf.js';
|
|
5
5
|
import { d as KEY_PORT_EXPORT, W as WEB_CONNECTION, R as REPORT_LAUNCHER_RESOURCE_ID, O as ORDER_VALUES } from './constants-965d7a7f.js';
|
|
6
6
|
import { D as DataFetcher, C as ConfigStorage } from './ConfigStorage-4654f57b.js';
|
|
7
7
|
import { EzScrollDirection } from '@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection';
|
|
@@ -10,7 +10,7 @@ import { ModalAction, ModalButtonStatus } from '@sankhyalabs/ezui/dist/collectio
|
|
|
10
10
|
import { toString } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
11
11
|
import { CheckMode as CheckMode$1 } from '@sankhyalabs/ezui/dist/collection/components/ez-check/CheckMode';
|
|
12
12
|
import { A as AuthorizationConfig } from './AuthorizationConfig-dcbd207a.js';
|
|
13
|
-
import { T as TaskbarElement, V as VisibleWhenForbidden, A as AuthorizationElements, b as buildElem, a as buildCustomButton } from './taskbar-elements-
|
|
13
|
+
import { T as TaskbarElement, V as VisibleWhenForbidden, A as AuthorizationElements, b as buildElem, a as buildCustomButton } from './taskbar-elements-8400dbe7.js';
|
|
14
14
|
import './_commonjsHelpers-9943807e.js';
|
|
15
15
|
import './index-e467ade5.js';
|
|
16
16
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-cfd4bb13.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-f0d50bd6.js';
|
|
5
5
|
|
|
6
6
|
const snkDataUnitCss = ".sc-snk-data-unit-h{display:flex;flex-direction:column;height:100%}";
|
|
7
7
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { h, r as registerInstance, g as getElement } from './index-cfd4bb13.js';
|
|
2
2
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
+
import { ModalAction } from '@sankhyalabs/ezui/dist/collection/components/ez-modal-container';
|
|
3
4
|
|
|
4
5
|
const EmailInfoStep = ({ getMessage, changeInfo, data }) => {
|
|
5
6
|
const { format, email } = data || {};
|
|
@@ -116,8 +117,8 @@ const SnkExporterEmailSender = class {
|
|
|
116
117
|
}
|
|
117
118
|
render() {
|
|
118
119
|
ElementIDUtils.addIDInfoIfNotExists(this._element, 'snkExporterEmailSender');
|
|
119
|
-
return (h("ez-popup", { useHeader: false, size: "x-small", heightMode: "auto", opened: this._opened }, h("ez-modal-container", { onEzModalAction: evt => {
|
|
120
|
-
if (evt.detail ===
|
|
120
|
+
return (h("ez-popup", { useHeader: false, size: "x-small", heightMode: "auto", opened: this._opened }, h("ez-modal-container", { onEzModalAction: (evt) => {
|
|
121
|
+
if (evt.detail === ModalAction.CLOSE)
|
|
121
122
|
this.close();
|
|
122
123
|
}, modalTitle: this.getMessage("snkExporter.emailSenderTitle"), modalSubTitle: this.getStepMessage("subTitle") }, h("ez-view-stack", { ref: ref => this._viewStack = ref }, h("stack-item", null, h(OptionsStep, { getMessage: this.getMessage, data: this._config, changeInfo: (field, value) => this.updateConfigInfo(field, value) })), h("stack-item", null, h(EmailInfoStep, { getMessage: this.getMessage, data: this._config, changeInfo: (field, value) => this.updateEmailInfo(field, value) }))), h("div", { class: "ez-col ez-col--sd-12 ez-flex--justify-end ez-margin-vertical--small" }, h("ez-button", Object.assign({ class: "ez-button--tertiary ez-padding-right--medium", label: this.getStepMessage("firstButton"), onClick: () => this.executeButtonAction(true), enabled: this.checkButtonEnabled(true) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("firstButton")}` })), h("ez-button", Object.assign({ class: this.getSecondButtonClass(), label: this.getStepMessage("secondButton"), onClick: () => this.executeButtonAction(false), enabled: this.checkButtonEnabled(false) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("secondButton")}` }))))));
|
|
123
124
|
}
|