@memberjunction/ng-file-storage 1.0.4 → 1.0.7-next.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.
|
@@ -227,11 +227,11 @@ CategoryTreeComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Categ
|
|
|
227
227
|
i0.ɵɵproperty("ngIf", ctx.showNew);
|
|
228
228
|
i0.ɵɵadvance();
|
|
229
229
|
i0.ɵɵproperty("ngIf", !!ctx.renameFileCategory);
|
|
230
|
-
} }, dependencies: [i2.NgIf, i3.TreeViewComponent, i3.NodeTemplateDirective, i3.ExpandDirective, i3.SelectDirective, i3.FlatDataBindingDirective, i3.DragAndDropDirective, i4.ɵNgNoValidate, i4.NgControlStatus, i4.NgControlStatusGroup, i4.RequiredValidator, i4.NgModel, i4.NgForm, i5.DialogComponent, i5.DialogActionsComponent, i6.ButtonComponent, i7.LabelComponent, i8.TextBoxComponent, i9.MenuItemComponent, i9.ContextMenuComponent], styles: ["\n\
|
|
230
|
+
} }, dependencies: [i2.NgIf, i3.TreeViewComponent, i3.NodeTemplateDirective, i3.ExpandDirective, i3.SelectDirective, i3.FlatDataBindingDirective, i3.DragAndDropDirective, i4.ɵNgNoValidate, i4.NgControlStatus, i4.NgControlStatusGroup, i4.RequiredValidator, i4.NgModel, i4.NgForm, i5.DialogComponent, i5.DialogActionsComponent, i6.ButtonComponent, i7.LabelComponent, i8.TextBoxComponent, i9.MenuItemComponent, i9.ContextMenuComponent], styles: ["\n\n.container[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n}\n\nkendo-treeview[_ngcontent-%COMP%] {\n width: 250px;\n}\n\n.tree-header[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding-right: 4px;\n}\n\nkendo-label[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: row;\n align-items: center;\n column-gap: 12px;\n margin-bottom: 4px;\n}\n\nkendo-label[_ngcontent-%COMP%] kendo-textbox[_ngcontent-%COMP%] {\n width: 100%;\n}\n\nkendo-loader[_ngcontent-%COMP%] {\n padding-left: 4px;\n}"] });
|
|
231
231
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CategoryTreeComponent, [{
|
|
232
232
|
type: Component,
|
|
233
|
-
args: [{ selector: 'mj-files-category-tree', template: "<div class=\"container\">\
|
|
233
|
+
args: [{ selector: 'mj-files-category-tree', template: "<div class=\"container\">\n <div class=\"tree-header\">\n <kendo-button (click)=\"clearSelection()\">All Files</kendo-button>\n <kendo-button (click)=\"createNewCategory()\" size=\"small\">Add category</kendo-button>\n </div>\n <kendo-treeview\n [nodes]=\"categoriesData\"\n textField=\"Name\"\n kendoTreeViewExpandable\n kendoTreeViewFlatDataBinding\n idField=\"ID\"\n parentIdField=\"ParentID\"\n (selectionChange)=\"categorySelected.emit($event.dataItem.ID)\"\n kendoTreeViewDragAndDrop\n kendoTreeViewSelectable\n (addItem)=\"handleDrop($event)\"\n [selectedKeys]=\"selectedKeys\"\n >\n <ng-template kendoTreeViewNodeTemplate let-dataItem>\n <span #target>{{ dataItem.Name }} </span>\n <kendo-contextmenu [target]=\"target\" (select)=\"handleMenuSelect($event)\">\n <kendo-menu-item text=\"Rename\" [data]=\"dataItem\"> </kendo-menu-item>\n <kendo-menu-item text=\"Delete\" [data]=\"dataItem\" [disabled]=\"true\"> </kendo-menu-item>\n </kendo-contextmenu>\n </ng-template>\n </kendo-treeview>\n\n <kendo-dialog title=\"New file category\" *ngIf=\"showNew\" (close)=\"cancelNewCategory()\" [minWidth]=\"250\" [width]=\"450\">\n <div class=\"container\">\n <form #templateForm=\"ngForm\">\n <kendo-label class=\"k-form\" text=\"Name\">\n <kendo-textbox\n name=\"name\"\n [(ngModel)]=\"newCategoryName\"\n [showSuccessIcon]=\"newCategoryName.length > 0\"\n showErrorIcon=\"initial\"\n required\n [disabled]=\"isLoading\"\n ></kendo-textbox>\n </kendo-label>\n </form>\n </div>\n <kendo-dialog-actions>\n <button kendoButton (click)=\"cancelNewCategory()\" [disabled]=\"isLoading\">Cancel</button>\n <button kendoButton (click)=\"saveNewCategory()\" [disabled]=\"isLoading\" themeColor=\"primary\">Save</button>\n </kendo-dialog-actions>\n </kendo-dialog>\n\n <kendo-dialog title=\"Rename file category\" *ngIf=\"!!renameFileCategory\" (close)=\"cancelRename()\" [minWidth]=\"250\" [width]=\"450\">\n <div class=\"container\">\n <form #templateForm=\"ngForm\">\n <kendo-label class=\"k-form\" text=\"Name\">\n <kendo-textbox\n name=\"Name\"\n [(ngModel)]=\"renameFileCategory.Name\"\n [showSuccessIcon]=\"renameFileCategory.Name.length > 0\"\n showErrorIcon=\"initial\"\n required\n [disabled]=\"isLoading\"\n ></kendo-textbox>\n </kendo-label>\n </form>\n </div>\n <kendo-dialog-actions>\n <button kendoButton (click)=\"cancelRename()\" [disabled]=\"isLoading\">Cancel</button>\n <button kendoButton (click)=\"saveRename()\" [disabled]=\"isLoading || !renameFileCategory.Dirty\" themeColor=\"primary\">Save</button>\n </kendo-dialog-actions>\n </kendo-dialog>\n</div>\n", styles: ["/* Styles for category tree */\n.container {\n display: flex;\n flex-direction: column;\n}\n\nkendo-treeview {\n width: 250px;\n}\n\n.tree-header {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding-right: 4px;\n}\n\nkendo-label {\n display: flex;\n flex-direction: row;\n align-items: center;\n column-gap: 12px;\n margin-bottom: 4px;\n}\n\nkendo-label kendo-textbox {\n width: 100%;\n}\n\nkendo-loader {\n padding-left: 4px;\n}"] }]
|
|
234
234
|
}], () => [{ type: i1.SharedService }], { categorySelected: [{
|
|
235
235
|
type: Output
|
|
236
236
|
}] }); })();
|
|
237
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CategoryTreeComponent, { className: "CategoryTreeComponent", filePath: "src
|
|
237
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CategoryTreeComponent, { className: "CategoryTreeComponent", filePath: "src/lib/category-tree/category-tree.ts", lineNumber: 14 }); })();
|
|
@@ -14,32 +14,32 @@ import { kendoSVGIcon } from '@memberjunction/ng-shared';
|
|
|
14
14
|
import { z } from 'zod';
|
|
15
15
|
import * as i0 from "@angular/core";
|
|
16
16
|
import * as i1 from "@progress/kendo-angular-upload";
|
|
17
|
-
const FileFieldsFragment = gql `
|
|
18
|
-
fragment FileFields on File_ {
|
|
19
|
-
Category
|
|
20
|
-
CategoryID
|
|
21
|
-
ContentType
|
|
22
|
-
CreatedAt
|
|
23
|
-
Description
|
|
24
|
-
ID
|
|
25
|
-
Name
|
|
26
|
-
Provider
|
|
27
|
-
ProviderID
|
|
28
|
-
ProviderKey
|
|
29
|
-
Status
|
|
30
|
-
UpdatedAt
|
|
31
|
-
}
|
|
17
|
+
const FileFieldsFragment = gql `
|
|
18
|
+
fragment FileFields on File_ {
|
|
19
|
+
Category
|
|
20
|
+
CategoryID
|
|
21
|
+
ContentType
|
|
22
|
+
CreatedAt
|
|
23
|
+
Description
|
|
24
|
+
ID
|
|
25
|
+
Name
|
|
26
|
+
Provider
|
|
27
|
+
ProviderID
|
|
28
|
+
ProviderKey
|
|
29
|
+
Status
|
|
30
|
+
UpdatedAt
|
|
31
|
+
}
|
|
32
32
|
`;
|
|
33
|
-
const FileUploadMutation = gql `
|
|
34
|
-
${FileFieldsFragment}
|
|
35
|
-
mutation CreateFile($input: CreateFileInput!) {
|
|
36
|
-
CreateFile(input: $input) {
|
|
37
|
-
UploadUrl
|
|
38
|
-
File {
|
|
39
|
-
...FileFields
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
33
|
+
const FileUploadMutation = gql `
|
|
34
|
+
${FileFieldsFragment}
|
|
35
|
+
mutation CreateFile($input: CreateFileInput!) {
|
|
36
|
+
CreateFile(input: $input) {
|
|
37
|
+
UploadUrl
|
|
38
|
+
File {
|
|
39
|
+
...FileFields
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
43
|
`;
|
|
44
44
|
const FileUploadMutationSchema = z.object({
|
|
45
45
|
CreateFile: z.object({
|
|
@@ -144,7 +144,7 @@ FileUploadComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FileUpl
|
|
|
144
144
|
} }, dependencies: [i1.FileSelectComponent] });
|
|
145
145
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FileUploadComponent, [{
|
|
146
146
|
type: Component,
|
|
147
|
-
args: [{ selector: 'mj-files-file-upload', template: "<kendo-fileselect [disabled]=\"isUploading || disabled\" [multiple]=\"false\" (select)=\"selectEventHandler($event)\"></kendo-fileselect>\
|
|
147
|
+
args: [{ selector: 'mj-files-file-upload', template: "<kendo-fileselect [disabled]=\"isUploading || disabled\" [multiple]=\"false\" (select)=\"selectEventHandler($event)\"></kendo-fileselect>\n" }]
|
|
148
148
|
}], () => [], { disabled: [{
|
|
149
149
|
type: Input
|
|
150
150
|
}], CategoryID: [{
|
|
@@ -154,4 +154,4 @@ FileUploadComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FileUpl
|
|
|
154
154
|
}], fileUpload: [{
|
|
155
155
|
type: Output
|
|
156
156
|
}] }); })();
|
|
157
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FileUploadComponent, { className: "FileUploadComponent", filePath: "src
|
|
157
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FileUploadComponent, { className: "FileUploadComponent", filePath: "src/lib/file-upload/file-upload.ts", lineNumber: 66 }); })();
|
|
@@ -102,13 +102,13 @@ const downloadFromUrl = (url, fileName, contentType) => __awaiter(void 0, void 0
|
|
|
102
102
|
window.URL.revokeObjectURL(blobUrl);
|
|
103
103
|
return true;
|
|
104
104
|
});
|
|
105
|
-
const FileDownloadQuery = gql `
|
|
106
|
-
query FileDownloadUrl($FileID: Int!) {
|
|
107
|
-
File(ID: $FileID) {
|
|
108
|
-
ContentType
|
|
109
|
-
DownloadUrl
|
|
110
|
-
}
|
|
111
|
-
}
|
|
105
|
+
const FileDownloadQuery = gql `
|
|
106
|
+
query FileDownloadUrl($FileID: Int!) {
|
|
107
|
+
File(ID: $FileID) {
|
|
108
|
+
ContentType
|
|
109
|
+
DownloadUrl
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
112
|
`;
|
|
113
113
|
const FileDownloadQuerySchema = z.object({
|
|
114
114
|
File: z.object({
|
|
@@ -281,11 +281,11 @@ FilesGridComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FilesGri
|
|
|
281
281
|
i0.ɵɵproperty("CategoryID", ctx.CategoryID)("disabled", ctx.isLoading);
|
|
282
282
|
i0.ɵɵadvance();
|
|
283
283
|
i0.ɵɵproperty("ngIf", ctx.editFile);
|
|
284
|
-
} }, dependencies: [i2.NgIf, i3.ɵNgNoValidate, i3.NgControlStatus, i3.NgControlStatusGroup, i3.RequiredValidator, i3.NgModel, i3.NgForm, i4.DialogComponent, i4.DialogActionsComponent, i5.ButtonComponent, i6.LabelComponent, i7.GridComponent, i7.ColumnComponent, i7.CellTemplateDirective, i8.TextBoxComponent, i9.FileUploadComponent], styles: [".container[_ngcontent-%COMP%] {\
|
|
284
|
+
} }, dependencies: [i2.NgIf, i3.ɵNgNoValidate, i3.NgControlStatus, i3.NgControlStatusGroup, i3.RequiredValidator, i3.NgModel, i3.NgForm, i4.DialogComponent, i4.DialogActionsComponent, i5.ButtonComponent, i6.LabelComponent, i7.GridComponent, i7.ColumnComponent, i7.CellTemplateDirective, i8.TextBoxComponent, i9.FileUploadComponent], styles: [".container[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n}\n\nkendo-label[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: row;\n align-items: center;\n column-gap: 12px;\n margin-bottom: 4px;\n}\n\nkendo-label[_ngcontent-%COMP%] kendo-textbox[_ngcontent-%COMP%] {\n width: 100%;\n}"] });
|
|
285
285
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FilesGridComponent, [{
|
|
286
286
|
type: Component,
|
|
287
|
-
args: [{ selector: 'mj-files-grid', template: "<div class=\"container\">\
|
|
287
|
+
args: [{ selector: 'mj-files-grid', template: "<div class=\"container\">\n <kendo-grid [data]=\"files\" [loading]=\"isLoading\">\n <kendo-grid-column field=\"ID\" title=\"ID\"> </kendo-grid-column>\n <kendo-grid-column field=\"Category\" title=\"Category\"> </kendo-grid-column>\n <kendo-grid-column field=\"Name\" title=\"Name\"> </kendo-grid-column>\n <kendo-grid-column field=\"Description\" title=\"Description\"> </kendo-grid-column>\n <kendo-grid-column field=\"Status\" title=\"Status\"> </kendo-grid-column>\n <kendo-grid-column field=\"Actions\">\n <ng-template kendoGridCellTemplate let-dataItem>\n <kendo-button\n [disabled]=\"dataItem.Status!=='Uploaded'\"\n [svgIcon]=\"kendoSVGIcon('download')\"\n (click)=\"downloadFile(dataItem)\"\n ></kendo-button>\n <kendo-button [disabled]=\"!canBeDeleted(dataItem)\" [svgIcon]=\"kendoSVGIcon('trash')\" (click)=\"deleteFile(dataItem)\"></kendo-button>\n <kendo-button\n [disabled]=\"dataItem.Status!=='Uploaded'\"\n [svgIcon]=\"kendoSVGIcon('pencil')\"\n (click)=\"editFile = dataItem\"\n ></kendo-button>\n </ng-template>\n </kendo-grid-column>\n </kendo-grid>\n\n <mj-files-file-upload\n [CategoryID]=\"CategoryID\"\n [disabled]=\"isLoading\"\n (uploadStarted)=\"isLoading = true\"\n (fileUpload)=\"handleFileUpload($event)\"\n ></mj-files-file-upload>\n\n <kendo-dialog title=\"Edit file\" *ngIf=\"editFile\" (close)=\"resetEditFile()\" [minWidth]=\"250\" [width]=\"450\">\n <div class=\"container\">\n <form #templateForm=\"ngForm\">\n <kendo-label class=\"k-form\" text=\"Name\">\n <kendo-textbox\n name=\"name\"\n [(ngModel)]=\"editFile.Name\"\n [showSuccessIcon]=\"editFile.Name.length > 0\"\n showErrorIcon=\"initial\"\n required\n [disabled]=\"isLoading\"\n ></kendo-textbox>\n </kendo-label>\n <kendo-label class=\"k-form\" text=\"Description\">\n <kendo-textbox name=\"description\" [(ngModel)]=\"editFile.Description\" [disabled]=\"isLoading\"></kendo-textbox>\n </kendo-label>\n </form>\n </div>\n <kendo-dialog-actions>\n <button kendoButton (click)=\"resetEditFile()\" [disabled]=\"isLoading\">Cancel</button>\n <button kendoButton (click)=\"saveEditFile()\" [disabled]=\"isLoading || !editFile.Dirty\" themeColor=\"primary\">Save</button>\n </kendo-dialog-actions>\n </kendo-dialog>\n</div>\n", styles: [".container {\n display: flex;\n flex-direction: column;\n}\n\nkendo-label {\n display: flex;\n flex-direction: row;\n align-items: center;\n column-gap: 12px;\n margin-bottom: 4px;\n}\n\nkendo-label kendo-textbox {\n width: 100%;\n}"] }]
|
|
288
288
|
}], () => [{ type: i1.SharedService }], { CategoryID: [{
|
|
289
289
|
type: Input
|
|
290
290
|
}] }); })();
|
|
291
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FilesGridComponent, { className: "FilesGridComponent", filePath: "src
|
|
291
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FilesGridComponent, { className: "FilesGridComponent", filePath: "src/lib/files-grid/files-grid.ts", lineNumber: 61 }); })();
|
package/package.json
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@memberjunction/ng-file-storage",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "MemberJunction: Angular components for managing files, and related components.",
|
|
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
|
-
"watch": "ngc -w"
|
|
14
|
-
},
|
|
15
|
-
"keywords": [],
|
|
16
|
-
"author": "",
|
|
17
|
-
"license": "ISC",
|
|
18
|
-
"devDependencies": {
|
|
19
|
-
"@angular/compiler": "~17.2.2",
|
|
20
|
-
"@angular/compiler-cli": "~17.2.2"
|
|
21
|
-
},
|
|
22
|
-
"peerDependencies": {
|
|
23
|
-
"@angular/common": "~17.2.2",
|
|
24
|
-
"@angular/core": "~17.2.2",
|
|
25
|
-
"@angular/forms": "~17.2.2",
|
|
26
|
-
"@angular/router": "~17.2.2"
|
|
27
|
-
},
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"@memberjunction/core": "^1.0.
|
|
30
|
-
"@memberjunction/core-entities": "^1.0.
|
|
31
|
-
"@memberjunction/global": "^1.0.
|
|
32
|
-
"@memberjunction/ng-container-directives": "^1.0.
|
|
33
|
-
"@memberjunction/ng-shared": "^1.0.
|
|
34
|
-
"@progress/kendo-angular-buttons": "~15.1.0",
|
|
35
|
-
"@progress/kendo-angular-dialog": "~15.1.0",
|
|
36
|
-
"@progress/kendo-angular-dropdowns": "~15.1.0",
|
|
37
|
-
"@progress/kendo-angular-indicators": "~15.1.0",
|
|
38
|
-
"@progress/kendo-angular-grid": "~15.1.0",
|
|
39
|
-
"@progress/kendo-angular-menu": "~15.1.0",
|
|
40
|
-
"@progress/kendo-angular-treeview": "~15.1.0",
|
|
41
|
-
"@progress/kendo-angular-upload": "~15.1.0",
|
|
42
|
-
"tslib": "^2.3.0",
|
|
43
|
-
"zod": "^3.22.4"
|
|
44
|
-
},
|
|
45
|
-
"sideEffects": false
|
|
46
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@memberjunction/ng-file-storage",
|
|
3
|
+
"version": "1.0.7-next.0",
|
|
4
|
+
"description": "MemberJunction: Angular components for managing files, and related components.",
|
|
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
|
+
"watch": "ngc -w"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [],
|
|
16
|
+
"author": "",
|
|
17
|
+
"license": "ISC",
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@angular/compiler": "~17.2.2",
|
|
20
|
+
"@angular/compiler-cli": "~17.2.2"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"@angular/common": "~17.2.2",
|
|
24
|
+
"@angular/core": "~17.2.2",
|
|
25
|
+
"@angular/forms": "~17.2.2",
|
|
26
|
+
"@angular/router": "~17.2.2"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@memberjunction/core": "^1.0.7-next.0",
|
|
30
|
+
"@memberjunction/core-entities": "^1.0.7-next.0",
|
|
31
|
+
"@memberjunction/global": "^1.0.7-next.0",
|
|
32
|
+
"@memberjunction/ng-container-directives": "^1.0.7-next.0",
|
|
33
|
+
"@memberjunction/ng-shared": "^1.0.7-next.0",
|
|
34
|
+
"@progress/kendo-angular-buttons": "~15.1.0",
|
|
35
|
+
"@progress/kendo-angular-dialog": "~15.1.0",
|
|
36
|
+
"@progress/kendo-angular-dropdowns": "~15.1.0",
|
|
37
|
+
"@progress/kendo-angular-indicators": "~15.1.0",
|
|
38
|
+
"@progress/kendo-angular-grid": "~15.1.0",
|
|
39
|
+
"@progress/kendo-angular-menu": "~15.1.0",
|
|
40
|
+
"@progress/kendo-angular-treeview": "~15.1.0",
|
|
41
|
+
"@progress/kendo-angular-upload": "~15.1.0",
|
|
42
|
+
"tslib": "^2.3.0",
|
|
43
|
+
"zod": "^3.22.4"
|
|
44
|
+
},
|
|
45
|
+
"sideEffects": false
|
|
46
|
+
}
|