@po-ui/ng-components 21.35.0 → 21.36.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 (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 +1773 -1412
  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.36.0.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.35.0.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;
@@ -2302,6 +2303,7 @@ declare class PoListBoxComponent extends PoListBoxBaseComponent implements OnIni
2302
2303
  private getSelectedItem;
2303
2304
  scrollToAndSelectCurrentItem(): void;
2304
2305
  protected onListboxFocusIn(event: FocusEvent): void;
2306
+ private focusFirstOptionWhenNoneActive;
2305
2307
  protected checkInfiniteScroll(): void;
2306
2308
  protected getSizeLoading(): "xs" | "sm" | "md";
2307
2309
  protected getTextLoading(): "" | " ";
@@ -6121,6 +6123,11 @@ interface PoCalendarRangePreset {
6121
6123
  *
6122
6124
  * **Importante:**
6123
6125
  * - Datas fora do intervalo (`p-min-date` / `p-max-date`) aparecem desabilitadas sem alterar o *model*.
6126
+ * - São aceitos anos entre 0000 e 9999. No seletor de ano do cabeçalho é possível digitar qualquer ano com
6127
+ * 4 dígitos, mesmo que não esteja listado, e a navegação é bloqueada nos limites desse intervalo.
6128
+ * - Datas no formato ISO (ex.: `'0050-05-10'`) com ano inferior a 100 são mantidas. Ao informar um objeto `Date`
6129
+ * com ano inferior a 100, utilize o método [`setFullYear`](https://www.w3schools.com/jsref/jsref_setfullyear.asp),
6130
+ * pois o [`new Date`](https://www.w3schools.com/js/js_dates.asp) converte esses anos para 19XX.
6124
6131
  *
6125
6132
  * #### Boas práticas
6126
6133
  *
@@ -6425,6 +6432,7 @@ declare class PoCalendarComponent extends PoCalendarBaseComponent implements OnI
6425
6432
  yearOptions: QueryList<PoButtonComponent>;
6426
6433
  monthOptions: QueryList<PoButtonComponent>;
6427
6434
  private readonly changeDetector;
6435
+ private readonly elementRef;
6428
6436
  private readonly poCalendarService;
6429
6437
  private readonly poCalendarLangService;
6430
6438
  hoverValue: Date;
@@ -6458,6 +6466,13 @@ declare class PoCalendarComponent extends PoCalendarBaseComponent implements OnI
6458
6466
  private getMonthOptions;
6459
6467
  private getYearOptions;
6460
6468
  private initializeYearAndMonthMode;
6469
+ /**
6470
+ * Centraliza na lista o ano selecionado, ou o ano atual quando não houver seleção, caso ele não esteja visível.
6471
+ */
6472
+ scrollToSelectedYear(): void;
6473
+ formatYearLabel(year: number): string;
6474
+ private hasSelectedYear;
6475
+ private updateDisplayYears;
6461
6476
  getActivateDate(partType: any): any;
6462
6477
  getValue(partType: any): any;
6463
6478
  onSelectDate(selectedDate: any, partType?: any): void;
@@ -6495,6 +6510,9 @@ declare class PoCalendarComponent extends PoCalendarBaseComponent implements OnI
6495
6510
  private setMonth;
6496
6511
  private setYear;
6497
6512
  private writeDate;
6513
+ private writeMonthYearDate;
6514
+ private writeYearDate;
6515
+ private parseYearValue;
6498
6516
  static ɵfac: i0.ɵɵFactoryDeclaration<PoCalendarComponent, never>;
6499
6517
  static ɵcmp: i0.ɵɵComponentDeclaration<PoCalendarComponent, "po-calendar", never, {}, {}, never, never, false, never>;
6500
6518
  }
@@ -6576,6 +6594,8 @@ declare class PoCalendarHeaderComponent implements OnInit, OnChanges {
6576
6594
  readonly poCalendarLangService: PoCalendarLangService;
6577
6595
  hidePrevious: boolean;
6578
6596
  hideNext: boolean;
6597
+ disablePrevious: i0.InputSignal<boolean>;
6598
+ disableNext: i0.InputSignal<boolean>;
6579
6599
  displayMonth: number;
6580
6600
  displayYear: number;
6581
6601
  displayMonthLabel: string;
@@ -6597,7 +6617,7 @@ declare class PoCalendarHeaderComponent implements OnInit, OnChanges {
6597
6617
  private setupLabels;
6598
6618
  ngOnChanges(changes: SimpleChanges): void;
6599
6619
  static ɵfac: i0.ɵɵFactoryDeclaration<PoCalendarHeaderComponent, never>;
6600
- 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>;
6620
+ 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>;
6601
6621
  }
6602
6622
 
6603
6623
  declare class PoCalendarWrapperComponent implements OnInit, OnChanges {
@@ -6655,6 +6675,9 @@ declare class PoCalendarWrapperComponent implements OnInit, OnChanges {
6655
6675
  templateContext: any;
6656
6676
  protected currentMonthNumber: number;
6657
6677
  protected lastDisplay: string;
6678
+ private displayYearOption;
6679
+ private typedYearOption;
6680
+ private readonly combosAwaitingFocusOut;
6658
6681
  get monthLabel(): any;
6659
6682
  get yearLabel(): any;
6660
6683
  get isDayVisible(): boolean;
@@ -6673,9 +6696,14 @@ declare class PoCalendarWrapperComponent implements OnInit, OnChanges {
6673
6696
  month: number;
6674
6697
  }): void;
6675
6698
  private updateTemplateContext;
6699
+ onYearInputChange(search: string, comboComponent?: any): void;
6700
+ private getTypedYear;
6701
+ private formatYearLabel;
6676
6702
  updateDate(year: number, month: number, comboComponent?: any): void;
6677
6703
  onComboBlur(comboComponent?: any): void;
6704
+ private resetComboWithoutOptions;
6678
6705
  private handleComboBlur;
6706
+ private validateOnComboFocusOut;
6679
6707
  private syncInputValue;
6680
6708
  private applySelectedValue;
6681
6709
  private ensureValidDisplay;
@@ -6685,6 +6713,10 @@ declare class PoCalendarWrapperComponent implements OnInit, OnChanges {
6685
6713
  private setInitialFocusedDay;
6686
6714
  private ensureValidFocusedDay;
6687
6715
  getDayTabIndex(day: Date, index: number): number;
6716
+ get isPreviousMonthDisabled(): boolean;
6717
+ get isNextMonthDisabled(): boolean;
6718
+ isPreviousYearDisabled(step: number): boolean;
6719
+ isNextYearDisabled(step: number): boolean;
6688
6720
  onNextMonth(): void;
6689
6721
  onPreviousMonth(): void;
6690
6722
  updateYear(value: number): void;
@@ -17181,8 +17213,11 @@ declare class PoMask {
17181
17213
  *
17182
17214
  * **Importante:**
17183
17215
  *
17184
- * - Para utilizar datas com ano inferior a 100, verificar o comportamento do [`new Date`](https://www.w3schools.com/js/js_dates.asp)
17185
- * e utilizar o método [`setFullYear`](https://www.w3schools.com/jsref/jsref_setfullyear.asp).
17216
+ * - São aceitas datas com ano entre 0000 e 9999. No calendário, além dos anos listados no seletor, é possível
17217
+ * digitar qualquer ano com 4 dígitos.
17218
+ * - Datas no formato ISO (ex.: `'0050-05-10'`) com ano inferior a 100 são mantidas. Ao informar um objeto `Date`
17219
+ * com ano inferior a 100, utilize o método [`setFullYear`](https://www.w3schools.com/jsref/jsref_setfullyear.asp),
17220
+ * pois o [`new Date`](https://www.w3schools.com/js/js_dates.asp) converte esses anos para 19XX.
17186
17221
  * - Caso a data esteja inválida, o `model` receberá **'Data inválida'**.
17187
17222
  * - Caso o `input` esteja passando um `[(ngModel)]`, mas não tenha um `name`, então irá ocorrer um erro
17188
17223
  * do próprio Angular (`[ngModelOptions]="{standalone: true}"`).
@@ -17241,8 +17276,10 @@ declare abstract class PoDatepickerBaseComponent implements ControlValueAccessor
17241
17276
  * Define o modo de operação do datepicker.
17242
17277
  *
17243
17278
  * Permite configurar o componente para seleção de:
17244
- * - Mês e ano (`month-year`);
17245
- * - Apenas ano (`year`).
17279
+ * - Mês e ano (`month-year`), com o *model* no formato `mm/yyyy` (ex.: `'03/2025'`);
17280
+ * - Apenas ano (`year`), com o *model* no formato `yyyy` (ex.: `'2025'`).
17281
+ *
17282
+ * > O ano é sempre representado com 4 dígitos, inclusive para anos inferiores a 1000 (ex.: `'03/0050'`).
17246
17283
  */
17247
17284
  mode?: 'month-year' | 'year';
17248
17285
  /**
@@ -17252,6 +17289,9 @@ declare abstract class PoDatepickerBaseComponent implements ControlValueAccessor
17252
17289
  * O valor informado determina o intervalo de anos anterior e posterior
17253
17290
  * à data corrente que será disponibilizado para seleção.
17254
17291
  *
17292
+ * > Caso o ano selecionado esteja fora desse intervalo, ele também é exibido na lista. Esta propriedade
17293
+ * não se aplica ao seletor de ano do calendário padrão (sem `p-mode`).
17294
+ *
17255
17295
  * @default 150
17256
17296
  */
17257
17297
  set yearRangeLimit(value: number);
@@ -17646,6 +17686,9 @@ declare abstract class PoDatepickerBaseComponent implements ControlValueAccessor
17646
17686
  [key: string]: any;
17647
17687
  };
17648
17688
  private isMonthYearOrYearInvalid;
17689
+ protected parseYearToken(value: string): number | null;
17690
+ private convertStringToDate;
17691
+ private convertMonthYearToDate;
17649
17692
  private isDateRangeValidForMode;
17650
17693
  private validateMonthYearRange;
17651
17694
  private validateYearRange;
@@ -17720,6 +17763,7 @@ declare class PoDatepickerComponent extends PoDatepickerBaseComponent implements
17720
17763
  eventListenerFunction: () => void;
17721
17764
  eventResizeListener: () => void;
17722
17765
  private clickListener;
17766
+ private readonly mouseDownGuard;
17723
17767
  private readonly dateRegex;
17724
17768
  private readonly isoRegex;
17725
17769
  private timeoutChange;
@@ -17813,6 +17857,7 @@ declare class PoDatepickerComponent extends PoDatepickerBaseComponent implements
17813
17857
  private applyMonthYearValue;
17814
17858
  private applyYearValue;
17815
17859
  private parseMonthYearInput;
17860
+ private isIncompleteZeroYear;
17816
17861
  private syncCalendarMonthYear;
17817
17862
  private syncCalendarYear;
17818
17863
  private writeMonthYearValue;
@@ -17821,6 +17866,7 @@ declare class PoDatepickerComponent extends PoDatepickerBaseComponent implements
17821
17866
  private isValidInputForMode;
17822
17867
  private hasAttrCalendar;
17823
17868
  private initializeListeners;
17869
+ private isInsidePicker;
17824
17870
  private isAdditionalHelpEventTriggered;
17825
17871
  private isFocusOnFirstCombo;
17826
17872
  private isFocusOnLastCombo;
@@ -17832,6 +17878,8 @@ declare class PoDatepickerComponent extends PoDatepickerBaseComponent implements
17832
17878
  handleCleanKeyboardTab(event: KeyboardEvent): void;
17833
17879
  private shouldHandleTab;
17834
17880
  private focusCalendar;
17881
+ private getCurrentMonthOption;
17882
+ private getCurrentYearOption;
17835
17883
  onCalendarKeyDown(event: KeyboardEvent): void;
17836
17884
  setHelper(label?: string, additionalHelpTooltip?: string): {
17837
17885
  hideAdditionalHelp: boolean;
@@ -18565,6 +18613,9 @@ interface PoDatepickerRangeLiterals {
18565
18613
  *
18566
18614
  * - Quando preenchidas a data inicial e final, a data inicial deve ser sempre menor ou igual a data final;
18567
18615
  * - Ao passar uma data inválida via codificação, o valor será mantido no *model* e o `input` da tela aparecerá vazio;
18616
+ * - Datas no formato ISO (ex.: `'0050-05-10'`) com ano inferior a 100 são mantidas. Ao informar um objeto `Date`
18617
+ * com ano inferior a 100, utilize o método [`setFullYear`](https://www.w3schools.com/jsref/jsref_setfullyear.asp),
18618
+ * pois o [`new Date`](https://www.w3schools.com/js/js_dates.asp) converte esses anos para 19XX;
18568
18619
  * - Permite trabalhar com as duas datas separadamente através das propriedades `p-start-date` e `p-end-date` no lugar do
18569
18620
  * `[(ngModel)]`, no entanto sem a validação do formulário;
18570
18621
  * - Para a validação do formulário, utilize o `[(ngModel)]`.
@@ -19124,6 +19175,7 @@ declare class PoDatepickerRangeComponent extends PoDatepickerRangeBaseComponent
19124
19175
  widthWithPresets: boolean;
19125
19176
  private clickListener;
19126
19177
  private eventResizeListener;
19178
+ private readonly mouseDownGuard;
19127
19179
  private readonly poDatepickerRangeElement;
19128
19180
  private readonly MIN_CALENDAR_WIDTH_WITH_PRESETS;
19129
19181
  get autocomplete(): "on" | "off";
@@ -19250,6 +19302,7 @@ declare class PoDatepickerRangeComponent extends PoDatepickerRangeBaseComponent
19250
19302
  private updateModelByScreen;
19251
19303
  private verifyFormattedDates;
19252
19304
  private wasClickedOnPicker;
19305
+ private isInsidePicker;
19253
19306
  closeCalendar(): void;
19254
19307
  static ɵfac: i0.ɵɵFactoryDeclaration<PoDatepickerRangeComponent, never>;
19255
19308
  static ɵcmp: i0.ɵɵComponentDeclaration<PoDatepickerRangeComponent, "po-datepicker-range", never, {}, {}, never, never, false, never>;
@@ -22862,6 +22915,9 @@ declare class PoUserGuideService extends PoUserGuideBaseService {
22862
22915
  * - O valor emitido no model inclui o offset do timezone local do navegador.
22863
22916
  * - Ao receber um valor com timezone, o componente converte automaticamente para horário local.
22864
22917
  * - Caso a data/hora esteja inválida, o `model` receberá a mensagem de erro localizada.
22918
+ * - Datas no formato ISO (ex.: `'0050-05-10'`) com ano inferior a 100 são mantidas. Ao informar um objeto `Date`
22919
+ * com ano inferior a 100, utilize o método [`setFullYear`](https://www.w3schools.com/jsref/jsref_setfullyear.asp),
22920
+ * pois o [`new Date`](https://www.w3schools.com/js/js_dates.asp) converte esses anos para 19XX.
22865
22921
  * - Caso o `input` esteja passando um `[(ngModel)]`, mas não tenha um `name`, então irá ocorrer um erro
22866
22922
  * do próprio Angular (`[ngModelOptions]="{standalone: true}"`).
22867
22923
  *
@@ -23344,6 +23400,8 @@ declare abstract class PoDatetimepickerBaseComponent implements ControlValueAcce
23344
23400
  private timeToSeconds;
23345
23401
  private resolveFormat;
23346
23402
  private processStringValue;
23403
+ private hasLocalOffsetWithSeconds;
23404
+ private copyDateWithTime;
23347
23405
  private normalizeTimePart;
23348
23406
  private extractTimeFromDate;
23349
23407
  private requiredFailed;
@@ -23396,9 +23454,12 @@ declare class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent im
23396
23454
  isInputFocused: boolean;
23397
23455
  private clickListener;
23398
23456
  private eventResizeListener;
23457
+ private readonly mouseDownGuard;
23399
23458
  private valueBeforeChange;
23400
23459
  private hadValueOnOpen;
23401
23460
  private isTodayPresetInProgress;
23461
+ private lastSyncedCalendar;
23462
+ private lastSyncedValue;
23402
23463
  constructor();
23403
23464
  ngAfterViewInit(): void;
23404
23465
  ngOnDestroy(): void;
@@ -23481,10 +23542,12 @@ declare class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent im
23481
23542
  private normalizeTimeWithSeconds;
23482
23543
  private syncDateFromInput;
23483
23544
  private syncCalendarAndTimer;
23545
+ private getSyncedValue;
23484
23546
  private getExpectedInputLength;
23485
23547
  private setCalendarPosition;
23486
23548
  protected adjustCalendarPosition(): void;
23487
23549
  private initializeListeners;
23550
+ private isInsidePicker;
23488
23551
  private removeListeners;
23489
23552
  private readonly onScroll;
23490
23553
  private setDialogPickerStyleDisplay;
Binary file