@webilix/ngx-form-m3 0.0.30 → 0.0.31

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.
Files changed (80) hide show
  1. package/fesm2022/webilix-ngx-form-m3.mjs +93 -93
  2. package/fesm2022/webilix-ngx-form-m3.mjs.map +1 -1
  3. package/index.d.ts +314 -5
  4. package/ngx-form-m3.css +1 -1
  5. package/package.json +9 -9
  6. package/lib/directives/auto-complete.directive.d.ts +0 -6
  7. package/lib/directives/auto-focus.directive.d.ts +0 -10
  8. package/lib/directives/auto-height.directive.d.ts +0 -18
  9. package/lib/directives/form-error.directive.d.ts +0 -13
  10. package/lib/directives/index.d.ts +0 -4
  11. package/lib/inputs/auto-complete/input-auto-complete.component.d.ts +0 -18
  12. package/lib/inputs/auto-complete/input-auto-complete.interface.d.ts +0 -11
  13. package/lib/inputs/bank-card/input-bank-card.component.d.ts +0 -19
  14. package/lib/inputs/bank-card/input-bank-card.interface.d.ts +0 -10
  15. package/lib/inputs/bank-sheba/input-bank-sheba.component.d.ts +0 -16
  16. package/lib/inputs/bank-sheba/input-bank-sheba.interface.d.ts +0 -10
  17. package/lib/inputs/checkbox/input-checkbox.component.d.ts +0 -15
  18. package/lib/inputs/checkbox/input-checkbox.interface.d.ts +0 -11
  19. package/lib/inputs/color/input-color.component.d.ts +0 -14
  20. package/lib/inputs/color/input-color.interface.d.ts +0 -9
  21. package/lib/inputs/component/input-component.component.d.ts +0 -18
  22. package/lib/inputs/component/input-component.interface.d.ts +0 -16
  23. package/lib/inputs/coordinates/input-coordinates.component.d.ts +0 -20
  24. package/lib/inputs/coordinates/input-coordinates.interface.d.ts +0 -16
  25. package/lib/inputs/date/input-date.component.d.ts +0 -18
  26. package/lib/inputs/date/input-date.interface.d.ts +0 -12
  27. package/lib/inputs/email/input-email.component.d.ts +0 -14
  28. package/lib/inputs/email/input-email.interface.d.ts +0 -10
  29. package/lib/inputs/file/input-file.component.d.ts +0 -15
  30. package/lib/inputs/file/input-file.interface.d.ts +0 -10
  31. package/lib/inputs/icon/input-icon.component.d.ts +0 -14
  32. package/lib/inputs/icon/input-icon.interface.d.ts +0 -9
  33. package/lib/inputs/index.d.ts +0 -49
  34. package/lib/inputs/input.component.d.ts +0 -134
  35. package/lib/inputs/input.info.d.ts +0 -10
  36. package/lib/inputs/input.interface.d.ts +0 -35
  37. package/lib/inputs/ip/input-ip.component.d.ts +0 -14
  38. package/lib/inputs/ip/input-ip.interface.d.ts +0 -10
  39. package/lib/inputs/mobile/input-mobile.component.d.ts +0 -15
  40. package/lib/inputs/mobile/input-mobile.interface.d.ts +0 -10
  41. package/lib/inputs/moment/input-moment.component.d.ts +0 -18
  42. package/lib/inputs/moment/input-moment.interface.d.ts +0 -12
  43. package/lib/inputs/multi-select/input-multi-select.component.d.ts +0 -22
  44. package/lib/inputs/multi-select/input-multi-select.interface.d.ts +0 -24
  45. package/lib/inputs/name/input-name.component.d.ts +0 -19
  46. package/lib/inputs/name/input-name.interface.d.ts +0 -15
  47. package/lib/inputs/number/input-number.component.d.ts +0 -22
  48. package/lib/inputs/number/input-number.interface.d.ts +0 -19
  49. package/lib/inputs/password/input-password.component.d.ts +0 -15
  50. package/lib/inputs/password/input-password.interface.d.ts +0 -15
  51. package/lib/inputs/price/input-price.component.d.ts +0 -22
  52. package/lib/inputs/price/input-price.interface.d.ts +0 -16
  53. package/lib/inputs/select/input-select.component.d.ts +0 -16
  54. package/lib/inputs/select/input-select.interface.d.ts +0 -15
  55. package/lib/inputs/text/input-text.component.d.ts +0 -14
  56. package/lib/inputs/text/input-text.interface.d.ts +0 -13
  57. package/lib/inputs/textarea/input-textarea.component.d.ts +0 -15
  58. package/lib/inputs/textarea/input-textarea.interface.d.ts +0 -15
  59. package/lib/inputs/url/input-url.component.d.ts +0 -14
  60. package/lib/inputs/url/input-url.interface.d.ts +0 -10
  61. package/lib/ngx-form.component.d.ts +0 -57
  62. package/lib/ngx-form.config.d.ts +0 -9
  63. package/lib/ngx-form.interface.d.ts +0 -45
  64. package/lib/pipes/index.d.ts +0 -2
  65. package/lib/pipes/input-error.pipe.d.ts +0 -8
  66. package/lib/pipes/multi-line.pipe.d.ts +0 -12
  67. package/lib/validators/bank/card.validator.d.ts +0 -2
  68. package/lib/validators/bank/sheba.validator.d.ts +0 -2
  69. package/lib/validators/count/max-count.validator.d.ts +0 -2
  70. package/lib/validators/count/min-count.validator.d.ts +0 -2
  71. package/lib/validators/date/max-date.validator.d.ts +0 -2
  72. package/lib/validators/date/min-date.validator.d.ts +0 -2
  73. package/lib/validators/index.d.ts +0 -12
  74. package/lib/validators/length.validator.d.ts +0 -2
  75. package/lib/validators/moment/max-moment.validator.d.ts +0 -2
  76. package/lib/validators/moment/min-moment.validator.d.ts +0 -2
  77. package/lib/validators/number/max-number.validator.d.ts +0 -2
  78. package/lib/validators/number/min-number.validator.d.ts +0 -2
  79. package/lib/validators/number/multiply-of.validator.d.ts +0 -2
  80. package/public-api.d.ts +0 -4
