@sankhyalabs/sankhyablocks 8.1.0-dev.1 → 8.1.0-dev.11

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 (212) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/{ConfigStorage-73e7afff.js → ConfigStorage-d688c739.js} +163 -50
  3. package/dist/cjs/{DataFetcher-004811c6.js → DataFetcher-d2c6ae38.js} +29 -0
  4. package/dist/cjs/ResourceIDUtils-5ff86aa7.js +12 -0
  5. package/dist/cjs/{SnkFormConfigManager-d1f1a222.js → SnkFormConfigManager-29b73c81.js} +19 -21
  6. package/dist/cjs/{auth-fetcher-58237931.js → auth-fetcher-da975ac5.js} +1 -1
  7. package/dist/cjs/{dataunit-fetcher-029eafbd.js → dataunit-fetcher-58ad78a7.js} +1 -1
  8. package/dist/cjs/{form-config-fetcher-181767c9.js → form-config-fetcher-761994b9.js} +2 -2
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/{pesquisa-fetcher-9a97994a.js → pesquisa-fetcher-bb0bb679.js} +1 -1
  11. package/dist/cjs/{resource-fetcher-c0332609.js → resource-fetcher-95d24dff.js} +1 -1
  12. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  13. package/dist/cjs/snk-actions-button.cjs.entry.js +13 -10
  14. package/dist/cjs/snk-application.cjs.entry.js +48 -44
  15. package/dist/cjs/snk-attach.cjs.entry.js +2 -2
  16. package/dist/cjs/snk-configurator.cjs.entry.js +2 -1
  17. package/dist/cjs/snk-crud.cjs.entry.js +21 -9
  18. package/dist/cjs/snk-data-exporter.cjs.entry.js +2 -2
  19. package/dist/cjs/{snk-data-unit-cc7a7ed0.js → snk-data-unit-80a00ae4.js} +4 -4
  20. package/dist/cjs/snk-data-unit.cjs.entry.js +1 -1
  21. package/dist/cjs/snk-detail-view.cjs.entry.js +11 -10
  22. package/dist/cjs/snk-entity-list.cjs.entry.js +0 -4
  23. package/dist/cjs/snk-filter-bar.cjs.entry.js +15 -17
  24. package/dist/cjs/snk-filter-detail.cjs.entry.js +1 -15
  25. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +6 -19
  26. package/dist/cjs/snk-form-config.cjs.entry.js +7 -17
  27. package/dist/cjs/snk-form-view.cjs.entry.js +6 -1
  28. package/dist/cjs/snk-form.cjs.entry.js +13 -8
  29. package/dist/cjs/snk-grid-config.cjs.entry.js +6 -6
  30. package/dist/cjs/snk-grid.cjs.entry.js +18 -20
  31. package/dist/cjs/{snk-guides-viewer-27f87d90.js → snk-guides-viewer-f67f9cea.js} +12 -7
  32. package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -8
  33. package/dist/cjs/snk-personalized-filter.cjs.entry.js +14 -16
  34. package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
  35. package/dist/cjs/snk-simple-crud.cjs.entry.js +15 -71
  36. package/dist/cjs/snk-taskbar.cjs.entry.js +2 -1
  37. package/dist/collection/components/snk-actions-button/actions/index.js +3 -4
  38. package/dist/collection/components/snk-actions-button/snk-actions-button.js +8 -4
  39. package/dist/collection/components/snk-application/snk-application.js +58 -65
  40. package/dist/collection/components/snk-configurator/snk-configurator.js +19 -1
  41. package/dist/collection/components/snk-crud/snk-crud.js +40 -6
  42. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +42 -2
  43. package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +27 -1
  44. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +47 -28
  45. package/dist/collection/components/snk-data-unit/snk-data-unit.js +7 -8
  46. package/dist/collection/components/snk-entity-list/snk-entity-list.js +0 -23
  47. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +2 -12
  48. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +1 -1
  49. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +21 -16
  50. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +28 -12
  51. package/dist/collection/components/snk-form/SnkFormConfigManager.js +17 -19
  52. package/dist/collection/components/snk-form/snk-form.js +46 -2
  53. package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +5 -15
  54. package/dist/collection/components/snk-grid/snk-grid.js +51 -15
  55. package/dist/collection/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.js +19 -1
  56. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +28 -12
  57. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +22 -0
  58. package/dist/collection/components/snk-taskbar/snk-taskbar.js +19 -1
  59. package/dist/collection/components/teste-pesquisa/teste-pesquisa.css +1 -1
  60. package/dist/collection/lib/configs/ConfigStorage.js +33 -44
  61. package/dist/collection/lib/dataUnit/InMemoryLoader.js +2 -59
  62. package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +0 -24
  63. package/dist/collection/lib/resourceid/ResourceIDUtils.js +7 -0
  64. package/dist/collection/lib/utils/urlutils.js +29 -0
  65. package/dist/components/ConfigStorage.js +161 -48
  66. package/dist/components/DataFetcher.js +29 -0
  67. package/dist/components/ResourceIDUtils.js +10 -0
  68. package/dist/components/SnkFormConfigManager.js +17 -19
  69. package/dist/components/auth-fetcher.js +1 -1
  70. package/dist/components/form-config-fetcher.js +64 -2
  71. package/dist/components/snk-actions-button2.js +11 -8
  72. package/dist/components/snk-application2.js +42 -38
  73. package/dist/components/snk-configurator2.js +3 -1
  74. package/dist/components/snk-crud.js +18 -5
  75. package/dist/components/snk-data-unit2.js +5 -4
  76. package/dist/components/snk-detail-view2.js +15 -7
  77. package/dist/components/snk-entity-list.js +0 -4
  78. package/dist/components/snk-filter-bar2.js +12 -12
  79. package/dist/components/snk-filter-detail2.js +2 -12
  80. package/dist/components/snk-filter-modal-item2.js +5 -16
  81. package/dist/components/snk-form-config2.js +5 -15
  82. package/dist/components/snk-form-view2.js +6 -1
  83. package/dist/components/snk-form.js +9 -2
  84. package/dist/components/snk-grid-config2.js +4 -2
  85. package/dist/components/snk-grid2.js +17 -16
  86. package/dist/components/snk-personalized-filter2.js +11 -11
  87. package/dist/components/snk-simple-crud2.js +3 -59
  88. package/dist/components/snk-taskbar2.js +3 -1
  89. package/dist/esm/{ConfigStorage-19a7260b.js → ConfigStorage-cfe03e99.js} +163 -49
  90. package/dist/esm/{DataFetcher-e0fc5549.js → DataFetcher-aaaff866.js} +29 -0
  91. package/dist/esm/ResourceIDUtils-a114189a.js +10 -0
  92. package/dist/esm/{SnkFormConfigManager-1a42eb02.js → SnkFormConfigManager-bfd8eabd.js} +19 -21
  93. package/dist/esm/{auth-fetcher-83a946f8.js → auth-fetcher-7860d777.js} +1 -1
  94. package/dist/esm/{dataunit-fetcher-6a695723.js → dataunit-fetcher-9dfcdb1d.js} +1 -1
  95. package/dist/esm/{form-config-fetcher-9e167008.js → form-config-fetcher-4a34b86a.js} +2 -2
  96. package/dist/esm/loader.js +1 -1
  97. package/dist/esm/{pesquisa-fetcher-9118eb7a.js → pesquisa-fetcher-01d058e6.js} +1 -1
  98. package/dist/{components/resource-fetcher.js → esm/resource-fetcher-b36ac145.js} +1 -1
  99. package/dist/esm/sankhyablocks.js +1 -1
  100. package/dist/esm/snk-actions-button.entry.js +13 -10
  101. package/dist/esm/snk-application.entry.js +48 -44
  102. package/dist/esm/snk-attach.entry.js +2 -2
  103. package/dist/esm/snk-configurator.entry.js +2 -1
  104. package/dist/esm/snk-crud.entry.js +21 -9
  105. package/dist/esm/snk-data-exporter.entry.js +2 -2
  106. package/dist/esm/{snk-data-unit-77508763.js → snk-data-unit-3ab57d1a.js} +4 -4
  107. package/dist/esm/snk-data-unit.entry.js +1 -1
  108. package/dist/esm/snk-detail-view.entry.js +11 -10
  109. package/dist/esm/snk-entity-list.entry.js +0 -4
  110. package/dist/esm/snk-filter-bar.entry.js +15 -17
  111. package/dist/esm/snk-filter-detail.entry.js +2 -16
  112. package/dist/esm/snk-filter-modal-item.entry.js +7 -20
  113. package/dist/esm/snk-form-config.entry.js +8 -18
  114. package/dist/esm/snk-form-view.entry.js +6 -1
  115. package/dist/esm/snk-form.entry.js +13 -8
  116. package/dist/esm/snk-grid-config.entry.js +6 -6
  117. package/dist/esm/snk-grid.entry.js +18 -20
  118. package/dist/esm/{snk-guides-viewer-c47cd45e.js → snk-guides-viewer-3ea14ab4.js} +12 -7
  119. package/dist/esm/snk-guides-viewer.entry.js +7 -8
  120. package/dist/esm/snk-personalized-filter.entry.js +14 -16
  121. package/dist/esm/snk-print-selector.entry.js +1 -1
  122. package/dist/esm/snk-simple-crud.entry.js +5 -61
  123. package/dist/esm/snk-taskbar.entry.js +2 -1
  124. package/dist/sankhyablocks/{p-e7e54737.entry.js → p-05bcad8a.entry.js} +1 -1
  125. package/dist/sankhyablocks/p-0ae5b923.entry.js +1 -0
  126. package/dist/sankhyablocks/p-15230263.js +1 -0
  127. package/dist/sankhyablocks/p-18fa618e.entry.js +1 -0
  128. package/dist/sankhyablocks/{p-0ed0fc02.entry.js → p-1b81c379.entry.js} +1 -1
  129. package/dist/sankhyablocks/{p-98f9d076.js → p-2dd0f891.js} +2 -2
  130. package/dist/sankhyablocks/p-330f584a.entry.js +1 -0
  131. package/dist/sankhyablocks/{p-968741cc.js → p-48a40939.js} +1 -1
  132. package/dist/sankhyablocks/p-4c33a77c.entry.js +1 -0
  133. package/dist/sankhyablocks/p-53884b5f.entry.js +1 -0
  134. package/dist/sankhyablocks/{p-df8621b4.js → p-60791bb6.js} +1 -1
  135. package/dist/sankhyablocks/{p-f88c45bf.js → p-64c2cec3.js} +1 -1
  136. package/dist/sankhyablocks/p-688dcb4c.js +1 -0
  137. package/dist/sankhyablocks/p-70e785db.entry.js +1 -0
  138. package/dist/sankhyablocks/{p-0a4c753d.js → p-85affa29.js} +1 -1
  139. package/dist/sankhyablocks/p-861a3495.entry.js +1 -0
  140. package/dist/sankhyablocks/p-878b0dd3.entry.js +1 -0
  141. package/dist/sankhyablocks/p-97d2fbd9.entry.js +1 -0
  142. package/dist/sankhyablocks/p-9a270401.entry.js +1 -0
  143. package/dist/sankhyablocks/p-9d591463.js +1 -0
  144. package/dist/sankhyablocks/p-9d93da18.js +56 -0
  145. package/dist/sankhyablocks/{p-34085ced.entry.js → p-9f387187.entry.js} +1 -1
  146. package/dist/sankhyablocks/p-aa4c112f.entry.js +11 -0
  147. package/dist/sankhyablocks/p-bae87498.entry.js +1 -0
  148. package/dist/sankhyablocks/{p-2ac9c585.js → p-bee6b5d7.js} +1 -1
  149. package/dist/sankhyablocks/p-c555075c.entry.js +1 -0
  150. package/dist/sankhyablocks/p-cc67bd06.entry.js +1 -0
  151. package/dist/sankhyablocks/p-d4f9ee17.entry.js +1 -0
  152. package/dist/sankhyablocks/p-e070d7a3.entry.js +1 -0
  153. package/dist/sankhyablocks/p-e086cc2a.entry.js +1 -0
  154. package/dist/sankhyablocks/p-ed705cbb.entry.js +1 -0
  155. package/dist/sankhyablocks/{p-7b8b8ae9.js → p-f737f7e1.js} +1 -1
  156. package/dist/sankhyablocks/p-fa523d6b.entry.js +1 -0
  157. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  158. package/dist/types/components/snk-actions-button/actions/index.d.ts +2 -1
  159. package/dist/types/components/snk-application/snk-application.d.ts +8 -13
  160. package/dist/types/components/snk-configurator/snk-configurator.d.ts +4 -0
  161. package/dist/types/components/snk-crud/snk-crud.d.ts +5 -0
  162. package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +8 -0
  163. package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +5 -0
  164. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +9 -2
  165. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +2 -2
  166. package/dist/types/components/snk-entity-list/snk-entity-list.d.ts +0 -4
  167. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +0 -3
  168. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +1 -1
  169. package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.d.ts +5 -4
  170. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +4 -0
  171. package/dist/types/components/snk-form/SnkFormConfigManager.d.ts +5 -4
  172. package/dist/types/components/snk-form/snk-form.d.ts +9 -1
  173. package/dist/types/components/snk-form/subcomponents/snk-form-config/snk-form-config.d.ts +0 -2
  174. package/dist/types/components/snk-grid/snk-grid.d.ts +5 -1
  175. package/dist/types/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.d.ts +4 -0
  176. package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +5 -1
  177. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +4 -0
  178. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +4 -0
  179. package/dist/types/components.d.ts +125 -21
  180. package/dist/types/lib/configs/ConfigStorage.d.ts +11 -13
  181. package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +0 -7
  182. package/dist/types/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.d.ts +0 -1
  183. package/dist/types/lib/resourceid/ResourceIDUtils.d.ts +3 -0
  184. package/dist/types/lib/utils/urlutils.d.ts +14 -0
  185. package/package.json +3 -3
  186. package/dist/cjs/filter-bar-config-fetcher-2b8ed9d0.js +0 -155
  187. package/dist/components/filter-bar-config-fetcher.js +0 -153
  188. package/dist/esm/filter-bar-config-fetcher-06e02851.js +0 -153
  189. package/dist/esm/resource-fetcher-768d5556.js +0 -66
  190. package/dist/sankhyablocks/p-216f081a.entry.js +0 -1
  191. package/dist/sankhyablocks/p-22c6fe1a.entry.js +0 -1
  192. package/dist/sankhyablocks/p-34a1357a.entry.js +0 -1
  193. package/dist/sankhyablocks/p-4721c3db.js +0 -1
  194. package/dist/sankhyablocks/p-6759adae.entry.js +0 -1
  195. package/dist/sankhyablocks/p-7e285d6c.entry.js +0 -11
  196. package/dist/sankhyablocks/p-815a42c0.entry.js +0 -1
  197. package/dist/sankhyablocks/p-8a41172a.entry.js +0 -1
  198. package/dist/sankhyablocks/p-8f8184ff.js +0 -56
  199. package/dist/sankhyablocks/p-976e56e9.js +0 -1
  200. package/dist/sankhyablocks/p-bc735728.entry.js +0 -1
  201. package/dist/sankhyablocks/p-be684b38.entry.js +0 -1
  202. package/dist/sankhyablocks/p-befbc9ee.entry.js +0 -1
  203. package/dist/sankhyablocks/p-c0f656af.entry.js +0 -1
  204. package/dist/sankhyablocks/p-c44f6aaf.entry.js +0 -1
  205. package/dist/sankhyablocks/p-c57bd935.entry.js +0 -1
  206. package/dist/sankhyablocks/p-c6380ea2.entry.js +0 -1
  207. package/dist/sankhyablocks/p-cfd7da4a.entry.js +0 -1
  208. package/dist/sankhyablocks/p-d1b89765.js +0 -1
  209. package/dist/sankhyablocks/p-de69b4b0.entry.js +0 -1
  210. package/dist/sankhyablocks/p-e28129aa.entry.js +0 -1
  211. package/dist/sankhyablocks/p-f31bfdee.entry.js +0 -1
  212. package/dist/sankhyablocks/p-fe010e54.entry.js +0 -1
