@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.
Files changed (139) hide show
  1. package/dist/cjs/ParamType-90b440a0.js +13 -0
  2. package/dist/cjs/{SnkMessageBuilder-cf80308c.js → SnkMessageBuilder-3b5b5614.js} +30 -1
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  5. package/dist/cjs/snk-actions-button.cjs.entry.js +704 -0
  6. package/dist/cjs/snk-actions-form.cjs.entry.js +200 -0
  7. package/dist/cjs/snk-application.cjs.entry.js +1 -1
  8. package/dist/cjs/snk-attach.cjs.entry.js +1 -1
  9. package/dist/cjs/snk-client-confirm.cjs.entry.js +52 -0
  10. package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
  11. package/dist/cjs/snk-crud.cjs.entry.js +1 -1
  12. package/dist/cjs/snk-data-exporter.cjs.entry.js +2 -2
  13. package/dist/cjs/{snk-data-unit-bd271acd.js → snk-data-unit-e9c20097.js} +1 -1
  14. package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
  15. package/dist/cjs/snk-detail-view.cjs.entry.js +4 -4
  16. package/dist/cjs/snk-grid.cjs.entry.js +4 -4
  17. package/dist/cjs/{snk-guides-viewer-0ab3746e.js → snk-guides-viewer-c8843478.js} +2 -2
  18. package/dist/cjs/snk-guides-viewer.cjs.entry.js +3 -3
  19. package/dist/cjs/snk-simple-bar_2.cjs.entry.js +2 -2
  20. package/dist/cjs/snk-taskbar.cjs.entry.js +1 -1
  21. package/dist/cjs/{taskbar-elements-bc2598f9.js → taskbar-elements-3be287d6.js} +3 -0
  22. package/dist/cjs/{taskbar-processor-e1e3bbf7.js → taskbar-processor-02f0fc84.js} +1 -1
  23. package/dist/collection/collection-manifest.json +3 -0
  24. package/dist/collection/components/snk-actions-button/actions/enum/ActionsType.js +8 -0
  25. package/dist/collection/components/snk-actions-button/actions/enum/ParamType.js +11 -0
  26. package/dist/collection/components/snk-actions-button/actions/enum/RefreshType.js +7 -0
  27. package/dist/collection/components/snk-actions-button/actions/executor/java.executor.js +22 -0
  28. package/dist/collection/components/snk-actions-button/actions/executor/javascript.executor.js +20 -0
  29. package/dist/collection/components/snk-actions-button/actions/executor/launch-screen.executor.js +42 -0
  30. package/dist/collection/components/snk-actions-button/actions/executor/procedure.executor.js +26 -0
  31. package/dist/collection/components/snk-actions-button/actions/factory/executor.factory.js +26 -0
  32. package/dist/collection/components/snk-actions-button/actions/index.js +343 -0
  33. package/dist/collection/components/snk-actions-button/actions/interfaces/IAction.js +7 -0
  34. package/dist/collection/components/snk-actions-button/actions/interfaces/IExecSource.js +1 -0
  35. package/dist/collection/components/snk-actions-button/actions/interfaces/IExecuteActions.js +1 -0
  36. package/dist/collection/components/snk-actions-button/actions/interfaces/IExecuteActionsProps.js +1 -0
  37. package/dist/collection/components/snk-actions-button/actions/interfaces/IResultParam.js +1 -0
  38. package/dist/collection/components/snk-actions-button/clientEvent/index.js +87 -0
  39. package/dist/collection/components/snk-actions-button/clientEvent/interfaces/IClientEventConfirm.js +1 -0
  40. package/dist/collection/components/snk-actions-button/snk-actions-button.css +38 -0
  41. package/dist/collection/components/snk-actions-button/snk-actions-button.js +139 -0
  42. package/dist/collection/components/snk-actions-button/subcomponents/snk-actions-form.js +263 -0
  43. package/dist/collection/components/snk-actions-button/subcomponents/snk-client-confirm.js +134 -0
  44. package/dist/collection/components/snk-configurator/snk-configurator.css +1 -1
  45. package/dist/collection/components/snk-grid/snk-grid.js +2 -2
  46. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +3 -0
  47. package/dist/collection/lib/message/SnkMessageBuilder.js +3 -1
  48. package/dist/collection/lib/message/resources/snk-actions-button.msg.js +27 -0
  49. package/dist/components/ParamType.js +13 -0
  50. package/dist/components/SnkMessageBuilder.js +30 -1
  51. package/dist/components/index.d.ts +3 -0
  52. package/dist/components/index.js +3 -0
  53. package/dist/components/snk-actions-button.d.ts +11 -0
  54. package/dist/components/snk-actions-button.js +6 -0
  55. package/dist/components/snk-actions-button2.js +718 -0
  56. package/dist/components/snk-actions-form.d.ts +11 -0
  57. package/dist/components/snk-actions-form.js +218 -0
  58. package/dist/components/snk-attach2.js +7 -1
  59. package/dist/components/snk-client-confirm.d.ts +11 -0
  60. package/dist/components/snk-client-confirm.js +71 -0
  61. package/dist/components/snk-configurator2.js +1 -1
  62. package/dist/components/snk-crud.js +7 -1
  63. package/dist/components/snk-detail-view2.js +13 -2
  64. package/dist/components/snk-grid2.js +9 -3
  65. package/dist/components/snk-simple-crud2.js +7 -1
  66. package/dist/components/snk-taskbar2.js +10 -1
  67. package/dist/esm/ParamType-d5152b06.js +13 -0
  68. package/dist/esm/{SnkMessageBuilder-1a169545.js → SnkMessageBuilder-188a38bb.js} +30 -1
  69. package/dist/esm/loader.js +1 -1
  70. package/dist/esm/sankhyablocks.js +1 -1
  71. package/dist/esm/snk-actions-button.entry.js +700 -0
  72. package/dist/esm/snk-actions-form.entry.js +196 -0
  73. package/dist/esm/snk-application.entry.js +1 -1
  74. package/dist/esm/snk-attach.entry.js +1 -1
  75. package/dist/esm/snk-client-confirm.entry.js +48 -0
  76. package/dist/esm/snk-configurator.entry.js +1 -1
  77. package/dist/esm/snk-crud.entry.js +1 -1
  78. package/dist/esm/snk-data-exporter.entry.js +2 -2
  79. package/dist/esm/{snk-data-unit-476024e9.js → snk-data-unit-79b1583a.js} +1 -1
  80. package/dist/esm/snk-data-unit.entry.js +2 -2
  81. package/dist/esm/snk-detail-view.entry.js +4 -4
  82. package/dist/esm/snk-grid.entry.js +4 -4
  83. package/dist/esm/{snk-guides-viewer-767f5a74.js → snk-guides-viewer-59d3a78c.js} +2 -2
  84. package/dist/esm/snk-guides-viewer.entry.js +3 -3
  85. package/dist/esm/snk-simple-bar_2.entry.js +2 -2
  86. package/dist/esm/snk-taskbar.entry.js +1 -1
  87. package/dist/esm/{taskbar-elements-e6af3e93.js → taskbar-elements-8ff33c26.js} +3 -0
  88. package/dist/esm/{taskbar-processor-a40798b8.js → taskbar-processor-20de6616.js} +1 -1
  89. package/dist/sankhyablocks/{p-3e17b147.js → p-0b40c655.js} +1 -1
  90. package/dist/sankhyablocks/{p-de9caf1e.entry.js → p-0b6ddb67.entry.js} +1 -1
  91. package/dist/sankhyablocks/p-19692f92.js +1 -0
  92. package/dist/sankhyablocks/{p-6df8c88b.entry.js → p-257c71a7.entry.js} +1 -1
  93. package/dist/sankhyablocks/{p-551165d8.js → p-28c12f65.js} +1 -1
  94. package/dist/sankhyablocks/{p-78de64fb.entry.js → p-2d0fc912.entry.js} +1 -1
  95. package/dist/sankhyablocks/p-384c4a6b.js +1 -0
  96. package/dist/sankhyablocks/{p-f43629f3.entry.js → p-44c2ed16.entry.js} +1 -1
  97. package/dist/sankhyablocks/{p-4f05a335.entry.js → p-44cf545f.entry.js} +1 -1
  98. package/dist/sankhyablocks/{p-ec1c64be.entry.js → p-8ce9ea9f.entry.js} +1 -1
  99. package/dist/sankhyablocks/{p-e0c04667.entry.js → p-9c7f7214.entry.js} +1 -1
  100. package/dist/sankhyablocks/p-9f66bc54.entry.js +1 -0
  101. package/dist/sankhyablocks/{p-c74fca58.js → p-b34d23fa.js} +1 -1
  102. package/dist/sankhyablocks/p-b680fa7a.entry.js +1 -0
  103. package/dist/sankhyablocks/p-b75ce8b8.entry.js +1 -0
  104. package/dist/sankhyablocks/{p-9e92ed74.entry.js → p-cbe93a18.entry.js} +2 -2
  105. package/dist/sankhyablocks/p-eaad0aa8.js +1 -0
  106. package/dist/sankhyablocks/{p-7956b9dd.entry.js → p-eb07d0eb.entry.js} +1 -1
  107. package/dist/sankhyablocks/p-f27dc5e9.entry.js +1 -0
  108. package/dist/sankhyablocks/p-fa2d0376.entry.js +1 -0
  109. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  110. package/dist/types/components/snk-actions-button/actions/enum/ActionsType.d.ts +7 -0
  111. package/dist/types/components/snk-actions-button/actions/enum/ParamType.d.ts +10 -0
  112. package/dist/types/components/snk-actions-button/actions/enum/RefreshType.d.ts +6 -0
  113. package/dist/types/components/snk-actions-button/actions/executor/java.executor.d.ts +6 -0
  114. package/dist/types/components/snk-actions-button/actions/executor/javascript.executor.d.ts +6 -0
  115. package/dist/types/components/snk-actions-button/actions/executor/launch-screen.executor.d.ts +10 -0
  116. package/dist/types/components/snk-actions-button/actions/executor/procedure.executor.d.ts +6 -0
  117. package/dist/types/components/snk-actions-button/actions/factory/executor.factory.d.ts +7 -0
  118. package/dist/types/components/snk-actions-button/actions/index.d.ts +27 -0
  119. package/dist/types/components/snk-actions-button/actions/interfaces/IAction.d.ts +55 -0
  120. package/dist/types/components/snk-actions-button/actions/interfaces/IExecSource.d.ts +17 -0
  121. package/dist/types/components/snk-actions-button/actions/interfaces/IExecuteActions.d.ts +4 -0
  122. package/dist/types/components/snk-actions-button/actions/interfaces/IExecuteActionsProps.d.ts +4 -0
  123. package/dist/types/components/snk-actions-button/actions/interfaces/IResultParam.d.ts +14 -0
  124. package/dist/types/components/snk-actions-button/clientEvent/index.d.ts +4 -0
  125. package/dist/types/components/snk-actions-button/clientEvent/interfaces/IClientEventConfirm.d.ts +35 -0
  126. package/dist/types/components/snk-actions-button/snk-actions-button.d.ts +27 -0
  127. package/dist/types/components/snk-actions-button/subcomponents/snk-actions-form.d.ts +41 -0
  128. package/dist/types/components/snk-actions-button/subcomponents/snk-client-confirm.d.ts +31 -0
  129. package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +2 -1
  130. package/dist/types/components.d.ts +96 -0
  131. package/dist/types/lib/message/resources/snk-actions-button.msg.d.ts +1 -0
  132. package/package.json +1 -1
  133. package/react/components.d.ts +3 -0
  134. package/react/components.js +3 -0
  135. package/react/components.js.map +1 -1
  136. package/dist/sankhyablocks/p-1c5d5e5c.entry.js +0 -1
  137. package/dist/sankhyablocks/p-39082fc3.js +0 -1
  138. package/dist/sankhyablocks/p-8d40909d.entry.js +0 -1
  139. package/dist/sankhyablocks/p-d410f45a.js +0 -1
