Skip to content

Commit 8ac4448

Browse files
refactor(calendar): resolve conflitos com origin/master
Co-Authored-By: arthur.polidorio <arthur.polidorio@totvs.com.br>
2 parents 967a87d + 0e75224 commit 8ac4448

95 files changed

Lines changed: 18688 additions & 465 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,27 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [21.9.0](https://github.com/po-ui/po-angular/compare/v21.8.0...v21.9.0) (2026-04-09)
6+
7+
8+
### Features
9+
10+
* **calendar:** adiciona períodos pré-estabelecidos no modo range ([c32ca35](https://github.com/po-ui/po-angular/commit/c32ca35fe5d833085883b5ac2fad61809732468a))
11+
* **fields:** repassa propriedade loading para o componente Dynamic Form ([a432752](https://github.com/po-ui/po-angular/commit/a432752b29fff5ac2576114d52c148485cf34a72))
12+
* **timepicker:** implementa componente po-timepicker ([3c9cc5c](https://github.com/po-ui/po-angular/commit/3c9cc5c00e81046b2c265aa5a03ef0876070cab0))
13+
14+
## [21.8.0](https://github.com/po-ui/po-angular/compare/v21.7.0...v21.8.0) (2026-04-01)
15+
16+
17+
### Features
18+
19+
* **context-menu:** implementa componente po-context-menu ([cd0d303](https://github.com/po-ui/po-angular/commit/cd0d3033f2cd5646e44aed4c5dec06cf3e4da612))
20+
* **header:** implementa variação AA small ([e5f5ec6](https://github.com/po-ui/po-angular/commit/e5f5ec68d99b81e9b00032371ceddc9b2bf6e170))
21+
* **ia-tools:** adiciona servidor MCP @po-ui/mcp ([29fdcb4](https://github.com/po-ui/po-angular/commit/29fdcb440fbf4d1fb2ba490bd9c3f5437ae169a9))
22+
* **ia-tools:** adiciona suporte a llms ([b90d466](https://github.com/po-ui/po-angular/commit/b90d466df84897cff8ba62b6d2ea30697d0cd131))
23+
* **menu:** adiciona evento `p-expanded` ([4e7f2ad](https://github.com/po-ui/po-angular/commit/4e7f2ad7a6b2242505d9010b7b2c2287818d0867))
24+
* **tabs:** adiciona output `p-actived-tab` e o método `activateTab` ([bd2eed5](https://github.com/po-ui/po-angular/commit/bd2eed5193964fee227a60f1897660cadb8699ac))
25+
526
## [21.7.0](https://github.com/po-ui/po-angular/compare/v21.6.0...v21.7.0) (2026-03-26)
627

728

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "po-ui-sources",
3-
"version": "21.7.0",
3+
"version": "21.9.0",
44
"description": "PO UI",
55
"homepage": "https://po-ui.io",
66
"license": "MIT",
@@ -79,7 +79,7 @@
7979
"@angular/router": "~21.0.3",
8080
"@capacitor/core": "5.7.2",
8181
"@capacitor/network": "^5.0.7",
82-
"@po-ui/style": "21.7.0",
82+
"@po-ui/style": "21.9.0",
8383
"capitalize": "^2.0.4",
8484
"colors": "1.4.0",
8585
"core-js": "3.33.3",

projects/portal/src/web.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<mimeMap fileExtension=".json" mimeType="application/json" />
77
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
88
<mimeMap fileExtension=".woff2" mimeType="font/woff2" />
9+
<mimeMap fileExtension=".md" mimeType="text/markdown" />
910
</staticContent>
1011
</system.webServer>
1112
<system.webServer>

projects/ui/src/lib/components/components.module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ import { PoWidgetModule } from './po-widget/po-widget.module';
5252
import { PoToasterModule } from './po-toaster';
5353
import { PoHelperModule } from './po-helper/po-helper.module';
5454
import { PoHeaderModule } from './po-header';
55+
import { PoTimerModule } from './po-timer/po-timer.module';
5556

5657
const PO_MODULES = [
5758
PoAccordionModule,
@@ -105,7 +106,8 @@ const PO_MODULES = [
105106
PoSkeletonModule,
106107
PoToasterModule,
107108
PoHelperModule,
108-
PoHeaderModule
109+
PoHeaderModule,
110+
PoTimerModule
109111
];
110112
@NgModule({
111113
imports: PO_MODULES,

projects/ui/src/lib/components/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,4 @@ export * from './po-search/index';
5151
export * from './po-skeleton/index';
5252
export * from './po-toaster/index';
5353
export * from './po-header/index';
54+
export * from './po-timer/index';

projects/ui/src/lib/components/po-button/po-button-base.component.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,17 @@ export class PoButtonBaseComponent {
228228

229229
@Input('p-aria-expanded') ariaExpanded?: boolean = null;
230230

231+
/**
232+
* @optional
233+
*
234+
* @description
235+
*
236+
* Define o `tabindex` do elemento `<button>` nativo interno.
237+
*
238+
* Use `[tabindex]="-1"` para remover o botão da ordem de foco do teclado.
239+
*/
240+
@Input('p-tabindex') tabindex?: number | string = null;
241+
231242
/**
232243
* @optional
233244
*

projects/ui/src/lib/components/po-button/po-button.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
[disabled]="disabled || loading"
88
[attr.aria-label]="ariaLabel()"
99
[attr.aria-expanded]="ariaExpanded"
10+
[attr.tabindex]="tabindex"
1011
(blur)="onBlur()"
1112
(click)="onClick()"
1213
>

projects/ui/src/lib/components/po-button/po-button.component.spec.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,24 @@ describe('PoButtonComponent: ', () => {
7676
expect(nativeElement.querySelector('button').getAttribute('type')).toBe(PoButtonType.Button);
7777
});
7878

79+
it('should propagate [p-tabindex] input to the inner button element', () => {
80+
fixture.componentRef.setInput('p-tabindex', -1);
81+
fixture.detectChanges();
82+
expect(nativeElement.querySelector('button').getAttribute('tabindex')).toBe('-1');
83+
});
84+
85+
it('should propagate p-tabindex=0 to the inner button element', () => {
86+
fixture.componentRef.setInput('p-tabindex', 0);
87+
fixture.detectChanges();
88+
expect(nativeElement.querySelector('button').getAttribute('tabindex')).toBe('0');
89+
});
90+
91+
it('should not set tabindex on inner button when p-tabindex input is null', () => {
92+
fixture.componentRef.setInput('p-tabindex', null);
93+
fixture.detectChanges();
94+
expect(nativeElement.querySelector('button').getAttribute('tabindex')).toBeNull();
95+
});
96+
7997
it('should set type to `submit`.', () => {
8098
fixture.componentRef.setInput('p-type', PoButtonType.Submit);
8199
fixture.detectChanges();
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
import { PoCalendarRangePreset } from '../interfaces/po-calendar-range-preset.interface';
2+
3+
function startOfDay(date: Date): Date {
4+
const d = new Date(date);
5+
d.setHours(0, 0, 0, 0);
6+
return d;
7+
}
8+
9+
function endOfDay(date: Date): Date {
10+
const d = new Date(date);
11+
d.setHours(23, 59, 59, 999);
12+
return d;
13+
}
14+
15+
export const PO_CALENDAR_DEFAULT_RANGE_PRESETS: Array<PoCalendarRangePreset> = [
16+
{
17+
label: 'tomorrow',
18+
dateRange: (today: Date) => {
19+
const tomorrow = new Date(today);
20+
tomorrow.setDate(tomorrow.getDate() + 1);
21+
return {
22+
start: startOfDay(tomorrow),
23+
end: endOfDay(tomorrow)
24+
};
25+
}
26+
},
27+
{
28+
label: 'today',
29+
dateRange: (today: Date) => ({
30+
start: startOfDay(today),
31+
end: endOfDay(today)
32+
})
33+
},
34+
{
35+
label: 'yesterday',
36+
dateRange: (today: Date) => {
37+
const yesterday = new Date(today);
38+
yesterday.setDate(yesterday.getDate() - 1);
39+
return {
40+
start: startOfDay(yesterday),
41+
end: endOfDay(yesterday)
42+
};
43+
}
44+
},
45+
{
46+
label: '7days',
47+
dateRange: (today: Date) => {
48+
const start = new Date(today);
49+
start.setDate(start.getDate() - 6);
50+
return {
51+
start: startOfDay(start),
52+
end: endOfDay(today)
53+
};
54+
}
55+
},
56+
{
57+
label: '14days',
58+
dateRange: (today: Date) => {
59+
const start = new Date(today);
60+
start.setDate(start.getDate() - 13);
61+
return {
62+
start: startOfDay(start),
63+
end: endOfDay(today)
64+
};
65+
}
66+
},
67+
{
68+
label: '30days',
69+
dateRange: (today: Date) => {
70+
const start = new Date(today);
71+
start.setDate(start.getDate() - 29);
72+
return {
73+
start: startOfDay(start),
74+
end: endOfDay(today)
75+
};
76+
}
77+
},
78+
{
79+
label: '3months',
80+
dateRange: (today: Date) => {
81+
const start = new Date(today);
82+
start.setMonth(start.getMonth() - 3);
83+
return {
84+
start: startOfDay(start),
85+
end: endOfDay(today)
86+
};
87+
}
88+
},
89+
{
90+
label: '6months',
91+
dateRange: (today: Date) => {
92+
const start = new Date(today);
93+
start.setMonth(start.getMonth() - 6);
94+
return {
95+
start: startOfDay(start),
96+
end: endOfDay(today)
97+
};
98+
}
99+
}
100+
];
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
export * from './po-calendar-mode.enum';
22
export * from './po-calendar.component';
33
export * from './po-calendar.module';
4+
export * from './interfaces/po-calendar-range-preset.interface';
5+
export * from './constants/po-calendar-range-presets.constant';

0 commit comments

Comments
 (0)