@@ -8,6 +8,7 @@ export class SnkConfigurator {
8
8
  this._permissions = undefined;
9
9
  this.showActionButtons = false;
10
10
  this.configName = undefined;
11
+ this.resourceID = undefined;
11
12
  this.viewMode = VIEW_MODE.GRID;
12
13
  this.messagesBuilder = undefined;
13
14
  }
@@ -72,7 +73,7 @@ export class SnkConfigurator {
72
73
  componentWillLoad() {
73
74
  this._application = ApplicationContext.getContextValue('__SNK__APPLICATION__');
74
75
  if (this._application) {
75
- this._application.getAllAccess().then(access => (this._permissions = access));
76
+ this._application.getAllAccess(this.resourceID).then(access => (this._permissions = access));
76
77
  }
77
78
  else {
78
79
  this._permissions = {};
@@ -130,6 +131,23 @@ export class SnkConfigurator {
130
131
  "attribute": "config-name",
131
132
  "reflect": false
132
133
  },
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
+ },
133
151
  "viewMode": {
134
152
  "type": "number",
135
153
  "mutable": false,
@@ -17,6 +17,7 @@ export class SnkCrud {
17
17
  this.attachmentRegisterKey = undefined;
18
18
  this._currentViewMode = VIEW_MODE.GRID;
19
19
  this._canEdit = undefined;
20
+ this._resourceID = undefined;
20
21
  this.configName = undefined;
21
22
  this.selectionToastConfig = undefined;
22
23
  this.showActionButtons = false;
@@ -111,7 +112,7 @@ export class SnkCrud {
111
112
  }
112
113
  componentWillLoad() {
113
114
  const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
114
- application.hasAccess(AutorizationType.UPDATE).then(canEdit => this._canEdit = canEdit);
115
+ application.hasAccess(AutorizationType.UPDATE, this._resourceID).then(canEdit => this._canEdit = canEdit);
115
116
  let parent = this._element.parentElement;
116
117
  while (parent) {
117
118
  if (parent.tagName.toUpperCase() === "SNK-DATA-UNIT") {
@@ -123,11 +124,11 @@ export class SnkCrud {
123
124
  if (!this._dataUnit) {
124
125
  this._snkDataUnit.addEventListener("dataUnitReady", (evt) => {
125
126
  this._dataUnit = evt.detail;
126
- this.initDataUnit();
127
+ this.initDataUnit(application);
127
128
  });
128
129
  }
129
130
  else {
130
- this.initDataUnit();
131
+ this.initDataUnit(application);
131
132
  }
132
133
  this._snkDataUnit.addEventListener("dataStateChange", async ({ detail: dataState }) => {
133
134
  this._dataState = dataState;
@@ -143,11 +144,18 @@ export class SnkCrud {
143
144
  this.configName = application.configName;
144
145
  }
145
146
  }
146
- initDataUnit() {
147
+ async initDataUnit(application) {
147
148
  this.addDataElementID();
148
149
  if (!this.messagesBuilder) {
149
150
  this.messagesBuilder = this._snkDataUnit.messagesBuilder;
150
151
  }
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
+ }
151
159
  }
152
160
  handleConfiguratorEvent(evt, type) {
153
161
  evt.stopImmediatePropagation();
@@ -158,8 +166,11 @@ export class SnkCrud {
158
166
  this.configuratorCancel.emit();
159
167
  }
160
168
  render() {
169
+ if (this._resourceID == undefined) {
170
+ return;
171
+ }
161
172
  this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
162
- 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 }, 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 }, 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" })))));
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" })))));
163
174
  }
164
175
  static get is() { return "snk-crud"; }
165
176
  static get encapsulation() { return "scoped"; }
@@ -404,7 +415,8 @@ export class SnkCrud {
404
415
  "_dataState": {},
405
416
  "attachmentRegisterKey": {},
406
417
  "_currentViewMode": {},
407
- "_canEdit": {}
418
+ "_canEdit": {},
419
+ "_resourceID": {}
408
420
  };
409
421
  }
410
422
  static get events() {
@@ -453,6 +465,28 @@ export class SnkCrud {
453
465
  "resolved": "any",
454
466
  "references": {}
455
467
  }
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
+ }
456
490
  }];
457
491
  }
458
492
  static get methods() {
@@ -14,6 +14,7 @@ export class SnkDetailView {
14
14
  this.attachmentRegisterKey = undefined;
15
15
  this.formConfigManager = undefined;
16
16
  this.dataUnitName = undefined;
17
+ this.resourceID = undefined;
17
18
  this.guideItemPath = undefined;
18
19
  this.entityName = undefined;
19
20
  this.label = undefined;
@@ -183,7 +184,7 @@ export class SnkDetailView {
183
184
  }
184
185
  componentWillLoad() {
185
186
  this._configName = `dynaform.${this.entityName}`;
186
- this.formConfigManager = new SnkFormConfigManager(this._configName, () => this.loadMetadata());
187
+ this.formConfigManager = new SnkFormConfigManager(this._configName, this.resourceID, () => this.loadMetadata());
187
188
  this.formConfigManager.loadConfig();
188
189
  if (this.messagesBuilder == undefined) {
189
190
  this.messagesBuilder = new SnkMessageBuilder(this.entityName);
@@ -192,7 +193,7 @@ export class SnkDetailView {
192
193
  render() {
193
194
  this.updateLabel();
194
195
  //const cardConfig: IFormCardConfig = this._cardsState?.get(this.selectedForm);
195
- 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 }, 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) }))))));
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) }))))));
196
197
  }
