@sankhyalabs/sankhyablocks 8.8.0-rc.3 → 8.8.0-rc.4

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.
@@ -30,13 +30,13 @@ class JavaExecutor {
30
30
  resolve({ execSource, callback: this.callExecJava });
31
31
  });
32
32
  }
33
- callExecJava(execSource) {
33
+ async callExecJava(execSource) {
34
34
  const request = {
35
35
  requestBody: {
36
36
  javaCall: execSource
37
37
  }
38
38
  };
39
- DataFetcher.DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_JAVA, JSON.stringify(request));
39
+ await DataFetcher.DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_JAVA, JSON.stringify(request));
40
40
  }
41
41
  }
42
42
 
@@ -52,11 +52,11 @@ class JavascriptExecutor {
52
52
  resolve({ execSource, callback: this.callExecScript });
53
53
  });
54
54
  }
55
- callExecScript(execSource) {
55
+ async callExecScript(execSource) {
56
56
  const request = {
57
57
  runScript: execSource
58
58
  };
59
- DataFetcher.DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_SCRIPT, request);
59
+ await DataFetcher.DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_SCRIPT, request);
60
60
  }
61
61
  }
62
62
 
@@ -118,13 +118,13 @@ class ProcedureExecutor {
118
118
  resolve({ execSource, callback: this.callExecProcedure });
119
119
  });
120
120
  }
121
- callExecProcedure(execSource) {
121
+ async callExecProcedure(execSource) {
122
122
  const request = {
123
123
  requestBody: {
124
124
  stpCall: execSource
125
125
  }
126
126
  };
127
- DataFetcher.DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_STP, JSON.stringify(request));
127
+ await DataFetcher.DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_STP, JSON.stringify(request));
128
128
  }
129
129
  }
130
130
 
@@ -507,86 +507,91 @@ class Actions {
507
507
  const CONFIRMACAO = "__CONFIRMACAO__";
508
508
  const ESCOLHA_SIM_NAO = "__ESCOLHA_SIMNAO__";
509
509
  class ClientEventConfirm {
510
- clientConfirm(clientEvent, recaller) {
511
- const application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
512
- let actionType = "";
513
- if (clientEvent.content.event.hasOwnProperty('stpCall')) {
514
- recaller.requestBody = clientEvent.content.event.stpCall;
515
- actionType = ActionsType.PROCEDURE;
516
- }
517
- else if (clientEvent.content.event.hasOwnProperty('runScript')) {
518
- recaller.requestBody = clientEvent.content.event.runScript;
519
- actionType = ActionsType.JAVASCRIPT;
520
- }
521
- else if (clientEvent.content.event.hasOwnProperty('javaCall')) {
522
- recaller.requestBody = clientEvent.content.event.javaCall;
523
- actionType = ActionsType.JAVA;
524
- }
525
- let param = {
526
- type: 'S',
527
- sequence: clientEvent.content.event.sequence
528
- };
529
- if (!recaller.requestBody.params) {
530
- recaller.requestBody.params = {
531
- param: []
510
+ async clientConfirm(clientEvent, recaller) {
511
+ return new Promise((resolve) => {
512
+ const application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
513
+ let actionType = "";
514
+ if (clientEvent.content.event.hasOwnProperty('stpCall')) {
515
+ recaller.requestBody = clientEvent.content.event.stpCall;
516
+ actionType = ActionsType.PROCEDURE;
517
+ }
518
+ else if (clientEvent.content.event.hasOwnProperty('runScript')) {
519
+ recaller.requestBody = clientEvent.content.event.runScript;
520
+ actionType = ActionsType.JAVASCRIPT;
521
+ }
522
+ else if (clientEvent.content.event.hasOwnProperty('javaCall')) {
523
+ recaller.requestBody = clientEvent.content.event.javaCall;
524
+ actionType = ActionsType.JAVA;
525
+ }
526
+ let param = {
527
+ type: 'S',
528
+ sequence: clientEvent.content.event.sequence
532
529
  };
533
- }
534
- else {
535
- if (!Array.isArray(recaller.requestBody.params.param)) {
536
- recaller.requestBody.params.param = [recaller.requestBody.params.param];
530
+ if (!recaller.requestBody.params) {
531
+ recaller.requestBody.params = {
532
+ param: []
533
+ };
537
534
  }
538
- }
539
- recaller.requestBody.params.param.push(param);
540
- const title = clientEvent.content.event.title.$;
541
- const message = clientEvent.content.event.message.$;
542
- let requestBody;
543
- switch (actionType) {
544
- case ActionsType.JAVASCRIPT:
545
- requestBody = { runScript: recaller.requestBody };
546
- break;
547
- case ActionsType.PROCEDURE:
548
- requestBody = {
549
- requestBody: {
550
- stpCall: recaller.requestBody
551
- }
535
+ else {
536
+ if (!Array.isArray(recaller.requestBody.params.param)) {
537
+ recaller.requestBody.params.param = [recaller.requestBody.params.param];
538
+ }
539
+ }
540
+ recaller.requestBody.params.param.push(param);
541
+ const title = clientEvent.content.event.title.$;
542
+ const message = clientEvent.content.event.message.$;
543
+ let requestBody;
544
+ switch (actionType) {
545
+ case ActionsType.JAVASCRIPT:
546
+ requestBody = { runScript: recaller.requestBody };
547
+ break;
548
+ case ActionsType.PROCEDURE:
549
+ requestBody = {
550
+ requestBody: {
551
+ stpCall: recaller.requestBody
552
+ }
553
+ };
554
+ break;
555
+ case ActionsType.JAVA:
556
+ requestBody = {
557
+ requestBody: {
558
+ javaCall: recaller.requestBody
559
+ }
560
+ };
561
+ break;
562
+ }
563
+ if (clientEvent.content.event.showNoOption == 'S') {
564
+ param.paramName = ESCOLHA_SIM_NAO;
565
+ const form = document.createElement("snk-client-confirm");
566
+ window.document.body.appendChild(form);
567
+ form.titleMessage = title;
568
+ form.message = message;
569
+ form.accept = async () => {
570
+ param.$ = 'S';
571
+ await recaller.reCall(requestBody);
572
+ resolve();
552
573
  };
553
- break;
554
- case ActionsType.JAVA:
555
- requestBody = {
556
- requestBody: {
557
- javaCall: recaller.requestBody
558
- }
574
+ form.cancel = async () => {
575
+ param.$ = 'N';
576
+ await recaller.reCall(requestBody);
577
+ resolve();
559
578
  };
560
- break;
561
- }
562
- if (clientEvent.content.event.showNoOption == 'S') {
563
- param.paramName = ESCOLHA_SIM_NAO;
564
- const form = document.createElement("snk-client-confirm");
565
- window.document.body.appendChild(form);
566
- form.titleMessage = title;
567
- form.message = message;
568
- form.accept = () => {
569
- param.$ = 'S';
570
- recaller.reCall(requestBody);
571
- };
572
- form.cancel = () => {
573
- param.$ = 'N';
574
- recaller.reCall(requestBody);
575
- };
576
- form.openPopup();
577
- }
578
- else {
579
- application.confirm(title, message, null, 'warn', {
580
- labelCancel: "Cancelar",
581
- labelConfirm: "Sim"
582
- }).then((confirmResult) => {
583
- if (confirmResult) {
584
- param.paramName = CONFIRMACAO;
585
- param.$ = 'S';
586
- recaller.reCall(requestBody);
587
- }
588
- });
589
- }
579
+ form.openPopup();
580
+ }
581
+ else {
582
+ application.confirm(title, message, null, 'warn', {
583
+ labelCancel: "Cancelar",
584
+ labelConfirm: "Sim"
585
+ }).then(async (confirmResult) => {
586
+ if (confirmResult) {
587
+ param.paramName = CONFIRMACAO;
588
+ param.$ = 'S';
589
+ await recaller.reCall(requestBody);
590
+ resolve();
591
+ }
592
+ });
593
+ }
594
+ });
590
595
  }
591
596
  }
592
597
 
@@ -11,12 +11,12 @@ export default class JavaExecutor {
11
11
  resolve({ execSource, callback: this.callExecJava });
12
12
  });
13
13
  }
14
- callExecJava(execSource) {
14
+ async callExecJava(execSource) {
15
15
  const request = {
16
16
  requestBody: {
17
17
  javaCall: execSource
18
18
  }
19
19
  };
20
- DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_JAVA, JSON.stringify(request));
20
+ await DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_JAVA, JSON.stringify(request));
21
21
  }
22
22
  }
@@ -11,10 +11,10 @@ export default class JavascriptExecutor {
11
11
  resolve({ execSource, callback: this.callExecScript });
12
12
  });
13
13
  }
14
- callExecScript(execSource) {
14
+ async callExecScript(execSource) {
15
15
  const request = {
16
16
  runScript: execSource
17
17
  };
18
- DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_SCRIPT, request);
18
+ await DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_SCRIPT, request);
19
19
  }
20
20
  }
@@ -15,12 +15,12 @@ export default class ProcedureExecutor {
15
15
  resolve({ execSource, callback: this.callExecProcedure });
16
16
  });
17
17
  }
18
- callExecProcedure(execSource) {
18
+ async callExecProcedure(execSource) {
19
19
  const request = {
20
20
  requestBody: {
21
21
  stpCall: execSource
22
22
  }
23
23
  };
24
- DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_STP, JSON.stringify(request));
24
+ await DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_STP, JSON.stringify(request));
25
25
  }
26
26
  }
@@ -3,85 +3,90 @@ import { ActionsType } from "../actions/enum/ActionsType";
3
3
  const CONFIRMACAO = "__CONFIRMACAO__";
4
4
  const ESCOLHA_SIM_NAO = "__ESCOLHA_SIMNAO__";
