@sankhyalabs/sankhyablocks 8.15.0-dev.9 → 8.15.0-rc.1

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 (157) hide show
  1. package/dist/cjs/{ISave-d68ce3cd.js → ISave-e91b70a7.js} +1 -0
  2. package/dist/cjs/{SnkMessageBuilder-7293d0ad.js → SnkMessageBuilder-e7dcf408.js} +13 -0
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{dataunit-fetcher-353e4af2.js → pesquisa-fetcher-e4a7c4c3.js} +215 -26
  5. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  6. package/dist/cjs/snk-actions-button_2.cjs.entry.js +5 -4
  7. package/dist/cjs/snk-application.cjs.entry.js +12 -4
  8. package/dist/cjs/snk-attach.cjs.entry.js +388 -57
  9. package/dist/cjs/snk-crud.cjs.entry.js +2 -3
  10. package/dist/cjs/snk-data-exporter.cjs.entry.js +3 -3
  11. package/dist/cjs/{snk-data-unit-1bc69073.js → snk-data-unit-82c08a8c.js} +1 -1
  12. package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
  13. package/dist/cjs/snk-detail-view.cjs.entry.js +4 -5
  14. package/dist/cjs/snk-filter-bar.cjs.entry.js +8 -1
  15. package/dist/cjs/snk-filter-item.cjs.entry.js +4 -47
  16. package/dist/cjs/snk-filter-modal.cjs.entry.js +2 -1
  17. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +2 -1
  18. package/dist/cjs/{snk-guides-viewer-e60ccc5e.js → snk-guides-viewer-d32c096f.js} +2 -3
  19. package/dist/cjs/snk-guides-viewer.cjs.entry.js +3 -4
  20. package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
  21. package/dist/cjs/snk-simple-crud.cjs.entry.js +17 -6
  22. package/dist/collection/components/snk-application/snk-application.js +52 -9
  23. package/dist/collection/components/snk-attach/snk-attach.js +188 -39
  24. package/dist/collection/components/snk-attach/structure/{crud-config-builder.js → builder/anexo-sistema-crud-config.builder.js} +1 -1
  25. package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +62 -0
  26. package/dist/collection/components/snk-attach/structure/{taskbar-builder.js → builder/taskbar-builder.js} +1 -1
  27. package/dist/collection/components/snk-attach/structure/fetcher/facade/fetcher.facade.js +1 -0
  28. package/dist/collection/components/snk-attach/structure/{data-unit-builder.js → fetcher/factory/anexo-sistema-data-unit.factory.js} +14 -11
  29. package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +111 -0
  30. package/dist/collection/components/snk-attach/structure/index.js +6 -3
  31. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +1 -1
  32. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +2 -1
  33. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +4 -47
  34. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +19 -1
  35. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +22 -0
  36. package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +3 -1
  37. package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +2 -4
  38. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +53 -1
  39. package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +3 -1
  40. package/dist/collection/lib/dataUnit/InMemoryLoader.js +1 -1
  41. package/dist/collection/lib/http/data-fetcher/fetchers/{attach-fetcher.js → AttachFetcher/anexo-sistema-fetcher.js} +16 -15
  42. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.js +90 -0
  43. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.js +1 -0
  44. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/index.js +2 -0
  45. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDelete.js +1 -0
  46. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDownloadKey.js +1 -0
  47. package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.js +1 -0
  48. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +17 -3
  49. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +29 -22
  50. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +7 -1
  51. package/dist/collection/lib/index.js +1 -1
  52. package/dist/collection/lib/message/resources/snk-attach.msg.js +13 -0
  53. package/dist/components/SnkMessageBuilder.js +13 -0
  54. package/dist/components/dataunit-fetcher.js +54 -27
  55. package/dist/components/snk-actions-button2.js +1 -0
  56. package/dist/components/snk-application2.js +11 -1
  57. package/dist/components/snk-attach2.js +394 -57
  58. package/dist/components/snk-data-exporter2.js +1 -1
  59. package/dist/components/snk-filter-bar2.js +9 -1
  60. package/dist/components/snk-filter-item2.js +4 -47
  61. package/dist/components/snk-filter-modal.js +4 -2
  62. package/dist/components/snk-filter-multi-select.js +2 -1
  63. package/dist/components/snk-pesquisa2.js +1 -1
  64. package/dist/components/snk-simple-crud2.js +15 -1
  65. package/dist/components/taskbar-actions-button2.js +3 -1
  66. package/dist/esm/{ISave-4412b20c.js → ISave-d8c8bc59.js} +1 -0
  67. package/dist/esm/{SnkMessageBuilder-ca843d1b.js → SnkMessageBuilder-0fb796b9.js} +13 -0
  68. package/dist/esm/loader.js +1 -1
  69. package/dist/esm/{dataunit-fetcher-0fc935a0.js → pesquisa-fetcher-fa0c2540.js} +215 -27
  70. package/dist/esm/sankhyablocks.js +1 -1
  71. package/dist/esm/snk-actions-button_2.entry.js +5 -4
  72. package/dist/esm/snk-application.entry.js +11 -3
  73. package/dist/esm/snk-attach.entry.js +389 -58
  74. package/dist/esm/snk-crud.entry.js +2 -3
  75. package/dist/esm/snk-data-exporter.entry.js +3 -3
  76. package/dist/esm/{snk-data-unit-6208ebf0.js → snk-data-unit-5d201fb3.js} +1 -1
  77. package/dist/esm/snk-data-unit.entry.js +2 -2
  78. package/dist/esm/snk-detail-view.entry.js +4 -5
  79. package/dist/esm/snk-filter-bar.entry.js +8 -1
  80. package/dist/esm/snk-filter-item.entry.js +4 -47
  81. package/dist/esm/snk-filter-modal.entry.js +2 -1
  82. package/dist/esm/snk-filter-multi-select.entry.js +2 -1
  83. package/dist/esm/{snk-guides-viewer-98a8e45e.js → snk-guides-viewer-f49613c6.js} +2 -3
  84. package/dist/esm/snk-guides-viewer.entry.js +3 -4
  85. package/dist/esm/snk-pesquisa.entry.js +1 -1
  86. package/dist/esm/snk-simple-crud.entry.js +15 -4
  87. package/dist/sankhyablocks/p-02e3a45b.entry.js +1 -0
  88. package/dist/sankhyablocks/{p-ff6064e7.js → p-05243555.js} +1 -1
  89. package/dist/sankhyablocks/p-0ec5b2e5.js +1 -0
  90. package/dist/sankhyablocks/{p-9e7d65a4.js → p-21749402.js} +1 -1
  91. package/dist/sankhyablocks/p-2582537c.entry.js +1 -0
  92. package/dist/sankhyablocks/p-282789a6.entry.js +1 -0
  93. package/dist/sankhyablocks/p-3b0e4e08.js +65 -0
  94. package/dist/sankhyablocks/{p-0874adb5.entry.js → p-40915359.entry.js} +1 -1
  95. package/dist/sankhyablocks/p-62896624.entry.js +1 -0
  96. package/dist/sankhyablocks/p-70a4af56.entry.js +1 -0
  97. package/dist/sankhyablocks/p-86801b08.entry.js +1 -0
  98. package/dist/sankhyablocks/p-9b5944a4.entry.js +1 -0
  99. package/dist/sankhyablocks/p-9bdbc7d8.entry.js +1 -0
  100. package/dist/sankhyablocks/p-ac384baf.entry.js +1 -0
  101. package/dist/sankhyablocks/p-bf2acf72.entry.js +1 -0
  102. package/dist/sankhyablocks/p-c4874327.entry.js +1 -0
  103. package/dist/sankhyablocks/{p-247a8b36.entry.js → p-d1791da2.entry.js} +1 -1
  104. package/dist/sankhyablocks/{p-90f9b4db.entry.js → p-e817f254.entry.js} +3 -3
  105. package/dist/sankhyablocks/{p-32f0935f.js → p-f3d1c48e.js} +1 -1
  106. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  107. package/dist/types/components/snk-actions-button/subcomponents/snk-actions-form.d.ts +1 -1
  108. package/dist/types/components/snk-application/snk-application.d.ts +7 -0
  109. package/dist/types/components/snk-attach/{structure/crud-config-builder.d.ts → interfaces/ICrudConfig.d.ts} +1 -2
  110. package/dist/types/components/snk-attach/interfaces/TFetcherType.d.ts +1 -0
  111. package/dist/types/components/snk-attach/snk-attach.d.ts +27 -6
  112. package/dist/types/components/snk-attach/structure/builder/anexo-sistema-crud-config.builder.d.ts +2 -0
  113. package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +31 -0
  114. package/dist/types/components/snk-attach/structure/{taskbar-builder.d.ts → builder/taskbar-builder.d.ts} +1 -1
  115. package/dist/types/components/snk-attach/structure/fetcher/facade/fetcher.facade.d.ts +11 -0
  116. package/dist/types/components/snk-attach/structure/fetcher/factory/anexo-sistema-data-unit.factory.d.ts +17 -0
  117. package/dist/types/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.d.ts +15 -0
  118. package/dist/types/components/snk-attach/structure/index.d.ts +6 -3
  119. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +1 -2
  120. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +5 -0
  121. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +5 -0
  122. package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +3 -1
  123. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +10 -1
  124. package/dist/types/components.d.ts +74 -2
  125. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -1
  126. package/dist/types/lib/http/data-fetcher/fetchers/{attach-fetcher.d.ts → AttachFetcher/anexo-sistema-fetcher.d.ts} +3 -2
  127. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.d.ts +11 -0
  128. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.d.ts +8 -0
  129. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/index.d.ts +3 -0
  130. package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.d.ts +2 -1
  131. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.d.ts +1 -0
  132. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +1 -0
  133. package/dist/types/lib/index.d.ts +1 -1
  134. package/package.json +5 -5
  135. package/dist/cjs/pesquisa-fetcher-ef050a47.js +0 -167
  136. package/dist/esm/pesquisa-fetcher-dd3ca0a5.js +0 -165
  137. package/dist/sankhyablocks/p-20726710.entry.js +0 -1
  138. package/dist/sankhyablocks/p-41560fd8.entry.js +0 -1
  139. package/dist/sankhyablocks/p-4775a293.entry.js +0 -1
  140. package/dist/sankhyablocks/p-6678d5d4.entry.js +0 -1
  141. package/dist/sankhyablocks/p-71439fd9.entry.js +0 -1
  142. package/dist/sankhyablocks/p-7d8d7fe9.entry.js +0 -1
  143. package/dist/sankhyablocks/p-a91bb13d.js +0 -1
  144. package/dist/sankhyablocks/p-a9e5b094.entry.js +0 -1
  145. package/dist/sankhyablocks/p-abfa8101.entry.js +0 -1
  146. package/dist/sankhyablocks/p-b3020263.entry.js +0 -1
  147. package/dist/sankhyablocks/p-bf93a748.js +0 -60
  148. package/dist/sankhyablocks/p-c6f89389.entry.js +0 -1
  149. package/dist/sankhyablocks/p-cebae710.entry.js +0 -1
  150. package/dist/sankhyablocks/p-d9bb09b3.js +0 -6
  151. package/dist/types/components/snk-attach/structure/data-unit-builder.d.ts +0 -15
  152. /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.js → components/snk-attach/interfaces/ICrudConfig.js} +0 -0
  153. /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.js → components/snk-attach/interfaces/TFetcherType.js} +0 -0
  154. /package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.js +0 -0
  155. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDelete.d.ts +0 -0
  156. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDownloadKey.d.ts +0 -0
  157. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- import { DataType } from "@sankhyalabs/core";
