@sankhyalabs/sankhyablocks 8.15.0-dev.83 → 8.15.0-dev.84

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 (53) hide show
  1. package/dist/cjs/{SnkFormConfigManager-52f99b4d.js → SnkFormConfigManager-1b13bacd.js} +6 -3
  2. package/dist/cjs/snk-data-exporter.cjs.entry.js +9 -3
  3. package/dist/cjs/snk-detail-view.cjs.entry.js +2 -2
  4. package/dist/cjs/snk-form.cjs.entry.js +2 -2
  5. package/dist/cjs/{snk-guides-viewer-9867335b.js → snk-guides-viewer-05a1ba27.js} +1 -1
  6. package/dist/cjs/snk-guides-viewer.cjs.entry.js +2 -2
  7. package/dist/cjs/snk-simple-crud.cjs.entry.js +1 -1
  8. package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +3 -2
  9. package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +3 -3
  10. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +1 -1
  11. package/dist/collection/components/snk-data-exporter/utils/ParserExport.js +7 -0
  12. package/dist/collection/components/snk-form/snk-form.js +1 -1
  13. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +6 -3
  14. package/dist/components/ISave.js +1 -1
  15. package/dist/components/SnkFormConfigManager.js +6 -3
  16. package/dist/components/snk-data-exporter2.js +10 -4
  17. package/dist/components/snk-form.js +1 -1
  18. package/dist/esm/{IExporterProvider-1deb5d0a.js → IExporterProvider-343272b3.js} +1 -1
  19. package/dist/esm/{SnkFormConfigManager-5b0d69cd.js → SnkFormConfigManager-d4554df9.js} +6 -3
  20. package/dist/esm/{index-88d0c8ad.js → index-3aa4977a.js} +1 -1
  21. package/dist/esm/snk-actions-button_4.entry.js +1 -1
  22. package/dist/esm/snk-attach.entry.js +2 -2
  23. package/dist/esm/snk-crud.entry.js +2 -2
  24. package/dist/esm/snk-data-exporter.entry.js +10 -4
  25. package/dist/esm/snk-detail-view.entry.js +4 -4
  26. package/dist/esm/snk-form.entry.js +2 -2
  27. package/dist/esm/snk-grid.entry.js +3 -3
  28. package/dist/esm/{snk-guides-viewer-7ae1b358.js → snk-guides-viewer-aee2cafe.js} +3 -3
  29. package/dist/esm/snk-guides-viewer.entry.js +4 -4
  30. package/dist/esm/snk-simple-crud.entry.js +4 -4
  31. package/dist/esm/snk-taskbar.entry.js +2 -2
  32. package/dist/esm/{taskbar-elements-da72aae0.js → taskbar-elements-d59867f1.js} +1 -1
  33. package/dist/sankhyablocks/{p-9cb8a77b.entry.js → p-0d91b10f.entry.js} +1 -1
  34. package/dist/sankhyablocks/{p-8323db5f.entry.js → p-26394a01.entry.js} +1 -1
  35. package/dist/sankhyablocks/{p-9bdd4e27.entry.js → p-2d649237.entry.js} +1 -1
  36. package/dist/sankhyablocks/{p-b9e318a8.js → p-30cf616e.js} +1 -1
  37. package/dist/sankhyablocks/p-4e27bead.entry.js +1 -0
  38. package/dist/sankhyablocks/{p-c5b18d02.entry.js → p-4f72727a.entry.js} +1 -1
  39. package/dist/sankhyablocks/{p-f9815cc4.entry.js → p-550fee49.entry.js} +1 -1
  40. package/dist/sankhyablocks/{p-ef402237.js → p-7e7a7473.js} +1 -1
  41. package/dist/sankhyablocks/p-829d4045.js +1 -0
  42. package/dist/sankhyablocks/{p-32097e8a.entry.js → p-8a5910a7.entry.js} +1 -1
  43. package/dist/sankhyablocks/{p-26e34ba3.entry.js → p-8cc64963.entry.js} +1 -1
  44. package/dist/sankhyablocks/p-8fc470e5.entry.js +1 -0
  45. package/dist/sankhyablocks/{p-a7717247.js → p-9e99a92a.js} +1 -1
  46. package/dist/sankhyablocks/{p-c65bbb31.js → p-be603a24.js} +1 -1
  47. package/dist/sankhyablocks/{p-a0edbed5.entry.js → p-f2809746.entry.js} +1 -1
  48. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  49. package/dist/types/components/snk-data-exporter/utils/ParserExport.d.ts +2 -0
  50. package/package.json +1 -1
  51. package/dist/sankhyablocks/p-060fdb6c.js +0 -1
  52. package/dist/sankhyablocks/p-32062be4.entry.js +0 -1
  53. package/dist/sankhyablocks/p-6071f6b4.entry.js +0 -1
