@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-46291.0 → 0.0.0-bugfix-dev-KB-46492.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/dist/cjs/{SnkMessageBuilder-e7dcf408.js → SnkMessageBuilder-141aa18d.js} +2 -1
  2. package/dist/cjs/SnkMultiSelectionListDataSource-5213120b.js +140 -0
  3. package/dist/cjs/index-f9e81701.js +2 -10
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/{pesquisa-fetcher-c416a6b7.js → pesquisa-fetcher-94f6b316.js} +231 -20
  6. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  7. package/dist/cjs/{snk-actions-button_2.cjs.entry.js → snk-actions-button_4.cjs.entry.js} +517 -2
  8. package/dist/cjs/snk-application.cjs.entry.js +2 -3
  9. package/dist/cjs/snk-attach.cjs.entry.js +3 -4
  10. package/dist/cjs/snk-crud.cjs.entry.js +2 -3
  11. package/dist/cjs/snk-data-exporter.cjs.entry.js +7 -3
  12. package/dist/cjs/{snk-data-unit-82c08a8c.js → snk-data-unit-6026a9f7.js} +1 -1
  13. package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
  14. package/dist/cjs/snk-detail-view.cjs.entry.js +5 -6
  15. package/dist/cjs/snk-form-config.cjs.entry.js +45 -25
  16. package/dist/cjs/snk-form.cjs.entry.js +1 -1
  17. package/dist/cjs/snk-grid.cjs.entry.js +10 -19
  18. package/dist/cjs/{snk-guides-viewer-bd69fce4.js → snk-guides-viewer-c7293cfa.js} +2 -3
  19. package/dist/cjs/snk-guides-viewer.cjs.entry.js +3 -4
  20. package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +3 -1
  21. package/dist/cjs/snk-simple-crud.cjs.entry.js +147 -16
  22. package/dist/cjs/snk-taskbar.cjs.entry.js +5 -1
  23. package/dist/collection/collection-manifest.json +6 -6
  24. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +2 -2
  25. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +1 -1
  26. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +5 -1
  27. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js +3 -1
  28. package/dist/collection/components/snk-form/snk-form.js +1 -1
  29. package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.js +50 -30
  30. package/dist/collection/components/snk-grid/snk-grid.js +5 -16
  31. package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.js +130 -123
  32. package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.js +1 -1
  33. package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +5 -0
  34. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +226 -14
  35. package/dist/collection/components/snk-taskbar/snk-taskbar.js +6 -0
  36. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +1 -8
  37. package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +2 -1
  38. package/dist/collection/lib/utils/CrudUtils.js +13 -1
  39. package/dist/components/SnkMessageBuilder.js +2 -1
  40. package/dist/components/dataunit-fetcher.js +1 -8
  41. package/dist/components/field-search.js +93 -3
  42. package/dist/components/index.d.ts +6 -6
  43. package/dist/components/snk-attach2.js +54 -12
  44. package/dist/components/snk-data-exporter2.js +5 -1
  45. package/dist/components/snk-detail-view2.js +29 -4
  46. package/dist/components/snk-form-config2.js +46 -26
  47. package/dist/components/snk-grid-config2.js +128 -102
  48. package/dist/components/snk-grid2.js +10 -17
  49. package/dist/components/snk-personalized-filter-editor.js +3 -1
  50. package/dist/components/snk-simple-crud2.js +204 -24
  51. package/dist/components/snk-taskbar2.js +5 -1
  52. package/dist/esm/{SnkMessageBuilder-0fb796b9.js → SnkMessageBuilder-9747ddd2.js} +2 -1
  53. package/dist/esm/SnkMultiSelectionListDataSource-7e7eada5.js +133 -0
  54. package/dist/esm/index-a7d3d3f1.js +2 -10
  55. package/dist/esm/loader.js +1 -1
  56. package/dist/esm/{pesquisa-fetcher-ab16a2e8.js → pesquisa-fetcher-f05a12ca.js} +222 -12
  57. package/dist/esm/sankhyablocks.js +1 -1
  58. package/dist/esm/{snk-actions-button_2.entry.js → snk-actions-button_4.entry.js} +516 -3
  59. package/dist/esm/snk-application.entry.js +2 -3
  60. package/dist/esm/snk-attach.entry.js +2 -3
  61. package/dist/esm/snk-crud.entry.js +2 -3
  62. package/dist/esm/snk-data-exporter.entry.js +7 -3
  63. package/dist/esm/{snk-data-unit-5d201fb3.js → snk-data-unit-4c343635.js} +1 -1
  64. package/dist/esm/snk-data-unit.entry.js +2 -2
  65. package/dist/esm/snk-detail-view.entry.js +5 -6
  66. package/dist/esm/snk-form-config.entry.js +46 -26
  67. package/dist/esm/snk-form.entry.js +1 -1
  68. package/dist/esm/snk-grid.entry.js +11 -20
  69. package/dist/esm/{snk-guides-viewer-fde82cc1.js → snk-guides-viewer-47443f7c.js} +2 -3
  70. package/dist/esm/snk-guides-viewer.entry.js +3 -4
  71. package/dist/esm/snk-personalized-filter-editor.entry.js +3 -1
  72. package/dist/esm/snk-simple-crud.entry.js +148 -17
  73. package/dist/esm/snk-taskbar.entry.js +5 -1
  74. package/dist/sankhyablocks/p-0c9dd95e.entry.js +1 -0
  75. package/dist/sankhyablocks/p-20b46647.entry.js +1 -0
  76. package/dist/sankhyablocks/p-2897fb8c.js +1 -0
  77. package/dist/sankhyablocks/{p-05243555.js → p-2936303b.js} +1 -1
  78. package/dist/sankhyablocks/p-30735d1e.entry.js +1 -0
  79. package/dist/sankhyablocks/p-3c5b7cfc.entry.js +1 -0
  80. package/dist/sankhyablocks/p-6ae58da0.js +1 -0
  81. package/dist/sankhyablocks/{p-fcdcb0e2.entry.js → p-746fc99e.entry.js} +1 -1
  82. package/dist/sankhyablocks/p-7e05bd83.entry.js +1 -0
  83. package/dist/sankhyablocks/p-99b1926b.entry.js +1 -0
  84. package/dist/sankhyablocks/{p-f3d1c48e.js → p-9a5d1b39.js} +1 -1
  85. package/dist/sankhyablocks/p-9fb97691.entry.js +1 -0
  86. package/dist/sankhyablocks/p-a9aec34d.entry.js +1 -0
  87. package/dist/sankhyablocks/p-b11aa1e0.entry.js +1 -0
  88. package/dist/sankhyablocks/{p-fd0a8d68.entry.js → p-c4bcdd4b.entry.js} +3 -3
  89. package/dist/sankhyablocks/p-d78d4062.js +65 -0
  90. package/dist/sankhyablocks/p-e7dbe53a.entry.js +1 -0
  91. package/dist/sankhyablocks/p-eefe9954.entry.js +1 -0
  92. package/dist/sankhyablocks/p-fca66dda.entry.js +1 -0
  93. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  94. package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +1 -1
  95. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +1 -1
  96. package/dist/types/components/snk-form/snk-form.d.ts +1 -1
  97. package/dist/types/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.d.ts +5 -3
  98. package/dist/types/components/snk-grid/snk-grid.d.ts +0 -1
  99. package/dist/types/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.d.ts +11 -6
  100. package/dist/types/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.d.ts +1 -1
  101. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +46 -1
  102. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +1 -0
  103. package/dist/types/components.d.ts +26 -10
  104. package/dist/types/lib/utils/CrudUtils.d.ts +3 -0
  105. package/package.json +1 -1
  106. package/dist/cjs/PreloadManager-84466da6.js +0 -224
  107. package/dist/cjs/SnkMultiSelectionListDataSource-ba5838c2.js +0 -49
  108. package/dist/cjs/snk-grid-config.cjs.entry.js +0 -483
  109. package/dist/cjs/snk-select-box.cjs.entry.js +0 -25
  110. package/dist/esm/PreloadManager-c1c2f2b4.js +0 -222
  111. package/dist/esm/SnkMultiSelectionListDataSource-44494b0e.js +0 -43
  112. package/dist/esm/snk-grid-config.entry.js +0 -479
  113. package/dist/esm/snk-select-box.entry.js +0 -21
  114. package/dist/sankhyablocks/p-094c30cb.js +0 -1
  115. package/dist/sankhyablocks/p-0b0b36ac.entry.js +0 -1
  116. package/dist/sankhyablocks/p-11ad137d.entry.js +0 -1
  117. package/dist/sankhyablocks/p-57212bb5.js +0 -1
  118. package/dist/sankhyablocks/p-5f5b58b6.entry.js +0 -1
  119. package/dist/sankhyablocks/p-84bb8f47.entry.js +0 -1
  120. package/dist/sankhyablocks/p-8c13d8d6.entry.js +0 -1
  121. package/dist/sankhyablocks/p-91b7f78a.entry.js +0 -1
  122. package/dist/sankhyablocks/p-98674137.entry.js +0 -1
  123. package/dist/sankhyablocks/p-b7004423.entry.js +0 -1
  124. package/dist/sankhyablocks/p-c22c1d8e.js +0 -1
  125. package/dist/sankhyablocks/p-c4874327.entry.js +0 -1
  126. package/dist/sankhyablocks/p-c6247955.js +0 -65
  127. package/dist/sankhyablocks/p-c758265f.entry.js +0 -1
  128. package/dist/sankhyablocks/p-d4802f81.entry.js +0 -1
  129. package/dist/sankhyablocks/p-e3bd000e.entry.js +0 -1
  130. package/dist/sankhyablocks/p-fb842329.entry.js +0 -1
  131. package/dist/sankhyablocks/p-fdc4cb9b.entry.js +0 -1
  132. /package/dist/cjs/{SnkFormConfigManager-3621bfc4.js → SnkFormConfigManager-0ffd098d.js} +0 -0
  133. /package/dist/collection/components/{snk-form → snk-form-config}/SnkFormConfigManager.js +0 -0
  134. /package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.css +0 -0
  135. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.css +0 -0
  136. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.js +0 -0
  137. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.css +0 -0
  138. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.js +0 -0
  139. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.css +0 -0
  140. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.js +0 -0
  141. /package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.css +0 -0
  142. /package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.css +0 -0
  143. /package/dist/esm/{SnkFormConfigManager-692e20c7.js → SnkFormConfigManager-dd450734.js} +0 -0
  144. /package/dist/sankhyablocks/{p-725d04ba.js → p-9ea14b61.js} +0 -0
  145. /package/dist/types/components/{snk-form → snk-form-config}/SnkFormConfigManager.d.ts +0 -0
  146. /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.d.ts +0 -0
  147. /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.d.ts +0 -0
  148. /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.d.ts +0 -0
