@sankhyalabs/sankhyablocks 8.15.0-dev.57 → 8.15.0-dev.59

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 (44) hide show
  1. package/dist/cjs/{IExporterProvider-8687eea9.js → IExporterProvider-757550f3.js} +1 -1
  2. package/dist/cjs/{pesquisa-fetcher-610c2d29.js → pesquisa-fetcher-a74e20f2.js} +2 -2
  3. package/dist/cjs/snk-actions-button_4.cjs.entry.js +1 -1
  4. package/dist/cjs/snk-application.cjs.entry.js +1 -1
  5. package/dist/cjs/snk-attach.cjs.entry.js +21 -12
  6. package/dist/cjs/snk-crud.cjs.entry.js +1 -1
  7. package/dist/cjs/snk-data-exporter.cjs.entry.js +1 -1
  8. package/dist/cjs/snk-detail-view.cjs.entry.js +2 -2
  9. package/dist/cjs/snk-grid.cjs.entry.js +2 -2
  10. package/dist/cjs/{snk-guides-viewer-caf80b05.js → snk-guides-viewer-5e00168b.js} +1 -1
  11. package/dist/cjs/snk-guides-viewer.cjs.entry.js +2 -2
  12. package/dist/cjs/snk-simple-crud.cjs.entry.js +2 -2
  13. package/dist/collection/components/snk-attach/snk-attach.js +20 -11
  14. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +2 -2
  15. package/dist/components/dataunit-fetcher.js +2 -2
  16. package/dist/components/snk-attach2.js +20 -11
  17. package/dist/esm/{IExporterProvider-0af5ebd3.js → IExporterProvider-5359f35e.js} +1 -1
  18. package/dist/esm/{pesquisa-fetcher-253715e4.js → pesquisa-fetcher-542d9eee.js} +2 -2
  19. package/dist/esm/snk-actions-button_4.entry.js +1 -1
  20. package/dist/esm/snk-application.entry.js +1 -1
  21. package/dist/esm/snk-attach.entry.js +21 -12
  22. package/dist/esm/snk-crud.entry.js +1 -1
  23. package/dist/esm/snk-data-exporter.entry.js +1 -1
  24. package/dist/esm/snk-detail-view.entry.js +2 -2
  25. package/dist/esm/snk-grid.entry.js +2 -2
  26. package/dist/esm/{snk-guides-viewer-2b12c750.js → snk-guides-viewer-9b397164.js} +1 -1
  27. package/dist/esm/snk-guides-viewer.entry.js +2 -2
  28. package/dist/esm/snk-simple-crud.entry.js +2 -2
  29. package/dist/sankhyablocks/{p-ad73e9d7.entry.js → p-24d330ea.entry.js} +1 -1
  30. package/dist/sankhyablocks/{p-ddd8200a.entry.js → p-33de2fb7.entry.js} +1 -1
  31. package/dist/sankhyablocks/p-3e12d4d0.js +1 -0
  32. package/dist/sankhyablocks/{p-9bd6fd87.js → p-91915d3d.js} +1 -1
  33. package/dist/sankhyablocks/{p-69bf12f9.js → p-9af9ad14.js} +1 -1
  34. package/dist/sankhyablocks/{p-a9a26fbb.entry.js → p-a6a90574.entry.js} +1 -1
  35. package/dist/sankhyablocks/{p-9bd809a5.entry.js → p-ac80324f.entry.js} +1 -1
  36. package/dist/sankhyablocks/{p-4d10e705.entry.js → p-bd5dcd44.entry.js} +1 -1
  37. package/dist/sankhyablocks/{p-6e27046b.entry.js → p-d03ddde8.entry.js} +1 -1
  38. package/dist/sankhyablocks/{p-79bae662.entry.js → p-d49ecdcc.entry.js} +1 -1
  39. package/dist/sankhyablocks/{p-24c3b4cc.entry.js → p-dc7f7da2.entry.js} +1 -1
  40. package/dist/sankhyablocks/{p-733423d2.entry.js → p-f8a1748a.entry.js} +1 -1
  41. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  42. package/dist/types/components/snk-attach/snk-attach.d.ts +1 -0
  43. package/package.json +1 -1
  44. package/dist/sankhyablocks/p-93b9da9b.js +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const formConfigFetcher = require('./form-config-fetcher-3c4daeb5.js');
4
- const pesquisaFetcher = require('./pesquisa-fetcher-610c2d29.js');
4
+ const pesquisaFetcher = require('./pesquisa-fetcher-a74e20f2.js');
5
5
  const core = require('@sankhyalabs/core');
6
6
  require('./index-0922807b.js');
7
7
  require('./ISave-e91b70a7.js');
@@ -1050,7 +1050,7 @@ class PesquisaFetcher {
1050
1050
  const values = {
1051
1051
  argument: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.argument) || argument,
1052
1052
  criteria: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.criteria) || criteria,
