@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,200 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-21bd01e1.js');
6
+ const core = require('@sankhyalabs/core');
7
+ const ParamType = require('./ParamType-90b440a0.js');
8
+
9
+ const SnkActionsForm = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ this.APPLY = 'OK';
13
+ this.CANCEL = 'CANCEL';
14
+ this.CLOSE = 'CLOSE';
15
+ this.action = undefined;
16
+ this.applyParameters = undefined;
17
+ this.dataUnit = new core.DataUnit();
18
+ }
19
+ /**
20
+ * Responsável por abrir a popup.
21
+ */
22
+ async openPopup() {
23
+ this._ezPopup.opened = true;
24
+ }
25
+ ;
26
+ exitPopup() {
27
+ this._ezPopup.opened = false;
28
+ }
29
+ async handleApply() {
30
+ try {
31
+ await this._ezForm.validate();
32
+ let row = this.dataUnit.getSelectedRecord();
33
+ if (row) {
34
+ this._params.forEach((param, index) => {
35
+ if (row.hasOwnProperty(param.name)) {
36
+ if (param.paramType == ParamType.ParamType.ENTITY) {
37
+ let searchValue = row[param.name];
38
+ if (!searchValue) {
39
+ param.value = null;
40
+ return;
41
+ }
42
+ param.value = typeof searchValue === 'object' ? searchValue.value : searchValue;
43
+ return;
44
+ }
45
+ this._params[index].value = row[param.name];
46
+ }
47
+ else {
48
+ this._params[index].value = undefined;
49
+ }
50
+ });
51
+ this.action.actionConfig.params.promptParam = this._params;
52
+ }
53
+ this.exitPopup();
54
+ this.applyParameters(this.action);
55
+ }
56
+ catch (e) {
57
+ // exceção ignorada, quando o validate() falha.
58
+ }
59
+ }
60
+ searchLoader(evt, param) {
61
+ const options = {
62
+ entity: param.entityName,
63
+ entityDescription: param.label
64
+ };
65
+ return this._application.executePreparedSearch(evt.mode, evt.argument, options);
66
+ }
67
+ ;
68
+ getUserInterface(paramType) {
69
+ switch (paramType) {
70
+ case ParamType.ParamType.TEXT:
71
+ return core.UserInterface.SHORTTEXT;
72
+ case ParamType.ParamType.INTEGER:
73
+ return core.UserInterface.INTEGERNUMBER;
74
+ case ParamType.ParamType.DECIMAL:
75
+ return core.UserInterface.DECIMALNUMBER;
76
+ case ParamType.ParamType.DATE:
77
+ return core.UserInterface.DATE;
78
+ case ParamType.ParamType.DATETIME:
79
+ return core.UserInterface.DATETIME;
80
+ case ParamType.ParamType.BOOLEAN:
81
+ return core.UserInterface.CHECKBOX;
82
+ case ParamType.ParamType.ENTITY:
83
+ return core.UserInterface.SEARCH;
84
+ case ParamType.ParamType.OPTIONS:
85
+ return core.UserInterface.OPTIONSELECTOR;
86
+ }
87
+ }
88
+ getDataType(paramType) {
89
+ switch (paramType) {
90
+ case ParamType.ParamType.TEXT:
91
+ case ParamType.ParamType.OPTIONS:
92
+ return core.DataType.TEXT;
93
+ case ParamType.ParamType.INTEGER:
94
+ case ParamType.ParamType.DECIMAL:
95
+ return core.DataType.NUMBER;
96
+ case ParamType.ParamType.DATE:
97
+ case ParamType.ParamType.DATETIME:
98
+ return core.DataType.DATE;
99
+ case ParamType.ParamType.BOOLEAN:
100
+ return core.DataType.BOOLEAN;
101
+ case ParamType.ParamType.ENTITY:
102
+ return core.DataType.OBJECT;
103
+ }
104
+ }
105
+ getProps(param) {
106
+ switch (param.paramType) {
107
+ case ParamType.ParamType.DECIMAL:
108
+ return param.precision ? { precision: Number(param.precision) } : undefined;
109
+ case ParamType.ParamType.ENTITY:
110
+ return { ENTITYNAME: param.entityName };
111
+ case ParamType.ParamType.OPTIONS:
112
+ return { options: this.prepareOptions(param.options) };
113
+ default:
114
+ return undefined;
115
+ }
116
+ }
117
+ buildFields() {
118
+ let fields = [];
119
+ this._params.forEach((param, index) => {
120
+ const hasName = !!param.name;
121
+ let paramName = hasName ? param.name : `param_${index}`;
122
+ fields.push({
123
+ name: paramName,
124
+ label: param.label,
125
+ dataType: this.getDataType(param.paramType),
126
+ userInterface: this.getUserInterface(param.paramType),
127
+ readOnly: false,
128
+ required: param.paramType == 'B' ? false : param.required === "true",
129
+ properties: this.getProps(param)
130
+ });
131
+ this._params[index].name = paramName;
132
+ this._params[index].isGeneratedName = !hasName;
133
+ });
134
+ const metadata = {
135
+ name: 'params',
136
+ label: 'params',
137
+ fields: fields
138
+ };
139
+ this._metadata = metadata;
140
+ }
141
+ fillFields() {
142
+ this._params.forEach((param) => {
143
+ if (param.saveLast == 'true') {
144
+ this.dataUnit.setFieldValue(param.name, param.value);
145
+ }
146
+ });
147
+ }
148
+ prepareOptions(options) {
149
+ const optionsArray = options.split(";");
150
+ let optionsList = optionsArray.map(function (opc, index) {
151
+ let value;
152
+ let label;
153
+ if (opc.indexOf('=') > -1) {
154
+ let opcArr = opc.split('=');
155
+ value = opcArr[0];
156
+ label = opcArr[1];
157
+ }
158
+ else {
159
+ value = (index + 1).toString();
160
+ label = opc;
161
+ }
162
+ return {
163
+ value: value,
164
+ label: label
165
+ };
166
+ });
167
+ return optionsList;
168
+ }
169
+ componentWillLoad() {
170
+ this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
171
+ this._params = [...this.action.actionConfig.params.promptParam];
172
+ this.dataUnit.metadataLoader = this.metadataLoader.bind(this);
173
+ this.dataUnit.loadMetadata().then(() => {
174
+ this.fillFields();
175
+ });
176
+ this.dataUnit.addRecord();
177
+ }
178
+ async metadataLoader() {
179
+ return new Promise((resolve) => {
180
+ this.buildFields();
181
+ resolve(this._metadata);
182
+ });
183
+ }
184
+ handleModalAction(evt) {
185
+ switch (evt) {
186
+ case this.APPLY:
187
+ this.handleApply();
188
+ break;
189
+ case this.CANCEL:
190
+ case this.CLOSE:
191
+ this.exitPopup();
192
+ break;
193
+ }
194
+ }
195
+ render() {
196
+ return (index.h("ez-popup", { size: "medium", heightMode: "auto", useHeader: false, ref: (ref) => this._ezPopup = ref }, index.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) }, index.h("div", { class: "ez-margin-vertical--medium" }, index.h("ez-form", { ref: (ref) => this._ezForm = ref, dataUnit: this.dataUnit })))));
197
+ }
198
+ };
199
+
200
+ exports.snk_actions_form = SnkActionsForm;
@@ -10,7 +10,7 @@ const pesquisaFetcher = require('./pesquisa-fetcher-954b74c3.js');
10
10
  const ConfigStorage = require('./ConfigStorage-f68c3607.js');