@@ -7,23 +7,24 @@ const core = require('@sankhyalabs/core');
7
7
  const constants = require('./constants-35ddd366.js');
8
8
  const taskbarElements = require('./taskbar-elements-1e4fb2e0.js');
9
9
  require('./DataFetcher-99f0f6ed.js');
10
- const pesquisaFetcher = require('./pesquisa-fetcher-c416a6b7.js');
10
+ const pesquisaFetcher = require('./pesquisa-fetcher-94f6b316.js');
11
+ const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-5213120b.js');
11
12
  const index$1 = require('./index-0922807b.js');
12
13
  require('./ISave-e91b70a7.js');
13
14
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
14
15
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
15
- require('./PreloadManager-84466da6.js');
16
16
  require('./filter-item-type.enum-a7ffdaa6.js');
17
17
  require('./form-config-fetcher-9f1a13ca.js');
18
18
  const fieldSearch = require('./field-search-f56aa7d6.js');
19
- const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-ba5838c2.js');
19
+ const ConfigStorage = require('./ConfigStorage-d4c99a5e.js');
20
+ const SnkFormConfigManager = require('./SnkFormConfigManager-0ffd098d.js');
20
21
  require('./index-102ba62d.js');
21
22
  require('./PrintUtils-bcaeb82f.js');