5
5
  export default class ClientEventConfirm {
6
- clientConfirm(clientEvent, recaller) {
7
- const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
8
- let actionType = "";
9
- if (clientEvent.content.event.hasOwnProperty('stpCall')) {
10
- recaller.requestBody = clientEvent.content.event.stpCall;
11
- actionType = ActionsType.PROCEDURE;
12
- }
13
- else if (clientEvent.content.event.hasOwnProperty('runScript')) {
14
- recaller.requestBody = clientEvent.content.event.runScript;
15
- actionType = ActionsType.JAVASCRIPT;
16
- }
17
- else if (clientEvent.content.event.hasOwnProperty('javaCall')) {
18
- recaller.requestBody = clientEvent.content.event.javaCall;
19
- actionType = ActionsType.JAVA;
20
- }
21
- let param = {
22
- type: 'S',
23
- sequence: clientEvent.content.event.sequence
24
- };
25
- if (!recaller.requestBody.params) {
26
- recaller.requestBody.params = {
27
- param: []
6
+ async clientConfirm(clientEvent, recaller) {
7
+ return new Promise((resolve) => {
8
+ const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
9
+ let actionType = "";
10
+ if (clientEvent.content.event.hasOwnProperty('stpCall')) {
11
+ recaller.requestBody = clientEvent.content.event.stpCall;
12
+ actionType = ActionsType.PROCEDURE;
13
+ }
14
+ else if (clientEvent.content.event.hasOwnProperty('runScript')) {
15
+ recaller.requestBody = clientEvent.content.event.runScript;
16
+ actionType = ActionsType.JAVASCRIPT;
17
+ }
18
+ else if (clientEvent.content.event.hasOwnProperty('javaCall')) {
19
+ recaller.requestBody = clientEvent.content.event.javaCall;
20
+ actionType = ActionsType.JAVA;
21
+ }
22
+ let param = {
23
+ type: 'S',
24
+ sequence: clientEvent.content.event.sequence
28
25
  };
29
- }
30
- else {
31
- if (!Array.isArray(recaller.requestBody.params.param)) {
32
- recaller.requestBody.params.param = [recaller.requestBody.params.param];
26
+ if (!recaller.requestBody.params) {
27
+ recaller.requestBody.params = {
28
+ param: []
29
+ };
33
30
  }
34
- }
35
- recaller.requestBody.params.param.push(param);
36
- const title = clientEvent.content.event.title.$;
37
- const message = clientEvent.content.event.message.$;
38
- let requestBody;
39
- switch (actionType) {
40
- case ActionsType.JAVASCRIPT:
41
- requestBody = { runScript: recaller.requestBody };
42
- break;
43
- case ActionsType.PROCEDURE:
44
- requestBody = {
45
- requestBody: {
46
- stpCall: recaller.requestBody
47
- }
31
+ else {
32
+ if (!Array.isArray(recaller.requestBody.params.param)) {
33
+ recaller.requestBody.params.param = [recaller.requestBody.params.param];
34
+ }
35
+ }
36
+ recaller.requestBody.params.param.push(param);
37
+ const title = clientEvent.content.event.title.$;
38
+ const message = clientEvent.content.event.message.$;
39
+ let requestBody;
40
+ switch (actionType) {
41
+ case ActionsType.JAVASCRIPT:
42
+ requestBody = { runScript: recaller.requestBody };
43
+ break;
44
+ case ActionsType.PROCEDURE:
45
+ requestBody = {
46
+ requestBody: {
47
+ stpCall: recaller.requestBody
48
+ }
49
+ };
50
+ break;
51
+ case ActionsType.JAVA:
52
+ requestBody = {
53
+ requestBody: {
54
+ javaCall: recaller.requestBody
55
+ }
56
+ };
57
+ break;
58
+ }
59
+ if (clientEvent.content.event.showNoOption == 'S') {
60
+ param.paramName = ESCOLHA_SIM_NAO;
61
+ const form = document.createElement("snk-client-confirm");
62
+ window.document.body.appendChild(form);
63
+ form.titleMessage = title;
64
+ form.message = message;
65
+ form.accept = async () => {
66
+ param.$ = 'S';
67
+ await recaller.reCall(requestBody);
68
+ resolve();
48
69
  };
49
- break;
50
- case ActionsType.JAVA:
51
- requestBody = {
52
- requestBody: {
53
- javaCall: recaller.requestBody
54
- }
70
+ form.cancel = async () => {
71
+ param.$ = 'N';
72
+ await recaller.reCall(requestBody);
73
+ resolve();
55
74
  };
56
- break;
57
- }
58
- if (clientEvent.content.event.showNoOption == 'S') {
59
- param.paramName = ESCOLHA_SIM_NAO;
60
- const form = document.createElement("snk-client-confirm");
61
- window.document.body.appendChild(form);
62
- form.titleMessage = title;
63
- form.message = message;
64
- form.accept = () => {
65
- param.$ = 'S';
66
- recaller.reCall(requestBody);
67
- };
68
- form.cancel = () => {
69
- param.$ = 'N';
70
- recaller.reCall(requestBody);
71
- };
72
- form.openPopup();
73
- }
74
- else {
75
- application.confirm(title, message, null, 'warn', {
76
- labelCancel: "Cancelar",
77
- labelConfirm: "Sim"
78
- }).then((confirmResult) => {
79
- if (confirmResult) {
80
- param.paramName = CONFIRMACAO;
81
- param.$ = 'S';
82
- recaller.reCall(requestBody);
83
- }
84
- });
85
- }
75
+ form.openPopup();
76
+ }
77
+ else {
78
+ application.confirm(title, message, null, 'warn', {
79
+ labelCancel: "Cancelar",
80
+ labelConfirm: "Sim"
81
+ }).then(async (confirmResult) => {
82
+ if (confirmResult) {
83
+ param.paramName = CONFIRMACAO;
84
+ param.$ = 'S';
85
+ await recaller.reCall(requestBody);
86
+ resolve();
87
+ }
88
+ });
89
+ }
90
+ });
86
91
  }
87
92
  }
@@ -22,13 +22,13 @@ class JavaExecutor {
22
22
  resolve({ execSource, callback: this.callExecJava });
23
23
  });
24
24
  }
25
- callExecJava(execSource) {
25
+ async callExecJava(execSource) {
26
26
  const request = {
27
27
  requestBody: {
28
28
  javaCall: execSource
29
29
  }
30
30
  };
31
- DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_JAVA, JSON.stringify(request));
31
+ await DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_JAVA, JSON.stringify(request));
32
32
  }
33
33
  }
34
34
 
@@ -44,11 +44,11 @@ class JavascriptExecutor {
44
44
  resolve({ execSource, callback: this.callExecScript });
45
45
  });
46
46
  }
47
- callExecScript(execSource) {
47
+ async callExecScript(execSource) {
48
48
  const request = {
49
49
  runScript: execSource
50
50
  };
51
- DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_SCRIPT, request);
51
+ await DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_SCRIPT, request);
52
52
  }
53
53
  }
54
54
 
@@ -110,13 +110,13 @@ class ProcedureExecutor {
110
110
  resolve({ execSource, callback: this.callExecProcedure });
111
111
  });
112
112
  }
113
- callExecProcedure(execSource) {
113
+ async callExecProcedure(execSource) {
114
114
  const request = {
115
115
  requestBody: {
116
116
  stpCall: execSource
117
117
  }
118
118
  };
119
- DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_STP, JSON.stringify(request));
119
+ await DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_STP, JSON.stringify(request));
120
120
  }
121
121
  }
122
122
 
@@ -506,86 +506,91 @@ class Actions {
506
506
  const CONFIRMACAO = "__CONFIRMACAO__";
507
507
  const ESCOLHA_SIM_NAO = "__ESCOLHA_SIMNAO__";
508
508
  class ClientEventConfirm {
509
- clientConfirm(clientEvent, recaller) {
510
- const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
511
- let actionType = "";
512
- if (clientEvent.content.event.hasOwnProperty('stpCall')) {
513
- recaller.requestBody = clientEvent.content.event.stpCall;
514
- actionType = ActionsType.PROCEDURE;
515
- }
516
- else if (clientEvent.content.event.hasOwnProperty('runScript')) {
517
- recaller.requestBody = clientEvent.content.event.runScript;
518
- actionType = ActionsType.JAVASCRIPT;
519
- }
520
- else if (clientEvent.content.event.hasOwnProperty('javaCall')) {
521
- recaller.requestBody = clientEvent.content.event.javaCall;
522
- actionType = ActionsType.JAVA;
523
- }
524
- let param = {
525
- type: 'S',
526
- sequence: clientEvent.content.event.sequence
527
- };
528
- if (!recaller.requestBody.params) {
529
- recaller.requestBody.params = {
530
- param: []
509
+ async clientConfirm(clientEvent, recaller) {
510
+ return new Promise((resolve) => {
511
+ const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
512
+ let actionType = "";
513
+ if (clientEvent.content.event.hasOwnProperty('stpCall')) {
514
+ recaller.requestBody = clientEvent.content.event.stpCall;
515
+ actionType = ActionsType.PROCEDURE;
516
+ }
517
+ else if (clientEvent.content.event.hasOwnProperty('runScript')) {
518
+ recaller.requestBody = clientEvent.content.event.runScript;
519
+ actionType = ActionsType.JAVASCRIPT;
520
+ }
521
+ else if (clientEvent.content.event.hasOwnProperty('javaCall')) {
522
+ recaller.requestBody = clientEvent.content.event.javaCall;
523
+ actionType = ActionsType.JAVA;
524
+ }
525
+ let param = {
526
+ type: 'S',
527
+ sequence: clientEvent.content.event.sequence
531
528
  };
532
- }
533
- else {
534
- if (!Array.isArray(recaller.requestBody.params.param)) {
535
- recaller.requestBody.params.param = [recaller.requestBody.params.param];
529
+ if (!recaller.requestBody.params) {
530
+ recaller.requestBody.params = {
531
+ param: []
532
+ };
536
533
  }
537
- }
538
- recaller.requestBody.params.param.push(param);
539
- const title = clientEvent.content.event.title.$;
540
- const message = clientEvent.content.event.message.$;
541
- let requestBody;
542
- switch (actionType) {
543
- case ActionsType.JAVASCRIPT:
544
- requestBody = { runScript: recaller.requestBody };
545
- break;
546
- case ActionsType.PROCEDURE:
547
- requestBody = {
548
- requestBody: {
549
- stpCall: recaller.requestBody
550
- }
534
+ else {
535
+ if (!Array.isArray(recaller.requestBody.params.param)) {
536
+ recaller.requestBody.params.param = [recaller.requestBody.params.param];
537
+ }
538
+ }
539
+ recaller.requestBody.params.param.push(param);
540
+ const title = clientEvent.content.event.title.$;
541
+ const message = clientEvent.content.event.message.$;
542
+ let requestBody;
543
+ switch (actionType) {
544
+ case ActionsType.JAVASCRIPT:
545
+ requestBody = { runScript: recaller.requestBody };
546
+ break;
547
+ case ActionsType.PROCEDURE:
548
+ requestBody = {
549
+ requestBody: {
550
+ stpCall: recaller.requestBody
551
+ }
552
+ };
553
+ break;
554
+ case ActionsType.JAVA:
555
+ requestBody = {
556
+ requestBody: {
557
+ javaCall: recaller.requestBody
558
+ }
559
+ };
560
+ break;
561
+ }
562
+ if (clientEvent.content.event.showNoOption == 'S') {
563
+ param.paramName = ESCOLHA_SIM_NAO;
564
+ const form = document.createElement("snk-client-confirm");
565
+ window.document.body.appendChild(form);
566
+ form.titleMessage = title;
567
+ form.message = message;
568
+ form.accept = async () => {
569
+ param.$ = 'S';
570
+ await recaller.reCall(requestBody);
571
+ resolve();
551
572
  };
552
- break;
553
- case ActionsType.JAVA:
554
- requestBody = {
555
- requestBody: {
556
- javaCall: recaller.requestBody
557
- }
573
+ form.cancel = async () => {
574
+ param.$ = 'N';
575
+ await recaller.reCall(requestBody);
576
+ resolve();
558
577
  };
559
- break;
560
- }
561
- if (clientEvent.content.event.showNoOption == 'S') {
562
- param.paramName = ESCOLHA_SIM_NAO;
563
- const form = document.createElement("snk-client-confirm");
564
- window.document.body.appendChild(form);
565
- form.titleMessage = title;
566
- form.message = message;
567
- form.accept = () => {
568
- param.$ = 'S';
569
- recaller.reCall(requestBody);
570
- };
571
- form.cancel = () => {
572
- param.$ = 'N';
573
- recaller.reCall(requestBody);
574
- };
575
- form.openPopup();
576
- }
577
- else {
578
- application.confirm(title, message, null, 'warn', {
579
- labelCancel: "Cancelar",
580
- labelConfirm: "Sim"
581
- }).then((confirmResult) => {
582
- if (confirmResult) {
583
- param.paramName = CONFIRMACAO;
584
- param.$ = 'S';
585
- recaller.reCall(requestBody);
586
- }
587
- });
588
- }
578
+ form.openPopup();
579
+ }
580
+ else {
581
+ application.confirm(title, message, null, 'warn', {
582
+ labelCancel: "Cancelar",
583
+ labelConfirm: "Sim"
584
+ }).then(async (confirmResult) => {
585
+ if (confirmResult) {
586
+ param.paramName = CONFIRMACAO;
587
+ param.$ = 'S';
588
+ await recaller.reCall(requestBody);
589
+ resolve();
590
+ }
591
+ });
592
+ }
593
+ });
589
594
  }
590
595
  }
591
596
 
@@ -26,13 +26,13 @@ class JavaExecutor {
26
26
  resolve({ execSource, callback: this.callExecJava });
27
27
  });
28
28
  }
29
- callExecJava(execSource) {
29
+ async callExecJava(execSource) {
30
30
  const request = {
31
31
  requestBody: {
32
32
  javaCall: execSource
33
33
  }
34
34
  };
35
- DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_JAVA, JSON.stringify(request));
35
+ await DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_JAVA, JSON.stringify(request));
36
36
  }
37
37
  }
38
38
 
@@ -48,11 +48,11 @@ class JavascriptExecutor {
48
48
  resolve({ execSource, callback: this.callExecScript });
49
49
  });
50
50
  }