197
198
  static get is() { return "snk-detail-view"; }
198
199
  static get encapsulation() { return "scoped"; }
@@ -245,6 +246,23 @@ export class SnkDetailView {
245
246
  "attribute": "data-unit-name",
246
247
  "reflect": false
247
248
  },
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
+ },
248
266
  "guideItemPath": {
249
267
  "type": "unknown",
250
268
  "mutable": false,
@@ -462,6 +480,28 @@ export class SnkDetailView {
462
480
  "resolved": "string",
463
481
  "references": {}
464
482
  }
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
+ }
465
505
  }];
466
506
  }
467
507
  static get methods() {
@@ -70,6 +70,10 @@ 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
+ }
73
77
  disconnectedCallback() {
74
78
  if (this._dataBinder != undefined) {
75
79
  this._dataBinder.onDisconnectedCallback();
@@ -82,7 +86,7 @@ export class SnkFormView {
82
86
  ?
83
87
  h("snk-form-summary", { summary: this.getCardSummary() })
84
88
  :
85
- h("ez-form-view", { ref: ref => this._formView = ref, fields: this.fields, onEzContentReady: evt => this.bindFields(evt.detail) })));
89
+ h("ez-form-view", { ref: ref => this._formView = ref, fields: this.fields, onEzContentReady: evt => this.bindFields(evt.detail), onFormItemsReady: (event) => this.handleFormItemsReady(event) })));
86
90
  }
