valtech-components 2.0.366 → 2.0.368

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.
@@ -0,0 +1,14 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { FormControl } from '@angular/forms';
3
+ import { InputMetadata } from '../../types';
4
+ import * as i0 from "@angular/core";
5
+ export declare class NumberFromToComponent implements OnInit {
6
+ props: InputMetadata;
7
+ fromControl: FormControl;
8
+ toControl: FormControl;
9
+ constructor();
10
+ ngOnInit(): void;
11
+ private updateMainControl;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<NumberFromToComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<NumberFromToComponent, "val-number-from-to", never, { "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
14
+ }
@@ -1,5 +1,17 @@
1
1
  import { ValidatorFn } from '@angular/forms';
2
+ import { InputMetadata } from '../../types';
2
3
  export declare const maxLength: (field: string, max: number) => {
3
4
  validator: ValidatorFn;
4
5
  error: string;
5
6
  };
7
+ export declare const createNumberFromToField: (name: string, label: string, fromLabel: string, toLabel: string, options?: {
8
+ fromPlaceholder?: string;
9
+ toPlaceholder?: string;
10
+ hint?: string;
11
+ range?: {
12
+ min: number;
13
+ max: number;
14
+ };
15
+ validators?: ValidatorFn[];
16
+ order?: number;
17
+ }) => InputMetadata;
@@ -44,14 +44,15 @@ export declare enum InputType {
44
44
  PASSWORD = 2,
45
45
  COMMENT = 3,
46
46
  NUMBER = 4,
47
- PIN_CODE = 5,
48
- DATE = 6,
49
- HOUR = 7,
50
- CHECK = 8,
51
- RADIO = 9,
52
- SELECT = 10,
53
- SEARCH_SELECT = 11,
54
- FILE = 12
47
+ NUMBER_FROM_TO = 5,
48
+ PIN_CODE = 6,
49
+ DATE = 7,
50
+ HOUR = 8,
51
+ CHECK = 9,
52
+ RADIO = 10,
53
+ SELECT = 11,
54
+ SEARCH_SELECT = 12,
55
+ FILE = 13
55
56
  }
56
57
  /**
57
58
  * Option for select, radio, etc. inputs.
@@ -105,6 +106,14 @@ export type InputMetadata = {
105
106
  withDefault?: string | boolean;
106
107
  /** Field state */
107
108
  state: ComponentState;
109
+ /** Label for "from" field (only for NUMBER_FROM_TO type) */
110
+ fromLabel?: string;
111
+ /** Label for "to" field (only for NUMBER_FROM_TO type) */
112
+ toLabel?: string;
113
+ /** Placeholder for "from" field (only for NUMBER_FROM_TO type) */
114
+ fromPlaceholder?: string;
115
+ /** Placeholder for "to" field (only for NUMBER_FROM_TO type) */
116
+ toPlaceholder?: string;
108
117
  };
109
118
  /**
110
119
  * A section in a form, grouping multiple fields.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "2.0.366",
3
+ "version": "2.0.368",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.0.0",
6
6
  "@angular/core": "^18.0.0",
package/public-api.d.ts CHANGED
@@ -48,6 +48,7 @@ export * from './lib/components/molecules/links-cake/types';
48
48
  export * from './lib/components/molecules/notes-box/notes-box.component';
49
49
  export * from './lib/components/molecules/notes-box/types';
50
50
  export * from './lib/components/molecules/number-input/number-input.component';
51
+ export * from './lib/components/molecules/number-from-to/number-from-to.component';
51
52
  export * from './lib/components/molecules/password-input/password-input.component';
52
53
  export * from './lib/components/molecules/pin-input/pin-input.component';
53
54
  export * from './lib/components/molecules/popover-selector/popover-selector.component';