@po-ui/ng-components 21.32.2 → 21.32.4

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 (36) hide show
  1. package/fesm2022/{po-ui-ng-components-po-chart-modal-table.component-B4RdhBpp.mjs → po-ui-ng-components-po-chart-modal-table.component-DlqbxLq6.mjs} +4 -4
  2. package/fesm2022/{po-ui-ng-components-po-chart-modal-table.component-B4RdhBpp.mjs.map → po-ui-ng-components-po-chart-modal-table.component-DlqbxLq6.mjs.map} +1 -1
  3. package/fesm2022/po-ui-ng-components.mjs +1770 -1409
  4. package/fesm2022/po-ui-ng-components.mjs.map +1 -1
  5. package/lib/components/po-calendar/po-calendar-base.component.d.ts +5 -0
  6. package/lib/components/po-calendar/po-calendar-header/po-calendar-header.component.d.ts +2 -0
  7. package/lib/components/po-calendar/po-calendar-wrapper/po-calendar-wrapper.component.d.ts +12 -0
  8. package/lib/components/po-calendar/po-calendar.component.d.ts +11 -0
  9. package/lib/components/po-field/po-datepicker/po-datepicker-base.component.d.ts +15 -4
  10. package/lib/components/po-field/po-datepicker/po-datepicker.component.d.ts +5 -0
  11. package/lib/components/po-field/po-datepicker-range/po-datepicker-range-base.component.d.ts +3 -0
  12. package/lib/components/po-field/po-datepicker-range/po-datepicker-range.component.d.ts +2 -0
  13. package/lib/components/po-field/po-datetimepicker/po-datetimepicker-base.component.d.ts +5 -0
  14. package/lib/components/po-field/po-datetimepicker/po-datetimepicker.component.d.ts +5 -0
  15. package/lib/components/po-listbox/po-item-list/po-item-list.component.d.ts +1 -0
  16. package/lib/components/po-listbox/po-listbox.component.d.ts +1 -0
  17. package/lib/utils/po-picker-mouse-down-guard.d.ts +27 -0
  18. package/lib/utils/util.d.ts +16 -0
  19. package/package.json +4 -4
  20. package/po-ui-ng-components-21.32.4.tgz +0 -0
  21. package/schematics/ng-add/index.js +1 -1
  22. package/schematics/ng-update/v14/index.js +1 -1
  23. package/schematics/ng-update/v15/index.js +1 -1
  24. package/schematics/ng-update/v16/index.js +1 -1
  25. package/schematics/ng-update/v17/index.js +1 -1
  26. package/schematics/ng-update/v18/index.js +2 -2
  27. package/schematics/ng-update/v19/index.js +2 -2
  28. package/schematics/ng-update/v2/index.js +1 -1
  29. package/schematics/ng-update/v20/index.js +2 -2
  30. package/schematics/ng-update/v21/index.js +1 -1
  31. package/schematics/ng-update/v3/index.js +1 -1
  32. package/schematics/ng-update/v4/index.js +1 -1
  33. package/schematics/ng-update/v5/index.js +1 -1
  34. package/schematics/ng-update/v6/index.js +1 -1
  35. package/types/po-ui-ng-components.d.ts +68 -5
  36. package/po-ui-ng-components-21.32.2.tgz +0 -0
@@ -1898,6 +1898,7 @@ declare class PoItemListComponent extends PoItemListBaseComponent implements OnC
1898
1898
  selectedView: PoItemListOption;
1899
1899
  protected param: any;
1900
1900
  protected clickListener: () => void;
1901
+ private lastSafeHtml;
1901
1902
  private shouldUpdateSelected;
1902
1903
  ngOnChanges(changes: SimpleChanges): void;
1903
1904
  onCheckboxItem(): void;
@@ -2239,6 +2240,7 @@ declare class PoListBoxComponent extends PoListBoxBaseComponent implements OnIni
2239
2240
  private getSelectedItem;
2240
2241
  scrollToAndSelectCurrentItem(): void;
2241
2242
  protected onListboxFocusIn(event: FocusEvent): void;
2243
+ private focusFirstOptionWhenNoneActive;
2242
2244
  protected checkInfiniteScroll(): void;
2243
2245
  protected getSizeLoading(): "xs" | "sm" | "md";
2244
2246
  protected getTextLoading(): "" | " ";