87
91
  static get is() { return "snk-form-view"; }
88
92
  static get encapsulation() { return "scoped"; }
@@ -351,6 +355,28 @@ export class SnkFormView {
351
355
  }
352
356
  }
353
357
  }
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
+ }
354
380
  }];
355
381
  }
356
382
  static get methods() {
@@ -23,6 +23,7 @@ export class SnkGuidesViewer {
23
23
  this.messagesBuilder = undefined;
24
24
  this.canEdit = true;
25
25
  this.presentationMode = undefined;
26
+ this.resourceID = undefined;
26
27
  this._breadcrumbItems = [];
27
28
  this._guides = undefined;
28
29
  this._formEditorConfigManager = undefined;
@@ -224,7 +225,7 @@ export class SnkGuidesViewer {
224
225
  else {
225
226
  detailBranch = this.selectedGuide;
226
227
  }
227
- 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) }));
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 }));
228
229
  }
229
230
  else {
230
231
  const cardId = this.selectedGuide.id;
@@ -273,7 +274,10 @@ export class SnkGuidesViewer {
273
274
  return this.selectedGuide === undefined || '__main' === ((_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.id);
274
275
  }
275
276
  componentWillLoad() {
276
- this._configManager = new SnkFormConfigManager(this.configName, config => this.masterFormConfig = config);
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
281
  this._configManager.loadConfig();
278
282
  }
279
283
  componentDidRender() {
@@ -292,7 +296,7 @@ export class SnkGuidesViewer {
292
296
  }
293
297
  buildTaskBar() {
294
298
  var _a;
295
- 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 }));
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
300
  }
