@memberjunction/ng-file-storage 0.9.3 → 0.9.4
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.
|
@@ -76,7 +76,7 @@ export class FileUploadComponent {
|
|
|
76
76
|
Refresh() {
|
|
77
77
|
return __awaiter(this, void 0, void 0, function* () {
|
|
78
78
|
const rv = new RunView();
|
|
79
|
-
const viewResults = yield rv.RunView({ EntityName: 'File Storage Providers' });
|
|
79
|
+
const viewResults = yield rv.RunView({ EntityName: 'File Storage Providers', ExtraFilter: 'IsActive = 1' });
|
|
80
80
|
const provider = viewResults.Results[0];
|
|
81
81
|
if (typeof (provider === null || provider === void 0 ? void 0 : provider.ID) === 'number') {
|
|
82
82
|
this.defaultProviderID = provider.ID;
|
|
@@ -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;IAIT,aAAa;IAKP,YAAY;IAezB;;;;;;OAMG;IACI,YAAY,SAAgB,UAAU,mBAkB3C;IAEK,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO;IAO9C;;;;;;OAMG;IACI,UAAU,SAAgB,UAAU,
|
|
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;IAIT,aAAa;IAKP,YAAY;IAezB;;;;;;OAMG;IACI,YAAY,SAAgB,UAAU,mBAkB3C;IAEK,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;yCA3GF,kBAAkB;2CAAlB,kBAAkB;CA4H9B"}
|
|
@@ -152,13 +152,15 @@ export class FilesGridComponent {
|
|
|
152
152
|
*/
|
|
153
153
|
this.deleteFile = (file) => __awaiter(this, void 0, void 0, function* () {
|
|
154
154
|
this.isLoading = true;
|
|
155
|
+
const ID = file.ID;
|
|
156
|
+
const Name = file.Name;
|
|
155
157
|
let deleteResult = yield file.Delete();
|
|
156
158
|
if (deleteResult) {
|
|
157
|
-
this.sharedService.CreateSimpleNotification(`Successfully deleted file ${
|
|
158
|
-
this.files = this.files.filter((f) => f.ID !=
|
|
159
|
+
this.sharedService.CreateSimpleNotification(`Successfully deleted file ${ID} ${Name}`, 'info');
|
|
160
|
+
this.files = this.files.filter((f) => f.ID != ID);
|
|
159
161
|
}
|
|
160
162
|
else {
|
|
161
|
-
this.sharedService.CreateSimpleNotification(`Unable to delete file ${
|
|
163
|
+
this.sharedService.CreateSimpleNotification(`Unable to delete file ${ID} ${Name}`, 'error');
|
|
162
164
|
}
|
|
163
165
|
this.isLoading = false;
|
|
164
166
|
});
|
|
@@ -191,7 +193,7 @@ export class FilesGridComponent {
|
|
|
191
193
|
canBeDeleted(file) {
|
|
192
194
|
const status = file.Status;
|
|
193
195
|
const deletable = status === 'Uploaded' || Date.now() - +file.CreatedAt > 10 * 60 * 60;
|
|
194
|
-
console.log({ status, deletable, ID: file.ID, CreatedAt: file.CreatedAt });
|
|
196
|
+
// console.log({ status, deletable, ID: file.ID, CreatedAt: file.CreatedAt });
|
|
195
197
|
return deletable;
|
|
196
198
|
}
|
|
197
199
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-file-storage",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
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,11 +26,11 @@
|
|
|
26
26
|
"@angular/router": "~17.2.2"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@memberjunction/core": "^0.9.
|
|
30
|
-
"@memberjunction/core-entities": "^0.9.
|
|
29
|
+
"@memberjunction/core": "^0.9.175",
|
|
30
|
+
"@memberjunction/core-entities": "^0.9.160",
|
|
31
31
|
"@memberjunction/global": "^0.9.155",
|
|
32
|
-
"@memberjunction/ng-container-directives": "^0.9.
|
|
33
|
-
"@memberjunction/ng-shared": "^0.9.
|
|
32
|
+
"@memberjunction/ng-container-directives": "^0.9.139",
|
|
33
|
+
"@memberjunction/ng-shared": "^0.9.29",
|
|
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",
|