@@ -5680,6 +5682,11 @@ interface PoCalendarRangePreset {
5680
5682
  *
5681
5683
  * **Importante:**
5682
5684
  * - Datas fora do intervalo (`p-min-date` / `p-max-date`) aparecem desabilitadas sem alterar o *model*.
5685
+ * - São aceitos anos entre 0000 e 9999. No seletor de ano do cabeçalho é possível digitar qualquer ano com
5686
+ * 4 dígitos, mesmo que não esteja listado, e a navegação é bloqueada nos limites desse intervalo.
5687
+ * - Datas no formato ISO (ex.: `'0050-05-10'`) com ano inferior a 100 são mantidas. Ao informar um objeto `Date`
5688
+ * com ano inferior a 100, utilize o método [`setFullYear`](https://www.w3schools.com/jsref/jsref_setfullyear.asp),
5689
+ * pois o [`new Date`](https://www.w3schools.com/js/js_dates.asp) converte esses anos para 19XX.
5683
5690
  *
5684
5691
  * #### Boas práticas
5685
5692
  *
@@ -5984,6 +5991,7 @@ declare class PoCalendarComponent extends PoCalendarBaseComponent implements OnI
5984
5991
  yearOptions: QueryList<PoButtonComponent>;
5985
5992
  monthOptions: QueryList<PoButtonComponent>;
5986
5993
  private readonly changeDetector;
5994
+ private readonly elementRef;
5987
5995
  private readonly poCalendarService;
5988
5996
  private readonly poCalendarLangService;
5989
5997
  hoverValue: Date;
@@ -6017,6 +6025,13 @@ declare class PoCalendarComponent extends PoCalendarBaseComponent implements OnI
6017
6025
  private getMonthOptions;
6018
6026
  private getYearOptions;
6019
6027
  private initializeYearAndMonthMode;
6028
+ /**
6029
+ * Centraliza na lista o ano selecionado, ou o ano atual quando não houver seleção, caso ele não esteja visível.
6030
+ */
6031
+ scrollToSelectedYear(): void;
6032
+ formatYearLabel(year: number): string;
6033
+ private hasSelectedYear;
6034
+ private updateDisplayYears;
6020
6035
  getActivateDate(partType: any): any;
6021
6036
  getValue(partType: any): any;
6022
6037
  onSelectDate(selectedDate: any, partType?: any): void;
@@ -6054,6 +6069,9 @@ declare class PoCalendarComponent extends PoCalendarBaseComponent implements OnI
6054
6069
  private setMonth;
6055
6070
  private setYear;
6056
6071
  private writeDate;
6072
+ private writeMonthYearDate;
6073
+ private writeYearDate;
6074
+ private parseYearValue;
6057
6075
  static ɵfac: i0.ɵɵFactoryDeclaration<PoCalendarComponent, never>;
6058
6076
  static ɵcmp: i0.ɵɵComponentDeclaration<PoCalendarComponent, "po-calendar", never, {}, {}, never, never, false, never>;
6059
6077
  }
@@ -6135,6 +6153,8 @@ declare class PoCalendarHeaderComponent implements OnInit, OnChanges {
6135
6153
  readonly poCalendarLangService: PoCalendarLangService;
6136
6154
  hidePrevious: boolean;
6137
6155
  hideNext: boolean;
6156
+ disablePrevious: i0.InputSignal<boolean>;
6157
+ disableNext: i0.InputSignal<boolean>;
6138
6158
  displayMonth: number;
6139
6159
  displayYear: number;
6140
6160
  displayMonthLabel: string;
@@ -6156,7 +6176,7 @@ declare class PoCalendarHeaderComponent implements OnInit, OnChanges {
6156
6176
  private setupLabels;
6157
6177
  ngOnChanges(changes: SimpleChanges): void;
6158
6178
  static ɵfac: i0.ɵɵFactoryDeclaration<PoCalendarHeaderComponent, never>;
6159
- static ɵcmp: i0.ɵɵComponentDeclaration<PoCalendarHeaderComponent, "po-calendar-header", never, { "hidePrevious": { "alias": "p-hide-previous"; "required": false; }; "hideNext": { "alias": "p-hide-next"; "required": false; }; "displayMonth": { "alias": "p-display-month"; "required": false; }; "displayYear": { "alias": "p-display-year"; "required": false; }; "displayMonthLabel": { "alias": "p-display-month-label"; "required": false; }; "monthOptions": { "alias": "p-month-options"; "required": false; }; "headerTemplate": { "alias": "p-header-template"; "required": false; }; "templateContext": { "alias": "p-template-context"; "required": false; }; "size": { "alias": "p-size"; "required": false; }; "locale": { "alias": "p-locale"; "required": false; }; }, { "previous": "p-previous"; "next": "p-next"; "selectMonth": "p-select-month"; "selectYear": "p-select-year"; }, never, never, false, never>;
6179
+ static ɵcmp: i0.ɵɵComponentDeclaration<PoCalendarHeaderComponent, "po-calendar-header", never, { "hidePrevious": { "alias": "p-hide-previous"; "required": false; }; "hideNext": { "alias": "p-hide-next"; "required": false; }; "disablePrevious": { "alias": "p-disable-previous"; "required": false; "isSignal": true; }; "disableNext": { "alias": "p-disable-next"; "required": false; "isSignal": true; }; "displayMonth": { "alias": "p-display-month"; "required": false; }; "displayYear": { "alias": "p-display-year"; "required": false; }; "displayMonthLabel": { "alias": "p-display-month-label"; "required": false; }; "monthOptions": { "alias": "p-month-options"; "required": false; }; "headerTemplate": { "alias": "p-header-template"; "required": false; }; "templateContext": { "alias": "p-template-context"; "required": false; }; "size": { "alias": "p-size"; "required": false; }; "locale": { "alias": "p-locale"; "required": false; }; }, { "previous": "p-previous"; "next": "p-next"; "selectMonth": "p-select-month"; "selectYear": "p-select-year"; }, never, never, false, never>;
6160
6180
  }
6161
6181
 
6162
6182
  declare class PoCalendarWrapperComponent implements OnInit, OnChanges {
@@ -6214,6 +6234,9 @@ declare class PoCalendarWrapperComponent implements OnInit, OnChanges {
6214
6234
  templateContext: any;
6215
6235
  protected currentMonthNumber: number;
6216
6236
  protected lastDisplay: string;
6237
+ private displayYearOption;
6238
+ private typedYearOption;
6239
+ private readonly combosAwaitingFocusOut;
6217
6240
  get monthLabel(): any;
6218
6241
  get yearLabel(): any;
6219
6242
  get isDayVisible(): boolean;
@@ -6232,9 +6255,14 @@ declare class PoCalendarWrapperComponent implements OnInit, OnChanges {
6232
6255
  month: number;
6233
6256
  }): void;
6234
6257
  private updateTemplateContext;
6258
+ onYearInputChange(search: string, comboComponent?: any): void;
6259
+ private getTypedYear;
6260
+ private formatYearLabel;
6235
6261
  updateDate(year: number, month: number, comboComponent?: any): void;
6236
6262
  onComboBlur(comboComponent?: any): void;
6263
+ private resetComboWithoutOptions;
6237
6264
  private handleComboBlur;
6265
+ private validateOnComboFocusOut;
6238
6266
  private syncInputValue;
6239
6267
  private applySelectedValue;
6240
6268
  private ensureValidDisplay;
@@ -6244,6 +6272,10 @@ declare class PoCalendarWrapperComponent implements OnInit, OnChanges {
6244
6272
  private setInitialFocusedDay;
6245
6273
  private ensureValidFocusedDay;
6246
6274
  getDayTabIndex(day: Date, index: number): number;
6275
+ get isPreviousMonthDisabled(): boolean;
6276
+ get isNextMonthDisabled(): boolean;
6277
+ isPreviousYearDisabled(step: number): boolean;
6278
+ isNextYearDisabled(step: number): boolean;
6247
6279
  onNextMonth(): void;
6248
6280
  onPreviousMonth(): void;
6249
6281
  updateYear(value: number): void;
@@ -16694,8 +16726,11 @@ declare class PoMask {
16694
16726
  *
16695
16727
  * **Importante:**
16696
16728
  *
16697
- * - Para utilizar datas com ano inferior a 100, verificar o comportamento do [`new Date`](https://www.w3schools.com/js/js_dates.asp)
16698
- * e utilizar o método [`setFullYear`](https://www.w3schools.com/jsref/jsref_setfullyear.asp).
16729
+ * - São aceitas datas com ano entre 0000 e 9999. No calendário, além dos anos listados no seletor, é possível
16730
+ * digitar qualquer ano com 4 dígitos.
16731
+ * - Datas no formato ISO (ex.: `'0050-05-10'`) com ano inferior a 100 são mantidas. Ao informar um objeto `Date`
16732
+ * com ano inferior a 100, utilize o método [`setFullYear`](https://www.w3schools.com/jsref/jsref_setfullyear.asp),
16733
+ * pois o [`new Date`](https://www.w3schools.com/js/js_dates.asp) converte esses anos para 19XX.
16699
16734
  * - Caso a data esteja inválida, o `model` receberá **'Data inválida'**.
16700
16735
  * - Caso o `input` esteja passando um `[(ngModel)]`, mas não tenha um `name`, então irá ocorrer um erro
16701
16736
  * do próprio Angular (`[ngModelOptions]="{standalone: true}"`).
@@ -16754,8 +16789,10 @@ declare abstract class PoDatepickerBaseComponent implements ControlValueAccessor
16754
16789
  * Define o modo de operação do datepicker.
16755
16790
  *
16756
16791
  * Permite configurar o componente para seleção de:
16757
- * - Mês e ano (`month-year`);
16758
- * - Apenas ano (`year`).
16792
+ * - Mês e ano (`month-year`), com o *model* no formato `mm/yyyy` (ex.: `'03/2025'`);
16793
+ * - Apenas ano (`year`), com o *model* no formato `yyyy` (ex.: `'2025'`).
16794
+ *
16795
+ * > O ano é sempre representado com 4 dígitos, inclusive para anos inferiores a 1000 (ex.: `'03/0050'`).
16759
16796
  */
16760
16797
  mode?: 'month-year' | 'year';
16761
16798
  /**
@@ -16765,6 +16802,9 @@ declare abstract class PoDatepickerBaseComponent implements ControlValueAccessor
16765
16802
  * O valor informado determina o intervalo de anos anterior e posterior
16766
16803
  * à data corrente que será disponibilizado para seleção.
16767
16804
  *
16805
+ * > Caso o ano selecionado esteja fora desse intervalo, ele também é exibido na lista. Esta propriedade
16806
+ * não se aplica ao seletor de ano do calendário padrão (sem `p-mode`).
16807
+ *
16768
16808
  * @default 150
16769
16809
  */
16770
16810
  set yearRangeLimit(value: number);
@@ -17159,6 +17199,9 @@ declare abstract class PoDatepickerBaseComponent implements ControlValueAccessor
17159
17199
  [key: string]: any;
17160
17200
  };
17161
17201
  private isMonthYearOrYearInvalid;
17202
+ protected parseYearToken(value: string): number | null;
17203
+ private convertStringToDate;
17204
+ private convertMonthYearToDate;
17162
17205
  private isDateRangeValidForMode;
17163
17206
  private validateMonthYearRange;
17164
17207
  private validateYearRange;
@@ -17233,6 +17276,7 @@ declare class PoDatepickerComponent extends PoDatepickerBaseComponent implements
17233
17276
  eventListenerFunction: () => void;
17234
17277
  eventResizeListener: () => void;
17235
17278
  private clickListener;
17279
+ private readonly mouseDownGuard;
17236
17280
  private readonly dateRegex;
17237
17281
  private readonly isoRegex;
17238
17282
  private timeoutChange;
@@ -17326,6 +17370,7 @@ declare class PoDatepickerComponent extends PoDatepickerBaseComponent implements
17326
17370
  private applyMonthYearValue;
17327
17371
  private applyYearValue;
17328
17372
  private parseMonthYearInput;
17373
+ private isIncompleteZeroYear;
17329
17374
  private syncCalendarMonthYear;
17330
17375
  private syncCalendarYear;
17331
17376
  private writeMonthYearValue;
@@ -17334,6 +17379,7 @@ declare class PoDatepickerComponent extends PoDatepickerBaseComponent implements
17334
17379
  private isValidInputForMode;
17335
17380
  private hasAttrCalendar;
17336
17381
  private initializeListeners;
17382
+ private isInsidePicker;
17337
17383
  private isAdditionalHelpEventTriggered;
17338
17384
  private isFocusOnFirstCombo;
17339
17385
  private isFocusOnLastCombo;
@@ -17345,6 +17391,8 @@ declare class PoDatepickerComponent extends PoDatepickerBaseComponent implements
17345
17391
  handleCleanKeyboardTab(event: KeyboardEvent): void;
17346
17392
  private shouldHandleTab;
17347
17393
  private focusCalendar;
17394
+ private getCurrentMonthOption;
17395
+ private getCurrentYearOption;
17348
17396
  onCalendarKeyDown(event: KeyboardEvent): void;
17349
17397
  setHelper(label?: string, additionalHelpTooltip?: string): {
17350
17398
  hideAdditionalHelp: boolean;
@@ -18078,6 +18126,9 @@ interface PoDatepickerRangeLiterals {
18078
18126
  *
18079
18127
  * - Quando preenchidas a data inicial e final, a data inicial deve ser sempre menor ou igual a data final;
18080
18128
  * - Ao passar uma data inválida via codificação, o valor será mantido no *model* e o `input` da tela aparecerá vazio;
18129
+ * - Datas no formato ISO (ex.: `'0050-05-10'`) com ano inferior a 100 são mantidas. Ao informar um objeto `Date`
18130
+ * com ano inferior a 100, utilize o método [`setFullYear`](https://www.w3schools.com/jsref/jsref_setfullyear.asp),
18131
+ * pois o [`new Date`](https://www.w3schools.com/js/js_dates.asp) converte esses anos para 19XX;
18081
18132
  * - Permite trabalhar com as duas datas separadamente através das propriedades `p-start-date` e `p-end-date` no lugar do
18082
18133
  * `[(ngModel)]`, no entanto sem a validação do formulário;
18083
18134
  * - Para a validação do formulário, utilize o `[(ngModel)]`.
@@ -18637,6 +18688,7 @@ declare class PoDatepickerRangeComponent extends PoDatepickerRangeBaseComponent
18637
18688
  widthWithPresets: boolean;
18638
18689
  private clickListener;
18639
18690
  private eventResizeListener;
18691
+ private readonly mouseDownGuard;
18640
18692
  private readonly poDatepickerRangeElement;
18641
18693
  private readonly MIN_CALENDAR_WIDTH_WITH_PRESETS;
18642
18694
  get autocomplete(): "on" | "off";
@@ -18763,6 +18815,7 @@ declare class PoDatepickerRangeComponent extends PoDatepickerRangeBaseComponent
18763
18815
  private updateModelByScreen;
18764
18816
  private verifyFormattedDates;
18765
18817
  private wasClickedOnPicker;
18818
+ private isInsidePicker;
18766
18819
  closeCalendar(): void;
18767
18820
  static ɵfac: i0.ɵɵFactoryDeclaration<PoDatepickerRangeComponent, never>;
18768
18821
  static ɵcmp: i0.ɵɵComponentDeclaration<PoDatepickerRangeComponent, "po-datepicker-range", never, {}, {}, never, never, false, never>;
@@ -22375,6 +22428,9 @@ declare class PoUserGuideService extends PoUserGuideBaseService {
22375
22428
  * - O valor emitido no model inclui o offset do timezone local do navegador.
22376
22429
  * - Ao receber um valor com timezone, o componente converte automaticamente para horário local.
22377
22430
  * - Caso a data/hora esteja inválida, o `model` receberá a mensagem de erro localizada.
22431
+ * - Datas no formato ISO (ex.: `'0050-05-10'`) com ano inferior a 100 são mantidas. Ao informar um objeto `Date`
22432
+ * com ano inferior a 100, utilize o método [`setFullYear`](https://www.w3schools.com/jsref/jsref_setfullyear.asp),
22433
+ * pois o [`new Date`](https://www.w3schools.com/js/js_dates.asp) converte esses anos para 19XX.
22378
22434
  * - Caso o `input` esteja passando um `[(ngModel)]`, mas não tenha um `name`, então irá ocorrer um erro
22379
22435
  * do próprio Angular (`[ngModelOptions]="{standalone: true}"`).
22380
22436
  *
@@ -22857,6 +22913,8 @@ declare abstract class PoDatetimepickerBaseComponent implements ControlValueAcce
22857
22913
  private timeToSeconds;
22858
22914
  private resolveFormat;
22859
22915
  private processStringValue;
22916
+ private hasLocalOffsetWithSeconds;
22917
+ private copyDateWithTime;
22860
22918
  private normalizeTimePart;
22861
22919
  private extractTimeFromDate;
22862
22920
  private requiredFailed;
@@ -22909,9 +22967,12 @@ declare class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent im
22909
22967
  isInputFocused: boolean;
22910
22968
  private clickListener;
22911
22969
  private eventResizeListener;
22970
+ private readonly mouseDownGuard;
22912
22971
  private valueBeforeChange;
22913
22972
  private hadValueOnOpen;
22914
22973
  private isTodayPresetInProgress;
22974
+ private lastSyncedCalendar;
22975
+ private lastSyncedValue;
22915
22976
  constructor();
22916
22977
  ngAfterViewInit(): void;
22917
22978
  ngOnDestroy(): void;
@@ -22994,10 +23055,12 @@ declare class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent im
22994
23055
  private normalizeTimeWithSeconds;
22995
23056
  private syncDateFromInput;
22996
23057
  private syncCalendarAndTimer;
23058
+ private getSyncedValue;
22997
23059
  private getExpectedInputLength;
22998
23060
  private setCalendarPosition;
22999
23061
  protected adjustCalendarPosition(): void;
23000
23062
  private initializeListeners;
23063
+ private isInsidePicker;
23001
23064
  private removeListeners;
23002
23065
  private readonly onScroll;
23003
23066
  private setDialogPickerStyleDisplay;
Binary file