@sankhyalabs/sankhyablocks 8.15.0-dev.7 → 8.15.0-dev.9

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 (73) hide show
  1. package/dist/cjs/{ConfigStorage-8009ecb2.js → ConfigStorage-302bbbd4.js} +24 -14
  2. package/dist/cjs/{SnkFormConfigManager-7d850fbc.js → SnkFormConfigManager-71c4768e.js} +1 -1
  3. package/dist/cjs/{dataunit-fetcher-14108bec.js → dataunit-fetcher-353e4af2.js} +24 -4
  4. package/dist/cjs/snk-actions-button_2.cjs.entry.js +1 -1
  5. package/dist/cjs/snk-application.cjs.entry.js +2 -2
  6. package/dist/cjs/snk-attach.cjs.entry.js +1 -1
  7. package/dist/cjs/snk-crud.cjs.entry.js +2 -2
  8. package/dist/cjs/snk-detail-view.cjs.entry.js +4 -4
  9. package/dist/cjs/snk-filter-bar.cjs.entry.js +6 -3
  10. package/dist/cjs/snk-filter-item.cjs.entry.js +47 -1
  11. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +1 -1
  12. package/dist/cjs/snk-form.cjs.entry.js +2 -2
  13. package/dist/cjs/snk-grid-config.cjs.entry.js +1 -1
  14. package/dist/cjs/snk-grid.cjs.entry.js +1 -1
  15. package/dist/cjs/{snk-guides-viewer-e7f76399.js → snk-guides-viewer-e60ccc5e.js} +2 -2
  16. package/dist/cjs/snk-guides-viewer.cjs.entry.js +4 -4
  17. package/dist/cjs/snk-personalized-filter.cjs.entry.js +1 -1
  18. package/dist/cjs/snk-simple-crud.cjs.entry.js +1 -1
  19. package/dist/collection/collection-manifest.json +1 -1
  20. package/dist/collection/components/snk-crud/snk-crud.js +1 -1
  21. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +47 -1
  22. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +5 -2
  23. package/dist/collection/lib/configs/ConfigStorage.js +24 -14
  24. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +14 -1
  25. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +10 -3
  26. package/dist/components/ConfigStorage.js +24 -14
  27. package/dist/components/dataunit-fetcher.js +24 -4
  28. package/dist/components/snk-crud.js +1 -1
  29. package/dist/components/snk-filter-bar2.js +5 -2
  30. package/dist/components/snk-filter-item2.js +47 -1
  31. package/dist/esm/{ConfigStorage-1244b8b0.js → ConfigStorage-4151acc8.js} +24 -14
  32. package/dist/esm/{SnkFormConfigManager-9be0e7d4.js → SnkFormConfigManager-5c7d3771.js} +1 -1
  33. package/dist/esm/{dataunit-fetcher-cbec1594.js → dataunit-fetcher-0fc935a0.js} +24 -4
  34. package/dist/esm/snk-actions-button_2.entry.js +1 -1
  35. package/dist/esm/snk-application.entry.js +2 -2
  36. package/dist/esm/snk-attach.entry.js +1 -1
  37. package/dist/esm/snk-crud.entry.js +2 -2
  38. package/dist/esm/snk-detail-view.entry.js +4 -4
  39. package/dist/esm/snk-filter-bar.entry.js +6 -3
  40. package/dist/esm/snk-filter-item.entry.js +47 -1
  41. package/dist/esm/snk-filter-modal-item.entry.js +1 -1
  42. package/dist/esm/snk-form.entry.js +2 -2
  43. package/dist/esm/snk-grid-config.entry.js +1 -1
  44. package/dist/esm/snk-grid.entry.js +1 -1
  45. package/dist/esm/{snk-guides-viewer-c7aaf02a.js → snk-guides-viewer-98a8e45e.js} +2 -2
  46. package/dist/esm/snk-guides-viewer.entry.js +4 -4
  47. package/dist/esm/snk-personalized-filter.entry.js +1 -1
  48. package/dist/esm/snk-simple-crud.entry.js +1 -1
  49. package/dist/sankhyablocks/{p-fd8814b9.entry.js → p-1d75d9f9.entry.js} +1 -1
  50. package/dist/sankhyablocks/{p-d81f20c4.entry.js → p-41560fd8.entry.js} +1 -1
  51. package/dist/sankhyablocks/{p-776ee8e3.js → p-573a07c5.js} +1 -1
  52. package/dist/sankhyablocks/{p-c627ba91.entry.js → p-6678d5d4.entry.js} +1 -1
  53. package/dist/sankhyablocks/{p-6977a26c.entry.js → p-71439fd9.entry.js} +1 -1
  54. package/dist/sankhyablocks/{p-11081798.entry.js → p-761ed32f.entry.js} +1 -1
  55. package/dist/sankhyablocks/p-7d8d7fe9.entry.js +1 -0
  56. package/dist/sankhyablocks/{p-f514913b.entry.js → p-7f3c7b09.entry.js} +1 -1
  57. package/dist/sankhyablocks/{p-8c243e7e.entry.js → p-90f9b4db.entry.js} +1 -1
  58. package/dist/sankhyablocks/{p-8d16f9ce.js → p-a91bb13d.js} +1 -1
  59. package/dist/sankhyablocks/p-aa95fb2c.js +56 -0
  60. package/dist/sankhyablocks/{p-8d70b5d5.entry.js → p-abfa8101.entry.js} +1 -1
  61. package/dist/sankhyablocks/{p-809f367d.entry.js → p-b05ab13d.entry.js} +1 -1
  62. package/dist/sankhyablocks/{p-c4d19840.entry.js → p-b3020263.entry.js} +1 -1
  63. package/dist/sankhyablocks/{p-3891ae6f.js → p-bf93a748.js} +2 -2
  64. package/dist/sankhyablocks/{p-25927311.entry.js → p-c6f89389.entry.js} +1 -1
  65. package/dist/sankhyablocks/{p-dc8b6418.entry.js → p-cebae710.entry.js} +1 -1
  66. package/dist/sankhyablocks/{p-3520c088.entry.js → p-e0fd9555.entry.js} +1 -1
  67. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  68. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +1 -0
  69. package/dist/types/lib/configs/ConfigStorage.d.ts +4 -0
  70. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.d.ts +1 -0
  71. package/package.json +6 -4
  72. package/dist/sankhyablocks/p-585294ee.js +0 -56
  73. package/dist/sankhyablocks/p-f2056f66.entry.js +0 -1
