@memberjunction/ng-file-storage 0.9.9 → 0.9.12

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.
@@ -1,17 +1,33 @@
1
- import { OnInit } from '@angular/core';
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
2
  import { FileCategoryEntity } from '@memberjunction/core-entities';
3
- import { kendoSVGIcon } from '@memberjunction/ng-shared';
3
+ import { SharedService, kendoSVGIcon } from '@memberjunction/ng-shared';
4
+ import { ContextMenuSelectEvent } from '@progress/kendo-angular-menu';
5
+ import { TreeItemAddRemoveArgs } from '@progress/kendo-angular-treeview';
4
6
  import * as i0 from "@angular/core";
5
7
  export declare class CategoryTreeComponent implements OnInit {
6
- EntityName: string;
7
- BottomMargin: number;
8
+ private sharedService;
9
+ categorySelected: EventEmitter<number>;
8
10
  isLoading: boolean;
11
+ showNew: boolean;
12
+ newCategoryName: string;
13
+ selectedKeys: never[];
14
+ renameFileCategory: FileCategoryEntity | undefined;
9
15
  kendoSVGIcon: typeof kendoSVGIcon;
10
16
  categoriesData: FileCategoryEntity[];
11
- constructor();
17
+ private md;
18
+ constructor(sharedService: SharedService);
12
19
  ngOnInit(): void;
20
+ createNewCategory(): Promise<void>;
21
+ cancelNewCategory(): void;
22
+ handleDrop(e: TreeItemAddRemoveArgs): Promise<void>;
23
+ saveNewCategory(): Promise<void>;
24
+ deleteCategory(fileCategory: FileCategoryEntity): Promise<void>;
25
+ clearSelection(): void;
26
+ handleMenuSelect(e: ContextMenuSelectEvent): void;
27
+ cancelRename(): void;
28
+ saveRename(): Promise<void>;
13
29
  Refresh(): Promise<void>;
14
30
  static ɵfac: i0.ɵɵFactoryDeclaration<CategoryTreeComponent, never>;
15
- static ɵcmp: i0.ɵɵComponentDeclaration<CategoryTreeComponent, "mj-files-category-tree", never, { "EntityName": { "alias": "EntityName"; "required": false; }; "BottomMargin": { "alias": "BottomMargin"; "required": false; }; }, {}, never, never, false, never>;
31
+ static ɵcmp: i0.ɵɵComponentDeclaration<CategoryTreeComponent, "mj-files-category-tree", never, {}, { "categorySelected": "categorySelected"; }, never, never, false, never>;
16
32
  }
17
33
  //# sourceMappingURL=category-tree.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"category-tree.d.ts","sourceRoot":"","sources":["../../../src/lib/category-tree/category-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,MAAM,EAAE,MAAM,eAAe,CAAC;AAEzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;;AAGzD,qBAKa,qBAAsB,YAAW,MAAM;IACzC,UAAU,EAAG,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAK;IAE3B,SAAS,EAAE,OAAO,CAAS;IAE3B,YAAY,sBAAgB;IAE5B,cAAc,EAAE,kBAAkB,EAAE,CAAM;;IAIjD,QAAQ,IAAI,IAAI;IAIV,OAAO;yCAhBF,qBAAqB;2CAArB,qBAAqB;CAiCjC"}
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,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAExE,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;;AAEzE,qBAKa,qBAAsB,YAAW,MAAM;IAetC,OAAO,CAAC,aAAa;IAdvB,gBAAgB,uBAA8B;IAEjD,SAAS,EAAE,OAAO,CAAS;IAC3B,OAAO,EAAE,OAAO,CAAS;IACzB,eAAe,SAAM;IACrB,YAAY,UAAM;IAClB,kBAAkB,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAEnD,YAAY,sBAAgB;IAE5B,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;yCAnGF,qBAAqB;2CAArB,qBAAqB;CAmHjC"}
@@ -7,28 +7,191 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { Component, Input } from '@angular/core';
11
- import { RunView } from '@memberjunction/core';
10
+ import { Component, EventEmitter, Output } from '@angular/core';
11
+ import { Metadata, RunView } from '@memberjunction/core';
12
12
  import { kendoSVGIcon } from '@memberjunction/ng-shared';
13
13
  import * as i0 from "@angular/core";
