@rs-pk/asset-management 1.0.25 → 1.0.26
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/README.md +24 -24
- package/bundles/rs-pk-asset-management.umd.js +6436 -6436
- package/bundles/rs-pk-asset-management.umd.js.map +1 -1
- package/bundles/rs-pk-asset-management.umd.min.js +2 -2
- package/bundles/rs-pk-asset-management.umd.min.js.map +1 -1
- package/esm2015/lib/asset-management.component.js +169 -169
- package/esm2015/lib/asset-management.module.js +178 -178
- package/esm2015/lib/asset-management.service.js +45 -45
- package/esm2015/lib/components/partial/add-folder-dialog/add-folder-dialog.component.js +146 -146
- package/esm2015/lib/components/partial/asset-dialog/asset-dialog.component.js +398 -398
- package/esm2015/lib/components/partial/asset-item/asset-item.component.js +316 -316
- package/esm2015/lib/components/partial/asset-list/asset-list.component.js +285 -285
- package/esm2015/lib/components/partial/asset-management-dialog/asset-management-dialog.component.js +110 -110
- package/esm2015/lib/components/partial/asset-wrapper/asset-wrapper.component.js +119 -119
- package/esm2015/lib/components/partial/breadcrumb/breadcrumb.component.js +121 -121
- package/esm2015/lib/components/partial/delete-dialog/delete-dialog.component.js +139 -139
- package/esm2015/lib/components/partial/edit-folder-dialog/edit-folder-dialog.component.js +151 -151
- package/esm2015/lib/components/partial/file-item/file-item.component.js +181 -181
- package/esm2015/lib/components/partial/file-list/file-list.component.js +73 -73
- package/esm2015/lib/components/partial/folder-item/folder-item.component.js +126 -126
- package/esm2015/lib/components/partial/folder-list/folder-list.component.js +81 -81
- package/esm2015/lib/components/partial/node-details/node-details.component.js +417 -417
- package/esm2015/lib/components/partial/node-tree/node-tree.component.js +330 -330
- package/esm2015/lib/components/partial/search-box/search-box.component.js +158 -158
- package/esm2015/lib/components/partial/sort-items/sort-items.component.js +99 -99
- package/esm2015/lib/components/partial/upload-dialog/upload-dialog.component.js +141 -141
- package/esm2015/lib/components/partial/upload-file/upload-file.component.js +85 -85
- package/esm2015/lib/components/ui/drag-to-resize/drag-to-resize.component.js +96 -96
- package/esm2015/lib/components/ui/input-file/input-file.component.js +49 -49
- package/esm2015/lib/components/ui/modal/modal.component.js +34 -34
- package/esm2015/lib/components/ui/search-not-found/search-not-found.component.js +41 -41
- package/esm2015/lib/configs/admin.config.js +22 -22
- package/esm2015/lib/contanst/data-image.js +20 -20
- package/esm2015/lib/contanst/index.js +6 -6
- package/esm2015/lib/datasources/index.js +6 -6
- package/esm2015/lib/datasources/node-tree.datasource.js +179 -179
- package/esm2015/lib/directives/dialogTrigger.directive.js +47 -47
- package/esm2015/lib/directives/directives.module.js +20 -20
- package/esm2015/lib/directives/dnd.directive.js +57 -57
- package/esm2015/lib/models/asset-file.model.js +57 -57
- package/esm2015/lib/models/asset.model.js +151 -151
- package/esm2015/lib/models/file-type.enum.js +11 -11
- package/esm2015/lib/models/file.model.js +91 -91
- package/esm2015/lib/models/index.js +12 -12
- package/esm2015/lib/models/node-tree.model.js +32 -32
- package/esm2015/lib/models/sort.enum.js +23 -23
- package/esm2015/lib/pipes/datetime.pipe.js +79 -79
- package/esm2015/lib/pipes/file-size.pipe.js +54 -54
- package/esm2015/lib/services/asset.service.js +229 -229
- package/esm2015/lib/services/base.service.js +49 -49
- package/esm2015/lib/services/env-config.service.js +18 -18
- package/esm2015/lib/services/file.service.js +106 -106
- package/esm2015/lib/services/index.js +11 -11
- package/esm2015/lib/services/node-tree.service.js +212 -212
- package/esm2015/lib/services/upload-assets.service.js +178 -178
- package/esm2015/lib/store/actions.action.js +125 -125
- package/esm2015/lib/store/index.js +7 -7
- package/esm2015/lib/store/reducer.js +115 -115
- package/esm2015/public-api.js +34 -34
- package/esm2015/rs-pk-asset-management.js +16 -16
- package/esm5/lib/asset-management.component.js +184 -184
- package/esm5/lib/asset-management.module.js +179 -179
- package/esm5/lib/asset-management.service.js +54 -54
- package/esm5/lib/components/partial/add-folder-dialog/add-folder-dialog.component.js +164 -164
- package/esm5/lib/components/partial/asset-dialog/asset-dialog.component.js +440 -440
- package/esm5/lib/components/partial/asset-item/asset-item.component.js +350 -350
- package/esm5/lib/components/partial/asset-list/asset-list.component.js +318 -318
- package/esm5/lib/components/partial/asset-management-dialog/asset-management-dialog.component.js +125 -125
- package/esm5/lib/components/partial/asset-wrapper/asset-wrapper.component.js +137 -137
- package/esm5/lib/components/partial/breadcrumb/breadcrumb.component.js +143 -143
- package/esm5/lib/components/partial/delete-dialog/delete-dialog.component.js +154 -154
- package/esm5/lib/components/partial/edit-folder-dialog/edit-folder-dialog.component.js +169 -169
- package/esm5/lib/components/partial/file-item/file-item.component.js +206 -206
- package/esm5/lib/components/partial/file-list/file-list.component.js +93 -93
- package/esm5/lib/components/partial/folder-item/folder-item.component.js +138 -138
- package/esm5/lib/components/partial/folder-list/folder-list.component.js +94 -94
- package/esm5/lib/components/partial/node-details/node-details.component.js +458 -458
- package/esm5/lib/components/partial/node-tree/node-tree.component.js +413 -413
- package/esm5/lib/components/partial/search-box/search-box.component.js +184 -184
- package/esm5/lib/components/partial/sort-items/sort-items.component.js +107 -107
- package/esm5/lib/components/partial/upload-dialog/upload-dialog.component.js +156 -156
- package/esm5/lib/components/partial/upload-file/upload-file.component.js +102 -102
- package/esm5/lib/components/ui/drag-to-resize/drag-to-resize.component.js +117 -117
- package/esm5/lib/components/ui/input-file/input-file.component.js +55 -55
- package/esm5/lib/components/ui/modal/modal.component.js +39 -39
- package/esm5/lib/components/ui/search-not-found/search-not-found.component.js +43 -43
- package/esm5/lib/configs/admin.config.js +22 -22
- package/esm5/lib/contanst/data-image.js +20 -20
- package/esm5/lib/contanst/index.js +6 -6
- package/esm5/lib/datasources/index.js +6 -6
- package/esm5/lib/datasources/node-tree.datasource.js +239 -239
- package/esm5/lib/directives/dialogTrigger.directive.js +53 -53
- package/esm5/lib/directives/directives.module.js +25 -25
- package/esm5/lib/directives/dnd.directive.js +80 -80
- package/esm5/lib/models/asset-file.model.js +69 -69
- package/esm5/lib/models/asset.model.js +170 -170
- package/esm5/lib/models/file-type.enum.js +11 -11
- package/esm5/lib/models/file.model.js +99 -99
- package/esm5/lib/models/index.js +12 -12
- package/esm5/lib/models/node-tree.model.js +37 -37
- package/esm5/lib/models/sort.enum.js +23 -23
- package/esm5/lib/pipes/datetime.pipe.js +83 -83
- package/esm5/lib/pipes/file-size.pipe.js +63 -63
- package/esm5/lib/services/asset.service.js +279 -279
- package/esm5/lib/services/base.service.js +57 -57
- package/esm5/lib/services/env-config.service.js +18 -18
- package/esm5/lib/services/file.service.js +127 -127
- package/esm5/lib/services/index.js +11 -11
- package/esm5/lib/services/node-tree.service.js +278 -278
- package/esm5/lib/services/upload-assets.service.js +207 -207
- package/esm5/lib/store/actions.action.js +143 -143
- package/esm5/lib/store/index.js +7 -7
- package/esm5/lib/store/reducer.js +116 -116
- package/esm5/public-api.js +34 -34
- package/esm5/rs-pk-asset-management.js +16 -16
- package/fesm2015/rs-pk-asset-management.js +5635 -5635
- package/fesm2015/rs-pk-asset-management.js.map +1 -1
- package/fesm5/rs-pk-asset-management.js +6441 -6441
- package/fesm5/rs-pk-asset-management.js.map +1 -1
- package/lib/asset-management.component.d.ts +25 -25
- package/lib/asset-management.module.d.ts +5 -5
- package/lib/asset-management.service.d.ts +7 -7
- package/lib/components/partial/add-folder-dialog/add-folder-dialog.component.d.ts +27 -27
- package/lib/components/partial/asset-dialog/asset-dialog.component.d.ts +65 -65
- package/lib/components/partial/asset-item/asset-item.component.d.ts +40 -40
- package/lib/components/partial/asset-list/asset-list.component.d.ts +27 -27
- package/lib/components/partial/asset-management-dialog/asset-management-dialog.component.d.ts +17 -17
- package/lib/components/partial/asset-wrapper/asset-wrapper.component.d.ts +23 -23
- package/lib/components/partial/breadcrumb/breadcrumb.component.d.ts +18 -18
- package/lib/components/partial/delete-dialog/delete-dialog.component.d.ts +24 -24
- package/lib/components/partial/edit-folder-dialog/edit-folder-dialog.component.d.ts +28 -28
- package/lib/components/partial/file-item/file-item.component.d.ts +36 -36
- package/lib/components/partial/file-list/file-list.component.d.ts +15 -15
- package/lib/components/partial/folder-item/folder-item.component.d.ts +17 -17
- package/lib/components/partial/folder-list/folder-list.component.d.ts +14 -14
- package/lib/components/partial/node-details/node-details.component.d.ts +32 -32
- package/lib/components/partial/node-tree/node-tree.component.d.ts +34 -34
- package/lib/components/partial/search-box/search-box.component.d.ts +18 -18
- package/lib/components/partial/sort-items/sort-items.component.d.ts +21 -21
- package/lib/components/partial/upload-dialog/upload-dialog.component.d.ts +25 -25
- package/lib/components/partial/upload-file/upload-file.component.d.ts +16 -16
- package/lib/components/ui/drag-to-resize/drag-to-resize.component.d.ts +15 -15
- package/lib/components/ui/input-file/input-file.component.d.ts +9 -9
- package/lib/components/ui/modal/modal.component.d.ts +7 -7
- package/lib/components/ui/search-not-found/search-not-found.component.d.ts +8 -8
- package/lib/configs/admin.config.d.ts +3 -3
- package/lib/contanst/data-image.d.ts +6 -6
- package/lib/contanst/index.d.ts +1 -1
- package/lib/datasources/index.d.ts +1 -1
- package/lib/datasources/node-tree.datasource.d.ts +24 -24
- package/lib/directives/dialogTrigger.directive.d.ts +7 -7
- package/lib/directives/directives.module.d.ts +5 -5
- package/lib/directives/dnd.directive.d.ts +7 -7
- package/lib/models/asset-file.model.d.ts +26 -26
- package/lib/models/asset.model.d.ts +73 -73
- package/lib/models/file-type.enum.d.ts +4 -4
- package/lib/models/file.model.d.ts +41 -41
- package/lib/models/index.d.ts +7 -7
- package/lib/models/node-tree.model.d.ts +9 -9
- package/lib/models/sort.enum.d.ts +9 -9
- package/lib/pipes/datetime.pipe.d.ts +13 -13
- package/lib/pipes/file-size.pipe.d.ts +5 -5
- package/lib/services/asset.service.d.ts +36 -36
- package/lib/services/base.service.d.ts +20 -20
- package/lib/services/env-config.service.d.ts +7 -7
- package/lib/services/file.service.d.ts +13 -13
- package/lib/services/index.d.ts +6 -6
- package/lib/services/node-tree.service.d.ts +24 -24
- package/lib/services/upload-assets.service.d.ts +34 -34
- package/lib/store/actions.action.d.ts +51 -51
- package/lib/store/index.d.ts +2 -2
- package/lib/store/reducer.d.ts +18 -18
- package/package.json +1 -2
- package/public-api.d.ts +26 -26
- package/rs-pk-asset-management.d.ts +12 -12
- package/rs-pk-asset-management.metadata.json +1 -1
|
@@ -1,154 +1,154 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview added by tsickle
|
|
3
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
|
-
*/
|
|
5
|
-
import { Component, Inject } from '@angular/core';
|
|
6
|
-
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
7
|
-
import { takeUntil } from 'rxjs/operators';
|
|
8
|
-
import { Subject } from 'rxjs';
|
|
9
|
-
import { FileService } from '../../../services/file.service';
|
|
10
|
-
import { AssetService } from '../../../services/asset.service';
|
|
11
|
-
/**
|
|
12
|
-
* @record
|
|
13
|
-
*/
|
|
14
|
-
function IData() { }
|
|
15
|
-
if (false) {
|
|
16
|
-
/** @type {?} */
|
|
17
|
-
IData.prototype.type;
|
|
18
|
-
/** @type {?} */
|
|
19
|
-
IData.prototype.ids;
|
|
20
|
-
/** @type {?|undefined} */
|
|
21
|
-
IData.prototype.name;
|
|
22
|
-
}
|
|
23
|
-
var DeleteDialogComponent = /** @class */ (function () {
|
|
24
|
-
function DeleteDialogComponent(data, dialogRef, fileService, assetService) {
|
|
25
|
-
this.data = data;
|
|
26
|
-
this.dialogRef = dialogRef;
|
|
27
|
-
this.fileService = fileService;
|
|
28
|
-
this.assetService = assetService;
|
|
29
|
-
this.isLoading = false;
|
|
30
|
-
this.destroy$ = new Subject();
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* @return {?}
|
|
34
|
-
*/
|
|
35
|
-
DeleteDialogComponent.prototype.ngOnInit = /**
|
|
36
|
-
* @return {?}
|
|
37
|
-
*/
|
|
38
|
-
function () { };
|
|
39
|
-
/**
|
|
40
|
-
* @return {?}
|
|
41
|
-
*/
|
|
42
|
-
DeleteDialogComponent.prototype.delete = /**
|
|
43
|
-
* @return {?}
|
|
44
|
-
*/
|
|
45
|
-
function () {
|
|
46
|
-
var _this = this;
|
|
47
|
-
this.isLoading = true;
|
|
48
|
-
this.fileService
|
|
49
|
-
.deleteFile(this.data.ids)
|
|
50
|
-
.pipe(takeUntil(this.destroy$))
|
|
51
|
-
.subscribe((/**
|
|
52
|
-
* @param {?} _res
|
|
53
|
-
* @return {?}
|
|
54
|
-
*/
|
|
55
|
-
function (_res) {
|
|
56
|
-
_this.handleAssetPaging();
|
|
57
|
-
_this.isLoading = false;
|
|
58
|
-
_this.closeDialog(true);
|
|
59
|
-
}), (/**
|
|
60
|
-
* @param {?} _err
|
|
61
|
-
* @return {?}
|
|
62
|
-
*/
|
|
63
|
-
function (_err) {
|
|
64
|
-
_this.isLoading = false;
|
|
65
|
-
console.log('deleted fail', _err);
|
|
66
|
-
}));
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* @private
|
|
70
|
-
* @return {?}
|
|
71
|
-
*/
|
|
72
|
-
DeleteDialogComponent.prototype.handleAssetPaging = /**
|
|
73
|
-
* @private
|
|
74
|
-
* @return {?}
|
|
75
|
-
*/
|
|
76
|
-
function () {
|
|
77
|
-
var _this = this;
|
|
78
|
-
this.assetService
|
|
79
|
-
.getAssetList()
|
|
80
|
-
.pipe(takeUntil(this.destroy$))
|
|
81
|
-
.subscribe((/**
|
|
82
|
-
* @param {?} assets
|
|
83
|
-
* @return {?}
|
|
84
|
-
*/
|
|
85
|
-
function (assets) {
|
|
86
|
-
if (assets &&
|
|
87
|
-
assets.length === _this.data.ids.length &&
|
|
88
|
-
_this.assetService.pageIndex > 0) {
|
|
89
|
-
_this.assetService.pageIndex--;
|
|
90
|
-
}
|
|
91
|
-
}));
|
|
92
|
-
};
|
|
93
|
-
/**
|
|
94
|
-
* @param {?=} res
|
|
95
|
-
* @return {?}
|
|
96
|
-
*/
|
|
97
|
-
DeleteDialogComponent.prototype.closeDialog = /**
|
|
98
|
-
* @param {?=} res
|
|
99
|
-
* @return {?}
|
|
100
|
-
*/
|
|
101
|
-
function (res) {
|
|
102
|
-
this.dialogRef.close(res);
|
|
103
|
-
};
|
|
104
|
-
/**
|
|
105
|
-
* @return {?}
|
|
106
|
-
*/
|
|
107
|
-
DeleteDialogComponent.prototype.ngOnDestroy = /**
|
|
108
|
-
* @return {?}
|
|
109
|
-
*/
|
|
110
|
-
function () {
|
|
111
|
-
this.destroy$.next(true);
|
|
112
|
-
this.destroy$.complete();
|
|
113
|
-
};
|
|
114
|
-
DeleteDialogComponent.decorators = [
|
|
115
|
-
{ type: Component, args: [{
|
|
116
|
-
selector: 'lib-delete-dialog',
|
|
117
|
-
template: "<ng-container *ngIf=\"data?.type === 'folder'\">\
|
|
118
|
-
styles: [""]
|
|
119
|
-
}] }
|
|
120
|
-
];
|
|
121
|
-
/** @nocollapse */
|
|
122
|
-
DeleteDialogComponent.ctorParameters = function () { return [
|
|
123
|
-
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] },
|
|
124
|
-
{ type: MatDialogRef },
|
|
125
|
-
{ type: FileService },
|
|
126
|
-
{ type: AssetService }
|
|
127
|
-
]; };
|
|
128
|
-
return DeleteDialogComponent;
|
|
129
|
-
}());
|
|
130
|
-
export { DeleteDialogComponent };
|
|
131
|
-
if (false) {
|
|
132
|
-
/** @type {?} */
|
|
133
|
-
DeleteDialogComponent.prototype.isLoading;
|
|
134
|
-
/**
|
|
135
|
-
* @type {?}
|
|
136
|
-
* @private
|
|
137
|
-
*/
|
|
138
|
-
DeleteDialogComponent.prototype.destroy$;
|
|
139
|
-
/** @type {?} */
|
|
140
|
-
DeleteDialogComponent.prototype.data;
|
|
141
|
-
/** @type {?} */
|
|
142
|
-
DeleteDialogComponent.prototype.dialogRef;
|
|
143
|
-
/**
|
|
144
|
-
* @type {?}
|
|
145
|
-
* @private
|
|
146
|
-
*/
|
|
147
|
-
DeleteDialogComponent.prototype.fileService;
|
|
148
|
-
/**
|
|
149
|
-
* @type {?}
|
|
150
|
-
* @private
|
|
151
|
-
*/
|
|
152
|
-
DeleteDialogComponent.prototype.assetService;
|
|
153
|
-
}
|
|
154
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview added by tsickle
|
|
3
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
|
+
*/
|
|
5
|
+
import { Component, Inject } from '@angular/core';
|
|
6
|
+
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
7
|
+
import { takeUntil } from 'rxjs/operators';
|
|
8
|
+
import { Subject } from 'rxjs';
|
|
9
|
+
import { FileService } from '../../../services/file.service';
|
|
10
|
+
import { AssetService } from '../../../services/asset.service';
|
|
11
|
+
/**
|
|
12
|
+
* @record
|
|
13
|
+
*/
|
|
14
|
+
function IData() { }
|
|
15
|
+
if (false) {
|
|
16
|
+
/** @type {?} */
|
|
17
|
+
IData.prototype.type;
|
|
18
|
+
/** @type {?} */
|
|
19
|
+
IData.prototype.ids;
|
|
20
|
+
/** @type {?|undefined} */
|
|
21
|
+
IData.prototype.name;
|
|
22
|
+
}
|
|
23
|
+
var DeleteDialogComponent = /** @class */ (function () {
|
|
24
|
+
function DeleteDialogComponent(data, dialogRef, fileService, assetService) {
|
|
25
|
+
this.data = data;
|
|
26
|
+
this.dialogRef = dialogRef;
|
|
27
|
+
this.fileService = fileService;
|
|
28
|
+
this.assetService = assetService;
|
|
29
|
+
this.isLoading = false;
|
|
30
|
+
this.destroy$ = new Subject();
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @return {?}
|
|
34
|
+
*/
|
|
35
|
+
DeleteDialogComponent.prototype.ngOnInit = /**
|
|
36
|
+
* @return {?}
|
|
37
|
+
*/
|
|
38
|
+
function () { };
|
|
39
|
+
/**
|
|
40
|
+
* @return {?}
|
|
41
|
+
*/
|
|
42
|
+
DeleteDialogComponent.prototype.delete = /**
|
|
43
|
+
* @return {?}
|
|
44
|
+
*/
|
|
45
|
+
function () {
|
|
46
|
+
var _this = this;
|
|
47
|
+
this.isLoading = true;
|
|
48
|
+
this.fileService
|
|
49
|
+
.deleteFile(this.data.ids)
|
|
50
|
+
.pipe(takeUntil(this.destroy$))
|
|
51
|
+
.subscribe((/**
|
|
52
|
+
* @param {?} _res
|
|
53
|
+
* @return {?}
|
|
54
|
+
*/
|
|
55
|
+
function (_res) {
|
|
56
|
+
_this.handleAssetPaging();
|
|
57
|
+
_this.isLoading = false;
|
|
58
|
+
_this.closeDialog(true);
|
|
59
|
+
}), (/**
|
|
60
|
+
* @param {?} _err
|
|
61
|
+
* @return {?}
|
|
62
|
+
*/
|
|
63
|
+
function (_err) {
|
|
64
|
+
_this.isLoading = false;
|
|
65
|
+
console.log('deleted fail', _err);
|
|
66
|
+
}));
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* @private
|
|
70
|
+
* @return {?}
|
|
71
|
+
*/
|
|
72
|
+
DeleteDialogComponent.prototype.handleAssetPaging = /**
|
|
73
|
+
* @private
|
|
74
|
+
* @return {?}
|
|
75
|
+
*/
|
|
76
|
+
function () {
|
|
77
|
+
var _this = this;
|
|
78
|
+
this.assetService
|
|
79
|
+
.getAssetList()
|
|
80
|
+
.pipe(takeUntil(this.destroy$))
|
|
81
|
+
.subscribe((/**
|
|
82
|
+
* @param {?} assets
|
|
83
|
+
* @return {?}
|
|
84
|
+
*/
|
|
85
|
+
function (assets) {
|
|
86
|
+
if (assets &&
|
|
87
|
+
assets.length === _this.data.ids.length &&
|
|
88
|
+
_this.assetService.pageIndex > 0) {
|
|
89
|
+
_this.assetService.pageIndex--;
|
|
90
|
+
}
|
|
91
|
+
}));
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* @param {?=} res
|
|
95
|
+
* @return {?}
|
|
96
|
+
*/
|
|
97
|
+
DeleteDialogComponent.prototype.closeDialog = /**
|
|
98
|
+
* @param {?=} res
|
|
99
|
+
* @return {?}
|
|
100
|
+
*/
|
|
101
|
+
function (res) {
|
|
102
|
+
this.dialogRef.close(res);
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* @return {?}
|
|
106
|
+
*/
|
|
107
|
+
DeleteDialogComponent.prototype.ngOnDestroy = /**
|
|
108
|
+
* @return {?}
|
|
109
|
+
*/
|
|
110
|
+
function () {
|
|
111
|
+
this.destroy$.next(true);
|
|
112
|
+
this.destroy$.complete();
|
|
113
|
+
};
|
|
114
|
+
DeleteDialogComponent.decorators = [
|
|
115
|
+
{ type: Component, args: [{
|
|
116
|
+
selector: 'lib-delete-dialog',
|
|
117
|
+
template: "<ng-container *ngIf=\"data?.type === 'folder'\">\n <lib-modal heading=\"Delete folder\">\n <ng-container content>\n <div>\n Are you sure you want to delete folder{{ ' ' }}\n <strong class=\"file__name\">{{ data.name }}</strong\n >?\n </div>\n </ng-container>\n <ng-container actions *ngTemplateOutlet=\"deleteAction\"></ng-container>\n </lib-modal>\n</ng-container>\n\n<ng-container *ngIf=\"data?.type === 'file'\">\n <lib-modal heading=\"Delete file\">\n <ng-container content>\n <div>\n Are you sure you want to delete file{{ ' ' }}\n <strong class=\"file__name\">{{ ' ' }}{{ data.name }}</strong\n >?\n </div>\n </ng-container>\n <ng-container actions *ngTemplateOutlet=\"deleteAction\"></ng-container>\n </lib-modal>\n</ng-container>\n\n<ng-container *ngIf=\"data?.type === 'files'\">\n <lib-modal heading=\"Delete files\">\n <ng-container content>\n <div>\n Are you sure you want to delete\n <strong *ngIf=\"data?.ids?.length > 1; else singular\"\n >{{ data?.ids?.length }} files</strong\n >\n <ng-template #singular>\n <strong>{{ data?.ids?.length }} file</strong> </ng-template\n >?\n </div>\n </ng-container>\n <ng-container actions *ngTemplateOutlet=\"deleteAction\"></ng-container>\n </lib-modal>\n</ng-container>\n\n<ng-template #deleteAction>\n <button mat-raised-button mat-dialog-close>No</button>\n <button\n mat-raised-button\n color=\"warn\"\n (click)=\"delete()\"\n class=\"file__button delete__action\"\n [class.loading]=\"isLoading\"\n [disabled]=\"isLoading\"\n >\n <ng-container *ngIf=\"isLoading\">\n <mat-spinner [diameter]=\"20\"></mat-spinner>\n </ng-container>\n <span>Yes</span>\n </button>\n</ng-template>\n",
|
|
118
|
+
styles: [""]
|
|
119
|
+
}] }
|
|
120
|
+
];
|
|
121
|
+
/** @nocollapse */
|
|
122
|
+
DeleteDialogComponent.ctorParameters = function () { return [
|
|
123
|
+
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] },
|
|
124
|
+
{ type: MatDialogRef },
|
|
125
|
+
{ type: FileService },
|
|
126
|
+
{ type: AssetService }
|
|
127
|
+
]; };
|
|
128
|
+
return DeleteDialogComponent;
|
|
129
|
+
}());
|
|
130
|
+
export { DeleteDialogComponent };
|
|
131
|
+
if (false) {
|
|
132
|
+
/** @type {?} */
|
|
133
|
+
DeleteDialogComponent.prototype.isLoading;
|
|
134
|
+
/**
|
|
135
|
+
* @type {?}
|
|
136
|
+
* @private
|
|
137
|
+
*/
|
|
138
|
+
DeleteDialogComponent.prototype.destroy$;
|
|
139
|
+
/** @type {?} */
|
|
140
|
+
DeleteDialogComponent.prototype.data;
|
|
141
|
+
/** @type {?} */
|
|
142
|
+
DeleteDialogComponent.prototype.dialogRef;
|
|
143
|
+
/**
|
|
144
|
+
* @type {?}
|
|
145
|
+
* @private
|
|
146
|
+
*/
|
|
147
|
+
DeleteDialogComponent.prototype.fileService;
|
|
148
|
+
/**
|
|
149
|
+
* @type {?}
|
|
150
|
+
* @private
|
|
151
|
+
*/
|
|
152
|
+
DeleteDialogComponent.prototype.assetService;
|
|
153
|
+
}
|
|
154
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVsZXRlLWRpYWxvZy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AcnMtcGsvYXNzZXQtbWFuYWd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