@verisoft/ui-core 20.1.1 → 20.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/verisoft-ui-core.mjs +2026 -0
- package/fesm2022/verisoft-ui-core.mjs.map +1 -0
- package/index.d.ts +1126 -0
- package/package.json +18 -6
- package/.eslintrc.json +0 -48
- package/jest.config.ts +0 -21
- package/ng-package.json +0 -11
- package/project.json +0 -36
- package/src/index.ts +0 -6
- package/src/lib/common/angular-helper.ts +0 -44
- package/src/lib/common/constants.ts +0 -5
- package/src/lib/common/control.models.ts +0 -80
- package/src/lib/common/datasource-component.model.spec.ts +0 -42
- package/src/lib/common/datasource-component.model.ts +0 -43
- package/src/lib/common/deactivate-guard.model.ts +0 -5
- package/src/lib/common/download-file.ts +0 -20
- package/src/lib/common/filter.ts +0 -7
- package/src/lib/common/icons.ts +0 -34
- package/src/lib/common/index.ts +0 -10
- package/src/lib/common/notificable-property.model.ts +0 -5
- package/src/lib/common/rxjs.spec.ts +0 -58
- package/src/lib/common/rxjs.ts +0 -21
- package/src/lib/components/action-button-group/action-button-group.model.ts +0 -15
- package/src/lib/components/action-button-group/action-button.model.ts +0 -15
- package/src/lib/components/action-button-group/index.ts +0 -2
- package/src/lib/components/base-form/base-form-input.component.ts +0 -120
- package/src/lib/components/base-form/base-form.component.ts +0 -236
- package/src/lib/components/base-form/directives/detail-store.directive.ts +0 -219
- package/src/lib/components/base-form/index.ts +0 -4
- package/src/lib/components/base-form/models/base-form-input.models.ts +0 -11
- package/src/lib/components/base-form/models/base-form.models.ts +0 -31
- package/src/lib/components/base-form/models/index.ts +0 -2
- package/src/lib/components/breadcrumb/breadcrumb.model.ts +0 -21
- package/src/lib/components/breadcrumb/breadcrumb.service.ts +0 -9
- package/src/lib/components/breadcrumb/breadcrumbcore.component.ts +0 -117
- package/src/lib/components/breadcrumb/index.ts +0 -3
- package/src/lib/components/button/button.model.ts +0 -21
- package/src/lib/components/button/index.ts +0 -1
- package/src/lib/components/calendar/calendar.model.ts +0 -16
- package/src/lib/components/calendar/index.ts +0 -1
- package/src/lib/components/checkbox/checkbox.model.ts +0 -10
- package/src/lib/components/checkbox/index.ts +0 -1
- package/src/lib/components/confirm-dialog/confirm-dialog.model.ts +0 -31
- package/src/lib/components/confirm-dialog/index.ts +0 -1
- package/src/lib/components/dropdown/dropdown.model.ts +0 -16
- package/src/lib/components/dropdown/index.ts +0 -1
- package/src/lib/components/dropdown-button/dropdown-button.model.ts +0 -18
- package/src/lib/components/dropdown-button/index.ts +0 -1
- package/src/lib/components/dynamic-component/dynamic-component.model.ts +0 -2
- package/src/lib/components/dynamic-component/index.ts +0 -1
- package/src/lib/components/filter/filter.model.ts +0 -17
- package/src/lib/components/filter/index.ts +0 -1
- package/src/lib/components/form-field/form-field.model.ts +0 -15
- package/src/lib/components/form-field/index.ts +0 -1
- package/src/lib/components/generic-field/generic-field.model.ts +0 -10
- package/src/lib/components/generic-field/index.ts +0 -1
- package/src/lib/components/generic-form/generic-form.component.ts +0 -33
- package/src/lib/components/generic-form/index.ts +0 -1
- package/src/lib/components/header/header.model.ts +0 -18
- package/src/lib/components/header/index.ts +0 -1
- package/src/lib/components/icons/icons.component.ts +0 -22
- package/src/lib/components/icons/icons.model.ts +0 -16
- package/src/lib/components/icons/index.ts +0 -2
- package/src/lib/components/index.ts +0 -37
- package/src/lib/components/input-group/index.ts +0 -1
- package/src/lib/components/input-group/input-group.model.ts +0 -17
- package/src/lib/components/loader/index.ts +0 -1
- package/src/lib/components/loader/loader.model.ts +0 -7
- package/src/lib/components/multiselect/index.ts +0 -1
- package/src/lib/components/multiselect/mutiselect.model.ts +0 -13
- package/src/lib/components/number-input/index.ts +0 -1
- package/src/lib/components/number-input/number-input.model.ts +0 -14
- package/src/lib/components/page-header/index.ts +0 -3
- package/src/lib/components/page-header/page-header.model.ts +0 -11
- package/src/lib/components/page-header/page-header.service.ts +0 -9
- package/src/lib/components/page-header/page-headercore.component.ts +0 -42
- package/src/lib/components/password/index.ts +0 -1
- package/src/lib/components/password/password.model.ts +0 -25
- package/src/lib/components/radiobutton/index.ts +0 -1
- package/src/lib/components/radiobutton/radiobutton.model.ts +0 -16
- package/src/lib/components/section/index.ts +0 -1
- package/src/lib/components/section/section.model.ts +0 -11
- package/src/lib/components/side-menu/directives/side-menu-service.directive.ts +0 -31
- package/src/lib/components/side-menu/index.ts +0 -4
- package/src/lib/components/side-menu/services/side-menu-provider.service.ts +0 -13
- package/src/lib/components/side-menu/services/side-menu.service.ts +0 -62
- package/src/lib/components/side-menu/side-menu.model.ts +0 -67
- package/src/lib/components/slider/index.ts +0 -1
- package/src/lib/components/slider/slider.model.ts +0 -13
- package/src/lib/components/snackbar/index.ts +0 -1
- package/src/lib/components/snackbar/snackbar.model.ts +0 -7
- package/src/lib/components/stepper/index.ts +0 -1
- package/src/lib/components/stepper/stepper.model.ts +0 -24
- package/src/lib/components/switch/index.ts +0 -1
- package/src/lib/components/switch/switch.model.ts +0 -8
- package/src/lib/components/tab-view/index.ts +0 -1
- package/src/lib/components/tab-view/tab-view.model.ts +0 -22
- package/src/lib/components/table/column-configuration.ts +0 -38
- package/src/lib/components/table/index.ts +0 -4
- package/src/lib/components/table/table-builder.ts +0 -93
- package/src/lib/components/table/table-column.directive.ts +0 -62
- package/src/lib/components/table/table.models.ts +0 -261
- package/src/lib/components/table-filter/index.ts +0 -1
- package/src/lib/components/table-filter/table-filter.model.ts +0 -22
- package/src/lib/components/tag/index.ts +0 -1
- package/src/lib/components/tag/tag.model.ts +0 -13
- package/src/lib/components/textarea/index.ts +0 -1
- package/src/lib/components/textarea/textarea.model.ts +0 -13
- package/src/lib/components/textfield/index.ts +0 -1
- package/src/lib/components/textfield/textfield.model.ts +0 -13
- package/src/lib/components/tooltip/index.ts +0 -1
- package/src/lib/components/tooltip/tooltip.model.ts +0 -13
- package/src/lib/components/unsubscribe.component.ts +0 -12
- package/src/lib/directives/datasource.directive.ts +0 -275
- package/src/lib/directives/index.ts +0 -4
- package/src/lib/directives/shortcut.directive.ts +0 -37
- package/src/lib/directives/table-datasource.directive.ts +0 -184
- package/src/lib/directives/table-filter.directive.ts +0 -69
- package/src/lib/format/format.ts +0 -74
- package/src/lib/pipes/error/error.codes.ts +0 -11
- package/src/lib/pipes/error/error.models.ts +0 -27
- package/src/lib/pipes/error/error.pipe.ts +0 -27
- package/src/lib/pipes/error/warning.codes.ts +0 -5
- package/src/lib/pipes/error/warning.pipe.ts +0 -27
- package/src/lib/pipes/helper/enumToList.pipe.ts +0 -16
- package/src/lib/pipes/index.ts +0 -7
- package/src/lib/pipes/keyOrFn/keyOrFn.pipe.ts +0 -23
- package/src/lib/services/confirm-dialog.service.ts +0 -44
- package/src/lib/services/index.ts +0 -4
- package/src/lib/services/leave-form.service.ts +0 -53
- package/src/lib/services/screen-size.service.ts +0 -25
- package/src/lib/services/table.service.ts +0 -22
- package/src/test-setup.ts +0 -8
- package/tsconfig.json +0 -28
- package/tsconfig.lib.json +0 -17
- package/tsconfig.lib.prod.json +0 -9
- package/tsconfig.spec.json +0 -16
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChangeDetectorRef,
|
|
3
|
-
Directive,
|
|
4
|
-
Input,
|
|
5
|
-
inject,
|
|
6
|
-
OnInit,
|
|
7
|
-
} from '@angular/core';
|
|
8
|
-
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
|
|
9
|
-
import { filter, takeUntil } from 'rxjs';
|
|
10
|
-
import { MenuItem } from '../side-menu';
|
|
11
|
-
import { UnsubscribeComponent } from '../unsubscribe.component';
|
|
12
|
-
import { BreadcrumbCore } from './breadcrumb.model';
|
|
13
|
-
import { BreadcrumbService } from './breadcrumb.service';
|
|
14
|
-
|
|
15
|
-
@Directive({
|
|
16
|
-
|
|
17
|
-
})
|
|
18
|
-
export class BreadcrumbCoreComponent
|
|
19
|
-
extends UnsubscribeComponent
|
|
20
|
-
implements BreadcrumbCore, OnInit
|
|
21
|
-
{
|
|
22
|
-
@Input() items: MenuItem[] = [];
|
|
23
|
-
@Input() homeRoute = '/';
|
|
24
|
-
@Input() useHomeRoute = false;
|
|
25
|
-
|
|
26
|
-
static readonly ROUTE_DATA_BREADCRUMB = 'breadcrumb';
|
|
27
|
-
static readonly ROUTE_DATA_BREADCRUMB_URL = 'breadcrumb_url';
|
|
28
|
-
static readonly ROUTE_DATA_NO_BREADCRUMB_ROUTE = 'breadcrumb_no_route';
|
|
29
|
-
static readonly BREADCRUMB_HIDE = 'breadcrumb_hide';
|
|
30
|
-
readonly home = { icon: 'pi pi-home', routerLink: this.homeRoute };
|
|
31
|
-
|
|
32
|
-
router = inject(Router);
|
|
33
|
-
activatedRoute = inject(ActivatedRoute);
|
|
34
|
-
breadcrumbService = inject(BreadcrumbService);
|
|
35
|
-
cdr = inject(ChangeDetectorRef);
|
|
36
|
-
|
|
37
|
-
ngOnInit(): void {
|
|
38
|
-
this.initBreadcrumbsCreation();
|
|
39
|
-
this.initRouteChangeListen();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
private initBreadcrumbsCreation() {
|
|
43
|
-
this.router.events
|
|
44
|
-
.pipe(
|
|
45
|
-
filter((event) => event instanceof NavigationEnd),
|
|
46
|
-
takeUntil(this.destroyed$)
|
|
47
|
-
)
|
|
48
|
-
.subscribe(
|
|
49
|
-
() => (this.items = this.createBreadcrumbs(this.activatedRoute.root))
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
private initRouteChangeListen() {
|
|
54
|
-
this.breadcrumbService.routeChange
|
|
55
|
-
.pipe(
|
|
56
|
-
filter((x) => x.label !== 'Undefined'),
|
|
57
|
-
takeUntil(this.destroyed$)
|
|
58
|
-
)
|
|
59
|
-
.subscribe((x) => {
|
|
60
|
-
this.items = [
|
|
61
|
-
...this.items,
|
|
62
|
-
{
|
|
63
|
-
label: x.label,
|
|
64
|
-
routerLink: x.routerLink,
|
|
65
|
-
url: x.url,
|
|
66
|
-
class: 'breadcrumb',
|
|
67
|
-
},
|
|
68
|
-
];
|
|
69
|
-
this.cdr.detectChanges();
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
private createBreadcrumbs(
|
|
74
|
-
route: ActivatedRoute,
|
|
75
|
-
routerLink = '',
|
|
76
|
-
breadcrumbs: MenuItem[] = []
|
|
77
|
-
): any {
|
|
78
|
-
const children: ActivatedRoute[] = route.children;
|
|
79
|
-
|
|
80
|
-
if (children.length === 0) {
|
|
81
|
-
return breadcrumbs;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
for (const child of children) {
|
|
85
|
-
const routeURL: string = child.snapshot.url
|
|
86
|
-
.map((segment) => segment.path)
|
|
87
|
-
.join('/');
|
|
88
|
-
|
|
89
|
-
if (!child.snapshot.data[BreadcrumbCoreComponent.BREADCRUMB_HIDE]) {
|
|
90
|
-
if (BreadcrumbCoreComponent.ROUTE_DATA_BREADCRUMB_URL !== undefined) {
|
|
91
|
-
const route =
|
|
92
|
-
child.snapshot.data[BreadcrumbCoreComponent.ROUTE_DATA_BREADCRUMB_URL];
|
|
93
|
-
routerLink += `/${route}`;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
if (!BreadcrumbCoreComponent.ROUTE_DATA_BREADCRUMB_URL && routeURL !== '') {
|
|
97
|
-
routerLink += `/${routeURL}`;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
const label = child.snapshot.data[BreadcrumbCoreComponent.ROUTE_DATA_BREADCRUMB];
|
|
101
|
-
if (
|
|
102
|
-
label &&
|
|
103
|
-
BreadcrumbCoreComponent.ROUTE_DATA_NO_BREADCRUMB_ROUTE &&
|
|
104
|
-
child.snapshot.data[
|
|
105
|
-
BreadcrumbCoreComponent.ROUTE_DATA_NO_BREADCRUMB_ROUTE
|
|
106
|
-
]
|
|
107
|
-
) {
|
|
108
|
-
breadcrumbs.push({ label, routerLink: undefined });
|
|
109
|
-
} else if (label && child.snapshot.routeConfig?.path !== '') {
|
|
110
|
-
breadcrumbs.push({ label, routerLink: routerLink });
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
return this.createBreadcrumbs(child, routerLink, breadcrumbs);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { Params } from '@angular/router';
|
|
3
|
-
import { ControlSeverityType, FieldSizeType, IconPositionType } from '../../common';
|
|
4
|
-
|
|
5
|
-
export const BUTTON_COMPONENT_TOKEN = new InjectionToken<ButtonCore>(
|
|
6
|
-
'ButtonComponentToken'
|
|
7
|
-
);
|
|
8
|
-
|
|
9
|
-
export interface ButtonCore {
|
|
10
|
-
label?: string;
|
|
11
|
-
icon?: string;
|
|
12
|
-
badge?: string;
|
|
13
|
-
iconPos: IconPositionType;
|
|
14
|
-
rounded: boolean;
|
|
15
|
-
outlined: boolean;
|
|
16
|
-
raised: boolean;
|
|
17
|
-
severity?: ControlSeverityType;
|
|
18
|
-
routerLink: any[];
|
|
19
|
-
size: FieldSizeType | undefined;
|
|
20
|
-
queryParams?: Params;
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './button.model';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { BaseFormCore } from '../base-form';
|
|
3
|
-
|
|
4
|
-
export const CALENDAR_COMPONENT_TOKEN = new InjectionToken<CalendarCore>(
|
|
5
|
-
'CalendarComponentToken'
|
|
6
|
-
);
|
|
7
|
-
|
|
8
|
-
export interface CalendarCore extends BaseFormCore {
|
|
9
|
-
maxDate: Date;
|
|
10
|
-
icon: string;
|
|
11
|
-
minDate: Date;
|
|
12
|
-
header: string;
|
|
13
|
-
footer: string;
|
|
14
|
-
floatLabel: string | undefined;
|
|
15
|
-
selectionMode: "single" | "multiple" | "range" | undefined;
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './calendar.model';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { InjectionToken, InputSignal } from '@angular/core';
|
|
2
|
-
import { BaseFormCore } from '../base-form';
|
|
3
|
-
|
|
4
|
-
export const CHECKBOX_COMPONENT_TOKEN = new InjectionToken<CheckboxCore>(
|
|
5
|
-
'CheckboxComponentToken'
|
|
6
|
-
);
|
|
7
|
-
|
|
8
|
-
export interface CheckboxCore extends BaseFormCore {
|
|
9
|
-
indeterminate: InputSignal<boolean>;
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './checkbox.model';
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { InjectionToken, Type } from '@angular/core';
|
|
2
|
-
import { SafeHtml } from "@angular/platform-browser";
|
|
3
|
-
import { ControlSeverityType } from '../../common';
|
|
4
|
-
|
|
5
|
-
export const CONFIRM_DIALOG_COMPONENT_TOKEN = new InjectionToken<ConfirmDialogCore>(
|
|
6
|
-
'ConfirmDialogComponentToken'
|
|
7
|
-
);
|
|
8
|
-
|
|
9
|
-
export type ConfirmDialogCore = object
|
|
10
|
-
|
|
11
|
-
export interface DialogData {
|
|
12
|
-
title?: string;
|
|
13
|
-
headerIcon?: string;
|
|
14
|
-
severity?: ControlSeverityType;
|
|
15
|
-
showCancelButton?: boolean;
|
|
16
|
-
buttonOrder?: 'confirm-cancel' | 'cancel-confirm';
|
|
17
|
-
confirmButtonText?: string;
|
|
18
|
-
confirmButtonFn?: () => void;
|
|
19
|
-
cancelButtonFn?: () => void;
|
|
20
|
-
cancelButtonText?: string;
|
|
21
|
-
innerHTML?: string | SafeHtml;
|
|
22
|
-
data?: unknown;
|
|
23
|
-
componentType?: Type<unknown>;
|
|
24
|
-
closable?: boolean;
|
|
25
|
-
width?: string;
|
|
26
|
-
height?: string;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface ExtendedDialogData<TInputs = any, TOutputs = any> extends DialogData {
|
|
30
|
-
data?: TInputs & TOutputs;
|
|
31
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './confirm-dialog.model';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { DataSourceComponentModel } from '../../common';
|
|
3
|
-
import { BaseFormCore } from '../base-form';
|
|
4
|
-
|
|
5
|
-
export const DROPDOWN_COMPONENT_TOKEN = new InjectionToken<DropdownCore<any>>(
|
|
6
|
-
'DropdownComponentToken'
|
|
7
|
-
);
|
|
8
|
-
|
|
9
|
-
export interface DropdownCore<T> extends DataSourceComponentModel<T>, BaseFormCore {
|
|
10
|
-
dropdownIcon?: string;
|
|
11
|
-
floatLabel?: string;
|
|
12
|
-
editable: boolean;
|
|
13
|
-
forceMinWidth: boolean;
|
|
14
|
-
showFilter: boolean;
|
|
15
|
-
localSearch: boolean;
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './dropdown.model';
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { InjectionToken, InputSignal } from "@angular/core";
|
|
2
|
-
import { ControlSeverityType, FieldSizeType } from "../../common";
|
|
3
|
-
import { MenuItem } from "../side-menu";
|
|
4
|
-
|
|
5
|
-
export const DROPDOWN_BUTTON_COMPONENT_TOKEN = new InjectionToken<DropdownButtonCore>(
|
|
6
|
-
'DropdownButtonComponentToken'
|
|
7
|
-
);
|
|
8
|
-
|
|
9
|
-
export interface DropdownButtonCore {
|
|
10
|
-
label: InputSignal<string | undefined>;
|
|
11
|
-
icon: InputSignal<string | undefined>;
|
|
12
|
-
rounded: InputSignal<boolean | undefined>;
|
|
13
|
-
outlined: InputSignal<boolean | undefined>;
|
|
14
|
-
raised: InputSignal<boolean | undefined>;
|
|
15
|
-
severity: InputSignal<ControlSeverityType | undefined>;
|
|
16
|
-
size: InputSignal<FieldSizeType | undefined>;
|
|
17
|
-
items: InputSignal<MenuItem[] | undefined>;
|
|
18
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './dropdown-button.model';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './dynamic-component.model';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
-
import { GenericFieldDefinition } from '../generic-form';
|
|
4
|
-
|
|
5
|
-
export const FILTER_COMPONENT_TOKEN = new InjectionToken<FilterCore>(
|
|
6
|
-
'FilterComponentToken'
|
|
7
|
-
);
|
|
8
|
-
|
|
9
|
-
export interface FilterCore extends ControlValueAccessor {
|
|
10
|
-
fields: GenericFieldDefinition[];
|
|
11
|
-
title?: string;
|
|
12
|
-
fulltextFieldName: string;
|
|
13
|
-
showFulltext: boolean;
|
|
14
|
-
showFilters: boolean;
|
|
15
|
-
autoBind: boolean;
|
|
16
|
-
debounceTime?: number;
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './filter.model';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { NgControl } from '@angular/forms';
|
|
3
|
-
|
|
4
|
-
export const FORM_FIELD_COMPONENT_TOKEN = new InjectionToken<FormFieldCore>(
|
|
5
|
-
'FormFieldComponentToken'
|
|
6
|
-
);
|
|
7
|
-
|
|
8
|
-
export interface FormFieldCore {
|
|
9
|
-
ngControl?: NgControl;
|
|
10
|
-
label?: string;
|
|
11
|
-
tooltip?: string;
|
|
12
|
-
required: boolean;
|
|
13
|
-
testId?: string;
|
|
14
|
-
display: 'flex' | 'block';
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './form-field.model';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { DataSourceComponentModel } from '../../common';
|
|
3
|
-
import { BaseFormCore } from '../base-form';
|
|
4
|
-
|
|
5
|
-
export const GENERIC_FIELD_COMPONENT_TOKEN = new InjectionToken<GenericFieldCore<any>>(
|
|
6
|
-
'GenericFieldComponentToken'
|
|
7
|
-
);
|
|
8
|
-
|
|
9
|
-
export interface GenericFieldCore<T> extends DataSourceComponentModel<T>, BaseFormCore {
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './generic-field.model';
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { ValidatorFn } from '@angular/forms';
|
|
2
|
-
import { DatasourceType } from '@verisoft/core';
|
|
3
|
-
import { FieldSizeType } from '../../common';
|
|
4
|
-
|
|
5
|
-
export interface GenericFieldDefinition {
|
|
6
|
-
validator?: ValidatorFn[];
|
|
7
|
-
type?: GenericFieldTypeType;
|
|
8
|
-
label?: string;
|
|
9
|
-
floatLabel?: boolean;
|
|
10
|
-
name: string;
|
|
11
|
-
optionLabel?: string;
|
|
12
|
-
optionValue?: string;
|
|
13
|
-
options?: unknown[];
|
|
14
|
-
value?: unknown;
|
|
15
|
-
testId?: string;
|
|
16
|
-
size?: FieldSizeType;
|
|
17
|
-
readonly?: boolean;
|
|
18
|
-
datasource?: DatasourceType<any>;
|
|
19
|
-
filterField?: string;
|
|
20
|
-
showFilter?: boolean;
|
|
21
|
-
localSearch?: boolean;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export enum GenericFieldType {
|
|
25
|
-
'dropdown' = 'dropdown',
|
|
26
|
-
'checkbox' = 'checkbox',
|
|
27
|
-
'simplecheckbox' = 'simplecheckbox',
|
|
28
|
-
'calendar' = 'calendar',
|
|
29
|
-
'multiselect' = 'multiselect',
|
|
30
|
-
'text' = 'text',
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export type GenericFieldTypeType = keyof typeof GenericFieldType;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './generic-form.component';
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { MenuItem } from '../side-menu/side-menu.model';
|
|
3
|
-
|
|
4
|
-
export const HEADER_COMPONENT_TOKEN = new InjectionToken<HeaderCore>(
|
|
5
|
-
'HeaderComponentToken'
|
|
6
|
-
);
|
|
7
|
-
|
|
8
|
-
export const SETTINGS_MENU = new InjectionToken<MenuItem[]>(
|
|
9
|
-
'SETTINGS_MENU'
|
|
10
|
-
);
|
|
11
|
-
|
|
12
|
-
export interface HeaderCore {
|
|
13
|
-
title: string;
|
|
14
|
-
userName: string;
|
|
15
|
-
logoUrl: string;
|
|
16
|
-
userRole: any | any[] | undefined;
|
|
17
|
-
menuRef: HTMLDivElement;
|
|
18
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './header.model';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Component, input } from "@angular/core";
|
|
2
|
-
import { ControlSeverityType, FieldSizeType } from "../../common";
|
|
3
|
-
import { IconLibraryType, ICONS_COMPONENT_TOKEN, IconsCore } from "./icons.model";
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
standalone: true,
|
|
7
|
-
template: '',
|
|
8
|
-
providers: [
|
|
9
|
-
{
|
|
10
|
-
provide: ICONS_COMPONENT_TOKEN,
|
|
11
|
-
useExisting: IconsComponent
|
|
12
|
-
}
|
|
13
|
-
]
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
export abstract class IconsComponent implements IconsCore {
|
|
17
|
-
library = input<IconLibraryType>('native');
|
|
18
|
-
name = input.required<string>();
|
|
19
|
-
size = input<FieldSizeType | undefined>();
|
|
20
|
-
severity = input<ControlSeverityType | undefined>();
|
|
21
|
-
class = input<string>();
|
|
22
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { InjectionToken, InputSignal } from "@angular/core";
|
|
2
|
-
import { ControlSeverityType, FieldSizeType } from "../../common";
|
|
3
|
-
|
|
4
|
-
export const ICONS_COMPONENT_TOKEN = new InjectionToken<IconsCore>(
|
|
5
|
-
'IconsComponentToken'
|
|
6
|
-
);
|
|
7
|
-
|
|
8
|
-
export type IconLibraryType = 'native' | 'bootstrap';
|
|
9
|
-
|
|
10
|
-
export interface IconsCore {
|
|
11
|
-
library: InputSignal<IconLibraryType>;
|
|
12
|
-
name: InputSignal<string>;
|
|
13
|
-
size: InputSignal<FieldSizeType | undefined>;
|
|
14
|
-
severity: InputSignal<ControlSeverityType | undefined>;
|
|
15
|
-
class: InputSignal<string | undefined>;
|
|
16
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export * from './action-button-group';
|
|
2
|
-
export * from './base-form';
|
|
3
|
-
export * from './breadcrumb';
|
|
4
|
-
export * from './button';
|
|
5
|
-
export * from './dropdown-button';
|
|
6
|
-
export * from './calendar';
|
|
7
|
-
export * from './checkbox';
|
|
8
|
-
export * from './confirm-dialog';
|
|
9
|
-
export * from './dropdown';
|
|
10
|
-
export * from './dynamic-component';
|
|
11
|
-
export * from './filter';
|
|
12
|
-
export * from './form-field';
|
|
13
|
-
export * from './generic-field';
|
|
14
|
-
export * from './generic-form';
|
|
15
|
-
export * from './header';
|
|
16
|
-
export * from './input-group';
|
|
17
|
-
export * from './loader';
|
|
18
|
-
export * from './multiselect';
|
|
19
|
-
export * from './number-input';
|
|
20
|
-
export * from './page-header';
|
|
21
|
-
export * from './password';
|
|
22
|
-
export * from './radiobutton';
|
|
23
|
-
export * from './section';
|
|
24
|
-
export * from './side-menu';
|
|
25
|
-
export * from './slider';
|
|
26
|
-
export * from './snackbar';
|
|
27
|
-
export * from './stepper';
|
|
28
|
-
export * from './switch';
|
|
29
|
-
export * from './tab-view';
|
|
30
|
-
export * from './table';
|
|
31
|
-
export * from './table-filter';
|
|
32
|
-
export * from './textarea';
|
|
33
|
-
export * from './textfield';
|
|
34
|
-
export * from './tooltip';
|
|
35
|
-
export * from './unsubscribe.component';
|
|
36
|
-
export * from './icons';
|
|
37
|
-
export * from './tag';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './input-group.model'
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { IconPositionType } from '../../common';
|
|
3
|
-
import { BaseFormCore } from '../base-form';
|
|
4
|
-
|
|
5
|
-
export const INPUT_GROUP_COMPONENT_TOKEN = new InjectionToken<InputGroupCore>(
|
|
6
|
-
'HeaderComponentToken'
|
|
7
|
-
);
|
|
8
|
-
|
|
9
|
-
export interface InputGroupItem {
|
|
10
|
-
icon?: string;
|
|
11
|
-
text?: string;
|
|
12
|
-
position: IconPositionType;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface InputGroupCore extends BaseFormCore {
|
|
16
|
-
items: InputGroupItem[];
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './loader.model'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './mutiselect.model';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { DataSourceComponentModel } from '../../common';
|
|
3
|
-
import { BaseFormCore } from '../base-form';
|
|
4
|
-
|
|
5
|
-
export const MULTISELECT_COMPONENT_TOKEN = new InjectionToken<MultiselectCore<any>>(
|
|
6
|
-
'MultiselectComponentToken'
|
|
7
|
-
);
|
|
8
|
-
|
|
9
|
-
export interface MultiselectCore<T> extends DataSourceComponentModel<T>, BaseFormCore {
|
|
10
|
-
dropdownIcon?: string;
|
|
11
|
-
floatLabel?: string;
|
|
12
|
-
editable: boolean;
|
|
13
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './number-input.model';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { BaseFormCore } from '../base-form';
|
|
3
|
-
|
|
4
|
-
export const NUMBER_INPUT_COMPONENT_TOKEN = new InjectionToken<NumberInputCore>(
|
|
5
|
-
'NumberInputComponentToken'
|
|
6
|
-
);
|
|
7
|
-
|
|
8
|
-
export interface NumberInputCore extends BaseFormCore {
|
|
9
|
-
mode: string;
|
|
10
|
-
currency: string;
|
|
11
|
-
min: number;
|
|
12
|
-
max: number;
|
|
13
|
-
step: number;
|
|
14
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
export const PAGE_HEADER_COMPONENT_TOKEN = new InjectionToken<PageHeaderCore>(
|
|
4
|
-
'PageHeaderComponentToken'
|
|
5
|
-
);
|
|
6
|
-
|
|
7
|
-
export interface PageHeaderCore {
|
|
8
|
-
title: string;
|
|
9
|
-
subtitle: string | undefined;
|
|
10
|
-
showBackButton: boolean | undefined;
|
|
11
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, Injectable, Output } from '@angular/core';
|
|
2
|
-
import { PageHeaderCore } from './page-header.model';
|
|
3
|
-
|
|
4
|
-
@Injectable({
|
|
5
|
-
providedIn: 'root',
|
|
6
|
-
})
|
|
7
|
-
export class PageHeaderService {
|
|
8
|
-
@Output() pageHeader = new EventEmitter<PageHeaderCore>();
|
|
9
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef, Directive, Input, OnInit } from '@angular/core';
|
|
2
|
-
import { Router } from '@angular/router';
|
|
3
|
-
import { takeUntil } from 'rxjs';
|
|
4
|
-
import { FieldSize, FieldSizeType } from '../../common';
|
|
5
|
-
import { UnsubscribeComponent } from '../unsubscribe.component';
|
|
6
|
-
import { PageHeaderService } from './page-header.service';
|
|
7
|
-
|
|
8
|
-
@Directive({
|
|
9
|
-
|
|
10
|
-
})
|
|
11
|
-
export class PageHeaderCoreComponent
|
|
12
|
-
extends UnsubscribeComponent
|
|
13
|
-
implements OnInit
|
|
14
|
-
{
|
|
15
|
-
@Input() title!: string;
|
|
16
|
-
@Input() subtitle: string | undefined;
|
|
17
|
-
@Input() showBackButton!: boolean;
|
|
18
|
-
@Input() size: FieldSizeType = FieldSize.small;
|
|
19
|
-
|
|
20
|
-
constructor(
|
|
21
|
-
readonly router: Router,
|
|
22
|
-
readonly cdr: ChangeDetectorRef,
|
|
23
|
-
readonly headerService: PageHeaderService
|
|
24
|
-
) {
|
|
25
|
-
super();
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
ngOnInit(): void {
|
|
29
|
-
this.headerService.pageHeader
|
|
30
|
-
.pipe(takeUntil(this.destroyed$))
|
|
31
|
-
.subscribe((x: any) => {
|
|
32
|
-
this.title = x.title;
|
|
33
|
-
this.subtitle = x.subtitle;
|
|
34
|
-
this.showBackButton = x.showBackButton ?? false;
|
|
35
|
-
this.cdr.detectChanges();
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
protected locationBack() {
|
|
40
|
-
history.back();
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './password.model';
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { BaseFormCore } from '../base-form';
|
|
3
|
-
|
|
4
|
-
export const PASSWORD_COMPONENT_TOKEN = new InjectionToken<PasswordCore>(
|
|
5
|
-
'PasswordComponentToken'
|
|
6
|
-
);
|
|
7
|
-
|
|
8
|
-
export enum PasswordStrength {
|
|
9
|
-
None = 0,
|
|
10
|
-
Low = 1,
|
|
11
|
-
Medium = 2,
|
|
12
|
-
High = 3,
|
|
13
|
-
Superb = 4
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface PasswordCore extends BaseFormCore {
|
|
17
|
-
toggleMask: boolean;
|
|
18
|
-
feedback: boolean;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface PasswordValidationItem {
|
|
22
|
-
severity: 'success' | 'error';
|
|
23
|
-
validationLabel: string;
|
|
24
|
-
validationFn: (x: string) => boolean;
|
|
25
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './radiobutton.model';
|