14
- import * as i1 from "@progress/kendo-angular-treeview";
14
+ import * as i1 from "@memberjunction/ng-shared";
15
+ import * as i2 from "@angular/common";
16
+ import * as i3 from "@progress/kendo-angular-treeview";
17
+ import * as i4 from "@angular/forms";
18
+ import * as i5 from "@progress/kendo-angular-dialog";
19
+ import * as i6 from "@progress/kendo-angular-buttons";
20
+ import * as i7 from "@progress/kendo-angular-label";
21
+ import * as i8 from "@progress/kendo-angular-inputs";
22
+ import * as i9 from "@progress/kendo-angular-menu";
23
+ function CategoryTreeComponent_ng_template_7_Template(rf, ctx) { if (rf & 1) {
24
+ const _r6 = i0.ɵɵgetCurrentView();
25
+ i0.ɵɵelementStart(0, "span", null, 8);
26
+ i0.ɵɵtext(2);
27
+ i0.ɵɵelementEnd();
28
+ i0.ɵɵelementStart(3, "kendo-contextmenu", 9);
29
+ i0.ɵɵlistener("select", function CategoryTreeComponent_ng_template_7_Template_kendo_contextmenu_select_3_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r5 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r5.handleMenuSelect($event)); });
30
+ i0.ɵɵelement(4, "kendo-menu-item", 10)(5, "kendo-menu-item", 11);
31
+ i0.ɵɵelementEnd();
32
+ } if (rf & 2) {
33
+ const dataItem_r3 = ctx.$implicit;
34
+ const _r4 = i0.ɵɵreference(1);
35
+ i0.ɵɵadvance(2);
36
+ i0.ɵɵtextInterpolate1("", dataItem_r3.Name, " ");
37
+ i0.ɵɵadvance();
38
+ i0.ɵɵproperty("target", _r4);
39
+ i0.ɵɵadvance();
40
+ i0.ɵɵproperty("data", dataItem_r3);
41
+ i0.ɵɵadvance();
42
+ i0.ɵɵproperty("data", dataItem_r3)("disabled", true);
43
+ } }
44
+ function CategoryTreeComponent_kendo_dialog_8_Template(rf, ctx) { if (rf & 1) {
45
+ const _r9 = i0.ɵɵgetCurrentView();
46
+ i0.ɵɵelementStart(0, "kendo-dialog", 12);
47
+ i0.ɵɵlistener("close", function CategoryTreeComponent_kendo_dialog_8_Template_kendo_dialog_close_0_listener() { i0.ɵɵrestoreView(_r9); const ctx_r8 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r8.cancelNewCategory()); });
48
+ i0.ɵɵelementStart(1, "div", 0)(2, "form", null, 13)(4, "kendo-label", 14)(5, "kendo-textbox", 15);
49
+ i0.ɵɵtwoWayListener("ngModelChange", function CategoryTreeComponent_kendo_dialog_8_Template_kendo_textbox_ngModelChange_5_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r10 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r10.newCategoryName, $event) || (ctx_r10.newCategoryName = $event); return i0.ɵɵresetView($event); });
50
+ i0.ɵɵelementEnd()()()();
51
+ i0.ɵɵelementStart(6, "kendo-dialog-actions")(7, "button", 16);
52
+ i0.ɵɵlistener("click", function CategoryTreeComponent_kendo_dialog_8_Template_button_click_7_listener() { i0.ɵɵrestoreView(_r9); const ctx_r11 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r11.cancelNewCategory()); });
53
+ i0.ɵɵtext(8, "Cancel");
54
+ i0.ɵɵelementEnd();
55
+ i0.ɵɵelementStart(9, "button", 17);
56
+ i0.ɵɵlistener("click", function CategoryTreeComponent_kendo_dialog_8_Template_button_click_9_listener() { i0.ɵɵrestoreView(_r9); const ctx_r12 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r12.saveNewCategory()); });
57
+ i0.ɵɵtext(10, "Save");
58
+ i0.ɵɵelementEnd()()();
59
+ } if (rf & 2) {
60
+ const ctx_r1 = i0.ɵɵnextContext();
61
+ i0.ɵɵproperty("minWidth", 250)("width", 450);
62
+ i0.ɵɵadvance(5);
63
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r1.newCategoryName);
64
+ i0.ɵɵproperty("showSuccessIcon", ctx_r1.newCategoryName.length > 0)("disabled", ctx_r1.isLoading);
65
+ i0.ɵɵadvance(2);
66
+ i0.ɵɵproperty("disabled", ctx_r1.isLoading);
67
+ i0.ɵɵadvance(2);
68
+ i0.ɵɵproperty("disabled", ctx_r1.isLoading);
69
+ } }
70
+ function CategoryTreeComponent_kendo_dialog_9_Template(rf, ctx) { if (rf & 1) {
71
+ const _r15 = i0.ɵɵgetCurrentView();
72
+ i0.ɵɵelementStart(0, "kendo-dialog", 18);
73
+ i0.ɵɵlistener("close", function CategoryTreeComponent_kendo_dialog_9_Template_kendo_dialog_close_0_listener() { i0.ɵɵrestoreView(_r15); const ctx_r14 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r14.cancelRename()); });
74
+ i0.ɵɵelementStart(1, "div", 0)(2, "form", null, 13)(4, "kendo-label", 14)(5, "kendo-textbox", 19);
75
+ i0.ɵɵtwoWayListener("ngModelChange", function CategoryTreeComponent_kendo_dialog_9_Template_kendo_textbox_ngModelChange_5_listener($event) { i0.ɵɵrestoreView(_r15); const ctx_r16 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r16.renameFileCategory.Name, $event) || (ctx_r16.renameFileCategory.Name = $event); return i0.ɵɵresetView($event); });
76
+ i0.ɵɵelementEnd()()()();
77
+ i0.ɵɵelementStart(6, "kendo-dialog-actions")(7, "button", 16);
78
+ i0.ɵɵlistener("click", function CategoryTreeComponent_kendo_dialog_9_Template_button_click_7_listener() { i0.ɵɵrestoreView(_r15); const ctx_r17 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r17.cancelRename()); });
79
+ i0.ɵɵtext(8, "Cancel");
80
+ i0.ɵɵelementEnd();
81
+ i0.ɵɵelementStart(9, "button", 17);
82
+ i0.ɵɵlistener("click", function CategoryTreeComponent_kendo_dialog_9_Template_button_click_9_listener() { i0.ɵɵrestoreView(_r15); const ctx_r18 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r18.saveRename()); });
83
+ i0.ɵɵtext(10, "Save");
84
+ i0.ɵɵelementEnd()()();
85
+ } if (rf & 2) {
86
+ const ctx_r2 = i0.ɵɵnextContext();
87
+ i0.ɵɵproperty("minWidth", 250)("width", 450);
88
+ i0.ɵɵadvance(5);
89
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r2.renameFileCategory.Name);
90
+ i0.ɵɵproperty("showSuccessIcon", ctx_r2.renameFileCategory.Name.length > 0)("disabled", ctx_r2.isLoading);
91
+ i0.ɵɵadvance(2);
92
+ i0.ɵɵproperty("disabled", ctx_r2.isLoading);
93
+ i0.ɵɵadvance(2);
94
+ i0.ɵɵproperty("disabled", ctx_r2.isLoading || !ctx_r2.renameFileCategory.Dirty);
95
+ } }
15
96
  export class CategoryTreeComponent {
16
- constructor() {
17
- this.BottomMargin = 0;
97
+ constructor(sharedService) {
98
+ this.sharedService = sharedService;
99
+ this.categorySelected = new EventEmitter();
18
100
  this.isLoading = false;
101
+ this.showNew = false;
102
+ this.newCategoryName = '';
103
+ this.selectedKeys = [];
19
104
  this.kendoSVGIcon = kendoSVGIcon;
20
105
  this.categoriesData = [];
106
+ this.md = new Metadata();
21
107
  }
22
108
  ngOnInit() {
23
109
  this.Refresh();
24
110
  }
111
+ createNewCategory() {
112
+ return __awaiter(this, void 0, void 0, function* () {
113
+ this.showNew = true;
114
+ });
115
+ }
116
+ cancelNewCategory() {
117
+ this.showNew = false;
118
+ }
119
+ handleDrop(e) {
120
+ return __awaiter(this, void 0, void 0, function* () {
121
+ console.log(e);
122
+ const sourceCategory = e.sourceItem.item.dataItem;
123
+ const targetCategory = e.destinationItem.item.dataItem;
124
+ sourceCategory.ParentID = targetCategory.ID;
125
+ this.isLoading = true;
126
+ yield sourceCategory.Save();
127
+ this.isLoading = false;
128
+ });
129
+ }
130
+ saveNewCategory() {
131
+ return __awaiter(this, void 0, void 0, function* () {
132
+ this.isLoading = true;
133
+ const categoryEntity = yield this.md.GetEntityObject('File Categories');
134
+ categoryEntity.NewRecord();
135
+ categoryEntity.Name = this.newCategoryName;
136
+ yield (categoryEntity === null || categoryEntity === void 0 ? void 0 : categoryEntity.Save());
137
+ this.categoriesData = [...this.categoriesData, categoryEntity];
138
+ this.showNew = false;
139
+ this.isLoading = false;
140
+ });
141
+ }
142
+ deleteCategory(fileCategory) {
143
+ return __awaiter(this, void 0, void 0, function* () {
144
+ this.isLoading = true;
145
+ const { ID } = fileCategory;
146
+ const success = yield fileCategory.Delete();
147
+ if (!success) {
148
+ console.error('Unable to delete file category', fileCategory);
149
+ this.sharedService.CreateSimpleNotification(`Unable to delete category '${fileCategory.Name}'`, 'error');
150
+ return;
151
+ }
152
+ this.categoriesData = this.categoriesData.filter((c) => c.ID !== ID);
153
+ this.clearSelection();
154
+ this.isLoading = false;
155
+ });
156
+ }
157
+ clearSelection() {
158
+ this.selectedKeys = [];
159
+ this.categorySelected.emit(undefined);
160
+ }
161
+ handleMenuSelect(e) {
162
+ var _a, _b, _c;
163
+ const action = (_c = (_b = (_a = e.item) === null || _a === void 0 ? void 0 : _a.text) === null || _b === void 0 ? void 0 : _b.toLowerCase()) !== null && _c !== void 0 ? _c : '';
164
+ switch (action) {
165
+ case 'rename':
166
+ this.renameFileCategory = e.item.data;
167
+ break;
168
+ case 'delete':
169
+ this.deleteCategory(e.item.data);
170
+ break;
171
+ default:
172
+ break;
173
+ }
174
+ }
175
+ cancelRename() {
176
+ var _a;
177
+ (_a = this.renameFileCategory) === null || _a === void 0 ? void 0 : _a.Revert();
178
+ this.renameFileCategory = undefined;
179
+ }
180
+ saveRename() {
181
+ var _a;
182
+ return __awaiter(this, void 0, void 0, function* () {
183
+ this.isLoading = true;
184
+ yield ((_a = this.renameFileCategory) === null || _a === void 0 ? void 0 : _a.Save());
185
+ this.renameFileCategory = undefined;
186
+ this.isLoading = false;
187
+ });
188
+ }
25
189
  Refresh() {
26
190
  return __awaiter(this, void 0, void 0, function* () {
27
191
  this.isLoading = true;
28
192
  const rv = new RunView();
29
193
  const result = yield rv.RunView({
30
194
  EntityName: 'File Categories',
31
- // ExtraFilter: `LEFT(Status, 1)<>'D'`, //'CategoryID=' + e.ID,
32
195
  ResultType: 'entity_object',
33
196
  });
34
197
  if (result.Success) {
@@ -41,21 +204,34 @@ export class CategoryTreeComponent {
41
204
  });
42
205
  }
43
206
  }
44
- CategoryTreeComponent.ɵfac = function CategoryTreeComponent_Factory(t) { return new (t || CategoryTreeComponent)(); };
45
- CategoryTreeComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CategoryTreeComponent, selectors: [["mj-files-category-tree"]], inputs: { EntityName: "EntityName", BottomMargin: "BottomMargin" }, decls: 2, vars: 1, consts: [[1, "container"], ["textField", "Name", "kendoTreeViewExpandable", "", "kendoTreeViewFlatDataBinding", "", "idField", "ID", "parentIdField", "ParentID", 3, "nodes"]], template: function CategoryTreeComponent_Template(rf, ctx) { if (rf & 1) {
46
- i0.ɵɵelementStart(0, "div", 0);
47
- i0.ɵɵelement(1, "kendo-treeview", 1);
207
+ CategoryTreeComponent.ɵfac = function CategoryTreeComponent_Factory(t) { return new (t || CategoryTreeComponent)(i0.ɵɵdirectiveInject(i1.SharedService)); };
208
+ CategoryTreeComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CategoryTreeComponent, selectors: [["mj-files-category-tree"]], outputs: { categorySelected: "categorySelected" }, decls: 10, vars: 4, consts: [[1, "container"], [1, "tree-header"], [3, "click"], ["size", "small", 3, "click"], ["textField", "Name", "kendoTreeViewExpandable", "", "kendoTreeViewFlatDataBinding", "", "idField", "ID", "parentIdField", "ParentID", "kendoTreeViewDragAndDrop", "", "kendoTreeViewSelectable", "", 3, "nodes", "selectedKeys", "selectionChange", "addItem"], ["kendoTreeViewNodeTemplate", ""], ["title", "New file category", 3, "minWidth", "width", "close", 4, "ngIf"], ["title", "Rename file category", 3, "minWidth", "width", "close", 4, "ngIf"], ["target", ""], [3, "target", "select"], ["text", "Rename", 3, "data"], ["text", "Delete", 3, "data", "disabled"], ["title", "New file category", 3, "minWidth", "width", "close"], ["templateForm", "ngForm"], ["text", "Name", 1, "k-form"], ["name", "name", "showErrorIcon", "initial", "required", "", 3, "ngModel", "showSuccessIcon", "disabled", "ngModelChange"], ["kendoButton", "", 3, "disabled", "click"], ["kendoButton", "", "themeColor", "primary", 3, "disabled", "click"], ["title", "Rename file category", 3, "minWidth", "width", "close"], ["name", "Name", "showErrorIcon", "initial", "required", "", 3, "ngModel", "showSuccessIcon", "disabled", "ngModelChange"]], template: function CategoryTreeComponent_Template(rf, ctx) { if (rf & 1) {
209
+ i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "kendo-button", 2);
210
+ i0.ɵɵlistener("click", function CategoryTreeComponent_Template_kendo_button_click_2_listener() { return ctx.clearSelection(); });
211
+ i0.ɵɵtext(3, "All Files");
212
+ i0.ɵɵelementEnd();
213
+ i0.ɵɵelementStart(4, "kendo-button", 3);
214
+ i0.ɵɵlistener("click", function CategoryTreeComponent_Template_kendo_button_click_4_listener() { return ctx.createNewCategory(); });
215
+ i0.ɵɵtext(5, "Add category");
216
+ i0.ɵɵelementEnd()();
217
+ i0.ɵɵelementStart(6, "kendo-treeview", 4);
218
+ i0.ɵɵlistener("selectionChange", function CategoryTreeComponent_Template_kendo_treeview_selectionChange_6_listener($event) { return ctx.categorySelected.emit($event.dataItem.ID); })("addItem", function CategoryTreeComponent_Template_kendo_treeview_addItem_6_listener($event) { return ctx.handleDrop($event); });
219
+ i0.ɵɵtemplate(7, CategoryTreeComponent_ng_template_7_Template, 6, 5, "ng-template", 5);
220
+ i0.ɵɵelementEnd();
221
+ i0.ɵɵtemplate(8, CategoryTreeComponent_kendo_dialog_8_Template, 11, 7, "kendo-dialog", 6)(9, CategoryTreeComponent_kendo_dialog_9_Template, 11, 7, "kendo-dialog", 7);
48
222
  i0.ɵɵelementEnd();
49
223
  } if (rf & 2) {
224
+ i0.ɵɵadvance(6);
225
+ i0.ɵɵproperty("nodes", ctx.categoriesData)("selectedKeys", ctx.selectedKeys);
226
+ i0.ɵɵadvance(2);
227
+ i0.ɵɵproperty("ngIf", ctx.showNew);
50
228
  i0.ɵɵadvance();
51
- i0.ɵɵproperty("nodes", ctx.categoriesData);
52
- } }, dependencies: [i1.TreeViewComponent, i1.ExpandDirective, i1.FlatDataBindingDirective], styles: ["\n\r\n\r\nkendo-treeview[_ngcontent-%COMP%] {\r\n width: 250px;\r\n}"] });
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\r\n.container[_ngcontent-%COMP%] {\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n\r\nkendo-treeview[_ngcontent-%COMP%] {\r\n width: 250px;\r\n}\r\n\r\n.tree-header[_ngcontent-%COMP%] {\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: space-between;\r\n align-items: center;\r\n padding-right: 4px;\r\n}\r\n\r\nkendo-label[_ngcontent-%COMP%] {\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n column-gap: 12px;\r\n margin-bottom: 4px;\r\n}\r\n\r\nkendo-label[_ngcontent-%COMP%] kendo-textbox[_ngcontent-%COMP%] {\r\n width: 100%;\r\n}\r\n\r\nkendo-loader[_ngcontent-%COMP%] {\r\n padding-left: 4px;\r\n}"] });
53
231
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CategoryTreeComponent, [{
54
232
  type: Component,
55
- args: [{ selector: 'mj-files-category-tree', template: "<div class=\"container\">\r\n <kendo-treeview \r\n [nodes]=\"categoriesData\"\r\n textField=\"Name\"\r\n kendoTreeViewExpandable\r\n kendoTreeViewFlatDataBinding\r\n idField=\"ID\"\r\n parentIdField=\"ParentID\"\r\n ></kendo-treeview>\r\n</div>\r\n", styles: ["/* Styles for category tree */\r\n\r\nkendo-treeview {\r\n width: 250px;\r\n}"] }]
56
- }], () => [], { EntityName: [{
57
- type: Input
58
- }], BottomMargin: [{
59
- type: Input
233
+ args: [{ selector: 'mj-files-category-tree', template: "<div class=\"container\">\r\n <div class=\"tree-header\">\r\n <kendo-button (click)=\"clearSelection()\">All Files</kendo-button>\r\n <kendo-button (click)=\"createNewCategory()\" size=\"small\">Add category</kendo-button>\r\n </div>\r\n <kendo-treeview\r\n [nodes]=\"categoriesData\"\r\n textField=\"Name\"\r\n kendoTreeViewExpandable\r\n kendoTreeViewFlatDataBinding\r\n idField=\"ID\"\r\n parentIdField=\"ParentID\"\r\n (selectionChange)=\"categorySelected.emit($event.dataItem.ID)\"\r\n kendoTreeViewDragAndDrop\r\n kendoTreeViewSelectable\r\n (addItem)=\"handleDrop($event)\"\r\n [selectedKeys]=\"selectedKeys\"\r\n >\r\n <ng-template kendoTreeViewNodeTemplate let-dataItem>\r\n <span #target>{{ dataItem.Name }} </span>\r\n <kendo-contextmenu [target]=\"target\" (select)=\"handleMenuSelect($event)\">\r\n <kendo-menu-item text=\"Rename\" [data]=\"dataItem\"> </kendo-menu-item>\r\n <kendo-menu-item text=\"Delete\" [data]=\"dataItem\" [disabled]=\"true\"> </kendo-menu-item>\r\n </kendo-contextmenu>\r\n </ng-template>\r\n </kendo-treeview>\r\n\r\n <kendo-dialog title=\"New file category\" *ngIf=\"showNew\" (close)=\"cancelNewCategory()\" [minWidth]=\"250\" [width]=\"450\">\r\n <div class=\"container\">\r\n <form #templateForm=\"ngForm\">\r\n <kendo-label class=\"k-form\" text=\"Name\">\r\n <kendo-textbox\r\n name=\"name\"\r\n [(ngModel)]=\"newCategoryName\"\r\n [showSuccessIcon]=\"newCategoryName.length > 0\"\r\n showErrorIcon=\"initial\"\r\n required\r\n [disabled]=\"isLoading\"\r\n ></kendo-textbox>\r\n </kendo-label>\r\n </form>\r\n </div>\r\n <kendo-dialog-actions>\r\n <button kendoButton (click)=\"cancelNewCategory()\" [disabled]=\"isLoading\">Cancel</button>\r\n <button kendoButton (click)=\"saveNewCategory()\" [disabled]=\"isLoading\" themeColor=\"primary\">Save</button>\r\n </kendo-dialog-actions>\r\n </kendo-dialog>\r\n\r\n <kendo-dialog title=\"Rename file category\" *ngIf=\"!!renameFileCategory\" (close)=\"cancelRename()\" [minWidth]=\"250\" [width]=\"450\">\r\n <div class=\"container\">\r\n <form #templateForm=\"ngForm\">\r\n <kendo-label class=\"k-form\" text=\"Name\">\r\n <kendo-textbox\r\n name=\"Name\"\r\n [(ngModel)]=\"renameFileCategory.Name\"\r\n [showSuccessIcon]=\"renameFileCategory.Name.length > 0\"\r\n showErrorIcon=\"initial\"\r\n required\r\n [disabled]=\"isLoading\"\r\n ></kendo-textbox>\r\n </kendo-label>\r\n </form>\r\n </div>\r\n <kendo-dialog-actions>\r\n <button kendoButton (click)=\"cancelRename()\" [disabled]=\"isLoading\">Cancel</button>\r\n <button kendoButton (click)=\"saveRename()\" [disabled]=\"isLoading || !renameFileCategory.Dirty\" themeColor=\"primary\">Save</button>\r\n </kendo-dialog-actions>\r\n </kendo-dialog>\r\n</div>\r\n", styles: ["/* Styles for category tree */\r\n.container {\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n\r\nkendo-treeview {\r\n width: 250px;\r\n}\r\n\r\n.tree-header {\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: space-between;\r\n align-items: center;\r\n padding-right: 4px;\r\n}\r\n\r\nkendo-label {\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n column-gap: 12px;\r\n margin-bottom: 4px;\r\n}\r\n\r\nkendo-label kendo-textbox {\r\n width: 100%;\r\n}\r\n\r\nkendo-loader {\r\n padding-left: 4px;\r\n}"] }]
234
+ }], () => [{ type: i1.SharedService }], { categorySelected: [{
235
+ type: Output
60
236
  }] }); })();
61
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CategoryTreeComponent, { className: "CategoryTreeComponent", filePath: "src\\lib\\category-tree\\category-tree.ts", lineNumber: 13 }); })();
237
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CategoryTreeComponent, { className: "CategoryTreeComponent", filePath: "src\\lib\\category-tree\\category-tree.ts", lineNumber: 14 }); })();
@@ -17,12 +17,13 @@ export declare class FileUploadComponent implements OnInit {
17
17
  private md;
18
18
  constructor();
19
19
  disabled: boolean;
20
+ CategoryID: number | undefined;
20
21
  uploadStarted: EventEmitter<void>;
21
22
  fileUpload: EventEmitter<FileUploadEvent>;
22
23
  ngOnInit(): void;
23
24
  Refresh(): Promise<void>;
24
25
  selectEventHandler(e: SelectEvent): Promise<void>;
25
26
  static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, never>;
26
- static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "mj-files-file-upload", never, { "disabled": { "alias": "disabled"; "required": false; }; }, { "uploadStarted": "uploadStarted"; "fileUpload": "fileUpload"; }, never, never, false, never>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "mj-files-file-upload", never, { "disabled": { "alias": "disabled"; "required": false; }; "CategoryID": { "alias": "CategoryID"; "required": false; }; }, { "uploadStarted": "uploadStarted"; "fileUpload": "fileUpload"; }, never, never, false, never>;
27
28
  }
