@po-ui/ng-components 5.15.0 → 5.16.0
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/bundles/po-ui-ng-components.umd.js +206 -162
- package/bundles/po-ui-ng-components.umd.js.map +1 -1
- package/esm2015/lib/components/po-field/po-datepicker-range/interfaces/po-datepicker-range-literals.interface.js +1 -1
- package/esm2015/lib/components/po-field/po-datepicker-range/po-datepicker-range-base.component.js +48 -6
- package/esm2015/lib/components/po-field/po-datepicker-range/po-datepicker-range.component.js +2 -2
- package/esm2015/lib/components/po-field/po-datepicker-range/po-datepicker-range.literals.js +9 -5
- package/esm2015/lib/components/po-field/po-field.model.js +75 -0
- package/esm2015/lib/components/po-field/po-lookup/po-lookup-base.component.js +11 -5
- package/esm2015/lib/components/po-field/po-lookup/po-lookup.component.js +2 -2
- package/esm2015/lib/components/po-field/po-switch/po-switch.component.js +85 -9
- package/esm2015/lib/components/po-page/po-page-header/po-page-header.component.js +2 -2
- package/esm2015/lib/components/po-stepper/po-stepper-circle/po-stepper-circle.component.js +2 -2
- package/esm2015/lib/components/po-stepper/po-stepper-step/po-stepper-step.component.js +5 -4
- package/esm2015/lib/components/po-stepper/po-stepper.component.js +2 -2
- package/esm2015/lib/components/po-table/po-table-column-label/po-table-column-label.interface.js +1 -1
- package/esm2015/po-ui-ng-components.js +2 -2
- package/fesm2015/po-ui-ng-components.js +188 -141
- package/fesm2015/po-ui-ng-components.js.map +1 -1
- package/lib/components/po-field/po-datepicker-range/interfaces/po-datepicker-range-literals.interface.d.ts +2 -0
- package/lib/components/po-field/po-datepicker-range/po-datepicker-range-base.component.d.ts +5 -3
- package/lib/components/po-field/po-field.model.d.ts +50 -0
- package/lib/components/po-field/po-lookup/po-lookup-base.component.d.ts +3 -1
- package/lib/components/po-field/po-switch/po-switch.component.d.ts +49 -3
- package/lib/components/po-stepper/po-stepper-step/po-stepper-step.component.d.ts +1 -0
- package/lib/components/po-table/po-table-column-label/po-table-column-label.interface.d.ts +1 -1
- package/package.json +4 -4
- package/po-ui-ng-components-5.16.0.tgz +0 -0
- package/po-ui-ng-components.d.ts +1 -1
- package/po-ui-ng-components.metadata.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-update/v2/index.js +1 -1
- package/schematics/ng-update/v3/index.js +1 -1
- package/schematics/ng-update/v4/index.js +1 -1
- package/schematics/ng-update/v5/index.js +1 -1
- package/esm2015/lib/components/po-field/po-switch/po-switch-base.component.js +0 -158
- package/lib/components/po-field/po-switch/po-switch-base.component.d.ts +0 -100
- package/po-ui-ng-components-5.15.0.tgz +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } from '@angular/forms';
|
|
2
1
|
import { EventEmitter } from '@angular/core';
|
|
3
|
-
import {
|
|
2
|
+
import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } from '@angular/forms';
|
|
4
3
|
import { PoLanguageService } from '../../../services/po-language/po-language.service';
|
|
5
|
-
import {
|
|
4
|
+
import { PoDateService } from './../../../services/po-date/po-date.service';
|
|
6
5
|
import { PoDatepickerRangeLiterals } from './interfaces/po-datepicker-range-literals.interface';
|
|
6
|
+
import { PoDatepickerRange } from './interfaces/po-datepicker-range.interface';
|
|
7
7
|
/**
|
|
8
8
|
* @description
|
|
9
9
|
*
|
|
@@ -235,12 +235,14 @@ export declare abstract class PoDatepickerRangeBaseComponent implements ControlV
|
|
|
235
235
|
protected dateFormatFailed(value: string): boolean;
|
|
236
236
|
protected updateModel(value: any): void;
|
|
237
237
|
protected validateModel(value: any): void;
|
|
238
|
+
protected verifyValidDate(startDate: string, endDate: string): boolean;
|
|
238
239
|
private convertPatternDateFormat;
|
|
239
240
|
private dateRangeFailed;
|
|
240
241
|
private dateRangeFormatFailed;
|
|
241
242
|
private dateRangeObjectFailed;
|
|
242
243
|
private isDateRangeObject;
|
|
243
244
|
private requiredDateRangeFailed;
|
|
245
|
+
private dateIsValid;
|
|
244
246
|
protected abstract resetDateRangeInputValidation(): void;
|
|
245
247
|
protected abstract updateScreenByModel(dateRange: PoDatepickerRange): any;
|
|
246
248
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
export declare abstract class PoFieldModel<T> implements ControlValueAccessor {
|
|
4
|
+
/** Rótulo exibido pelo componente. */
|
|
5
|
+
label: string;
|
|
6
|
+
/** Nome do componente. */
|
|
7
|
+
name: string;
|
|
8
|
+
/** Texto de apoio para o campo. */
|
|
9
|
+
help: string;
|
|
10
|
+
/**
|
|
11
|
+
* @optional
|
|
12
|
+
*
|
|
13
|
+
* @description
|
|
14
|
+
*
|
|
15
|
+
* Aplica o foco no elemento ao ser iniciado.
|
|
16
|
+
* > Caso mais de um elemento seja configurado com essa propriedade,
|
|
17
|
+
* o último elemento declarado com ela terá o foco.
|
|
18
|
+
*
|
|
19
|
+
* @default `false`
|
|
20
|
+
*/
|
|
21
|
+
autoFocus: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* @optional
|
|
24
|
+
*
|
|
25
|
+
* @description
|
|
26
|
+
*
|
|
27
|
+
* Indica se o campo será desabilitado.
|
|
28
|
+
*
|
|
29
|
+
* @default `false`
|
|
30
|
+
*/
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* @optional
|
|
34
|
+
*
|
|
35
|
+
* @description
|
|
36
|
+
*
|
|
37
|
+
* Evento disparado ao alterar valor do campo.
|
|
38
|
+
*/
|
|
39
|
+
change: EventEmitter<T>;
|
|
40
|
+
value: T;
|
|
41
|
+
protected onTouched: any;
|
|
42
|
+
private propagateChange;
|
|
43
|
+
constructor();
|
|
44
|
+
setDisabledState(isDisabled: boolean): void;
|
|
45
|
+
registerOnChange(fn: any): void;
|
|
46
|
+
registerOnTouched(fn: any): void;
|
|
47
|
+
writeValue(value: T): void;
|
|
48
|
+
protected updateModel(value: T): void;
|
|
49
|
+
abstract onWriteValue(value: T): void;
|
|
50
|
+
}
|
|
@@ -199,6 +199,8 @@ export declare abstract class PoLookupBaseComponent implements ControlValueAcces
|
|
|
199
199
|
* @default `false`
|
|
200
200
|
*/
|
|
201
201
|
infiniteScroll: boolean;
|
|
202
|
+
/** Exibe um ícone que permite limpar o campo. */
|
|
203
|
+
clean: boolean;
|
|
202
204
|
/**
|
|
203
205
|
* Evento será disparado quando ocorrer algum erro na requisição de busca do item.
|
|
204
206
|
* Será passado por parâmetro o objeto de erro retornado.
|
|
@@ -317,6 +319,7 @@ export declare abstract class PoLookupBaseComponent implements ControlValueAcces
|
|
|
317
319
|
ngOnDestroy(): void;
|
|
318
320
|
ngOnInit(): void;
|
|
319
321
|
ngAfterViewInit(): void;
|
|
322
|
+
cleanModel(): void;
|
|
320
323
|
setDisabledState(isDisabled: boolean): void;
|
|
321
324
|
registerOnValidatorChange(fn: () => void): void;
|
|
322
325
|
registerOnChange(func: any): void;
|
|
@@ -328,7 +331,6 @@ export declare abstract class PoLookupBaseComponent implements ControlValueAcces
|
|
|
328
331
|
[key: string]: any;
|
|
329
332
|
};
|
|
330
333
|
writeValue(value: any): void;
|
|
331
|
-
protected cleanModel(): void;
|
|
332
334
|
protected cleanViewValue(): void;
|
|
333
335
|
protected getFormattedLabel(value: any): string;
|
|
334
336
|
protected selectModel(value: any): void;
|
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
import { AfterViewInit, ChangeDetectorRef, ElementRef } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { PoFieldModel } from '../po-field.model';
|
|
3
|
+
import { PoSwitchLabelPosition } from './po-switch-label-position.enum';
|
|
3
4
|
/**
|
|
4
|
-
* @docsExtends
|
|
5
|
+
* @docsExtends PoFieldModel
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
*
|
|
9
|
+
* O componente `po-switch` é um [checkbox](/documentation/po-checkbox-group) mais intuitivo, pois faz analogia a um interruptor.
|
|
10
|
+
* Deve ser usado quando deseja-se transmitir a ideia de ligar / desligar uma funcionalidade específica.
|
|
11
|
+
*
|
|
12
|
+
* Pode-se ligar ou deligar o botão utilizando a tecla de espaço ou o clique do mouse.
|
|
13
|
+
*
|
|
14
|
+
* O texto exibido pode ser alterado de acordo com o valor setado aumentando as possibilidades de uso do componente,
|
|
15
|
+
* portanto, recomenda-se informar textos que contextualizem seu uso para que facilite a compreensão do usuário.
|
|
16
|
+
*
|
|
17
|
+
* > O componente não altera o valor incial informado no *model*, portanto indica-se inicializa-lo caso ter necessidade.
|
|
5
18
|
*
|
|
6
19
|
* @example
|
|
7
20
|
*
|
|
@@ -27,8 +40,38 @@ import { PoSwitchBaseComponent } from './po-switch-base.component';
|
|
|
27
40
|
* <file name="sample-po-switch-order-reactive-form/sample-po-switch-order-reactive-form.component.ts"> </file>
|
|
28
41
|
* </example>
|
|
29
42
|
*/
|
|
30
|
-
export declare class PoSwitchComponent extends
|
|
43
|
+
export declare class PoSwitchComponent extends PoFieldModel<boolean> implements AfterViewInit {
|
|
44
|
+
private changeDetector;
|
|
31
45
|
switchContainer: ElementRef;
|
|
46
|
+
value: boolean;
|
|
47
|
+
private _labelOff;
|
|
48
|
+
private _labelOn;
|
|
49
|
+
private _labelPosition;
|
|
50
|
+
/**
|
|
51
|
+
* @optional
|
|
52
|
+
*
|
|
53
|
+
* @description
|
|
54
|
+
*
|
|
55
|
+
* Posição de exibição do rótulo.
|
|
56
|
+
*
|
|
57
|
+
* > Por padrão exibe à direita.
|
|
58
|
+
*/
|
|
59
|
+
set labelPosition(position: PoSwitchLabelPosition);
|
|
60
|
+
get labelPosition(): PoSwitchLabelPosition;
|
|
61
|
+
/**
|
|
62
|
+
* Texto exibido quando o valor do componente for `false`.
|
|
63
|
+
*
|
|
64
|
+
* @default `false`
|
|
65
|
+
*/
|
|
66
|
+
set labelOff(label: string);
|
|
67
|
+
get labelOff(): string;
|
|
68
|
+
/**
|
|
69
|
+
* Texto exibido quando o valor do componente for `true`.
|
|
70
|
+
*
|
|
71
|
+
* @default `true`
|
|
72
|
+
*/
|
|
73
|
+
set labelOn(label: string);
|
|
74
|
+
get labelOn(): string;
|
|
32
75
|
constructor(changeDetector: ChangeDetectorRef);
|
|
33
76
|
ngAfterViewInit(): void;
|
|
34
77
|
/**
|
|
@@ -53,4 +96,7 @@ export declare class PoSwitchComponent extends PoSwitchBaseComponent implements
|
|
|
53
96
|
getLabelPosition(): "left" | "right";
|
|
54
97
|
getSwitchPosition(): "left" | "right";
|
|
55
98
|
onKeyDown(event: any): void;
|
|
99
|
+
changeValue(value: any): void;
|
|
100
|
+
eventClick(): void;
|
|
101
|
+
onWriteValue(value: any): void;
|
|
56
102
|
}
|
|
@@ -11,6 +11,7 @@ import { PoStepperStatus } from '../enums/po-stepper-status.enum';
|
|
|
11
11
|
export declare class PoStepperStepComponent {
|
|
12
12
|
circleContent: any;
|
|
13
13
|
orientation: PoStepperOrientation;
|
|
14
|
+
nextStatus: any;
|
|
14
15
|
activated: EventEmitter<any>;
|
|
15
16
|
click: EventEmitter<any>;
|
|
16
17
|
enter: EventEmitter<any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@po-ui/ng-components",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.16.0",
|
|
4
4
|
"tag": "next",
|
|
5
5
|
"description": "PO UI - Components",
|
|
6
6
|
"author": "PO UI",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@po-ui/style": "5.
|
|
25
|
-
"@po-ui/ng-schematics": "5.
|
|
24
|
+
"@po-ui/style": "5.16.0",
|
|
25
|
+
"@po-ui/ng-schematics": "5.16.0",
|
|
26
26
|
"tslib": "^2.1.0"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@angular/platform-browser": "^12.0.1",
|
|
35
35
|
"@angular/platform-browser-dynamic": "^12.0.1",
|
|
36
36
|
"@angular/router": "^12.0.1",
|
|
37
|
-
"@po-ui/style": "5.
|
|
37
|
+
"@po-ui/style": "5.16.0",
|
|
38
38
|
"rxjs": "~6.6.0",
|
|
39
39
|
"zone.js": "~0.11.4"
|
|
40
40
|
},
|
|
Binary file
|
package/po-ui-ng-components.d.ts
CHANGED
|
@@ -75,6 +75,7 @@ export { PoDatepickerBaseComponent as ɵcp } from './lib/components/po-field/po-
|
|
|
75
75
|
export { PoFieldContainerBottomComponent as ɵcm } from './lib/components/po-field/po-field-container/po-field-container-bottom/po-field-container-bottom.component';
|
|
76
76
|
export { PoFieldContainerComponent as ɵcn } from './lib/components/po-field/po-field-container/po-field-container.component';
|
|
77
77
|
export { PoFieldContainerModule as ɵcl } from './lib/components/po-field/po-field-container/po-field-container.module';
|
|
78
|
+
export { PoFieldModel as ɵeb } from './lib/components/po-field/po-field.model';
|
|
78
79
|
export { PoInputGeneric as ɵdo } from './lib/components/po-field/po-input-generic/po-input-generic';
|
|
79
80
|
export { PoInputBaseComponent as ɵdm } from './lib/components/po-field/po-input/po-input-base.component';
|
|
80
81
|
export { PoLookupBaseComponent as ɵdp } from './lib/components/po-field/po-lookup/po-lookup-base.component';
|
|
@@ -95,7 +96,6 @@ export { PoRichTextLinkModalComponent as ɵen } from './lib/components/po-field/
|
|
|
95
96
|
export { PoRichTextToolbarComponent as ɵeo } from './lib/components/po-field/po-rich-text/po-rich-text-toolbar/po-rich-text-toolbar.component';
|
|
96
97
|
export { PoRichTextService as ɵdy } from './lib/components/po-field/po-rich-text/po-rich-text.service';
|
|
97
98
|
export { PoSelectBaseComponent as ɵea } from './lib/components/po-field/po-select/po-select-base.component';
|
|
98
|
-
export { PoSwitchBaseComponent as ɵeb } from './lib/components/po-field/po-switch/po-switch-base.component';
|
|
99
99
|
export { PoTextareaBaseComponent as ɵec } from './lib/components/po-field/po-textarea/po-textarea-base.component';
|
|
100
100
|
export { PoUploadBaseComponent as ɵed } from './lib/components/po-field/po-upload/po-upload-base.component';
|
|
101
101
|
export { PoUploadBaseService as ɵef } from './lib/components/po-field/po-upload/po-upload-base.service';
|