@webilix/ngx-table-m3 0.0.19 → 0.0.21
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/fesm2022/webilix-ngx-table-m3.mjs +70 -70
- package/fesm2022/webilix-ngx-table-m3.mjs.map +1 -1
- package/index.d.ts +317 -5
- package/package.json +8 -8
- package/lib/columns/column.action.d.ts +0 -24
- package/lib/columns/column.info.d.ts +0 -9
- package/lib/columns/column.interface.d.ts +0 -44
- package/lib/columns/date/column-date.component.d.ts +0 -10
- package/lib/columns/date/column-date.interface.d.ts +0 -10
- package/lib/columns/duration/column-duration.component.d.ts +0 -10
- package/lib/columns/duration/column-duration.interface.d.ts +0 -9
- package/lib/columns/file-size/column-file-size.component.d.ts +0 -10
- package/lib/columns/file-size/column-file-size.interface.d.ts +0 -10
- package/lib/columns/index.d.ts +0 -19
- package/lib/columns/mobile/column-mobile.component.d.ts +0 -10
- package/lib/columns/mobile/column-mobile.interface.d.ts +0 -9
- package/lib/columns/number/column-number.component.d.ts +0 -10
- package/lib/columns/number/column-number.interface.d.ts +0 -9
- package/lib/columns/period/column-period.component.d.ts +0 -13
- package/lib/columns/period/column-period.interface.d.ts +0 -14
- package/lib/columns/text/column-text.component.d.ts +0 -10
- package/lib/columns/text/column-text.interface.d.ts +0 -8
- package/lib/columns/weight/column-weight.component.d.ts +0 -10
- package/lib/columns/weight/column-weight.interface.d.ts +0 -10
- package/lib/filters/date/filter-date.component.d.ts +0 -13
- package/lib/filters/date/filter-date.interface.d.ts +0 -16
- package/lib/filters/filter.component.d.ts +0 -40
- package/lib/filters/filter.info.d.ts +0 -8
- package/lib/filters/filter.interface.d.ts +0 -24
- package/lib/filters/filter.service.d.ts +0 -18
- package/lib/filters/index.d.ts +0 -12
- package/lib/filters/multi-select/filter-multi-select.component.d.ts +0 -23
- package/lib/filters/multi-select/filter-multi-select.interface.d.ts +0 -20
- package/lib/filters/number/filter-number.component.d.ts +0 -34
- package/lib/filters/number/filter-number.interface.d.ts +0 -21
- package/lib/filters/search/filter-search.component.d.ts +0 -23
- package/lib/filters/search/filter-search.interface.d.ts +0 -22
- package/lib/filters/select/filter-select.component.d.ts +0 -23
- package/lib/filters/select/filter-select.interface.d.ts +0 -20
- package/lib/ngx-table.component.d.ts +0 -35
- package/lib/ngx-table.config.d.ts +0 -19
- package/lib/ngx-table.interface.d.ts +0 -43
- package/lib/views/action/view-action.component.d.ts +0 -28
- package/lib/views/card/toolbar/view-card-toolbar.component.d.ts +0 -24
- package/lib/views/card/view-card.component.d.ts +0 -38
- package/lib/views/index.d.ts +0 -4
- package/lib/views/pagination/view-pagination.component.d.ts +0 -27
- package/lib/views/table/view-table.component.d.ts +0 -43
- package/lib/views/value/view-value.component.d.ts +0 -73
- package/lib/views/view.interface.d.ts +0 -23
- package/lib/views/view.service.d.ts +0 -30
- package/public-api.d.ts +0 -3
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { FilterMethods } from '../filter.interface';
|
|
2
|
-
export interface IFilterDate {
|
|
3
|
-
readonly type: 'DATE';
|
|
4
|
-
readonly minDate?: Date;
|
|
5
|
-
readonly maxDate?: Date;
|
|
6
|
-
readonly toParam?: (value: Date) => string;
|
|
7
|
-
}
|
|
8
|
-
export declare class FilterDateMethods<T> extends FilterMethods<IFilterDate, Date> {
|
|
9
|
-
toParam(value: Date): string;
|
|
10
|
-
value(value: string, filter: IFilterDate): Date | undefined;
|
|
11
|
-
query(value: Date): string;
|
|
12
|
-
active(value: Date, filter: IFilterDate): {
|
|
13
|
-
value: string;
|
|
14
|
-
english: boolean;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Injector, OnInit } from '@angular/core';
|
|
2
|
-
import { IViewConfig } from '../views';
|
|
3
|
-
import { IFilter } from './filter.interface';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class FilterComponent implements OnInit {
|
|
6
|
-
private className;
|
|
7
|
-
data: {
|
|
8
|
-
filter: IFilter;
|
|
9
|
-
viewConfig: IViewConfig;
|
|
10
|
-
};
|
|
11
|
-
closeContainer: (response?: any) => void;
|
|
12
|
-
filterInfo: {
|
|
13
|
-
DATE: {
|
|
14
|
-
readonly methods: import("./filter.interface").FilterMethods<any, any>;
|
|
15
|
-
readonly component: import("@angular/cdk/portal").ComponentType<any>;
|
|
16
|
-
};
|
|
17
|
-
"MULTI-SELECT": {
|
|
18
|
-
readonly methods: import("./filter.interface").FilterMethods<any, any>;
|
|
19
|
-
readonly component: import("@angular/cdk/portal").ComponentType<any>;
|
|
20
|
-
};
|
|
21
|
-
NUMBER: {
|
|
22
|
-
readonly methods: import("./filter.interface").FilterMethods<any, any>;
|
|
23
|
-
readonly component: import("@angular/cdk/portal").ComponentType<any>;
|
|
24
|
-
};
|
|
25
|
-
SEARCH: {
|
|
26
|
-
readonly methods: import("./filter.interface").FilterMethods<any, any>;
|
|
27
|
-
readonly component: import("@angular/cdk/portal").ComponentType<any>;
|
|
28
|
-
};
|
|
29
|
-
SELECT: {
|
|
30
|
-
readonly methods: import("./filter.interface").FilterMethods<any, any>;
|
|
31
|
-
readonly component: import("@angular/cdk/portal").ComponentType<any>;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
value?: any;
|
|
35
|
-
injector: Injector;
|
|
36
|
-
ngOnInit(): void;
|
|
37
|
-
onKeydown(event: any): void;
|
|
38
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FilterComponent, never>;
|
|
39
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FilterComponent, "filter", never, {}, {}, never, never, true, never>;
|
|
40
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { IViewConfig } from '../views';
|
|
3
|
-
import { IFilterDate, IFilterMultiSelect, IFilterNumber, IFilterSearch, IFilterSelect } from '.';
|
|
4
|
-
export type Filter = IFilterDate | IFilterMultiSelect | IFilterNumber | IFilterSearch | IFilterSelect;
|
|
5
|
-
export interface IFilter {
|
|
6
|
-
readonly filter: Filter;
|
|
7
|
-
readonly title: string;
|
|
8
|
-
readonly value?: any;
|
|
9
|
-
}
|
|
10
|
-
export declare abstract class FilterMethods<F /** FILTER **/, V /** VALUE **/> {
|
|
11
|
-
abstract toParam(value: V): string;
|
|
12
|
-
abstract value(value: string, filter: F): V | undefined;
|
|
13
|
-
abstract query(value: V): string;
|
|
14
|
-
abstract active(value: V, filter: F): {
|
|
15
|
-
value: string;
|
|
16
|
-
english: boolean;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
export declare const FILTER_DATA: InjectionToken<{
|
|
20
|
-
filter: any;
|
|
21
|
-
viewConfig: IViewConfig;
|
|
22
|
-
}>;
|
|
23
|
-
export declare const FILTER_VALUE: InjectionToken<any>;
|
|
24
|
-
export declare const FILTER_CHANGE: InjectionToken<(value?: any) => void>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ActivatedRoute } from '@angular/router';
|
|
2
|
-
import { NgxHelperContainerService } from '@webilix/ngx-helper-m3';
|
|
3
|
-
import { IViewConfig } from '../views';
|
|
4
|
-
import { INgxTable } from '../ngx-table.interface';
|
|
5
|
-
import { IFilter } from './filter.interface';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export type Filters = {
|
|
8
|
-
[key: string]: IFilter;
|
|
9
|
-
};
|
|
10
|
-
export declare class FilterService {
|
|
11
|
-
private readonly activatedRoute;
|
|
12
|
-
private readonly ngxHelperContainerService;
|
|
13
|
-
constructor(activatedRoute: ActivatedRoute, ngxHelperContainerService: NgxHelperContainerService);
|
|
14
|
-
getFilters<T>(ngxTable: INgxTable<T>): Filters;
|
|
15
|
-
updateFilter(filter: IFilter, viewConfig: IViewConfig): Promise<IFilter | undefined>;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FilterService, never>;
|
|
17
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<FilterService>;
|
|
18
|
-
}
|
package/lib/filters/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * from './date/filter-date.component';
|
|
2
|
-
export * from './date/filter-date.interface';
|
|
3
|
-
export * from './multi-select/filter-multi-select.component';
|
|
4
|
-
export * from './multi-select/filter-multi-select.interface';
|
|
5
|
-
export * from './number/filter-number.component';
|
|
6
|
-
export * from './number/filter-number.interface';
|
|
7
|
-
export * from './search/filter-search.component';
|
|
8
|
-
export * from './search/filter-search.interface';
|
|
9
|
-
export * from './select/filter-select.component';
|
|
10
|
-
export * from './select/filter-select.interface';
|
|
11
|
-
export * from './filter.component';
|
|
12
|
-
export * from './filter.interface';
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { IViewConfig } from '../../views';
|
|
3
|
-
import { IFilterMultiSelect } from './filter-multi-select.interface';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class FilterMultiSelectComponent implements OnInit {
|
|
6
|
-
private className;
|
|
7
|
-
data: {
|
|
8
|
-
filter: IFilterMultiSelect;
|
|
9
|
-
viewConfig: IViewConfig;
|
|
10
|
-
};
|
|
11
|
-
value?: string[];
|
|
12
|
-
onChange: (value?: string[]) => void;
|
|
13
|
-
private searchQuery;
|
|
14
|
-
options: {
|
|
15
|
-
readonly id: string;
|
|
16
|
-
readonly title: string;
|
|
17
|
-
}[];
|
|
18
|
-
ngOnInit(): void;
|
|
19
|
-
setOptions(query: string): void;
|
|
20
|
-
updateValue(id: string, checked: boolean): void;
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FilterMultiSelectComponent, never>;
|
|
22
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FilterMultiSelectComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
23
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { FilterMethods } from '../filter.interface';
|
|
2
|
-
export interface IFilterMultiSelect {
|
|
3
|
-
readonly type: 'MULTI-SELECT';
|
|
4
|
-
readonly options: {
|
|
5
|
-
readonly id: string;
|
|
6
|
-
readonly title: string;
|
|
7
|
-
}[];
|
|
8
|
-
readonly english?: boolean;
|
|
9
|
-
readonly maxItem?: number;
|
|
10
|
-
readonly toParam?: (value: string[]) => string;
|
|
11
|
-
}
|
|
12
|
-
export declare class FilterMultiSelectMethods<T> extends FilterMethods<IFilterMultiSelect, string[]> {
|
|
13
|
-
toParam(value: string[]): string;
|
|
14
|
-
value(value: string, filter: IFilterMultiSelect): string[] | undefined;
|
|
15
|
-
query(value: string[]): string;
|
|
16
|
-
active(value: string[], filter: IFilterMultiSelect): {
|
|
17
|
-
value: string;
|
|
18
|
-
english: boolean;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit } from '@angular/core';
|
|
2
|
-
import { IViewConfig } from '../../views';
|
|
3
|
-
import { IFilterNumber, IFilterNumberValue } from './filter-number.interface';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
type Mode = IFilterNumberValue['mode'];
|
|
6
|
-
export declare class FilterNumberComponent implements AfterViewInit {
|
|
7
|
-
private className;
|
|
8
|
-
private fromInput?;
|
|
9
|
-
private numberInput?;
|
|
10
|
-
data: {
|
|
11
|
-
filter: IFilterNumber;
|
|
12
|
-
viewConfig: IViewConfig;
|
|
13
|
-
};
|
|
14
|
-
value?: IFilterNumberValue;
|
|
15
|
-
onChange: (value?: IFilterNumberValue) => void;
|
|
16
|
-
modes: {
|
|
17
|
-
type: Mode;
|
|
18
|
-
title: string;
|
|
19
|
-
}[];
|
|
20
|
-
mode?: Mode;
|
|
21
|
-
query?: string;
|
|
22
|
-
fromQuery?: string;
|
|
23
|
-
toQuery?: string;
|
|
24
|
-
numberQuery?: string;
|
|
25
|
-
inputTransformFn: (value: any) => string;
|
|
26
|
-
ngAfterViewInit(): void;
|
|
27
|
-
setMode(mode: Mode): void;
|
|
28
|
-
isNumeric(value: string): boolean;
|
|
29
|
-
setQuery(fromQuery: string, toQuery: string): void;
|
|
30
|
-
updateQuery(): void;
|
|
31
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FilterNumberComponent, never>;
|
|
32
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FilterNumberComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
33
|
-
}
|
|
34
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { FilterMethods } from '../filter.interface';
|
|
2
|
-
type Mode = 'EQUAL' | 'GREATER' | 'LESS' | 'BETWEEN';
|
|
3
|
-
export interface IFilterNumberValue {
|
|
4
|
-
readonly query: string;
|
|
5
|
-
readonly mode: Mode;
|
|
6
|
-
}
|
|
7
|
-
export interface IFilterNumber {
|
|
8
|
-
readonly type: 'NUMBER';
|
|
9
|
-
readonly mode?: Mode;
|
|
10
|
-
readonly toParam?: (value: IFilterNumberValue) => string;
|
|
11
|
-
}
|
|
12
|
-
export declare class FilterNumberMethods<T> extends FilterMethods<IFilterNumber, IFilterNumberValue> {
|
|
13
|
-
toParam(value: IFilterNumberValue): string;
|
|
14
|
-
value(value: string, filter: IFilterNumber): IFilterNumberValue | undefined;
|
|
15
|
-
query(value: IFilterNumberValue): string;
|
|
16
|
-
active(value: IFilterNumberValue, filter: IFilterNumber): {
|
|
17
|
-
value: string;
|
|
18
|
-
english: boolean;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit } from '@angular/core';
|
|
2
|
-
import { IViewConfig } from '../../views';
|
|
3
|
-
import { IFilterSearch, IFilterSearchValue } from './filter-search.interface';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
type Mode = IFilterSearchValue['mode'];
|
|
6
|
-
export declare class FilterSearchComponent implements AfterViewInit {
|
|
7
|
-
private className;
|
|
8
|
-
private searchInput?;
|
|
9
|
-
data: {
|
|
10
|
-
filter: IFilterSearch;
|
|
11
|
-
viewConfig: IViewConfig;
|
|
12
|
-
};
|
|
13
|
-
value?: IFilterSearchValue;
|
|
14
|
-
onChange: (value?: IFilterSearchValue) => void;
|
|
15
|
-
query?: string;
|
|
16
|
-
mode: Mode;
|
|
17
|
-
ngAfterViewInit(): void;
|
|
18
|
-
updateQuery(query: string): void;
|
|
19
|
-
updateMode(mode: Mode): void;
|
|
20
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FilterSearchComponent, never>;
|
|
21
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FilterSearchComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { FilterMethods } from '../filter.interface';
|
|
2
|
-
type Mode = 'PHRASE' | 'ALL' | 'EACH';
|
|
3
|
-
export interface IFilterSearchValue {
|
|
4
|
-
readonly query: string;
|
|
5
|
-
readonly mode: Mode;
|
|
6
|
-
}
|
|
7
|
-
export interface IFilterSearch {
|
|
8
|
-
readonly type: 'SEARCH';
|
|
9
|
-
readonly mode?: Mode;
|
|
10
|
-
readonly english?: boolean;
|
|
11
|
-
readonly toParam?: (value: IFilterSearchValue) => string;
|
|
12
|
-
}
|
|
13
|
-
export declare class FilterSearchMethods<T> extends FilterMethods<IFilterSearch, IFilterSearchValue> {
|
|
14
|
-
toParam(value: IFilterSearchValue): string;
|
|
15
|
-
value(value: string, filter: IFilterSearch): IFilterSearchValue | undefined;
|
|
16
|
-
query(value: IFilterSearchValue): string;
|
|
17
|
-
active(value: IFilterSearchValue, filter: IFilterSearch): {
|
|
18
|
-
value: string;
|
|
19
|
-
english: boolean;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { IViewConfig } from '../../views';
|
|
3
|
-
import { IFilterSelect } from './filter-select.interface';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class FilterSelectComponent implements OnInit {
|
|
6
|
-
private className;
|
|
7
|
-
data: {
|
|
8
|
-
filter: IFilterSelect;
|
|
9
|
-
viewConfig: IViewConfig;
|
|
10
|
-
};
|
|
11
|
-
value?: string;
|
|
12
|
-
onChange: (value?: string) => void;
|
|
13
|
-
private searchQuery;
|
|
14
|
-
options: {
|
|
15
|
-
readonly id: string;
|
|
16
|
-
readonly title: string;
|
|
17
|
-
}[];
|
|
18
|
-
ngOnInit(): void;
|
|
19
|
-
setOptions(query: string): void;
|
|
20
|
-
updateValue(id: string): void;
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FilterSelectComponent, never>;
|
|
22
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FilterSelectComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
23
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { FilterMethods } from '../filter.interface';
|
|
2
|
-
export interface IFilterSelect {
|
|
3
|
-
readonly type: 'SELECT';
|
|
4
|
-
readonly options: {
|
|
5
|
-
readonly id: string;
|
|
6
|
-
readonly title: string;
|
|
7
|
-
}[];
|
|
8
|
-
readonly english?: boolean;
|
|
9
|
-
readonly maxItem?: number;
|
|
10
|
-
readonly toParam?: (value: string) => string;
|
|
11
|
-
}
|
|
12
|
-
export declare class FilterSelectMethods<T> extends FilterMethods<IFilterSelect, string> {
|
|
13
|
-
toParam(value: string): string;
|
|
14
|
-
value(value: string, filter: IFilterSelect): string | undefined;
|
|
15
|
-
query(value: string): string;
|
|
16
|
-
active(value: string, filter: IFilterSelect): {
|
|
17
|
-
value: string;
|
|
18
|
-
english: boolean;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
|
-
import { IViewConfig, IViewFilter, IViewOrder } from './views';
|
|
4
|
-
import { FilterService } from './filters/filter.service';
|
|
5
|
-
import { ViewService } from './views/view.service';
|
|
6
|
-
import { INgxTableConfig } from './ngx-table.config';
|
|
7
|
-
import { INgxTable, INgxTableFilter, INgxTablePagination } from './ngx-table.interface';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class NgxTableComponent<T> implements OnInit, OnChanges {
|
|
10
|
-
private readonly activatedRoute;
|
|
11
|
-
private readonly router;
|
|
12
|
-
private readonly filterService;
|
|
13
|
-
private readonly viewService;
|
|
14
|
-
private readonly config?;
|
|
15
|
-
loading: boolean;
|
|
16
|
-
ngxTable: INgxTable<T>;
|
|
17
|
-
data: T[];
|
|
18
|
-
pagination?: INgxTablePagination | null;
|
|
19
|
-
filterChanged: EventEmitter<INgxTableFilter>;
|
|
20
|
-
isMobile: boolean;
|
|
21
|
-
viewConfig: IViewConfig;
|
|
22
|
-
private filter;
|
|
23
|
-
hasFilter: boolean;
|
|
24
|
-
constructor(activatedRoute: ActivatedRoute, router: Router, filterService: FilterService, viewService: ViewService, config?: Partial<INgxTableConfig> | undefined);
|
|
25
|
-
ngOnInit(): void;
|
|
26
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
27
|
-
onResize(): void;
|
|
28
|
-
setQueryParams(): void;
|
|
29
|
-
pageChanged(page: number): void;
|
|
30
|
-
orderChanged(order: IViewOrder): void;
|
|
31
|
-
filterItemChanged(filter: IViewFilter): void;
|
|
32
|
-
filterCleared(): void;
|
|
33
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxTableComponent<any>, [null, null, null, null, { optional: true; }]>;
|
|
34
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgxTableComponent<any>, "ngx-table", never, { "loading": { "alias": "loading"; "required": true; }; "ngxTable": { "alias": "ngxTable"; "required": true; }; "data": { "alias": "data"; "required": true; }; "pagination": { "alias": "pagination"; "required": false; }; }, { "filterChanged": "filterChanged"; }, never, never, true, never>;
|
|
35
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { EnvironmentProviders, InjectionToken } from '@angular/core';
|
|
2
|
-
export interface INgxTableConfig {
|
|
3
|
-
readonly mobileWidth: number;
|
|
4
|
-
readonly alternateRows: boolean;
|
|
5
|
-
readonly iconSize: number;
|
|
6
|
-
readonly actionMenuTitle?: string;
|
|
7
|
-
readonly stickyView: {
|
|
8
|
-
readonly top?: string | {
|
|
9
|
-
readonly desktopView: string;
|
|
10
|
-
readonly mobileView: string;
|
|
11
|
-
};
|
|
12
|
-
readonly bottom?: string | {
|
|
13
|
-
readonly desktopView: string;
|
|
14
|
-
readonly mobileView: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export declare const NGX_TABLE_CONFIG: InjectionToken<Partial<INgxTableConfig>>;
|
|
19
|
-
export declare const provideNgxTableConfig: (config: Partial<INgxTableConfig>) => EnvironmentProviders;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { IAction, IActionDelete, IActionLog, IActionStatus, IActionUpdate, IColumnDate, IColumnDuration, IColumnFileSize, IColumnMobile, IColumnNumber, IColumnPeriod, IColumnText, IColumnWeight } from './columns';
|
|
2
|
-
export type NgxTableColumn<T> = IColumnDate<T> | IColumnDuration<T> | IColumnFileSize<T> | IColumnMobile<T> | IColumnNumber<T> | IColumnPeriod<T> | IColumnText<T> | IColumnWeight<T>;
|
|
3
|
-
export type NgxTableAction<T> = 'DIVIDER' | IAction<T> | IActionUpdate<T> | IActionDelete<T> | IActionStatus<T> | IActionLog<T>;
|
|
4
|
-
export interface INgxTable<T> {
|
|
5
|
-
readonly route?: string[];
|
|
6
|
-
readonly type: string;
|
|
7
|
-
readonly columns: NgxTableColumn<T>[];
|
|
8
|
-
readonly rows?: {
|
|
9
|
-
readonly icon?: (data: T) => string | {
|
|
10
|
-
icon: string;
|
|
11
|
-
color: string | null | undefined;
|
|
12
|
-
};
|
|
13
|
-
readonly color?: (data: T) => string | null | undefined;
|
|
14
|
-
readonly description?: (data: T) => string | null | undefined;
|
|
15
|
-
readonly isDeactive?: (data: T) => boolean;
|
|
16
|
-
};
|
|
17
|
-
readonly actions?: NgxTableAction<T>[];
|
|
18
|
-
readonly mobileView?: boolean;
|
|
19
|
-
}
|
|
20
|
-
export interface INgxTableFilter {
|
|
21
|
-
readonly page: number;
|
|
22
|
-
readonly order?: {
|
|
23
|
-
readonly id: string;
|
|
24
|
-
readonly type: 'ASC' | 'DESC';
|
|
25
|
-
readonly param: string;
|
|
26
|
-
};
|
|
27
|
-
readonly filter: {
|
|
28
|
-
[id: string]: {
|
|
29
|
-
readonly value: any;
|
|
30
|
-
readonly param: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
export interface INgxTablePagination {
|
|
35
|
-
readonly item: {
|
|
36
|
-
readonly perPage: number;
|
|
37
|
-
readonly total: number;
|
|
38
|
-
};
|
|
39
|
-
readonly page: {
|
|
40
|
-
readonly current: number;
|
|
41
|
-
readonly total: number;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { Router } from '@angular/router';
|
|
3
|
-
import { NgxTableAction } from '../../ngx-table.interface';
|
|
4
|
-
import { IViewConfig } from '../view.interface';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
interface Action<T> {
|
|
7
|
-
readonly title: string;
|
|
8
|
-
readonly icon: string;
|
|
9
|
-
readonly action: (data: T) => string[] | void;
|
|
10
|
-
readonly color?: string;
|
|
11
|
-
readonly isDisabled: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare class ViewActionComponent<T> implements OnChanges {
|
|
14
|
-
private readonly router;
|
|
15
|
-
private className;
|
|
16
|
-
actions: NgxTableAction<T>[];
|
|
17
|
-
item: T;
|
|
18
|
-
viewConfig: IViewConfig;
|
|
19
|
-
isMobile: boolean;
|
|
20
|
-
inRow: Action<T>[];
|
|
21
|
-
inMenu: ('DIVIDER' | Action<T>)[];
|
|
22
|
-
constructor(router: Router);
|
|
23
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
24
|
-
onClick(action: (data: T) => string[] | void): void;
|
|
25
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ViewActionComponent<any>, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ViewActionComponent<any>, "view-action", never, { "actions": { "alias": "actions"; "required": true; }; "item": { "alias": "item"; "required": true; }; "viewConfig": { "alias": "viewConfig"; "required": true; }; "isMobile": { "alias": "isMobile"; "required": true; }; }, {}, never, never, true, never>;
|
|
27
|
-
}
|
|
28
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { Filters } from '../../../filters/filter.service';
|
|
3
|
-
import { IViewConfig, IViewOrder } from '../../view.interface';
|
|
4
|
-
import { Orders } from '../../view.service';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class ViewCardToolbarComponent implements OnChanges {
|
|
7
|
-
private className;
|
|
8
|
-
orders: Orders;
|
|
9
|
-
filters: Filters;
|
|
10
|
-
viewConfig: IViewConfig;
|
|
11
|
-
orderChanged: EventEmitter<IViewOrder>;
|
|
12
|
-
updateFilter: EventEmitter<string>;
|
|
13
|
-
clearFilter: EventEmitter<void>;
|
|
14
|
-
orderKeys: string[];
|
|
15
|
-
filterKeys: string[];
|
|
16
|
-
showClear: boolean;
|
|
17
|
-
private swipeStart?;
|
|
18
|
-
private swipeLeft;
|
|
19
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
20
|
-
updateOrder(id: string, type: 'ASC' | 'DESC'): void;
|
|
21
|
-
swipe(event: MouseEvent | TouchEvent, action: 'START' | 'MOVE' | 'END', container: HTMLElement, items: HTMLElement): void;
|
|
22
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ViewCardToolbarComponent, never>;
|
|
23
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ViewCardToolbarComponent, "view-card-toolbar", never, { "orders": { "alias": "orders"; "required": true; }; "filters": { "alias": "filters"; "required": true; }; "viewConfig": { "alias": "viewConfig"; "required": true; }; }, { "orderChanged": "orderChanged"; "updateFilter": "updateFilter"; "clearFilter": "clearFilter"; }, never, never, true, never>;
|
|
24
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { INgxTable } from '../../ngx-table.interface';
|
|
3
|
-
import { Filters, FilterService } from '../../filters/filter.service';
|
|
4
|
-
import { Orders, ViewService } from '../view.service';
|
|
5
|
-
import { IViewConfig, IViewFilter, IViewOrder } from '..';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class ViewCardComponent<T> implements OnChanges {
|
|
8
|
-
private readonly filterService;
|
|
9
|
-
private readonly viewService;
|
|
10
|
-
private className;
|
|
11
|
-
ngxTable: INgxTable<T>;
|
|
12
|
-
data: T[];
|
|
13
|
-
viewConfig: IViewConfig;
|
|
14
|
-
orderChanged: EventEmitter<IViewOrder>;
|
|
15
|
-
filterChanged: EventEmitter<IViewFilter>;
|
|
16
|
-
filterCleared: EventEmitter<void>;
|
|
17
|
-
hasIcon: boolean;
|
|
18
|
-
hasAction: boolean;
|
|
19
|
-
titleIndex: number;
|
|
20
|
-
subTitleIndex?: number;
|
|
21
|
-
icons: {
|
|
22
|
-
icon: string;
|
|
23
|
-
color?: string;
|
|
24
|
-
}[];
|
|
25
|
-
colors: string[];
|
|
26
|
-
descriptions: (string | undefined)[];
|
|
27
|
-
deactives: number[];
|
|
28
|
-
orders: Orders;
|
|
29
|
-
filters: Filters;
|
|
30
|
-
hasToolbar: boolean;
|
|
31
|
-
top: string;
|
|
32
|
-
hasContent: boolean;
|
|
33
|
-
constructor(filterService: FilterService, viewService: ViewService);
|
|
34
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
35
|
-
updateFilter(id: string): void;
|
|
36
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ViewCardComponent<any>, never>;
|
|
37
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ViewCardComponent<any>, "view-card", never, { "ngxTable": { "alias": "ngxTable"; "required": true; }; "data": { "alias": "data"; "required": true; }; "viewConfig": { "alias": "viewConfig"; "required": true; }; }, { "orderChanged": "orderChanged"; "filterChanged": "filterChanged"; "filterCleared": "filterCleared"; }, never, never, true, never>;
|
|
38
|
-
}
|
package/lib/views/index.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { ElementRef, EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { INgxTablePagination } from '../../ngx-table.interface';
|
|
3
|
-
import { IViewConfig } from '..';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class ViewPaginationComponent implements OnInit, OnChanges {
|
|
6
|
-
private readonly elementRef;
|
|
7
|
-
private className;
|
|
8
|
-
private stylePosition;
|
|
9
|
-
private styleBottom;
|
|
10
|
-
type: string;
|
|
11
|
-
pagination: INgxTablePagination;
|
|
12
|
-
viewConfig: IViewConfig;
|
|
13
|
-
isMobile: boolean;
|
|
14
|
-
stickyBottom?: {
|
|
15
|
-
desktopView: string;
|
|
16
|
-
mobileView: string;
|
|
17
|
-
};
|
|
18
|
-
pageChanged: EventEmitter<number>;
|
|
19
|
-
pages: number[];
|
|
20
|
-
hasShadow: boolean;
|
|
21
|
-
constructor(elementRef: ElementRef);
|
|
22
|
-
ngOnInit(): void;
|
|
23
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
24
|
-
onScroll(): void;
|
|
25
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ViewPaginationComponent, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ViewPaginationComponent, "view-pagination", never, { "type": { "alias": "type"; "required": true; }; "pagination": { "alias": "pagination"; "required": true; }; "viewConfig": { "alias": "viewConfig"; "required": true; }; "isMobile": { "alias": "isMobile"; "required": true; }; "stickyBottom": { "alias": "stickyBottom"; "required": true; }; }, { "pageChanged": "pageChanged"; }, never, never, true, never>;
|
|
27
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { INgxTable } from '../../ngx-table.interface';
|
|
3
|
-
import { Filters, FilterService } from '../../filters/filter.service';
|
|
4
|
-
import { Orders, ViewService } from '../view.service';
|
|
5
|
-
import { IViewConfig, IViewFilter, IViewOrder } from '..';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class ViewTableComponent<T> implements OnChanges {
|
|
8
|
-
private readonly viewService;
|
|
9
|
-
private readonly filterService;
|
|
10
|
-
private className;
|
|
11
|
-
ngxTable: INgxTable<T>;
|
|
12
|
-
data: T[];
|
|
13
|
-
viewConfig: IViewConfig;
|
|
14
|
-
orderChanged: EventEmitter<IViewOrder>;
|
|
15
|
-
filterChanged: EventEmitter<IViewFilter>;
|
|
16
|
-
filterCleared: EventEmitter<void>;
|
|
17
|
-
hasIcon: boolean;
|
|
18
|
-
hasAction: boolean;
|
|
19
|
-
titleIndex: number;
|
|
20
|
-
subTitleIndex?: number;
|
|
21
|
-
icons: {
|
|
22
|
-
icon: string;
|
|
23
|
-
color?: string;
|
|
24
|
-
}[];
|
|
25
|
-
colors: string[];
|
|
26
|
-
descriptions: (string | undefined)[];
|
|
27
|
-
deactives: number[];
|
|
28
|
-
orders: Orders;
|
|
29
|
-
filters: Filters;
|
|
30
|
-
activeFilters: {
|
|
31
|
-
id: string;
|
|
32
|
-
title: string;
|
|
33
|
-
value: string;
|
|
34
|
-
english: boolean;
|
|
35
|
-
}[];
|
|
36
|
-
constructor(viewService: ViewService, filterService: FilterService);
|
|
37
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
38
|
-
updateOrder(id: string): void;
|
|
39
|
-
updateFilter(id: string): void;
|
|
40
|
-
clearFilter(id: string): void;
|
|
41
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ViewTableComponent<any>, never>;
|
|
42
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ViewTableComponent<any>, "view-table", never, { "ngxTable": { "alias": "ngxTable"; "required": true; }; "data": { "alias": "data"; "required": true; }; "viewConfig": { "alias": "viewConfig"; "required": true; }; }, { "orderChanged": "orderChanged"; "filterChanged": "filterChanged"; "filterCleared": "filterCleared"; }, never, never, true, never>;
|
|
43
|
-
}
|