28
29
  //# sourceMappingURL=file-upload.d.ts.map
@@ -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,EAA6B,MAAM,+BAA+B,CAAC;AAGtF,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;;AAGvE,MAAM,MAAM,eAAe,GACvB;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,GACnC;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAA;AAmDtC,qBAKa,mBAAoB,YAAW,MAAM;IACzC,YAAY,sBAAgB;IAC5B,WAAW,UAAS;IAC3B,OAAO,CAAC,iBAAiB,CAAM;IAC/B,OAAO,CAAC,EAAE,CAAkB;;IAInB,QAAQ,UAAS;IAChB,aAAa,qBAA4B;IACzC,UAAU,gCAAuC;IAE3D,QAAQ,IAAI,IAAI;IAIV,OAAO;IASP,kBAAkB,CAAC,CAAC,EAAE,WAAW;yCAzB5B,mBAAmB;2CAAnB,mBAAmB;CAkF/B"}
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,EAA6B,MAAM,+BAA+B,CAAC;AAGtF,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;;AAGvE,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;AAmDvG,qBAKa,mBAAoB,YAAW,MAAM;IACzC,YAAY,sBAAgB;IAC5B,WAAW,UAAS;IAC3B,OAAO,CAAC,iBAAiB,CAAM;IAC/B,OAAO,CAAC,EAAE,CAAkB;;IAInB,QAAQ,UAAS;IACjB,UAAU,EAAE,MAAM,GAAG,SAAS,CAAa;IAC1C,aAAa,qBAA4B;IACzC,UAAU,gCAAuC;IAE3D,QAAQ,IAAI,IAAI;IAIV,OAAO;IASP,kBAAkB,CAAC,CAAC,EAAE,WAAW;yCA1B5B,mBAAmB;2CAAnB,mBAAmB;CA4E/B"}
@@ -67,6 +67,7 @@ export class FileUploadComponent {
67
67
  this.defaultProviderID = -1;
68
68
  this.md = new Metadata();
69
69
  this.disabled = false;
70
+ this.CategoryID = undefined;
70
71
  this.uploadStarted = new EventEmitter();
71
72
  this.fileUpload = new EventEmitter();
72
73
  }
