@po-ui/ng-components 14.3.1 → 14.5.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.
Files changed (78) hide show
  1. package/esm2020/lib/components/po-accordion/po-accordion-item/po-accordion-item.component.mjs +30 -3
  2. package/esm2020/lib/components/po-accordion/po-accordion.component.mjs +2 -2
  3. package/esm2020/lib/components/po-accordion/services/po-accordion.service.mjs +1 -1
  4. package/esm2020/lib/components/po-button-group/po-button-group-base.component.mjs +2 -2
  5. package/esm2020/lib/components/po-button-group/po-button-group.component.mjs +3 -3
  6. package/esm2020/lib/components/po-field/po-combo/po-combo.component.mjs +6 -6
  7. package/esm2020/lib/components/po-field/po-datepicker/po-datepicker.component.mjs +5 -5
  8. package/esm2020/lib/components/po-field/po-datepicker-range/po-datepicker-range.component.mjs +7 -3
  9. package/esm2020/lib/components/po-field/po-decimal/po-decimal.component.mjs +5 -5
  10. package/esm2020/lib/components/po-field/po-email/po-email.component.mjs +9 -7
  11. package/esm2020/lib/components/po-field/po-input/po-input.component.mjs +9 -7
  12. package/esm2020/lib/components/po-field/po-login/po-login.component.mjs +12 -11
  13. package/esm2020/lib/components/po-field/po-lookup/po-lookup-modal/po-lookup-modal.component.mjs +3 -3
  14. package/esm2020/lib/components/po-field/po-lookup/po-lookup.component.mjs +6 -5
  15. package/esm2020/lib/components/po-field/po-multiselect/po-multiselect-base.component.mjs +31 -20
  16. package/esm2020/lib/components/po-field/po-multiselect/po-multiselect-dropdown/po-multiselect-dropdown.component.mjs +19 -13
  17. package/esm2020/lib/components/po-field/po-multiselect/po-multiselect-filter.interface.mjs +1 -1
  18. package/esm2020/lib/components/po-field/po-multiselect/po-multiselect-filter.service.mjs +2 -2
  19. package/esm2020/lib/components/po-field/po-multiselect/po-multiselect-search/po-multiselect-search.component.mjs +7 -4
  20. package/esm2020/lib/components/po-field/po-multiselect/po-multiselect.component.mjs +24 -17
  21. package/esm2020/lib/components/po-field/po-number/po-number.component.mjs +5 -5
  22. package/esm2020/lib/components/po-field/po-password/po-password.component.mjs +14 -13
  23. package/esm2020/lib/components/po-field/po-radio/po-radio-size.enum.mjs +10 -3
  24. package/esm2020/lib/components/po-field/po-radio/po-radio.component.mjs +98 -34
  25. package/esm2020/lib/components/po-field/po-radio-group/po-radio-group-base.component.mjs +16 -2
  26. package/esm2020/lib/components/po-field/po-radio-group/po-radio-group.component.mjs +18 -25
  27. package/esm2020/lib/components/po-field/po-select/po-select.component.mjs +38 -250
  28. package/esm2020/lib/components/po-field/po-switch/po-switch.component.mjs +38 -34
  29. package/esm2020/lib/components/po-field/po-textarea/po-textarea-base.component.mjs +11 -1
  30. package/esm2020/lib/components/po-field/po-textarea/po-textarea.component.mjs +6 -7
  31. package/esm2020/lib/components/po-field/po-url/po-url.component.mjs +9 -7
  32. package/esm2020/lib/components/po-loading/po-loading-overlay/po-loading-overlay-base.component.mjs +2 -2
  33. package/esm2020/lib/components/po-page/po-page-list/po-page-list.component.mjs +3 -3
  34. package/esm2020/lib/components/po-table/po-table-base.component.mjs +3 -3
  35. package/esm2020/lib/components/po-table/po-table-column-manager/po-table-column-manager.component.mjs +26 -73
  36. package/esm2020/lib/components/po-table/po-table-detail/po-table-detail.component.mjs +27 -8
  37. package/esm2020/lib/components/po-table/po-table-list-manager/po-table-list-manager.component.mjs +111 -0
  38. package/esm2020/lib/components/po-table/po-table.module.mjs +4 -1
  39. package/esm2020/lib/components/po-tag/po-tag-base.component.mjs +11 -3
  40. package/esm2020/lib/components/po-tag/po-tag.component.mjs +16 -9
  41. package/esm2020/lib/components/po-tree-view/po-tree-view-base.component.mjs +6 -4
  42. package/fesm2015/po-ui-ng-components.mjs +961 -1026
  43. package/fesm2015/po-ui-ng-components.mjs.map +1 -1
  44. package/fesm2020/po-ui-ng-components.mjs +941 -1004
  45. package/fesm2020/po-ui-ng-components.mjs.map +1 -1
  46. package/lib/components/po-accordion/po-accordion-item/po-accordion-item.component.d.ts +10 -3
  47. package/lib/components/po-accordion/services/po-accordion.service.d.ts +3 -2
  48. package/lib/components/po-button-group/po-button-group-base.component.d.ts +1 -1
  49. package/lib/components/po-field/po-multiselect/po-multiselect-base.component.d.ts +26 -15
  50. package/lib/components/po-field/po-multiselect/po-multiselect-dropdown/po-multiselect-dropdown.component.d.ts +5 -3
  51. package/lib/components/po-field/po-multiselect/po-multiselect-filter.interface.d.ts +2 -2
  52. package/lib/components/po-field/po-multiselect/po-multiselect-filter.service.d.ts +2 -2
  53. package/lib/components/po-field/po-multiselect/po-multiselect-search/po-multiselect-search.component.d.ts +2 -1
  54. package/lib/components/po-field/po-multiselect/po-multiselect.component.d.ts +7 -1
  55. package/lib/components/po-field/po-radio/po-radio-size.enum.d.ts +9 -2
  56. package/lib/components/po-field/po-radio/po-radio.component.d.ts +27 -10
  57. package/lib/components/po-field/po-radio-group/po-radio-group-base.component.d.ts +21 -1
  58. package/lib/components/po-field/po-select/po-select.component.d.ts +1 -32
  59. package/lib/components/po-field/po-switch/po-switch.component.d.ts +12 -2
  60. package/lib/components/po-field/po-textarea/po-textarea-base.component.d.ts +10 -0
  61. package/lib/components/po-modal/po-modal.component.d.ts +1 -1
  62. package/lib/components/po-table/po-table-column-manager/po-table-column-manager.component.d.ts +4 -12
  63. package/lib/components/po-table/po-table-detail/po-table-detail.component.d.ts +1 -0
  64. package/lib/components/po-table/po-table-list-manager/po-table-list-manager.component.d.ts +35 -0
  65. package/lib/components/po-table/po-table.module.d.ts +25 -24
  66. package/lib/components/po-tag/po-tag-base.component.d.ts +8 -2
  67. package/package.json +4 -4
  68. package/po-ui-ng-components-14.5.0.tgz +0 -0
  69. package/schematics/ng-add/index.js +1 -1
  70. package/schematics/ng-update/v14/index.js +1 -1
  71. package/schematics/ng-update/v2/index.js +1 -1
  72. package/schematics/ng-update/v3/index.js +1 -1
  73. package/schematics/ng-update/v4/index.js +1 -1
  74. package/schematics/ng-update/v5/index.js +1 -1
  75. package/schematics/ng-update/v6/index.js +1 -1
  76. package/esm2020/lib/components/po-field/po-radio/po-radio-base.component.mjs +0 -104
  77. package/lib/components/po-field/po-radio/po-radio-base.component.d.ts +0 -58
  78. package/po-ui-ng-components-14.3.1.tgz +0 -0