11
11
  const dataunitFetcher = require('./dataunit-fetcher-8f5ade55.js');
12
12
  const resourceFetcher = require('./resource-fetcher-2979b54b.js');
13
- const SnkMessageBuilder = require('./SnkMessageBuilder-cf80308c.js');
13
+ const SnkMessageBuilder = require('./SnkMessageBuilder-3b5b5614.js');
14
14
  require('./_commonjsHelpers-537d719a.js');
15
15
  require('./form-config-fetcher-92bc8fe7.js');
16
16
  require('./filter-bar-config-fetcher-a14536bf.js');
@@ -7,7 +7,7 @@ const core = require('@sankhyalabs/core');
7
7
  const DataFetcher = require('./DataFetcher-a9d0228f.js');
8
8
  const constants = require('./constants-3787fa32.js');
9
9
  const dataunitFetcher = require('./dataunit-fetcher-8f5ade55.js');
10
- const taskbarElements = require('./taskbar-elements-bc2598f9.js');
10
+ const taskbarElements = require('./taskbar-elements-3be287d6.js');
11
11
  require('./_commonjsHelpers-537d719a.js');
12
12
  require('./index-f400b1d6.js');
13
13
  require('./index-de79181a.js');
@@ -0,0 +1,52 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-21bd01e1.js');
6
+ const core = require('@sankhyalabs/core');
7
+
8
+ const SnkActionsForm = class {
9
+ constructor(hostRef) {
10
+ index.registerInstance(this, hostRef);
11
+ this.APLICAR = 'OK';
12
+ this.CANCELAR = 'CANCEL';
13
+ this.FECHAR = 'CLOSE';
14
+ this.titleMessage = undefined;
15
+ this.message = undefined;
16
+ this.accept = undefined;
17
+ this.cancel = undefined;
18
+ }
19
+ /**
20
+ * Responsável por abrir a popup.
21
+ */
22
+ async openPopup() {
23
+ this._ezPopup.opened = true;
24
+ }
25
+ ;
26
+ exitPopup() {
27
+ this._ezPopup.opened = false;
28
+ }
29
+ handleModalAction(evt) {
30
+ switch (evt) {
31
+ case this.APLICAR:
32
+ this.exitPopup();
33
+ this.accept();
34
+ break;
35
+ case this.CANCELAR:
36
+ this.exitPopup();
37
+ this.cancel();
38
+ break;
39
+ case this.FECHAR:
40
+ this.exitPopup();
41
+ break;
42
+ }
43
+ }
44
+ componentWillLoad() {
45
+ this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
46
+ }
47
+ render() {
48
+ return (index.h("ez-popup", { size: "small", heightMode: "auto", useHeader: false, ref: (ref) => this._ezPopup = ref }, index.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) }, index.h("div", { class: "ez-margin-bottom--large ez-flex ez-flex--column" }, index.h("label", { class: "ez-text ez-text--large ez-text--primary" }, this.message), index.h("label", { class: "ez-text ez-text--large ez-text--primary" }, index.h("br", null), this._application.messagesBuilder.getMessage("snkActionsButton.clientEvent.cancelMessage", undefined))))));
49
+ }
50
+ };
51
+
52
+ exports.snk_client_confirm = SnkActionsForm;
@@ -7,7 +7,7 @@ const core = require('@sankhyalabs/core');
7
7
  const AuthorizationConfig = require('./AuthorizationConfig-79ffae4b.js');