@@ -86,34 +87,29 @@ export class FileUploadComponent {
86
87
  selectEventHandler(e) {
87
88
  return __awaiter(this, void 0, void 0, function* () {
88
89
  e.preventDefault();
89
- console.log('Files were selected', e);
90
90
  this.isUploading = true;
91
91
  this.uploadStarted.emit();
92
92
  // for each selected file to upload
93
93
  for (const file of e.files) {
94
+ const input = {
95
+ Name: file.name,
96
+ ProviderID: this.defaultProviderID,
97
+ Status: 'Pending',
98
+ CategoryID: this.CategoryID,
99
+ };
94
100
  // call the gql
95
- const result = yield GraphQLDataProvider.ExecuteGQL(FileUploadMutation, {
96
- input: {
97
- Name: file.name,
98
- ProviderID: this.defaultProviderID,
99
- Status: 'Pending',
100
- // TODO: Get this from outside this component
101
- // CategoryID
102
- },
103
- });
101
+ const result = yield GraphQLDataProvider.ExecuteGQL(FileUploadMutation, { input });
104
102
  // make sure the response is correct
105
103
  const parsedResult = FileUploadMutationSchema.safeParse(result);
106
104
  if (parsedResult.success) {
107
105
  const { File, UploadUrl } = parsedResult.data.CreateFile;
108
106
  try {
109
- console.log('type of ', typeof file);
110
107
  // now upload to the url
111
108
  yield window.fetch(UploadUrl, {
112
109
  method: 'PUT',
113
110
  headers: { 'x-ms-blob-type': 'BlockBlob' },
114
111
  body: file.rawFile,
115
112
  });
116
- console.log('File uploaded', file);
117
113
  // now update that file to set status
118
114
  const fileEntity = yield this.md.GetEntityObject('Files');
119
115
  yield fileEntity.LoadFromData(File);
@@ -139,7 +135,7 @@ export class FileUploadComponent {
139
135
  }
140
136
  }
141
137
  FileUploadComponent.ɵfac = function FileUploadComponent_Factory(t) { return new (t || FileUploadComponent)(); };
142
- FileUploadComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FileUploadComponent, selectors: [["mj-files-file-upload"]], inputs: { disabled: "disabled" }, outputs: { uploadStarted: "uploadStarted", fileUpload: "fileUpload" }, decls: 1, vars: 2, consts: [[3, "disabled", "multiple", "select"]], template: function FileUploadComponent_Template(rf, ctx) { if (rf & 1) {
138
+ FileUploadComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FileUploadComponent, selectors: [["mj-files-file-upload"]], inputs: { disabled: "disabled", CategoryID: "CategoryID" }, outputs: { uploadStarted: "uploadStarted", fileUpload: "fileUpload" }, decls: 1, vars: 2, consts: [[3, "disabled", "multiple", "select"]], template: function FileUploadComponent_Template(rf, ctx) { if (rf & 1) {
143
139
  i0.ɵɵelementStart(0, "kendo-fileselect", 0);
144
140
  i0.ɵɵlistener("select", function FileUploadComponent_Template_kendo_fileselect_select_0_listener($event) { return ctx.selectEventHandler($event); });
145
141
  i0.ɵɵelementEnd();
@@ -151,9 +147,11 @@ FileUploadComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FileUpl
151
147
  args: [{ selector: 'mj-files-file-upload', template: "<kendo-fileselect [disabled]=\"isUploading || disabled\" [multiple]=\"false\" (select)=\"selectEventHandler($event)\"></kendo-fileselect>\r\n" }]
152
148
  }], () => [], { disabled: [{
153
149
  type: Input
150
+ }], CategoryID: [{
151
+ type: Input
154
152
  }], uploadStarted: [{
155
153
  type: Output
156
154
  }], fileUpload: [{
157
155
  type: Output
158
156
  }] }); })();
159
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FileUploadComponent, { className: "FileUploadComponent", filePath: "src\\lib\\file-upload\\file-upload.ts", lineNumber: 68 }); })();
157
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FileUploadComponent, { className: "FileUploadComponent", filePath: "src\\lib\\file-upload\\file-upload.ts", lineNumber: 66 }); })();
@@ -1,16 +1,18 @@
1
- import { OnInit } from '@angular/core';
1
+ import { OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
2
  import { FileEntity } from '@memberjunction/core-entities';
3
3
  import { SharedService, kendoSVGIcon } from '@memberjunction/ng-shared';
4
4
  import { FileUploadEvent } from '../file-upload/file-upload';
5
5
  import * as i0 from "@angular/core";
6
- export declare class FilesGridComponent implements OnInit {
6
+ export declare class FilesGridComponent implements OnInit, OnChanges {
7
7
  private sharedService;
8
8
  files: FileEntity[];
9
9
  isLoading: boolean;
10
10
  editFile: FileEntity | undefined;
11
11
  kendoSVGIcon: typeof kendoSVGIcon;
12
12
  constructor(sharedService: SharedService);
13
+ CategoryID: number | undefined;
13
14
  ngOnInit(): void;
15
+ ngOnChanges(changes: SimpleChanges): void;
14
16
  /**
15
17
  * Resets the edited file.
16
18
  *
@@ -64,6 +66,6 @@ export declare class FilesGridComponent implements OnInit {
64
66
  */
65
67
  Refresh(): Promise<void>;
66
68
  static ɵfac: i0.ɵɵFactoryDeclaration<FilesGridComponent, never>;
67
- static ɵcmp: i0.ɵɵComponentDeclaration<FilesGridComponent, "mj-files-grid", never, {}, {}, never, never, false, never>;
69
+ static ɵcmp: i0.ɵɵComponentDeclaration<FilesGridComponent, "mj-files-grid", never, { "CategoryID": { "alias": "CategoryID"; "required": false; }; }, {}, never, never, false, never>;
68
70
  }
69
71
  //# sourceMappingURL=files-grid.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"files-grid.d.ts","sourceRoot":"","sources":["../../../src/lib/files-grid/files-grid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,MAAM,EAAE,MAAM,eAAe,CAAC;AAGlD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAExE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;;AAiD7D,qBAKa,kBAAmB,YAAW,MAAM;IAMnC,OAAO,CAAC,aAAa;IAL1B,KAAK,EAAE,UAAU,EAAE,CAAM;IACzB,SAAS,EAAE,OAAO,CAAS;IAC3B,QAAQ,EAAE,UAAU,GAAG,SAAS,CAAC;IACjC,YAAY,sBAAgB;gBAEf,aAAa,EAAE,aAAa;IAEhD,QAAQ,IAAI,IAAI;IAIhB;;;;;;OAMG;IACI,aAAa;IAKpB;;;;;;;OAOG;IACU,YAAY;IAezB;;;;;;OAMG;IACI,YAAY,SAAgB,UAAU,mBAkB3C;IAEF;;;;;OAKG;IACI,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO;IAO9C;;;;;;OAMG;IACI,UAAU,SAAgB,UAAU,mBAYzC;IAEF;;;;;OAKG;IACI,gBAAgB,CAAC,CAAC,EAAE,eAAe;IAU1C;;;OAGG;IACG,OAAO;yCAhIF,kBAAkB;2CAAlB,kBAAkB;CAiJ9B"}
1
+ {"version":3,"file":"files-grid.d.ts","sourceRoot":"","sources":["../../../src/lib/files-grid/files-grid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAGnF,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAExE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;;AAgD7D,qBAKa,kBAAmB,YAAW,MAAM,EAAE,SAAS;IAM9C,OAAO,CAAC,aAAa;IAL1B,KAAK,EAAE,UAAU,EAAE,CAAM;IACzB,SAAS,EAAE,OAAO,CAAS;IAC3B,QAAQ,EAAE,UAAU,GAAG,SAAS,CAAC;IACjC,YAAY,sBAAgB;gBAEf,aAAa,EAAE,aAAa;IAEvC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAa;IAEpD,QAAQ,IAAI,IAAI;IAIhB,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAMzC;;;;;;OAMG;IACI,aAAa;IAKpB;;;;;;;OAOG;IACU,YAAY;IAezB;;;;;;OAMG;IACI,YAAY,SAAgB,UAAU,mBAkB3C;IAEF;;;;;OAKG;IACI,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO;IAO9C;;;;;;OAMG;IACI,UAAU,SAAgB,UAAU,mBAYzC;IAEF;;;;;OAKG;IACI,gBAAgB,CAAC,CAAC,EAAE,eAAe;IAU1C;;;OAGG;IACG,OAAO;yCAxIF,kBAAkB;2CAAlB,kBAAkB;CAwJ9B"}
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { Component } from '@angular/core';
10
+ import { Component, Input } from '@angular/core';
11
11
  import { RunView } from '@memberjunction/core';
12
12
  import { GraphQLDataProvider, gql } from '@memberjunction/graphql-dataprovider';
13
13
  import { kendoSVGIcon } from '@memberjunction/ng-shared';
@@ -22,16 +22,16 @@ import * as i6 from "@progress/kendo-angular-label";
22
22
  import * as i7 from "@progress/kendo-angular-grid";
23
23
  import * as i8 from "@progress/kendo-angular-inputs";
24
24
  import * as i9 from "../file-upload/file-upload";
25
- function FilesGridComponent_ng_template_7_Template(rf, ctx) { if (rf & 1) {
25
+ function FilesGridComponent_ng_template_8_Template(rf, ctx) { if (rf & 1) {
26
26
  const _r4 = i0.ɵɵgetCurrentView();
27
- i0.ɵɵelementStart(0, "kendo-button", 10);
28
- i0.ɵɵlistener("click", function FilesGridComponent_ng_template_7_Template_kendo_button_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r4); const dataItem_r2 = restoredCtx.$implicit; const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.downloadFile(dataItem_r2)); });
27
+ i0.ɵɵelementStart(0, "kendo-button", 11);
28
+ i0.ɵɵlistener("click", function FilesGridComponent_ng_template_8_Template_kendo_button_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r4); const dataItem_r2 = restoredCtx.$implicit; const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.downloadFile(dataItem_r2)); });
29
29
  i0.ɵɵelementEnd();
30
- i0.ɵɵelementStart(1, "kendo-button", 10);
31
- i0.ɵɵlistener("click", function FilesGridComponent_ng_template_7_Template_kendo_button_click_1_listener() { const restoredCtx = i0.ɵɵrestoreView(_r4); const dataItem_r2 = restoredCtx.$implicit; const ctx_r5 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r5.deleteFile(dataItem_r2)); });
30
+ i0.ɵɵelementStart(1, "kendo-button", 11);
31
+ i0.ɵɵlistener("click", function FilesGridComponent_ng_template_8_Template_kendo_button_click_1_listener() { const restoredCtx = i0.ɵɵrestoreView(_r4); const dataItem_r2 = restoredCtx.$implicit; const ctx_r5 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r5.deleteFile(dataItem_r2)); });
32
32
  i0.ɵɵelementEnd();
