@sankhyalabs/sankhyablocks 8.2.0-dev.1 → 8.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (221) hide show
  1. package/dist/cjs/{ConfigStorage-12397f18.js → ConfigStorage-e9d7fa82.js} +51 -163
  2. package/dist/cjs/{DataFetcher-f2da1f79.js → DataFetcher-39b63a1e.js} +29 -67
  3. package/dist/cjs/{SnkFormConfigManager-13f79e37.js → SnkFormConfigManager-2f8eccd9.js} +21 -19
  4. package/dist/cjs/{dataunit-fetcher-e72068c1.js → dataunit-fetcher-15a7cc88.js} +1 -1
  5. package/dist/cjs/filter-bar-config-fetcher-24548cec.js +155 -0
  6. package/dist/cjs/{form-config-fetcher-5d62ab62.js → form-config-fetcher-ab3ce222.js} +3 -66
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/{pesquisa-fetcher-8c363096.js → pesquisa-fetcher-96c042aa.js} +1 -1
  9. package/dist/cjs/resource-fetcher-64102551.js +68 -0
  10. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  11. package/dist/cjs/snk-actions-button.cjs.entry.js +11 -18
  12. package/dist/cjs/snk-application.cjs.entry.js +73 -51
  13. package/dist/cjs/snk-attach.cjs.entry.js +13 -7
  14. package/dist/cjs/snk-configurator.cjs.entry.js +1 -2
  15. package/dist/cjs/snk-crud.cjs.entry.js +9 -28
  16. package/dist/cjs/snk-data-exporter.cjs.entry.js +2 -2
  17. package/dist/cjs/{snk-data-unit-80a00ae4.js → snk-data-unit-d5109a08.js} +6 -8
  18. package/dist/cjs/snk-data-unit.cjs.entry.js +1 -1
  19. package/dist/cjs/snk-detail-view.cjs.entry.js +25 -18
  20. package/dist/cjs/snk-entity-list.cjs.entry.js +4 -0
  21. package/dist/cjs/snk-filter-bar.cjs.entry.js +17 -14
  22. package/dist/cjs/snk-filter-detail.cjs.entry.js +15 -1
  23. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +19 -5
  24. package/dist/cjs/snk-form-config.cjs.entry.js +17 -6
  25. package/dist/cjs/snk-form-view.cjs.entry.js +1 -6
  26. package/dist/cjs/snk-form.cjs.entry.js +8 -12
  27. package/dist/cjs/snk-grid-config.cjs.entry.js +6 -5
  28. package/dist/cjs/snk-grid.cjs.entry.js +20 -20
  29. package/dist/cjs/{snk-guides-viewer-a7cd6fda.js → snk-guides-viewer-8c9693aa.js} +9 -18
  30. package/dist/cjs/snk-guides-viewer.cjs.entry.js +8 -8
  31. package/dist/cjs/snk-personalized-filter.cjs.entry.js +16 -13
  32. package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
  33. package/dist/cjs/snk-simple-crud.cjs.entry.js +80 -22
  34. package/dist/cjs/snk-taskbar.cjs.entry.js +1 -2
  35. package/dist/collection/components/snk-actions-button/actions/index.js +4 -3
  36. package/dist/collection/components/snk-actions-button/snk-actions-button.js +4 -8
  37. package/dist/collection/components/snk-application/snk-application.js +65 -60
  38. package/dist/collection/components/snk-configurator/snk-configurator.js +1 -19
  39. package/dist/collection/components/snk-crud/snk-crud.js +8 -63
  40. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +15 -65
  41. package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +1 -27
  42. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +30 -66
  43. package/dist/collection/components/snk-data-unit/snk-data-unit.js +7 -42
  44. package/dist/collection/components/snk-entity-list/snk-entity-list.js +23 -0
  45. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +12 -2
  46. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +1 -1
  47. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +16 -21
  48. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +12 -28
  49. package/dist/collection/components/snk-form/SnkFormConfigManager.js +19 -17
  50. package/dist/collection/components/snk-form/snk-form.js +2 -46
  51. package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +15 -5
  52. package/dist/collection/components/snk-grid/snk-grid.js +16 -110
  53. package/dist/collection/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.js +1 -19
  54. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +12 -28
  55. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +9 -43
  56. package/dist/collection/components/snk-taskbar/snk-taskbar.js +1 -19
  57. package/dist/collection/lib/configs/ConfigStorage.js +44 -33
  58. package/dist/collection/lib/dataUnit/InMemoryLoader.js +59 -2
  59. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +29 -38
  60. package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +24 -0
  61. package/dist/collection/lib/index.js +0 -10
  62. package/dist/collection/lib/utils/urlutils.js +0 -29
  63. package/dist/components/ConfigStorage.js +48 -161
  64. package/dist/components/DataFetcher.js +29 -67
  65. package/dist/components/SnkFormConfigManager.js +19 -17
  66. package/dist/components/filter-bar-config-fetcher.js +153 -0
  67. package/dist/components/form-config-fetcher.js +2 -64
  68. package/dist/components/resource-fetcher.js +66 -0
  69. package/dist/components/snk-actions-button2.js +9 -23
  70. package/dist/components/snk-application2.js +154 -132
  71. package/dist/components/snk-attach2.js +8 -1
  72. package/dist/components/snk-configurator2.js +1 -3
  73. package/dist/components/snk-crud.js +7 -29
  74. package/dist/components/snk-data-unit2.js +6 -10
  75. package/dist/components/snk-detail-view2.js +23 -28
  76. package/dist/components/snk-entity-list.js +4 -0
  77. package/dist/components/snk-filter-bar2.js +12 -12
  78. package/dist/components/snk-filter-detail2.js +12 -2
  79. package/dist/components/snk-filter-modal-item2.js +16 -5
  80. package/dist/components/snk-form-config2.js +15 -5
  81. package/dist/components/snk-form-view2.js +1 -6
  82. package/dist/components/snk-form.js +2 -9
  83. package/dist/components/snk-grid-config2.js +2 -4
  84. package/dist/components/snk-grid2.js +16 -23
  85. package/dist/components/snk-personalized-filter2.js +11 -11
  86. package/dist/components/snk-simple-crud2.js +69 -12
  87. package/dist/components/snk-taskbar2.js +1 -3
  88. package/dist/esm/{ConfigStorage-932ab366.js → ConfigStorage-1090289a.js} +49 -162
  89. package/dist/esm/{DataFetcher-7e18aa30.js → DataFetcher-a4ed43e7.js} +29 -67
  90. package/dist/esm/{SnkFormConfigManager-bb9afc3f.js → SnkFormConfigManager-de537eca.js} +21 -19
  91. package/dist/esm/{dataunit-fetcher-91a4eb82.js → dataunit-fetcher-8d0bfa4a.js} +1 -1
  92. package/dist/esm/filter-bar-config-fetcher-2417b8cf.js +153 -0
  93. package/dist/esm/{form-config-fetcher-aaaa79a6.js → form-config-fetcher-4065db9a.js} +3 -65
  94. package/dist/esm/loader.js +1 -1
  95. package/dist/esm/{pesquisa-fetcher-56b30fb4.js → pesquisa-fetcher-7460b876.js} +1 -1
  96. package/dist/esm/resource-fetcher-45a70066.js +66 -0
  97. package/dist/esm/sankhyablocks.js +1 -1
  98. package/dist/esm/snk-actions-button.entry.js +11 -18
  99. package/dist/esm/snk-application.entry.js +71 -49
  100. package/dist/esm/snk-attach.entry.js +9 -3
  101. package/dist/esm/snk-configurator.entry.js +1 -2
  102. package/dist/esm/snk-crud.entry.js +9 -28
  103. package/dist/esm/snk-data-exporter.entry.js +2 -2
  104. package/dist/esm/{snk-data-unit-3ab57d1a.js → snk-data-unit-3a0bbfcb.js} +6 -8
  105. package/dist/esm/snk-data-unit.entry.js +1 -1
  106. package/dist/esm/snk-detail-view.entry.js +25 -18
  107. package/dist/esm/snk-entity-list.entry.js +4 -0
  108. package/dist/esm/snk-filter-bar.entry.js +17 -14
  109. package/dist/esm/snk-filter-detail.entry.js +16 -2
  110. package/dist/esm/snk-filter-modal-item.entry.js +20 -6
  111. package/dist/esm/snk-form-config.entry.js +18 -7
  112. package/dist/esm/snk-form-view.entry.js +1 -6
  113. package/dist/esm/snk-form.entry.js +8 -12
  114. package/dist/esm/snk-grid-config.entry.js +6 -5
  115. package/dist/esm/snk-grid.entry.js +20 -20
  116. package/dist/esm/{snk-guides-viewer-cc709b5f.js → snk-guides-viewer-a6d39c18.js} +9 -18
  117. package/dist/esm/snk-guides-viewer.entry.js +8 -8
  118. package/dist/esm/snk-personalized-filter.entry.js +16 -13
  119. package/dist/esm/snk-print-selector.entry.js +1 -1
  120. package/dist/esm/snk-simple-crud.entry.js +71 -13
  121. package/dist/esm/snk-taskbar.entry.js +1 -2
  122. package/dist/sankhyablocks/p-0fb83448.js +1 -0
  123. package/dist/sankhyablocks/p-15aba6fb.entry.js +11 -0
  124. package/dist/sankhyablocks/p-216f081a.entry.js +1 -0
  125. package/dist/sankhyablocks/p-21e7c08e.entry.js +1 -0
  126. package/dist/sankhyablocks/p-2861d44f.entry.js +1 -0
  127. package/dist/sankhyablocks/p-2d883fe9.entry.js +1 -0
  128. package/dist/sankhyablocks/{p-d13c00b6.entry.js → p-3d6f91c2.entry.js} +1 -1
  129. package/dist/sankhyablocks/{p-f8e6b97e.js → p-44e66c8d.js} +1 -1
  130. package/dist/sankhyablocks/p-4514fc6a.entry.js +1 -0
  131. package/dist/sankhyablocks/p-4f4cd005.entry.js +1 -0
  132. package/dist/sankhyablocks/p-50c13cc8.entry.js +1 -0
  133. package/dist/sankhyablocks/p-52c6b2e7.js +1 -0
  134. package/dist/sankhyablocks/p-5994af77.js +56 -0
  135. package/dist/sankhyablocks/p-5df17074.js +1 -0
  136. package/dist/sankhyablocks/p-6bb904bb.entry.js +1 -0
  137. package/dist/sankhyablocks/p-6f0795c8.entry.js +1 -0
  138. package/dist/sankhyablocks/p-7588f006.entry.js +1 -0
  139. package/dist/sankhyablocks/p-847e6c20.js +17 -0
  140. package/dist/sankhyablocks/p-9471cbc9.entry.js +1 -0
  141. package/dist/sankhyablocks/{p-14eac6fe.js → p-9d18017a.js} +1 -1
  142. package/dist/sankhyablocks/p-9edad923.js +1 -0
  143. package/dist/sankhyablocks/p-a42dd503.entry.js +1 -0
  144. package/dist/sankhyablocks/{p-2d333d22.js → p-b978da60.js} +1 -1
  145. package/dist/sankhyablocks/p-befbc9ee.entry.js +1 -0
  146. package/dist/sankhyablocks/p-c6380ea2.entry.js +1 -0
  147. package/dist/sankhyablocks/{p-03bb1aea.entry.js → p-c6feb995.entry.js} +1 -1
  148. package/dist/sankhyablocks/p-c945318c.entry.js +1 -0
  149. package/dist/sankhyablocks/p-ccbfb1cf.entry.js +1 -0
  150. package/dist/sankhyablocks/p-d7c7a289.entry.js +1 -0
  151. package/dist/sankhyablocks/p-de69b4b0.entry.js +1 -0
  152. package/dist/sankhyablocks/p-f3b7b69e.js +10 -0
  153. package/dist/sankhyablocks/p-f7eded3a.entry.js +1 -0
  154. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  155. package/dist/types/components/snk-actions-button/actions/index.d.ts +1 -2
  156. package/dist/types/components/snk-application/snk-application.d.ts +13 -8
  157. package/dist/types/components/snk-configurator/snk-configurator.d.ts +0 -4
  158. package/dist/types/components/snk-crud/snk-crud.d.ts +0 -10
  159. package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +0 -13
  160. package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +0 -5
  161. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +2 -13
  162. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +0 -8
  163. package/dist/types/components/snk-entity-list/snk-entity-list.d.ts +4 -0
  164. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +3 -0
  165. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +1 -1
  166. package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.d.ts +4 -5
  167. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +0 -4
  168. package/dist/types/components/snk-form/SnkFormConfigManager.d.ts +4 -5
  169. package/dist/types/components/snk-form/snk-form.d.ts +1 -9
  170. package/dist/types/components/snk-form/subcomponents/snk-form-config/snk-form-config.d.ts +2 -0
  171. package/dist/types/components/snk-grid/snk-grid.d.ts +1 -18
  172. package/dist/types/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.d.ts +0 -4
  173. package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +1 -5
  174. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +0 -8
  175. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +0 -4
  176. package/dist/types/components.d.ts +21 -189
  177. package/dist/types/lib/configs/ConfigStorage.d.ts +13 -11
  178. package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +7 -0
  179. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -1
  180. package/dist/types/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.d.ts +1 -0
  181. package/dist/types/lib/index.d.ts +0 -11
  182. package/dist/types/lib/utils/urlutils.d.ts +0 -14
  183. package/package.json +2 -2
  184. package/dist/cjs/ISave-d68ce3cd.js +0 -8
  185. package/dist/cjs/ResourceIDUtils-5ff86aa7.js +0 -12
  186. package/dist/cjs/auth-fetcher-319a4cb2.js +0 -34
  187. package/dist/collection/lib/resourceid/ResourceIDUtils.js +0 -7
  188. package/dist/components/ResourceIDUtils.js +0 -10
  189. package/dist/components/auth-fetcher.js +0 -32
  190. package/dist/esm/ISave-4412b20c.js +0 -8
  191. package/dist/esm/ResourceIDUtils-a114189a.js +0 -10
  192. package/dist/esm/auth-fetcher-6d9664b7.js +0 -32
  193. package/dist/sankhyablocks/p-01739b21.entry.js +0 -1
  194. package/dist/sankhyablocks/p-05dbc70e.entry.js +0 -1
  195. package/dist/sankhyablocks/p-41e897f1.js +0 -56
  196. package/dist/sankhyablocks/p-48a40939.js +0 -1
  197. package/dist/sankhyablocks/p-611aa624.entry.js +0 -1
  198. package/dist/sankhyablocks/p-66bb8c20.entry.js +0 -1
  199. package/dist/sankhyablocks/p-688dcb4c.js +0 -1
  200. package/dist/sankhyablocks/p-6f154396.entry.js +0 -1
  201. package/dist/sankhyablocks/p-787071a8.js +0 -1
  202. package/dist/sankhyablocks/p-8481bb59.entry.js +0 -1
  203. package/dist/sankhyablocks/p-8818d8f6.entry.js +0 -1
  204. package/dist/sankhyablocks/p-93f6ca04.entry.js +0 -1
  205. package/dist/sankhyablocks/p-9a270401.entry.js +0 -1
  206. package/dist/sankhyablocks/p-9e7d65a4.js +0 -1
  207. package/dist/sankhyablocks/p-a52a6c9d.js +0 -26
  208. package/dist/sankhyablocks/p-b6003974.entry.js +0 -1
  209. package/dist/sankhyablocks/p-c555075c.entry.js +0 -1
  210. package/dist/sankhyablocks/p-d4f9ee17.entry.js +0 -1
  211. package/dist/sankhyablocks/p-d53a9169.entry.js +0 -1
  212. package/dist/sankhyablocks/p-d7638f45.entry.js +0 -11
  213. package/dist/sankhyablocks/p-e086cc2a.entry.js +0 -1
  214. package/dist/sankhyablocks/p-e64f3e17.entry.js +0 -1
  215. package/dist/sankhyablocks/p-ed41b38c.js +0 -1
  216. package/dist/sankhyablocks/p-ed705cbb.entry.js +0 -1
  217. package/dist/sankhyablocks/p-efc10705.entry.js +0 -1
  218. package/dist/sankhyablocks/p-f74fe358.js +0 -1
  219. package/dist/sankhyablocks/p-f91e0c5d.entry.js +0 -1
  220. package/dist/sankhyablocks/p-fa523d6b.entry.js +0 -1
  221. package/dist/types/lib/resourceid/ResourceIDUtils.d.ts +0 -3