8
8
  const constants = require('./constants-3787fa32.js');
9
9
 
10
- 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:row;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)}";
10
+ 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)}";
11
11
 
12
12
  const SnkConfigurator = class {
13
13
  constructor(hostRef) {
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-21bd01e1.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const taskbarElements = require('./taskbar-elements-bc2598f9.js');
7
+ const taskbarElements = require('./taskbar-elements-3be287d6.js');
8
8
  require('./DataFetcher-a9d0228f.js');
9
9
  require('./pesquisa-fetcher-954b74c3.js');
10
10
  const index$1 = require('./index-f400b1d6.js');
@@ -8,9 +8,9 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
8
8
  const index = require('./index-f400b1d6.js');
9
9
  const constants = require('./constants-3787fa32.js');
10
10
  const DataFetcher = require('./DataFetcher-a9d0228f.js');
11
- const snkDataUnit = require('./snk-data-unit-bd271acd.js');
11
+ const snkDataUnit = require('./snk-data-unit-e9c20097.js');
12
12
  require('./_commonjsHelpers-537d719a.js');
13
- require('./SnkMessageBuilder-cf80308c.js');
13
+ require('./SnkMessageBuilder-3b5b5614.js');
14
14
 
15
15
  class ItemBuilder {
16
16
  constructor(getMessage, selectedNumber) {
@@ -3,7 +3,7 @@
3
3
  const index = require('./index-21bd01e1.js');
4
4
  const core = require('@sankhyalabs/core');
5
5
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
6
- const SnkMessageBuilder = require('./SnkMessageBuilder-cf80308c.js');
6
+ const SnkMessageBuilder = require('./SnkMessageBuilder-3b5b5614.js');
7
7
 
8
8
  const snkDataUnitCss = ".sc-snk-data-unit-h{display:flex;flex-direction:column;height:100%;width:100%}";
9
9
 
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const snkDataUnit = require('./snk-data-unit-bd271acd.js');
5
+ const snkDataUnit = require('./snk-data-unit-e9c20097.js');
6
6
  require('./index-21bd01e1.js');
7
7
  require('@sankhyalabs/core');
8
8
  require('@sankhyalabs/ezui/dist/collection/utils');
9
- require('./SnkMessageBuilder-cf80308c.js');
9
+ require('./SnkMessageBuilder-3b5b5614.js');
10
10
 
11
11
 
12
12
 
@@ -9,10 +9,10 @@ require('./DataFetcher-a9d0228f.js');
9
9
  require('./pesquisa-fetcher-954b74c3.js');
10
10
  require('@sankhyalabs/core');
11
11
  const index$1 = require('./index-f400b1d6.js');
12
- const taskbarElements = require('./taskbar-elements-bc2598f9.js');
12
+ const taskbarElements = require('./taskbar-elements-3be287d6.js');
13
13
  const constants = require('./constants-3787fa32.js');
14
- const snkGuidesViewer = require('./snk-guides-viewer-0ab3746e.js');
15
- const SnkMessageBuilder = require('./SnkMessageBuilder-cf80308c.js');
14
+ const snkGuidesViewer = require('./snk-guides-viewer-c8843478.js');
15
+ const SnkMessageBuilder = require('./SnkMessageBuilder-3b5b5614.js');
16
16
  require('./ConfigStorage-f68c3607.js');
17
17
  require('./form-config-fetcher-92bc8fe7.js');
18
18
  require('./resource-fetcher-2979b54b.js');
@@ -20,7 +20,7 @@ require('./filter-bar-config-fetcher-a14536bf.js');
20
20
  require('./filter-item-type.enum-aa823a00.js');
21
21
  require('./_commonjsHelpers-537d719a.js');
22
22
  require('./index-de79181a.js');
23
- require('./taskbar-processor-e1e3bbf7.js');
23
+ require('./taskbar-processor-02f0fc84.js');
24
24
 
25
25
  class GuideBuilder {
26
26
  constructor(parentGuide, formMetadata, dataUnit) {
@@ -5,10 +5,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-21bd01e1.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
8
- const taskbarElements = require('./taskbar-elements-bc2598f9.js');
8
+ const taskbarElements = require('./taskbar-elements-3be287d6.js');
9
9
  const ConfigStorage = require('./ConfigStorage-f68c3607.js');
10
10
  const index$1 = require('./index-f400b1d6.js');
11
- const taskbarProcessor = require('./taskbar-processor-e1e3bbf7.js');
11
+ const taskbarProcessor = require('./taskbar-processor-02f0fc84.js');
12
12
  const index$2 = require('./index-de79181a.js');
13
13
  require('./form-config-fetcher-92bc8fe7.js');
14
14
  require('./DataFetcher-a9d0228f.js');
@@ -31,8 +31,8 @@ const SnkGrid = class {
31
31
  "snkGridTopTaskbar.finish_edition.secondary": []
32
32
  });
33
33
  this._headerTaskbarProcessor = new taskbarProcessor.TaskbarProcessor({
34
- "snkGridHeaderTaskbar.unselected": ["REFRESH", "DATA_EXPORTER"],
35
- "snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "ATTACH", "REFRESH", "DATA_EXPORTER"],
34
+ "snkGridHeaderTaskbar.unselected": ["REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON"],
35
+ "snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "ATTACH", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON"],
36
36
  "snkGridHeaderTaskbar.detail.unselected": ["REFRESH"],
37
37
  "snkGridHeaderTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH"]
38
38
  });
@@ -4,8 +4,8 @@ const index = require('./index-21bd01e1.js');
4
4
  const core = require('@sankhyalabs/core');
5
5
  const SnkFormConfigManager = require('./SnkFormConfigManager-69df3f74.js');
6
6
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
7
- const taskbarProcessor = require('./taskbar-processor-e1e3bbf7.js');
8
- const taskbarElements = require('./taskbar-elements-bc2598f9.js');
7
+ const taskbarProcessor = require('./taskbar-processor-02f0fc84.js');
8
+ const taskbarElements = require('./taskbar-elements-3be287d6.js');
9
9
  const constants = require('./constants-3787fa32.js');
10
10
  require('./DataFetcher-a9d0228f.js');
11
11
  require('./pesquisa-fetcher-954b74c3.js');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const snkGuidesViewer = require('./snk-guides-viewer-0ab3746e.js');
5
+ const snkGuidesViewer = require('./snk-guides-viewer-c8843478.js');
6
6
  require('./index-21bd01e1.js');
7
7
  require('@sankhyalabs/core');
8
8
  require('./SnkFormConfigManager-69df3f74.js');
@@ -14,8 +14,8 @@ require('./resource-fetcher-2979b54b.js');
14
14
  require('./filter-bar-config-fetcher-a14536bf.js');
15
15
  require('./filter-item-type.enum-aa823a00.js');
16
16
  require('@sankhyalabs/ezui/dist/collection/utils/form');
17
- require('./taskbar-processor-e1e3bbf7.js');
18
- require('./taskbar-elements-bc2598f9.js');
17
+ require('./taskbar-processor-02f0fc84.js');
18
+ require('./taskbar-elements-3be287d6.js');
19
19
  require('./index-f400b1d6.js');
20
20
  require('./index-de79181a.js');
21
21
  require('./constants-3787fa32.js');
@@ -5,11 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-21bd01e1.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const constants = require('./constants-3787fa32.js');
8
- const taskbarElements = require('./taskbar-elements-bc2598f9.js');
8
+ const taskbarElements = require('./taskbar-elements-3be287d6.js');
9
9
  require('./DataFetcher-a9d0228f.js');
10
10
  require('./pesquisa-fetcher-954b74c3.js');
11
11
  const index$1 = require('./index-f400b1d6.js');
12
- const taskbarProcessor = require('./taskbar-processor-e1e3bbf7.js');
12
+ const taskbarProcessor = require('./taskbar-processor-02f0fc84.js');
13
13
  require('./index-de79181a.js');
14
14
  require('./_commonjsHelpers-537d719a.js');
15
15
 
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-21bd01e1.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const AuthorizationConfig = require('./AuthorizationConfig-79ffae4b.js');
8
- const taskbarElements = require('./taskbar-elements-bc2598f9.js');
8
+ const taskbarElements = require('./taskbar-elements-3be287d6.js');
9
9
  const index$1 = require('./index-f400b1d6.js');
10
10
  require('./index-de79181a.js');
11
11
 
@@ -22,6 +22,7 @@ exports.TaskbarElement = void 0;
22
22
  TaskbarElement["CONFIGURATOR"] = "CONFIGURATOR";
23
23
  TaskbarElement["DATA_EXPORTER"] = "DATA_EXPORTER";
24
24
  TaskbarElement["ATTACH"] = "ATTACH";
25
+ TaskbarElement["ACTIONS_BUTTON"] = "ACTIONS_BUTTON";
25
26
  })(exports.TaskbarElement || (exports.TaskbarElement = {}));
26
27
  exports.AuthorizationElements = void 0;
27
28
  (function (AuthorizationElements) {
@@ -96,6 +97,8 @@ const buildElem = (element, className, dataElementId, getTitle, action, isEnable
96
97
  return index.h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId });
97
98
  case exports.TaskbarElement.ATTACH:
98
99
  return iconButton("anexo", element, className, dataElementId, title, action, isEnabled);
100
+ case exports.TaskbarElement.ACTIONS_BUTTON:
101
+ return index.h("snk-actions-button", { "data-element-id": dataElementId });
99
102
  }
100
103
  };