@@ -1,16 +0,0 @@
1
- import { FormControl } from '@angular/forms';
2
- import { INgxFormValues } from '../../ngx-form.interface';
3
- import { IInputConfig } from '../input.interface';
4
- import { IInputSelect } from './input-select.interface';
5
- import * as i0 from "@angular/core";
6
- export declare class InputSelectComponent {
7
- formControl: FormControl;
8
- input: IInputSelect;
9
- config: IInputConfig;
10
- values: INgxFormValues;
11
- isButtonDisabled: boolean;
12
- searchQuery: string;
13
- getTitle(): string;
14
- static ɵfac: i0.ɵɵFactoryDeclaration<InputSelectComponent, never>;
15
- static ɵcmp: i0.ɵɵComponentDeclaration<InputSelectComponent, "ng-component", never, { "values": { "alias": "values"; "required": true; }; "isButtonDisabled": { "alias": "isButtonDisabled"; "required": true; }; }, {}, never, never, true, never>;
16
- }
@@ -1,15 +0,0 @@
1
- import { ValidatorFn, FormControl } from '@angular/forms';
2
- import { InputMethods, IInput } from '../input.interface';
3
- export interface IInputSelect extends IInput {
4
- readonly type: 'SELECT';
5
- readonly title: string;
6
- readonly options: {
7
- readonly id: string;
8
- readonly title: string;
9
- }[];
10
- readonly hideSearch?: boolean;
11
- }
12
- export declare class InputSelectMethods extends InputMethods<IInputSelect, string | null> {
13
- control(input: IInputSelect, validators: ValidatorFn[]): FormControl<string | null>;
14
- value(value: any, input: IInputSelect): string | null;
15
- }
@@ -1,14 +0,0 @@
1
- import { FormControl } from '@angular/forms';
2
- import { INgxFormValues } from '../../ngx-form.interface';
3
- import { IInputConfig } from '../input.interface';
4
- import { IInputText } from './input-text.interface';
5
- import * as i0 from "@angular/core";
6
- export declare class InputTextComponent {
7
- formControl: FormControl;
8
- input: IInputText;
9
- config: IInputConfig;
10
- values: INgxFormValues;
11
- isButtonDisabled: boolean;
12
- static ɵfac: i0.ɵɵFactoryDeclaration<InputTextComponent, never>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<InputTextComponent, "ng-component", never, { "values": { "alias": "values"; "required": true; }; "isButtonDisabled": { "alias": "isButtonDisabled"; "required": true; }; }, {}, never, never, true, never>;
14
- }
@@ -1,13 +0,0 @@
1
- import { ValidatorFn, FormControl } from '@angular/forms';
2
- import { InputMethods, IInput } from '../input.interface';
3
- export interface IInputText extends IInput {
4
- readonly type: 'TEXT';
5
- readonly title: string;
6
- readonly minLength?: number;
7
- readonly maxLength?: number;
8
- readonly readonly?: boolean;
9
- }
10
- export declare class InputTextMethods extends InputMethods<IInputText, string | null> {
11
- control(input: IInputText, validators: ValidatorFn[]): FormControl<string | null>;
12
- value(value: any, input: IInputText): string | null;
13
- }
@@ -1,15 +0,0 @@
1
- import { FormControl } from '@angular/forms';
2
- import { INgxFormValues } from '../../ngx-form.interface';
3
- import { IInputConfig } from '../input.interface';
4
- import { IInputTextarea } from './input-textarea.interface';
5
- import * as i0 from "@angular/core";
6
- export declare class InputTextareaComponent {
7
- formControl: FormControl;
8
- input: IInputTextarea;
9
- config: IInputConfig;
10
- values: INgxFormValues;
11
- isButtonDisabled: boolean;
12
- isFocused: boolean;
13
- static ɵfac: i0.ɵɵFactoryDeclaration<InputTextareaComponent, never>;
14
- static ɵcmp: i0.ɵɵComponentDeclaration<InputTextareaComponent, "ng-component", never, { "values": { "alias": "values"; "required": true; }; "isButtonDisabled": { "alias": "isButtonDisabled"; "required": true; }; }, {}, never, never, true, never>;
15
- }
@@ -1,15 +0,0 @@
1
- import { ValidatorFn, FormControl } from '@angular/forms';
2
- import { InputMethods, IInput } from '../input.interface';
3
- export interface IInputTextarea extends IInput {
4
- readonly type: 'TEXTAREA';
5
- readonly title: string;
6
- readonly height?: number;
7
- readonly autoHeight?: boolean;
8
- readonly maxHeight?: number;
9
- readonly maxLength?: number;
10
- readonly counter?: boolean;
11
- }
12
- export declare class InputTextareaMethods extends InputMethods<IInputTextarea, string | null> {
13
- control(input: IInputTextarea, validators: ValidatorFn[]): FormControl<string | null>;
14
- value(value: any, input: IInputTextarea): string | null;
15
- }
@@ -1,14 +0,0 @@
1
- import { FormControl } from '@angular/forms';
2
- import { INgxFormValues } from '../../ngx-form.interface';
3
- import { IInputConfig } from '../input.interface';
4
- import { IInputUrl } from './input-url.interface';
5
- import * as i0 from "@angular/core";
6
- export declare class InputUrlComponent {
7
- formControl: FormControl;
8
- input: IInputUrl;
9
- config: IInputConfig;
10
- values: INgxFormValues;
11
- isButtonDisabled: boolean;
12
- static ɵfac: i0.ɵɵFactoryDeclaration<InputUrlComponent, never>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<InputUrlComponent, "ng-component", never, { "values": { "alias": "values"; "required": true; }; "isButtonDisabled": { "alias": "isButtonDisabled"; "required": true; }; }, {}, never, never, true, never>;
14
- }
@@ -1,10 +0,0 @@
1
- import { ValidatorFn, FormControl } from '@angular/forms';
2
- import { InputMethods, IInput } from '../input.interface';
3
- export interface IInputUrl extends Omit<IInput, 'english'> {
4
- readonly type: 'URL';
5
- readonly showIcon?: boolean;
6
- }
7
- export declare class InputUrlMethods extends InputMethods<IInputUrl, string | null> {
8
- control(input: IInputUrl, validators: ValidatorFn[]): FormControl<string | null>;
9
- value(value: any, input: IInputUrl): string | null;
10
- }
@@ -1,57 +0,0 @@
1
- import { AfterViewInit, EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
- import { FormGroup, NgForm } from '@angular/forms';
3
- import { Router } from '@angular/router';
4
- import { IInputConfig } from './inputs';
5
- import { INgxFormConfig } from './ngx-form.config';
6
- import { INgxForm, INgxFormInit, INgxFormValues, NgxFormInputs } from './ngx-form.interface';
7
- import * as i0 from "@angular/core";
8
- interface IRow {
9
- header: string;
10
- inputs: NgxFormInputs[];
11
- flex: number[];
12
- }
13
- interface IColumn {
14
- header: string;
15
- rows: IRow[];
16
- }
17
- interface ISection {
18
- header: string;
19
- columns: IColumn[];
20
- flex: number[];
21
- }
22
- export declare class NgxFormComponent implements OnInit, OnChanges, AfterViewInit {
23
- private readonly router;
24
- private readonly config?;
25
- ngForm?: NgForm;
26
- onResize: (event: any) => void;
27
- ngxForm: INgxForm;
28
- onInit: EventEmitter<INgxFormInit>;
29
- onSubmit: EventEmitter<INgxFormValues>;
30
- onChange: EventEmitter<INgxFormValues>;
31
- protected formGroup: FormGroup;
32
- protected sections: ISection[];
33
- protected hiddenInputs: string[];
34
- protected values: INgxFormValues;
35
- protected lastValues: INgxFormValues;
36
- protected lastSubmit?: Date;
37
- protected isMobile: boolean;
38
- protected inputConfig: IInputConfig;
39
- constructor(router: Router, config?: Partial<INgxFormConfig> | undefined);
40
- ngOnInit(): void;
41
- ngOnChanges(changes: SimpleChanges): void;
42
- ngAfterViewInit(): void;
43
- getInputs(): NgxFormInputs[];
44
- getValues(): INgxFormValues;
45
- setInput(input: NgxFormInputs): void;
46
- checkInputs(): void;
47
- checkSubmit(): void;
48
- setSize(): void;
49
- showSection(section: ISection): boolean;
50
- showColumn(column: IColumn): boolean;
51
- showRow(row: IRow): boolean;
52
- showInput(input: NgxFormInputs): boolean;
53
- onClick(action: string[] | (() => void)): void;
54
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxFormComponent, [null, { optional: true; }]>;
55
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxFormComponent, "ngx-form", never, { "ngxForm": { "alias": "ngxForm"; "required": true; }; }, { "onInit": "onInit"; "onSubmit": "onSubmit"; "onChange": "onChange"; }, never, never, true, never>;
56
- }
57
- export {};
@@ -1,9 +0,0 @@
1
- import { MatFormFieldAppearance } from '@angular/material/form-field';
2
- import { EnvironmentProviders, InjectionToken } from '@angular/core';
3
- export interface INgxFormConfig {
4
- readonly mobileWidth: number;
5
- readonly submitTimeout: number;
6
- readonly appearance: MatFormFieldAppearance;
7
- }
8
- export declare const NGX_FORM_CONFIG: InjectionToken<Partial<INgxFormConfig>>;
9
- export declare const provideNgxFormConfig: (config: Partial<INgxFormConfig>) => EnvironmentProviders;
@@ -1,45 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- import { FormControl, FormGroup, NgForm } from '@angular/forms';
3
- import { MatFormFieldAppearance } from '@angular/material/form-field';
4
- import { IInputAutoComplete, IInputBankCard, IInputBankSheba, IInputCheckbox, IInputColor, IInputComponent, IInputCoordinates, IInputDate, IInputEmail, IInputFile, IInputIcon, IInputIp, IInputMobile, IInputMoment, IInputMultiSelect, IInputName, IInputNumber, IInputPassword, IInputPrice, IInputSelect, IInputText, IInputTextarea, IInputUrl } from './inputs';
5
- export type NgxFormInputs = IInputAutoComplete | IInputBankCard | IInputBankSheba | IInputCheckbox | IInputColor | IInputComponent | IInputCoordinates | IInputDate | IInputEmail | IInputFile | IInputIcon | IInputIp | IInputMobile | IInputMoment | IInputMultiSelect | IInputName | IInputNumber | IInputPassword | IInputPrice | IInputSelect | IInputText | IInputTextarea | IInputUrl;
6
- type Inputs = NgxFormInputs | {
7
- readonly header: string;
8
- readonly input: NgxFormInputs;
9
- } | {
10
- readonly header?: string;
11
- readonly inputs: NgxFormInputs[];
12
- readonly flex?: number[];
13
- };
14
- interface INgxFormColumn {
15
- readonly header?: string;
16
- readonly rows: Inputs[];
17
- }
18
- export interface INgxForm {
19
- readonly submit: string;
20
- readonly inputs: (Inputs | {
21
- readonly header?: string;
22
- readonly columns: INgxFormColumn[];
23
- readonly flex?: number[];
24
- })[];
25
- readonly buttons?: INgxFormButton[];
26
- readonly mobileView?: boolean;
27
- readonly appearance?: MatFormFieldAppearance;
28
- updateValues?: (values: INgxFormValues) => {
29
- [key: string]: any;
30
- };
31
- }
32
- export interface INgxFormInit {
33
- readonly formGroup?: FormGroup;
34
- readonly ngForm?: NgForm;
35
- }
36
- export interface INgxFormButton {
37
- readonly title: string;
38
- readonly action: string[] | (() => void);
39
- }
40
- export interface INgxFormValues {
41
- [key: string]: any;
42
- }
43
- export declare const NGX_FORM_CONTROL: InjectionToken<FormControl>;
44
- export declare const NGX_FORM_INPUT: InjectionToken<IInputComponent>;
45
- export {};
@@ -1,2 +0,0 @@
1
- export * from './input-error.pipe';
2
- export * from './multi-line.pipe';
@@ -1,8 +0,0 @@
1
- import { PipeTransform } from '@angular/core';
2
- import { ValidationErrors } from '@angular/forms';
3
- import * as i0 from "@angular/core";
4
- export declare class InputErrorPipe implements PipeTransform {
5
- transform(errors: ValidationErrors | null | undefined, type: string): string;
6
- static ɵfac: i0.ɵɵFactoryDeclaration<InputErrorPipe, never>;
7
- static ɵpipe: i0.ɵɵPipeDeclaration<InputErrorPipe, "InputErrorPipe", true>;
8
- }
@@ -1,12 +0,0 @@
1
- import { PipeTransform } from '@angular/core';
2
- import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
3
- import * as i0 from "@angular/core";
4
- export declare class MultiLinePipe implements PipeTransform {
5
- private readonly sanitizer;
6
- constructor(sanitizer: DomSanitizer);
7
- transform(value: string, config?: {
8
- html?: boolean;
9
- }): string | SafeHtml;
10
- static ɵfac: i0.ɵɵFactoryDeclaration<MultiLinePipe, never>;
11
- static ɵpipe: i0.ɵɵPipeDeclaration<MultiLinePipe, "MultiLinePipe", true>;
12
- }
@@ -1,2 +0,0 @@
1
- import { ValidatorFn } from '@angular/forms';
2
- export declare const BankCardValidator: () => ValidatorFn;
@@ -1,2 +0,0 @@
1
- import { ValidatorFn } from '@angular/forms';
2
- export declare const BankShebaValidator: () => ValidatorFn;
@@ -1,2 +0,0 @@
1
- import { ValidatorFn } from '@angular/forms';
2
- export declare const MaxCountValidator: (max: number) => ValidatorFn;
@@ -1,2 +0,0 @@
1
- import { ValidatorFn } from '@angular/forms';
2
- export declare const MinCountValidator: (min: number) => ValidatorFn;
@@ -1,2 +0,0 @@
1
- import { ValidatorFn } from '@angular/forms';
2
- export declare const MaxDateValidator: (max: Date | "NOW") => ValidatorFn;
@@ -1,2 +0,0 @@
1
- import { ValidatorFn } from '@angular/forms';
2
- export declare const MinDateValidator: (min: Date | "NOW") => ValidatorFn;
@@ -1,12 +0,0 @@
1
- export * from './bank/card.validator';
2
- export * from './bank/sheba.validator';
3
- export * from './count/max-count.validator';
4
- export * from './count/min-count.validator';
5
- export * from './date/max-date.validator';
6
- export * from './date/min-date.validator';
7
- export * from './moment/max-moment.validator';
8
- export * from './moment/min-moment.validator';
9
- export * from './number/max-number.validator';
10
- export * from './number/min-number.validator';
11
- export * from './number/multiply-of.validator';
12
- export * from './length.validator';
@@ -1,2 +0,0 @@
1
- import { ValidatorFn } from '@angular/forms';
2
- export declare const LengthValidator: (length: number) => ValidatorFn;
@@ -1,2 +0,0 @@
1
- import { ValidatorFn } from '@angular/forms';
2
- export declare const MaxMomentValidator: (max: Date | "NOW") => ValidatorFn;
@@ -1,2 +0,0 @@
1
- import { ValidatorFn } from '@angular/forms';
2
- export declare const MinMomentValidator: (min: Date | "NOW") => ValidatorFn;
@@ -1,2 +0,0 @@
1
- import { ValidatorFn } from '@angular/forms';
2
- export declare const MaxNumberValidator: (maximum: number) => ValidatorFn;
@@ -1,2 +0,0 @@
1
- import { ValidatorFn } from '@angular/forms';
2
- export declare const MinNumberValidator: (minimum: number) => ValidatorFn;
@@ -1,2 +0,0 @@
1
- import { ValidatorFn } from '@angular/forms';
2
- export declare const MultiplyOfNumberValidator: (multiplyOf: number) => ValidatorFn;
package/public-api.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export * from './lib/ngx-form.component';
2
- export * from './lib/ngx-form.config';
3
- export * from './lib/ngx-form.interface';
4
- export type { IInputComponent } from './lib/inputs/component/input-component.interface';