@memberjunction/ng-export-service 0.0.1 → 2.133.0

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.
@@ -0,0 +1,98 @@
1
+ import { EventEmitter, ChangeDetectorRef } from '@angular/core';
2
+ import { ExportFormat, SamplingMode } from '@memberjunction/export-engine';
3
+ import { ExportService, ExportDialogConfig, ExportDialogResult } from './export.service';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Export dialog component with progressive UX
7
+ * Provides format selection, sampling options, and export preview
8
+ *
9
+ * Usage:
10
+ * <mj-export-dialog
11
+ * [visible]="showExportDialog"
12
+ * [config]="exportConfig"
13
+ * (closed)="onExportDialogClosed($event)">
14
+ * </mj-export-dialog>
15
+ */
16
+ export declare class ExportDialogComponent {
17
+ private exportService;
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: {
29
+ mode: SamplingMode;
30
+ label: string;
31
+ description: string;
32
+ }[];
33
+ constructor(exportService: ExportService, cdr: ChangeDetectorRef);
34
+ private _visible;
35
+ get visible(): boolean;
36
+ set visible(value: boolean);
37
+ config: ExportDialogConfig | null;
38
+ closed: EventEmitter<ExportDialogResult>;
39
+ /**
40
+ * Initialize form from config
41
+ */
42
+ private initializeFromConfig;
43
+ /**
44
+ * Get format info for display
45
+ */
46
+ getFormatInfo(format: ExportFormat): {
47
+ label: string;
48
+ icon: string;
49
+ description: string;
50
+ };
51
+ /**
52
+ * Check if sampling needs a count input
53
+ */
54
+ get needsSampleCount(): boolean;
55
+ /**
56
+ * Check if sampling needs an interval input
57
+ */
58
+ get needsSampleInterval(): boolean;
59
+ /**
60
+ * Get total row count
61
+ */
62
+ get totalRows(): number;
63
+ /**
64
+ * Estimate exported row count
65
+ */
66
+ get estimatedRows(): number;
67
+ /**
68
+ * Get sampling description
69
+ */
70
+ get samplingDescription(): string;
71
+ /**
72
+ * Get ordinal suffix for number
73
+ */
74
+ private getOrdinalSuffix;
75
+ /**
76
+ * Handle format selection
77
+ */
78
+ selectFormat(format: ExportFormat): void;
79
+ /**
80
+ * Handle cancel button
81
+ */
82
+ onCancel(): void;
83
+ /**
84
+ * Handle export button
85
+ */
86
+ onExport(): Promise<void>;
87
+ /**
88
+ * Check if show sampling options
89
+ */
90
+ get showSamplingOptions(): boolean;
91
+ /**
92
+ * Get dialog title
93
+ */
94
+ get dialogTitle(): string;
95
+ 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>;
97
+ }
98
+ //# sourceMappingURL=export-dialog.component.d.ts.map
@@ -0,0 +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,qBAKa,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,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;gBAGlE,aAAa,EAAE,aAAa,EAC5B,GAAG,EAAE,iBAAiB;IAKhC,OAAO,CAAC,QAAQ,CAAS;IACzB,IACI,OAAO,IAAI,OAAO,CAErB;IACD,IAAI,OAAO,CAAC,KAAK,EAAE,OAAO,EAMzB;IAEQ,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAQ;IAExC,MAAM,mCAA0C;IAE1D;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAY5B;;OAEG;IACH,aAAa,CAAC,MAAM,EAAE,YAAY;;;;;IAIlC;;OAEG;IACH,IAAI,gBAAgB,IAAI,OAAO,CAE9B;IAED;;OAEG;IACH,IAAI,mBAAmB,IAAI,OAAO,CAEjC;IAED;;OAEG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED;;OAEG;IACH,IAAI,aAAa,IAAI,MAAM,CAc1B;IAED;;OAEG;IACH,IAAI,mBAAmB,IAAI,MAAM,CAehC;IAED;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAMxB;;OAEG;IACH,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;IAKxC;;OAEG;IACH,QAAQ,IAAI,IAAI;IAKhB;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IA4C/B;;OAEG;IACH,IAAI,mBAAmB,IAAI,OAAO,CAEjC;IAED;;OAEG;IACH,IAAI,WAAW,IAAI,MAAM,CAExB;yCA/MU,qBAAqB;2CAArB,qBAAqB;CAgNjC"}
@@ -0,0 +1,403 @@
1
+ import { Component, Input, Output, EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ import * as i1 from "./export.service";
4
+ import * as i2 from "@angular/forms";
5
+ import * as i3 from "@angular/common";
6
+ const _forTrack0 = ($index, $item) => $item.mode;
7
+ function ExportDialogComponent_Conditional_0_For_13_Template(rf, ctx) { if (rf & 1) {
8
+ const _r3 = i0.ɵɵgetCurrentView();
9
+ i0.ɵɵelementStart(0, "button", 28);
10
+ i0.ɵɵlistener("click", function ExportDialogComponent_Conditional_0_For_13_Template_button_click_0_listener() { const format_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.selectFormat(format_r4)); });
11
+ i0.ɵɵelement(1, "span");
12
+ i0.ɵɵelementStart(2, "span", 29);
13
+ i0.ɵɵtext(3);
14
+ i0.ɵɵelementEnd();
15
+ i0.ɵɵelementStart(4, "span", 30);
16
+ i0.ɵɵtext(5);
17
+ i0.ɵɵelementEnd()();
18
+ } if (rf & 2) {
19
+ const format_r4 = ctx.$implicit;
20
+ const ctx_r1 = i0.ɵɵnextContext(2);
21
+ i0.ɵɵclassProp("selected", ctx_r1.selectedFormat === format_r4);
22
+ i0.ɵɵadvance();
23
+ i0.ɵɵclassMapInterpolate1("fa-solid ", ctx_r1.getFormatInfo(format_r4).icon, " mj-export-format-icon");
24
+ i0.ɵɵadvance(2);
25
+ i0.ɵɵtextInterpolate(ctx_r1.getFormatInfo(format_r4).label);
26
+ i0.ɵɵadvance(2);
27
+ i0.ɵɵtextInterpolate(ctx_r1.getFormatInfo(format_r4).description);
28
+ } }
29
+ function ExportDialogComponent_Conditional_0_Conditional_27_For_6_Template(rf, ctx) { if (rf & 1) {
30
+ i0.ɵɵelementStart(0, "option", 33);
31
+ i0.ɵɵtext(1);
32
+ i0.ɵɵelementEnd();
33
+ } if (rf & 2) {
34
+ const mode_r6 = ctx.$implicit;
35
+ i0.ɵɵproperty("value", mode_r6.mode);
36
+ i0.ɵɵadvance();
37
+ i0.ɵɵtextInterpolate(mode_r6.label);
38
+ } }
39
+ function ExportDialogComponent_Conditional_0_Conditional_27_Conditional_7_Template(rf, ctx) { if (rf & 1) {
40
+ const _r7 = i0.ɵɵgetCurrentView();
41
+ i0.ɵɵelementStart(0, "input", 37);
42
+ i0.ɵɵtwoWayListener("ngModelChange", function ExportDialogComponent_Conditional_0_Conditional_27_Conditional_7_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.sampleCount, $event) || (ctx_r1.sampleCount = $event); return i0.ɵɵresetView($event); });
43
+ i0.ɵɵelementEnd();
44
+ } if (rf & 2) {
45
+ const ctx_r1 = i0.ɵɵnextContext(3);
46
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r1.sampleCount);
47
+ i0.ɵɵproperty("min", 1)("max", ctx_r1.totalRows);
48
+ } }
49
+ function ExportDialogComponent_Conditional_0_Conditional_27_Conditional_8_Template(rf, ctx) { if (rf & 1) {
50
+ const _r8 = i0.ɵɵgetCurrentView();
51
+ i0.ɵɵelementStart(0, "input", 38);
52
+ i0.ɵɵtwoWayListener("ngModelChange", function ExportDialogComponent_Conditional_0_Conditional_27_Conditional_8_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.sampleInterval, $event) || (ctx_r1.sampleInterval = $event); return i0.ɵɵresetView($event); });
53
+ i0.ɵɵelementEnd();
54
+ } if (rf & 2) {
55
+ const ctx_r1 = i0.ɵɵnextContext(3);
56
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r1.sampleInterval);
57
+ i0.ɵɵproperty("min", 2)("max", ctx_r1.totalRows);
58
+ } }
59
+ function ExportDialogComponent_Conditional_0_Conditional_27_Template(rf, ctx) { if (rf & 1) {
60
+ const _r5 = i0.ɵɵgetCurrentView();
61
+ i0.ɵɵelementStart(0, "div", 7)(1, "label", 8);
62
+ i0.ɵɵtext(2, "Row Selection");
63
+ i0.ɵɵelementEnd();
64
+ i0.ɵɵelementStart(3, "div", 31)(4, "select", 32);
65
+ i0.ɵɵtwoWayListener("ngModelChange", function ExportDialogComponent_Conditional_0_Conditional_27_Template_select_ngModelChange_4_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.samplingMode, $event) || (ctx_r1.samplingMode = $event); return i0.ɵɵresetView($event); });
66
+ i0.ɵɵrepeaterCreate(5, ExportDialogComponent_Conditional_0_Conditional_27_For_6_Template, 2, 2, "option", 33, _forTrack0);
67
+ i0.ɵɵelementEnd();
68
+ i0.ɵɵtemplate(7, ExportDialogComponent_Conditional_0_Conditional_27_Conditional_7_Template, 1, 3, "input", 34)(8, ExportDialogComponent_Conditional_0_Conditional_27_Conditional_8_Template, 1, 3, "input", 35);
69
+ i0.ɵɵelementEnd();
70
+ i0.ɵɵelementStart(9, "div", 36);
71
+ i0.ɵɵtext(10);
72
+ i0.ɵɵelementEnd()();
73
+ } if (rf & 2) {
74
+ const ctx_r1 = i0.ɵɵnextContext(2);
75
+ i0.ɵɵadvance(4);
76
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r1.samplingMode);
77
+ i0.ɵɵadvance();
78
+ i0.ɵɵrepeater(ctx_r1.samplingModes);
79
+ i0.ɵɵadvance(2);
80
+ i0.ɵɵconditional(ctx_r1.needsSampleCount ? 7 : -1);
81
+ i0.ɵɵadvance();
82
+ i0.ɵɵconditional(ctx_r1.needsSampleInterval ? 8 : -1);
83
+ i0.ɵɵadvance(2);
84
+ i0.ɵɵtextInterpolate1(" ", ctx_r1.samplingDescription, " ");
85
+ } }
86
+ function ExportDialogComponent_Conditional_0_Conditional_41_Template(rf, ctx) { if (rf & 1) {
87
+ i0.ɵɵelementStart(0, "div", 24);
88
+ i0.ɵɵelement(1, "span", 39);
89
+ i0.ɵɵtext(2);
90
+ i0.ɵɵelementEnd();
91
+ } if (rf & 2) {
92
+ const ctx_r1 = i0.ɵɵnextContext(2);
93
+ i0.ɵɵadvance(2);
94
+ i0.ɵɵtextInterpolate1(" ", ctx_r1.exportError, " ");
95
+ } }
96
+ function ExportDialogComponent_Conditional_0_Conditional_44_Template(rf, ctx) { if (rf & 1) {
97
+ i0.ɵɵelement(0, "span", 40);
98
+ i0.ɵɵtext(1, " Export ");
99
+ } }
100
+ function ExportDialogComponent_Conditional_0_Conditional_45_Template(rf, ctx) { if (rf & 1) {
101
+ i0.ɵɵelement(0, "span", 41);
102
+ i0.ɵɵtext(1, " Exporting... ");
103
+ } }
104
+ function ExportDialogComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
105
+ const _r1 = i0.ɵɵgetCurrentView();
106
+ i0.ɵɵelementStart(0, "div", 0);
107
+ i0.ɵɵlistener("click", function ExportDialogComponent_Conditional_0_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onCancel()); });
108
+ i0.ɵɵelementEnd();
109
+ i0.ɵɵelementStart(1, "div", 1)(2, "div", 2)(3, "h2", 3);
110
+ i0.ɵɵtext(4);
111
+ i0.ɵɵelementEnd();
112
+ i0.ɵɵelementStart(5, "button", 4);
113
+ i0.ɵɵlistener("click", function ExportDialogComponent_Conditional_0_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onCancel()); });
114
+ i0.ɵɵelement(6, "span", 5);
115
+ i0.ɵɵelementEnd()();
116
+ i0.ɵɵelementStart(7, "div", 6)(8, "div", 7)(9, "label", 8);
117
+ i0.ɵɵtext(10, "Export Format");
118
+ i0.ɵɵelementEnd();
119
+ i0.ɵɵelementStart(11, "div", 9);
120
+ i0.ɵɵrepeaterCreate(12, ExportDialogComponent_Conditional_0_For_13_Template, 6, 7, "button", 10, i0.ɵɵrepeaterTrackByIdentity);
121
+ i0.ɵɵelementEnd()();
122
+ i0.ɵɵelementStart(14, "div", 7)(15, "label", 11);
123
+ i0.ɵɵtext(16, "File Name");
124
+ i0.ɵɵelementEnd();
125
+ i0.ɵɵelementStart(17, "div", 12)(18, "input", 13);
126
+ i0.ɵɵtwoWayListener("ngModelChange", function ExportDialogComponent_Conditional_0_Template_input_ngModelChange_18_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.fileName, $event) || (ctx_r1.fileName = $event); return i0.ɵɵresetView($event); });
127
+ i0.ɵɵelementEnd();
128
+ i0.ɵɵelementStart(19, "span", 14);
129
+ i0.ɵɵtext(20, "Extension added automatically");
130
+ i0.ɵɵelementEnd()()();
131
+ i0.ɵɵelementStart(21, "div", 15)(22, "label", 16)(23, "input", 17);
132
+ i0.ɵɵtwoWayListener("ngModelChange", function ExportDialogComponent_Conditional_0_Template_input_ngModelChange_23_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.includeHeaders, $event) || (ctx_r1.includeHeaders = $event); return i0.ɵɵresetView($event); });
133
+ i0.ɵɵelementEnd();
134
+ i0.ɵɵelement(24, "span", 18);
135
+ i0.ɵɵelementStart(25, "span");
136
+ i0.ɵɵtext(26, "Include column headers");
137
+ i0.ɵɵelementEnd()()();
138
+ i0.ɵɵtemplate(27, ExportDialogComponent_Conditional_0_Conditional_27_Template, 11, 4, "div", 7);
139
+ i0.ɵɵelementStart(28, "div", 19)(29, "div", 20)(30, "span", 21);
140
+ i0.ɵɵtext(31, "Total rows available");
141
+ i0.ɵɵelementEnd();
142
+ i0.ɵɵelementStart(32, "span", 22);
143
+ i0.ɵɵtext(33);
144
+ i0.ɵɵpipe(34, "number");
145
+ i0.ɵɵelementEnd()();
146
+ i0.ɵɵelementStart(35, "div", 20)(36, "span", 21);
147
+ i0.ɵɵtext(37, "Rows to export");
148
+ i0.ɵɵelementEnd();
149
+ i0.ɵɵelementStart(38, "span", 23);
150
+ i0.ɵɵtext(39);
151
+ i0.ɵɵpipe(40, "number");
152
+ i0.ɵɵelementEnd()()();
153
+ i0.ɵɵtemplate(41, ExportDialogComponent_Conditional_0_Conditional_41_Template, 3, 1, "div", 24);
154
+ i0.ɵɵelementEnd();
155
+ i0.ɵɵelementStart(42, "div", 25)(43, "button", 26);
156
+ i0.ɵɵlistener("click", function ExportDialogComponent_Conditional_0_Template_button_click_43_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onExport()); });
157
+ i0.ɵɵtemplate(44, ExportDialogComponent_Conditional_0_Conditional_44_Template, 2, 0)(45, ExportDialogComponent_Conditional_0_Conditional_45_Template, 2, 0);
158
+ i0.ɵɵelementEnd();
159
+ i0.ɵɵelementStart(46, "button", 27);
160
+ i0.ɵɵlistener("click", function ExportDialogComponent_Conditional_0_Template_button_click_46_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onCancel()); });
161
+ i0.ɵɵtext(47, " Cancel ");
162
+ i0.ɵɵelementEnd()()();
163
+ } if (rf & 2) {
164
+ const ctx_r1 = i0.ɵɵnextContext();
165
+ i0.ɵɵadvance();
166
+ i0.ɵɵattribute("aria-labelledby", "export-dialog-title");
167
+ i0.ɵɵadvance(3);
168
+ i0.ɵɵtextInterpolate(ctx_r1.dialogTitle);
169
+ i0.ɵɵadvance(8);
170
+ i0.ɵɵrepeater(ctx_r1.availableFormats);
171
+ i0.ɵɵadvance(6);
172
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r1.fileName);
173
+ i0.ɵɵadvance(5);
174
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r1.includeHeaders);
175
+ i0.ɵɵadvance(4);
176
+ i0.ɵɵconditional(ctx_r1.showSamplingOptions ? 27 : -1);
177
+ i0.ɵɵadvance(6);
178
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(34, 11, ctx_r1.totalRows));
179
+ i0.ɵɵadvance(6);
180
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(40, 13, ctx_r1.estimatedRows));
181
+ i0.ɵɵadvance(2);
182
+ i0.ɵɵconditional(ctx_r1.exportError ? 41 : -1);
183
+ i0.ɵɵadvance(2);
184
+ i0.ɵɵproperty("disabled", ctx_r1.isExporting);
185
+ i0.ɵɵadvance();
186
+ i0.ɵɵconditional(!ctx_r1.isExporting ? 44 : 45);
187
+ i0.ɵɵadvance(2);
188
+ i0.ɵɵproperty("disabled", ctx_r1.isExporting);
189
+ } }
190
+ /**
191
+ * Export dialog component with progressive UX
192
+ * Provides format selection, sampling options, and export preview
193
+ *
194
+ * Usage:
195
+ * <mj-export-dialog
196
+ * [visible]="showExportDialog"
197
+ * [config]="exportConfig"
198
+ * (closed)="onExportDialogClosed($event)">
199
+ * </mj-export-dialog>
200
+ */
201
+ export class ExportDialogComponent {
202
+ exportService;
203
+ cdr;
204
+ // Form state
205
+ selectedFormat = 'excel';
206
+ fileName = 'export';
207
+ includeHeaders = true;
208
+ samplingMode = 'all';
209
+ sampleCount = 100;
210
+ sampleInterval = 10;
211
+ // UI state
212
+ isExporting = false;
213
+ exportError = null;
214
+ // Available options
215
+ availableFormats = ['excel', 'csv', 'json'];
216
+ samplingModes;
217
+ constructor(exportService, cdr) {
218
+ this.exportService = exportService;
219
+ this.cdr = cdr;
220
+ this.samplingModes = this.exportService.getSamplingModes();
221
+ }
222
+ _visible = false;
223
+ get visible() {
224
+ return this._visible;
225
+ }
226
+ set visible(value) {
227
+ if (value && !this._visible) {
228
+ this.initializeFromConfig();
229
+ }
230
+ this._visible = value;
231
+ this.cdr.detectChanges();
232
+ }
233
+ config = null;
234
+ closed = new EventEmitter();
235
+ /**
236
+ * Initialize form from config
237
+ */
238
+ initializeFromConfig() {
239
+ if (!this.config)
240
+ return;
241
+ this.selectedFormat = this.config.defaultFormat || 'excel';
242
+ this.fileName = this.config.defaultFileName || 'export';
243
+ this.samplingMode = this.config.defaultSamplingMode || 'all';
244
+ this.sampleCount = this.config.defaultSampleCount || 100;
245
+ this.availableFormats = this.config.availableFormats || ['excel', 'csv', 'json'];
246
+ this.exportError = null;
247
+ this.isExporting = false;
248
+ }
249
+ /**
250
+ * Get format info for display
251
+ */
252
+ getFormatInfo(format) {
253
+ return this.exportService.getFormatInfo(format);
254
+ }
255
+ /**
256
+ * Check if sampling needs a count input
257
+ */
258
+ get needsSampleCount() {
259
+ return this.samplingMode === 'top' || this.samplingMode === 'bottom' || this.samplingMode === 'random';
260
+ }
261
+ /**
262
+ * Check if sampling needs an interval input
263
+ */
264
+ get needsSampleInterval() {
265
+ return this.samplingMode === 'every-nth';
266
+ }
267
+ /**
268
+ * Get total row count
269
+ */
270
+ get totalRows() {
271
+ return this.config?.data?.length || 0;
272
+ }
273
+ /**
274
+ * Estimate exported row count
275
+ */
276
+ get estimatedRows() {
277
+ const total = this.totalRows;
278
+ switch (this.samplingMode) {
279
+ case 'all':
280
+ return total;
281
+ case 'top':
282
+ case 'bottom':
283
+ case 'random':
284
+ return Math.min(this.sampleCount, total);
285
+ case 'every-nth':
286
+ return Math.ceil(total / this.sampleInterval);
287
+ default:
288
+ return total;
289
+ }
290
+ }
291
+ /**
292
+ * Get sampling description
293
+ */
294
+ get samplingDescription() {
295
+ switch (this.samplingMode) {
296
+ case 'all':
297
+ return `Exporting all ${this.totalRows.toLocaleString()} rows`;
298
+ case 'top':
299
+ return `Exporting first ${Math.min(this.sampleCount, this.totalRows).toLocaleString()} rows`;
300
+ case 'bottom':
301
+ return `Exporting last ${Math.min(this.sampleCount, this.totalRows).toLocaleString()} rows`;
302
+ case 'random':
303
+ return `Exporting ${Math.min(this.sampleCount, this.totalRows).toLocaleString()} random rows`;
304
+ case 'every-nth':
305
+ return `Exporting every ${this.sampleInterval}${this.getOrdinalSuffix(this.sampleInterval)} row (~${this.estimatedRows.toLocaleString()} rows)`;
306
+ default:
307
+ return '';
308
+ }
309
+ }
310
+ /**
311
+ * Get ordinal suffix for number
312
+ */
313
+ getOrdinalSuffix(n) {
314
+ const s = ['th', 'st', 'nd', 'rd'];
315
+ const v = n % 100;
316
+ return s[(v - 20) % 10] || s[v] || s[0];
317
+ }
318
+ /**
319
+ * Handle format selection
320
+ */
321
+ selectFormat(format) {
322
+ this.selectedFormat = format;
323
+ this.exportError = null;
324
+ }
325
+ /**
326
+ * Handle cancel button
327
+ */
328
+ onCancel() {
329
+ this._visible = false;
330
+ this.closed.emit({ exported: false });
331
+ }
332
+ /**
333
+ * Handle export button
334
+ */
335
+ async onExport() {
336
+ if (!this.config?.data) {
337
+ this.exportError = 'No data to export';
338
+ return;
339
+ }
340
+ this.isExporting = true;
341
+ this.exportError = null;
342
+ this.cdr.detectChanges();
343
+ try {
344
+ const options = {
345
+ format: this.selectedFormat,
346
+ fileName: this.fileName,
347
+ includeHeaders: this.includeHeaders,
348
+ columns: this.config.columns,
349
+ sampling: this.exportService.buildSamplingOptions(this.samplingMode, this.sampleCount, this.sampleInterval)
350
+ };
351
+ const result = await this.exportService.export(this.config.data, options);
352
+ if (result.success) {
353
+ this.exportService.downloadResult(result);
354
+ this._visible = false;
355
+ this.closed.emit({
356
+ exported: true,
357
+ result,
358
+ options: options
359
+ });
360
+ }
361
+ else {
362
+ this.exportError = result.error || 'Export failed';
363
+ }
364
+ }
365
+ catch (error) {
366
+ this.exportError = error instanceof Error ? error.message : 'Export failed';
367
+ }
368
+ finally {
369
+ this.isExporting = false;
370
+ this.cdr.detectChanges();
371
+ }
372
+ }
373
+ /**
374
+ * Check if show sampling options
375
+ */
376
+ get showSamplingOptions() {
377
+ return this.config?.showSamplingOptions !== false;
378
+ }
379
+ /**
380
+ * Get dialog title
381
+ */
382
+ get dialogTitle() {
383
+ return this.config?.dialogTitle || 'Export Data';
384
+ }
385
+ static ɵfac = function ExportDialogComponent_Factory(t) { return new (t || ExportDialogComponent)(i0.ɵɵdirectiveInject(i1.ExportService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
386
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ExportDialogComponent, selectors: [["mj-export-dialog"]], inputs: { visible: "visible", config: "config" }, outputs: { closed: "closed" }, 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) {
387
+ i0.ɵɵtemplate(0, ExportDialogComponent_Conditional_0_Template, 48, 15);
388
+ } if (rf & 2) {
389
+ i0.ɵɵconditional(ctx.visible ? 0 : -1);
390
+ } }, dependencies: [i2.NgSelectOption, i2.ɵNgSelectMultipleOption, i2.DefaultValueAccessor, i2.NumberValueAccessor, i2.CheckboxControlValueAccessor, i2.SelectControlValueAccessor, i2.NgControlStatus, i2.MinValidator, i2.MaxValidator, i2.NgModel, i3.DecimalPipe], styles: ["\n\n\n\n\n.mj-export-backdrop[_ngcontent-%COMP%] {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n backdrop-filter: blur(2px);\n z-index: 1000;\n animation: _ngcontent-%COMP%_fadeIn 0.15s ease-out;\n}\n\n\n\n.mj-export-dialog[_ngcontent-%COMP%] {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background: #ffffff;\n border-radius: 12px;\n box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);\n width: 480px;\n max-width: 95vw;\n max-height: 90vh;\n display: flex;\n flex-direction: column;\n z-index: 1001;\n animation: _ngcontent-%COMP%_slideIn 0.2s ease-out;\n}\n\n\n\n.mj-export-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 20px 24px;\n border-bottom: 1px solid #e5e7eb;\n}\n\n.mj-export-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n color: #111827;\n}\n\n.mj-export-close[_ngcontent-%COMP%] {\n background: none;\n border: none;\n padding: 8px;\n cursor: pointer;\n color: #6b7280;\n border-radius: 6px;\n transition: all 0.15s ease;\n}\n\n.mj-export-close[_ngcontent-%COMP%]:hover {\n background: #f3f4f6;\n color: #374151;\n}\n\n\n\n.mj-export-content[_ngcontent-%COMP%] {\n padding: 24px;\n overflow-y: auto;\n flex: 1;\n}\n\n\n\n.mj-export-section[_ngcontent-%COMP%] {\n margin-bottom: 24px;\n}\n\n.mj-export-section[_ngcontent-%COMP%]:last-child {\n margin-bottom: 0;\n}\n\n.mj-export-label[_ngcontent-%COMP%] {\n display: block;\n font-size: 13px;\n font-weight: 500;\n color: #374151;\n margin-bottom: 8px;\n}\n\n\n\n.mj-export-formats[_ngcontent-%COMP%] {\n display: flex;\n gap: 12px;\n}\n\n.mj-export-format-btn[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 16px 12px;\n border: 2px solid #e5e7eb;\n border-radius: 10px;\n background: #ffffff;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.mj-export-format-btn[_ngcontent-%COMP%]:hover {\n border-color: #3b82f6;\n background: #f0f9ff;\n}\n\n.mj-export-format-btn.selected[_ngcontent-%COMP%] {\n border-color: #3b82f6;\n background: #eff6ff;\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);\n}\n\n.mj-export-format-icon[_ngcontent-%COMP%] {\n font-size: 24px;\n margin-bottom: 8px;\n color: #6b7280;\n}\n\n.mj-export-format-btn.selected[_ngcontent-%COMP%] .mj-export-format-icon[_ngcontent-%COMP%] {\n color: #3b82f6;\n}\n\n.mj-export-format-label[_ngcontent-%COMP%] {\n font-size: 14px;\n font-weight: 600;\n color: #111827;\n margin-bottom: 4px;\n}\n\n.mj-export-format-desc[_ngcontent-%COMP%] {\n font-size: 11px;\n color: #6b7280;\n text-align: center;\n}\n\n\n\n.mj-export-input-group[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n}\n\n.mj-export-input[_ngcontent-%COMP%] {\n width: 100%;\n padding: 10px 14px;\n border: 1px solid #d1d5db;\n border-radius: 8px;\n font-size: 14px;\n color: #111827;\n transition: all 0.15s ease;\n box-sizing: border-box;\n}\n\n.mj-export-input[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: #3b82f6;\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);\n}\n\n.mj-export-input-hint[_ngcontent-%COMP%] {\n font-size: 12px;\n color: #9ca3af;\n margin-top: 4px;\n}\n\n\n\n.mj-export-checkbox-section[_ngcontent-%COMP%] {\n padding: 12px 0;\n}\n\n.mj-export-checkbox[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n cursor: pointer;\n font-size: 14px;\n color: #374151;\n}\n\n.mj-export-checkbox[_ngcontent-%COMP%] input[type=\"checkbox\"][_ngcontent-%COMP%] {\n width: 18px;\n height: 18px;\n accent-color: #3b82f6;\n cursor: pointer;\n}\n\n\n\n.mj-export-select[_ngcontent-%COMP%] {\n padding: 10px 14px;\n border: 1px solid #d1d5db;\n border-radius: 8px;\n font-size: 14px;\n color: #111827;\n background: #ffffff;\n cursor: pointer;\n min-width: 160px;\n transition: all 0.15s ease;\n}\n\n.mj-export-select[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: #3b82f6;\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);\n}\n\n\n\n.mj-export-sampling-row[_ngcontent-%COMP%] {\n display: flex;\n gap: 12px;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.mj-export-number-input[_ngcontent-%COMP%] {\n width: 100px;\n padding: 10px 14px;\n border: 1px solid #d1d5db;\n border-radius: 8px;\n font-size: 14px;\n color: #111827;\n transition: all 0.15s ease;\n}\n\n.mj-export-number-input[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: #3b82f6;\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);\n}\n\n.mj-export-sampling-desc[_ngcontent-%COMP%] {\n font-size: 13px;\n color: #6b7280;\n margin-top: 8px;\n font-style: italic;\n}\n\n\n\n.mj-export-summary[_ngcontent-%COMP%] {\n background: #f9fafb;\n border-radius: 10px;\n padding: 16px;\n}\n\n.mj-export-summary-row[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 6px 0;\n}\n\n.mj-export-summary-label[_ngcontent-%COMP%] {\n font-size: 14px;\n color: #6b7280;\n}\n\n.mj-export-summary-value[_ngcontent-%COMP%] {\n font-size: 14px;\n font-weight: 600;\n color: #111827;\n}\n\n.mj-export-highlight[_ngcontent-%COMP%] {\n color: #3b82f6;\n font-size: 16px;\n}\n\n\n\n.mj-export-error[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 16px;\n background: #fef2f2;\n border: 1px solid #fecaca;\n border-radius: 8px;\n color: #dc2626;\n font-size: 14px;\n margin-top: 16px;\n}\n\n\n\n.mj-export-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 12px;\n padding: 16px 24px;\n border-top: 1px solid #e5e7eb;\n background: #f9fafb;\n border-radius: 0 0 12px 12px;\n}\n\n.mj-export-btn[_ngcontent-%COMP%] {\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[_ngcontent-%COMP%]:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.mj-export-btn-primary[_ngcontent-%COMP%] {\n background: #3b82f6;\n color: #ffffff;\n}\n\n.mj-export-btn-primary[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: #2563eb;\n}\n\n.mj-export-btn-secondary[_ngcontent-%COMP%] {\n background: #ffffff;\n color: #374151;\n border: 1px solid #d1d5db;\n}\n\n.mj-export-btn-secondary[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: #f3f4f6;\n}\n\n\n\n@keyframes _ngcontent-%COMP%_fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes _ngcontent-%COMP%_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\n\n.fa-spin[_ngcontent-%COMP%] {\n animation: _ngcontent-%COMP%_spin 1s linear infinite;\n}\n\n@keyframes _ngcontent-%COMP%_spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}"] });
391
+ }
392
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ExportDialogComponent, [{
393
+ type: Component,
394
+ args: [{ 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 - Modern, gorgeous pure Angular styling */\n\n/* Backdrop */\n.mj-export-backdrop {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\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: #ffffff;\n border-radius: 12px;\n box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);\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 #e5e7eb;\n}\n\n.mj-export-header h2 {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n color: #111827;\n}\n\n.mj-export-close {\n background: none;\n border: none;\n padding: 8px;\n cursor: pointer;\n color: #6b7280;\n border-radius: 6px;\n transition: all 0.15s ease;\n}\n\n.mj-export-close:hover {\n background: #f3f4f6;\n color: #374151;\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: #374151;\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 #e5e7eb;\n border-radius: 10px;\n background: #ffffff;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.mj-export-format-btn:hover {\n border-color: #3b82f6;\n background: #f0f9ff;\n}\n\n.mj-export-format-btn.selected {\n border-color: #3b82f6;\n background: #eff6ff;\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);\n}\n\n.mj-export-format-icon {\n font-size: 24px;\n margin-bottom: 8px;\n color: #6b7280;\n}\n\n.mj-export-format-btn.selected .mj-export-format-icon {\n color: #3b82f6;\n}\n\n.mj-export-format-label {\n font-size: 14px;\n font-weight: 600;\n color: #111827;\n margin-bottom: 4px;\n}\n\n.mj-export-format-desc {\n font-size: 11px;\n color: #6b7280;\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 #d1d5db;\n border-radius: 8px;\n font-size: 14px;\n color: #111827;\n transition: all 0.15s ease;\n box-sizing: border-box;\n}\n\n.mj-export-input:focus {\n outline: none;\n border-color: #3b82f6;\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);\n}\n\n.mj-export-input-hint {\n font-size: 12px;\n color: #9ca3af;\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: #374151;\n}\n\n.mj-export-checkbox input[type=\"checkbox\"] {\n width: 18px;\n height: 18px;\n accent-color: #3b82f6;\n cursor: pointer;\n}\n\n/* Select Dropdown */\n.mj-export-select {\n padding: 10px 14px;\n border: 1px solid #d1d5db;\n border-radius: 8px;\n font-size: 14px;\n color: #111827;\n background: #ffffff;\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: #3b82f6;\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);\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 #d1d5db;\n border-radius: 8px;\n font-size: 14px;\n color: #111827;\n transition: all 0.15s ease;\n}\n\n.mj-export-number-input:focus {\n outline: none;\n border-color: #3b82f6;\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);\n}\n\n.mj-export-sampling-desc {\n font-size: 13px;\n color: #6b7280;\n margin-top: 8px;\n font-style: italic;\n}\n\n/* Summary Section */\n.mj-export-summary {\n background: #f9fafb;\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: #6b7280;\n}\n\n.mj-export-summary-value {\n font-size: 14px;\n font-weight: 600;\n color: #111827;\n}\n\n.mj-export-highlight {\n color: #3b82f6;\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: #fef2f2;\n border: 1px solid #fecaca;\n border-radius: 8px;\n color: #dc2626;\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 #e5e7eb;\n background: #f9fafb;\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: #3b82f6;\n color: #ffffff;\n}\n\n.mj-export-btn-primary:hover:not(:disabled) {\n background: #2563eb;\n}\n\n.mj-export-btn-secondary {\n background: #ffffff;\n color: #374151;\n border: 1px solid #d1d5db;\n}\n\n.mj-export-btn-secondary:hover:not(:disabled) {\n background: #f3f4f6;\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"] }]
395
+ }], () => [{ type: i1.ExportService }, { type: i0.ChangeDetectorRef }], { visible: [{
396
+ type: Input
397
+ }], config: [{
398
+ type: Input
399
+ }], closed: [{
400
+ type: Output
401
+ }] }); })();
402
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ExportDialogComponent, { className: "ExportDialogComponent", filePath: "src/lib/export-dialog.component.ts", lineNumber: 28 }); })();
403
+ //# sourceMappingURL=export-dialog.component.js.map
@@ -0,0 +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,sGAAuE;IACxC,eAAiC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CAAC,KAAK,IAAI,eAAe,CAAC;YACrD,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,WAAW,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;QAC9E,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;YACzB,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;QAC3B,CAAC;IACH,CAAC;IAED;;OAEG;IACH,IAAI,mBAAmB;QACrB,OAAO,IAAI,CAAC,MAAM,EAAE,mBAAmB,KAAK,KAAK,CAAC;IACpD,CAAC;IAED;;OAEG;IACH,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,MAAM,EAAE,WAAW,IAAI,aAAa,CAAC;IACnD,CAAC;+EA/MU,qBAAqB;6DAArB,qBAAqB;YC1BlC,sEAAe;;YAAf,sCA0IC;;;iFDhHY,qBAAqB;cALjC,SAAS;2BACE,kBAAkB;8EA8BxB,OAAO;kBADV,KAAK;YAYG,MAAM;kBAAd,KAAK;YAEI,MAAM;kBAAf,MAAM;;kFAvCI,qBAAqB"}
@@ -0,0 +1,99 @@
1
+ import { ExportOptions, ExportResult, ExportFormat, ExportData, ExportColumn, SamplingMode, SamplingOptions } from '@memberjunction/export-engine';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * Configuration for the export dialog
5
+ */
6
+ export interface ExportDialogConfig {
7
+ /** Data to export */
8
+ data: ExportData;
9
+ /** Columns available for export (derived from data if not provided) */
10
+ columns?: ExportColumn[];
11
+ /** Default file name (without extension) */
12
+ defaultFileName?: string;
13
+ /** Available formats to show in dialog */
14
+ availableFormats?: ExportFormat[];
15
+ /** Default format selection */
16
+ defaultFormat?: ExportFormat;
17
+ /** Whether to show sampling options */
18
+ showSamplingOptions?: boolean;
19
+ /** Default sampling mode */
20
+ defaultSamplingMode?: SamplingMode;
21
+ /** Default sample count */
22
+ defaultSampleCount?: number;
23
+ /** Title for the dialog */
24
+ dialogTitle?: string;
25
+ }
26
+ /**
27
+ * Result from export dialog
28
+ */
29
+ export interface ExportDialogResult {
30
+ /** Whether the user proceeded with export */
31
+ exported: boolean;
32
+ /** The export result if exported */
33
+ result?: ExportResult;
34
+ /** Options used for export */
35
+ options?: ExportOptions;
36
+ }
37
+ /**
38
+ * Angular service for data export functionality
39
+ * Wraps the @memberjunction/export-engine for Angular usage
40
+ */
41
+ export declare class ExportService {
42
+ /**
43
+ * Export data directly without dialog
44
+ * @param data Data to export
45
+ * @param options Export options
46
+ * @returns Export result with buffer and metadata
47
+ */
48
+ export(data: ExportData, options?: Partial<ExportOptions>): Promise<ExportResult>;
49
+ /**
50
+ * Export to Excel format
51
+ */
52
+ toExcel(data: ExportData, options?: Omit<Partial<ExportOptions>, 'format'>): Promise<ExportResult>;
53
+ /**
54
+ * Export to CSV format
55
+ */
56
+ toCSV(data: ExportData, options?: Omit<Partial<ExportOptions>, 'format'>): Promise<ExportResult>;
57
+ /**
58
+ * Export to JSON format
59
+ */
60
+ toJSON(data: ExportData, options?: Omit<Partial<ExportOptions>, 'format'>): Promise<ExportResult>;
61
+ /**
62
+ * Get supported export formats
63
+ */
64
+ getSupportedFormats(): ExportFormat[];
65
+ /**
66
+ * Download the export result as a file
67
+ * @param result Export result containing the data
68
+ */
69
+ downloadResult(result: ExportResult): void;
70
+ /**
71
+ * Export and immediately download
72
+ * @param data Data to export
73
+ * @param options Export options
74
+ */
75
+ exportAndDownload(data: ExportData, options?: Partial<ExportOptions>): Promise<ExportResult>;
76
+ /**
77
+ * Get available sampling modes with display labels
78
+ */
79
+ getSamplingModes(): {
80
+ mode: SamplingMode;
81
+ label: string;
82
+ description: string;
83
+ }[];
84
+ /**
85
+ * Get format display info
86
+ */
87
+ getFormatInfo(format: ExportFormat): {
88
+ label: string;
89
+ icon: string;
90
+ description: string;
91
+ };
92
+ /**
93
+ * Build sampling options from user selections
94
+ */
95
+ buildSamplingOptions(mode: SamplingMode, count?: number, interval?: number): SamplingOptions;
96
+ static ɵfac: i0.ɵɵFactoryDeclaration<ExportService, never>;
97
+ static ɵprov: i0.ɵɵInjectableDeclaration<ExportService>;
98
+ }
99
+ //# sourceMappingURL=export.service.d.ts.map
@@ -0,0 +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;;;;;OAKG;IACG,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,GAAE,OAAO,CAAC,aAAa,CAAM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Engine } from '@memberjunction/export-engine';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Angular service for data export functionality
6
+ * Wraps the @memberjunction/export-engine for Angular usage
7
+ */
8
+ export class ExportService {
9
+ /**
10
+ * Export data directly without dialog
11
+ * @param data Data to export
12
+ * @param options Export options
13
+ * @returns Export result with buffer and metadata
14
+ */
15
+ async export(data, options = {}) {
16
+ return ExportEngine.export(data, options);
17
+ }
18
+ /**
19
+ * Export to Excel format
20
+ */
21
+ async toExcel(data, options = {}) {
22
+ return ExportEngine.toExcel(data, options);
23
+ }
24
+ /**
25
+ * Export to CSV format
26
+ */
27
+ async toCSV(data, options = {}) {
28
+ return ExportEngine.toCSV(data, options);
29
+ }
30
+ /**
31
+ * Export to JSON format
32
+ */
33
+ async toJSON(data, options = {}) {
34
+ return ExportEngine.toJSON(data, options);
35
+ }
36
+ /**
37
+ * Get supported export formats
38
+ */
39
+ getSupportedFormats() {
40
+ return ExportEngine.getSupportedFormats();
41
+ }
42
+ /**
43
+ * Download the export result as a file
44
+ * @param result Export result containing the data
45
+ */
46
+ downloadResult(result) {
47
+ if (!result.success || !result.data) {
48
+ throw new Error(result.error || 'Export failed - no data to download');
49
+ }
50
+ const blob = new Blob([result.data], { type: result.mimeType });
51
+ const url = URL.createObjectURL(blob);
52
+ const link = document.createElement('a');
53
+ link.href = url;
54
+ link.download = result.fileName || 'export';
55
+ document.body.appendChild(link);
56
+ link.click();
57
+ document.body.removeChild(link);
58
+ URL.revokeObjectURL(url);
59
+ }
60
+ /**
61
+ * Export and immediately download
62
+ * @param data Data to export
63
+ * @param options Export options
64
+ */
65
+ async exportAndDownload(data, options = {}) {
66
+ const result = await this.export(data, options);
67
+ if (result.success) {
68
+ this.downloadResult(result);
69
+ }
70
+ return result;
71
+ }
72
+ /**
73
+ * Get available sampling modes with display labels
74
+ */
75
+ getSamplingModes() {
76
+ return [
77
+ { mode: 'all', label: 'All Rows', description: 'Export all data rows' },
78
+ { mode: 'top', label: 'Top N', description: 'Export the first N rows' },
79
+ { mode: 'bottom', label: 'Bottom N', description: 'Export the last N rows' },
80
+ { mode: 'every-nth', label: 'Every Nth', description: 'Export every Nth row' },
81
+ { mode: 'random', label: 'Random N', description: 'Export N random rows' }
82
+ ];
83
+ }
84
+ /**
85
+ * Get format display info
86
+ */
87
+ getFormatInfo(format) {
88
+ switch (format) {
89
+ case 'excel':
90
+ return {
91
+ label: 'Excel',
92
+ icon: 'fa-file-excel',
93
+ description: 'Microsoft Excel spreadsheet (.xlsx)'
94
+ };
95
+ case 'csv':
96
+ return {
97
+ label: 'CSV',
98
+ icon: 'fa-file-csv',
99
+ description: 'Comma-separated values (.csv)'
100
+ };
101
+ case 'json':
102
+ return {
103
+ label: 'JSON',
104
+ icon: 'fa-file-code',
105
+ description: 'JavaScript Object Notation (.json)'
106
+ };
107
+ }
108
+ }
109
+ /**
110
+ * Build sampling options from user selections
111
+ */
112
+ buildSamplingOptions(mode, count, interval) {
113
+ const options = { mode };
114
+ if (mode === 'top' || mode === 'bottom' || mode === 'random') {
115
+ options.count = count || 100;
116
+ }
117
+ else if (mode === 'every-nth') {
118
+ options.interval = interval || 10;
119
+ }
120
+ return options;
121
+ }
122
+ static ɵfac = function ExportService_Factory(t) { return new (t || ExportService)(); };
123
+ static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ExportService, factory: ExportService.ɵfac, providedIn: 'root' });
124
+ }
125
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ExportService, [{
126
+ type: Injectable,
127
+ args: [{
128
+ providedIn: 'root'
129
+ }]
130
+ }], null, null); })();
131
+ //# sourceMappingURL=export.service.js.map
@@ -0,0 +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;;;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,qCAAqC;iBACnD,CAAC;YACJ,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;uEA9HU,aAAa;gEAAb,aAAa,WAAb,aAAa,mBAFZ,MAAM;;iFAEP,aAAa;cAHzB,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Export dialog configuration
3
+ */
4
+ export interface ExportDialogConfig {
5
+ /** Title for the dialog */
6
+ title?: string;
7
+ /** Total number of rows available for export */
8
+ totalRows: number;
9
+ /** Column definitions for the data */
10
+ columns?: ExportColumnInfo[];
11
+ /** Whether to show advanced options by default */
12
+ showAdvancedOptions?: boolean;
13
+ /** Default file name */
14
+ fileName?: string;
15
+ }
16
+ /**
17
+ * Column information for export
18
+ */
19
+ export interface ExportColumnInfo {
20
+ name: string;
21
+ displayName: string;
22
+ dataType?: 'string' | 'number' | 'date' | 'boolean' | 'currency';
23
+ selected?: boolean;
24
+ }
25
+ /**
26
+ * Result from the export dialog
27
+ */
28
+ export interface ExportDialogResult {
29
+ /** Whether the user confirmed the export */
30
+ confirmed: boolean;
31
+ /** Selected export format */
32
+ format?: 'excel' | 'csv' | 'json';
33
+ /** Whether to include headers */
34
+ includeHeaders?: boolean;
35
+ /** Row sampling configuration */
36
+ sampling?: {
37
+ mode: 'all' | 'top' | 'bottom' | 'every-nth' | 'random';
38
+ count?: number;
39
+ interval?: number;
40
+ };
41
+ /** Selected columns (if column selection was enabled) */
42
+ selectedColumns?: string[];
43
+ /** Custom file name */
44
+ fileName?: string;
45
+ }
46
+ /**
47
+ * Options for the export service
48
+ */
49
+ export interface ExportServiceOptions {
50
+ /** Data to export */
51
+ data: Record<string, unknown>[];
52
+ /** Export format */
53
+ format: 'excel' | 'csv' | 'json';
54
+ /** File name without extension */
55
+ fileName?: string;
56
+ /** Include column headers */
57
+ includeHeaders?: boolean;
58
+ /** Row sampling options */
59
+ sampling?: {
60
+ mode: 'all' | 'top' | 'bottom' | 'every-nth' | 'random';
61
+ count?: number;
62
+ interval?: number;
63
+ };
64
+ /** Columns to export */
65
+ columns?: ExportColumnInfo[];
66
+ }
67
+ //# sourceMappingURL=export.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export.types.d.ts","sourceRoot":"","sources":["../../src/lib/export.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC7B,kDAAkD;IAClD,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,wBAAwB;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE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
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=export.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export.types.js","sourceRoot":"","sources":["../../src/lib/export.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./export-dialog.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/forms";
5
+ export declare class ExportServiceModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<ExportServiceModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ExportServiceModule, [typeof i1.ExportDialogComponent], [typeof i2.CommonModule, typeof i3.FormsModule], [typeof i1.ExportDialogComponent]>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<ExportServiceModule>;
9
+ }
10
+ //# sourceMappingURL=module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/lib/module.ts"],"names":[],"mappings":";;;;AAOA,qBAea,mBAAmB;yCAAnB,mBAAmB;0CAAnB,mBAAmB;0CAAnB,mBAAmB;CAAI"}
@@ -0,0 +1,35 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { FormsModule } from '@angular/forms';
4
+ import { ExportDialogComponent } from './export-dialog.component';
5
+ import { ExportService } from './export.service';
6
+ import * as i0 from "@angular/core";
7
+ export class ExportServiceModule {
8
+ static ɵfac = function ExportServiceModule_Factory(t) { return new (t || ExportServiceModule)(); };
9
+ static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: ExportServiceModule });
10
+ static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [
11
+ ExportService
12
+ ], imports: [CommonModule,
13
+ FormsModule] });
14
+ }
15
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ExportServiceModule, [{
16
+ type: NgModule,
17
+ args: [{
18
+ declarations: [
19
+ ExportDialogComponent
20
+ ],
21
+ imports: [
22
+ CommonModule,
23
+ FormsModule
24
+ ],
25
+ exports: [
26
+ ExportDialogComponent
27
+ ],
28
+ providers: [
29
+ ExportService
30
+ ]
31
+ }]
32
+ }], null, null); })();
33
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(ExportServiceModule, { declarations: [ExportDialogComponent], imports: [CommonModule,
34
+ FormsModule], exports: [ExportDialogComponent] }); })();
35
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/lib/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;;AAiBjD,MAAM,OAAO,mBAAmB;6EAAnB,mBAAmB;4DAAnB,mBAAmB;iEAJnB;YACT,aAAa;SACd,YARC,YAAY;YACZ,WAAW;;iFASF,mBAAmB;cAf/B,QAAQ;eAAC;gBACR,YAAY,EAAE;oBACZ,qBAAqB;iBACtB;gBACD,OAAO,EAAE;oBACP,YAAY;oBACZ,WAAW;iBACZ;gBACD,OAAO,EAAE;oBACP,qBAAqB;iBACtB;gBACD,SAAS,EAAE;oBACT,aAAa;iBACd;aACF;;wFACY,mBAAmB,mBAb5B,qBAAqB,aAGrB,YAAY;QACZ,WAAW,aAGX,qBAAqB"}
@@ -0,0 +1,5 @@
1
+ export * from './lib/module';
2
+ export * from './lib/export.service';
3
+ export * from './lib/export-dialog.component';
4
+ export declare function LoadExportService(): void;
5
+ //# sourceMappingURL=public-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAKA,cAAc,cAAc,CAAC;AAG7B,cAAc,sBAAsB,CAAC;AAGrC,cAAc,+BAA+B,CAAC;AAG9C,wBAAgB,iBAAiB,SAAK"}
@@ -0,0 +1,13 @@
1
+ /*
2
+ * Public API Surface for @memberjunction/ng-export-service
3
+ */
4
+ // Module
5
+ export * from './lib/module';
6
+ // Service
7
+ export * from './lib/export.service';
8
+ // Components
9
+ export * from './lib/export-dialog.component';
10
+ // Prevent tree-shaking
11
+ export function LoadExportService() { }
12
+ // NOTE: For export types (ExportFormat, ExportOptions, etc.), import directly from @memberjunction/export-engine
13
+ //# sourceMappingURL=public-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,SAAS;AACT,cAAc,cAAc,CAAC;AAE7B,UAAU;AACV,cAAc,sBAAsB,CAAC;AAErC,aAAa;AACb,cAAc,+BAA+B,CAAC;AAE9C,uBAAuB;AACvB,MAAM,UAAU,iBAAiB,KAAI,CAAC;AAEtC,iHAAiH"}
package/package.json CHANGED
@@ -1,10 +1,43 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-export-service",
3
- "version": "0.0.1",
4
- "description": "OIDC trusted publishing setup package for @memberjunction/ng-export-service",
3
+ "version": "2.133.0",
4
+ "description": "MemberJunction: Angular export service and dialog for exporting data to Excel, CSV, and JSON",
5
+ "main": "./dist/public-api.js",
6
+ "typings": "./dist/public-api.d.ts",
7
+ "files": [
8
+ "/dist"
9
+ ],
10
+ "scripts": {
11
+ "test": "echo \"Error: no test specified\" && exit 1",
12
+ "build": "ngc"
13
+ },
5
14
  "keywords": [
6
- "oidc",
7
- "trusted-publishing",
8
- "setup"
9
- ]
15
+ "MemberJunction",
16
+ "Angular",
17
+ "Export",
18
+ "Excel",
19
+ "CSV",
20
+ "JSON"
21
+ ],
22
+ "author": "",
23
+ "license": "ISC",
24
+ "devDependencies": {
25
+ "@angular/compiler": "18.0.2",
26
+ "@angular/compiler-cli": "18.0.2"
27
+ },
28
+ "peerDependencies": {
29
+ "@angular/common": "18.0.2",
30
+ "@angular/core": "18.0.2",
31
+ "@angular/forms": "18.0.2",
32
+ "@angular/cdk": "18.0.2"
33
+ },
34
+ "dependencies": {
35
+ "@memberjunction/export-engine": "2.133.0",
36
+ "tslib": "^2.3.0"
37
+ },
38
+ "sideEffects": false,
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "https://github.com/MemberJunction/MJ"
42
+ }
10
43
  }