297
301
  render() {
298
302
  var _a, _b;
@@ -311,7 +315,7 @@ export class SnkGuidesViewer {
311
315
  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 ?
312
316
  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) })
313
317
  :
314
- 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) })));
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
319
  }
316
320
  static get is() { return "snk-guides-viewer"; }
317
321
  static get encapsulation() { return "scoped"; }
@@ -327,30 +331,6 @@ export class SnkGuidesViewer {
327
331
  }
328
332
  static get properties() {
329
333
  return {
330
- "_guideBuilders": {
331
- "type": "unknown",
332
- "mutable": false,
333
- "complexType": {
334
- "original": "Map<string, GuideBuilder>",
335
- "resolved": "Map<string, GuideBuilder>",
336
- "references": {
337
- "Map": {
338
- "location": "global"
339
- },
340
- "GuideBuilder": {
341
- "location": "import",
342
- "path": "./GuideBuilder"
343
- }
344
- }
345
- },
346
- "required": false,
347
- "optional": false,
348
- "docs": {
349
- "tags": [],
350
- "text": ""
351
- },
352
- "defaultValue": "new Map()"
353
- },
354
334
  "dataUnit": {
355
335
  "type": "unknown",
356
336
  "mutable": false,
@@ -587,6 +567,23 @@ export class SnkGuidesViewer {
587
567
  },
588
568
  "attribute": "presentation-mode",
589
569
  "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
590
587
  }
591
588
  };
592
589
  }
