@rs-pk/asset-management 1.0.22 → 1.0.24
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 +6444 -6327
- 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 +164 -152
- package/esm2015/lib/asset-management.module.js +178 -179
- 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 -395
- package/esm2015/lib/components/partial/asset-item/asset-item.component.js +316 -299
- package/esm2015/lib/components/partial/asset-list/asset-list.component.js +285 -273
- package/esm2015/lib/components/partial/asset-management-dialog/asset-management-dialog.component.js +123 -109
- package/esm2015/lib/components/partial/asset-wrapper/asset-wrapper.component.js +119 -100
- 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 -114
- package/esm2015/lib/components/partial/folder-list/folder-list.component.js +81 -69
- package/esm2015/lib/components/partial/node-details/node-details.component.js +417 -403
- 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 +149 -149
- 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 +179 -167
- package/esm5/lib/asset-management.module.js +179 -180
- 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 -437
- package/esm5/lib/components/partial/asset-item/asset-item.component.js +350 -333
- package/esm5/lib/components/partial/asset-list/asset-list.component.js +318 -306
- package/esm5/lib/components/partial/asset-management-dialog/asset-management-dialog.component.js +138 -124
- package/esm5/lib/components/partial/asset-wrapper/asset-wrapper.component.js +137 -115
- 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 -126
- package/esm5/lib/components/partial/folder-list/folder-list.component.js +94 -82
- package/esm5/lib/components/partial/node-details/node-details.component.js +458 -444
- 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 +168 -168
- 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 +5642 -5528
- package/fesm2015/rs-pk-asset-management.js.map +1 -1
- package/fesm5/rs-pk-asset-management.js +6448 -6331
- package/fesm5/rs-pk-asset-management.js.map +1 -1
- package/lib/asset-management.component.d.ts +25 -22
- 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 -60
- package/lib/components/partial/asset-item/asset-item.component.d.ts +40 -37
- package/lib/components/partial/asset-list/asset-list.component.d.ts +27 -24
- package/lib/components/partial/asset-management-dialog/asset-management-dialog.component.d.ts +20 -17
- package/lib/components/partial/asset-wrapper/asset-wrapper.component.d.ts +23 -19
- 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 -14
- package/lib/components/partial/folder-list/folder-list.component.d.ts +14 -11
- package/lib/components/partial/node-details/node-details.component.d.ts +32 -29
- 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 +68 -68
- 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 -1
- 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,146 +1,146 @@
|
|
|
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 { FormBuilder, FormControl, Validators, } from '@angular/forms';
|
|
7
|
-
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
8
|
-
import { Subject } from 'rxjs';
|
|
9
|
-
import { takeUntil } from 'rxjs/operators';
|
|
10
|
-
import { FileService } from '../../../services/file.service';
|
|
11
|
-
/**
|
|
12
|
-
* @record
|
|
13
|
-
*/
|
|
14
|
-
function IData() { }
|
|
15
|
-
if (false) {
|
|
16
|
-
/** @type {?} */
|
|
17
|
-
IData.prototype.currentAssetId;
|
|
18
|
-
}
|
|
19
|
-
export class AddFolderDialogComponent {
|
|
20
|
-
/**
|
|
21
|
-
* @param {?} fb
|
|
22
|
-
* @param {?} data
|
|
23
|
-
* @param {?} dialogRef
|
|
24
|
-
* @param {?} fileService
|
|
25
|
-
*/
|
|
26
|
-
constructor(fb, data, dialogRef, fileService) {
|
|
27
|
-
this.fb = fb;
|
|
28
|
-
this.data = data;
|
|
29
|
-
this.dialogRef = dialogRef;
|
|
30
|
-
this.fileService = fileService;
|
|
31
|
-
this.isLoading = false;
|
|
32
|
-
this.errorMessage = '';
|
|
33
|
-
this.value = '';
|
|
34
|
-
this.destroy$ = new Subject();
|
|
35
|
-
this.form = new FormControl();
|
|
36
|
-
this.formGroup = this.fb.group({
|
|
37
|
-
name: ['', [
|
|
38
|
-
Validators.maxLength(200),
|
|
39
|
-
Validators.required
|
|
40
|
-
]],
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* @return {?}
|
|
45
|
-
*/
|
|
46
|
-
ngOnInit() { }
|
|
47
|
-
/**
|
|
48
|
-
* @return {?}
|
|
49
|
-
*/
|
|
50
|
-
get disabled() {
|
|
51
|
-
const { value: name } = this.formGroup.controls.name;
|
|
52
|
-
return !name || !!this.errorMessage || this.isLoading;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* @param {?} _event
|
|
56
|
-
* @return {?}
|
|
57
|
-
*/
|
|
58
|
-
onChange(_event) {
|
|
59
|
-
this.errorMessage = '';
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* @return {?}
|
|
63
|
-
*/
|
|
64
|
-
addFolder() {
|
|
65
|
-
const { value: name } = this.formGroup.controls.name;
|
|
66
|
-
this.isLoading = true;
|
|
67
|
-
this.fileService
|
|
68
|
-
.addFolder({
|
|
69
|
-
parentAssetId: this.data.currentAssetId,
|
|
70
|
-
folderName: name.trim(),
|
|
71
|
-
})
|
|
72
|
-
.pipe(takeUntil(this.destroy$))
|
|
73
|
-
.subscribe((/**
|
|
74
|
-
* @param {?} _res
|
|
75
|
-
* @return {?}
|
|
76
|
-
*/
|
|
77
|
-
(_res) => this.closeDialog(true)), (/**
|
|
78
|
-
* @param {?} err
|
|
79
|
-
* @return {?}
|
|
80
|
-
*/
|
|
81
|
-
err => {
|
|
82
|
-
this.isLoading = false;
|
|
83
|
-
this.errorMessage = err.ResponseMessage;
|
|
84
|
-
}));
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* @param {?=} res
|
|
88
|
-
* @return {?}
|
|
89
|
-
*/
|
|
90
|
-
closeDialog(res) {
|
|
91
|
-
this.dialogRef.close(res);
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* @return {?}
|
|
95
|
-
*/
|
|
96
|
-
ngOnDestroy() {
|
|
97
|
-
this.destroy$.next(true);
|
|
98
|
-
this.destroy$.complete();
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
AddFolderDialogComponent.decorators = [
|
|
102
|
-
{ type: Component, args: [{
|
|
103
|
-
selector: 'lib-add-folder-dialog',
|
|
104
|
-
template: "<lib-modal heading=\"Add a folder\">\n <ng-container content>\n <form (ngSubmit)=\"addFolder()\" [formGroup]=\"formGroup\" #form=\"ngForm\">\n <input\n (input)=\"onChange($event)\"\n matInput\n placeholder=\"Enter your folder name\"\n autocomplete=\"off\"\n required\n pattern=\".*\\S+.*\"\n formControlName=\"name\"\n />\n <mat-error *ngIf=\"formGroup?.controls?.name?.errors?.pattern\">\n This field does not allow only whitespace\n </mat-error>\n <mat-error *ngIf=\"formGroup?.controls?.name?.errors?.maxlength\">\n The character limit is 200 characters\n </mat-error>\n <mat-error *ngIf=\"errorMessage\">{{ errorMessage }}</mat-error>\n </form>\n </ng-container>\n <ng-container actions>\n <button mat-raised-button mat-dialog-close>Cancel</button>\n <button\n mat-raised-button\n color=\"primary\"\n (click)=\"addFolder()\"\n [class.loading]=\"isLoading\"\n [disabled]=\"disabled || !formGroup?.valid\"\n >\n <ng-container *ngIf=\"isLoading\">\n <mat-spinner [diameter]=\"20\"></mat-spinner>\n </ng-container>\n <span>Add</span>\n </button>\n </ng-container>\n</lib-modal>\n",
|
|
105
|
-
styles: [":host::ng-deep .mat-dialog-title{padding-bottom:0!important}:host::ng-deep form{position:relative}:host::ng-deep form .mat-error{margin-top:0;position:absolute;left:0;bottom:-20px;line-height:15px;font-size:13px}:host::ng-deep .mat-dialog-content{padding-top:24px;padding-bottom:24px}:host::ng-deep .mat-dialog-actions{padding-top:5px}"]
|
|
106
|
-
}] }
|
|
107
|
-
];
|
|
108
|
-
/** @nocollapse */
|
|
109
|
-
AddFolderDialogComponent.ctorParameters = () => [
|
|
110
|
-
{ type: FormBuilder },
|
|
111
|
-
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] },
|
|
112
|
-
{ type: MatDialogRef },
|
|
113
|
-
{ type: FileService }
|
|
114
|
-
];
|
|
115
|
-
if (false) {
|
|
116
|
-
/** @type {?} */
|
|
117
|
-
AddFolderDialogComponent.prototype.isLoading;
|
|
118
|
-
/** @type {?} */
|
|
119
|
-
AddFolderDialogComponent.prototype.errorMessage;
|
|
120
|
-
/** @type {?} */
|
|
121
|
-
AddFolderDialogComponent.prototype.value;
|
|
122
|
-
/**
|
|
123
|
-
* @type {?}
|
|
124
|
-
* @private
|
|
125
|
-
*/
|
|
126
|
-
AddFolderDialogComponent.prototype.destroy$;
|
|
127
|
-
/** @type {?} */
|
|
128
|
-
AddFolderDialogComponent.prototype.formGroup;
|
|
129
|
-
/** @type {?} */
|
|
130
|
-
AddFolderDialogComponent.prototype.form;
|
|
131
|
-
/**
|
|
132
|
-
* @type {?}
|
|
133
|
-
* @private
|
|
134
|
-
*/
|
|
135
|
-
AddFolderDialogComponent.prototype.fb;
|
|
136
|
-
/** @type {?} */
|
|
137
|
-
AddFolderDialogComponent.prototype.data;
|
|
138
|
-
/** @type {?} */
|
|
139
|
-
AddFolderDialogComponent.prototype.dialogRef;
|
|
140
|
-
/**
|
|
141
|
-
* @type {?}
|
|
142
|
-
* @private
|
|
143
|
-
*/
|
|
144
|
-
AddFolderDialogComponent.prototype.fileService;
|
|
145
|
-
}
|
|
146
|
-
//# 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 { FormBuilder, FormControl, Validators, } from '@angular/forms';
|
|
7
|
+
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
8
|
+
import { Subject } from 'rxjs';
|
|
9
|
+
import { takeUntil } from 'rxjs/operators';
|
|
10
|
+
import { FileService } from '../../../services/file.service';
|
|
11
|
+
/**
|
|
12
|
+
* @record
|
|
13
|
+
*/
|
|
14
|
+
function IData() { }
|
|
15
|
+
if (false) {
|
|
16
|
+
/** @type {?} */
|
|
17
|
+
IData.prototype.currentAssetId;
|
|
18
|
+
}
|
|
19
|
+
export class AddFolderDialogComponent {
|
|
20
|
+
/**
|
|
21
|
+
* @param {?} fb
|
|
22
|
+
* @param {?} data
|
|
23
|
+
* @param {?} dialogRef
|
|
24
|
+
* @param {?} fileService
|
|
25
|
+
*/
|
|
26
|
+
constructor(fb, data, dialogRef, fileService) {
|
|
27
|
+
this.fb = fb;
|
|
28
|
+
this.data = data;
|
|
29
|
+
this.dialogRef = dialogRef;
|
|
30
|
+
this.fileService = fileService;
|
|
31
|
+
this.isLoading = false;
|
|
32
|
+
this.errorMessage = '';
|
|
33
|
+
this.value = '';
|
|
34
|
+
this.destroy$ = new Subject();
|
|
35
|
+
this.form = new FormControl();
|
|
36
|
+
this.formGroup = this.fb.group({
|
|
37
|
+
name: ['', [
|
|
38
|
+
Validators.maxLength(200),
|
|
39
|
+
Validators.required
|
|
40
|
+
]],
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @return {?}
|
|
45
|
+
*/
|
|
46
|
+
ngOnInit() { }
|
|
47
|
+
/**
|
|
48
|
+
* @return {?}
|
|
49
|
+
*/
|
|
50
|
+
get disabled() {
|
|
51
|
+
const { value: name } = this.formGroup.controls.name;
|
|
52
|
+
return !name || !!this.errorMessage || this.isLoading;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @param {?} _event
|
|
56
|
+
* @return {?}
|
|
57
|
+
*/
|
|
58
|
+
onChange(_event) {
|
|
59
|
+
this.errorMessage = '';
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* @return {?}
|
|
63
|
+
*/
|
|
64
|
+
addFolder() {
|
|
65
|
+
const { value: name } = this.formGroup.controls.name;
|
|
66
|
+
this.isLoading = true;
|
|
67
|
+
this.fileService
|
|
68
|
+
.addFolder({
|
|
69
|
+
parentAssetId: this.data.currentAssetId,
|
|
70
|
+
folderName: name.trim(),
|
|
71
|
+
})
|
|
72
|
+
.pipe(takeUntil(this.destroy$))
|
|
73
|
+
.subscribe((/**
|
|
74
|
+
* @param {?} _res
|
|
75
|
+
* @return {?}
|
|
76
|
+
*/
|
|
77
|
+
(_res) => this.closeDialog(true)), (/**
|
|
78
|
+
* @param {?} err
|
|
79
|
+
* @return {?}
|
|
80
|
+
*/
|
|
81
|
+
err => {
|
|
82
|
+
this.isLoading = false;
|
|
83
|
+
this.errorMessage = err.ResponseMessage;
|
|
84
|
+
}));
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* @param {?=} res
|
|
88
|
+
* @return {?}
|
|
89
|
+
*/
|
|
90
|
+
closeDialog(res) {
|
|
91
|
+
this.dialogRef.close(res);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* @return {?}
|
|
95
|
+
*/
|
|
96
|
+
ngOnDestroy() {
|
|
97
|
+
this.destroy$.next(true);
|
|
98
|
+
this.destroy$.complete();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
AddFolderDialogComponent.decorators = [
|
|
102
|
+
{ type: Component, args: [{
|
|
103
|
+
selector: 'lib-add-folder-dialog',
|
|
104
|
+
template: "<lib-modal heading=\"Add a folder\">\r\n <ng-container content>\r\n <form (ngSubmit)=\"addFolder()\" [formGroup]=\"formGroup\" #form=\"ngForm\">\r\n <input\r\n (input)=\"onChange($event)\"\r\n matInput\r\n placeholder=\"Enter your folder name\"\r\n autocomplete=\"off\"\r\n required\r\n pattern=\".*\\S+.*\"\r\n formControlName=\"name\"\r\n />\r\n <mat-error *ngIf=\"formGroup?.controls?.name?.errors?.pattern\">\r\n This field does not allow only whitespace\r\n </mat-error>\r\n <mat-error *ngIf=\"formGroup?.controls?.name?.errors?.maxlength\">\r\n The character limit is 200 characters\r\n </mat-error>\r\n <mat-error *ngIf=\"errorMessage\">{{ errorMessage }}</mat-error>\r\n </form>\r\n </ng-container>\r\n <ng-container actions>\r\n <button mat-raised-button mat-dialog-close>Cancel</button>\r\n <button\r\n mat-raised-button\r\n color=\"primary\"\r\n (click)=\"addFolder()\"\r\n [class.loading]=\"isLoading\"\r\n [disabled]=\"disabled || !formGroup?.valid\"\r\n >\r\n <ng-container *ngIf=\"isLoading\">\r\n <mat-spinner [diameter]=\"20\"></mat-spinner>\r\n </ng-container>\r\n <span>Add</span>\r\n </button>\r\n </ng-container>\r\n</lib-modal>\r\n",
|
|
105
|
+
styles: [":host::ng-deep .mat-dialog-title{padding-bottom:0!important}:host::ng-deep form{position:relative}:host::ng-deep form .mat-error{margin-top:0;position:absolute;left:0;bottom:-20px;line-height:15px;font-size:13px}:host::ng-deep .mat-dialog-content{padding-top:24px;padding-bottom:24px}:host::ng-deep .mat-dialog-actions{padding-top:5px}"]
|
|
106
|
+
}] }
|
|
107
|
+
];
|
|
108
|
+
/** @nocollapse */
|
|
109
|
+
AddFolderDialogComponent.ctorParameters = () => [
|
|
110
|
+
{ type: FormBuilder },
|
|
111
|
+
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] },
|
|
112
|
+
{ type: MatDialogRef },
|
|
113
|
+
{ type: FileService }
|
|
114
|
+
];
|
|
115
|
+
if (false) {
|
|
116
|
+
/** @type {?} */
|
|
117
|
+
AddFolderDialogComponent.prototype.isLoading;
|
|
118
|
+
/** @type {?} */
|
|
119
|
+
AddFolderDialogComponent.prototype.errorMessage;
|
|
120
|
+
/** @type {?} */
|
|
121
|
+
AddFolderDialogComponent.prototype.value;
|
|
122
|
+
/**
|
|
123
|
+
* @type {?}
|
|
124
|
+
* @private
|
|
125
|
+
*/
|
|
126
|
+
AddFolderDialogComponent.prototype.destroy$;
|
|
127
|
+
/** @type {?} */
|
|
128
|
+
AddFolderDialogComponent.prototype.formGroup;
|
|
129
|
+
/** @type {?} */
|
|
130
|
+
AddFolderDialogComponent.prototype.form;
|
|
131
|
+
/**
|
|
132
|
+
* @type {?}
|
|
133
|
+
* @private
|
|
134
|
+
*/
|
|
135
|
+
AddFolderDialogComponent.prototype.fb;
|
|
136
|
+
/** @type {?} */
|
|
137
|
+
AddFolderDialogComponent.prototype.data;
|
|
138
|
+
/** @type {?} */
|
|
139
|
+
AddFolderDialogComponent.prototype.dialogRef;
|
|
140
|
+
/**
|
|
141
|
+
* @type {?}
|
|
142
|
+
* @private
|
|
143
|
+
*/
|
|
144
|
+
AddFolderDialogComponent.prototype.fileService;
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkLWZvbGRlci1kaWFsb2cuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vQHJzLXBrL2Fzc2V0LW1hbmFnZW1lbnQvIiwic291cmNlcyI6WyJsaWIvY29tcG9uZW50cy9wYXJ0aWFsL2FkZC1mb2xkZXItZGlhbG9nL2FkZC1mb2xkZXItZGlhbG9nLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLEVBQXFCLE1BQU0sZUFBZSxDQUFDO0FBQ3JFLE9BQU8sRUFDTCxXQUFXLEVBQ1gsV0FBVyxFQUVYLFVBQVUsR0FDWCxNQUFNLGdCQUFnQixDQUFDO0FBQ3hCLE9BQU8sRUFBRSxZQUFZLEVBQUUsZUFBZSxFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFDekUsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUMvQixPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFFM0MsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLGdDQUFnQyxDQUFDOzs7O0FBRTdELG9CQUVDOzs7SUFEQywrQkFBdUI7O0FBUXpCLE1BQU0sT0FBTyx3QkFBd0I7Ozs7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