@webilix/ngx-form-m3 0.0.3 → 0.0.5

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.
@@ -28,6 +28,11 @@ export declare class InputComponent implements OnInit {
28
28
  readonly methods: import("./input.interface").InputMethods<any, any>;
29
29
  readonly component: import("@angular/cdk/portal").ComponentType<any>;
30
30
  };
31
+ DATE: {
32
+ readonly title: string;
33
+ readonly methods: import("./input.interface").InputMethods<any, any>;
34
+ readonly component: import("@angular/cdk/portal").ComponentType<any>;
35
+ };
31
36
  NAME: {
32
37
  readonly title: string;
33
38
  readonly methods: import("./input.interface").InputMethods<any, any>;
@@ -22,8 +22,6 @@ export declare abstract class InputMethods<I /** INPUT **/, V /** VALUE **/> {
22
22
  export interface IInputConfig {
23
23
  readonly appearance: MatFormFieldAppearance;
24
24
  readonly autoFocus?: string;
25
- readonly enClass: string;
26
- readonly descriptionClass: string;
27
25
  }
28
26
  export declare const INPUT_CONTROL: InjectionToken<FormControl>;
29
27
  export declare const INPUT_TYPE: InjectionToken<any>;
@@ -34,7 +34,6 @@ export declare class NgxFormComponent implements OnInit, OnChanges, AfterViewIni
34
34
  protected lastValues: INgxFormValues;
35
35
  protected lastSubmit?: Date;
36
36
  protected isMobile: boolean;
37
- protected headerClass: string;
38
37
  protected inputConfig: IInputConfig;
39
38
  constructor(router: Router, config?: Partial<INgxFormConfig> | undefined);
40
39
  ngOnInit(): void;
@@ -2,9 +2,6 @@ import { EnvironmentProviders, InjectionToken } from '@angular/core';
2
2
  export interface INgxFormConfig {
3
3
  readonly mobileWidth: number;
4
4
  readonly submitTimeout: number;
5
- readonly headerClass: string;
6
- readonly enClass: string;
7
- readonly descriptionClass: string;
8
5
  }
9
6
  export declare const NGX_FORM_CONFIG: InjectionToken<Partial<INgxFormConfig>>;
10
7
  export declare const provideNgxFormConfig: (config: Partial<INgxFormConfig>) => EnvironmentProviders;
@@ -1,7 +1,7 @@
1
1
  import { FormGroup, NgForm } from '@angular/forms';
2
2
  import { MatFormFieldAppearance } from '@angular/material/form-field';
3
- import { IInputColor, IInputEmail, IInputMobile, IInputName, IInputPassword, IInputSelect, IInputText, IInputTextarea } from './inputs';
4
- export type NgxFormInputs = IInputColor | IInputEmail | IInputMobile | IInputName | IInputPassword | IInputSelect | IInputText | IInputTextarea;
3
+ import { IInputColor, IInputDate, IInputEmail, IInputMobile, IInputName, IInputPassword, IInputSelect, IInputText, IInputTextarea } from './inputs';
4
+ export type NgxFormInputs = IInputColor | IInputDate | IInputEmail | IInputMobile | IInputName | IInputPassword | IInputSelect | IInputText | IInputTextarea;
5
5
  type Inputs = NgxFormInputs | {
6
6
  readonly header: string;
7
7
  readonly input: NgxFormInputs;
@@ -0,0 +1,2 @@
1
+ import { ValidatorFn } from '@angular/forms';
2
+ export declare const MaxDateValidator: (max: Date | "NOW") => ValidatorFn;
@@ -0,0 +1,2 @@
1
+ import { ValidatorFn } from '@angular/forms';
2
+ export declare const MinDateValidator: (min: Date | "NOW") => ValidatorFn;
@@ -1 +1,3 @@
1
+ export * from './date/max-date.validator';
2
+ export * from './date/min-date.validator';
1
3
  export * from './length.validator';
@@ -0,0 +1,60 @@
1
+ /* COLUMN AND SECTION HEADER */
2
+ .ngx-form-m3-header {
3
+ font-size: 15px;
4
+ background-color: var(--mdc-filled-text-field-container-color);
5
+ border-width: 0;
6
+ border-radius: 0;
7
+ border-right: 2px solid var(--secondary-fixed);
8
+ color: var(--secondary);
9
+ padding: 1rem;
10
+ }
11
+
12
+ /* FORM BUTOTNS */
13
+ .ngx-form-m3-form-buttons {
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: flex-end;
17
+ column-gap: 1rem;
18
+
19
+ margin-top: 1rem;
20
+ }
21
+ .ngx-form-m3-form-buttons.mobile-view {
22
+ button[type='submit'] {
23
+ flex: 1;
24
+ }
25
+ }
26
+
27
+ /* ENGLISH VALUES */
28
+ .ngx-form-m3-en {
29
+ direction: ltr;
30
+ font-family: Roboto, 'Helvetica Neue', sans-serif !important;
31
+ }
32
+
33
+ /* INPUT SUFFIX */
34
+ .ngx-form-m3-input-suffix {
35
+ display: inline-flex;
36
+
37
+ mat-icon {
38
+ padding-right: 0.5rem;
39
+ }
40
+ }
41
+ .ngx-form-m3-input-suffix.click {
42
+ mat-icon {
43
+ cursor: pointer;
44
+ }
45
+ }
46
+
47
+ /* INPUT DESCRIPTION */
48
+ .ngx-form-m3-input-description {
49
+ font-size: 12px;
50
+ line-height: 18px;
51
+ color: var(--outline);
52
+ text-align: justify;
53
+ margin-top: 0.5rem;
54
+ }
55
+
56
+ /* DISABLED INPUTS */
57
+ .ngx-form-m3-disabled-input {
58
+ opacity: 0.4;
59
+ cursor: default;
60
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webilix/ngx-form-m3",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "author": "Ali Amirnezhad",
5
5
  "description": "Persian form library for Angular and Material 3",
6
6
  "repository": {
@@ -20,12 +20,15 @@
20
20
  },
21
21
  "homepage": "https://github.com/webilix/ngx-form-m3#readme",
22
22
  "peerDependencies": {
23
- "@angular/common": ">=19.0.0",
24
- "@angular/core": ">=19.0.0",
25
- "@angular/forms": ">=19.0.0",
26
- "@angular/material": ">=19.0.1",
23
+ "@angular/common": ">=19.0.4",
24
+ "@angular/core": ">=19.0.4",
25
+ "@angular/forms": ">=19.0.4",
26
+ "@angular/material": ">=19.0.3",
27
27
  "@webilix/helper-library": ">=6.0.2",
28
- "ngx-mask": ">=19.0.1"
28
+ "@webilix/jalali-date-time": ">=2.0.5",
29
+ "@webilix/ngx-calendar-m3": ">=0.0.4",
30
+ "@webilix/ngx-helper-m3": ">=0.0.10",
31
+ "ngx-mask": ">=19.0.4"
29
32
  },
30
33
  "dependencies": {
31
34
  "tslib": "^2.3.0"