@memberjunction/ng-export-service 5.42.0 → 5.44.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.
- package/package.json +3 -2
- package/dist/__tests__/export-types.test.d.ts +0 -2
- package/dist/__tests__/export-types.test.d.ts.map +0 -1
- package/dist/__tests__/export-types.test.js +0 -86
- package/dist/__tests__/export-types.test.js.map +0 -1
- package/dist/__tests__/index.test.d.ts +0 -2
- package/dist/__tests__/index.test.d.ts.map +0 -1
- package/dist/__tests__/index.test.js +0 -7
- package/dist/__tests__/index.test.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-export-service",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.44.0",
|
|
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",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@angular/compiler": "21.1.3",
|
|
27
27
|
"@angular/compiler-cli": "21.1.3",
|
|
28
|
+
"@memberjunction/ng-test-utils": "5.44.0",
|
|
28
29
|
"vitest": "^4.0.18"
|
|
29
30
|
},
|
|
30
31
|
"peerDependencies": {
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
"@angular/cdk": "21.1.3"
|
|
35
36
|
},
|
|
36
37
|
"dependencies": {
|
|
37
|
-
"@memberjunction/export-engine": "5.
|
|
38
|
+
"@memberjunction/export-engine": "5.44.0",
|
|
38
39
|
"tslib": "^2.8.1"
|
|
39
40
|
},
|
|
40
41
|
"sideEffects": false,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"export-types.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/export-types.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
describe('ExportDialogConfig', () => {
|
|
3
|
-
it('should construct with minimal required fields', () => {
|
|
4
|
-
const config = {
|
|
5
|
-
totalRows: 100
|
|
6
|
-
};
|
|
7
|
-
expect(config.totalRows).toBe(100);
|
|
8
|
-
expect(config.title).toBeUndefined();
|
|
9
|
-
expect(config.columns).toBeUndefined();
|
|
10
|
-
});
|
|
11
|
-
it('should accept all optional fields', () => {
|
|
12
|
-
const config = {
|
|
13
|
-
title: 'Export Users',
|
|
14
|
-
totalRows: 500,
|
|
15
|
-
columns: [
|
|
16
|
-
{ name: 'Name', displayName: 'Full Name', dataType: 'string', selected: true },
|
|
17
|
-
{ name: 'Age', displayName: 'Age', dataType: 'number', selected: false }
|
|
18
|
-
],
|
|
19
|
-
showAdvancedOptions: true,
|
|
20
|
-
fileName: 'users-export'
|
|
21
|
-
};
|
|
22
|
-
expect(config.columns).toHaveLength(2);
|
|
23
|
-
expect(config.showAdvancedOptions).toBe(true);
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
describe('ExportColumnInfo', () => {
|
|
27
|
-
it('should represent a string column', () => {
|
|
28
|
-
const col = {
|
|
29
|
-
name: 'Email',
|
|
30
|
-
displayName: 'Email Address',
|
|
31
|
-
dataType: 'string',
|
|
32
|
-
selected: true
|
|
33
|
-
};
|
|
34
|
-
expect(col.dataType).toBe('string');
|
|
35
|
-
expect(col.selected).toBe(true);
|
|
36
|
-
});
|
|
37
|
-
it('should support all data types', () => {
|
|
38
|
-
const types = ['string', 'number', 'date', 'boolean', 'currency'];
|
|
39
|
-
expect(types).toHaveLength(5);
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
describe('ExportDialogResult', () => {
|
|
43
|
-
it('should represent a cancelled dialog', () => {
|
|
44
|
-
const result = { confirmed: false };
|
|
45
|
-
expect(result.confirmed).toBe(false);
|
|
46
|
-
expect(result.format).toBeUndefined();
|
|
47
|
-
});
|
|
48
|
-
it('should represent a confirmed export', () => {
|
|
49
|
-
const result = {
|
|
50
|
-
confirmed: true,
|
|
51
|
-
format: 'excel',
|
|
52
|
-
includeHeaders: true,
|
|
53
|
-
fileName: 'export-data',
|
|
54
|
-
sampling: { mode: 'all' },
|
|
55
|
-
selectedColumns: ['Name', 'Email']
|
|
56
|
-
};
|
|
57
|
-
expect(result.format).toBe('excel');
|
|
58
|
-
expect(result.selectedColumns).toHaveLength(2);
|
|
59
|
-
});
|
|
60
|
-
it('should support all sampling modes', () => {
|
|
61
|
-
const modes = [
|
|
62
|
-
'all', 'top', 'bottom', 'every-nth', 'random'
|
|
63
|
-
];
|
|
64
|
-
expect(modes).toHaveLength(5);
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
describe('ExportServiceOptions', () => {
|
|
68
|
-
it('should construct with required fields', () => {
|
|
69
|
-
const options = {
|
|
70
|
-
data: [{ Name: 'Test', Value: 42 }],
|
|
71
|
-
format: 'csv'
|
|
72
|
-
};
|
|
73
|
-
expect(options.data).toHaveLength(1);
|
|
74
|
-
expect(options.format).toBe('csv');
|
|
75
|
-
});
|
|
76
|
-
it('should support JSON format', () => {
|
|
77
|
-
const options = {
|
|
78
|
-
data: [],
|
|
79
|
-
format: 'json',
|
|
80
|
-
fileName: 'data',
|
|
81
|
-
includeHeaders: true
|
|
82
|
-
};
|
|
83
|
-
expect(options.format).toBe('json');
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
//# sourceMappingURL=export-types.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"export-types.test.js","sourceRoot":"","sources":["../../src/__tests__/export-types.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAQ9C,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;QACvD,MAAM,MAAM,GAAuB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WAAW,EAAE,QAAQ;SAC9C,CAAC;QACF,MAAM,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;QAC/C,MAAM,OAAO,GAAyB;YACpC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;YACnC,MAAM,EAAE,KAAK;SACd,CAAC;QACF,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QACrC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4BAA4B,EAAE,GAAG,EAAE;QACpC,MAAM,OAAO,GAAyB;YACpC,IAAI,EAAE,EAAE;YACR,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,MAAM;YAChB,cAAc,EAAE,IAAI;SACrB,CAAC;QACF,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { describe, it, expect } from 'vitest';\nimport type {\n ExportDialogConfig,\n ExportColumnInfo,\n ExportDialogResult,\n ExportServiceOptions\n} from '../lib/export.types';\n\ndescribe('ExportDialogConfig', () => {\n it('should construct with minimal required fields', () => {\n const config: ExportDialogConfig = {\n totalRows: 100\n };\n expect(config.totalRows).toBe(100);\n expect(config.title).toBeUndefined();\n expect(config.columns).toBeUndefined();\n });\n\n it('should accept all optional fields', () => {\n const config: ExportDialogConfig = {\n title: 'Export Users',\n totalRows: 500,\n columns: [\n { name: 'Name', displayName: 'Full Name', dataType: 'string', selected: true },\n { name: 'Age', displayName: 'Age', dataType: 'number', selected: false }\n ],\n showAdvancedOptions: true,\n fileName: 'users-export'\n };\n expect(config.columns).toHaveLength(2);\n expect(config.showAdvancedOptions).toBe(true);\n });\n});\n\ndescribe('ExportColumnInfo', () => {\n it('should represent a string column', () => {\n const col: ExportColumnInfo = {\n name: 'Email',\n displayName: 'Email Address',\n dataType: 'string',\n selected: true\n };\n expect(col.dataType).toBe('string');\n expect(col.selected).toBe(true);\n });\n\n it('should support all data types', () => {\n const types: ExportColumnInfo['dataType'][] = ['string', 'number', 'date', 'boolean', 'currency'];\n expect(types).toHaveLength(5);\n });\n});\n\ndescribe('ExportDialogResult', () => {\n it('should represent a cancelled dialog', () => {\n const result: ExportDialogResult = { confirmed: false };\n expect(result.confirmed).toBe(false);\n expect(result.format).toBeUndefined();\n });\n\n it('should represent a confirmed export', () => {\n const result: ExportDialogResult = {\n confirmed: true,\n format: 'excel',\n includeHeaders: true,\n fileName: 'export-data',\n sampling: { mode: 'all' },\n selectedColumns: ['Name', 'Email']\n };\n expect(result.format).toBe('excel');\n expect(result.selectedColumns).toHaveLength(2);\n });\n\n it('should support all sampling modes', () => {\n const modes: NonNullable<ExportDialogResult['sampling']>['mode'][] = [\n 'all', 'top', 'bottom', 'every-nth', 'random'\n ];\n expect(modes).toHaveLength(5);\n });\n});\n\ndescribe('ExportServiceOptions', () => {\n it('should construct with required fields', () => {\n const options: ExportServiceOptions = {\n data: [{ Name: 'Test', Value: 42 }],\n format: 'csv'\n };\n expect(options.data).toHaveLength(1);\n expect(options.format).toBe('csv');\n });\n\n it('should support JSON format', () => {\n const options: ExportServiceOptions = {\n data: [],\n format: 'json',\n fileName: 'data',\n includeHeaders: true\n };\n expect(options.format).toBe('json');\n });\n});\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/index.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../src/__tests__/index.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE9C,QAAQ,CAAC,mCAAmC,EAAE,GAAG,EAAE;IACjD,EAAE,CAAC,4BAA4B,EAAE,GAAG,EAAE;QACpC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { describe, it, expect } from 'vitest';\n\ndescribe('@memberjunction/ng-export-service', () => {\n it('should have a passing test', () => {\n expect(true).toBe(true);\n });\n});\n"]}
|