@memberjunction/ng-file-storage 2.1.4 → 2.1.5
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/dist/lib/category-tree/category-tree.d.ts +1 -1
- package/dist/lib/category-tree/category-tree.d.ts.map +1 -1
- package/dist/lib/file-upload/file-upload.d.ts +82 -82
- package/dist/lib/file-upload/file-upload.d.ts.map +1 -1
- package/dist/lib/file-upload/file-upload.js +5 -17
- package/dist/lib/files-grid/files-grid.d.ts +1 -1
- package/dist/lib/files-grid/files-grid.js +2 -2
- package/package.json +7 -7
|
@@ -6,7 +6,7 @@ import { TreeItemAddRemoveArgs } from '@progress/kendo-angular-treeview';
|
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class CategoryTreeComponent implements OnInit {
|
|
8
8
|
private sharedService;
|
|
9
|
-
categorySelected: EventEmitter<
|
|
9
|
+
categorySelected: EventEmitter<string | undefined>;
|
|
10
10
|
isLoading: boolean;
|
|
11
11
|
showNew: boolean;
|
|
12
12
|
newCategoryName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category-tree.d.ts","sourceRoot":"","sources":["../../../src/lib/category-tree/category-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAE,MAAM,EAAU,MAAM,eAAe,CAAC;AAExE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;;AAEzE,qBAKa,qBAAsB,YAAW,MAAM;IAatC,OAAO,CAAC,aAAa;IAZvB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"category-tree.d.ts","sourceRoot":"","sources":["../../../src/lib/category-tree/category-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAE,MAAM,EAAU,MAAM,eAAe,CAAC;AAExE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;;AAEzE,qBAKa,qBAAsB,YAAW,MAAM;IAatC,OAAO,CAAC,aAAa;IAZvB,gBAAgB,mCAA0C;IAE7D,SAAS,EAAE,OAAO,CAAS;IAC3B,OAAO,EAAE,OAAO,CAAS;IACzB,eAAe,SAAM;IACrB,YAAY,UAAM;IAClB,kBAAkB,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAEnD,cAAc,EAAE,kBAAkB,EAAE,CAAM;IAEjD,OAAO,CAAC,EAAE,CAAkB;gBAER,aAAa,EAAE,aAAa;IAEhD,QAAQ,IAAI,IAAI;IAIV,iBAAiB;IAIvB,iBAAiB;IAIX,UAAU,CAAC,CAAC,EAAE,qBAAqB;IAWnC,eAAe;IAWf,cAAc,CAAC,YAAY,EAAE,kBAAkB;IAerD,cAAc;IAKd,gBAAgB,CAAC,CAAC,EAAE,sBAAsB;IAgB1C,YAAY;IAKN,UAAU;IAOV,OAAO;yCAjGF,qBAAqB;2CAArB,qBAAqB;CAiHjC"}
|
|
@@ -15,76 +15,76 @@ declare const FileUploadMutationSchema: z.ZodObject<{
|
|
|
15
15
|
NameExists: z.ZodBoolean;
|
|
16
16
|
UploadUrl: z.ZodString;
|
|
17
17
|
File: z.ZodObject<{
|
|
18
|
-
|
|
19
|
-
CategoryID: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
20
|
-
ContentType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
21
|
-
CreatedAt: z.ZodNumber;
|
|
22
|
-
Description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
|
-
ID: z.ZodNumber;
|
|
18
|
+
ID: z.ZodString;
|
|
24
19
|
Name: z.ZodString;
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
Description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
21
|
+
CategoryID: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
|
+
ProviderID: z.ZodString;
|
|
23
|
+
ContentType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
27
24
|
ProviderKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
28
25
|
Status: z.ZodString;
|
|
29
|
-
|
|
26
|
+
__mj_CreatedAt: z.ZodDate;
|
|
27
|
+
__mj_UpdatedAt: z.ZodDate;
|
|
28
|
+
Category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
29
|
+
Provider: z.ZodString;
|
|
30
30
|
}, "strip", z.ZodTypeAny, {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
31
|
+
Category?: string | undefined;
|
|
32
|
+
ID?: string | undefined;
|
|
33
|
+
__mj_CreatedAt?: Date | undefined;
|
|
34
|
+
__mj_UpdatedAt?: Date | undefined;
|
|
35
|
+
Name?: string | undefined;
|
|
36
|
+
Description?: string | undefined;
|
|
37
|
+
Status?: string | undefined;
|
|
38
|
+
CategoryID?: string | undefined;
|
|
39
|
+
ProviderID?: string | undefined;
|
|
40
|
+
ContentType?: string | undefined;
|
|
41
|
+
ProviderKey?: string | undefined;
|
|
42
|
+
Provider?: string | undefined;
|
|
43
43
|
}, {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
44
|
+
Category?: string | undefined;
|
|
45
|
+
ID?: string | undefined;
|
|
46
|
+
__mj_CreatedAt?: Date | undefined;
|
|
47
|
+
__mj_UpdatedAt?: Date | undefined;
|
|
48
|
+
Name?: string | undefined;
|
|
49
|
+
Description?: string | undefined;
|
|
50
|
+
Status?: string | undefined;
|
|
51
|
+
CategoryID?: string | undefined;
|
|
52
|
+
ProviderID?: string | undefined;
|
|
53
|
+
ContentType?: string | undefined;
|
|
54
|
+
ProviderKey?: string | undefined;
|
|
55
|
+
Provider?: string | undefined;
|
|
56
56
|
}>;
|
|
57
57
|
}, "strip", z.ZodTypeAny, {
|
|
58
58
|
File: {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
59
|
+
Category?: string | undefined;
|
|
60
|
+
ID?: string | undefined;
|
|
61
|
+
__mj_CreatedAt?: Date | undefined;
|
|
62
|
+
__mj_UpdatedAt?: Date | undefined;
|
|
63
|
+
Name?: string | undefined;
|
|
64
|
+
Description?: string | undefined;
|
|
65
|
+
Status?: string | undefined;
|
|
66
|
+
CategoryID?: string | undefined;
|
|
67
|
+
ProviderID?: string | undefined;
|
|
68
|
+
ContentType?: string | undefined;
|
|
69
|
+
ProviderKey?: string | undefined;
|
|
70
|
+
Provider?: string | undefined;
|
|
71
71
|
};
|
|
72
72
|
NameExists: boolean;
|
|
73
73
|
UploadUrl: string;
|
|
74
74
|
}, {
|
|
75
75
|
File: {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
76
|
+
Category?: string | undefined;
|
|
77
|
+
ID?: string | undefined;
|
|
78
|
+
__mj_CreatedAt?: Date | undefined;
|
|
79
|
+
__mj_UpdatedAt?: Date | undefined;
|
|
80
|
+
Name?: string | undefined;
|
|
81
|
+
Description?: string | undefined;
|
|
82
|
+
Status?: string | undefined;
|
|
83
|
+
CategoryID?: string | undefined;
|
|
84
|
+
ProviderID?: string | undefined;
|
|
85
|
+
ContentType?: string | undefined;
|
|
86
|
+
ProviderKey?: string | undefined;
|
|
87
|
+
Provider?: string | undefined;
|
|
88
88
|
};
|
|
89
89
|
NameExists: boolean;
|
|
90
90
|
UploadUrl: string;
|
|
@@ -92,18 +92,18 @@ declare const FileUploadMutationSchema: z.ZodObject<{
|
|
|
92
92
|
}, "strip", z.ZodTypeAny, {
|
|
93
93
|
CreateFile: {
|
|
94
94
|
File: {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
95
|
+
Category?: string | undefined;
|
|
96
|
+
ID?: string | undefined;
|
|
97
|
+
__mj_CreatedAt?: Date | undefined;
|
|
98
|
+
__mj_UpdatedAt?: Date | undefined;
|
|
99
|
+
Name?: string | undefined;
|
|
100
|
+
Description?: string | undefined;
|
|
101
|
+
Status?: string | undefined;
|
|
102
|
+
CategoryID?: string | undefined;
|
|
103
|
+
ProviderID?: string | undefined;
|
|
104
|
+
ContentType?: string | undefined;
|
|
105
|
+
ProviderKey?: string | undefined;
|
|
106
|
+
Provider?: string | undefined;
|
|
107
107
|
};
|
|
108
108
|
NameExists: boolean;
|
|
109
109
|
UploadUrl: string;
|
|
@@ -111,18 +111,18 @@ declare const FileUploadMutationSchema: z.ZodObject<{
|
|
|
111
111
|
}, {
|
|
112
112
|
CreateFile: {
|
|
113
113
|
File: {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
114
|
+
Category?: string | undefined;
|
|
115
|
+
ID?: string | undefined;
|
|
116
|
+
__mj_CreatedAt?: Date | undefined;
|
|
117
|
+
__mj_UpdatedAt?: Date | undefined;
|
|
118
|
+
Name?: string | undefined;
|
|
119
|
+
Description?: string | undefined;
|
|
120
|
+
Status?: string | undefined;
|
|
121
|
+
CategoryID?: string | undefined;
|
|
122
|
+
ProviderID?: string | undefined;
|
|
123
|
+
ContentType?: string | undefined;
|
|
124
|
+
ProviderKey?: string | undefined;
|
|
125
|
+
Provider?: string | undefined;
|
|
126
126
|
};
|
|
127
127
|
NameExists: boolean;
|
|
128
128
|
UploadUrl: string;
|
|
@@ -138,7 +138,7 @@ export declare class FileUploadComponent implements OnInit {
|
|
|
138
138
|
get IsUploading(): boolean;
|
|
139
139
|
constructor();
|
|
140
140
|
disabled: boolean;
|
|
141
|
-
CategoryID:
|
|
141
|
+
CategoryID: string | undefined;
|
|
142
142
|
uploadStarted: EventEmitter<void>;
|
|
143
143
|
fileUpload: EventEmitter<FileUploadEvent>;
|
|
144
144
|
ngOnInit(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-upload.d.ts","sourceRoot":"","sources":["../../../src/lib/file-upload/file-upload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAS,MAAM,EAAU,MAAM,eAAe,CAAC;AAE/E,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"file-upload.d.ts","sourceRoot":"","sources":["../../../src/lib/file-upload/file-upload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAS,MAAM,EAAU,MAAM,eAAe,CAAC;AAE/E,OAAO,EAAE,UAAU,EAAyC,MAAM,+BAA+B,CAAC;AAGlG,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;;AAExB,MAAM,MAAM,eAAe,GAAG;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AAgCvG,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAM5B,CAAC;AAEH,KAAK,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAC9E,KAAK,WAAW,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAE/C,qBAKa,mBAAoB,YAAW,MAAM;IACzC,YAAY,EAAE,KAAK,CAAC,WAAW,CAAC,CAAM;IACtC,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAM;IACzC,OAAO,CAAC,iBAAiB,CAAM;IAC/B,OAAO,CAAC,EAAE,CAAkB;IAE5B,IAAI,WAAW,IAAI,OAAO,CAEzB;;IAIQ,QAAQ,UAAS;IACjB,UAAU,EAAE,MAAM,GAAG,SAAS,CAAa;IAC1C,aAAa,qBAA4B;IACzC,UAAU,gCAAuC;IAE3D,QAAQ,IAAI,IAAI;IAIV,OAAO;IASb,OAAO;IAOD,aAAa;IAab,kBAAkB,CAAC,CAAC,EAAE,WAAW;YAQzB,mBAAmB;YAkCnB,WAAW;yCA5Fd,mBAAmB;2CAAnB,mBAAmB;CAoH/B"}
|
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
11
11
|
import { Metadata, RunView } from '@memberjunction/core';
|
|
12
|
+
import { FileSchema } from '@memberjunction/core-entities';
|
|
12
13
|
import { GraphQLDataProvider, gql } from '@memberjunction/graphql-dataprovider';
|
|
13
14
|
import { z } from 'zod';
|
|
14
15
|
import * as i0 from "@angular/core";
|
|
@@ -69,20 +70,7 @@ const FileUploadMutationSchema = z.object({
|
|
|
69
70
|
CreateFile: z.object({
|
|
70
71
|
NameExists: z.boolean(),
|
|
71
72
|
UploadUrl: z.string(),
|
|
72
|
-
File:
|
|
73
|
-
Category: z.string().nullish(),
|
|
74
|
-
CategoryID: z.number().nullish(),
|
|
75
|
-
ContentType: z.string().nullish(),
|
|
76
|
-
CreatedAt: z.number(),
|
|
77
|
-
Description: z.string().nullish(),
|
|
78
|
-
ID: z.number(),
|
|
79
|
-
Name: z.string(),
|
|
80
|
-
Provider: z.string(),
|
|
81
|
-
ProviderID: z.number(),
|
|
82
|
-
ProviderKey: z.string().nullish(),
|
|
83
|
-
Status: z.string(),
|
|
84
|
-
UpdatedAt: z.number(),
|
|
85
|
-
}),
|
|
73
|
+
File: FileSchema,
|
|
86
74
|
}),
|
|
87
75
|
});
|
|
88
76
|
export class FileUploadComponent {
|
|
@@ -92,7 +80,7 @@ export class FileUploadComponent {
|
|
|
92
80
|
constructor() {
|
|
93
81
|
this.ConfirmQueue = [];
|
|
94
82
|
this.UploadQueue = [];
|
|
95
|
-
this.defaultProviderID =
|
|
83
|
+
this.defaultProviderID = '';
|
|
96
84
|
this.md = new Metadata();
|
|
97
85
|
this.disabled = false;
|
|
98
86
|
this.CategoryID = undefined;
|
|
@@ -107,7 +95,7 @@ export class FileUploadComponent {
|
|
|
107
95
|
const rv = new RunView();
|
|
108
96
|
const viewResults = yield rv.RunView({ EntityName: 'File Storage Providers', ExtraFilter: 'IsActive = 1', OrderBy: 'Priority DESC' });
|
|
109
97
|
const provider = viewResults.Results[0];
|
|
110
|
-
if (typeof (provider === null || provider === void 0 ? void 0 : provider.ID) === '
|
|
98
|
+
if (typeof (provider === null || provider === void 0 ? void 0 : provider.ID) === 'string') {
|
|
111
99
|
this.defaultProviderID = provider.ID;
|
|
112
100
|
}
|
|
113
101
|
});
|
|
@@ -223,4 +211,4 @@ FileUploadComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FileUpl
|
|
|
223
211
|
}], fileUpload: [{
|
|
224
212
|
type: Output
|
|
225
213
|
}] }); })();
|
|
226
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FileUploadComponent, { className: "FileUploadComponent", filePath: "src/lib/file-upload/file-upload.ts", lineNumber:
|
|
214
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FileUploadComponent, { className: "FileUploadComponent", filePath: "src/lib/file-upload/file-upload.ts", lineNumber: 57 }); })();
|
|
@@ -9,7 +9,7 @@ export declare class FilesGridComponent implements OnInit, OnChanges {
|
|
|
9
9
|
isLoading: boolean;
|
|
10
10
|
editFile: FileEntity | undefined;
|
|
11
11
|
constructor(sharedService: SharedService);
|
|
12
|
-
CategoryID:
|
|
12
|
+
CategoryID: string | undefined;
|
|
13
13
|
ngOnInit(): void;
|
|
14
14
|
ngOnChanges(changes: SimpleChanges): void;
|
|
15
15
|
/**
|
|
@@ -161,10 +161,10 @@ export class FilesGridComponent {
|
|
|
161
161
|
this.isLoading = true;
|
|
162
162
|
const ID = file.ID;
|
|
163
163
|
const Name = file.Name;
|
|
164
|
-
|
|
164
|
+
const deleteResult = yield file.Delete();
|
|
165
165
|
if (deleteResult) {
|
|
166
166
|
this.sharedService.CreateSimpleNotification(`Successfully deleted file ${ID} ${Name}`, 'info');
|
|
167
|
-
this.files = this.files.filter((f) => typeof f.ID === '
|
|
167
|
+
this.files = this.files.filter((f) => typeof f.ID === 'string' && f.ID !== ID);
|
|
168
168
|
}
|
|
169
169
|
else {
|
|
170
170
|
this.sharedService.CreateSimpleNotification(`Unable to delete file ${ID} ${Name}`, 'error');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-file-storage",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.5",
|
|
4
4
|
"description": "MemberJunction: Angular components for managing files, and related components.",
|
|
5
5
|
"main": "./dist/public-api.js",
|
|
6
6
|
"typings": "./dist/public-api.d.ts",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"@angular/router": "18.0.2"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@memberjunction/core": "2.1.
|
|
30
|
-
"@memberjunction/core-entities": "2.1.
|
|
31
|
-
"@memberjunction/global": "2.1.
|
|
32
|
-
"@memberjunction/graphql-dataprovider": "2.1.
|
|
33
|
-
"@memberjunction/ng-container-directives": "2.1.
|
|
34
|
-
"@memberjunction/ng-shared": "2.1.
|
|
29
|
+
"@memberjunction/core": "2.1.5",
|
|
30
|
+
"@memberjunction/core-entities": "2.1.5",
|
|
31
|
+
"@memberjunction/global": "2.1.5",
|
|
32
|
+
"@memberjunction/graphql-dataprovider": "2.1.5",
|
|
33
|
+
"@memberjunction/ng-container-directives": "2.1.5",
|
|
34
|
+
"@memberjunction/ng-shared": "2.1.5",
|
|
35
35
|
"@progress/kendo-angular-buttons": "16.2.0",
|
|
36
36
|
"@progress/kendo-angular-dialog": "16.2.0",
|
|
37
37
|
"@progress/kendo-angular-dropdowns": "16.2.0",
|