package/README.md DELETED
@@ -1,45 +0,0 @@
1
- # @memberjunction/ng-export-service
2
-
3
- ## ⚠️ IMPORTANT NOTICE ⚠️
4
-
5
- **This package is created solely for the purpose of setting up OIDC (OpenID Connect) trusted publishing with npm.**
6
-
7
- This is **NOT** a functional package and contains **NO** code or functionality beyond the OIDC setup configuration.
8
-
9
- ## Purpose
10
-
11
- This package exists to:
12
- 1. Configure OIDC trusted publishing for the package name `@memberjunction/ng-export-service`
13
- 2. Enable secure, token-less publishing from CI/CD workflows
14
- 3. Establish provenance for packages published under this name
15
-
16
- ## What is OIDC Trusted Publishing?
17
-
18
- OIDC trusted publishing allows package maintainers to publish packages directly from their CI/CD workflows without needing to manage npm access tokens. Instead, it uses OpenID Connect to establish trust between the CI/CD provider (like GitHub Actions) and npm.
19
-
20
- ## Setup Instructions
21
-
22
- To properly configure OIDC trusted publishing for this package:
23
-
24
- 1. Go to [npmjs.com](https://www.npmjs.com/) and navigate to your package settings
25
- 2. Configure the trusted publisher (e.g., GitHub Actions)
26
- 3. Specify the repository and workflow that should be allowed to publish
27
- 4. Use the configured workflow to publish your actual package
28
-
29
- ## DO NOT USE THIS PACKAGE
30
-
31
- This package is a placeholder for OIDC configuration only. It:
32
- - Contains no executable code
33
- - Provides no functionality
34
- - Should not be installed as a dependency
35
- - Exists only for administrative purposes
36
-
37
- ## More Information
38
-
39
- For more details about npm's trusted publishing feature, see:
40
- - [npm Trusted Publishing Documentation](https://docs.npmjs.com/generating-provenance-statements)
41
- - [GitHub Actions OIDC Documentation](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect)
42
-
43
- ---
44
-
45
- **Maintained for OIDC setup purposes only**