@sd-angular/core 1.3.146 → 1.3.148
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/bundles/sd-angular-core-grid-material.umd.js +1 -1
- package/bundles/sd-angular-core-grid-material.umd.js.map +1 -1
- package/bundles/sd-angular-core-grid-material.umd.min.js +1 -1
- package/bundles/sd-angular-core-grid-material.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-table.umd.js +4077 -0
- package/bundles/sd-angular-core-table.umd.js.map +1 -0
- package/bundles/sd-angular-core-table.umd.min.js +2 -0
- package/bundles/sd-angular-core-table.umd.min.js.map +1 -0
- package/bundles/sd-angular-core.umd.js +6 -4
- package/bundles/sd-angular-core.umd.js.map +1 -1
- package/bundles/sd-angular-core.umd.min.js +1 -1
- package/bundles/sd-angular-core.umd.min.js.map +1 -1
- package/esm2015/grid-material/src/lib/components/column-inline-filter/column-inline-filter.component.js +2 -2
- package/esm2015/lib/core.module.js +4 -1
- package/esm2015/public-api.js +2 -1
- package/esm2015/table/index.js +2 -0
- package/esm2015/table/sd-angular-core-table.js +40 -0
- package/esm2015/table/src/lib/components/column-inline-filter/column-inline-filter.component.js +96 -0
- package/esm2015/table/src/lib/components/desktop-cell/desktop-cell.component.js +25 -0
- package/esm2015/table/src/lib/components/desktop-cell-view/desktop-cell-view.component.js +21 -0
- package/esm2015/table/src/lib/components/desktop-command/desktop-command.component.js +20 -0
- package/esm2015/table/src/lib/components/grid-filter/grid-filter.component.js +99 -0
- package/esm2015/table/src/lib/components/popup-filter/popup-filter.component.js +79 -0
- package/esm2015/table/src/lib/components/popup-grid-configuration/popup-grid-configuration.component.js +96 -0
- package/esm2015/table/src/lib/components/quick-action/quick-action.component.js +24 -0
- package/esm2015/table/src/lib/directives/sd-material-cell-def.directive.js +18 -0
- package/esm2015/table/src/lib/directives/sd-material-empty-data-def.directive.js +15 -0
- package/esm2015/table/src/lib/directives/sd-material-filter-def.directive.js +22 -0
- package/esm2015/table/src/lib/directives/sd-material-footer-def.directive.js +18 -0
- package/esm2015/table/src/lib/directives/sd-material-sub-information-def.directive.js +15 -0
- package/esm2015/table/src/lib/models/grid-cell.model.js +2 -0
- package/esm2015/table/src/lib/models/index.js +4 -0
- package/esm2015/table/src/lib/models/table-column.model.js +63 -0
- package/esm2015/table/src/lib/models/table-command.model.js +2 -0
- package/esm2015/table/src/lib/models/table-configuration.model.js +9 -0
- package/esm2015/table/src/lib/models/table-item.model.js +15 -0
- package/esm2015/table/src/lib/models/table-option-config.model.js +2 -0
- package/esm2015/table/src/lib/models/table-option-expand.model.js +2 -0
- package/esm2015/table/src/lib/models/table-option-export.model.js +2 -0
- package/esm2015/table/src/lib/models/table-option-group.model.js +2 -0
- package/esm2015/table/src/lib/models/table-option-paginate.model.js +2 -0
- package/esm2015/table/src/lib/models/table-option-reload.model.js +2 -0
- package/esm2015/table/src/lib/models/table-option-selector.model.js +2 -0
- package/esm2015/table/src/lib/models/table-option-sort.model.js +2 -0
- package/esm2015/table/src/lib/models/table-option-style.model.js +2 -0
- package/esm2015/table/src/lib/models/table-option.model.js +2 -0
- package/esm2015/table/src/lib/pipes/cell-view.pipe.js +180 -0
- package/esm2015/table/src/lib/pipes/column-badge.pipe.js +43 -0
- package/esm2015/table/src/lib/pipes/column-children-filter.pipe.js +31 -0
- package/esm2015/table/src/lib/pipes/column-html-template.pipe.js +23 -0
- package/esm2015/table/src/lib/pipes/column-tooltip.pipe.js +17 -0
- package/esm2015/table/src/lib/pipes/column-transform.pipe.js +35 -0
- package/esm2015/table/src/lib/pipes/column-values.pipe.js +63 -0
- package/esm2015/table/src/lib/pipes/command-disable.pipe.js +18 -0
- package/esm2015/table/src/lib/pipes/command-filter.pipe.js +79 -0
- package/esm2015/table/src/lib/pipes/command-icon.pipe.js +18 -0
- package/esm2015/table/src/lib/pipes/command-title.pipe.js +18 -0
- package/esm2015/table/src/lib/pipes/filter-column.pipe.js +30 -0
- package/esm2015/table/src/lib/pipes/filter-external.pipe.js +19 -0
- package/esm2015/table/src/lib/pipes/grid-configuration-result.pipe.js +21 -0
- package/esm2015/table/src/lib/pipes/sd-group.pipe.js +45 -0
- package/esm2015/table/src/lib/pipes/selection-action-filter.pipe.js +72 -0
- package/esm2015/table/src/lib/pipes/selection-disable.pipe.js +55 -0
- package/esm2015/table/src/lib/pipes/selection-visible-select-all.pipe.js +34 -0
- package/esm2015/table/src/lib/pipes/selection-visible.pipe.js +82 -0
- package/esm2015/table/src/lib/services/table-configuration.service.js +292 -0
- package/esm2015/table/src/lib/services/table-filter/table-filter.model.js +3 -0
- package/esm2015/table/src/lib/services/table-filter/table-filter.service.js +229 -0
- package/esm2015/table/src/lib/table.component.js +832 -0
- package/esm2015/table/src/lib/table.module.js +175 -0
- package/esm2015/table/src/public-api.js +5 -0
- package/fesm2015/sd-angular-core-grid-material.js +1 -1
- package/fesm2015/sd-angular-core-grid-material.js.map +1 -1
- package/fesm2015/sd-angular-core-table.js +2927 -0
- package/fesm2015/sd-angular-core-table.js.map +1 -0
- package/fesm2015/sd-angular-core.js +3 -0
- package/fesm2015/sd-angular-core.js.map +1 -1
- package/grid-material/sd-angular-core-grid-material.metadata.json +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/{sd-angular-core-1.3.146.tgz → sd-angular-core-1.3.148.tgz} +0 -0
- package/sd-angular-core.metadata.json +1 -1
- package/table/index.d.ts +1 -0
- package/table/package.json +12 -0
- package/table/sd-angular-core-table.d.ts +39 -0
- package/table/sd-angular-core-table.metadata.json +1 -0
- package/table/src/lib/components/column-inline-filter/column-inline-filter.component.d.ts +29 -0
- package/table/src/lib/components/desktop-cell/desktop-cell.component.d.ts +17 -0
- package/table/src/lib/components/desktop-cell-view/desktop-cell-view.component.d.ts +11 -0
- package/table/src/lib/components/desktop-command/desktop-command.component.d.ts +7 -0
- package/table/src/lib/components/grid-filter/grid-filter.component.d.ts +35 -0
- package/table/src/lib/components/popup-filter/popup-filter.component.d.ts +27 -0
- package/table/src/lib/components/popup-grid-configuration/popup-grid-configuration.component.d.ts +39 -0
- package/table/src/lib/components/quick-action/quick-action.component.d.ts +9 -0
- package/table/src/lib/directives/sd-material-cell-def.directive.d.ts +6 -0
- package/table/src/lib/directives/sd-material-empty-data-def.directive.d.ts +5 -0
- package/table/src/lib/directives/sd-material-filter-def.directive.d.ts +8 -0
- package/table/src/lib/directives/sd-material-footer-def.directive.d.ts +6 -0
- package/table/src/lib/directives/sd-material-sub-information-def.directive.d.ts +5 -0
- package/table/src/lib/models/grid-cell.model.d.ts +16 -0
- package/table/src/lib/models/index.d.ts +3 -0
- package/table/src/lib/models/table-column.model.d.ts +125 -0
- package/table/src/lib/models/table-command.model.d.ts +19 -0
- package/table/src/lib/models/table-configuration.model.d.ts +20 -0
- package/table/src/lib/models/table-item.model.d.ts +25 -0
- package/table/src/lib/models/table-option-config.model.d.ts +62 -0
- package/table/src/lib/models/table-option-expand.model.d.ts +6 -0
- package/table/src/lib/models/table-option-export.model.d.ts +31 -0
- package/table/src/lib/models/table-option-group.model.d.ts +4 -0
- package/table/src/lib/models/table-option-paginate.model.d.ts +6 -0
- package/table/src/lib/models/table-option-reload.model.d.ts +5 -0
- package/table/src/lib/models/table-option-selector.model.d.ts +32 -0
- package/table/src/lib/models/table-option-sort.model.d.ts +3 -0
- package/table/src/lib/models/table-option-style.model.d.ts +6 -0
- package/table/src/lib/models/table-option.model.d.ts +44 -0
- package/table/src/lib/pipes/cell-view.pipe.d.ts +15 -0
- package/table/src/lib/pipes/column-badge.pipe.d.ts +11 -0
- package/table/src/lib/pipes/column-children-filter.pipe.d.ts +8 -0
- package/table/src/lib/pipes/column-html-template.pipe.d.ts +8 -0
- package/table/src/lib/pipes/column-tooltip.pipe.d.ts +6 -0
- package/table/src/lib/pipes/column-transform.pipe.d.ts +8 -0
- package/table/src/lib/pipes/column-values.pipe.d.ts +6 -0
- package/table/src/lib/pipes/command-disable.pipe.d.ts +5 -0
- package/table/src/lib/pipes/command-filter.pipe.d.ts +6 -0
- package/table/src/lib/pipes/command-icon.pipe.d.ts +5 -0
- package/table/src/lib/pipes/command-title.pipe.d.ts +5 -0
- package/table/src/lib/pipes/filter-column.pipe.d.ts +5 -0
- package/table/src/lib/pipes/filter-external.pipe.d.ts +5 -0
- package/table/src/lib/pipes/grid-configuration-result.pipe.d.ts +10 -0
- package/table/src/lib/pipes/sd-group.pipe.d.ts +6 -0
- package/table/src/lib/pipes/selection-action-filter.pipe.d.ts +7 -0
- package/table/src/lib/pipes/selection-disable.pipe.d.ts +6 -0
- package/table/src/lib/pipes/selection-visible-select-all.pipe.d.ts +6 -0
- package/table/src/lib/pipes/selection-visible.pipe.d.ts +6 -0
- package/table/src/lib/services/table-configuration.service.d.ts +13 -0
- package/table/src/lib/services/table-filter/table-filter.model.d.ts +117 -0
- package/table/src/lib/services/table-filter/table-filter.service.d.ts +15 -0
- package/table/src/lib/table.component.d.ts +87 -0
- package/table/src/lib/table.module.d.ts +11 -0
- package/table/src/public-api.d.ts +5 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ChangeDetectorRef } from '@angular/core';
|
|
2
|
+
import { SdModal } from '@sd-angular/core/modal';
|
|
3
|
+
import { SdTableColumn } from '../../models/table-column.model';
|
|
4
|
+
import { SdTableExternalFilter, SdGridMaterialFilterRegister } from '../../services/table-filter/table-filter.model';
|
|
5
|
+
import { SdMaterialFilterDefDirective } from '../../directives/sd-material-filter-def.directive';
|
|
6
|
+
export declare class SdPopupFilter {
|
|
7
|
+
#private;
|
|
8
|
+
private cdRef;
|
|
9
|
+
modal: SdModal;
|
|
10
|
+
set filterRegister(value: SdGridMaterialFilterRegister);
|
|
11
|
+
externalFilters: SdTableExternalFilter[];
|
|
12
|
+
externalFilter: Record<string, any>;
|
|
13
|
+
inlineExternal: Record<string, boolean>;
|
|
14
|
+
columns: SdTableColumn[];
|
|
15
|
+
columnFilter: Record<string, any>;
|
|
16
|
+
inlineColumn: Record<string, boolean>;
|
|
17
|
+
filterDefs: SdMaterialFilterDefDirective[];
|
|
18
|
+
filterDef: Record<string, any>;
|
|
19
|
+
inlineFilterDef: Record<string, boolean>;
|
|
20
|
+
constructor(cdRef: ChangeDetectorRef);
|
|
21
|
+
ngAfterViewInit(): void;
|
|
22
|
+
ngOnDestroy(): void;
|
|
23
|
+
open: () => void;
|
|
24
|
+
close: () => void;
|
|
25
|
+
onApply: () => void;
|
|
26
|
+
onClear(): void;
|
|
27
|
+
}
|
package/table/src/lib/components/popup-grid-configuration/popup-grid-configuration.component.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { OnInit, EventEmitter, ChangeDetectorRef } from '@angular/core';
|
|
2
|
+
import { SdModal } from '@sd-angular/core/modal';
|
|
3
|
+
import { SdNotifyService } from '@sd-angular/core/notify';
|
|
4
|
+
import { SdTranslateService } from '@sd-angular/core/translate';
|
|
5
|
+
import { SdTableOption } from '../../models/table-option.model';
|
|
6
|
+
import { SdGridConfigurationResult, SdGridConfiguration } from '../../models/table-option-config.model';
|
|
7
|
+
import { SdTableConfigurationService } from '../../services/table-configuration.service';
|
|
8
|
+
import { MatTable } from '@angular/material/table';
|
|
9
|
+
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
10
|
+
import { SdTableColumn } from '../../models/table-column.model';
|
|
11
|
+
export declare class SdPopupGridConfiguration implements OnInit {
|
|
12
|
+
#private;
|
|
13
|
+
private ref;
|
|
14
|
+
private notifyService;
|
|
15
|
+
private translateService;
|
|
16
|
+
private gridConfigurationService;
|
|
17
|
+
gridOption: SdTableOption;
|
|
18
|
+
key: string;
|
|
19
|
+
modal: SdModal;
|
|
20
|
+
table: MatTable<SdTableColumn>;
|
|
21
|
+
readonly changes: EventEmitter<SdGridConfigurationResult>;
|
|
22
|
+
configuration: SdGridConfiguration;
|
|
23
|
+
isCreatingColumn: boolean;
|
|
24
|
+
selected: {
|
|
25
|
+
[key: string]: boolean;
|
|
26
|
+
};
|
|
27
|
+
disabledDrag: boolean;
|
|
28
|
+
constructor(ref: ChangeDetectorRef, notifyService: SdNotifyService, translateService: SdTranslateService, gridConfigurationService: SdTableConfigurationService);
|
|
29
|
+
ngOnInit(): void;
|
|
30
|
+
mouseUp(event: any): void;
|
|
31
|
+
open: () => Promise<void>;
|
|
32
|
+
onSave: () => void;
|
|
33
|
+
onReset: () => Promise<void>;
|
|
34
|
+
createColumn: () => Promise<void>;
|
|
35
|
+
confirm: () => Promise<void>;
|
|
36
|
+
dropTable(event: CdkDragDrop<SdTableColumn[]>): void;
|
|
37
|
+
handleMouseDown(): void;
|
|
38
|
+
handleMouseUp(): void;
|
|
39
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { SdTableOption } from '../../models/table-option.model';
|
|
3
|
+
export declare class SdGridQuickAction {
|
|
4
|
+
gridOption: SdTableOption;
|
|
5
|
+
selectedItems: any[];
|
|
6
|
+
clear: EventEmitter<any>;
|
|
7
|
+
constructor();
|
|
8
|
+
onClear: () => void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
export declare class SdMaterialFilterDefDirective {
|
|
3
|
+
templateRef: TemplateRef<any>;
|
|
4
|
+
sdMaterialFilterDef: string;
|
|
5
|
+
set showing(val: boolean | '');
|
|
6
|
+
defaultShowing: boolean;
|
|
7
|
+
constructor(templateRef: TemplateRef<any>);
|
|
8
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SdBadgeColor } from "@sd-angular/core/badge";
|
|
2
|
+
export interface SdCellView {
|
|
3
|
+
badge?: {
|
|
4
|
+
type: 'round' | 'circle' | 'icon';
|
|
5
|
+
color: SdBadgeColor;
|
|
6
|
+
icon: string;
|
|
7
|
+
};
|
|
8
|
+
tooltip?: string;
|
|
9
|
+
display: {
|
|
10
|
+
align: 'center' | 'left' | 'right';
|
|
11
|
+
value: string;
|
|
12
|
+
hasHtml?: boolean;
|
|
13
|
+
html?: string;
|
|
14
|
+
};
|
|
15
|
+
click?: () => void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { SdBadgeColor } from '@sd-angular/core/badge';
|
|
2
|
+
export declare type SdTableColumn<T = any> = SdTableColumnText<T> | SdTableColumnNumber<T> | SdTableColumnBool<T> | SdTableColumnDate<T> | SdTableColumnValues<T> | SdTableColumnChildren<T>;
|
|
3
|
+
export declare type SdFilterOperator = 'EQUAL' | 'NOT_EQUAL' | 'CONTAIN' | 'NOT_CONTAIN' | 'IN' | 'NOT_IN' | 'START_WITH' | 'END_WITH' | 'GREATER_THAN' | 'LESS_THAN' | 'GREATER_OR_EQUAL' | 'LESS_OR_EQUAL';
|
|
4
|
+
export declare const SdFilterOperators: {
|
|
5
|
+
value: SdFilterOperator;
|
|
6
|
+
symbol?: string;
|
|
7
|
+
display: string;
|
|
8
|
+
}[];
|
|
9
|
+
export declare type SdTableColumnTransformFunc<T = any> = (value: any, rowData: T, args?: {
|
|
10
|
+
isExport?: boolean;
|
|
11
|
+
}) => string | Promise<string>;
|
|
12
|
+
interface SdTableColumnBase<T = any> {
|
|
13
|
+
field: string;
|
|
14
|
+
title: string;
|
|
15
|
+
titleHtml?: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
width?: string;
|
|
18
|
+
hidden?: boolean;
|
|
19
|
+
invisible?: boolean;
|
|
20
|
+
fixed?: boolean;
|
|
21
|
+
align?: 'center' | 'left' | 'right';
|
|
22
|
+
htmlTemplate?: (value: any, rowData: T, isMobileOrTablet: boolean) => string;
|
|
23
|
+
transform?: SdTableColumnTransformFunc<T>;
|
|
24
|
+
tooltip?: (value: any, rowData: T) => string;
|
|
25
|
+
click?: (value: any, rowData: T) => void;
|
|
26
|
+
sortable?: boolean;
|
|
27
|
+
filter?: {
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
defaultShowing?: boolean;
|
|
30
|
+
default?: any;
|
|
31
|
+
operator?: {
|
|
32
|
+
enable?: boolean;
|
|
33
|
+
list?: SdFilterOperator[];
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export?: {
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
interface SdTableColumnText<T = any> extends SdTableColumnBase<T> {
|
|
41
|
+
type: 'string';
|
|
42
|
+
badge?: (value: any, rowData: T) => SdBadgeColor;
|
|
43
|
+
badgeIcon?: (value: any, rowData: T) => string;
|
|
44
|
+
badgeType?: 'circle' | 'icon';
|
|
45
|
+
editor?: {
|
|
46
|
+
change?: (rowData: T, selected?: any) => void;
|
|
47
|
+
hidden?: boolean | ((rowData: T) => boolean);
|
|
48
|
+
disabled?: boolean | ((rowData: T) => boolean);
|
|
49
|
+
required?: boolean | ((rowData: T) => boolean);
|
|
50
|
+
minLength?: number;
|
|
51
|
+
maxLength?: number;
|
|
52
|
+
validator?: (rowData: T) => string;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
interface SdTableColumnNumber<T = any> extends SdTableColumnBase<T> {
|
|
56
|
+
type: 'number';
|
|
57
|
+
badge?: (value: any, rowData: T) => SdBadgeColor;
|
|
58
|
+
badgeIcon?: (value: any, rowData: T) => string;
|
|
59
|
+
badgeType?: 'circle' | 'icon';
|
|
60
|
+
editor?: {
|
|
61
|
+
change?: (rowData: T, selected?: any) => void;
|
|
62
|
+
hidden?: boolean | ((rowData: T) => boolean);
|
|
63
|
+
disabled?: boolean | ((rowData: T) => boolean);
|
|
64
|
+
required?: boolean | ((rowData: T) => boolean);
|
|
65
|
+
minValue?: number;
|
|
66
|
+
maxValue?: number;
|
|
67
|
+
precision?: number;
|
|
68
|
+
validator?: (rowData: T) => string;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
interface SdTableColumnBool<T = any> extends SdTableColumnBase<T> {
|
|
72
|
+
type: 'bool';
|
|
73
|
+
option?: {
|
|
74
|
+
displayOnTrue?: string;
|
|
75
|
+
displayOnFalse?: string;
|
|
76
|
+
};
|
|
77
|
+
badgeType?: 'circle';
|
|
78
|
+
editor?: {
|
|
79
|
+
change?: (rowData: T, selected?: any) => void;
|
|
80
|
+
hidden?: boolean | ((rowData: T) => boolean);
|
|
81
|
+
disabled?: boolean | ((rowData: T) => boolean);
|
|
82
|
+
required?: boolean | ((rowData: T) => boolean);
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
interface SdTableColumnDate<T = any> extends SdTableColumnBase<T> {
|
|
86
|
+
type: 'date' | 'datetime' | 'time';
|
|
87
|
+
option?: {
|
|
88
|
+
useFilterDate?: boolean;
|
|
89
|
+
timeDifferent?: 'second' | 'minute' | 'hour' | 'day' | 'month';
|
|
90
|
+
};
|
|
91
|
+
transformDate?: (value: any, rowData: T) => string | Date;
|
|
92
|
+
editor?: {
|
|
93
|
+
change?: (rowData: T, selected?: any) => void;
|
|
94
|
+
hidden?: boolean | ((rowData: T) => boolean);
|
|
95
|
+
disabled?: boolean | ((rowData: T) => boolean);
|
|
96
|
+
required?: boolean | ((rowData: T) => boolean);
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
export interface SdTableColumnValues<T = any> extends SdTableColumnBase<T> {
|
|
100
|
+
type: 'values';
|
|
101
|
+
badge?: (value: any, rowData: T) => SdBadgeColor;
|
|
102
|
+
badgeIcon?: (value: any, rowData: T) => string;
|
|
103
|
+
badgeType?: 'circle' | 'icon';
|
|
104
|
+
option: {
|
|
105
|
+
items: any[] | ((searchText?: string, isFormValue?: boolean) => Promise<any[]>) | ((searchText?: string[], isFormValue?: boolean) => Promise<any[]>);
|
|
106
|
+
valueField: string;
|
|
107
|
+
displayField: string;
|
|
108
|
+
selection?: 'AUTOCOMPLETE' | 'MULTIPLE' | 'MULTIPLEAUTOCOMPLETE' | 'AUTOCOMPLETE_EDITOR' | 'MULTIPLE_EDITOR' | 'MULTIPLEAUTOCOMPLETE_EDITOR';
|
|
109
|
+
};
|
|
110
|
+
editor?: {
|
|
111
|
+
change?: (rowData: T, selected?: any) => void;
|
|
112
|
+
add?: (rowData: T) => void;
|
|
113
|
+
edit?: (option: any, rowData: T) => void;
|
|
114
|
+
delete?: (option: any, rowData: T) => void;
|
|
115
|
+
hidden?: boolean | ((rowData: T) => boolean);
|
|
116
|
+
disabled?: boolean | ((rowData: T) => boolean);
|
|
117
|
+
required?: boolean | ((rowData: T) => boolean);
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
declare type SdTableColumnNormal<T> = Exclude<SdTableColumn<T>, SdTableColumnChildren<T>>;
|
|
121
|
+
export interface SdTableColumnChildren<T = any> extends SdTableColumnBase<T> {
|
|
122
|
+
type: 'children';
|
|
123
|
+
children: SdTableColumnNormal<T>[];
|
|
124
|
+
}
|
|
125
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare type SdTableCommand<T = any> = SdTableCommandNormal<T> | SdTableCommandChildren<T>;
|
|
2
|
+
export interface SdTableCommandNormal<T = any> {
|
|
3
|
+
icon?: string | ((rowData: T) => string);
|
|
4
|
+
fontSet?: 'material-icons' | 'material-icons-outlined' | 'material-icons-outlined' | 'material-icons-round' | 'material-icons-sharp';
|
|
5
|
+
title?: string | ((rowData: T) => string);
|
|
6
|
+
disabled?: boolean | ((rowData: T) => boolean);
|
|
7
|
+
hidden?: boolean | ((rowData: T) => boolean | Promise<boolean>);
|
|
8
|
+
click: (rowData: T) => void;
|
|
9
|
+
htmlTemplate?: (rowData: T) => string;
|
|
10
|
+
}
|
|
11
|
+
interface SdTableCommandChildren<T = any> {
|
|
12
|
+
icon?: string | ((rowData: T) => string);
|
|
13
|
+
fontSet?: 'material-icons' | 'material-icons-outlined' | 'material-icons-outlined' | 'material-icons-round' | 'material-icons-sharp';
|
|
14
|
+
title?: string | ((rowData: T) => string);
|
|
15
|
+
disabled?: boolean | ((rowData: T) => boolean);
|
|
16
|
+
hidden?: boolean | ((rowData: T) => boolean | Promise<boolean>);
|
|
17
|
+
children: SdTableCommandNormal<T>[];
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { SdFilterOperator } from './table-column.model';
|
|
3
|
+
export interface ISdTableConfiguration {
|
|
4
|
+
filter?: {
|
|
5
|
+
quickFilter?: boolean;
|
|
6
|
+
operator?: {
|
|
7
|
+
defaultListString?: SdFilterOperator[];
|
|
8
|
+
defaultListNumber?: SdFilterOperator[];
|
|
9
|
+
defaultListDate?: SdFilterOperator[];
|
|
10
|
+
defaultListValues?: SdFilterOperator[];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
paginate?: {
|
|
14
|
+
pageSize?: number;
|
|
15
|
+
pages?: number[];
|
|
16
|
+
};
|
|
17
|
+
translate?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare const DEFAULT_TABLE_CONFIG: ISdTableConfiguration;
|
|
20
|
+
export declare const TABLE_CONFIG: InjectionToken<ISdTableConfiguration>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface SdTableMetaSelector {
|
|
2
|
+
selectable?: boolean;
|
|
3
|
+
isSelected?: boolean;
|
|
4
|
+
actions?: string[];
|
|
5
|
+
}
|
|
6
|
+
export interface SdTableMetaExpand {
|
|
7
|
+
isExpanded?: boolean;
|
|
8
|
+
isExpanding?: boolean;
|
|
9
|
+
data?: any;
|
|
10
|
+
}
|
|
11
|
+
export interface SdTableMeta<T> {
|
|
12
|
+
id?: string;
|
|
13
|
+
selector?: SdTableMetaSelector;
|
|
14
|
+
expand?: SdTableMetaExpand;
|
|
15
|
+
group?: {
|
|
16
|
+
htmlTemplate?: string;
|
|
17
|
+
items?: SdTableItem<T>[];
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export interface SdTableItem<T = any> {
|
|
21
|
+
meta: SdTableMeta<T>;
|
|
22
|
+
origin: T;
|
|
23
|
+
current: T;
|
|
24
|
+
}
|
|
25
|
+
export declare const MapToSdTableItem: <T = any>(item: T) => SdTableItem<T>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { SdTableColumn } from './table-column.model';
|
|
3
|
+
export interface SdTableConfigOption<T = any> {
|
|
4
|
+
key?: string;
|
|
5
|
+
visible?: boolean;
|
|
6
|
+
storage?: 'session' | 'server';
|
|
7
|
+
customColumn?: boolean;
|
|
8
|
+
args?: {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
};
|
|
11
|
+
systemColumn?: {
|
|
12
|
+
permission?: 'READ' | 'CREATE' | 'UPDATE' | 'DELETE';
|
|
13
|
+
args?: {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface SdOriginColumn {
|
|
19
|
+
field: string;
|
|
20
|
+
title: string;
|
|
21
|
+
width?: string;
|
|
22
|
+
invisible?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface SdColumnConfiguration {
|
|
25
|
+
origin: SdOriginColumn;
|
|
26
|
+
title?: string;
|
|
27
|
+
width?: string;
|
|
28
|
+
invisible?: boolean;
|
|
29
|
+
fixed?: boolean;
|
|
30
|
+
htmlTemplate?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface SdGridConfiguration {
|
|
33
|
+
columns?: SdColumnConfiguration[];
|
|
34
|
+
}
|
|
35
|
+
export interface SdGridConfigurationResult {
|
|
36
|
+
column: {
|
|
37
|
+
[field: string]: {
|
|
38
|
+
title?: string;
|
|
39
|
+
width?: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
fixedColumn: {
|
|
43
|
+
[field: string]: {
|
|
44
|
+
title?: string;
|
|
45
|
+
width?: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
firstColumns: SdTableColumn[];
|
|
49
|
+
secondColumns: SdTableColumn[];
|
|
50
|
+
firstHeaders: string[];
|
|
51
|
+
secondHeaders: string[];
|
|
52
|
+
displayedColumns: string[];
|
|
53
|
+
displayedFooters: string[];
|
|
54
|
+
multipleHeader: boolean;
|
|
55
|
+
}
|
|
56
|
+
export interface SdGridConfigurationCache {
|
|
57
|
+
load: () => Promise<void>;
|
|
58
|
+
get: () => Promise<SdGridConfiguration>;
|
|
59
|
+
set: (configuration: SdGridConfiguration) => SdGridConfiguration;
|
|
60
|
+
remove: () => void;
|
|
61
|
+
observer: Observable<SdGridConfiguration>;
|
|
62
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { SdTableFilterRequest } from '../services/table-filter/table-filter.model';
|
|
2
|
+
export interface SdTableOptionExport<T = any> {
|
|
3
|
+
key?: string;
|
|
4
|
+
visible?: 'ALL' | 'EXCEL' | 'CSV';
|
|
5
|
+
enableUpload?: boolean;
|
|
6
|
+
fileName?: string;
|
|
7
|
+
max?: number;
|
|
8
|
+
maxItemsPerRequest?: number;
|
|
9
|
+
batch?: number;
|
|
10
|
+
items?: (filterRequest: SdTableFilterRequest) => T[] | Promise<T[]> | Promise<{
|
|
11
|
+
items: any[];
|
|
12
|
+
total: number;
|
|
13
|
+
}>;
|
|
14
|
+
mapping?: (items: T[], fileName?: string) => T[] | Promise<T[]>;
|
|
15
|
+
columns?: SdTableOptionExportColumn<T>[];
|
|
16
|
+
sheets?: {
|
|
17
|
+
name: string;
|
|
18
|
+
items: any[] | ((items?: any[]) => any[] | Promise<any[]>);
|
|
19
|
+
fields: string[];
|
|
20
|
+
}[];
|
|
21
|
+
}
|
|
22
|
+
export interface SdTableOptionExportColumn<T = any> {
|
|
23
|
+
field: string;
|
|
24
|
+
title: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
width?: string;
|
|
27
|
+
transform?: (value: any, rowData: T) => string;
|
|
28
|
+
export?: {
|
|
29
|
+
disabled: boolean;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface SdTableOptionSelector<T = any> {
|
|
2
|
+
visible?: boolean;
|
|
3
|
+
single?: boolean;
|
|
4
|
+
actions?: SdTableAction<T>[];
|
|
5
|
+
message?: string | ((selectedItems?: T[]) => string);
|
|
6
|
+
onSelect?: (rowData?: T, selectedItems?: T[]) => void;
|
|
7
|
+
onSelectAll?: (selectedItems: T[]) => void;
|
|
8
|
+
disabled?: (rowData?: T, selectedItems?: T[]) => boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare type SdTableAction<T = any> = SdTableActionNormal<T> | SdTableActionChildren<T>;
|
|
11
|
+
export interface SdTableActionNormal<T = any> {
|
|
12
|
+
icon?: string | ((rowData: T) => string);
|
|
13
|
+
fontSet?: 'material-icons' | 'material-icons-outlined' | 'material-icons-outlined' | 'material-icons-round' | 'material-icons-sharp';
|
|
14
|
+
tooltip?: string;
|
|
15
|
+
title?: string;
|
|
16
|
+
color?: 'primary' | 'accent' | 'warn' | 'info' | 'success' | 'warning' | 'danger' | 'secondary';
|
|
17
|
+
type?: 'fill' | 'light' | 'outline' | 'link';
|
|
18
|
+
hidden?: boolean | ((rowData?: T) => boolean);
|
|
19
|
+
isGrouped?: boolean;
|
|
20
|
+
click: (selectedItems?: T[]) => void;
|
|
21
|
+
}
|
|
22
|
+
interface SdTableActionChildren<T = any> {
|
|
23
|
+
icon?: string | ((rowData: T) => string);
|
|
24
|
+
fontSet?: 'material-icons' | 'material-icons-outlined' | 'material-icons-outlined' | 'material-icons-round' | 'material-icons-sharp';
|
|
25
|
+
tooltip?: string;
|
|
26
|
+
title?: string;
|
|
27
|
+
color?: 'primary' | 'accent' | 'warn' | 'info' | 'success' | 'warning' | 'danger' | 'secondary';
|
|
28
|
+
type?: 'fill' | 'light' | 'outline' | 'link';
|
|
29
|
+
isGrouped?: boolean;
|
|
30
|
+
children: SdTableActionNormal<T>[];
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { SdTableColumn } from './table-column.model';
|
|
2
|
+
import { SdTableCommand } from './table-command.model';
|
|
3
|
+
import { SdTableFilterRequest, SdTableOptionFilter } from '../services/table-filter/table-filter.model';
|
|
4
|
+
import { SdTableOptionExport } from './table-option-export.model';
|
|
5
|
+
import { SdTableOptionReload } from './table-option-reload.model';
|
|
6
|
+
import { SdTableOptionExpand } from './table-option-expand.model';
|
|
7
|
+
import { SdTableOptionSelector } from './table-option-selector.model';
|
|
8
|
+
import { SdTableOptionStyle } from './table-option-style.model';
|
|
9
|
+
import { SdTableOptionGroup } from './table-option-group.model';
|
|
10
|
+
import { SdTableOptionSort } from './table-option-sort.model';
|
|
11
|
+
import { SdTableOptionPaginate } from './table-option-paginate.model';
|
|
12
|
+
import { SdTableConfigOption } from './table-option-config.model';
|
|
13
|
+
export declare type SdTableOption<T = any> = SdTableLocalOption<T> | SdTableServerOption<T>;
|
|
14
|
+
interface SdTableBaseOption<T = any> {
|
|
15
|
+
key?: string;
|
|
16
|
+
config?: SdTableConfigOption<T>;
|
|
17
|
+
selector?: SdTableOptionSelector<T>;
|
|
18
|
+
expand?: SdTableOptionExpand<T>;
|
|
19
|
+
sort?: SdTableOptionSort;
|
|
20
|
+
paginate?: SdTableOptionPaginate;
|
|
21
|
+
reload?: SdTableOptionReload<T>;
|
|
22
|
+
export?: SdTableOptionExport<T>;
|
|
23
|
+
group?: SdTableOptionGroup<T>;
|
|
24
|
+
filter?: SdTableOptionFilter;
|
|
25
|
+
commands?: SdTableCommand<T>[];
|
|
26
|
+
columns: SdTableColumn<T>[];
|
|
27
|
+
style?: SdTableOptionStyle<T>;
|
|
28
|
+
displayOnEmpty?: boolean | ((rowData: T, column?: SdTableColumn<T>) => string) | {
|
|
29
|
+
display?: boolean | ((rowData: T, column?: SdTableColumn<T>) => string);
|
|
30
|
+
emptyValues?: any[];
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
interface SdTableLocalOption<T = any> extends SdTableBaseOption<T> {
|
|
34
|
+
type: 'local';
|
|
35
|
+
items: () => T[] | Promise<T[]>;
|
|
36
|
+
}
|
|
37
|
+
interface SdTableServerOption<T = any> extends SdTableBaseOption<T> {
|
|
38
|
+
type: 'server';
|
|
39
|
+
items: (filterRequest: SdTableFilterRequest) => Promise<{
|
|
40
|
+
items: T[];
|
|
41
|
+
total: number;
|
|
42
|
+
}>;
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { SdUtilityService } from '@sd-angular/core/utility';
|
|
3
|
+
import { DeviceDetectorService } from 'ngx-device-detector';
|
|
4
|
+
import { SdCellView } from '../models/grid-cell.model';
|
|
5
|
+
import { SdTableColumn } from '../models/table-column.model';
|
|
6
|
+
import { SdTableOption } from '../models/table-option.model';
|
|
7
|
+
import { SdColumnValuesPipe } from './column-values.pipe';
|
|
8
|
+
import { SdTableItem } from '../models/table-item.model';
|
|
9
|
+
export declare class SdCellViewPipe implements PipeTransform {
|
|
10
|
+
#private;
|
|
11
|
+
private utilityService;
|
|
12
|
+
private columnValuesPipe;
|
|
13
|
+
constructor(deviceService: DeviceDetectorService, utilityService: SdUtilityService, columnValuesPipe: SdColumnValuesPipe);
|
|
14
|
+
transform(value: any, tableItem: SdTableItem, column: SdTableColumn, gridOption: SdTableOption): Promise<SdCellView>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { SdBadgeColor } from '@sd-angular/core/badge';
|
|
3
|
+
import { SdTableColumn } from '../models/table-column.model';
|
|
4
|
+
export declare class SdColumnBadgePipe implements PipeTransform {
|
|
5
|
+
constructor();
|
|
6
|
+
transform(value: any, rowData: any, column: SdTableColumn): {
|
|
7
|
+
type: 'round' | 'circle' | 'icon';
|
|
8
|
+
color: SdBadgeColor;
|
|
9
|
+
icon: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { DeviceDetectorService } from 'ngx-device-detector';
|
|
3
|
+
import { SdTableColumn } from '../models/table-column.model';
|
|
4
|
+
export declare class SdColumnChildrenFilterPipe implements PipeTransform {
|
|
5
|
+
#private;
|
|
6
|
+
constructor(deviceService: DeviceDetectorService);
|
|
7
|
+
transform(columns: SdTableColumn[], item: any): SdTableColumn[];
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { DeviceDetectorService } from 'ngx-device-detector';
|
|
3
|
+
import { SdTableColumn } from '../models/table-column.model';
|
|
4
|
+
export declare class SdColumnHtmlTemplatePipe implements PipeTransform {
|
|
5
|
+
private isMobileOrTablet;
|
|
6
|
+
constructor(deviceService: DeviceDetectorService);
|
|
7
|
+
transform(value: any, rowData: any, column: SdTableColumn): string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { SdTableColumn } from '../models/table-column.model';
|
|
3
|
+
export declare class SdColumnTooltipPipe implements PipeTransform {
|
|
4
|
+
constructor();
|
|
5
|
+
transform(value: any, rowData: any, column: SdTableColumn): string;
|
|
6
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { SdTableColumn } from '../models/table-column.model';
|
|
3
|
+
import { SdColumnValuesPipe } from './column-values.pipe';
|
|
4
|
+
export declare class SdColumnTransformPipe implements PipeTransform {
|
|
5
|
+
private columnValuesPipe;
|
|
6
|
+
constructor(columnValuesPipe: SdColumnValuesPipe);
|
|
7
|
+
transform(value: any, rowData: any, column: SdTableColumn, key?: string): Promise<string>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { SdTableCommand } from '../models/table-command.model';
|
|
3
|
+
import { SdTableItem } from '../models/table-item.model';
|
|
4
|
+
export declare class SdCommandFilterPipe implements PipeTransform {
|
|
5
|
+
transform(item: SdTableItem, commands: SdTableCommand[]): Promise<SdTableCommand[]>;
|
|
6
|
+
}
|