33
- i0.ɵɵelementStart(2, "kendo-button", 10);
34
- i0.ɵɵlistener("click", function FilesGridComponent_ng_template_7_Template_kendo_button_click_2_listener() { const restoredCtx = i0.ɵɵrestoreView(_r4); const dataItem_r2 = restoredCtx.$implicit; const ctx_r6 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r6.editFile = dataItem_r2); });
33
+ i0.ɵɵelementStart(2, "kendo-button", 11);
34
+ i0.ɵɵlistener("click", function FilesGridComponent_ng_template_8_Template_kendo_button_click_2_listener() { const restoredCtx = i0.ɵɵrestoreView(_r4); const dataItem_r2 = restoredCtx.$implicit; const ctx_r6 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r6.editFile = dataItem_r2); });
35
35
  i0.ɵɵelementEnd();
36
36
  } if (rf & 2) {
37
37
  const dataItem_r2 = ctx.$implicit;
@@ -42,23 +42,23 @@ function FilesGridComponent_ng_template_7_Template(rf, ctx) { if (rf & 1) {
42
42
  i0.ɵɵadvance();
43
43
  i0.ɵɵproperty("disabled", dataItem_r2.Status !== "Uploaded")("svgIcon", ctx_r0.kendoSVGIcon("pencil"));
44
44
  } }
45
- function FilesGridComponent_kendo_dialog_9_Template(rf, ctx) { if (rf & 1) {
45
+ function FilesGridComponent_kendo_dialog_10_Template(rf, ctx) { if (rf & 1) {
46
46
  const _r9 = i0.ɵɵgetCurrentView();
47
- i0.ɵɵelementStart(0, "kendo-dialog", 11);
48
- i0.ɵɵlistener("close", function FilesGridComponent_kendo_dialog_9_Template_kendo_dialog_close_0_listener() { i0.ɵɵrestoreView(_r9); const ctx_r8 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r8.resetEditFile()); });
49
- i0.ɵɵelementStart(1, "div", 0)(2, "form", null, 12)(4, "kendo-label", 13)(5, "kendo-textbox", 14);
50
- i0.ɵɵtwoWayListener("ngModelChange", function FilesGridComponent_kendo_dialog_9_Template_kendo_textbox_ngModelChange_5_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r10 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r10.editFile.Name, $event) || (ctx_r10.editFile.Name = $event); return i0.ɵɵresetView($event); });
47
+ i0.ɵɵelementStart(0, "kendo-dialog", 12);
48
+ i0.ɵɵlistener("close", function FilesGridComponent_kendo_dialog_10_Template_kendo_dialog_close_0_listener() { i0.ɵɵrestoreView(_r9); const ctx_r8 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r8.resetEditFile()); });
49
+ i0.ɵɵelementStart(1, "div", 0)(2, "form", null, 13)(4, "kendo-label", 14)(5, "kendo-textbox", 15);
50
+ i0.ɵɵtwoWayListener("ngModelChange", function FilesGridComponent_kendo_dialog_10_Template_kendo_textbox_ngModelChange_5_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r10 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r10.editFile.Name, $event) || (ctx_r10.editFile.Name = $event); return i0.ɵɵresetView($event); });
51
51
  i0.ɵɵelementEnd()();
