ui-core-abv 0.1.15 → 0.1.28
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/ui-core-abv.mjs +284 -110
- package/fesm2022/ui-core-abv.mjs.map +1 -1
- package/lib/components/dynamic-form/form-wrapper/form-wrapper.component.d.ts +10 -9
- package/lib/components/dynamic-form/form.models.d.ts +8 -6
- package/lib/components/dynamic-form/steps-form/step-tabs/step-tabs.component.d.ts +13 -0
- package/lib/components/dynamic-form/steps-form/steps-form.component.d.ts +34 -0
- package/lib/components/inputs/input/input.component.d.ts +2 -1
- package/lib/components/inputs/select/select.component.d.ts +2 -2
- package/lib/components/modal/side-modal/side-modal.component.d.ts +1 -0
- package/lib/components/modal/side-modal/sideModalConfig.model.d.ts +3 -0
- package/lib/components/status-label/status-label.component.d.ts +6 -0
- package/lib/components/table/table.models.d.ts +1 -1
- package/lib/services/modal.service.d.ts +2 -2
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { FormField, FormResult, FormSchema } from '../form.models';
|
|
3
3
|
import { FormGroup } from '@angular/forms';
|
|
4
4
|
import { AppSelectOption } from '../../inputs/select/select.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class UicFormWrapperComponent implements OnChanges {
|
|
7
7
|
private readonly fb;
|
|
8
8
|
form: FormGroup;
|
|
9
|
-
useSteps: boolean;
|
|
10
9
|
currentStep: number;
|
|
11
10
|
schema: FormSchema;
|
|
12
11
|
externalData: Record<string, AppSelectOption[]>;
|
|
@@ -21,18 +20,20 @@ export declare class UicFormWrapperComponent implements OnChanges {
|
|
|
21
20
|
private buildForm;
|
|
22
21
|
ngOnDestroy(): void;
|
|
23
22
|
private updateDisabledState;
|
|
24
|
-
updateField(name: string, value: any): void;
|
|
25
|
-
updateFieldDisabled(name: string, disabled: boolean): void;
|
|
26
23
|
private updateExtenalData;
|
|
27
24
|
private mapValidatorsFromField;
|
|
28
|
-
handleSubmit():
|
|
25
|
+
handleSubmit(): FormResult;
|
|
29
26
|
private handleFormChange;
|
|
30
27
|
private updateFieldOptions;
|
|
31
28
|
private collectAllFields;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
updateFieldValue(name: string, value: any): void;
|
|
30
|
+
updateFieldDisabled(name: string, disabled: boolean): void;
|
|
31
|
+
updateFieldLoading(name: string, loading: boolean): void;
|
|
32
|
+
private updateSchemaField;
|
|
33
|
+
addFieldControl(field: FormField, after?: string): void;
|
|
34
|
+
private newFieldInitialValue;
|
|
35
|
+
private insertField;
|
|
36
|
+
removeFieldControl(name: string): void;
|
|
36
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<UicFormWrapperComponent, never>;
|
|
37
38
|
static ɵcmp: i0.ɵɵComponentDeclaration<UicFormWrapperComponent, "ui-form-wrapper", never, { "schema": { "alias": "schema"; "required": false; }; "externalData": { "alias": "externalData"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "initialValues": { "alias": "initialValues"; "required": false; }; }, { "formSubmit": "formSubmit"; "formChange": "formChange"; }, never, never, true, never>;
|
|
38
39
|
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { AppSelectOption } from "../inputs/select/select.component";
|
|
2
|
+
export interface FormStep {
|
|
3
|
+
title: string;
|
|
4
|
+
form: FormSchema;
|
|
5
|
+
required?: boolean;
|
|
6
|
+
okButtonText?: string;
|
|
7
|
+
cancelButtonText?: string;
|
|
8
|
+
}
|
|
2
9
|
export interface FormSchema {
|
|
3
10
|
cols: number;
|
|
4
|
-
steps?: FormStep[];
|
|
5
11
|
blocks?: FormBlock[];
|
|
6
12
|
}
|
|
7
|
-
export interface FormStep {
|
|
8
|
-
title?: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
blocks: FormBlock[];
|
|
11
|
-
}
|
|
12
13
|
export interface FormBlock {
|
|
13
14
|
title?: string;
|
|
14
15
|
fields: FormField[];
|
|
@@ -19,6 +20,7 @@ export interface FormField {
|
|
|
19
20
|
label: string;
|
|
20
21
|
icon?: string;
|
|
21
22
|
disabled?: boolean;
|
|
23
|
+
loading?: boolean;
|
|
22
24
|
tooltip?: string;
|
|
23
25
|
tip?: string;
|
|
24
26
|
colSpan?: number;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class StepTabsComponent {
|
|
4
|
+
tabs: string[];
|
|
5
|
+
currentTab: string;
|
|
6
|
+
navigationEnabled: boolean;
|
|
7
|
+
showStepTitle: boolean;
|
|
8
|
+
currentTabChange: EventEmitter<string>;
|
|
9
|
+
currentIndex: number;
|
|
10
|
+
changeTab(newTab: string): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StepTabsComponent, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StepTabsComponent, "ui-step-tabs", never, { "tabs": { "alias": "tabs"; "required": false; }; "currentTab": { "alias": "currentTab"; "required": false; }; "navigationEnabled": { "alias": "navigationEnabled"; "required": false; }; "showStepTitle": { "alias": "showStepTitle"; "required": false; }; }, { "currentTabChange": "currentTabChange"; }, never, never, true, never>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { EventEmitter, QueryList } from '@angular/core';
|
|
2
|
+
import { FormResult, FormStep } from '../form.models';
|
|
3
|
+
import { ButtonColor } from '../../button/button.component';
|
|
4
|
+
import { UicFormWrapperComponent } from '../form-wrapper/form-wrapper.component';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class UicStepsFormComponent {
|
|
7
|
+
allForms: QueryList<UicFormWrapperComponent>;
|
|
8
|
+
steps: FormStep[];
|
|
9
|
+
navigationEnabled: boolean;
|
|
10
|
+
showStepTitle: boolean;
|
|
11
|
+
showButtons: boolean;
|
|
12
|
+
buttonsColor: ButtonColor;
|
|
13
|
+
formSubmit: EventEmitter<FormResult>;
|
|
14
|
+
externalData: {};
|
|
15
|
+
formDisabled: boolean;
|
|
16
|
+
loading: boolean;
|
|
17
|
+
tabs: string[];
|
|
18
|
+
completedForms: Map<string, Record<string, any>>;
|
|
19
|
+
currentTabTitle: string;
|
|
20
|
+
ngOnInit(): void;
|
|
21
|
+
private getFormByTitle;
|
|
22
|
+
updateFieldValue(step: string, controlName: string, value: string): void;
|
|
23
|
+
updateFildDisabled(step: string, controlName: string, value: boolean): void;
|
|
24
|
+
updateFildLoading(step: string, controlName: string, value: boolean): void;
|
|
25
|
+
next(): void;
|
|
26
|
+
back(): void;
|
|
27
|
+
private handleStepSubmit;
|
|
28
|
+
private getMergedForm;
|
|
29
|
+
get currentIdx(): number;
|
|
30
|
+
get isFirst(): boolean;
|
|
31
|
+
get isLast(): boolean;
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UicStepsFormComponent, never>;
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UicStepsFormComponent, "ui-steps-form", never, { "steps": { "alias": "steps"; "required": false; }; "navigationEnabled": { "alias": "navigationEnabled"; "required": false; }; "showStepTitle": { "alias": "showStepTitle"; "required": false; }; "showButtons": { "alias": "showButtons"; "required": false; }; "buttonsColor": { "alias": "buttonsColor"; "required": false; }; }, { "formSubmit": "formSubmit"; }, never, never, true, never>;
|
|
34
|
+
}
|
|
@@ -10,9 +10,10 @@ export declare class UicInputComponent {
|
|
|
10
10
|
error: string;
|
|
11
11
|
tip: string;
|
|
12
12
|
disabled: boolean;
|
|
13
|
+
loading: boolean;
|
|
13
14
|
clickButton: EventEmitter<boolean>;
|
|
14
15
|
disableBtn: boolean;
|
|
15
16
|
disableButton(): void;
|
|
16
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<UicInputComponent, never>;
|
|
17
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<UicInputComponent, "ui-input", never, { "icon": { "alias": "icon"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; "internalIcon": { "alias": "internalIcon"; "required": false; }; "size": { "alias": "size"; "required": false; }; "label": { "alias": "label"; "required": false; }; "error": { "alias": "error"; "required": false; }; "tip": { "alias": "tip"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "clickButton": "clickButton"; }, never, ["*"], true, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UicInputComponent, "ui-input", never, { "icon": { "alias": "icon"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; "internalIcon": { "alias": "internalIcon"; "required": false; }; "size": { "alias": "size"; "required": false; }; "label": { "alias": "label"; "required": false; }; "error": { "alias": "error"; "required": false; }; "tip": { "alias": "tip"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; }, { "clickButton": "clickButton"; }, never, ["*"], true, never>;
|
|
18
19
|
}
|
|
@@ -24,6 +24,7 @@ export declare class UicSelectComponent extends base {
|
|
|
24
24
|
showSubtitle: boolean;
|
|
25
25
|
disabled: boolean;
|
|
26
26
|
emptyText: string;
|
|
27
|
+
loading: boolean;
|
|
27
28
|
nullable: boolean;
|
|
28
29
|
options: AppSelectOption[];
|
|
29
30
|
dropdownTemplate: TemplateRef<any>;
|
|
@@ -33,14 +34,13 @@ export declare class UicSelectComponent extends base {
|
|
|
33
34
|
private readonly overlay;
|
|
34
35
|
private readonly vcr;
|
|
35
36
|
private readonly host;
|
|
36
|
-
ngOnInit(): void;
|
|
37
37
|
ngOnChanges(changes: SimpleChanges): void;
|
|
38
38
|
openList(): void;
|
|
39
39
|
selectOption(option: AppSelectOption | null): void;
|
|
40
40
|
closeList(): void;
|
|
41
41
|
writeValue(value: string | number | null): void;
|
|
42
42
|
static ɵfac: i0.ɵɵFactoryDeclaration<UicSelectComponent, never>;
|
|
43
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<UicSelectComponent, "ui-select", never, { "icon": { "alias": "icon"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; "internalIcon": { "alias": "internalIcon"; "required": false; }; "size": { "alias": "size"; "required": false; }; "label": { "alias": "label"; "required": false; }; "error": { "alias": "error"; "required": false; }; "tip": { "alias": "tip"; "required": false; }; "showSubtitle": { "alias": "showSubtitle"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "nullable": { "alias": "nullable"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, {}, never, never, true, never>;
|
|
43
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UicSelectComponent, "ui-select", never, { "icon": { "alias": "icon"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; "internalIcon": { "alias": "internalIcon"; "required": false; }; "size": { "alias": "size"; "required": false; }; "label": { "alias": "label"; "required": false; }; "error": { "alias": "error"; "required": false; }; "tip": { "alias": "tip"; "required": false; }; "showSubtitle": { "alias": "showSubtitle"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "nullable": { "alias": "nullable"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, {}, never, never, true, never>;
|
|
44
44
|
}
|
|
45
45
|
export interface AppSelectOption {
|
|
46
46
|
id?: string | number | null;
|
|
@@ -5,7 +5,10 @@ export interface SideModalConfig<T = any> {
|
|
|
5
5
|
footerEnabled?: boolean;
|
|
6
6
|
footerOkButtonText?: string;
|
|
7
7
|
showCancelButton?: boolean;
|
|
8
|
+
preventCloseOnCancel?: boolean;
|
|
8
9
|
footerCancelButtonText?: string;
|
|
10
|
+
footerCancelIcon?: string;
|
|
11
|
+
footerOkIcon?: string;
|
|
9
12
|
headerEnabled?: boolean;
|
|
10
13
|
width?: string;
|
|
11
14
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class UicStatusLabelComponent {
|
|
3
|
+
color: string;
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UicStatusLabelComponent, never>;
|
|
5
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UicStatusLabelComponent, "ui-status-label", never, { "color": { "alias": "color"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
6
|
+
}
|
|
@@ -44,7 +44,7 @@ export interface TableAction {
|
|
|
44
44
|
rowId: number | string;
|
|
45
45
|
key: string;
|
|
46
46
|
}
|
|
47
|
-
export type ColumnTypes = 'actions' | 'text' | 'list' | 'user' | 'checkbox' | 'icon-list';
|
|
47
|
+
export type ColumnTypes = 'actions' | 'text' | 'list' | 'user' | 'checkbox' | 'icon-list' | 'status';
|
|
48
48
|
export type TableTextColors = 'primary' | 'red' | 'green' | 'blue' | 'yellow' | 'black' | 'grey';
|
|
49
49
|
export type BackgroundColors = 'primary' | 'secondary' | 'red' | 'green' | 'blue' | 'yellow' | 'black' | 'grey' | 'transparent' | 'white';
|
|
50
50
|
export interface TableFilters {
|
|
@@ -13,8 +13,8 @@ export declare class UicModalService {
|
|
|
13
13
|
close(overlayRef: OverlayRef, result?: any): void;
|
|
14
14
|
closeFloating(overlayRef: OverlayRef, result?: any): void;
|
|
15
15
|
private readonly _save$;
|
|
16
|
-
save$: import("rxjs").Observable<
|
|
17
|
-
triggerSave(): void;
|
|
16
|
+
save$: import("rxjs").Observable<boolean>;
|
|
17
|
+
triggerSave(result?: boolean): void;
|
|
18
18
|
private createOverlayConfig;
|
|
19
19
|
private createModalInjector;
|
|
20
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<UicModalService, never>;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './lib/components/button/button.component';
|
|
|
2
2
|
export * from './lib/components/inputs/checkbox/checkbox.component';
|
|
3
3
|
export * from './lib/components/inputs/toggle-button/toggle-button.component';
|
|
4
4
|
export * from './lib/components/dynamic-form/form-wrapper/form-wrapper.component';
|
|
5
|
+
export * from './lib/components/dynamic-form/steps-form/steps-form.component';
|
|
5
6
|
export * from './lib/components/inputs/input/input.component';
|
|
6
7
|
export * from './lib/components/inputs/date-picker/date-picker.component';
|
|
7
8
|
export * from './lib/components/inputs/searcher/searcher.component';
|