@enigmatry/entry-components 19.0.1-preview.1 → 20.0.0
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/README.md +1 -0
- package/button/index.d.ts +54 -3
- package/common/index.d.ts +243 -3
- package/date-time-picker/index.d.ts +100 -3
- package/dialog/index.d.ts +197 -3
- package/fesm2022/enigmatry-entry-components-button.mjs +19 -30
- package/fesm2022/enigmatry-entry-components-button.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-common.mjs +129 -133
- package/fesm2022/enigmatry-entry-components-common.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-date-time-picker.mjs +53 -50
- package/fesm2022/enigmatry-entry-components-date-time-picker.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-dialog.mjs +53 -78
- package/fesm2022/enigmatry-entry-components-dialog.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-file-input.mjs +55 -51
- package/fesm2022/enigmatry-entry-components-file-input.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-permissions.mjs +28 -23
- package/fesm2022/enigmatry-entry-components-permissions.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-search-filter.mjs +83 -97
- package/fesm2022/enigmatry-entry-components-search-filter.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-spinner.mjs +21 -21
- package/fesm2022/enigmatry-entry-components-spinner.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-table.mjs +77 -86
- package/fesm2022/enigmatry-entry-components-table.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-validation.mjs +43 -47
- package/fesm2022/enigmatry-entry-components-validation.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components.mjs +6 -6
- package/fesm2022/enigmatry-entry-components.mjs.map +1 -1
- package/file-input/index.d.ts +87 -5
- package/index.d.ts +37 -3
- package/package.json +10 -8
- package/permissions/index.d.ts +40 -5
- package/search-filter/index.d.ts +225 -3
- package/spinner/index.d.ts +34 -5
- package/styles/modules/components/toggle/_generator.scss +3 -2
- package/styles/modules/vendors/angular-material/_generator.scss +1 -0
- package/styles/modules/vendors/angular-material/_typography-generator.scss +2 -0
- package/table/README.md +6 -3
- package/table/index.d.ts +260 -4
- package/validation/index.d.ts +123 -3
- package/button/entry-button-config.d.ts +0 -30
- package/button/entry-button.directive.d.ts +0 -18
- package/button/entry-button.module.d.ts +0 -9
- package/button/public-api.d.ts +0 -3
- package/common/common.module.d.ts +0 -14
- package/common/constants.d.ts +0 -2
- package/common/date-time/entry-date-time-adapter.d.ts +0 -41
- package/common/date-time/entry-date-time-formats.d.ts +0 -25
- package/common/date-time/entry-time-adapter.d.ts +0 -9
- package/common/date-time/index.d.ts +0 -4
- package/common/date-time/native-time-adapter.d.ts +0 -13
- package/common/directives/auto-disable-button.directive.d.ts +0 -26
- package/common/directives/index.d.ts +0 -4
- package/common/directives/ng-control-accessor.directive.d.ts +0 -12
- package/common/directives/noop-control-value-accessor.d.ts +0 -10
- package/common/directives/scroll-to-invalid-control.directive.d.ts +0 -18
- package/common/event-plugins/abstract.plugin.d.ts +0 -40
- package/common/event-plugins/debounce.plugin.d.ts +0 -15
- package/common/event-plugins/index.d.ts +0 -2
- package/common/event-plugins/throttle.plugin.d.ts +0 -15
- package/common/interceptors/accept-language.interceptor.d.ts +0 -16
- package/common/interceptors/index.d.ts +0 -1
- package/common/public-api.d.ts +0 -6
- package/common/utils/index.d.ts +0 -1
- package/common/utils/provide-config.d.ts +0 -3
- package/date-time-picker/date-time-picker-config.model.d.ts +0 -20
- package/date-time-picker/date-time-picker.component.d.ts +0 -38
- package/date-time-picker/date-time-picker.module.d.ts +0 -17
- package/date-time-picker/public-api.d.ts +0 -3
- package/date-time-picker/time-picker.component.d.ts +0 -26
- package/dialog/dialogs/alert/entry-alert-dialog-data.interface.d.ts +0 -18
- package/dialog/dialogs/alert/entry-alert-dialog.component.d.ts +0 -13
- package/dialog/dialogs/confirm/entry-confirm-dialog-data.interface.d.ts +0 -8
- package/dialog/dialogs/confirm/entry-confirm-dialog.component.d.ts +0 -13
- package/dialog/dialogs/entry-dialog.component.d.ts +0 -43
- package/dialog/dialogs/error/entry-error-dialog-data.interface.d.ts +0 -9
- package/dialog/dialogs/error/entry-error-dialog.component.d.ts +0 -15
- package/dialog/entry-dialog-buttons-alignment.type.d.ts +0 -2
- package/dialog/entry-dialog-config.model.d.ts +0 -33
- package/dialog/entry-dialog.module.d.ts +0 -15
- package/dialog/entry-dialog.service.d.ts +0 -55
- package/dialog/public-api.d.ts +0 -11
- package/file-input/entry-file-input.component.d.ts +0 -74
- package/file-input/entry-file-input.module.d.ts +0 -12
- package/file-input/public-api.d.ts +0 -2
- package/modules/entry-components.module.d.ts +0 -28
- package/permissions/permission-type.d.ts +0 -3
- package/permissions/permission.directive.d.ts +0 -11
- package/permissions/permission.guard.d.ts +0 -2
- package/permissions/permission.module.d.ts +0 -9
- package/permissions/permission.pipe.d.ts +0 -11
- package/permissions/permission.service.d.ts +0 -4
- package/permissions/public-api.d.ts +0 -5
- package/public-api.d.ts +0 -10
- package/search-filter/autocomplete/autocomplete-search-filter.component.d.ts +0 -22
- package/search-filter/autocomplete/autocomplete-search-filter.model.d.ts +0 -19
- package/search-filter/control-type.d.ts +0 -7
- package/search-filter/date/date-search-filter.component.d.ts +0 -10
- package/search-filter/date/date-search-filter.model.d.ts +0 -8
- package/search-filter/date-time/date-time-search-filter.component.d.ts +0 -10
- package/search-filter/date-time/date-time-search-filter.model.d.ts +0 -8
- package/search-filter/entry-search-filter.component.d.ts +0 -38
- package/search-filter/entry-search-filter.module.d.ts +0 -22
- package/search-filter/public-api.d.ts +0 -11
- package/search-filter/search-filter-base.model.d.ts +0 -26
- package/search-filter/search-filter-config.model.d.ts +0 -16
- package/search-filter/search-filter-params.type.d.ts +0 -7
- package/search-filter/select/select-search-filter.component.d.ts +0 -14
- package/search-filter/select/select-search-filter.model.d.ts +0 -21
- package/search-filter/select-option.model.d.ts +0 -12
- package/search-filter/text/text-search-filter.component.d.ts +0 -10
- package/search-filter/text/text-search-filter.model.d.ts +0 -8
- package/spinner/entry-spinner/spinner.component.d.ts +0 -24
- package/spinner/public-api.d.ts +0 -2
- package/spinner/spinner-overlay-container.d.ts +0 -17
- package/spinner/spinner.module.d.ts +0 -10
- package/table/components/entry-cell/entry-cell.component.d.ts +0 -10
- package/table/components/entry-cell-context-menu/entry-cell-context-menu.component.d.ts +0 -18
- package/table/components/entry-cell-formatted-value/entry-cell-formatted-value.component.d.ts +0 -10
- package/table/components/entry-table/entry-table.component.d.ts +0 -82
- package/table/components/index.d.ts +0 -4
- package/table/entry-table.module.d.ts +0 -20
- package/table/interfaces/cell-template.d.ts +0 -4
- package/table/interfaces/column-def.d.ts +0 -20
- package/table/interfaces/column-sort-prop.d.ts +0 -5
- package/table/interfaces/column-type-parameter.d.ts +0 -9
- package/table/interfaces/column-type.d.ts +0 -1
- package/table/interfaces/context-menu-item.d.ts +0 -7
- package/table/interfaces/entry-table-config.d.ts +0 -33
- package/table/interfaces/index.d.ts +0 -12
- package/table/interfaces/paged-query.d.ts +0 -15
- package/table/interfaces/pagination.d.ts +0 -19
- package/table/interfaces/row-class-formatter.d.ts +0 -3
- package/table/interfaces/row-context-menu-formatter.d.ts +0 -4
- package/table/interfaces/row-selection-formatter.d.ts +0 -4
- package/table/public-api.d.ts +0 -3
- package/validation/entry-display-control-validation.directive.d.ts +0 -27
- package/validation/entry-form-errors.component.d.ts +0 -18
- package/validation/entry-validation-config.model.d.ts +0 -48
- package/validation/entry-validation.d.ts +0 -15
- package/validation/entry-validation.module.d.ts +0 -11
- package/validation/public-api.d.ts +0 -6
- package/validation/validation-problem-details.interface.d.ts +0 -9
package/file-input/index.d.ts
CHANGED
|
@@ -1,5 +1,87 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OnInit, OnDestroy, EventEmitter, ElementRef } from '@angular/core';
|
|
3
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
4
|
+
import * as i3 from '@angular/forms';
|
|
5
|
+
import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors } from '@angular/forms';
|
|
6
|
+
import * as i2 from '@angular/common';
|
|
7
|
+
import * as i4 from '@angular/material/icon';
|
|
8
|
+
import * as i5 from '@angular/material/button';
|
|
9
|
+
import * as i6 from '@enigmatry/entry-components/button';
|
|
10
|
+
|
|
11
|
+
declare class EntryFileInputComponent implements OnInit, OnDestroy, ControlValueAccessor, Validator {
|
|
12
|
+
private readonly _ngZone;
|
|
13
|
+
private readonly _renderer;
|
|
14
|
+
/**
|
|
15
|
+
* Label for the select file button. Defaults to 'Choose file...'
|
|
16
|
+
*/
|
|
17
|
+
label: string;
|
|
18
|
+
/**
|
|
19
|
+
* MatIcon for the select file button. Defaults to 'insert_drive_file' (optional)
|
|
20
|
+
*/
|
|
21
|
+
matIcon?: string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Same as 'accept' attribute in <input/> element.
|
|
24
|
+
*/
|
|
25
|
+
accept?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Same as 'multiple' attribute in <input/> element.
|
|
28
|
+
*/
|
|
29
|
+
set multiple(multiple: BooleanInput);
|
|
30
|
+
get multiple(): boolean;
|
|
31
|
+
private _multiple;
|
|
32
|
+
/**
|
|
33
|
+
* Same as 'disabled' attribute in <input/> element.
|
|
34
|
+
*/
|
|
35
|
+
set disabled(disabled: BooleanInput);
|
|
36
|
+
get disabled(): boolean;
|
|
37
|
+
private _disabled;
|
|
38
|
+
/**
|
|
39
|
+
* Same as 'readonly' attribute in <input/> element.
|
|
40
|
+
*/
|
|
41
|
+
set readonly(readonly: BooleanInput);
|
|
42
|
+
get readonly(): boolean;
|
|
43
|
+
private _readonly;
|
|
44
|
+
/**
|
|
45
|
+
* Size limit per file in KB (kilobytes)
|
|
46
|
+
*/
|
|
47
|
+
maxFileSizeInKb?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Number of files allowed when multiple=true
|
|
50
|
+
*/
|
|
51
|
+
maxFileCount?: number;
|
|
52
|
+
/**
|
|
53
|
+
* Current selected [File | FileList] object.
|
|
54
|
+
*/
|
|
55
|
+
value: File | FileList | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Event emitted when a file is selected. Emits a [File | FileList] object.
|
|
58
|
+
*/
|
|
59
|
+
selectedFile: EventEmitter<File | FileList>;
|
|
60
|
+
_fileButton: ElementRef<HTMLElement>;
|
|
61
|
+
_fileInput: ElementRef<HTMLInputElement>;
|
|
62
|
+
private _destroy$;
|
|
63
|
+
get fileNames(): string;
|
|
64
|
+
ngOnInit(): void;
|
|
65
|
+
ngOnDestroy(): void;
|
|
66
|
+
onFileSelect(event: Event): void;
|
|
67
|
+
clear(): void;
|
|
68
|
+
onChange: (_: any) => void;
|
|
69
|
+
onTouched: () => void;
|
|
70
|
+
writeValue(value: any): void;
|
|
71
|
+
registerOnChange(fn: any): void;
|
|
72
|
+
registerOnTouched(fn: any): void;
|
|
73
|
+
setDisabledState?(isDisabled: boolean): void;
|
|
74
|
+
validate(control: AbstractControl<File | FileList | undefined>): ValidationErrors | null;
|
|
75
|
+
private isFileCountLimitExceeded;
|
|
76
|
+
private isFileSizeLimitExceeded;
|
|
77
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EntryFileInputComponent, never>;
|
|
78
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EntryFileInputComponent, "entry-file-input", never, { "label": { "alias": "label"; "required": false; }; "matIcon": { "alias": "matIcon"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "maxFileSizeInKb": { "alias": "maxFileSizeInKb"; "required": false; }; "maxFileCount": { "alias": "maxFileCount"; "required": false; }; }, { "selectedFile": "selectedFile"; }, never, never, false, never>;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
declare class EntryFileInputModule {
|
|
82
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EntryFileInputModule, never>;
|
|
83
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<EntryFileInputModule, [typeof EntryFileInputComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.MatIconModule, typeof i5.MatButtonModule, typeof i6.EntryButtonModule], [typeof EntryFileInputComponent]>;
|
|
84
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<EntryFileInputModule>;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export { EntryFileInputComponent, EntryFileInputModule };
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
|
+
import * as i1 from '@enigmatry/entry-components/button';
|
|
2
|
+
export * from '@enigmatry/entry-components/button';
|
|
3
|
+
import * as i2 from '@enigmatry/entry-components/common';
|
|
4
|
+
export * from '@enigmatry/entry-components/common';
|
|
5
|
+
import * as i3 from '@enigmatry/entry-components/dialog';
|
|
6
|
+
export * from '@enigmatry/entry-components/dialog';
|
|
7
|
+
import * as i4 from '@enigmatry/entry-components/file-input';
|
|
8
|
+
export * from '@enigmatry/entry-components/file-input';
|
|
9
|
+
import * as i6 from '@enigmatry/entry-components/permissions';
|
|
10
|
+
export * from '@enigmatry/entry-components/permissions';
|
|
11
|
+
import * as i7 from '@enigmatry/entry-components/search-filter';
|
|
12
|
+
export * from '@enigmatry/entry-components/search-filter';
|
|
13
|
+
import * as i8 from '@enigmatry/entry-components/spinner';
|
|
14
|
+
export * from '@enigmatry/entry-components/spinner';
|
|
15
|
+
import * as i5 from '@enigmatry/entry-components/validation';
|
|
16
|
+
export * from '@enigmatry/entry-components/validation';
|
|
17
|
+
import * as i9 from '@enigmatry/entry-components/table';
|
|
18
|
+
export * from '@enigmatry/entry-components/table';
|
|
19
|
+
import * as i0 from '@angular/core';
|
|
20
|
+
import { Type, ModuleWithProviders } from '@angular/core';
|
|
21
|
+
|
|
22
|
+
interface EntryComponentsModuleOptions {
|
|
23
|
+
permissionService?: Type<any>;
|
|
24
|
+
}
|
|
1
25
|
/**
|
|
2
|
-
*
|
|
26
|
+
* Exports all entry components.
|
|
27
|
+
*
|
|
28
|
+
* Usage
|
|
29
|
+
* import EntryComponentsModule in shared.module.ts to have access to all components, directives, pipes.
|
|
30
|
+
* import EntryComponentsModule.forRoot() in app.module.ts to register root module providers.
|
|
3
31
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
32
|
+
declare class EntryComponentsModule {
|
|
33
|
+
static forRoot: (options?: EntryComponentsModuleOptions) => ModuleWithProviders<EntryComponentsModule>;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EntryComponentsModule, never>;
|
|
35
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<EntryComponentsModule, never, never, [typeof i1.EntryButtonModule, typeof i2.EntryCommonModule, typeof i3.EntryDialogModule, typeof i4.EntryFileInputModule, typeof i5.EntryValidationModule, typeof i6.EntryPermissionModule, typeof i7.EntrySearchFilterModule, typeof i8.EntrySpinnerModule, typeof i9.EntryTableModule]>;
|
|
36
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<EntryComponentsModule>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { EntryComponentsModule };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enigmatry/entry-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.0",
|
|
4
4
|
"author": "Enigmatry",
|
|
5
5
|
"description": "Enigmatry entry angular material components",
|
|
6
6
|
"homepage": "https://github.com/enigmatry/entry-angular-building-blocks/tree/master/libs/entry-components#readme",
|
|
@@ -10,13 +10,15 @@
|
|
|
10
10
|
},
|
|
11
11
|
"license": "Apache-2.0",
|
|
12
12
|
"peerDependencies": {
|
|
13
|
-
"@angular/animations": "^
|
|
14
|
-
"@angular/cdk": "^
|
|
15
|
-
"@angular/common": "^
|
|
16
|
-
"@angular/core": "^
|
|
17
|
-
"@angular/material": "^
|
|
18
|
-
"@angular/forms": "^
|
|
19
|
-
"@angular/platform-browser": "^
|
|
13
|
+
"@angular/animations": "^20.1.0",
|
|
14
|
+
"@angular/cdk": "^20.1.0",
|
|
15
|
+
"@angular/common": "^20.1.0",
|
|
16
|
+
"@angular/core": "^20.1.0",
|
|
17
|
+
"@angular/material": "^20.1.0",
|
|
18
|
+
"@angular/forms": "^20.1.0",
|
|
19
|
+
"@angular/platform-browser": "^20.1.0",
|
|
20
|
+
"@angular/router": "^20.1.0",
|
|
21
|
+
"rxjs": "7.8.1"
|
|
20
22
|
},
|
|
21
23
|
"dependencies": {
|
|
22
24
|
"lodash-es": "^4.17.21",
|
package/permissions/index.d.ts
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { PipeTransform } from '@angular/core';
|
|
3
|
+
import { CanActivateFn } from '@angular/router';
|
|
4
|
+
import * as i3 from '@angular/common';
|
|
5
|
+
|
|
6
|
+
type PermissionType = number | string | {
|
|
7
|
+
id: number | string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
declare class EntryPermissionPipe<T extends PermissionType> implements PipeTransform {
|
|
11
|
+
private readonly permissionsService;
|
|
12
|
+
transform(permissions: T[]): boolean;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EntryPermissionPipe<any>, never>;
|
|
14
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<EntryPermissionPipe<any>, "entryHasPermissions", false>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare class EntryPermissionDirective<T extends PermissionType> {
|
|
18
|
+
private elementRef;
|
|
19
|
+
private renderer;
|
|
20
|
+
private permissionService;
|
|
21
|
+
set only(permissions: T[]);
|
|
22
|
+
set except(permissions: T[]);
|
|
23
|
+
private toggleVisibility;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EntryPermissionDirective<any>, never>;
|
|
25
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EntryPermissionDirective<any>, "[entryPermissionsOnly],[entryPermissionsExcept]", never, { "only": { "alias": "entryPermissionsOnly"; "required": false; }; "except": { "alias": "entryPermissionsExcept"; "required": false; }; }, {}, never, never, false, never>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
declare const entryPermissionGuard: CanActivateFn;
|
|
29
|
+
|
|
30
|
+
declare abstract class EntryPermissionService<T extends PermissionType> {
|
|
31
|
+
abstract hasPermissions(permissions: T[]): boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare class EntryPermissionModule {
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EntryPermissionModule, never>;
|
|
36
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<EntryPermissionModule, [typeof EntryPermissionDirective, typeof EntryPermissionPipe], [typeof i3.CommonModule], [typeof EntryPermissionDirective, typeof EntryPermissionPipe]>;
|
|
37
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<EntryPermissionModule>;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { EntryPermissionDirective, EntryPermissionModule, EntryPermissionPipe, EntryPermissionService, entryPermissionGuard };
|
package/search-filter/index.d.ts
CHANGED
|
@@ -1,5 +1,227 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Provider, OnInit, EventEmitter, AfterViewInit, OnDestroy } from '@angular/core';
|
|
3
|
+
import * as i8 from '@angular/forms';
|
|
4
|
+
import { FormControl, UntypedFormGroup } from '@angular/forms';
|
|
5
|
+
import { Observable, Subject } from 'rxjs';
|
|
6
|
+
import * as i13 from '@angular/material/autocomplete';
|
|
7
|
+
import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
|
|
8
|
+
import * as i7 from '@angular/common';
|
|
9
|
+
import * as i9 from '@angular/material/input';
|
|
10
|
+
import * as i10 from '@angular/material/button';
|
|
11
|
+
import * as i11 from '@enigmatry/entry-components/button';
|
|
12
|
+
import * as i12 from '@angular/material/select';
|
|
13
|
+
import * as i14 from '@angular/material/datepicker';
|
|
14
|
+
import * as i15 from '@angular/material/form-field';
|
|
15
|
+
import * as i16 from '@enigmatry/entry-components/validation';
|
|
16
|
+
|
|
17
|
+
declare enum ControlType {
|
|
18
|
+
text = "text-input",
|
|
19
|
+
select = "select-input",
|
|
20
|
+
autocomplete = "autocomplete-input",
|
|
21
|
+
date = "date-input",
|
|
22
|
+
dateTime = "date-time-input"
|
|
23
|
+
}
|
|
24
|
+
|
|
1
25
|
/**
|
|
2
|
-
*
|
|
26
|
+
* Base Entry search filter input component.
|
|
3
27
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
28
|
+
declare class SearchFilterBase<T> {
|
|
29
|
+
/** Unique search-filter input key */
|
|
30
|
+
key: string;
|
|
31
|
+
/** Default value to be displayed/selected in the input control */
|
|
32
|
+
value: T | undefined;
|
|
33
|
+
/** Label text to be displayed for the search-filter input control */
|
|
34
|
+
label: string;
|
|
35
|
+
/** Placeholder text for search-filter input control */
|
|
36
|
+
placeholder: string;
|
|
37
|
+
/** Type of input control e.g. 'text' or 'email' */
|
|
38
|
+
type: string;
|
|
39
|
+
/** Control type to be overridden in implementing class, used to render the proper input type e.g. 'text-input' */
|
|
40
|
+
controlType: ControlType;
|
|
41
|
+
/** Max text length to be entered in the input component (default is 256) */
|
|
42
|
+
maxLength: number;
|
|
43
|
+
/** A reference to the form control it represents */
|
|
44
|
+
formControl: FormControl<T | undefined>;
|
|
45
|
+
private readonly maxPossibleLength;
|
|
46
|
+
constructor(options?: Partial<SearchFilterBase<T>>);
|
|
47
|
+
setValue(value: T | undefined): void;
|
|
48
|
+
toFormControl(): FormControl<T | null | undefined>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Model used to populate select or autocomplete options. */
|
|
52
|
+
declare class SelectOption<T> {
|
|
53
|
+
/** Key used as a value for selected option */
|
|
54
|
+
key: T;
|
|
55
|
+
/** String value used as display label of select option */
|
|
56
|
+
label: string;
|
|
57
|
+
constructor(
|
|
58
|
+
/** Key used as a value for selected option */
|
|
59
|
+
key: T,
|
|
60
|
+
/** String value used as display label of select option */
|
|
61
|
+
label: string);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Search filter autocomplete field configuration. Options for the autocomplete are provided
|
|
66
|
+
* indirectly via the search function that takes a string and returns an observable array of
|
|
67
|
+
* SelectOption<T>
|
|
68
|
+
*/
|
|
69
|
+
declare class AutocompleteSearchFilter<T> extends SearchFilterBase<SelectOption<T>> {
|
|
70
|
+
controlType: ControlType;
|
|
71
|
+
/** Callback function for autocomplete options */
|
|
72
|
+
search: (input: string | null) => Observable<SelectOption<T>[]>;
|
|
73
|
+
/** Minimum number of characters that must enter to trigger the search function(default is 3) */
|
|
74
|
+
minimumCharacters: number;
|
|
75
|
+
/** Delay in typing before triggering the search function in milliseconds(default is 300) */
|
|
76
|
+
debounceTime: number;
|
|
77
|
+
private readonly defaultMinimumCharacters;
|
|
78
|
+
private readonly defaultDebounceTime;
|
|
79
|
+
constructor(options?: Partial<AutocompleteSearchFilter<T>>);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Search filter date input filed configuration.
|
|
84
|
+
*/
|
|
85
|
+
declare class DateSearchFilter<D> extends SearchFilterBase<D> {
|
|
86
|
+
controlType: ControlType;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Search filter date time input filed configuration.
|
|
91
|
+
*/
|
|
92
|
+
declare class DateTimeSearchFilter<D> extends SearchFilterBase<D> {
|
|
93
|
+
controlType: ControlType;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Used to provide entry search filter configuration on module level.
|
|
98
|
+
*/
|
|
99
|
+
declare class EntrySearchFilterConfig {
|
|
100
|
+
/** Apply search filters button label (default 'Apply') */
|
|
101
|
+
applyButtonText: string;
|
|
102
|
+
/** Label for 'none selected' select filter option */
|
|
103
|
+
noneSelectedOptionText: string;
|
|
104
|
+
constructor(config?: Partial<EntrySearchFilterConfig>);
|
|
105
|
+
}
|
|
106
|
+
declare const ENTRY_SEARCH_FILTER_CONFIG: i0.InjectionToken<EntrySearchFilterConfig>;
|
|
107
|
+
/**
|
|
108
|
+
* Can be used to provide entry search filter configuration.
|
|
109
|
+
*/
|
|
110
|
+
declare const provideEntrySearchFilterConfig: (config: Partial<EntrySearchFilterConfig>) => Provider;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* SearchFilterParams are the same type as @angular/router type Params,
|
|
114
|
+
* containing a collection of query URL parameters for easy integration.
|
|
115
|
+
*/
|
|
116
|
+
interface SearchFilterParams {
|
|
117
|
+
[key: string]: any;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Search filter select input field configuration. Select options can be provided as fixed list (`options`)
|
|
122
|
+
* or observable (dynamic) list (`options$`).
|
|
123
|
+
*/
|
|
124
|
+
declare class SelectSearchFilter<T> extends SearchFilterBase<T> {
|
|
125
|
+
controlType: ControlType;
|
|
126
|
+
/** Fixed list of select filter options (default is empty list) */
|
|
127
|
+
options: SelectOption<T>[];
|
|
128
|
+
/** Observable (dynamic) list of select filter options */
|
|
129
|
+
options$: Observable<SelectOption<T>[]> | undefined;
|
|
130
|
+
/**
|
|
131
|
+
* Enables selection of multiple options (default is true).
|
|
132
|
+
* If it is set to false, 'none selected' option becomes available as a first option.
|
|
133
|
+
* */
|
|
134
|
+
multiSelect: boolean;
|
|
135
|
+
showNoneOption: boolean;
|
|
136
|
+
constructor(options?: Partial<SelectSearchFilter<T>>);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Search filter text input filed configuration.
|
|
141
|
+
*/
|
|
142
|
+
declare class TextSearchFilter extends SearchFilterBase<string> {
|
|
143
|
+
controlType: ControlType;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Entry SearchFilter component.
|
|
148
|
+
*/
|
|
149
|
+
declare class EntrySearchFilterComponent implements OnInit {
|
|
150
|
+
/** Configuration of the search filters inputs that will be displayed in the search-filter component. */
|
|
151
|
+
searchFilters: SearchFilterBase<any>[];
|
|
152
|
+
/**
|
|
153
|
+
* Emits the change in SearchFilterParams so the containing component can apply them and retrieve the filtered results.
|
|
154
|
+
*/
|
|
155
|
+
searchFilterChange: EventEmitter<SearchFilterParams>;
|
|
156
|
+
searchFilterForm: UntypedFormGroup;
|
|
157
|
+
controlType: typeof ControlType;
|
|
158
|
+
readonly config: EntrySearchFilterConfig;
|
|
159
|
+
ngOnInit(): void;
|
|
160
|
+
onSubmit(): void;
|
|
161
|
+
toFormGroup: (searchFilters: SearchFilterBase<any>[]) => UntypedFormGroup;
|
|
162
|
+
asTextSearchFilter: (searchFilter: SearchFilterBase<any>) => TextSearchFilter;
|
|
163
|
+
asSelectSearchFilter: <T>(searchFilter: SearchFilterBase<T>) => SelectSearchFilter<T>;
|
|
164
|
+
asAutocompleteSearchFilter: <T>(searchFilter: SearchFilterBase<SelectOption<T>>) => AutocompleteSearchFilter<T>;
|
|
165
|
+
asDateTimeSearchFilter: <T>(searchFilter: SearchFilterBase<T>) => DateTimeSearchFilter<T>;
|
|
166
|
+
asDateSearchFilter: <T>(searchFilter: SearchFilterBase<T>) => DateSearchFilter<T>;
|
|
167
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EntrySearchFilterComponent, never>;
|
|
168
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EntrySearchFilterComponent, "entry-search-filter", never, { "searchFilters": { "alias": "searchFilters"; "required": false; }; }, { "searchFilterChange": "searchFilterChange"; }, never, never, false, never>;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
declare class TextSearchFilterComponent {
|
|
172
|
+
searchFilter: TextSearchFilter;
|
|
173
|
+
/** Form group to which the search-filter input component will be added. */
|
|
174
|
+
form: UntypedFormGroup;
|
|
175
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextSearchFilterComponent, never>;
|
|
176
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextSearchFilterComponent, "entry-text-search-filter", never, { "searchFilter": { "alias": "searchFilter"; "required": false; }; "form": { "alias": "form"; "required": false; }; }, {}, never, never, false, never>;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
declare class SelectSearchFilterComponent<T> {
|
|
180
|
+
/** Configuration of the search filters inputs that will be displayed in the search-filter component. */
|
|
181
|
+
searchFilter: SelectSearchFilter<T>;
|
|
182
|
+
/** Form group to which the search-filter input component will be added. */
|
|
183
|
+
form: UntypedFormGroup;
|
|
184
|
+
readonly config: EntrySearchFilterConfig;
|
|
185
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectSearchFilterComponent<any>, never>;
|
|
186
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectSearchFilterComponent<any>, "entry-select-search-filter", never, { "searchFilter": { "alias": "searchFilter"; "required": false; }; "form": { "alias": "form"; "required": false; }; }, {}, never, never, false, never>;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
declare class AutocompleteSearchFilterComponent<T> implements AfterViewInit, OnDestroy {
|
|
190
|
+
searchFilter: AutocompleteSearchFilter<T>;
|
|
191
|
+
searchField: FormControl<string | null>;
|
|
192
|
+
options$: Observable<SelectOption<T>[]>;
|
|
193
|
+
destroy$: Subject<void>;
|
|
194
|
+
private readonly cdr;
|
|
195
|
+
ngAfterViewInit(): void;
|
|
196
|
+
ngOnDestroy(): void;
|
|
197
|
+
displayFn: (_selectedValue: SelectOption<T>) => string;
|
|
198
|
+
onSelected: (event: MatAutocompleteSelectedEvent) => void;
|
|
199
|
+
private clearFilterIfLabelMismatch;
|
|
200
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteSearchFilterComponent<any>, never>;
|
|
201
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteSearchFilterComponent<any>, "entry-autocomplete-search-filter", never, { "searchFilter": { "alias": "searchFilter"; "required": false; }; }, {}, never, never, false, never>;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
declare class DateTimeSearchFilterComponent<D> {
|
|
205
|
+
searchFilter: DateTimeSearchFilter<D>;
|
|
206
|
+
/** Form group to which the search-filter input component will be added. */
|
|
207
|
+
form: UntypedFormGroup;
|
|
208
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeSearchFilterComponent<any>, never>;
|
|
209
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DateTimeSearchFilterComponent<any>, "entry-date-time-search-filter", never, { "searchFilter": { "alias": "searchFilter"; "required": false; }; "form": { "alias": "form"; "required": false; }; }, {}, never, never, false, never>;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
declare class DateSearchFilterComponent<D> {
|
|
213
|
+
searchFilter: DateSearchFilter<D>;
|
|
214
|
+
/** Form group to which the search-filter input component will be added. */
|
|
215
|
+
form: UntypedFormGroup;
|
|
216
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateSearchFilterComponent<any>, never>;
|
|
217
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DateSearchFilterComponent<any>, "entry-date-search-filter", never, { "searchFilter": { "alias": "searchFilter"; "required": false; }; "form": { "alias": "form"; "required": false; }; }, {}, never, never, false, never>;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
declare class EntrySearchFilterModule {
|
|
221
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EntrySearchFilterModule, never>;
|
|
222
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<EntrySearchFilterModule, [typeof EntrySearchFilterComponent, typeof TextSearchFilterComponent, typeof SelectSearchFilterComponent, typeof AutocompleteSearchFilterComponent, typeof DateTimeSearchFilterComponent, typeof DateSearchFilterComponent], [typeof i7.CommonModule, typeof i8.FormsModule, typeof i8.ReactiveFormsModule, typeof i9.MatInputModule, typeof i10.MatButtonModule, typeof i11.EntryButtonModule, typeof i12.MatSelectModule, typeof i13.MatAutocompleteModule, typeof i14.MatDatepickerModule, typeof i15.MatFormFieldModule, typeof i16.EntryValidationModule], [typeof EntrySearchFilterComponent]>;
|
|
223
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<EntrySearchFilterModule>;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export { AutocompleteSearchFilter, DateSearchFilter, DateTimeSearchFilter, ENTRY_SEARCH_FILTER_CONFIG, EntrySearchFilterComponent, EntrySearchFilterConfig, EntrySearchFilterModule, SearchFilterBase, SelectOption, SelectSearchFilter, TextSearchFilter, provideEntrySearchFilterConfig };
|
|
227
|
+
export type { SearchFilterParams };
|
package/spinner/index.d.ts
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
3
|
+
import { ThemePalette } from '@angular/material/core';
|
|
4
|
+
import * as i2 from '@angular/common';
|
|
5
|
+
import * as i3 from '@angular/cdk/overlay';
|
|
6
|
+
import * as i4 from '@angular/material/progress-spinner';
|
|
7
|
+
|
|
8
|
+
declare class EntrySpinnerComponent implements OnInit, OnDestroy {
|
|
9
|
+
color: ThemePalette;
|
|
10
|
+
diameter: number;
|
|
11
|
+
fullscreen: boolean;
|
|
12
|
+
hasBackgroundOverlay: boolean;
|
|
13
|
+
private templateRef;
|
|
14
|
+
private overlayRef;
|
|
15
|
+
private readonly overlay;
|
|
16
|
+
private readonly viewContainerRef;
|
|
17
|
+
private readonly overlayContainer;
|
|
18
|
+
private readonly elementRef;
|
|
19
|
+
ngOnInit(): void;
|
|
20
|
+
ngOnDestroy(): void;
|
|
21
|
+
private createOverlay;
|
|
22
|
+
private configureOverlayContainer;
|
|
23
|
+
private disposeOverlayRef;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EntrySpinnerComponent, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EntrySpinnerComponent, "entry-spinner", never, { "color": { "alias": "color"; "required": false; }; "diameter": { "alias": "diameter"; "required": false; }; "fullscreen": { "alias": "fullscreen"; "required": false; }; "hasBackgroundOverlay": { "alias": "hasBackgroundOverlay"; "required": false; }; }, {}, never, never, false, never>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
declare class EntrySpinnerModule {
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EntrySpinnerModule, never>;
|
|
30
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<EntrySpinnerModule, [typeof EntrySpinnerComponent], [typeof i2.CommonModule, typeof i3.OverlayModule, typeof i4.MatProgressSpinnerModule], [typeof EntrySpinnerComponent]>;
|
|
31
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<EntrySpinnerModule>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { EntrySpinnerComponent, EntrySpinnerModule };
|
|
@@ -8,13 +8,14 @@
|
|
|
8
8
|
}
|
|
9
9
|
$current-lightness: color.lightness($color);
|
|
10
10
|
$adjustment: if($current-lightness > 50%, -$percentage, $percentage);
|
|
11
|
+
|
|
11
12
|
@return color.adjust($color, $lightness: $adjustment);
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
@mixin generate-from($theme) {
|
|
15
16
|
$enabled-states: 'enabled', 'enabled:focus:not(:active)', 'enabled:active', 'enabled:hover:not(:focus):not(:active)';
|
|
16
17
|
$handle-selector: '.mdc-switch__handle::after';
|
|
17
|
-
|
|
18
|
+
|
|
18
19
|
$toggle: map.get($theme, 'general', 'toggle');
|
|
19
20
|
$handle-on-background: map.get($toggle, 'on', 'background');
|
|
20
21
|
$handle-off-background: map.get($toggle, 'off', 'background');
|
|
@@ -35,7 +36,7 @@
|
|
|
35
36
|
&::after {
|
|
36
37
|
background-color: -adjust-lightness($handle-on-background);
|
|
37
38
|
}
|
|
38
|
-
|
|
39
|
+
|
|
39
40
|
&::before {
|
|
40
41
|
background-color: -adjust-lightness($handle-off-background);
|
|
41
42
|
}
|
|
@@ -83,6 +83,7 @@
|
|
|
83
83
|
@function -set-text-groups-for($typography, $body-font, $buttons-font) {
|
|
84
84
|
$typography: -set-typography-group($typography, ('body-1', 'body-2', 'caption'), $body-font);
|
|
85
85
|
$typography: -set-typography-group($typography, ('button'), $buttons-font);
|
|
86
|
+
|
|
86
87
|
@return $typography;
|
|
87
88
|
}
|
|
88
89
|
|
|
@@ -104,5 +105,6 @@
|
|
|
104
105
|
|
|
105
106
|
@function -set-typography-font($typography, $section, $font) {
|
|
106
107
|
$typography: map.set($typography, $section, 'font-family', '"#{$font}"');
|
|
108
|
+
|
|
107
109
|
@return $typography;
|
|
108
110
|
}
|
package/table/README.md
CHANGED
|
@@ -102,9 +102,12 @@ export class EntryComponentsModule { }
|
|
|
102
102
|
| @enigmatry/entry-components | Angular version |
|
|
103
103
|
| --------------------------- | --------------- |
|
|
104
104
|
| 1.14.x | = 14 |
|
|
105
|
-
| 15.x
|
|
106
|
-
| 16.x
|
|
107
|
-
| 17.x
|
|
105
|
+
| 15.x | = 15 |
|
|
106
|
+
| 16.x | = 16 |
|
|
107
|
+
| 17.x | = 17 |
|
|
108
|
+
| 18.x | = 18 |
|
|
109
|
+
| 19.x | = 19 |
|
|
110
|
+
| 20.x | = 20 |
|
|
108
111
|
|
|
109
112
|
## License
|
|
110
113
|
|