52
- i0.ɵɵelementStart(6, "kendo-label", 15)(7, "kendo-textbox", 16);
53
- i0.ɵɵtwoWayListener("ngModelChange", function FilesGridComponent_kendo_dialog_9_Template_kendo_textbox_ngModelChange_7_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r11 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r11.editFile.Description, $event) || (ctx_r11.editFile.Description = $event); return i0.ɵɵresetView($event); });
52
+ i0.ɵɵelementStart(6, "kendo-label", 16)(7, "kendo-textbox", 17);
53
+ i0.ɵɵtwoWayListener("ngModelChange", function FilesGridComponent_kendo_dialog_10_Template_kendo_textbox_ngModelChange_7_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r11 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r11.editFile.Description, $event) || (ctx_r11.editFile.Description = $event); return i0.ɵɵresetView($event); });
54
54
  i0.ɵɵelementEnd()()()();
55
- i0.ɵɵelementStart(8, "kendo-dialog-actions")(9, "button", 17);
56
- i0.ɵɵlistener("click", function FilesGridComponent_kendo_dialog_9_Template_button_click_9_listener() { i0.ɵɵrestoreView(_r9); const ctx_r12 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r12.resetEditFile()); });
55
+ i0.ɵɵelementStart(8, "kendo-dialog-actions")(9, "button", 18);
56
+ i0.ɵɵlistener("click", function FilesGridComponent_kendo_dialog_10_Template_button_click_9_listener() { i0.ɵɵrestoreView(_r9); const ctx_r12 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r12.resetEditFile()); });
57
57
  i0.ɵɵtext(10, "Cancel");
58
58
  i0.ɵɵelementEnd();
59
- i0.ɵɵelementStart(11, "button", 18);
60
- i0.ɵɵlistener("click", function FilesGridComponent_kendo_dialog_9_Template_button_click_11_listener() { i0.ɵɵrestoreView(_r9); const ctx_r13 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r13.saveEditFile()); });
61
- i0.ɵɵtext(12, " Save ");
59
+ i0.ɵɵelementStart(11, "button", 19);
60
+ i0.ɵɵlistener("click", function FilesGridComponent_kendo_dialog_10_Template_button_click_11_listener() { i0.ɵɵrestoreView(_r9); const ctx_r13 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r13.saveEditFile()); });
61
+ i0.ɵɵtext(12, "Save");
62
62
  i0.ɵɵelementEnd()()();
