@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
@@ -353,11 +353,12 @@ class PersonalizedFilterFetcher {
353
353
  }
354
354
  }
355
355
 
356
- const CONFIG_SOURCE = {
357
- form: "form",
358
- grid: "grid",
359
- filterBar: "filterBar"
360
- };
356
+ var CONFIG_SOURCE;
357
+ (function (CONFIG_SOURCE) {
358
+ CONFIG_SOURCE["form"] = "form";
359
+ CONFIG_SOURCE["grid"] = "grid";
360
+ CONFIG_SOURCE["filterBar"] = "filterBar";
361
+ })(CONFIG_SOURCE || (CONFIG_SOURCE = {}));
361
362
  class ConfigStorage {
362
363
  static preload(resourceID, configName) {
363
364
  ConfigStorage.loadFormConfig(configName, resourceID);
@@ -385,13 +386,11 @@ class ConfigStorage {
385
386
  return ConfigStorage.configById.get(cacheID);
386
387
  }
387
388
  static async saveFilterBarConfig(config, name, resourceID) {
388
- const cacheID = this.buildCacheID(name, CONFIG_SOURCE.filterBar, resourceID);
389
- this.configById.delete(cacheID);
389
+ await this.deleteFilterBarConfigCache(name, resourceID);
390
390
  return this.filterBarConfigFetcher.saveConfig(config, resourceID, name);
391
391
  }
392
392
  static async saveFormConfig(config, name, resourceID) {
393
- const cacheID = this.buildCacheID(name, CONFIG_SOURCE.form, resourceID);
394
- this.configById.delete(cacheID);
393
+ await this.deleteFormConfigCache(name, resourceID);
395
394
  return this.formConfigFetcher.saveConfig(config, name, resourceID);
396
395
  }
397
396
  static async saveCardState(config, name, resourceID) {
@@ -401,18 +400,16 @@ class ConfigStorage {
401
400
  if (config == undefined) {
402
401
  return;
403
402
  }
404
- const cacheID = this.buildCacheID(name, CONFIG_SOURCE.grid, resourceID);
405
- this.configById.delete(cacheID);
403
+ await this.deleteGridConfigCache(name, resourceID);
406
404
  return this.gridConfigFetcher.saveConfig(config, name, resourceID);
407
405
  }
408
406
  static async loadPersonalizedFilter(filterId, resourceID, configName) {
409
407
  return this.personalizedFilterFetcher.loadPersonalizedFilter(resourceID, filterId, configName);
410
408
  }
411
409
  static async savePersonalizedFilter(personalizedFilter, resourceID, configName) {
412
- //Ao criar ou alterar um filtro personalizado,
410
+ //Ao criar ou alterar um filtro personalizado,
413
411
  //precisamos remover o cache do status da filterbar.
414
- const cacheID = this.buildCacheID(configName, CONFIG_SOURCE.filterBar, resourceID);
415
- this.configById.delete(cacheID);
412
+ await this.deleteFilterBarConfigCache(configName, resourceID);
416
413
  return this.personalizedFilterFetcher.savePersonalizedFilter(personalizedFilter, resourceID, configName);
417
414
  }
418
415
  static async removePersonalizedFilter(personalizedFilter, resourceID, configName) {
@@ -421,6 +418,19 @@ class ConfigStorage {
421
418
  static async validatePersonalizedFilter(dataUnitName, expression) {
422
419
  return this.personalizedFilterFetcher.validatePersonalizedFilter(dataUnitName, expression);
423
420
  }
421
+ static async deleteGridConfigCache(name, resourceID) {
422
+ await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.grid);
423
+ }
424
+ static async deleteFormConfigCache(name, resourceID) {
425
+ await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.form);
426
+ }
427
+ static async deleteFilterBarConfigCache(name, resourceID) {
428
+ await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.filterBar);
429
+ }
430
+ static async deleteConfigCache(name, resourceID, source) {
431
+ const cacheID = ConfigStorage.buildCacheID(name, source, resourceID);
432
+ this.configById.delete(cacheID);
433
+ }
424
434
  static buildCacheID(name, source, resourceID) {
425
435
  if (name == undefined) {
426
436
  return `req_${source}_${resourceID}`;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const ConfigStorage = require('./ConfigStorage-8009ecb2.js');
3
+ const ConfigStorage = require('./ConfigStorage-302bbbd4.js');
4
4
  const core = require('@sankhyalabs/core');
5
5
  const formConfigFetcher = require('./form-config-fetcher-df043d3d.js');
6
6
 
@@ -241,7 +241,7 @@ class DatasetStrategy {
241
241
  tryJoinedFields: true,
242
242
  parallelLoader: useParallelLoader,
243
243
  crudListener: `br.com.sankhya.bff.${this.getModuleName()}.BFFDataUnitDatasetAdapter`,
244
- txProperties: this.getTxProperties(dataUnitName, request, sorting),
244
+ txProperties: this.getTxProperties(dataUnit, request, sorting),
245
245
  useDefaultRowsLimit: false
246
246
  }
247
247
  };
@@ -252,10 +252,10 @@ class DatasetStrategy {
252
252
  const moduleName = app.getModuleName();
253
253
  return moduleName.replace("-bff", "");
254
254
  }
255
- getTxProperties(dataUnitName, request, sorting) {
255
+ getTxProperties(dataUnit, request, sorting) {
256
256
  var _a, _b;
257
257
  const txProperties = {
258
- "__DATA_UNIT_ADAPTER__[dataUnitName]": dataUnitName
258
+ "__DATA_UNIT_ADAPTER__[dataUnitName]": dataUnit.name
259
259
  };
260
260
  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 : [];
261
261
  if (serverSideFilters.length !== 0) {
@@ -267,6 +267,13 @@ class DatasetStrategy {
267
267
  if (request.parentRecordId != undefined) {
268
268
  txProperties["__DATA_UNIT_ADAPTER__[parentRecordId]"] = request.parentRecordId;
269
269
  }
270
+ const loaderProps = dataUnit.getGlobalLoaderProps();
271
+ if (loaderProps == undefined || loaderProps.size === 0) {
272
+ return txProperties;
273
+ }
274
+ Array.from(loaderProps.entries()).forEach(([name, value]) => {
275
+ txProperties[name] = value;
276
+ });
270
277
  return txProperties;
271
278
  }
272
279
  processRecords(dataUnit, fields, responseRecords) {
@@ -596,6 +603,19 @@ class DataUnitFetcher {
596
603
  });
597
604
  });
598
605
  }
606
+ addTransientProperties(dataUnit, updatingFields) {
607
+ const loaderProps = dataUnit.getGlobalLoaderProps();
608
+ if (loaderProps == undefined || loaderProps.size === 0) {
609
+ return updatingFields;
610
+ }
611
+ if (updatingFields == undefined) {
612
+ updatingFields = {};
613
+ }
614
+ Array.from(loaderProps.entries()).forEach(([name, value]) => {
615
+ updatingFields[`transient.${name}`] = value;
616
+ });
617
+ return updatingFields;
618
+ }
599
619
  saveData(dataUnit, duChanges) {
600
620
  const updatedRecordsIds = [];
601
621
  const addedRecordsIds = [];
@@ -604,7 +624,7 @@ class DataUnitFetcher {
604
624
  const dataUnitInstance = core.DataUnitStorage.get(changeDU);
605
625
  let parsedUpdatingFields;
606
626
  if (updatingFields) {
607
- parsedUpdatingFields = Object.entries(updatingFields).map(([fieldName, value]) => {
627
+ parsedUpdatingFields = Object.entries(this.addTransientProperties(dataUnit, updatingFields)).map(([fieldName, value]) => {
608
628
  const descriptor = dataUnitInstance.getField(fieldName);
609
629
  const dataType = descriptor ? descriptor.dataType : core.DataType.TEXT;
610
630
  return { fieldName, dataType, value: dataUnitInstance.valueToString(fieldName, value) };
@@ -11,7 +11,7 @@ require('./index-0922807b.js');
11
11
  require('./ISave-d68ce3cd.js');
12
12
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
13
13
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
14
- require('./dataunit-fetcher-14108bec.js');
14
+ require('./dataunit-fetcher-353e4af2.js');
15
15
  require('./PreloadManager-84466da6.js');
16
16
  require('./filter-item-type.enum-a7ffdaa6.js');
17
17
  require('./form-config-fetcher-df043d3d.js');
@@ -5,10 +5,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
8
- const ConfigStorage = require('./ConfigStorage-8009ecb2.js');
8
+ const ConfigStorage = require('./ConfigStorage-302bbbd4.js');
9
9
  const DataFetcher = require('./DataFetcher-ba94ed5b.js');
10
10
  const authFetcher = require('./auth-fetcher-c8467c07.js');
11
- const dataunitFetcher = require('./dataunit-fetcher-14108bec.js');
11
+ const dataunitFetcher = require('./dataunit-fetcher-353e4af2.js');
12
12
  const pesquisaFetcher = require('./pesquisa-fetcher-ef050a47.js');
13
13
  const SnkMessageBuilder = require('./SnkMessageBuilder-7293d0ad.js');
14
14
  require('./form-config-fetcher-df043d3d.js');
@@ -7,7 +7,7 @@ const core = require('@sankhyalabs/core');
7
7
  const DataFetcher = require('./DataFetcher-ba94ed5b.js');
8
8
  const ISave = require('./ISave-d68ce3cd.js');
9
9
  const constants = require('./constants-35ddd366.js');
10
- const dataunitFetcher = require('./dataunit-fetcher-14108bec.js');
10
+ const dataunitFetcher = require('./dataunit-fetcher-353e4af2.js');
11
11
  const PreloadManager = require('./PreloadManager-84466da6.js');
12
12
  const taskbarElements = require('./taskbar-elements-01b85b99.js');
13
13
  require('./PrintUtils-bcaeb82f.js');
@@ -11,7 +11,7 @@ const index$1 = require('./index-0922807b.js');
11
11
  require('./ISave-d68ce3cd.js');
12
12
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
13
13
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
14
- require('./dataunit-fetcher-14108bec.js');
14
+ require('./dataunit-fetcher-353e4af2.js');
15
15
  require('./PreloadManager-84466da6.js');
16
16
  require('./filter-item-type.enum-a7ffdaa6.js');
17
17
  require('./form-config-fetcher-df043d3d.js');
@@ -298,7 +298,7 @@ const SnkCrud = class {
298
298
  return;
299
299
  }
300
300
  this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === constants.VIEW_MODE.GRID;
301
- return (index.h(index.Host, null, index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, index.h("stack-item", null, index.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 }, index.h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkGridHeader" }), index.h("slot", { name: "SnkGridFooter" }), index.h("slot", { name: "SnkGridTaskBar" }))), index.h("stack-item", null, index.h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(constants.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 }, index.h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkFormTaskBar" }))), index.h("stack-item", null, index.h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), index.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 })), index.h("div", { id: `${this.customContainerId}` }, index.h("slot", { name: "SnkConfigContainerSlot" }), index.h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
301
+ return (index.h(index.Host, null, index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, index.h("stack-item", null, index.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 }, index.h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkGridHeader" }), index.h("slot", { name: "SnkGridFooter" }), index.h("slot", { name: "SnkGridTaskBar" }))), index.h("stack-item", null, index.h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(constants.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 }, index.h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkFormTaskBar" }))), index.h("stack-item", null, index.h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), index.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 })), index.h("div", { id: `${this.customContainerId}` }, index.h("slot", { name: "SnkConfigContainerSlot" }), index.h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
302
302
  }
303
303
  get _element() { return index.getElement(this); }
304
304
  static get watchers() { return {
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const SnkFormConfigManager = require('./SnkFormConfigManager-7d850fbc.js');
7
+ const SnkFormConfigManager = require('./SnkFormConfigManager-71c4768e.js');
8
8
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
9
9
  require('./DataFetcher-ba94ed5b.js');
10
10
  require('./pesquisa-fetcher-ef050a47.js');
@@ -12,15 +12,15 @@ const index$1 = require('./index-0922807b.js');
12
12
  require('./ISave-d68ce3cd.js');
13
13
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
14
14
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
15
- require('./dataunit-fetcher-14108bec.js');
15
+ require('./dataunit-fetcher-353e4af2.js');
16
16
  require('./PreloadManager-84466da6.js');
17
17
  require('./filter-item-type.enum-a7ffdaa6.js');
18
18
  require('./form-config-fetcher-df043d3d.js');
19
19
  const taskbarElements = require('./taskbar-elements-01b85b99.js');
20
20
  const constants = require('./constants-35ddd366.js');
21
- const snkGuidesViewer = require('./snk-guides-viewer-e7f76399.js');
21
+ const snkGuidesViewer = require('./snk-guides-viewer-e60ccc5e.js');
22
22
  const SnkMessageBuilder = require('./SnkMessageBuilder-7293d0ad.js');
23
- require('./ConfigStorage-8009ecb2.js');
23
+ require('./ConfigStorage-302bbbd4.js');
24
24
  require('./PrintUtils-bcaeb82f.js');
25
25
  require('./ResourceIDUtils-5ff86aa7.js');
26
26
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index$1 = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const EzScrollDirection = require('@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection');
8
- const ConfigStorage = require('./ConfigStorage-8009ecb2.js');
8
+ const ConfigStorage = require('./ConfigStorage-302bbbd4.js');
9
9
  const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
10
10
  const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
11
11
  const index = require('./index-c5771aba.js');
@@ -322,7 +322,7 @@ const SnkFilterBar = class {
322
322
  * Faz o recarregamento da filterbar buscando o state no servidor.
323
323
  */
324
324
  async reload() {
325
- this.loadConfigFromStorage();
325
+ this.loadConfigFromStorage(true);
326
326
  }
327
327
  /**
328
328
  * Retorna um item de filtro pelo ID.
@@ -529,7 +529,10 @@ const SnkFilterBar = class {
529
529
  loadPermitions() {
530
530
  this._application.isUserSup().then(value => this.allowDefault = value);
531
531
  }
532
- loadConfigFromStorage() {
532
+ async loadConfigFromStorage(clearCache) {
533
+ if (clearCache) {
534
+ await ConfigStorage.ConfigStorage.deleteFilterBarConfigCache(this.configName, this.resourceID);
535
+ }
533
536
  return new Promise(accept => {
534
537
  ConfigStorage.ConfigStorage.loadFilterBarConfig(this.configName, this.resourceID, { contextURI: this.dataUnit.name })
535
538
  .then((filters) => {
@@ -292,14 +292,60 @@ const SnkFilterItem = class {
292
292
  }
293
293
  return this.hasActiveValue(this.config);
294
294
  }
295
+ onEzClick() {
296
+ console.log("onEzClick");
297
+ }
295
298
  render() {
296
299
  const leftIcon = this.getLeftIconName();
297
- return (index.h(index.Host, null, index.h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.getEnabledChip() }, leftIcon ? index.h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" }) : undefined, index.h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon", id: "removeFilter" })), index.h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, index.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 }))));
300
+ return (index.h(index.Host, null, index.h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.getEnabledChip() }, leftIcon ? index.h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" }) : undefined, index.h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon", id: "removeFilter" })), index.h("ez-split-button", { label: "Split Button", class: "ez-button--primary", mode: "label-icon", iconName: "acao", size: "small", onEzClick: this.onEzClick,
301
+ //onclick={this.onEzClick}
302
+ items: items }), index.h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, index.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
303
  }
299
304
  get _filterItemElement() { return index.getElement(this); }
300
305
  static get watchers() { return {
301
306
  "detailIsVisible": ["observeDetailIsVisible"]
302
307
  }; }
303
308
  };
309
+ const items = [
310
+ {
311
+ id: "1",
312
+ label: "Emitir NFe",
313
+ type: "item"
314
+ },
315
+ {
316
+ id: "2",
317
+ label: "Cancelar NFe",
318
+ type: "item"
319
+ },
320
+ {
321
+ id: "3",
322
+ label: "Exportar NFe",
323
+ type: "item",
324
+ children: [
325
+ {
326
+ id: "4",
327
+ label: "Danfe PDF",
328
+ type: "item",
329
+ children: [
330
+ {
331
+ id: "6",
332
+ label: "Modo retrato",
333
+ type: "item"
334
+ },
335
+ {
336
+ id: "7",
337
+ label: "Modo paisagem",
338
+ type: "item"
339
+ }
340
+ ]
341
+ },
342
+ {
343
+ id: "5",
344
+ label: "XML",
345
+ type: "item"
346
+ }
347
+ ]
348
+ }
349
+ ];
304
350
 
305
351
  exports.snk_filter_item = SnkFilterItem;
@@ -6,7 +6,7 @@ const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
8
8
  const presentationMode = require('./presentationMode-52ec3bdd.js');
9
- const ConfigStorage = require('./ConfigStorage-8009ecb2.js');
9
+ const ConfigStorage = require('./ConfigStorage-302bbbd4.js');
10
10
  const filterType_enum = require('./filter-type.enum-b14ce507.js');
11
11
  require('./form-config-fetcher-df043d3d.js');
12
12
  require('./DataFetcher-ba94ed5b.js');
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const SnkFormConfigManager = require('./SnkFormConfigManager-7d850fbc.js');
7
+ const SnkFormConfigManager = require('./SnkFormConfigManager-71c4768e.js');
8
8
  const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
9
- require('./ConfigStorage-8009ecb2.js');
9
+ require('./ConfigStorage-302bbbd4.js');
10
10
  require('./form-config-fetcher-df043d3d.js');
11
11
  require('./DataFetcher-ba94ed5b.js');
12
12
  require('./PrintUtils-bcaeb82f.js');
@@ -6,7 +6,7 @@ const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
8
8
  const CheckMode = require('@sankhyalabs/ezui/dist/collection/components/ez-check/CheckMode');
9
- const ConfigStorage = require('./ConfigStorage-8009ecb2.js');
9
+ const ConfigStorage = require('./ConfigStorage-302bbbd4.js');
10
10
  const constants = require('./constants-35ddd366.js');
11
11
  require('./form-config-fetcher-df043d3d.js');
12
12
  require('./DataFetcher-ba94ed5b.js');
@@ -6,7 +6,7 @@ const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
8
8
  const taskbarElements = require('./taskbar-elements-01b85b99.js');
9
- const ConfigStorage = require('./ConfigStorage-8009ecb2.js');
9
+ const ConfigStorage = require('./ConfigStorage-302bbbd4.js');
10
10
  const index$1 = require('./index-0922807b.js');
11
11
  const fieldSearch = require('./field-search-f56aa7d6.js');
12
12
  const index$2 = require('./index-102ba62d.js');
@@ -2,7 +2,7 @@
2
2
 
3
3
  const index = require('./index-f9e81701.js');
4
4
  const core = require('@sankhyalabs/core');
5
- const SnkFormConfigManager = require('./SnkFormConfigManager-7d850fbc.js');
5
+ const SnkFormConfigManager = require('./SnkFormConfigManager-71c4768e.js');
6
6
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
7
7
  const fieldSearch = require('./field-search-f56aa7d6.js');
8
8
  const taskbarElements = require('./taskbar-elements-01b85b99.js');
@@ -13,7 +13,7 @@ const index$1 = require('./index-0922807b.js');
13
13
  require('./ISave-d68ce3cd.js');
14
14
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
15
15
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
16
- require('./dataunit-fetcher-14108bec.js');
16
+ require('./dataunit-fetcher-353e4af2.js');
17
17
  require('./PreloadManager-84466da6.js');
18
18
  require('./filter-item-type.enum-a7ffdaa6.js');
19
19
  require('./form-config-fetcher-df043d3d.js');
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const snkGuidesViewer = require('./snk-guides-viewer-e7f76399.js');
5
+ const snkGuidesViewer = require('./snk-guides-viewer-e60ccc5e.js');
6
6
  require('./index-f9e81701.js');
7
7
  require('@sankhyalabs/core');
8
- require('./SnkFormConfigManager-7d850fbc.js');
9
- require('./ConfigStorage-8009ecb2.js');
8
+ require('./SnkFormConfigManager-71c4768e.js');
9
+ require('./ConfigStorage-302bbbd4.js');
10
10
  require('./form-config-fetcher-df043d3d.js');
11
11
  require('./DataFetcher-ba94ed5b.js');
12
12
  require('./PrintUtils-bcaeb82f.js');
@@ -21,7 +21,7 @@ require('./constants-35ddd366.js');
21
21
  require('./pesquisa-fetcher-ef050a47.js');
22
22
  require('./ISave-d68ce3cd.js');
23
23
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
24
- require('./dataunit-fetcher-14108bec.js');
24
+ require('./dataunit-fetcher-353e4af2.js');
25
25
  require('./PreloadManager-84466da6.js');
26
26
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
27
27
  require('./ResourceIDUtils-5ff86aa7.js');
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-0184ffbb.js');
8
- const ConfigStorage = require('./ConfigStorage-8009ecb2.js');
8
+ const ConfigStorage = require('./ConfigStorage-302bbbd4.js');
9
9
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
10
10
  const index$1 = require('./index-c5771aba.js');
11
11
  const index$2 = require('./index-102ba62d.js');
@@ -12,7 +12,7 @@ const index$1 = require('./index-0922807b.js');
12
12
  require('./ISave-d68ce3cd.js');
13
13
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
14
14
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
15
- const dataunitFetcher = require('./dataunit-fetcher-14108bec.js');
15
+ const dataunitFetcher = require('./dataunit-fetcher-353e4af2.js');
16
16
  require('./PreloadManager-84466da6.js');
17
17
  require('./filter-item-type.enum-a7ffdaa6.js');
18
18
  require('./form-config-fetcher-df043d3d.js');
@@ -5,6 +5,7 @@
5
5
  "./components/snk-data-unit/snk-data-unit.js",
6
6
  "./components/snk-taskbar/snk-taskbar.js",
7
7
  "./components/snk-filter-bar/filter-list/snk-filter-list.js",
8
+ "./components/snk-print-selector/snk-print-selector.js",
8
9
  "./components/snk-form/subcomponents/snk-tab-config/snk-tab-config.js",
9
10
  "./components/snk-actions-button/snk-actions-button.js",
10
11
  "./components/snk-actions-button/subcomponents/snk-actions-form.js",
@@ -47,7 +48,6 @@
47
48
  "./components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.js",
48
49
  "./components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.js",
49
50
  "./components/snk-pesquisa/snk-pesquisa.js",
50
- "./components/snk-print-selector/snk-print-selector.js",
51
51
  "./components/snk-simple-bar/snk-simple-bar.js",
52
52
  "./components/snk-simple-crud/snk-simple-crud.js",
53
53
  "./components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js",
@@ -278,7 +278,7 @@ export class SnkCrud {
278
278
  return;
279
279
  }
280
280
  this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
281
- 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" }))));
281
+ 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" }))));
282
282
  }
283
283
  static get is() { return "snk-crud"; }
284
284
  static get encapsulation() { return "scoped"; }
@@ -284,9 +284,14 @@ export class SnkFilterItem {
284
284
  }
285
285
  return this.hasActiveValue(this.config);
286
286
  }
287
+ onEzClick() {
288
+ console.log("onEzClick");
289
+ }
287
290
  render() {
288
291
  const leftIcon = this.getLeftIconName();
289
- 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 }))));
292
+ 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,
293
+ //onclick={this.onEzClick}
294
+ 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 }))));
290
295
  }
291
296
  static get is() { return "snk-filter-item"; }
292
297
  static get properties() {
@@ -437,3 +442,44 @@ export class SnkFilterItem {
437
442
  }];
438
443
  }
439
444
  }
445
+ const items = [
446
+ {
447
+ id: "1",
448
+ label: "Emitir NFe",
449
+ type: "item"
450
+ },
451
+ {
452
+ id: "2",
453
+ label: "Cancelar NFe",
454
+ type: "item"
455
+ },
456
+ {
457
+ id: "3",
458
+ label: "Exportar NFe",
459
+ type: "item",
460
+ children: [
461
+ {
462
+ id: "4",
463
+ label: "Danfe PDF",
464
+ type: "item",
465
+ children: [
466
+ {
467
+ id: "6",
468
+ label: "Modo retrato",
469
+ type: "item"
470
+ },
471
+ {
472
+ id: "7",
473
+ label: "Modo paisagem",
474
+ type: "item"
475
+ }
476
+ ]
477
+ },
478
+ {
479
+ id: "5",
480
+ label: "XML",
481
+ type: "item"
482
+ }
483
+ ]
484
+ }
485
+ ];
@@ -74,7 +74,7 @@ export class SnkFilterBar {
74
74
  * Faz o recarregamento da filterbar buscando o state no servidor.
75
75
  */
76
76
  async reload() {
77
- this.loadConfigFromStorage();
77
+ this.loadConfigFromStorage(true);
78
78
  }
79
79
  /**
80
80
  * Retorna um item de filtro pelo ID.
@@ -282,7 +282,10 @@ export class SnkFilterBar {
282
282
  loadPermitions() {
283
283
  this._application.isUserSup().then(value => this.allowDefault = value);
284
284
  }
285
- loadConfigFromStorage() {
285
+ async loadConfigFromStorage(clearCache) {
286
+ if (clearCache) {
287
+ await ConfigStorage.deleteFilterBarConfigCache(this.configName, this.resourceID);
288
+ }
286
289
  return new Promise(accept => {
287
290
  ConfigStorage.loadFilterBarConfig(this.configName, this.resourceID, { contextURI: this.dataUnit.name })
288
291
  .then((filters) => {