@po-ui/ng-components 21.20.0 → 21.22.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 (27) hide show
  1. package/fesm2022/po-ui-ng-components.mjs +346 -179
  2. package/fesm2022/po-ui-ng-components.mjs.map +1 -1
  3. package/lib/components/po-dynamic/po-dynamic-form/interfaces/po-dynamic-form-field.interface.d.ts +5 -5
  4. package/lib/components/po-field/po-datetimepicker/po-datetimepicker-base.component.d.ts +1 -2
  5. package/lib/components/po-field/po-datetimepicker/po-datetimepicker.component.d.ts +12 -1
  6. package/lib/components/po-field/po-lookup/interfaces/po-lookup-column.interface.d.ts +36 -0
  7. package/lib/components/po-field/po-lookup/po-lookup.component.d.ts +6 -0
  8. package/lib/components/po-table/interfaces/po-table-column.interface.d.ts +41 -2
  9. package/lib/components/po-table/po-table.component.d.ts +2 -0
  10. package/package.json +4 -4
  11. package/po-ui-ng-components-21.22.0.tgz +0 -0
  12. package/schematics/ng-add/index.js +1 -1
  13. package/schematics/ng-update/v14/index.js +1 -1
  14. package/schematics/ng-update/v15/index.js +1 -1
  15. package/schematics/ng-update/v16/index.js +1 -1
  16. package/schematics/ng-update/v17/index.js +1 -1
  17. package/schematics/ng-update/v18/index.js +2 -2
  18. package/schematics/ng-update/v19/index.js +2 -2
  19. package/schematics/ng-update/v2/index.js +1 -1
  20. package/schematics/ng-update/v20/index.js +2 -2
  21. package/schematics/ng-update/v21/index.js +1 -1
  22. package/schematics/ng-update/v3/index.js +1 -1
  23. package/schematics/ng-update/v4/index.js +1 -1
  24. package/schematics/ng-update/v5/index.js +1 -1
  25. package/schematics/ng-update/v6/index.js +1 -1
  26. package/types/po-ui-ng-components.d.ts +104 -11
  27. package/po-ui-ng-components-21.20.0.tgz +0 -0