1
+ import { ApplicationContext, DataType } from "@sankhyalabs/core";
2
2
  import { gql } from "graphql-request";
3
3
  import { DataFetcher } from "../DataFetcher";
4
4
  export class PesquisaFetcher {
@@ -67,6 +67,12 @@ export class PesquisaFetcher {
67
67
  externalCriteria.params = {
68
68
  param: values.criteria.params.map(param => {
69
69
  let value = param.value;
70
+ if (typeof value === "string") {
71
+ const match = /CTX\{([^}]+)\}/.exec(value);
72
+ if (match) {
73
+ value = ApplicationContext.getContextValue(`__SNK__APPLICATION__FILTER__CONTEXT(${match[1]})__`);
74
+ }
75
+ }
70
76
  let type = param.dataType;
71
77
  if (type === DataType.OBJECT) {
72
78
  value = value.value;
@@ -4,7 +4,7 @@ export { CrudUtils } from './utils/CrudUtils';
4
4
  export { PresentationMode } from "./@types";
5
5
  export { TotalsFetcher } from './http/data-fetcher/fetchers/totals-fetcher';
6
6
  export { default as ApplicationConfigFetcher } from './http/data-fetcher/fetchers/application-config-fetcher';
7
- export { AttachFetcher } from './http/data-fetcher/fetchers/attach-fetcher';
7
+ export { AttachFetcher, AnexoSistemaFetcher } from './http/data-fetcher/fetchers/AttachFetcher';
8
8
  export { default as DataUnitFetcher } from './http/data-fetcher/fetchers/data-unit/dataunit-fetcher';
9
9
  export { default as FilterBarConfigFetcher } from './http/data-fetcher/fetchers/filter-bar-config-fetcher';
10
10
  export { FormConfigFetcher } from './http/data-fetcher/fetchers/form-config-fetcher';
@@ -17,11 +17,24 @@ export const snkAttachMessages = {
17
17
  anyLinkOrFileFilled: {
18
18
  title: "Atenção",
19
19
  message: `É necessário preencher o campo "Link" ou anexar um arquivo.`
20
+ },
21
+ descriptionCannotBeChanged: {
22
+ title: "Atenção",
23
+ message: "O campo 'Descrição' não pode ser alterado."
20
24
  }
21
25
  },
22
26
  taskbar: {
23
27
  titleDownload: "Fazer download",
24
28
  titleLink: "Abrir link",
29
+ },
30
+ attachMetadata: {
31
+ lblCode: "Código",
32
+ lblDescription: "Descrição",
33
+ lblFileOrLink: "Arquivo / Link",
34
+ lblUser: "Usuário",
35
+ lblDate: "Data de alteração",
36
+ lblFile: "Arquivo",
37
+ lblSubTitle: "Clique para selecionar um arquivo",
25
38
  }
26
39
  };
27
40
  export default snkAttachMessages;
@@ -351,11 +351,24 @@ const snkAttachMessages = {
351
351
  anyLinkOrFileFilled: {
352
352
  title: "Atenção",
353
353
  message: `É necessário preencher o campo "Link" ou anexar um arquivo.`
354
+ },
355
+ descriptionCannotBeChanged: {
356
+ title: "Atenção",
357
+ message: "O campo 'Descrição' não pode ser alterado."
354
358
  }
355
359
  },
356
360
  taskbar: {
357
361
  titleDownload: "Fazer download",
358
362
  titleLink: "Abrir link",
363
+ },
364
+ attachMetadata: {
365
+ lblCode: "Código",
366
+ lblDescription: "Descrição",
367
+ lblFileOrLink: "Arquivo / Link",
368
+ lblUser: "Usuário",
369
+ lblDate: "Data de alteração",
370
+ lblFile: "Arquivo",
371
+ lblSubTitle: "Clique para selecionar um arquivo",
359
372
  }
360
373
  };
361
374
 
@@ -1,4 +1,4 @@
1
- import { DataType, FieldComparator, SortMode, DataUnit, DateUtils, StringUtils, ChangeOperation, ApplicationContext, UserInterface, DataUnitStorage } from '@sankhyalabs/core';
1
+ import { DataType, ApplicationContext, FieldComparator, SortMode, DataUnit, DateUtils, StringUtils, ChangeOperation, UserInterface, DataUnitStorage } from '@sankhyalabs/core';
2
2
  import { d as dist, D as DataFetcher } from './DataFetcher.js';
3
3
  import { DISTINCT_FILTER_NAME_PREFIX } from '@sankhyalabs/ezui/dist/collection/utils/constants';
4
4
  import { DataUnitTransient } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
@@ -71,6 +71,12 @@ class PesquisaFetcher {
71
71
  externalCriteria.params = {
72
72
  param: values.criteria.params.map(param => {
73
73
  let value = param.value;
74
+ if (typeof value === "string") {
75
+ const match = /CTX\{([^}]+)\}/.exec(value);
76
+ if (match) {
77
+ value = ApplicationContext.getContextValue(`__SNK__APPLICATION__FILTER__CONTEXT(${match[1]})__`);
78
+ }
79
+ }
74
80
  let type = param.dataType;
75
81
  if (type === DataType.OBJECT) {
76
82
  value = value.value;
@@ -396,7 +402,7 @@ class InMemoryLoader {
396
402
  this.dataUnit.loadMetadata().then(() => this.dataUnit.loadData());
397
403
  }
398
404
  getRecordsToLoad() {
399
- if (this._initialRecords == undefined && this.dataUnit.records.length > 0) {
405
+ if (this._initialRecords == undefined || this.dataUnit.records.length > 0) {
400
406
  this._initialRecords = this.dataUnit.records;
401
407
  }
402
408
  return this._initialRecords;
@@ -531,30 +537,39 @@ class DatasetStrategy {
531
537
  canSlice() {
532
538
  return false;
533
539
  }
540
+ processSortingSide(request, dataUnit, serverSideFilters) {
541
+ const localSorting = [];
542
+ const serverSorting = [];
543
+ if (request.sort != undefined) {
544
+ if (serverSideFilters.length === 0) {
545
+ return { localSorting: request.sort, serverSorting: [] };
546
+ }
547
+ for (const sort of request.sort) {
548
+ const descriptor = dataUnit.getField(sort.field);
549
+ const local = descriptor != undefined
550
+ && descriptor.properties != undefined
551
+ && descriptor.properties.calculated === "true";
552
+ if (local) {
553
+ localSorting.push(sort);
554
+ }
555
+ else {
556
+ serverSorting.push(sort);
557
+ }
558
+ }
559
+ }
560
+ return { localSorting, serverSorting };
561
+ }
534
562
  async load(dataUnit, request, loadingInfo) {
563
+ var _a, _b;
535
564
  if (dataUnit.metadata == undefined) {
536
565
  return Promise.resolve({ records: [], loadingInfo });
537
566
  }
538
567
  try {
539
- const localSorting = [];
540
- const serverSorting = [];
541
- if (request.sort != undefined) {
542
- for (const sort of request.sort) {
543
- const descriptor = dataUnit.getField(sort.field);
544
- const local = descriptor != undefined
545
- && descriptor.properties != undefined
546
- && descriptor.properties.calculated === "true";
547
- if (local) {
548
- localSorting.push(sort);
549
- }
550
- else {
551
- serverSorting.push(sort);
552
- }
553
- }
554
- }
568
+ const serverSideFilters = (_b = (_a = request.filters) === null || _a === void 0 ? void 0 : _a.filter(filter => !filter.name.startsWith("FILTRO_COLUNA_"))) !== null && _b !== void 0 ? _b : [];
569
+ const { localSorting, serverSorting } = this.processSortingSide(request, dataUnit, serverSideFilters);
555
570
  const fields = this.getFieldsList(dataUnit);
556
571
  const serviceName = "DatasetSP.loadRecords";
557
- const requestBody = this.buildRequestBody(serviceName, fields, dataUnit, request, loadingInfo, serverSorting);
572
+ const requestBody = this.buildRequestBody(serviceName, fields, dataUnit, request, loadingInfo, serverSorting, serverSideFilters);
558
573
  const params = loadingInfo.quiet ? { urlParams: { quietMode: "true" } } : undefined;
559
574
  const { result: responseRecords, pagerID: pagerId } = await DataFetcher.get().callServiceBroker(serviceName, requestBody, params);
560
575
  const records = this.processRecords(dataUnit, fields, responseRecords);
@@ -598,7 +613,7 @@ class DatasetStrategy {
598
613
  }
599
614
  return [descriptor.name, descriptionField];
600
615
  }
601
- buildRequestBody(serviceName, fields, dataUnit, request, loadingInfo, sorting) {
616
+ buildRequestBody(serviceName, fields, dataUnit, request, loadingInfo, sorting, serverSideFilters) {
602
617
  const dataSetID = dataUnit.dataUnitId;
603
618
  const dataUnitName = dataUnit.name;
604
619
  const entityName = DataUnitFetcher.parseDataUnitName(dataUnitName).entityName;
@@ -617,7 +632,7 @@ class DatasetStrategy {
617
632
  tryJoinedFields: true,
618
633
  parallelLoader: useParallelLoader,
619
634
  crudListener: `br.com.sankhya.bff.${this.getModuleName()}.BFFDataUnitDatasetAdapter`,
620
- txProperties: this.getTxProperties(dataUnit, request, sorting),
635
+ txProperties: this.getTxProperties(dataUnit, request, sorting, serverSideFilters),
621
636
  useDefaultRowsLimit: false
622
637
  }
623
638
  };
@@ -628,12 +643,10 @@ class DatasetStrategy {
628
643
  const moduleName = app.getModuleName();
629
644
  return moduleName.replace("-bff", "");
630
645
  }
631
- getTxProperties(dataUnit, request, sorting) {
632
- var _a, _b;
646
+ getTxProperties(dataUnit, request, sorting, serverSideFilters) {
633
647
  const txProperties = {
634
648
  "__DATA_UNIT_ADAPTER__[dataUnitName]": dataUnit.name
635
649
  };
636
- const serverSideFilters = (_b = (_a = request.filters) === null || _a === void 0 ? void 0 : _a.filter(filter => !filter.name.startsWith("FILTRO_COLUNA_"))) !== null && _b !== void 0 ? _b : [];
637
650
  if (serverSideFilters.length !== 0) {
638
651
  txProperties["__DATA_UNIT_ADAPTER__[criteria]"] = JSON.stringify(serverSideFilters);
639
652
  }
@@ -992,15 +1005,29 @@ class DataUnitFetcher {
992
1005
  });
993
1006
  return updatingFields;
994
1007
  }
1008
+ getUpdatingFields(dataUnit, originalUpdatingFields) {
1009
+ if (originalUpdatingFields == undefined) {
1010
+ return;
1011
+ }
1012
+ const updatingFields = Object.assign({}, originalUpdatingFields);
1013
+ Object.keys(updatingFields).forEach(key => {
1014
+ const descriptor = dataUnit.getField(key);
1015
+ if (descriptor != undefined && descriptor.standAlone) {
1016
+ delete updatingFields[key];
1017
+ }
1018
+ });
1019
+ return this.addTransientProperties(dataUnit, updatingFields);
1020
+ }
995
1021
  saveData(dataUnit, duChanges) {
996
1022
  const updatedRecordsIds = [];
997
1023
  const addedRecordsIds = [];
998
1024
  const changes = duChanges.map((change) => {
999
- const { dataUnit: changeDU, record, updatingFields, operation } = change;
1025
+ const { dataUnit: changeDU, record, operation } = change;
1000
1026
  const dataUnitInstance = DataUnitStorage.get(changeDU);
1027
+ const updatingFields = this.getUpdatingFields(dataUnitInstance, change.updatingFields);
1001
1028
  let parsedUpdatingFields;
1002
- if (updatingFields) {
1003
- parsedUpdatingFields = Object.entries(this.addTransientProperties(dataUnit, updatingFields)).map(([fieldName, value]) => {
1029
+ if (updatingFields != undefined) {
1030
+ parsedUpdatingFields = Object.entries(updatingFields).map(([fieldName, value]) => {
1004
1031
  const descriptor = dataUnitInstance.getField(fieldName);
1005
1032
  const dataType = descriptor ? descriptor.dataType : DataType.TEXT;
1006
1033
  return { fieldName, dataType, value: dataUnitInstance.valueToString(fieldName, value) };
@@ -163,6 +163,7 @@ var SaveErrorsEnum;
163
163
  SaveErrorsEnum["LINK_AND_FILE_AT_THE_SAME_TIME"] = "LINK_AND_FILE_AT_THE_SAME_TIME";
164
164
  SaveErrorsEnum["ANY_LINK_OR_FILE_FILLED"] = "ANY_LINK_OR_FILE_FILLED";
165
165
  SaveErrorsEnum["UNKNOWN"] = "UNKNOWN";
166
+ SaveErrorsEnum["DESCRIPTION_CANNOT_BE_CHANGED"] = "DESCRIPTION_CANNOT_BE_CHANGED";
166
167
  })(SaveErrorsEnum || (SaveErrorsEnum = {}));
167
168
 
168
169
  const MASTER_ROW_PROPERTY = "__MASTER_ROW__";
@@ -993,6 +993,15 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
993
993
  this._waitingAppReady.push(() => resolve(this));
994
994
  });
995
995
  }
996
+ /**
997
+ * Atribui valor para parâmetros de contexto no componente de pesquisa.
998
+ *
999
+ * @param name - Nome do parâmetro
1000
+ * @param value - String conversível de acordo com o tipo do parâmetro
1001
+ */
1002
+ async setSearchFilterContext(name, value) {
1003
+ ApplicationContext.setContextValue(`__SNK__APPLICATION__FILTER__CONTEXT(${name})__`, value);
1004
+ }
996
1005
  clearContent(container) {
997
1006
  if (container) {
998
1007
  Array.from(container.children).forEach(child => {
@@ -1260,7 +1269,8 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1260
1269
  "getApplicationPath": [64],
1261
1270
  "executeSelectDistinct": [64],
1262
1271
  "getDataFetcher": [64],
1263
- "whenApplicationReady": [64]
1272
+ "whenApplicationReady": [64],
1273
+ "setSearchFilterContext": [64]
1264
1274
  }]);
1265
1275
  class RequestListenerLoadingBar {
1266
1276
  constructor() {