@webilix/ngx-form-m3 0.0.7 → 0.0.8

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.
@@ -8,6 +8,8 @@ export * from './file/input-file.component';
8
8
  export * from './file/input-file.interface';
9
9
  export * from './mobile/input-mobile.component';
10
10
  export * from './mobile/input-mobile.interface';
11
+ export * from './moment/input-moment.component';
12
+ export * from './moment/input-moment.interface';
11
13
  export * from './name/input-name.component';
12
14
  export * from './name/input-name.interface';
13
15
  export * from './password/input-password.component';
@@ -43,6 +43,11 @@ export declare class InputComponent implements OnInit {
43
43
  readonly methods: import("./input.interface").InputMethods<any, any>;
44
44
  readonly component: import("@angular/cdk/portal").ComponentType<any>;
45
45
  };
46
+ MOMENT: {
47
+ readonly title: string;
48
+ readonly methods: import("./input.interface").InputMethods<any, any>;
49
+ readonly component: import("@angular/cdk/portal").ComponentType<any>;
50
+ };
46
51
  NAME: {
47
52
  readonly title: string;
48
53
  readonly methods: import("./input.interface").InputMethods<any, any>;
@@ -0,0 +1,15 @@
1
+ import { FormControl } from '@angular/forms';
2
+ import { NgxCalendarService } from '@webilix/ngx-calendar-m3';
3
+ import { IInputConfig } from '../input.interface';
4
+ import { IInputMoment } from './input-moment.interface';
5
+ import * as i0 from "@angular/core";
6
+ export declare class InputMomentComponent {
7
+ private readonly ngxCalendarService;
8
+ formControl: FormControl;
9
+ input: IInputMoment;
10
+ config: IInputConfig;
11
+ constructor(ngxCalendarService: NgxCalendarService);
12
+ setMoment(): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputMomentComponent, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputMomentComponent, "ng-component", never, {}, {}, never, never, true, never>;
15
+ }
@@ -0,0 +1,12 @@
1
+ import { ValidatorFn, FormControl } from '@angular/forms';
2
+ import { InputMethods, IInput } from '../input.interface';
3
+ export interface IInputMoment extends Omit<IInput, 'english' | 'value' | 'autoFocus'> {
4
+ readonly type: 'MOMENT';
5
+ readonly value?: Date | null;
6
+ readonly minDate?: Date | 'NOW';
7
+ readonly maxDate?: Date | 'NOW';
8
+ }
9
+ export declare class InputMomentMethods extends InputMethods<IInputMoment, Date | null> {
10
+ control(input: IInputMoment, validators: ValidatorFn[]): FormControl<Date | null>;
11
+ value(value: any, input: IInputMoment): Date | null;
12
+ }
@@ -1,7 +1,7 @@
1
1
  import { FormGroup, NgForm } from '@angular/forms';
2
2
  import { MatFormFieldAppearance } from '@angular/material/form-field';
3
- import { IInputColor, IInputDate, IInputEmail, IInputFile, IInputMobile, IInputName, IInputPassword, IInputSelect, IInputText, IInputTextarea, IInputUrl } from './inputs';
4
- export type NgxFormInputs = IInputColor | IInputDate | IInputEmail | IInputFile | IInputMobile | IInputName | IInputPassword | IInputSelect | IInputText | IInputTextarea | IInputUrl;
3
+ import { IInputColor, IInputDate, IInputEmail, IInputFile, IInputMobile, IInputMoment, IInputName, IInputPassword, IInputSelect, IInputText, IInputTextarea, IInputUrl } from './inputs';
4
+ export type NgxFormInputs = IInputColor | IInputDate | IInputEmail | IInputFile | IInputMobile | IInputMoment | IInputName | IInputPassword | IInputSelect | IInputText | IInputTextarea | IInputUrl;
5
5
  type Inputs = NgxFormInputs | {
6
6
  readonly header: string;
7
7
  readonly input: NgxFormInputs;
@@ -1,3 +1,5 @@
1
1
  export * from './date/max-date.validator';
2
2
  export * from './date/min-date.validator';
3
+ export * from './moment/max-moment.validator';
4
+ export * from './moment/min-moment.validator';
3
5
  export * from './length.validator';
@@ -0,0 +1,2 @@
1
+ import { ValidatorFn } from '@angular/forms';
2
+ export declare const MaxMomentValidator: (max: Date | "NOW") => ValidatorFn;
@@ -0,0 +1,2 @@
1
+ import { ValidatorFn } from '@angular/forms';
2
+ export declare const MinMomentValidator: (min: Date | "NOW") => ValidatorFn;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webilix/ngx-form-m3",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "author": "Ali Amirnezhad",
5
5
  "description": "Persian form library for Angular and Material 3",
6
6
  "repository": {
@@ -20,15 +20,15 @@
20
20
  },
21
21
  "homepage": "https://github.com/webilix/ngx-form-m3#readme",
22
22
  "peerDependencies": {
23
- "@angular/common": ">=19.0.4",
24
- "@angular/core": ">=19.0.4",
25
- "@angular/forms": ">=19.0.4",
26
- "@angular/material": ">=19.0.3",
23
+ "@angular/common": ">=19.0.5",
24
+ "@angular/core": ">=19.0.5",
25
+ "@angular/forms": ">=19.0.5",
26
+ "@angular/material": ">=19.0.4",
27
27
  "@webilix/helper-library": ">=6.0.2",
28
28
  "@webilix/jalali-date-time": ">=2.0.5",
29
- "@webilix/ngx-calendar-m3": ">=0.0.6",
30
- "@webilix/ngx-helper-m3": ">=0.0.12",
31
- "ngx-mask": ">=19.0.4"
29
+ "@webilix/ngx-calendar-m3": ">=0.0.7",
30
+ "@webilix/ngx-helper-m3": ">=0.0.15",
31
+ "ngx-mask": ">=19.0.6"
32
32
  },
33
33
  "dependencies": {
34
34
  "tslib": "^2.3.0"