@@ -1,4 +1,4 @@
1
- import { TemplateRef } from '@angular/core';
1
+ import { EventEmitter, OnDestroy, TemplateRef } from '@angular/core';
2
2
  import { PoAccordionService } from '../services/po-accordion.service';
3
3
  import * as i0 from "@angular/core";
4
4
  /**
@@ -32,13 +32,20 @@ import * as i0 from "@angular/core";
32
32
  * }
33
33
  * ```
34
34
  */
35
- export declare class PoAccordionItemComponent {
35
+ export declare class PoAccordionItemComponent implements OnDestroy {
36
36
  private accordionService;
37
37
  /** Título do item. */
38
38
  label: string;
39
+ /** Evento disparado ao expandir o item, seja manualmente ou programaticamente. */
40
+ expandEvent: EventEmitter<void>;
41
+ /** Evento disparado ao retrair o item, seja manualmente ou programaticamente. */
42
+ collapseEvent: EventEmitter<void>;
39
43
  templateRef: TemplateRef<any>;
40
44
  expanded: boolean;
45
+ private expandSubscription;
46
+ private collapseSubscription;
41
47
  constructor(accordionService: PoAccordionService);
48
+ ngOnDestroy(): void;
42
49
  /**
43
50
  * Método para colapsar o `po-accordion-item`.
44
51
  */
@@ -48,5 +55,5 @@ export declare class PoAccordionItemComponent {
48
55
  */
49
56
  expand(): void;
50
57
  static ɵfac: i0.ɵɵFactoryDeclaration<PoAccordionItemComponent, never>;
51
- static ɵcmp: i0.ɵɵComponentDeclaration<PoAccordionItemComponent, "po-accordion-item", never, { "label": "p-label"; }, {}, never, ["*"], false>;
58
+ static ɵcmp: i0.ɵɵComponentDeclaration<PoAccordionItemComponent, "po-accordion-item", never, { "label": "p-label"; }, { "expandEvent": "p-expand"; "collapseEvent": "p-collapse"; }, never, ["*"], false>;
52
59
  }
@@ -1,3 +1,4 @@
1
+ import { PoAccordionItemComponent } from '../po-accordion-item/po-accordion-item.component';
1
2
  import * as i0 from "@angular/core";
2
3
  /**
3
4
  * @docsPrivate
@@ -9,8 +10,8 @@ import * as i0 from "@angular/core";
9
10
  */
10
11
  export declare class PoAccordionService {
11
12
  private subjectChild;
12
- receiveFromChildAccordionClicked(): import("rxjs").Observable<any>;
13
- sendToParentAccordionItemClicked(accordionItem: object): void;
13
+ receiveFromChildAccordionClicked(): import("rxjs").Observable<PoAccordionItemComponent>;
14
+ sendToParentAccordionItemClicked(accordionItem: PoAccordionItemComponent): void;
14
15
  static ɵfac: i0.ɵɵFactoryDeclaration<PoAccordionService, never>;
15
16
  static ɵprov: i0.ɵɵInjectableDeclaration<PoAccordionService>;
16
17
  }
@@ -49,7 +49,7 @@ export declare class PoButtonGroupBaseComponent {
49
49
  *
50
50
  * Define o modo de seleção de botões.
51
51
  *
52
- * > Veja os valores válidos no *enum* `PoMultiselectFilterMode`.
52
+ * > Veja os valores válidos no *enum* `PoButtonGroupToggle`.
53
53
  *
54
54
  * @default `none`
55
55
  */
@@ -91,8 +91,8 @@ export declare abstract class PoMultiselectBaseComponent implements ControlValue
91
91
  * Pode ser informada uma função que será disparada quando houver alterações no ngModel.
92
92
  */
93
93
  change: EventEmitter<any>;
94
- selectedOptions: Array<PoMultiselectOption>;
95
- visibleOptionsDropdown: Array<PoMultiselectOption>;
94
+ selectedOptions: Array<PoMultiselectOption | any>;
95
+ visibleOptionsDropdown: Array<PoMultiselectOption | any>;
96
96
  visibleDisclaimers: any[];
97
97
  isServerSearching: boolean;
98
98
  isFirstFilter: boolean;
@@ -248,7 +248,7 @@ export declare abstract class PoMultiselectBaseComponent implements ControlValue
248
248
  /**
249
249
  * @description
250
250
  *
251
- * Nesta propriedade deve ser definida uma lista de objetos que implementam a interface PoMultiselectOption.
251
+ * Nesta propriedade deve ser definida uma lista de objetos que será exibida no multiselect.
252
252
  * Esta lista deve conter os valores e os labels que serão apresentados na tela.
253
253
  *
254
254
  * > Essa propriedade é imutável, ou seja, sempre que quiser atualizar a lista de opções disponíveis
@@ -261,9 +261,20 @@ export declare abstract class PoMultiselectBaseComponent implements ControlValue
261
261
  * // evite, pois não atualiza a referência do objeto podendo gerar atrasos na atualização do template
262
262
  * this.options.push({ value: 'x', label: 'Nova opção' });
263
263
  * ```
264
+ * > A lista pode ser definida utilizando um array com o valor representando `value` e `label` das seguintes formas:
265
+ *
266
+ * ```
267
+ * <po-multiselect name="multiselect" p-label="PO Multiselect" [p-options]="[{value: 1, label: 'One'}, {value: 2, label: 'two'}]"> </po-multiselect>
268
+ * ```
269
+ *
270
+ * ```
271
+ * <po-multiselect name="multiselect" p-label="PO Multiselect" [p-options]="[{name: 'Roger', age: 28}, {name: 'Anne', age: 35}]" p-field-label="name" p-field-value="age"> </po-multiselect>
272
+ * ```
273
+ *
274
+ * - Aconselha-se utilizar valores distintos no `label` e `value` dos itens.
264
275
  */
265
- set options(options: Array<PoMultiselectOption>);
266
- get options(): Array<PoMultiselectOption>;
276
+ set options(options: Array<PoMultiselectOption | any>);
277
+ get options(): Array<PoMultiselectOption | any>;
267
278
  /**
268
279
  * @optional
269
280
  *
@@ -321,27 +332,27 @@ export declare abstract class PoMultiselectBaseComponent implements ControlValue
321
332
  setService(service: PoMultiselectFilter | string): void;
322
333
  validAndSortOptions(): void;
323
334
  setUndefinedLabels(options: any): void;
324
- updateList(options: Array<PoMultiselectOption>): void;
325
- callOnChange(selectedOptions: Array<PoMultiselectOption>): void;
335
+ updateList(options: Array<PoMultiselectOption | any>): void;
336
+ callOnChange(selectedOptions: Array<PoMultiselectOption | any>): void;
326
337
  eventChange(selectedOptions: any): void;
327
- getValuesFromOptions(selectedOptions: Array<PoMultiselectOption>): (string | number)[];
328
- getLabelByValue(value: any): string;
329
- searchByLabel(search: string, options: Array<PoMultiselectOption>, filterMode: PoMultiselectFilterMode): void;
330
- compareMethod(search: string, option: PoMultiselectOption, filterMode: PoMultiselectFilterMode): boolean;
331
- startsWith(search: string, option: PoMultiselectOption): boolean;
338
+ getValuesFromOptions(selectedOptions: Array<PoMultiselectOption | any>): any[];
339
+ getLabelByValue(value: any): any;
340
+ searchByLabel(search: string, options: Array<PoMultiselectOption | any>, filterMode: PoMultiselectFilterMode): void;
341
+ compareMethod(search: string, option: PoMultiselectOption, filterMode: PoMultiselectFilterMode): any;
342
+ startsWith(search: string, option: PoMultiselectOption): any;
332
343
  contains(search: string, option: PoMultiselectOption): boolean;
333
- endsWith(search: string, option: PoMultiselectOption): boolean;
344
+ endsWith(search: string, option: PoMultiselectOption): any;
334
345
  validate(c: AbstractControl): {
335
346
  [key: string]: any;
336
347
  };
337
- updateSelectedOptions(newOptions: Array<any>, options?: PoMultiselectOption[]): void;
348
+ updateSelectedOptions(newOptions: Array<any>, options?: any[]): void;
338
349
  writeValue(values: any): void;
339
350
  setDisabledState(isDisabled: boolean): void;
340
351
  registerOnChange(fn: any): void;
341
352
  registerOnTouched(fn: any): void;
342
353
  registerOnValidatorChange(fn: () => void): void;
343
354
  private validateModel;
344
- abstract applyFilter(value?: string): Observable<Array<PoMultiselectOption>>;
355
+ abstract applyFilter(value?: string): Observable<Array<PoMultiselectOption | any>>;
345
356
  abstract updateVisibleItems(): void;
346
357
  static ɵfac: i0.ɵɵFactoryDeclaration<PoMultiselectBaseComponent, never>;
347
358
  static ɵdir: i0.ɵɵDirectiveDeclaration<PoMultiselectBaseComponent, never, never, { "autoFocus": "p-auto-focus"; "label": "p-label"; "help": "p-help"; "optional": "p-optional"; "placeholder": "p-placeholder"; "placeholderSearch": "p-placeholder-search"; "name": "name"; "hideSelectAll": "p-hide-select-all"; "filterService": "p-filter-service"; "autoHeight": "p-auto-height"; "debounceTime": "p-debounce-time"; "literals": "p-literals"; "required": "p-required"; "disabled": "p-disabled"; "hideSearch": "p-hide-search"; "options": "p-options"; "sort": "p-sort"; "filterMode": "p-filter-mode"; "fieldLabel": "p-field-label"; "fieldValue": "p-field-value"; }, { "change": "p-change"; }, never, never, false>;
@@ -23,11 +23,13 @@ export declare class PoMultiselectDropdownComponent {
23
23
  /** Propriedade que recebe a lista de opções selecionadas. */
24
24
  selectedOptions: Array<any>;
25
25
  /** Propriedade que recebe a lista com todas as opções. */
26
- options: Array<PoMultiselectOption>;
26
+ options: Array<PoMultiselectOption | any>;
27
27
  /** Propriedade que recebe a lista de opções que deverão ser criadas no dropdown. */
28
- visibleOptions: Array<PoMultiselectOption>;
28
+ visibleOptions: Array<PoMultiselectOption | any>;
29
29
  /** Propriedade que indica se o campo "Selecionar todos" deverá ser escondido. */
30
30
  hideSelectAll?: boolean;
31
+ fieldValue: string;
32
+ fieldLabel: string;
31
33
  /** Evento disparado a cada tecla digitada na pesquisa. */
32
34
  changeSearch: EventEmitter<any>;
33
35
  /** Evento disparado a cada alteração na lista das opções selecionadas. */
@@ -58,5 +60,5 @@ export declare class PoMultiselectDropdownComponent {
58
60
  controlVisibility(toOpen: any): void;
59
61
  private uniqueSelectedOptions;
60
62
  static ɵfac: i0.ɵɵFactoryDeclaration<PoMultiselectDropdownComponent, never>;
61
- static ɵcmp: i0.ɵɵComponentDeclaration<PoMultiselectDropdownComponent, "po-multiselect-dropdown", never, { "isServerSearching": "p-searching"; "hideSearch": "p-hide-search"; "literals": "p-literals"; "placeholderSearch": "p-placeholder-search"; "selectedOptions": "p-selected-options"; "options": "p-options"; "visibleOptions": "p-visible-options"; "hideSelectAll": "p-hide-select-all"; }, { "changeSearch": "p-change-search"; "change": "p-change"; "closeDropdown": "p-close-dropdown"; }, never, never, false>;
63
+ static ɵcmp: i0.ɵɵComponentDeclaration<PoMultiselectDropdownComponent, "po-multiselect-dropdown", never, { "isServerSearching": "p-searching"; "hideSearch": "p-hide-search"; "literals": "p-literals"; "placeholderSearch": "p-placeholder-search"; "selectedOptions": "p-selected-options"; "options": "p-options"; "visibleOptions": "p-visible-options"; "hideSelectAll": "p-hide-select-all"; "fieldValue": "p-field-value"; "fieldLabel": "p-field-label"; }, { "changeSearch": "p-change-search"; "change": "p-change"; "closeDropdown": "p-close-dropdown"; }, never, never, false>;
62
64
  }
@@ -17,12 +17,12 @@ export interface PoMultiselectFilter {
17
17
  getFilteredData(params: {
18
18
  property: string;
19
19
  value: string;
20
- }): Observable<Array<PoMultiselectOption>>;
20
+ }): Observable<Array<PoMultiselectOption | any>>;
21
21
  /**
22
22
  * Método que será chamado ao iniciar o componente com valor, deve retornar um Observable que contém apenas os objetos filtrados que
23
23
  * seguem a interface `PoMultiselectOption`, será informado por parâmetro valor a ser pesquisado.
24
24
  *
25
25
  * @param {Array<string | number>} values Array com os valores a serem buscados.
26
26
  */
27
- getObjectsByValues(values: Array<string | number>): Observable<Array<PoMultiselectOption>>;
27
+ getObjectsByValues(values: Array<string | number>): Observable<Array<PoMultiselectOption | any>>;
28
28
  }
@@ -11,8 +11,8 @@ export declare class PoMultiselectFilterService implements PoMultiselectFilter {
11
11
  private messages;
12
12
  get url(): string;
13
13
  constructor(http: HttpClient);
14
- getFilteredData({ value }: any): Observable<Array<PoMultiselectOption>>;
15
- getObjectsByValues(value: Array<string | number>): Observable<Array<PoMultiselectOption>>;
14
+ getFilteredData({ value }: any): Observable<Array<PoMultiselectOption | any>>;
15
+ getObjectsByValues(value: Array<string | number>): Observable<Array<PoMultiselectOption | any>>;
16
16
  configProperties(url: string, fieldLabel: string, fieldValue: string): void;
17
17
  private parseToArrayMultiselectOptions;
18
18
  private parseToMultiselectOption;
@@ -13,6 +13,7 @@ export declare class PoMultiselectSearchComponent {
13
13
  inputElement: ElementRef;
14
14
  /** Propriedade que recebe as literais definidas no `po-multiselect`. */
15
15
  literals?: PoMultiselectLiterals;
16
+ fieldValue: string;
16
17
  /** Evento que será disparado a cada tecla digitada no campo de busca. */
17
18
  change: EventEmitter<any>;
18
19
  private _placeholder?;
@@ -35,5 +36,5 @@ export declare class PoMultiselectSearchComponent {
35
36
  setFocus(): void;
36
37
  clean(): void;
37
38
  static ɵfac: i0.ɵɵFactoryDeclaration<PoMultiselectSearchComponent, never>;
38
- static ɵcmp: i0.ɵɵComponentDeclaration<PoMultiselectSearchComponent, "po-multiselect-search", never, { "literals": "p-literals"; "placeholder": "p-placeholder"; }, { "change": "p-change"; }, never, never, false>;
39
+ static ɵcmp: i0.ɵɵComponentDeclaration<PoMultiselectSearchComponent, "po-multiselect-search", never, { "literals": "p-literals"; "fieldValue": "p-field-value"; "placeholder": "p-placeholder"; }, { "change": "p-change"; }, never, never, false>;
39
40
  }
@@ -36,6 +36,12 @@ import * as i0 from "@angular/core";
36
36
  * <file name="sample-po-multiselect-heroes/sample-po-multiselect-heroes.component.ts"> </file>
37
37
  * <file name="sample-po-multiselect-heroes/sample-po-multiselect-heroes.service.ts"> </file>
38
38
  * </example>
39
+ *
40
+ * <example name="po-multiselect-any-array" title="PO Multiselect - Array Any">
41
+ * <file name="sample-po-multiselect-any-array/sample-po-multiselect-any-array.component.html"> </file>
42
+ * <file name="sample-po-multiselect-any-array/sample-po-multiselect-any-array.component.ts"> </file>
43
+ * </example>
44
+ *
39
45
  */
40
46
  export declare class PoMultiselectComponent extends PoMultiselectBaseComponent implements AfterViewInit, DoCheck, OnDestroy, OnChanges {
41
47
  private renderer;
@@ -95,7 +101,7 @@ export declare class PoMultiselectComponent extends PoMultiselectBaseComponent i
95
101
  changeSearch(event: any): void;
96
102
  closeDisclaimer(value: any): void;
97
103
  wasClickedOnToggle(event: MouseEvent): void;
98
- applyFilter(value?: string): Observable<Array<PoMultiselectOption>>;
104
+ applyFilter(value?: string): Observable<Array<PoMultiselectOption | any>>;
99
105
  private applyFilterInFirstClick;
100
106
  private setOptionsByApplyFilter;
101
107
  private adjustContainerPosition;
@@ -1,4 +1,11 @@
1
+ /**
2
+ * @usedBy PoRadioComponent
3
+ *
4
+ * @description
5
+ *
6
+ * Enum para definir o tamanho do po-radio.
7
+ */
1
8
  export declare enum PoRadioSize {
2
- medium = "medium",
3
- large = "large"
9
+ Medium = "medium",
10
+ Large = "large"
4
11
  }
@@ -1,14 +1,27 @@
1
1
  import { ChangeDetectorRef, ElementRef } from '@angular/core';
2
- import { PoRadioBaseComponent } from './po-radio-base.component';
2
+ import { PoFieldModel } from '../po-field.model';
3
+ import { PoRadioSize } from './po-radio-size.enum';
3
4
  import * as i0 from "@angular/core";
4
- /**
5
- * @docsPrivate
6
- *
7
- * @docsExtends PoRadioBaseComponent
8
- */
9
- export declare class PoRadioComponent extends PoRadioBaseComponent {
5
+ export declare class PoRadioComponent extends PoFieldModel<boolean> {
10
6
  private changeDetector;
11
7
  radioLabel: ElementRef;
8
+ value: boolean;
9
+ private _size;
10
+ /** Define o valor do *radio* */
11
+ radioValue: string;
12
+ /**
13
+ * @optional
14
+ *
15
+ * @description
16
+ *
17
+ * Define o tamanho do *radio*
18
+ * @default `medium`
19
+ */
20
+ set size(value: PoRadioSize);
21
+ get size(): PoRadioSize;
22
+ required: boolean;
23
+ /** Define o status do *radio* */
24
+ checked: boolean;
12
25
  constructor(changeDetector: ChangeDetectorRef);
13
26
  /**
14
27
  * Função que atribui foco ao *radio*.
@@ -31,8 +44,12 @@ export declare class PoRadioComponent extends PoRadioBaseComponent {
31
44
  */
32
45
  focus(): void;
33
46
  onBlur(): void;
34
- onKeyDown(event: KeyboardEvent, value: boolean): void;
35
- protected changeModelValue(value: boolean | string): void;
47
+ onKeyDown(event: KeyboardEvent): void;
48
+ changeValue(value: any): void;
49
+ eventClick(): void;
50
+ onWriteValue(value: any): void;
51
+ focusIn(): void;
52
+ focusOut(): void;
36
53
  static ɵfac: i0.ɵɵFactoryDeclaration<PoRadioComponent, never>;
37
- static ɵcmp: i0.ɵɵComponentDeclaration<PoRadioComponent, "po-radio", never, {}, {}, never, never, false>;
54
+ static ɵcmp: i0.ɵɵComponentDeclaration<PoRadioComponent, "po-radio", never, { "radioValue": "p-value"; "size": "p-size"; "required": "p-required"; "checked": "p-checked"; }, {}, never, never, false>;
38
55
  }
@@ -13,6 +13,17 @@ import * as i0 from "@angular/core";
13
13
  * [**po-checkbox-group**](/documentation/po-checkbox-group).
14
14
  *
15
15
  * > Ao passar um valor para o *model* que não esteja na lista de opções, o mesmo será definido como `undefined`.
16
+ *
17
+ * #### Acessibilidade tratada no componente interno `po-radio`:
18
+ *
19
+ * Algumas diretrizes de acessibilidade já são tratadas no componente, internamente, e não podem ser alteradas pelo proprietário do conteúdo. São elas:
20
+ *
21
+ * - O componente foi desenvolvido utilizando controles padrões HTML para permitir a identificação do mesmo na interface por tecnologias assistivas. [WCAG 4.1.2: Name, Role, Value](https://www.w3.org/WAI/WCAG21/Understanding/name-role-value)
22
+ * - A cor não deve ser o único meio para diferenciar o radio button normal do selecionado, por isso deve-se manter uma diferença visual entre os estados. [WGAG 1.4.1: Use of Color, 3.2.4: Consistent Identification](https://www.w3.org/WAI/WCAG21/Understanding/use-of-color)
23
+ * - Quando em foco, o componente é ativado usando as teclas de Espaço e Enter do teclado. [W3C WAI-ARIA 3.5 Button - Keyboard Interaction](https://www.w3.org/TR/wai-aria-practices-1.1/#keyboard-interaction-3)
24
+ * - A área do foco precisar ter uma espessura de pelo menos 2 pixels CSS e o foco não pode ficar escondido por outros elementos da tela. [(WCAG 2.4.12: Focus Appearance](https://www.w3.org/WAI/WCAG22/Understanding/focus-appearance-enhanced)
25
+ *
26
+ * Conforme documentação em: https://doc.animaliads.io/docs/components/radio
16
27
  */
17
28
  export declare abstract class PoRadioGroupBaseComponent implements ControlValueAccessor, Validator {
18
29
  /**
@@ -105,6 +116,15 @@ export declare abstract class PoRadioGroupBaseComponent implements ControlValueA
105
116
  */
106
117
  set options(value: Array<PoRadioGroupOption>);
107
118
  get options(): Array<PoRadioGroupOption>;
119
+ /**
120
+ * @optional
121
+ *
122
+ * @description
123
+ *
124
+ * Define o tamanho do *radio*
125
+ * @default `medium`
126
+ */
127
+ size: string;
108
128
  changeValue(changedValue: any): void;
109
129
  setDisabledState(isDisabled: boolean): void;
110
130
  registerOnChange(fn: any): void;
@@ -119,5 +139,5 @@ export declare abstract class PoRadioGroupBaseComponent implements ControlValueA
119
139
  private validateModel;
120
140
  abstract getElementByValue(value: any): any;
121
141
  static ɵfac: i0.ɵɵFactoryDeclaration<PoRadioGroupBaseComponent, never>;
122
- static ɵdir: i0.ɵɵDirectiveDeclaration<PoRadioGroupBaseComponent, never, never, { "autoFocus": "p-auto-focus"; "name": "name"; "optional": "p-optional"; "columns": "p-columns"; "disabled": "p-disabled"; "required": "p-required"; "options": "p-options"; }, { "change": "p-change"; }, never, never, false>;
142
+ static ɵdir: i0.ɵɵDirectiveDeclaration<PoRadioGroupBaseComponent, never, never, { "autoFocus": "p-auto-focus"; "name": "name"; "optional": "p-optional"; "columns": "p-columns"; "disabled": "p-disabled"; "required": "p-required"; "options": "p-options"; "size": "p-size"; }, { "change": "p-change"; }, never, never, false>;
123
143
  }
@@ -1,6 +1,5 @@
1
1
  import { ChangeDetectorRef, DoCheck, ElementRef, EventEmitter, IterableDiffers, Renderer2 } from '@angular/core';
2
2
  import { AbstractControl } from '@angular/forms';
3
- import { PoControlPositionService } from './../../../services/po-control-position/po-control-position.service';
4
3
  import { PoFieldValidateModel } from '../po-field-validate.model';
5
4
  import * as i0 from "@angular/core";
6
5
  /**
@@ -46,14 +45,9 @@ import * as i0 from "@angular/core";
46
45
  * > Obs: o template **[p-select-option-template](/documentation/po-select-option-template)** será depreciado na versão 14.x.x.
47
46
  */
48
47
  export declare class PoSelectComponent extends PoFieldValidateModel<any> implements DoCheck {
49
- private element;
50
48
  private changeDetector;
51
49
  renderer: Renderer2;
52
- private controlPosition;
53
- contentList: ElementRef;
54
- iconElement: ElementRef;
55
50
  selectElement: ElementRef;
56
- selectButtonElement: ElementRef;
57
51
  /**
58
52
  * @optional
59
53
  *
@@ -82,18 +76,9 @@ export declare class PoSelectComponent extends PoFieldValidateModel<any> impleme
82
76
  /** Mensagem que aparecerá enquanto nenhuma opção estiver selecionada. */
83
77
  placeholder?: string;
84
78
  displayValue: any;
85
- isMobile: any;
86
79
  modelValue: any;
87
- onModelChange: any;
88
- open: boolean;
89
80
  selectedValue: any;
90
- selectOptionTemplate: any;
91
- selectIcon: string;
92
- scrollPosition: number;
93
- eventListenerFunction: () => void;
94
- eventResizeListener: () => void;
95
81
  onModelTouched: any;
96
- protected clickoutListener: () => void;
97
82
  private differ;
98
83
  private _fieldLabel?;
99
84
  private _fieldValue?;
@@ -138,9 +123,7 @@ export declare class PoSelectComponent extends PoFieldValidateModel<any> impleme
138
123
  */
139
124
  set fieldValue(value: string);
140
125
  get fieldValue(): string;
141
- constructor(element: ElementRef, changeDetector: ChangeDetectorRef, differs: IterableDiffers, renderer: Renderer2, controlPosition: PoControlPositionService);
142
- get isInvisibleSelectNative(): any;
143
- onKeydown($event?: any): void;
126
+ constructor(changeDetector: ChangeDetectorRef, differs: IterableDiffers, renderer: Renderer2);
144
127
  ngDoCheck(): void;
145
128
  /**
146
129
  * Função que atribui foco ao componente.
@@ -160,30 +143,16 @@ export declare class PoSelectComponent extends PoFieldValidateModel<any> impleme
160
143
  * ```
161
144
  */
162
145
  focus(): void;
163
- hideDropDown(): void;
164
146
  onBlur(): void;
165
- onOptionClick(option: any): void;
166
147
  onSelectChange(value: any): void;
167
148
  onUpdateOptions(): void;
168
- scrollValue(index: any, clientHeight: any): number;
169
- selector(query: string): Element;
170
- toggleButton(): void;
171
149
  updateValues(option: any): void;
172
- wasClickedOnToggle(event: MouseEvent): void;
173
150
  onWriteValue(value: any): void;
174
151
  extraValidation(c: AbstractControl): {
175
152
  [key: string]: any;
176
153
  };
177
154
  private isEqual;
178
- private disableDefaultEventAndToggleButton;
179
155
  private findOptionValue;
180
- private getSelectItemHeight;
181
- private initializeListeners;
182
- private onScroll;
183
- private removeListeners;
184
- private setPositionDropdown;
185
- private setScrollPosition;
186
- private showDropdown;
187
156
  private validateOptions;
188
157
  static ɵfac: i0.ɵɵFactoryDeclaration<PoSelectComponent, never>;
189
158
  static ɵcmp: i0.ɵɵComponentDeclaration<PoSelectComponent, "po-select", never, { "readonly": "p-readonly"; "placeholder": "p-placeholder"; "options": "p-options"; "fieldLabel": "p-field-label"; "fieldValue": "p-field-value"; }, { "ngModelChange": "ngModelChange"; }, never, never, false>;
@@ -10,13 +10,24 @@ import * as i0 from "@angular/core";
10
10
  * O componente `po-switch` é um [checkbox](/documentation/po-checkbox-group) mais intuitivo, pois faz analogia a um interruptor.
11
11
  * Deve ser usado quando deseja-se transmitir a ideia de ligar / desligar uma funcionalidade específica.
12
12
  *
13
- * Pode-se ligar ou deligar o botão utilizando a tecla de espaço ou o clique do mouse.
13
+ * Pode-se ligar ou desligar o switch utilizando a tecla de espaço ou o clique do mouse.
14
14
  *
15
15
  * O texto exibido pode ser alterado de acordo com o valor setado aumentando as possibilidades de uso do componente,
16
16
  * portanto, recomenda-se informar textos que contextualizem seu uso para que facilite a compreensão do usuário.
17
17
  *
18
18
  * > O componente não altera o valor incial informado no *model*, portanto indica-se inicializa-lo caso ter necessidade.
19
19
  *
20
+ * #### Boas práticas
21
+ *
22
+ * - Evite `labels` extensos que quebram o layout do `po-switch`, use `labels` diretos, curtos e intuitivos.
23
+ *
24
+ * #### Acessibilidade tratada no componente
25
+ *
26
+ * Algumas diretrizes de acessibilidade já são tratadas no componente, internamente, e não podem ser alteradas pelo proprietário do conteúdo. São elas:
27
+ *
28
+ * - Quando em foco, o switch é ativado usando a tecla de Espaço. [W3C WAI-ARIA 3.5 Switch - Keyboard Interaction](https://www.w3.org/WAI/ARIA/apg/patterns/switch/#keyboard-interaction-19)
29
+ * - A área do foco precisar ter uma espessura de pelo menos 2 pixels CSS e o foco não pode ficar escondido por outros elementos da tela. [WCAG 2.4.12: Focus Appearance](https://www.w3.org/WAI/WCAG22/Understanding/focus-appearance-enhanced)
30
+ *
20
31
  * @example
21
32
  *
22
33
  * <example name="po-switch-basic" title="PO Switch Basic">
@@ -94,7 +105,6 @@ export declare class PoSwitchComponent extends PoFieldModel<boolean> {
94
105
  focus(): void;
95
106
  onBlur(): void;
96
107
  getLabelPosition(): "left" | "right";
97
- getSwitchPosition(): "left" | "right";
98
108
  onKeyDown(event: any): void;
99
109
  changeValue(value: any): void;
100
110
  eventClick(): void;
@@ -18,6 +18,16 @@ import * as i0 from "@angular/core";
18
18
  * [ngModelOptions]="{standalone: true}">
19
19
  * </po-textarea>
20
20
  * ```
21
+ *
22
+ * #### Acessibilidade tratada no componente
23
+ * Algumas diretrizes de acessibilidade já são tratadas no componente, internamente, e não podem ser alteradas. São elas:
24
+ *
25
+ * - O Text area foi desenvolvido com uso de controles padrões HTML, o que permite a identificação do mesmo na interface por tecnologias
26
+ * assistivas. [WCAG 4.1.2: Name, Role, Value](https://www.w3.org/WAI/WCAG21/Understanding/name-role-value)
27
+ * - O foco é visível e possui uma espessura superior a 2 pixels CSS, não ficando escondido por outros
28
+ * elementos da tela. [WCAG 2.4.12: Focus Appearance)](https://www.w3.org/WAI/WCAG22/Understanding/focus-appearance-enhanced)
29
+ * - A identificação do erro acontece também através da mudança de cor do campo, mas também de um ícone
30
+ * junto da mensagem. [WGAG 1.4.1: Use of Color, 3.2.4: Consistent Identification](https://www.w3.org/WAI/WCAG21/Understanding/use-of-color)
21
31
  */
22
32
  export declare abstract class PoTextareaBaseComponent implements ControlValueAccessor, Validator {
23
33
  cd: ChangeDetectorRef;
@@ -36,7 +36,7 @@ export declare class PoModalComponent extends PoModalBaseComponent {
36
36
  constructor(poActiveOverlayService: PoActiveOverlayService, poLanguageService: PoLanguageService);
37
37
  close(xClosed?: boolean): void;
38
38
  closeModalOnEscapeKey(event: any): void;
39
- getSecondaryActionButtonDanger(): "true" | "false";
39
+ getSecondaryActionButtonDanger(): "false" | "true";
40
40
  onClickOut(event: any): void;
41
41
  open(): void;
42
42
  private handleFocus;
@@ -8,29 +8,20 @@ export declare const poTableColumnManagerLiteralsDefault: {
8
8
  en: {
9
9
  columnsManager: string;
10
10
  restoreDefault: string;
11
- up: string;
12
- down: string;
13
11
  };
14
12
  es: {
15
13
  columnsManager: string;
16
14
  restoreDefault: string;
17
- up: string;
18
- down: string;
19
15
  };
20
16
  pt: {
21
17
  columnsManager: string;
22
18
  restoreDefault: string;
23
- up: string;
24
- down: string;
25
19
  };
26
20
  ru: {
27
21
  columnsManager: string;
28
22
  restoreDefault: string;
29
- up: string;
30
- down: string;
31
23
  };
32
24
  };
33
- declare type Direction = 'up' | 'down';
34
25
  export declare class PoTableColumnManagerComponent implements OnChanges, OnDestroy {
35
26
  private renderer;
36
27
  popover: PoPopoverComponent;
@@ -58,8 +49,10 @@ export declare class PoTableColumnManagerComponent implements OnChanges, OnDestr
58
49
  ngOnDestroy(): void;
59
50
  checkChanges(event?: Array<string>, emit?: boolean): void;
60
51
  restore(): void;
61
- changePosition(option: any, direction: Direction): void;
62
- verifyArrowDisabled(option: any, direction: Direction): boolean;
52
+ changePosition({ option, direction }: {
53
+ option: any;
54
+ direction: any;
55
+ }): void;
63
56
  private changePositionColumn;
64
57
  private verifyToEmitChange;
65
58
  private emitChangesToSelectedColumns;
@@ -91,4 +84,3 @@ export declare class PoTableColumnManagerComponent implements OnChanges, OnDestr
91
84
  static ɵfac: i0.ɵɵFactoryDeclaration<PoTableColumnManagerComponent, never>;
92
85
  static ɵcmp: i0.ɵɵComponentDeclaration<PoTableColumnManagerComponent, "po-table-column-manager", never, { "columns": "p-columns"; "target": "p-target"; "colunsDefault": "p-columns-default"; "lastVisibleColumnsSelected": "p-last-visible-columns-selected"; "maxColumns": "p-max-columns"; }, { "visibleColumnsChange": "p-visible-columns-change"; "changeVisibleColumns": "p-change-visible-columns"; "initialColumns": "p-initial-columns"; }, never, never, false>;
93
86
  }
94
- export {};
@@ -40,6 +40,7 @@ export declare class PoTableDetailComponent {
40
40
  get typeHeaderTop(): boolean;
41
41
  formatNumberDetail(value: any, format: string): any;
42
42
  getColumnTitleLabel(detail: PoTableDetailColumn): string;
43
+ getDetailData(item: any, detail: PoTableDetailColumn): any;
43
44
  onSelectRow(item: any): void;
44
45
  private returnPoTableDetailObject;
45
46
  static ɵfac: i0.ɵɵFactoryDeclaration<PoTableDetailComponent, never>;
@@ -0,0 +1,35 @@
1
+ import { ChangeDetectorRef } from '@angular/core';
2
+ import { PoTableColumn } from '../interfaces/po-table-column.interface';
3
+ import { PoLanguageService } from '../../../services/po-language/po-language.service';
4
+ import { PoCheckboxGroupComponent } from '../../po-field/po-checkbox-group/po-checkbox-group.component';
5
+ import * as i0 from "@angular/core";
6
+ export declare const poTableListManagerLiterals: {
7
+ en: {
8
+ up: string;
9
+ down: string;
10
+ };
11
+ es: {
12
+ up: string;
13
+ down: string;
14
+ };
15
+ pt: {
16
+ up: string;
17
+ down: string;
18
+ };
19
+ ru: {
20
+ up: string;
21
+ down: string;
22
+ };
23
+ };
24
+ declare type Direction = 'up' | 'down';
25
+ export declare class PoTableListManagerComponent extends PoCheckboxGroupComponent {
26
+ private changePosition;
27
+ columnsManager: Array<PoTableColumn>;
28
+ literals: any;
29
+ constructor(languageService: PoLanguageService, changeDetector: ChangeDetectorRef);
30
+ emitChangePosition(option: any, direction: Direction): void;
31
+ verifyArrowDisabled(option: any, direction: Direction): boolean;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<PoTableListManagerComponent, never>;
33
+ static ɵcmp: i0.ɵɵComponentDeclaration<PoTableListManagerComponent, "po-table-list-manager", never, { "columnsManager": "p-columns-manager"; }, { "changePosition": "p-change-position"; }, never, never, false>;
34
+ }
35
+ export {};