@@ -7977,6 +7977,7 @@ interface PoTableColumn {
7977
7977
  * |------------|-----------------|-----------|----------|
7978
7978
  * | Monetário | `currency` | Formato para valores monetários. Informe o código da moeda (ISO 4217). | `'BRL'`, `'USD'`, `'EUR'`, `'RUB'` |
7979
7979
  * | Data | `date` | Aceita apenas os caracteres de dia(dd), mês(MM) e ano (yyyy ou yy), caso não seja informado um formato o mesmo será 'dd/MM/yyyy' | `'dd/MM/yyyy'`, `'dd-MM-yy'`, `'mm/dd/yyyy'` |
7980
+ * | Data/Hora | `dateTime` | Aceita os caracteres de dia(dd), mês(MM), ano(yyyy), hora(HH para 24h ou hh para 12h), minutos(mm), segundos(ss), milissegundos(SSS) e período(a para AM/PM). Caso não seja informado um formato o mesmo será 'dd/MM/yyyy HH:mm:ss' | `'dd/MM/yyyy HH:mm'`, `'dd/MM/yyyy HH:mm:ss'`, `'dd/MM/yyyy HH:mm:ss.SSS'`, `'MM/dd/yyyy hh:mm a'`, `'yyyy-MM-dd HH:mm'`, `'short'`, `'medium'` |
7980
7981
  * | Hora | `time` | Aceita apenas os caracteres de hora(HH), minutos(mm), segundos(ss) e milisegundos(f-ffffff), os milisegundos são opcionais, caso não seja informado um formato o mesmo será 'HH:mm:ss' | `'HH:mm'`, `'HH:mm:ss.ffffff'`, `'HH:mm:ss.ff'`, `'mm:ss.fff'` |
7981
7982
  * | Número | `number` | Aceita um valor seguindo o padrão [**DecimalPipe**](https://angular.dev/api/common/DecimalPipe) para formatação, e caso não seja informado, o número será exibido na sua forma original. | `'1.2-5'` (ex.: `50` → `50.00`) |
7982
7983
  *
@@ -8085,8 +8086,10 @@ interface PoTableColumn {
8085
8086
  * por exemplo: `'2017-11-28'` ou `new Date(2017, 10, 28)`.
8086
8087
  *
8087
8088
  * - `dateTime`: valor de data com horário.
8088
- * + Aceita o tipo _string_ no formato **ISO-8601** extendido **'yyyy-mm-ddThh:mm:ss+|-hh:mm'**
8089
- * e o tipo _Date_ padrão do Javascript, por exemplo: `'2017-11-28T00:00:00-02:00'` ou `new Date(2017, 10, 28)`.
8089
+ * + Aceita o tipo _string_ no formato **ISO-8601** extendido **'yyyy-mm-ddTHH:mm:ss+|-hh:mm'**
8090
+ * ou **'yyyy-mm-ddTHH:mm+|-hh:mm'** (sem segundos),
8091
+ * e o tipo _Date_ padrão do Javascript, por exemplo: `'2017-11-28T00:00:00-02:00'`, `'2017-11-28T14:30-02:00'` ou `new Date(2017, 10, 28)`.
8092
+ * + A formatação de exibição pode ser configurada pela propriedade `format`.
8090
8093
  *
8091
8094
  * - `detail`: array de objetos para o master-detail.
8092
8095
  * + Incompatível com `virtual-scroll`, que requer altura fixa nas linhas.
@@ -8131,6 +8134,42 @@ interface PoTableColumn {
8131
8134
  */
8132
8135
  width?: string;
8133
8136
  fixed?: boolean;
8137
+ /**
8138
+ * @optional
8139
+ *
8140
+ * @description
8141
+ *
8142
+ * Define uma máscara para formatação do valor exibido na coluna.
8143
+ *
8144
+ * A máscara é aplicada somente para **exibição** na tabela, formatando o valor bruto
8145
+ * armazenado no model antes de apresentá-lo ao usuário.
8146
+ *
8147
+ * Caracteres válidos para a máscara:
8148
+ * - `9` : aceita um dígito numérico (0-9).
8149
+ * - `@` : aceita um caractere alfabético (a-z, A-Z).
8150
+ * - `w` : aceita um caractere alfanumérico (a-z, A-Z, 0-9).
8151
+ * - Demais caracteres são considerados fixos e inseridos automaticamente na formatação
8152
+ * (por exemplo: `.`, `-`, `/`, `(`, `)`, `+`, ` `).
8153
+ *
8154
+ * Exemplos de uso:
8155
+ * ```
8156
+ * // CPF
8157
+ * { property: 'cpf', label: 'CPF', mask: '999.999.999-99' }
8158
+ *
8159
+ * // CNPJ
8160
+ * { property: 'cnpj', label: 'CNPJ', mask: '99.999.999/9999-99' }
8161
+ *
8162
+ * // Telefone
8163
+ * { property: 'phone', label: 'Telefone', mask: '(99) 99999-9999' }
8164
+ *
8165
+ * // CEP
8166
+ * { property: 'zipCode', label: 'CEP', mask: '99999-999' }
8167
+ * ```
8168
+ *
8169
+ * > Esta propriedade é utilizada apenas para colunas do tipo `string` (padrão).
8170
+ * Caso a coluna possua um `type` diferente de `string`, a máscara será ignorada.
8171
+ */
8172
+ mask?: string;
8134
8173
  }
8135
8174
 
8136
8175
  /**
@@ -10064,6 +10103,8 @@ declare class PoTableComponent extends PoTableBaseComponent implements AfterView
10064
10103
  */
10065
10104
  deleteItems(): void;
10066
10105
  formatNumber(value: any, format: string): any;
10106
+ protected formatWithMask(value: any, mask: string): string;
10107
+ private isValidMaskChar;
10067
10108
  getCellData(row: any, column: PoTableColumn): any;
10068
10109
  getBooleanLabel(rowValue: any, columnBoolean: PoTableColumn): string;
10069
10110
  getColumnIcons(row: any, column: PoTableColumn): any;
@@ -20451,7 +20492,6 @@ declare abstract class PoDatetimepickerBaseComponent implements ControlValueAcce
20451
20492
  protected onTouchedModel: any;
20452
20493
  protected validatorChange: any;
20453
20494
  protected shortLanguage: string;
20454
- currentErrorPattern: i0.WritableSignal<string>;
20455
20495
  /**
20456
20496
  * @optional
20457
20497
  *
@@ -20519,7 +20559,7 @@ declare abstract class PoDatetimepickerBaseComponent implements ControlValueAcce
20519
20559
  *
20520
20560
  * Mensagem apresentada quando a data/hora for inválida ou fora do período.
20521
20561
  */
20522
- errorPattern: i0.InputSignal<string>;
20562
+ errorPattern: i0.ModelSignal<string>;
20523
20563
  /**
20524
20564
  * @optional
20525
20565
  *
@@ -20856,7 +20896,7 @@ declare abstract class PoDatetimepickerBaseComponent implements ControlValueAcce
20856
20896
  private requiredFailed;
20857
20897
  private applySizeBasedOnA11y;
20858
20898
  static ɵfac: i0.ɵɵFactoryDeclaration<PoDatetimepickerBaseComponent, never>;
20859
- static ɵdir: i0.ɵɵDirectiveDeclaration<PoDatetimepickerBaseComponent, never, never, { "appendBox": { "alias": "p-append-in-body"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "p-auto-focus"; "required": false; "isSignal": true; }; "clean": { "alias": "p-clean"; "required": false; "isSignal": true; }; "compactLabel": { "alias": "p-compact-label"; "required": false; "isSignal": true; }; "disabled": { "alias": "p-disabled"; "required": false; "isSignal": true; }; "errorLimit": { "alias": "p-error-limit"; "required": false; "isSignal": true; }; "errorPattern": { "alias": "p-error-pattern"; "required": false; "isSignal": true; }; "help": { "alias": "p-help"; "required": false; "isSignal": true; }; "label": { "alias": "p-label"; "required": false; "isSignal": true; }; "labelTextWrap": { "alias": "p-label-text-wrap"; "required": false; "isSignal": true; }; "loading": { "alias": "p-loading"; "required": false; "isSignal": true; }; "localeInput": { "alias": "p-locale"; "required": false; "isSignal": true; }; "maxDateInput": { "alias": "p-max-date"; "required": false; "isSignal": true; }; "maxTime": { "alias": "p-max-time"; "required": false; "isSignal": true; }; "minDateInput": { "alias": "p-min-date"; "required": false; "isSignal": true; }; "minTime": { "alias": "p-min-time"; "required": false; "isSignal": true; }; "minuteInterval": { "alias": "p-minute-interval"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "noAutocomplete": { "alias": "p-no-autocomplete"; "required": false; "isSignal": true; }; "optional": { "alias": "p-optional"; "required": false; "isSignal": true; }; "placeholder": { "alias": "p-placeholder"; "required": false; "isSignal": true; }; "poHelperComponent": { "alias": "p-helper"; "required": false; "isSignal": true; }; "readonly": { "alias": "p-readonly"; "required": false; "isSignal": true; }; "required": { "alias": "p-required"; "required": false; "isSignal": true; }; "secondInterval": { "alias": "p-second-interval"; "required": false; "isSignal": true; }; "showErrorMessageRequired": { "alias": "p-required-field-error-message"; "required": false; "isSignal": true; }; "showRequired": { "alias": "p-show-required"; "required": false; "isSignal": true; }; "showSeconds": { "alias": "p-show-seconds"; "required": false; "isSignal": true; }; "size": { "alias": "p-size"; "required": false; "isSignal": true; }; "timerFormat": { "alias": "p-format-time"; "required": false; "isSignal": true; }; "dateFormat": { "alias": "p-format-date"; "required": false; "isSignal": true; }; }, { "onblur": "p-blur"; "onchange": "p-change"; "keydown": "p-keydown"; }, never, never, true, never>;
20899
+ static ɵdir: i0.ɵɵDirectiveDeclaration<PoDatetimepickerBaseComponent, never, never, { "appendBox": { "alias": "p-append-in-body"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "p-auto-focus"; "required": false; "isSignal": true; }; "clean": { "alias": "p-clean"; "required": false; "isSignal": true; }; "compactLabel": { "alias": "p-compact-label"; "required": false; "isSignal": true; }; "disabled": { "alias": "p-disabled"; "required": false; "isSignal": true; }; "errorLimit": { "alias": "p-error-limit"; "required": false; "isSignal": true; }; "errorPattern": { "alias": "p-error-pattern"; "required": false; "isSignal": true; }; "help": { "alias": "p-help"; "required": false; "isSignal": true; }; "label": { "alias": "p-label"; "required": false; "isSignal": true; }; "labelTextWrap": { "alias": "p-label-text-wrap"; "required": false; "isSignal": true; }; "loading": { "alias": "p-loading"; "required": false; "isSignal": true; }; "localeInput": { "alias": "p-locale"; "required": false; "isSignal": true; }; "maxDateInput": { "alias": "p-max-date"; "required": false; "isSignal": true; }; "maxTime": { "alias": "p-max-time"; "required": false; "isSignal": true; }; "minDateInput": { "alias": "p-min-date"; "required": false; "isSignal": true; }; "minTime": { "alias": "p-min-time"; "required": false; "isSignal": true; }; "minuteInterval": { "alias": "p-minute-interval"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "noAutocomplete": { "alias": "p-no-autocomplete"; "required": false; "isSignal": true; }; "optional": { "alias": "p-optional"; "required": false; "isSignal": true; }; "placeholder": { "alias": "p-placeholder"; "required": false; "isSignal": true; }; "poHelperComponent": { "alias": "p-helper"; "required": false; "isSignal": true; }; "readonly": { "alias": "p-readonly"; "required": false; "isSignal": true; }; "required": { "alias": "p-required"; "required": false; "isSignal": true; }; "secondInterval": { "alias": "p-second-interval"; "required": false; "isSignal": true; }; "showErrorMessageRequired": { "alias": "p-required-field-error-message"; "required": false; "isSignal": true; }; "showRequired": { "alias": "p-show-required"; "required": false; "isSignal": true; }; "showSeconds": { "alias": "p-show-seconds"; "required": false; "isSignal": true; }; "size": { "alias": "p-size"; "required": false; "isSignal": true; }; "timerFormat": { "alias": "p-format-time"; "required": false; "isSignal": true; }; "dateFormat": { "alias": "p-format-date"; "required": false; "isSignal": true; }; }, { "errorPattern": "p-error-patternChange"; "onblur": "p-blur"; "onchange": "p-change"; "keydown": "p-keydown"; }, never, never, true, never>;
20860
20900
  }
20861
20901
 
20862
20902
  /**
@@ -20891,6 +20931,7 @@ declare class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent im
20891
20931
  iconClean: ElementRef<HTMLElement>;
20892
20932
  dialogPicker: ElementRef;
20893
20933
  helperEl?: PoHelperComponent;
20934
+ datetimepickerField: ElementRef;
20894
20935
  private readonly renderer;
20895
20936
  private readonly cd;
20896
20937
  private readonly poCalendarService;
@@ -20900,6 +20941,8 @@ declare class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent im
20900
20941
  el: ElementRef;
20901
20942
  literals: any;
20902
20943
  visible: boolean;
20944
+ currentPeriod: string;
20945
+ isInputFocused: boolean;
20903
20946
  private clickListener;
20904
20947
  private eventResizeListener;
20905
20948
  private valueBeforeChange;
@@ -20915,8 +20958,12 @@ declare class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent im
20915
20958
  getErrorPattern(): string;
20916
20959
  onKeyup($event: any): void;
20917
20960
  onKeydown($event: any): void;
20961
+ onInputFocus(): void;
20962
+ onPeriodBlur(): void;
20918
20963
  eventOnBlur($event: any): void;
20964
+ eventOnButtonKeydown(event: KeyboardEvent): void;
20919
20965
  eventOnClick($event: any): void;
20966
+ onFieldClick($event: any): void;
20920
20967
  private isFocusOnFirstCombo;
20921
20968
  eventOnCalendarKeydown(event: KeyboardEvent): void;
20922
20969
  onTimerBoundaryTab(event: {
@@ -20924,10 +20971,11 @@ declare class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent im
20924
20971
  event: KeyboardEvent;
20925
20972
  column: string;
20926
20973
  }): void;
20974
+ writeValue(value: any): void;
20927
20975
  refreshValue(value: Date): void;
20928
20976
  onTimeChange(time: string): void;
20929
20977
  onDateChange(date: any): void;
20930
- clear(): void;
20978
+ clear(triggeredByKeyboard?: boolean): void;
20931
20979
  setHelper(label?: string, additionalHelpTooltip?: string): {
20932
20980
  hideAdditionalHelp: boolean;
20933
20981
  helperSettings?: any;
@@ -20983,6 +21031,9 @@ declare class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent im
20983
21031
  private hasOverlayClass;
20984
21032
  private hasAttrCalendar;
20985
21033
  private emitChangeIfDifferent;
21034
+ onPeriodKeydown(event: KeyboardEvent): void;
21035
+ onPeriodClick(event: MouseEvent): void;
21036
+ private togglePeriod;
20986
21037
  static ɵfac: i0.ɵɵFactoryDeclaration<PoDatetimepickerComponent, never>;
20987
21038
  static ɵcmp: i0.ɵɵComponentDeclaration<PoDatetimepickerComponent, "po-datetimepicker", never, {}, {}, never, never, false, never>;
20988
21039
  }
@@ -21977,6 +22028,42 @@ interface PoLookupColumn {
21977
22028
  * Caso não seja informado, será utilizado como *label* o valor da propriedade *property* com a primeira letra em maiúsculo.
21978
22029
  */
21979
22030
  label?: string;
22031
+ /**
22032
+ * @optional
22033
+ *
22034
+ * @description
22035
+ *
22036
+ * Define uma máscara para formatação do valor exibido na coluna.
22037
+ *
22038
+ * A máscara é aplicada somente para **exibição** na tabela da modal do lookup, formatando o valor bruto
22039
+ * armazenado no model antes de apresentá-lo ao usuário.
22040
+ *
22041
+ * Caracteres válidos para a máscara:
22042
+ * - `9` : aceita um dígito numérico (0-9).
22043
+ * - `@` : aceita um caractere alfabético (a-z, A-Z).
22044
+ * - `w` : aceita um caractere alfanumérico (a-z, A-Z, 0-9).
22045
+ * - Demais caracteres são considerados fixos e inseridos automaticamente na formatação
22046
+ * (por exemplo: `.`, `-`, `/`, `(`, `)`, `+`, ` `).
22047
+ *
22048
+ * Exemplos de uso:
22049
+ * ```
22050
+ * // CPF
22051
+ * { property: 'cpf', label: 'CPF', mask: '999.999.999-99' }
22052
+ *
22053
+ * // CNPJ
22054
+ * { property: 'cnpj', label: 'CNPJ', mask: '99.999.999/9999-99' }
22055
+ *
22056
+ * // Telefone
22057
+ * { property: 'phone', label: 'Telefone', mask: '(99) 99999-9999' }
22058
+ *
22059
+ * // CEP
22060
+ * { property: 'zipCode', label: 'CEP', mask: '99999-999' }
22061
+ * ```
22062
+ *
22063
+ * > Esta propriedade é utilizada apenas para colunas do tipo `string` (padrão).
22064
+ * Caso a coluna possua um `type` diferente de `string`, a máscara será ignorada.
22065
+ */
22066
+ mask?: string;
21980
22067
  /** Nome identificador da coluna. */
21981
22068
  property?: string;
21982
22069
  /**
@@ -23212,6 +23299,12 @@ declare abstract class PoLookupBaseComponent implements ControlValueAccessor, On
23212
23299
  * <file name="sample-po-lookup-multiple/sample-po-lookup-multiple.component.ts"> </file>
23213
23300
  * <file name="sample-po-lookup-multiple/sample-po-lookup-multiple.service.ts"> </file>
23214
23301
  * </example>
23302
+ *
23303
+ * <example name="po-lookup-mask" title="PO Lookup - Mask">
23304
+ * <file name="sample-po-lookup-mask/sample-po-lookup-mask.component.html"> </file>
23305
+ * <file name="sample-po-lookup-mask/sample-po-lookup-mask.component.ts"> </file>
23306
+ * <file name="sample-po-lookup-mask/sample-po-lookup-mask.service.ts"> </file>
23307
+ * </example>
23215
23308
  */
23216
23309
  declare class PoLookupComponent extends PoLookupBaseComponent implements AfterViewInit, OnDestroy, OnInit, DoCheck, OnChanges {
23217
23310
  private readonly renderer;
@@ -28946,7 +29039,7 @@ interface PoDynamicFormField extends PoDynamicField {
28946
29039
  * Também pode-se utilizar em conjunto com `searchService`, informando uma lista de propriedades que será utilizado
28947
29040
  * para formatação da exibição no campo, por exemplo: ["id", "name"].
28948
29041
  *
28949
- * **Componentes compatíveis:** `po-datepicker`, `po-timepicker`, `po-lookup`.
29042
+ * **Componentes compatíveis:** `po-datepicker`, `po-datetimepicker`, `po-timepicker`, `po-lookup`.
28950
29043
  */
28951
29044
  format?: string | Array<string>;
28952
29045
  /**
@@ -29113,7 +29206,7 @@ interface PoDynamicFormField extends PoDynamicField {
29113
29206
  *
29114
29207
  * @default `false`
29115
29208
  *
29116
- * **Componente compatível:** `po-timepicker`
29209
+ * **Componente compatível:** `po-datetimepicker`, `po-timepicker`
29117
29210
  */
29118
29211
  showSeconds?: boolean;
29119
29212
  /**
@@ -29121,7 +29214,7 @@ interface PoDynamicFormField extends PoDynamicField {
29121
29214
  *
29122
29215
  * @default `5`
29123
29216
  *
29124
- * **Componente compatível:** `po-timepicker`
29217
+ * **Componente compatível:** `po-datetimepicker`, `po-timepicker`
29125
29218
  */
29126
29219
  minuteInterval?: number;
29127
29220
  /**
@@ -29129,7 +29222,7 @@ interface PoDynamicFormField extends PoDynamicField {
29129
29222
  *
29130
29223
  * @default `1`
29131
29224
  *
29132
- * **Componente compatível:** `po-timepicker`
29225
+ * **Componente compatível:** `po-datetimepicker`, `po-timepicker`
29133
29226
  */
29134
29227
  secondInterval?: number;
29135
29228
  /**
@@ -29534,7 +29627,7 @@ interface PoDynamicFormField extends PoDynamicField {
29534
29627
  /**
29535
29628
  * Define o formato de exibição do timer (`'12'` ou `'24'`).
29536
29629
  *
29537
- * **Componente compatível:** `po-datetimepicker`, `po-timepicker`
29630
+ * **Componente compatível:** `po-datetimepicker`
29538
29631
  */
29539
29632
  formatTime?: string;
29540
29633
  }
Binary file