@@ -0,0 +1,263 @@
1
+ import { ApplicationContext, DataType, DataUnit, UserInterface } from '@sankhyalabs/core';
2
+ import { h } from '@stencil/core';
3
+ import { ParamType } from '../actions/enum/ParamType';
4
+ export class SnkActionsForm {
5
+ constructor() {
6
+ this.APPLY = 'OK';
7
+ this.CANCEL = 'CANCEL';
8
+ this.CLOSE = 'CLOSE';
9
+ this.action = undefined;
10
+ this.applyParameters = undefined;
11
+ this.dataUnit = new DataUnit();
12
+ }
13
+ /**
14
+ * Responsável por abrir a popup.
15
+ */
16
+ async openPopup() {
17
+ this._ezPopup.opened = true;
18
+ }
19
+ ;
20
+ exitPopup() {
21
+ this._ezPopup.opened = false;
22
+ }
23
+ async handleApply() {
24
+ try {
25
+ await this._ezForm.validate();
26
+ let row = this.dataUnit.getSelectedRecord();
27
+ if (row) {
28
+ this._params.forEach((param, index) => {
29
+ if (row.hasOwnProperty(param.name)) {
30
+ if (param.paramType == ParamType.ENTITY) {
31
+ let searchValue = row[param.name];
32
+ if (!searchValue) {
33
+ param.value = null;
34
+ return;
35
+ }
36
+ param.value = typeof searchValue === 'object' ? searchValue.value : searchValue;
37
+ return;
38
+ }
39
+ this._params[index].value = row[param.name];
40
+ }
41
+ else {
42
+ this._params[index].value = undefined;
43
+ }
44
+ });
45
+ this.action.actionConfig.params.promptParam = this._params;
46
+ }
47
+ this.exitPopup();
48
+ this.applyParameters(this.action);
49
+ }
50
+ catch (e) {
51
+ // exceção ignorada, quando o validate() falha.
52
+ }
53
+ }
54
+ searchLoader(evt, param) {
55
+ const options = {
56
+ entity: param.entityName,
57
+ entityDescription: param.label
58
+ };
59
+ return this._application.executePreparedSearch(evt.mode, evt.argument, options);
60
+ }
61
+ ;
62
+ getUserInterface(paramType) {
63
+ switch (paramType) {
64
+ case ParamType.TEXT:
65
+ return UserInterface.SHORTTEXT;
66
+ case ParamType.INTEGER:
67
+ return UserInterface.INTEGERNUMBER;
68
+ case ParamType.DECIMAL:
69
+ return UserInterface.DECIMALNUMBER;
70
+ case ParamType.DATE:
71
+ return UserInterface.DATE;
72
+ case ParamType.DATETIME:
73
+ return UserInterface.DATETIME;
74
+ case ParamType.BOOLEAN:
75
+ return UserInterface.CHECKBOX;
76
+ case ParamType.ENTITY:
77
+ return UserInterface.SEARCH;
78
+ case ParamType.OPTIONS:
79
+ return UserInterface.OPTIONSELECTOR;
80
+ }
81
+ }
82
+ getDataType(paramType) {
83
+ switch (paramType) {
84
+ case ParamType.TEXT:
85
+ case ParamType.OPTIONS:
86
+ return DataType.TEXT;
87
+ case ParamType.INTEGER:
88
+ case ParamType.DECIMAL:
89
+ return DataType.NUMBER;
90
+ case ParamType.DATE:
91
+ case ParamType.DATETIME:
92
+ return DataType.DATE;
93
+ case ParamType.BOOLEAN:
94
+ return DataType.BOOLEAN;
95
+ case ParamType.ENTITY:
96
+ return DataType.OBJECT;
97
+ }
98
+ }
99
+ getProps(param) {
100
+ switch (param.paramType) {
101
+ case ParamType.DECIMAL:
102
+ return param.precision ? { precision: Number(param.precision) } : undefined;
103
+ case ParamType.ENTITY:
104
+ return { ENTITYNAME: param.entityName };
105
+ case ParamType.OPTIONS:
106
+ return { options: this.prepareOptions(param.options) };
107
+ default:
108
+ return undefined;
109
+ }
110
+ }
111
+ buildFields() {
112
+ let fields = [];
113
+ this._params.forEach((param, index) => {
114
+ const hasName = !!param.name;
115
+ let paramName = hasName ? param.name : `param_${index}`;
116
+ fields.push({
117
+ name: paramName,
118
+ label: param.label,
119
+ dataType: this.getDataType(param.paramType),
120
+ userInterface: this.getUserInterface(param.paramType),
121
+ readOnly: false,
122
+ required: param.paramType == 'B' ? false : param.required === "true",
123
+ properties: this.getProps(param)
124
+ });
125
+ this._params[index].name = paramName;
126
+ this._params[index].isGeneratedName = !hasName;
127
+ });
128
+ const metadata = {
129
+ name: 'params',
130
+ label: 'params',
131
+ fields: fields
132
+ };
133
+ this._metadata = metadata;
134
+ }
135
+ fillFields() {
136
+ this._params.forEach((param) => {
137
+ if (param.saveLast == 'true') {
138
+ this.dataUnit.setFieldValue(param.name, param.value);
139
+ }
140
+ });
141
+ }
142
+ prepareOptions(options) {
143
+ const optionsArray = options.split(";");
144
+ let optionsList = optionsArray.map(function (opc, index) {
145
+ let value;
146
+ let label;
147
+ if (opc.indexOf('=') > -1) {
148
+ let opcArr = opc.split('=');
149
+ value = opcArr[0];
150
+ label = opcArr[1];
151
+ }
152
+ else {
153
+ value = (index + 1).toString();
154
+ label = opc;
155
+ }
156
+ return {
157
+ value: value,
158
+ label: label
159
+ };
160
+ });
161
+ return optionsList;
162
+ }
163
+ componentWillLoad() {
164
+ this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
165
+ this._params = [...this.action.actionConfig.params.promptParam];
166
+ this.dataUnit.metadataLoader = this.metadataLoader.bind(this);
167
+ this.dataUnit.loadMetadata().then(() => {
168
+ this.fillFields();
169
+ });
170
+ this.dataUnit.addRecord();
171
+ }
172
+ async metadataLoader() {
173
+ return new Promise((resolve) => {
174
+ this.buildFields();
175
+ resolve(this._metadata);
176
+ });
177
+ }
178
+ handleModalAction(evt) {
179
+ switch (evt) {
180
+ case this.APPLY:
181
+ this.handleApply();
182
+ break;
183
+ case this.CANCEL:
184
+ case this.CLOSE:
185
+ this.exitPopup();
186
+ break;
187
+ }
188
+ }
189
+ render() {
190
+ 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 })))));
191
+ }
192
+ static get is() { return "snk-actions-form"; }
193
+ static get encapsulation() { return "scoped"; }
194
+ static get properties() {
195
+ return {
196
+ "action": {
197
+ "type": "unknown",
198
+ "mutable": false,
199
+ "complexType": {
200
+ "original": "IAction",
201
+ "resolved": "IAction",
202
+ "references": {
203
+ "IAction": {
204
+ "location": "import",
205
+ "path": "../actions/interfaces/IAction"
206
+ }
207
+ }
208
+ },
209
+ "required": false,
210
+ "optional": false,
211
+ "docs": {
212
+ "tags": [],
213
+ "text": "A\u00E7\u00E3o na qual os par\u00E2metros ser\u00E3o preenchidos."
214
+ }
215
+ },
216
+ "applyParameters": {
217
+ "type": "unknown",
218
+ "mutable": false,
219
+ "complexType": {
220
+ "original": "(action: IAction) => void",
221
+ "resolved": "(action: IAction) => void",
222
+ "references": {
223
+ "IAction": {
224
+ "location": "import",
225
+ "path": "../actions/interfaces/IAction"
226
+ }
227
+ }
228
+ },
229
+ "required": false,
230
+ "optional": false,
231
+ "docs": {
232
+ "tags": [],
233
+ "text": "Respons\u00E1vel por retornar a a\u00E7\u00E3o com os par\u00E2metros preenchidos."
234
+ }
235
+ }
236
+ };
237
+ }
238
+ static get states() {
239
+ return {
240
+ "dataUnit": {}
241
+ };
242
+ }
243
+ static get methods() {
244
+ return {
245
+ "openPopup": {
246
+ "complexType": {
247
+ "signature": "() => Promise<void>",
248
+ "parameters": [],
249
+ "references": {
250
+ "Promise": {
251
+ "location": "global"
252
+ }
253
+ },
254
+ "return": "Promise<void>"
255
+ },
256
+ "docs": {
257
+ "text": "Respons\u00E1vel por abrir a popup.",
258
+ "tags": []
259
+ }
260
+ }
261
+ };
262
+ }
263
+ }
@@ -0,0 +1,134 @@
1
+ import { ApplicationContext } from '@sankhyalabs/core';
2
+ import { h } from '@stencil/core';
3
+ export class SnkActionsForm {
4
+ constructor() {
5
+ this.APLICAR = 'OK';
6
+ this.CANCELAR = 'CANCEL';
7
+ this.FECHAR = 'CLOSE';
8
+ this.titleMessage = undefined;
9
+ this.message = undefined;
10
+ this.accept = undefined;
11
+ this.cancel = undefined;
12
+ }
13
+ /**
14
+ * Responsável por abrir a popup.
15
+ */
16
+ async openPopup() {
17
+ this._ezPopup.opened = true;
18
+ }
19
+ ;
20
+ exitPopup() {
21
+ this._ezPopup.opened = false;
22
+ }
23
+ handleModalAction(evt) {
24
+ switch (evt) {
25
+ case this.APLICAR:
26
+ this.exitPopup();
27
+ this.accept();
28
+ break;
29
+ case this.CANCELAR:
30
+ this.exitPopup();
31
+ this.cancel();
32
+ break;
33
+ case this.FECHAR:
34
+ this.exitPopup();
35
+ break;
36
+ }
37
+ }
38
+ componentWillLoad() {
39
+ this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
40
+ }
41
+ render() {
42
+ 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))))));
43
+ }
44
+ static get is() { return "snk-client-confirm"; }
45
+ static get encapsulation() { return "scoped"; }
46
+ static get properties() {
47
+ return {
48
+ "titleMessage": {
49
+ "type": "string",
50
+ "mutable": false,
51
+ "complexType": {
52
+ "original": "string",
53
+ "resolved": "string",
54
+ "references": {}
55
+ },
56
+ "required": false,
57
+ "optional": false,
58
+ "docs": {
59
+ "tags": [],
60
+ "text": "T\u00EDtulo da popup."
61
+ },
62
+ "attribute": "title-message",
63
+ "reflect": false
64
+ },
65
+ "message": {
66
+ "type": "string",
67
+ "mutable": false,
68
+ "complexType": {
69
+ "original": "string",
70
+ "resolved": "string",
71
+ "references": {}
72
+ },
73
+ "required": false,
74
+ "optional": false,
75
+ "docs": {
76
+ "tags": [],
77
+ "text": "Mensagem da popup."
78
+ },
79
+ "attribute": "message",
80
+ "reflect": false
81
+ },
82
+ "accept": {
83
+ "type": "unknown",
84
+ "mutable": false,
85
+ "complexType": {
86
+ "original": "() => void",
87
+ "resolved": "() => void",
88
+ "references": {}
89
+ },
90
+ "required": false,
91
+ "optional": false,
92
+ "docs": {
93
+ "tags": [],
94
+ "text": "Retorno quando usu\u00E1rio confirmar."
95
+ }
96
+ },
97
+ "cancel": {
98
+ "type": "unknown",
99
+ "mutable": false,
100
+ "complexType": {
101
+ "original": "() => void",
102
+ "resolved": "() => void",
103
+ "references": {}
104
+ },
105
+ "required": false,
106
+ "optional": false,
107
+ "docs": {
108
+ "tags": [],
109
+ "text": "Retorno quando usu\u00E1rio cancelar."
110
+ }
111
+ }
112
+ };
113
+ }
114
+ static get methods() {
115
+ return {
116
+ "openPopup": {
117
+ "complexType": {
118
+ "signature": "() => Promise<void>",
119
+ "parameters": [],
120
+ "references": {
121
+ "Promise": {
122
+ "location": "global"
123
+ }
124
+ },
125
+ "return": "Promise<void>"
126
+ },
127
+ "docs": {
128
+ "text": "Respons\u00E1vel por abrir a popup.",
129
+ "tags": []
130
+ }
131
+ }
132
+ };
133
+ }
134
+ }
@@ -61,7 +61,7 @@
61
61
 