@@ -2,11 +2,12 @@ import { FormConfigFetcher } from "../http/data-fetcher/fetchers/form-config-fet
2
2
  import GridConfigFetcher from "../http/data-fetcher/fetchers/grid-config-fetcher";
3
3
  import FilterBarConfigFetcher from "../http/data-fetcher/fetchers/filter-bar-config-fetcher";
4
4
  import PersonalizedFilterFetcher from "../http/data-fetcher/fetchers/personalized-filter-fetcher";
5
- const CONFIG_SOURCE = {
6
- form: "form",
7
- grid: "grid",
8
- filterBar: "filterBar"
9
- };
5
+ var CONFIG_SOURCE;
6
+ (function (CONFIG_SOURCE) {
7
+ CONFIG_SOURCE["form"] = "form";
8
+ CONFIG_SOURCE["grid"] = "grid";
9
+ CONFIG_SOURCE["filterBar"] = "filterBar";
10
+ })(CONFIG_SOURCE || (CONFIG_SOURCE = {}));
10
11
  export class ConfigStorage {
11
12
  static preload(resourceID, configName) {
12
13
  ConfigStorage.loadFormConfig(configName, resourceID);
@@ -34,13 +35,11 @@ export class ConfigStorage {
34
35
  return ConfigStorage.configById.get(cacheID);
35
36
  }
36
37
  static async saveFilterBarConfig(config, name, resourceID) {
37
- const cacheID = this.buildCacheID(name, CONFIG_SOURCE.filterBar, resourceID);
38
- this.configById.delete(cacheID);
38
+ await this.deleteFilterBarConfigCache(name, resourceID);
39
39
  return this.filterBarConfigFetcher.saveConfig(config, resourceID, name);
40
40
  }
41
41
  static async saveFormConfig(config, name, resourceID) {
42
- const cacheID = this.buildCacheID(name, CONFIG_SOURCE.form, resourceID);
43
- this.configById.delete(cacheID);
42
+ await this.deleteFormConfigCache(name, resourceID);
44
43
  return this.formConfigFetcher.saveConfig(config, name, resourceID);
45
44
  }
46
45
  static async saveCardState(config, name, resourceID) {
@@ -50,18 +49,16 @@ export class ConfigStorage {
50
49
  if (config == undefined) {
51
50
  return;
52
51
  }
53
- const cacheID = this.buildCacheID(name, CONFIG_SOURCE.grid, resourceID);
54
- this.configById.delete(cacheID);
52
+ await this.deleteGridConfigCache(name, resourceID);
55
53
  return this.gridConfigFetcher.saveConfig(config, name, resourceID);
56
54
  }
57
55
  static async loadPersonalizedFilter(filterId, resourceID, configName) {
58
56
  return this.personalizedFilterFetcher.loadPersonalizedFilter(resourceID, filterId, configName);
59
57
  }
60
58
  static async savePersonalizedFilter(personalizedFilter, resourceID, configName) {
61
- //Ao criar ou alterar um filtro personalizado,
59
+ //Ao criar ou alterar um filtro personalizado,
62
60
  //precisamos remover o cache do status da filterbar.
63
- const cacheID = this.buildCacheID(configName, CONFIG_SOURCE.filterBar, resourceID);
64
- this.configById.delete(cacheID);
61
+ await this.deleteFilterBarConfigCache(configName, resourceID);
65
62
  return this.personalizedFilterFetcher.savePersonalizedFilter(personalizedFilter, resourceID, configName);
66
63
  }
67
64
  static async removePersonalizedFilter(personalizedFilter, resourceID, configName) {
@@ -70,6 +67,19 @@ export class ConfigStorage {
70
67
  static async validatePersonalizedFilter(dataUnitName, expression) {
71
68
  return this.personalizedFilterFetcher.validatePersonalizedFilter(dataUnitName, expression);
72
69
  }
70
+ static async deleteGridConfigCache(name, resourceID) {
71
+ await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.grid);
72
+ }
73
+ static async deleteFormConfigCache(name, resourceID) {
74
+ await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.form);
75
+ }
76
+ static async deleteFilterBarConfigCache(name, resourceID) {
77
+ await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.filterBar);
78
+ }
79
+ static async deleteConfigCache(name, resourceID, source) {
80
+ const cacheID = ConfigStorage.buildCacheID(name, source, resourceID);
81
+ this.configById.delete(cacheID);
82
+ }
73
83
  static buildCacheID(name, source, resourceID) {
74
84
  if (name == undefined) {
75
85
  return `req_${source}_${resourceID}`;
@@ -171,6 +171,19 @@ export default class DataUnitFetcher {
171
171
  });
172
172
  });
173
173
  }
