mapa-library-ui 2.13.2 → 2.13.3

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/docs/TABLE_EXPORT.md +55 -2
  2. package/fesm2022/mapa-library-ui-src-lib-components-capability.mjs +3 -0
  3. package/fesm2022/mapa-library-ui-src-lib-components-capability.mjs.map +1 -1
  4. package/fesm2022/mapa-library-ui-src-lib-components-chart.mjs +3 -0
  5. package/fesm2022/mapa-library-ui-src-lib-components-chart.mjs.map +1 -1
  6. package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs +3 -1
  7. package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs.map +1 -1
  8. package/fesm2022/mapa-library-ui-src-lib-components-dropdown-tree.mjs +3 -0
  9. package/fesm2022/mapa-library-ui-src-lib-components-dropdown-tree.mjs.map +1 -1
  10. package/fesm2022/mapa-library-ui-src-lib-components-dropdown.mjs +3 -0
  11. package/fesm2022/mapa-library-ui-src-lib-components-dropdown.mjs.map +1 -1
  12. package/fesm2022/mapa-library-ui-src-lib-components-filters.mjs +3 -0
  13. package/fesm2022/mapa-library-ui-src-lib-components-filters.mjs.map +1 -1
  14. package/fesm2022/mapa-library-ui-src-lib-components-form.mjs +3 -1
  15. package/fesm2022/mapa-library-ui-src-lib-components-form.mjs.map +1 -1
  16. package/fesm2022/mapa-library-ui-src-lib-components-group-report.mjs +3 -1
  17. package/fesm2022/mapa-library-ui-src-lib-components-group-report.mjs.map +1 -1
  18. package/fesm2022/mapa-library-ui-src-lib-components-input.mjs +3 -0
  19. package/fesm2022/mapa-library-ui-src-lib-components-input.mjs.map +1 -1
  20. package/fesm2022/mapa-library-ui-src-lib-components-scale-parameterization.mjs +3 -0
  21. package/fesm2022/mapa-library-ui-src-lib-components-scale-parameterization.mjs.map +1 -1
  22. package/fesm2022/mapa-library-ui-src-lib-components-scale.mjs +3 -0
  23. package/fesm2022/mapa-library-ui-src-lib-components-scale.mjs.map +1 -1
  24. package/fesm2022/mapa-library-ui-src-lib-components-table.mjs +3 -1
  25. package/fesm2022/mapa-library-ui-src-lib-components-table.mjs.map +1 -1
  26. package/fesm2022/mapa-library-ui-src-lib-components-textarea.mjs +3 -0
  27. package/fesm2022/mapa-library-ui-src-lib-components-textarea.mjs.map +1 -1
  28. package/fesm2022/mapa-library-ui-src-lib-components-warning.mjs +3 -0
  29. package/fesm2022/mapa-library-ui-src-lib-components-warning.mjs.map +1 -1
  30. package/fesm2022/mapa-library-ui-src-lib-core-excel-export.mjs +73 -41
  31. package/fesm2022/mapa-library-ui-src-lib-core-excel-export.mjs.map +1 -1
  32. package/fesm2022/mapa-library-ui-src-lib-core-export.mjs +92 -26
  33. package/fesm2022/mapa-library-ui-src-lib-core-export.mjs.map +1 -1
  34. package/fesm2022/mapa-library-ui.mjs +3 -1
  35. package/fesm2022/mapa-library-ui.mjs.map +1 -1
  36. package/index.d.ts +72 -0
  37. package/mapa-library-ui-2.13.3.tgz +0 -0
  38. package/package.json +2 -2
  39. package/src/lib/core/excel-export/index.d.ts +23 -2
  40. package/src/lib/core/export/index.d.ts +166 -0
  41. package/worker/excel-export.runtime.d.ts +2 -2
  42. package/worker/excel-export.runtime.js +17 -17
  43. package/worker/excel-export.worker.js +19 -19
  44. package/mapa-library-ui-2.13.2.tgz +0 -0
package/index.d.ts CHANGED
@@ -640,6 +640,78 @@ type MapaUiTexts = MapaUiTextGroups;
640
640
  type ValidationMessageContext = ValidationContext;
641
641
 