63
63
  } if (rf & 2) {
64
64
  const ctx_r1 = i0.ɵɵnextContext();
@@ -122,6 +122,7 @@ export class FilesGridComponent {
122
122
  this.files = [];
123
123
  this.isLoading = false;
124
124
  this.kendoSVGIcon = kendoSVGIcon;
125
+ this.CategoryID = undefined;
125
126
  /**
126
127
  * Downloads a file using the provided FileEntity.
127
128
  *
@@ -173,6 +174,11 @@ export class FilesGridComponent {
173
174
  ngOnInit() {
174
175
  this.Refresh();
175
176
  }
177
+ ngOnChanges(changes) {
178
+ if (changes['CategoryID']) {
179
+ this.Refresh();
180
+ }
181
+ }
176
182
  /**
177
183
  * Resets the edited file.
178
184
  *
@@ -241,17 +247,13 @@ export class FilesGridComponent {
241
247
  * @returns {Promise<void>} - A promise that resolves when the data is refreshed.
242
248
  */
243
249
  Refresh() {
250
+ var _a;
244
251
  return __awaiter(this, void 0, void 0, function* () {
245
252
  this.isLoading = true;
246
253
  const rv = new RunView();
247
- const result = yield rv.RunView({
248
- EntityName: 'Files',
249
- // TODO: Apply the category filter here
250
- // ExtraFilter: `LEFT(Status, 1)<>'D'`, //'CategoryID=' + e.ID,
251
- ResultType: 'entity_object',
252
- });
254
+ const result = yield rv.RunView(Object.assign({ EntityName: 'Files', ResultType: 'entity_object' }, (this.CategoryID !== undefined && { ExtraFilter: `CategoryID=${this.CategoryID}` })));
253
255
  if (result.Success) {
254
- this.files = result.Results;
256
+ this.files = (_a = result.Results) !== null && _a !== void 0 ? _a : [];
255
257
  }
256
258
  else {
257
259
  throw new Error('Error loading files: ' + result.ErrorMessage);
@@ -261,27 +263,29 @@ export class FilesGridComponent {
261
263
  }
262
264
  }
263
265
  FilesGridComponent.ɵfac = function FilesGridComponent_Factory(t) { return new (t || FilesGridComponent)(i0.ɵɵdirectiveInject(i1.SharedService)); };
264
- FilesGridComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FilesGridComponent, selectors: [["mj-files-grid"]], decls: 10, vars: 4, consts: [[1, "container"], [3, "data", "loading"], ["field", "ID", "title", "ID"], ["field", "Name", "title", "Name"], ["field", "Description", "title", "Description"], ["field", "Status", "title", "Status"], ["field", "Actions"], ["kendoGridCellTemplate", ""], [3, "disabled", "uploadStarted", "fileUpload"], ["title", "Please confirm", 3, "minWidth", "width", "close", 4, "ngIf"], [3, "disabled", "svgIcon", "click"], ["title", "Please confirm", 3, "minWidth", "width", "close"], ["templateForm", "ngForm"], ["text", "Name", 1, "k-form"], ["name", "name", "showErrorIcon", "initial", "required", "", 3, "ngModel", "showSuccessIcon", "disabled", "ngModelChange"], ["text", "Description", 1, "k-form"], ["name", "description", 3, "ngModel", "disabled", "ngModelChange"], ["kendoButton", "", 3, "disabled", "click"], ["kendoButton", "", "themeColor", "primary", 3, "disabled", "click"]], template: function FilesGridComponent_Template(rf, ctx) { if (rf & 1) {
266
+ FilesGridComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FilesGridComponent, selectors: [["mj-files-grid"]], inputs: { CategoryID: "CategoryID" }, features: [i0.ɵɵNgOnChangesFeature], decls: 11, vars: 5, consts: [[1, "container"], [3, "data", "loading"], ["field", "ID", "title", "ID"], ["field", "Category", "title", "Category"], ["field", "Name", "title", "Name"], ["field", "Description", "title", "Description"], ["field", "Status", "title", "Status"], ["field", "Actions"], ["kendoGridCellTemplate", ""], [3, "CategoryID", "disabled", "uploadStarted", "fileUpload"], ["title", "Edit file", 3, "minWidth", "width", "close", 4, "ngIf"], [3, "disabled", "svgIcon", "click"], ["title", "Edit file", 3, "minWidth", "width", "close"], ["templateForm", "ngForm"], ["text", "Name", 1, "k-form"], ["name", "name", "showErrorIcon", "initial", "required", "", 3, "ngModel", "showSuccessIcon", "disabled", "ngModelChange"], ["text", "Description", 1, "k-form"], ["name", "description", 3, "ngModel", "disabled", "ngModelChange"], ["kendoButton", "", 3, "disabled", "click"], ["kendoButton", "", "themeColor", "primary", 3, "disabled", "click"]], template: function FilesGridComponent_Template(rf, ctx) { if (rf & 1) {
265
267
  i0.ɵɵelementStart(0, "div", 0)(1, "kendo-grid", 1);
266
- i0.ɵɵelement(2, "kendo-grid-column", 2)(3, "kendo-grid-column", 3)(4, "kendo-grid-column", 4)(5, "kendo-grid-column", 5);
267
- i0.ɵɵelementStart(6, "kendo-grid-column", 6);
268
- i0.ɵɵtemplate(7, FilesGridComponent_ng_template_7_Template, 3, 6, "ng-template", 7);
268
+ i0.ɵɵelement(2, "kendo-grid-column", 2)(3, "kendo-grid-column", 3)(4, "kendo-grid-column", 4)(5, "kendo-grid-column", 5)(6, "kendo-grid-column", 6);
269
+ i0.ɵɵelementStart(7, "kendo-grid-column", 7);
270
+ i0.ɵɵtemplate(8, FilesGridComponent_ng_template_8_Template, 3, 6, "ng-template", 8);
269
271
  i0.ɵɵelementEnd()();
270
- i0.ɵɵelementStart(8, "mj-files-file-upload", 8);
271
- i0.ɵɵlistener("uploadStarted", function FilesGridComponent_Template_mj_files_file_upload_uploadStarted_8_listener() { return ctx.isLoading = true; })("fileUpload", function FilesGridComponent_Template_mj_files_file_upload_fileUpload_8_listener($event) { return ctx.handleFileUpload($event); });
272
+ i0.ɵɵelementStart(9, "mj-files-file-upload", 9);
273
+ i0.ɵɵlistener("uploadStarted", function FilesGridComponent_Template_mj_files_file_upload_uploadStarted_9_listener() { return ctx.isLoading = true; })("fileUpload", function FilesGridComponent_Template_mj_files_file_upload_fileUpload_9_listener($event) { return ctx.handleFileUpload($event); });
272
274
  i0.ɵɵelementEnd();
273
- i0.ɵɵtemplate(9, FilesGridComponent_kendo_dialog_9_Template, 13, 9, "kendo-dialog", 9);
275
+ i0.ɵɵtemplate(10, FilesGridComponent_kendo_dialog_10_Template, 13, 9, "kendo-dialog", 10);
274
276
  i0.ɵɵelementEnd();
275
277
  } if (rf & 2) {
276
278
  i0.ɵɵadvance();
277
279
  i0.ɵɵproperty("data", ctx.files)("loading", ctx.isLoading);
278
- i0.ɵɵadvance(7);
279
- i0.ɵɵproperty("disabled", ctx.isLoading);
280
+ i0.ɵɵadvance(8);
281
+ i0.ɵɵproperty("CategoryID", ctx.CategoryID)("disabled", ctx.isLoading);
280
282
  i0.ɵɵadvance();
281
283
  i0.ɵɵproperty("ngIf", ctx.editFile);
282
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%] {\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n\r\nkendo-label[_ngcontent-%COMP%] {\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n column-gap: 12px;\r\n margin-bottom: 4px;\r\n}\r\n\r\nkendo-label[_ngcontent-%COMP%] kendo-textbox[_ngcontent-%COMP%] {\r\n width: 100%;\r\n}"] });
283
285
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FilesGridComponent, [{
284
286
  type: Component,
285
- args: [{ selector: 'mj-files-grid', template: "<div class=\"container\">\r\n <kendo-grid [data]=\"files\" [loading]=\"isLoading\">\r\n <kendo-grid-column field=\"ID\" title=\"ID\"> </kendo-grid-column>\r\n <kendo-grid-column field=\"Name\" title=\"Name\"> </kendo-grid-column>\r\n <kendo-grid-column field=\"Description\" title=\"Description\">\r\n </kendo-grid-column>\r\n <kendo-grid-column field=\"Status\" title=\"Status\"> </kendo-grid-column>\r\n <kendo-grid-column field=\"Actions\">\r\n <ng-template kendoGridCellTemplate let-dataItem>\r\n <kendo-button [disabled]=\"dataItem.Status!=='Uploaded'\" [svgIcon]=\"kendoSVGIcon('download')\" (click)=\"downloadFile(dataItem)\"></kendo-button>\r\n <kendo-button [disabled]=\"!canBeDeleted(dataItem)\" [svgIcon]=\"kendoSVGIcon('trash')\" (click)=\"deleteFile(dataItem)\"></kendo-button>\r\n <kendo-button [disabled]=\"dataItem.Status!=='Uploaded'\" [svgIcon]=\"kendoSVGIcon('pencil')\" (click)=\"editFile = dataItem\"></kendo-button>\r\n </ng-template>\r\n </kendo-grid-column> \r\n </kendo-grid>\r\n\r\n <mj-files-file-upload [disabled]=\"isLoading\" (uploadStarted)=\"isLoading = true\" (fileUpload)=\"handleFileUpload($event)\"></mj-files-file-upload>\r\n\r\n <kendo-dialog\r\n title=\"Please confirm\"\r\n *ngIf=\"editFile\"\r\n (close)=\"resetEditFile()\"\r\n [minWidth]=\"250\"\r\n [width]=\"450\"\r\n >\r\n <div class=\"container\">\r\n <form #templateForm=\"ngForm\">\r\n <kendo-label class=\"k-form\" text=\"Name\">\r\n <kendo-textbox\r\n name=\"name\"\r\n [(ngModel)]=\"editFile.Name\"\r\n [showSuccessIcon]=\"editFile.Name.length > 0\"\r\n showErrorIcon=\"initial\"\r\n required\r\n [disabled]=\"isLoading\"\r\n ></kendo-textbox>\r\n </kendo-label>\r\n <kendo-label class=\"k-form\" text=\"Description\">\r\n <kendo-textbox\r\n name=\"description\"\r\n [(ngModel)]=\"editFile.Description\"\r\n [disabled]=\"isLoading\"\r\n ></kendo-textbox>\r\n </kendo-label>\r\n </form>\r\n </div>\r\n <kendo-dialog-actions>\r\n <button kendoButton (click)=\"resetEditFile()\" [disabled]=\"isLoading\">Cancel</button>\r\n <button kendoButton (click)=\"saveEditFile()\" [disabled]=\"isLoading || !editFile.Dirty\" themeColor=\"primary\">\r\n Save\r\n </button>\r\n </kendo-dialog-actions>\r\n </kendo-dialog>\r\n</div>\r\n", styles: [".container {\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n\r\nkendo-label {\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n column-gap: 12px;\r\n margin-bottom: 4px;\r\n}\r\n\r\nkendo-label kendo-textbox {\r\n width: 100%;\r\n}"] }]
286
- }], () => [{ type: i1.SharedService }], null); })();
287
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FilesGridComponent, { className: "FilesGridComponent", filePath: "src\\lib\\files-grid\\files-grid.ts", lineNumber: 62 }); })();
287
+ args: [{ selector: 'mj-files-grid', template: "<div class=\"container\">\r\n <kendo-grid [data]=\"files\" [loading]=\"isLoading\">\r\n <kendo-grid-column field=\"ID\" title=\"ID\"> </kendo-grid-column>\r\n <kendo-grid-column field=\"Category\" title=\"Category\"> </kendo-grid-column>\r\n <kendo-grid-column field=\"Name\" title=\"Name\"> </kendo-grid-column>\r\n <kendo-grid-column field=\"Description\" title=\"Description\"> </kendo-grid-column>\r\n <kendo-grid-column field=\"Status\" title=\"Status\"> </kendo-grid-column>\r\n <kendo-grid-column field=\"Actions\">\r\n <ng-template kendoGridCellTemplate let-dataItem>\r\n <kendo-button\r\n [disabled]=\"dataItem.Status!=='Uploaded'\"\r\n [svgIcon]=\"kendoSVGIcon('download')\"\r\n (click)=\"downloadFile(dataItem)\"\r\n ></kendo-button>\r\n <kendo-button [disabled]=\"!canBeDeleted(dataItem)\" [svgIcon]=\"kendoSVGIcon('trash')\" (click)=\"deleteFile(dataItem)\"></kendo-button>\r\n <kendo-button\r\n [disabled]=\"dataItem.Status!=='Uploaded'\"\r\n [svgIcon]=\"kendoSVGIcon('pencil')\"\r\n (click)=\"editFile = dataItem\"\r\n ></kendo-button>\r\n </ng-template>\r\n </kendo-grid-column>\r\n </kendo-grid>\r\n\r\n <mj-files-file-upload\r\n [CategoryID]=\"CategoryID\"\r\n [disabled]=\"isLoading\"\r\n (uploadStarted)=\"isLoading = true\"\r\n (fileUpload)=\"handleFileUpload($event)\"\r\n ></mj-files-file-upload>\r\n\r\n <kendo-dialog title=\"Edit file\" *ngIf=\"editFile\" (close)=\"resetEditFile()\" [minWidth]=\"250\" [width]=\"450\">\r\n <div class=\"container\">\r\n <form #templateForm=\"ngForm\">\r\n <kendo-label class=\"k-form\" text=\"Name\">\r\n <kendo-textbox\r\n name=\"name\"\r\n [(ngModel)]=\"editFile.Name\"\r\n [showSuccessIcon]=\"editFile.Name.length > 0\"\r\n showErrorIcon=\"initial\"\r\n required\r\n [disabled]=\"isLoading\"\r\n ></kendo-textbox>\r\n </kendo-label>\r\n <kendo-label class=\"k-form\" text=\"Description\">\r\n <kendo-textbox name=\"description\" [(ngModel)]=\"editFile.Description\" [disabled]=\"isLoading\"></kendo-textbox>\r\n </kendo-label>\r\n </form>\r\n </div>\r\n <kendo-dialog-actions>\r\n <button kendoButton (click)=\"resetEditFile()\" [disabled]=\"isLoading\">Cancel</button>\r\n <button kendoButton (click)=\"saveEditFile()\" [disabled]=\"isLoading || !editFile.Dirty\" themeColor=\"primary\">Save</button>\r\n </kendo-dialog-actions>\r\n </kendo-dialog>\r\n</div>\r\n", styles: [".container {\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n\r\nkendo-label {\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n column-gap: 12px;\r\n margin-bottom: 4px;\r\n}\r\n\r\nkendo-label kendo-textbox {\r\n width: 100%;\r\n}"] }]
288
+ }], () => [{ type: i1.SharedService }], { CategoryID: [{
289
+ type: Input
290
+ }] }); })();
291
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FilesGridComponent, { className: "FilesGridComponent", filePath: "src\\lib\\files-grid\\files-grid.ts", lineNumber: 61 }); })();
@@ -18,9 +18,11 @@ import * as i16 from "@angular/platform-browser";
18
18
  import * as i17 from "@angular/platform-browser/animations";