62
62
  .snk-configurator__outline {
63
63
  display: flex;
64
- flex-direction: row;
64
+ flex-direction: column;
65
65
  gap: var(--space--small);
66
66
  margin-top: var(--space--small);
67
67
  margin-bottom: var(--space--large);
@@ -15,8 +15,8 @@ export class SnkGrid {
15
15
  "snkGridTopTaskbar.finish_edition.secondary": []
16
16
  });
17
17
  this._headerTaskbarProcessor = new TaskbarProcessor({
18
- "snkGridHeaderTaskbar.unselected": ["REFRESH", "DATA_EXPORTER"],
19
- "snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "ATTACH", "REFRESH", "DATA_EXPORTER"],
18
+ "snkGridHeaderTaskbar.unselected": ["REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON"],
19
+ "snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "ATTACH", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON"],
20
20
  "snkGridHeaderTaskbar.detail.unselected": ["REFRESH"],
21
21
  "snkGridHeaderTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH"]
22
22
  });
@@ -19,6 +19,7 @@ export var TaskbarElement;
19
19
  TaskbarElement["CONFIGURATOR"] = "CONFIGURATOR";
20
20
  TaskbarElement["DATA_EXPORTER"] = "DATA_EXPORTER";
21
21
  TaskbarElement["ATTACH"] = "ATTACH";
