@webilix/ngx-table-m3 0.0.1

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.
Files changed (45) hide show
  1. package/README.md +6 -0
  2. package/fesm2022/webilix-ngx-table-m3.mjs +1258 -0
  3. package/fesm2022/webilix-ngx-table-m3.mjs.map +1 -0
  4. package/index.d.ts +5 -0
  5. package/lib/columns/column.action.d.ts +24 -0
  6. package/lib/columns/column.info.d.ts +9 -0
  7. package/lib/columns/column.interface.d.ts +46 -0
  8. package/lib/columns/date/column-date.component.d.ts +10 -0
  9. package/lib/columns/date/column-date.interface.d.ts +10 -0
  10. package/lib/columns/duration/column-duration.component.d.ts +10 -0
  11. package/lib/columns/duration/column-duration.interface.d.ts +9 -0
  12. package/lib/columns/index.d.ts +13 -0
  13. package/lib/columns/mobile/column-mobile.component.d.ts +10 -0
  14. package/lib/columns/mobile/column-mobile.interface.d.ts +9 -0
  15. package/lib/columns/number/column-number.component.d.ts +10 -0
  16. package/lib/columns/number/column-number.interface.d.ts +9 -0
  17. package/lib/columns/text/column-text.component.d.ts +10 -0
  18. package/lib/columns/text/column-text.interface.d.ts +8 -0
  19. package/lib/filters/date/filter-date.component.d.ts +13 -0
  20. package/lib/filters/date/filter-date.interface.d.ts +16 -0
  21. package/lib/filters/filter.component.d.ts +35 -0
  22. package/lib/filters/filter.info.d.ts +8 -0
  23. package/lib/filters/filter.interface.d.ts +24 -0
  24. package/lib/filters/filter.service.d.ts +18 -0
  25. package/lib/filters/index.d.ts +10 -0
  26. package/lib/filters/multi-select/filter-multi-select.component.d.ts +14 -0
  27. package/lib/filters/multi-select/filter-multi-select.interface.d.ts +19 -0
  28. package/lib/filters/search/filter-search.component.d.ts +20 -0
  29. package/lib/filters/search/filter-search.interface.d.ts +20 -0
  30. package/lib/filters/select/filter-select.component.d.ts +13 -0
  31. package/lib/filters/select/filter-select.interface.d.ts +19 -0
  32. package/lib/ngx-table.component.d.ts +37 -0
  33. package/lib/ngx-table.config.d.ts +45 -0
  34. package/lib/ngx-table.interface.d.ts +43 -0
  35. package/lib/views/action/view-action.component.d.ts +27 -0
  36. package/lib/views/card/toolbar/view-card-toolbar.component.d.ts +23 -0
  37. package/lib/views/card/view-card.component.d.ts +38 -0
  38. package/lib/views/index.d.ts +4 -0
  39. package/lib/views/pagination/view-pagination.component.d.ts +26 -0
  40. package/lib/views/table/view-table.component.d.ts +42 -0
  41. package/lib/views/value/view-value.component.d.ts +60 -0
  42. package/lib/views/view.interface.d.ts +41 -0
  43. package/lib/views/view.service.d.ts +30 -0
  44. package/package.json +47 -0
  45. package/public-api.d.ts +3 -0
