@sankhyalabs/sankhyablocks 5.16.0 → 5.18.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/ParamType-90b440a0.js +13 -0
- package/dist/cjs/{SnkMessageBuilder-cf80308c.js → SnkMessageBuilder-3b5b5614.js} +30 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button.cjs.entry.js +704 -0
- package/dist/cjs/snk-actions-form.cjs.entry.js +200 -0
- package/dist/cjs/snk-application.cjs.entry.js +1 -1
- package/dist/cjs/snk-attach.cjs.entry.js +1 -1
- package/dist/cjs/snk-client-confirm.cjs.entry.js +52 -0
- package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
- package/dist/cjs/snk-crud.cjs.entry.js +1 -1
- package/dist/cjs/snk-data-exporter.cjs.entry.js +2 -2
- package/dist/cjs/{snk-data-unit-bd271acd.js → snk-data-unit-e9c20097.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +4 -4
- package/dist/cjs/snk-grid.cjs.entry.js +4 -4
- package/dist/cjs/{snk-guides-viewer-0ab3746e.js → snk-guides-viewer-c8843478.js} +2 -2
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +3 -3
- package/dist/cjs/snk-simple-bar_2.cjs.entry.js +2 -2
- package/dist/cjs/snk-taskbar.cjs.entry.js +1 -1
- package/dist/cjs/{taskbar-elements-bc2598f9.js → taskbar-elements-3be287d6.js} +3 -0
- package/dist/cjs/{taskbar-processor-e1e3bbf7.js → taskbar-processor-02f0fc84.js} +1 -1
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/snk-actions-button/actions/enum/ActionsType.js +8 -0
- package/dist/collection/components/snk-actions-button/actions/enum/ParamType.js +11 -0
- package/dist/collection/components/snk-actions-button/actions/enum/RefreshType.js +7 -0
- package/dist/collection/components/snk-actions-button/actions/executor/java.executor.js +22 -0
- package/dist/collection/components/snk-actions-button/actions/executor/javascript.executor.js +20 -0
- package/dist/collection/components/snk-actions-button/actions/executor/launch-screen.executor.js +42 -0
- package/dist/collection/components/snk-actions-button/actions/executor/procedure.executor.js +26 -0
- package/dist/collection/components/snk-actions-button/actions/factory/executor.factory.js +26 -0
- package/dist/collection/components/snk-actions-button/actions/index.js +343 -0
- package/dist/collection/components/snk-actions-button/actions/interfaces/IAction.js +7 -0
- package/dist/collection/components/snk-actions-button/actions/interfaces/IExecSource.js +1 -0
- package/dist/collection/components/snk-actions-button/actions/interfaces/IExecuteActions.js +1 -0
- package/dist/collection/components/snk-actions-button/actions/interfaces/IExecuteActionsProps.js +1 -0
- package/dist/collection/components/snk-actions-button/actions/interfaces/IResultParam.js +1 -0
- package/dist/collection/components/snk-actions-button/clientEvent/index.js +87 -0
- package/dist/collection/components/snk-actions-button/clientEvent/interfaces/IClientEventConfirm.js +1 -0
- package/dist/collection/components/snk-actions-button/snk-actions-button.css +38 -0
- package/dist/collection/components/snk-actions-button/snk-actions-button.js +139 -0
- package/dist/collection/components/snk-actions-button/subcomponents/snk-actions-form.js +263 -0
- package/dist/collection/components/snk-actions-button/subcomponents/snk-client-confirm.js +134 -0
- package/dist/collection/components/snk-configurator/snk-configurator.css +1 -1
- package/dist/collection/components/snk-grid/snk-grid.js +2 -2
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +3 -0
- package/dist/collection/lib/message/SnkMessageBuilder.js +3 -1
- package/dist/collection/lib/message/resources/snk-actions-button.msg.js +27 -0
- package/dist/components/ParamType.js +13 -0
- package/dist/components/SnkMessageBuilder.js +30 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +3 -0
- package/dist/components/snk-actions-button.d.ts +11 -0
- package/dist/components/snk-actions-button.js +6 -0
- package/dist/components/snk-actions-button2.js +718 -0
- package/dist/components/snk-actions-form.d.ts +11 -0
- package/dist/components/snk-actions-form.js +218 -0
- package/dist/components/snk-attach2.js +7 -1
- package/dist/components/snk-client-confirm.d.ts +11 -0
- package/dist/components/snk-client-confirm.js +71 -0
- package/dist/components/snk-configurator2.js +1 -1
- package/dist/components/snk-crud.js +7 -1
- package/dist/components/snk-detail-view2.js +13 -2
- package/dist/components/snk-grid2.js +9 -3
- package/dist/components/snk-simple-crud2.js +7 -1
- package/dist/components/snk-taskbar2.js +10 -1
- package/dist/esm/ParamType-d5152b06.js +13 -0
- package/dist/esm/{SnkMessageBuilder-1a169545.js → SnkMessageBuilder-188a38bb.js} +30 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button.entry.js +700 -0
- package/dist/esm/snk-actions-form.entry.js +196 -0
- package/dist/esm/snk-application.entry.js +1 -1
- package/dist/esm/snk-attach.entry.js +1 -1
- package/dist/esm/snk-client-confirm.entry.js +48 -0
- package/dist/esm/snk-configurator.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +1 -1
- package/dist/esm/snk-data-exporter.entry.js +2 -2
- package/dist/esm/{snk-data-unit-476024e9.js → snk-data-unit-79b1583a.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +4 -4
- package/dist/esm/snk-grid.entry.js +4 -4
- package/dist/esm/{snk-guides-viewer-767f5a74.js → snk-guides-viewer-59d3a78c.js} +2 -2
- package/dist/esm/snk-guides-viewer.entry.js +3 -3
- package/dist/esm/snk-simple-bar_2.entry.js +2 -2
- package/dist/esm/snk-taskbar.entry.js +1 -1
- package/dist/esm/{taskbar-elements-e6af3e93.js → taskbar-elements-8ff33c26.js} +3 -0
- package/dist/esm/{taskbar-processor-a40798b8.js → taskbar-processor-20de6616.js} +1 -1
- package/dist/sankhyablocks/{p-3e17b147.js → p-0b40c655.js} +1 -1
- package/dist/sankhyablocks/{p-de9caf1e.entry.js → p-0b6ddb67.entry.js} +1 -1
- package/dist/sankhyablocks/p-19692f92.js +1 -0
- package/dist/sankhyablocks/{p-6df8c88b.entry.js → p-257c71a7.entry.js} +1 -1
- package/dist/sankhyablocks/{p-551165d8.js → p-28c12f65.js} +1 -1
- package/dist/sankhyablocks/{p-78de64fb.entry.js → p-2d0fc912.entry.js} +1 -1
- package/dist/sankhyablocks/p-384c4a6b.js +1 -0
- package/dist/sankhyablocks/{p-f43629f3.entry.js → p-44c2ed16.entry.js} +1 -1
- package/dist/sankhyablocks/{p-4f05a335.entry.js → p-44cf545f.entry.js} +1 -1
- package/dist/sankhyablocks/{p-ec1c64be.entry.js → p-8ce9ea9f.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e0c04667.entry.js → p-9c7f7214.entry.js} +1 -1
- package/dist/sankhyablocks/p-9f66bc54.entry.js +1 -0
- package/dist/sankhyablocks/{p-c74fca58.js → p-b34d23fa.js} +1 -1
- package/dist/sankhyablocks/p-b680fa7a.entry.js +1 -0
- package/dist/sankhyablocks/p-b75ce8b8.entry.js +1 -0
- package/dist/sankhyablocks/{p-9e92ed74.entry.js → p-cbe93a18.entry.js} +2 -2
- package/dist/sankhyablocks/p-eaad0aa8.js +1 -0
- package/dist/sankhyablocks/{p-7956b9dd.entry.js → p-eb07d0eb.entry.js} +1 -1
- package/dist/sankhyablocks/p-f27dc5e9.entry.js +1 -0
- package/dist/sankhyablocks/p-fa2d0376.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-actions-button/actions/enum/ActionsType.d.ts +7 -0
- package/dist/types/components/snk-actions-button/actions/enum/ParamType.d.ts +10 -0
- package/dist/types/components/snk-actions-button/actions/enum/RefreshType.d.ts +6 -0
- package/dist/types/components/snk-actions-button/actions/executor/java.executor.d.ts +6 -0
- package/dist/types/components/snk-actions-button/actions/executor/javascript.executor.d.ts +6 -0
- package/dist/types/components/snk-actions-button/actions/executor/launch-screen.executor.d.ts +10 -0
- package/dist/types/components/snk-actions-button/actions/executor/procedure.executor.d.ts +6 -0
- package/dist/types/components/snk-actions-button/actions/factory/executor.factory.d.ts +7 -0
- package/dist/types/components/snk-actions-button/actions/index.d.ts +27 -0
- package/dist/types/components/snk-actions-button/actions/interfaces/IAction.d.ts +55 -0
- package/dist/types/components/snk-actions-button/actions/interfaces/IExecSource.d.ts +17 -0
- package/dist/types/components/snk-actions-button/actions/interfaces/IExecuteActions.d.ts +4 -0
- package/dist/types/components/snk-actions-button/actions/interfaces/IExecuteActionsProps.d.ts +4 -0
- package/dist/types/components/snk-actions-button/actions/interfaces/IResultParam.d.ts +14 -0
- package/dist/types/components/snk-actions-button/clientEvent/index.d.ts +4 -0
- package/dist/types/components/snk-actions-button/clientEvent/interfaces/IClientEventConfirm.d.ts +35 -0
- package/dist/types/components/snk-actions-button/snk-actions-button.d.ts +27 -0
- package/dist/types/components/snk-actions-button/subcomponents/snk-actions-form.d.ts +41 -0
- package/dist/types/components/snk-actions-button/subcomponents/snk-client-confirm.d.ts +31 -0
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +2 -1
- package/dist/types/components.d.ts +96 -0
- package/dist/types/lib/message/resources/snk-actions-button.msg.d.ts +1 -0
- package/package.json +1 -1
- package/react/components.d.ts +3 -0
- package/react/components.js +3 -0
- package/react/components.js.map +1 -1
- package/dist/sankhyablocks/p-1c5d5e5c.entry.js +0 -1
- package/dist/sankhyablocks/p-39082fc3.js +0 -1
- package/dist/sankhyablocks/p-8d40909d.entry.js +0 -1
- package/dist/sankhyablocks/p-d410f45a.js +0 -1
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
2
|
+
|
3
|
+
interface SnkActionsForm extends Components.SnkActionsForm, HTMLElement {}
|
4
|
+
export const SnkActionsForm: {
|
5
|
+
prototype: SnkActionsForm;
|
6
|
+
new (): SnkActionsForm;
|
7
|
+
};
|
8
|
+
/**
|
9
|
+
* Used to define this component and all nested components recursively.
|
10
|
+
*/
|
11
|
+
export const defineCustomElement: () => void;
|
@@ -0,0 +1,218 @@
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
2
|
+
import { DataUnit, UserInterface, DataType, ApplicationContext } from '@sankhyalabs/core';
|
3
|
+
import { P as ParamType } from './ParamType.js';
|
4
|
+
|
5
|
+
const SnkActionsForm$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
6
|
+
constructor() {
|
7
|
+
super();
|
8
|
+
this.__registerHost();
|
9
|
+
this.APPLY = 'OK';
|
10
|
+
this.CANCEL = 'CANCEL';
|
11
|
+
this.CLOSE = 'CLOSE';
|
12
|
+
this.action = undefined;
|
13
|
+
this.applyParameters = undefined;
|
14
|
+
this.dataUnit = new DataUnit();
|
15
|
+
}
|
16
|
+
/**
|
17
|
+
* Responsável por abrir a popup.
|
18
|
+
*/
|
19
|
+
async openPopup() {
|
20
|
+
this._ezPopup.opened = true;
|
21
|
+
}
|
22
|
+
;
|
23
|
+
exitPopup() {
|
24
|
+
this._ezPopup.opened = false;
|
25
|
+
}
|
26
|
+
async handleApply() {
|
27
|
+
try {
|
28
|
+
await this._ezForm.validate();
|
29
|
+
let row = this.dataUnit.getSelectedRecord();
|
30
|
+
if (row) {
|
31
|
+
this._params.forEach((param, index) => {
|
32
|
+
if (row.hasOwnProperty(param.name)) {
|
33
|
+
if (param.paramType == ParamType.ENTITY) {
|
34
|
+
let searchValue = row[param.name];
|
35
|
+
if (!searchValue) {
|
36
|
+
param.value = null;
|
37
|
+
return;
|
38
|
+
}
|
39
|
+
param.value = typeof searchValue === 'object' ? searchValue.value : searchValue;
|
40
|
+
return;
|
41
|
+
}
|
42
|
+
this._params[index].value = row[param.name];
|
43
|
+
}
|
44
|
+
else {
|
45
|
+
this._params[index].value = undefined;
|
46
|
+
}
|
47
|
+
});
|
48
|
+
this.action.actionConfig.params.promptParam = this._params;
|
49
|
+
}
|
50
|
+
this.exitPopup();
|
51
|
+
this.applyParameters(this.action);
|
52
|
+
}
|
53
|
+
catch (e) {
|
54
|
+
// exceção ignorada, quando o validate() falha.
|
55
|
+
}
|
56
|
+
}
|
57
|
+
searchLoader(evt, param) {
|
58
|
+
const options = {
|
59
|
+
entity: param.entityName,
|
60
|
+
entityDescription: param.label
|
61
|
+
};
|
62
|
+
return this._application.executePreparedSearch(evt.mode, evt.argument, options);
|
63
|
+
}
|
64
|
+
;
|
65
|
+
getUserInterface(paramType) {
|
66
|
+
switch (paramType) {
|
67
|
+
case ParamType.TEXT:
|
68
|
+
return UserInterface.SHORTTEXT;
|
69
|
+
case ParamType.INTEGER:
|
70
|
+
return UserInterface.INTEGERNUMBER;
|
71
|
+
case ParamType.DECIMAL:
|
72
|
+
return UserInterface.DECIMALNUMBER;
|
73
|
+
case ParamType.DATE:
|
74
|
+
return UserInterface.DATE;
|
75
|
+
case ParamType.DATETIME:
|
76
|
+
return UserInterface.DATETIME;
|
77
|
+
case ParamType.BOOLEAN:
|
78
|
+
return UserInterface.CHECKBOX;
|
79
|
+
case ParamType.ENTITY:
|
80
|
+
return UserInterface.SEARCH;
|
81
|
+
case ParamType.OPTIONS:
|
82
|
+
return UserInterface.OPTIONSELECTOR;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
getDataType(paramType) {
|
86
|
+
switch (paramType) {
|
87
|
+
case ParamType.TEXT:
|
88
|
+
case ParamType.OPTIONS:
|
89
|
+
return DataType.TEXT;
|
90
|
+
case ParamType.INTEGER:
|
91
|
+
case ParamType.DECIMAL:
|
92
|
+
return DataType.NUMBER;
|
93
|
+
case ParamType.DATE:
|
94
|
+
case ParamType.DATETIME:
|
95
|
+
return DataType.DATE;
|
96
|
+
case ParamType.BOOLEAN:
|
97
|
+
return DataType.BOOLEAN;
|
98
|
+
case ParamType.ENTITY:
|
99
|
+
return DataType.OBJECT;
|
100
|
+
}
|
101
|
+
}
|
102
|
+
getProps(param) {
|
103
|
+
switch (param.paramType) {
|
104
|
+
case ParamType.DECIMAL:
|
105
|
+
return param.precision ? { precision: Number(param.precision) } : undefined;
|
106
|
+
case ParamType.ENTITY:
|
107
|
+
return { ENTITYNAME: param.entityName };
|
108
|
+
case ParamType.OPTIONS:
|
109
|
+
return { options: this.prepareOptions(param.options) };
|
110
|
+
default:
|
111
|
+
return undefined;
|
112
|
+
}
|
113
|
+
}
|
114
|
+
buildFields() {
|
115
|
+
let fields = [];
|
116
|
+
this._params.forEach((param, index) => {
|
117
|
+
const hasName = !!param.name;
|
118
|
+
let paramName = hasName ? param.name : `param_${index}`;
|
119
|
+
fields.push({
|
120
|
+
name: paramName,
|
121
|
+
label: param.label,
|
122
|
+
dataType: this.getDataType(param.paramType),
|
123
|
+
userInterface: this.getUserInterface(param.paramType),
|
124
|
+
readOnly: false,
|
125
|
+
required: param.paramType == 'B' ? false : param.required === "true",
|
126
|
+
properties: this.getProps(param)
|
127
|
+
});
|
128
|
+
this._params[index].name = paramName;
|
129
|
+
this._params[index].isGeneratedName = !hasName;
|
130
|
+
});
|
131
|
+
const metadata = {
|
132
|
+
name: 'params',
|
133
|
+
label: 'params',
|
134
|
+
fields: fields
|
135
|
+
};
|
136
|
+
this._metadata = metadata;
|
137
|
+
}
|
138
|
+
fillFields() {
|
139
|
+
this._params.forEach((param) => {
|
140
|
+
if (param.saveLast == 'true') {
|
141
|
+
this.dataUnit.setFieldValue(param.name, param.value);
|
142
|
+
}
|
143
|
+
});
|
144
|
+
}
|
145
|
+
prepareOptions(options) {
|
146
|
+
const optionsArray = options.split(";");
|
147
|
+
let optionsList = optionsArray.map(function (opc, index) {
|
148
|
+
let value;
|
149
|
+
let label;
|
150
|
+
if (opc.indexOf('=') > -1) {
|
151
|
+
let opcArr = opc.split('=');
|
152
|
+
value = opcArr[0];
|
153
|
+
label = opcArr[1];
|
154
|
+
}
|
155
|
+
else {
|
156
|
+
value = (index + 1).toString();
|
157
|
+
label = opc;
|
158
|
+
}
|
159
|
+
return {
|
160
|
+
value: value,
|
161
|
+
label: label
|
162
|
+
};
|
163
|
+
});
|
164
|
+
return optionsList;
|
165
|
+
}
|
166
|
+
componentWillLoad() {
|
167
|
+
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
168
|
+
this._params = [...this.action.actionConfig.params.promptParam];
|
169
|
+
this.dataUnit.metadataLoader = this.metadataLoader.bind(this);
|
170
|
+
this.dataUnit.loadMetadata().then(() => {
|
171
|
+
this.fillFields();
|
172
|
+
});
|
173
|
+
this.dataUnit.addRecord();
|
174
|
+
}
|
175
|
+
async metadataLoader() {
|
176
|
+
return new Promise((resolve) => {
|
177
|
+
this.buildFields();
|
178
|
+
resolve(this._metadata);
|
179
|
+
});
|
180
|
+
}
|
181
|
+
handleModalAction(evt) {
|
182
|
+
switch (evt) {
|
183
|
+
case this.APPLY:
|
184
|
+
this.handleApply();
|
185
|
+
break;
|
186
|
+
case this.CANCEL:
|
187
|
+
case this.CLOSE:
|
188
|
+
this.exitPopup();
|
189
|
+
break;
|
190
|
+
}
|
191
|
+
}
|
192
|
+
render() {
|
193
|
+
return (h("ez-popup", { size: "medium", heightMode: "auto", useHeader: false, ref: (ref) => this._ezPopup = ref }, h("ez-modal-container", { modalTitle: this._application.messagesBuilder.getMessage("snkActionsButton.form.fillParams", undefined), okButtonLabel: this._application.messagesBuilder.getMessage("snkActionsButton.buttons.apply", undefined), cancelButtonLabel: this._application.messagesBuilder.getMessage("snkActionsButton.buttons.cancel", undefined), onEzModalAction: (evt) => this.handleModalAction(evt.detail) }, h("div", { class: "ez-margin-vertical--medium" }, h("ez-form", { ref: (ref) => this._ezForm = ref, dataUnit: this.dataUnit })))));
|
194
|
+
}
|
195
|
+
}, [2, "snk-actions-form", {
|
196
|
+
"action": [16],
|
197
|
+
"applyParameters": [16],
|
198
|
+
"dataUnit": [32],
|
199
|
+
"openPopup": [64]
|
200
|
+
}]);
|
201
|
+
function defineCustomElement$1() {
|
202
|
+
if (typeof customElements === "undefined") {
|
203
|
+
return;
|
204
|
+
}
|
205
|
+
const components = ["snk-actions-form"];
|
206
|
+
components.forEach(tagName => { switch (tagName) {
|
207
|
+
case "snk-actions-form":
|
208
|
+
if (!customElements.get(tagName)) {
|
209
|
+
customElements.define(tagName, SnkActionsForm$1);
|
210
|
+
}
|
211
|
+
break;
|
212
|
+
} });
|
213
|
+
}
|
214
|
+
|
215
|
+
const SnkActionsForm = SnkActionsForm$1;
|
216
|
+
const defineCustomElement = defineCustomElement$1;
|
217
|
+
|
218
|
+
export { SnkActionsForm, defineCustomElement };
|
@@ -4,6 +4,7 @@ import { D as DataFetcher } from './DataFetcher.js';
|
|
4
4
|
import { V as VIEW_MODE } from './constants.js';
|
5
5
|
import { D as DataUnitFetcher } from './dataunit-fetcher.js';
|
6
6
|
import { T as TaskbarElement, d as defineCustomElement$1 } from './snk-taskbar2.js';
|
7
|
+
import { d as defineCustomElement$7 } from './snk-actions-button2.js';
|
7
8
|
import { d as defineCustomElement$6 } from './snk-data-exporter2.js';
|
8
9
|
import { d as defineCustomElement$5 } from './snk-data-unit2.js';
|
9
10
|
import { d as defineCustomElement$4 } from './snk-exporter-email-sender2.js';
|
@@ -455,13 +456,18 @@ function defineCustomElement() {
|
|
455
456
|
if (typeof customElements === "undefined") {
|
456
457
|
return;
|
457
458
|
}
|
458
|
-
const components = ["snk-attach", "snk-data-exporter", "snk-data-unit", "snk-exporter-email-sender", "snk-simple-bar", "snk-simple-crud", "snk-taskbar"];
|
459
|
+
const components = ["snk-attach", "snk-actions-button", "snk-data-exporter", "snk-data-unit", "snk-exporter-email-sender", "snk-simple-bar", "snk-simple-crud", "snk-taskbar"];
|
459
460
|
components.forEach(tagName => { switch (tagName) {
|
460
461
|
case "snk-attach":
|
461
462
|
if (!customElements.get(tagName)) {
|
462
463
|
customElements.define(tagName, SnkAttach);
|
463
464
|
}
|
464
465
|
break;
|
466
|
+
case "snk-actions-button":
|
467
|
+
if (!customElements.get(tagName)) {
|
468
|
+
defineCustomElement$7();
|
469
|
+
}
|
470
|
+
break;
|
465
471
|
case "snk-data-exporter":
|
466
472
|
if (!customElements.get(tagName)) {
|
467
473
|
defineCustomElement$6();
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
2
|
+
|
3
|
+
interface SnkClientConfirm extends Components.SnkClientConfirm, HTMLElement {}
|
4
|
+
export const SnkClientConfirm: {
|
5
|
+
prototype: SnkClientConfirm;
|
6
|
+
new (): SnkClientConfirm;
|
7
|
+
};
|
8
|
+
/**
|
9
|
+
* Used to define this component and all nested components recursively.
|
10
|
+
*/
|
11
|
+
export const defineCustomElement: () => void;
|
@@ -0,0 +1,71 @@
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
2
|
+
import { ApplicationContext } from '@sankhyalabs/core';
|
3
|
+
|
4
|
+
const SnkActionsForm = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
5
|
+
constructor() {
|
6
|
+
super();
|
7
|
+
this.__registerHost();
|
8
|
+
this.APLICAR = 'OK';
|
9
|
+
this.CANCELAR = 'CANCEL';
|
10
|
+
this.FECHAR = 'CLOSE';
|
11
|
+
this.titleMessage = undefined;
|
12
|
+
this.message = undefined;
|
13
|
+
this.accept = undefined;
|
14
|
+
this.cancel = undefined;
|
15
|
+
}
|
16
|
+
/**
|
17
|
+
* Responsável por abrir a popup.
|
18
|
+
*/
|
19
|
+
async openPopup() {
|
20
|
+
this._ezPopup.opened = true;
|
21
|
+
}
|
22
|
+
;
|
23
|
+
exitPopup() {
|
24
|
+
this._ezPopup.opened = false;
|
25
|
+
}
|
26
|
+
handleModalAction(evt) {
|
27
|
+
switch (evt) {
|
28
|
+
case this.APLICAR:
|
29
|
+
this.exitPopup();
|
30
|
+
this.accept();
|
31
|
+
break;
|
32
|
+
case this.CANCELAR:
|
33
|
+
this.exitPopup();
|
34
|
+
this.cancel();
|
35
|
+
break;
|
36
|
+
case this.FECHAR:
|
37
|
+
this.exitPopup();
|
38
|
+
break;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
componentWillLoad() {
|
42
|
+
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
43
|
+
}
|
44
|
+
render() {
|
45
|
+
return (h("ez-popup", { size: "small", heightMode: "auto", useHeader: false, ref: (ref) => this._ezPopup = ref }, h("ez-modal-container", { modalTitle: this.titleMessage, okButtonLabel: this._application.messagesBuilder.getMessage("snkActionsButton.buttons.yes", undefined), cancelButtonLabel: this._application.messagesBuilder.getMessage("snkActionsButton.buttons.no", undefined), onEzModalAction: (evt) => this.handleModalAction(evt.detail) }, h("div", { class: "ez-margin-bottom--large ez-flex ez-flex--column" }, h("label", { class: "ez-text ez-text--large ez-text--primary" }, this.message), h("label", { class: "ez-text ez-text--large ez-text--primary" }, h("br", null), this._application.messagesBuilder.getMessage("snkActionsButton.clientEvent.cancelMessage", undefined))))));
|
46
|
+
}
|
47
|
+
}, [2, "snk-client-confirm", {
|
48
|
+
"titleMessage": [1, "title-message"],
|
49
|
+
"message": [1],
|
50
|
+
"accept": [16],
|
51
|
+
"cancel": [16],
|
52
|
+
"openPopup": [64]
|
53
|
+
}]);
|
54
|
+
function defineCustomElement$1() {
|
55
|
+
if (typeof customElements === "undefined") {
|
56
|
+
return;
|
57
|
+
}
|
58
|
+
const components = ["snk-client-confirm"];
|
59
|
+
components.forEach(tagName => { switch (tagName) {
|
60
|
+
case "snk-client-confirm":
|
61
|
+
if (!customElements.get(tagName)) {
|
62
|
+
customElements.define(tagName, SnkActionsForm);
|
63
|
+
}
|
64
|
+
break;
|
65
|
+
} });
|
66
|
+
}
|
67
|
+
|
68
|
+
const SnkClientConfirm = SnkActionsForm;
|
69
|
+
const defineCustomElement = defineCustomElement$1;
|
70
|
+
|
71
|
+
export { SnkClientConfirm, defineCustomElement };
|
@@ -3,7 +3,7 @@ import { ApplicationContext } from '@sankhyalabs/core';
|
|
3
3
|
import { A as AuthorizationConfig } from './AuthorizationConfig.js';
|
4
4
|
import { V as VIEW_MODE } from './constants.js';
|
5
5
|
|
6
|
-
const snkConfiguratorCss = ".sc-snk-configurator-h{--snk-configurator__button-close--padding-left:var(--space--medium, 12px);--snk-configurator__title--color:var(--title--primary, #2B3A54);--snk-configurator__title--font-family:var(--font-pattern, \"Roboto\");--snk-configurator__title--font-size:var(--title--large, 20px);--snk-configurator__title--font-weight:var(--text-weight--extra-large, 700);--snk-configurator__subtitle--color:var(--title--primary, #2B3A54);--snk-configurator__subtitle--font-family:var(--font-pattern, \"Roboto\");--snk-configurator__subtitle--font-size:var(--text--medium, 14px);--snk-configurator__subtitle--font-weight:var(--text-weight--large, 600);--snk-configurator__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-configurator__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-configurator__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-configurator__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-configurator__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-configurator__scrollbar--width:var(--space--medium, 12px)}.snk-configurator.sc-snk-configurator{display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}.snk-configurator__collsable-box-action.sc-snk-configurator{width:100%}.snk-configurator__action-buttons.sc-snk-configurator{display:flex;flex-direction:row;justify-content:flex-end;gap:var(--space--medium)}.snk-configurator__outline.sc-snk-configurator{display:flex;flex-direction:
|
6
|
+
const snkConfiguratorCss = ".sc-snk-configurator-h{--snk-configurator__button-close--padding-left:var(--space--medium, 12px);--snk-configurator__title--color:var(--title--primary, #2B3A54);--snk-configurator__title--font-family:var(--font-pattern, \"Roboto\");--snk-configurator__title--font-size:var(--title--large, 20px);--snk-configurator__title--font-weight:var(--text-weight--extra-large, 700);--snk-configurator__subtitle--color:var(--title--primary, #2B3A54);--snk-configurator__subtitle--font-family:var(--font-pattern, \"Roboto\");--snk-configurator__subtitle--font-size:var(--text--medium, 14px);--snk-configurator__subtitle--font-weight:var(--text-weight--large, 600);--snk-configurator__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-configurator__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-configurator__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-configurator__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-configurator__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-configurator__scrollbar--width:var(--space--medium, 12px)}.snk-configurator.sc-snk-configurator{display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}.snk-configurator__collsable-box-action.sc-snk-configurator{width:100%}.snk-configurator__action-buttons.sc-snk-configurator{display:flex;flex-direction:row;justify-content:flex-end;gap:var(--space--medium)}.snk-configurator__outline.sc-snk-configurator{display:flex;flex-direction:column;gap:var(--space--small);margin-top:var(--space--small);margin-bottom:var(--space--large)}@media screen and (min-width: 480px){.snk-configurator.sc-snk-configurator{width:359px;max-width:359px}}.snk-configurator__button-config.sc-snk-configurator{--ez-button--min-width:100%}.snk-configurator__header.sc-snk-configurator{display:flex;justify-content:space-between;align-items:center;width:100%}.snk-configurator__title.sc-snk-configurator{display:flex;margin:0;line-height:normal;letter-spacing:0em;text-align:left;color:var(--snk-configurator__title--color);font-size:var(--snk-configurator__title--font-size);font-family:var(--snk-configurator__title--font-family);font-weight:var(--snk-configurator__title--font-weight)}.snk-configurator__subtitle.sc-snk-configurator{display:flex;margin:0;padding-top:var(--space--medium);padding-bottom:var(--space--small);color:var(--snk-configurator__subtitle--color);font-size:var(--snk-configurator__subtitle--font-size);font-family:var(--snk-configurator__subtitle--font-family);font-weight:var(--snk-configurator__subtitle--font-weight)}.snk-configurator__button-close.sc-snk-configurator{padding-left:var(--snk-configurator__button-close--padding-left)}.snk-configurator__main.sc-snk-configurator{overflow-y:auto;scrollbar-width:thin;margin:var(--space--medium) 0;scrollbar-color:var(--snk-configurator__scrollbar--color-clicked) var(--snk-configurator__scrollbar--color-background)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar{background-color:var(--snk-configurator__scrollbar--color-background);width:var(--snk-configurator__scrollbar--width);max-width:var(--snk-configurator__scrollbar--width);min-width:var(--snk-configurator__scrollbar--width)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-track{background-color:var(--snk-configurator__scrollbar--color-background);border-radius:var(--snk-configurator__scrollbar--border-radius)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb{background-color:var(--snk-configurator__scrollbar--color-default);border-radius:var(--snk-configurator__scrollbar--border-radius)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:vertical:hover,.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-configurator__scrollbar--color-hover)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:vertical:active,.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-configurator__scrollbar--color-clicked)}";
|
7
7
|
|
8
8
|
const SnkConfigurator = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
9
9
|
constructor() {
|
@@ -5,6 +5,7 @@ import './DataFetcher.js';
|
|
5
5
|
import './pesquisa-fetcher.js';
|
6
6
|
import { P as PresentationMode } from './index2.js';
|
7
7
|
import { V as VIEW_MODE } from './constants.js';
|
8
|
+
import { d as defineCustomElement$o } from './snk-actions-button2.js';
|
8
9
|
import { d as defineCustomElement$n } from './snk-attach2.js';
|
9
10
|
import { d as defineCustomElement$m } from './snk-config-options2.js';
|
10
11
|
import { d as defineCustomElement$l } from './snk-configurator2.js';
|
@@ -208,13 +209,18 @@ function defineCustomElement$1() {
|
|
208
209
|
if (typeof customElements === "undefined") {
|
209
210
|
return;
|
210
211
|
}
|
211
|
-
const components = ["snk-crud", "snk-attach", "snk-config-options", "snk-configurator", "snk-data-exporter", "snk-data-unit", "snk-detail-view", "snk-exporter-email-sender", "snk-field-config", "snk-filter-bar", "snk-filter-detail", "snk-filter-item", "snk-form-config", "snk-form-summary", "snk-form-view", "snk-grid", "snk-grid-config", "snk-guides-viewer", "snk-select-box", "snk-simple-bar", "snk-simple-crud", "snk-tab-config", "snk-taskbar"];
|
212
|
+
const components = ["snk-crud", "snk-actions-button", "snk-attach", "snk-config-options", "snk-configurator", "snk-data-exporter", "snk-data-unit", "snk-detail-view", "snk-exporter-email-sender", "snk-field-config", "snk-filter-bar", "snk-filter-detail", "snk-filter-item", "snk-form-config", "snk-form-summary", "snk-form-view", "snk-grid", "snk-grid-config", "snk-guides-viewer", "snk-select-box", "snk-simple-bar", "snk-simple-crud", "snk-tab-config", "snk-taskbar"];
|
212
213
|
components.forEach(tagName => { switch (tagName) {
|
213
214
|
case "snk-crud":
|
214
215
|
if (!customElements.get(tagName)) {
|
215
216
|
customElements.define(tagName, SnkCrud$1);
|
216
217
|
}
|
217
218
|
break;
|
219
|
+
case "snk-actions-button":
|
220
|
+
if (!customElements.get(tagName)) {
|
221
|
+
defineCustomElement$o();
|
222
|
+
}
|
223
|
+
break;
|
218
224
|
case "snk-attach":
|
219
225
|
if (!customElements.get(tagName)) {
|
220
226
|
defineCustomElement$n();
|
@@ -8,6 +8,7 @@ import { P as PresentationMode } from './index2.js';
|
|
8
8
|
import { T as TaskbarElement, d as defineCustomElement$2 } from './snk-taskbar2.js';
|
9
9
|
import { V as VIEW_MODE } from './constants.js';
|
10
10
|
import { T as TaskbarProcessor } from './taskbar-processor.js';
|
11
|
+
import { d as defineCustomElement$m } from './snk-actions-button2.js';
|
11
12
|
import { d as defineCustomElement$l } from './snk-attach2.js';
|
12
13
|
import { d as defineCustomElement$k } from './snk-config-options2.js';
|
13
14
|
import { d as defineCustomElement$j } from './snk-configurator2.js';
|
@@ -362,13 +363,18 @@ function defineCustomElement$1() {
|
|
362
363
|
if (typeof customElements === "undefined") {
|
363
364
|
return;
|
364
365
|
}
|
365
|
-
const components = ["snk-guides-viewer", "snk-attach", "snk-config-options", "snk-configurator", "snk-data-exporter", "snk-data-unit", "snk-detail-view", "snk-exporter-email-sender", "snk-field-config", "snk-filter-bar", "snk-filter-detail", "snk-filter-item", "snk-form-config", "snk-form-summary", "snk-form-view", "snk-grid", "snk-grid-config", "snk-select-box", "snk-simple-bar", "snk-simple-crud", "snk-tab-config", "snk-taskbar"];
|
366
|
+
const components = ["snk-guides-viewer", "snk-actions-button", "snk-attach", "snk-config-options", "snk-configurator", "snk-data-exporter", "snk-data-unit", "snk-detail-view", "snk-exporter-email-sender", "snk-field-config", "snk-filter-bar", "snk-filter-detail", "snk-filter-item", "snk-form-config", "snk-form-summary", "snk-form-view", "snk-grid", "snk-grid-config", "snk-select-box", "snk-simple-bar", "snk-simple-crud", "snk-tab-config", "snk-taskbar"];
|
366
367
|
components.forEach(tagName => { switch (tagName) {
|
367
368
|
case "snk-guides-viewer":
|
368
369
|
if (!customElements.get(tagName)) {
|
369
370
|
customElements.define(tagName, SnkGuidesViewer);
|
370
371
|
}
|
371
372
|
break;
|
373
|
+
case "snk-actions-button":
|
374
|
+
if (!customElements.get(tagName)) {
|
375
|
+
defineCustomElement$m();
|
376
|
+
}
|
377
|
+
break;
|
372
378
|
case "snk-attach":
|
373
379
|
if (!customElements.get(tagName)) {
|
374
380
|
defineCustomElement$l();
|
@@ -736,13 +742,18 @@ function defineCustomElement() {
|
|
736
742
|
if (typeof customElements === "undefined") {
|
737
743
|
return;
|
738
744
|
}
|
739
|
-
const components = ["snk-detail-view", "snk-attach", "snk-data-exporter", "snk-data-unit", "snk-exporter-email-sender", "snk-filter-bar", "snk-filter-detail", "snk-filter-item", "snk-form-summary", "snk-form-view", "snk-grid", "snk-grid-config", "snk-select-box", "snk-simple-bar", "snk-simple-crud", "snk-taskbar"];
|
745
|
+
const components = ["snk-detail-view", "snk-actions-button", "snk-attach", "snk-data-exporter", "snk-data-unit", "snk-exporter-email-sender", "snk-filter-bar", "snk-filter-detail", "snk-filter-item", "snk-form-summary", "snk-form-view", "snk-grid", "snk-grid-config", "snk-select-box", "snk-simple-bar", "snk-simple-crud", "snk-taskbar"];
|
740
746
|
components.forEach(tagName => { switch (tagName) {
|
741
747
|
case "snk-detail-view":
|
742
748
|
if (!customElements.get(tagName)) {
|
743
749
|
customElements.define(tagName, SnkDetailView);
|
744
750
|
}
|
745
751
|
break;
|
752
|
+
case "snk-actions-button":
|
753
|
+
if (!customElements.get(tagName)) {
|
754
|
+
defineCustomElement$m();
|
755
|
+
}
|
756
|
+
break;
|
746
757
|
case "snk-attach":
|
747
758
|
if (!customElements.get(tagName)) {
|
748
759
|
defineCustomElement$l();
|
@@ -6,6 +6,7 @@ import { C as ConfigStorage } from './ConfigStorage.js';
|
|
6
6
|
import { P as PresentationMode } from './index2.js';
|
7
7
|
import { T as TaskbarProcessor } from './taskbar-processor.js';
|
8
8
|
import { s as store } from './index3.js';
|
9
|
+
import { d as defineCustomElement$9 } from './snk-actions-button2.js';
|
9
10
|
import { d as defineCustomElement$8 } from './snk-data-exporter2.js';
|
10
11
|
import { d as defineCustomElement$7 } from './snk-exporter-email-sender2.js';
|
11
12
|
import { d as defineCustomElement$6 } from './snk-filter-bar2.js';
|
@@ -29,8 +30,8 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
29
30
|
"snkGridTopTaskbar.finish_edition.secondary": []
|
30
31
|
});
|
31
32
|
this._headerTaskbarProcessor = new TaskbarProcessor({
|
32
|
-
"snkGridHeaderTaskbar.unselected": ["REFRESH", "DATA_EXPORTER"],
|
33
|
-
"snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "ATTACH", "REFRESH", "DATA_EXPORTER"],
|
33
|
+
"snkGridHeaderTaskbar.unselected": ["REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON"],
|
34
|
+
"snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "ATTACH", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON"],
|
34
35
|
"snkGridHeaderTaskbar.detail.unselected": ["REFRESH"],
|
35
36
|
"snkGridHeaderTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH"]
|
36
37
|
});
|
@@ -320,13 +321,18 @@ function defineCustomElement() {
|
|
320
321
|
if (typeof customElements === "undefined") {
|
321
322
|
return;
|
322
323
|
}
|
323
|
-
const components = ["snk-grid", "snk-data-exporter", "snk-exporter-email-sender", "snk-filter-bar", "snk-filter-detail", "snk-filter-item", "snk-grid-config", "snk-select-box", "snk-taskbar"];
|
324
|
+
const components = ["snk-grid", "snk-actions-button", "snk-data-exporter", "snk-exporter-email-sender", "snk-filter-bar", "snk-filter-detail", "snk-filter-item", "snk-grid-config", "snk-select-box", "snk-taskbar"];
|
324
325
|
components.forEach(tagName => { switch (tagName) {
|
325
326
|
case "snk-grid":
|
326
327
|
if (!customElements.get(tagName)) {
|
327
328
|
customElements.define(tagName, SnkGrid);
|
328
329
|
}
|
329
330
|
break;
|
331
|
+
case "snk-actions-button":
|
332
|
+
if (!customElements.get(tagName)) {
|
333
|
+
defineCustomElement$9();
|
334
|
+
}
|
335
|
+
break;
|
330
336
|
case "snk-data-exporter":
|
331
337
|
if (!customElements.get(tagName)) {
|
332
338
|
defineCustomElement$8();
|
@@ -6,6 +6,7 @@ import './DataFetcher.js';
|
|
6
6
|
import './pesquisa-fetcher.js';
|
7
7
|
import { P as PresentationMode } from './index2.js';
|
8
8
|
import { T as TaskbarProcessor } from './taskbar-processor.js';
|
9
|
+
import { d as defineCustomElement$5 } from './snk-actions-button2.js';
|
9
10
|
import { d as defineCustomElement$4 } from './snk-data-exporter2.js';
|
10
11
|
import { d as defineCustomElement$3 } from './snk-data-unit2.js';
|
11
12
|
import { d as defineCustomElement$2 } from './snk-exporter-email-sender2.js';
|
@@ -306,13 +307,18 @@ function defineCustomElement() {
|
|
306
307
|
if (typeof customElements === "undefined") {
|
307
308
|
return;
|
308
309
|
}
|
309
|
-
const components = ["snk-simple-crud", "snk-data-exporter", "snk-data-unit", "snk-exporter-email-sender", "snk-taskbar"];
|
310
|
+
const components = ["snk-simple-crud", "snk-actions-button", "snk-data-exporter", "snk-data-unit", "snk-exporter-email-sender", "snk-taskbar"];
|
310
311
|
components.forEach(tagName => { switch (tagName) {
|
311
312
|
case "snk-simple-crud":
|
312
313
|
if (!customElements.get(tagName)) {
|
313
314
|
customElements.define(tagName, SnkSimpleCrud);
|
314
315
|
}
|
315
316
|
break;
|
317
|
+
case "snk-actions-button":
|
318
|
+
if (!customElements.get(tagName)) {
|
319
|
+
defineCustomElement$5();
|
320
|
+
}
|
321
|
+
break;
|
316
322
|
case "snk-data-exporter":
|
317
323
|
if (!customElements.get(tagName)) {
|
318
324
|
defineCustomElement$4();
|
@@ -3,6 +3,7 @@ import { StringUtils, ApplicationContext, ElementIDUtils } from '@sankhyalabs/co
|
|
3
3
|
import { A as AuthorizationConfig } from './AuthorizationConfig.js';
|
4
4
|
import { P as PresentationMode } from './index2.js';
|
5
5
|
import { s as store } from './index3.js';
|
6
|
+
import { d as defineCustomElement$3 } from './snk-actions-button2.js';
|
6
7
|
import { d as defineCustomElement$2 } from './snk-data-exporter2.js';
|
7
8
|
import { d as defineCustomElement$1 } from './snk-exporter-email-sender2.js';
|
8
9
|
|
@@ -24,6 +25,7 @@ var TaskbarElement;
|
|
24
25
|
TaskbarElement["CONFIGURATOR"] = "CONFIGURATOR";
|
25
26
|
TaskbarElement["DATA_EXPORTER"] = "DATA_EXPORTER";
|
26
27
|
TaskbarElement["ATTACH"] = "ATTACH";
|
28
|
+
TaskbarElement["ACTIONS_BUTTON"] = "ACTIONS_BUTTON";
|
27
29
|
})(TaskbarElement || (TaskbarElement = {}));
|
28
30
|
var AuthorizationElements;
|
29
31
|
(function (AuthorizationElements) {
|
@@ -98,6 +100,8 @@ const buildElem = (element, className, dataElementId, getTitle, action, isEnable
|
|
98
100
|
return h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId });
|
99
101
|
case TaskbarElement.ATTACH:
|
100
102
|
return iconButton("anexo", element, className, dataElementId, title, action, isEnabled);
|
103
|
+
case TaskbarElement.ACTIONS_BUTTON:
|
104
|
+
return h("snk-actions-button", { "data-element-id": dataElementId });
|
101
105
|
}
|
102
106
|
};
|
103
107
|
function textButton(name, className, dataElementId, text, title, action, isEnabled) {
|
@@ -340,13 +344,18 @@ function defineCustomElement() {
|
|
340
344
|
if (typeof customElements === "undefined") {
|
341
345
|
return;
|
342
346
|
}
|
343
|
-
const components = ["snk-taskbar", "snk-data-exporter", "snk-exporter-email-sender"];
|
347
|
+
const components = ["snk-taskbar", "snk-actions-button", "snk-data-exporter", "snk-exporter-email-sender"];
|
344
348
|
components.forEach(tagName => { switch (tagName) {
|
345
349
|
case "snk-taskbar":
|
346
350
|
if (!customElements.get(tagName)) {
|
347
351
|
customElements.define(tagName, SnkTaskbar);
|
348
352
|
}
|
349
353
|
break;
|
354
|
+
case "snk-actions-button":
|
355
|
+
if (!customElements.get(tagName)) {
|
356
|
+
defineCustomElement$3();
|
357
|
+
}
|
358
|
+
break;
|
350
359
|
case "snk-data-exporter":
|
351
360
|
if (!customElements.get(tagName)) {
|
352
361
|
defineCustomElement$2();
|
@@ -0,0 +1,13 @@
|
|
1
|
+
var ParamType;
|
2
|
+
(function (ParamType) {
|
3
|
+
ParamType["TEXT"] = "S";
|
4
|
+
ParamType["INTEGER"] = "I";
|
5
|
+
ParamType["DECIMAL"] = "D";
|
6
|
+
ParamType["DATE"] = "DT";
|
7
|
+
ParamType["DATETIME"] = "DH";
|
8
|
+
ParamType["BOOLEAN"] = "B";
|
9
|
+
ParamType["ENTITY"] = "ENTITY";
|
10
|
+
ParamType["OPTIONS"] = "SO";
|
11
|
+
})(ParamType || (ParamType = {}));
|
12
|
+
|
13
|
+
export { ParamType as P };
|
@@ -342,6 +342,34 @@ const snkEntityListMessages = {
|
|
342
342
|
selected: "Selecionados:"
|
343
343
|
};
|
344
344
|
|
345
|
+
const snkActionsButtonMessages = {
|
346
|
+
title: {
|
347
|
+
actions: "Ações",
|
348
|
+
error: "Erro",
|
349
|
+
warning: "Aviso"
|
350
|
+
},
|
351
|
+
action: {
|
352
|
+
incorrectAction: "A ação \"{{description}}\" não pode ser executada porque ela não foi salva corretamente.",
|
353
|
+
emptyParamName: "<b>Regra Personalizada:</b><br/><br/>É necessário informar o atributo 'paramName'",
|
354
|
+
nonExistentType: "Tipo de ação não implementada: {{this.actionType}}"
|
355
|
+
},
|
356
|
+
launchScreen: {
|
357
|
+
emptyField: "A ação \"{{description}}\" não pôde ser executada porque o campo \"{{localFieldLabel}}\" está vazio."
|
358
|
+
},
|
359
|
+
form: {
|
360
|
+
fillParams: "Informe os parâmetros"
|
361
|
+
},
|
362
|
+
clientEvent: {
|
363
|
+
cancelMessage: "Caso queira cancelar, feche esta mensagem."
|
364
|
+
},
|
365
|
+
buttons: {
|
366
|
+
apply: "Aplicar",
|
367
|
+
cancel: "Cancelar",
|
368
|
+
yes: "Sim",
|
369
|
+
no: "Não"
|
370
|
+
}
|
371
|
+
};
|
372
|
+
|
345
373
|
class SnkMessageBuilder {
|
346
374
|
constructor(domainName) {
|
347
375
|
this._defaults = {
|
@@ -365,7 +393,8 @@ class SnkMessageBuilder {
|
|
365
393
|
snkSimpleBar: snkSimpleBarMessages,
|
366
394
|
snkAttach: snkAttachMessages,
|
367
395
|
snkPersonalizedFilter: snkPersonalizedFilterMessages,
|
368
|
-
snkEntityList: snkEntityListMessages
|
396
|
+
snkEntityList: snkEntityListMessages,
|
397
|
+
snkActionsButton: snkActionsButtonMessages
|
369
398
|
};
|
370
399
|
this._currentOperation = OperationMap.CLEAN;
|
371
400
|
this._domainName = domainName;
|