22
- require('./ResourceIDUtils-5ff86aa7.js');
23
23
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
24
+ require('./ResourceIDUtils-5ff86aa7.js');
24
25
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
25
26
 
26
- const snkSimpleCrudCss = ".sc-snk-simple-crud-h{display:flex;height:100%;width:100%}.simple-crud__container.sc-snk-simple-crud{display:grid;grid-template-rows:max-content;row-gap:12px;height:100%;width:100%}.simple-crud__container-section.sc-snk-simple-crud{flex-wrap:unset;flex-direction:column}ez-grid.sc-snk-simple-crud{--ez-grid__container--shadow:none;min-height:300px}ez-form.sc-snk-simple-crud{min-height:300px}";
27
+ const snkSimpleCrudCss = ".sc-snk-simple-crud-h{display:flex;height:100%;width:100%}.simple-crud__container.sc-snk-simple-crud{display:grid;grid-template-rows:max-content;row-gap:12px;height:100%;width:100%}.simple-crud__container-section.sc-snk-simple-crud{flex-wrap:unset;flex-direction:column}.simple-crud__form--hidden.sc-snk-simple-crud{display:none}ez-grid.sc-snk-simple-crud{--ez-grid__container--shadow:none;min-height:300px}ez-form.sc-snk-simple-crud{min-height:300px}";
27
28
 