1053
- searchOptions: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.searchOptions) || searchOptions,
1053
+ searchOptions: Object.assign(Object.assign({}, searchOptions), listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.searchOptions),
1054
1054
  };
1055
1055
  const serviceName = "PesquisaSP.getSuggestion";
1056
1056
  const externalCriteria = {
@@ -1081,7 +1081,7 @@ class PesquisaFetcher {
1081
1081
  };
1082
1082
  }
1083
1083
  const options = searchOptions != undefined
1084
- ? Object.assign(Object.assign({}, searchOptions), { "pkFieldName": searchOptions.codeFieldName, "label": searchOptions.descriptionFieldName, "fieldName": searchOptions.codeFieldName, "useDescriptionOptions": false, "enableRowsCounter": true }) : undefined;
1084
+ ? Object.assign(Object.assign({}, values === null || values === void 0 ? void 0 : values.searchOptions), { "pkFieldName": searchOptions.codeFieldName, "label": searchOptions.descriptionFieldName, "fieldName": searchOptions.codeFieldName, "useDescriptionOptions": false, "enableRowsCounter": true }) : undefined;
1085
1085
  const reqBody = {
1086
1086
  "serviceName": serviceName,
1087
1087
  "requestBody": {
@@ -6,7 +6,7 @@ const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const formConfigFetcher = require('./form-config-fetcher-3c4daeb5.js');
8
8
  const ParamType = require('./ParamType-90b440a0.js');
9
- require('./pesquisa-fetcher-610c2d29.js');
9
+ require('./pesquisa-fetcher-a74e20f2.js');
10
10
  require('./index-0922807b.js');
11
11
  require('./ISave-e91b70a7.js');
12
12
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
@@ -8,7 +8,7 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
8
8
  const ConfigStorage = require('./ConfigStorage-7df9d3bb.js');
9
9
  const formConfigFetcher = require('./form-config-fetcher-3c4daeb5.js');
10
10
  const authFetcher = require('./auth-fetcher-e6112be7.js');
11
- const pesquisaFetcher = require('./pesquisa-fetcher-610c2d29.js');
11
+ const pesquisaFetcher = require('./pesquisa-fetcher-a74e20f2.js');
12
12
  const SnkMessageBuilder = require('./SnkMessageBuilder-66aa2557.js');
13
13
  require('./filter-item-type.enum-a7ffdaa6.js');
14
14
  require('./PrintUtils-bcaeb82f.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 formConfigFetcher = require('./form-config-fetcher-3c4daeb5.js');
8
- const pesquisaFetcher = require('./pesquisa-fetcher-610c2d29.js');
8
+ const pesquisaFetcher = require('./pesquisa-fetcher-a74e20f2.js');
9
9
  require('./index-0922807b.js');
10
10
  const ISave = require('./ISave-e91b70a7.js');
11
11
  require('./filter-item-type.enum-a7ffdaa6.js');
@@ -729,15 +729,13 @@ const SnkAttach = class {
729
729
  }
730
730
  }
731
731
  loadAnexoSistema() {
732
- var _a;
733
732
  this._currentDataUnit = this._currentDataUnit || new pesquisaFetcher.DataUnitFetcher().getDataUnit(RESOURCE_ID, DATA_UNIT_NAME);
734
- this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
735
733
  if (!this._currentDataUnit.metadata) {
736
734
  this._currentDataUnit
737
735
  .loadMetadata()
738
736
  .then(() => this.crudConfig = Object.assign({}, anexoSistemaCrudConfig));
739
737
  }
740
- this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
738
+ this.initDataUnitLoaders();
741
739
  this._currentDataUnit.addFilterProvider({
742
740
  getFilter: () => this._currentDataUnitBuilder.getFilters(this.registerKey)
743
741
  });
@@ -747,9 +745,9 @@ const SnkAttach = class {
747
745
  this._currentDataUnit.loadData().then(this.disableEditFieldsNotInForm.bind(this));
748
746
  }
749
747
  loadAttach() {
750
- var _a, _b, _c;
751
- this._currentFetcher = new AttachFetcher();
748
+ var _a, _b;
752
749
  this._currentDataUnit = new core.DataUnit(pesquisaFetcher.InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
750
+ this.initDataUnitLoaders();
753
751
  this._currentDataUnit.addInterceptor({
754
752
  interceptAction: (action) => {
755
753
  var _a;
@@ -760,19 +758,30 @@ const SnkAttach = class {
760
758
  return this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement);
761
759
  }
762
760
  });
763
- this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
764
- (_a = this._currentDataUnitBuilder) === null || _a === void 0 ? void 0 : _a.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
765
- this.returnToGridMode();
766
- await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
767
- });
768
761
  if (!this._currentDataUnit.metadata) {
769
- (_c = (_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadMetadata()) === null || _c === void 0 ? void 0 : _c.then(() => {
762
+ (_b = (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata()) === null || _b === void 0 ? void 0 : _b.then(() => {
770
763
  var _a, _b;
771
764
  this.crudConfig = Object.assign({}, attachCrudConfig);
772
765
  (_b = (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadData(undefined, undefined, true, this.registerKey)) === null || _b === void 0 ? void 0 : _b.then(this.disableEditFieldsNotInForm.bind(this));
773
766
  });
774
767
  }
775
768
  }
769
+ initDataUnitLoaders() {
770
+ var _a, _b, _c;
771
+ if (this.fetcherType === "AnexoSistema") {
772
+ this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
773
+ this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
774
+ (_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
775
+ }
776
+ if (this.fetcherType === "Attach") {
777
+ this._currentFetcher = new AttachFetcher();
778
+ this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
779
+ (_c = this._currentDataUnitBuilder) === null || _c === void 0 ? void 0 : _c.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
780
+ this.returnToGridMode();
781
+ await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
782
+ });
783
+ }
784
+ }
776
785
  disableEditFieldsNotInForm() {
777
786
  var _a;
778
787
  (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid.columns.forEach(column => {
@@ -6,7 +6,7 @@ const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const taskbarElements = require('./taskbar-elements-d9392685.js');
8
8
  require('./form-config-fetcher-3c4daeb5.js');
9
- require('./pesquisa-fetcher-610c2d29.js');
9
+ require('./pesquisa-fetcher-a74e20f2.js');
10
10
  const index$1 = require('./index-0922807b.js');
11
11
  require('./ISave-e91b70a7.js');
12
12
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
@@ -9,7 +9,7 @@ const index = require('./index-0922807b.js');
9
9
  const constants = require('./constants-35ddd366.js');
10
10
  const formConfigFetcher = require('./form-config-fetcher-3c4daeb5.js');
11
11
  const snkDataUnit = require('./snk-data-unit-abd2113f.js');
12
- require('./pesquisa-fetcher-610c2d29.js');
12
+ require('./pesquisa-fetcher-a74e20f2.js');
13
13
  require('./ISave-e91b70a7.js');
14
14
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
15
15
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
@@ -7,7 +7,7 @@ const core = require('@sankhyalabs/core');
7
7
  const SnkFormConfigManager = require('./SnkFormConfigManager-4259edbe.js');
8
8
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
9
9
  require('./form-config-fetcher-3c4daeb5.js');
10
- require('./pesquisa-fetcher-610c2d29.js');
10
+ require('./pesquisa-fetcher-a74e20f2.js');
11
11
  const index$1 = require('./index-0922807b.js');
12
12
  require('./ISave-e91b70a7.js');
13
13
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
@@ -15,7 +15,7 @@ require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
15
15
  require('./filter-item-type.enum-a7ffdaa6.js');
16
16
  const taskbarElements = require('./taskbar-elements-d9392685.js');
17
17
  const constants = require('./constants-35ddd366.js');
18
- const snkGuidesViewer = require('./snk-guides-viewer-caf80b05.js');
18
+ const snkGuidesViewer = require('./snk-guides-viewer-5e00168b.js');
19
19
  const SnkMessageBuilder = require('./SnkMessageBuilder-66aa2557.js');
20
20
  require('./ConfigStorage-7df9d3bb.js');
21
21
  require('./PrintUtils-bcaeb82f.js');
@@ -9,10 +9,10 @@ const ConfigStorage = require('./ConfigStorage-7df9d3bb.js');
9
9
  const index$1 = require('./index-0922807b.js');
10
10
  const fieldSearch = require('./field-search-f56aa7d6.js');
11
11
  const index$2 = require('./index-102ba62d.js');
12
- const IExporterProvider = require('./IExporterProvider-8687eea9.js');
12
+ const IExporterProvider = require('./IExporterProvider-757550f3.js');
13
13
  const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
14
14
  require('./form-config-fetcher-3c4daeb5.js');
15
- require('./pesquisa-fetcher-610c2d29.js');
15
+ require('./pesquisa-fetcher-a74e20f2.js');
16
16
  require('./ISave-e91b70a7.js');
17
17
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
18
18
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
@@ -8,7 +8,7 @@ const fieldSearch = require('./field-search-f56aa7d6.js');
8
8
  const taskbarElements = require('./taskbar-elements-d9392685.js');
9
9
  const constants = require('./constants-35ddd366.js');
10
10
  require('./form-config-fetcher-3c4daeb5.js');
11
- require('./pesquisa-fetcher-610c2d29.js');
11
+ require('./pesquisa-fetcher-a74e20f2.js');
12
12
  const index$1 = require('./index-0922807b.js');
13
13
  require('./ISave-e91b70a7.js');
14
14
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const snkGuidesViewer = require('./snk-guides-viewer-caf80b05.js');
5
+ const snkGuidesViewer = require('./snk-guides-viewer-5e00168b.js');
6
6
  require('./index-f9e81701.js');
7
7
  require('@sankhyalabs/core');
8
8
  require('./SnkFormConfigManager-4259edbe.js');
@@ -17,7 +17,7 @@ require('./taskbar-elements-d9392685.js');
17
17
  require('./index-0922807b.js');
18
18
  require('./index-102ba62d.js');
19
19
  require('./constants-35ddd366.js');
20
- require('./pesquisa-fetcher-610c2d29.js');
20
+ require('./pesquisa-fetcher-a74e20f2.js');
21
21
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
22
22
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
23
23
  require('@sankhyalabs/core/dist/utils/SortingUtils');
@@ -8,8 +8,8 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
8
8
  const constants = require('./constants-35ddd366.js');
9
9
  const taskbarElements = require('./taskbar-elements-d9392685.js');
10
10
  const formConfigFetcher = require('./form-config-fetcher-3c4daeb5.js');
11
- const pesquisaFetcher = require('./pesquisa-fetcher-610c2d29.js');
12
- const IExporterProvider = require('./IExporterProvider-8687eea9.js');
11
+ const pesquisaFetcher = require('./pesquisa-fetcher-a74e20f2.js');
12
+ const IExporterProvider = require('./IExporterProvider-757550f3.js');
13
13
  const index = require('./index-0922807b.js');
14
14
  require('./ISave-e91b70a7.js');
15
15
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
@@ -117,15 +117,13 @@ export class SnkAttach {
117
117
  }
118
118
  }
119
119
  loadAnexoSistema() {
120
- var _a;
121
120
  this._currentDataUnit = this._currentDataUnit || new DataUnitFetcher().getDataUnit(RESOURCE_ID, DATA_UNIT_NAME);
122
- this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
123
121
  if (!this._currentDataUnit.metadata) {
124
122
  this._currentDataUnit
125
123
  .loadMetadata()
126
124
  .then(() => this.crudConfig = Object.assign({}, anexoSistemaCrudConfig));
127
125
  }
128
- this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
126
+ this.initDataUnitLoaders();
129
127
  this._currentDataUnit.addFilterProvider({
130
128
  getFilter: () => this._currentDataUnitBuilder.getFilters(this.registerKey)
131
129
  });
@@ -135,9 +133,9 @@ export class SnkAttach {
135
133
  this._currentDataUnit.loadData().then(this.disableEditFieldsNotInForm.bind(this));
136
134
  }
137
135
  loadAttach() {
138
- var _a, _b, _c;
139
- this._currentFetcher = new AttachFetcher();
136
+ var _a, _b;
140
137
  this._currentDataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
138
+ this.initDataUnitLoaders();
141
139
  this._currentDataUnit.addInterceptor({
142
140
  interceptAction: (action) => {
143
141
  var _a;
@@ -148,19 +146,30 @@ export class SnkAttach {
148
146
  return this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement);
149
147
  }
150
148
  });
151
- this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
152
- (_a = this._currentDataUnitBuilder) === null || _a === void 0 ? void 0 : _a.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
153
- this.returnToGridMode();
154
- await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
155
- });
156
149
  if (!this._currentDataUnit.metadata) {
157
- (_c = (_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadMetadata()) === null || _c === void 0 ? void 0 : _c.then(() => {
150
+ (_b = (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata()) === null || _b === void 0 ? void 0 : _b.then(() => {
158
151
  var _a, _b;
159
152
  this.crudConfig = Object.assign({}, attachCrudConfig);
160
153
  (_b = (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadData(undefined, undefined, true, this.registerKey)) === null || _b === void 0 ? void 0 : _b.then(this.disableEditFieldsNotInForm.bind(this));
161
154
  });
162
155
  }
163
156
  }
157
+ initDataUnitLoaders() {
158
+ var _a, _b, _c;
159
+ if (this.fetcherType === "AnexoSistema") {
160
+ this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
161
+ this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
162
+ (_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
163
+ }
164
+ if (this.fetcherType === "Attach") {
165
+ this._currentFetcher = new AttachFetcher();
166
+ this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
167
+ (_c = this._currentDataUnitBuilder) === null || _c === void 0 ? void 0 : _c.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
168
+ this.returnToGridMode();
169
+ await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
170
+ });
171
+ }
172
+ }
164
173
  disableEditFieldsNotInForm() {
165
174
  var _a;
166
175
  (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid.columns.forEach(column => {
@@ -55,7 +55,7 @@ export class PesquisaFetcher {
55
55
  const values = {
56
56
  argument: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.argument) || argument,
57
57
  criteria: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.criteria) || criteria,
58
- searchOptions: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.searchOptions) || searchOptions,
58
+ searchOptions: Object.assign(Object.assign({}, searchOptions), listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.searchOptions),
59
59
  };
60
60
  const serviceName = "PesquisaSP.getSuggestion";
61
61
  const externalCriteria = {
@@ -86,7 +86,7 @@ export class PesquisaFetcher {
86
86
  };
87
87
  }
88
88
  const options = searchOptions != undefined
89
- ? Object.assign(Object.assign({}, searchOptions), { "pkFieldName": searchOptions.codeFieldName, "label": searchOptions.descriptionFieldName, "fieldName": searchOptions.codeFieldName, "useDescriptionOptions": false, "enableRowsCounter": true }) : undefined;
89
+ ? Object.assign(Object.assign({}, values === null || values === void 0 ? void 0 : values.searchOptions), { "pkFieldName": searchOptions.codeFieldName, "label": searchOptions.descriptionFieldName, "fieldName": searchOptions.codeFieldName, "useDescriptionOptions": false, "enableRowsCounter": true }) : undefined;
90
90
  const reqBody = {
91
91
  "serviceName": serviceName,
92
92
  "requestBody": {
@@ -60,7 +60,7 @@ class PesquisaFetcher {
60
60
  const values = {
61
61
  argument: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.argument) || argument,
62
62
  criteria: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.criteria) || criteria,
63
- searchOptions: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.searchOptions) || searchOptions,
63
+ searchOptions: Object.assign(Object.assign({}, searchOptions), listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.searchOptions),
64
64
  };
65
65
  const serviceName = "PesquisaSP.getSuggestion";
66
66
  const externalCriteria = {
@@ -91,7 +91,7 @@ class PesquisaFetcher {
91
91
  };
92
92
  }
93
93
  const options = searchOptions != undefined
94
- ? Object.assign(Object.assign({}, searchOptions), { "pkFieldName": searchOptions.codeFieldName, "label": searchOptions.descriptionFieldName, "fieldName": searchOptions.codeFieldName, "useDescriptionOptions": false, "enableRowsCounter": true }) : undefined;
94
+ ? Object.assign(Object.assign({}, values === null || values === void 0 ? void 0 : values.searchOptions), { "pkFieldName": searchOptions.codeFieldName, "label": searchOptions.descriptionFieldName, "fieldName": searchOptions.codeFieldName, "useDescriptionOptions": false, "enableRowsCounter": true }) : undefined;
95
95
  const reqBody = {
96
96
  "serviceName": serviceName,
97
97
  "requestBody": {
@@ -732,15 +732,13 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
732
732
  }
733
733
  }
734
734
  loadAnexoSistema() {
735
- var _a;
736
735
  this._currentDataUnit = this._currentDataUnit || new DataUnitFetcher().getDataUnit(RESOURCE_ID, DATA_UNIT_NAME);
737
- this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
738
736
  if (!this._currentDataUnit.metadata) {
739
737
  this._currentDataUnit
740
738
  .loadMetadata()
741
739
  .then(() => this.crudConfig = Object.assign({}, anexoSistemaCrudConfig));
742
740
  }
743
- this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
741
+ this.initDataUnitLoaders();
744
742
  this._currentDataUnit.addFilterProvider({
745
743
  getFilter: () => this._currentDataUnitBuilder.getFilters(this.registerKey)
746
744
  });
@@ -750,9 +748,9 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
750
748
  this._currentDataUnit.loadData().then(this.disableEditFieldsNotInForm.bind(this));
751
749
  }
752
750
  loadAttach() {
753
- var _a, _b, _c;
754
- this._currentFetcher = new AttachFetcher();
751
+ var _a, _b;
755
752
  this._currentDataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
753
+ this.initDataUnitLoaders();
756
754
  this._currentDataUnit.addInterceptor({
757
755
  interceptAction: (action) => {
758
756
  var _a;
@@ -763,19 +761,30 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
763
761
  return this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement);
764
762
  }
765
763
  });
766
- this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
767
- (_a = this._currentDataUnitBuilder) === null || _a === void 0 ? void 0 : _a.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
768
- this.returnToGridMode();
769
- await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
770
- });
771
764
  if (!this._currentDataUnit.metadata) {
772
- (_c = (_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadMetadata()) === null || _c === void 0 ? void 0 : _c.then(() => {
765
+ (_b = (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata()) === null || _b === void 0 ? void 0 : _b.then(() => {
773
766
  var _a, _b;
774
767
  this.crudConfig = Object.assign({}, attachCrudConfig);
775
768
  (_b = (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadData(undefined, undefined, true, this.registerKey)) === null || _b === void 0 ? void 0 : _b.then(this.disableEditFieldsNotInForm.bind(this));
776
769
  });
777
770
  }
778
771
  }
772
+ initDataUnitLoaders() {
773
+ var _a, _b, _c;
774
+ if (this.fetcherType === "AnexoSistema") {
775
+ this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
776
+ this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
777
+ (_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
778
+ }
779
+ if (this.fetcherType === "Attach") {
780
+ this._currentFetcher = new AttachFetcher();
781
+ this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
782
+ (_c = this._currentDataUnitBuilder) === null || _c === void 0 ? void 0 : _c.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
783
+ this.returnToGridMode();
784
+ await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
785
+ });
786
+ }
787
+ }
779
788
  disableEditFieldsNotInForm() {
780
789
  var _a;
781
790
  (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid.columns.forEach(column => {
@@ -1,5 +1,5 @@
1
1
  import { D as DataFetcher } from './form-config-fetcher-e3094014.js';
2
- import { a as PreloadManager } from './pesquisa-fetcher-253715e4.js';
2
+ import { a as PreloadManager } from './pesquisa-fetcher-542d9eee.js';
3
3
  import { SortMode, ApplicationContext, UserInterface, DateUtils, DataType } from '@sankhyalabs/core';
4
4
  import './index-0ece87a6.js';
5
5
  import './ISave-d8c8bc59.js';
@@ -1044,7 +1044,7 @@ class PesquisaFetcher {
1044
1044
  const values = {
1045
1045
  argument: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.argument) || argument,
1046
1046
  criteria: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.criteria) || criteria,
1047
- searchOptions: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.searchOptions) || searchOptions,
1047
+ searchOptions: Object.assign(Object.assign({}, searchOptions), listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.searchOptions),
1048
1048
  };
1049
1049
  const serviceName = "PesquisaSP.getSuggestion";
1050
1050
  const externalCriteria = {
@@ -1075,7 +1075,7 @@ class PesquisaFetcher {
1075
1075
  };
1076
1076
  }
1077
1077
  const options = searchOptions != undefined
1078
- ? Object.assign(Object.assign({}, searchOptions), { "pkFieldName": searchOptions.codeFieldName, "label": searchOptions.descriptionFieldName, "fieldName": searchOptions.codeFieldName, "useDescriptionOptions": false, "enableRowsCounter": true }) : undefined;
1078
+ ? Object.assign(Object.assign({}, values === null || values === void 0 ? void 0 : values.searchOptions), { "pkFieldName": searchOptions.codeFieldName, "label": searchOptions.descriptionFieldName, "fieldName": searchOptions.codeFieldName, "useDescriptionOptions": false, "enableRowsCounter": true }) : undefined;
1079
1079
  const reqBody = {
1080
1080
  "serviceName": serviceName,
1081
1081
  "requestBody": {
@@ -2,7 +2,7 @@ import { r as registerInstance, h, H as Host, g as getElement, c as createEvent
2
2
  import { ApplicationContext, StringUtils, ErrorException, WarningException, ObjectUtils, DateUtils, ArrayUtils, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { D as DataFetcher } from './form-config-fetcher-e3094014.js';
4
4
  import { P as ParamType } from './ParamType-d5152b06.js';
5
- import './pesquisa-fetcher-253715e4.js';
5
+ import './pesquisa-fetcher-542d9eee.js';
6
6
  import './index-0ece87a6.js';
7
7
  import './ISave-d8c8bc59.js';
8
8
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
@@ -4,7 +4,7 @@ import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
4
4
  import { C as ConfigStorage } from './ConfigStorage-928c3bf4.js';
5
5
  import { d as dist, D as DataFetcher, U as UrlUtils } from './form-config-fetcher-e3094014.js';
6
6
  import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher-e1cb288f.js';
7
- import { D as DataUnitFetcher, P as PesquisaFetcher } from './pesquisa-fetcher-253715e4.js';
7
+ import { D as DataUnitFetcher, P as PesquisaFetcher } from './pesquisa-fetcher-542d9eee.js';
8
8
  import { S as SnkMessageBuilder } from './SnkMessageBuilder-0a4becdd.js';
9
9
  import './filter-item-type.enum-d45e026f.js';
10
10
  import './PrintUtils-3e4ff0f5.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-a7d3d3f1.js';
2
2
  import { ApplicationContext, DataType, Action, UserInterface, StringUtils, DataUnit } from '@sankhyalabs/core';
3
3
  import { D as DataFetcher } from './form-config-fetcher-e3094014.js';
4
- import { a as PreloadManager, b as applyFilter, c as applySorting, d as buildPaginationInfo, D as DataUnitFetcher, I as InMemoryLoader } from './pesquisa-fetcher-253715e4.js';
4
+ import { a as PreloadManager, b as applyFilter, c as applySorting, d as buildPaginationInfo, D as DataUnitFetcher, I as InMemoryLoader } from './pesquisa-fetcher-542d9eee.js';
5
5
  import './index-0ece87a6.js';
6
6
  import { S as SaveErrorsEnum } from './ISave-d8c8bc59.js';
7
7
  import './filter-item-type.enum-d45e026f.js';
@@ -725,15 +725,13 @@ const SnkAttach = class {
725
725
  }
726
726
  }
727
727
  loadAnexoSistema() {
728
- var _a;
729
728
  this._currentDataUnit = this._currentDataUnit || new DataUnitFetcher().getDataUnit(RESOURCE_ID, DATA_UNIT_NAME);
730
- this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
731
729
  if (!this._currentDataUnit.metadata) {
732
730
  this._currentDataUnit
733
731
  .loadMetadata()
734
732
  .then(() => this.crudConfig = Object.assign({}, anexoSistemaCrudConfig));
735
733
  }
736
- this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
734
+ this.initDataUnitLoaders();
737
735
  this._currentDataUnit.addFilterProvider({
738
736
  getFilter: () => this._currentDataUnitBuilder.getFilters(this.registerKey)
739
737
  });
@@ -743,9 +741,9 @@ const SnkAttach = class {
743
741
  this._currentDataUnit.loadData().then(this.disableEditFieldsNotInForm.bind(this));
744
742
  }
745
743
  loadAttach() {
746
- var _a, _b, _c;
747
- this._currentFetcher = new AttachFetcher();
744
+ var _a, _b;
748
745
  this._currentDataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
746
+ this.initDataUnitLoaders();
749
747
  this._currentDataUnit.addInterceptor({
750
748
  interceptAction: (action) => {
751
749
  var _a;
@@ -756,19 +754,30 @@ const SnkAttach = class {
756
754
  return this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement);
757
755
  }
758
756
  });
759
- this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
760
- (_a = this._currentDataUnitBuilder) === null || _a === void 0 ? void 0 : _a.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
761
- this.returnToGridMode();
762
- await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
763
- });
764
757
  if (!this._currentDataUnit.metadata) {
765
- (_c = (_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadMetadata()) === null || _c === void 0 ? void 0 : _c.then(() => {
758
+ (_b = (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata()) === null || _b === void 0 ? void 0 : _b.then(() => {
766
759
  var _a, _b;
767
760
  this.crudConfig = Object.assign({}, attachCrudConfig);
768
761
  (_b = (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadData(undefined, undefined, true, this.registerKey)) === null || _b === void 0 ? void 0 : _b.then(this.disableEditFieldsNotInForm.bind(this));
769
762
  });
770
763
  }
771
764
  }
765
+ initDataUnitLoaders() {
766
+ var _a, _b, _c;
767
+ if (this.fetcherType === "AnexoSistema") {
768
+ this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
769
+ this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
770
+ (_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
771
+ }
772
+ if (this.fetcherType === "Attach") {
773
+ this._currentFetcher = new AttachFetcher();
774
+ this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
775
+ (_c = this._currentDataUnitBuilder) === null || _c === void 0 ? void 0 : _c.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
776
+ this.returnToGridMode();
777
+ await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
778
+ });
779
+ }
780
+ }
772
781
  disableEditFieldsNotInForm() {
773
782
  var _a;
774
783
  (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid.columns.forEach(column => {
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement
2
2
  import { StringUtils, ElementIDUtils, ApplicationContext, JSUtils, FloatingManager } from '@sankhyalabs/core';
3
3
  import { T as TaskbarElement } from './taskbar-elements-ad766858.js';
4
4
  import './form-config-fetcher-e3094014.js';
5
- import './pesquisa-fetcher-253715e4.js';
5
+ import './pesquisa-fetcher-542d9eee.js';
6
6
  import { P as PresentationMode } from './index-0ece87a6.js';
7
7
  import './ISave-d8c8bc59.js';
8
8
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
@@ -5,7 +5,7 @@ import { D as DataExporterOption, a as DataExporterFormat, b as DataExporterType
5
5
  import { R as REPORT_LAUNCHER_RESOURCE_ID } from './constants-8457af36.js';
6
6
  import { D as DataFetcher } from './form-config-fetcher-e3094014.js';
7
7
  import { S as SnkDataUnit } from './snk-data-unit-29eba11a.js';
8
- import './pesquisa-fetcher-253715e4.js';
8
+ import './pesquisa-fetcher-542d9eee.js';
9
9
  import './ISave-d8c8bc59.js';
10
10
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
11
11
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
@@ -3,7 +3,7 @@ import { Action } from '@sankhyalabs/core';
3
3
  import { S as SnkFormConfigManager } from './SnkFormConfigManager-a87ade7a.js';
4
4
  import { FormMetadata, buildFormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
5
5
  import './form-config-fetcher-e3094014.js';
6
- import './pesquisa-fetcher-253715e4.js';
6
+ import './pesquisa-fetcher-542d9eee.js';
7
7
  import { P as PresentationMode } from './index-0ece87a6.js';
8
8
  import './ISave-d8c8bc59.js';
9
9
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
@@ -11,7 +11,7 @@ import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
11
11
  import './filter-item-type.enum-d45e026f.js';
12
12
  import { T as TaskbarElement } from './taskbar-elements-ad766858.js';
13
13
  import { d as VIEW_MODE } from './constants-8457af36.js';
14
- import { S as SnkGuidesViewer } from './snk-guides-viewer-2b12c750.js';
14
+ import { S as SnkGuidesViewer } from './snk-guides-viewer-9b397164.js';
15
15
  import { S as SnkMessageBuilder } from './SnkMessageBuilder-0a4becdd.js';
16
16
  import './ConfigStorage-928c3bf4.js';
17
17
  import './PrintUtils-3e4ff0f5.js';
@@ -5,10 +5,10 @@ import { C as ConfigStorage } from './ConfigStorage-928c3bf4.js';
5
5
  import { P as PresentationMode } from './index-0ece87a6.js';
6
6
  import { T as TaskbarProcessor, o as openFieldSearch, b as buildFieldSearch } from './field-search-efbe307f.js';
7
7
  import { s as store } from './index-bdf75557.js';
8
- import { C as CommonsExporter, S as SnkMultiSelectionListDataSource, a as CrudUtils } from './IExporterProvider-0af5ebd3.js';
8
+ import { C as CommonsExporter, S as SnkMultiSelectionListDataSource, a as CrudUtils } from './IExporterProvider-5359f35e.js';
9
9
  import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
10
10
  import './form-config-fetcher-e3094014.js';
11
- import './pesquisa-fetcher-253715e4.js';
11
+ import './pesquisa-fetcher-542d9eee.js';
12
12
  import './ISave-d8c8bc59.js';
13
13
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
14
14
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
@@ -6,7 +6,7 @@ import { o as openFieldSearch, T as TaskbarProcessor, b as buildFieldSearch } fr
6
6
  import { T as TaskbarElement } from './taskbar-elements-ad766858.js';
7
7
  import { d as VIEW_MODE } from './constants-8457af36.js';
8
8
  import './form-config-fetcher-e3094014.js';
9
- import './pesquisa-fetcher-253715e4.js';
9
+ import './pesquisa-fetcher-542d9eee.js';
10
10
  import { P as PresentationMode } from './index-0ece87a6.js';
11
11
  import './ISave-d8c8bc59.js';
12
12
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
@@ -1,4 +1,4 @@
1
- export { S as snk_guides_viewer } from './snk-guides-viewer-2b12c750.js';
1
+ export { S as snk_guides_viewer } from './snk-guides-viewer-9b397164.js';
2
2
  import './index-a7d3d3f1.js';
3
3
  import '@sankhyalabs/core';
4
4
  import './SnkFormConfigManager-a87ade7a.js';
@@ -13,7 +13,7 @@ import './taskbar-elements-ad766858.js';
13
13
  import './index-0ece87a6.js';
14
14
  import './index-bdf75557.js';
15
15
  import './constants-8457af36.js';
16
- import './pesquisa-fetcher-253715e4.js';
16
+ import './pesquisa-fetcher-542d9eee.js';
17
17
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
18
18
  import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
19
19
  import '@sankhyalabs/core/dist/utils/SortingUtils';
@@ -4,8 +4,8 @@ import { CSSVarsUtils } from '@sankhyalabs/ezui/dist/collection/utils';
4
4
  import { d as VIEW_MODE, S as SIMPLE_CRUD_MODE } from './constants-8457af36.js';
5
5
  import { T as TaskbarElement } from './taskbar-elements-ad766858.js';
6
6
  import { F as FormConfigFetcher } from './form-config-fetcher-e3094014.js';
7
- import { I as InMemoryLoader } from './pesquisa-fetcher-253715e4.js';
8
- import { C as CommonsExporter, S as SnkMultiSelectionListDataSource, a as CrudUtils } from './IExporterProvider-0af5ebd3.js';
7
+ import { I as InMemoryLoader } from './pesquisa-fetcher-542d9eee.js';
8
+ import { C as CommonsExporter, S as SnkMultiSelectionListDataSource, a as CrudUtils } from './IExporterProvider-5359f35e.js';
9
9
  import { D as DataExporterOption, P as PresentationMode } from './index-0ece87a6.js';
10
10
  import './ISave-d8c8bc59.js';
11
11
  import '@sankhyalabs/ezui/dist/collection/utils/constants';