@sankhyalabs/sankhyablocks 8.1.0-dev.10 → 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 (168) hide show
  1. package/dist/cjs/{ConfigStorage-e32e1391.js → ConfigStorage-d688c739.js} +160 -47
  2. package/dist/cjs/ResourceIDUtils-5ff86aa7.js +12 -0
  3. package/dist/cjs/{SnkFormConfigManager-5e61b0a9.js → SnkFormConfigManager-29b73c81.js} +18 -20
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  6. package/dist/cjs/snk-actions-button.cjs.entry.js +11 -8
  7. package/dist/cjs/snk-application.cjs.entry.js +42 -38
  8. package/dist/cjs/snk-configurator.cjs.entry.js +2 -1
  9. package/dist/cjs/snk-crud.cjs.entry.js +16 -5
  10. package/dist/cjs/snk-data-exporter.cjs.entry.js +1 -1
  11. package/dist/cjs/{snk-data-unit-e89e07bd.js → snk-data-unit-80a00ae4.js} +4 -3
  12. package/dist/cjs/snk-data-unit.cjs.entry.js +1 -1
  13. package/dist/cjs/snk-detail-view.cjs.entry.js +6 -6
  14. package/dist/cjs/snk-entity-list.cjs.entry.js +0 -4
  15. package/dist/cjs/snk-filter-bar.cjs.entry.js +11 -13
  16. package/dist/cjs/snk-filter-detail.cjs.entry.js +1 -15
  17. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -16
  18. package/dist/cjs/snk-form-config.cjs.entry.js +4 -14
  19. package/dist/cjs/snk-form.cjs.entry.js +9 -5
  20. package/dist/cjs/snk-grid-config.cjs.entry.js +3 -3
  21. package/dist/cjs/snk-grid.cjs.entry.js +11 -14
  22. package/dist/cjs/{snk-guides-viewer-eb0a79a4.js → snk-guides-viewer-f67f9cea.js} +9 -5
  23. package/dist/cjs/snk-guides-viewer.cjs.entry.js +3 -4
  24. package/dist/cjs/snk-personalized-filter.cjs.entry.js +11 -13
  25. package/dist/cjs/snk-taskbar.cjs.entry.js +2 -1
  26. package/dist/collection/components/snk-actions-button/actions/index.js +3 -4
  27. package/dist/collection/components/snk-actions-button/snk-actions-button.js +8 -4
  28. package/dist/collection/components/snk-application/snk-application.js +58 -65
  29. package/dist/collection/components/snk-configurator/snk-configurator.js +19 -1
  30. package/dist/collection/components/snk-crud/snk-crud.js +18 -6
  31. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +20 -2
  32. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +25 -28
  33. package/dist/collection/components/snk-data-unit/snk-data-unit.js +21 -4
  34. package/dist/collection/components/snk-entity-list/snk-entity-list.js +0 -23
  35. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +2 -12
  36. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +1 -1
  37. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +21 -16
  38. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +27 -11
  39. package/dist/collection/components/snk-form/SnkFormConfigManager.js +17 -19
  40. package/dist/collection/components/snk-form/snk-form.js +24 -2
  41. package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +5 -15
  42. package/dist/collection/components/snk-grid/snk-grid.js +27 -12
  43. package/dist/collection/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.js +19 -1
  44. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +28 -12
  45. package/dist/collection/components/snk-taskbar/snk-taskbar.js +19 -1
  46. package/dist/collection/lib/configs/ConfigStorage.js +33 -44
  47. package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +0 -24
  48. package/dist/collection/lib/resourceid/ResourceIDUtils.js +7 -0
  49. package/dist/components/ConfigStorage.js +161 -48
  50. package/dist/components/ResourceIDUtils.js +10 -0
  51. package/dist/components/SnkFormConfigManager.js +17 -19
  52. package/dist/components/auth-fetcher.js +1 -1
  53. package/dist/components/form-config-fetcher.js +64 -2
  54. package/dist/components/snk-actions-button2.js +11 -8
  55. package/dist/components/snk-application2.js +42 -38
  56. package/dist/components/snk-configurator2.js +3 -1
  57. package/dist/components/snk-crud.js +17 -5
  58. package/dist/components/snk-data-unit2.js +5 -3
  59. package/dist/components/snk-detail-view2.js +13 -7
  60. package/dist/components/snk-entity-list.js +0 -4
  61. package/dist/components/snk-filter-bar2.js +11 -11
  62. package/dist/components/snk-filter-detail2.js +2 -12
  63. package/dist/components/snk-filter-modal-item2.js +5 -16
  64. package/dist/components/snk-form-config2.js +5 -15
  65. package/dist/components/snk-form.js +8 -2
  66. package/dist/components/snk-grid-config2.js +4 -2
  67. package/dist/components/snk-grid2.js +11 -12
  68. package/dist/components/snk-personalized-filter2.js +11 -11
  69. package/dist/components/snk-taskbar2.js +3 -1
  70. package/dist/esm/{ConfigStorage-b6aefe42.js → ConfigStorage-cfe03e99.js} +160 -46
  71. package/dist/esm/ResourceIDUtils-a114189a.js +10 -0
  72. package/dist/esm/{SnkFormConfigManager-80901f2d.js → SnkFormConfigManager-bfd8eabd.js} +18 -20
  73. package/dist/esm/loader.js +1 -1
  74. package/dist/esm/sankhyablocks.js +1 -1
  75. package/dist/esm/snk-actions-button.entry.js +11 -8
  76. package/dist/esm/snk-application.entry.js +42 -38
  77. package/dist/esm/snk-configurator.entry.js +2 -1
  78. package/dist/esm/snk-crud.entry.js +16 -5
  79. package/dist/esm/snk-data-exporter.entry.js +1 -1
  80. package/dist/esm/{snk-data-unit-8c4d944d.js → snk-data-unit-3ab57d1a.js} +4 -3
  81. package/dist/esm/snk-data-unit.entry.js +1 -1
  82. package/dist/esm/snk-detail-view.entry.js +6 -6
  83. package/dist/esm/snk-entity-list.entry.js +0 -4
  84. package/dist/esm/snk-filter-bar.entry.js +11 -13
  85. package/dist/esm/snk-filter-detail.entry.js +2 -16
  86. package/dist/esm/snk-filter-modal-item.entry.js +4 -17
  87. package/dist/esm/snk-form-config.entry.js +5 -15
  88. package/dist/esm/snk-form.entry.js +9 -5
  89. package/dist/esm/snk-grid-config.entry.js +3 -3
  90. package/dist/esm/snk-grid.entry.js +11 -14
  91. package/dist/esm/{snk-guides-viewer-ee42eb53.js → snk-guides-viewer-3ea14ab4.js} +9 -5
  92. package/dist/esm/snk-guides-viewer.entry.js +3 -4
  93. package/dist/esm/snk-personalized-filter.entry.js +11 -13
  94. package/dist/esm/snk-taskbar.entry.js +2 -1
  95. package/dist/sankhyablocks/p-0ae5b923.entry.js +1 -0
  96. package/dist/sankhyablocks/p-15230263.js +1 -0
  97. package/dist/sankhyablocks/p-18fa618e.entry.js +1 -0
  98. package/dist/sankhyablocks/p-48a40939.js +1 -0
  99. package/dist/sankhyablocks/p-4c33a77c.entry.js +1 -0
  100. package/dist/sankhyablocks/p-53884b5f.entry.js +1 -0
  101. package/dist/sankhyablocks/p-688dcb4c.js +1 -0
  102. package/dist/sankhyablocks/p-70e785db.entry.js +1 -0
  103. package/dist/sankhyablocks/p-861a3495.entry.js +1 -0
  104. package/dist/sankhyablocks/p-878b0dd3.entry.js +1 -0
  105. package/dist/sankhyablocks/p-97d2fbd9.entry.js +1 -0
  106. package/dist/sankhyablocks/p-9a270401.entry.js +1 -0
  107. package/dist/sankhyablocks/p-9d591463.js +1 -0
  108. package/dist/sankhyablocks/p-9d93da18.js +56 -0
  109. package/dist/sankhyablocks/{p-77ecc583.entry.js → p-9f387187.entry.js} +1 -1
  110. package/dist/sankhyablocks/p-aa4c112f.entry.js +11 -0
  111. package/dist/sankhyablocks/p-bae87498.entry.js +1 -0
  112. package/dist/sankhyablocks/p-cc67bd06.entry.js +1 -0
  113. package/dist/sankhyablocks/p-d4f9ee17.entry.js +1 -0
  114. package/dist/sankhyablocks/p-e070d7a3.entry.js +1 -0
  115. package/dist/sankhyablocks/p-e086cc2a.entry.js +1 -0
  116. package/dist/sankhyablocks/p-ed705cbb.entry.js +1 -0
  117. package/dist/sankhyablocks/p-fa523d6b.entry.js +1 -0
  118. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  119. package/dist/types/components/snk-actions-button/actions/index.d.ts +2 -1
  120. package/dist/types/components/snk-application/snk-application.d.ts +8 -13
  121. package/dist/types/components/snk-configurator/snk-configurator.d.ts +4 -0
  122. package/dist/types/components/snk-crud/snk-crud.d.ts +1 -0
  123. package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +4 -0
  124. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +5 -2
  125. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +4 -0
  126. package/dist/types/components/snk-entity-list/snk-entity-list.d.ts +0 -4
  127. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +0 -3
  128. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +1 -1
  129. package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.d.ts +5 -4
  130. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +4 -0
  131. package/dist/types/components/snk-form/SnkFormConfigManager.d.ts +5 -4
  132. package/dist/types/components/snk-form/snk-form.d.ts +5 -1
  133. package/dist/types/components/snk-form/subcomponents/snk-form-config/snk-form-config.d.ts +0 -2
  134. package/dist/types/components/snk-grid/snk-grid.d.ts +4 -0
  135. package/dist/types/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.d.ts +4 -0
  136. package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +5 -1
  137. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +4 -0
  138. package/dist/types/components.d.ts +99 -21
  139. package/dist/types/lib/configs/ConfigStorage.d.ts +11 -13
  140. package/dist/types/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.d.ts +0 -1
  141. package/dist/types/lib/resourceid/ResourceIDUtils.d.ts +3 -0
  142. package/package.json +1 -1
  143. package/dist/cjs/filter-bar-config-fetcher-80b033ce.js +0 -155
  144. package/dist/components/filter-bar-config-fetcher.js +0 -153
  145. package/dist/components/resource-fetcher.js +0 -66
  146. package/dist/esm/filter-bar-config-fetcher-317cb6bf.js +0 -153
  147. package/dist/sankhyablocks/p-0b64f036.entry.js +0 -1
  148. package/dist/sankhyablocks/p-0e97ec46.entry.js +0 -1
  149. package/dist/sankhyablocks/p-35ecafcb.entry.js +0 -1
  150. package/dist/sankhyablocks/p-42843f0e.js +0 -1
  151. package/dist/sankhyablocks/p-459d4267.entry.js +0 -1
  152. package/dist/sankhyablocks/p-557affc8.entry.js +0 -1
  153. package/dist/sankhyablocks/p-564efc43.js +0 -1
  154. package/dist/sankhyablocks/p-6295424d.entry.js +0 -1
  155. package/dist/sankhyablocks/p-803b79d6.js +0 -1
  156. package/dist/sankhyablocks/p-80729c9b.entry.js +0 -11
  157. package/dist/sankhyablocks/p-95fa8af6.entry.js +0 -1
  158. package/dist/sankhyablocks/p-96c1ae78.entry.js +0 -1
  159. package/dist/sankhyablocks/p-b556fadc.entry.js +0 -1
  160. package/dist/sankhyablocks/p-befbc9ee.entry.js +0 -1
  161. package/dist/sankhyablocks/p-bf3bd954.entry.js +0 -1
  162. package/dist/sankhyablocks/p-c32b9d7c.entry.js +0 -1
  163. package/dist/sankhyablocks/p-c6380ea2.entry.js +0 -1
  164. package/dist/sankhyablocks/p-dd1fa35d.js +0 -56
  165. package/dist/sankhyablocks/p-de69b4b0.entry.js +0 -1
  166. package/dist/sankhyablocks/p-e42f1f2a.js +0 -1
  167. package/dist/sankhyablocks/p-f24c4bc7.entry.js +0 -1
  168. package/dist/sankhyablocks/p-fd69eab9.entry.js +0 -1