@@ -74,11 +74,14 @@ class SnkFormConfigManager {
74
74
  var _a;
75
75
  const fields = (_a = this._config) === null || _a === void 0 ? void 0 : _a.fields;
76
76
  if (fields != undefined && fields.length > 0) {
77
- return fields.map(({ label, name, readOnly, visible }) => {
77
+ return fields.map(({ label, name, readOnly, visible, required }) => {
78
78
  if (label == undefined) {
79
- return dataUnit.getField(name);
79
+ return Object.assign(Object.assign({}, dataUnit.getField(name)), { name,
80
+ readOnly,
81
+ visible,
82
+ required });
80
83
  }
81
- return { name, label, readOnly, visible };
84
+ return { name, label, readOnly, visible, required };
82
85
  })
83
86
  .filter(field => this.isFieldVisible(field, descriptionFilter));
84
87
  }
@@ -266,6 +266,12 @@ function getVisibleColumns(columns) {
266
266
  }
267
267
  return visibleColumns;
268
268
  }
269
+ function getOptionKey(option) {
270
+ return Object.keys(index.DataExporterOption)
271
+ .find((key) => {
272
+ return index.DataExporterOption[key] === option;
273
+ });
274
+ }
269
275
 
270
276
  var __rest = (undefined && undefined.__rest) || function (s, e) {
271
277
  var t = {};
@@ -290,7 +296,7 @@ class ServerSideExporterStrategy {
290
296
  async getParams(resolveProps) {
291
297
  var _a, _b, _c, _d, _e, _f;
292
298
  const filters = (_b = (_a = this._provider).getFilters) === null || _b === void 0 ? void 0 : _b.call(_a);
293
- const columns = await this.getParsedColumns();
299
+ const columns = [index.DataExporterType.EXPORT_TO_PDF, index.DataExporterType.EXPORT_PAGE_TO_PDF, index.DataExporterType.EXPORT_PDF_TO_EMAIL, index.DataExporterType.EXPORT_ALL_RECORDS_TO_PDF].includes(getOptionKey(resolveProps === null || resolveProps === void 0 ? void 0 : resolveProps.exportOption)) ? await this.getParsedColumns() : await this._provider.getColumnsMetadata();
294
300
  const sort = (_d = (_c = this._provider).getOrders) === null || _d === void 0 ? void 0 : _d.call(_c);
295
301
  const resourceURI = (_f = (_e = this._provider).getResourceURI) === null || _f === void 0 ? void 0 : _f.call(_e);
296
302
  const selectedIDs = this._provider.getSelectedIDs();
@@ -349,7 +355,7 @@ class ClientSideExporterStrategy {
349
355
  async executeExport(resolveProps) {
350
356
  const { methodName, titleGrid } = resolveProps;
351
357
  const records = await this._provider.getRecords();
352
- const columns = await this.getParsedColumns();
358
+ const columns = [index.DataExporterType.EXPORT_TO_PDF, index.DataExporterType.EXPORT_PAGE_TO_PDF, index.DataExporterType.EXPORT_PDF_TO_EMAIL, index.DataExporterType.EXPORT_ALL_RECORDS_TO_PDF].includes(getOptionKey(resolveProps === null || resolveProps === void 0 ? void 0 : resolveProps.exportOption)) ? await this.getParsedColumns() : await this._provider.getColumnsMetadata();
353
359
  const [serviceName, processor] = this.getExecutor(methodName);
354
360
  const payload = {
355
361
  serviceName,
@@ -559,7 +565,7 @@ const SnkDataExporter = class {
559
565
  type: this.getExportType(option),
560
566
  };
561
567
  await this.resolveExporter(params, (response) => {
562
- if (response.canExport) {
568
+ if (response.canExport || fileType === index.DataExporterType.EXPORT_TO_PDF) {
563
569
  fileViewer(Object.assign(Object.assign({}, response), { fileType,
564
570
  isDownload }));
565
571
  }
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const SnkFormConfigManager = require('./SnkFormConfigManager-52f99b4d.js');
7
+ const SnkFormConfigManager = require('./SnkFormConfigManager-1b13bacd.js');
8
8
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
9
9
  require('./DataFetcher-313debd8.js');
10
10
  require('./pesquisa-fetcher-680e198f.js');
@@ -17,7 +17,7 @@ require('./filter-item-type.enum-a7ffdaa6.js');
17
17
  require('./form-config-fetcher-2dd00e5b.js');
18
18
  const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
19
19
  const constants = require('./constants-35ddd366.js');
20
- const snkGuidesViewer = require('./snk-guides-viewer-9867335b.js');
20
+ const snkGuidesViewer = require('./snk-guides-viewer-05a1ba27.js');
21
21
  const SnkMessageBuilder = require('./SnkMessageBuilder-722b104e.js');
22
22
  require('./ConfigStorage-942ce74b.js');
23
23
  require('./PrintUtils-bcaeb82f.js');
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const SnkFormConfigManager = require('./SnkFormConfigManager-52f99b4d.js');
7
+ const SnkFormConfigManager = require('./SnkFormConfigManager-1b13bacd.js');
8
8
  const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
9
9
  require('./ConfigStorage-942ce74b.js');
10
10
  require('./form-config-fetcher-2dd00e5b.js');
@@ -106,7 +106,7 @@ const SnkForm = class {
106
106
  }
107
107
  this._configManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this.resourceID);
108
108
  this.addFormLegacyConfig();
109
- this._configManager.loadConfig();
109
+ await this._configManager.loadConfig();
110
110
  }
111
111
  async handleDataStateChange(evt) {
112
112
  var _a;
@@ -2,7 +2,7 @@
2
2
 
3
3
  const index = require('./index-f9e81701.js');
4
4
  const core = require('@sankhyalabs/core');
5
- const SnkFormConfigManager = require('./SnkFormConfigManager-52f99b4d.js');
5
+ const SnkFormConfigManager = require('./SnkFormConfigManager-1b13bacd.js');
6
6
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
7
7
  const fieldSearch = require('./field-search-f56aa7d6.js');
8
8
  const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const snkGuidesViewer = require('./snk-guides-viewer-9867335b.js');
5
+ const snkGuidesViewer = require('./snk-guides-viewer-05a1ba27.js');
6
6
  require('./index-f9e81701.js');
7
7
  require('@sankhyalabs/core');
8
- require('./SnkFormConfigManager-52f99b4d.js');
8
+ require('./SnkFormConfigManager-1b13bacd.js');
9
9
  require('./ConfigStorage-942ce74b.js');
10
10
  require('./form-config-fetcher-2dd00e5b.js');
11
11
  require('./DataFetcher-313debd8.js');
@@ -19,7 +19,7 @@ require('./filter-item-type.enum-a7ffdaa6.js');
19
19
  const formConfigFetcher = require('./form-config-fetcher-2dd00e5b.js');
20
20
  const fieldSearch = require('./field-search-f56aa7d6.js');
21
21
  const ConfigStorage = require('./ConfigStorage-942ce74b.js');
22
- const SnkFormConfigManager = require('./SnkFormConfigManager-52f99b4d.js');
22
+ const SnkFormConfigManager = require('./SnkFormConfigManager-1b13bacd.js');
23
23
  const RecordIDUtils = require('./RecordIDUtils-3735135c.js');
24
24
  const index$2 = require('./index-102ba62d.js');
25
25
  require('./PrintUtils-bcaeb82f.js');
@@ -1,6 +1,7 @@
1
1
  import { UserInterface } from "@sankhyalabs/core";
2
2
  import { DataFetcher } from "../../../lib";
3
- import { getVisibleColumns } from "../utils/ParserExport";
3
+ import { getOptionKey, getVisibleColumns } from "../utils/ParserExport";
4
+ import { DataExporterType } from "../../../lib/@types";
4
5
  export default class ClientSideExporterStrategy {
5
6
  constructor(provider) {
6
7
  this._provider = provider;
@@ -13,7 +14,7 @@ export default class ClientSideExporterStrategy {
13
14
  async executeExport(resolveProps) {
14
15
  const { methodName, titleGrid } = resolveProps;
15
16
  const records = await this._provider.getRecords();
16
- const columns = await this.getParsedColumns();
17
+ const columns = [DataExporterType.EXPORT_TO_PDF, DataExporterType.EXPORT_PAGE_TO_PDF, DataExporterType.EXPORT_PDF_TO_EMAIL, DataExporterType.EXPORT_ALL_RECORDS_TO_PDF].includes(getOptionKey(resolveProps === null || resolveProps === void 0 ? void 0 : resolveProps.exportOption)) ? await this.getParsedColumns() : await this._provider.getColumnsMetadata();
17
18
  const [serviceName, processor] = this.getExecutor(methodName);
18
19
  const payload = {
19
20
  serviceName,
@@ -12,8 +12,8 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  };
13
13
  import { ApplicationContext, ObjectUtils } from "@sankhyalabs/core";
14
14
  import { DataFetcher } from '../../../lib/http/data-fetcher/DataFetcher';
15
- import { DataExporterOption } from "../../../lib/@types";
16
- import { getVisibleColumns } from "../utils/ParserExport";
15
+ import { DataExporterOption, DataExporterType } from "../../../lib/@types";
16
+ import { getOptionKey, getVisibleColumns } from "../utils/ParserExport";
17
17
  export default class ServerSideExporterStrategy {
18
18
  constructor(provider) {
19
19
  this._provider = provider;
@@ -26,7 +26,7 @@ export default class ServerSideExporterStrategy {
26
26
  async getParams(resolveProps) {
27
27
  var _a, _b, _c, _d, _e, _f;
28
28
  const filters = (_b = (_a = this._provider).getFilters) === null || _b === void 0 ? void 0 : _b.call(_a);
29
- const columns = await this.getParsedColumns();
29
+ const columns = [DataExporterType.EXPORT_TO_PDF, DataExporterType.EXPORT_PAGE_TO_PDF, DataExporterType.EXPORT_PDF_TO_EMAIL, DataExporterType.EXPORT_ALL_RECORDS_TO_PDF].includes(getOptionKey(resolveProps === null || resolveProps === void 0 ? void 0 : resolveProps.exportOption)) ? await this.getParsedColumns() : await this._provider.getColumnsMetadata();
30
30
  const sort = (_d = (_c = this._provider).getOrders) === null || _d === void 0 ? void 0 : _d.call(_c);
31
31
  const resourceURI = (_f = (_e = this._provider).getResourceURI) === null || _f === void 0 ? void 0 : _f.call(_e);
32
32
  const selectedIDs = this._provider.getSelectedIDs();
@@ -136,7 +136,7 @@ export class SnkDataExporter {
136
136
  type: this.getExportType(option),
137
137
  };
138
138
  await this.resolveExporter(params, (response) => {
139
- if (response.canExport) {
139
+ if (response.canExport || fileType === DataExporterType.EXPORT_TO_PDF) {
140
140
  fileViewer(Object.assign(Object.assign({}, response), { fileType,
141
141
  isDownload }));
142
142
  }
@@ -1,3 +1,4 @@
1
+ import { DataExporterOption } from "../../../lib/@types";
1
2
  const DOC_MAX_WIDTH = 800;
2
3
  export function getVisibleColumns(columns) {
3
4
  const visibleColumns = [];
@@ -11,3 +12,9 @@ export function getVisibleColumns(columns) {
11
12
  }
12
13
  return visibleColumns;
13
14
  }
15
+ export function getOptionKey(option) {
16
+ return Object.keys(DataExporterOption)
17
+ .find((key) => {
18
+ return DataExporterOption[key] === option;
19
+ });
20
+ }
@@ -89,7 +89,7 @@ export class SnkForm {
89
89
  }
90
90
  this._configManager = new SnkFormConfigManager(this.configName, this.resourceID);
91
91
  this.addFormLegacyConfig();
92
- this._configManager.loadConfig();
92
+ await this._configManager.loadConfig();
93
93
  }
94
94
  async handleDataStateChange(evt) {
95
95
  var _a;
@@ -71,11 +71,14 @@ export class SnkFormConfigManager {
71
71
  var _a;
72
72
  const fields = (_a = this._config) === null || _a === void 0 ? void 0 : _a.fields;
73
73
  if (fields != undefined && fields.length > 0) {
74
- return fields.map(({ label, name, readOnly, visible }) => {
74
+ return fields.map(({ label, name, readOnly, visible, required }) => {
75
75
  if (label == undefined) {
76
- return dataUnit.getField(name);
76
+ return Object.assign(Object.assign({}, dataUnit.getField(name)), { name,
77
+ readOnly,
78
+ visible,
79
+ required });
77
80
  }
78
- return { name, label, readOnly, visible };
81
+ return { name, label, readOnly, visible, required };
79
82
  })
80
83
  .filter(field => this.isFieldVisible(field, descriptionFilter));
81
84
  }
@@ -44,4 +44,4 @@ var SaveErrorsEnum;
44
44
  SaveErrorsEnum["DESCRIPTION_CANNOT_BE_CHANGED"] = "DESCRIPTION_CANNOT_BE_CHANGED";
45
45
  })(SaveErrorsEnum || (SaveErrorsEnum = {}));
46
46
 
47
- export { DataExporterOption as D, PresentationMode as P, SaveErrorsEnum as S, DataExporterFormat as a, DataExporterType as b };
47
+ export { DataExporterOption as D, PresentationMode as P, SaveErrorsEnum as S, DataExporterType as a, DataExporterFormat as b };
@@ -72,11 +72,14 @@ class SnkFormConfigManager {
72
72
  var _a;
73
73
  const fields = (_a = this._config) === null || _a === void 0 ? void 0 : _a.fields;
74
74
  if (fields != undefined && fields.length > 0) {
75
- return fields.map(({ label, name, readOnly, visible }) => {
75
+ return fields.map(({ label, name, readOnly, visible, required }) => {
76
76
  if (label == undefined) {
77
- return dataUnit.getField(name);
77
+ return Object.assign(Object.assign({}, dataUnit.getField(name)), { name,
78
+ readOnly,
79
+ visible,
80
+ required });
78
81
  }
79
- return { name, label, readOnly, visible };
82
+ return { name, label, readOnly, visible, required };
80
83
  })
81
84
  .filter(field => this.isFieldVisible(field, descriptionFilter));
82
85
  }
@@ -1,7 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { ApplicationContext, ObjectUtils, UserInterface, DataType, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
4
- import { D as DataExporterOption, a as DataExporterFormat, b as DataExporterType } from './ISave.js';
4
+ import { D as DataExporterOption, a as DataExporterType, b as DataExporterFormat } from './ISave.js';
5
5
  import { R as REPORT_LAUNCHER_RESOURCE_ID } from './constants.js';
6
6
  import { D as DataFetcher } from './DataFetcher.js';
7
7
  import { S as SnkDataUnit } from './snk-data-unit2.js';
@@ -256,6 +256,12 @@ function getVisibleColumns(columns) {
256
256
  }
257
257
  return visibleColumns;
258
258
  }
259
+ function getOptionKey(option) {
260
+ return Object.keys(DataExporterOption)
261
+ .find((key) => {
262
+ return DataExporterOption[key] === option;
263
+ });
264
+ }
259
265
 
260
266
  var __rest = (undefined && undefined.__rest) || function (s, e) {
261
267
  var t = {};
@@ -280,7 +286,7 @@ class ServerSideExporterStrategy {
280
286
  async getParams(resolveProps) {
281
287
  var _a, _b, _c, _d, _e, _f;
282
288
  const filters = (_b = (_a = this._provider).getFilters) === null || _b === void 0 ? void 0 : _b.call(_a);
283
- const columns = await this.getParsedColumns();
289
+ const columns = [DataExporterType.EXPORT_TO_PDF, DataExporterType.EXPORT_PAGE_TO_PDF, DataExporterType.EXPORT_PDF_TO_EMAIL, DataExporterType.EXPORT_ALL_RECORDS_TO_PDF].includes(getOptionKey(resolveProps === null || resolveProps === void 0 ? void 0 : resolveProps.exportOption)) ? await this.getParsedColumns() : await this._provider.getColumnsMetadata();
284
290
  const sort = (_d = (_c = this._provider).getOrders) === null || _d === void 0 ? void 0 : _d.call(_c);
285
291
  const resourceURI = (_f = (_e = this._provider).getResourceURI) === null || _f === void 0 ? void 0 : _f.call(_e);
286
292
  const selectedIDs = this._provider.getSelectedIDs();
@@ -339,7 +345,7 @@ class ClientSideExporterStrategy {
339
345
  async executeExport(resolveProps) {
340
346
  const { methodName, titleGrid } = resolveProps;
341
347
  const records = await this._provider.getRecords();
342
- const columns = await this.getParsedColumns();
348
+ const columns = [DataExporterType.EXPORT_TO_PDF, DataExporterType.EXPORT_PAGE_TO_PDF, DataExporterType.EXPORT_PDF_TO_EMAIL, DataExporterType.EXPORT_ALL_RECORDS_TO_PDF].includes(getOptionKey(resolveProps === null || resolveProps === void 0 ? void 0 : resolveProps.exportOption)) ? await this.getParsedColumns() : await this._provider.getColumnsMetadata();
343
349
  const [serviceName, processor] = this.getExecutor(methodName);
344
350
  const payload = {
345
351
  serviceName,
@@ -550,7 +556,7 @@ const SnkDataExporter = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
550
556
  type: this.getExportType(option),
551
557
  };
552
558
  await this.resolveExporter(params, (response) => {
553
- if (response.canExport) {
559
+ if (response.canExport || fileType === DataExporterType.EXPORT_TO_PDF) {
554
560
  fileViewer(Object.assign(Object.assign({}, response), { fileType,
555
561
  isDownload }));
556
562
  }
@@ -101,7 +101,7 @@ const SnkForm$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
101
101
  }
102
102
  this._configManager = new SnkFormConfigManager(this.configName, this.resourceID);
103
103
  this.addFormLegacyConfig();
104
- this._configManager.loadConfig();
104
+ await this._configManager.loadConfig();
105
105
  }
106
106
  async handleDataStateChange(evt) {
107
107
  var _a;
@@ -1,7 +1,7 @@
1
1
  import { D as DataFetcher } from './DataFetcher-c1baf61d.js';
2
2
  import './pesquisa-fetcher-03c8f919.js';
3
3
  import { SortMode, ApplicationContext, UserInterface, DateUtils, ObjectUtils, NumberUtils, DataType } from '@sankhyalabs/core';
4
- import './index-88d0c8ad.js';
4
+ import './index-3aa4977a.js';
5
5
  import './ISave-d8c8bc59.js';
6
6
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
7
7
  import { UserInterface as UserInterface$1 } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
@@ -72,11 +72,14 @@ class SnkFormConfigManager {
72
72
  var _a;
73
73
  const fields = (_a = this._config) === null || _a === void 0 ? void 0 : _a.fields;
74
74
  if (fields != undefined && fields.length > 0) {
75
- return fields.map(({ label, name, readOnly, visible }) => {
75
+ return fields.map(({ label, name, readOnly, visible, required }) => {
76
76
  if (label == undefined) {
77
- return dataUnit.getField(name);
77
+ return Object.assign(Object.assign({}, dataUnit.getField(name)), { name,
78
+ readOnly,
79
+ visible,
80
+ required });
78
81
  }
79
- return { name, label, readOnly, visible };
82
+ return { name, label, readOnly, visible, required };
80
83
  })
81
84
  .filter(field => this.isFieldVisible(field, descriptionFilter));
82
85
  }
@@ -36,4 +36,4 @@ var DataExporterType;
36
36
  DataExporterType["EXPORT_XLS_TO_EMAIL"] = "XLS";
37
37
  })(DataExporterType || (DataExporterType = {}));
38
38
 
39
- export { DataExporterOption as D, PresentationMode as P, DataExporterFormat as a, DataExporterType as b };
39
+ export { DataExporterOption as D, PresentationMode as P, DataExporterType as a, DataExporterFormat as b };
@@ -3,7 +3,7 @@ import { ApplicationContext, StringUtils, ErrorException, WarningException, Obje
3
3
  import { D as DataFetcher } from './DataFetcher-c1baf61d.js';
4
4
  import { P as ParamType } from './ParamType-d5152b06.js';
5
5
  import './pesquisa-fetcher-03c8f919.js';
6
- import './index-88d0c8ad.js';
6
+ import './index-3aa4977a.js';
7
7
  import './ISave-d8c8bc59.js';
8
8
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
9
9
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
@@ -2,14 +2,14 @@ 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 './DataFetcher-c1baf61d.js';
4
4
  import './pesquisa-fetcher-03c8f919.js';
5
- import './index-88d0c8ad.js';
5
+ import './index-3aa4977a.js';
6
6
  import { S as SaveErrorsEnum } from './ISave-d8c8bc59.js';
7
7
  import { P as PreloadManager, b as applyFilter, c as applySorting, d as buildPaginationInfo, D as DataUnitFetcher, I as InMemoryLoader } from './dataunit-fetcher-3fbf9d12.js';
8
8
  import './filter-item-type.enum-d45e026f.js';
9
9
  import './form-config-fetcher-30fb808f.js';
10
10
  import { d as VIEW_MODE } from './constants-8457af36.js';
11
11
  import { A as AutorizationType } from './auth-fetcher-039abba3.js';
12
- import { T as TaskbarElement } from './taskbar-elements-da72aae0.js';
12
+ import { T as TaskbarElement } from './taskbar-elements-d59867f1.js';
13
13
  import './PrintUtils-3e4ff0f5.js';
14
14
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
15
15
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
@@ -1,9 +1,9 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
2
2
  import { StringUtils, ElementIDUtils, ApplicationContext, JSUtils, FloatingManager } from '@sankhyalabs/core';
3
- import { T as TaskbarElement } from './taskbar-elements-da72aae0.js';
3
+ import { T as TaskbarElement } from './taskbar-elements-d59867f1.js';
4
4
  import './DataFetcher-c1baf61d.js';
5
5
  import './pesquisa-fetcher-03c8f919.js';
6
- import { P as PresentationMode } from './index-88d0c8ad.js';
6
+ import { P as PresentationMode } from './index-3aa4977a.js';
7
7
  import './ISave-d8c8bc59.js';
8
8
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
9
9
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
2
2
  import { ApplicationContext, ObjectUtils, UserInterface, DataType, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
4
- import { D as DataExporterOption, a as DataExporterFormat, b as DataExporterType } from './index-88d0c8ad.js';
4
+ import { D as DataExporterOption, a as DataExporterType, b as DataExporterFormat } from './index-3aa4977a.js';
5
5
  import { R as REPORT_LAUNCHER_RESOURCE_ID } from './constants-8457af36.js';
6
6
  import { D as DataFetcher } from './DataFetcher-c1baf61d.js';
7
7
  import { S as SnkDataUnit } from './snk-data-unit-56b5efc4.js';
@@ -262,6 +262,12 @@ function getVisibleColumns(columns) {
262
262
  }
263
263
  return visibleColumns;
264
264
  }
265
+ function getOptionKey(option) {
266
+ return Object.keys(DataExporterOption)
267
+ .find((key) => {
268
+ return DataExporterOption[key] === option;
269
+ });
270
+ }
265
271
 
266
272
  var __rest = (undefined && undefined.__rest) || function (s, e) {
267
273
  var t = {};
@@ -286,7 +292,7 @@ class ServerSideExporterStrategy {
286
292
  async getParams(resolveProps) {
287
293
  var _a, _b, _c, _d, _e, _f;
288
294
  const filters = (_b = (_a = this._provider).getFilters) === null || _b === void 0 ? void 0 : _b.call(_a);
289
- const columns = await this.getParsedColumns();
295
+ const columns = [DataExporterType.EXPORT_TO_PDF, DataExporterType.EXPORT_PAGE_TO_PDF, DataExporterType.EXPORT_PDF_TO_EMAIL, DataExporterType.EXPORT_ALL_RECORDS_TO_PDF].includes(getOptionKey(resolveProps === null || resolveProps === void 0 ? void 0 : resolveProps.exportOption)) ? await this.getParsedColumns() : await this._provider.getColumnsMetadata();
290
296
  const sort = (_d = (_c = this._provider).getOrders) === null || _d === void 0 ? void 0 : _d.call(_c);
291
297
  const resourceURI = (_f = (_e = this._provider).getResourceURI) === null || _f === void 0 ? void 0 : _f.call(_e);
292
298
  const selectedIDs = this._provider.getSelectedIDs();
@@ -345,7 +351,7 @@ class ClientSideExporterStrategy {
345
351
  async executeExport(resolveProps) {
346
352
  const { methodName, titleGrid } = resolveProps;
347
353
  const records = await this._provider.getRecords();
348
- const columns = await this.getParsedColumns();
354
+ const columns = [DataExporterType.EXPORT_TO_PDF, DataExporterType.EXPORT_PAGE_TO_PDF, DataExporterType.EXPORT_PDF_TO_EMAIL, DataExporterType.EXPORT_ALL_RECORDS_TO_PDF].includes(getOptionKey(resolveProps === null || resolveProps === void 0 ? void 0 : resolveProps.exportOption)) ? await this.getParsedColumns() : await this._provider.getColumnsMetadata();
349
355
  const [serviceName, processor] = this.getExecutor(methodName);
350
356
  const payload = {
351
357
  serviceName,
@@ -555,7 +561,7 @@ const SnkDataExporter = class {
555
561
  type: this.getExportType(option),
556
562
  };
557
563
  await this.resolveExporter(params, (response) => {
558
- if (response.canExport) {
564
+ if (response.canExport || fileType === DataExporterType.EXPORT_TO_PDF) {
559
565
  fileViewer(Object.assign(Object.assign({}, response), { fileType,
560
566
  isDownload }));
561
567
  }
@@ -1,19 +1,19 @@
1
1
  import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host } from './index-a7d3d3f1.js';
2
2
  import { Action } from '@sankhyalabs/core';
3
- import { S as SnkFormConfigManager } from './SnkFormConfigManager-5b0d69cd.js';
3
+ import { S as SnkFormConfigManager } from './SnkFormConfigManager-d4554df9.js';
4
4
  import { FormMetadata, buildFormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
5
5
  import './DataFetcher-c1baf61d.js';
6
6
  import './pesquisa-fetcher-03c8f919.js';
7
- import { P as PresentationMode } from './index-88d0c8ad.js';
7
+ import { P as PresentationMode } from './index-3aa4977a.js';
8
8
  import './ISave-d8c8bc59.js';
9
9
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
10
10
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
11
11
  import './dataunit-fetcher-3fbf9d12.js';
12
12
  import './filter-item-type.enum-d45e026f.js';
13
13
  import './form-config-fetcher-30fb808f.js';
14
- import { T as TaskbarElement } from './taskbar-elements-da72aae0.js';
14
+ import { T as TaskbarElement } from './taskbar-elements-d59867f1.js';
15
15
  import { d as VIEW_MODE } from './constants-8457af36.js';
16
- import { S as SnkGuidesViewer } from './snk-guides-viewer-7ae1b358.js';
16
+ import { S as SnkGuidesViewer } from './snk-guides-viewer-aee2cafe.js';
17
17
  import { S as SnkMessageBuilder } from './SnkMessageBuilder-89925609.js';
18
18
  import './ConfigStorage-86187da3.js';
19
19
  import './PrintUtils-3e4ff0f5.js';
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a7d3d3f1.js';
2
2
  import { ElementIDUtils } from '@sankhyalabs/core';
3
- import { S as SnkFormConfigManager } from './SnkFormConfigManager-5b0d69cd.js';
3
+ import { S as SnkFormConfigManager } from './SnkFormConfigManager-d4554df9.js';
4
4
  import { R as ResourceIDUtils } from './ResourceIDUtils-a114189a.js';
5
5
  import './ConfigStorage-86187da3.js';
6
6
  import './form-config-fetcher-30fb808f.js';
@@ -102,7 +102,7 @@ const SnkForm = class {
102
102
  }
103
103
  this._configManager = new SnkFormConfigManager(this.configName, this.resourceID);
104
104
  this.addFormLegacyConfig();
105
- this._configManager.loadConfig();
105
+ await this._configManager.loadConfig();
106
106
  }
107
107
  async handleDataStateChange(evt) {
108
108
  var _a;
@@ -1,11 +1,11 @@
1
1
  import { r as registerInstance, c as createEvent, h, F as Fragment, g as getElement } from './index-a7d3d3f1.js';
2
2
  import { Action, ElementIDUtils, ApplicationContext, StringUtils } from '@sankhyalabs/core';
3
- import { T as TaskbarElement } from './taskbar-elements-da72aae0.js';
3
+ import { T as TaskbarElement } from './taskbar-elements-d59867f1.js';
4
4
  import { C as ConfigStorage } from './ConfigStorage-86187da3.js';
5
- import { P as PresentationMode } from './index-88d0c8ad.js';
5
+ import { P as PresentationMode } from './index-3aa4977a.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, R as RmPrecisionCustomValueFormatter } from './IExporterProvider-1deb5d0a.js';
8
+ import { C as CommonsExporter, S as SnkMultiSelectionListDataSource, a as CrudUtils, R as RmPrecisionCustomValueFormatter } from './IExporterProvider-343272b3.js';
9
9
  import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
10
10
  import './DataFetcher-c1baf61d.js';
11
11
  import './pesquisa-fetcher-03c8f919.js';
@@ -1,13 +1,13 @@
1
1
  import { r as registerInstance, c as createEvent, h, F as Fragment } from './index-a7d3d3f1.js';
2
2
  import { Action, ElementIDUtils } from '@sankhyalabs/core';
3
- import { S as SnkFormConfigManager } from './SnkFormConfigManager-5b0d69cd.js';
3
+ import { S as SnkFormConfigManager } from './SnkFormConfigManager-d4554df9.js';
4
4
  import { buildFormMetadata, FormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
5
5
  import { o as openFieldSearch, T as TaskbarProcessor, b as buildFieldSearch } from './field-search-efbe307f.js';
6
- import { T as TaskbarElement } from './taskbar-elements-da72aae0.js';
6
+ import { T as TaskbarElement } from './taskbar-elements-d59867f1.js';
7
7
  import { d as VIEW_MODE } from './constants-8457af36.js';
8
8
  import './DataFetcher-c1baf61d.js';
9
9
  import './pesquisa-fetcher-03c8f919.js';
10
- import { P as PresentationMode } from './index-88d0c8ad.js';
10
+ import { P as PresentationMode } from './index-3aa4977a.js';
11
11
  import './ISave-d8c8bc59.js';
12
12
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
13
13
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
@@ -1,7 +1,7 @@
1
- export { S as snk_guides_viewer } from './snk-guides-viewer-7ae1b358.js';
1
+ export { S as snk_guides_viewer } from './snk-guides-viewer-aee2cafe.js';
2
2
  import './index-a7d3d3f1.js';
3
3
  import '@sankhyalabs/core';
4
- import './SnkFormConfigManager-5b0d69cd.js';
4
+ import './SnkFormConfigManager-d4554df9.js';
5
5
  import './ConfigStorage-86187da3.js';
6
6
  import './form-config-fetcher-30fb808f.js';
7
7
  import './DataFetcher-c1baf61d.js';
@@ -10,8 +10,8 @@ import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
10
10
  import './filter-item-type.enum-d45e026f.js';
11
11
  import '@sankhyalabs/ezui/dist/collection/utils/form';
12
12
  import './field-search-efbe307f.js';
13
- import './taskbar-elements-da72aae0.js';
14
- import './index-88d0c8ad.js';
13
+ import './taskbar-elements-d59867f1.js';
14
+ import './index-3aa4977a.js';
15
15
  import './index-bdf75557.js';
16
16
  import './constants-8457af36.js';
17
17
  import './pesquisa-fetcher-03c8f919.js';
@@ -2,11 +2,11 @@ import { r as registerInstance, c as createEvent, h, g as getElement } from './i
2
2
  import { UserInterface, StringUtils, ApplicationContext, ObjectUtils, DataType, JSUtils, FloatingManager, ElementIDUtils } from '@sankhyalabs/core';
3
3
  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
- import { T as TaskbarElement } from './taskbar-elements-da72aae0.js';
5
+ import { T as TaskbarElement } from './taskbar-elements-d59867f1.js';
6
6
  import './DataFetcher-c1baf61d.js';
7
7
  import './pesquisa-fetcher-03c8f919.js';
8
- import { C as CommonsExporter, S as SnkMultiSelectionListDataSource, R as RmPrecisionCustomValueFormatter, a as CrudUtils } from './IExporterProvider-1deb5d0a.js';
9
- import { D as DataExporterOption, P as PresentationMode } from './index-88d0c8ad.js';
8
+ import { C as CommonsExporter, S as SnkMultiSelectionListDataSource, R as RmPrecisionCustomValueFormatter, a as CrudUtils } from './IExporterProvider-343272b3.js';
9
+ import { D as DataExporterOption, P as PresentationMode } from './index-3aa4977a.js';
10
10
  import './ISave-d8c8bc59.js';
11
11
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
12
12
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
@@ -15,7 +15,7 @@ import './filter-item-type.enum-d45e026f.js';
15
15
  import { F as FormConfigFetcher } from './form-config-fetcher-30fb808f.js';
16
16
  import { T as TaskbarProcessor, b as buildFieldSearch, o as openFieldSearch } from './field-search-efbe307f.js';
17
17
  import { C as ConfigStorage } from './ConfigStorage-86187da3.js';
18
- import { S as SnkFormConfigManager } from './SnkFormConfigManager-5b0d69cd.js';
18
+ import { S as SnkFormConfigManager } from './SnkFormConfigManager-d4554df9.js';
19
19
  import { g as getSelectedIDs } from './RecordIDUtils-87d02110.js';
20
20
  import { s as store } from './index-bdf75557.js';
21
21
  import './PrintUtils-3e4ff0f5.js';
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
2
2
  import { Action, StringUtils, ApplicationContext, OVERFLOWED_CLASS_NAME, OverflowWatcher, OverflowDirection, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { A as AuthorizationConfig } from './AuthorizationConfig-dcbd207a.js';
4
- import { T as TaskbarElement, V as VisibleWhenForbidden, A as AuthorizationElements, b as buildElem, a as buildCustomButton } from './taskbar-elements-da72aae0.js';
5
- import { P as PresentationMode } from './index-88d0c8ad.js';
4
+ import { T as TaskbarElement, V as VisibleWhenForbidden, A as AuthorizationElements, b as buildElem, a as buildCustomButton } from './taskbar-elements-d59867f1.js';
5
+ import { P as PresentationMode } from './index-3aa4977a.js';
6
6
  import './index-bdf75557.js';
7
7
 
8
8
  const snkTaskbarCss = ".sc-snk-taskbar-h{display:flex;flex-wrap:wrap}.no-wrap.sc-snk-taskbar-h{flex-wrap:nowrap}.full-width.sc-snk-taskbar-h{width:100%}.align-right.sc-snk-taskbar-h{justify-content:flex-end}.overflowed.sc-snk-taskbar{display:none}";
@@ -1,5 +1,5 @@
1
1
  import { h } from './index-a7d3d3f1.js';
2
- import { P as PresentationMode } from './index-88d0c8ad.js';
2
+ import { P as PresentationMode } from './index-3aa4977a.js';
3
3
  import { s as store } from './index-bdf75557.js';
4
4
 
5
5
  var TaskbarElement;