@rs-pk/asset-management 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/bundles/rs-pk-asset-management.umd.js +6474 -0
- package/bundles/rs-pk-asset-management.umd.js.map +1 -0
- package/bundles/rs-pk-asset-management.umd.min.js +16 -0
- package/bundles/rs-pk-asset-management.umd.min.js.map +1 -0
- package/esm2015/lib/asset-management.component.js +147 -0
- package/esm2015/lib/asset-management.module.js +179 -0
- package/esm2015/lib/asset-management.service.js +45 -0
- package/esm2015/lib/components/partial/add-folder-dialog/add-folder-dialog.component.js +143 -0
- package/esm2015/lib/components/partial/asset-dialog/asset-dialog.component.js +373 -0
- package/esm2015/lib/components/partial/asset-item/asset-item.component.js +165 -0
- package/esm2015/lib/components/partial/asset-list/asset-list.component.js +239 -0
- package/esm2015/lib/components/partial/asset-management-dialog/asset-management-dialog.component.js +108 -0
- package/esm2015/lib/components/partial/asset-wrapper/asset-wrapper.component.js +100 -0
- package/esm2015/lib/components/partial/breadcrumb/breadcrumb.component.js +115 -0
- package/esm2015/lib/components/partial/delete-dialog/delete-dialog.component.js +139 -0
- package/esm2015/lib/components/partial/edit-folder-dialog/edit-folder-dialog.component.js +148 -0
- package/esm2015/lib/components/partial/file-item/file-item.component.js +136 -0
- package/esm2015/lib/components/partial/file-list/file-list.component.js +72 -0
- package/esm2015/lib/components/partial/folder-item/folder-item.component.js +114 -0
- package/esm2015/lib/components/partial/folder-list/folder-list.component.js +69 -0
- package/esm2015/lib/components/partial/node-details/node-details.component.js +402 -0
- package/esm2015/lib/components/partial/node-tree/node-tree.component.js +330 -0
- package/esm2015/lib/components/partial/search-box/search-box.component.js +158 -0
- package/esm2015/lib/components/partial/sort-items/sort-items.component.js +99 -0
- package/esm2015/lib/components/partial/upload-dialog/upload-dialog.component.js +136 -0
- package/esm2015/lib/components/partial/upload-file/upload-file.component.js +102 -0
- package/esm2015/lib/components/ui/drag-to-resize/drag-to-resize.component.js +96 -0
- package/esm2015/lib/components/ui/input-file/input-file.component.js +49 -0
- package/esm2015/lib/components/ui/modal/modal.component.js +34 -0
- package/esm2015/lib/components/ui/search-not-found/search-not-found.component.js +41 -0
- package/esm2015/lib/configs/admin.config.js +22 -0
- package/esm2015/lib/contanst/data-image.js +12 -0
- package/esm2015/lib/contanst/index.js +6 -0
- package/esm2015/lib/datasources/index.js +6 -0
- package/esm2015/lib/datasources/node-tree.datasource.js +179 -0
- package/esm2015/lib/directives/dialogTrigger.directive.js +47 -0
- package/esm2015/lib/directives/directives.module.js +20 -0
- package/esm2015/lib/directives/dnd.directive.js +57 -0
- package/esm2015/lib/models/asset-file.model.js +57 -0
- package/esm2015/lib/models/asset.model.js +135 -0
- package/esm2015/lib/models/file-type.enum.js +11 -0
- package/esm2015/lib/models/file.model.js +91 -0
- package/esm2015/lib/models/index.js +12 -0
- package/esm2015/lib/models/node-tree.model.js +32 -0
- package/esm2015/lib/models/sort.enum.js +23 -0
- package/esm2015/lib/pipes/datetime.pipe.js +79 -0
- package/esm2015/lib/pipes/file-size.pipe.js +54 -0
- package/esm2015/lib/services/asset.service.js +224 -0
- package/esm2015/lib/services/base.service.js +49 -0
- package/esm2015/lib/services/env-config.service.js +18 -0
- package/esm2015/lib/services/file.service.js +106 -0
- package/esm2015/lib/services/index.js +11 -0
- package/esm2015/lib/services/node-tree.service.js +212 -0
- package/esm2015/lib/services/upload-assets.service.js +203 -0
- package/esm2015/lib/store/actions.action.js +125 -0
- package/esm2015/lib/store/index.js +7 -0
- package/esm2015/lib/store/reducer.js +115 -0
- package/esm2015/public-api.js +34 -0
- package/esm2015/rs-pk-asset-management.js +17 -0
- package/esm5/lib/asset-management.component.js +162 -0
- package/esm5/lib/asset-management.module.js +180 -0
- package/esm5/lib/asset-management.service.js +54 -0
- package/esm5/lib/components/partial/add-folder-dialog/add-folder-dialog.component.js +161 -0
- package/esm5/lib/components/partial/asset-dialog/asset-dialog.component.js +417 -0
- package/esm5/lib/components/partial/asset-item/asset-item.component.js +184 -0
- package/esm5/lib/components/partial/asset-list/asset-list.component.js +266 -0
- package/esm5/lib/components/partial/asset-management-dialog/asset-management-dialog.component.js +123 -0
- package/esm5/lib/components/partial/asset-wrapper/asset-wrapper.component.js +115 -0
- package/esm5/lib/components/partial/breadcrumb/breadcrumb.component.js +138 -0
- package/esm5/lib/components/partial/delete-dialog/delete-dialog.component.js +154 -0
- package/esm5/lib/components/partial/edit-folder-dialog/edit-folder-dialog.component.js +166 -0
- package/esm5/lib/components/partial/file-item/file-item.component.js +151 -0
- package/esm5/lib/components/partial/file-list/file-list.component.js +93 -0
- package/esm5/lib/components/partial/folder-item/folder-item.component.js +126 -0
- package/esm5/lib/components/partial/folder-list/folder-list.component.js +82 -0
- package/esm5/lib/components/partial/node-details/node-details.component.js +443 -0
- package/esm5/lib/components/partial/node-tree/node-tree.component.js +413 -0
- package/esm5/lib/components/partial/search-box/search-box.component.js +184 -0
- package/esm5/lib/components/partial/sort-items/sort-items.component.js +107 -0
- package/esm5/lib/components/partial/upload-dialog/upload-dialog.component.js +151 -0
- package/esm5/lib/components/partial/upload-file/upload-file.component.js +130 -0
- package/esm5/lib/components/ui/drag-to-resize/drag-to-resize.component.js +117 -0
- package/esm5/lib/components/ui/input-file/input-file.component.js +55 -0
- package/esm5/lib/components/ui/modal/modal.component.js +39 -0
- package/esm5/lib/components/ui/search-not-found/search-not-found.component.js +43 -0
- package/esm5/lib/configs/admin.config.js +22 -0
- package/esm5/lib/contanst/data-image.js +12 -0
- package/esm5/lib/contanst/index.js +6 -0
- package/esm5/lib/datasources/index.js +6 -0
- package/esm5/lib/datasources/node-tree.datasource.js +239 -0
- package/esm5/lib/directives/dialogTrigger.directive.js +53 -0
- package/esm5/lib/directives/directives.module.js +25 -0
- package/esm5/lib/directives/dnd.directive.js +80 -0
- package/esm5/lib/models/asset-file.model.js +69 -0
- package/esm5/lib/models/asset.model.js +154 -0
- package/esm5/lib/models/file-type.enum.js +11 -0
- package/esm5/lib/models/file.model.js +99 -0
- package/esm5/lib/models/index.js +12 -0
- package/esm5/lib/models/node-tree.model.js +37 -0
- package/esm5/lib/models/sort.enum.js +23 -0
- package/esm5/lib/pipes/datetime.pipe.js +83 -0
- package/esm5/lib/pipes/file-size.pipe.js +63 -0
- package/esm5/lib/services/asset.service.js +274 -0
- package/esm5/lib/services/base.service.js +57 -0
- package/esm5/lib/services/env-config.service.js +18 -0
- package/esm5/lib/services/file.service.js +127 -0
- package/esm5/lib/services/index.js +11 -0
- package/esm5/lib/services/node-tree.service.js +278 -0
- package/esm5/lib/services/upload-assets.service.js +260 -0
- package/esm5/lib/store/actions.action.js +143 -0
- package/esm5/lib/store/index.js +7 -0
- package/esm5/lib/store/reducer.js +116 -0
- package/esm5/public-api.js +34 -0
- package/esm5/rs-pk-asset-management.js +17 -0
- package/fesm2015/rs-pk-asset-management.js +5429 -0
- package/fesm2015/rs-pk-asset-management.js.map +1 -0
- package/fesm5/rs-pk-asset-management.js +6244 -0
- package/fesm5/rs-pk-asset-management.js.map +1 -0
- package/lib/asset-management.component.d.ts +21 -0
- package/lib/asset-management.module.d.ts +5 -0
- package/lib/asset-management.service.d.ts +7 -0
- package/lib/components/partial/add-folder-dialog/add-folder-dialog.component.d.ts +27 -0
- package/lib/components/partial/asset-dialog/asset-dialog.component.d.ts +52 -0
- package/lib/components/partial/asset-item/asset-item.component.d.ts +25 -0
- package/lib/components/partial/asset-list/asset-list.component.d.ts +22 -0
- package/lib/components/partial/asset-management-dialog/asset-management-dialog.component.d.ts +17 -0
- package/lib/components/partial/asset-wrapper/asset-wrapper.component.d.ts +19 -0
- package/lib/components/partial/breadcrumb/breadcrumb.component.d.ts +17 -0
- package/lib/components/partial/delete-dialog/delete-dialog.component.d.ts +24 -0
- package/lib/components/partial/edit-folder-dialog/edit-folder-dialog.component.d.ts +28 -0
- package/lib/components/partial/file-item/file-item.component.d.ts +27 -0
- package/lib/components/partial/file-list/file-list.component.d.ts +12 -0
- package/lib/components/partial/folder-item/folder-item.component.d.ts +14 -0
- package/lib/components/partial/folder-list/folder-list.component.d.ts +11 -0
- package/lib/components/partial/node-details/node-details.component.d.ts +29 -0
- package/lib/components/partial/node-tree/node-tree.component.d.ts +34 -0
- package/lib/components/partial/search-box/search-box.component.d.ts +18 -0
- package/lib/components/partial/sort-items/sort-items.component.d.ts +21 -0
- package/lib/components/partial/upload-dialog/upload-dialog.component.d.ts +24 -0
- package/lib/components/partial/upload-file/upload-file.component.d.ts +18 -0
- package/lib/components/ui/drag-to-resize/drag-to-resize.component.d.ts +15 -0
- package/lib/components/ui/input-file/input-file.component.d.ts +9 -0
- package/lib/components/ui/modal/modal.component.d.ts +7 -0
- package/lib/components/ui/search-not-found/search-not-found.component.d.ts +8 -0
- package/lib/configs/admin.config.d.ts +3 -0
- package/lib/contanst/data-image.d.ts +3 -0
- package/lib/contanst/index.d.ts +1 -0
- package/lib/datasources/index.d.ts +1 -0
- package/lib/datasources/node-tree.datasource.d.ts +24 -0
- package/lib/directives/dialogTrigger.directive.d.ts +7 -0
- package/lib/directives/directives.module.d.ts +5 -0
- package/lib/directives/dnd.directive.d.ts +7 -0
- package/lib/models/asset-file.model.d.ts +26 -0
- package/lib/models/asset.model.d.ts +61 -0
- package/lib/models/file-type.enum.d.ts +4 -0
- package/lib/models/file.model.d.ts +41 -0
- package/lib/models/index.d.ts +7 -0
- package/lib/models/node-tree.model.d.ts +9 -0
- package/lib/models/sort.enum.d.ts +9 -0
- package/lib/pipes/datetime.pipe.d.ts +13 -0
- package/lib/pipes/file-size.pipe.d.ts +5 -0
- package/lib/services/asset.service.d.ts +35 -0
- package/lib/services/base.service.d.ts +20 -0
- package/lib/services/env-config.service.d.ts +7 -0
- package/lib/services/file.service.d.ts +13 -0
- package/lib/services/index.d.ts +6 -0
- package/lib/services/node-tree.service.d.ts +24 -0
- package/lib/services/upload-assets.service.d.ts +42 -0
- package/lib/store/actions.action.d.ts +51 -0
- package/lib/store/index.d.ts +2 -0
- package/lib/store/reducer.d.ts +18 -0
- package/package.json +28 -0
- package/public-api.d.ts +26 -0
- package/rs-pk-asset-management.d.ts +12 -0
- package/rs-pk-asset-management.metadata.json +1 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
export declare class LocalDateTimePipe implements PipeTransform {
|
|
3
|
+
transform: (value: string, config?: {
|
|
4
|
+
format: string;
|
|
5
|
+
timeZone: string;
|
|
6
|
+
}) => string;
|
|
7
|
+
}
|
|
8
|
+
export declare class LocalDatePipe implements PipeTransform {
|
|
9
|
+
transform: (value: string, config?: {
|
|
10
|
+
format: string;
|
|
11
|
+
timeZone: string;
|
|
12
|
+
}) => string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { AssetModel, AssetResultModel, DialogConfig, FolderTreeModel, IAssetByIdPayload, IChildrenAssetPayload, SortFilesBy, TypeSort } from '../models';
|
|
4
|
+
import { BaseHttpClient } from './base.service';
|
|
5
|
+
export declare class AssetService {
|
|
6
|
+
private _env;
|
|
7
|
+
dialog: MatDialog;
|
|
8
|
+
private _api;
|
|
9
|
+
private folderList$;
|
|
10
|
+
private assetList$;
|
|
11
|
+
private openDialog$;
|
|
12
|
+
keyword: string;
|
|
13
|
+
pageSize: number;
|
|
14
|
+
pageIndex: number;
|
|
15
|
+
folderTotal: number;
|
|
16
|
+
fileTotal: number;
|
|
17
|
+
sortBy: SortFilesBy;
|
|
18
|
+
sortOrder: TypeSort;
|
|
19
|
+
dialogConfig: DialogConfig;
|
|
20
|
+
private baseUrl;
|
|
21
|
+
constructor(_env: any, dialog: MatDialog, _api: BaseHttpClient);
|
|
22
|
+
private initOptionFiles;
|
|
23
|
+
private resetData;
|
|
24
|
+
resetAsset(): void;
|
|
25
|
+
getFolderList(): Observable<FolderTreeModel>;
|
|
26
|
+
setFolderList(folders: FolderTreeModel, folderTotal?: number): void;
|
|
27
|
+
getAssetList(): Observable<AssetModel[]>;
|
|
28
|
+
setAssetList(assets: AssetModel[], pagination?: any): void;
|
|
29
|
+
setDialogOpenStatus(status: boolean): void;
|
|
30
|
+
getDialogOpenStatus(): Observable<boolean>;
|
|
31
|
+
private setPagination;
|
|
32
|
+
getAssetById(assetId: string): Observable<AssetResultModel>;
|
|
33
|
+
getChildrenFolders({ assetId, isFilter }: IAssetByIdPayload): Observable<AssetResultModel>;
|
|
34
|
+
getChildrenAssets({ assetId, pageIndex }: IChildrenAssetPayload): Observable<AssetResultModel>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { HttpClient, HttpHandler, HttpHeaders, HttpParams, HttpRequest } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
export declare type HttpObserve = 'body' | 'events' | 'response';
|
|
4
|
+
export declare class BaseHttpClient extends HttpClient {
|
|
5
|
+
private _env;
|
|
6
|
+
constructor(_env: any, handler: HttpHandler);
|
|
7
|
+
request(first: string | HttpRequest<any>, url?: string, options?: {
|
|
8
|
+
body?: any;
|
|
9
|
+
headers?: HttpHeaders | {
|
|
10
|
+
[header: string]: string | string[];
|
|
11
|
+
};
|
|
12
|
+
observe?: HttpObserve;
|
|
13
|
+
params?: HttpParams | {
|
|
14
|
+
[param: string]: string | string[];
|
|
15
|
+
};
|
|
16
|
+
reportProgress?: boolean;
|
|
17
|
+
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
18
|
+
withCredentials?: boolean;
|
|
19
|
+
}): Observable<any>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IAddFolderPayload, IUpdateFilePayload } from '../models';
|
|
2
|
+
import { BaseHttpClient } from './base.service';
|
|
3
|
+
export declare class FileService {
|
|
4
|
+
private _env;
|
|
5
|
+
private _api;
|
|
6
|
+
private baseUrl;
|
|
7
|
+
constructor(_env: any, _api: BaseHttpClient);
|
|
8
|
+
addFolder({ parentAssetId, folderName }: IAddFolderPayload): import("rxjs").Observable<any>;
|
|
9
|
+
updateFile({ assetId, fileName, description }: IUpdateFilePayload): import("rxjs").Observable<any>;
|
|
10
|
+
replaceAsset(assetId: string, file: File): import("rxjs").Observable<any>;
|
|
11
|
+
deleteFile(ids: string[]): import("rxjs").Observable<any>;
|
|
12
|
+
getFileDetail(id: string): import("rxjs").Observable<any>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AssetService } from './asset.service';
|
|
2
|
+
import { NodeTreeService } from './node-tree.service';
|
|
3
|
+
import { UploadAssetsService } from './upload-assets.service';
|
|
4
|
+
import { FileService } from './file.service';
|
|
5
|
+
import { BaseHttpClient } from './base.service';
|
|
6
|
+
export { BaseHttpClient, UploadAssetsService, AssetService, FileService, NodeTreeService, };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BehaviorSubject } from 'rxjs/internal/BehaviorSubject';
|
|
2
|
+
import { AssetManagementService } from '../asset-management.service';
|
|
3
|
+
import { AssetModel, DynamicFlatNode, FolderTreeModel, IInitialFolderTreeOptions } from '../models';
|
|
4
|
+
import { AssetService } from './asset.service';
|
|
5
|
+
export declare class NodeTreeService {
|
|
6
|
+
private assetService;
|
|
7
|
+
private svc;
|
|
8
|
+
constructor(assetService: AssetService, svc: AssetManagementService);
|
|
9
|
+
storedData$: BehaviorSubject<AssetModel[]>;
|
|
10
|
+
loading$: BehaviorSubject<boolean>;
|
|
11
|
+
initialData$: BehaviorSubject<DynamicFlatNode[]>;
|
|
12
|
+
rootFolder: AssetModel;
|
|
13
|
+
data: AssetModel[];
|
|
14
|
+
private fetchChildrenFolder;
|
|
15
|
+
/** Initial data from database */
|
|
16
|
+
initialData({ dispatchRootId }: IInitialFolderTreeOptions): Promise<DynamicFlatNode[]>;
|
|
17
|
+
getChildren(node: FolderTreeModel): Promise<FolderTreeModel>;
|
|
18
|
+
isExpandable(node: FolderTreeModel): boolean;
|
|
19
|
+
/** Add asset to stored data */
|
|
20
|
+
addNode(asset: AssetModel, parentId?: string): void;
|
|
21
|
+
updateBreadcrumb(id: string): Promise<void>;
|
|
22
|
+
private getAssetParent;
|
|
23
|
+
private getFolderHierarchy;
|
|
24
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { BaseHttpClient } from './base.service';
|
|
4
|
+
export declare class UploadAssetsService {
|
|
5
|
+
private _env;
|
|
6
|
+
dialog: MatDialog;
|
|
7
|
+
private _api;
|
|
8
|
+
private files;
|
|
9
|
+
private namesMap;
|
|
10
|
+
private errorsMap;
|
|
11
|
+
readonly supportedSize: number;
|
|
12
|
+
readonly documentExtension: string[];
|
|
13
|
+
readonly imageExtension: string[];
|
|
14
|
+
supportedTypes: string[];
|
|
15
|
+
readonly messageErrors: {
|
|
16
|
+
size: string;
|
|
17
|
+
ext: string;
|
|
18
|
+
};
|
|
19
|
+
private errorObs$;
|
|
20
|
+
private baseUrl;
|
|
21
|
+
constructor(_env: any, dialog: MatDialog, _api: BaseHttpClient);
|
|
22
|
+
getErrorObs(): Observable<any>;
|
|
23
|
+
setErrorObs(error: boolean): void;
|
|
24
|
+
readonly getFiles: File[];
|
|
25
|
+
setFiles: File[];
|
|
26
|
+
readonly nameFiles: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
};
|
|
29
|
+
newName: {
|
|
30
|
+
[key: string]: string;
|
|
31
|
+
};
|
|
32
|
+
readonly errorFiles: boolean;
|
|
33
|
+
errors: {
|
|
34
|
+
[key: string]: boolean;
|
|
35
|
+
};
|
|
36
|
+
readonly fileErrors: {
|
|
37
|
+
[key: string]: boolean;
|
|
38
|
+
};
|
|
39
|
+
readonly errorLength: number;
|
|
40
|
+
deleteFile(fileName: string, index: number): void;
|
|
41
|
+
uploadMultipleAssests(parentAssetId: string): Observable<any>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { AssetModel, FolderTreeModel } from '../models';
|
|
2
|
+
interface ActionInterface {
|
|
3
|
+
type: string;
|
|
4
|
+
payload?: any;
|
|
5
|
+
}
|
|
6
|
+
export declare enum ActionTypes {
|
|
7
|
+
SET_GLOBAL_LOADING = "[LOADING] Set global loading state",
|
|
8
|
+
SET_SELECTED_ASSETS = "[ASSET] Set selected assets",
|
|
9
|
+
RELOAD_CURRENT_ASSETS = "[ASSET] reload current asset list ",
|
|
10
|
+
DELETE_ASSET = "[ASSET] delete an asset ",
|
|
11
|
+
SET_CURRENT_FOLDER_ID = "[FOLDER] get current folder id",
|
|
12
|
+
SET_CURRENT_FOLDER = "[FOLDER] set current folder ",
|
|
13
|
+
RELOAD_CURRENT_FOLDER = "[FOLDER] reload current folder ",
|
|
14
|
+
SET_CURRENT_FOLDER_HIERARCHY = "[FOLDER] set current folder hierarchy ",
|
|
15
|
+
RELOAD_CURRENT_NODE = "[NODE] reload current node "
|
|
16
|
+
}
|
|
17
|
+
export declare class SetGlobalLoading implements ActionInterface {
|
|
18
|
+
readonly type = ActionTypes.SET_GLOBAL_LOADING;
|
|
19
|
+
payload: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare class SetSelectedAssets implements ActionInterface {
|
|
22
|
+
readonly type = ActionTypes.SET_SELECTED_ASSETS;
|
|
23
|
+
payload: Array<AssetModel>;
|
|
24
|
+
}
|
|
25
|
+
export declare class DeleteAsset implements ActionInterface {
|
|
26
|
+
readonly type = ActionTypes.DELETE_ASSET;
|
|
27
|
+
payload: string;
|
|
28
|
+
}
|
|
29
|
+
export declare class SetCurrentFolder implements ActionInterface {
|
|
30
|
+
readonly type = ActionTypes.SET_CURRENT_FOLDER;
|
|
31
|
+
payload: AssetModel;
|
|
32
|
+
}
|
|
33
|
+
export declare class ReloadCurrentFolder implements ActionInterface {
|
|
34
|
+
readonly type = ActionTypes.RELOAD_CURRENT_FOLDER;
|
|
35
|
+
}
|
|
36
|
+
export declare class SetCurrentFolderHierarchy implements ActionInterface {
|
|
37
|
+
readonly type = ActionTypes.SET_CURRENT_FOLDER_HIERARCHY;
|
|
38
|
+
payload: Array<FolderTreeModel>;
|
|
39
|
+
}
|
|
40
|
+
export declare class GetCurrentFolder implements ActionInterface {
|
|
41
|
+
readonly type = ActionTypes.SET_CURRENT_FOLDER_ID;
|
|
42
|
+
payload: string;
|
|
43
|
+
}
|
|
44
|
+
export declare class ReloadCurrentAssets implements ActionInterface {
|
|
45
|
+
readonly type = ActionTypes.RELOAD_CURRENT_ASSETS;
|
|
46
|
+
}
|
|
47
|
+
export declare class ReloadCurrentNode implements ActionInterface {
|
|
48
|
+
readonly type = ActionTypes.RELOAD_CURRENT_NODE;
|
|
49
|
+
}
|
|
50
|
+
export declare type Actions = SetGlobalLoading | SetSelectedAssets | SetCurrentFolder | ReloadCurrentFolder | SetCurrentFolderHierarchy | GetCurrentFolder | ReloadCurrentAssets | ReloadCurrentNode | DeleteAsset;
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
|
2
|
+
import { AssetModel, FolderTreeModel } from '../models';
|
|
3
|
+
import * as ACTIONS from './actions.action';
|
|
4
|
+
interface InitialState {
|
|
5
|
+
globalLoading: boolean;
|
|
6
|
+
selectedAssets: Array<AssetModel>;
|
|
7
|
+
deletedAssetId: string;
|
|
8
|
+
currentFolder: AssetModel;
|
|
9
|
+
currentFolderId: string;
|
|
10
|
+
currentFolderHierarchy: Array<FolderTreeModel>;
|
|
11
|
+
reloadCurrentFolder: boolean;
|
|
12
|
+
reloadCurrentAssets: boolean;
|
|
13
|
+
reloadCurrentNode: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const store: BehaviorSubject<InitialState>;
|
|
16
|
+
export declare const initialReducer: (dispatcher: Subject<ACTIONS.Actions>) => void;
|
|
17
|
+
export declare const select: (mapFn: (status: any) => InitialState) => Observable<any>;
|
|
18
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rs-pk/asset-management",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/platform-browser": "8.2.14",
|
|
6
|
+
"@angular/common": "8.2.14",
|
|
7
|
+
"@angular/core": "8.2.14",
|
|
8
|
+
"@angular/forms": "8.2.14",
|
|
9
|
+
"@angular/material": "8.2.3",
|
|
10
|
+
"@angular/animations": "~8.2.14",
|
|
11
|
+
"@angular/cdk": "8.2.3",
|
|
12
|
+
"rxjs": "^6.4.0",
|
|
13
|
+
"tslib": "1.11.0"
|
|
14
|
+
},
|
|
15
|
+
"main": "bundles/rs-pk-asset-management.umd.js",
|
|
16
|
+
"module": "fesm5/rs-pk-asset-management.js",
|
|
17
|
+
"es2015": "fesm2015/rs-pk-asset-management.js",
|
|
18
|
+
"esm5": "esm5/rs-pk-asset-management.js",
|
|
19
|
+
"esm2015": "esm2015/rs-pk-asset-management.js",
|
|
20
|
+
"fesm5": "fesm5/rs-pk-asset-management.js",
|
|
21
|
+
"fesm2015": "fesm2015/rs-pk-asset-management.js",
|
|
22
|
+
"typings": "rs-pk-asset-management.d.ts",
|
|
23
|
+
"metadata": "rs-pk-asset-management.metadata.json",
|
|
24
|
+
"sideEffects": false,
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"tslib": "^1.9.0"
|
|
27
|
+
}
|
|
28
|
+
}
|
package/public-api.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export * from './lib/asset-management.module';
|
|
2
|
+
export * from './lib/asset-management.component';
|
|
3
|
+
export * from './lib/services/index';
|
|
4
|
+
export * from './lib/services/env-config.service';
|
|
5
|
+
export * from './lib/components/partial/file-item/file-item.component';
|
|
6
|
+
export * from './lib/components/partial/file-list/file-list.component';
|
|
7
|
+
export * from './lib/components/partial/upload-file/upload-file.component';
|
|
8
|
+
export * from './lib/components/partial/add-folder-dialog/add-folder-dialog.component';
|
|
9
|
+
export * from './lib/components/partial/edit-folder-dialog/edit-folder-dialog.component';
|
|
10
|
+
export * from './lib/components/partial/delete-dialog/delete-dialog.component';
|
|
11
|
+
export * from './lib/components/partial/upload-dialog/upload-dialog.component';
|
|
12
|
+
export * from './lib/components/partial/folder-item/folder-item.component';
|
|
13
|
+
export * from './lib/components/partial/folder-list/folder-list.component';
|
|
14
|
+
export * from './lib/components/partial/asset-list/asset-list.component';
|
|
15
|
+
export * from './lib/components/partial/asset-item/asset-item.component';
|
|
16
|
+
export * from './lib/components/partial/asset-management-dialog/asset-management-dialog.component';
|
|
17
|
+
export * from './lib/components/partial/node-tree/node-tree.component';
|
|
18
|
+
export * from './lib/components/partial/asset-dialog/asset-dialog.component';
|
|
19
|
+
export * from './lib/components/partial/breadcrumb/breadcrumb.component';
|
|
20
|
+
export * from './lib/components/partial/search-box/search-box.component';
|
|
21
|
+
export * from './lib/components/partial/asset-wrapper/asset-wrapper.component';
|
|
22
|
+
export * from './lib/components/partial/node-details/node-details.component';
|
|
23
|
+
export * from './lib/components/ui/input-file/input-file.component';
|
|
24
|
+
export * from './lib/components/ui/modal/modal.component';
|
|
25
|
+
export * from './lib/components/ui/search-not-found/search-not-found.component';
|
|
26
|
+
export * from './lib/directives/dialogTrigger.directive';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public-api';
|
|
5
|
+
export { AssetManagementService as ɵc } from './lib/asset-management.service';
|
|
6
|
+
export { SortItemsComponent as ɵd } from './lib/components/partial/sort-items/sort-items.component';
|
|
7
|
+
export { DragToResizeComponent as ɵa } from './lib/components/ui/drag-to-resize/drag-to-resize.component';
|
|
8
|
+
export { DIRECTIVES as ɵh, DirectivesModule as ɵi } from './lib/directives/directives.module';
|
|
9
|
+
export { DndDirective as ɵj } from './lib/directives/dnd.directive';
|
|
10
|
+
export { DialogConfig as ɵe } from './lib/models';
|
|
11
|
+
export { LocalDatePipe as ɵg, LocalDateTimePipe as ɵf } from './lib/pipes/datetime.pipe';
|
|
12
|
+
export { FileSizePipe as ɵb } from './lib/pipes/file-size.pipe';
|