@sankhyalabs/sankhyablocks 1.4.0-beta.3 → 1.4.0-beta.5

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 (63) hide show
  1. package/dist/cjs/{SnkMessageBuilder-d8215915.js → SnkMessageBuilder-b54dfb89.js} +6 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  4. package/dist/cjs/snk-application.cjs.entry.js +11 -5
  5. package/dist/cjs/snk-crud.cjs.entry.js +6 -0
  6. package/dist/cjs/snk-data-unit.cjs.entry.js +1 -1
  7. package/dist/cjs/snk-filter-bar_5.cjs.entry.js +7 -26
  8. package/dist/cjs/snk-filter-detail.cjs.entry.js +30 -19
  9. package/dist/cjs/snk-filter-personalized.cjs.entry.js +0 -9
  10. package/dist/cjs/snk-filter-search.cjs.entry.js +0 -9
  11. package/dist/collection/components/snk-application/snk-application.js +11 -2
  12. package/dist/collection/components/snk-crud/snk-crud.js +29 -0
  13. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js +0 -39
  14. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +0 -39
  15. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +30 -36
  16. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +3 -14
  17. package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js +4 -12
  18. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +3 -3
  19. package/dist/collection/lib/index.js +1 -0
  20. package/dist/collection/lib/message/SnkMessageBuilder.js +3 -1
  21. package/dist/collection/lib/message/resources/crud-utils.msg.js +4 -0
  22. package/dist/collection/lib/utils/CrudUtils.js +73 -0
  23. package/dist/components/SnkMessageBuilder.js +6 -1
  24. package/dist/components/snk-application2.js +10 -4
  25. package/dist/components/snk-crud.js +8 -1
  26. package/dist/components/snk-filter-detail2.js +30 -20
  27. package/dist/components/snk-filter-item2.js +3 -14
  28. package/dist/components/snk-filter-list2.js +4 -12
  29. package/dist/components/snk-filter-personalized.js +1 -12
  30. package/dist/components/snk-filter-search.js +1 -12
  31. package/dist/esm/{SnkMessageBuilder-35a20271.js → SnkMessageBuilder-d440381c.js} +6 -1
  32. package/dist/esm/loader.js +1 -1
  33. package/dist/esm/sankhyablocks.js +1 -1
  34. package/dist/esm/snk-application.entry.js +11 -5
  35. package/dist/esm/snk-crud.entry.js +6 -0
  36. package/dist/esm/snk-data-unit.entry.js +1 -1
  37. package/dist/esm/snk-filter-bar_5.entry.js +7 -26
  38. package/dist/esm/snk-filter-detail.entry.js +30 -19
  39. package/dist/esm/snk-filter-personalized.entry.js +0 -9
  40. package/dist/esm/snk-filter-search.entry.js +0 -9
  41. package/dist/sankhyablocks/p-01823784.entry.js +1 -0
  42. package/dist/sankhyablocks/{p-8f3c5709.entry.js → p-2e49afef.entry.js} +1 -1
  43. package/dist/sankhyablocks/{p-586e2522.js → p-2eea7eea.js} +1 -1
  44. package/dist/sankhyablocks/{p-dc482a42.entry.js → p-6f8303f3.entry.js} +1 -1
  45. package/dist/sankhyablocks/p-746fc78b.entry.js +1 -0
  46. package/dist/sankhyablocks/p-77216252.entry.js +1 -0
  47. package/dist/sankhyablocks/{p-9be74b46.entry.js → p-c564f823.entry.js} +2 -2
  48. package/dist/sankhyablocks/p-eea6444c.entry.js +1 -0
  49. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  50. package/dist/types/components/snk-application/snk-application.d.ts +1 -1
  51. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.d.ts +0 -2
  52. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +0 -2
  53. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +1 -1
  54. package/dist/types/components/snk-filter-bar/filter-list/snk-filter-list.d.ts +1 -1
  55. package/dist/types/components.d.ts +5 -11
  56. package/dist/types/lib/index.d.ts +1 -0
  57. package/dist/types/lib/message/resources/crud-utils.msg.d.ts +2 -0
  58. package/dist/types/lib/utils/CrudUtils.d.ts +6 -0
  59. package/package.json +1 -1
  60. package/dist/sankhyablocks/p-322c0df2.entry.js +0 -1
  61. package/dist/sankhyablocks/p-473cedf9.entry.js +0 -1
  62. package/dist/sankhyablocks/p-a8b59c61.entry.js +0 -1
  63. package/dist/sankhyablocks/p-c78cb79a.entry.js +0 -1
@@ -3,21 +3,10 @@ import { h, Host } from '@stencil/core';
3
3
  import FilterItemType from './filter-item-type.enum';