101
104
  function textButton(name, className, dataElementId, text, title, action, isEnabled) {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const taskbarElements = require('./taskbar-elements-bc2598f9.js');
3
+ const taskbarElements = require('./taskbar-elements-3be287d6.js');
4
4
  const core = require('@sankhyalabs/core');
5
5
 
6
6
  const MINIMUM_SK_VERSION_TO_ATTACHMENT = "4.22";
@@ -6,6 +6,9 @@
6
6
  "./components/snk-taskbar/snk-taskbar.js",
7
7
  "./components/snk-filter-bar/filter-list/snk-filter-list.js",
8
8
  "./components/snk-form/subcomponents/snk-tab-config/snk-tab-config.js",
9
+ "./components/snk-actions-button/snk-actions-button.js",
10
+ "./components/snk-actions-button/subcomponents/snk-actions-form.js",
11
+ "./components/snk-actions-button/subcomponents/snk-client-confirm.js",
9
12
  "./components/snk-attach/snk-attach.js",
10
13
  "./components/snk-configurator/snk-configurator.js",
11
14
  "./components/snk-crud/snk-crud.js",
@@ -0,0 +1,8 @@
1
+ export var ActionsType;
2
+ (function (ActionsType) {
3
+ ActionsType["LAUNCH_SCREEN"] = "LC";
4
+ ActionsType["JAVASCRIPT"] = "SC";
5
+ ActionsType["JAVA"] = "RJ";
6
+ ActionsType["PROCEDURE"] = "SP";
7
+ ActionsType["EMBEDDED"] = "EB";
8
+ })(ActionsType || (ActionsType = {}));
@@ -0,0 +1,11 @@
1
+ export 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 = {}));
@@ -0,0 +1,7 @@
1
+ export var RefreshType;
2
+ (function (RefreshType) {
3
+ RefreshType["NONE"] = "NONE";
4
+ RefreshType["PARENT"] = "PARENT";
5
+ RefreshType["MASTER"] = "MASTER";
6
+ RefreshType["ALL"] = "ALL";
7
+ })(RefreshType || (RefreshType = {}));
@@ -0,0 +1,22 @@
1
+ import { DataFetcher } from "../../../../lib/http/data-fetcher/DataFetcher";
2
+ const SERVICE_ACTION_EXECUTE_JAVA = 'ActionButtonsSP.executeJava';
3
+ export default class JavaExecutor {
4
+ execute(action) {
5
+ var _a;
6
+ const execSource = {
7
+ actionID: action.actionID,
8
+ refreshType: (_a = action.actionConfig.javaCall) === null || _a === void 0 ? void 0 : _a.refreshType
9
+ };
10
+ return new Promise((resolve) => {
11
+ resolve({ execSource, callback: this.callExecJava });
12
+ });
13
+ }
14
+ callExecJava(execSource) {
15
+ const request = {
16
+ requestBody: {
17
+ javaCall: execSource
18
+ }
19
+ };
20
+ DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_JAVA, JSON.stringify(request));
21
+ }
22
+ }
@@ -0,0 +1,20 @@
1
+ import { DataFetcher } from "../../../../lib/http/data-fetcher/DataFetcher";
2
+ const SERVICE_ACTION_EXECUTE_SCRIPT = 'ActionButtonsSP.executeScript';
3
+ export default class JavascriptExecutor {
4
+ execute(action) {
5
+ var _a;
6
+ const execSource = {
7
+ actionID: action.actionID,
8
+ refreshType: (_a = action.actionConfig.runScript) === null || _a === void 0 ? void 0 : _a.refreshType
9
+ };
10
+ return new Promise((resolve) => {
11
+ resolve({ execSource, callback: this.callExecScript });
12
+ });
13
+ }
14
+ callExecScript(execSource) {
15
+ const request = {
16
+ runScript: execSource
17
+ };
18
+ DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_SCRIPT, request);
19
+ }
20
+ }
@@ -0,0 +1,42 @@
1
+ import { ApplicationContext, ErrorException, StringUtils } from "@sankhyalabs/core";
2
+ export default class LaunchScreenExecutor {
3
+ constructor() {
4
+ this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
5
+ }
6
+ async execute(action, dataUnit) {
7
+ const resourceID = action.resourceID;
8
+ if (!resourceID)
9
+ return;
10
+ let launchObject = await this.buildLaunchObject(action, dataUnit);
11
+ this._application.openApp(resourceID, launchObject);
12
+ return null;
13
+ }
14
+ buildLaunchObject(action, dataUnit) {
15
+ return new Promise((resolve) => {
16
+ let params = action.actionConfig.params.param;
17
+ if (params && params.length > 0) {
18
+ let launchObject = {};
19
+ let processedParams = [];
20
+ params.forEach(param => {
21
+ const localField = param.localField;
22
+ let value = dataUnit.getFieldValue(localField);
23
+ if (!value) {
24
+ let localFieldLabel = dataUnit.getField(localField).label;
25
+ localFieldLabel = StringUtils.isEmpty(dataUnit.getField(localField).label) ? localField : localFieldLabel;
26
+ throw new ErrorException(this._application.messagesBuilder.getMessage("snkActionsButton.title.error", undefined), this._application.messagesBuilder.getMessage("snkActionsButton.launchScreen.emptyField", { description: action.description, localFieldLabel: localFieldLabel }));
27
+ }
28
+ value = StringUtils.isEmpty(value.toString()) ? undefined : value.toString();
29
+ launchObject[param.targetField] = value;
30
+ processedParams.push({
31
+ fieldName: param.targetField,
32
+ value: value
33
+ });
34
+ });
35
+ launchObject.ACTION_PARAMETERS = processedParams;
36
+ launchObject.call_time = Date.now();
37
+ resolve(launchObject);
38
+ }
39
+ resolve(null);
40
+ });
41
+ }
42
+ }
@@ -0,0 +1,26 @@
1
+ import { DataFetcher } from "../../../../lib/http/data-fetcher/DataFetcher";
2
+ const SERVICE_ACTION_EXECUTE_STP = 'ActionButtonsSP.executeSTP';
3
+ export default class ProcedureExecutor {
4
+ execute(action) {
5
+ var _a, _b, _c;
6
+ const procName = (_a = action.actionConfig.dbCall) === null || _a === void 0 ? void 0 : _a.name;
7
+ const rootEntity = (_b = action.actionConfig.dbCall) === null || _b === void 0 ? void 0 : _b.rootEntity;
8
+ const execSource = {
9
+ actionID: action.actionID,
10
+ refreshType: (_c = action.actionConfig.dbCall) === null || _c === void 0 ? void 0 : _c.refreshType,
11
+ procName: procName,
12
+ rootEntity: rootEntity
13
+ };
14
+ return new Promise((resolve) => {
15
+ resolve({ execSource, callback: this.callExecProcedure });
16
+ });
17
+ }
18
+ callExecProcedure(execSource) {
19
+ const request = {
20
+ requestBody: {
21
+ stpCall: execSource
22
+ }
23
+ };
24
+ DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_STP, JSON.stringify(request));
25
+ }
26
+ }