51
- callExecScript(execSource) {
51
+ async callExecScript(execSource) {
52
52
  const request = {
53
53
  runScript: execSource
54
54
  };
55
- DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_SCRIPT, request);
55
+ await DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_SCRIPT, request);
56
56
  }
57
57
  }
58
58
 
@@ -114,13 +114,13 @@ class ProcedureExecutor {
114
114
  resolve({ execSource, callback: this.callExecProcedure });
115
115
  });
116
116
  }
117
- callExecProcedure(execSource) {
117
+ async callExecProcedure(execSource) {
118
118
  const request = {
119
119
  requestBody: {
120
120
  stpCall: execSource
121
121
  }
122
122
  };
123
- DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_STP, JSON.stringify(request));
123
+ await DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_STP, JSON.stringify(request));
124
124
  }
125
125
  }
126
126
 
@@ -503,86 +503,91 @@ class Actions {
503
503
  const CONFIRMACAO = "__CONFIRMACAO__";
504
504
  const ESCOLHA_SIM_NAO = "__ESCOLHA_SIMNAO__";
505
505
  class ClientEventConfirm {
506
- clientConfirm(clientEvent, recaller) {
507
- const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
508
- let actionType = "";
509
- if (clientEvent.content.event.hasOwnProperty('stpCall')) {
510
- recaller.requestBody = clientEvent.content.event.stpCall;
511
- actionType = ActionsType.PROCEDURE;
512
- }
513
- else if (clientEvent.content.event.hasOwnProperty('runScript')) {
514
- recaller.requestBody = clientEvent.content.event.runScript;
515
- actionType = ActionsType.JAVASCRIPT;
516
- }
517
- else if (clientEvent.content.event.hasOwnProperty('javaCall')) {
518
- recaller.requestBody = clientEvent.content.event.javaCall;
519
- actionType = ActionsType.JAVA;
520
- }
521
- let param = {
522
- type: 'S',
523
- sequence: clientEvent.content.event.sequence
524
- };
525
- if (!recaller.requestBody.params) {
526
- recaller.requestBody.params = {
527
- param: []
506
+ async clientConfirm(clientEvent, recaller) {
507
+ return new Promise((resolve) => {
508
+ const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
509
+ let actionType = "";
510
+ if (clientEvent.content.event.hasOwnProperty('stpCall')) {
511
+ recaller.requestBody = clientEvent.content.event.stpCall;
512
+ actionType = ActionsType.PROCEDURE;
513
+ }
514
+ else if (clientEvent.content.event.hasOwnProperty('runScript')) {
515
+ recaller.requestBody = clientEvent.content.event.runScript;
516
+ actionType = ActionsType.JAVASCRIPT;
517
+ }
518
+ else if (clientEvent.content.event.hasOwnProperty('javaCall')) {
519
+ recaller.requestBody = clientEvent.content.event.javaCall;
520
+ actionType = ActionsType.JAVA;
521
+ }
522
+ let param = {
523
+ type: 'S',
524
+ sequence: clientEvent.content.event.sequence
528
525
  };
529
- }
530
- else {
531
- if (!Array.isArray(recaller.requestBody.params.param)) {
532
- recaller.requestBody.params.param = [recaller.requestBody.params.param];
526
+ if (!recaller.requestBody.params) {
527
+ recaller.requestBody.params = {
528
+ param: []
529
+ };
533
530
  }
534
- }
535
- recaller.requestBody.params.param.push(param);
536
- const title = clientEvent.content.event.title.$;
537
- const message = clientEvent.content.event.message.$;
538
- let requestBody;
539
- switch (actionType) {
540
- case ActionsType.JAVASCRIPT:
541
- requestBody = { runScript: recaller.requestBody };
542
- break;
543
- case ActionsType.PROCEDURE:
544
- requestBody = {
545
- requestBody: {
546
- stpCall: recaller.requestBody
547
- }
531
+ else {
532
+ if (!Array.isArray(recaller.requestBody.params.param)) {
533
+ recaller.requestBody.params.param = [recaller.requestBody.params.param];
534
+ }
535
+ }
536
+ recaller.requestBody.params.param.push(param);
537
+ const title = clientEvent.content.event.title.$;
538
+ const message = clientEvent.content.event.message.$;
539
+ let requestBody;
540
+ switch (actionType) {
541
+ case ActionsType.JAVASCRIPT:
542
+ requestBody = { runScript: recaller.requestBody };
543
+ break;
544
+ case ActionsType.PROCEDURE:
545
+ requestBody = {
546
+ requestBody: {
547
+ stpCall: recaller.requestBody
548
+ }
549
+ };
550
+ break;
551
+ case ActionsType.JAVA:
552
+ requestBody = {
553
+ requestBody: {
554
+ javaCall: recaller.requestBody
555
+ }
556
+ };
557
+ break;
558
+ }
559
+ if (clientEvent.content.event.showNoOption == 'S') {
560
+ param.paramName = ESCOLHA_SIM_NAO;
561
+ const form = document.createElement("snk-client-confirm");
562
+ window.document.body.appendChild(form);
563
+ form.titleMessage = title;
564
+ form.message = message;
565
+ form.accept = async () => {
566
+ param.$ = 'S';
567
+ await recaller.reCall(requestBody);
568
+ resolve();
548
569
  };
549
- break;
550
- case ActionsType.JAVA:
551
- requestBody = {
552
- requestBody: {
553
- javaCall: recaller.requestBody
554
- }
570
+ form.cancel = async () => {
571
+ param.$ = 'N';
572
+ await recaller.reCall(requestBody);
573
+ resolve();
555
574
  };
556
- break;
557
- }
558
- if (clientEvent.content.event.showNoOption == 'S') {
559
- param.paramName = ESCOLHA_SIM_NAO;
560
- const form = document.createElement("snk-client-confirm");
561
- window.document.body.appendChild(form);
562
- form.titleMessage = title;
563
- form.message = message;
564
- form.accept = () => {
565
- param.$ = 'S';
566
- recaller.reCall(requestBody);
567
- };
568
- form.cancel = () => {
569
- param.$ = 'N';
570
- recaller.reCall(requestBody);
571
- };
572
- form.openPopup();
573
- }
574
- else {
575
- application.confirm(title, message, null, 'warn', {
576
- labelCancel: "Cancelar",
577
- labelConfirm: "Sim"
578
- }).then((confirmResult) => {
579
- if (confirmResult) {
580
- param.paramName = CONFIRMACAO;
581
- param.$ = 'S';
582
- recaller.reCall(requestBody);
583
- }
584
- });
585
- }
575
+ form.openPopup();
576
+ }
577
+ else {
578
+ application.confirm(title, message, null, 'warn', {
579
+ labelCancel: "Cancelar",
580
+ labelConfirm: "Sim"
581
+ }).then(async (confirmResult) => {
582
+ if (confirmResult) {
583
+ param.paramName = CONFIRMACAO;
584
+ param.$ = 'S';
585
+ await recaller.reCall(requestBody);
586
+ resolve();
587
+ }
588
+ });
589
+ }
590
+ });
586
591
  }
587
592
  }
588
593
 
@@ -0,0 +1 @@
1
+ import{r as t,h as s,H as i,g as e}from"./p-d2d301a6.js";import{ApplicationContext as n,StringUtils as o,ErrorException as a,WarningException as c,ObjectUtils as r,DateUtils as l,ArrayUtils as h,ElementIDUtils as u}from"@sankhyalabs/core";import{D as d}from"./p-4f7b9c50.js";import{P as p}from"./p-eaad0aa8.js";import"./p-efb2e247.js";import"./p-5534e08c.js";import"./p-9e7d65a4.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-85635c64.js";import"./p-584d7212.js";import"./p-0f2b03e5.js";import{R as m}from"./p-688dcb4c.js";import"./p-112455b1.js";import"./p-8d884fab.js";class v{execute(t){var s;const i={actionID:t.actionID,refreshType:null===(s=t.actionConfig.javaCall)||void 0===s?void 0:s.refreshType};return new Promise((t=>{t({execSource:i,callback:this.callExecJava})}))}async callExecJava(t){const s={requestBody:{javaCall:t}};await d.get().callServiceBroker("ActionButtonsSP.executeJava",JSON.stringify(s))}}class b{execute(t){var s;const i={actionID:t.actionID,refreshType:null===(s=t.actionConfig.runScript)||void 0===s?void 0:s.refreshType};return new Promise((t=>{t({execSource:i,callback:this.callExecScript})}))}async callExecScript(t){const s={runScript:t};await d.get().callServiceBroker("ActionButtonsSP.executeScript",s)}}class w{constructor(){this._application=n.getContextValue("__SNK__APPLICATION__")}async execute(t,s){const i=t.resourceID;if(!i)return;let e=await this.buildLaunchObject(t,s);return this._application.openApp(i,e),null}buildLaunchObject(t,s){return new Promise((i=>{let e=t.actionConfig.params.param;if(e&&e.length>0){let n={},c=[];e.forEach((i=>{const e=i.localField;let r=s.getFieldValue(e);if(!r){let i=s.getField(e).label;throw i=o.isEmpty(s.getField(e).label)?e:i,new a(this._application.messagesBuilder.getMessage("snkActionsButton.title.error",void 0),this._application.messagesBuilder.getMessage("snkActionsButton.launchScreen.emptyField",{description:t.description,localFieldLabel:i}))}r=o.isEmpty(r.toString())?void 0:r.toString(),n[i.targetField]=r,c.push({fieldName:i.targetField,value:r})})),n.ACTION_PARAMETERS=c,n.call_time=Date.now(),i(n)}i(null)}))}}class k{execute(t){var s,i,e;const n=null===(s=t.actionConfig.dbCall)||void 0===s?void 0:s.name,o=null===(i=t.actionConfig.dbCall)||void 0===i?void 0:i.rootEntity,a={actionID:t.actionID,refreshType:null===(e=t.actionConfig.dbCall)||void 0===e?void 0:e.refreshType,procName:n,rootEntity:o};return new Promise((t=>{t({execSource:a,callback:this.callExecProcedure})}))}async callExecProcedure(t){const s={requestBody:{stpCall:t}};await d.get().callServiceBroker("ActionButtonsSP.executeSTP",JSON.stringify(s))}}var f,_;!function(t){t.LAUNCH_SCREEN="LC",t.JAVASCRIPT="SC",t.JAVA="RJ",t.PROCEDURE="SP",t.EMBEDDED="EB"}(f||(f={}));class y{constructor(t){this.actionType=t,this._application=n.getContextValue("__SNK__APPLICATION__")}get executor(){switch(this.actionType){case f.LAUNCH_SCREEN:return new w;case f.JAVASCRIPT:return new b;case f.JAVA:return new v;case f.PROCEDURE:return new k;default:throw new a(this._application.messagesBuilder.getMessage("snkActionsButton.title.error",void 0),this._application.messagesBuilder.getMessage("snkActionsButton.action.nonExistentType",{actionType:this.actionType}))}}}!function(t){t.NONE="NONE",t.PARENT="PARENT",t.MASTER="MASTER",t.ALL="ALL"}(_||(_={}));const S="__MASTER_ROW__";class P{constructor(t,s,i){var e;this._lastValuesCache={},this._actionsExecuteInterface=t,this._dataUnit=s,this._selectedRows=(null===(e=null==s?void 0:s.getSelectionInfo())||void 0===e?void 0:e.isAllRecords())?[]:null==s?void 0:s.getSelectionInfo().records,this._application=n.getContextValue("__SNK__APPLICATION__"),this._appResourceId=i}apply(t,s){this._application.closePopUp(),this._actionsExecuteInterface.execute(t,this._dataUnit).then((({execSource:i,callback:e})=>{this.resolvePromptParams(t,i,s).then((()=>{this.actionExecute(i,e)}))}))}async execute(t){var s;if(!t.actionConfig)throw new c(this._application.messagesBuilder.getMessage("snkActionsButton.title.warning",void 0),this._application.messagesBuilder.getMessage("snkActionsButton.action.incorrectAction",{description:t.description}));if(null===(s=t.actionConfig.params)||void 0===s?void 0:s.promptParam){const s=t.actionConfig.params.promptParam;let i=!1;for(let t=0;t<s.length;t++)if(!i&&"true"===s[t].saveLast){i=!0;break}i&&(t.actionConfig.params.promptParam=await this.loadSavedValuesIntoParams(t));const e=document.createElement("snk-actions-form");window.document.body.appendChild(e),e.action=r.copy(t),e.applyParameters=t=>{this.apply(t,i)},e.openPopup()}else t.type!=f.LAUNCH_SCREEN?this._actionsExecuteInterface.execute(t,this._dataUnit).then((({execSource:t,callback:s})=>{this.actionExecute(t,s)})):this._actionsExecuteInterface.execute(t,this._dataUnit)}loadSavedValuesIntoParams(t){return this.loadLastValues(t).then((s=>{let i=t.actionConfig.params.promptParam;return s&&s.param.forEach((t=>{i=i.map((s=>s.name!==t.paramName?s:Object.assign(Object.assign({},s),"B"===s.paramType?{value:"S"===t.$}:{value:t.$})))})),i}))}actionExecute(t,s){t.virtualPage=this.buildVirtualPage(),this.prepareAndExecute(t,s),this.recordsReloader(t.refreshType)}resolvePromptParams(t,s,i){return new Promise((e=>{let n=[];t.actionConfig.params.promptParam.forEach((t=>{n.push(this.buildPromptParam(t))})),this.putParamsOnExecSource(n,s),i&&this.saveLastValues(t,n),e()}))}buildPromptParam(t){let s,i,e=t.paramType,n=!1,o=t.value;switch(e){case p.DATE:e="D";break;case p.DATETIME:e="H";break;case p.DECIMAL:e="F",s={"sk-precision":Number(t.precision)};break;case p.BOOLEAN:e="S",n=!0,o=t.value?"S":"N";break;case p.ENTITY:s={"sk-entity-name":t.entityName,"sk-allow-show-hierarchical-mode":t.hierarchyEntity,"sk-data-type":"S"},t.hierarchyEntity&&t.entityPK&&(i=t.entityPK),o=t.value?Number(t.value):null;break;case p.OPTIONS:e="O";let a=t.options.split(";").map((function(t,s){let i,e;if(t.indexOf("=")>-1){let s=t.split("=");i=s[0],e=s[1]}else i=s+1,e=t;return{data:i,value:e}}));s={"sk-options":a}}return{description:t.label,required:"true"==t.required,fieldName:t.name,fieldNameOri:t.name,entityPK:i,paramType:t.paramType,type:e,isCheckbox:n,saveLast:t.saveLast,fieldProp:s,value:o,isGeneratedName:t.isGeneratedName}}putParamsOnExecSource(t,s){s.params={param:[]},t.forEach((t=>{if(t.isGeneratedName&&t.value)throw new a(this._application.messagesBuilder.getMessage("snkActionsButton.title.error",void 0),this._application.messagesBuilder.getMessage("snkActionsButton.action.emptyParamName",void 0));o.isEmpty(t.value)||s.params.param.push({type:this.getParamDataType(t.paramType),paramName:t.fieldName,$:this.getParamValue(t)})}))}getParamDataType(t){let s;switch(t){case"D":s="F";break;case"DT":case"DH":s="D";break;case"B":case"ENTITY":case"SO":s="S";break;default:s=t}return s}getParamValue(t){let s=t.value;return s?("DT"==t.paramType?s=l.formatDate(s):"DH"==t.paramType&&(s=l.formatDateTime(s)),s):s}async loadLastValues(t){const s=await this.buildResourceId(t.actionID);return new Promise(((t,i)=>{if(this._lastValuesCache[s])t(this._lastValuesCache[s]);else{const e={config:{chave:s,tipo:"T"}};d.get().callServiceBroker("SystemUtilsSP.getConf",e).then((i=>{var e,n;let o;(null===(n=null===(e=i.config)||void 0===e?void 0:e.data)||void 0===n?void 0:n.params)&&(o=i.config.data.params,Array.isArray(o.param)||(o.param=[o.param])),this._lastValuesCache[s]=o,t(o)})).catch((t=>{i(t)}))}}))}async saveLastValues(t,s){if(this._application){let i={params:{param:[]}};s.forEach((t=>{"true"==t.saveLast&&i.params.param.push({paramName:t.fieldName,$:t.value})}));const e=await this.buildResourceId(t.actionID);this._lastValuesCache[e]=i.params,this._application.saveConfig(e,i)}}async buildResourceId(t){return this._appResourceId+".actionconfig."+t}prepareAndExecute(t,s){this.addRows(t),s(t)}addRows(t){const s={row:[]},i=this._selectedRows;for(const t in i){const e=i[t],n={};e.hasOwnProperty(S)&&(n.master="S",n.entityName=e.__ENTITY_NAME__,delete e[S],delete e.__ENTITY_NAME__);for(const t in e)"NUFIN"===t&&(n.field||(n.field=[]),n.field.push({fieldName:t,$:e[t]}));s.row.push(n)}s.row.length>0&&(t.rows=s)}recordsReloader(t){switch(t){case _.NONE:break;case _.PARENT:case _.MASTER:case _.ALL:this._dataUnit.loadData();break;default:this._dataUnit.reloadCurrentRecord()}}buildVirtualPage(){var t,s,i,e;if(null===(s=null===(t=this._dataUnit)||void 0===t?void 0:t.getSelectionInfo())||void 0===s?void 0:s.isAllRecords())return{filters:{filters:null===(i=this._dataUnit)||void 0===i?void 0:i.getAppliedFilters()},orders:{orders:null===(e=this._dataUnit)||void 0===e?void 0:e.getSort()}}}}class A{async clientConfirm(t,s){return new Promise((i=>{const e=n.getContextValue("__SNK__APPLICATION__");let o="";t.content.event.hasOwnProperty("stpCall")?(s.requestBody=t.content.event.stpCall,o=f.PROCEDURE):t.content.event.hasOwnProperty("runScript")?(s.requestBody=t.content.event.runScript,o=f.JAVASCRIPT):t.content.event.hasOwnProperty("javaCall")&&(s.requestBody=t.content.event.javaCall,o=f.JAVA);let a={type:"S",sequence:t.content.event.sequence};s.requestBody.params?Array.isArray(s.requestBody.params.param)||(s.requestBody.params.param=[s.requestBody.params.param]):s.requestBody.params={param:[]},s.requestBody.params.param.push(a);const c=t.content.event.title.$,r=t.content.event.message.$;let l;switch(o){case f.JAVASCRIPT:l={runScript:s.requestBody};break;case f.PROCEDURE:l={requestBody:{stpCall:s.requestBody}};break;case f.JAVA:l={requestBody:{javaCall:s.requestBody}}}if("S"==t.content.event.showNoOption){a.paramName="__ESCOLHA_SIMNAO__";const t=document.createElement("snk-client-confirm");window.document.body.appendChild(t),t.titleMessage=c,t.message=r,t.accept=async()=>{a.$="S",await s.reCall(l),i()},t.cancel=async()=>{a.$="N",await s.reCall(l),i()},t.openPopup()}else e.confirm(c,r,null,"warn",{labelCancel:"Cancelar",labelConfirm:"Sim"}).then((async t=>{t&&(a.paramName="__CONFIRMACAO__",a.$="S",await s.reCall(l),i())}))}))}}const N=class{constructor(s){t(this,s),this.CLIENT_EVENT_CONFIRM_NAME="br.com.sankhya.actionbutton.clientconfirm",this.handleClick=t=>{const s=this._actions.find((s=>s.actionID==t.detail.id)),i=new y(s.type).executor;new P(i,this._dataUnit,this._resourceID).execute(Object.assign({},s)),this._showDropdown=!1},this._items=[],this._showDropdown=!1,this._actions=[],this._isOrderActions=!1}async getActions(){let t={param:{entityName:this._entityName,resourceID:this._resourceID}};return d.get().callServiceBroker("ActionButtonsSP.getActions",t).then((t=>{var s;(null===(s=t.actions)||void 0===s?void 0:s.action)&&(this._actions=this._isOrderActions?h.sortAlphabetically(t.actions.action,"description"):t.actions.action)}))}controlDropdown(){this._showDropdown=!this._showDropdown}canShowDropdown(){var t;return this._showDropdown&&(null===(t=this._items)||void 0===t?void 0:t.length)>0}positionDropdown(){var t;const s=null===(t=this._ezButton)||void 0===t?void 0:t.getBoundingClientRect();s&&this._dropdownParent&&(this._dropdownParent.style.top=s.y+s.height+5+"px",this._dropdownParent.style.left=s.x+"px")}closeDropdown(t){const s=null==t?void 0:t.target;s&&(s.closest(".snk-actions-button")||(this._showDropdown=!1))}setEvents(){document.removeEventListener("click",this.closeDropdown.bind(this)),document.addEventListener("click",this.closeDropdown.bind(this)),document.removeEventListener("scroll",this.positionDropdown.bind(this)),document.addEventListener("scroll",this.positionDropdown.bind(this))}async componentWillLoad(){this._application=n.getContextValue("__SNK__APPLICATION__"),this._isOrderActions=await this._application.getBooleanParam("global.ordenar.acoes.personalizadas");const t=this._element.parentElement;this._dataUnit=null==t?void 0:t.dataUnit,this._resourceID=null==t?void 0:t.resourceID,this._entityName=this._dataUnit.name.split("/")[2],null==this._resourceID&&(this._resourceID=await m.getResourceID()),this.setEvents(),this.getActions().then((()=>{this.loadItems()}))}async componentDidLoad(){if(this._element&&(u.addIDInfo(this._element),this.positionDropdown(),!await this._application.hasClientEvent(this.CLIENT_EVENT_CONFIRM_NAME))){const t=new A;this._application.addClientEvent(this.CLIENT_EVENT_CONFIRM_NAME,t.clientConfirm)}}componentDidUpdate(){this.positionDropdown()}loadItems(){this._actions&&0!=this._actions.length&&this._actions.forEach((t=>{this._items.push({id:t.actionID,label:t.description})}))}getElementID(t){return{[u.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:u.getInternalIDInfo(t)}}render(){return s(i,null,this._actions&&this._actions.length>0&&s("div",{class:`ez-padding-left--medium snk-actions-button \n ${this.canShowDropdown()?" snk-actions-button--overlap":""}\n `},s("ez-button",Object.assign({ref:t=>this._ezButton=t,iconName:"acao",size:"small",mode:"icon",title:this._application.messagesBuilder.getMessage("snkActionsButton.title.actions",void 0),onClick:()=>this.controlDropdown()},this.getElementID("button"))),s("div",Object.assign({ref:t=>this._dropdownParent=t,class:(this.canShowDropdown()?"snk-actions-button__dropdown--show":"snk-actions-button__dropdown")+"\n "},this.getElementID("dropdown")),this.canShowDropdown()&&s("ez-dropdown",Object.assign({items:this._items,onEzClick:t=>this.handleClick(t)},this.getElementID("dropdown"))))),this.canShowDropdown()&&s("div",Object.assign({class:"ez-scrim ez-scrim--light"},this.getElementID("ezScrim"))))}get _element(){return e(this)}};N.style=".sc-snk-actions-button-h{--snk-actions-button--z-index:var(--most-visible, 3);display:flex;width:fit-content;height:fit-content}.snk-actions-button.sc-snk-actions-button{display:flex;width:fit-content;height:fit-content}.snk-actions-button__dropdown--show.sc-snk-actions-button{display:flex;flex-direction:column;position:fixed}.snk-actions-button__dropdown.sc-snk-actions-button>ez-dropdown.sc-snk-actions-button{position:relative}.snk-actions-button--overlap.sc-snk-actions-button{z-index:var(--snk-actions-button--z-index)}.snk-actions-button__dropdown.sc-snk-actions-button{display:none}";export{N as snk_actions_button}
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-d2d301a6.js";export{s as setNonce}from"./p-d2d301a6.js";(()=>{const t=import.meta.url,i={};return""!==t&&(i.resourcesUrl=new URL(".",t).href),e(i)})().then((e=>t(JSON.parse('[["p-118e769b",[[1,"teste-pesquisa"]]],["p-5d04ae42",[[0,"snk-filter-modal",{"getMessage":[16],"configName":[1025,"config-name"],"filters":[1040],"applyFilters":[16],"closeModal":[16],"addPersonalizedFilter":[16],"editPersonalizedFilter":[16]}]]],["p-ac8d1cd6",[[2,"snk-actions-form",{"action":[16],"applyParameters":[16],"dataUnit":[32],"openPopup":[64]}]]],["p-9531fd46",[[2,"snk-client-confirm",{"titleMessage":[1,"title-message"],"message":[1],"accept":[16],"cancel":[16],"openPopup":[64]}]]],["p-69754d94",[[6,"snk-custom-slot-elements",{"slotName":[1,"slot-name"]}]]],["p-d4f9ee17",[[2,"snk-entity-list",{"config":[1040],"rightListSlotBuilder":[1040],"maxHeightList":[1,"max-height-list"],"_searchValue":[32],"_ezListSource":[32],"reloadList":[64]}]]],["p-eb636e15",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"presentationMode":[2,"presentation-mode"],"resetValues":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-a1e1b305",[[4,"snk-filter-list",{"label":[1],"iconName":[1,"icon-name"],"items":[16],"getMessage":[16],"emptyText":[1,"empty-text"],"findFilterText":[1,"find-filter-text"],"buttonClass":[1,"button-class"],"_filterArgument":[32],"_showAll":[32],"hideDetail":[64]},[[2,"keydown","keyDownHandler"]]]]],["p-cb37982f",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-e3a82e1c",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-959e0835",[[0,"snk-filter-period",{"config":[16],"getMessage":[16],"value":[8],"presentationMode":[2,"presentation-mode"],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-fe49067d",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-96a89d58",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["p-26ad62b9",[[2,"snk-personalized-filter-editor",{"messagesBuilder":[1040],"presentationMode":[2,"presentation-mode"],"config":[16],"value":[1040],"items":[32],"show":[64]}]]],["p-72fc257b",[[2,"snk-print-selector",{"_printServerActive":[32],"_selectedPrinter":[32],"_remotePrintersDataSource":[32],"_localPrintersDataSource":[32],"_printJobData":[32],"openPrintSelector":[64]}]]],["p-1b985000",[[0,"snk-filter-modal-item",{"filterItem":[1040],"configName":[1025,"config-name"],"resourceID":[1,"resource-i-d"]}]]],["p-989937ee",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["p-88aa931b",[[6,"snk-simple-bar",{"label":[1],"breadcrumbItens":[16],"messagesBuilder":[1040]}]]],["p-7cbbb6e3",[[6,"snk-detail-view",{"formConfigManager":[1040],"dataUnitName":[1,"data-unit-name"],"resourceID":[1,"resource-i-d"],"guideItemPath":[16],"entityName":[1,"entity-name"],"label":[1],"dataUnit":[1040],"selectedForm":[1025,"selected-form"],"dataState":[1040],"messagesBuilder":[1040],"branchGuide":[16],"canEdit":[4,"can-edit"],"taskbarCustomContainerId":[1,"taskbar-custom-container-id"],"_disabledButtons":[32],"_currentView":[32],"attachmentRegisterKey":[32],"changeViewMode":[64],"configGrid":[64],"showUp":[64]},[[0,"snkContentCardChanged","onContentCardChanged"]]]]],["p-73d3daa8",[[2,"snk-configurator",{"showActionButtons":[4,"show-action-buttons"],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"viewMode":[2,"view-mode"],"customContainerId":[1,"custom-container-id"],"messagesBuilder":[1040],"_opened":[32],"_permissions":[32],"open":[64],"close":[64]}]]],["p-247a8b36",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["p-0885ed3c",[[2,"snk-filter-field-search",{"searchable":[4],"fieldsDataSource":[16],"breadcrumbItems":[32],"linkItems":[32],"fieldItems":[32],"searchEmpty":[32],"groupEmpty":[32],"show":[64],"applyFilter":[64]}],[0,"snk-filter-param-config",{"messagesBuilder":[1040],"_opened":[32],"_configType":[32],"_expressionItem":[32],"_informedInstance":[32],"_canSave":[32],"open":[64],"close":[64]}]]],["p-9d3a025a",[[2,"snk-expression-group",{"parentTop":[1026,"parent-top"],"group":[1040],"messagesBuilder":[1040],"filterId":[1025,"filter-id"],"entityURI":[1025,"entity-u-r-i"],"_conditionOperator":[32],"_group":[32],"_selfTop":[32],"canAddExpression":[32],"_showDashes":[32],"getExpressionGroup":[64]},[[8,"ezExpressionLayoutChanged","todoCompletedHandler"]]],[2,"snk-expression-item",{"expression":[16],"canRemove":[516,"can-remove"],"messagesBuilder":[1040],"entityURI":[1025,"entity-u-r-i"],"_showValueVariable":[32],"_fieldSelected":[32],"_optionNotNull":[32]}]]],["p-25c5428f",[[2,"snk-filter-assistent-mode",{"filterAssistent":[1040],"messagesBuilder":[1040],"filterId":[1025,"filter-id"],"entityUri":[1025,"entity-uri"],"application":[1040]}],[2,"snk-filter-advanced-mode",{"filterAssistent":[1040],"application":[1040]}]]],["p-de9eb242",[[2,"snk-personalized-filter",{"messagesBuilder":[1040],"entityUri":[1025,"entity-uri"],"filterId":[1025,"filter-id"],"configName":[1025,"config-name"],"resourceID":[1,"resource-i-d"],"_filterAssistentMode":[32],"_filterAssistent":[32],"createPersonalizedFilter":[64]}]]],["p-43f36d85",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"filterConfig":[1040],"messagesBuilder":[1040],"allowDefault":[32],"scrollerLocked":[32],"showPersonalizedFilter":[32],"personalizedFilterId":[32],"reload":[64]},[[0,"filterChange","filterChangeListener"]]]]],["p-bd628455",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"messagesBuilder":[1040],"_defaultType":[32]}]]],["p-f30526a7",[[2,"snk-field-config",{"isConfigActive":[16],"fieldConfig":[16],"modeInsertion":[516,"mode-insertion"],"dataUnit":[16],"messagesBuilder":[1040]}]]],["p-d3ec3586",[[6,"snk-tab-config",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"tabItems":[16],"messagesBuilder":[1040],"_processedTabs":[32],"_activeEditText":[32],"_activeEditTextIndex":[32],"_actionsHide":[32],"_actionsShow":[32]}]]],["p-562896d0",[[2,"snk-form-config",{"dataUnit":[16],"configManager":[16],"messagesBuilder":[1040],"_formConfigOptions":[32],"_fieldConfigSelected":[32],"_layoutFormConfig":[32],"_fieldsAvailable":[32],"_formConfig":[32],"_formConfigChanged":[32],"_optionFormConfigSelected":[32],"_optionFormConfigChanged":[32],"_tempGroups":[32]}]]],["p-838f8234",[[1,"snk-select-box",{"selectedOption":[1,"selected-option"]}]]],["p-9246d7df",[[2,"snk-grid-config",{"selectedIndex":[1026,"selected-index"],"application":[16],"columns":[1040],"config":[1040],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"]}]]],["p-f9395c20",[[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]]]],["p-9af040ba",[[2,"snk-data-unit",{"dataState":[1040],"messagesBuilder":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"useCancelConfirm":[4,"use-cancel-confirm"],"ignoreSaveMessage":[4,"ignore-save-message"],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"getDataUnit":[64],"getSelectedRecordsIDsInfo":[64]}]]],["p-219f888d",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["p-54efcc8d",[[2,"snk-data-exporter",{"provider":[16],"messagesBuilder":[1040],"_items":[32],"_showDropdown":[32],"_releasedToExport":[32]}]]],["p-d4fb9642",[[6,"snk-taskbar",{"customSlotId":[1,"custom-slot-id"],"customContainerId":[1,"custom-container-id"],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"presentationMode":[1537,"presentation-mode"],"messagesBuilder":[1040],"_permissions":[32],"_customElements":[32],"_customElementsId":[32],"_slotContainer":[32]}]]],["p-5bd7932e",[[6,"snk-grid",{"columnFilterDataSource":[1040],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"selectionToastConfig":[16],"actionsList":[16],"isDetail":[4,"is-detail"],"taskbarManager":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"messagesBuilder":[1040],"useEnterLikeTab":[4,"use-enter-like-tab"],"recordsValidator":[16],"canEdit":[4,"can-edit"],"taskbarCustomContainerId":[1,"taskbar-custom-container-id"],"gridHeaderCustomSlotId":[1,"grid-header-custom-slot-id"],"topTaskbarCustomSlotId":[1,"top-taskbar-custom-slot-id"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"showConfig":[64],"hideConfig":[64],"setConfig":[64],"reloadFilterBar":[64]}]]],["p-503c9774",[[6,"snk-guides-viewer",{"dataUnit":[16],"dataState":[16],"configName":[1,"config-name"],"entityPath":[1,"entity-path"],"actionsList":[16],"recordsValidator":[16],"masterFormConfig":[1040],"selectedGuide":[16],"taskbarManager":[16],"messagesBuilder":[1040],"canEdit":[4,"can-edit"],"presentationMode":[1,"presentation-mode"],"resourceID":[1,"resource-i-d"],"detailTaskbarCustomContainerId":[1,"detail-taskbar-custom-container-id"],"_breadcrumbItems":[32],"_guides":[32],"_formEditorConfigManager":[32],"_formEditorDataUnit":[32],"showFormConfig":[64]},[[2,"actionClick","onActionClick"],[0,"snkContentCardChanged","onContentCardChanged"]]]]],["p-e350860d",[[6,"snk-crud",{"configName":[1025,"config-name"],"selectionToastConfig":[16],"showActionButtons":[4,"show-action-buttons"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"messagesBuilder":[1040],"useEnterLikeTab":[4,"use-enter-like-tab"],"_dataUnit":[32],"_dataState":[32],"attachmentRegisterKey":[32],"_currentViewMode":[32],"_canEdit":[32],"_resourceID":[32],"customContainerId":[32],"goToView":[64],"openConfigurator":[64],"closeConfigurator":[64],"reloadFilterBar":[64]}]]],["p-afdb6ddc",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"messagesBuilder":[1040],"resourceID":[1,"resource-i-d"],"_dataUnit":[32],"_dataState":[32],"_showFormConfig":[32],"_configManager":[32],"showConfig":[64],"hideConfig":[64]}]]],["p-f5dbb069",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"loadByPK":[16],"isUserSup":[64],"addPendingAction":[64],"callServiceBroker":[64],"initOnboarding":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"webConnection":[64],"createDataunit":[64],"updateDataunitCache":[64],"getDataUnit":[64],"addClientEvent":[64],"removeClientEvent":[64],"hasClientEvent":[64],"getResourceID":[64],"getUserID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadTotals":[64],"isLoadedByPk":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64],"getAppLabel":[64],"addSearchListener":[64],"importScript":[64],"getApplicationPath":[64],"executeSelectDistinct":[64],"getDataFetcher":[64]}]]],["p-441cce40",[[6,"snk-simple-crud",{"dataState":[16],"dataUnit":[16],"mode":[2],"gridConfig":[16],"formConfig":[16],"multipleSelection":[4,"multiple-selection"],"useCancelConfirm":[4,"use-cancel-confirm"],"taskbarManager":[16],"messagesBuilder":[1040],"useEnterLikeTab":[4,"use-enter-like-tab"],"_currentViewMode":[32],"_config":[32],"goToView":[64],"setMetadata":[64],"setRecords":[64],"getRecords":[64]},[[0,"actionClick","actionClickListener"]]]]],["p-cc232268",[[2,"snk-attach",{"registerKey":[1,"register-key"],"entityName":[1,"entity-name"],"messagesBuilder":[1040],"dataUnit":[32],"crudConfig":[32]}]]],["p-26b0ce3e",[[2,"snk-form-summary",{"fixed":[1540],"contracted":[1540],"summary":[16]}]]],["p-c555075c",[[6,"snk-form-view",{"levelPath":[1,"level-path"],"label":[1],"name":[1],"fields":[16],"formMetadata":[8,"form-metadata"],"dataUnit":[16],"contracted":[4],"fixed":[1540],"summaryFields":[16],"canExpand":[4,"can-expand"],"canFix":[4,"can-fix"],"recordsValidator":[16],"showUp":[64]}]]],["p-617bc4c1",[[2,"snk-actions-button",{"_items":[32],"_showDropdown":[32],"_actions":[32],"_isOrderActions":[32]}]]]]'),e)));
1
+ import{p as e,b as t}from"./p-d2d301a6.js";export{s as setNonce}from"./p-d2d301a6.js";(()=>{const t=import.meta.url,i={};return""!==t&&(i.resourcesUrl=new URL(".",t).href),e(i)})().then((e=>t(JSON.parse('[["p-118e769b",[[1,"teste-pesquisa"]]],["p-5d04ae42",[[0,"snk-filter-modal",{"getMessage":[16],"configName":[1025,"config-name"],"filters":[1040],"applyFilters":[16],"closeModal":[16],"addPersonalizedFilter":[16],"editPersonalizedFilter":[16]}]]],["p-ac8d1cd6",[[2,"snk-actions-form",{"action":[16],"applyParameters":[16],"dataUnit":[32],"openPopup":[64]}]]],["p-9531fd46",[[2,"snk-client-confirm",{"titleMessage":[1,"title-message"],"message":[1],"accept":[16],"cancel":[16],"openPopup":[64]}]]],["p-69754d94",[[6,"snk-custom-slot-elements",{"slotName":[1,"slot-name"]}]]],["p-d4f9ee17",[[2,"snk-entity-list",{"config":[1040],"rightListSlotBuilder":[1040],"maxHeightList":[1,"max-height-list"],"_searchValue":[32],"_ezListSource":[32],"reloadList":[64]}]]],["p-eb636e15",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"presentationMode":[2,"presentation-mode"],"resetValues":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-a1e1b305",[[4,"snk-filter-list",{"label":[1],"iconName":[1,"icon-name"],"items":[16],"getMessage":[16],"emptyText":[1,"empty-text"],"findFilterText":[1,"find-filter-text"],"buttonClass":[1,"button-class"],"_filterArgument":[32],"_showAll":[32],"hideDetail":[64]},[[2,"keydown","keyDownHandler"]]]]],["p-cb37982f",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-e3a82e1c",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-959e0835",[[0,"snk-filter-period",{"config":[16],"getMessage":[16],"value":[8],"presentationMode":[2,"presentation-mode"],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-fe49067d",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-96a89d58",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["p-26ad62b9",[[2,"snk-personalized-filter-editor",{"messagesBuilder":[1040],"presentationMode":[2,"presentation-mode"],"config":[16],"value":[1040],"items":[32],"show":[64]}]]],["p-72fc257b",[[2,"snk-print-selector",{"_printServerActive":[32],"_selectedPrinter":[32],"_remotePrintersDataSource":[32],"_localPrintersDataSource":[32],"_printJobData":[32],"openPrintSelector":[64]}]]],["p-1b985000",[[0,"snk-filter-modal-item",{"filterItem":[1040],"configName":[1025,"config-name"],"resourceID":[1,"resource-i-d"]}]]],["p-989937ee",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["p-88aa931b",[[6,"snk-simple-bar",{"label":[1],"breadcrumbItens":[16],"messagesBuilder":[1040]}]]],["p-7cbbb6e3",[[6,"snk-detail-view",{"formConfigManager":[1040],"dataUnitName":[1,"data-unit-name"],"resourceID":[1,"resource-i-d"],"guideItemPath":[16],"entityName":[1,"entity-name"],"label":[1],"dataUnit":[1040],"selectedForm":[1025,"selected-form"],"dataState":[1040],"messagesBuilder":[1040],"branchGuide":[16],"canEdit":[4,"can-edit"],"taskbarCustomContainerId":[1,"taskbar-custom-container-id"],"_disabledButtons":[32],"_currentView":[32],"attachmentRegisterKey":[32],"changeViewMode":[64],"configGrid":[64],"showUp":[64]},[[0,"snkContentCardChanged","onContentCardChanged"]]]]],["p-73d3daa8",[[2,"snk-configurator",{"showActionButtons":[4,"show-action-buttons"],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"viewMode":[2,"view-mode"],"customContainerId":[1,"custom-container-id"],"messagesBuilder":[1040],"_opened":[32],"_permissions":[32],"open":[64],"close":[64]}]]],["p-247a8b36",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["p-0885ed3c",[[2,"snk-filter-field-search",{"searchable":[4],"fieldsDataSource":[16],"breadcrumbItems":[32],"linkItems":[32],"fieldItems":[32],"searchEmpty":[32],"groupEmpty":[32],"show":[64],"applyFilter":[64]}],[0,"snk-filter-param-config",{"messagesBuilder":[1040],"_opened":[32],"_configType":[32],"_expressionItem":[32],"_informedInstance":[32],"_canSave":[32],"open":[64],"close":[64]}]]],["p-9d3a025a",[[2,"snk-expression-group",{"parentTop":[1026,"parent-top"],"group":[1040],"messagesBuilder":[1040],"filterId":[1025,"filter-id"],"entityURI":[1025,"entity-u-r-i"],"_conditionOperator":[32],"_group":[32],"_selfTop":[32],"canAddExpression":[32],"_showDashes":[32],"getExpressionGroup":[64]},[[8,"ezExpressionLayoutChanged","todoCompletedHandler"]]],[2,"snk-expression-item",{"expression":[16],"canRemove":[516,"can-remove"],"messagesBuilder":[1040],"entityURI":[1025,"entity-u-r-i"],"_showValueVariable":[32],"_fieldSelected":[32],"_optionNotNull":[32]}]]],["p-25c5428f",[[2,"snk-filter-assistent-mode",{"filterAssistent":[1040],"messagesBuilder":[1040],"filterId":[1025,"filter-id"],"entityUri":[1025,"entity-uri"],"application":[1040]}],[2,"snk-filter-advanced-mode",{"filterAssistent":[1040],"application":[1040]}]]],["p-de9eb242",[[2,"snk-personalized-filter",{"messagesBuilder":[1040],"entityUri":[1025,"entity-uri"],"filterId":[1025,"filter-id"],"configName":[1025,"config-name"],"resourceID":[1,"resource-i-d"],"_filterAssistentMode":[32],"_filterAssistent":[32],"createPersonalizedFilter":[64]}]]],["p-43f36d85",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"filterConfig":[1040],"messagesBuilder":[1040],"allowDefault":[32],"scrollerLocked":[32],"showPersonalizedFilter":[32],"personalizedFilterId":[32],"reload":[64]},[[0,"filterChange","filterChangeListener"]]]]],["p-bd628455",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"messagesBuilder":[1040],"_defaultType":[32]}]]],["p-f30526a7",[[2,"snk-field-config",{"isConfigActive":[16],"fieldConfig":[16],"modeInsertion":[516,"mode-insertion"],"dataUnit":[16],"messagesBuilder":[1040]}]]],["p-d3ec3586",[[6,"snk-tab-config",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"tabItems":[16],"messagesBuilder":[1040],"_processedTabs":[32],"_activeEditText":[32],"_activeEditTextIndex":[32],"_actionsHide":[32],"_actionsShow":[32]}]]],["p-562896d0",[[2,"snk-form-config",{"dataUnit":[16],"configManager":[16],"messagesBuilder":[1040],"_formConfigOptions":[32],"_fieldConfigSelected":[32],"_layoutFormConfig":[32],"_fieldsAvailable":[32],"_formConfig":[32],"_formConfigChanged":[32],"_optionFormConfigSelected":[32],"_optionFormConfigChanged":[32],"_tempGroups":[32]}]]],["p-838f8234",[[1,"snk-select-box",{"selectedOption":[1,"selected-option"]}]]],["p-9246d7df",[[2,"snk-grid-config",{"selectedIndex":[1026,"selected-index"],"application":[16],"columns":[1040],"config":[1040],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"]}]]],["p-f9395c20",[[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]]]],["p-9af040ba",[[2,"snk-data-unit",{"dataState":[1040],"messagesBuilder":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"useCancelConfirm":[4,"use-cancel-confirm"],"ignoreSaveMessage":[4,"ignore-save-message"],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"getDataUnit":[64],"getSelectedRecordsIDsInfo":[64]}]]],["p-219f888d",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["p-54efcc8d",[[2,"snk-data-exporter",{"provider":[16],"messagesBuilder":[1040],"_items":[32],"_showDropdown":[32],"_releasedToExport":[32]}]]],["p-d4fb9642",[[6,"snk-taskbar",{"customSlotId":[1,"custom-slot-id"],"customContainerId":[1,"custom-container-id"],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"presentationMode":[1537,"presentation-mode"],"messagesBuilder":[1040],"_permissions":[32],"_customElements":[32],"_customElementsId":[32],"_slotContainer":[32]}]]],["p-5bd7932e",[[6,"snk-grid",{"columnFilterDataSource":[1040],"configName":[1,"config-name"],"resourceID":[1,"resource-i-d"],"selectionToastConfig":[16],"actionsList":[16],"isDetail":[4,"is-detail"],"taskbarManager":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"messagesBuilder":[1040],"useEnterLikeTab":[4,"use-enter-like-tab"],"recordsValidator":[16],"canEdit":[4,"can-edit"],"taskbarCustomContainerId":[1,"taskbar-custom-container-id"],"gridHeaderCustomSlotId":[1,"grid-header-custom-slot-id"],"topTaskbarCustomSlotId":[1,"top-taskbar-custom-slot-id"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"showConfig":[64],"hideConfig":[64],"setConfig":[64],"reloadFilterBar":[64]}]]],["p-503c9774",[[6,"snk-guides-viewer",{"dataUnit":[16],"dataState":[16],"configName":[1,"config-name"],"entityPath":[1,"entity-path"],"actionsList":[16],"recordsValidator":[16],"masterFormConfig":[1040],"selectedGuide":[16],"taskbarManager":[16],"messagesBuilder":[1040],"canEdit":[4,"can-edit"],"presentationMode":[1,"presentation-mode"],"resourceID":[1,"resource-i-d"],"detailTaskbarCustomContainerId":[1,"detail-taskbar-custom-container-id"],"_breadcrumbItems":[32],"_guides":[32],"_formEditorConfigManager":[32],"_formEditorDataUnit":[32],"showFormConfig":[64]},[[2,"actionClick","onActionClick"],[0,"snkContentCardChanged","onContentCardChanged"]]]]],["p-e350860d",[[6,"snk-crud",{"configName":[1025,"config-name"],"selectionToastConfig":[16],"showActionButtons":[4,"show-action-buttons"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"messagesBuilder":[1040],"useEnterLikeTab":[4,"use-enter-like-tab"],"_dataUnit":[32],"_dataState":[32],"attachmentRegisterKey":[32],"_currentViewMode":[32],"_canEdit":[32],"_resourceID":[32],"customContainerId":[32],"goToView":[64],"openConfigurator":[64],"closeConfigurator":[64],"reloadFilterBar":[64]}]]],["p-afdb6ddc",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"messagesBuilder":[1040],"resourceID":[1,"resource-i-d"],"_dataUnit":[32],"_dataState":[32],"_showFormConfig":[32],"_configManager":[32],"showConfig":[64],"hideConfig":[64]}]]],["p-f5dbb069",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"loadByPK":[16],"isUserSup":[64],"addPendingAction":[64],"callServiceBroker":[64],"initOnboarding":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"webConnection":[64],"createDataunit":[64],"updateDataunitCache":[64],"getDataUnit":[64],"addClientEvent":[64],"removeClientEvent":[64],"hasClientEvent":[64],"getResourceID":[64],"getUserID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadTotals":[64],"isLoadedByPk":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64],"getAppLabel":[64],"addSearchListener":[64],"importScript":[64],"getApplicationPath":[64],"executeSelectDistinct":[64],"getDataFetcher":[64]}]]],["p-441cce40",[[6,"snk-simple-crud",{"dataState":[16],"dataUnit":[16],"mode":[2],"gridConfig":[16],"formConfig":[16],"multipleSelection":[4,"multiple-selection"],"useCancelConfirm":[4,"use-cancel-confirm"],"taskbarManager":[16],"messagesBuilder":[1040],"useEnterLikeTab":[4,"use-enter-like-tab"],"_currentViewMode":[32],"_config":[32],"goToView":[64],"setMetadata":[64],"setRecords":[64],"getRecords":[64]},[[0,"actionClick","actionClickListener"]]]]],["p-cc232268",[[2,"snk-attach",{"registerKey":[1,"register-key"],"entityName":[1,"entity-name"],"messagesBuilder":[1040],"dataUnit":[32],"crudConfig":[32]}]]],["p-26b0ce3e",[[2,"snk-form-summary",{"fixed":[1540],"contracted":[1540],"summary":[16]}]]],["p-c555075c",[[6,"snk-form-view",{"levelPath":[1,"level-path"],"label":[1],"name":[1],"fields":[16],"formMetadata":[8,"form-metadata"],"dataUnit":[16],"contracted":[4],"fixed":[1540],"summaryFields":[16],"canExpand":[4,"can-expand"],"canFix":[4,"can-fix"],"recordsValidator":[16],"showUp":[64]}]]],["p-e5e06439",[[2,"snk-actions-button",{"_items":[32],"_showDropdown":[32],"_actions":[32],"_isOrderActions":[32]}]]]]'),e)));
@@ -1,4 +1,4 @@
1
1
  import { IClientEventConfirm } from "./interfaces/IClientEventConfirm";
2
2
  export default class ClientEventConfirm {
3
- clientConfirm(clientEvent: IClientEventConfirm, recaller: any): void;
3
+ clientConfirm(clientEvent: IClientEventConfirm, recaller: any): Promise<void>;
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sankhyalabs/sankhyablocks",
3
- "version": "8.8.0-rc.3",
3
+ "version": "8.8.0-rc.4",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -1 +0,0 @@
1
- import{r as t,h as s,H as i,g as e}from"./p-d2d301a6.js";import{ApplicationContext as n,StringUtils as o,ErrorException as a,WarningException as c,ObjectUtils as r,DateUtils as l,ArrayUtils as h,ElementIDUtils as u}from"@sankhyalabs/core";import{D as d}from"./p-4f7b9c50.js";import{P as p}from"./p-eaad0aa8.js";import"./p-efb2e247.js";import"./p-5534e08c.js";import"./p-9e7d65a4.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-85635c64.js";import"./p-584d7212.js";import"./p-0f2b03e5.js";import{R as m}from"./p-688dcb4c.js";import"./p-112455b1.js";import"./p-8d884fab.js";class v{execute(t){var s;const i={actionID:t.actionID,refreshType:null===(s=t.actionConfig.javaCall)||void 0===s?void 0:s.refreshType};return new Promise((t=>{t({execSource:i,callback:this.callExecJava})}))}callExecJava(t){const s={requestBody:{javaCall:t}};d.get().callServiceBroker("ActionButtonsSP.executeJava",JSON.stringify(s))}}class b{execute(t){var s;const i={actionID:t.actionID,refreshType:null===(s=t.actionConfig.runScript)||void 0===s?void 0:s.refreshType};return new Promise((t=>{t({execSource:i,callback:this.callExecScript})}))}callExecScript(t){const s={runScript:t};d.get().callServiceBroker("ActionButtonsSP.executeScript",s)}}class k{constructor(){this._application=n.getContextValue("__SNK__APPLICATION__")}async execute(t,s){const i=t.resourceID;if(!i)return;let e=await this.buildLaunchObject(t,s);return this._application.openApp(i,e),null}buildLaunchObject(t,s){return new Promise((i=>{let e=t.actionConfig.params.param;if(e&&e.length>0){let n={},c=[];e.forEach((i=>{const e=i.localField;let r=s.getFieldValue(e);if(!r){let i=s.getField(e).label;throw i=o.isEmpty(s.getField(e).label)?e:i,new a(this._application.messagesBuilder.getMessage("snkActionsButton.title.error",void 0),this._application.messagesBuilder.getMessage("snkActionsButton.launchScreen.emptyField",{description:t.description,localFieldLabel:i}))}r=o.isEmpty(r.toString())?void 0:r.toString(),n[i.targetField]=r,c.push({fieldName:i.targetField,value:r})})),n.ACTION_PARAMETERS=c,n.call_time=Date.now(),i(n)}i(null)}))}}class f{execute(t){var s,i,e;const n=null===(s=t.actionConfig.dbCall)||void 0===s?void 0:s.name,o=null===(i=t.actionConfig.dbCall)||void 0===i?void 0:i.rootEntity,a={actionID:t.actionID,refreshType:null===(e=t.actionConfig.dbCall)||void 0===e?void 0:e.refreshType,procName:n,rootEntity:o};return new Promise((t=>{t({execSource:a,callback:this.callExecProcedure})}))}callExecProcedure(t){const s={requestBody:{stpCall:t}};d.get().callServiceBroker("ActionButtonsSP.executeSTP",JSON.stringify(s))}}var w,_;!function(t){t.LAUNCH_SCREEN="LC",t.JAVASCRIPT="SC",t.JAVA="RJ",t.PROCEDURE="SP",t.EMBEDDED="EB"}(w||(w={}));class S{constructor(t){this.actionType=t,this._application=n.getContextValue("__SNK__APPLICATION__")}get executor(){switch(this.actionType){case w.LAUNCH_SCREEN:return new k;case w.JAVASCRIPT:return new b;case w.JAVA:return new v;case w.PROCEDURE:return new f;default:throw new a(this._application.messagesBuilder.getMessage("snkActionsButton.title.error",void 0),this._application.messagesBuilder.getMessage("snkActionsButton.action.nonExistentType",{actionType:this.actionType}))}}}!function(t){t.NONE="NONE",t.PARENT="PARENT",t.MASTER="MASTER",t.ALL="ALL"}(_||(_={}));const y="__MASTER_ROW__";class P{constructor(t,s,i){var e;this._lastValuesCache={},this._actionsExecuteInterface=t,this._dataUnit=s,this._selectedRows=(null===(e=null==s?void 0:s.getSelectionInfo())||void 0===e?void 0:e.isAllRecords())?[]:null==s?void 0:s.getSelectionInfo().records,this._application=n.getContextValue("__SNK__APPLICATION__"),this._appResourceId=i}apply(t,s){this._application.closePopUp(),this._actionsExecuteInterface.execute(t,this._dataUnit).then((({execSource:i,callback:e})=>{this.resolvePromptParams(t,i,s).then((()=>{this.actionExecute(i,e)}))}))}async execute(t){var s;if(!t.actionConfig)throw new c(this._application.messagesBuilder.getMessage("snkActionsButton.title.warning",void 0),this._application.messagesBuilder.getMessage("snkActionsButton.action.incorrectAction",{description:t.description}));if(null===(s=t.actionConfig.params)||void 0===s?void 0:s.promptParam){const s=t.actionConfig.params.promptParam;let i=!1;for(let t=0;t<s.length;t++)if(!i&&"true"===s[t].saveLast){i=!0;break}i&&(t.actionConfig.params.promptParam=await this.loadSavedValuesIntoParams(t));const e=document.createElement("snk-actions-form");window.document.body.appendChild(e),e.action=r.copy(t),e.applyParameters=t=>{this.apply(t,i)},e.openPopup()}else t.type!=w.LAUNCH_SCREEN?this._actionsExecuteInterface.execute(t,this._dataUnit).then((({execSource:t,callback:s})=>{this.actionExecute(t,s)})):this._actionsExecuteInterface.execute(t,this._dataUnit)}loadSavedValuesIntoParams(t){return this.loadLastValues(t).then((s=>{let i=t.actionConfig.params.promptParam;return s&&s.param.forEach((t=>{i=i.map((s=>s.name!==t.paramName?s:Object.assign(Object.assign({},s),"B"===s.paramType?{value:"S"===t.$}:{value:t.$})))})),i}))}actionExecute(t,s){t.virtualPage=this.buildVirtualPage(),this.prepareAndExecute(t,s),this.recordsReloader(t.refreshType)}resolvePromptParams(t,s,i){return new Promise((e=>{let n=[];t.actionConfig.params.promptParam.forEach((t=>{n.push(this.buildPromptParam(t))})),this.putParamsOnExecSource(n,s),i&&this.saveLastValues(t,n),e()}))}buildPromptParam(t){let s,i,e=t.paramType,n=!1,o=t.value;switch(e){case p.DATE:e="D";break;case p.DATETIME:e="H";break;case p.DECIMAL:e="F",s={"sk-precision":Number(t.precision)};break;case p.BOOLEAN:e="S",n=!0,o=t.value?"S":"N";break;case p.ENTITY:s={"sk-entity-name":t.entityName,"sk-allow-show-hierarchical-mode":t.hierarchyEntity,"sk-data-type":"S"},t.hierarchyEntity&&t.entityPK&&(i=t.entityPK),o=t.value?Number(t.value):null;break;case p.OPTIONS:e="O";let a=t.options.split(";").map((function(t,s){let i,e;if(t.indexOf("=")>-1){let s=t.split("=");i=s[0],e=s[1]}else i=s+1,e=t;return{data:i,value:e}}));s={"sk-options":a}}return{description:t.label,required:"true"==t.required,fieldName:t.name,fieldNameOri:t.name,entityPK:i,paramType:t.paramType,type:e,isCheckbox:n,saveLast:t.saveLast,fieldProp:s,value:o,isGeneratedName:t.isGeneratedName}}putParamsOnExecSource(t,s){s.params={param:[]},t.forEach((t=>{if(t.isGeneratedName&&t.value)throw new a(this._application.messagesBuilder.getMessage("snkActionsButton.title.error",void 0),this._application.messagesBuilder.getMessage("snkActionsButton.action.emptyParamName",void 0));o.isEmpty(t.value)||s.params.param.push({type:this.getParamDataType(t.paramType),paramName:t.fieldName,$:this.getParamValue(t)})}))}getParamDataType(t){let s;switch(t){case"D":s="F";break;case"DT":case"DH":s="D";break;case"B":case"ENTITY":case"SO":s="S";break;default:s=t}return s}getParamValue(t){let s=t.value;return s?("DT"==t.paramType?s=l.formatDate(s):"DH"==t.paramType&&(s=l.formatDateTime(s)),s):s}async loadLastValues(t){const s=await this.buildResourceId(t.actionID);return new Promise(((t,i)=>{if(this._lastValuesCache[s])t(this._lastValuesCache[s]);else{const e={config:{chave:s,tipo:"T"}};d.get().callServiceBroker("SystemUtilsSP.getConf",e).then((i=>{var e,n;let o;(null===(n=null===(e=i.config)||void 0===e?void 0:e.data)||void 0===n?void 0:n.params)&&(o=i.config.data.params,Array.isArray(o.param)||(o.param=[o.param])),this._lastValuesCache[s]=o,t(o)})).catch((t=>{i(t)}))}}))}async saveLastValues(t,s){if(this._application){let i={params:{param:[]}};s.forEach((t=>{"true"==t.saveLast&&i.params.param.push({paramName:t.fieldName,$:t.value})}));const e=await this.buildResourceId(t.actionID);this._lastValuesCache[e]=i.params,this._application.saveConfig(e,i)}}async buildResourceId(t){return this._appResourceId+".actionconfig."+t}prepareAndExecute(t,s){this.addRows(t),s(t)}addRows(t){const s={row:[]},i=this._selectedRows;for(const t in i){const e=i[t],n={};e.hasOwnProperty(y)&&(n.master="S",n.entityName=e.__ENTITY_NAME__,delete e[y],delete e.__ENTITY_NAME__);for(const t in e)"NUFIN"===t&&(n.field||(n.field=[]),n.field.push({fieldName:t,$:e[t]}));s.row.push(n)}s.row.length>0&&(t.rows=s)}recordsReloader(t){switch(t){case _.NONE:break;case _.PARENT:case _.MASTER:case _.ALL:this._dataUnit.loadData();break;default:this._dataUnit.reloadCurrentRecord()}}buildVirtualPage(){var t,s,i,e;if(null===(s=null===(t=this._dataUnit)||void 0===t?void 0:t.getSelectionInfo())||void 0===s?void 0:s.isAllRecords())return{filters:{filters:null===(i=this._dataUnit)||void 0===i?void 0:i.getAppliedFilters()},orders:{orders:null===(e=this._dataUnit)||void 0===e?void 0:e.getSort()}}}}class A{clientConfirm(t,s){const i=n.getContextValue("__SNK__APPLICATION__");let e="";t.content.event.hasOwnProperty("stpCall")?(s.requestBody=t.content.event.stpCall,e=w.PROCEDURE):t.content.event.hasOwnProperty("runScript")?(s.requestBody=t.content.event.runScript,e=w.JAVASCRIPT):t.content.event.hasOwnProperty("javaCall")&&(s.requestBody=t.content.event.javaCall,e=w.JAVA);let o={type:"S",sequence:t.content.event.sequence};s.requestBody.params?Array.isArray(s.requestBody.params.param)||(s.requestBody.params.param=[s.requestBody.params.param]):s.requestBody.params={param:[]},s.requestBody.params.param.push(o);const a=t.content.event.title.$,c=t.content.event.message.$;let r;switch(e){case w.JAVASCRIPT:r={runScript:s.requestBody};break;case w.PROCEDURE:r={requestBody:{stpCall:s.requestBody}};break;case w.JAVA:r={requestBody:{javaCall:s.requestBody}}}if("S"==t.content.event.showNoOption){o.paramName="__ESCOLHA_SIMNAO__";const t=document.createElement("snk-client-confirm");window.document.body.appendChild(t),t.titleMessage=a,t.message=c,t.accept=()=>{o.$="S",s.reCall(r)},t.cancel=()=>{o.$="N",s.reCall(r)},t.openPopup()}else i.confirm(a,c,null,"warn",{labelCancel:"Cancelar",labelConfirm:"Sim"}).then((t=>{t&&(o.paramName="__CONFIRMACAO__",o.$="S",s.reCall(r))}))}}const N=class{constructor(s){t(this,s),this.CLIENT_EVENT_CONFIRM_NAME="br.com.sankhya.actionbutton.clientconfirm",this.handleClick=t=>{const s=this._actions.find((s=>s.actionID==t.detail.id)),i=new S(s.type).executor;new P(i,this._dataUnit,this._resourceID).execute(Object.assign({},s)),this._showDropdown=!1},this._items=[],this._showDropdown=!1,this._actions=[],this._isOrderActions=!1}async getActions(){let t={param:{entityName:this._entityName,resourceID:this._resourceID}};return d.get().callServiceBroker("ActionButtonsSP.getActions",t).then((t=>{var s;(null===(s=t.actions)||void 0===s?void 0:s.action)&&(this._actions=this._isOrderActions?h.sortAlphabetically(t.actions.action,"description"):t.actions.action)}))}controlDropdown(){this._showDropdown=!this._showDropdown}canShowDropdown(){var t;return this._showDropdown&&(null===(t=this._items)||void 0===t?void 0:t.length)>0}positionDropdown(){var t;const s=null===(t=this._ezButton)||void 0===t?void 0:t.getBoundingClientRect();s&&this._dropdownParent&&(this._dropdownParent.style.top=s.y+s.height+5+"px",this._dropdownParent.style.left=s.x+"px")}closeDropdown(t){const s=null==t?void 0:t.target;s&&(s.closest(".snk-actions-button")||(this._showDropdown=!1))}setEvents(){document.removeEventListener("click",this.closeDropdown.bind(this)),document.addEventListener("click",this.closeDropdown.bind(this)),document.removeEventListener("scroll",this.positionDropdown.bind(this)),document.addEventListener("scroll",this.positionDropdown.bind(this))}async componentWillLoad(){this._application=n.getContextValue("__SNK__APPLICATION__"),this._isOrderActions=await this._application.getBooleanParam("global.ordenar.acoes.personalizadas");const t=this._element.parentElement;this._dataUnit=null==t?void 0:t.dataUnit,this._resourceID=null==t?void 0:t.resourceID,this._entityName=this._dataUnit.name.split("/")[2],null==this._resourceID&&(this._resourceID=await m.getResourceID()),this.setEvents(),this.getActions().then((()=>{this.loadItems()}))}async componentDidLoad(){if(this._element&&(u.addIDInfo(this._element),this.positionDropdown(),!await this._application.hasClientEvent(this.CLIENT_EVENT_CONFIRM_NAME))){const t=new A;this._application.addClientEvent(this.CLIENT_EVENT_CONFIRM_NAME,t.clientConfirm)}}componentDidUpdate(){this.positionDropdown()}loadItems(){this._actions&&0!=this._actions.length&&this._actions.forEach((t=>{this._items.push({id:t.actionID,label:t.description})}))}getElementID(t){return{[u.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:u.getInternalIDInfo(t)}}render(){return s(i,null,this._actions&&this._actions.length>0&&s("div",{class:`ez-padding-left--medium snk-actions-button \n ${this.canShowDropdown()?" snk-actions-button--overlap":""}\n `},s("ez-button",Object.assign({ref:t=>this._ezButton=t,iconName:"acao",size:"small",mode:"icon",title:this._application.messagesBuilder.getMessage("snkActionsButton.title.actions",void 0),onClick:()=>this.controlDropdown()},this.getElementID("button"))),s("div",Object.assign({ref:t=>this._dropdownParent=t,class:(this.canShowDropdown()?"snk-actions-button__dropdown--show":"snk-actions-button__dropdown")+"\n "},this.getElementID("dropdown")),this.canShowDropdown()&&s("ez-dropdown",Object.assign({items:this._items,onEzClick:t=>this.handleClick(t)},this.getElementID("dropdown"))))),this.canShowDropdown()&&s("div",Object.assign({class:"ez-scrim ez-scrim--light"},this.getElementID("ezScrim"))))}get _element(){return e(this)}};N.style=".sc-snk-actions-button-h{--snk-actions-button--z-index:var(--most-visible, 3);display:flex;width:fit-content;height:fit-content}.snk-actions-button.sc-snk-actions-button{display:flex;width:fit-content;height:fit-content}.snk-actions-button__dropdown--show.sc-snk-actions-button{display:flex;flex-direction:column;position:fixed}.snk-actions-button__dropdown.sc-snk-actions-button>ez-dropdown.sc-snk-actions-button{position:relative}.snk-actions-button--overlap.sc-snk-actions-button{z-index:var(--snk-actions-button--z-index)}.snk-actions-button__dropdown.sc-snk-actions-button{display:none}";export{N as snk_actions_button}