@@ -0,0 +1,13 @@
1
+ import { IViewConfig } from '../../views';
2
+ import { IFilterDate } from './filter-date.interface';
3
+ import * as i0 from "@angular/core";
4
+ export declare class FilterDateComponent {
5
+ data: {
6
+ filter: IFilterDate;
7
+ viewConfig: IViewConfig;
8
+ };
9
+ value?: Date;
10
+ onChange: (value?: Date) => void;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<FilterDateComponent, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<FilterDateComponent, "ng-component", never, {}, {}, never, never, true, never>;
13
+ }
@@ -0,0 +1,16 @@
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
+ }
@@ -0,0 +1,35 @@
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
+ data: {
7
+ filter: IFilter;
8
+ viewConfig: IViewConfig;
9
+ };
10
+ closeContainer: (response?: any) => void;
11
+ filterInfo: {
12
+ DATE: {
13
+ readonly methods: import("./filter.interface").FilterMethods<any, any>;
14
+ readonly component: import("@angular/cdk/portal").ComponentType<any>;
15
+ };
16
+ "MULTI-SELECT": {
17
+ readonly methods: import("./filter.interface").FilterMethods<any, any>;
18
+ readonly component: import("@angular/cdk/portal").ComponentType<any>;
19
+ };
20
+ SEARCH: {
21
+ readonly methods: import("./filter.interface").FilterMethods<any, any>;
22
+ readonly component: import("@angular/cdk/portal").ComponentType<any>;
23
+ };
24
+ SELECT: {
25
+ readonly methods: import("./filter.interface").FilterMethods<any, any>;
26
+ readonly component: import("@angular/cdk/portal").ComponentType<any>;
27
+ };
28
+ };
29
+ value?: any;
30
+ injector: Injector;
31
+ ngOnInit(): void;
32
+ onKeydown(event: any): void;
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<FilterComponent, never>;
34
+ static ɵcmp: i0.ɵɵComponentDeclaration<FilterComponent, "filter", never, {}, {}, never, never, true, never>;
35
+ }
@@ -0,0 +1,8 @@
1
+ import { ComponentType } from '@angular/cdk/portal';
2
+ import { Filter, FilterMethods } from '.';
3
+ export declare const FilterInfo: {
4
+ [key in Filter['type']]: {
5
+ readonly methods: FilterMethods<any, any>;
6
+ readonly component: ComponentType<any>;
7
+ };
8
+ };
@@ -0,0 +1,24 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import { IViewConfig } from '../views';
3
+ import { IFilterDate, IFilterMultiSelect, IFilterSearch, IFilterSelect } from '.';
4
+ export type Filter = IFilterDate | IFilterMultiSelect | 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>;
@@ -0,0 +1,18 @@
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
+ }
@@ -0,0 +1,10 @@
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 './search/filter-search.component';
6
+ export * from './search/filter-search.interface';
7
+ export * from './select/filter-select.component';
8
+ export * from './select/filter-select.interface';
9
+ export * from './filter.component';
10
+ export * from './filter.interface';
@@ -0,0 +1,14 @@
1
+ import { IViewConfig } from '../../views';
2
+ import { IFilterMultiSelect } from './filter-multi-select.interface';
3
+ import * as i0 from "@angular/core";
4
+ export declare class FilterMultiSelectComponent {
5
+ data: {
6
+ filter: IFilterMultiSelect;
7
+ viewConfig: IViewConfig;
8
+ };
9
+ value?: string[];
10
+ onChange: (value?: string[]) => void;
11
+ updateValue(id: string, checked: boolean): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<FilterMultiSelectComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<FilterMultiSelectComponent, "ng-component", never, {}, {}, never, never, true, never>;
14
+ }
@@ -0,0 +1,19 @@
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 toParam?: (value: string[]) => string;
10
+ }
11
+ export declare class FilterMultiSelectMethods<T> extends FilterMethods<IFilterMultiSelect, string[]> {
12
+ toParam(value: string[]): string;
13
+ value(value: string, filter: IFilterMultiSelect): string[] | undefined;
14
+ query(value: string[]): string;
15
+ active(value: string[], filter: IFilterMultiSelect): {
16
+ value: string;
17
+ english: boolean;
18
+ };
19
+ }
@@ -0,0 +1,20 @@
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
+ export declare class FilterSearchComponent implements AfterViewInit {
6
+ private searchInput?;
7
+ data: {
8
+ filter: IFilterSearch;
9
+ viewConfig: IViewConfig;
10
+ };
11
+ value?: IFilterSearchValue;
12
+ onChange: (value?: IFilterSearchValue) => void;
13
+ query?: string;
14
+ mode?: 'PHRASE' | 'ALL' | 'EACH';
15
+ ngAfterViewInit(): void;
16
+ updateQuery(query: string): void;
17
+ updateMode(mode: 'PHRASE' | 'ALL' | 'EACH'): void;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<FilterSearchComponent, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<FilterSearchComponent, "ng-component", never, {}, {}, never, never, true, never>;
20
+ }
@@ -0,0 +1,20 @@
1
+ import { FilterMethods } from '../filter.interface';
2
+ export interface IFilterSearchValue {
3
+ readonly query: string;
4
+ readonly mode: 'PHRASE' | 'ALL' | 'EACH';
5
+ }
6
+ export interface IFilterSearch {
7
+ readonly type: 'SEARCH';
8
+ readonly mode?: 'PHRASE' | 'ALL' | 'EACH';
9
+ readonly english?: boolean;
10
+ readonly toParam?: (value: IFilterSearchValue) => string;
11
+ }
12
+ export declare class FilterSearchMethods<T> extends FilterMethods<IFilterSearch, IFilterSearchValue> {
13
+ toParam(value: IFilterSearchValue): string;
14
+ value(value: string, filter: IFilterSearch): IFilterSearchValue | undefined;
15
+ query(value: IFilterSearchValue): string;
16
+ active(value: IFilterSearchValue, filter: IFilterSearch): {
17
+ value: string;
18
+ english: boolean;
19
+ };
20
+ }
@@ -0,0 +1,13 @@
1
+ import { IViewConfig } from '../../views';
2
+ import { IFilterSelect } from './filter-select.interface';
3
+ import * as i0 from "@angular/core";
4
+ export declare class FilterSelectComponent {
5
+ data: {
6
+ filter: IFilterSelect;
7
+ viewConfig: IViewConfig;
8
+ };
9
+ value?: string;
10
+ onChange: (value?: string) => void;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<FilterSelectComponent, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<FilterSelectComponent, "ng-component", never, {}, {}, never, never, true, never>;
13
+ }
@@ -0,0 +1,19 @@
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 toParam?: (value: string) => string;
10
+ }
11
+ export declare class FilterSelectMethods<T> extends FilterMethods<IFilterSelect, string> {
12
+ toParam(value: string): string;
13
+ value(value: string, filter: IFilterSelect): string | undefined;
14
+ query(value: string): string;
15
+ active(value: string, filter: IFilterSelect): {
16
+ value: string;
17
+ english: boolean;
18
+ };
19
+ }
@@ -0,0 +1,37 @@
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
+ loaderClass: string;
22
+ emptyClass: string;
23
+ viewConfig: IViewConfig;
24
+ private filter;
25
+ hasFilter: boolean;
26
+ constructor(activatedRoute: ActivatedRoute, router: Router, filterService: FilterService, viewService: ViewService, config?: Partial<INgxTableConfig> | undefined);
27
+ ngOnInit(): void;
28
+ ngOnChanges(changes: SimpleChanges): void;
29
+ onResize(): void;
30
+ setQueryParams(): void;
31
+ pageChanged(page: number): void;
32
+ orderChanged(order: IViewOrder): void;
33
+ filterItemChanged(filter: IViewFilter): void;
34
+ filterCleared(): void;
35
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxTableComponent<any>, [null, null, null, null, { optional: true; }]>;
36
+ 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>;
37
+ }
@@ -0,0 +1,45 @@
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 cssClasses: {
7
+ readonly loader?: string;
8
+ readonly empty?: string;
9
+ readonly en?: string;
10
+ readonly deactive?: string;
11
+ };
12
+ readonly colors: {
13
+ readonly border?: string;
14
+ readonly background?: string;
15
+ readonly headerText?: string;
16
+ readonly headerBackground?: string;
17
+ readonly oddRowsBackground?: string;
18
+ readonly evenRowsBackground?: string;
19
+ readonly cardBackground?: string;
20
+ readonly paginationBackground?: string;
21
+ readonly highlightText?: string;
22
+ readonly highlightBackground?: string;
23
+ readonly inputText?: string;
24
+ readonly inputBackground?: string;
25
+ };
26
+ readonly action: {
27
+ readonly buttonSize?: string;
28
+ readonly buttonColor?: string;
29
+ readonly menuColor?: string;
30
+ readonly warnColor?: string;
31
+ readonly menuTitle?: string;
32
+ };
33
+ readonly stickyView: {
34
+ readonly headerTop?: string | {
35
+ readonly desktopView: string;
36
+ readonly mobileView: string;
37
+ };
38
+ readonly paginationBottom?: string | {
39
+ readonly desktopView: string;
40
+ readonly mobileView: string;
41
+ };
42
+ };
43
+ }
44
+ export declare const NGX_TABLE_CONFIG: InjectionToken<Partial<INgxTableConfig>>;
45
+ export declare const provideNgxTableConfig: (config: Partial<INgxTableConfig>) => EnvironmentProviders;
@@ -0,0 +1,43 @@
1
+ import { IAction, IActionDelete, IActionLog, IActionStatus, IActionUpdate, IColumnDate, IColumnDuration, IColumnMobile, IColumnNumber, IColumnText } from './columns';
2
+ export type NgxTableColumn<T> = IColumnDate<T> | IColumnDuration<T> | IColumnMobile<T> | IColumnNumber<T> | IColumnText<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;
12
+ };
13
+ readonly color?: (data: T) => string;
14
+ readonly description?: (data: T) => string | 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
+ }
@@ -0,0 +1,27 @@
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
+ actions: NgxTableAction<T>[];
16
+ item: T;
17
+ viewConfig: IViewConfig;
18
+ isMobile: boolean;
19
+ inRow: Action<T>[];
20
+ inMenu: ('DIVIDER' | Action<T>)[];
21
+ constructor(router: Router);
22
+ ngOnChanges(changes: SimpleChanges): void;
23
+ onClick(action: (data: T) => string[] | void): void;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<ViewActionComponent<any>, never>;
25
+ 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>;
26
+ }
27
+ export {};
@@ -0,0 +1,23 @@
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
+ orders: Orders;
8
+ filters: Filters;
9
+ viewConfig: IViewConfig;
10
+ orderChanged: EventEmitter<IViewOrder>;
11
+ updateFilter: EventEmitter<string>;
12
+ clearFilter: EventEmitter<void>;
13
+ orderKeys: string[];
14
+ filterKeys: string[];
15
+ showClear: boolean;
16
+ private swipeStart?;
17
+ private swipeLeft;
18
+ ngOnChanges(changes: SimpleChanges): void;
19
+ updateOrder(id: string, type: 'ASC' | 'DESC'): void;
20
+ swipe(event: MouseEvent | TouchEvent, action: 'START' | 'MOVE' | 'END', toolbar: HTMLElement, container: HTMLElement): void;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<ViewCardToolbarComponent, never>;
22
+ 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>;
23
+ }
@@ -0,0 +1,38 @@
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 toolbarHeight;
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
+ headerTop: 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
+ }
@@ -0,0 +1,4 @@
1
+ export * from './card/view-card.component';
2
+ export * from './pagination/view-pagination.component';
3
+ export * from './table/view-table.component';
4
+ export * from './view.interface';
@@ -0,0 +1,26 @@
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 stylePosition;
8
+ private styleBottom;
9
+ type: string;
10
+ pagination: INgxTablePagination;
11
+ viewConfig: IViewConfig;
12
+ isMobile: boolean;
13
+ stickyBottom?: {
14
+ desktopView: string;
15
+ mobileView: string;
16
+ };
17
+ pageChanged: EventEmitter<number>;
18
+ pages: number[];
19
+ hasShadow: boolean;
20
+ constructor(elementRef: ElementRef);
21
+ ngOnInit(): void;
22
+ ngOnChanges(changes: SimpleChanges): void;
23
+ onScroll(): void;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<ViewPaginationComponent, never>;
25
+ 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>;
26
+ }
@@ -0,0 +1,42 @@
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
+ ngxTable: INgxTable<T>;
11
+ data: T[];
12
+ viewConfig: IViewConfig;
13
+ orderChanged: EventEmitter<IViewOrder>;
14
+ filterChanged: EventEmitter<IViewFilter>;
15
+ filterCleared: EventEmitter<void>;
16
+ hasIcon: boolean;
17
+ hasAction: boolean;
18
+ titleIndex: number;
19
+ subTitleIndex?: number;
20
+ icons: {
21
+ icon: string;
22
+ color?: string;
23
+ }[];
24
+ colors: string[];
25
+ descriptions: (string | undefined)[];
26
+ deactives: number[];
27
+ orders: Orders;
28
+ filters: Filters;
29
+ activeFilters: {
30
+ id: string;
31
+ title: string;
32
+ value: string;
33
+ english: boolean;
34
+ }[];
35
+ constructor(viewService: ViewService, filterService: FilterService);
36
+ ngOnChanges(changes: SimpleChanges): void;
37
+ updateOrder(id: string): void;
38
+ updateFilter(id: string): void;
39
+ clearFilter(id: string): void;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<ViewTableComponent<any>, never>;
41
+ 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>;
42
+ }
@@ -0,0 +1,60 @@
1
+ import { Injector, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { Router } from '@angular/router';
3
+ import { NgxTableColumn } from '../../ngx-table.interface';
4
+ import { IViewConfig } from '../view.interface';
5
+ import * as i0 from "@angular/core";
6
+ export declare class ViewValueComponent<T> implements OnChanges {
7
+ private readonly router;
8
+ private textAlign;
9
+ column: NgxTableColumn<T>;
10
+ item: T;
11
+ viewConfig: IViewConfig;
12
+ isDeactive?: boolean;
13
+ isCard?: boolean;
14
+ isCardTitle?: boolean;
15
+ isCardSubTitle?: boolean;
16
+ columnInfo: {
17
+ DATE: {
18
+ readonly methods: import("../../columns").ColumnMethods<any, any>;
19
+ readonly component: import("@angular/cdk/portal").ComponentType<any>;
20
+ };
21
+ DURATION: {
22
+ readonly methods: import("../../columns").ColumnMethods<any, any>;
23
+ readonly component: import("@angular/cdk/portal").ComponentType<any>;
24
+ };
25
+ MOBILE: {
26
+ readonly methods: import("../../columns").ColumnMethods<any, any>;
27
+ readonly component: import("@angular/cdk/portal").ComponentType<any>;
28
+ };
29
+ NUMBER: {
30
+ readonly methods: import("../../columns").ColumnMethods<any, any>;
31
+ readonly component: import("@angular/cdk/portal").ComponentType<any>;
32
+ };
33
+ TEXT: {
34
+ readonly methods: import("../../columns").ColumnMethods<any, any>;
35
+ readonly component: import("@angular/cdk/portal").ComponentType<any>;
36
+ };
37
+ };
38
+ injector: Injector;
39
+ value: any;
40
+ subValue?: {
41
+ value: string;
42
+ isEN: boolean;
43
+ };
44
+ color?: string;
45
+ hasClick: boolean;
46
+ copyText?: string;
47
+ isCopied: boolean;
48
+ private copyTimeout;
49
+ constructor(router: Router);
50
+ ngOnChanges(changes: SimpleChanges): void;
51
+ getValue(): any;
52
+ getSubValue(): {
53
+ value: string;
54
+ isEN: boolean;
55
+ } | undefined;
56
+ onClick(): void;
57
+ onCopy(): void;
58
+ static ɵfac: i0.ɵɵFactoryDeclaration<ViewValueComponent<any>, never>;
59
+ static ɵcmp: i0.ɵɵComponentDeclaration<ViewValueComponent<any>, "view-value", never, { "column": { "alias": "column"; "required": true; }; "item": { "alias": "item"; "required": true; }; "viewConfig": { "alias": "viewConfig"; "required": true; }; "isDeactive": { "alias": "isDeactive"; "required": false; }; "isCard": { "alias": "isCard"; "required": false; }; "isCardTitle": { "alias": "isCardTitle"; "required": false; }; "isCardSubTitle": { "alias": "isCardSubTitle"; "required": false; }; }, {}, never, never, true, never>;
60
+ }
@@ -0,0 +1,41 @@
1
+ export interface IViewConfig {
2
+ readonly alternateRows: boolean;
3
+ readonly iconSize: string;
4
+ readonly enClass: string;
5
+ readonly deactiveClass: string;
6
+ readonly borderColor: string;
7
+ readonly backgroundColor: string;
8
+ readonly headerTextColor: string;
9
+ readonly headerBackgroundColor: string;
10
+ readonly oddRowsBackgroundColor: string;
11
+ readonly evenRowsBackgroundColor: string;
12
+ readonly cardBackgroundColor: string;
13
+ readonly paginationBackgroundColor: string;
14
+ readonly highlightText: string;
15
+ readonly highlightBackground: string;
16
+ readonly inputText: string;
17
+ readonly inputBackground: string;
18
+ readonly actionButtonSize: string;
19
+ readonly actionButtonColor: string;
20
+ readonly actionMenuColor: string;
21
+ readonly actionWarnColor: string;
22
+ readonly actionMenuTitle: string;
23
+ readonly stickyView?: {
24
+ readonly headerTop?: {
25
+ readonly desktopView: string;
26
+ readonly mobileView: string;
27
+ };
28
+ readonly paginationBottom?: {
29
+ readonly desktopView: string;
30
+ readonly mobileView: string;
31
+ };
32
+ };
33
+ }
34
+ export interface IViewOrder {
35
+ readonly id: string;
36
+ readonly type: 'ASC' | 'DESC';
37
+ }
38
+ export interface IViewFilter {
39
+ readonly id: string;
40
+ readonly value: any;
41
+ }