19
19
  import * as i18 from "@progress/kendo-angular-inputs";
20
20
  import * as i19 from "@progress/kendo-angular-upload";
21
+ import * as i20 from "@progress/kendo-angular-menu";
22
+ import * as i21 from "@progress/kendo-angular-indicators";
21
23
  export declare class FileStorageModule {
22
24
  static ɵfac: i0.ɵɵFactoryDeclaration<FileStorageModule, never>;
23
- static ɵmod: i0.ɵɵNgModuleDeclaration<FileStorageModule, [typeof i1.CategoryTreeComponent, typeof i2.FilesGridComponent, typeof i3.FileUploadComponent], [typeof i4.CommonModule, typeof i5.TreeViewModule, typeof i6.FormsModule, typeof i7.DialogsModule, typeof i8.ExcelExportModule, typeof i9.CompareRecordsModule, typeof i10.ContainerDirectivesModule, typeof i11.ButtonsModule, typeof i12.IconsModule, typeof i13.LabelModule, typeof i14.GridModule, typeof i15.DropDownsModule, typeof i16.BrowserModule, typeof i17.BrowserAnimationsModule, typeof i18.InputsModule, typeof i19.UploadsModule], [typeof i1.CategoryTreeComponent, typeof i2.FilesGridComponent]>;
25
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FileStorageModule, [typeof i1.CategoryTreeComponent, typeof i2.FilesGridComponent, typeof i3.FileUploadComponent], [typeof i4.CommonModule, typeof i5.TreeViewModule, typeof i6.FormsModule, typeof i7.DialogsModule, typeof i8.ExcelExportModule, typeof i9.CompareRecordsModule, typeof i10.ContainerDirectivesModule, typeof i11.ButtonsModule, typeof i12.IconsModule, typeof i13.LabelModule, typeof i14.GridModule, typeof i15.DropDownsModule, typeof i16.BrowserModule, typeof i17.BrowserAnimationsModule, typeof i18.InputsModule, typeof i19.UploadsModule, typeof i20.MenusModule, typeof i21.IndicatorsModule], [typeof i1.CategoryTreeComponent, typeof i2.FilesGridComponent]>;
24
26
  static ɵinj: i0.ɵɵInjectorDeclaration<FileStorageModule>;
25
27
  }
26
28
  //# sourceMappingURL=module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/lib/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAyBA,qBAsBa,iBAAiB;yCAAjB,iBAAiB;0CAAjB,iBAAiB;0CAAjB,iBAAiB;CAAG"}
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/lib/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA0BA,qBAwBa,iBAAiB;yCAAjB,iBAAiB;0CAAjB,iBAAiB;0CAAjB,iBAAiB;CAAG"}
@@ -4,12 +4,14 @@ import { NgModule } from '@angular/core';
4
4
  import { BrowserModule } from '@angular/platform-browser';
5
5
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
6
6
  import { ButtonsModule } from '@progress/kendo-angular-buttons';
7
- import { DialogsModule } from "@progress/kendo-angular-dialog";
7
+ import { DialogsModule } from '@progress/kendo-angular-dialog';
8
8
  import { ExcelExportModule } from '@progress/kendo-angular-excel-export';
9
9
  import { GridModule } from '@progress/kendo-angular-grid';
10
10
  import { IconsModule } from '@progress/kendo-angular-icons';
11
+ import { IndicatorsModule } from '@progress/kendo-angular-indicators';
11
12
  import { InputsModule } from '@progress/kendo-angular-inputs';
12
13
  import { LabelModule } from '@progress/kendo-angular-label';
14
+ import { MenusModule } from '@progress/kendo-angular-menu';
13
15
  import { TreeViewModule } from '@progress/kendo-angular-treeview';
14
16
  import { FormsModule } from '@angular/forms';
15
17
  import { CompareRecordsModule } from '@memberjunction/ng-compare-records';
@@ -39,7 +41,9 @@ FileStorageModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [Common
39
41
  BrowserModule,
40
42
  BrowserAnimationsModule,
41
43
  InputsModule,
42
- UploadsModule] });
44
+ UploadsModule,
45
+ MenusModule,
46
+ IndicatorsModule] });
43
47
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FileStorageModule, [{
44
48
  type: NgModule,
45
49
  args: [{
@@ -61,6 +65,8 @@ FileStorageModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [Common
61
65
  BrowserAnimationsModule,
62
66
  InputsModule,
63
67
  UploadsModule,
68
+ MenusModule,
69
+ IndicatorsModule,
64
70
  ],
65
71
  exports: [CategoryTreeComponent, FilesGridComponent],
66
72
  }]
@@ -80,4 +86,6 @@ FileStorageModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [Common
80
86
  BrowserModule,
81
87
  BrowserAnimationsModule,
82
88
  InputsModule,
83
- UploadsModule], exports: [CategoryTreeComponent, FilesGridComponent] }); })();
89
+ UploadsModule,
90
+ MenusModule,
91
+ IndicatorsModule], exports: [CategoryTreeComponent, FilesGridComponent] }); })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-file-storage",
3
- "version": "0.9.9",
3
+ "version": "0.9.12",
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",
@@ -27,14 +27,16 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@memberjunction/core": "^0.9.177",
30
- "@memberjunction/core-entities": "^0.9.167",
30
+ "@memberjunction/core-entities": "^0.9.170",
31
31
  "@memberjunction/global": "^0.9.156",
32
32
  "@memberjunction/ng-container-directives": "^0.9.141",
33
- "@memberjunction/ng-shared": "^0.9.35",
33
+ "@memberjunction/ng-shared": "^0.9.38",
34
34
  "@progress/kendo-angular-buttons": "~15.1.0",
35
35
  "@progress/kendo-angular-dialog": "~15.1.0",
36
36
  "@progress/kendo-angular-dropdowns": "~15.1.0",
37
+ "@progress/kendo-angular-indicators": "~15.1.0",
37
38
  "@progress/kendo-angular-grid": "~15.1.0",
39
+ "@progress/kendo-angular-menu": "~15.1.0",
38
40
  "@progress/kendo-angular-treeview": "~15.1.0",
39
41
  "@progress/kendo-angular-upload": "~15.1.0",
40
42
  "tslib": "^2.3.0",