22
+ TaskbarElement["ACTIONS_BUTTON"] = "ACTIONS_BUTTON";
22
23
  })(TaskbarElement || (TaskbarElement = {}));
23
24
  export var AuthorizationElements;
24
25
  (function (AuthorizationElements) {
@@ -93,6 +94,8 @@ export const buildElem = (element, className, dataElementId, getTitle, action, i
93
94
  return h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId });
94
95
  case TaskbarElement.ATTACH:
95
96
  return iconButton("anexo", element, className, dataElementId, title, action, isEnabled);
97
+ case TaskbarElement.ACTIONS_BUTTON:
98
+ return h("snk-actions-button", { "data-element-id": dataElementId });
96
99
  }
97
100
  };
98
101
  function textButton(name, className, dataElementId, text, title, action, isEnabled) {
@@ -15,6 +15,7 @@ import { snkSimpleBarMessages } from './resources/snk-simple-bar.msg.js';
15
15
  import { snkAttachMessages } from "./resources/snk-attach.msg";
16
16
  import { snkPersonalizedFilterMessages } from "./resources/snk-personalized-filter.msg.js";
17
17
  import { snkEntityListMessages } from "./resources/snk-entity-list.msg.js";
18
+ import { snkActionsButtonMessages } from "./resources/snk-actions-button.msg.js";
18
19
  export class SnkMessageBuilder {
19
20
  constructor(domainName) {
20
21
  this._defaults = {
@@ -38,7 +39,8 @@ export class SnkMessageBuilder {
38
39
  snkSimpleBar: snkSimpleBarMessages,
39
40
  snkAttach: snkAttachMessages,
40
41
  snkPersonalizedFilter: snkPersonalizedFilterMessages,
41
- snkEntityList: snkEntityListMessages
42
+ snkEntityList: snkEntityListMessages,
43
+ snkActionsButton: snkActionsButtonMessages
42
44
  };
43
45
  this._currentOperation = OperationMap.CLEAN;
44
46
  this._domainName = domainName;
@@ -0,0 +1,27 @@
1
+ export const snkActionsButtonMessages = {
2
+ title: {
3
+ actions: "Ações",
4
+ error: "Erro",
5
+ warning: "Aviso"
6
+ },
7
+ action: {
8
+ incorrectAction: "A ação \"{{description}}\" não pode ser executada porque ela não foi salva corretamente.",
9
+ emptyParamName: "<b>Regra Personalizada:</b><br/><br/>É necessário informar o atributo 'paramName'",
10
+ nonExistentType: "Tipo de ação não implementada: {{this.actionType}}"
11
+ },
12
+ launchScreen: {
13
+ emptyField: "A ação \"{{description}}\" não pôde ser executada porque o campo \"{{localFieldLabel}}\" está vazio."
14
+ },
15
+ form: {
16
+ fillParams: "Informe os parâmetros"
17
+ },
18
+ clientEvent: {
19
+ cancelMessage: "Caso queira cancelar, feche esta mensagem."
20
+ },
21
+ buttons: {
22
+ apply: "Aplicar",
23
+ cancel: "Cancelar",
24
+ yes: "Sim",
25
+ no: "Não"
26
+ }
27
+ };
@@ -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;
@@ -1,6 +1,9 @@
1
1
  /* sankhyablocks custom elements */
2
+ export { SnkActionsButton as SnkActionsButton } from '../types/components/snk-actions-button/snk-actions-button';
3
+ export { SnkActionsForm as SnkActionsForm } from '../types/components/snk-actions-button/subcomponents/snk-actions-form';
2
4
  export { SnkApplication as SnkApplication } from '../types/components/snk-application/snk-application';
3
5
  export { SnkAttach as SnkAttach } from '../types/components/snk-attach/snk-attach';
6
+ export { SnkActionsForm as SnkClientConfirm } from '../types/components/snk-actions-button/subcomponents/snk-client-confirm';
4
7
  export { SnkConfigOptions as SnkConfigOptions } from '../types/components/snk-form/subcomponents/snk-config-options/snk-config-options';
5
8
  export { SnkConfigurator as SnkConfigurator } from '../types/components/snk-configurator/snk-configurator';
6
9
  export { SnkCrud as SnkCrud } from '../types/components/snk-crud/snk-crud';
@@ -1,6 +1,9 @@
1
1
  export { setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
2
+ export { SnkActionsButton, defineCustomElement as defineCustomElementSnkActionsButton } from './snk-actions-button.js';
3
+ export { SnkActionsForm, defineCustomElement as defineCustomElementSnkActionsForm } from './snk-actions-form.js';
2
4
  export { SnkApplication, defineCustomElement as defineCustomElementSnkApplication } from './snk-application.js';
3
5
  export { SnkAttach, defineCustomElement as defineCustomElementSnkAttach } from './snk-attach.js';
6
+ export { SnkClientConfirm, defineCustomElement as defineCustomElementSnkClientConfirm } from './snk-client-confirm.js';
4
7
  export { SnkConfigOptions, defineCustomElement as defineCustomElementSnkConfigOptions } from './snk-config-options.js';
5
8
  export { SnkConfigurator, defineCustomElement as defineCustomElementSnkConfigurator } from './snk-configurator.js';
6
9
  export { SnkCrud, defineCustomElement as defineCustomElementSnkCrud } from './snk-crud.js';
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface SnkActionsButton extends Components.SnkActionsButton, HTMLElement {}
4
+ export const SnkActionsButton: {
5
+ prototype: SnkActionsButton;
6
+ new (): SnkActionsButton;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,6 @@
1
+ import { S as SnkActionsButton$1, d as defineCustomElement$1 } from './snk-actions-button2.js';
2
+
3
+ const SnkActionsButton = SnkActionsButton$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { SnkActionsButton, defineCustomElement };