easy-mat-ui 0.0.7 → 1.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.
- package/LICENSE +21 -0
- package/README.md +361 -63
- package/fesm2022/easy-mat-ui.mjs +2183 -428
- package/fesm2022/easy-mat-ui.mjs.map +1 -1
- package/index.d.ts +911 -54
- package/package.json +59 -22
- package/page-generator/blocks.js +155 -0
- package/page-generator/catalog.js +132 -0
- package/page-generator/cli/main.js +314 -0
- package/page-generator/cli/project.js +252 -0
- package/page-generator/context.js +108 -0
- package/page-generator/generate.js +182 -0
- package/page-generator/index.js +33 -0
- package/page-generator/naming.js +53 -0
- package/page-generator/table.js +310 -0
- package/page-generator/types.js +6 -0
- package/styles/styles/_backgrounds.scss +39 -0
- package/styles/styles/_buttons.scss +90 -0
- package/styles/styles/_colors.scss +197 -0
- package/styles/styles/_effects.scss +44 -0
- package/styles/styles/_material-overrides.scss +106 -0
- package/styles/styles/_spacing.scss +68 -0
- package/styles/styles/_tables.scss +569 -0
- package/styles/styles/_typography.scss +100 -0
- package/styles/styles.scss +29 -0
package/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { OnInit, AfterViewInit, EventEmitter, ChangeDetectorRef,
|
|
2
|
+
import { OnInit, OnChanges, AfterViewInit, EventEmitter, ChangeDetectorRef, SimpleChanges, QueryList, Injector, InjectionToken, Provider } from '@angular/core';
|
|
3
3
|
import { MatTableDataSource, MatTable } from '@angular/material/table';
|
|
4
|
-
import { MatPaginator } from '@angular/material/paginator';
|
|
4
|
+
import { MatPaginator, MatPaginatorIntl } from '@angular/material/paginator';
|
|
5
5
|
import { MatSort } from '@angular/material/sort';
|
|
6
|
-
import { MatFormFieldAppearance } from '@angular/material/form-field';
|
|
7
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
8
6
|
import { FormControl } from '@angular/forms';
|
|
9
7
|
import { MatSelect } from '@angular/material/select';
|
|
8
|
+
import { MatFormFieldAppearance } from '@angular/material/form-field';
|
|
10
9
|
import { Observable } from 'rxjs';
|
|
11
10
|
import { MatOptionSelectionChange } from '@angular/material/core';
|
|
11
|
+
import { MatDialogConfig, MatDialogRef } from '@angular/material/dialog';
|
|
12
12
|
|
|
13
13
|
declare class EasyMatUiService {
|
|
14
14
|
constructor();
|
|
@@ -39,7 +39,8 @@ declare enum ColumnType {
|
|
|
39
39
|
ICON_AND_TEXT = "icon-and-text",
|
|
40
40
|
PASSWORD = "password",
|
|
41
41
|
BUTTON = "button",
|
|
42
|
-
DROPDOWNLIST = "dropdownlist"
|
|
42
|
+
DROPDOWNLIST = "dropdownlist",
|
|
43
|
+
IMAGE = "image"
|
|
43
44
|
}
|
|
44
45
|
declare enum ColumnSize {
|
|
45
46
|
XSmall = "x-small-column",
|
|
@@ -50,12 +51,21 @@ declare enum ColumnSize {
|
|
|
50
51
|
}
|
|
51
52
|
declare enum InputType {
|
|
52
53
|
Dropdown = "ddl",
|
|
54
|
+
MultiSelect = "multiselect",
|
|
53
55
|
Text = "text",
|
|
54
56
|
Number = "number",
|
|
55
57
|
Date = "date",
|
|
56
58
|
TextArea = "textarea",
|
|
57
59
|
Checkbox = "checkbox"
|
|
58
60
|
}
|
|
61
|
+
declare enum ScreenSize {
|
|
62
|
+
lg = 1281,// High Resolution desktops min-width:1281px
|
|
63
|
+
md = 1025,// Laptop and desktops min-width:1025px
|
|
64
|
+
sml = 801,// Landscape Tablet and iPads min-width:801px
|
|
65
|
+
sm = 600,// Portrait Tablet and iPads min-width:600px
|
|
66
|
+
xsl = 480,// Phone with Landscape mode min-width:480px
|
|
67
|
+
sx = 320
|
|
68
|
+
}
|
|
59
69
|
|
|
60
70
|
declare class Dictionary {
|
|
61
71
|
key: string;
|
|
@@ -72,10 +82,41 @@ declare class Tuple {
|
|
|
72
82
|
constructor(item1: string, item2: string, item3: string | null, item4?: string | null | undefined);
|
|
73
83
|
}
|
|
74
84
|
|
|
85
|
+
/** How a column is filtered from the table header: a multi-select of its values, or a free text input. */
|
|
86
|
+
type ColumnFilterType = 'select' | 'text';
|
|
75
87
|
declare class MatColumnTyped {
|
|
88
|
+
static readonly ColumnType: {
|
|
89
|
+
readonly ICON: "icon";
|
|
90
|
+
readonly TEXT: "text";
|
|
91
|
+
readonly DATE: "date";
|
|
92
|
+
readonly DATE_TIME: "date-time";
|
|
93
|
+
readonly NUMBER: "number";
|
|
94
|
+
readonly FILTER: "filter";
|
|
95
|
+
readonly ICON_AND_TEXT: "icon-and-text";
|
|
96
|
+
readonly PASSWORD: "password";
|
|
97
|
+
readonly BUTTON: "button";
|
|
98
|
+
readonly DROPDOWNLIST: "dropdownlist";
|
|
99
|
+
readonly IMAGE: "image";
|
|
100
|
+
};
|
|
101
|
+
static readonly ColumnSize: {
|
|
102
|
+
readonly XSmall: "x-small-column";
|
|
103
|
+
readonly Small: "small-column";
|
|
104
|
+
readonly Medium: "medium-column";
|
|
105
|
+
readonly Large: "large-column";
|
|
106
|
+
readonly XLarge: "x-large-column";
|
|
107
|
+
};
|
|
108
|
+
static readonly InputType: {
|
|
109
|
+
readonly Dropdown: "ddl";
|
|
110
|
+
readonly MultiSelect: "multiselect";
|
|
111
|
+
readonly Text: "text";
|
|
112
|
+
readonly Number: "number";
|
|
113
|
+
readonly Date: "date";
|
|
114
|
+
readonly TextArea: "textarea";
|
|
115
|
+
readonly Checkbox: "checkbox";
|
|
116
|
+
};
|
|
76
117
|
name: string;
|
|
77
118
|
value: string | null;
|
|
78
|
-
type?: ColumnType;
|
|
119
|
+
type?: ColumnType | string;
|
|
79
120
|
enableIcon: string;
|
|
80
121
|
disableIcon: string;
|
|
81
122
|
enableColor: string;
|
|
@@ -86,16 +127,26 @@ declare class MatColumnTyped {
|
|
|
86
127
|
disableTitleFromColumnName: string | null;
|
|
87
128
|
mixColumnIconColor: Tuple[];
|
|
88
129
|
enableFilter: boolean;
|
|
130
|
+
/** Kind of header filter shown when `enableFilter` is on (and `withFilterInHeader` for the table). */
|
|
131
|
+
filterType: ColumnFilterType;
|
|
89
132
|
filterList: any[];
|
|
90
133
|
isOverwriting: boolean;
|
|
91
134
|
readonly: boolean;
|
|
92
135
|
stickyClass: string;
|
|
136
|
+
/**
|
|
137
|
+
* CSS class(es) added to the header cell of this column only, never to its body cells. With a class such as
|
|
138
|
+
* `text-center` or `text-end` the title (or header icon) is aligned accordingly, for example to centre the title of
|
|
139
|
+
* an icon column while the cells keep their own alignment. Empty by default: the header looks as before.
|
|
140
|
+
*/
|
|
141
|
+
headerClass: string;
|
|
93
142
|
isDynamic: boolean;
|
|
94
143
|
displayColumn: string | null;
|
|
144
|
+
filterValue: string | null;
|
|
145
|
+
isRequired: boolean;
|
|
95
146
|
id: string;
|
|
96
147
|
size?: ColumnSize | string;
|
|
97
148
|
gridSize: number;
|
|
98
|
-
inputType?: InputType;
|
|
149
|
+
inputType?: InputType | string;
|
|
99
150
|
order: number;
|
|
100
151
|
compareFn?: (o1: any, o2: any) => boolean;
|
|
101
152
|
cssClass?: string;
|
|
@@ -104,17 +155,37 @@ declare class MatColumnTyped {
|
|
|
104
155
|
groupName: string;
|
|
105
156
|
groupClass: string;
|
|
106
157
|
groupLabel: string;
|
|
107
|
-
groupOrder: number;
|
|
158
|
+
groupOrder: number | null;
|
|
159
|
+
translateTitle?: string | null;
|
|
160
|
+
title?: string | null;
|
|
161
|
+
titleFallback?: string | null;
|
|
162
|
+
headerIcon?: string | null;
|
|
108
163
|
constructor(init?: Partial<MatColumnTyped>);
|
|
164
|
+
static allColumnTypes(): string[];
|
|
165
|
+
static allColumnSizes(): string[];
|
|
166
|
+
static allInputTypes(): string[];
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
type TitlePipe = (value: any, arg?: string) => any;
|
|
170
|
+
type TitleTranslate = (key: string) => string;
|
|
171
|
+
declare class TitleFormatter {
|
|
172
|
+
private static readonly LOCALE;
|
|
173
|
+
private static readonly pipes;
|
|
174
|
+
static register(name: string, fn: TitlePipe): void;
|
|
175
|
+
static format(template: string | null | undefined, item: any, fallback?: string | null, translate?: TitleTranslate): string;
|
|
176
|
+
private static tryRun;
|
|
177
|
+
private static run;
|
|
178
|
+
private static render;
|
|
109
179
|
}
|
|
110
180
|
|
|
111
181
|
declare class MatTabCommon {
|
|
112
|
-
static displayFormatTyped(column: MatColumnTyped, value: string | null | undefined
|
|
182
|
+
static displayFormatTyped(column: MatColumnTyped, value: string | null | undefined): string | null;
|
|
113
183
|
static toFixed(value: string, digits: number): null | string | undefined;
|
|
184
|
+
static getTitle(col: MatColumnTyped, item: any, translate?: TitleTranslate): string;
|
|
114
185
|
static getCssClasses(col: MatColumnTyped, item: any): string;
|
|
115
186
|
}
|
|
116
187
|
|
|
117
|
-
declare class EasyMultiSelect implements OnInit, AfterViewInit {
|
|
188
|
+
declare class EasyMultiSelect implements OnInit, OnChanges, AfterViewInit {
|
|
118
189
|
private cdref;
|
|
119
190
|
componentId: string;
|
|
120
191
|
data: Dictionary[];
|
|
@@ -124,8 +195,19 @@ declare class EasyMultiSelect implements OnInit, AfterViewInit {
|
|
|
124
195
|
selectedData: Dictionary[];
|
|
125
196
|
readOnly: boolean;
|
|
126
197
|
noPlaceholderNoHint: boolean;
|
|
198
|
+
clearable: boolean;
|
|
127
199
|
padding: string;
|
|
128
|
-
appearance: MatFormFieldAppearance;
|
|
200
|
+
appearance: MatFormFieldAppearance | null;
|
|
201
|
+
formField: boolean;
|
|
202
|
+
/** Text shown while nothing is selected. */
|
|
203
|
+
placeholder: string;
|
|
204
|
+
/** Dense 32px field, used for the column filters in table headers. */
|
|
205
|
+
compact: boolean;
|
|
206
|
+
/**
|
|
207
|
+
* Single choice: one value at a time, so a plain dropdown (no checkboxes, no select all). `change` still emits an
|
|
208
|
+
* array, holding the chosen value. Set it once: it cannot change after the component is created.
|
|
209
|
+
*/
|
|
210
|
+
single: boolean;
|
|
129
211
|
change: EventEmitter<string[]>;
|
|
130
212
|
multiSelectControl: FormControl<string[] | null>;
|
|
131
213
|
searchCtrl: FormControl<string | null>;
|
|
@@ -134,6 +216,10 @@ declare class EasyMultiSelect implements OnInit, AfterViewInit {
|
|
|
134
216
|
uniqueId: string;
|
|
135
217
|
constructor(cdref: ChangeDetectorRef);
|
|
136
218
|
ngOnInit(): void;
|
|
219
|
+
/** The list or the selection given by the parent changed after the first render (for example a filtered list). */
|
|
220
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
221
|
+
private prepareData;
|
|
222
|
+
private applySelectedData;
|
|
137
223
|
initFilterGroup(): void;
|
|
138
224
|
setMultiSelectControl(values: string[] | null): void;
|
|
139
225
|
private _filter;
|
|
@@ -147,30 +233,140 @@ declare class EasyMultiSelect implements OnInit, AfterViewInit {
|
|
|
147
233
|
clear(): void;
|
|
148
234
|
get hidePlaceholder(): boolean;
|
|
149
235
|
static ɵfac: i0.ɵɵFactoryDeclaration<EasyMultiSelect, never>;
|
|
150
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<EasyMultiSelect, "lib-easy-multi-select", never, { "data": { "alias": "data"; "required": false; }; "title": { "alias": "title"; "required": false; }; "valueField": { "alias": "valueField"; "required": false; }; "displayField": { "alias": "displayField"; "required": false; }; "selectedData": { "alias": "selectedData"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "noPlaceholderNoHint": { "alias": "noPlaceholderNoHint"; "required": false; }; "padding": { "alias": "padding"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "idPrefix": { "alias": "idPrefix"; "required": false; }; }, { "change": "change"; }, never, never, true, never>;
|
|
236
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EasyMultiSelect, "lib-easy-multi-select", never, { "data": { "alias": "data"; "required": false; }; "title": { "alias": "title"; "required": false; }; "valueField": { "alias": "valueField"; "required": false; }; "displayField": { "alias": "displayField"; "required": false; }; "selectedData": { "alias": "selectedData"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "noPlaceholderNoHint": { "alias": "noPlaceholderNoHint"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "padding": { "alias": "padding"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "formField": { "alias": "formField"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "compact": { "alias": "compact"; "required": false; }; "single": { "alias": "single"; "required": false; }; "idPrefix": { "alias": "idPrefix"; "required": false; }; }, { "change": "change"; }, never, never, true, never>;
|
|
151
237
|
}
|
|
152
238
|
|
|
153
|
-
declare class
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
239
|
+
declare class ToolbarTranslations {
|
|
240
|
+
title: string | null;
|
|
241
|
+
search: string;
|
|
242
|
+
clear: string;
|
|
243
|
+
addBtn: string;
|
|
244
|
+
exportBtn: string;
|
|
245
|
+
close: string;
|
|
246
|
+
auditTrailBtn: string;
|
|
247
|
+
linkBtn: string;
|
|
248
|
+
editBtn: string;
|
|
249
|
+
deleteBtn: string;
|
|
250
|
+
cancelBtn: string;
|
|
251
|
+
deleteConfirmTitle: string;
|
|
252
|
+
deleteConfirmMessage: string;
|
|
253
|
+
customActionTitle: string;
|
|
254
|
+
constructor(data?: Partial<ToolbarTranslations>);
|
|
255
|
+
}
|
|
256
|
+
declare class ToolbarConfig {
|
|
257
|
+
icon: string;
|
|
258
|
+
iconClass: string;
|
|
259
|
+
withGlobalFilter: boolean;
|
|
260
|
+
isAndFilterOperator: boolean;
|
|
261
|
+
logout: boolean;
|
|
262
|
+
btnSize: string;
|
|
263
|
+
customActionEnable: boolean;
|
|
264
|
+
customActionIcon?: string;
|
|
265
|
+
customRowActionClass: string;
|
|
266
|
+
translations: ToolbarTranslations;
|
|
267
|
+
constructor(data?: Partial<Omit<ToolbarConfig, 'translations'>> & {
|
|
268
|
+
translations?: Partial<ToolbarTranslations>;
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
declare const EASY_DIALOG_DEFAULT_WIDTH = "87%";
|
|
273
|
+
declare const EASY_DIALOG_DEFAULT_MAX_WIDTH = "90vw";
|
|
274
|
+
type EasyDialogSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
275
|
+
type EasyDialogButtonColor = 'green' | 'red' | 'blue' | 'yellow' | 'taupe' | 'info';
|
|
276
|
+
interface EasyDialogField {
|
|
277
|
+
name: string;
|
|
278
|
+
inputType?: InputType | string;
|
|
279
|
+
gridSize?: number;
|
|
280
|
+
order?: number;
|
|
281
|
+
readonly?: boolean;
|
|
282
|
+
size?: ColumnSize | string;
|
|
283
|
+
filterList?: any[];
|
|
284
|
+
displayColumn?: string | null;
|
|
285
|
+
filterValue?: string | null;
|
|
286
|
+
isRequired?: boolean;
|
|
287
|
+
}
|
|
288
|
+
interface EasyDialogAction {
|
|
289
|
+
id: string;
|
|
290
|
+
icon: string;
|
|
291
|
+
title?: string;
|
|
292
|
+
color?: EasyDialogButtonColor;
|
|
293
|
+
disabled?: (data: any) => boolean;
|
|
294
|
+
hidden?: boolean;
|
|
295
|
+
}
|
|
296
|
+
interface EasyDialogTranslations {
|
|
297
|
+
actions: Partial<Record<CRUD, string>>;
|
|
298
|
+
clear: string;
|
|
299
|
+
unsavedTitle: string;
|
|
300
|
+
unsavedMessage: string;
|
|
301
|
+
confirmSave: string;
|
|
302
|
+
discard: string;
|
|
303
|
+
incompleteTitle: string;
|
|
304
|
+
incompleteMessage: string;
|
|
305
|
+
auditCreatedBy: string;
|
|
306
|
+
auditUpdatedBy: string;
|
|
307
|
+
auditOn: string;
|
|
308
|
+
auditInactiveSince: string;
|
|
309
|
+
}
|
|
310
|
+
declare const DEFAULT_EASY_DIALOG_TRANSLATIONS: EasyDialogTranslations;
|
|
311
|
+
interface EasyDialogResult<T = Record<string, any>> {
|
|
312
|
+
event: CRUD | 'Cancel' | string;
|
|
313
|
+
data?: T;
|
|
314
|
+
}
|
|
315
|
+
declare class EasyDialogConfig<T = Record<string, any>> {
|
|
316
|
+
title: string;
|
|
317
|
+
titleField?: string;
|
|
318
|
+
showActionLabel: boolean;
|
|
319
|
+
icon?: string;
|
|
320
|
+
action: CRUD;
|
|
321
|
+
data: T;
|
|
322
|
+
fields: EasyDialogField[];
|
|
323
|
+
prefix: string;
|
|
324
|
+
pk: string;
|
|
325
|
+
validate?: (data: T) => boolean;
|
|
326
|
+
validationMessage?: (data: T) => string | null;
|
|
327
|
+
appearance: MatFormFieldAppearance;
|
|
328
|
+
compact: boolean;
|
|
329
|
+
size?: EasyDialogSize;
|
|
330
|
+
width: string;
|
|
331
|
+
maxWidth: string;
|
|
332
|
+
height?: string;
|
|
333
|
+
saveIcon: string;
|
|
334
|
+
saveTitle: string;
|
|
335
|
+
closeIcon: string;
|
|
336
|
+
closeTitle: string;
|
|
337
|
+
extraActions: EasyDialogAction[];
|
|
338
|
+
translations: EasyDialogTranslations;
|
|
339
|
+
modal: boolean;
|
|
340
|
+
confirmOnClose: boolean;
|
|
341
|
+
withAuditFields: boolean;
|
|
342
|
+
constructor(init?: EasyDialogInit<T>);
|
|
343
|
+
}
|
|
344
|
+
type EasyDialogInit<T = Record<string, any>> = Partial<Omit<EasyDialogConfig<T>, 'translations'>> & {
|
|
345
|
+
translations?: Partial<EasyDialogTranslations>;
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
type EasyTableDialogMode = 'request' | 'open';
|
|
349
|
+
interface EasyTableDialogRequest<T = any> {
|
|
350
|
+
action: CRUD;
|
|
351
|
+
data: T;
|
|
352
|
+
}
|
|
353
|
+
interface EasyTableDialogResult<T = any> {
|
|
354
|
+
request: EasyTableDialogRequest<T>;
|
|
355
|
+
result: EasyDialogResult<T>;
|
|
356
|
+
}
|
|
357
|
+
interface EasyTableDialogConfig {
|
|
358
|
+
add?: boolean;
|
|
359
|
+
edit?: boolean;
|
|
360
|
+
view?: boolean;
|
|
361
|
+
mode?: EasyTableDialogMode;
|
|
362
|
+
form?: EasyDialogInit<any> | ((request: EasyTableDialogRequest) => EasyDialogInit<any>);
|
|
363
|
+
}
|
|
364
|
+
declare function resolveDialogRequest<T = any>(dialog: EasyTableDialogConfig | undefined, action: CRUD, data: T): EasyTableDialogRequest<T> | null;
|
|
365
|
+
|
|
366
|
+
declare class EasyTableConfig<T = any> {
|
|
367
|
+
dataSource?: MatTableDataSource<T>;
|
|
368
|
+
displayedColumns?: (string | MatColumnTyped)[];
|
|
161
369
|
data: any[];
|
|
162
|
-
deleteItemToEmit: EventEmitter<object>;
|
|
163
|
-
addItemToEmit: EventEmitter<CRUD>;
|
|
164
|
-
editItemToEmit: EventEmitter<object>;
|
|
165
|
-
viewItemToEmit: EventEmitter<object>;
|
|
166
|
-
overwriteToEmit: EventEmitter<{
|
|
167
|
-
source: string;
|
|
168
|
-
value: string;
|
|
169
|
-
item: object;
|
|
170
|
-
}>;
|
|
171
|
-
logoutToEmit: EventEmitter<String>;
|
|
172
|
-
titleIconToEmit: EventEmitter<void>;
|
|
173
|
-
customActionToEmit: EventEmitter<void>;
|
|
174
370
|
source: string;
|
|
175
371
|
btnSize: string;
|
|
176
372
|
sortedBy: string;
|
|
@@ -180,12 +376,11 @@ declare class EasyTableComponent<T extends Record<string, never>> implements OnI
|
|
|
180
376
|
logout: boolean;
|
|
181
377
|
fontSize: string;
|
|
182
378
|
customActionEnable: boolean;
|
|
183
|
-
customActionIcon
|
|
184
|
-
customActionTitle
|
|
185
|
-
customActionClass
|
|
186
|
-
icon
|
|
379
|
+
customActionIcon?: string;
|
|
380
|
+
customActionTitle?: string;
|
|
381
|
+
customActionClass?: string;
|
|
382
|
+
icon?: string;
|
|
187
383
|
changePageSize: number;
|
|
188
|
-
sliceSize: number;
|
|
189
384
|
isPreview: boolean;
|
|
190
385
|
shortHeader: boolean;
|
|
191
386
|
canAccess: boolean;
|
|
@@ -193,12 +388,19 @@ declare class EasyTableComponent<T extends Record<string, never>> implements OnI
|
|
|
193
388
|
canUpdate: boolean;
|
|
194
389
|
canExport: boolean;
|
|
195
390
|
canDelete: boolean;
|
|
391
|
+
canImport: boolean;
|
|
392
|
+
canConfiguration: boolean;
|
|
393
|
+
canAudit: boolean;
|
|
394
|
+
canOwner: boolean;
|
|
395
|
+
canManage: boolean;
|
|
196
396
|
canOrder: boolean;
|
|
197
397
|
editAction: boolean;
|
|
198
398
|
deleteAction: boolean;
|
|
399
|
+
confirmDelete: boolean;
|
|
199
400
|
previewAction: boolean;
|
|
200
401
|
withHeader: boolean;
|
|
201
402
|
clickableIcon: boolean;
|
|
403
|
+
withFieldClick: boolean;
|
|
202
404
|
titleIcon: string;
|
|
203
405
|
customRowActionEnable: boolean;
|
|
204
406
|
customRowActionIcon: string;
|
|
@@ -209,33 +411,112 @@ declare class EasyTableComponent<T extends Record<string, never>> implements OnI
|
|
|
209
411
|
withToolbar: boolean;
|
|
210
412
|
withFilterInHeader: boolean;
|
|
211
413
|
expandableGroups: boolean;
|
|
212
|
-
|
|
414
|
+
toolbarConfig: ToolbarConfig;
|
|
415
|
+
filterColumn?: MatColumnTyped;
|
|
213
416
|
customColumnFilter: Dictionary[];
|
|
214
|
-
paginator: MatPaginator;
|
|
215
|
-
sort: MatSort;
|
|
216
|
-
table: MatTable<any> | undefined;
|
|
217
417
|
highlightChangedCells: boolean;
|
|
218
418
|
canAuditTrail: boolean;
|
|
219
|
-
auditTrailToEmit: EventEmitter<object>;
|
|
220
419
|
appearance: MatFormFieldAppearance | 'none';
|
|
221
|
-
multiSelectDropdowns: QueryList<EasyMultiSelect>;
|
|
222
420
|
userFilters: any;
|
|
421
|
+
isExpanded: boolean;
|
|
422
|
+
/** Property that identifies a row (selection highlight). Rows without it are compared by reference. */
|
|
423
|
+
rowKey: string;
|
|
424
|
+
extendableColumnCheck?: string;
|
|
425
|
+
expandedIcon: string;
|
|
426
|
+
dialog?: EasyTableDialogConfig;
|
|
427
|
+
tabTitle?: string;
|
|
428
|
+
tabIcon?: string;
|
|
429
|
+
constructor(init?: Partial<EasyTableConfig>);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
declare class EasyTableComponent<T extends Record<string, any>> implements OnInit, AfterViewInit, OnChanges {
|
|
433
|
+
dataSource: MatTableDataSource<T>;
|
|
434
|
+
private _displayedColumns;
|
|
435
|
+
availableGroups: string[];
|
|
436
|
+
set displayedColumns(value: (string | MatColumnTyped)[]);
|
|
437
|
+
/** True when at least one column has a header filter: every header cell then reserves the same filter row. */
|
|
438
|
+
get hasColumnFilters(): boolean;
|
|
439
|
+
get displayedColumns(): MatColumnTyped[];
|
|
440
|
+
private _config;
|
|
441
|
+
set config(value: Partial<EasyTableConfig<T>>);
|
|
442
|
+
get config(): EasyTableConfig<T>;
|
|
443
|
+
childConfig: EasyTableConfig<any> | EasyTableConfig<any>[];
|
|
444
|
+
childTabChange: EventEmitter<number>;
|
|
445
|
+
deleteItem: EventEmitter<object>;
|
|
446
|
+
addItem: EventEmitter<CRUD>;
|
|
447
|
+
editItem: EventEmitter<object>;
|
|
448
|
+
viewItem: EventEmitter<object>;
|
|
449
|
+
overwrite: EventEmitter<{
|
|
450
|
+
source: string;
|
|
451
|
+
value: string;
|
|
452
|
+
item: object;
|
|
453
|
+
}>;
|
|
454
|
+
logout: EventEmitter<String>;
|
|
455
|
+
titleIconClick: EventEmitter<void>;
|
|
456
|
+
customAction: EventEmitter<void>;
|
|
457
|
+
auditTrail: EventEmitter<object>;
|
|
458
|
+
dialogAction: EventEmitter<EasyTableDialogRequest<any>>;
|
|
459
|
+
dialogResult: EventEmitter<EasyTableDialogResult<any>>;
|
|
460
|
+
extendRow: EventEmitter<any>;
|
|
461
|
+
clickField: EventEmitter<{
|
|
462
|
+
columnName: string;
|
|
463
|
+
row: T;
|
|
464
|
+
}>;
|
|
465
|
+
addChildItem: EventEmitter<CRUD>;
|
|
466
|
+
deleteChildItem: EventEmitter<object>;
|
|
467
|
+
editChildItem: EventEmitter<object>;
|
|
468
|
+
viewChildItem: EventEmitter<object>;
|
|
469
|
+
childDialogAction: EventEmitter<EasyTableDialogRequest<any>>;
|
|
470
|
+
childDialogResult: EventEmitter<EasyTableDialogResult<any>>;
|
|
471
|
+
clickChildField: EventEmitter<{
|
|
472
|
+
columnName: string;
|
|
473
|
+
row: any;
|
|
474
|
+
}>;
|
|
475
|
+
searchTableField: string;
|
|
476
|
+
/**
|
|
477
|
+
* Text the table filters on. It is kept apart from `searchTableField`, the value bound to the toolbar input:
|
|
478
|
+
* typing never pushes a value back into the input, so a delayed change detection cannot overwrite what the
|
|
479
|
+
* user has typed since.
|
|
480
|
+
*/
|
|
481
|
+
searchText: string;
|
|
223
482
|
isAndFilterOperator: boolean;
|
|
224
483
|
ColumnType: typeof ColumnType;
|
|
225
484
|
columnFilters: {
|
|
226
485
|
[key: string]: string;
|
|
227
486
|
};
|
|
487
|
+
/** What the user typed in the text filters, as typed (the filter itself is normalized). */
|
|
488
|
+
columnFilterText: {
|
|
489
|
+
[key: string]: string | undefined;
|
|
490
|
+
};
|
|
491
|
+
/** Header filters are always visible on wide screens; below 1024px this toggles them. */
|
|
492
|
+
filtersOpen: boolean;
|
|
228
493
|
isPasswordVisible: Record<string, boolean>;
|
|
229
494
|
protected readonly MatTabCommon: typeof MatTabCommon;
|
|
230
495
|
expandedGroups: {
|
|
231
496
|
[key: string]: boolean;
|
|
232
497
|
};
|
|
233
|
-
|
|
498
|
+
expandedElement: any;
|
|
499
|
+
childTabIndex: number;
|
|
500
|
+
get childTabs(): EasyTableConfig<any>[] | null;
|
|
501
|
+
onChildTabChange(index: number): void;
|
|
502
|
+
selectedRow: any;
|
|
503
|
+
paginator: MatPaginator;
|
|
504
|
+
sort: MatSort;
|
|
505
|
+
table: MatTable<any> | undefined;
|
|
506
|
+
multiSelectDropdowns: QueryList<EasyMultiSelect>;
|
|
507
|
+
isExpansionDetailRow: (index: number, row: any) => boolean;
|
|
508
|
+
private readonly injector;
|
|
509
|
+
private readonly destroyRef;
|
|
510
|
+
private readonly translate;
|
|
511
|
+
constructor();
|
|
234
512
|
ngOnInit(): void;
|
|
513
|
+
getTableMinWidth(): number;
|
|
235
514
|
getDisplayedColumnNames(): string[];
|
|
236
515
|
get groupedColumns(): [string, MatColumnTyped[]][];
|
|
237
516
|
ngOnChanges(): void;
|
|
238
517
|
loadData(): void;
|
|
518
|
+
/** The rows in display order: always a sorted copy, the array of the application is not reordered. */
|
|
519
|
+
private displayRows;
|
|
239
520
|
syncFiltersWithData(): void;
|
|
240
521
|
ngAfterViewInit(): void;
|
|
241
522
|
updatePageSize(): void;
|
|
@@ -243,25 +524,28 @@ declare class EasyTableComponent<T extends Record<string, never>> implements OnI
|
|
|
243
524
|
clearTableFilter(): void;
|
|
244
525
|
resetDropdownSelection(): void;
|
|
245
526
|
filterType(): void;
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
527
|
+
onDeleteItem(item: object): void;
|
|
528
|
+
onAddItem(): void;
|
|
529
|
+
onEditItem(item: object): void;
|
|
530
|
+
onViewItem(item: object): void;
|
|
531
|
+
private requestDialog;
|
|
532
|
+
onFieldClick(col: MatColumnTyped, row: T): void;
|
|
533
|
+
onOverwrite(element: any, col: MatColumnTyped, event: Event): void;
|
|
251
534
|
close(): void;
|
|
252
|
-
|
|
535
|
+
onCustomAction(): void;
|
|
253
536
|
getIconColumn(col: MatColumnTyped, item: any): string;
|
|
254
537
|
getIconTitle(col: MatColumnTyped, value: string): string;
|
|
255
538
|
getTitleColumn(col: MatColumnTyped, item: any): string;
|
|
256
|
-
|
|
539
|
+
onExportToCsv(): void;
|
|
257
540
|
getHeaderName(columnName: string): string;
|
|
258
541
|
OnToggleChanged(values: Dictionary[]): void;
|
|
259
542
|
setStatusColor(values: Dictionary[]): void;
|
|
260
543
|
getData(data: any[]): void;
|
|
261
|
-
|
|
544
|
+
onAuditTrail(element: object): void;
|
|
262
545
|
applyFilterFromToolbar(): void;
|
|
263
546
|
onChangeDdl(element: any, col: MatColumnTyped, value: any): Promise<void>;
|
|
264
547
|
onChangeMultiSelect(selected: any, col: MatColumnTyped, headerFilter?: boolean): void;
|
|
548
|
+
onColumnTextFilter(value: string, column: MatColumnTyped): void;
|
|
265
549
|
applyFilterByColumn(filterValue: string, column: MatColumnTyped): void;
|
|
266
550
|
getSelectedData(element: any, col: MatColumnTyped): Dictionary[];
|
|
267
551
|
getSelectedList(col: MatColumnTyped): any[];
|
|
@@ -272,8 +556,581 @@ declare class EasyTableComponent<T extends Record<string, never>> implements OnI
|
|
|
272
556
|
togglePassword(key: string): void;
|
|
273
557
|
toggleGroup(groupName: string): void;
|
|
274
558
|
getGroupIndex(groupName: string): number;
|
|
559
|
+
toggleRow(item: any, k: any): void;
|
|
560
|
+
getSelectedRow(element: any): boolean;
|
|
561
|
+
manageSelectedRow(item: any): void;
|
|
562
|
+
onAddChildItem(): void;
|
|
563
|
+
onEditChildItem(item: object): void;
|
|
564
|
+
onDeleteChildItem(item: object): void;
|
|
565
|
+
onViewChildItem(item: object): void;
|
|
275
566
|
static ɵfac: i0.ɵɵFactoryDeclaration<EasyTableComponent<any>, never>;
|
|
276
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<EasyTableComponent<any>, "lib-easy-table", never, { "dataSource": { "alias": "dataSource"; "required":
|
|
567
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EasyTableComponent<any>, "lib-easy-table", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "config": { "alias": "config"; "required": false; }; "childConfig": { "alias": "childConfig"; "required": false; }; }, { "childTabChange": "childTabChange"; "deleteItem": "deleteItem"; "addItem": "addItem"; "editItem": "editItem"; "viewItem": "viewItem"; "overwrite": "overwrite"; "logout": "logout"; "titleIconClick": "titleIconClick"; "customAction": "customAction"; "auditTrail": "auditTrail"; "dialogAction": "dialogAction"; "dialogResult": "dialogResult"; "extendRow": "extendRow"; "clickField": "clickField"; "addChildItem": "addChildItem"; "deleteChildItem": "deleteChildItem"; "editChildItem": "editChildItem"; "viewChildItem": "viewChildItem"; "childDialogAction": "childDialogAction"; "childDialogResult": "childDialogResult"; "clickChildField": "clickChildField"; }, never, never, true, never>;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
declare class EasyTableBasicComponent<T extends Record<string, any>> implements OnInit, AfterViewInit, OnChanges {
|
|
571
|
+
dataSource: MatTableDataSource<T>;
|
|
572
|
+
private _displayedColumns;
|
|
573
|
+
availableGroups: string[];
|
|
574
|
+
set displayedColumns(value: (string | MatColumnTyped)[]);
|
|
575
|
+
/** True when at least one column has a header filter: every header cell then reserves the same filter row. */
|
|
576
|
+
get hasColumnFilters(): boolean;
|
|
577
|
+
get displayedColumns(): MatColumnTyped[];
|
|
578
|
+
private _config;
|
|
579
|
+
set config(value: Partial<EasyTableConfig<T>>);
|
|
580
|
+
get config(): EasyTableConfig<T>;
|
|
581
|
+
deleteItem: EventEmitter<object>;
|
|
582
|
+
addItem: EventEmitter<CRUD>;
|
|
583
|
+
editItem: EventEmitter<object>;
|
|
584
|
+
viewItem: EventEmitter<object>;
|
|
585
|
+
overwrite: EventEmitter<{
|
|
586
|
+
source: string;
|
|
587
|
+
value: string;
|
|
588
|
+
item: object;
|
|
589
|
+
}>;
|
|
590
|
+
logout: EventEmitter<String>;
|
|
591
|
+
titleIconClick: EventEmitter<void>;
|
|
592
|
+
customAction: EventEmitter<void>;
|
|
593
|
+
auditTrail: EventEmitter<object>;
|
|
594
|
+
dialogAction: EventEmitter<EasyTableDialogRequest<any>>;
|
|
595
|
+
dialogResult: EventEmitter<EasyTableDialogResult<any>>;
|
|
596
|
+
clickField: EventEmitter<{
|
|
597
|
+
columnName: string;
|
|
598
|
+
row: T;
|
|
599
|
+
}>;
|
|
600
|
+
searchTableField: string;
|
|
601
|
+
/**
|
|
602
|
+
* Text the table filters on. It is kept apart from `searchTableField`, the value bound to the toolbar input:
|
|
603
|
+
* typing never pushes a value back into the input, so a delayed change detection cannot overwrite what the
|
|
604
|
+
* user has typed since.
|
|
605
|
+
*/
|
|
606
|
+
searchText: string;
|
|
607
|
+
isAndFilterOperator: boolean;
|
|
608
|
+
ColumnType: typeof ColumnType;
|
|
609
|
+
columnFilters: {
|
|
610
|
+
[key: string]: string;
|
|
611
|
+
};
|
|
612
|
+
/** What the user typed in the text filters, as typed (the filter itself is normalized). */
|
|
613
|
+
columnFilterText: {
|
|
614
|
+
[key: string]: string | undefined;
|
|
615
|
+
};
|
|
616
|
+
/** Header filters are always visible on wide screens; below 1024px this toggles them. */
|
|
617
|
+
filtersOpen: boolean;
|
|
618
|
+
isPasswordVisible: Record<string, boolean>;
|
|
619
|
+
protected readonly MatTabCommon: typeof MatTabCommon;
|
|
620
|
+
expandedGroups: {
|
|
621
|
+
[key: string]: boolean;
|
|
622
|
+
};
|
|
623
|
+
selectedRow: any;
|
|
624
|
+
paginator: MatPaginator;
|
|
625
|
+
sort: MatSort;
|
|
626
|
+
table: MatTable<any> | undefined;
|
|
627
|
+
multiSelectDropdowns: QueryList<EasyMultiSelect>;
|
|
628
|
+
private readonly injector;
|
|
629
|
+
private readonly destroyRef;
|
|
630
|
+
private readonly translate;
|
|
631
|
+
constructor();
|
|
632
|
+
ngOnInit(): void;
|
|
633
|
+
getTableMinWidth(): number;
|
|
634
|
+
getDisplayedColumnNames(): string[];
|
|
635
|
+
get groupedColumns(): [string, MatColumnTyped[]][];
|
|
636
|
+
ngOnChanges(): void;
|
|
637
|
+
loadData(): void;
|
|
638
|
+
/** The rows in display order: always a sorted copy, the array of the application is not reordered. */
|
|
639
|
+
private displayRows;
|
|
640
|
+
syncFiltersWithData(): void;
|
|
641
|
+
ngAfterViewInit(): void;
|
|
642
|
+
updatePageSize(): void;
|
|
643
|
+
applyFilter(event: Event): void;
|
|
644
|
+
clearTableFilter(): void;
|
|
645
|
+
resetDropdownSelection(): void;
|
|
646
|
+
filterType(): void;
|
|
647
|
+
onDeleteItem(item: object): void;
|
|
648
|
+
onAddItem(): void;
|
|
649
|
+
onEditItem(item: object): void;
|
|
650
|
+
onViewItem(item: object): void;
|
|
651
|
+
private requestDialog;
|
|
652
|
+
onFieldClick(col: MatColumnTyped, row: T): void;
|
|
653
|
+
onOverwrite(element: any, col: MatColumnTyped, event: Event): void;
|
|
654
|
+
onLogout(): void;
|
|
655
|
+
onCustomAction(): void;
|
|
656
|
+
getIconColumn(col: MatColumnTyped, item: any): string;
|
|
657
|
+
getIconTitle(col: MatColumnTyped, value: string): string;
|
|
658
|
+
getTitleColumn(col: MatColumnTyped, item: any): string;
|
|
659
|
+
exportToCsv(): void;
|
|
660
|
+
getHeaderName(columnName: string): string;
|
|
661
|
+
OnToggleChanged(values: Dictionary[]): void;
|
|
662
|
+
setStatusColor(values: Dictionary[]): void;
|
|
663
|
+
getData(data: any[]): void;
|
|
664
|
+
onAuditTrail(item: object): void;
|
|
665
|
+
applyFilterFromToolbar(): void;
|
|
666
|
+
onChangeDdl(element: any, col: MatColumnTyped, value: any): Promise<void>;
|
|
667
|
+
onChangeMultiSelect(selected: any, col: MatColumnTyped, headerFilter?: boolean): void;
|
|
668
|
+
onColumnTextFilter(value: string, column: MatColumnTyped): void;
|
|
669
|
+
applyFilterByColumn(filterValue: string, column: MatColumnTyped): void;
|
|
670
|
+
getSelectedData(element: any, col: MatColumnTyped): Dictionary[];
|
|
671
|
+
getSelectedList(col: MatColumnTyped): any[];
|
|
672
|
+
applyCustomFilter(): void;
|
|
673
|
+
updateDataSourceFilter(): void;
|
|
674
|
+
setFilters(): void;
|
|
675
|
+
getMaskedValue(value: string | null): string;
|
|
676
|
+
togglePassword(key: string): void;
|
|
677
|
+
toggleGroup(groupName: string): void;
|
|
678
|
+
getGroupIndex(groupName: string): number;
|
|
679
|
+
getSelectedRow(element: any): boolean;
|
|
680
|
+
manageSelectedRow(item: any): void;
|
|
681
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EasyTableBasicComponent<any>, never>;
|
|
682
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EasyTableBasicComponent<any>, "lib-easy-table-basic", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "config": { "alias": "config"; "required": false; }; }, { "deleteItem": "deleteItem"; "addItem": "addItem"; "editItem": "editItem"; "viewItem": "viewItem"; "overwrite": "overwrite"; "logout": "logout"; "titleIconClick": "titleIconClick"; "customAction": "customAction"; "auditTrail": "auditTrail"; "dialogAction": "dialogAction"; "dialogResult": "dialogResult"; "clickField": "clickField"; }, never, never, true, never>;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
declare class MatColumn {
|
|
686
|
+
name: string;
|
|
687
|
+
value: string | null;
|
|
688
|
+
type: ColumnType;
|
|
689
|
+
enableIcon: string;
|
|
690
|
+
disableIcon: string;
|
|
691
|
+
enableColor: string;
|
|
692
|
+
disableColor: string;
|
|
693
|
+
enableTitle?: string;
|
|
694
|
+
disableTitle?: string;
|
|
695
|
+
enableTitleFromColumnName?: string;
|
|
696
|
+
disableTitleFromColumnName?: string;
|
|
697
|
+
mixColumnIconColor: Tuple[];
|
|
698
|
+
enableFilter: boolean;
|
|
699
|
+
filterList: Array<any | Tuple | unknown>;
|
|
700
|
+
filterDisplayColumn?: string;
|
|
701
|
+
constructor(name: string, options?: Partial<Omit<MatColumn, 'name' | 'constructor'>>);
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
declare class TableToolbarComponent {
|
|
705
|
+
config: ToolbarConfig;
|
|
706
|
+
isPreview: boolean;
|
|
707
|
+
searchTableField: string;
|
|
708
|
+
readonly: boolean;
|
|
709
|
+
canCreate: boolean;
|
|
710
|
+
canExport: boolean;
|
|
711
|
+
showFilterOperator: boolean;
|
|
712
|
+
customColumnFilter: Dictionary[];
|
|
713
|
+
searchTableFieldChange: EventEmitter<string>;
|
|
714
|
+
applyFilterEvent: EventEmitter<KeyboardEvent>;
|
|
715
|
+
/** Emitted on every change of the search field, including those that do not come with a key (paste, drop, autofill). */
|
|
716
|
+
searchInput: EventEmitter<Event>;
|
|
717
|
+
filterTypeEvent: EventEmitter<void>;
|
|
718
|
+
clearTableFilterEvent: EventEmitter<void>;
|
|
719
|
+
addItem: EventEmitter<void>;
|
|
720
|
+
exportToCsv: EventEmitter<void>;
|
|
721
|
+
customAction: EventEmitter<void>;
|
|
722
|
+
close: EventEmitter<void>;
|
|
723
|
+
toggleChanged: EventEmitter<any>;
|
|
724
|
+
filterColumn: MatColumn;
|
|
725
|
+
onSearchChange(value: string): void;
|
|
726
|
+
applyFilter(event: KeyboardEvent): void;
|
|
727
|
+
onSearchInput(event: Event): void;
|
|
728
|
+
filterType(): void;
|
|
729
|
+
clearTableFilter(): void;
|
|
730
|
+
onAddItem(): void;
|
|
731
|
+
onExportToCsv(): void;
|
|
732
|
+
onCustomAction(): void;
|
|
733
|
+
onClose(): void;
|
|
734
|
+
onToggleChanged(value: any): void;
|
|
735
|
+
getTitleFilterOperator(): "FILTER_BY_AND_OPERATOR" | "FILTER_BY_OR_OPERATOR";
|
|
736
|
+
getIconFilterOperator(): "zoom_out" | "zoom_in";
|
|
737
|
+
getFilterColor(filter: Dictionary): string | undefined;
|
|
738
|
+
getFilterIcon(filter: Dictionary): string;
|
|
739
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableToolbarComponent, never>;
|
|
740
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableToolbarComponent, "lib-table-toolbar", never, { "config": { "alias": "config"; "required": false; }; "isPreview": { "alias": "isPreview"; "required": false; }; "searchTableField": { "alias": "searchTableField"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "canCreate": { "alias": "canCreate"; "required": false; }; "canExport": { "alias": "canExport"; "required": false; }; "showFilterOperator": { "alias": "showFilterOperator"; "required": false; }; "customColumnFilter": { "alias": "customColumnFilter"; "required": false; }; }, { "searchTableFieldChange": "searchTableFieldChange"; "applyFilterEvent": "applyFilterEvent"; "searchInput": "searchInput"; "filterTypeEvent": "filterTypeEvent"; "clearTableFilterEvent": "clearTableFilterEvent"; "addItem": "addItem"; "exportToCsv": "exportToCsv"; "customAction": "customAction"; "close": "close"; "toggleChanged": "toggleChanged"; }, never, ["[toolbarFilters]", "*"], true, never>;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
interface ConfirmDeleteData {
|
|
744
|
+
title: string;
|
|
745
|
+
message: string;
|
|
746
|
+
confirm: string;
|
|
747
|
+
cancel: string;
|
|
748
|
+
icon?: string;
|
|
749
|
+
}
|
|
750
|
+
declare class ConfirmDialogComponent {
|
|
751
|
+
readonly data: ConfirmDeleteData;
|
|
752
|
+
private readonly dialogRef;
|
|
753
|
+
constructor();
|
|
754
|
+
close(confirmed: boolean): void;
|
|
755
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmDialogComponent, never>;
|
|
756
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ConfirmDialogComponent, "lib-confirm-dialog", never, {}, {}, never, never, true, never>;
|
|
757
|
+
}
|
|
758
|
+
declare function confirmDelete(injector: Injector, translations: ToolbarTranslations): Observable<boolean>;
|
|
759
|
+
declare function confirmAction(injector: Injector, data: ConfirmDeleteData): Observable<boolean>;
|
|
760
|
+
|
|
761
|
+
interface DropdownState {
|
|
762
|
+
control: FormControl<any>;
|
|
763
|
+
options$: Observable<any[]>;
|
|
764
|
+
displayFn: (item: any) => string;
|
|
765
|
+
}
|
|
766
|
+
declare class EasyDialogComponent {
|
|
767
|
+
private readonly dialogRef;
|
|
768
|
+
private readonly translate;
|
|
769
|
+
private readonly destroyRef;
|
|
770
|
+
readonly config: EasyDialogConfig<Record<string, any>>;
|
|
771
|
+
readonly isReadOnly: boolean;
|
|
772
|
+
readonly data: Record<string, any>;
|
|
773
|
+
readonly groupedFields: EasyDialogField[][];
|
|
774
|
+
readonly dropdowns: Record<string, DropdownState>;
|
|
775
|
+
readonly dateControls: Record<string, FormControl<Date | null>>;
|
|
776
|
+
readonly confirmingClose: i0.WritableSignal<boolean>;
|
|
777
|
+
readonly formError: i0.WritableSignal<boolean>;
|
|
778
|
+
protected readonly InputType: typeof InputType;
|
|
779
|
+
private readonly labelPrefix;
|
|
780
|
+
constructor();
|
|
781
|
+
get actionLabel(): string;
|
|
782
|
+
get subject(): string;
|
|
783
|
+
get icon(): string;
|
|
784
|
+
get buttonSize(): string;
|
|
785
|
+
get visibleActions(): EasyDialogAction[];
|
|
786
|
+
get auditCreated(): string | null;
|
|
787
|
+
get auditUpdated(): string | null;
|
|
788
|
+
get auditInactive(): string | null;
|
|
789
|
+
get validationError(): string | null;
|
|
790
|
+
doAction(): void;
|
|
791
|
+
onExtraAction(action: EasyDialogAction): void;
|
|
792
|
+
closeDialog(): void;
|
|
793
|
+
confirmSave(): void;
|
|
794
|
+
discardChanges(): void;
|
|
795
|
+
isRequired(field: EasyDialogField): boolean;
|
|
796
|
+
isInvalidForm(): boolean;
|
|
797
|
+
getHeaderName(columnName: string): string;
|
|
798
|
+
getMultiSelectValue(field: EasyDialogField): string;
|
|
799
|
+
getMultiSelectDisplay(field: EasyDialogField): string;
|
|
800
|
+
getMultiSelectSelection(field: EasyDialogField): any[];
|
|
801
|
+
onMultiSelectChange(field: EasyDialogField, values: unknown[]): void;
|
|
802
|
+
getRowsFromSize(size: ColumnSize | string | undefined): number;
|
|
803
|
+
getDateValue(field: EasyDialogField): string;
|
|
804
|
+
onDateChange(date: string, field: EasyDialogField): void;
|
|
805
|
+
private routeCloseThroughConfirmation;
|
|
806
|
+
private hasChanged;
|
|
807
|
+
private hasMissingRequiredFields;
|
|
808
|
+
private failsCustomValidation;
|
|
809
|
+
private auditLine;
|
|
810
|
+
private inactiveLine;
|
|
811
|
+
private translateOrNull;
|
|
812
|
+
private currentTime;
|
|
813
|
+
private groupFieldsByRow;
|
|
814
|
+
private syncCalendarLocale;
|
|
815
|
+
private createDateControls;
|
|
816
|
+
private createDateControl;
|
|
817
|
+
private createDropdowns;
|
|
818
|
+
private createDropdown;
|
|
819
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EasyDialogComponent, never>;
|
|
820
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EasyDialogComponent, "lib-easy-dialog", never, {}, {}, never, never, true, never>;
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
declare class EasyDialogService {
|
|
824
|
+
private readonly dialog;
|
|
825
|
+
open<T = Record<string, any>>(config: EasyDialogInit<T>, options?: MatDialogConfig): MatDialogRef<EasyDialogComponent, EasyDialogResult<T>>;
|
|
826
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EasyDialogService, never>;
|
|
827
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EasyDialogService>;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
/** Theme the application asks for. `system` follows the operating system preference. */
|
|
831
|
+
type EasyThemeMode = 'light' | 'dark' | 'system';
|
|
832
|
+
/** Theme actually applied once `system` has been resolved. */
|
|
833
|
+
type EasyResolvedTheme = 'light' | 'dark';
|
|
834
|
+
interface EasyThemeOptions {
|
|
835
|
+
/** Theme applied when the service is created. Default: none (the host application stays untouched). */
|
|
836
|
+
initial?: EasyThemeMode;
|
|
837
|
+
/** CSS class toggled on `<body>` in dark mode. Default `dark-theme`, the class the library stylesheet targets. */
|
|
838
|
+
darkClass?: string;
|
|
839
|
+
/** Attribute set on `<html>` with the resolved theme (`light` / `dark`). Use `null` to disable. Default `data-easy-theme`. */
|
|
840
|
+
attribute?: string | null;
|
|
841
|
+
/** Also set the CSS `color-scheme` on `<html>` so native controls and scrollbars follow the theme. Default `true`. */
|
|
842
|
+
colorScheme?: boolean;
|
|
843
|
+
/** `localStorage` key used to remember the chosen mode. Default `null`: nothing is stored. */
|
|
844
|
+
storageKey?: string | null;
|
|
845
|
+
}
|
|
846
|
+
/** Optional configuration of {@link EasyThemeService}: `{ provide: EASY_THEME_OPTIONS, useValue: {...} }`. */
|
|
847
|
+
declare const EASY_THEME_OPTIONS: InjectionToken<EasyThemeOptions>;
|
|
848
|
+
/**
|
|
849
|
+
* Switches the library between light and dark at runtime, without reloading the page.
|
|
850
|
+
*
|
|
851
|
+
* The service does nothing until {@link setTheme} is called (or `initial` is configured), so it never
|
|
852
|
+
* changes the theme of a host application by itself. In dark mode it adds the `dark-theme` class to
|
|
853
|
+
* `<body>`; applications that already toggle that class themselves can keep doing so.
|
|
854
|
+
*/
|
|
855
|
+
declare class EasyThemeService {
|
|
856
|
+
private readonly document;
|
|
857
|
+
private readonly options;
|
|
858
|
+
private readonly modeSignal;
|
|
859
|
+
private readonly systemDark;
|
|
860
|
+
private media;
|
|
861
|
+
private readonly onSystemChange;
|
|
862
|
+
/** Mode requested by the application (`null` until a theme has been chosen). */
|
|
863
|
+
readonly mode: i0.Signal<EasyThemeMode | null>;
|
|
864
|
+
/** Theme currently applied. `light` while no theme has been chosen. */
|
|
865
|
+
readonly theme: i0.Signal<EasyResolvedTheme>;
|
|
866
|
+
constructor();
|
|
867
|
+
/** Applies `light`, `dark` or `system` (follow the operating system, live). */
|
|
868
|
+
setTheme(mode: EasyThemeMode): void;
|
|
869
|
+
/** Switches between light and dark (a `system` mode becomes the opposite of what is shown now). */
|
|
870
|
+
toggle(): void;
|
|
871
|
+
private apply;
|
|
872
|
+
private readStored;
|
|
873
|
+
private store;
|
|
874
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EasyThemeService, never>;
|
|
875
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EasyThemeService>;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* Angular Material paginator labels read through ngx-translate, so the table paginator follows the language of
|
|
880
|
+
* the application. Keys (all optional, English is used when a key is missing):
|
|
881
|
+
*
|
|
882
|
+
* - `PAGINATOR.ITEMS_PER_PAGE`, `PAGINATOR.NEXT_PAGE`, `PAGINATOR.PREVIOUS_PAGE`, `PAGINATOR.FIRST_PAGE`,
|
|
883
|
+
* `PAGINATOR.LAST_PAGE`
|
|
884
|
+
* - `PAGINATOR.RANGE`, with the parameters `{{start}}`, `{{end}}` and `{{length}}`
|
|
885
|
+
*
|
|
886
|
+
* Register it once with {@link provideEasyPaginatorIntl}.
|
|
887
|
+
*/
|
|
888
|
+
declare class EasyPaginatorIntl extends MatPaginatorIntl {
|
|
889
|
+
private readonly translate;
|
|
890
|
+
constructor();
|
|
891
|
+
private text;
|
|
892
|
+
private refresh;
|
|
893
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EasyPaginatorIntl, never>;
|
|
894
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EasyPaginatorIntl>;
|
|
895
|
+
}
|
|
896
|
+
/** Makes the paginator of every easy-mat-ui table (and any Material paginator) follow the ngx-translate language. */
|
|
897
|
+
declare function provideEasyPaginatorIntl(): Provider;
|
|
898
|
+
|
|
899
|
+
/** One choice of a `lib-easy-segmented`. */
|
|
900
|
+
interface EasySegmentedOption {
|
|
901
|
+
/** Value emitted when the option is chosen. */
|
|
902
|
+
id: string;
|
|
903
|
+
/** Text of the option. Optional when `iconOnly` is used, but then give a `hint`: it is the accessible name. */
|
|
904
|
+
label?: string;
|
|
905
|
+
/** Material icon name. */
|
|
906
|
+
icon?: string;
|
|
907
|
+
/** Tooltip. */
|
|
908
|
+
hint?: string;
|
|
909
|
+
disabled?: boolean;
|
|
910
|
+
}
|
|
911
|
+
/** `md` is 34px high, `lg` is 38px high. */
|
|
912
|
+
type EasySegmentedSize = 'md' | 'lg';
|
|
913
|
+
/**
|
|
914
|
+
* How assistive technologies see the control: `radio` for a choice among values (a setting),
|
|
915
|
+
* `tab` for a list of pages (pair it with `panelId` and `idPrefix`).
|
|
916
|
+
*/
|
|
917
|
+
type EasySegmentedSemantics = 'radio' | 'tab';
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
* A small group of buttons of which exactly one is chosen: a setting (units, theme) or the pages of an application.
|
|
921
|
+
* Use `[(selected)]` to bind the chosen `id`. Arrow keys, Home and End move the choice, as in any radio group or tab list.
|
|
922
|
+
*/
|
|
923
|
+
declare class EasySegmented {
|
|
924
|
+
private readonly host;
|
|
925
|
+
private readonly direction;
|
|
926
|
+
options: EasySegmentedOption[];
|
|
927
|
+
/** `id` of the chosen option. */
|
|
928
|
+
selected: string | null;
|
|
929
|
+
/** Accessible name of the group. */
|
|
930
|
+
ariaLabel: string;
|
|
931
|
+
size: EasySegmentedSize;
|
|
932
|
+
/** Show only the icons. The `hint` (or the label) stays as tooltip and accessible name. */
|
|
933
|
+
iconOnly: boolean;
|
|
934
|
+
/** Below 600px only the chosen option keeps its text: the others become icons. */
|
|
935
|
+
collapseInactive: boolean;
|
|
936
|
+
/** The group takes the whole width of its container. */
|
|
937
|
+
stretch: boolean;
|
|
938
|
+
/** `tab` for pages (the group then needs `panelId`), `radio` for a setting. */
|
|
939
|
+
semantics: EasySegmentedSemantics;
|
|
940
|
+
/** With `semantics="tab"`: id of the element that shows the chosen page. */
|
|
941
|
+
panelId: string;
|
|
942
|
+
/** With `semantics="tab"`: prefix of the id of each button (`idPrefix + option.id`), so a panel can point to its tab. */
|
|
943
|
+
idPrefix: string;
|
|
944
|
+
selectedChange: EventEmitter<string>;
|
|
945
|
+
/** Only one button is reachable with the Tab key: the chosen one, or the first one when nothing is chosen. */
|
|
946
|
+
get tabStopId(): string | null;
|
|
947
|
+
select(option: EasySegmentedOption): void;
|
|
948
|
+
onKeydown(event: KeyboardEvent): void;
|
|
949
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EasySegmented, never>;
|
|
950
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EasySegmented, "lib-easy-segmented", never, { "options": { "alias": "options"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "size": { "alias": "size"; "required": false; }; "iconOnly": { "alias": "iconOnly"; "required": false; }; "collapseInactive": { "alias": "collapseInactive"; "required": false; }; "stretch": { "alias": "stretch"; "required": false; }; "semantics": { "alias": "semantics"; "required": false; }; "panelId": { "alias": "panelId"; "required": false; }; "idPrefix": { "alias": "idPrefix"; "required": false; }; }, { "selectedChange": "selectedChange"; }, never, never, true, never>;
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
/** One button of a `lib-easy-chip-nav`. */
|
|
954
|
+
interface EasyChipNavItem {
|
|
955
|
+
/** Value emitted when the button is chosen. */
|
|
956
|
+
id: string;
|
|
957
|
+
label: string;
|
|
958
|
+
/** Material icon name. */
|
|
959
|
+
icon?: string;
|
|
960
|
+
/** Any CSS colour (`#b45309`, `var(--my-color)`...). Without it the button is neutral. */
|
|
961
|
+
color?: string;
|
|
962
|
+
/** Small number shown at the end of the button, for example how many elements it leads to. */
|
|
963
|
+
count?: number;
|
|
964
|
+
/** Tooltip. */
|
|
965
|
+
hint?: string;
|
|
966
|
+
disabled?: boolean;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
/**
|
|
970
|
+
* A row of buttons with an icon, a colour and a count, to browse by category (continents, departments, statuses...).
|
|
971
|
+
* Use `[(selected)]` to bind the chosen `id`. On a phone the row scrolls sideways instead of taking several lines.
|
|
972
|
+
*/
|
|
973
|
+
declare class EasyChipNav {
|
|
974
|
+
items: EasyChipNavItem[];
|
|
975
|
+
/** `id` of the chosen item. */
|
|
976
|
+
selected: string | null;
|
|
977
|
+
/** Accessible name of the navigation. */
|
|
978
|
+
ariaLabel: string;
|
|
979
|
+
selectedChange: EventEmitter<string>;
|
|
980
|
+
select(item: EasyChipNavItem): void;
|
|
981
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EasyChipNav, never>;
|
|
982
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EasyChipNav, "lib-easy-chip-nav", never, { "items": { "alias": "items"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, { "selectedChange": "selectedChange"; }, never, never, true, never>;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
/** One language of a `lib-easy-language-switch`. */
|
|
986
|
+
interface EasyLanguage {
|
|
987
|
+
/** Value emitted when the language is chosen (`en`, `fr`, `ar`...). */
|
|
988
|
+
code: string;
|
|
989
|
+
/** Name of the language written in that language: it is what the visitor looks for. */
|
|
990
|
+
name: string;
|
|
991
|
+
/** Flag as a `flag-icons` suffix (`gb` gives the classes `fi fi-gb`). Needs the optional `flag-icons` stylesheet. */
|
|
992
|
+
flag?: string;
|
|
993
|
+
/** Flag as an image, when you do not use `flag-icons`. */
|
|
994
|
+
flagUrl?: string;
|
|
995
|
+
/** Short text for the `code` display. Default: the code in capital letters. */
|
|
996
|
+
short?: string;
|
|
997
|
+
}
|
|
998
|
+
/** `menu` is a button that opens a list, `inline` shows every language at once. */
|
|
999
|
+
type EasyLanguageLayout = 'menu' | 'inline';
|
|
1000
|
+
/** What the button of each language shows. */
|
|
1001
|
+
type EasyLanguageDisplay = 'flag-name' | 'flag' | 'name' | 'code';
|
|
1002
|
+
|
|
1003
|
+
/**
|
|
1004
|
+
* Language picker. It knows nothing about ngx-translate or any other translation system: give it the languages and
|
|
1005
|
+
* the chosen code with `[(selected)]`, and change your language when `selectedChange` fires.
|
|
1006
|
+
*
|
|
1007
|
+
* - `layout="menu"`: one button that opens the list (default). `layout="inline"`: every language is a button.
|
|
1008
|
+
* - `display`: what each language shows, `flag-name` (default), `flag`, `name` or `code`.
|
|
1009
|
+
*/
|
|
1010
|
+
declare class EasyLanguageSwitch {
|
|
1011
|
+
languages: EasyLanguage[];
|
|
1012
|
+
/** `code` of the chosen language. */
|
|
1013
|
+
selected: string | null;
|
|
1014
|
+
layout: EasyLanguageLayout;
|
|
1015
|
+
display: EasyLanguageDisplay;
|
|
1016
|
+
/** Accessible name of the control (for example "Choose the language"). */
|
|
1017
|
+
ariaLabel: string;
|
|
1018
|
+
selectedChange: EventEmitter<string>;
|
|
1019
|
+
get current(): EasyLanguage | undefined;
|
|
1020
|
+
get showFlag(): boolean;
|
|
1021
|
+
/** The text of a language for the current `display`; empty when only the flag is shown. */
|
|
1022
|
+
text(language: EasyLanguage): string;
|
|
1023
|
+
/** The text of a language in the open list: its name, whatever `display` says (a code alone would not help). */
|
|
1024
|
+
listText(language: EasyLanguage): string;
|
|
1025
|
+
select(language: EasyLanguage): void;
|
|
1026
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EasyLanguageSwitch, never>;
|
|
1027
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EasyLanguageSwitch, "lib-easy-language-switch", never, { "languages": { "alias": "languages"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "display": { "alias": "display"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, { "selectedChange": "selectedChange"; }, never, never, true, never>;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
/** A button or a link at the bottom of a `lib-easy-card`. */
|
|
1031
|
+
interface EasyCardAction {
|
|
1032
|
+
/** Identifies the action in the `actionClick` event. */
|
|
1033
|
+
id: string;
|
|
1034
|
+
label: string;
|
|
1035
|
+
/** Material icon name. */
|
|
1036
|
+
icon?: string;
|
|
1037
|
+
/** With an address the action is a link, without it a button. */
|
|
1038
|
+
href?: string;
|
|
1039
|
+
/** Where a link opens, `_blank` for a new tab. */
|
|
1040
|
+
target?: string;
|
|
1041
|
+
/** Filled with the accent colour instead of outlined. */
|
|
1042
|
+
primary?: boolean;
|
|
1043
|
+
disabled?: boolean;
|
|
1044
|
+
}
|
|
1045
|
+
/** Content of a `lib-easy-card`. */
|
|
1046
|
+
interface EasyCardConfig {
|
|
1047
|
+
/** Identifies the card in the events. */
|
|
1048
|
+
id?: string;
|
|
1049
|
+
/** Material icon name. */
|
|
1050
|
+
icon?: string;
|
|
1051
|
+
title: string;
|
|
1052
|
+
description?: string;
|
|
1053
|
+
/** Any CSS colour for the icon. Default: the accent colour of the theme. */
|
|
1054
|
+
color?: string;
|
|
1055
|
+
actions?: EasyCardAction[];
|
|
1056
|
+
/** The whole card is a button (it emits `cardClick`). Ignored when the card has actions. */
|
|
1057
|
+
clickable?: boolean;
|
|
1058
|
+
/** For a clickable card: a short invitation at the bottom, shown with an arrow ("Try it"). */
|
|
1059
|
+
cta?: string;
|
|
1060
|
+
}
|
|
1061
|
+
/** Emitted when an action of a card is used. */
|
|
1062
|
+
interface EasyCardActionEvent {
|
|
1063
|
+
card: EasyCardConfig;
|
|
1064
|
+
action: EasyCardAction;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
/**
|
|
1068
|
+
* A card with an icon, a title, a description and optional actions. Anything placed inside the tag is shown under the
|
|
1069
|
+
* description. A card without actions can be `clickable`: the whole card is then one button.
|
|
1070
|
+
*/
|
|
1071
|
+
declare class EasyCard {
|
|
1072
|
+
config: EasyCardConfig;
|
|
1073
|
+
/** The whole card was used (only for a `clickable` card without actions). */
|
|
1074
|
+
cardClick: EventEmitter<EasyCardConfig>;
|
|
1075
|
+
/** A button of the card was used. Links with an `href` are followed by the browser and do not emit. */
|
|
1076
|
+
actionClick: EventEmitter<EasyCardActionEvent>;
|
|
1077
|
+
get isButton(): boolean;
|
|
1078
|
+
use(action: EasyCardAction): void;
|
|
1079
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EasyCard, never>;
|
|
1080
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EasyCard, "lib-easy-card", never, { "config": { "alias": "config"; "required": true; }; }, { "cardClick": "cardClick"; "actionClick": "actionClick"; }, never, ["*"], true, never>;
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
/**
|
|
1084
|
+
* Cards in a responsive grid: as many columns as fit, each at least `minWidth` wide, and never more than `columns`.
|
|
1085
|
+
* The grid adapts to its own width, so it behaves the same in a narrow panel and in a wide page.
|
|
1086
|
+
*/
|
|
1087
|
+
declare class EasyCardGrid {
|
|
1088
|
+
items: EasyCardConfig[];
|
|
1089
|
+
/** Narrowest a card may become, in pixels (default 240). */
|
|
1090
|
+
minWidth: number;
|
|
1091
|
+
/** Most columns in a row (default 12, in practice "as many as fit"). */
|
|
1092
|
+
columns: number;
|
|
1093
|
+
cardClick: EventEmitter<EasyCardConfig>;
|
|
1094
|
+
actionClick: EventEmitter<EasyCardActionEvent>;
|
|
1095
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EasyCardGrid, never>;
|
|
1096
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EasyCardGrid, "lib-easy-card-grid", never, { "items": { "alias": "items"; "required": false; }; "minWidth": { "alias": "minWidth"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; }, { "cardClick": "cardClick"; "actionClick": "actionClick"; }, never, never, true, never>;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
/** Colour of the value of a `lib-easy-stat`. */
|
|
1100
|
+
type EasyStatTone = 'neutral' | 'accent' | 'success' | 'warning' | 'danger';
|
|
1101
|
+
/** A key figure: a label and a value. */
|
|
1102
|
+
interface EasyStatConfig {
|
|
1103
|
+
label: string;
|
|
1104
|
+
value: string | number;
|
|
1105
|
+
/** Tooltip, for example the exact value when the shown one is rounded. */
|
|
1106
|
+
hint?: string;
|
|
1107
|
+
/** Material icon name. */
|
|
1108
|
+
icon?: string;
|
|
1109
|
+
/** Default: `neutral`. */
|
|
1110
|
+
tone?: EasyStatTone;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
/** A key figure: a small label above a large value, with an optional icon and tooltip. Put several side by side with flex or grid. */
|
|
1114
|
+
declare class EasyStat {
|
|
1115
|
+
config: EasyStatConfig;
|
|
1116
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EasyStat, never>;
|
|
1117
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EasyStat, "lib-easy-stat", never, { "config": { "alias": "config"; "required": true; }; }, {}, never, never, true, never>;
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
/** Title block of a page. */
|
|
1121
|
+
interface EasyPageHeaderConfig {
|
|
1122
|
+
/** Material icon name. */
|
|
1123
|
+
icon?: string;
|
|
1124
|
+
title: string;
|
|
1125
|
+
subtitle?: string;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
/** Title block of a page: an icon, a title, a one-line explanation, and a slot (anything inside the tag) for the controls of the page. */
|
|
1129
|
+
declare class EasyPageHeader {
|
|
1130
|
+
config: EasyPageHeaderConfig;
|
|
1131
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EasyPageHeader, never>;
|
|
1132
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EasyPageHeader, "lib-easy-page-header", never, { "config": { "alias": "config"; "required": true; }; }, {}, never, ["*"], true, never>;
|
|
277
1133
|
}
|
|
278
1134
|
|
|
279
|
-
export { EasyMatUiComponent, EasyMatUiService, EasyMultiSelect, EasyTableComponent };
|
|
1135
|
+
export { CRUD, ColumnSize, ColumnType, ConfirmDialogComponent, DEFAULT_EASY_DIALOG_TRANSLATIONS, Dictionary, EASY_DIALOG_DEFAULT_MAX_WIDTH, EASY_DIALOG_DEFAULT_WIDTH, EASY_THEME_OPTIONS, EasyCard, EasyCardGrid, EasyChipNav, EasyDialogComponent, EasyDialogConfig, EasyDialogService, EasyLanguageSwitch, EasyMatUiComponent, EasyMatUiService, EasyMultiSelect, EasyPageHeader, EasyPaginatorIntl, EasySegmented, EasyStat, EasyTableBasicComponent, EasyTableComponent, EasyTableConfig, EasyThemeService, InputType, MatColumn, MatColumnTyped, ScreenSize, TableToolbarComponent, TitleFormatter, ToolbarConfig, ToolbarTranslations, Tuple, confirmAction, confirmDelete, provideEasyPaginatorIntl, resolveDialogRequest };
|
|
1136
|
+
export type { ColumnFilterType, ConfirmDeleteData, EasyCardAction, EasyCardActionEvent, EasyCardConfig, EasyChipNavItem, EasyDialogAction, EasyDialogButtonColor, EasyDialogField, EasyDialogInit, EasyDialogResult, EasyDialogSize, EasyDialogTranslations, EasyLanguage, EasyLanguageDisplay, EasyLanguageLayout, EasyPageHeaderConfig, EasyResolvedTheme, EasySegmentedOption, EasySegmentedSemantics, EasySegmentedSize, EasyStatConfig, EasyStatTone, EasyTableDialogConfig, EasyTableDialogMode, EasyTableDialogRequest, EasyTableDialogResult, EasyThemeMode, EasyThemeOptions, TitlePipe, TitleTranslate };
|