@@ -8,7 +8,6 @@ export class SnkConfigurator {
8
8
  this._permissions = undefined;
9
9
  this.showActionButtons = false;
10
10
  this.configName = undefined;
11
- this.resourceID = undefined;
12
11
  this.viewMode = VIEW_MODE.GRID;
13
12
  this.messagesBuilder = undefined;
14
13
  }
@@ -73,7 +72,7 @@ export class SnkConfigurator {
73
72
  componentWillLoad() {
74
73
  this._application = ApplicationContext.getContextValue('__SNK__APPLICATION__');
75
74
  if (this._application) {
76
- this._application.getAllAccess(this.resourceID).then(access => (this._permissions = access));
75
+ this._application.getAllAccess().then(access => (this._permissions = access));
77
76
  }
78
77
  else {
79
78
  this._permissions = {};
@@ -131,23 +130,6 @@ export class SnkConfigurator {
131
130
  "attribute": "config-name",
132
131
  "reflect": false
133
132
  },
134
- "resourceID": {
135
- "type": "string",
136
- "mutable": false,
137
- "complexType": {
138
- "original": "string",
139
- "resolved": "string",
140
- "references": {}
141
- },
142
- "required": false,
143
- "optional": false,
144
- "docs": {
145
- "tags": [],
146
- "text": "Identificador de recursos como configura\u00E7\u00F5es e acesso."
147
- },
148
- "attribute": "resource-i-d",
149
- "reflect": false
150
- },
151
133
  "viewMode": {
152
134
  "type": "number",
153
135
  "mutable": false,
@@ -3,7 +3,7 @@ import { ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { TaskbarElement } from '../snk-taskbar/elements/taskbar-elements';
4
4
  import { PresentationMode } from '../../lib';
5
5
  import { VIEW_MODE } from '../../lib/utils/constants';
6
- import { AutorizationType } from '../../lib/http/data-fetcher/fetchers/auth-fetcher';
6
+ // import { AutorizationType } from '../../lib/http/data-fetcher/fetchers/auth-fetcher';
7
7
  /**
8
8
  * É possível customizar as mensagens dos blocos de construção através de um pequeno modulo na estrutura da aplicação:
9
9
  * - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
@@ -16,8 +16,6 @@ export class SnkCrud {
16
16
  this._dataState = undefined;
17
17
  this.attachmentRegisterKey = undefined;
18
18
  this._currentViewMode = VIEW_MODE.GRID;
19
- this._canEdit = undefined;
20
- this._resourceID = undefined;
21
19
  this.configName = undefined;
22
20
  this.selectionToastConfig = undefined;
23
21
  this.showActionButtons = false;
@@ -28,7 +26,6 @@ export class SnkCrud {
28
26
  this.multipleSelection = true;
29
27
  this.presentationMode = PresentationMode.PRIMARY;
30
28
  this.messagesBuilder = undefined;
31
- this.useEnterLikeTab = false;
32
29
  }
33
30
  /**
34
31
  * Usado para alternar a visão entre GRID e FORM externamente.
@@ -112,7 +109,7 @@ export class SnkCrud {
112
109
  }
113
110
  componentWillLoad() {
114
111
  const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
115
- application.hasAccess(AutorizationType.UPDATE, this._resourceID).then(canEdit => this._canEdit = canEdit);
112
+ // application.hasAccess(AutorizationType.UPDATE).then(canEdit=>this._canEdit = canEdit)
116
113
  let parent = this._element.parentElement;
117
114
  while (parent) {
118
115
  if (parent.tagName.toUpperCase() === "SNK-DATA-UNIT") {
@@ -124,11 +121,11 @@ export class SnkCrud {
124
121
  if (!this._dataUnit) {
125
122
  this._snkDataUnit.addEventListener("dataUnitReady", (evt) => {
126
123
  this._dataUnit = evt.detail;
127
- this.initDataUnit(application);
124
+ this.initDataUnit();
128
125
  });
129
126
  }
130
127
  else {
131
- this.initDataUnit(application);
128
+ this.initDataUnit();
132
129
  }
133
130
  this._snkDataUnit.addEventListener("dataStateChange", async ({ detail: dataState }) => {
134
131
  this._dataState = dataState;
@@ -144,18 +141,11 @@ export class SnkCrud {
144
141
  this.configName = application.configName;
145
142
  }
146
143
  }
147
- async initDataUnit(application) {
144
+ initDataUnit() {
148
145
  this.addDataElementID();
149
146
  if (!this.messagesBuilder) {
150
147
  this.messagesBuilder = this._snkDataUnit.messagesBuilder;
151
148
  }
152
- if (this._resourceID == undefined) {
153
- //Tenta pegar o resourceID do snkDataUnit;
154
- this._resourceID = this._snkDataUnit.resourceID;
155
- if (this._resourceID == undefined) {
156
- this._resourceID = await application.getResourceID();
157
- }
158
- }
159
149
  }
160
150
  handleConfiguratorEvent(evt, type) {
161
151
  evt.stopImmediatePropagation();
@@ -166,11 +156,8 @@ export class SnkCrud {
166
156
  this.configuratorCancel.emit();
167
157
  }
168
158
  render() {
169
- if (this._resourceID == undefined) {
170
- return;
171
- }
172
- this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
173
- return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID }, h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, resourceID: this._resourceID }, h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID }, h("div", { slot: "SnkConfigContainerSlot" }, h("slot", { name: "SnkConfigContainerSlot" })))));
159
+ // this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
160
+ return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, selectionToastConfig: this.selectionToastConfig }, h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form" }, h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL') }, h("div", { slot: "SnkConfigContainerSlot" }, h("slot", { name: "SnkConfigContainerSlot" })))));
174
161
  }
175
162
  static get is() { return "snk-crud"; }
176
163
  static get encapsulation() { return "scoped"; }
@@ -388,24 +375,6 @@ export class SnkCrud {
388
375
  "tags": [],
389
376
  "text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
390
377
  }
391
- },
392
- "useEnterLikeTab": {
393
- "type": "boolean",
394
- "mutable": false,
395
- "complexType": {
396
- "original": "boolean",
397
- "resolved": "boolean",
398
- "references": {}
399
- },
400
- "required": false,
401
- "optional": false,
402
- "docs": {
403
- "tags": [],
404
- "text": "Quando verdadeiro, o ENTER far\u00E1 a navega\u00E7\u00E3o como se fosse a tecla TAB na grade."
405
- },
406
- "attribute": "use-enter-like-tab",
407
- "reflect": false,
408
- "defaultValue": "false"
409
378
  }
410
379
  };
411
380
  }
@@ -414,9 +383,7 @@ export class SnkCrud {
414
383
  "_dataUnit": {},
415
384
  "_dataState": {},
416
385
  "attachmentRegisterKey": {},
417
- "_currentViewMode": {},
418
- "_canEdit": {},
419
- "_resourceID": {}
386
+ "_currentViewMode": {}
420
387
  };
421
388
  }
422
389
  static get events() {
@@ -465,28 +432,6 @@ export class SnkCrud {
465
432
  "resolved": "any",
466
433
  "references": {}
467
434
  }
468
- }, {
469
- "method": "formItemsReady",
470
- "name": "formItemsReady",
471
- "bubbles": true,
472
- "cancelable": true,
473
- "composed": true,
474
- "docs": {
475
- "tags": [],
476
- "text": "Respons\u00E1vel por notificar quando ocorrer a renderiza\u00E7\u00E3o de itens do formul\u00E1rio."
477
- },
478
- "complexType": {
479
- "original": "Array<HTMLElement>",
480
- "resolved": "HTMLElement[]",
481
- "references": {
482
- "Array": {
483
- "location": "global"
484
- },
485
- "HTMLElement": {
486
- "location": "global"
487
- }
488
- }
489
- }
490
435
  }];
491
436
  }
492
437
  static get methods() {
@@ -10,11 +10,9 @@ import { GuideBuilder } from '../GuideBuilder';
10
10
  export class SnkDetailView {
11
11
  constructor() {
12
12
  this._disabledButtons = undefined;
13
- this._currentView = undefined;
14
13
  this.attachmentRegisterKey = undefined;
15
14
  this.formConfigManager = undefined;
16
15
  this.dataUnitName = undefined;
17
- this.resourceID = undefined;
18
16
  this.guideItemPath = undefined;
19
17
  this.entityName = undefined;
20
18
  this.label = undefined;
@@ -23,8 +21,12 @@ export class SnkDetailView {
23
21
  this.dataState = undefined;
24
22
  this.messagesBuilder = undefined;
25
23
  this.branchGuide = undefined;
26
- this.canEdit = true;
27
24
  }
25
+ // /**
26
+ // * Define se a edição está habilitada na grid.
27
+ // */
28
+ // @Prop()
29
+ // canEdit: boolean = true;
28
30
  observerDataState(newValue, oldValue) {
29
31
  const openInsertion = !(oldValue === null || oldValue === void 0 ? void 0 : oldValue.insertionMode) && (newValue === null || newValue === void 0 ? void 0 : newValue.insertionMode);
30
32
  const closeInsertion = (oldValue === null || oldValue === void 0 ? void 0 : oldValue.insertionMode) && !(newValue === null || newValue === void 0 ? void 0 : newValue.insertionMode);
@@ -137,8 +139,10 @@ export class SnkDetailView {
137
139
  updateViewStack(viewStack) {
138
140
  var _a, _b;
139
141
  this._viewStack = viewStack;
140
- this._currentView = this.selectedForm ? 1 : 0;
141
- (_b = (_a = this._viewStack) === null || _a === void 0 ? void 0 : _a.show) === null || _b === void 0 ? void 0 : _b.call(_a, this._currentView);
142
+ // TODO: remove to gridEditor
143
+ (_b = (_a = this._viewStack) === null || _a === void 0 ? void 0 : _a.show) === null || _b === void 0 ? void 0 : _b.call(_a, this.selectedForm ? 1 : 0);
144
+ // this._currentView = this.selectedForm ? 1 : 0;
145
+ // this._viewStack?.show?.(this._currentView);
142
146
  }
143
147
  getFormFields() {
144
148
  if (this.selectedForm && this._formMetadata) {
@@ -184,7 +188,7 @@ export class SnkDetailView {
184
188
  }
185
189
  componentWillLoad() {
186
190
  this._configName = `dynaform.${this.entityName}`;
187
- this.formConfigManager = new SnkFormConfigManager(this._configName, this.resourceID, () => this.loadMetadata());
191
+ this.formConfigManager = new SnkFormConfigManager(this._configName, () => this.loadMetadata());
188
192
  this.formConfigManager.loadConfig();
189
193
  if (this.messagesBuilder == undefined) {
190
194
  this.messagesBuilder = new SnkMessageBuilder(this.entityName);
@@ -193,7 +197,11 @@ export class SnkDetailView {
193
197
  render() {
194
198
  this.updateLabel();
195
199
  //const cardConfig: IFormCardConfig = this._cardsState?.get(this.selectedForm);
196
- return (h(Host, null, h("snk-data-unit", { ref: (el) => this._snkDataUnit = el, dataUnitName: `${this.dataUnitName}`, onDataUnitReady: evt => this.dataUnitReadyHandler(evt), entityName: this.entityName, onDataStateChange: this.handleDataStateChange.bind(this), ignoreSaveMessage: this._currentView === VIEW_MODE.GRID, messagesBuilder: this.messagesBuilder, configName: this._configName }, h("ez-view-stack", { ref: (ref) => this.updateViewStack(ref) }, h("stack-item", null, h("div", { class: "ez-box ez-box--shadow grid-container" }, h("div", { class: "ez-flex ez-title--primary ez-size-width--full ez-padding--large detail-header" }, h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center" }, this._levelPath ? h("span", { class: "level-path" }, this._levelPath + " /") : undefined, this.label)), h("snk-grid", { class: "ez-size-width--full ez-size-height--full", ref: (ref) => this._snkGrid = ref, configName: this._configName, messagesBuilder: this.messagesBuilder, onGridDoubleClick: () => this.emitSwitchEvent(VIEW_MODE.FORM), onActionClick: (evt) => this.executeActionHandler(evt), presentationMode: PresentationMode.SECONDARY, canEdit: this.canEdit, isDetail: true }))), h("stack-item", null, h("snk-form-view", { ref: (ref) => this._snkFormView = ref, canExpand: false, canFix: false, name: this.selectedForm, formMetadata: this._formMetadata, dataUnit: this.dataUnit, fields: this.getFormFields(), label: this.label, levelPath: this._levelPath, onFormItemsReady: ({ detail: formItems }) => this.formItemsReady.emit(formItems) }, h("snk-taskbar", { key: "guideViewerTaskbar", class: "form-taskbar", "data-element-id": "guideViewer", configName: this._configName, messagesBuilder: this.messagesBuilder, disabledButtons: this._disabledButtons, buttons: "INSERT,PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,CONFIGURATOR", primaryButton: "INSERT", presentationMode: PresentationMode.SECONDARY, onActionClick: evt => this.executeActionHandler(evt), dataUnit: this.dataUnit, resourceID: this.resourceID }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this.entityName, onBack: this.handleAttachBack.bind(this) }))))));
200
+ return (h(Host, null, h("snk-data-unit", { ref: (el) => this._snkDataUnit = el, dataUnitName: `${this.dataUnitName}`, onDataUnitReady: evt => this.dataUnitReadyHandler(evt), entityName: this.entityName, onDataStateChange: this.handleDataStateChange.bind(this),
201
+ // ignoreSaveMessage={this._currentView === VIEW_MODE.GRID}
202
+ messagesBuilder: this.messagesBuilder, configName: this._configName }, h("ez-view-stack", { ref: (ref) => this.updateViewStack(ref) }, h("stack-item", null, h("div", { class: "ez-box ez-box--shadow grid-container" }, h("div", { class: "ez-flex ez-title--primary ez-size-width--full ez-padding--large detail-header" }, h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center" }, this._levelPath ? h("span", { class: "level-path" }, this._levelPath + " /") : undefined, this.label)), h("snk-grid", { class: "ez-size-width--full ez-size-height--full", ref: (ref) => this._snkGrid = ref, configName: this._configName, messagesBuilder: this.messagesBuilder, onGridDoubleClick: () => this.emitSwitchEvent(VIEW_MODE.FORM), onActionClick: (evt) => this.executeActionHandler(evt), presentationMode: PresentationMode.SECONDARY,
203
+ // canEdit={this.canEdit}
204
+ isDetail: true }))), h("stack-item", null, h("snk-form-view", { ref: (ref) => this._snkFormView = ref, canExpand: false, canFix: false, name: this.selectedForm, formMetadata: this._formMetadata, dataUnit: this.dataUnit, fields: this.getFormFields(), label: this.label, levelPath: this._levelPath }, h("snk-taskbar", { key: "guideViewerTaskbar", class: "form-taskbar", "data-element-id": "guideViewer", configName: this._configName, messagesBuilder: this.messagesBuilder, disabledButtons: this._disabledButtons, buttons: "INSERT,PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,CONFIGURATOR", primaryButton: "INSERT", presentationMode: PresentationMode.SECONDARY, onActionClick: evt => this.executeActionHandler(evt), dataUnit: this.dataUnit }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this.entityName, onBack: this.handleAttachBack.bind(this) }))))));
197
205
  }
198
206
  static get is() { return "snk-detail-view"; }
199
207
  static get encapsulation() { return "scoped"; }
@@ -246,23 +254,6 @@ export class SnkDetailView {
246
254
  "attribute": "data-unit-name",
247
255
  "reflect": false
248
256
  },
249
- "resourceID": {
250
- "type": "string",
251
- "mutable": false,
252
- "complexType": {
253
- "original": "string",
254
- "resolved": "string",
255
- "references": {}
256
- },
257
- "required": false,
258
- "optional": false,
259
- "docs": {
260
- "tags": [],
261
- "text": "Identificador de recursos como configura\u00E7\u00F5es e acesso."
262
- },
263
- "attribute": "resource-i-d",
264
- "reflect": false
265
- },
266
257
  "guideItemPath": {
267
258
  "type": "unknown",
268
259
  "mutable": false,
@@ -416,31 +407,12 @@ export class SnkDetailView {
416
407
  "tags": [],
417
408
  "text": ""
418
409
  }
419
- },
420
- "canEdit": {
421
- "type": "boolean",
422
- "mutable": false,
423
- "complexType": {
424
- "original": "boolean",
425
- "resolved": "boolean",
426
- "references": {}
427
- },
428
- "required": false,
429
- "optional": false,
430
- "docs": {
431
- "tags": [],
432
- "text": "Define se a edi\u00E7\u00E3o est\u00E1 habilitada na grid."
433
- },
434
- "attribute": "can-edit",
435
- "reflect": false,
436
- "defaultValue": "true"
437
410
  }
438
411
  };
439
412
  }
440
413
  static get states() {
441
414
  return {
442
415
  "_disabledButtons": {},
443
- "_currentView": {},
444
416
  "attachmentRegisterKey": {}
445
417
  };
446
418
  }
@@ -480,28 +452,6 @@ export class SnkDetailView {
480
452
  "resolved": "string",
481
453
  "references": {}
482
454
  }
483
- }, {
484
- "method": "formItemsReady",
485
- "name": "formItemsReady",
486
- "bubbles": true,
487
- "cancelable": true,
488
- "composed": true,
489
- "docs": {
490
- "tags": [],
491
- "text": "Respons\u00E1vel por notificar quando ocorrer a renderiza\u00E7\u00E3o de itens do formul\u00E1rio."
492
- },
493
- "complexType": {
494
- "original": "Array<HTMLElement>",
495
- "resolved": "HTMLElement[]",
496
- "references": {
497
- "Array": {
498
- "location": "global"
499
- },
500
- "HTMLElement": {
501
- "location": "global"
502
- }
503
- }
504
- }
505
455
  }];
506
456
  }
507
457
  static get methods() {
@@ -70,10 +70,6 @@ export class SnkFormView {
70
70
  this._dataBinder.bind(fields, this.dataUnit.dataUnitId, this.formMetadata, this.recordsValidator);
71
71
  }
72
72
  }
73
- handleFormItemsReady(event) {
74
- event.stopPropagation();
75
- this.formItemsReady.emit(Object.assign(Object.assign({}, event.detail), { formId: this.name }));
76
- }
77
73
  disconnectedCallback() {
78
74
  if (this._dataBinder != undefined) {
79
75
  this._dataBinder.onDisconnectedCallback();
@@ -86,7 +82,7 @@ export class SnkFormView {
86
82
  ?
87
83
  h("snk-form-summary", { summary: this.getCardSummary() })
88
84
  :
89
- h("ez-form-view", { ref: ref => this._formView = ref, fields: this.fields, onEzContentReady: evt => this.bindFields(evt.detail), onFormItemsReady: (event) => this.handleFormItemsReady(event) })));
85
+ h("ez-form-view", { ref: ref => this._formView = ref, fields: this.fields, onEzContentReady: evt => this.bindFields(evt.detail) })));
90
86
  }
91
87
  static get is() { return "snk-form-view"; }
92
88
  static get encapsulation() { return "scoped"; }
@@ -355,28 +351,6 @@ export class SnkFormView {
355
351
  }
356
352
  }
357
353
  }
358
- }, {
359
- "method": "formItemsReady",
360
- "name": "formItemsReady",
361
- "bubbles": true,
362
- "cancelable": true,
363
- "composed": true,
364
- "docs": {
365
- "tags": [],
366
- "text": "Respons\u00E1vel por notificar quando ocorrer a renderiza\u00E7\u00E3o de itens do formul\u00E1rio."
367
- },
368
- "complexType": {
369
- "original": "Array<HTMLElement>",
370
- "resolved": "HTMLElement[]",
371
- "references": {
372
- "Array": {
373
- "location": "global"
374
- },
375
- "HTMLElement": {
376
- "location": "global"
377
- }
378
- }
379
- }
380
354
  }];
381
355
  }
382
356
  static get methods() {
@@ -21,9 +21,7 @@ export class SnkGuidesViewer {
21
21
  this.selectedGuide = undefined;
22
22
  this.taskbarManager = undefined;
23
23
  this.messagesBuilder = undefined;
24
- this.canEdit = true;
25
24
  this.presentationMode = undefined;
26
- this.resourceID = undefined;
27
25
  this._breadcrumbItems = [];
28
26
  this._guides = undefined;
29
27
  this._formEditorConfigManager = undefined;
@@ -225,7 +223,9 @@ export class SnkGuidesViewer {
225
223
  else {
226
224
  detailBranch = this.selectedGuide;
227
225
  }
228
- content = this.wrapDetail(levels, h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(evt.detail), entityName: childEntityName, selectedForm: formName, branchGuide: detailBranch, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`, canEdit: this.canEdit, onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail), resourceID: this.resourceID }));
226
+ content = this.wrapDetail(levels, h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(evt.detail), entityName: childEntityName, selectedForm: formName, branchGuide: detailBranch, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`,
227
+ // canEdit={this.canEdit}
228
+ onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail) }));
229
229
  }
230
230
  else {
231
231
  const cardId = this.selectedGuide.id;
@@ -274,10 +274,7 @@ export class SnkGuidesViewer {
274
274
  return this.selectedGuide === undefined || '__main' === ((_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.id);
275
275
  }
276
276
  componentWillLoad() {
277
- if (this.resourceID == undefined) {
278
- throw new Error("Erro interno: resourceID não informado");
279
- }
280
- this._configManager = new SnkFormConfigManager(this.configName, this.resourceID, config => this.masterFormConfig = config);
277
+ this._configManager = new SnkFormConfigManager(this.configName, config => this.masterFormConfig = config);
281
278
  this._configManager.loadConfig();
282
279
  }
283
280
  componentDidRender() {
@@ -296,7 +293,7 @@ export class SnkGuidesViewer {
296
293
  }
297
294
  buildTaskBar() {
298
295
  var _a;
299
- return h("div", { class: `ez-col ez-flex-item--align-center ez-col--sd-6 ez-col--tb-6 ${this.presentationMode != PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, h("snk-taskbar", { key: "guideViewerTaskbar", "data-element-id": "guideViewer", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.actionsList, messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-taskbar-owner": "master", dataUnit: this.dataUnit, resourceID: this.resourceID }));
296
+ return h("div", { class: `ez-col ez-flex-item--align-center ez-col--sd-6 ez-col--tb-6 ${this.presentationMode != PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, h("snk-taskbar", { key: "guideViewerTaskbar", "data-element-id": "guideViewer", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.actionsList, messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-taskbar-owner": "master", dataUnit: this.dataUnit }));
300
297
  }
301
298
  render() {
302
299
  var _a, _b;
@@ -315,7 +312,7 @@ export class SnkGuidesViewer {
315
312
  h("div", { class: "ez-margin-top--extra-small" }, h("ez-breadcrumb", Object.assign({ items: this._breadcrumbItems, onSelectedItem: (evt) => this.onBreadcrumbClickHandler(evt === null || evt === void 0 ? void 0 : evt.detail) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("breadcrumb")}` }))))), this.presentationMode != PresentationMode.SECONDARY && this.buildTaskBar()), h("div", { class: "snk-guides-viewer__container" }, showGuides ?
316
313
  h("ez-guide-navigator", { ref: (ref) => this._guideNavigator = ref, class: "snk-guides-viewer__guide-navigator", items: this._guides, selectedId: this.selectedGuide ? this.selectedGuide.id : undefined, onEzSelectionChange: evt => this.updateSelectedGuideHandler(evt.detail) })
317
314
  :
318
- h("div", null), h("div", { class: "snk-guides-viewer__detail-container" }, SnkGuidesViewer.buildFixedForms(this.masterFormConfig, this._masterFormMetadata, (_b = this.selectedGuide) === null || _b === void 0 ? void 0 : _b.id, this.dataUnit, this.recordsValidator), this.getContent())), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this.getConfigViewMode(), onConfigSelected: (evt) => this.changeConfigViewMode(evt.detail), messagesBuilder: this.messagesBuilder, onOpenConfig: (evt) => this.openConfig(evt.detail), resourceID: this.resourceID })));
315
+ h("div", null), h("div", { class: "snk-guides-viewer__detail-container" }, SnkGuidesViewer.buildFixedForms(this.masterFormConfig, this._masterFormMetadata, (_b = this.selectedGuide) === null || _b === void 0 ? void 0 : _b.id, this.dataUnit, this.recordsValidator), this.getContent())), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this.getConfigViewMode(), onConfigSelected: (evt) => this.changeConfigViewMode(evt.detail), messagesBuilder: this.messagesBuilder, onOpenConfig: (evt) => this.openConfig(evt.detail) })));
319
316
  }
320
317
  static get is() { return "snk-guides-viewer"; }
321
318
  static get encapsulation() { return "scoped"; }
@@ -331,6 +328,30 @@ export class SnkGuidesViewer {
331
328
  }
332
329
  static get properties() {
333
330
  return {
331
+ "_guideBuilders": {
332
+ "type": "unknown",
333
+ "mutable": false,
334
+ "complexType": {
335
+ "original": "Map<string, GuideBuilder>",
336
+ "resolved": "Map<string, GuideBuilder>",
337
+ "references": {
338
+ "Map": {
339
+ "location": "global"
340
+ },
341
+ "GuideBuilder": {
342
+ "location": "import",
343
+ "path": "./GuideBuilder"
344
+ }
345
+ }
346
+ },
347
+ "required": false,
348
+ "optional": false,
349
+ "docs": {
350
+ "tags": [],
351
+ "text": ""
352
+ },
353
+ "defaultValue": "new Map()"
354
+ },
334
355
  "dataUnit": {
335
356
  "type": "unknown",
336
357
  "mutable": false,
@@ -528,24 +549,6 @@ export class SnkGuidesViewer {
528
549
  "text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
529
550
  }
530
551
  },
531
- "canEdit": {
532
- "type": "boolean",
533
- "mutable": false,
534
- "complexType": {
535
- "original": "boolean",
536
- "resolved": "boolean",
537
- "references": {}
538
- },
539
- "required": false,
540
- "optional": false,
541
- "docs": {
542
- "tags": [],
543
- "text": "Define se a edi\u00E7\u00E3o est\u00E1 habilitada na grid."
544
- },
545
- "attribute": "can-edit",
546
- "reflect": false,
547
- "defaultValue": "true"
548
- },
549
552
  "presentationMode": {
550
553
  "type": "string",
551
554
  "mutable": false,
@@ -567,23 +570,6 @@ export class SnkGuidesViewer {
567
570
  },
568
571
  "attribute": "presentation-mode",
569
572
  "reflect": false
570
- },
571
- "resourceID": {
572
- "type": "string",
573
- "mutable": false,
574
- "complexType": {
575
- "original": "string",
576
- "resolved": "string",
577
- "references": {}
578
- },
579
- "required": false,
580
- "optional": false,
581
- "docs": {
582
- "tags": [],
583
- "text": "Identificador de recursos como configura\u00E7\u00F5es e acesso."
584
- },
585
- "attribute": "resource-i-d",
586
- "reflect": false
587
573
  }
588
574
  };
589
575
  }
@@ -626,28 +612,6 @@ export class SnkGuidesViewer {
626
612
  "resolved": "string",
627
613
  "references": {}
628
614
  }
629
- }, {
630
- "method": "formItemsReady",
631
- "name": "formItemsReady",
632
- "bubbles": true,
633
- "cancelable": true,
634
- "composed": true,
635
- "docs": {
636
- "tags": [],
637
- "text": "Respons\u00E1vel por notificar quando ocorrer a renderiza\u00E7\u00E3o de itens do formul\u00E1rio."
638
- },
639
- "complexType": {
640
- "original": "Array<HTMLElement>",
641
- "resolved": "HTMLElement[]",
642
- "references": {
643
- "Array": {
644
- "location": "global"
645
- },
646
- "HTMLElement": {
647
- "location": "global"
648
- }
649
- }
650
- }
651
615
  }];
652
616
  }
653
617
  static get methods() {
@@ -11,9 +11,9 @@ export class SnkDataUnit {
11
11
  const duState = this.buildDataState();
12
12
  this.dataState = duState;
13
13
  if (action.type === Action.DATA_SAVED) {
14
- if (this.ignoreSaveMessage) {
15
- return;
16
- }
14
+ // if(this.ignoreSaveMessage){
15
+ // return
16
+ // }
17
17
  const msg = this.getMessage("snkDataUnit.saveInfo", action.payload.records[0]);
18
18
  if (msg != undefined) {
19
19
  this.showSuccessMessage(msg);
@@ -59,9 +59,7 @@ export class SnkDataUnit {
59
59
  this.beforeSave = undefined;
60
60
  this.afterSave = undefined;
61
61
  this.useCancelConfirm = true;
62
- this.ignoreSaveMessage = undefined;
63
62
  this.configName = undefined;
64
- this.resourceID = undefined;
65
63
  }
66
64
  observePageSize() {
67
65
  if (this.dataUnit) {
@@ -181,6 +179,7 @@ export class SnkDataUnit {
181
179
  return resolve(action);
182
180
  if (this._openedAlert)
183
181
  return this.dataUnit.cancelEdition();
182
+ ;
184
183
  this._openedAlert = true;
185
184
  this.dataUnit.cancelEdition();
186
185
  ApplicationUtils.alert(this.getMessage("snkDataUnit.forbidden"), this.getMessage("snkDataUnit.forbiddenUpdate")).then(() => {
@@ -325,10 +324,10 @@ export class SnkDataUnit {
325
324
  const cacheName = this.dataUnitName ? this.dataUnitName : this.entityName;
326
325
  if (this._parentSnkDataUnit) {
327
326
  this._parentDataUnit = await ((_a = this._parentSnkDataUnit) === null || _a === void 0 ? void 0 : _a.getDataUnit());
328
- return await this._application.getDataUnit(this.entityName, cacheName, this._parentDataUnit, this.configName, this.resourceID);
327
+ return await this._application.getDataUnit(this.entityName, cacheName, this._parentDataUnit, this.configName);
329
328
  }
330
329
  else {
331
- return await this._application.getDataUnit(this.entityName, cacheName, null, this.configName, this.resourceID);
330
+ return await this._application.getDataUnit(this.entityName, cacheName, null, this.configName);
332
331
  }
333
332
  }
334
333
  async loadDataUnit() {
@@ -387,7 +386,7 @@ export class SnkDataUnit {
387
386
  //---------------------------------------------
388
387
  componentWillLoad() {
389
388
  this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
390
- this._application.getAllAccess(this.resourceID).then(access => this._permissions = access);
389
+ this._application.getAllAccess().then(access => this._permissions = access);
391
390
  this._parentSnkDataUnit = this.getParentSnkDataUnit();
392
391
  if (this.messagesBuilder == undefined) {
393
392
  this.messagesBuilder = new SnkMessageBuilder(this.entityName);
@@ -591,23 +590,6 @@ export class SnkDataUnit {
591
590
  "reflect": false,
592
591
  "defaultValue": "true"
593
592
  },
594
- "ignoreSaveMessage": {
595
- "type": "boolean",
596
- "mutable": false,
597
- "complexType": {
598
- "original": "boolean",
599
- "resolved": "boolean",
600
- "references": {}
601
- },
602
- "required": false,
603
- "optional": false,
604
- "docs": {
605
- "tags": [],
606
- "text": "Respons\u00E1vel por evitar a mensagem de sucesso ao salvar."
607
- },
608
- "attribute": "ignore-save-message",
609
- "reflect": false
610
- },
611
593
  "configName": {
612
594
  "type": "string",
613
595
  "mutable": false,
@@ -624,23 +606,6 @@ export class SnkDataUnit {
624
606
  },
625
607
  "attribute": "config-name",
626
608
  "reflect": false
627
- },
628
- "resourceID": {
629
- "type": "string",
630
- "mutable": false,
631
- "complexType": {
632
- "original": "string",
633
- "resolved": "string",
634
- "references": {}
635
- },
636
- "required": false,
637
- "optional": false,
638
- "docs": {
639
- "tags": [],
640
- "text": "Identificador de recursos como configura\u00E7\u00F5es e acesso."
641
- },
642
- "attribute": "resource-i-d",
643
- "reflect": false
644
609
  }
645
610
  };
646
611
  }