@@ -457,13 +457,10 @@ const SnkFormConfig = class {
457
457
  this._sortableGroup.on(constants.CONFIG_EVENTS.dragStop, (evt) => this.controlStopDraggingGroup(evt));
458
458
  }
459
459
  loadUserConfig() {
460
- if (this._applicationResourceID == undefined) {
461
- return;
462
- }
463
460
  if (this.configManager == undefined) {
464
461
  return;
465
462
  }
466
- this.configManager.fetchUserAvailableConfigs(this._applicationResourceID)
463
+ this.configManager.fetchUserAvailableConfigs()
467
464
  .then((userConfig) => {
468
465
  this._formConfigOptions = userConfig;
469
466
  if (this._formConfigOptions == undefined) {
@@ -517,9 +514,6 @@ const SnkFormConfig = class {
517
514
  }
518
515
  }
519
516
  async loadConfigByUser() {
520
- if (this._applicationResourceID == undefined) {
521
- return;
522
- }
523
517
  if (this.configManager == undefined) {
524
518
  return;
525
519
  }
@@ -529,10 +523,10 @@ const SnkFormConfig = class {
529
523
  let config;
530
524
  switch (this._optionFormConfigSelected.origin) {
531
525
  case formConfigFetcher.UserConfigType.DEFAULT:
532
- config = await this.configManager.fetchDefaultConfig(this._applicationResourceID);
526
+ config = await this.configManager.fetchDefaultConfig();
533
527
  break;
534
528
  case formConfigFetcher.UserConfigType.DEFAULT:
535
- config = await this.configManager.fetchDefaultConfig(this._applicationResourceID);
529
+ config = await this.configManager.fetchDefaultConfig();
536
530
  break;
537
531
  }
538
532
  if (config != undefined) {
@@ -948,11 +942,7 @@ const SnkFormConfig = class {
948
942
  this.controlSortableGroup();
949
943
  }
950
944
  componentWillLoad() {
951
- this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
952
- this._application.getResourceID().then(resourceID => {
953
- this._applicationResourceID = resourceID;
954
- this.loadConfig();
955
- });
945
+ this.loadConfig();
956
946
  }
957
947
  componentDidLoad() {
958
948
  const dataInfo = { dataUnit: this.dataUnit };
@@ -4,14 +4,14 @@ 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-5e61b0a9.js');
8
- require('./ConfigStorage-e32e1391.js');
7
+ const SnkFormConfigManager = require('./SnkFormConfigManager-29b73c81.js');
8
+ const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
9
+ require('./ConfigStorage-d688c739.js');
9
10
  require('./form-config-fetcher-761994b9.js');
10
11
  require('./DataFetcher-d2c6ae38.js');
11
12
  require('./_commonjsHelpers-537d719a.js');
12
13
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
13
14
  require('./resource-fetcher-95d24dff.js');
14
- require('./filter-bar-config-fetcher-80b033ce.js');
15
15
  require('./filter-item-type.enum-aa823a00.js');
16
16
 
17
17
  const snkFormCss = ".sc-snk-form-h{--snk-form__header--min-height:94px;display:block}.snk-form__form--hidden.sc-snk-form{display:none}";
@@ -29,6 +29,7 @@ const SnkForm = class {
29
29
  this.configName = undefined;
30
30
  this.recordsValidator = undefined;
31
31
  this.messagesBuilder = undefined;
32
+ this.resourceID = undefined;
32
33
  }
33
34
  /**
34
35
  * Exibe a janela de configurações do formulário.
@@ -49,7 +50,7 @@ const SnkForm = class {
49
50
  const dataInfo = { dataUnit: this._dataUnit };
50
51
  core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
51
52
  }
52
- componentWillLoad() {
53
+ async componentWillLoad() {
53
54
  let parent = this._element.parentElement;
54
55
  while (parent) {
55
56
  if (parent.tagName.toUpperCase() === "SNK-DATA-UNIT") {
@@ -71,7 +72,10 @@ const SnkForm = class {
71
72
  }
72
73
  parent = parent.parentElement;
73
74
  }
74
- this._configManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName);
75
+ if (this.resourceID == undefined) {
76
+ this.resourceID = await ResourceIDUtils.ResourceIDUtils.getResourceID();
77
+ }
78
+ this._configManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this.resourceID);
75
79
  this._configManager.loadConfig();
76
80
  }
77
81
  render() {
@@ -6,14 +6,13 @@ 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-e32e1391.js');
9
+ const ConfigStorage = require('./ConfigStorage-d688c739.js');
10
10
  const constants = require('./constants-d187e03e.js');
11
11
  require('./form-config-fetcher-761994b9.js');
12
12
  require('./DataFetcher-d2c6ae38.js');
13
13
  require('./_commonjsHelpers-537d719a.js');
14
14
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
15
15
  require('./resource-fetcher-95d24dff.js');
16
- require('./filter-bar-config-fetcher-80b033ce.js');
17
16
  require('./filter-item-type.enum-aa823a00.js');
18
17
 
19
18
  const snkGridConfigCss = ".sc-snk-grid-config-h{--snk-grid-config__footer--padding-top:var(--space--medium, 12px);--snk-grid-config__main--padding-right:var(--space--medium, 12px);--snk-grid-config__tabselector-container--padding:var(--space--medium, 12px);--snk-grid-config__button-close--padding-left:var(--space--medium, 12px);--snk-grid-config__title--color:var(--title--primary, #2B3A54);--snk-grid-config__title--font-family:var(--font-pattern, \"Roboto\");--snk-grid-config__title--font-size:var(--title--large, 20px);--snk-grid-config__title--font-weight:var(--text-weight--extra-large, 700);--snk-grid-config__subtitle--font-family:var(--font-pattern, \"Roboto\");--snk-grid-config__subtitle--font-size:var(--text--medium, 14px);--snk-grid-config__group--font-family:var(--font-pattern, \"Roboto\");--snk-grid-config__group--font-size:var(--text--medium, 14px);--snk-grid-config__group--font-weight:var(--text-weight--large, 600);--snk-grid-config__group--padding-bottom:var(--space-small, 6px);--snk-grid-config__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-grid-config__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-grid-config__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-grid-config__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-grid-config__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-grid-config__scrollbar--width:var(--space--medium, 12px);display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}@media screen and (min-width: 480px){.sc-snk-grid-config-h{width:359px;max-width:359px}}.padding-right--medium.sc-snk-grid-config{padding-right:var(--space--medium)}ez-list.sc-snk-grid-config{height:100%}.height-calc.sc-snk-grid-config{max-height:calc(100% - 24px)}.grid-config__footer.sc-snk-grid-config{display:flex;justify-content:flex-end;width:100%;padding-top:var(--snk-grid-config__footer--padding-top)}.hidden.sc-snk-grid-config{display:none}.tabselector-container.sc-snk-grid-config{padding:var(--snk-grid-config__tabselector-container--padding) 0}.button-close.sc-snk-grid-config{padding-left:var(--snk-grid-config__button-close--padding-left)}.title-container.sc-snk-grid-config{display:flex;justify-content:space-between;align-items:center;width:100%}.title.sc-snk-grid-config{display:flex;margin:0;line-height:normal;letter-spacing:0em;text-align:left;color:var(--snk-grid-config__title--color);font-size:var(--snk-grid-config__title--font-size);font-family:var(--snk-grid-config__title--font-family);font-weight:var(--snk-grid-config__title--font-weight)}.subtitle.sc-snk-grid-config{color:var(--text--primary);font-size:var(--snk-grid-config__subtitle--font-size);font-family:var(--snk-grid-config__subtitle--font-family)}.grid-config__main.sc-snk-grid-config{overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--snk-grid-config__scrollbar--color-clicked) var(--snk-grid-config__scrollbar--color-background);padding-right:var(--snk-grid-config__main--padding-right)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar{width:var(--snk-grid-config__scrollbar--width);max-width:var(--snk-grid-config__scrollbar--width);min-width:var(--snk-grid-config__scrollbar--width);background-color:var(--snk-grid-config__scrollbar--color-background)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-track{background-color:var(--snk-grid-config__scrollbar--color-background);border-radius:var(--snk-grid-config__scrollbar--border-radius)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb{background-color:var(--snk-grid-config__scrollbar--color-default);border-radius:var(--snk-grid-config__scrollbar--border-radius)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb:vertical:hover,.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-grid-config__scrollbar--color-hover)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb:vertical:active,.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-grid-config__scrollbar--color-clicked)}.group-name.sc-snk-grid-config{font-family:var(--snk-grid-config__group--font-family);font-size:var(--snk-grid-config__group--font-size);font-weight:var(--snk-grid-config__group--font-weight);padding-bottom:var(--snk-grid-config__group--padding-bottom)}";
@@ -34,6 +33,7 @@ const SnkGridConfig = class {
34
33
  this.columns = undefined;
35
34
  this.config = undefined;
36
35
  this.configName = undefined;
36
+ this.resourceID = undefined;
37
37
  }
38
38
  /* Creation Methods */
39
39
  /**
@@ -257,7 +257,7 @@ const SnkGridConfig = class {
257
257
  }
258
258
  }
259
259
  _newConfig.columns = _newColumnConfigList;
260
- ConfigStorage.ConfigStorage.saveGridConfig(_newConfig, this.configName)
260
+ ConfigStorage.ConfigStorage.saveGridConfig(_newConfig, this.configName, this.resourceID)
261
261
  .then((savedConfig) => {
262
262
  this.configChange.emit(savedConfig);
263
263
  this._orderList.clearHistory();
@@ -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-b98dd6e9.js');
9
- const ConfigStorage = require('./ConfigStorage-e32e1391.js');
9
+ const ConfigStorage = require('./ConfigStorage-d688c739.js');
10
10
  const index$1 = require('./index-0e663819.js');
11
11
  const taskbarProcessor = require('./taskbar-processor-bce3f499.js');
12
12
  const index$2 = require('./index-102ba62d.js');
@@ -16,7 +16,6 @@ require('./form-config-fetcher-761994b9.js');
16
16
  require('./DataFetcher-d2c6ae38.js');
17
17
  require('./_commonjsHelpers-537d719a.js');
18
18
  require('./resource-fetcher-95d24dff.js');
19
- require('./filter-bar-config-fetcher-80b033ce.js');
20
19
  require('./filter-item-type.enum-aa823a00.js');
21
20
 
22
21
  const snkGridCss = ".snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%}.snk-grid__header.sc-snk-grid{display:flex;flex-wrap:nowrap;width:100%}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium)}.snk-grid__table.sc-snk-grid{min-height:300px}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}";
@@ -44,6 +43,7 @@ const SnkGrid = class {
44
43
  this._popUpGridConfig = false;
45
44
  this.columnFilterDataSource = new SnkMultiSelectionListDataSource.SnkMultiSelectionListDataSource();
46
45
  this.configName = undefined;
46
+ this.resourceID = undefined;
47
47
  this.selectionToastConfig = undefined;
48
48
  this.actionsList = undefined;
49
49
  this.isDetail = undefined;
@@ -102,20 +102,17 @@ const SnkGrid = class {
102
102
  this._gridConfig = config;
103
103
  }
104
104
  loadConfig() {
105
- ConfigStorage.ConfigStorage.get()
106
- .then((instance) => {
107
- instance.loadGridConfig(this.configName)
108
- .then((config) => {
109
- this.setGridConfig(config);
110
- })
111
- .catch((error) => {
112
- console.warn(error);
113
- });
105
+ ConfigStorage.ConfigStorage.loadGridConfig(this.configName, this.resourceID)
106
+ .then((config) => {
107
+ this.setGridConfig(config);
108
+ })
109
+ .catch((error) => {
110
+ console.warn(error);
114
111
  });
115
112
  }
116
113
  gridConfigChangeHandler(evt) {
117
114
  const config = evt.detail;
118
- ConfigStorage.ConfigStorage.saveGridConfig(config, this.configName);
115
+ ConfigStorage.ConfigStorage.saveGridConfig(config, this.configName, this.resourceID);
119
116
  evt.stopPropagation();
120
117
  }
121
118
  modalConfigChangeHandler(evt) {
@@ -323,8 +320,8 @@ const SnkGrid = class {
323
320
  if (!this._dataUnit) {
324
321
  return undefined;
325
322
  }
326
- return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, index.h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, index.h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder }), ((_b = (_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.filterConfig) === null || _b === void 0 ? void 0 : _b.length) > 0 &&
327
- index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" }), index.h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton() })), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: () => this.gridDoubleClick.emit(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, onComponentReady: () => this.onEzGridReady(), columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit }, index.h("snk-taskbar", { dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.actionsList })), index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), application: this._application, selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig() }))));
323
+ return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, index.h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, index.h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID }), ((_b = (_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.filterConfig) === null || _b === void 0 ? void 0 : _b.length) > 0 &&
324
+ index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" }), index.h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID })), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: () => this.gridDoubleClick.emit(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, onComponentReady: () => this.onEzGridReady(), columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit }, index.h("snk-taskbar", { dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.actionsList, resourceID: this.resourceID })), index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), application: this._application, selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
328
325
  }
329
326
  get _element() { return index.getElement(this); }
330
327
  };
@@ -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-5e61b0a9.js');
5
+ const SnkFormConfigManager = require('./SnkFormConfigManager-29b73c81.js');
6
6
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
7
7
  const taskbarProcessor = require('./taskbar-processor-bce3f499.js');
8
8
  const taskbarElements = require('./taskbar-elements-b98dd6e9.js');
@@ -34,6 +34,7 @@ const SnkGuidesViewer = class {
34
34
  this.messagesBuilder = undefined;
35
35
  this.canEdit = true;
36
36
  this.presentationMode = undefined;
37
+ this.resourceID = undefined;
37
38
  this._breadcrumbItems = [];
38
39
  this._guides = undefined;
39
40
  this._formEditorConfigManager = undefined;
@@ -235,7 +236,7 @@ const SnkGuidesViewer = class {
235
236
  else {
236
237
  detailBranch = this.selectedGuide;
237
238
  }
238
- content = this.wrapDetail(levels, index.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) }));
239
+ content = this.wrapDetail(levels, index.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 }));
239
240
  }
240
241
  else {
241
242
  const cardId = this.selectedGuide.id;
@@ -284,7 +285,10 @@ const SnkGuidesViewer = class {
284
285
  return this.selectedGuide === undefined || '__main' === ((_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.id);
285
286
  }
286
287
  componentWillLoad() {
287
- this._configManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, config => this.masterFormConfig = config);
288
+ if (this.resourceID == undefined) {
289
+ throw new Error("Erro interno: resourceID não informado");
290
+ }
291
+ this._configManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this.resourceID, config => this.masterFormConfig = config);
288
292
  this._configManager.loadConfig();
289
293
  }
290
294
  componentDidRender() {
@@ -303,7 +307,7 @@ const SnkGuidesViewer = class {
303
307
  }
304
308
  buildTaskBar() {
305
309
  var _a;
306
- return index.h("div", { class: `ez-col ez-flex-item--align-center ez-col--sd-6 ez-col--tb-6 ${this.presentationMode != index$1.PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, index.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 }));
310
+ return index.h("div", { class: `ez-col ez-flex-item--align-center ez-col--sd-6 ez-col--tb-6 ${this.presentationMode != index$1.PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, index.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 }));
307
311
  }
308
312
  render() {
309
313
  var _a, _b;
@@ -322,7 +326,7 @@ const SnkGuidesViewer = class {
322
326
  index.h("div", { class: "ez-margin-top--extra-small" }, index.h("ez-breadcrumb", Object.assign({ items: this._breadcrumbItems, onSelectedItem: (evt) => this.onBreadcrumbClickHandler(evt === null || evt === void 0 ? void 0 : evt.detail) }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo("breadcrumb")}` }))))), this.presentationMode != index$1.PresentationMode.SECONDARY && this.buildTaskBar()), index.h("div", { class: "snk-guides-viewer__container" }, showGuides ?
323
327
  index.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) })
324
328
  :
325
- index.h("div", null), index.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())), index.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) })));
329
+ index.h("div", null), index.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())), index.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 })));
326
330
  }
327
331
  static get watchers() { return {
328
332
  "dataUnit": ["observeDataUnit"],
@@ -2,17 +2,16 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const snkGuidesViewer = require('./snk-guides-viewer-eb0a79a4.js');
5
+ const snkGuidesViewer = require('./snk-guides-viewer-f67f9cea.js');
6
6
  require('./index-f9e81701.js');
7
7
  require('@sankhyalabs/core');
8
- require('./SnkFormConfigManager-5e61b0a9.js');
9
- require('./ConfigStorage-e32e1391.js');
8
+ require('./SnkFormConfigManager-29b73c81.js');
9
+ require('./ConfigStorage-d688c739.js');
10
10
  require('./form-config-fetcher-761994b9.js');
11
11
  require('./DataFetcher-d2c6ae38.js');
12
12
  require('./_commonjsHelpers-537d719a.js');
13
13
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
14
14
  require('./resource-fetcher-95d24dff.js');
15
- require('./filter-bar-config-fetcher-80b033ce.js');
16
15
  require('./filter-item-type.enum-aa823a00.js');
17
16
  require('@sankhyalabs/ezui/dist/collection/utils/form');
18
17
  require('./taskbar-processor-bce3f499.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-1aeb625d.js');
8
- const ConfigStorage = require('./ConfigStorage-e32e1391.js');
8
+ const ConfigStorage = require('./ConfigStorage-d688c739.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');
@@ -15,7 +15,6 @@ require('./DataFetcher-d2c6ae38.js');
15
15
  require('./_commonjsHelpers-537d719a.js');
16
16
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
17
17
  require('./resource-fetcher-95d24dff.js');
18
- require('./filter-bar-config-fetcher-80b033ce.js');
19
18
 
20
19
  const snkPersonalizedFilterCss = ".sc-snk-personalized-filter-h{display:flex;height:100%;padding:var(--space--large, 24px);--snk-personalized-filter--width:100%;--snk-personalized-filter--height:100%;--snk-personalized-filter--background-color-line:var(--color--disable-secondary);--snk-personalized-filter--margin-line:var(--border--radius-medium, 12px)}.snk-personalized-filter.sc-snk-personalized-filter{height:var(--snk-personalized-filter--width);width:var(--snk-personalized-filter--height)}.snk-personalized-filter__header-actions.sc-snk-personalized-filter{display:flex;gap:var(--space--medium)}.snk-personalized-filter__group.sc-snk-personalized-filter{flex:1}.snk-personalized-filter__expression-input--line.sc-snk-personalized-filter{width:100%;height:2px;background-color:var(--snk-personalized-filter--background-color-line);margin-top:var(--snk-personalized-filter--margin-line);margin-bottom:var(--snk-personalized-filter--margin-line)}.ez-box__main.sc-snk-personalized-filter{height:90%}.snk-personalized-filter__button-mode.sc-snk-personalized-filter{height:35px}";
21
20
 
@@ -45,6 +44,7 @@ const SnkPersonalizedFilter = class {
45
44
  this.entityUri = undefined;
46
45
  this.filterId = undefined;
47
46
  this.configName = undefined;
47
+ this.resourceID = undefined;
48
48
  }
49
49
  /*
50
50
  * Cria um novo filtro se não houver nenhum filtro existente
@@ -81,17 +81,15 @@ const SnkPersonalizedFilter = class {
81
81
  this._filterAssistent = core.ObjectUtils.copy(newPersonalizedFilter);
82
82
  }
83
83
  loadFilter(newValue, oldValue) {
84
- if (newValue == null || oldValue == newValue) {
84
+ if (newValue == null || oldValue == newValue || this.resourceID == undefined) {
85
85
  return;
86
86
  }
87
- ConfigStorage.ConfigStorage.get().then((_instance) => {
88
- ConfigStorage.ConfigStorage.loadPersonalizedFilter(newValue, this.configName)
89
- .then((resp) => {
90
- const personalizedFilter = this.addLabelToItems(resp);
91
- this._filterAssistent = personalizedFilter;
92
- this._originalFilterAssistent = core.ObjectUtils.copy(personalizedFilter);
93
- this._filterAssistentMode = this._filterAssistent.hasOwnProperty("assistent") && this._filterAssistent.assistent != undefined;
94
- });
87
+ ConfigStorage.ConfigStorage.loadPersonalizedFilter(newValue, this.resourceID, this.configName)
88
+ .then((resp) => {
89
+ const personalizedFilter = this.addLabelToItems(resp);
90
+ this._filterAssistent = personalizedFilter;
91
+ this._originalFilterAssistent = core.ObjectUtils.copy(personalizedFilter);
92
+ this._filterAssistentMode = this._filterAssistent.hasOwnProperty("assistent") && this._filterAssistent.assistent != undefined;
95
93
  });
96
94
  }
97
95
  componentWillLoad() {
@@ -116,7 +114,7 @@ const SnkPersonalizedFilter = class {
116
114
  return this._application.messagesBuilder.getMessage(key, params);
117
115
  }
118
116
  saveFilter() {
119
- ConfigStorage.ConfigStorage.savePersonalizedFilter(this._filterAssistent, this.configName).then((personalizedFilter) => {
117
+ ConfigStorage.ConfigStorage.savePersonalizedFilter(this._filterAssistent, this.resourceID, this.configName).then((personalizedFilter) => {
120
118
  this._elButtonSave.enabled = false;
121
119
  const messageToken = !!this._filterAssistent.id ? 'confirmEdit' : 'confirmSave';
122
120
  utils.ApplicationUtils.info(this.getMessage(`snkPersonalizedFilter.${messageToken}.title`), { iconName: "check" });
@@ -127,7 +125,7 @@ const SnkPersonalizedFilter = class {
127
125
  });
128
126
  }
129
127
  removeFilter() {
130
- ConfigStorage.ConfigStorage.removePersonalizedFilter(this._filterAssistent, this.configName);
128
+ ConfigStorage.ConfigStorage.removePersonalizedFilter(this._filterAssistent, this.resourceID, this.configName);
131
129
  }
132
130
  hasChangesToSave() {
133
131
  return JSON.stringify(this._filterAssistent) === JSON.stringify(this._originalFilterAssistent);
@@ -33,6 +33,7 @@ const SnkTaskbar = class {
33
33
  };
34
34
  this._permissions = undefined;
35
35
  this.configName = undefined;
36
+ this.resourceID = undefined;
36
37
  this.buttons = undefined;
37
38
  this.customButtons = undefined;
38
39
  this.actionsList = undefined;
@@ -174,7 +175,7 @@ const SnkTaskbar = class {
174
175
  componentWillLoad() {
175
176
  this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
176
177
  if (this._application) {
177
- this._application.getAllAccess().then(access => this._permissions = access);
178
+ this._application.getAllAccess(this.resourceID).then(access => this._permissions = access);
178
179
  }
179
180
  else {
180
181
  this._permissions = {};
@@ -8,13 +8,14 @@ const ENTITY_NAME_PROPERTY = '__ENTITY_NAME__';
8
8
  const NUFIN_COLUMN = 'NUFIN';
9
9
  const SERVICE_GET_CONFIGURATIONS = 'SystemUtilsSP.getConf';
10
10
  export default class Actions {
11
- constructor(actionsExecuteInterface, dataUnit) {
11
+ constructor(actionsExecuteInterface, dataUnit, appResourceId) {
12
12
  var _a;
13
13
  this._lastValuesCache = {};
14
14
  this._actionsExecuteInterface = actionsExecuteInterface;
15
15
  this._dataUnit = dataUnit;
16
16
  this._selectedRows = ((_a = dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.getSelectionInfo()) === null || _a === void 0 ? void 0 : _a.isAllRecords()) ? [] : dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.getSelectionInfo().records;
17
17
  this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
18
+ this._appResourceId = appResourceId;
18
19
  }
19
20
  apply(action, hasParamsToSave) {
20
21
  this._application.closePopUp();
@@ -277,9 +278,7 @@ export default class Actions {
277
278
  }
278
279
  }
279
280
  async buildResourceId(actionId) {
280
- let appResId = '';
281
- appResId = await this._application.getResourceID();
282
- return appResId + '.actionconfig.' + actionId;
281
+ return this._appResourceId + '.actionconfig.' + actionId;
283
282
  }
284
283
  prepareAndExecute(execSource, executeAction) {
285
284
  this.addRows(execSource);
@@ -4,13 +4,14 @@ import { DataFetcher } from '../../lib/http/data-fetcher/DataFetcher';
4
4
  import ExecutorFactory from './actions/factory/executor.factory';
5
5
  import Actions from './actions';
6
6
  import ClientEventConfirm from './clientEvent';
7
+ import ResourceIDUtils from '../../lib/resourceid/ResourceIDUtils';
7
8
  export class SnkActionsButton {
8
9
  constructor() {
9
10
  this.CLIENT_EVENT_CONFIRM_NAME = "br.com.sankhya.actionbutton.clientconfirm";
10
11
  this.handleClick = (evt) => {
11
12
  const selectedAction = this._actions.find((action) => action.actionID == evt.detail.id);
12
13
  const executor = new ExecutorFactory(selectedAction.type).executor;
13
- const action = new Actions(executor, this._dataUnit);
14
+ const action = new Actions(executor, this._dataUnit, this._resourceID);
14
15
  action.execute(Object.assign({}, selectedAction));
15
16
  this._showDropdown = false;
16
17
  };
@@ -68,12 +69,15 @@ export class SnkActionsButton {
68
69
  document.addEventListener("scroll", this.positionDropdown.bind(this));
69
70
  }
70
71
  async componentWillLoad() {
71
- var _a;
72
72
  this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
73
- this._resourceID = await this._application.getResourceID();
74
73
  this._isOrderActions = await this._application.getBooleanParam('global.ordenar.acoes.personalizadas');
75
- this._dataUnit = (_a = this._element.parentElement) === null || _a === void 0 ? void 0 : _a.dataUnit;
74
+ const snkDataUnit = this._element.parentElement;
75
+ this._dataUnit = snkDataUnit === null || snkDataUnit === void 0 ? void 0 : snkDataUnit.dataUnit;
76
+ this._resourceID = snkDataUnit === null || snkDataUnit === void 0 ? void 0 : snkDataUnit.resourceID;
76
77
  this._entityName = this._dataUnit.name.split('/')[2];
78
+ if (this._resourceID == undefined) {
79
+ this._resourceID = await ResourceIDUtils.getResourceID();
80
+ }
77
81
  this.setEvents();
78
82
  this.getActions().then(() => {
79
83
  this.loadItems();