174
+ addTransientProperties(dataUnit, updatingFields) {
175
+ const loaderProps = dataUnit.getGlobalLoaderProps();
176
+ if (loaderProps == undefined || loaderProps.size === 0) {
177
+ return updatingFields;
178
+ }
179
+ if (updatingFields == undefined) {
180
+ updatingFields = {};
181
+ }
182
+ Array.from(loaderProps.entries()).forEach(([name, value]) => {
183
+ updatingFields[`transient.${name}`] = value;
184
+ });
185
+ return updatingFields;
186
+ }
174
187
  saveData(dataUnit, duChanges) {
175
188
  const updatedRecordsIds = [];
176
189
  const addedRecordsIds = [];
@@ -179,7 +192,7 @@ export default class DataUnitFetcher {
179
192
  const dataUnitInstance = DataUnitStorage.get(changeDU);
180
193
  let parsedUpdatingFields;
181
194
  if (updatingFields) {
182
- parsedUpdatingFields = Object.entries(updatingFields).map(([fieldName, value]) => {
195
+ parsedUpdatingFields = Object.entries(this.addTransientProperties(dataUnit, updatingFields)).map(([fieldName, value]) => {
183
196
  const descriptor = dataUnitInstance.getField(fieldName);
184
197
  const dataType = descriptor ? descriptor.dataType : DataType.TEXT;
185
198
  return { fieldName, dataType, value: dataUnitInstance.valueToString(fieldName, value) };
@@ -92,7 +92,7 @@ export class DatasetStrategy {
92
92
  tryJoinedFields: true,
93
93
  parallelLoader: useParallelLoader,
94
94
  crudListener: `br.com.sankhya.bff.${this.getModuleName()}.BFFDataUnitDatasetAdapter`,
95
- txProperties: this.getTxProperties(dataUnitName, request, sorting),
95
+ txProperties: this.getTxProperties(dataUnit, request, sorting),
96
96
  useDefaultRowsLimit: false
97
97
  }
98
98
  };
@@ -103,10 +103,10 @@ export class DatasetStrategy {
103
103
  const moduleName = app.getModuleName();
104
104
  return moduleName.replace("-bff", "");
105
105
  }
106
- getTxProperties(dataUnitName, request, sorting) {
106
+ getTxProperties(dataUnit, request, sorting) {
107
107
  var _a, _b;
108
108
  const txProperties = {
109
- "__DATA_UNIT_ADAPTER__[dataUnitName]": dataUnitName
109
+ "__DATA_UNIT_ADAPTER__[dataUnitName]": dataUnit.name
110
110
  };
111
111
  const serverSideFilters = (_b = (_a = request.filters) === null || _a === void 0 ? void 0 : _a.filter(filter => !filter.name.startsWith("FILTRO_COLUNA_"))) !== null && _b !== void 0 ? _b : [];
112
112
  if (serverSideFilters.length !== 0) {
@@ -118,6 +118,13 @@ export class DatasetStrategy {
118
118
  if (request.parentRecordId != undefined) {
119
119
  txProperties["__DATA_UNIT_ADAPTER__[parentRecordId]"] = request.parentRecordId;
120
120
  }
121
+ const loaderProps = dataUnit.getGlobalLoaderProps();
122
+ if (loaderProps == undefined || loaderProps.size === 0) {
123
+ return txProperties;
124
+ }
125
+ Array.from(loaderProps.entries()).forEach(([name, value]) => {
126
+ txProperties[name] = value;
127
+ });
121
128
  return txProperties;
122
129
  }
123
130
  processRecords(dataUnit, fields, responseRecords) {
@@ -351,11 +351,12 @@ class PersonalizedFilterFetcher {
351
351
  }
352
352
  }
353
353
 
354
- const CONFIG_SOURCE = {
355
- form: "form",
356
- grid: "grid",
357
- filterBar: "filterBar"
358
- };
354
+ var CONFIG_SOURCE;
355
+ (function (CONFIG_SOURCE) {
356
+ CONFIG_SOURCE["form"] = "form";
357
+ CONFIG_SOURCE["grid"] = "grid";
358
+ CONFIG_SOURCE["filterBar"] = "filterBar";
359
+ })(CONFIG_SOURCE || (CONFIG_SOURCE = {}));
359
360
  class ConfigStorage {
360
361
  static preload(resourceID, configName) {
361
362
  ConfigStorage.loadFormConfig(configName, resourceID);
@@ -383,13 +384,11 @@ class ConfigStorage {
383
384
  return ConfigStorage.configById.get(cacheID);
384
385
  }
385
386
  static async saveFilterBarConfig(config, name, resourceID) {
386
- const cacheID = this.buildCacheID(name, CONFIG_SOURCE.filterBar, resourceID);
387
- this.configById.delete(cacheID);
387
+ await this.deleteFilterBarConfigCache(name, resourceID);
388
388
  return this.filterBarConfigFetcher.saveConfig(config, resourceID, name);
389
389
  }
390
390
  static async saveFormConfig(config, name, resourceID) {
391
- const cacheID = this.buildCacheID(name, CONFIG_SOURCE.form, resourceID);
392
- this.configById.delete(cacheID);
391
+ await this.deleteFormConfigCache(name, resourceID);
393
392
  return this.formConfigFetcher.saveConfig(config, name, resourceID);
394
393
  }
395
394
  static async saveCardState(config, name, resourceID) {
@@ -399,18 +398,16 @@ class ConfigStorage {
399
398
  if (config == undefined) {
400
399
  return;
401
400
  }
402
- const cacheID = this.buildCacheID(name, CONFIG_SOURCE.grid, resourceID);
403
- this.configById.delete(cacheID);
401
+ await this.deleteGridConfigCache(name, resourceID);
404
402
  return this.gridConfigFetcher.saveConfig(config, name, resourceID);
405
403
  }
406
404
  static async loadPersonalizedFilter(filterId, resourceID, configName) {
407
405
  return this.personalizedFilterFetcher.loadPersonalizedFilter(resourceID, filterId, configName);
408
406
  }
409
407
  static async savePersonalizedFilter(personalizedFilter, resourceID, configName) {
410
- //Ao criar ou alterar um filtro personalizado,
408
+ //Ao criar ou alterar um filtro personalizado,
411
409
  //precisamos remover o cache do status da filterbar.
412
- const cacheID = this.buildCacheID(configName, CONFIG_SOURCE.filterBar, resourceID);
413
- this.configById.delete(cacheID);
410
+ await this.deleteFilterBarConfigCache(configName, resourceID);
414
411
  return this.personalizedFilterFetcher.savePersonalizedFilter(personalizedFilter, resourceID, configName);
415
412
  }
416
413
  static async removePersonalizedFilter(personalizedFilter, resourceID, configName) {
@@ -419,6 +416,19 @@ class ConfigStorage {
419
416
  static async validatePersonalizedFilter(dataUnitName, expression) {
420
417
  return this.personalizedFilterFetcher.validatePersonalizedFilter(dataUnitName, expression);
421
418
  }
419
+ static async deleteGridConfigCache(name, resourceID) {
420
+ await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.grid);
421
+ }
422
+ static async deleteFormConfigCache(name, resourceID) {
423
+ await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.form);
424
+ }
425
+ static async deleteFilterBarConfigCache(name, resourceID) {
426
+ await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.filterBar);
427
+ }
428
+ static async deleteConfigCache(name, resourceID, source) {
429
+ const cacheID = ConfigStorage.buildCacheID(name, source, resourceID);
430
+ this.configById.delete(cacheID);
431
+ }
422
432
  static buildCacheID(name, source, resourceID) {
423
433
  if (name == undefined) {
424
434
  return `req_${source}_${resourceID}`;
@@ -617,7 +617,7 @@ class DatasetStrategy {
617
617
  tryJoinedFields: true,
618
618
  parallelLoader: useParallelLoader,
619
619
  crudListener: `br.com.sankhya.bff.${this.getModuleName()}.BFFDataUnitDatasetAdapter`,
620
- txProperties: this.getTxProperties(dataUnitName, request, sorting),
620
+ txProperties: this.getTxProperties(dataUnit, request, sorting),
621
621
  useDefaultRowsLimit: false
622
622
  }
623
623
  };
@@ -628,10 +628,10 @@ class DatasetStrategy {
628
628
  const moduleName = app.getModuleName();
629
629
  return moduleName.replace("-bff", "");
630
630
  }
631
- getTxProperties(dataUnitName, request, sorting) {
631
+ getTxProperties(dataUnit, request, sorting) {
632
632
  var _a, _b;
633
633
  const txProperties = {
634
- "__DATA_UNIT_ADAPTER__[dataUnitName]": dataUnitName
634
+ "__DATA_UNIT_ADAPTER__[dataUnitName]": dataUnit.name
635
635
  };
636
636
  const serverSideFilters = (_b = (_a = request.filters) === null || _a === void 0 ? void 0 : _a.filter(filter => !filter.name.startsWith("FILTRO_COLUNA_"))) !== null && _b !== void 0 ? _b : [];
637
637
  if (serverSideFilters.length !== 0) {
@@ -643,6 +643,13 @@ class DatasetStrategy {
643
643
  if (request.parentRecordId != undefined) {
644
644
  txProperties["__DATA_UNIT_ADAPTER__[parentRecordId]"] = request.parentRecordId;
645
645
  }
646
+ const loaderProps = dataUnit.getGlobalLoaderProps();
647
+ if (loaderProps == undefined || loaderProps.size === 0) {
648
+ return txProperties;
649
+ }
650
+ Array.from(loaderProps.entries()).forEach(([name, value]) => {
651
+ txProperties[name] = value;
652
+ });
646
653
  return txProperties;
647
654
  }
648
655
  processRecords(dataUnit, fields, responseRecords) {
@@ -972,6 +979,19 @@ class DataUnitFetcher {
972
979
  });
973
980
  });
974
981
  }
982
+ addTransientProperties(dataUnit, updatingFields) {
983
+ const loaderProps = dataUnit.getGlobalLoaderProps();
984
+ if (loaderProps == undefined || loaderProps.size === 0) {
985
+ return updatingFields;
986
+ }
987
+ if (updatingFields == undefined) {
988
+ updatingFields = {};
989
+ }
990
+ Array.from(loaderProps.entries()).forEach(([name, value]) => {
991
+ updatingFields[`transient.${name}`] = value;
992
+ });
993
+ return updatingFields;
994
+ }
975
995
  saveData(dataUnit, duChanges) {
976
996
  const updatedRecordsIds = [];
977
997
  const addedRecordsIds = [];
@@ -980,7 +1000,7 @@ class DataUnitFetcher {
980
1000
  const dataUnitInstance = DataUnitStorage.get(changeDU);
981
1001
  let parsedUpdatingFields;
982
1002
  if (updatingFields) {
983
- parsedUpdatingFields = Object.entries(updatingFields).map(([fieldName, value]) => {
1003
+ parsedUpdatingFields = Object.entries(this.addTransientProperties(dataUnit, updatingFields)).map(([fieldName, value]) => {
984
1004
  const descriptor = dataUnitInstance.getField(fieldName);
985
1005
  const dataType = descriptor ? descriptor.dataType : DataType.TEXT;
986
1006
  return { fieldName, dataType, value: dataUnitInstance.valueToString(fieldName, value) };
@@ -317,7 +317,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
317
317
  return;
318
318
  }
319
319
  this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
320
- return (h(Host, null, 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: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), 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, detailTaskbarCustomContainerId: this.customContainerId }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), 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, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
320
+ return (h(Host, null, 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, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), 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, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), 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, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
321
321
  }
322
322
  get _element() { return this; }
323
323
  static get watchers() { return {
@@ -324,7 +324,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
324
324
  * Faz o recarregamento da filterbar buscando o state no servidor.
325
325
  */
326
326
  async reload() {
327
- this.loadConfigFromStorage();
327
+ this.loadConfigFromStorage(true);
328
328
  }
329
329
  /**
330
330
  * Retorna um item de filtro pelo ID.
@@ -531,7 +531,10 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
531
531
  loadPermitions() {
532
532
  this._application.isUserSup().then(value => this.allowDefault = value);
533
533
  }
534
- loadConfigFromStorage() {
534
+ async loadConfigFromStorage(clearCache) {
535
+ if (clearCache) {
536
+ await ConfigStorage.deleteFilterBarConfigCache(this.configName, this.resourceID);
537
+ }
535
538
  return new Promise(accept => {
536
539
  ConfigStorage.loadFilterBarConfig(this.configName, this.resourceID, { contextURI: this.dataUnit.name })
537
540
  .then((filters) => {
@@ -290,9 +290,14 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
290
290
  }
291
291
  return this.hasActiveValue(this.config);
292
292
  }
293
+ onEzClick() {
294
+ console.log("onEzClick");
295
+ }
293
296
  render() {
294
297
  const leftIcon = this.getLeftIconName();
295
- return (h(Host, null, h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.getEnabledChip() }, leftIcon ? h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" }) : undefined, h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon", id: "removeFilter" })), h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, h("snk-filter-detail", { config: this.config, getMessage: this.getMessage, class: "sc-snk-filter-bar snk-filter__popover ez-padding--small ez-elevation--16", ref: elem => this._popover = elem, key: this.config.id, "data-element-id": this._idSnkFilterDetail }))));
298
+ return (h(Host, null, h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.getEnabledChip() }, leftIcon ? h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" }) : undefined, h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon", id: "removeFilter" })), h("ez-split-button", { label: "Split Button", class: "ez-button--primary", mode: "label-icon", iconName: "acao", size: "small", onEzClick: this.onEzClick,
299
+ //onclick={this.onEzClick}
300
+ items: items }), h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, h("snk-filter-detail", { config: this.config, getMessage: this.getMessage, class: "sc-snk-filter-bar snk-filter__popover ez-padding--small ez-elevation--16", ref: elem => this._popover = elem, key: this.config.id, "data-element-id": this._idSnkFilterDetail }))));
296
301
  }
297
302
  get _filterItemElement() { return this; }
298
303
  static get watchers() { return {
@@ -305,6 +310,47 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
305
310
  "showUp": [64],
306
311
  "hideDetail": [64]
307
312
  }, [[2, "click", "clickListener"], [2, "mousedown", "mouseDownListener"], [0, "filterChange", "filterChangeListener"]]]);
313
+ const items = [
314
+ {
315
+ id: "1",
316
+ label: "Emitir NFe",
317
+ type: "item"
318
+ },
319
+ {
320
+ id: "2",
321
+ label: "Cancelar NFe",
322
+ type: "item"
323
+ },
324
+ {
325
+ id: "3",
326
+ label: "Exportar NFe",
327
+ type: "item",
328
+ children: [
329
+ {
330
+ id: "4",
331
+ label: "Danfe PDF",
332
+ type: "item",
333
+ children: [
334
+ {
335
+ id: "6",
336
+ label: "Modo retrato",
337
+ type: "item"
338
+ },
339
+ {
340
+ id: "7",
341
+ label: "Modo paisagem",
342
+ type: "item"
343
+ }
344
+ ]
345
+ },
346
+ {
347
+ id: "5",
348
+ label: "XML",
349
+ type: "item"
350
+ }
351
+ ]
352
+ }
353
+ ];
308
354
  function defineCustomElement() {
309
355
  if (typeof customElements === "undefined") {
310
356
  return;
@@ -351,11 +351,12 @@ class PersonalizedFilterFetcher {
351
351
  }
352
352
  }
353
353
 
354
- const CONFIG_SOURCE = {
355
- form: "form",
356
- grid: "grid",
357
- filterBar: "filterBar"
358
- };
354
+ var CONFIG_SOURCE;
355
+ (function (CONFIG_SOURCE) {
356
+ CONFIG_SOURCE["form"] = "form";
357
+ CONFIG_SOURCE["grid"] = "grid";
358
+ CONFIG_SOURCE["filterBar"] = "filterBar";
359
+ })(CONFIG_SOURCE || (CONFIG_SOURCE = {}));
359
360
  class ConfigStorage {
360
361
  static preload(resourceID, configName) {
361
362
  ConfigStorage.loadFormConfig(configName, resourceID);
@@ -383,13 +384,11 @@ class ConfigStorage {
383
384
  return ConfigStorage.configById.get(cacheID);
384
385
  }
385
386
  static async saveFilterBarConfig(config, name, resourceID) {
386
- const cacheID = this.buildCacheID(name, CONFIG_SOURCE.filterBar, resourceID);
387
- this.configById.delete(cacheID);
387
+ await this.deleteFilterBarConfigCache(name, resourceID);
388
388
  return this.filterBarConfigFetcher.saveConfig(config, resourceID, name);
389
389
  }
390
390
  static async saveFormConfig(config, name, resourceID) {
391
- const cacheID = this.buildCacheID(name, CONFIG_SOURCE.form, resourceID);
392
- this.configById.delete(cacheID);
391
+ await this.deleteFormConfigCache(name, resourceID);
393
392
  return this.formConfigFetcher.saveConfig(config, name, resourceID);
394
393
  }
395
394
  static async saveCardState(config, name, resourceID) {
@@ -399,18 +398,16 @@ class ConfigStorage {
399
398
  if (config == undefined) {
400
399
  return;
401
400
  }
402
- const cacheID = this.buildCacheID(name, CONFIG_SOURCE.grid, resourceID);
403
- this.configById.delete(cacheID);
401
+ await this.deleteGridConfigCache(name, resourceID);
404
402
  return this.gridConfigFetcher.saveConfig(config, name, resourceID);
405
403
  }
406
404
  static async loadPersonalizedFilter(filterId, resourceID, configName) {
407
405
  return this.personalizedFilterFetcher.loadPersonalizedFilter(resourceID, filterId, configName);
408
406
  }
409
407
  static async savePersonalizedFilter(personalizedFilter, resourceID, configName) {
410
- //Ao criar ou alterar um filtro personalizado,
408
+ //Ao criar ou alterar um filtro personalizado,
411
409
  //precisamos remover o cache do status da filterbar.
412
- const cacheID = this.buildCacheID(configName, CONFIG_SOURCE.filterBar, resourceID);
413
- this.configById.delete(cacheID);
410
+ await this.deleteFilterBarConfigCache(configName, resourceID);
414
411
  return this.personalizedFilterFetcher.savePersonalizedFilter(personalizedFilter, resourceID, configName);
415
412
  }
416
413
  static async removePersonalizedFilter(personalizedFilter, resourceID, configName) {
@@ -419,6 +416,19 @@ class ConfigStorage {
419
416
  static async validatePersonalizedFilter(dataUnitName, expression) {
420
417
  return this.personalizedFilterFetcher.validatePersonalizedFilter(dataUnitName, expression);
421
418
  }
419
+ static async deleteGridConfigCache(name, resourceID) {
420
+ await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.grid);
421
+ }
422
+ static async deleteFormConfigCache(name, resourceID) {
423
+ await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.form);
424
+ }
425
+ static async deleteFilterBarConfigCache(name, resourceID) {
426
+ await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.filterBar);
427
+ }
428
+ static async deleteConfigCache(name, resourceID, source) {
429
+ const cacheID = ConfigStorage.buildCacheID(name, source, resourceID);
430
+ this.configById.delete(cacheID);
431
+ }
422
432
  static buildCacheID(name, source, resourceID) {
423
433
  if (name == undefined) {
424
434
  return `req_${source}_${resourceID}`;
@@ -1,4 +1,4 @@
1
- import { C as ConfigStorage } from './ConfigStorage-1244b8b0.js';
1
+ import { C as ConfigStorage } from './ConfigStorage-4151acc8.js';
2
2
  import { ObjectUtils, StringUtils } from '@sankhyalabs/core';
3
3
  import { F as FormConfigFetcher } from './form-config-fetcher-36219cd3.js';
4
4
 
@@ -239,7 +239,7 @@ class DatasetStrategy {
239
239
  tryJoinedFields: true,
240
240
  parallelLoader: useParallelLoader,
241
241
  crudListener: `br.com.sankhya.bff.${this.getModuleName()}.BFFDataUnitDatasetAdapter`,
242
- txProperties: this.getTxProperties(dataUnitName, request, sorting),
242
+ txProperties: this.getTxProperties(dataUnit, request, sorting),
243
243
  useDefaultRowsLimit: false
244
244
  }
245
245
  };
@@ -250,10 +250,10 @@ class DatasetStrategy {
250
250
  const moduleName = app.getModuleName();
251
251
  return moduleName.replace("-bff", "");
252
252
  }
253
- getTxProperties(dataUnitName, request, sorting) {
253
+ getTxProperties(dataUnit, request, sorting) {
254
254
  var _a, _b;
255
255
  const txProperties = {
256
- "__DATA_UNIT_ADAPTER__[dataUnitName]": dataUnitName
256
+ "__DATA_UNIT_ADAPTER__[dataUnitName]": dataUnit.name
257
257
  };
258
258
  const serverSideFilters = (_b = (_a = request.filters) === null || _a === void 0 ? void 0 : _a.filter(filter => !filter.name.startsWith("FILTRO_COLUNA_"))) !== null && _b !== void 0 ? _b : [];
259
259
  if (serverSideFilters.length !== 0) {
@@ -265,6 +265,13 @@ class DatasetStrategy {
265
265
  if (request.parentRecordId != undefined) {
266
266
  txProperties["__DATA_UNIT_ADAPTER__[parentRecordId]"] = request.parentRecordId;
267
267
  }
268
+ const loaderProps = dataUnit.getGlobalLoaderProps();
269
+ if (loaderProps == undefined || loaderProps.size === 0) {
270
+ return txProperties;
271
+ }
272
+ Array.from(loaderProps.entries()).forEach(([name, value]) => {
273
+ txProperties[name] = value;
274
+ });
268
275
  return txProperties;
269
276
  }
270
277
  processRecords(dataUnit, fields, responseRecords) {
@@ -594,6 +601,19 @@ class DataUnitFetcher {
594
601
  });
595
602
  });
596
603
  }
604
+ addTransientProperties(dataUnit, updatingFields) {
605
+ const loaderProps = dataUnit.getGlobalLoaderProps();
606
+ if (loaderProps == undefined || loaderProps.size === 0) {
607
+ return updatingFields;
608
+ }
609
+ if (updatingFields == undefined) {
610
+ updatingFields = {};
611
+ }
612
+ Array.from(loaderProps.entries()).forEach(([name, value]) => {
613
+ updatingFields[`transient.${name}`] = value;
614
+ });
615
+ return updatingFields;
616
+ }
597
617
  saveData(dataUnit, duChanges) {
598
618
  const updatedRecordsIds = [];
599
619
  const addedRecordsIds = [];
@@ -602,7 +622,7 @@ class DataUnitFetcher {
602
622
  const dataUnitInstance = DataUnitStorage.get(changeDU);
603
623
  let parsedUpdatingFields;
604
624
  if (updatingFields) {
605
- parsedUpdatingFields = Object.entries(updatingFields).map(([fieldName, value]) => {
625
+ parsedUpdatingFields = Object.entries(this.addTransientProperties(dataUnit, updatingFields)).map(([fieldName, value]) => {
606
626
  const descriptor = dataUnitInstance.getField(fieldName);
607
627
  const dataType = descriptor ? descriptor.dataType : DataType.TEXT;
608
628
  return { fieldName, dataType, value: dataUnitInstance.valueToString(fieldName, value) };
@@ -7,7 +7,7 @@ import './index-0ece87a6.js';
7
7
  import './ISave-4412b20c.js';
8
8
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
9
9
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
10
- import './dataunit-fetcher-cbec1594.js';
10
+ import './dataunit-fetcher-0fc935a0.js';
11
11
  import './PreloadManager-c1c2f2b4.js';
12
12
  import './filter-item-type.enum-d45e026f.js';
13
13
  import './form-config-fetcher-36219cd3.js';
@@ -1,10 +1,10 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a7d3d3f1.js';
2
2
  import { DateUtils, StringUtils, ObjectUtils, WaitingChangeException, WarningException, ErrorException, KeyboardManager, OnboardingUtils, DependencyType, ArrayUtils, SearchUtils, ElementIDUtils, ApplicationContext, DataType, ErrorTracking } from '@sankhyalabs/core';
3
3
  import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
4
- import { C as ConfigStorage } from './ConfigStorage-1244b8b0.js';
4
+ import { C as ConfigStorage } from './ConfigStorage-4151acc8.js';
5
5
  import { d as dist, D as DataFetcher, U as UrlUtils } from './DataFetcher-aa159c5a.js';
6
6
  import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher-c05dc474.js';
7
- import { D as DataUnitFetcher } from './dataunit-fetcher-cbec1594.js';
7
+ import { D as DataUnitFetcher } from './dataunit-fetcher-0fc935a0.js';
8
8
  import { P as PesquisaFetcher } from './pesquisa-fetcher-dd3ca0a5.js';
9
9
  import { S as SnkMessageBuilder } from './SnkMessageBuilder-ca843d1b.js';
10
10
  import './form-config-fetcher-36219cd3.js';
@@ -3,7 +3,7 @@ import { ApplicationContext, DataType, Action } from '@sankhyalabs/core';
3
3
  import { D as DataFetcher } from './DataFetcher-aa159c5a.js';
4
4
  import { S as SaveErrorsEnum } from './ISave-4412b20c.js';
5
5
  import { d as VIEW_MODE } from './constants-8457af36.js';
6
- import { D as DataUnitFetcher } from './dataunit-fetcher-cbec1594.js';
6
+ import { D as DataUnitFetcher } from './dataunit-fetcher-0fc935a0.js';
7
7
  import { P as PreloadManager } from './PreloadManager-c1c2f2b4.js';
8
8
  import { T as TaskbarElement } from './taskbar-elements-d4d0b424.js';
9
9
  import './PrintUtils-3e4ff0f5.js';
@@ -7,7 +7,7 @@ import { P as PresentationMode } from './index-0ece87a6.js';
7
7
  import './ISave-4412b20c.js';
8
8
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
9
9
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
10
- import './dataunit-fetcher-cbec1594.js';
10
+ import './dataunit-fetcher-0fc935a0.js';
11
11
  import './PreloadManager-c1c2f2b4.js';
12
12
  import './filter-item-type.enum-d45e026f.js';
13
13
  import './form-config-fetcher-36219cd3.js';
@@ -294,7 +294,7 @@ const SnkCrud = class {
294
294
  return;
295
295
  }
296
296
  this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
297
- return (h(Host, null, 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: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), 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, detailTaskbarCustomContainerId: this.customContainerId }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), 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, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
297
+ return (h(Host, null, 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, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), 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, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), 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, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
298
298
  }
299
299
  get _element() { return getElement(this); }
300
300
  static get watchers() { return {
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host } from './index-a7d3d3f1.js';
2
2
  import { Action } from '@sankhyalabs/core';
3
- import { S as SnkFormConfigManager } from './SnkFormConfigManager-9be0e7d4.js';
3
+ import { S as SnkFormConfigManager } from './SnkFormConfigManager-5c7d3771.js';
4
4
  import { FormMetadata, buildFormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
5
5
  import './DataFetcher-aa159c5a.js';
6
6
  import './pesquisa-fetcher-dd3ca0a5.js';
@@ -8,15 +8,15 @@ import { P as PresentationMode } from './index-0ece87a6.js';
8
8
  import './ISave-4412b20c.js';
9
9
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
10
10
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
11
- import './dataunit-fetcher-cbec1594.js';
11
+ import './dataunit-fetcher-0fc935a0.js';
12
12
  import './PreloadManager-c1c2f2b4.js';
13
13
  import './filter-item-type.enum-d45e026f.js';
14
14
  import './form-config-fetcher-36219cd3.js';
15
15
  import { T as TaskbarElement } from './taskbar-elements-d4d0b424.js';
16
16
  import { d as VIEW_MODE } from './constants-8457af36.js';
17
- import { S as SnkGuidesViewer } from './snk-guides-viewer-c7aaf02a.js';
17
+ import { S as SnkGuidesViewer } from './snk-guides-viewer-98a8e45e.js';
18
18
  import { S as SnkMessageBuilder } from './SnkMessageBuilder-ca843d1b.js';
19
- import './ConfigStorage-1244b8b0.js';
19
+ import './ConfigStorage-4151acc8.js';
20
20
  import './PrintUtils-3e4ff0f5.js';
21
21
  import './ResourceIDUtils-a114189a.js';
22
22
  import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';