@seniorsistemas/angular-components 19.9.11 → 19.9.12
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/dynamic-form/dynamic-form/form-field/addon-config.d.ts +12 -0
- package/dynamic-form/dynamic-form/form-field/configurations/fields/text-field.d.ts +0 -1
- package/dynamic-form/dynamic-form/form-field/fields/bignumber/bignumber-field.component.d.ts +1 -0
- package/dynamic-form/dynamic-form/form-field/fields/currency/currency-field.component.d.ts +1 -0
- package/dynamic-form/dynamic-form/form-field/fields/number/number-field.component.d.ts +1 -0
- package/dynamic-form/dynamic-form/form-field/fields/password/password-field.component.d.ts +4 -0
- package/dynamic-form/dynamic-form/form-field/fields/text/text-field.component.d.ts +1 -0
- package/esm2022/datepicker/lib/datepicker/datepicker.component.mjs +3 -3
- package/esm2022/dynamic-form/dynamic-form/components/lookup/lookup.component.mjs +3 -3
- package/esm2022/dynamic-form/dynamic-form/form-field/addon-config.mjs +29 -2
- package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/text-field.mjs +1 -1
- package/esm2022/dynamic-form/dynamic-form/form-field/fields/bignumber/bignumber-field.component.mjs +8 -7
- package/esm2022/dynamic-form/dynamic-form/form-field/fields/currency/currency-field.component.mjs +6 -5
- package/esm2022/dynamic-form/dynamic-form/form-field/fields/number/number-field.component.mjs +8 -7
- package/esm2022/dynamic-form/dynamic-form/form-field/fields/password/password-field.component.mjs +14 -5
- package/esm2022/dynamic-form/dynamic-form/form-field/fields/text/text-field.component.mjs +8 -7
- package/esm2022/input-group/lib/input-group/input-group.component.mjs +37 -0
- package/esm2022/input-group/lib/input-group/input-group.module.mjs +16 -0
- package/esm2022/input-group/lib/input-group/types/input-group-addon.mjs +2 -0
- package/esm2022/input-group/public-api.mjs +3 -0
- package/esm2022/input-group/seniorsistemas-angular-components-input-group.mjs +5 -0
- package/esm2022/select/lib/select/select.component.mjs +3 -3
- package/fesm2022/seniorsistemas-angular-components-datepicker.mjs +2 -2
- package/fesm2022/seniorsistemas-angular-components-datepicker.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-dynamic-form.mjs +60 -20
- package/fesm2022/seniorsistemas-angular-components-dynamic-form.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-input-group.mjs +57 -0
- package/fesm2022/seniorsistemas-angular-components-input-group.mjs.map +1 -0
- package/fesm2022/seniorsistemas-angular-components-select.mjs +2 -2
- package/fesm2022/seniorsistemas-angular-components-select.mjs.map +1 -1
- package/input-group/README.md +106 -0
- package/input-group/index.d.ts +5 -0
- package/input-group/lib/input-group/input-group.component.d.ts +27 -0
- package/input-group/lib/input-group/input-group.module.d.ts +7 -0
- package/input-group/lib/input-group/types/input-group-addon.d.ts +10 -0
- package/input-group/package.json +3 -0
- package/input-group/public-api.d.ts +3 -0
- package/package.json +7 -1
- package/styles.css +1 -0
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import { ButtonPriority } from "@seniorsistemas/angular-components/button";
|
|
2
|
+
import { InputGroupAddon } from "@seniorsistemas/angular-components/input-group";
|
|
3
|
+
import { FormFieldUtilsService } from "../services/form-field-utils.service";
|
|
2
4
|
export interface AddonConfig {
|
|
3
5
|
label?: string;
|
|
4
6
|
icon?: string;
|
|
5
7
|
callback?: VoidFunction;
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Não tem mais efeito: os addons são renderizados pelo `s-input-group`, que não possui prioridade.
|
|
10
|
+
*/
|
|
6
11
|
priority?: ButtonPriority;
|
|
7
12
|
disabled?: (() => boolean) | boolean;
|
|
8
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Cria uma função que converte um `AddonConfig` em `InputGroupAddon`, reaproveitando o mesmo objeto
|
|
16
|
+
* enquanto o `AddonConfig` for o mesmo (evita reatribuir o input do `s-input-group` a cada ciclo de detecção).
|
|
17
|
+
*
|
|
18
|
+
* O addon fica desabilitado quando o próprio `disabled` do addon for verdadeiro ou quando o form control estiver desabilitado.
|
|
19
|
+
*/
|
|
20
|
+
export declare function createAddonResolver(fieldUtils: FormFieldUtilsService, isFormDisabled: () => boolean): (addon: AddonConfig | undefined) => InputGroupAddon | undefined;
|
|
@@ -19,7 +19,6 @@ export interface TextFieldConfig extends FieldConfig {
|
|
|
19
19
|
/**
|
|
20
20
|
* Máscara de entrada aplicada ao campo. Pode ser uma string fixa ou uma função que retorna a máscara dinamicamente.
|
|
21
21
|
* Exemplo de máscara: `'999.999.999-99'` (CPF), `'(99) 99999-9999'` (telefone).
|
|
22
|
-
* Quando definida, `leftAddon` e `rightAddon` não funcionam.
|
|
23
22
|
*/
|
|
24
23
|
mask?: stringFn | string;
|
|
25
24
|
/**
|
package/dynamic-form/dynamic-form/form-field/fields/bignumber/bignumber-field.component.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export declare class BignumberFieldComponent implements OnInit, AfterViewInit, O
|
|
|
11
11
|
field: import("@angular/core").InputSignal<BignumberFieldConfig | NumberFieldConfig>;
|
|
12
12
|
formControl: import("@angular/core").InputSignal<FormControl<any>>;
|
|
13
13
|
fieldUtils: FormFieldUtilsService;
|
|
14
|
+
protected readonly toAddon: (addon: import("../../addon-config").AddonConfig | undefined) => import("@seniorsistemas/angular-components/input-group").InputGroupAddon | undefined;
|
|
14
15
|
onInput: EventEmitter<any>;
|
|
15
16
|
onFocus: EventEmitter<any>;
|
|
16
17
|
onComplete: EventEmitter<any>;
|
|
@@ -653,6 +653,7 @@ export declare class CurrencyFieldComponent implements BaseFieldComponentConfig,
|
|
|
653
653
|
};
|
|
654
654
|
};
|
|
655
655
|
mask?: string;
|
|
656
|
+
protected readonly isFormDisabled: () => boolean;
|
|
656
657
|
inputRef: import("@angular/core").Signal<any>;
|
|
657
658
|
ngOnInit(): void;
|
|
658
659
|
ngAfterViewInit(): void;
|
|
@@ -12,6 +12,7 @@ export declare class NumberFieldComponent implements OnInit, OnDestroy, BaseFiel
|
|
|
12
12
|
field: import("@angular/core").InputSignal<NumberFieldConfig>;
|
|
13
13
|
formControl: import("@angular/core").InputSignal<FormControl<any>>;
|
|
14
14
|
fieldUtils: FormFieldUtilsService;
|
|
15
|
+
protected readonly toAddon: (addon: import("../../addon-config").AddonConfig | undefined) => import("@seniorsistemas/angular-components/input-group").InputGroupAddon | undefined;
|
|
15
16
|
onInput: EventEmitter<any>;
|
|
16
17
|
onFocus: EventEmitter<any>;
|
|
17
18
|
onComplete: EventEmitter<any>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AfterViewInit, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { FormControl } from '@angular/forms';
|
|
3
|
+
import { InputGroupAddon } from '@seniorsistemas/angular-components/input-group';
|
|
3
4
|
import { PasswordFieldConfig } from '../../configurations/fields/password-field';
|
|
4
5
|
import { BaseFieldComponentConfig } from '../base-field-component';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
@@ -13,10 +14,13 @@ export declare class PasswordFieldComponent implements OnInit, AfterViewInit, On
|
|
|
13
14
|
inputRef: ElementRef | null;
|
|
14
15
|
private ngUnsubscribe;
|
|
15
16
|
passwordVisible: boolean;
|
|
17
|
+
protected readonly showPasswordAddon: InputGroupAddon;
|
|
18
|
+
protected readonly hidePasswordAddon: InputGroupAddon;
|
|
16
19
|
private readonly formUtils;
|
|
17
20
|
ngOnInit(): void;
|
|
18
21
|
ngOnDestroy(): void;
|
|
19
22
|
onChangeVisible(): void;
|
|
23
|
+
private createToggleAddon;
|
|
20
24
|
ngAfterViewInit(): void;
|
|
21
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<PasswordFieldComponent, never>;
|
|
22
26
|
static ɵcmp: i0.ɵɵComponentDeclaration<PasswordFieldComponent, "ng-component", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "formControl": { "alias": "formControl"; "required": true; "isSignal": true; }; }, { "onInput": "onInput"; "onFocus": "onFocus"; "onComplete": "onComplete"; }, never, never, true, never>;
|
|
@@ -9,6 +9,7 @@ export declare class TextFieldComponent implements OnInit, AfterViewInit, OnDest
|
|
|
9
9
|
field: import("@angular/core").InputSignal<TextFieldConfig>;
|
|
10
10
|
formControl: import("@angular/core").InputSignal<FormControl<any>>;
|
|
11
11
|
fieldUtils: FormFieldUtilsService;
|
|
12
|
+
protected readonly toAddon: (addon: import("../../addon-config").AddonConfig | undefined) => import("@seniorsistemas/angular-components/input-group").InputGroupAddon | undefined;
|
|
12
13
|
onInput: EventEmitter<any>;
|
|
13
14
|
onFocus: EventEmitter<any>;
|
|
14
15
|
onComplete: EventEmitter<any>;
|