@@ -629,6 +626,28 @@ export class SnkGuidesViewer {
629
626
  "resolved": "string",
630
627
  "references": {}
631
628
  }
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
+ }
632
651
  }];
633
652
  }
634
653
  static get methods() {
@@ -61,7 +61,7 @@ export class SnkDataUnit {
61
61
  this.useCancelConfirm = true;
62
62
  this.ignoreSaveMessage = undefined;
63
63
  this.configName = undefined;
64
- this.configName = undefined;
64
+ this.resourceID = undefined;
65
65
  }
66
66
  observePageSize() {
67
67
  if (this.dataUnit) {
@@ -181,7 +181,6 @@ export class SnkDataUnit {
181
181
  return resolve(action);
182
182
  if (this._openedAlert)
183
183
  return this.dataUnit.cancelEdition();
184
- ;
185
184
  this._openedAlert = true;
186
185
  this.dataUnit.cancelEdition();
187
186
  ApplicationUtils.alert(this.getMessage("snkDataUnit.forbidden"), this.getMessage("snkDataUnit.forbiddenUpdate")).then(() => {
@@ -326,10 +325,10 @@ export class SnkDataUnit {
326
325
  const cacheName = this.dataUnitName ? this.dataUnitName : this.entityName;
327
326
  if (this._parentSnkDataUnit) {
328
327
  this._parentDataUnit = await ((_a = this._parentSnkDataUnit) === null || _a === void 0 ? void 0 : _a.getDataUnit());
329
- return await this._application.getDataUnit(this.entityName, cacheName, this._parentDataUnit, this.configName);
328
+ return await this._application.getDataUnit(this.entityName, cacheName, this._parentDataUnit, this.configName, this.resourceID);
330
329
  }
331
330
  else {
332
- return await this._application.getDataUnit(this.entityName, cacheName, null, this.configName);
331
+ return await this._application.getDataUnit(this.entityName, cacheName, null, this.configName, this.resourceID);
333
332
  }
334
333
  }
335
334
  async loadDataUnit() {
@@ -388,7 +387,7 @@ export class SnkDataUnit {
388
387
  //---------------------------------------------
389
388
  componentWillLoad() {
390
389
  this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
391
- this._application.getAllAccess().then(access => this._permissions = access);
390
+ this._application.getAllAccess(this.resourceID).then(access => this._permissions = access);
392
391
  this._parentSnkDataUnit = this.getParentSnkDataUnit();
393
392
  if (this.messagesBuilder == undefined) {
394
393
  this.messagesBuilder = new SnkMessageBuilder(this.entityName);
@@ -626,7 +625,7 @@ export class SnkDataUnit {
626
625
  "attribute": "config-name",
627
626
  "reflect": false
628
627
  },
629
- "configName": {
628
+ "resourceID": {
630
629
  "type": "string",
631
630
  "mutable": false,
632
631
  "complexType": {
@@ -638,9 +637,9 @@ export class SnkDataUnit {
638
637
  "optional": false,
639
638
  "docs": {
640
639
  "tags": [],
641
- "text": "Usado para obter configura\u00E7\u00E3o de metadados."
640
+ "text": "Identificador de recursos como configura\u00E7\u00F5es e acesso."
642
641
  },
643
- "attribute": "config-name",
642
+ "attribute": "resource-i-d",
644
643
  "reflect": false
645
644
  }
646
645
  };
@@ -10,7 +10,6 @@ export class SnkEntityList {
10
10
  }
11
11
  async reloadList() {
12
12
  this.loadListSource();
13
- this.saveConfig.emit(this.config);
14
13
  }
15
14
  observeConfig() {
16
15
  var _a, _b;
@@ -26,7 +25,6 @@ export class SnkEntityList {
26
25
  }
27
26
  });
28
27
  this.config = ObjectUtils.copy(configCopy);
29
- this.saveConfig.emit(this.config);
30
28
  this.valueChanged.emit((_b = this.config) === null || _b === void 0 ? void 0 : _b.value);
31
29
  }
32
30
  loadListSource() {
@@ -83,7 +81,6 @@ export class SnkEntityList {
83
81
  }
84
82
  ] });
85
83
  this.loadListSource();
86
- this.saveConfig.emit(this.config);
87
84
  this.valueChanged.emit((_d = this.config) === null || _d === void 0 ? void 0 : _d.value);
88
85
  }
89
86
  }
@@ -206,26 +203,6 @@ export class SnkEntityList {
206
203
  }
207
204
  }
208
205
  }
209
- }, {
210
- "method": "saveConfig",
211
- "name": "saveConfig",
212
- "bubbles": true,
213
- "cancelable": true,
214
- "composed": true,
215
- "docs": {
216
- "tags": [],
217
- "text": "Evento emitido ao realizar alguma a\u00E7\u00E3o que altera os dados do config.value permitindo salvar estas informa\u00E7\u00F5es"
218
- },
219
- "complexType": {
220
- "original": "SnkFilterItemConfig",
221
- "resolved": "SnkFilterItemConfig",
222
- "references": {
223
- "SnkFilterItemConfig": {
224
- "location": "import",
225
- "path": "../snk-filter-bar/filter-item/snk-filter-item"
226
- }
227
- }
228
- }
229
206
  }];
230
207
  }
231
208
  static get methods() {
@@ -1,8 +1,7 @@
1
1
  import { h, Host, Fragment } from '@stencil/core';
2
2
  import { ApplicationUtils } from "@sankhyalabs/ezui/dist/collection/utils";
3
3
  import FilterItemType from './filter-item-type.enum';
4
- import { ElementIDUtils, ApplicationContext, ObjectUtils } from '@sankhyalabs/core';
5
- import FilterBarConfigFetcher from '../../../lib/http/data-fetcher/fetchers/filter-bar-config-fetcher';
4
+ import { ElementIDUtils, ObjectUtils } from '@sankhyalabs/core';
6
5
  import { EPresentationMode } from './editors/enum/presentationMode';
7
6
  import { PersonalizedFilterUtils } from '../../snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils';
8
7
  export class SnkFilterDetail {
@@ -24,7 +23,6 @@ export class SnkFilterDetail {
24
23
  }
25
24
  componentDidLoad() {
26
25
  if (this._element) {
27
- this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
28
26
  ElementIDUtils.addIDInfo(this._element);
29
27
  const dataElementIdDoFilterItem = this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
30
28
  this._idContentEditor = `${dataElementIdDoFilterItem}_${this.config.id}`;
@@ -142,20 +140,12 @@ export class SnkFilterDetail {
142
140
  this.config = ObjectUtils.copy(configCopy);
143
141
  }
144
142
  }
145
- saveConfig(newConfig) {
146
- var _a;
147
- (_a = this._application) === null || _a === void 0 ? void 0 : _a.getResourceID().then(resourceId => {
148
- const fetcher = new FilterBarConfigFetcher();
149
- fetcher.saveEntityListConfig(newConfig, resourceId, this._application.configName);
150
- this.config = newConfig;
151
- });
152
- }
153
143
  componentWillLoad() {
154
144
  this.originalConfig = ObjectUtils.copy(this.config);
155
145
  }
156
146
  render() {
157
147
  const { tag: CustomElement, props } = this.getContentEditor();
158
- 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(CustomElement, Object.assign({ maxHeightList: '240px', ref: ref => this._editor = ref, value: this.config.value, config: this.config, onKeyDown: evt => this.onKeyDonwListener(evt), "data-element-id": this._idContentEditor, getMessage: this.getMessage, onSaveConfig: evt => this.saveConfig(evt.detail), rightListSlotBuilder: item => this.buildRightSlot(item) }, props)), h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), h("div", { class: "ez-col ez-col--sd-12 ez-align--right" }, this.filterCanBeCleared() && (h("ez-button", { label: this.getMessage("snkFilterBar.cleanFilter"), onClick: () => this.clear(), size: "small" })), h("ez-button", { ref: ref => this._applyButton = ref, label: this.getMessage("snkFilterBar.applyFilter"), onClick: () => this.apply(), size: "small", class: "ez-button--primary ez-padding-left--medium" }))));
148
+ 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(CustomElement, Object.assign({ maxHeightList: '240px', ref: ref => this._editor = ref, value: this.config.value, config: this.config, onKeyDown: evt => this.onKeyDonwListener(evt), "data-element-id": this._idContentEditor, getMessage: this.getMessage, rightListSlotBuilder: item => this.buildRightSlot(item) }, props)), h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), h("div", { class: "ez-col ez-col--sd-12 ez-align--right" }, this.filterCanBeCleared() && (h("ez-button", { label: this.getMessage("snkFilterBar.cleanFilter"), onClick: () => this.clear(), size: "small" })), h("ez-button", { ref: ref => this._applyButton = ref, label: this.getMessage("snkFilterBar.applyFilter"), onClick: () => this.apply(), size: "small", class: "ez-button--primary ez-padding-left--medium" }))));
159
149
  }
160
150
  static get is() { return "snk-filter-detail"; }
161
151
  static get properties() {
@@ -244,7 +244,7 @@ export class SnkFilterModal {
244
244
  "optional": false,
245
245
  "docs": {
246
246
  "tags": [],
247
- "text": "Nome da config para buscar no resourceId"
247
+ "text": "Nome da configura\u00E7\u00E3o. Serve para distinguir v\u00E1rias inst\u00E2ncias do componente."
248
248
  },
249
249
  "attribute": "config-name",
250
250
  "reflect": false