4
4
  export class SnkFilterItem {
5
5
  constructor() {
6
- this.innerClickCheck = (floatingContainer, node) => {
7
- if (this._popover.keepOpened) {
6
+ this.innerClickCheck = (_floatingContainer, node) => {
7
+ if (node.id != FloatingManager.MODAL_ELEMENT_ID) {
8
8
  return true;
9
9
  }
10
- if (node && floatingContainer) {
11
- if (!node.offsetParent) {
12
- return true;
13
- }
14
- let current = node;
15
- do {
16
- if (current === floatingContainer) {
17
- return true;
18
- }
19
- } while ((current = current.offsetParent) != null);
20
- }
21
10
  this.detailIsVisible = false;
22
11
  this.executeCloseCallback();
23
12
  return false;
@@ -35,7 +24,7 @@ export class SnkFilterItem {
35
24
  });
36
25
  }
37
26
  showDetail() {
38
- this._floatingID = FloatingManager.float(this._popover, this._popoverContainer, { autoClose: true, innerClickTest: this.innerClickCheck, left: this.getScrollOffset() });
27
+ this._floatingID = FloatingManager.float(this._popover, this._popoverContainer, { autoClose: true, innerClickTest: this.innerClickCheck, left: this.getScrollOffset(), useOverlay: true });
39
28
  this.detailIsVisible = true;
40
29
  }
41
30
  getScrollOffset() {
@@ -4,24 +4,16 @@ const SHOW_MORE_ITEM_NAME = "__SHOWMORE__";
4
4
  const MAX_FILTERS = 5;
5
5
  export class SnkFilterList {
6
6
  constructor() {
7
- this.innerClickCheck = (floatingContainer, node) => {
8
- if (node && floatingContainer) {
9
- if (!node.offsetParent) {
10
- return true;
11
- }
12
- let current = node;
13
- do {
14
- if (current === floatingContainer || current === this._element) {
15
- return true;
16
- }
17
- } while ((current = current.offsetParent) != null);
7
+ this.innerClickCheck = (_floatingContainer, node) => {
8
+ if (node.id != FloatingManager.MODAL_ELEMENT_ID) {
9
+ return true;
18
10
  }
19
11
  this._detailIsVisible = false;
20
12
  return false;
21
13
  };
22
14
  }
23
15
  showList() {
24
- this._floatingID = FloatingManager.float(this._popover, this._popoverContainer, { autoClose: true, innerClickTest: this.innerClickCheck });
16
+ this._floatingID = FloatingManager.float(this._popover, this._popoverContainer, { autoClose: true, innerClickTest: this.innerClickCheck, useOverlay: true });
25
17
  this._detailIsVisible = true;
26
18
  this._showAll = false;
27
19
  this._filterArgument = "";
@@ -83,14 +83,14 @@ export class DataFetcher {
83
83
  return UrlUtils.getUrlBase();
84
84
  }
85
85
  getContext(module) {
86
+ var _a;
86
87
  const urlParams = UrlUtils.getQueryParams(location.search);
87
88
  return {
88
89
  baseUrl: `${this.resolveURL()}/${module}/service.sbr`,
89
90
  appName: "SankhyaBlocks",
90
- mgeSession: `${window['skw_session'] || urlParams.mgeSession}`,
91
+ mgeSession: `${window['skw_session'] || urlParams.get("mgeSession")}`,
91
92
  globalID: "85C0093DFA240EAB699B4E47A10215BD",
92
- //FIXME: Precisamos ajustar para buscar o resourceId pela aplicação
93
- resourceID: "br.com.sankhya.mov.bancaria"
93
+ resourceID: (window["resourceID"] || ((_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.resourceID))
94
94
  };
95
95
  }
96
96
  async callServiceBroker(serviceName, payload) {
@@ -1 +1,2 @@
1
1
  export { DataFetcher } from './http/data-fetcher/DataFetcher';
2
+ export { CrudUtils } from './utils/CrudUtils';
@@ -2,13 +2,15 @@ import snkDataUnitMessages from "./resources/snk-data-unit.msg.js";
2
2
  import snkFilterBarMessages from "./resources/snk-filter-bar.msg.js";
3
3
  import snkFormMessages from "./resources/snk-form.msg.js";
4
4
  import snkTaskbarMessages from "./resources/snk-taskbar.msg.js";
5
+ import crudUtilsMessages from "./resources/crud-utils.msg.js";
5
6
  export class SnkMessageBuilder {
6
7
  constructor() {
7
8
  this._defaults = {
8
9
  snkDataUnit: snkDataUnitMessages,
9
10
  snkForm: snkFormMessages,
10
11
  snkTaskbar: snkTaskbarMessages,
11
- snkFilterBar: snkFilterBarMessages
12
+ snkFilterBar: snkFilterBarMessages,
13
+ crudUtils: crudUtilsMessages
12
14
  };
13
15
  this._currentOperation = OperationMap.CLEAN;
14
16
  this.loadAppMessages().then((msgs) => {
@@ -0,0 +1,4 @@
1
+ const crudUtilsMessages = {
2
+ errorArray: "CrudUtils.find deve receber um array de fields, ou uma lista separada por virgula.",
3
+ };
4
+ export default crudUtilsMessages;
@@ -0,0 +1,73 @@
1
+ import { DataFetcher } from '../';
2
+ import { ApplicationContext } from '@sankhyalabs/core';
3
+ export class CrudUtils {
4
+ static find(entityName, fields, criteria, onlyFirst = true, criteriaExpression, orderBy) {
5
+ const SERVICE_CRUD_FIND = "mge@crud.find";
6
+ let parsedFields = [];
7
+ let parsedCriteria = [];
8
+ let literalCriteria = {};
9
+ let application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
10
+ if (fields) {
11
+ if (!Array.isArray(fields)) {
12
+ throw new Error(application.messagesBuilder.getMessage("crudUtils.errorArray", null));
13
+ }
14
+ fields.forEach((fieldName) => {
15
+ parsedFields.push({
16
+ name: fieldName
17
+ });
18
+ });
19
+ }
20
+ if (criteria) {
21
+ for (const key in criteria) {
22
+ if (criteria.hasOwnProperty(key)) {
23
+ parsedCriteria.push({ nome: key, valor: criteria[key] });
24
+ }
25
+ }
26
+ }
27
+ ;
28
+ if (criteriaExpression) {
29
+ literalCriteria = {
30
+ expression: {
31
+ $: criteriaExpression
32
+ }
33
+ };
34
+ }
35
+ let request = {
36
+ requestBody: {
37
+ entity: {
38
+ name: entityName,
39
+ criterio: parsedCriteria,
40
+ fields: {
41
+ field: parsedFields
42
+ },
43
+ literalCriteria: literalCriteria,
44
+ orderby: orderBy
45
+ }
46
+ }
47
+ };
48
+ return new Promise((resolve) => {
49
+ DataFetcher.get().callServiceBroker(SERVICE_CRUD_FIND, JSON.stringify(request)).then((result) => {
50
+ var _a;
51
+ let entities = (_a = result.entidades) === null || _a === void 0 ? void 0 : _a.entidade;
52
+ if (entities != undefined) {
53
+ let crudFindResult = {
54
+ fields: new Map()
55
+ };
56
+ for (let key in entities) {
57
+ let fieldValue = entities[key];
58
+ if (fieldValue.hasOwnProperty('$')) {
59
+ crudFindResult.fields.set(key, fieldValue.$);
60
+ }
61
+ if (onlyFirst) {
62
+ break;
63
+ }
64
+ }
65
+ resolve(crudFindResult);
66
+ }
67
+ else {
68
+ resolve(null);
69
+ }
70
+ });
71
+ });
72
+ }
73
+ }
@@ -78,13 +78,18 @@ const snkTaskbarMessages = {
78
78
  forbidden: "Permissão não liberada"
79
79
  };
80
80
 
81
+ const crudUtilsMessages = {
82
+ errorArray: "CrudUtils.find deve receber um array de fields, ou uma lista separada por virgula.",
83
+ };
84
+
81
85
  class SnkMessageBuilder {
82
86
  constructor() {
83
87
  this._defaults = {
84
88
  snkDataUnit: snkDataUnitMessages,
85
89
  snkForm: snkFormMessages,
86
90
  snkTaskbar: snkTaskbarMessages,
87
- snkFilterBar: snkFilterBarMessages
91
+ snkFilterBar: snkFilterBarMessages,
92
+ crudUtils: crudUtilsMessages
88
93
  };
89
94
  this._currentOperation = OperationMap.CLEAN;
90
95
  this.loadAppMessages().then((msgs) => {
@@ -6535,14 +6535,14 @@ class DataFetcher {
6535
6535
  return UrlUtils.getUrlBase();
6536
6536
  }
6537
6537
  getContext(module) {
6538
+ var _a;
6538
6539
  const urlParams = UrlUtils.getQueryParams(location.search);
6539
6540
  return {
6540
6541
  baseUrl: `${this.resolveURL()}/${module}/service.sbr`,
6541
6542
  appName: "SankhyaBlocks",
6542
- mgeSession: `${window['skw_session'] || urlParams.mgeSession}`,
6543
+ mgeSession: `${window['skw_session'] || urlParams.get("mgeSession")}`,
6543
6544
  globalID: "85C0093DFA240EAB699B4E47A10215BD",
6544
- //FIXME: Precisamos ajustar para buscar o resourceId pela aplicação
6545
- resourceID: "br.com.sankhya.mov.bancaria"
6545
+ resourceID: (window["resourceID"] || ((_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.resourceID))
6546
6546
  };
6547
6547
  }
6548
6548
  async callServiceBroker(serviceName, payload) {
@@ -7541,10 +7541,14 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
7541
7541
  /**
7542
7542
  * Mostra o conteúdo passado em um Popup
7543
7543
  */
7544
- async showPopUp(content) {
7544
+ async showPopUp(content, size = "full") {
7545
7545
  this.clearContent(this._popUp);
7546
+ if (content.tagName === 'EZ-MODAL-CONTAINER') {
7547
+ this._popUp.useHeader = false;
7548
+ }
7546
7549
  this._popUp.appendChild(content);
7547
7550
  this._popUp.opened = true;
7551
+ this._popUp.heightMode = size;
7548
7552
  }
7549
7553
  async showModal(content) {
7550
7554
  this.clearContent(this._rightModal);
@@ -7561,6 +7565,8 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
7561
7565
  async closePopUp() {
7562
7566
  this.clearContent(this._popUp);
7563
7567
  this._popUp.opened = false;
7568
+ this._popUp.useHeader = true;
7569
+ this._popUp.heightMode = "full";
7564
7570
  }
7565
7571
  /**
7566
7572
  * Verifica se a licença do cliente tem determinado opcional (produto)
@@ -19,6 +19,12 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
19
19
  this.__registerHost();
20
20
  this.actionClick = createEvent(this, "actionClick", 7);
21
21
  }
22
+ /**
23
+ * Usado para alternar a visão entre GRID e FORM externamente.
24
+ */
25
+ async goToView(mode) {
26
+ this.executeAction(mode);
27
+ }
22
28
  async gridToForm(keepFormMode = false) {
23
29
  this._backToGrid = !keepFormMode && await this._viewStack.getSelectedIndex() === GRID_MODE;
24
30
  this._viewStack.show(FORM_MODE);
@@ -77,7 +83,8 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
77
83
  "recordsValidator": [16],
78
84
  "statusResolver": [16],
79
85
  "_dataUnit": [32],
80
- "_dataState": [32]
86
+ "_dataState": [32],
87
+ "goToView": [64]
81
88
  }]);
82
89
  function defineCustomElement$1() {
83
90
  if (typeof customElements === "undefined") {
@@ -42,43 +42,53 @@ const SnkFilterDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
42
42
  }
43
43
  apply() {
44
44
  var _a;
45
+ let value = this._editor["value"];
45
46
  let isValid = true;
46
- const value = this._editor["value"];
47
- /* WARNING: Temporário. Isso só está sendo feito até desconsiderar os parametros não informados para PersonalizedFilter*/
48
- if (value != undefined && this.config.type === FilterItemType.PERSONALIZED) {
47
+ if (this.config.type === FilterItemType.PERSONALIZED) {
49
48
  const params = ((_a = this.config.props.personalizedFilter) === null || _a === void 0 ? void 0 : _a.parameters) || [];
50
- if (params.length > 1) {
51
- if (params.length > value.length) {
52
- isValid = false;
53
- }
54
- else {
55
- value.forEach(item => {
56
- if (item == undefined) {
57
- isValid = false;
58
- }
59
- });
60
- }
49
+ const paramsCount = params.length;
50
+ if (paramsCount === 0) {
51
+ //Valor do filtro personalizado sem parametros deve ser um array vazio
52
+ value = [];
61
53
  }
62
- if (!isValid) {
63
- this.keepOpened = true;
64
- ApplicationUtils.alert("Filtro parcialmente preenchido", "Favor completar todas as informações do filtro.").then(() => setTimeout(() => this.keepOpened = false, 1));
54
+ else {
55
+ isValid = this.validateAllFilled(paramsCount, value);
65
56
  }
66
57
  }
67
- /* WARNING: Temporário.*/
68
58
  if (isValid) {
69
59
  this.changeConfig(Object.assign(Object.assign({}, this.config), { value: value }));
70
60
  }
71
61
  }
62
+ /* WARNING: Temporário. Isso só está sendo feito até desconsiderar os parametros não informados para PersonalizedFilter*/
63
+ validateAllFilled(paramsCount, value) {
64
+ let isValid = true;
65
+ if (value != undefined && paramsCount > 1) {
66
+ if (paramsCount > value.length) {
67
+ isValid = false;
68
+ }
69
+ else {
70
+ value.forEach(item => {
71
+ if (item == undefined) {
72
+ isValid = false;
73
+ }
74
+ });
75
+ }
76
+ }
77
+ if (!isValid) {
78
+ ApplicationUtils.alert("Filtro parcialmente preenchido", "Favor completar todas as informações do filtro.");
79
+ }
80
+ return isValid;
81
+ }
82
+ /* WARNING: Temporário.*/
72
83
  clear() {
73
84
  this.changeConfig(Object.assign(Object.assign({}, this.config), { value: undefined }));
74
85
  }
75
86
  render() {
76
87
  const ContentEditor = this.getContentEditor();
77
- return (h(Host, null, h("div", { class: "col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center" }, h("div", { class: "ez-text ez-title ez-title--small ez-padding--small sc-snk-filter-bar snk-filter-item__editor-header" }, this.config.detailTitle), this.getPopUpHeaderButtons()), h(ContentEditor, { ref: ref => this._editor = ref, value: this.config.value, config: this.config, fix: () => this.keepOpened = true, unfix: () => this.keepOpened = false }), h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), h("div", { class: "ez-col ez-col--sd-12 ez-align--right" }, h("ez-button", { label: this.getMessage("snkFilterBar.cleanFilter"), onClick: () => this.clear(), size: "small" }), h("ez-button", { label: this.getMessage("snkFilterBar.applyFilter"), onClick: () => this.apply(), size: "small", class: "ez-button--primary ez-padding-left--medium" }))));
88
+ return (h(Host, null, h("div", { class: "col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center" }, h("div", { class: "ez-text ez-title ez-title--small ez-padding--small sc-snk-filter-bar snk-filter-item__editor-header" }, this.config.detailTitle), this.getPopUpHeaderButtons()), h(ContentEditor, { ref: ref => this._editor = ref, value: this.config.value, config: this.config }), h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), h("div", { class: "ez-col ez-col--sd-12 ez-align--right" }, h("ez-button", { label: this.getMessage("snkFilterBar.cleanFilter"), onClick: () => this.clear(), size: "small" }), h("ez-button", { label: this.getMessage("snkFilterBar.applyFilter"), onClick: () => this.apply(), size: "small", class: "ez-button--primary ez-padding-left--medium" }))));
78
89
  }
79
90
  }, [0, "snk-filter-detail", {
80
91
  "config": [1040],
81
- "keepOpened": [1028, "keep-opened"],
82
92
  "getMessage": [16]
83
93
  }]);
84
94
  function defineCustomElement() {
@@ -8,21 +8,10 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
8
8
  super();
9
9
  this.__registerHost();
10
10
  this.filterChange = createEvent(this, "filterChange", 7);
11
- this.innerClickCheck = (floatingContainer, node) => {
12
- if (this._popover.keepOpened) {
11
+ this.innerClickCheck = (_floatingContainer, node) => {
12
+ if (node.id != FloatingManager.MODAL_ELEMENT_ID) {
13
13
  return true;
14
14
  }
15
- if (node && floatingContainer) {
16
- if (!node.offsetParent) {
17
- return true;
18
- }
19
- let current = node;
20
- do {
21
- if (current === floatingContainer) {
22
- return true;
23
- }
24
- } while ((current = current.offsetParent) != null);
25
- }
26
15
  this.detailIsVisible = false;
27
16
  this.executeCloseCallback();
28
17
  return false;
@@ -40,7 +29,7 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
40
29
  });
41
30
  }
42
31
  showDetail() {
43
- this._floatingID = FloatingManager.float(this._popover, this._popoverContainer, { autoClose: true, innerClickTest: this.innerClickCheck, left: this.getScrollOffset() });
32
+ this._floatingID = FloatingManager.float(this._popover, this._popoverContainer, { autoClose: true, innerClickTest: this.innerClickCheck, left: this.getScrollOffset(), useOverlay: true });
44
33
  this.detailIsVisible = true;
45
34
  }
46
35
  getScrollOffset() {
@@ -8,24 +8,16 @@ const SnkFilterList = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
8
8
  super();
9
9
  this.__registerHost();
10
10
  this.snkItemSelected = createEvent(this, "snkItemSelected", 7);
11
- this.innerClickCheck = (floatingContainer, node) => {
12
- if (node && floatingContainer) {
13
- if (!node.offsetParent) {
14
- return true;
15
- }
16
- let current = node;
17
- do {
18
- if (current === floatingContainer || current === this._element) {
19
- return true;
20
- }
21
- } while ((current = current.offsetParent) != null);
11
+ this.innerClickCheck = (_floatingContainer, node) => {
12
+ if (node.id != FloatingManager.MODAL_ELEMENT_ID) {
13
+ return true;
22
14
  }
23
15
  this._detailIsVisible = false;
24
16
  return false;
25
17
  };
26
18
  }
27
19
  showList() {
28
- this._floatingID = FloatingManager.float(this._popover, this._popoverContainer, { autoClose: true, innerClickTest: this.innerClickCheck });
20
+ this._floatingID = FloatingManager.float(this._popover, this._popoverContainer, { autoClose: true, innerClickTest: this.innerClickCheck, useOverlay: true });
29
21
  this._detailIsVisible = true;
30
22
  this._showAll = false;
31
23
  this._filterArgument = "";
@@ -32,21 +32,12 @@ const SnkFilterPersonalized$1 = /*@__PURE__*/ proxyCustomElement(class extends H
32
32
  }
33
33
  doSearch(mode, argument, param) {
34
34
  const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
35
- if (this.fix) {
36
- this.fix();
37
- }
38
35
  return new Promise((resolve, reject) => {
39
36
  application.executePreparedSearch(mode, argument, param.searchContext)
40
37
  .then(result => {
41
38
  resolve(result);
42
- if (this.unfix) {
43
- this.unfix();
44
- }
45
39
  }).catch(reason => {
46
40
  reject(reason);
47
- if (this.unfix) {
48
- this.unfix();
49
- }
50
41
  });
51
42
  });
52
43
  }
@@ -84,9 +75,7 @@ const SnkFilterPersonalized$1 = /*@__PURE__*/ proxyCustomElement(class extends H
84
75
  }
85
76
  }, [0, "snk-filter-personalized", {
86
77
  "config": [16],
87
- "value": [1040],
88
- "fix": [16],
89
- "unfix": [16]
78
+ "value": [1040]
90
79
  }]);
91
80
  function defineCustomElement$1() {
92
81
  if (typeof customElements === "undefined") {
@@ -12,21 +12,12 @@ const SnkFilterSearch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
12
12
  }
13
13
  doSearch(mode, argument) {
14
14
  const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
15
- if (this.fix) {
16
- this.fix();
17
- }
18
15
  return new Promise((resolve, reject) => {
19
16
  application.executePreparedSearch(mode, argument, this.config.props.searchContext)
20
17
  .then(result => {
21
18
  resolve(result);
22
- if (this.unfix) {
23
- this.unfix();
24
- }
25
19
  }).catch(reason => {
26
20
  reject(reason);
27
- if (this.unfix) {
28
- this.unfix();
29
- }
30
21
  });
31
22
  });
32
23
  }
@@ -38,9 +29,7 @@ const SnkFilterSearch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
38
29
  }
39
30
  }, [0, "snk-filter-search", {
40
31
  "config": [16],
41
- "value": [16],
42
- "fix": [16],
43
- "unfix": [16]
32
+ "value": [16]
44
33
  }, [[0, "ezChange", "ezChangeListener"]]]);
45
34
  function defineCustomElement$1() {
46
35
  if (typeof customElements === "undefined") {
@@ -78,13 +78,18 @@ const snkTaskbarMessages = {
78
78
  forbidden: "Permissão não liberada"
79
79
  };
80
80
 
81
+ const crudUtilsMessages = {
82
+ errorArray: "CrudUtils.find deve receber um array de fields, ou uma lista separada por virgula.",
83
+ };
84
+
81
85
  class SnkMessageBuilder {
82
86
  constructor() {
83
87
  this._defaults = {
84
88
  snkDataUnit: snkDataUnitMessages,
85
89
  snkForm: snkFormMessages,
86
90
  snkTaskbar: snkTaskbarMessages,
87
- snkFilterBar: snkFilterBarMessages
91
+ snkFilterBar: snkFilterBarMessages,
92
+ crudUtils: crudUtilsMessages
88
93
  };
89
94
  this._currentOperation = OperationMap.CLEAN;
90
95
  this.loadAppMessages().then((msgs) => {
@@ -10,7 +10,7 @@ const patchEsm = () => {
10
10
  const defineCustomElements = (win, options) => {
11
11
  if (typeof window === 'undefined') return Promise.resolve();
12
12
  return patchEsm().then(() => {
13
- return bootstrapLazy([["snk-crud",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"_dataUnit":[32],"_dataState":[32]}]]],["teste-pesquisa",[[1,"teste-pesquisa"]]],["snk-data-unit",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64]}]]],["snk-filter-binary-select",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number",[[0,"snk-filter-number",{"config":[16],"value":[2]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-period",[[0,"snk-filter-period",{"config":[16],"value":[8]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"fix":[16],"unfix":[16]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16],"fix":[16],"unfix":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-application",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"loadTotals":[64],"saveGridConfig":[64],"getFilterBarConfig":[64],"saveFilterBarConfig":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64]}]]],["snk-filter-detail",[[0,"snk-filter-detail",{"config":[1040],"keepOpened":[1028,"keep-opened"],"getMessage":[16]}]]],["snk-filter-bar_5",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32]},[[0,"filterChange","filterChangeListener"]]],[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]],[4,"snk-filter-list",{"label":[1],"iconName":[1,"icon-name"],"items":[16],"getMessage":[16],"emptyText":[1,"empty-text"],"findFilterText":[1,"find-filter-text"],"buttonClass":[1,"button-class"],"_filterArgument":[32],"_showAll":[32]}],[0,"snk-filter-modal",{"getMessage":[16],"items":[1040],"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"infoText":[1,"info-text"],"useSearch":[4,"use-search"],"processModalAction":[16],"_filterArgument":[32]}],[6,"snk-taskbar",{"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"_permissions":[32]}]]],["snk-form_2",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_gridConfig":[32]}],[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"taskbarManager":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32]}]]]], options);
13
+ return bootstrapLazy([["snk-crud",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"_dataUnit":[32],"_dataState":[32],"goToView":[64]}]]],["teste-pesquisa",[[1,"teste-pesquisa"]]],["snk-data-unit",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64]}]]],["snk-filter-binary-select",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number",[[0,"snk-filter-number",{"config":[16],"value":[2]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-period",[[0,"snk-filter-period",{"config":[16],"value":[8]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized",[[0,"snk-filter-personalized",{"config":[16],"value":[1040]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-application",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"loadTotals":[64],"saveGridConfig":[64],"getFilterBarConfig":[64],"saveFilterBarConfig":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64]}]]],["snk-filter-detail",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16]}]]],["snk-filter-bar_5",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32]},[[0,"filterChange","filterChangeListener"]]],[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]],[4,"snk-filter-list",{"label":[1],"iconName":[1,"icon-name"],"items":[16],"getMessage":[16],"emptyText":[1,"empty-text"],"findFilterText":[1,"find-filter-text"],"buttonClass":[1,"button-class"],"_filterArgument":[32],"_showAll":[32]}],[0,"snk-filter-modal",{"getMessage":[16],"items":[1040],"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"infoText":[1,"info-text"],"useSearch":[4,"use-search"],"processModalAction":[16],"_filterArgument":[32]}],[6,"snk-taskbar",{"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"_permissions":[32]}]]],["snk-form_2",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_gridConfig":[32]}],[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"taskbarManager":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32]}]]]], options);
14
14
  });
15
15
  };
16
16
 
@@ -13,5 +13,5 @@ const patchBrowser = () => {
13
13
  };
14
14
 
15
15
  patchBrowser().then(options => {
16
- return bootstrapLazy([["snk-crud",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"_dataUnit":[32],"_dataState":[32]}]]],["teste-pesquisa",[[1,"teste-pesquisa"]]],["snk-data-unit",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64]}]]],["snk-filter-binary-select",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number",[[0,"snk-filter-number",{"config":[16],"value":[2]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-period",[[0,"snk-filter-period",{"config":[16],"value":[8]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"fix":[16],"unfix":[16]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16],"fix":[16],"unfix":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-application",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"loadTotals":[64],"saveGridConfig":[64],"getFilterBarConfig":[64],"saveFilterBarConfig":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64]}]]],["snk-filter-detail",[[0,"snk-filter-detail",{"config":[1040],"keepOpened":[1028,"keep-opened"],"getMessage":[16]}]]],["snk-filter-bar_5",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32]},[[0,"filterChange","filterChangeListener"]]],[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]],[4,"snk-filter-list",{"label":[1],"iconName":[1,"icon-name"],"items":[16],"getMessage":[16],"emptyText":[1,"empty-text"],"findFilterText":[1,"find-filter-text"],"buttonClass":[1,"button-class"],"_filterArgument":[32],"_showAll":[32]}],[0,"snk-filter-modal",{"getMessage":[16],"items":[1040],"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"infoText":[1,"info-text"],"useSearch":[4,"use-search"],"processModalAction":[16],"_filterArgument":[32]}],[6,"snk-taskbar",{"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"_permissions":[32]}]]],["snk-form_2",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_gridConfig":[32]}],[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"taskbarManager":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32]}]]]], options);
16
+ return bootstrapLazy([["snk-crud",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"_dataUnit":[32],"_dataState":[32],"goToView":[64]}]]],["teste-pesquisa",[[1,"teste-pesquisa"]]],["snk-data-unit",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64]}]]],["snk-filter-binary-select",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number",[[0,"snk-filter-number",{"config":[16],"value":[2]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-period",[[0,"snk-filter-period",{"config":[16],"value":[8]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized",[[0,"snk-filter-personalized",{"config":[16],"value":[1040]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-application",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"loadTotals":[64],"saveGridConfig":[64],"getFilterBarConfig":[64],"saveFilterBarConfig":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64]}]]],["snk-filter-detail",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16]}]]],["snk-filter-bar_5",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32]},[[0,"filterChange","filterChangeListener"]]],[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]],[4,"snk-filter-list",{"label":[1],"iconName":[1,"icon-name"],"items":[16],"getMessage":[16],"emptyText":[1,"empty-text"],"findFilterText":[1,"find-filter-text"],"buttonClass":[1,"button-class"],"_filterArgument":[32],"_showAll":[32]}],[0,"snk-filter-modal",{"getMessage":[16],"items":[1040],"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"infoText":[1,"info-text"],"useSearch":[4,"use-search"],"processModalAction":[16],"_filterArgument":[32]}],[6,"snk-taskbar",{"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"_permissions":[32]}]]],["snk-form_2",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_gridConfig":[32]}],[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"taskbarManager":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32]}]]]], options);
17
17
  });
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-81dda3cf.js';
2
2
  import { ErrorException, WarningException, StringUtils, DataUnit, DataType, ChangeOperation, DateUtils, ObjectUtils, WaitingChangeException, DependencyType, ApplicationContext, ErrorTracking } from '@sankhyalabs/core';