642
642
  declare const MAPA_UI_TEXTS: InjectionToken<Partial<{
643
+ export: Partial<{
644
+ locale: string;
645
+ title: string;
646
+ description: string;
647
+ close: string;
648
+ scope: string;
649
+ allRecords: string;
650
+ selectedOnly: string;
651
+ record: string;
652
+ records: string;
653
+ selectedRecord: string;
654
+ selectedRecords: string;
655
+ content: string;
656
+ format: string;
657
+ excel: string;
658
+ csv: string;
659
+ excelDescription: string;
660
+ csvDescription: string;
661
+ visibleOnly: string;
662
+ cancel: string;
663
+ generate: string;
664
+ exports: string;
665
+ remove: string;
666
+ download: string;
667
+ downloadFile: string;
668
+ queued: string;
669
+ fetching: string;
670
+ building: string;
671
+ serializing: string;
672
+ part: string;
673
+ background: string;
674
+ ready: string;
675
+ file: string;
676
+ files: string;
677
+ retry: string;
678
+ cancelled: string;
679
+ errorStart: string;
680
+ errorExport: string;
681
+ sheetContext: string;
682
+ sheetFilters: string;
683
+ sheetNoFilters: string;
684
+ sheetTotal: string;
685
+ sheetFooter: string;
686
+ errorEngine: string;
687
+ errorDate: string;
688
+ errorCellLength: string;
689
+ errorCellValue: string;
690
+ errorColumns: string;
691
+ errorColumnLimit: string;
692
+ errorMetadata: string;
693
+ errorHeight: string;
694
+ errorRowLimit: string;
695
+ errorColumnKey: string;
696
+ errorWidth: string;
697
+ errorSheets: string;
698
+ errorDecimals: string;
699
+ errorCriteria: string;
700
+ errorColor: string;
701
+ errorStyle: string;
702
+ errorBorder: string;
703
+ errorAutoWidth: string;
704
+ errorRowCount: string;
705
+ errorDataChanged: string;
706
+ errorDuplicate: string;
707
+ errorIncomplete: string;
708
+ errorWorker: string;
709
+ errorSelection: string;
710
+ errorNoColumns: string;
711
+ errorWorkerResponse: string;
712
+ errorWorkerFailure: string;
713
+ errorWorkerReceive: string;
714
+ }>;
643
715
  common: Partial<{
644
716
  selectAll: string;
645
717
  retry: string;
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mapa-library-ui",
3
- "version": "2.13.2",
3
+ "version": "2.13.3",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^20.3.0",
6
6
  "@angular/cdk": "^20.2.0",
@@ -11,7 +11,7 @@
11
11
  "@angular/material": "^20.2.0",
12
12
  "@angular/router": "^20.3.0",
13
13
  "apexcharts": "^5.10.3",
14
- "mapa-frontend-i18n": "^2.8.0",
14
+ "mapa-frontend-i18n": "^2.9.1",
15
15
  "ng-apexcharts": "^2.3.0",
16
16
  "ngx-mask": "^20.0.3",
17
17
  "ngx-mat-select-search": "^8.0.4",
@@ -2,6 +2,24 @@
2
2
  import { Worksheet, Workbook, Alignment } from 'exceljs';
3
3
  import * as i0 from '@angular/core';
4
4
 
5
+ /** Strings only: the confirmed document language travels with the worker payload. */
6
+ interface ExcelExportLocalization {
7
+ locale: string;
8
+ record: string;
9
+ records: string;
10
+ sheetContext: string;
11
+ sheetFilters: string;
12
+ sheetNoFilters: string;
13
+ sheetTotal: string;
14
+ sheetFooter: string;
15
+ }
16
+ declare function formatExportText(template: string, values: Record<string, string | number>): string;
17
+ /** Stable codes survive worker transport; default messages preserve the low-level API. */
18
+ declare class ExcelExportError extends Error {
19
+ readonly exportCode: string;
20
+ constructor(exportCode: string, message: string);
21
+ }
22
+
5
23
  /** Cell dates use UTC calendar fields; normalize local UI instants with toExportDate. */
6
24
  type ExcelScalar = string | number | boolean | Date | null | undefined;
7
25
  type ExcelValue = ExcelScalar | {
@@ -97,6 +115,7 @@ interface ExcelColumn<TRow = Record<string, ExcelValue>> {
97
115
  status?: readonly ExcelStatusRule[];
98
116
  }
99
117
  interface ExcelSheetRequest<TRow = Record<string, ExcelValue>> extends ExcelTableOptions {
118
+ localization?: ExcelExportLocalization;
100
119
  sheetName: string;
101
120
  title?: string;
102
121
  columns: readonly ExcelColumn<TRow>[];
@@ -110,6 +129,7 @@ interface ExcelSheetRequest<TRow = Record<string, ExcelValue>> extends ExcelTabl
110
129
  customize?: (sheet: Worksheet) => void | Promise<void>;
111
130
  }
112
131
  interface ExcelWorkbookRequest<TRow = Record<string, ExcelValue>> {
132
+ localization?: ExcelExportLocalization;
113
133
  fileName: string;
114
134
  sheets: readonly ExcelSheetRequest<TRow>[];
115
135
  creator?: string;
@@ -132,6 +152,7 @@ type ExcelWorkerResponse = {
132
152
  buffer: ArrayBuffer;
133
153
  } | {
134
154
  error: string;
155
+ exportCode?: string;
135
156
  } | {
136
157
  progress: ExcelProgress;
137
158
  };
@@ -249,5 +270,5 @@ declare class MapaExcelExportService {
249
270
  */
250
271
  declare function getExcelWorkerConstructor(): typeof Worker;
251
272
 
252
- export { EXCEL_FORMATS, ExcelExportCancelledError, MAPA_EXCEL_COLORS, MAPA_EXCEL_STATUS_COLORS, MapaExcelExportService, addExcelTable, addMapaExcelLogo, applyMapaExcelBanner, buildExcelWorkbook, createExcelWorkbook, excelCurrencyFormat, excelFileName, excelFileNameWithDate, excelNumberFormat, excelPercentFormat, excelSheetName, fillExcelCell, fitExcelSheetTitle, getExcelWorkerConstructor, resolveWorkbookConstructor, serializeExcelRequest, serializeExcelWorkbook, styleMapaExcelHeaderCell, uniqueExcelSheetNames };
253
- export type { ExcelAlignment, ExcelAutoWidth, ExcelBorder, ExcelCellStyle, ExcelColumn, ExcelContext, ExcelExportOptions, ExcelFont, ExcelIndicator, ExcelProgress, ExcelScalar, ExcelSheetRequest, ExcelStatusRule, ExcelStatusTone, ExcelTableOptions, ExcelValue, ExcelWorkbookRequest, ExcelWorkerRequest, ExcelWorkerResponse };
273
+ export { EXCEL_FORMATS, ExcelExportCancelledError, ExcelExportError, MAPA_EXCEL_COLORS, MAPA_EXCEL_STATUS_COLORS, MapaExcelExportService, addExcelTable, addMapaExcelLogo, applyMapaExcelBanner, buildExcelWorkbook, createExcelWorkbook, excelCurrencyFormat, excelFileName, excelFileNameWithDate, excelNumberFormat, excelPercentFormat, excelSheetName, fillExcelCell, fitExcelSheetTitle, formatExportText, getExcelWorkerConstructor, resolveWorkbookConstructor, serializeExcelRequest, serializeExcelWorkbook, styleMapaExcelHeaderCell, uniqueExcelSheetNames };
274
+ export type { ExcelAlignment, ExcelAutoWidth, ExcelBorder, ExcelCellStyle, ExcelColumn, ExcelContext, ExcelExportLocalization, ExcelExportOptions, ExcelFont, ExcelIndicator, ExcelProgress, ExcelScalar, ExcelSheetRequest, ExcelStatusRule, ExcelStatusTone, ExcelTableOptions, ExcelValue, ExcelWorkbookRequest, ExcelWorkerRequest, ExcelWorkerResponse };
@@ -5,6 +5,18 @@ import { InjectionToken } from '@angular/core';
5
5
  import { MatDialogRef } from '@angular/material/dialog';
6
6
  import { HttpContextToken } from '@angular/common/http';
7
7
 
8
+ /** Strings only: the confirmed document language travels with the worker payload. */
9
+ interface ExcelExportLocalization {
10
+ locale: string;
11
+ record: string;
12
+ records: string;
13
+ sheetContext: string;
14
+ sheetFilters: string;
15
+ sheetNoFilters: string;
16
+ sheetTotal: string;
17
+ sheetFooter: string;
18
+ }
19
+
8
20
  /** Cell dates use UTC calendar fields; normalize local UI instants with toExportDate. */
9
21
  type ExcelScalar = string | number | boolean | Date | null | undefined;
10
22
  type ExcelValue = ExcelScalar | {
@@ -95,6 +107,7 @@ interface ExcelColumn<TRow = Record<string, ExcelValue>> {
95
107
  status?: readonly ExcelStatusRule[];
96
108
  }
97
109
  interface ExcelSheetRequest<TRow = Record<string, ExcelValue>> extends ExcelTableOptions {
110
+ localization?: ExcelExportLocalization;
98
111
  sheetName: string;
99
112
  title?: string;
100
113
  columns: readonly ExcelColumn<TRow>[];
@@ -146,6 +159,7 @@ interface ExportPreparedContent {
146
159
  extension?: unknown;
147
160
  }
148
161
  interface ExportRequest {
162
+ localization?: ExcelExportLocalization;
149
163
  listing: string;
150
164
  allRecordsDescription?: string;
151
165
  context: Omit<ExcelContext, 'generatedAt'>;
@@ -205,6 +219,7 @@ declare function collectExportPages<TRow>(options: {
205
219
  declare const MAPA_EXPORT_WORKER_FACTORY: InjectionToken<() => Worker>;
206
220
  declare function snapshotExportRequest(request: ExportRequest): ExportRequest;
207
221
  declare class MapaExportJobsService {
222
+ private readonly i18n;
208
223
  private readonly excel;
209
224
  private readonly defaultWorker;
210
225
  private readonly state;
@@ -229,6 +244,82 @@ declare class MapaExportDialogComponent {
229
244
  readonly request: ExportRequest;
230
245
  readonly dialog: MatDialogRef<any, any>;
231
246
  private readonly jobs;
247
+ private readonly i18n;
248
+ get texts(): {
249
+ locale: string;
250
+ title: string;
251
+ description: string;
252
+ close: string;
253
+ scope: string;
254
+ allRecords: string;
255
+ selectedOnly: string;
256
+ record: string;
257
+ records: string;
258
+ selectedRecord: string;
259
+ selectedRecords: string;
260
+ content: string;
261
+ format: string;
262
+ excel: string;
263
+ csv: string;
264
+ excelDescription: string;
265
+ csvDescription: string;
266
+ visibleOnly: string;
267
+ cancel: string;
268
+ generate: string;
269
+ exports: string;
270
+ remove: string;
271
+ download: string;
272
+ downloadFile: string;
273
+ queued: string;
274
+ fetching: string;
275
+ building: string;
276
+ serializing: string;
277
+ part: string;
278
+ background: string;
279
+ ready: string;
280
+ file: string;
281
+ files: string;
282
+ retry: string;
283
+ cancelled: string;
284
+ errorStart: string;
285
+ errorExport: string;
286
+ sheetContext: string;
287
+ sheetFilters: string;
288
+ sheetNoFilters: string;
289
+ sheetTotal: string;
290
+ sheetFooter: string;
291
+ errorEngine: string;
292
+ errorDate: string;
293
+ errorCellLength: string;
294
+ errorCellValue: string;
295
+ errorColumns: string;
296
+ errorColumnLimit: string;
297
+ errorMetadata: string;
298
+ errorHeight: string;
299
+ errorRowLimit: string;
300
+ errorColumnKey: string;
301
+ errorWidth: string;
302
+ errorSheets: string;
303
+ errorDecimals: string;
304
+ errorCriteria: string;
305
+ errorColor: string;
306
+ errorStyle: string;
307
+ errorBorder: string;
308
+ errorAutoWidth: string;
309
+ errorRowCount: string;
310
+ errorDataChanged: string;
311
+ errorDuplicate: string;
312
+ errorIncomplete: string;
313
+ errorWorker: string;
314
+ errorSelection: string;
315
+ errorNoColumns: string;
316
+ errorWorkerResponse: string;
317
+ errorWorkerFailure: string;
318
+ errorWorkerReceive: string;
319
+ };
320
+ get title(): string;
321
+ get allDescription(): string;
322
+ get selectedDescription(): string;
232
323
  readonly selectable: boolean;
233
324
  readonly selectedCount: number;
234
325
  readonly total: number;
@@ -252,6 +343,81 @@ declare class MapaExportDialogService {
252
343
 
253
344
  declare class MapaExportJobsComponent {
254
345
  readonly jobs: MapaExportJobsService;
346
+ private readonly i18n;
347
+ get texts(): {
348
+ locale: string;
349
+ title: string;
350
+ description: string;
351
+ close: string;
352
+ scope: string;
353
+ allRecords: string;
354
+ selectedOnly: string;
355
+ record: string;
356
+ records: string;
357
+ selectedRecord: string;
358
+ selectedRecords: string;
359
+ content: string;
360
+ format: string;
361
+ excel: string;
362
+ csv: string;
363
+ excelDescription: string;
364
+ csvDescription: string;
365
+ visibleOnly: string;
366
+ cancel: string;
367
+ generate: string;
368
+ exports: string;
369
+ remove: string;
370
+ download: string;
371
+ downloadFile: string;
372
+ queued: string;
373
+ fetching: string;
374
+ building: string;
375
+ serializing: string;
376
+ part: string;
377
+ background: string;
378
+ ready: string;
379
+ file: string;
380
+ files: string;
381
+ retry: string;
382
+ cancelled: string;
383
+ errorStart: string;
384
+ errorExport: string;
385
+ sheetContext: string;
386
+ sheetFilters: string;
387
+ sheetNoFilters: string;
388
+ sheetTotal: string;
389
+ sheetFooter: string;
390
+ errorEngine: string;
391
+ errorDate: string;
392
+ errorCellLength: string;
393
+ errorCellValue: string;
394
+ errorColumns: string;
395
+ errorColumnLimit: string;
396
+ errorMetadata: string;
397
+ errorHeight: string;
398
+ errorRowLimit: string;
399
+ errorColumnKey: string;
400
+ errorWidth: string;
401
+ errorSheets: string;
402
+ errorDecimals: string;
403
+ errorCriteria: string;
404
+ errorColor: string;
405
+ errorStyle: string;
406
+ errorBorder: string;
407
+ errorAutoWidth: string;
408
+ errorRowCount: string;
409
+ errorDataChanged: string;
410
+ errorDuplicate: string;
411
+ errorIncomplete: string;
412
+ errorWorker: string;
413
+ errorSelection: string;
414
+ errorNoColumns: string;
415
+ errorWorkerResponse: string;
416
+ errorWorkerFailure: string;
417
+ errorWorkerReceive: string;
418
+ };
419
+ format(template: string, values: Record<string, string | number>): string;
420
+ ready(task: ExportTask): string;
255
421
  percent(task: ExportTask): number | null;
256
422
  phase(task: ExportTask): string;
257
423
  static ɵfac: i0.ɵɵFactoryDeclaration<MapaExportJobsComponent, never>;
@@ -1,4 +1,4 @@
1
- export { createExcelWorkbook, buildExcelWorkbook, addExcelTable, addMapaExcelLogo, serializeExcelWorkbook, serializeExcelRequest, resolveWorkbookConstructor, applyMapaExcelBanner, fillExcelCell, styleMapaExcelHeaderCell, MAPA_EXCEL_COLORS, MAPA_EXCEL_STATUS_COLORS, excelFileName, excelFileNameWithDate, excelSheetName, fitExcelSheetTitle, uniqueExcelSheetNames, ExcelExportCancelledError, EXCEL_FORMATS, excelNumberFormat, excelCurrencyFormat, excelPercentFormat } from '../src/lib/core/excel-export/index';
2
- export type { ExcelWorkbookRequest, ExcelSheetRequest, ExcelColumn, ExcelContext, ExcelIndicator, ExcelValue, ExcelProgress, ExcelWorkerRequest, ExcelWorkerResponse, ExcelCellStyle, ExcelAlignment, ExcelFont, ExcelBorder, ExcelAutoWidth, ExcelTableOptions, ExcelStatusRule } from '../src/lib/core/excel-export/index';
1
+ export { createExcelWorkbook, buildExcelWorkbook, addExcelTable, addMapaExcelLogo, serializeExcelWorkbook, serializeExcelRequest, resolveWorkbookConstructor, applyMapaExcelBanner, fillExcelCell, styleMapaExcelHeaderCell, MAPA_EXCEL_COLORS, MAPA_EXCEL_STATUS_COLORS, excelFileName, excelFileNameWithDate, excelSheetName, fitExcelSheetTitle, uniqueExcelSheetNames, ExcelExportCancelledError, ExcelExportError, formatExportText, EXCEL_FORMATS, excelNumberFormat, excelCurrencyFormat, excelPercentFormat } from '../src/lib/core/excel-export/index';
2
+ export type { ExcelWorkbookRequest, ExcelSheetRequest, ExcelColumn, ExcelContext, ExcelIndicator, ExcelValue, ExcelProgress, ExcelWorkerRequest, ExcelWorkerResponse, ExcelExportLocalization, ExcelCellStyle, ExcelAlignment, ExcelFont, ExcelBorder, ExcelAutoWidth, ExcelTableOptions, ExcelStatusRule } from '../src/lib/core/excel-export/index';
3
3
  export declare function encodeExportCsv(sheet: import('../src/lib/core/excel-export/index').ExcelSheetRequest): ArrayBuffer;
4
4
  export declare function registerExcelExportWorker(compose?: (book: import('exceljs').Workbook, request: import('../src/lib/core/excel-export/index').ExcelWorkbookRequest, progress: (progress: import('../src/lib/core/excel-export/index').ExcelProgress) => void) => Promise<void> | void): void;