@memberjunction/ng-export-service 6.2.0-edge.0 → 6.2.0-edge.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.
@@ -16,25 +16,89 @@ import * as i0 from "@angular/core";
16
16
  export declare class ExportDialogComponent {
17
17
  private exportService;
18
18
  private cdr;
19
- selectedFormat: ExportFormat;
20
- fileName: string;
21
- includeHeaders: boolean;
22
- samplingMode: SamplingMode;
23
- sampleCount: number;
24
- sampleInterval: number;
25
- isExporting: boolean;
26
- exportError: string | null;
27
- availableFormats: ExportFormat[];
28
- samplingModes: {
19
+ SelectedFormat: ExportFormat;
20
+ /** @deprecated Use {@link SelectedFormat}. */
21
+ get selectedFormat(): ExportFormat;
22
+ /** @deprecated Use {@link SelectedFormat}. */
23
+ set selectedFormat(value: ExportFormat);
24
+ FileName: string;
25
+ /** @deprecated Use {@link FileName}. */
26
+ get fileName(): string;
27
+ /** @deprecated Use {@link FileName}. */
28
+ set fileName(value: string);
29
+ IncludeHeaders: boolean;
30
+ /** @deprecated Use {@link IncludeHeaders}. */
31
+ get includeHeaders(): boolean;
32
+ /** @deprecated Use {@link IncludeHeaders}. */
33
+ set includeHeaders(value: boolean);
34
+ SamplingMode: SamplingMode;
35
+ /** @deprecated Use {@link SamplingMode}. */
36
+ get samplingMode(): SamplingMode;
37
+ /** @deprecated Use {@link SamplingMode}. */
38
+ set samplingMode(value: SamplingMode);
39
+ SampleCount: number;
40
+ /** @deprecated Use {@link SampleCount}. */
41
+ get sampleCount(): number;
42
+ /** @deprecated Use {@link SampleCount}. */
43
+ set sampleCount(value: number);
44
+ SampleInterval: number;
45
+ /** @deprecated Use {@link SampleInterval}. */
46
+ get sampleInterval(): number;
47
+ /** @deprecated Use {@link SampleInterval}. */
48
+ set sampleInterval(value: number);
49
+ IsExporting: boolean;
50
+ /** @deprecated Use {@link IsExporting}. */
51
+ get isExporting(): boolean;
52
+ /** @deprecated Use {@link IsExporting}. */
53
+ set isExporting(value: boolean);
54
+ ExportError: string | null;
55
+ /** @deprecated Use {@link ExportError}. */
56
+ get exportError(): string | null;
57
+ /** @deprecated Use {@link ExportError}. */
58
+ set exportError(value: string | null);
59
+ AvailableFormats: ExportFormat[];
60
+ /** @deprecated Use {@link AvailableFormats}. */
61
+ get availableFormats(): ExportFormat[];
62
+ /** @deprecated Use {@link AvailableFormats}. */
63
+ set availableFormats(value: ExportFormat[]);
64
+ SamplingModes: {
29
65
  mode: SamplingMode;
30
66
  label: string;
31
67
  description: string;
32
68
  }[];
69
+ /** @deprecated Use {@link SamplingModes}. */
70
+ get samplingModes(): {
71
+ mode: SamplingMode;
72
+ label: string;
73
+ description: string;
74
+ }[];
75
+ /** @deprecated Use {@link SamplingModes}. */
76
+ set samplingModes(value: {
77
+ mode: SamplingMode;
78
+ label: string;
79
+ description: string;
80
+ }[]);
33
81
  constructor(exportService: ExportService, cdr: ChangeDetectorRef);
34
82
  private _visible;
83
+ get Visible(): boolean;
84
+ set Visible(value: boolean);
85
+ /** @deprecated Use {@link Visible}. */
35
86
  get visible(): boolean;
87
+ /** @deprecated Use {@link Visible}. */
36
88
  set visible(value: boolean);
37
- config: ExportDialogConfig | null;
89
+ Config: ExportDialogConfig | null;
90
+ /** @deprecated Use {@link Config}. */
91
+ set config(value: ExportDialogConfig | null);
92
+ /** @deprecated Use {@link Config}. */
93
+ get config(): ExportDialogConfig | null;
94
+ Closed: EventEmitter<ExportDialogResult>;
95
+ /**
96
+ * @deprecated Use {@link Closed}.
97
+ *
98
+ * The same emitter under the old binding name, so a template still binding
99
+ * (closed) keeps working. Must stay AFTER Closed: class fields
100
+ * initialise in order, and the other way round this captures undefined.
101
+ */
38
102
  closed: EventEmitter<ExportDialogResult>;
39
103
  /**
40
104
  * Initialize form from config
@@ -43,6 +107,12 @@ export declare class ExportDialogComponent {
43
107
  /**
44
108
  * Get format info for display
45
109
  */
110
+ GetFormatInfo(format: ExportFormat): {
111
+ label: string;
112
+ icon: string;
113
+ description: string;
114
+ };
115
+ /** @deprecated Use {@link GetFormatInfo}. */
46
116
  getFormatInfo(format: ExportFormat): {
47
117
  label: string;
48
118
  icon: string;
@@ -51,22 +121,32 @@ export declare class ExportDialogComponent {
51
121
  /**
52
122
  * Check if sampling needs a count input
53
123
  */
124
+ get NeedsSampleCount(): boolean;
125
+ /** @deprecated Use {@link NeedsSampleCount}. */
54
126
  get needsSampleCount(): boolean;
55
127
  /**
56
128
  * Check if sampling needs an interval input
57
129
  */
130
+ get NeedsSampleInterval(): boolean;
131
+ /** @deprecated Use {@link NeedsSampleInterval}. */
58
132
  get needsSampleInterval(): boolean;
59
133
  /**
60
134
  * Get total row count
61
135
  */
136
+ get TotalRows(): number;
137
+ /** @deprecated Use {@link TotalRows}. */
62
138
  get totalRows(): number;
63
139
  /**
64
140
  * Estimate exported row count
65
141
  */
142
+ get EstimatedRows(): number;
143
+ /** @deprecated Use {@link EstimatedRows}. */
66
144
  get estimatedRows(): number;
67
145
  /**
68
146
  * Get sampling description
69
147
  */
148
+ get SamplingDescription(): string;
149
+ /** @deprecated Use {@link SamplingDescription}. */
70
150
  get samplingDescription(): string;
71
151
  /**
72
152
  * Get ordinal suffix for number
@@ -75,24 +155,34 @@ export declare class ExportDialogComponent {
75
155
  /**
76
156
  * Handle format selection
77
157
  */
158
+ SelectFormat(format: ExportFormat): void;
159
+ /** @deprecated Use {@link SelectFormat}. */
78
160
  selectFormat(format: ExportFormat): void;
79
161
  /**
80
162
  * Handle cancel button
81
163
  */
164
+ OnCancel(): void;
165
+ /** @deprecated Use {@link OnCancel}. */
82
166
  onCancel(): void;
83
167
  /**
84
168
  * Handle export button
85
169
  */
170
+ OnExport(): Promise<void>;
171
+ /** @deprecated Use {@link OnExport}. */
86
172
  onExport(): Promise<void>;
87
173
  /**
88
174
  * Check if show sampling options
89
175
  */
176
+ get ShowSamplingOptions(): boolean;
177
+ /** @deprecated Use {@link ShowSamplingOptions}. */
90
178
  get showSamplingOptions(): boolean;
91
179
  /**
92
180
  * Get dialog title
93
181
  */
182
+ get DialogTitle(): string;
183
+ /** @deprecated Use {@link DialogTitle}. */
94
184
  get dialogTitle(): string;
95
185
  static ɵfac: i0.ɵɵFactoryDeclaration<ExportDialogComponent, never>;
96
- static ɵcmp: i0.ɵɵComponentDeclaration<ExportDialogComponent, "mj-export-dialog", never, { "visible": { "alias": "visible"; "required": false; }; "config": { "alias": "config"; "required": false; }; }, { "closed": "closed"; }, never, never, false, never>;
186
+ static ɵcmp: i0.ɵɵComponentDeclaration<ExportDialogComponent, "mj-export-dialog", never, { "Visible": { "alias": "Visible"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "Config": { "alias": "Config"; "required": false; }; "config": { "alias": "config"; "required": false; }; }, { "Closed": "Closed"; "closed": "closed"; }, never, never, false, never>;
97
187
  }
98
188
  //# sourceMappingURL=export-dialog.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"export-dialog.component.d.ts","sourceRoot":"","sources":["../../src/lib/export-dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAC1F,OAAO,EACL,YAAY,EAGZ,YAAY,EAGb,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;;AAEzF;;;;;;;;;;GAUG;AACH,qBAMa,qBAAqB;IAkB9B,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,GAAG;IAjBb,cAAc,EAAE,YAAY,CAAW;IACvC,QAAQ,SAAY;IACpB,cAAc,UAAQ;IACtB,YAAY,EAAE,YAAY,CAAS;IACnC,WAAW,SAAO;IAClB,cAAc,SAAM;IAGpB,WAAW,UAAS;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAQ;IAGlC,gBAAgB,EAAE,YAAY,EAAE,CAA4B;IAC5D,aAAa,EAAE;QAAE,IAAI,EAAE,YAAY,CAAC;QAAC,KAA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MAAM,EAAE,YAAY;;;;;IAIlC;;OAEG;IACH,IAAI,gBAAgB,IAAI,OAAO,CAE9B;IAED,gDAAgD;IAChD,IAAI,gBAAgB,IAAI,OAAO,CAE9B;IAED;;OAEG;IACH,IAAI,mBAAmB,IAAI,OAAO,CAEjC;IAED,mDAAmD;IACnD,IAAI,mBAAmB,IAAI,OAAO,CAEjC;IAED;;OAEG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,yCAAyC;IACzC,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED;;OAEG;IACH,IAAI,aAAa,IAAI,MAAM,CAc1B;IAED,6CAA6C;IAC7C,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED;;OAEG;IACH,IAAI,mBAAmB,IAAI,MAAM,CAehC;IAED,mDAAmD;IACnD,IAAI,mBAAmB,IAAI,MAAM,CAEhC;IAED;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAMxB;;OAEG;IACH,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;IAKxC,4CAA4C;IAC5C,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;IAIxC;;OAEG;IACH,QAAQ,IAAI,IAAI;IAKhB,wCAAwC;IACxC,QAAQ,IAAI,IAAI;IAIhB;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IA4C/B,wCAAwC;IAClC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/B;;OAEG;IACH,IAAI,mBAAmB,IAAI,OAAO,CAEjC;IAED,mDAAmD;IACnD,IAAI,mBAAmB,IAAI,OAAO,CAEjC;IAED;;OAEG;IACH,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,2CAA2C;IAC3C,IAAI,WAAW,IAAI,MAAM,CAExB;yCA3XU,qBAAqB;2CAArB,qBAAqB;CA4XjC"}
@@ -203,111 +203,239 @@ export class ExportDialogComponent {
203
203
  exportService;
204
204
  cdr;
205
205
  // Form state
206
- selectedFormat = 'excel';
207
- fileName = 'export';
208
- includeHeaders = true;
209
- samplingMode = 'all';
210
- sampleCount = 100;
211
- sampleInterval = 10;
206
+ SelectedFormat = 'excel';
207
+ /** @deprecated Use {@link SelectedFormat}. */
208
+ get selectedFormat() {
209
+ return this.SelectedFormat;
210
+ }
211
+ /** @deprecated Use {@link SelectedFormat}. */
212
+ set selectedFormat(value) {
213
+ this.SelectedFormat = value;
214
+ }
215
+ FileName = 'export';
216
+ /** @deprecated Use {@link FileName}. */
217
+ get fileName() {
218
+ return this.FileName;
219
+ }
220
+ /** @deprecated Use {@link FileName}. */
221
+ set fileName(value) {
222
+ this.FileName = value;
223
+ }
224
+ IncludeHeaders = true;
225
+ /** @deprecated Use {@link IncludeHeaders}. */
226
+ get includeHeaders() {
227
+ return this.IncludeHeaders;
228
+ }
229
+ /** @deprecated Use {@link IncludeHeaders}. */
230
+ set includeHeaders(value) {
231
+ this.IncludeHeaders = value;
232
+ }
233
+ SamplingMode = 'all';
234
+ /** @deprecated Use {@link SamplingMode}. */
235
+ get samplingMode() {
236
+ return this.SamplingMode;
237
+ }
238
+ /** @deprecated Use {@link SamplingMode}. */
239
+ set samplingMode(value) {
240
+ this.SamplingMode = value;
241
+ }
242
+ SampleCount = 100;
243
+ /** @deprecated Use {@link SampleCount}. */
244
+ get sampleCount() {
245
+ return this.SampleCount;
246
+ }
247
+ /** @deprecated Use {@link SampleCount}. */
248
+ set sampleCount(value) {
249
+ this.SampleCount = value;
250
+ }
251
+ SampleInterval = 10;
252
+ /** @deprecated Use {@link SampleInterval}. */
253
+ get sampleInterval() {
254
+ return this.SampleInterval;
255
+ }
256
+ /** @deprecated Use {@link SampleInterval}. */
257
+ set sampleInterval(value) {
258
+ this.SampleInterval = value;
259
+ }
212
260
  // UI state
213
- isExporting = false;
214
- exportError = null;
261
+ IsExporting = false;
262
+ /** @deprecated Use {@link IsExporting}. */
263
+ get isExporting() {
264
+ return this.IsExporting;
265
+ }
266
+ /** @deprecated Use {@link IsExporting}. */
267
+ set isExporting(value) {
268
+ this.IsExporting = value;
269
+ }
270
+ ExportError = null;
271
+ /** @deprecated Use {@link ExportError}. */
272
+ get exportError() {
273
+ return this.ExportError;
274
+ }
275
+ /** @deprecated Use {@link ExportError}. */
276
+ set exportError(value) {
277
+ this.ExportError = value;
278
+ }
215
279
  // Available options
216
- availableFormats = ['excel', 'csv', 'json'];
217
- samplingModes;
280
+ AvailableFormats = ['excel', 'csv', 'json'];
281
+ /** @deprecated Use {@link AvailableFormats}. */
282
+ get availableFormats() {
283
+ return this.AvailableFormats;
284
+ }
285
+ /** @deprecated Use {@link AvailableFormats}. */
286
+ set availableFormats(value) {
287
+ this.AvailableFormats = value;
288
+ }
289
+ SamplingModes;
290
+ /** @deprecated Use {@link SamplingModes}. */
291
+ get samplingModes() {
292
+ return this.SamplingModes;
293
+ }
294
+ /** @deprecated Use {@link SamplingModes}. */
295
+ set samplingModes(value) {
296
+ this.SamplingModes = value;
297
+ }
218
298
  constructor(exportService, cdr) {
219
299
  this.exportService = exportService;
220
300
  this.cdr = cdr;
221
- this.samplingModes = this.exportService.getSamplingModes();
301
+ this.SamplingModes = this.exportService.getSamplingModes();
222
302
  }
223
303
  _visible = false;
224
- get visible() {
304
+ get Visible() {
225
305
  return this._visible;
226
306
  }
227
- set visible(value) {
307
+ set Visible(value) {
228
308
  if (value && !this._visible) {
229
309
  this.initializeFromConfig();
230
310
  }
231
311
  this._visible = value;
232
312
  this.cdr.detectChanges();
233
313
  }
234
- config = null;
235
- closed = new EventEmitter();
314
+ /** @deprecated Use {@link Visible}. */
315
+ get visible() {
316
+ return this.Visible;
317
+ }
318
+ /** @deprecated Use {@link Visible}. */
319
+ set visible(value) {
320
+ this.Visible = value;
321
+ }
322
+ Config = null;
323
+ /** @deprecated Use {@link Config}. */
324
+ set config(value) {
325
+ this.Config = value;
326
+ }
327
+ /** @deprecated Use {@link Config}. */
328
+ get config() {
329
+ return this.Config;
330
+ }
331
+ Closed = new EventEmitter();
332
+ /**
333
+ * @deprecated Use {@link Closed}.
334
+ *
335
+ * The same emitter under the old binding name, so a template still binding
336
+ * (closed) keeps working. Must stay AFTER Closed: class fields
337
+ * initialise in order, and the other way round this captures undefined.
338
+ */
339
+ closed = this.Closed;
236
340
  /**
237
341
  * Initialize form from config
238
342
  */
239
343
  initializeFromConfig() {
240
- if (!this.config)
344
+ if (!this.Config)
241
345
  return;
242
- this.selectedFormat = this.config.defaultFormat || 'excel';
243
- this.fileName = this.config.defaultFileName || 'export';
244
- this.samplingMode = this.config.defaultSamplingMode || 'all';
245
- this.sampleCount = this.config.defaultSampleCount || 100;
246
- this.availableFormats = this.config.availableFormats || ['excel', 'csv', 'json'];
247
- this.exportError = null;
248
- this.isExporting = false;
346
+ this.SelectedFormat = this.Config.defaultFormat || 'excel';
347
+ this.FileName = this.Config.defaultFileName || 'export';
348
+ this.SamplingMode = this.Config.defaultSamplingMode || 'all';
349
+ this.SampleCount = this.Config.defaultSampleCount || 100;
350
+ this.AvailableFormats = this.Config.availableFormats || ['excel', 'csv', 'json'];
351
+ this.ExportError = null;
352
+ this.IsExporting = false;
249
353
  }
250
354
  /**
251
355
  * Get format info for display
252
356
  */
253
- getFormatInfo(format) {
357
+ GetFormatInfo(format) {
254
358
  return this.exportService.getFormatInfo(format);
255
359
  }
360
+ /** @deprecated Use {@link GetFormatInfo}. */
361
+ getFormatInfo(format) {
362
+ return this.GetFormatInfo(format);
363
+ }
256
364
  /**
257
365
  * Check if sampling needs a count input
258
366
  */
367
+ get NeedsSampleCount() {
368
+ return this.SamplingMode === 'top' || this.SamplingMode === 'bottom' || this.SamplingMode === 'random';
369
+ }
370
+ /** @deprecated Use {@link NeedsSampleCount}. */
259
371
  get needsSampleCount() {
260
- return this.samplingMode === 'top' || this.samplingMode === 'bottom' || this.samplingMode === 'random';
372
+ return this.NeedsSampleCount;
261
373
  }
262
374
  /**
263
375
  * Check if sampling needs an interval input
264
376
  */
377
+ get NeedsSampleInterval() {
378
+ return this.SamplingMode === 'every-nth';
379
+ }
380
+ /** @deprecated Use {@link NeedsSampleInterval}. */
265
381
  get needsSampleInterval() {
266
- return this.samplingMode === 'every-nth';
382
+ return this.NeedsSampleInterval;
267
383
  }
268
384
  /**
269
385
  * Get total row count
270
386
  */
387
+ get TotalRows() {
388
+ return this.Config?.data?.length || 0;
389
+ }
390
+ /** @deprecated Use {@link TotalRows}. */
271
391
  get totalRows() {
272
- return this.config?.data?.length || 0;
392
+ return this.TotalRows;
273
393
  }
274
394
  /**
275
395
  * Estimate exported row count
276
396
  */
277
- get estimatedRows() {
278
- const total = this.totalRows;
279
- switch (this.samplingMode) {
397
+ get EstimatedRows() {
398
+ const total = this.TotalRows;
399
+ switch (this.SamplingMode) {
280
400
  case 'all':
281
401
  return total;
282
402
  case 'top':
283
403
  case 'bottom':
284
404
  case 'random':
285
- return Math.min(this.sampleCount, total);
405
+ return Math.min(this.SampleCount, total);
286
406
  case 'every-nth':
287
- return Math.ceil(total / this.sampleInterval);
407
+ return Math.ceil(total / this.SampleInterval);
288
408
  default:
289
409
  return total;
290
410
  }
291
411
  }
412
+ /** @deprecated Use {@link EstimatedRows}. */
413
+ get estimatedRows() {
414
+ return this.EstimatedRows;
415
+ }
292
416
  /**
293
417
  * Get sampling description
294
418
  */
295
- get samplingDescription() {
296
- switch (this.samplingMode) {
419
+ get SamplingDescription() {
420
+ switch (this.SamplingMode) {
297
421
  case 'all':
298
- return `Exporting all ${this.totalRows.toLocaleString()} rows`;
422
+ return `Exporting all ${this.TotalRows.toLocaleString()} rows`;
299
423
  case 'top':
300
- return `Exporting first ${Math.min(this.sampleCount, this.totalRows).toLocaleString()} rows`;
424
+ return `Exporting first ${Math.min(this.SampleCount, this.TotalRows).toLocaleString()} rows`;
301
425
  case 'bottom':
302
- return `Exporting last ${Math.min(this.sampleCount, this.totalRows).toLocaleString()} rows`;
426
+ return `Exporting last ${Math.min(this.SampleCount, this.TotalRows).toLocaleString()} rows`;
303
427
  case 'random':
304
- return `Exporting ${Math.min(this.sampleCount, this.totalRows).toLocaleString()} random rows`;
428
+ return `Exporting ${Math.min(this.SampleCount, this.TotalRows).toLocaleString()} random rows`;
305
429
  case 'every-nth':
306
- return `Exporting every ${this.sampleInterval}${this.getOrdinalSuffix(this.sampleInterval)} row (~${this.estimatedRows.toLocaleString()} rows)`;
430
+ return `Exporting every ${this.SampleInterval}${this.getOrdinalSuffix(this.SampleInterval)} row (~${this.EstimatedRows.toLocaleString()} rows)`;
307
431
  default:
308
432
  return '';
309
433
  }
310
434
  }
435
+ /** @deprecated Use {@link SamplingDescription}. */
436
+ get samplingDescription() {
437
+ return this.SamplingDescription;
438
+ }
311
439
  /**
312
440
  * Get ordinal suffix for number
313
441
  */
@@ -319,72 +447,92 @@ export class ExportDialogComponent {
319
447
  /**
320
448
  * Handle format selection
321
449
  */
450
+ SelectFormat(format) {
451
+ this.SelectedFormat = format;
452
+ this.ExportError = null;
453
+ }
454
+ /** @deprecated Use {@link SelectFormat}. */
322
455
  selectFormat(format) {
323
- this.selectedFormat = format;
324
- this.exportError = null;
456
+ return this.SelectFormat(format);
325
457
  }
326
458
  /**
327
459
  * Handle cancel button
328
460
  */
329
- onCancel() {
461
+ OnCancel() {
330
462
  this._visible = false;
331
- this.closed.emit({ exported: false });
463
+ this.Closed.emit({ exported: false });
464
+ }
465
+ /** @deprecated Use {@link OnCancel}. */
466
+ onCancel() {
467
+ return this.OnCancel();
332
468
  }
333
469
  /**
334
470
  * Handle export button
335
471
  */
336
- async onExport() {
337
- if (!this.config?.data) {
338
- this.exportError = 'No data to export';
472
+ async OnExport() {
473
+ if (!this.Config?.data) {
474
+ this.ExportError = 'No data to export';
339
475
  return;
340
476
  }
341
- this.isExporting = true;
342
- this.exportError = null;
477
+ this.IsExporting = true;
478
+ this.ExportError = null;
343
479
  this.cdr.detectChanges();
344
480
  try {
345
481
  const options = {
346
- format: this.selectedFormat,
347
- fileName: this.fileName,
348
- includeHeaders: this.includeHeaders,
349
- columns: this.config.columns,
350
- sampling: this.exportService.buildSamplingOptions(this.samplingMode, this.sampleCount, this.sampleInterval)
482
+ format: this.SelectedFormat,
483
+ fileName: this.FileName,
484
+ includeHeaders: this.IncludeHeaders,
485
+ columns: this.Config.columns,
486
+ sampling: this.exportService.buildSamplingOptions(this.SamplingMode, this.SampleCount, this.SampleInterval)
351
487
  };
352
- const result = await this.exportService.export(this.config.data, options);
488
+ const result = await this.exportService.export(this.Config.data, options);
353
489
  if (result.success) {
354
490
  this.exportService.downloadResult(result);
355
491
  this._visible = false;
356
- this.closed.emit({
492
+ this.Closed.emit({
357
493
  exported: true,
358
494
  result,
359
495
  options: options
360
496
  });
361
497
  }
362
498
  else {
363
- this.exportError = result.error || 'Export failed';
499
+ this.ExportError = result.error || 'Export failed';
364
500
  }
365
501
  }
366
502
  catch (error) {
367
- this.exportError = error instanceof Error ? error.message : 'Export failed';
503
+ this.ExportError = error instanceof Error ? error.message : 'Export failed';
368
504
  }
369
505
  finally {
370
- this.isExporting = false;
506
+ this.IsExporting = false;
371
507
  this.cdr.detectChanges();
372
508
  }
373
509
  }
510
+ /** @deprecated Use {@link OnExport}. */
511
+ async onExport() {
512
+ return this.OnExport();
513
+ }
374
514
  /**
375
515
  * Check if show sampling options
376
516
  */
517
+ get ShowSamplingOptions() {
518
+ return this.Config?.showSamplingOptions !== false;
519
+ }
520
+ /** @deprecated Use {@link ShowSamplingOptions}. */
377
521
  get showSamplingOptions() {
378
- return this.config?.showSamplingOptions !== false;
522
+ return this.ShowSamplingOptions;
379
523
  }
380
524
  /**
381
525
  * Get dialog title
382
526
  */
527
+ get DialogTitle() {
528
+ return this.Config?.dialogTitle || 'Export Data';
529
+ }
530
+ /** @deprecated Use {@link DialogTitle}. */
383
531
  get dialogTitle() {
384
- return this.config?.dialogTitle || 'Export Data';
532
+ return this.DialogTitle;
385
533
  }
386
534
  static ɵfac = function ExportDialogComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ExportDialogComponent)(i0.ɵɵdirectiveInject(i1.ExportService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
387
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ExportDialogComponent, selectors: [["mj-export-dialog"]], inputs: { visible: "visible", config: "config" }, outputs: { closed: "closed" }, standalone: false, decls: 1, vars: 1, consts: [[1, "mj-export-backdrop", 3, "click"], ["role", "dialog", "aria-modal", "true", 1, "mj-export-dialog"], [1, "mj-export-header"], ["id", "export-dialog-title"], ["type", "button", "aria-label", "Close", 1, "mj-export-close", 3, "click"], [1, "fa-solid", "fa-times"], [1, "mj-export-content"], [1, "mj-export-section"], [1, "mj-export-label"], [1, "mj-export-formats"], ["type", "button", 1, "mj-export-format-btn", 3, "selected"], ["for", "exportFileName", 1, "mj-export-label"], [1, "mj-export-input-group"], ["type", "text", "id", "exportFileName", "placeholder", "Enter file name", 1, "mj-export-input", 3, "ngModelChange", "ngModel"], [1, "mj-export-input-hint"], [1, "mj-export-section", "mj-export-checkbox-section"], [1, "mj-export-checkbox"], ["type", "checkbox", 3, "ngModelChange", "ngModel"], [1, "mj-export-checkbox-mark"], [1, "mj-export-section", "mj-export-summary"], [1, "mj-export-summary-row"], [1, "mj-export-summary-label"], [1, "mj-export-summary-value"], [1, "mj-export-summary-value", "mj-export-highlight"], [1, "mj-export-error"], [1, "mj-export-actions"], ["type", "button", 1, "mj-export-btn", "mj-export-btn-primary", 3, "click", "disabled"], ["type", "button", 1, "mj-export-btn", "mj-export-btn-secondary", 3, "click", "disabled"], ["type", "button", 1, "mj-export-format-btn", 3, "click"], [1, "mj-export-format-label"], [1, "mj-export-format-desc"], [1, "mj-export-sampling-row"], [1, "mj-export-select", 3, "ngModelChange", "ngModel"], [3, "value"], ["type", "number", "placeholder", "Count", 1, "mj-export-number-input", 3, "ngModel", "min", "max"], ["type", "number", "placeholder", "Interval", 1, "mj-export-number-input", 3, "ngModel", "min", "max"], [1, "mj-export-sampling-desc"], ["type", "number", "placeholder", "Count", 1, "mj-export-number-input", 3, "ngModelChange", "ngModel", "min", "max"], ["type", "number", "placeholder", "Interval", 1, "mj-export-number-input", 3, "ngModelChange", "ngModel", "min", "max"], [1, "fa-solid", "fa-exclamation-circle"], [1, "fa-solid", "fa-download"], [1, "fa-solid", "fa-spinner", "fa-spin"]], template: function ExportDialogComponent_Template(rf, ctx) { if (rf & 1) {
535
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ExportDialogComponent, selectors: [["mj-export-dialog"]], inputs: { Visible: "Visible", visible: "visible", Config: "Config", config: "config" }, outputs: { Closed: "Closed", closed: "closed" }, standalone: false, decls: 1, vars: 1, consts: [[1, "mj-export-backdrop", 3, "click"], ["role", "dialog", "aria-modal", "true", 1, "mj-export-dialog"], [1, "mj-export-header"], ["id", "export-dialog-title"], ["type", "button", "aria-label", "Close", 1, "mj-export-close", 3, "click"], [1, "fa-solid", "fa-times"], [1, "mj-export-content"], [1, "mj-export-section"], [1, "mj-export-label"], [1, "mj-export-formats"], ["type", "button", 1, "mj-export-format-btn", 3, "selected"], ["for", "exportFileName", 1, "mj-export-label"], [1, "mj-export-input-group"], ["type", "text", "id", "exportFileName", "placeholder", "Enter file name", 1, "mj-export-input", 3, "ngModelChange", "ngModel"], [1, "mj-export-input-hint"], [1, "mj-export-section", "mj-export-checkbox-section"], [1, "mj-export-checkbox"], ["type", "checkbox", 3, "ngModelChange", "ngModel"], [1, "mj-export-checkbox-mark"], [1, "mj-export-section", "mj-export-summary"], [1, "mj-export-summary-row"], [1, "mj-export-summary-label"], [1, "mj-export-summary-value"], [1, "mj-export-summary-value", "mj-export-highlight"], [1, "mj-export-error"], [1, "mj-export-actions"], ["type", "button", 1, "mj-export-btn", "mj-export-btn-primary", 3, "click", "disabled"], ["type", "button", 1, "mj-export-btn", "mj-export-btn-secondary", 3, "click", "disabled"], ["type", "button", 1, "mj-export-format-btn", 3, "click"], [1, "mj-export-format-label"], [1, "mj-export-format-desc"], [1, "mj-export-sampling-row"], [1, "mj-export-select", 3, "ngModelChange", "ngModel"], [3, "value"], ["type", "number", "placeholder", "Count", 1, "mj-export-number-input", 3, "ngModel", "min", "max"], ["type", "number", "placeholder", "Interval", 1, "mj-export-number-input", 3, "ngModel", "min", "max"], [1, "mj-export-sampling-desc"], ["type", "number", "placeholder", "Count", 1, "mj-export-number-input", 3, "ngModelChange", "ngModel", "min", "max"], ["type", "number", "placeholder", "Interval", 1, "mj-export-number-input", 3, "ngModelChange", "ngModel", "min", "max"], [1, "fa-solid", "fa-exclamation-circle"], [1, "fa-solid", "fa-download"], [1, "fa-solid", "fa-spinner", "fa-spin"]], template: function ExportDialogComponent_Template(rf, ctx) { if (rf & 1) {
388
536
  i0.ɵɵconditionalCreate(0, ExportDialogComponent_Conditional_0_Template, 48, 15);
389
537
  } if (rf & 2) {
390
538
  i0.ɵɵconditional(ctx.visible ? 0 : -1);
@@ -393,10 +541,16 @@ export class ExportDialogComponent {
393
541
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ExportDialogComponent, [{
394
542
  type: Component,
395
543
  args: [{ standalone: false, selector: 'mj-export-dialog', template: "<!-- Backdrop -->\n@if (visible) {\n <div class=\"mj-export-backdrop\" (click)=\"onCancel()\"></div>\n\n <!-- Dialog -->\n <div class=\"mj-export-dialog\" role=\"dialog\" aria-modal=\"true\" [attr.aria-labelledby]=\"'export-dialog-title'\">\n <!-- Header -->\n <div class=\"mj-export-header\">\n <h2 id=\"export-dialog-title\">{{ dialogTitle }}</h2>\n <button type=\"button\" class=\"mj-export-close\" (click)=\"onCancel()\" aria-label=\"Close\">\n <span class=\"fa-solid fa-times\"></span>\n </button>\n </div>\n\n <!-- Content -->\n <div class=\"mj-export-content\">\n <!-- Format Selection -->\n <div class=\"mj-export-section\">\n <label class=\"mj-export-label\">Export Format</label>\n <div class=\"mj-export-formats\">\n @for (format of availableFormats; track format) {\n <button\n type=\"button\"\n class=\"mj-export-format-btn\"\n [class.selected]=\"selectedFormat === format\"\n (click)=\"selectFormat(format)\">\n <span class=\"fa-solid {{ getFormatInfo(format).icon }} mj-export-format-icon\"></span>\n <span class=\"mj-export-format-label\">{{ getFormatInfo(format).label }}</span>\n <span class=\"mj-export-format-desc\">{{ getFormatInfo(format).description }}</span>\n </button>\n }\n </div>\n </div>\n\n <!-- File Name -->\n <div class=\"mj-export-section\">\n <label class=\"mj-export-label\" for=\"exportFileName\">File Name</label>\n <div class=\"mj-export-input-group\">\n <input\n type=\"text\"\n id=\"exportFileName\"\n class=\"mj-export-input\"\n [(ngModel)]=\"fileName\"\n placeholder=\"Enter file name\" />\n <span class=\"mj-export-input-hint\">Extension added automatically</span>\n </div>\n </div>\n\n <!-- Include Headers -->\n <div class=\"mj-export-section mj-export-checkbox-section\">\n <label class=\"mj-export-checkbox\">\n <input type=\"checkbox\" [(ngModel)]=\"includeHeaders\" />\n <span class=\"mj-export-checkbox-mark\"></span>\n <span>Include column headers</span>\n </label>\n </div>\n\n <!-- Row Selection (Sampling) -->\n @if (showSamplingOptions) {\n <div class=\"mj-export-section\">\n <label class=\"mj-export-label\">Row Selection</label>\n <div class=\"mj-export-sampling-row\">\n <select class=\"mj-export-select\" [(ngModel)]=\"samplingMode\">\n @for (mode of samplingModes; track mode.mode) {\n <option [value]=\"mode.mode\">{{ mode.label }}</option>\n }\n </select>\n\n @if (needsSampleCount) {\n <input\n type=\"number\"\n class=\"mj-export-number-input\"\n [(ngModel)]=\"sampleCount\"\n [min]=\"1\"\n [max]=\"totalRows\"\n placeholder=\"Count\" />\n }\n\n @if (needsSampleInterval) {\n <input\n type=\"number\"\n class=\"mj-export-number-input\"\n [(ngModel)]=\"sampleInterval\"\n [min]=\"2\"\n [max]=\"totalRows\"\n placeholder=\"Interval\" />\n }\n </div>\n <div class=\"mj-export-sampling-desc\">\n {{ samplingDescription }}\n </div>\n </div>\n }\n\n <!-- Summary -->\n <div class=\"mj-export-section mj-export-summary\">\n <div class=\"mj-export-summary-row\">\n <span class=\"mj-export-summary-label\">Total rows available</span>\n <span class=\"mj-export-summary-value\">{{ totalRows | number }}</span>\n </div>\n <div class=\"mj-export-summary-row\">\n <span class=\"mj-export-summary-label\">Rows to export</span>\n <span class=\"mj-export-summary-value mj-export-highlight\">{{ estimatedRows | number }}</span>\n </div>\n </div>\n\n <!-- Error Message -->\n @if (exportError) {\n <div class=\"mj-export-error\">\n <span class=\"fa-solid fa-exclamation-circle\"></span>\n {{ exportError }}\n </div>\n }\n </div>\n\n <!-- Footer Actions -->\n <div class=\"mj-export-actions\">\n <button\n type=\"button\"\n class=\"mj-export-btn mj-export-btn-primary\"\n (click)=\"onExport()\"\n [disabled]=\"isExporting\">\n @if (!isExporting) {\n <span class=\"fa-solid fa-download\"></span>\n Export\n } @else {\n <span class=\"fa-solid fa-spinner fa-spin\"></span>\n Exporting...\n }\n </button>\n <button\n type=\"button\"\n class=\"mj-export-btn mj-export-btn-secondary\"\n (click)=\"onCancel()\"\n [disabled]=\"isExporting\">\n Cancel\n </button>\n </div>\n </div>\n}\n", styles: ["/* MJ Export Dialog */\n\n/* Backdrop */\n.mj-export-backdrop {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: var(--mj-bg-overlay);\n backdrop-filter: blur(2px);\n z-index: 1000;\n animation: fadeIn 0.15s ease-out;\n}\n\n/* Dialog Container */\n.mj-export-dialog {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background: var(--mj-bg-surface);\n border-radius: 12px;\n box-shadow: 0 25px 50px -12px var(--mj-bg-overlay);\n width: 480px;\n max-width: 95vw;\n max-height: 90vh;\n display: flex;\n flex-direction: column;\n z-index: 1001;\n animation: slideIn 0.2s ease-out;\n}\n\n/* Header */\n.mj-export-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 20px 24px;\n border-bottom: 1px solid var(--mj-border-default);\n}\n\n.mj-export-header h2 {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.mj-export-close {\n background: none;\n border: none;\n padding: 8px;\n cursor: pointer;\n color: var(--mj-text-muted);\n border-radius: 6px;\n transition: all 0.15s ease;\n}\n\n.mj-export-close:hover {\n background: var(--mj-bg-surface-card);\n color: var(--mj-text-secondary);\n}\n\n/* Content */\n.mj-export-content {\n padding: 24px;\n overflow-y: auto;\n flex: 1;\n}\n\n/* Sections */\n.mj-export-section {\n margin-bottom: 24px;\n}\n\n.mj-export-section:last-child {\n margin-bottom: 0;\n}\n\n.mj-export-label {\n display: block;\n font-size: 13px;\n font-weight: 500;\n color: var(--mj-text-secondary);\n margin-bottom: 8px;\n}\n\n/* Format Selection Buttons */\n.mj-export-formats {\n display: flex;\n gap: 12px;\n}\n\n.mj-export-format-btn {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 16px 12px;\n border: 2px solid var(--mj-border-default);\n border-radius: 10px;\n background: var(--mj-bg-surface);\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.mj-export-format-btn:hover {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 5%, var(--mj-bg-surface));\n}\n\n.mj-export-format-btn.selected {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 8%, var(--mj-bg-surface));\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 15%, transparent);\n}\n\n.mj-export-format-icon {\n font-size: 24px;\n margin-bottom: 8px;\n color: var(--mj-text-muted);\n}\n\n.mj-export-format-btn.selected .mj-export-format-icon {\n color: var(--mj-brand-primary);\n}\n\n.mj-export-format-label {\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-primary);\n margin-bottom: 4px;\n}\n\n.mj-export-format-desc {\n font-size: 11px;\n color: var(--mj-text-muted);\n text-align: center;\n}\n\n/* Input Group */\n.mj-export-input-group {\n display: flex;\n flex-direction: column;\n}\n\n.mj-export-input {\n width: 100%;\n padding: 10px 14px;\n border: 1px solid var(--mj-border-strong);\n border-radius: 8px;\n font-size: 14px;\n color: var(--mj-text-primary);\n background: var(--mj-bg-surface);\n transition: all 0.15s ease;\n box-sizing: border-box;\n}\n\n.mj-export-input:focus {\n outline: none;\n border-color: var(--mj-brand-primary);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 15%, transparent);\n}\n\n.mj-export-input-hint {\n font-size: 12px;\n color: var(--mj-text-disabled);\n margin-top: 4px;\n}\n\n/* Checkbox */\n.mj-export-checkbox-section {\n padding: 12px 0;\n}\n\n.mj-export-checkbox {\n display: flex;\n align-items: center;\n gap: 10px;\n cursor: pointer;\n font-size: 14px;\n color: var(--mj-text-secondary);\n}\n\n.mj-export-checkbox input[type=\"checkbox\"] {\n width: 18px;\n height: 18px;\n accent-color: var(--mj-brand-primary);\n cursor: pointer;\n}\n\n/* Select Dropdown */\n.mj-export-select {\n padding: 10px 14px;\n border: 1px solid var(--mj-border-strong);\n border-radius: 8px;\n font-size: 14px;\n color: var(--mj-text-primary);\n background: var(--mj-bg-surface);\n cursor: pointer;\n min-width: 160px;\n transition: all 0.15s ease;\n}\n\n.mj-export-select:focus {\n outline: none;\n border-color: var(--mj-brand-primary);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 15%, transparent);\n}\n\n/* Sampling Row */\n.mj-export-sampling-row {\n display: flex;\n gap: 12px;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.mj-export-number-input {\n width: 100px;\n padding: 10px 14px;\n border: 1px solid var(--mj-border-strong);\n border-radius: 8px;\n font-size: 14px;\n color: var(--mj-text-primary);\n background: var(--mj-bg-surface);\n transition: all 0.15s ease;\n}\n\n.mj-export-number-input:focus {\n outline: none;\n border-color: var(--mj-brand-primary);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 15%, transparent);\n}\n\n.mj-export-sampling-desc {\n font-size: 13px;\n color: var(--mj-text-muted);\n margin-top: 8px;\n font-style: italic;\n}\n\n/* Summary Section */\n.mj-export-summary {\n background: var(--mj-bg-surface-card);\n border-radius: 10px;\n padding: 16px;\n}\n\n.mj-export-summary-row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 6px 0;\n}\n\n.mj-export-summary-label {\n font-size: 14px;\n color: var(--mj-text-muted);\n}\n\n.mj-export-summary-value {\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.mj-export-highlight {\n color: var(--mj-brand-primary);\n font-size: 16px;\n}\n\n/* Error Message */\n.mj-export-error {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 16px;\n background: color-mix(in srgb, var(--mj-status-error) 8%, var(--mj-bg-surface));\n border: 1px solid color-mix(in srgb, var(--mj-status-error) 20%, var(--mj-bg-surface));\n border-radius: 8px;\n color: var(--mj-status-error);\n font-size: 14px;\n margin-top: 16px;\n}\n\n/* Footer Actions */\n.mj-export-actions {\n display: flex;\n gap: 12px;\n padding: 16px 24px;\n border-top: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n border-radius: 0 0 12px 12px;\n}\n\n.mj-export-btn {\n padding: 10px 20px;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 8px;\n transition: all 0.15s ease;\n border: none;\n}\n\n.mj-export-btn:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.mj-export-btn-primary {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n}\n\n.mj-export-btn-primary:hover:not(:disabled) {\n background: var(--mj-brand-primary-hover);\n}\n\n.mj-export-btn-secondary {\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n border: 1px solid var(--mj-border-strong);\n}\n\n.mj-export-btn-secondary:hover:not(:disabled) {\n background: var(--mj-bg-surface-card);\n}\n\n/* Animations */\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes slideIn {\n from {\n opacity: 0;\n transform: translate(-50%, -48%);\n }\n to {\n opacity: 1;\n transform: translate(-50%, -50%);\n }\n}\n\n/* Spinner animation */\n.fa-spin {\n animation: spin 1s linear infinite;\n}\n\n@keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n"] }]
396
- }], () => [{ type: i1.ExportService }, { type: i0.ChangeDetectorRef }], { visible: [{
544
+ }], () => [{ type: i1.ExportService }, { type: i0.ChangeDetectorRef }], { Visible: [{
545
+ type: Input
546
+ }], visible: [{
547
+ type: Input
548
+ }], Config: [{
397
549
  type: Input
398
550
  }], config: [{
399
551
  type: Input
552
+ }], Closed: [{
553
+ type: Output
400
554
  }], closed: [{
401
555
  type: Output
402
556
  }] }); })();
@@ -1 +1 @@
1
- {"version":3,"file":"export-dialog.component.js","sourceRoot":"","sources":["../../src/lib/export-dialog.component.ts","../../src/lib/export-dialog.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAqB,MAAM,eAAe,CAAC;;;;;;;;ICqB9E,kCAIiC;IAA/B,6NAAS,8BAAoB,KAAC;IAC9B,uBAAqF;IACrF,gCAAqC;IAAA,YAAiC;IAAA,iBAAO;IAC7E,gCAAoC;IAAA,YAAuC;IAC7E,AAD6E,iBAAO,EAC3E;;;;IALP,+DAA4C;IAEtC,cAAuE;IAAvE,cAAA,8FAAuE,CAAA;IACxC,eAAiC;IAAjC,2DAAiC;IAClC,eAAuC;IAAvC,iEAAuC;;;IAoCzE,kCAA4B;IAAA,YAAgB;IAAA,iBAAS;;;IAA7C,oCAAmB;IAAC,cAAgB;IAAhB,mCAAgB;;;;IAK9C,iCAMwB;IAHtB,iVAAyB;IAH3B,iBAMwB;;;IAHtB,kDAAyB;IAEzB,AADA,uBAAS,yBACQ;;;;IAKnB,iCAM2B;IAHzB,uVAA4B;IAH9B,iBAM2B;;;IAHzB,qDAA4B;IAE5B,AADA,uBAAS,yBACQ;;;;IAxBvB,AADF,8BAA+B,eACE;IAAA,6BAAa;IAAA,iBAAQ;IAElD,AADF,+BAAoC,iB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AmB,KAAK,KAAK,CAAC;IACpD,CAAC;IAED;;OAEG;IACH,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,MAAM,EAAE,WAAW,IAAI,aAAa,CAAC;IACnD,CAAC;+GA/MU,qBAAqB;6DAArB,qBAAqB;YC3BlC,+EAAe;;YAAf,sCA0IC;;;iFD/GY,qBAAqB;cANjC,SAAS;6BACI,KAAK,YACP,kBAAkB;;kBA6B3B,KAAK;;kBAYL,KAAK;;kBAEL,MAAM;;kFAvCI,qBAAqB","sourcesContent":["import { Component, Input, Output, EventEmitter, ChangeDetectorRef } from '@angular/core';\nimport {\n ExportFormat,\n ExportData,\n ExportColumn,\n SamplingMode,\n ExportOptions,\n ExportResult\n} from '@memberjunction/export-engine';\nimport { ExportService, ExportDialogConfig, ExportDialogResult } from './export.service';\n\n/**\n * Export dialog component with progressive UX\n * Provides format selection, sampling options, and export preview\n *\n * Usage:\n * <mj-export-dialog\n * [visible]=\"showExportDialog\"\n * [config]=\"exportConfig\"\n * (closed)=\"onExportDialogClosed($event)\">\n * </mj-export-dialog>\n */\n@Component({\n standalone: false,\n selector: 'mj-export-dialog',\n templateUrl: './export-dialog.component.html',\n styleUrls: ['./export-dialog.component.css']\n})\nexport class ExportDialogComponent {\n // Form state\n selectedFormat: ExportFormat = 'excel';\n fileName = 'export';\n includeHeaders = true;\n samplingMode: SamplingMode = 'all';\n sampleCount = 100;\n sampleInterval = 10;\n\n // UI state\n isExporting = false;\n exportError: string | null = null;\n\n // Available options\n availableFormats: ExportFormat[] = ['excel', 'csv', 'json'];\n samplingModes: { mode: SamplingMode; label: string; description: string }[];\n\n constructor(\n private exportService: ExportService,\n private cdr: ChangeDetectorRef\n ) {\n this.samplingModes = this.exportService.getSamplingModes();\n }\n\n private _visible = false;\n @Input()\n get visible(): boolean {\n return this._visible;\n }\n set visible(value: boolean) {\n if (value && !this._visible) {\n this.initializeFromConfig();\n }\n this._visible = value;\n this.cdr.detectChanges();\n }\n\n @Input() config: ExportDialogConfig | null = null;\n\n @Output() closed = new EventEmitter<ExportDialogResult>();\n\n /**\n * Initialize form from config\n */\n private initializeFromConfig(): void {\n if (!this.config) return;\n\n this.selectedFormat = this.config.defaultFormat || 'excel';\n this.fileName = this.config.defaultFileName || 'export';\n this.samplingMode = this.config.defaultSamplingMode || 'all';\n this.sampleCount = this.config.defaultSampleCount || 100;\n this.availableFormats = this.config.availableFormats || ['excel', 'csv', 'json'];\n this.exportError = null;\n this.isExporting = false;\n }\n\n /**\n * Get format info for display\n */\n getFormatInfo(format: ExportFormat) {\n return this.exportService.getFormatInfo(format);\n }\n\n /**\n * Check if sampling needs a count input\n */\n get needsSampleCount(): boolean {\n return this.samplingMode === 'top' || this.samplingMode === 'bottom' || this.samplingMode === 'random';\n }\n\n /**\n * Check if sampling needs an interval input\n */\n get needsSampleInterval(): boolean {\n return this.samplingMode === 'every-nth';\n }\n\n /**\n * Get total row count\n */\n get totalRows(): number {\n return this.config?.data?.length || 0;\n }\n\n /**\n * Estimate exported row count\n */\n get estimatedRows(): number {\n const total = this.totalRows;\n switch (this.samplingMode) {\n case 'all':\n return total;\n case 'top':\n case 'bottom':\n case 'random':\n return Math.min(this.sampleCount, total);\n case 'every-nth':\n return Math.ceil(total / this.sampleInterval);\n default:\n return total;\n }\n }\n\n /**\n * Get sampling description\n */\n get samplingDescription(): string {\n switch (this.samplingMode) {\n case 'all':\n return `Exporting all ${this.totalRows.toLocaleString()} rows`;\n case 'top':\n return `Exporting first ${Math.min(this.sampleCount, this.totalRows).toLocaleString()} rows`;\n case 'bottom':\n return `Exporting last ${Math.min(this.sampleCount, this.totalRows).toLocaleString()} rows`;\n case 'random':\n return `Exporting ${Math.min(this.sampleCount, this.totalRows).toLocaleString()} random rows`;\n case 'every-nth':\n return `Exporting every ${this.sampleInterval}${this.getOrdinalSuffix(this.sampleInterval)} row (~${this.estimatedRows.toLocaleString()} rows)`;\n default:\n return '';\n }\n }\n\n /**\n * Get ordinal suffix for number\n */\n private getOrdinalSuffix(n: number): string {\n const s = ['th', 'st', 'nd', 'rd'];\n const v = n % 100;\n return s[(v - 20) % 10] || s[v] || s[0];\n }\n\n /**\n * Handle format selection\n */\n selectFormat(format: ExportFormat): void {\n this.selectedFormat = format;\n this.exportError = null;\n }\n\n /**\n * Handle cancel button\n */\n onCancel(): void {\n this._visible = false;\n this.closed.emit({ exported: false });\n }\n\n /**\n * Handle export button\n */\n async onExport(): Promise<void> {\n if (!this.config?.data) {\n this.exportError = 'No data to export';\n return;\n }\n\n this.isExporting = true;\n this.exportError = null;\n this.cdr.detectChanges();\n\n try {\n const options: Partial<ExportOptions> = {\n format: this.selectedFormat,\n fileName: this.fileName,\n includeHeaders: this.includeHeaders,\n columns: this.config.columns,\n sampling: this.exportService.buildSamplingOptions(\n this.samplingMode,\n this.sampleCount,\n this.sampleInterval\n )\n };\n\n const result = await this.exportService.export(this.config.data, options);\n\n if (result.success) {\n this.exportService.downloadResult(result);\n this._visible = false;\n this.closed.emit({\n exported: true,\n result,\n options: options as ExportOptions\n });\n } else {\n this.exportError = result.error || 'Export failed';\n }\n } catch (error) {\n this.exportError = error instanceof Error ? error.message : 'Export failed';\n } finally {\n this.isExporting = false;\n this.cdr.detectChanges();\n }\n }\n\n /**\n * Check if show sampling options\n */\n get showSamplingOptions(): boolean {\n return this.config?.showSamplingOptions !== false;\n }\n\n /**\n * Get dialog title\n */\n get dialogTitle(): string {\n return this.config?.dialogTitle || 'Export Data';\n }\n}\n","<!-- Backdrop -->\n@if (visible) {\n <div class=\"mj-export-backdrop\" (click)=\"onCancel()\"></div>\n\n <!-- Dialog -->\n <div class=\"mj-export-dialog\" role=\"dialog\" aria-modal=\"true\" [attr.aria-labelledby]=\"'export-dialog-title'\">\n <!-- Header -->\n <div class=\"mj-export-header\">\n <h2 id=\"export-dialog-title\">{{ dialogTitle }}</h2>\n <button type=\"button\" class=\"mj-export-close\" (click)=\"onCancel()\" aria-label=\"Close\">\n <span class=\"fa-solid fa-times\"></span>\n </button>\n </div>\n\n <!-- Content -->\n <div class=\"mj-export-content\">\n <!-- Format Selection -->\n <div class=\"mj-export-section\">\n <label class=\"mj-export-label\">Export Format</label>\n <div class=\"mj-export-formats\">\n @for (format of availableFormats; track format) {\n <button\n type=\"button\"\n class=\"mj-export-format-btn\"\n [class.selected]=\"selectedFormat === format\"\n (click)=\"selectFormat(format)\">\n <span class=\"fa-solid {{ getFormatInfo(format).icon }} mj-export-format-icon\"></span>\n <span class=\"mj-export-format-label\">{{ getFormatInfo(format).label }}</span>\n <span class=\"mj-export-format-desc\">{{ getFormatInfo(format).description }}</span>\n </button>\n }\n </div>\n </div>\n\n <!-- File Name -->\n <div class=\"mj-export-section\">\n <label class=\"mj-export-label\" for=\"exportFileName\">File Name</label>\n <div class=\"mj-export-input-group\">\n <input\n type=\"text\"\n id=\"exportFileName\"\n class=\"mj-export-input\"\n [(ngModel)]=\"fileName\"\n placeholder=\"Enter file name\" />\n <span class=\"mj-export-input-hint\">Extension added automatically</span>\n </div>\n </div>\n\n <!-- Include Headers -->\n <div class=\"mj-export-section mj-export-checkbox-section\">\n <label class=\"mj-export-checkbox\">\n <input type=\"checkbox\" [(ngModel)]=\"includeHeaders\" />\n <span class=\"mj-export-checkbox-mark\"></span>\n <span>Include column headers</span>\n </label>\n </div>\n\n <!-- Row Selection (Sampling) -->\n @if (showSamplingOptions) {\n <div class=\"mj-export-section\">\n <label class=\"mj-export-label\">Row Selection</label>\n <div class=\"mj-export-sampling-row\">\n <select class=\"mj-export-select\" [(ngModel)]=\"samplingMode\">\n @for (mode of samplingModes; track mode.mode) {\n <option [value]=\"mode.mode\">{{ mode.label }}</option>\n }\n </select>\n\n @if (needsSampleCount) {\n <input\n type=\"number\"\n class=\"mj-export-number-input\"\n [(ngModel)]=\"sampleCount\"\n [min]=\"1\"\n [max]=\"totalRows\"\n placeholder=\"Count\" />\n }\n\n @if (needsSampleInterval) {\n <input\n type=\"number\"\n class=\"mj-export-number-input\"\n [(ngModel)]=\"sampleInterval\"\n [min]=\"2\"\n [max]=\"totalRows\"\n placeholder=\"Interval\" />\n }\n </div>\n <div class=\"mj-export-sampling-desc\">\n {{ samplingDescription }}\n </div>\n </div>\n }\n\n <!-- Summary -->\n <div class=\"mj-export-section mj-export-summary\">\n <div class=\"mj-export-summary-row\">\n <span class=\"mj-export-summary-label\">Total rows available</span>\n <span class=\"mj-export-summary-value\">{{ totalRows | number }}</span>\n </div>\n <div class=\"mj-export-summary-row\">\n <span class=\"mj-export-summary-label\">Rows to export</span>\n <span class=\"mj-export-summary-value mj-export-highlight\">{{ estimatedRows | number }}</span>\n </div>\n </div>\n\n <!-- Error Message -->\n @if (exportError) {\n <div class=\"mj-export-error\">\n <span class=\"fa-solid fa-exclamation-circle\"></span>\n {{ exportError }}\n </div>\n }\n </div>\n\n <!-- Footer Actions -->\n <div class=\"mj-export-actions\">\n <button\n type=\"button\"\n class=\"mj-export-btn mj-export-btn-primary\"\n (click)=\"onExport()\"\n [disabled]=\"isExporting\">\n @if (!isExporting) {\n <span class=\"fa-solid fa-download\"></span>\n Export\n } @else {\n <span class=\"fa-solid fa-spinner fa-spin\"></span>\n Exporting...\n }\n </button>\n <button\n type=\"button\"\n class=\"mj-export-btn mj-export-btn-secondary\"\n (click)=\"onCancel()\"\n [disabled]=\"isExporting\">\n Cancel\n </button>\n </div>\n </div>\n}\n"]}
1
+ {"version":3,"file":"export-dialog.component.js","sourceRoot":"","sources":["../../src/lib/export-dialog.component.ts","../../src/lib/export-dialog.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAqB,MAAM,eAAe,CAAC;;;;;;;;ICqB9E,kCAIiC;IAA/B,6NAAS,8BAAoB,KAAC;IAC9B,uBAAqF;IACrF,gCAAqC;IAAA,YAAiC;IAAA,iBAAO;IAC7E,gCAAoC;IAAA,YAAuC;IAC7E,AAD6E,iBAAO,EAC3E;;;;IALP,+DAA4C;IAEtC,cAAuE;IAAvE,cAAA,8FAAuE,C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;IAC3C,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;+GA3XU,qBAAqB;6DAArB,qBAAqB;YC3BlC,+EAAe;;YAAf,sCA0IC;;;iFD/GY,qBAAqB;cANjC,SAAS;6BACI,KAAK,YACP,kBAAkB;;kBAuH3B,KAAK;;kBAiBL,KAAK;;kBAIL,KAAK;;kBAGL,KAAK;;kBAQL,MAAM;;kBASN,MAAM;;kFA5JI,qBAAqB","sourcesContent":["import { Component, Input, Output, EventEmitter, ChangeDetectorRef } from '@angular/core';\nimport {\n ExportFormat,\n ExportData,\n ExportColumn,\n SamplingMode,\n ExportOptions,\n ExportResult\n} from '@memberjunction/export-engine';\nimport { ExportService, ExportDialogConfig, ExportDialogResult } from './export.service';\n\n/**\n * Export dialog component with progressive UX\n * Provides format selection, sampling options, and export preview\n *\n * Usage:\n * <mj-export-dialog\n * [visible]=\"showExportDialog\"\n * [config]=\"exportConfig\"\n * (closed)=\"onExportDialogClosed($event)\">\n * </mj-export-dialog>\n */\n@Component({\n standalone: false,\n selector: 'mj-export-dialog',\n templateUrl: './export-dialog.component.html',\n styleUrls: ['./export-dialog.component.css']\n})\nexport class ExportDialogComponent {\n // Form state\n SelectedFormat: ExportFormat = 'excel';\n\n /** @deprecated Use {@link SelectedFormat}. */\n get selectedFormat(): ExportFormat {\n return this.SelectedFormat;\n }\n /** @deprecated Use {@link SelectedFormat}. */\n set selectedFormat(value: ExportFormat) {\n this.SelectedFormat = value;\n }\n FileName = 'export';\n\n /** @deprecated Use {@link FileName}. */\n get fileName() {\n return this.FileName;\n }\n /** @deprecated Use {@link FileName}. */\n set fileName(value) {\n this.FileName = value;\n }\n IncludeHeaders = true;\n\n /** @deprecated Use {@link IncludeHeaders}. */\n get includeHeaders() {\n return this.IncludeHeaders;\n }\n /** @deprecated Use {@link IncludeHeaders}. */\n set includeHeaders(value) {\n this.IncludeHeaders = value;\n }\n SamplingMode: SamplingMode = 'all';\n\n /** @deprecated Use {@link SamplingMode}. */\n get samplingMode(): SamplingMode {\n return this.SamplingMode;\n }\n /** @deprecated Use {@link SamplingMode}. */\n set samplingMode(value: SamplingMode) {\n this.SamplingMode = value;\n }\n SampleCount = 100;\n\n /** @deprecated Use {@link SampleCount}. */\n get sampleCount() {\n return this.SampleCount;\n }\n /** @deprecated Use {@link SampleCount}. */\n set sampleCount(value) {\n this.SampleCount = value;\n }\n SampleInterval = 10;\n\n /** @deprecated Use {@link SampleInterval}. */\n get sampleInterval() {\n return this.SampleInterval;\n }\n /** @deprecated Use {@link SampleInterval}. */\n set sampleInterval(value) {\n this.SampleInterval = value;\n }\n\n // UI state\n IsExporting = false;\n\n /** @deprecated Use {@link IsExporting}. */\n get isExporting() {\n return this.IsExporting;\n }\n /** @deprecated Use {@link IsExporting}. */\n set isExporting(value) {\n this.IsExporting = value;\n }\n ExportError: string | null = null;\n\n /** @deprecated Use {@link ExportError}. */\n get exportError(): string | null {\n return this.ExportError;\n }\n /** @deprecated Use {@link ExportError}. */\n set exportError(value: string | null) {\n this.ExportError = value;\n }\n\n // Available options\n AvailableFormats: ExportFormat[] = ['excel', 'csv', 'json'];\n\n /** @deprecated Use {@link AvailableFormats}. */\n get availableFormats(): ExportFormat[] {\n return this.AvailableFormats;\n }\n /** @deprecated Use {@link AvailableFormats}. */\n set availableFormats(value: ExportFormat[]) {\n this.AvailableFormats = value;\n }\n SamplingModes: { mode: SamplingMode; label: string; description: string }[];\n\n /** @deprecated Use {@link SamplingModes}. */\n get samplingModes(): { mode: SamplingMode; label: string; description: string }[] {\n return this.SamplingModes;\n }\n /** @deprecated Use {@link SamplingModes}. */\n set samplingModes(value: { mode: SamplingMode; label: string; description: string }[]) {\n this.SamplingModes = value;\n }\n\n constructor(\n private exportService: ExportService,\n private cdr: ChangeDetectorRef\n ) {\n this.SamplingModes = this.exportService.getSamplingModes();\n }\n\n private _visible = false;\n @Input()\n get Visible(): boolean {\n return this._visible;\n }\n set Visible(value: boolean) {\n if (value && !this._visible) {\n this.initializeFromConfig();\n }\n this._visible = value;\n this.cdr.detectChanges();\n }\n\n /** @deprecated Use {@link Visible}. */\n get visible(): boolean {\n return this.Visible;\n }\n /** @deprecated Use {@link Visible}. */\n @Input() set visible(value: boolean) {\n this.Visible = value;\n }\n\n @Input() Config: ExportDialogConfig | null = null;\n\n /** @deprecated Use {@link Config}. */\n @Input() set config(value: ExportDialogConfig | null) {\n this.Config = value;\n }\n /** @deprecated Use {@link Config}. */\n get config(): ExportDialogConfig | null {\n return this.Config;\n }\n\n @Output() Closed = new EventEmitter<ExportDialogResult>();\n\n /**\n * @deprecated Use {@link Closed}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (closed) keeps working. Must stay AFTER Closed: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() closed = this.Closed;\n\n /**\n * Initialize form from config\n */\n private initializeFromConfig(): void {\n if (!this.Config) return;\n\n this.SelectedFormat = this.Config.defaultFormat || 'excel';\n this.FileName = this.Config.defaultFileName || 'export';\n this.SamplingMode = this.Config.defaultSamplingMode || 'all';\n this.SampleCount = this.Config.defaultSampleCount || 100;\n this.AvailableFormats = this.Config.availableFormats || ['excel', 'csv', 'json'];\n this.ExportError = null;\n this.IsExporting = false;\n }\n\n /**\n * Get format info for display\n */\n GetFormatInfo(format: ExportFormat) {\n return this.exportService.getFormatInfo(format);\n }\n\n /** @deprecated Use {@link GetFormatInfo}. */\n getFormatInfo(format: ExportFormat) {\n return this.GetFormatInfo(format);\n }\n\n /**\n * Check if sampling needs a count input\n */\n get NeedsSampleCount(): boolean {\n return this.SamplingMode === 'top' || this.SamplingMode === 'bottom' || this.SamplingMode === 'random';\n }\n\n /** @deprecated Use {@link NeedsSampleCount}. */\n get needsSampleCount(): boolean {\n return this.NeedsSampleCount;\n }\n\n /**\n * Check if sampling needs an interval input\n */\n get NeedsSampleInterval(): boolean {\n return this.SamplingMode === 'every-nth';\n }\n\n /** @deprecated Use {@link NeedsSampleInterval}. */\n get needsSampleInterval(): boolean {\n return this.NeedsSampleInterval;\n }\n\n /**\n * Get total row count\n */\n get TotalRows(): number {\n return this.Config?.data?.length || 0;\n }\n\n /** @deprecated Use {@link TotalRows}. */\n get totalRows(): number {\n return this.TotalRows;\n }\n\n /**\n * Estimate exported row count\n */\n get EstimatedRows(): number {\n const total = this.TotalRows;\n switch (this.SamplingMode) {\n case 'all':\n return total;\n case 'top':\n case 'bottom':\n case 'random':\n return Math.min(this.SampleCount, total);\n case 'every-nth':\n return Math.ceil(total / this.SampleInterval);\n default:\n return total;\n }\n }\n\n /** @deprecated Use {@link EstimatedRows}. */\n get estimatedRows(): number {\n return this.EstimatedRows;\n }\n\n /**\n * Get sampling description\n */\n get SamplingDescription(): string {\n switch (this.SamplingMode) {\n case 'all':\n return `Exporting all ${this.TotalRows.toLocaleString()} rows`;\n case 'top':\n return `Exporting first ${Math.min(this.SampleCount, this.TotalRows).toLocaleString()} rows`;\n case 'bottom':\n return `Exporting last ${Math.min(this.SampleCount, this.TotalRows).toLocaleString()} rows`;\n case 'random':\n return `Exporting ${Math.min(this.SampleCount, this.TotalRows).toLocaleString()} random rows`;\n case 'every-nth':\n return `Exporting every ${this.SampleInterval}${this.getOrdinalSuffix(this.SampleInterval)} row (~${this.EstimatedRows.toLocaleString()} rows)`;\n default:\n return '';\n }\n }\n\n /** @deprecated Use {@link SamplingDescription}. */\n get samplingDescription(): string {\n return this.SamplingDescription;\n }\n\n /**\n * Get ordinal suffix for number\n */\n private getOrdinalSuffix(n: number): string {\n const s = ['th', 'st', 'nd', 'rd'];\n const v = n % 100;\n return s[(v - 20) % 10] || s[v] || s[0];\n }\n\n /**\n * Handle format selection\n */\n SelectFormat(format: ExportFormat): void {\n this.SelectedFormat = format;\n this.ExportError = null;\n }\n\n /** @deprecated Use {@link SelectFormat}. */\n selectFormat(format: ExportFormat): void {\n return this.SelectFormat(format);\n }\n\n /**\n * Handle cancel button\n */\n OnCancel(): void {\n this._visible = false;\n this.Closed.emit({ exported: false });\n }\n\n /** @deprecated Use {@link OnCancel}. */\n onCancel(): void {\n return this.OnCancel();\n }\n\n /**\n * Handle export button\n */\n async OnExport(): Promise<void> {\n if (!this.Config?.data) {\n this.ExportError = 'No data to export';\n return;\n }\n\n this.IsExporting = true;\n this.ExportError = null;\n this.cdr.detectChanges();\n\n try {\n const options: Partial<ExportOptions> = {\n format: this.SelectedFormat,\n fileName: this.FileName,\n includeHeaders: this.IncludeHeaders,\n columns: this.Config.columns,\n sampling: this.exportService.buildSamplingOptions(\n this.SamplingMode,\n this.SampleCount,\n this.SampleInterval\n )\n };\n\n const result = await this.exportService.export(this.Config.data, options);\n\n if (result.success) {\n this.exportService.downloadResult(result);\n this._visible = false;\n this.Closed.emit({\n exported: true,\n result,\n options: options as ExportOptions\n });\n } else {\n this.ExportError = result.error || 'Export failed';\n }\n } catch (error) {\n this.ExportError = error instanceof Error ? error.message : 'Export failed';\n } finally {\n this.IsExporting = false;\n this.cdr.detectChanges();\n }\n }\n\n /** @deprecated Use {@link OnExport}. */\n async onExport(): Promise<void> {\n return this.OnExport();\n }\n\n /**\n * Check if show sampling options\n */\n get ShowSamplingOptions(): boolean {\n return this.Config?.showSamplingOptions !== false;\n }\n\n /** @deprecated Use {@link ShowSamplingOptions}. */\n get showSamplingOptions(): boolean {\n return this.ShowSamplingOptions;\n }\n\n /**\n * Get dialog title\n */\n get DialogTitle(): string {\n return this.Config?.dialogTitle || 'Export Data';\n }\n\n /** @deprecated Use {@link DialogTitle}. */\n get dialogTitle(): string {\n return this.DialogTitle;\n }\n}\n","<!-- Backdrop -->\n@if (visible) {\n <div class=\"mj-export-backdrop\" (click)=\"onCancel()\"></div>\n\n <!-- Dialog -->\n <div class=\"mj-export-dialog\" role=\"dialog\" aria-modal=\"true\" [attr.aria-labelledby]=\"'export-dialog-title'\">\n <!-- Header -->\n <div class=\"mj-export-header\">\n <h2 id=\"export-dialog-title\">{{ dialogTitle }}</h2>\n <button type=\"button\" class=\"mj-export-close\" (click)=\"onCancel()\" aria-label=\"Close\">\n <span class=\"fa-solid fa-times\"></span>\n </button>\n </div>\n\n <!-- Content -->\n <div class=\"mj-export-content\">\n <!-- Format Selection -->\n <div class=\"mj-export-section\">\n <label class=\"mj-export-label\">Export Format</label>\n <div class=\"mj-export-formats\">\n @for (format of availableFormats; track format) {\n <button\n type=\"button\"\n class=\"mj-export-format-btn\"\n [class.selected]=\"selectedFormat === format\"\n (click)=\"selectFormat(format)\">\n <span class=\"fa-solid {{ getFormatInfo(format).icon }} mj-export-format-icon\"></span>\n <span class=\"mj-export-format-label\">{{ getFormatInfo(format).label }}</span>\n <span class=\"mj-export-format-desc\">{{ getFormatInfo(format).description }}</span>\n </button>\n }\n </div>\n </div>\n\n <!-- File Name -->\n <div class=\"mj-export-section\">\n <label class=\"mj-export-label\" for=\"exportFileName\">File Name</label>\n <div class=\"mj-export-input-group\">\n <input\n type=\"text\"\n id=\"exportFileName\"\n class=\"mj-export-input\"\n [(ngModel)]=\"fileName\"\n placeholder=\"Enter file name\" />\n <span class=\"mj-export-input-hint\">Extension added automatically</span>\n </div>\n </div>\n\n <!-- Include Headers -->\n <div class=\"mj-export-section mj-export-checkbox-section\">\n <label class=\"mj-export-checkbox\">\n <input type=\"checkbox\" [(ngModel)]=\"includeHeaders\" />\n <span class=\"mj-export-checkbox-mark\"></span>\n <span>Include column headers</span>\n </label>\n </div>\n\n <!-- Row Selection (Sampling) -->\n @if (showSamplingOptions) {\n <div class=\"mj-export-section\">\n <label class=\"mj-export-label\">Row Selection</label>\n <div class=\"mj-export-sampling-row\">\n <select class=\"mj-export-select\" [(ngModel)]=\"samplingMode\">\n @for (mode of samplingModes; track mode.mode) {\n <option [value]=\"mode.mode\">{{ mode.label }}</option>\n }\n </select>\n\n @if (needsSampleCount) {\n <input\n type=\"number\"\n class=\"mj-export-number-input\"\n [(ngModel)]=\"sampleCount\"\n [min]=\"1\"\n [max]=\"totalRows\"\n placeholder=\"Count\" />\n }\n\n @if (needsSampleInterval) {\n <input\n type=\"number\"\n class=\"mj-export-number-input\"\n [(ngModel)]=\"sampleInterval\"\n [min]=\"2\"\n [max]=\"totalRows\"\n placeholder=\"Interval\" />\n }\n </div>\n <div class=\"mj-export-sampling-desc\">\n {{ samplingDescription }}\n </div>\n </div>\n }\n\n <!-- Summary -->\n <div class=\"mj-export-section mj-export-summary\">\n <div class=\"mj-export-summary-row\">\n <span class=\"mj-export-summary-label\">Total rows available</span>\n <span class=\"mj-export-summary-value\">{{ totalRows | number }}</span>\n </div>\n <div class=\"mj-export-summary-row\">\n <span class=\"mj-export-summary-label\">Rows to export</span>\n <span class=\"mj-export-summary-value mj-export-highlight\">{{ estimatedRows | number }}</span>\n </div>\n </div>\n\n <!-- Error Message -->\n @if (exportError) {\n <div class=\"mj-export-error\">\n <span class=\"fa-solid fa-exclamation-circle\"></span>\n {{ exportError }}\n </div>\n }\n </div>\n\n <!-- Footer Actions -->\n <div class=\"mj-export-actions\">\n <button\n type=\"button\"\n class=\"mj-export-btn mj-export-btn-primary\"\n (click)=\"onExport()\"\n [disabled]=\"isExporting\">\n @if (!isExporting) {\n <span class=\"fa-solid fa-download\"></span>\n Export\n } @else {\n <span class=\"fa-solid fa-spinner fa-spin\"></span>\n Exporting...\n }\n </button>\n <button\n type=\"button\"\n class=\"mj-export-btn mj-export-btn-secondary\"\n (click)=\"onCancel()\"\n [disabled]=\"isExporting\">\n Cancel\n </button>\n </div>\n </div>\n}\n"]}
@@ -45,14 +45,20 @@ export declare class ExportService {
45
45
  * @param options Export options
46
46
  * @returns Export result with buffer and metadata
47
47
  */
48
+ Export(data: ExportData, options?: Partial<ExportOptions>): Promise<ExportResult>;
49
+ /** @deprecated Use {@link Export}. */
48
50
  export(data: ExportData, options?: Partial<ExportOptions>): Promise<ExportResult>;
49
51
  /**
50
52
  * Export to Excel format
51
53
  */
54
+ ToExcel(data: ExportData, options?: Omit<Partial<ExportOptions>, 'format'>): Promise<ExportResult>;
55
+ /** @deprecated Use {@link ToExcel}. */
52
56
  toExcel(data: ExportData, options?: Omit<Partial<ExportOptions>, 'format'>): Promise<ExportResult>;
53
57
  /**
54
58
  * Export to CSV format
55
59
  */
60
+ ToCSV(data: ExportData, options?: Omit<Partial<ExportOptions>, 'format'>): Promise<ExportResult>;
61
+ /** @deprecated Use {@link ToCSV}. */
56
62
  toCSV(data: ExportData, options?: Omit<Partial<ExportOptions>, 'format'>): Promise<ExportResult>;
57
63
  /**
58
64
  * Export to JSON format
@@ -61,21 +67,33 @@ export declare class ExportService {
61
67
  /**
62
68
  * Get supported export formats
63
69
  */
70
+ GetSupportedFormats(): ExportFormat[];
71
+ /** @deprecated Use {@link GetSupportedFormats}. */
64
72
  getSupportedFormats(): ExportFormat[];
65
73
  /**
66
74
  * Download the export result as a file
67
75
  * @param result Export result containing the data
68
76
  */
77
+ DownloadResult(result: ExportResult): void;
78
+ /** @deprecated Use {@link DownloadResult}. */
69
79
  downloadResult(result: ExportResult): void;
70
80
  /**
71
81
  * Export and immediately download
72
82
  * @param data Data to export
73
83
  * @param options Export options
74
84
  */
85
+ ExportAndDownload(data: ExportData, options?: Partial<ExportOptions>): Promise<ExportResult>;
86
+ /** @deprecated Use {@link ExportAndDownload}. */
75
87
  exportAndDownload(data: ExportData, options?: Partial<ExportOptions>): Promise<ExportResult>;
76
88
  /**
77
89
  * Get available sampling modes with display labels
78
90
  */
91
+ GetSamplingModes(): {
92
+ mode: SamplingMode;
93
+ label: string;
94
+ description: string;
95
+ }[];
96
+ /** @deprecated Use {@link GetSamplingModes}. */
79
97
  getSamplingModes(): {
80
98
  mode: SamplingMode;
81
99
  label: string;
@@ -84,6 +102,12 @@ export declare class ExportService {
84
102
  /**
85
103
  * Get format display info
86
104
  */
105
+ GetFormatInfo(format: ExportFormat): {
106
+ label: string;
107
+ icon: string;
108
+ description: string;
109
+ };
110
+ /** @deprecated Use {@link GetFormatInfo}. */
87
111
  getFormatInfo(format: ExportFormat): {
88
112
  label: string;
89
113
  icon: string;
@@ -92,6 +116,8 @@ export declare class ExportService {
92
116
  /**
93
117
  * Build sampling options from user selections
94
118
  */
119
+ BuildSamplingOptions(mode: SamplingMode, count?: number, interval?: number): SamplingOptions;
120
+ /** @deprecated Use {@link BuildSamplingOptions}. */
95
121
  buildSamplingOptions(mode: SamplingMode, count?: number, interval?: number): SamplingOptions;
96
122
  static ɵfac: i0.ɵɵFactoryDeclaration<ExportService, never>;
97
123
  static ɵprov: i0.ɵɵInjectableDeclaration<ExportService>;
@@ -1 +1 @@
1
- {"version":3,"file":"export.service.d.ts","sourceRoot":"","sources":["../../src/lib/export.service.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,eAAe,EAChB,MAAM,+BAA+B,CAAC;;AAEvC;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,qBAAqB;IACrB,IAAI,EAAE,UAAU,CAAC;IACjB,uEAAuE;IACvE,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,4CAA4C;IAC5C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,0CAA0C;IAC1C,gBAAgB,CAAC,EAAE,YAAY,EAAE,CAAC;IAClC,+BAA+B;IAC/B,aAAa,CAAC,EAAE,YAAY,CAAC;IAC7B,uCAAuC;IACvC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,4BAA4B;IAC5B,mBAAmB,CAAC,EAAE,YAAY,CAAC;IACnC,2BAA2B;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,2BAA2B;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,6CAA6C;IAC7C,QAAQ,EAAE,OAAO,CAAC;IAClB,oCAAoC;IACpC,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED;;;GAGG;AACH,qBAGa,aAAa;IACxB;;;;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AAC;IAItG;;OAEG;IACH,gBAAgB,IAAI;QAAE,IAAI,EAAE,YAAY,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,EAAE;IAUhF,gDAAgD;IAChD,gBAAgB,IAAI;QAAE,IAAI,EAAE,YAAY,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,EAAE;IAIhF;;OAEG;IACH,aAAa,CAAC,MAAM,EAAE,YAAY,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE;IAuBzF,6CAA6C;IAC7C,aAAa,CAAC,MAAM,EAAE,YAAY,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE;IAIzF;;OAEG;IACH,oBAAoB,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,eAAe;IAY5F,oDAAoD;IACpD,oBAAoB,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,eAAe;yCAzKjF,aAAa;6CAAb,aAAa;CA4KzB"}
@@ -12,21 +12,33 @@ export class ExportService {
12
12
  * @param options Export options
13
13
  * @returns Export result with buffer and metadata
14
14
  */
15
- async export(data, options = {}) {
15
+ async Export(data, options = {}) {
16
16
  return ExportEngine.export(data, options);
17
17
  }
18
+ /** @deprecated Use {@link Export}. */
19
+ async export(data, options = {}) {
20
+ return this.Export(data, options);
21
+ }
18
22
  /**
19
23
  * Export to Excel format
20
24
  */
21
- async toExcel(data, options = {}) {
25
+ async ToExcel(data, options = {}) {
22
26
  return ExportEngine.toExcel(data, options);
23
27
  }
28
+ /** @deprecated Use {@link ToExcel}. */
29
+ async toExcel(data, options = {}) {
30
+ return this.ToExcel(data, options);
31
+ }
24
32
  /**
25
33
  * Export to CSV format
26
34
  */
27
- async toCSV(data, options = {}) {
35
+ async ToCSV(data, options = {}) {
28
36
  return ExportEngine.toCSV(data, options);
29
37
  }
38
+ /** @deprecated Use {@link ToCSV}. */
39
+ async toCSV(data, options = {}) {
40
+ return this.ToCSV(data, options);
41
+ }
30
42
  /**
31
43
  * Export to JSON format
32
44
  */
@@ -36,14 +48,18 @@ export class ExportService {
36
48
  /**
37
49
  * Get supported export formats
38
50
  */
39
- getSupportedFormats() {
51
+ GetSupportedFormats() {
40
52
  return ExportEngine.getSupportedFormats();
41
53
  }
54
+ /** @deprecated Use {@link GetSupportedFormats}. */
55
+ getSupportedFormats() {
56
+ return this.GetSupportedFormats();
57
+ }
42
58
  /**
43
59
  * Download the export result as a file
44
60
  * @param result Export result containing the data
45
61
  */
46
- downloadResult(result) {
62
+ DownloadResult(result) {
47
63
  if (!result.success || !result.data) {
48
64
  throw new Error(result.error || 'Export failed - no data to download');
49
65
  }
@@ -57,22 +73,30 @@ export class ExportService {
57
73
  document.body.removeChild(link);
58
74
  URL.revokeObjectURL(url);
59
75
  }
76
+ /** @deprecated Use {@link DownloadResult}. */
77
+ downloadResult(result) {
78
+ return this.DownloadResult(result);
79
+ }
60
80
  /**
61
81
  * Export and immediately download
62
82
  * @param data Data to export
63
83
  * @param options Export options
64
84
  */
65
- async exportAndDownload(data, options = {}) {
66
- const result = await this.export(data, options);
85
+ async ExportAndDownload(data, options = {}) {
86
+ const result = await this.Export(data, options);
67
87
  if (result.success) {
68
- this.downloadResult(result);
88
+ this.DownloadResult(result);
69
89
  }
70
90
  return result;
71
91
  }
92
+ /** @deprecated Use {@link ExportAndDownload}. */
93
+ async exportAndDownload(data, options = {}) {
94
+ return this.ExportAndDownload(data, options);
95
+ }
72
96
  /**
73
97
  * Get available sampling modes with display labels
74
98
  */
75
- getSamplingModes() {
99
+ GetSamplingModes() {
76
100
  return [
77
101
  { mode: 'all', label: 'All Rows', description: 'Export all data rows' },
78
102
  { mode: 'top', label: 'Top N', description: 'Export the first N rows' },
@@ -81,10 +105,14 @@ export class ExportService {
81
105
  { mode: 'random', label: 'Random N', description: 'Export N random rows' }
82
106
  ];
83
107
  }
108
+ /** @deprecated Use {@link GetSamplingModes}. */
109
+ getSamplingModes() {
110
+ return this.GetSamplingModes();
111
+ }
84
112
  /**
85
113
  * Get format display info
86
114
  */
87
- getFormatInfo(format) {
115
+ GetFormatInfo(format) {
88
116
  switch (format) {
89
117
  case 'excel':
90
118
  return {
@@ -106,10 +134,14 @@ export class ExportService {
106
134
  };
107
135
  }
108
136
  }
137
+ /** @deprecated Use {@link GetFormatInfo}. */
138
+ getFormatInfo(format) {
139
+ return this.GetFormatInfo(format);
140
+ }
109
141
  /**
110
142
  * Build sampling options from user selections
111
143
  */
112
- buildSamplingOptions(mode, count, interval) {
144
+ BuildSamplingOptions(mode, count, interval) {
113
145
  const options = { mode };
114
146
  if (mode === 'top' || mode === 'bottom' || mode === 'random') {
115
147
  options.count = count || 100;
@@ -119,6 +151,10 @@ export class ExportService {
119
151
  }
120
152
  return options;
121
153
  }
154
+ /** @deprecated Use {@link BuildSamplingOptions}. */
155
+ buildSamplingOptions(mode, count, interval) {
156
+ return this.BuildSamplingOptions(mode, count, interval);
157
+ }
122
158
  static ɵfac = function ExportService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ExportService)(); };
123
159
  static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ExportService, factory: ExportService.ɵfac, providedIn: 'root' });
124
160
  }
@@ -1 +1 @@
1
- {"version":3,"file":"export.service.js","sourceRoot":"","sources":["../../src/lib/export.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EACL,YAAY,EAQb,MAAM,+BAA+B,CAAC;;AAsCvC;;;GAGG;AAIH,MAAM,OAAO,aAAa;I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KAAK,KAAK;gBACR,OAAO;oBACL,KAAK,EAAE,KAAK;oBACZ,IAAI,EAAE,aAAa;oBACnB,WAAW,EAAE,+BAA+B;iBAC7C,CAAC;YACJ,KAAK,MAAM;gBACT,OAAO;oBACL,KAAK,EAAE,MAAM;oBACb,IAAI,EAAE,cAAc;oBACpB,WAAW,EAAE,oCAAoC;iBAClD,CAAC;QACN,CAAC;IACH,CAAC;IAED;;OAEG;IACH,oBAAoB,CAAC,IAAkB,EAAE,KAAc,EAAE,QAAiB;QACxE,MAAM,OAAO,GAAoB,EAAE,IAAI,EAAE,CAAC;QAE1C,IAAI,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC7D,OAAO,CAAC,KAAK,GAAG,KAAK,IAAI,GAAG,CAAC;QAC/B,CAAC;aAAM,IAAI,IAAI,KAAK,WAAW,EAAE,CAAC;YAChC,OAAO,CAAC,QAAQ,GAAG,QAAQ,IAAI,EAAE,CAAC;QACpC,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;uGA9HU,aAAa;gEAAb,aAAa,WAAb,aAAa,mBAFZ,MAAM;;iFAEP,aAAa;cAHzB,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB","sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n ExportEngine,\n ExportOptions,\n ExportResult,\n ExportFormat,\n ExportData,\n ExportColumn,\n SamplingMode,\n SamplingOptions\n} from '@memberjunction/export-engine';\n\n/**\n * Configuration for the export dialog\n */\nexport interface ExportDialogConfig {\n /** Data to export */\n data: ExportData;\n /** Columns available for export (derived from data if not provided) */\n columns?: ExportColumn[];\n /** Default file name (without extension) */\n defaultFileName?: string;\n /** Available formats to show in dialog */\n availableFormats?: ExportFormat[];\n /** Default format selection */\n defaultFormat?: ExportFormat;\n /** Whether to show sampling options */\n showSamplingOptions?: boolean;\n /** Default sampling mode */\n defaultSamplingMode?: SamplingMode;\n /** Default sample count */\n defaultSampleCount?: number;\n /** Title for the dialog */\n dialogTitle?: string;\n}\n\n/**\n * Result from export dialog\n */\nexport interface ExportDialogResult {\n /** Whether the user proceeded with export */\n exported: boolean;\n /** The export result if exported */\n result?: ExportResult;\n /** Options used for export */\n options?: ExportOptions;\n}\n\n/**\n * Angular service for data export functionality\n * Wraps the @memberjunction/export-engine for Angular usage\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ExportService {\n /**\n * Export data directly without dialog\n * @param data Data to export\n * @param options Export options\n * @returns Export result with buffer and metadata\n */\n async export(data: ExportData, options: Partial<ExportOptions> = {}): Promise<ExportResult> {\n return ExportEngine.export(data, options);\n }\n\n /**\n * Export to Excel format\n */\n async toExcel(data: ExportData, options: Omit<Partial<ExportOptions>, 'format'> = {}): Promise<ExportResult> {\n return ExportEngine.toExcel(data, options);\n }\n\n /**\n * Export to CSV format\n */\n async toCSV(data: ExportData, options: Omit<Partial<ExportOptions>, 'format'> = {}): Promise<ExportResult> {\n return ExportEngine.toCSV(data, options);\n }\n\n /**\n * Export to JSON format\n */\n async toJSON(data: ExportData, options: Omit<Partial<ExportOptions>, 'format'> = {}): Promise<ExportResult> {\n return ExportEngine.toJSON(data, options);\n }\n\n /**\n * Get supported export formats\n */\n getSupportedFormats(): ExportFormat[] {\n return ExportEngine.getSupportedFormats();\n }\n\n /**\n * Download the export result as a file\n * @param result Export result containing the data\n */\n downloadResult(result: ExportResult): void {\n if (!result.success || !result.data) {\n throw new Error(result.error || 'Export failed - no data to download');\n }\n\n const blob = new Blob([result.data as BlobPart], { type: result.mimeType });\n const url = URL.createObjectURL(blob);\n\n const link = document.createElement('a');\n link.href = url;\n link.download = result.fileName || 'export';\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n\n URL.revokeObjectURL(url);\n }\n\n /**\n * Export and immediately download\n * @param data Data to export\n * @param options Export options\n */\n async exportAndDownload(data: ExportData, options: Partial<ExportOptions> = {}): Promise<ExportResult> {\n const result = await this.export(data, options);\n if (result.success) {\n this.downloadResult(result);\n }\n return result;\n }\n\n /**\n * Get available sampling modes with display labels\n */\n getSamplingModes(): { mode: SamplingMode; label: string; description: string }[] {\n return [\n { mode: 'all', label: 'All Rows', description: 'Export all data rows' },\n { mode: 'top', label: 'Top N', description: 'Export the first N rows' },\n { mode: 'bottom', label: 'Bottom N', description: 'Export the last N rows' },\n { mode: 'every-nth', label: 'Every Nth', description: 'Export every Nth row' },\n { mode: 'random', label: 'Random N', description: 'Export N random rows' }\n ];\n }\n\n /**\n * Get format display info\n */\n getFormatInfo(format: ExportFormat): { label: string; icon: string; description: string } {\n switch (format) {\n case 'excel':\n return {\n label: 'Excel',\n icon: 'fa-file-excel',\n description: 'Microsoft Excel spreadsheet (.xlsx)'\n };\n case 'csv':\n return {\n label: 'CSV',\n icon: 'fa-file-csv',\n description: 'Comma-separated values (.csv)'\n };\n case 'json':\n return {\n label: 'JSON',\n icon: 'fa-file-code',\n description: 'JavaScript Object Notation (.json)'\n };\n }\n }\n\n /**\n * Build sampling options from user selections\n */\n buildSamplingOptions(mode: SamplingMode, count?: number, interval?: number): SamplingOptions {\n const options: SamplingOptions = { mode };\n\n if (mode === 'top' || mode === 'bottom' || mode === 'random') {\n options.count = count || 100;\n } else if (mode === 'every-nth') {\n options.interval = interval || 10;\n }\n\n return options;\n }\n}\n"]}
1
+ {"version":3,"file":"export.service.js","sourceRoot":"","sources":["../../src/lib/export.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EACL,YAAY,EAQb,MAAM,+BAA+B,CAAC;;AAsCvC;;;GAGG;AAIH,MAAM,OAAO,aAAa;IACxB;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CAAC,IAAgB,EAAE,UAAkC,EAAE;QACjE,OAAO,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC5C,CAAC;IAED,sCAAsC;IACtC,KAAK,CAAC,MAAM,CAAC,IAAg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AAE,CAAC;YAC7D,OAAO,CAAC,KAAK,GAAG,KAAK,IAAI,GAAG,CAAC;QAC/B,CAAC;aAAM,IAAI,IAAI,KAAK,WAAW,EAAE,CAAC;YAChC,OAAO,CAAC,QAAQ,GAAG,QAAQ,IAAI,EAAE,CAAC;QACpC,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,oDAAoD;IACpD,oBAAoB,CAAC,IAAkB,EAAE,KAAc,EAAE,QAAiB;QACxE,OAAO,IAAI,CAAC,oBAAoB,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC1D,CAAC;uGA3KU,aAAa;gEAAb,aAAa,WAAb,aAAa,mBAFZ,MAAM;;iFAEP,aAAa;cAHzB,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB","sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n ExportEngine,\n ExportOptions,\n ExportResult,\n ExportFormat,\n ExportData,\n ExportColumn,\n SamplingMode,\n SamplingOptions\n} from '@memberjunction/export-engine';\n\n/**\n * Configuration for the export dialog\n */\nexport interface ExportDialogConfig {\n /** Data to export */\n data: ExportData;\n /** Columns available for export (derived from data if not provided) */\n columns?: ExportColumn[];\n /** Default file name (without extension) */\n defaultFileName?: string;\n /** Available formats to show in dialog */\n availableFormats?: ExportFormat[];\n /** Default format selection */\n defaultFormat?: ExportFormat;\n /** Whether to show sampling options */\n showSamplingOptions?: boolean;\n /** Default sampling mode */\n defaultSamplingMode?: SamplingMode;\n /** Default sample count */\n defaultSampleCount?: number;\n /** Title for the dialog */\n dialogTitle?: string;\n}\n\n/**\n * Result from export dialog\n */\nexport interface ExportDialogResult {\n /** Whether the user proceeded with export */\n exported: boolean;\n /** The export result if exported */\n result?: ExportResult;\n /** Options used for export */\n options?: ExportOptions;\n}\n\n/**\n * Angular service for data export functionality\n * Wraps the @memberjunction/export-engine for Angular usage\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ExportService {\n /**\n * Export data directly without dialog\n * @param data Data to export\n * @param options Export options\n * @returns Export result with buffer and metadata\n */\n async Export(data: ExportData, options: Partial<ExportOptions> = {}): Promise<ExportResult> {\n return ExportEngine.export(data, options);\n }\n\n /** @deprecated Use {@link Export}. */\n async export(data: ExportData, options: Partial<ExportOptions> = {}): Promise<ExportResult> {\n return this.Export(data, options);\n }\n\n /**\n * Export to Excel format\n */\n async ToExcel(data: ExportData, options: Omit<Partial<ExportOptions>, 'format'> = {}): Promise<ExportResult> {\n return ExportEngine.toExcel(data, options);\n }\n\n /** @deprecated Use {@link ToExcel}. */\n async toExcel(data: ExportData, options: Omit<Partial<ExportOptions>, 'format'> = {}): Promise<ExportResult> {\n return this.ToExcel(data, options);\n }\n\n /**\n * Export to CSV format\n */\n async ToCSV(data: ExportData, options: Omit<Partial<ExportOptions>, 'format'> = {}): Promise<ExportResult> {\n return ExportEngine.toCSV(data, options);\n }\n\n /** @deprecated Use {@link ToCSV}. */\n async toCSV(data: ExportData, options: Omit<Partial<ExportOptions>, 'format'> = {}): Promise<ExportResult> {\n return this.ToCSV(data, options);\n }\n\n /**\n * Export to JSON format\n */\n async toJSON(data: ExportData, options: Omit<Partial<ExportOptions>, 'format'> = {}): Promise<ExportResult> {\n return ExportEngine.toJSON(data, options);\n }\n\n /**\n * Get supported export formats\n */\n GetSupportedFormats(): ExportFormat[] {\n return ExportEngine.getSupportedFormats();\n }\n\n /** @deprecated Use {@link GetSupportedFormats}. */\n getSupportedFormats(): ExportFormat[] {\n return this.GetSupportedFormats();\n }\n\n /**\n * Download the export result as a file\n * @param result Export result containing the data\n */\n DownloadResult(result: ExportResult): void {\n if (!result.success || !result.data) {\n throw new Error(result.error || 'Export failed - no data to download');\n }\n\n const blob = new Blob([result.data as BlobPart], { type: result.mimeType });\n const url = URL.createObjectURL(blob);\n\n const link = document.createElement('a');\n link.href = url;\n link.download = result.fileName || 'export';\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n\n URL.revokeObjectURL(url);\n }\n\n /** @deprecated Use {@link DownloadResult}. */\n downloadResult(result: ExportResult): void {\n return this.DownloadResult(result);\n }\n\n /**\n * Export and immediately download\n * @param data Data to export\n * @param options Export options\n */\n async ExportAndDownload(data: ExportData, options: Partial<ExportOptions> = {}): Promise<ExportResult> {\n const result = await this.Export(data, options);\n if (result.success) {\n this.DownloadResult(result);\n }\n return result;\n }\n\n /** @deprecated Use {@link ExportAndDownload}. */\n async exportAndDownload(data: ExportData, options: Partial<ExportOptions> = {}): Promise<ExportResult> {\n return this.ExportAndDownload(data, options);\n }\n\n /**\n * Get available sampling modes with display labels\n */\n GetSamplingModes(): { mode: SamplingMode; label: string; description: string }[] {\n return [\n { mode: 'all', label: 'All Rows', description: 'Export all data rows' },\n { mode: 'top', label: 'Top N', description: 'Export the first N rows' },\n { mode: 'bottom', label: 'Bottom N', description: 'Export the last N rows' },\n { mode: 'every-nth', label: 'Every Nth', description: 'Export every Nth row' },\n { mode: 'random', label: 'Random N', description: 'Export N random rows' }\n ];\n }\n\n /** @deprecated Use {@link GetSamplingModes}. */\n getSamplingModes(): { mode: SamplingMode; label: string; description: string }[] {\n return this.GetSamplingModes();\n }\n\n /**\n * Get format display info\n */\n GetFormatInfo(format: ExportFormat): { label: string; icon: string; description: string } {\n switch (format) {\n case 'excel':\n return {\n label: 'Excel',\n icon: 'fa-file-excel',\n description: 'Microsoft Excel spreadsheet (.xlsx)'\n };\n case 'csv':\n return {\n label: 'CSV',\n icon: 'fa-file-csv',\n description: 'Comma-separated values (.csv)'\n };\n case 'json':\n return {\n label: 'JSON',\n icon: 'fa-file-code',\n description: 'JavaScript Object Notation (.json)'\n };\n }\n }\n\n /** @deprecated Use {@link GetFormatInfo}. */\n getFormatInfo(format: ExportFormat): { label: string; icon: string; description: string } {\n return this.GetFormatInfo(format);\n }\n\n /**\n * Build sampling options from user selections\n */\n BuildSamplingOptions(mode: SamplingMode, count?: number, interval?: number): SamplingOptions {\n const options: SamplingOptions = { mode };\n\n if (mode === 'top' || mode === 'bottom' || mode === 'random') {\n options.count = count || 100;\n } else if (mode === 'every-nth') {\n options.interval = interval || 10;\n }\n\n return options;\n }\n\n /** @deprecated Use {@link BuildSamplingOptions}. */\n buildSamplingOptions(mode: SamplingMode, count?: number, interval?: number): SamplingOptions {\n return this.BuildSamplingOptions(mode, count, interval);\n }\n}\n"]}
@@ -48,20 +48,20 @@ export interface ExportDialogResult {
48
48
  */
49
49
  export interface ExportServiceOptions {
50
50
  /** Data to export */
51
- data: Record<string, unknown>[];
51
+ Data: Record<string, unknown>[];
52
52
  /** Export format */
53
- format: 'excel' | 'csv' | 'json';
53
+ Format: 'excel' | 'csv' | 'json';
54
54
  /** File name without extension */
55
- fileName?: string;
55
+ FileName?: string;
56
56
  /** Include column headers */
57
- includeHeaders?: boolean;
57
+ IncludeHeaders?: boolean;
58
58
  /** Row sampling options */
59
- sampling?: {
59
+ Sampling?: {
60
60
  mode: 'all' | 'top' | 'bottom' | 'every-nth' | 'random';
61
61
  count?: number;
62
62
  interval?: number;
63
63
  };
64
64
  /** Columns to export */
65
- columns?: ExportColumnInfo[];
65
+ Columns?: ExportColumnInfo[];
66
66
  }
67
67
  //# sourceMappingURL=export.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"export.types.js","sourceRoot":"","sources":["../../src/lib/export.types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Export dialog configuration\n */\nexport interface ExportDialogConfig {\n /** Title for the dialog */\n title?: string;\n /** Total number of rows available for export */\n totalRows: number;\n /** Column definitions for the data */\n columns?: ExportColumnInfo[];\n /** Whether to show advanced options by default */\n showAdvancedOptions?: boolean;\n /** Default file name */\n fileName?: string;\n}\n\n/**\n * Column information for export\n */\nexport interface ExportColumnInfo {\n name: string;\n displayName: string;\n dataType?: 'string' | 'number' | 'date' | 'boolean' | 'currency';\n selected?: boolean;\n}\n\n/**\n * Result from the export dialog\n */\nexport interface ExportDialogResult {\n /** Whether the user confirmed the export */\n confirmed: boolean;\n /** Selected export format */\n format?: 'excel' | 'csv' | 'json';\n /** Whether to include headers */\n includeHeaders?: boolean;\n /** Row sampling configuration */\n sampling?: {\n mode: 'all' | 'top' | 'bottom' | 'every-nth' | 'random';\n count?: number;\n interval?: number;\n };\n /** Selected columns (if column selection was enabled) */\n selectedColumns?: string[];\n /** Custom file name */\n fileName?: string;\n}\n\n/**\n * Options for the export service\n */\nexport interface ExportServiceOptions {\n /** Data to export */\n data: Record<string, unknown>[];\n /** Export format */\n format: 'excel' | 'csv' | 'json';\n /** File name without extension */\n fileName?: string;\n /** Include column headers */\n includeHeaders?: boolean;\n /** Row sampling options */\n sampling?: {\n mode: 'all' | 'top' | 'bottom' | 'every-nth' | 'random';\n count?: number;\n interval?: number;\n };\n /** Columns to export */\n columns?: ExportColumnInfo[];\n}\n"]}
1
+ {"version":3,"file":"export.types.js","sourceRoot":"","sources":["../../src/lib/export.types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Export dialog configuration\n */\nexport interface ExportDialogConfig {\n /** Title for the dialog */\n title?: string;\n /** Total number of rows available for export */\n totalRows: number;\n /** Column definitions for the data */\n columns?: ExportColumnInfo[];\n /** Whether to show advanced options by default */\n showAdvancedOptions?: boolean;\n /** Default file name */\n fileName?: string;\n}\n\n/**\n * Column information for export\n */\nexport interface ExportColumnInfo {\n name: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n displayName: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n dataType?: 'string' | 'number' | 'date' | 'boolean' | 'currency'; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n selected?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n}\n\n/**\n * Result from the export dialog\n */\nexport interface ExportDialogResult {\n /** Whether the user confirmed the export */\n confirmed: boolean;\n /** Selected export format */\n format?: 'excel' | 'csv' | 'json';\n /** Whether to include headers */\n includeHeaders?: boolean;\n /** Row sampling configuration */\n sampling?: {\n mode: 'all' | 'top' | 'bottom' | 'every-nth' | 'random';\n count?: number;\n interval?: number;\n };\n /** Selected columns (if column selection was enabled) */\n selectedColumns?: string[];\n /** Custom file name */\n fileName?: string;\n}\n\n/**\n * Options for the export service\n */\nexport interface ExportServiceOptions {\n /** Data to export */\n Data: Record<string, unknown>[];\n /** Export format */\n Format: 'excel' | 'csv' | 'json';\n /** File name without extension */\n FileName?: string;\n /** Include column headers */\n IncludeHeaders?: boolean;\n /** Row sampling options */\n Sampling?: {\n mode: 'all' | 'top' | 'bottom' | 'every-nth' | 'random';\n count?: number;\n interval?: number;\n };\n /** Columns to export */\n Columns?: ExportColumnInfo[];\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-export-service",
3
- "version": "6.2.0-edge.0",
3
+ "version": "6.2.0-edge.1",
4
4
  "description": "MemberJunction: Angular export service and dialog for exporting data to Excel, CSV, and JSON",
5
5
  "main": "./dist/public-api.js",
6
6
  "typings": "./dist/public-api.d.ts",
@@ -20,7 +20,7 @@
20
20
  "devDependencies": {
21
21
  "@angular/compiler": "21.2.22",
22
22
  "@angular/compiler-cli": "21.2.22",
23
- "@memberjunction/ng-test-utils": "6.2.0-edge.0",
23
+ "@memberjunction/ng-test-utils": "6.2.0-edge.1",
24
24
  "vitest": "^4.0.18"
25
25
  },
26
26
  "peerDependencies": {
@@ -30,7 +30,7 @@
30
30
  "@angular/cdk": "^21.2.14"
31
31
  },
32
32
  "dependencies": {
33
- "@memberjunction/export-engine": "6.2.0-edge.0",
33
+ "@memberjunction/export-engine": "6.2.0-edge.1",
34
34
  "tslib": "^2.8.1"
35
35
  },
36
36
  "sideEffects": false,