rd-outer-component 0.0.27 → 0.0.28

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.
@@ -0,0 +1,2 @@
1
+ export * from './task-base.component';
2
+ export * from './task-base.type';
@@ -0,0 +1,26 @@
1
+ import { NzTableQueryParams } from 'ng-zorro-antd/table';
2
+ import { Subject } from 'rxjs';
3
+ import { IFilterItem, IPage, ISearchParams, ISearchSortedItem, IStorageOption } from './task-base.type';
4
+ import { ICustomFilter } from '../custom-filter';
5
+ export declare abstract class SearchListBaseComponent {
6
+ searchStorageKey: string;
7
+ isOutDatePicker: boolean;
8
+ defSearch: string;
9
+ isFilter: boolean;
10
+ searchTerms: Subject<ISearchParams>;
11
+ defSearchKey: string;
12
+ filterArr: ICustomFilter[];
13
+ paginationParams: IPage;
14
+ currentSorters: ISearchSortedItem[];
15
+ constructor(searchStorageKey?: string, isOutDatePicker?: boolean);
16
+ getSortedParam(): ISearchSortedItem[];
17
+ handleRestoreLastRequest(): IStorageOption[];
18
+ handleAdvancedFilterArrStorage(storageArr?: IStorageOption[]): void;
19
+ filterSearchChange(): void;
20
+ nzPageSizeChange(size: number): void;
21
+ nzPageIndexChange(index: number): void;
22
+ onQueryParamsChange(params: NzTableQueryParams): void;
23
+ defSearchChange(keyword?: string): void;
24
+ refreshPage(): void;
25
+ protected abstract getFilterParam(): IFilterItem[];
26
+ }
@@ -0,0 +1,36 @@
1
+ export interface ISearchParams {
2
+ page: number;
3
+ pageSize: number;
4
+ sorted?: Array<{
5
+ id: string;
6
+ desc: boolean;
7
+ }>;
8
+ filtered: [] | Array<{
9
+ id: string;
10
+ value: string;
11
+ }>;
12
+ }
13
+ export interface IResult<T = any> {
14
+ code: number;
15
+ msg: string;
16
+ data: T;
17
+ page?: IPage;
18
+ }
19
+ export interface IPage {
20
+ pageSize: number;
21
+ pageNumber: number;
22
+ totalRecords: number;
23
+ totalPages: number;
24
+ }
25
+ export interface ISearchSortedItem {
26
+ id: string;
27
+ desc: boolean;
28
+ }
29
+ export interface IStorageOption {
30
+ key: string;
31
+ value: string | number;
32
+ }
33
+ export interface IFilterItem {
34
+ id: string;
35
+ value: string;
36
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rd-outer-component",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^15.2.0",
6
6
  "@angular/core": "^15.2.0",
package/public-api.d.ts CHANGED
@@ -10,6 +10,7 @@ export * from './lib/modules/custom-pagination';
10
10
  export * from './lib/modules/status-field';
11
11
  export * from './lib/modules/header-step';
12
12
  export * from './lib/modules/rd-notification';
13
+ export * from './lib/modules/task-base';
13
14
  export * from './lib/pipes';
14
15
  export * from './lib/decorators';
15
16
  export * from './lib/utils/debounce';