3
3
  import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
4
- import { S as SnkMessageBuilder } from './SnkMessageBuilder-35a20271.js';
4
+ import { S as SnkMessageBuilder } from './SnkMessageBuilder-d440381c.js';
5
5
 
6
6
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
7
7
 
@@ -6534,14 +6534,14 @@ class DataFetcher {
6534
6534
  return UrlUtils.getUrlBase();
6535
6535
  }
6536
6536
  getContext(module) {
6537
+ var _a;
6537
6538
  const urlParams = UrlUtils.getQueryParams(location.search);
6538
6539
  return {
6539
6540
  baseUrl: `${this.resolveURL()}/${module}/service.sbr`,
6540
6541
  appName: "SankhyaBlocks",
6541
- mgeSession: `${window['skw_session'] || urlParams.mgeSession}`,
6542
+ mgeSession: `${window['skw_session'] || urlParams.get("mgeSession")}`,
6542
6543
  globalID: "85C0093DFA240EAB699B4E47A10215BD",
6543
- //FIXME: Precisamos ajustar para buscar o resourceId pela aplicação
6544
- resourceID: "br.com.sankhya.mov.bancaria"
6544
+ resourceID: (window["resourceID"] || ((_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.resourceID))
6545
6545
  };
6546
6546
  }
6547
6547
  async callServiceBroker(serviceName, payload) {
@@ -7539,10 +7539,14 @@ const SnkApplication = class {
7539
7539
  /**
7540
7540
  * Mostra o conteúdo passado em um Popup
7541
7541
  */
7542
- async showPopUp(content) {
7542
+ async showPopUp(content, size = "full") {
7543
7543
  this.clearContent(this._popUp);
7544
+ if (content.tagName === 'EZ-MODAL-CONTAINER') {
7545
+ this._popUp.useHeader = false;
7546
+ }
7544
7547
  this._popUp.appendChild(content);
7545
7548
  this._popUp.opened = true;
7549
+ this._popUp.heightMode = size;
7546
7550
  }
7547
7551
  async showModal(content) {
7548
7552
  this.clearContent(this._rightModal);
@@ -7559,6 +7563,8 @@ const SnkApplication = class {
7559
7563
  async closePopUp() {
7560
7564
  this.clearContent(this._popUp);
7561
7565
  this._popUp.opened = false;
7566
+ this._popUp.useHeader = true;
7567
+ this._popUp.heightMode = "full";
7562
7568
  }
7563
7569
  /**
7564
7570
  * Verifica se a licença do cliente tem determinado opcional (produto)
@@ -10,6 +10,12 @@ const SnkCrud = class {
10
10
  registerInstance(this, hostRef);
11
11
  this.actionClick = createEvent(this, "actionClick", 7);
12
12
  }
13
+ /**
14
+ * Usado para alternar a visão entre GRID e FORM externamente.
15
+ */
16
+ async goToView(mode) {
17
+ this.executeAction(mode);
18
+ }
13
19
  async gridToForm(keepFormMode = false) {
14
20
  this._backToGrid = !keepFormMode && await this._viewStack.getSelectedIndex() === GRID_MODE;
15
21
  this._viewStack.show(FORM_MODE);
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-81dda3cf.js';
2
2
  import { Action, ApplicationContext } from '@sankhyalabs/core';
3
3
  import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
4
- import { O as OperationMap } from './SnkMessageBuilder-35a20271.js';
4
+ import { O as OperationMap } from './SnkMessageBuilder-d440381c.js';
5
5
 
6
6
  const snkDataUnitCss = ".sc-snk-data-unit-h{display:flex;flex-direction:column;height:100%}";
7
7