@falcon-ng/core 0.0.20
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/esm2022/falcon-ng-core.mjs +5 -0
- package/esm2022/lib/falcon-core/angularmaterial.module.mjs +189 -0
- package/esm2022/lib/falcon-core/component/button/button.component.mjs +47 -0
- package/esm2022/lib/falcon-core/component/card/card.component.mjs +31 -0
- package/esm2022/lib/falcon-core/component/textarea/textarea.component.mjs +28 -0
- package/esm2022/lib/falcon-core/component/textbox/textbox.component.mjs +33 -0
- package/esm2022/lib/falcon-core/component/validation-error/error-message.pipe.mjs +25 -0
- package/esm2022/lib/falcon-core/component/validation-error/error-state-matcher.service.mjs +16 -0
- package/esm2022/lib/falcon-core/component/validation-error/validation-error-message-token.mjs +19 -0
- package/esm2022/lib/falcon-core/component/validation-error/validation-error.component.mjs +42 -0
- package/esm2022/lib/falcon-core/component/validation-error/validation-message-container.directive.mjs +18 -0
- package/esm2022/lib/falcon-core/component/validation-error/validation-message.directive.mjs +53 -0
- package/esm2022/lib/falcon-core/component-resolver.mjs +39 -0
- package/esm2022/lib/falcon-core/control-builder/base-control-builder.mjs +41 -0
- package/esm2022/lib/falcon-core/control-builder/control-builder.component.mjs +31 -0
- package/esm2022/lib/falcon-core/control-builder/control-data-builder.mjs +3 -0
- package/esm2022/lib/falcon-core/control-builder/control-injection.pipe.mjs +29 -0
- package/esm2022/lib/falcon-core/control-type/AutoComplete.mjs +8 -0
- package/esm2022/lib/falcon-core/control-type/Button.mjs +8 -0
- package/esm2022/lib/falcon-core/control-type/ButtonToggle.mjs +8 -0
- package/esm2022/lib/falcon-core/control-type/CheckBox.mjs +8 -0
- package/esm2022/lib/falcon-core/control-type/Chip.mjs +8 -0
- package/esm2022/lib/falcon-core/control-type/DatePicker.mjs +8 -0
- package/esm2022/lib/falcon-core/control-type/Divider.mjs +8 -0
- package/esm2022/lib/falcon-core/control-type/Editor.mjs +8 -0
- package/esm2022/lib/falcon-core/control-type/Radio.mjs +8 -0
- package/esm2022/lib/falcon-core/control-type/RichTextEditor.mjs +8 -0
- package/esm2022/lib/falcon-core/control-type/Select.mjs +8 -0
- package/esm2022/lib/falcon-core/control-type/SlideToggle.mjs +8 -0
- package/esm2022/lib/falcon-core/control-type/Slider.mjs +8 -0
- package/esm2022/lib/falcon-core/control-type/Textarea.mjs +8 -0
- package/esm2022/lib/falcon-core/control-type/Textbox.mjs +8 -0
- package/esm2022/lib/falcon-core/falcon-core.module.mjs +41 -0
- package/esm2022/lib/falcon-core/model/base-control.mjs +50 -0
- package/esm2022/lib/falcon-core/model/enum.mjs +2 -0
- package/esm2022/lib/falcon-core/model/interface.mjs +2 -0
- package/esm2022/lib/falcon-core/model/ivalidator.mjs +2 -0
- package/esm2022/public-api.mjs +28 -0
- package/fesm2022/falcon-ng-core-falcon-ng-core-COOgRH2D.mjs +742 -0
- package/fesm2022/falcon-ng-core-falcon-ng-core-COOgRH2D.mjs.map +1 -0
- package/fesm2022/falcon-ng-core-textarea.component-BBAN4mNj.mjs +73 -0
- package/fesm2022/falcon-ng-core-textarea.component-BBAN4mNj.mjs.map +1 -0
- package/fesm2022/falcon-ng-core-textbox.component-CgwvtUHj.mjs +77 -0
- package/fesm2022/falcon-ng-core-textbox.component-CgwvtUHj.mjs.map +1 -0
- package/fesm2022/falcon-ng-core.mjs +50 -0
- package/fesm2022/falcon-ng-core.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/falcon-core/angularmaterial.module.d.ts +49 -0
- package/lib/falcon-core/component/button/button.component.d.ts +14 -0
- package/lib/falcon-core/component/card/card.component.d.ts +5 -0
- package/lib/falcon-core/component/textarea/textarea.component.d.ts +6 -0
- package/lib/falcon-core/component/textbox/textbox.component.d.ts +6 -0
- package/lib/falcon-core/component/validation-error/error-message.pipe.d.ts +8 -0
- package/lib/falcon-core/component/validation-error/error-state-matcher.service.d.ts +8 -0
- package/lib/falcon-core/component/validation-error/validation-error-message-token.d.ts +7 -0
- package/lib/falcon-core/component/validation-error/validation-error.component.d.ts +9 -0
- package/lib/falcon-core/component/validation-error/validation-message-container.directive.d.ts +7 -0
- package/lib/falcon-core/component/validation-error/validation-message.directive.d.ts +18 -0
- package/lib/falcon-core/component-resolver.d.ts +14 -0
- package/lib/falcon-core/control-builder/base-control-builder.d.ts +18 -0
- package/lib/falcon-core/control-builder/control-builder.component.d.ts +13 -0
- package/lib/falcon-core/control-builder/control-data-builder.d.ts +7 -0
- package/lib/falcon-core/control-builder/control-injection.pipe.d.ts +9 -0
- package/lib/falcon-core/control-type/AutoComplete.d.ts +5 -0
- package/lib/falcon-core/control-type/Button.d.ts +5 -0
- package/lib/falcon-core/control-type/ButtonToggle.d.ts +5 -0
- package/lib/falcon-core/control-type/CheckBox.d.ts +5 -0
- package/lib/falcon-core/control-type/Chip.d.ts +5 -0
- package/lib/falcon-core/control-type/DatePicker.d.ts +5 -0
- package/lib/falcon-core/control-type/Divider.d.ts +5 -0
- package/lib/falcon-core/control-type/Editor.d.ts +5 -0
- package/lib/falcon-core/control-type/Radio.d.ts +5 -0
- package/lib/falcon-core/control-type/RichTextEditor.d.ts +5 -0
- package/lib/falcon-core/control-type/Select.d.ts +5 -0
- package/lib/falcon-core/control-type/SlideToggle.d.ts +5 -0
- package/lib/falcon-core/control-type/Slider.d.ts +5 -0
- package/lib/falcon-core/control-type/Textarea.d.ts +5 -0
- package/lib/falcon-core/control-type/Textbox.d.ts +5 -0
- package/lib/falcon-core/falcon-core.module.d.ts +12 -0
- package/lib/falcon-core/model/base-control.d.ts +83 -0
- package/lib/falcon-core/model/enum.d.ts +144 -0
- package/lib/falcon-core/model/interface.d.ts +299 -0
- package/lib/falcon-core/model/ivalidator.d.ts +19 -0
- package/package.json +25 -0
- package/public-api.d.ts +24 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./control-builder/control-builder.component";
|
|
3
|
+
import * as i2 from "./component/card/card.component";
|
|
4
|
+
import * as i3 from "./component/button/button.component";
|
|
5
|
+
import * as i4 from "./angularmaterial.module";
|
|
6
|
+
import * as i5 from "@angular/common";
|
|
7
|
+
import * as i6 from "./control-builder/control-injection.pipe";
|
|
8
|
+
export declare class FalconCoreModule {
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FalconCoreModule, never>;
|
|
10
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FalconCoreModule, [typeof i1.ControlBuilderComponent, typeof i2.CardComponent, typeof i3.ButtonComponent], [typeof i4.AngularmaterialModule, typeof i5.CommonModule, typeof i6.ControlInjectionPipe], [typeof i4.AngularmaterialModule, typeof i1.ControlBuilderComponent, typeof i2.CardComponent, typeof i3.ButtonComponent]>;
|
|
11
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<FalconCoreModule>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Control } from './enum';
|
|
2
|
+
import { IValidator } from './ivalidator';
|
|
3
|
+
import { FloatLabelType, MatFormFieldAppearance } from '@angular/material/form-field';
|
|
4
|
+
import { ThemePalette } from '@angular/material/core';
|
|
5
|
+
import { IComponentEvent, IMatHint, IOptions, ISelectOptions, ISliderProperty, ISuffixPrefixConfig, ITextAreaProperty } from './interface';
|
|
6
|
+
/**
|
|
7
|
+
* @description
|
|
8
|
+
* Class use for setting the control properties.
|
|
9
|
+
* @usageNotes
|
|
10
|
+
* ```ts
|
|
11
|
+
* new Dropdown({
|
|
12
|
+
* formControlName: 'brave',
|
|
13
|
+
* label: 'Bravery Rating',
|
|
14
|
+
* options: [
|
|
15
|
+
* {key: 'solid', value: 'Solid'},
|
|
16
|
+
* {key: 'great', value: 'Great'},
|
|
17
|
+
* {key: 'good', value: 'Good'},
|
|
18
|
+
* {key: 'unproven', value: 'Unproven'}
|
|
19
|
+
* ],
|
|
20
|
+
* order: 3
|
|
21
|
+
* }),
|
|
22
|
+
** ```
|
|
23
|
+
*/
|
|
24
|
+
export declare class BaseControl<T> {
|
|
25
|
+
value: T | undefined;
|
|
26
|
+
formControlName: string;
|
|
27
|
+
label: string;
|
|
28
|
+
labelPosition: any;
|
|
29
|
+
order: number;
|
|
30
|
+
controlType: Control;
|
|
31
|
+
type: string;
|
|
32
|
+
disabled: boolean;
|
|
33
|
+
options: IOptions[] | any;
|
|
34
|
+
validations: IValidator[];
|
|
35
|
+
appearance: MatFormFieldAppearance | any;
|
|
36
|
+
class: string;
|
|
37
|
+
style: {
|
|
38
|
+
[klass: string]: any;
|
|
39
|
+
};
|
|
40
|
+
placeHolder: string;
|
|
41
|
+
floatLabel: FloatLabelType;
|
|
42
|
+
hint: IMatHint;
|
|
43
|
+
suffix: ISuffixPrefixConfig;
|
|
44
|
+
prefix: ISuffixPrefixConfig;
|
|
45
|
+
textAreaProperty: ITextAreaProperty;
|
|
46
|
+
event: IComponentEvent<T>;
|
|
47
|
+
selectProperty: ISelectOptions;
|
|
48
|
+
color: ThemePalette;
|
|
49
|
+
sliderProperty: ISliderProperty;
|
|
50
|
+
chipSelectedOptions: IOptions[] | any;
|
|
51
|
+
editorProperty: any;
|
|
52
|
+
formArray: BaseControl<T>[] | undefined;
|
|
53
|
+
constructor(options: {
|
|
54
|
+
value?: T;
|
|
55
|
+
formControlName?: string;
|
|
56
|
+
label: string;
|
|
57
|
+
labelPosition?: any;
|
|
58
|
+
order?: number;
|
|
59
|
+
controlType?: Control;
|
|
60
|
+
type?: string;
|
|
61
|
+
disabled?: boolean;
|
|
62
|
+
options?: IOptions[] | any;
|
|
63
|
+
validations?: IValidator[];
|
|
64
|
+
appearance?: MatFormFieldAppearance | any;
|
|
65
|
+
class?: string;
|
|
66
|
+
style?: {
|
|
67
|
+
[klass: string]: any;
|
|
68
|
+
};
|
|
69
|
+
placeHolder?: string;
|
|
70
|
+
floatLabel?: FloatLabelType;
|
|
71
|
+
hint?: IMatHint;
|
|
72
|
+
suffix?: ISuffixPrefixConfig;
|
|
73
|
+
prefix?: ISuffixPrefixConfig;
|
|
74
|
+
textAreaProperty?: ITextAreaProperty;
|
|
75
|
+
event?: IComponentEvent<T>;
|
|
76
|
+
selectProperty?: ISelectOptions;
|
|
77
|
+
color?: ThemePalette;
|
|
78
|
+
sliderProperty?: ISliderProperty;
|
|
79
|
+
chipSelectedOptions?: IOptions[] | any;
|
|
80
|
+
editorProperty?: any;
|
|
81
|
+
formArray?: BaseControl<T>[];
|
|
82
|
+
});
|
|
83
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* Enum use for setting the form control Types.
|
|
4
|
+
* @usageNotes
|
|
5
|
+
* ```ts
|
|
6
|
+
* export class Textbox extends BaseControl<string>{
|
|
7
|
+
* override controlType = ControlType.Select;
|
|
8
|
+
* }
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export declare const enum Control {
|
|
12
|
+
TextBox = "textbox",
|
|
13
|
+
TextArea = "textarea",
|
|
14
|
+
Select = "select",
|
|
15
|
+
DatePicker = "datepicker",
|
|
16
|
+
Radio = "radio",
|
|
17
|
+
Checkbox = "checkbox",
|
|
18
|
+
Button = "button",
|
|
19
|
+
SlideToggle = "slideToggle",
|
|
20
|
+
Slider = "slider",
|
|
21
|
+
ButtonToggle = "buttonToggle",
|
|
22
|
+
AutoComplete = "autocomplete",
|
|
23
|
+
Chip = "chip",
|
|
24
|
+
Editor = "editor",
|
|
25
|
+
Divider = "divider"
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @description
|
|
29
|
+
* Enum use for Appearance of the control.
|
|
30
|
+
* @usageNotes
|
|
31
|
+
* Before and After property should be only use for Checkbox and Radio button
|
|
32
|
+
* ```ts
|
|
33
|
+
* if (componentType == ComponentType.Radio && componentType == ComponentType.Checkbox) THEN
|
|
34
|
+
* only use Appearance Before and After
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare const enum Appearance {
|
|
38
|
+
/**
|
|
39
|
+
* @usageNotes Should be only use for input, textbox, and select
|
|
40
|
+
*/
|
|
41
|
+
Plain = "plain",
|
|
42
|
+
Legacy = "legacy",
|
|
43
|
+
Standard = "standard",
|
|
44
|
+
Fill = "fill",
|
|
45
|
+
Outline = "outline",
|
|
46
|
+
/**
|
|
47
|
+
* @usageNotes Should be only use for label position
|
|
48
|
+
*/
|
|
49
|
+
Before = "before",
|
|
50
|
+
After = "after",
|
|
51
|
+
/**
|
|
52
|
+
* @usageNotes Should be only use for select
|
|
53
|
+
*/
|
|
54
|
+
Multiple = "true",
|
|
55
|
+
/**
|
|
56
|
+
* @usageNotes Should be only use for Buttom
|
|
57
|
+
*/
|
|
58
|
+
Basic = 0,
|
|
59
|
+
Raised = 1,
|
|
60
|
+
Stroked = 2,
|
|
61
|
+
Flat = 3,
|
|
62
|
+
Icon = 4,
|
|
63
|
+
FAB = 5,
|
|
64
|
+
MiniFAB = 6,
|
|
65
|
+
routeLink = 7,
|
|
66
|
+
routeHref = 8
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* @description
|
|
70
|
+
* Enum use for setting the attribute Types.
|
|
71
|
+
* @usageNotes
|
|
72
|
+
* ```ts
|
|
73
|
+
* componentProperty: {
|
|
74
|
+
* attrType: InputTypes.Text
|
|
75
|
+
* }
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
export declare const enum InputTypes {
|
|
79
|
+
Color = "color",
|
|
80
|
+
Date = "date",
|
|
81
|
+
DatetimeLocal = "datetime-local",
|
|
82
|
+
Email = "email",
|
|
83
|
+
Month = "month",
|
|
84
|
+
Number = "number",
|
|
85
|
+
Password = "password",
|
|
86
|
+
Search = "search",
|
|
87
|
+
Tel = "tel",
|
|
88
|
+
Text = "text",
|
|
89
|
+
Time = "time",
|
|
90
|
+
Url = "url",
|
|
91
|
+
Week = "week",
|
|
92
|
+
/**
|
|
93
|
+
* @usageNotes Should be only use for Buttom
|
|
94
|
+
*/
|
|
95
|
+
Button = "button",
|
|
96
|
+
Submit = "submit",
|
|
97
|
+
DragDrop = "dragDrop"
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* @description
|
|
101
|
+
* Enum use for setting HTTP method.
|
|
102
|
+
* @usageNotes
|
|
103
|
+
* ```ts
|
|
104
|
+
* this.genericHttpClientService.Delete(this.deleteUserUrl).subscribe(item => {}, error => {});
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
export declare const enum HttpMethod {
|
|
108
|
+
Get = "GET",
|
|
109
|
+
Post = "POST",
|
|
110
|
+
Put = "PUT",
|
|
111
|
+
Patch = "PATCH",
|
|
112
|
+
Delete = "DELETE"
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* @description
|
|
116
|
+
* Enum use for Table actions
|
|
117
|
+
*/
|
|
118
|
+
export declare const enum TableAction {
|
|
119
|
+
View = 0,
|
|
120
|
+
Edit = 1,
|
|
121
|
+
Delete = 2,
|
|
122
|
+
RightArrow = 3
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* @description
|
|
126
|
+
* Enum use for setting the Floating label.
|
|
127
|
+
* @usageNotes
|
|
128
|
+
* ```ts
|
|
129
|
+
* componentProperty: {
|
|
130
|
+
* floatLabel: Floatinglabel.Always
|
|
131
|
+
* }
|
|
132
|
+
* ```
|
|
133
|
+
*/
|
|
134
|
+
export declare const enum Floatinglabel {
|
|
135
|
+
Auto = "auto",
|
|
136
|
+
Always = "always"
|
|
137
|
+
}
|
|
138
|
+
export declare const enum LoggingLevel {
|
|
139
|
+
None = "None",
|
|
140
|
+
Verbose = "Verbose",
|
|
141
|
+
Info = "Info",
|
|
142
|
+
Warnings = "Warnings",
|
|
143
|
+
Errors = "Errors"
|
|
144
|
+
}
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import { HttpHeaders, HttpParams } from '@angular/common/http';
|
|
2
|
+
import { EventEmitter } from '@angular/core';
|
|
3
|
+
import { LoggingLevel } from './enum';
|
|
4
|
+
/**
|
|
5
|
+
* @description
|
|
6
|
+
* Interface use for IRequestOptions.
|
|
7
|
+
* @usageNotes
|
|
8
|
+
* ```ts
|
|
9
|
+
* {
|
|
10
|
+
* headers : "application/json",
|
|
11
|
+
* observe : "body",
|
|
12
|
+
* params : {},
|
|
13
|
+
* reportProgress : true,
|
|
14
|
+
* responseType : "application/json",
|
|
15
|
+
* withCredentials : true,
|
|
16
|
+
* body : {"username" : "test@test.com", "password": "xxxxxx"},
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare interface IRequestOptions {
|
|
21
|
+
headers?: HttpHeaders | {
|
|
22
|
+
[header: string]: string | string[];
|
|
23
|
+
};
|
|
24
|
+
observe?: 'body' | 'events' | 'response';
|
|
25
|
+
params?: HttpParams | {
|
|
26
|
+
[param: string]: string | string[];
|
|
27
|
+
};
|
|
28
|
+
reportProgress?: boolean;
|
|
29
|
+
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
30
|
+
withCredentials?: boolean;
|
|
31
|
+
body?: any;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @description
|
|
35
|
+
* Interface use for mat table header and column.
|
|
36
|
+
* @usageNotes
|
|
37
|
+
* ```ts
|
|
38
|
+
* columns: MatTable[] = [
|
|
39
|
+
* {
|
|
40
|
+
* columnDef: 'position',
|
|
41
|
+
* header: 'No.',
|
|
42
|
+
* cell: (element: any) => `${element.position}`
|
|
43
|
+
* }
|
|
44
|
+
* ]
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export declare interface MatTable {
|
|
48
|
+
columnDef?: string;
|
|
49
|
+
header?: string;
|
|
50
|
+
cell?: any;
|
|
51
|
+
link?: IRouteLink;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* @description
|
|
55
|
+
* Interface use for mat table configuration.
|
|
56
|
+
* @usageNotes
|
|
57
|
+
* ```ts
|
|
58
|
+
* {
|
|
59
|
+
* columns : MatTable[] = [{
|
|
60
|
+
* columnDef: 'position',
|
|
61
|
+
* header: 'No.',
|
|
62
|
+
* cell: (element: any) => `${element.position}`
|
|
63
|
+
* }, filter : true,
|
|
64
|
+
* pagination : true
|
|
65
|
+
* ]}
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
export declare interface MatTableConfig {
|
|
69
|
+
columns?: MatTable[];
|
|
70
|
+
dataSource?: any;
|
|
71
|
+
filter?: boolean;
|
|
72
|
+
paginationConfig?: MatTablePaginationConfig;
|
|
73
|
+
progressBar?: boolean;
|
|
74
|
+
action?: ITableAction;
|
|
75
|
+
property?: IMatTableStyle;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* @description
|
|
79
|
+
* Interface use for mat table style
|
|
80
|
+
*/
|
|
81
|
+
export declare interface IMatTableStyle {
|
|
82
|
+
css?: string;
|
|
83
|
+
style?: string;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* @description
|
|
87
|
+
* Interface use for mat table pagination configuration.
|
|
88
|
+
*/
|
|
89
|
+
export declare interface MatTablePaginationConfig {
|
|
90
|
+
pagination?: boolean;
|
|
91
|
+
pageSizeOptions?: number[];
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* @description
|
|
95
|
+
* Interface use for mat table action button configuration.
|
|
96
|
+
* view - action for view only
|
|
97
|
+
* edit - action for edit the row
|
|
98
|
+
* delete - action for delete the row
|
|
99
|
+
* menu - context menu for more action
|
|
100
|
+
*/
|
|
101
|
+
export declare interface ITableAction {
|
|
102
|
+
view?: boolean;
|
|
103
|
+
edit?: boolean;
|
|
104
|
+
delete?: boolean;
|
|
105
|
+
arrowRight?: boolean;
|
|
106
|
+
isMenu: boolean;
|
|
107
|
+
menu?: IMatHint[];
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* @description
|
|
111
|
+
* Interface use for material hint component.
|
|
112
|
+
*/
|
|
113
|
+
export declare interface IMatHint {
|
|
114
|
+
isIcon: boolean;
|
|
115
|
+
icon?: IIcon;
|
|
116
|
+
text?: string;
|
|
117
|
+
link?: IRouteLink;
|
|
118
|
+
disabled?: boolean;
|
|
119
|
+
show?: boolean;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* @description
|
|
123
|
+
* Interface for icons
|
|
124
|
+
*/
|
|
125
|
+
export declare interface IIcon {
|
|
126
|
+
iconText?: string;
|
|
127
|
+
iconColor?: string;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* @description
|
|
131
|
+
* Interface for routerLink
|
|
132
|
+
*/
|
|
133
|
+
export declare interface IRouteLink {
|
|
134
|
+
routerLink: string | any;
|
|
135
|
+
queryParams?: string;
|
|
136
|
+
isLink?: boolean;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* @description
|
|
140
|
+
* Interface for Dialog Data
|
|
141
|
+
*/
|
|
142
|
+
export declare interface IDialogData {
|
|
143
|
+
title: string;
|
|
144
|
+
cancelBtnText: string;
|
|
145
|
+
mainbtnText?: string;
|
|
146
|
+
bodyMessage?: string;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* @description
|
|
150
|
+
* Interface use for setting the suffix and prefix.
|
|
151
|
+
* @usageNotes
|
|
152
|
+
* ```ts
|
|
153
|
+
* new Textbox({
|
|
154
|
+
* label: "Prefix & Suffix icon",
|
|
155
|
+
* appearance: Appearance.Outline,
|
|
156
|
+
* placeHolder: "Prefix & Suffix icon",
|
|
157
|
+
* attrType: InputTypes.Text,
|
|
158
|
+
* prefix : {
|
|
159
|
+
* isIcon : true,
|
|
160
|
+
* text : "euro"
|
|
161
|
+
* },
|
|
162
|
+
* suffix : {
|
|
163
|
+
* isIcon: true,
|
|
164
|
+
* text : "done"
|
|
165
|
+
* }
|
|
166
|
+
* });
|
|
167
|
+
* ```
|
|
168
|
+
*/
|
|
169
|
+
export declare interface ISuffixPrefixConfig {
|
|
170
|
+
isIcon?: boolean;
|
|
171
|
+
text?: string;
|
|
172
|
+
toolTipText?: string;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* @description
|
|
176
|
+
* Interface use for an app setting configuration.
|
|
177
|
+
*/
|
|
178
|
+
export declare interface IAppSettingViewModel {
|
|
179
|
+
baseUrl?: string;
|
|
180
|
+
loggingLevel?: LoggingLevel;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* View model for snack bar Message and Action Text
|
|
184
|
+
*/
|
|
185
|
+
export interface SnackbarModel {
|
|
186
|
+
messageText: string;
|
|
187
|
+
actionText: string;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* @description
|
|
191
|
+
* Interface use for setting the TextArea Property.
|
|
192
|
+
* @usageNotes
|
|
193
|
+
* ```ts
|
|
194
|
+
* componentProperty: {
|
|
195
|
+
* textAreaProperty : {
|
|
196
|
+
* cdkTextareaAutosize : true,
|
|
197
|
+
* cdkAutosizeMinRows : 1,
|
|
198
|
+
* cdkAutosizeMaxRows : 2,
|
|
199
|
+
* rows : 2,
|
|
200
|
+
* cols : 2
|
|
201
|
+
* }
|
|
202
|
+
* }
|
|
203
|
+
* ```
|
|
204
|
+
*/
|
|
205
|
+
export declare interface ITextAreaProperty {
|
|
206
|
+
cdkTextareaAutosize?: boolean;
|
|
207
|
+
cdkAutosizeMinRows?: number;
|
|
208
|
+
cdkAutosizeMaxRows?: number;
|
|
209
|
+
rows?: number;
|
|
210
|
+
cols?: number;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* @description
|
|
214
|
+
* Interface use for setting the options meta for select control.
|
|
215
|
+
* @usageNotes
|
|
216
|
+
* ```ts
|
|
217
|
+
* componentProperty: {
|
|
218
|
+
* selectProperty: {multiple : true};
|
|
219
|
+
* }
|
|
220
|
+
* ```
|
|
221
|
+
*/
|
|
222
|
+
export declare interface ISelectOptions {
|
|
223
|
+
single?: boolean;
|
|
224
|
+
multiple?: boolean;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* @description
|
|
228
|
+
* Interface use for setting the options meta.
|
|
229
|
+
* Disable is used for select option values
|
|
230
|
+
* @usageNotes
|
|
231
|
+
* ```ts
|
|
232
|
+
* componentProperty: {
|
|
233
|
+
* options: [{key : 'key-1', value : 'value-1', icon: 'material_icon', disabled: true}];
|
|
234
|
+
* }
|
|
235
|
+
* ```
|
|
236
|
+
*/
|
|
237
|
+
export declare interface IOptions {
|
|
238
|
+
key?: any;
|
|
239
|
+
value?: any;
|
|
240
|
+
icon?: string;
|
|
241
|
+
class?: string;
|
|
242
|
+
disabled?: boolean;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* @description
|
|
246
|
+
* @param change change event for the control
|
|
247
|
+
* @param click click event for the control
|
|
248
|
+
* Events for controls
|
|
249
|
+
*/
|
|
250
|
+
export declare interface IComponentEvent<T> {
|
|
251
|
+
change?: EventEmitter<T>;
|
|
252
|
+
click?: EventEmitter<T>;
|
|
253
|
+
keyboardEnter?: EventEmitter<T>;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* @description
|
|
257
|
+
* Interface use for setting the Mat Slider Property.
|
|
258
|
+
* @usageNotes
|
|
259
|
+
* ```ts
|
|
260
|
+
* componentProperty: {
|
|
261
|
+
* sliderProperty : {
|
|
262
|
+
* invert : true,
|
|
263
|
+
* step : 1,
|
|
264
|
+
* thumbLabel : false,
|
|
265
|
+
* vertical : true,
|
|
266
|
+
* horizontal : false
|
|
267
|
+
* }
|
|
268
|
+
* }
|
|
269
|
+
* ```
|
|
270
|
+
*/
|
|
271
|
+
export declare interface ISliderProperty {
|
|
272
|
+
invert?: boolean;
|
|
273
|
+
thumbLabel?: boolean;
|
|
274
|
+
vertical?: boolean;
|
|
275
|
+
min?: number;
|
|
276
|
+
max?: number;
|
|
277
|
+
step?: number;
|
|
278
|
+
tickInterval?: string | number;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* @description
|
|
282
|
+
* Interface use for mat table header and column.
|
|
283
|
+
* @usageNotes
|
|
284
|
+
* ```ts
|
|
285
|
+
* columns: MatTable[] = [
|
|
286
|
+
* {
|
|
287
|
+
* columnDef: 'position',
|
|
288
|
+
* header: 'No.',
|
|
289
|
+
* cell: (element: any) => `${element.position}`
|
|
290
|
+
* }
|
|
291
|
+
* ]
|
|
292
|
+
* ```
|
|
293
|
+
*/
|
|
294
|
+
export declare interface MatTable {
|
|
295
|
+
columnDef?: string;
|
|
296
|
+
header?: string;
|
|
297
|
+
cell?: any;
|
|
298
|
+
link?: IRouteLink;
|
|
299
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ValidatorFn } from '@angular/forms';
|
|
2
|
+
/**
|
|
3
|
+
* @description
|
|
4
|
+
* Interface use for validation config.
|
|
5
|
+
* @usageNotes
|
|
6
|
+
* ```ts
|
|
7
|
+
* validations: [
|
|
8
|
+
* {
|
|
9
|
+
* name: "required",
|
|
10
|
+
* validator: Validators.required,
|
|
11
|
+
* message: "Required Field"
|
|
12
|
+
* }]
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare interface IValidator {
|
|
16
|
+
name?: string;
|
|
17
|
+
validator: ValidatorFn;
|
|
18
|
+
message?: string;
|
|
19
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@falcon-ng/core",
|
|
3
|
+
"version": "0.0.20",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^18.0.0",
|
|
6
|
+
"@angular/core": "^18.0.0"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"tslib": "^2.3.0"
|
|
10
|
+
},
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"module": "fesm2022/falcon-ng-core.mjs",
|
|
13
|
+
"typings": "index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
"./package.json": {
|
|
16
|
+
"default": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./index.d.ts",
|
|
20
|
+
"esm2022": "./esm2022/falcon-ng-core.mjs",
|
|
21
|
+
"esm": "./esm2022/falcon-ng-core.mjs",
|
|
22
|
+
"default": "./fesm2022/falcon-ng-core.mjs"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|