28
29
  const SnkSimpleCrud = class {
29
30
  constructor(hostRef) {
@@ -32,20 +33,25 @@ const SnkSimpleCrud = class {
32
33
  this.dataUnitReady = index.createEvent(this, "dataUnitReady", 3);
33
34
  this.actionClick = index.createEvent(this, "actionClick", 7);
34
35
  this.formItemsReady = index.createEvent(this, "formItemsReady", 7);
36
+ this.configuratorSave = index.createEvent(this, "configuratorSave", 7);
37
+ this.configuratorCancel = index.createEvent(this, "configuratorCancel", 7);
35
38
  this.REGULAR_DEFAULT_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "MORE_OPTIONS"];
36
39
  this.REGULAR_SELECTED_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "DIVIDER", "MORE_OPTIONS"];
37
40
  this._multiSelectionListDataSource = new SnkMultiSelectionListDataSource.SnkMultiSelectionListDataSource();
38
41
  this._keyDownHandler = (event) => this.keyDownListener(event);
39
42
  this._taskbarProcessor = new fieldSearch.TaskbarProcessor({
40
- "snkSimpleCrudTaskbar.form_regular": this.resolveInMemoryBtns(this.REGULAR_DEFAULT_BTNS).concat(taskbarElements.TaskbarElement.GRID_MODE),
41
- "snkSimpleCrudTaskbar.grid_regular": this.resolveInMemoryBtns(this.REGULAR_DEFAULT_BTNS).concat(taskbarElements.TaskbarElement.FORM_MODE),
42
- "snkSimpleCrudTaskbar.form_selected": this.resolveInMemoryBtns(this.REGULAR_SELECTED_BTNS).concat(taskbarElements.TaskbarElement.GRID_MODE),
43
- "snkSimpleCrudTaskbar.grid_selected": this.resolveInMemoryBtns(this.REGULAR_SELECTED_BTNS).concat(taskbarElements.TaskbarElement.FORM_MODE),
43
+ "snkSimpleCrudTaskbar.form_regular": this.getButtons(false, taskbarElements.TaskbarElement.GRID_MODE),
44
+ "snkSimpleCrudTaskbar.grid_regular": this.getButtons(false, taskbarElements.TaskbarElement.FORM_MODE),
45
+ "snkSimpleCrudTaskbar.form_selected": this.getButtons(true, taskbarElements.TaskbarElement.GRID_MODE),
46
+ "snkSimpleCrudTaskbar.grid_selected": this.getButtons(true, taskbarElements.TaskbarElement.FORM_MODE),
44
47
  "snkSimpleCrudTaskbar.finish_edition": ["CANCEL", "SAVE"]
45
48
  });
49
+ this._showPopUpGridConfig = false;
50
+ this._showFormConfig = false;
46
51
  this._currentViewMode = constants.VIEW_MODE.GRID;
47
52
  this._config = undefined;
48
53
  this._fieldToGetFocus = undefined;
54
+ this._customContainerId = `SNK-SIMPLE-CRUD-CUSTOM-CONTAINER-${core.StringUtils.generateUUID()}`;
49
55
  this.dataState = undefined;
50
56
  this.dataUnit = undefined;
51
57
  this.mode = constants.SIMPLE_CRUD_MODE.SERVER;
@@ -59,6 +65,20 @@ const SnkSimpleCrud = class {
59
65
  this.useEnterLikeTab = false;
60
66
  this.actionsList = undefined;
61
67
  this.configName = undefined;
68
+ this.showConfiguratorButtons = undefined;
69
+ }
70
+ getButtons(selected, changeModeBtn) {
71
+ return this.addConfigButton(this.resolveInMemoryBtns(selected ? this.REGULAR_DEFAULT_BTNS : this.REGULAR_SELECTED_BTNS)
72
+ .concat(changeModeBtn));
73
+ }
74
+ addConfigButton(buttons) {
75
+ if (this.configName === undefined) {
76
+ return buttons;
77
+ }
78
+ return buttons.concat(taskbarElements.TaskbarElement.CONFIGURATOR);
79
+ }
80
+ get application() {
81
+ return core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
62
82
  }
63
83
  resolveInMemoryBtns(taskbarButtons) {
64
84
  const newTaskBarConfig = [...taskbarButtons];
@@ -78,7 +98,10 @@ const SnkSimpleCrud = class {
78
98
  }
79
99
  actionClickListener(evt) {
80
100
  const act = evt.detail;
81
- if (act === taskbarElements.TaskbarElement.GRID_MODE) {
101
+ if (act === taskbarElements.TaskbarElement.CONFIGURATOR) {
102
+ this._snkConfigurator.open();
103
+ }
104
+ else if (act === taskbarElements.TaskbarElement.GRID_MODE) {
82
105
  this.goToView(constants.VIEW_MODE.GRID);
83
106
  }
84
107
  else if (act === taskbarElements.TaskbarElement.FORM_MODE) {
@@ -96,8 +119,64 @@ const SnkSimpleCrud = class {
96
119
  this.dataStateChange.emit(newValue);
97
120
  }
98
121
  }
99
- componentWillRender() {
122
+ openConfig(viewMode) {
123
+ this._snkConfigurator.close();
124
+ if (viewMode === constants.VIEW_MODE.GRID) {
125
+ this.openGridConfig();
126
+ }
127
+ else if (viewMode === constants.VIEW_MODE.FORM) {
128
+ this.openFormConfig();
129
+ }
130
+ }
131
+ openGridConfig() {
132
+ this._grid.getColumnsState()
133
+ .then((gridColumns) => {
134
+ this._snkGridConfig.columns = gridColumns.filter(c => c.name);
135
+ this._snkGridConfig.selectedIndex = 0;
136
+ this._showPopUpGridConfig = true;
137
+ });
138
+ }
139
+ openFormConfig() {
140
+ this._showFormConfig = true;
141
+ }
142
+ loadGridConfig() {
143
+ if (this.gridConfig != undefined || this._gridConfigAlreadyLoaded) {
144
+ return;
145
+ }
146
+ this._gridConfigAlreadyLoaded = true;
147
+ return new Promise((accept, reject) => {
148
+ ConfigStorage.ConfigStorage.loadGridConfig(this.configName, this._resourceID)
149
+ .then(config => {
150
+ this.setGridConfig(config);
151
+ accept();
152
+ })
153
+ .catch(reason => {
154
+ reject(reason);
155
+ });
156
+ });
157
+ }
158
+ async loadFormConfig() {
159
+ if (this._formConfigManager == undefined) {
160
+ this._formConfigManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this._resourceID);
161
+ this._formConfigManager.setConfig(this.formConfig);
162
+ }
163
+ if (this.formConfig != undefined || this._formConfigAlreadyLoaded) {
164
+ return;
165
+ }
166
+ this._formConfigAlreadyLoaded = true;
167
+ this.setFormConfig(await this._formConfigManager.loadConfig());
168
+ }
169
+ async componentWillRender() {
170
+ this._resourceID = await this.application.getResourceID();
100
171
  this._taskbarProcessor.process(this.getTaskBarId(), this.taskbarManager, this.dataState, this.getTaskBarDisabledButtons());
172
+ if (this.configName === undefined) {
173
+ return;
174
+ }
175
+ if (this.gridConfig != undefined || this._gridConfigAlreadyLoaded) {
176
+ return;
177
+ }
178
+ this.loadGridConfig();
179
+ this.loadFormConfig();
101
180
  }
102
181
  componentWillLoad() {
103
182
  this.processMetadata();
@@ -105,8 +184,7 @@ const SnkSimpleCrud = class {
105
184
  this.configDatasource();
106
185
  }
107
186
  configDatasource() {
108
- const application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
109
- this._multiSelectionListDataSource.setApplication(application);
187
+ this._multiSelectionListDataSource.setApplication(this.application);
110
188
  this._multiSelectionListDataSource.setDataUnit(this.dataUnit);
111
189
  }
112
190
  getTaskBarId() {
@@ -147,6 +225,20 @@ const SnkSimpleCrud = class {
147
225
  getRecords() {
148
226
  return Promise.resolve(this.dataUnit.records);
149
227
  }
228
+ /**
229
+ * Usado para abrir o configurator do CRUD
230
+ */
231
+ async openConfigurator() {
232
+ var _a;
233
+ (_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.open();
234
+ }
235
+ /**
236
+ * Usado para fechar o configurator do CRUD
237
+ */
238
+ async closeConfigurator() {
239
+ var _a;
240
+ (_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.close();
241
+ }
150
242
  processMetadata() {
151
243
  const fieldsMetadataElem = this._element.querySelectorAll("snk-field-metadata");
152
244
  const fieldMetadata = [];
@@ -201,6 +293,14 @@ const SnkSimpleCrud = class {
201
293
  this.dataUnit.clearSelection();
202
294
  }
203
295
  }
296
+ handleConfiguratorEvent(evt, type) {
297
+ evt.stopImmediatePropagation();
298
+ if (type === 'SAVE') {
299
+ this.configuratorSave.emit();
300
+ return;
301
+ }
302
+ this.configuratorCancel.emit();
303
+ }
204
304
  getColumnSearch(actionButton, item) {
205
305
  if (this._columnSearch != undefined) {
206
306
  return this._columnSearch;
@@ -314,11 +414,42 @@ const SnkSimpleCrud = class {
314
414
  disconnectedCallback() {
315
415
  window.removeEventListener("keydown", this._keyDownHandler);
316
416
  }
417
+ gridConfigChangeHandler(evt) {
418
+ const config = evt.detail;
419
+ ConfigStorage.ConfigStorage.saveGridConfig(config, this.configName, this._resourceID);
420
+ evt.stopPropagation();
421
+ }
422
+ modalConfigChangeHandler(evt) {
423
+ const config = evt.detail;
424
+ this._grid.setColumnsState(config.columns)
425
+ .then(() => {
426
+ this.setGridConfig(config);
427
+ this.closeGridConfig();
428
+ });
429
+ evt.stopPropagation();
430
+ }
431
+ setGridConfig(config) {
432
+ this.gridConfig = config;
433
+ SnkMultiSelectionListDataSource.CrudUtils.assertDefaultSorting(this.gridConfig, this.dataUnit);
434
+ }
435
+ setFormConfig(config) {
436
+ this.formConfig = config;
437
+ }
438
+ closeGridConfig() {
439
+ this._showPopUpGridConfig = false;
440
+ }
441
+ closeFormConfig() {
442
+ this._showFormConfig = false;
443
+ }
444
+ /* istanbul ignore next */
317
445
  render() {
318
- var _a;
319
- return (index.h("snk-data-unit", { class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), onInsertionMode: () => this.goToView(constants.VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === constants.VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail }, index.h("header", null, index.h("slot", { name: "snkSimpleCrudHeader" })), index.h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, index.h("snk-taskbar", { class: "ez-box ez-box--shadow ez-padding--medium", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, slot: "leftButtons", presentationMode: index$1.PresentationMode.SECONDARY }, index.h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })), index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, index.h("stack-item", null, index.h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(constants.VIEW_MODE.FORM), columnfilterDataSource: this.dataUnit.name.includes(pesquisaFetcher.InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
446
+ var _a, _b, _c;
447
+ if (this.dataUnit == undefined) {
448
+ return;
449
+ }
450
+ return (index.h("snk-data-unit", { class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), onInsertionMode: () => this.goToView(constants.VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === constants.VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail }, index.h("header", null, index.h("slot", { name: "snkSimpleCrudHeader" })), index.h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, index.h("snk-taskbar", { class: "ez-box ez-box--shadow ez-padding--medium", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, slot: "leftButtons", presentationMode: index$1.PresentationMode.SECONDARY }, index.h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })), index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, index.h("stack-item", null, index.h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(constants.VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(pesquisaFetcher.InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
320
451
  ? undefined
321
- : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab }, index.h("div", { slot: "footer" }, index.h("slot", { name: "snkSimpleCrudFooter" })))), index.h("stack-item", null, index.h("ez-form", { class: "ez-margin-top--large", dataUnit: this.dataUnit, config: this.formConfig, fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }))))));
452
+ : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab }, index.h("div", { slot: "footer" }, index.h("slot", { name: "snkSimpleCrudFooter" })))), index.h("stack-item", null, index.h("ez-form", { class: `ez-margin-top--large ${this._showFormConfig ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: (_b = this._formConfigManager) === null || _b === void 0 ? void 0 : _b.getConfig((_c = this.dataState) === null || _c === void 0 ? void 0 : _c.insertionMode, this.dataUnit), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this._showFormConfig && index.h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, 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("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, 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), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this._resourceID }))));
322
453
  }
323
454
  get _element() { return index.getElement(this); }
324
455
  static get watchers() { return {
@@ -60,6 +60,9 @@ const SnkTaskbar = class {
60
60
  this._definitions = undefined;
61
61
  requestAnimationFrame(() => { var _a; return (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.forceUpdate(); });
62
62
  }
63
+ observeDisabledButtons() {
64
+ requestAnimationFrame(() => { var _a; return (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.forceUpdate(); });
65
+ }
63
66
  // Internal methods
64
67
  elementsFromString(strButtons) {
65
68
  const elements = [];
@@ -363,7 +366,8 @@ const SnkTaskbar = class {
363
366
  }
364
367
  get _element() { return index.getElement(this); }
365
368
  static get watchers() { return {
366
- "buttons": ["observeButtons"]
369
+ "buttons": ["observeButtons"],
370
+ "disabledButtons": ["observeDisabledButtons"]
367
371
  }; }
368
372
  };
369
373
  SnkTaskbar.style = snkTaskbarCss;
@@ -6,7 +6,6 @@
6
6
  "./components/snk-taskbar/snk-taskbar.js",
7
7
  "./components/snk-filter-bar/filter-list/snk-filter-list.js",
8
8
  "./components/snk-print-selector/snk-print-selector.js",
9
- "./components/snk-form/subcomponents/snk-tab-config/snk-tab-config.js",
10
9
  "./components/snk-actions-button/snk-actions-button.js",
11
10
  "./components/snk-actions-button/subcomponents/snk-actions-form.js",
12
11
  "./components/snk-actions-button/subcomponents/snk-client-confirm.js",
@@ -35,12 +34,13 @@
35
34
  "./components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js",
36
35
  "./components/snk-filter-field-search/snk-filter-field-search.js",
37
36
  "./components/snk-form/snk-form.js",
38
- "./components/snk-form/subcomponents/snk-config-options/snk-config-options.js",
39
- "./components/snk-form/subcomponents/snk-field-config/snk-field-config.js",
40
- "./components/snk-form/subcomponents/snk-form-config/snk-form-config.js",
37
+ "./components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.js",
38
+ "./components/snk-form-config/snk-form-config.js",
39
+ "./components/snk-form-config/subcomponents/snk-config-options/snk-config-options.js",
40
+ "./components/snk-form-config/subcomponents/snk-field-config/snk-field-config.js",
41
41
  "./components/snk-grid/snk-grid.js",
42
- "./components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.js",
43
- "./components/snk-grid/subcomponents/snk-select-box/snk-select-box.js",
42
+ "./components/snk-grid-config/snk-grid-config.js",
43
+ "./components/snk-grid-config/snk-select-box/snk-select-box.js",
44
44
  "./components/snk-personalized-filter/snk-personalized-filter.js",
45
45
  "./components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js",
46
46
  "./components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js",
@@ -1,6 +1,6 @@
1
1
  import { Action } from '@sankhyalabs/core';
2
2
  import { Host, forceUpdate, h } from '@stencil/core';
3
- import { SnkFormConfigManager } from '../../../snk-form/SnkFormConfigManager';
3
+ import { SnkFormConfigManager } from '../../../snk-form-config/SnkFormConfigManager';
4
4
  import { buildFormMetadata } from "@sankhyalabs/ezui/dist/collection/utils/form";
5
5
  import { PresentationMode } from '../../../../lib';
6
6
  import { TaskbarElement } from '../../../snk-taskbar/elements/taskbar-elements';
@@ -236,7 +236,7 @@ export class SnkDetailView {
236
236
  "references": {
237
237
  "SnkFormConfigManager": {
238
238
  "location": "import",
239
- "path": "../../../snk-form/SnkFormConfigManager"
239
+ "path": "../../../snk-form-config/SnkFormConfigManager"
240
240
  }
241
241
  }
242
242
  },
@@ -1,6 +1,6 @@
1
1
  import { Action as DUAction, ElementIDUtils } from '@sankhyalabs/core';
2
2
  import { Fragment, h } from '@stencil/core';
3
- import { SnkFormConfigManager } from '../../snk-form/SnkFormConfigManager';
3
+ import { SnkFormConfigManager } from '../../snk-form-config/SnkFormConfigManager';
4
4
  import { buildFormMetadata, FormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
5
5
  import TaskbarProcessor from '../../snk-taskbar/processor/taskbar-processor';
6
6
  import { TaskbarElement } from '../../snk-taskbar/elements/taskbar-elements';
@@ -120,7 +120,11 @@ export class SnkDataExporter {
120
120
  }
121
121
  fetchDataExporter(params)
122
122
  .then((result) => callbackResolver(result))
123
- .catch((exception) => ApplicationUtils.error(this.getMessage("snkDataExporter.message.exportError"), exception ? exception.statusMessage : this.getMessage("snkDataExporter.message.exportError")));
123
+ .catch((exception) => {
124
+ console.error(exception);
125
+ let { title, message, statusMessage } = exception || {};
126
+ ApplicationUtils.error(title || this.getMessage("snkDataExporter.message.exportError"), statusMessage || message || this.getMessage("snkDataExporter.message.unknownFailure"));
127
+ });
124
128
  }
125
129
  getOptionKey(option) {
126
130
  return Object.keys(DataExporterOption)
@@ -55,8 +55,10 @@ export class SnkFilterPersonalized {
55
55
  return this.presentationMode === EPresentationMode.MODAL;
56
56
  }
57
57
  doSearch(mode, argument, param) {
58
+ const context = Object.assign({}, param.searchContext);
59
+ context.searchOptions = Object.assign(Object.assign({}, context.searchOptions), { showInactives: "true" });
58
60
  return new Promise((resolve, reject) => {
59
- this._application.executePreparedSearch(mode, argument, param.searchContext)
61
+ this._application.executePreparedSearch(mode, argument, context)
60
62
  .then(result => {
61
63
  resolve(result);
62
64
  }).catch(reason => {
@@ -1,6 +1,6 @@
1
1
  import { ElementIDUtils } from '@sankhyalabs/core';
2
2
  import { h } from '@stencil/core';
3
- import { SnkFormConfigManager } from './SnkFormConfigManager';
3
+ import { SnkFormConfigManager } from '../snk-form-config/SnkFormConfigManager';
4
4
  import ResourceIDUtils from '../../lib/resourceid/ResourceIDUtils';
5
5
  export class SnkForm {
6
6
  constructor() {
@@ -1,9 +1,9 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  import { Sortable } from '@shopify/draggable';
3
- import { ObjectUtils, ArrayUtils, ElementIDUtils } from '@sankhyalabs/core';
3
+ import { ObjectUtils, ArrayUtils, ElementIDUtils, ApplicationContext } from '@sankhyalabs/core';
4
4
  import { ApplicationUtils, DialogType } from "@sankhyalabs/ezui/dist/collection/utils";
5
- import { ACTION_CONFIG, CONFIG_EVENTS, CONFIG_SORTABLE_EVENTS, DEFAULT_TYPE, TAB_NAMES } from "../../../../lib/utils/constants";
6
- import { UserConfigType } from "../../../../lib/http/data-fetcher/fetchers/form-config-fetcher";
5
+ import { ACTION_CONFIG, CONFIG_EVENTS, CONFIG_SORTABLE_EVENTS, DEFAULT_TYPE, TAB_NAMES } from "../../lib/utils/constants";
6
+ import { UserConfigType } from "../../lib/http/data-fetcher/fetchers/form-config-fetcher";
7
7
  import { buildFormConfigFromDataUnit } from "@sankhyalabs/ezui/dist/collection/utils/form";
8
8
  const CONTAINER_ID = {
9
9
  collapsibleBox: "EZ-COLLAPSIBLE-BOX",
@@ -25,6 +25,7 @@ export class SnkFormConfig {
25
25
  this._formFieldsStyle = "ez-col ez-col--sd-12 ez-col--tb-4 ez-padding-right--small ez-padding-bottom--medium sc-snk-form-config";
26
26
  this._fieldsAvailableStyle = "ez-col ez-col--sd-12 ez-col--tb-12 ez-margin-bottom--medium ez-margin-right--medium sc-snk-form-config";
27
27
  this._fieldFloatingStyle = "form-config__field-config--dragged";
28
+ this._sortableTimer = 100;
28
29
  this._formConfigOptions = [];
29
30
  this._fieldConfigSelected = undefined;
30
31
  this._layoutFormConfig = undefined;
@@ -39,20 +40,27 @@ export class SnkFormConfig {
39
40
  this.messagesBuilder = undefined;
40
41
  }
41
42
  observeConfigManager() {
42
- this.loadConfig();
43
+ this.loadConfig(this._sortableTimer);
43
44
  }
44
- loadFields() {
45
+ loadFields(updateTimer = 0) {
45
46
  this._layoutFormConfig = [];
46
- this.buildFields();
47
+ if (updateTimer > 0) {
48
+ setTimeout(() => {
49
+ this.buildFields();
50
+ }, updateTimer);
51
+ }
52
+ else {
53
+ this.buildFields();
54
+ }
47
55
  }
48
56
  buildFields() {
49
57
  this.buildFormConfig();
50
58
  this.buildAvailableFields();
51
59
  }
52
- loadFormConfig() {
60
+ loadFormConfig(updateTimer) {
53
61
  var _a;
54
62
  this._formConfig = this.getConfig();
55
- this.loadFields();
63
+ this.loadFields(updateTimer);
56
64
  this.controlFieldConfig();
57
65
  if (((_a = this._filterFieldsAvailable) === null || _a === void 0 ? void 0 : _a.value) != undefined) {
58
66
  this._filterFieldsAvailable.value = "";
@@ -95,12 +103,12 @@ export class SnkFormConfig {
95
103
  }
96
104
  }
97
105
  resetChangeConfig() {
98
- this.loadFormConfig();
106
+ this.loadFormConfig(this._sortableTimer);
99
107
  this.clearTempGroups();
100
108
  }
101
109
  resetChangeOptionConfig() {
102
110
  this._formConfigChanged = false;
103
- this.loadConfig();
111
+ this.loadConfig(this._sortableTimer);
104
112
  this.clearTempGroups();
105
113
  }
106
114
  getTabsToSave() {
@@ -318,7 +326,9 @@ export class SnkFormConfig {
318
326
  && oldContainer.id === newContainer.id) {
319
327
  evt.cancel();
320
328
  this._fieldsAvailable = [];
321
- this.buildAvailableFields();
329
+ setTimeout(() => {
330
+ this.buildAvailableFields();
331
+ }, this._sortableTimer);
322
332
  return true;
323
333
  }
324
334
  return false;
@@ -361,7 +371,11 @@ export class SnkFormConfig {
361
371
  if (isNewGroup) {
362
372
  this.clearTempGroups(true);
363
373
  }
364
- this.updateFieldsToSave();
374
+ const sortableTimer = oldContainer.dataset.groupName !== newContainer.dataset.groupName
375
+ || (newContainer.id === CONTAINER_ID.withoutGroup && oldContainer.id === CONTAINER_ID.fieldsAvailable)
376
+ ? this._sortableTimer
377
+ : 0;
378
+ this.updateFieldsToSave(sortableTimer);
365
379
  }, this._renderTimer);
366
380
  return true;
367
381
  }
@@ -391,12 +405,12 @@ export class SnkFormConfig {
391
405
  return;
392
406
  }
393
407
  }
394
- updateFieldsToSave() {
408
+ updateFieldsToSave(updateTimer = 0) {
395
409
  const fields = this.getFieldsToSave();
396
410
  if ((fields === null || fields === void 0 ? void 0 : fields.length) > 0) {
397
411
  this._formConfig.fields = fields;
398
412
  }
399
- this.loadFields();
413
+ this.loadFields(updateTimer);
400
414
  this._formConfigChanged = true;
401
415
  }
402
416
  controlSortableField() {
@@ -426,7 +440,7 @@ export class SnkFormConfig {
426
440
  controlStopDraggingGroup(evt) {
427
441
  if (evt.data.newIndex !== evt.data.oldIndex) {
428
442
  setTimeout(() => {
429
- this.updateFieldsToSave();
443
+ this.updateFieldsToSave(this._sortableTimer);
430
444
  }, this._renderTimer);
431
445
  }
432
446
  }
@@ -499,7 +513,7 @@ export class SnkFormConfig {
499
513
  });
500
514
  if (tabs.length > 0) {
501
515
  this._formConfig.tabs = tabs;
502
- this.loadFields();
516
+ this.loadFields(this._sortableTimer);
503
517
  this.controlFieldConfig();
504
518
  this._formConfigChanged = true;
505
519
  }
@@ -523,13 +537,13 @@ export class SnkFormConfig {
523
537
  if (config != undefined) {
524
538
  this._formConfig = config;
525
539
  this._tabSelected = 1;
526
- this.loadFields();
540
+ this.loadFields(this._sortableTimer);
527
541
  this.controlFieldConfig();
528
542
  this.clearTempGroups();
529
543
  }
530
544
  }
531
- loadConfig() {
532
- this.loadFormConfig();
545
+ loadConfig(updateTimer = 0) {
546
+ this.loadFormConfig(updateTimer);
533
547
  this.loadUserConfig();
534
548
  }
535
549
  addNewGroup() {
@@ -570,7 +584,7 @@ export class SnkFormConfig {
570
584
  });
571
585
  }
572
586
  else {
573
- this.updateFieldsToSave();
587
+ this.updateFieldsToSave(this._sortableTimer);
574
588
  }
575
589
  }
576
590
  checkGroupExists(newLabel, indexGroup, isTempGroup = false) {
@@ -616,7 +630,7 @@ export class SnkFormConfig {
616
630
  field.group = newLabel;
617
631
  }
618
632
  });
619
- this.loadFields();
633
+ this.loadFields(this._sortableTimer);
620
634
  this.controlFieldConfig();
621
635
  this._formConfigChanged = true;
622
636
  }
@@ -830,14 +844,14 @@ export class SnkFormConfig {
830
844
  this._formConfigChanged = true;
831
845
  this.resetSortables();
832
846
  }
833
- controlRemoveFieldConfig(fieldConfig) {
847
+ controlRemoveFieldConfig(fieldConfig, updateTimer) {
834
848
  var _a;
835
849
  this._formConfigChanged = false;
836
850
  if (fieldConfig == undefined) {
837
851
  return;
838
852
  }
839
853
  this._formConfig.fields = (_a = this._formConfig.fields) === null || _a === void 0 ? void 0 : _a.filter((field) => field.name !== fieldConfig.name);
840
- this.loadFields();
854
+ this.loadFields(updateTimer);
841
855
  this.controlFieldConfig();
842
856
  this._formConfigChanged = true;
843
857
  this.resetSortables();
@@ -846,14 +860,14 @@ export class SnkFormConfig {
846
860
  this.controlSortableField();
847
861
  this.controlSortableGroup();
848
862
  }
849
- handleFieldConfigChange(evt) {
863
+ handleFieldConfigChange(evt, updateTimer = 0) {
850
864
  const { field: fieldConfig, type: actionType } = evt.detail;
851
865
  if (actionType === ACTION_CONFIG.configuration) {
852
866
  this.controlFieldConfig(fieldConfig);
853
867
  return;
854
868
  }
855
869
  if (actionType === ACTION_CONFIG.remove) {
856
- this.controlRemoveFieldConfig(fieldConfig);
870
+ this.controlRemoveFieldConfig(fieldConfig, updateTimer);
857
871
  return;
858
872
  }
859
873
  if (actionType === ACTION_CONFIG.add) {
@@ -874,7 +888,7 @@ export class SnkFormConfig {
874
888
  tab.label = newLabel;
875
889
  }
876
890
  });
877
- this.loadFields();
891
+ this.loadFields(this._sortableTimer);
878
892
  this.controlFieldConfig();
879
893
  this._formConfigChanged = true;
880
894
  }
@@ -894,7 +908,7 @@ export class SnkFormConfig {
894
908
  this._formConfig.tabs = (_a = this._formConfig.tabs) === null || _a === void 0 ? void 0 : _a.filter((tab) => {
895
909
  return tab.label !== tabSelected.detail.label;
896
910
  });
897
- this.loadFields();
911
+ this.loadFields(this._sortableTimer);
898
912
  this.controlFieldConfig();
899
913
  this._formConfigChanged = true;
900
914
  }
@@ -907,7 +921,7 @@ export class SnkFormConfig {
907
921
  tab.visible = !tab.visible;
908
922
  }
909
923
  });
910
- this.loadFields();
924
+ this.loadFields(this._sortableTimer);
911
925
  this.controlFieldConfig();
912
926
  this._formConfigChanged = true;
913
927
  }
@@ -932,6 +946,12 @@ export class SnkFormConfig {
932
946
  this.controlSortableField();
933
947
  this.controlSortableGroup();
934
948
  }
949
+ async componentWillRender() {
950
+ if (this.messagesBuilder == undefined) {
951
+ const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
952
+ this.messagesBuilder = application.messagesBuilder;
953
+ }
954
+ }
935
955
  componentWillLoad() {
936
956
  this.loadConfig();
937
957
  }
@@ -1005,7 +1025,7 @@ export class SnkFormConfig {
1005
1025
  "references": {
1006
1026
  "SnkFormConfigManager": {
1007
1027
  "location": "import",
1008
- "path": "../../SnkFormConfigManager"
1028
+ "path": "./SnkFormConfigManager"
1009
1029
  }
1010
1030
  }
1011
1031
  },
@@ -1025,7 +1045,7 @@ export class SnkFormConfig {
1025
1045
  "references": {
1026
1046
  "SnkMessageBuilder": {
1027
1047
  "location": "import",
1028
- "path": "../../../../lib/message/SnkMessageBuilder"
1048
+ "path": "../../lib/message/SnkMessageBuilder"
1029
1049
  }
1030
1050
  }
1031
1051
  },