Skip to content

Commit

Permalink
fix(core): Calendar properly react to markers change (#6258)
Browse files Browse the repository at this point in the history
  • Loading branch information
waterplea authored Dec 18, 2023
1 parent 2a686ee commit fcea78d
Show file tree
Hide file tree
Showing 8 changed files with 584 additions and 770 deletions.
1,330 changes: 568 additions & 762 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion projects/addon-preview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"peerDependencies": {
"@angular/common": ">=12.0.0",
"@angular/core": ">=12.0.0",
"@ng-web-apis/mutation-observer": "3.0.6",
"@ng-web-apis/mutation-observer": "3.1.0",
"@taiga-ui/cdk": ">=3.59.0",
"@taiga-ui/core": ">=3.59.0",
"@taiga-ui/i18n": ">=3.59.0",
Expand Down
2 changes: 1 addition & 1 deletion projects/addon-table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"peerDependencies": {
"@angular/common": ">=12.0.0",
"@angular/core": ">=12.0.0",
"@ng-web-apis/intersection-observer": "3.1.6",
"@ng-web-apis/intersection-observer": "3.2.0",
"@taiga-ui/cdk": ">=3.59.0",
"@taiga-ui/core": ">=3.59.0",
"@taiga-ui/i18n": ">=3.59.0",
Expand Down
2 changes: 1 addition & 1 deletion projects/cdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"license": "Apache-2.0",
"dependencies": {
"@ng-web-apis/common": "3.0.6",
"@ng-web-apis/mutation-observer": "3.0.6",
"@ng-web-apis/mutation-observer": "3.1.0",
"@ng-web-apis/resize-observer": "3.0.6",
"@tinkoff/ng-event-plugins": "3.1.0",
"@tinkoff/ng-polymorpheus": "4.3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,13 @@ export class TuiPrimitiveCalendarComponent {
day: TuiDay,
today: boolean,
inRange: boolean,
markerHandler: TuiMarkerHandler,
): [string, string] | [string] | null => {
if (today || inRange) {
return null;
}

const markers = this.markerHandler(day);
const markers = markerHandler(day);

return markers.length === 0 ? null : markers;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@
>
{{ item.day }}
<div
*ngIf="item | tuiMapper: toMarkers : itemIsToday(item) : !!getItemRange(item) as markers"
*ngIf="
item
| tuiMapper
: toMarkers
: itemIsToday(item)
: !!getItemRange(item)
: markerHandler as markers
"
class="t-dots"
>
<div
Expand Down
2 changes: 1 addition & 1 deletion projects/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@angular/platform-browser": ">=12.0.0",
"@angular/router": ">=12.0.0",
"@ng-web-apis/common": "3.0.6",
"@ng-web-apis/mutation-observer": "3.0.6",
"@ng-web-apis/mutation-observer": "3.1.0",
"@taiga-ui/cdk": ">=3.59.0",
"@taiga-ui/i18n": ">=3.59.0",
"@tinkoff/ng-event-plugins": "3.1.0",
Expand Down
4 changes: 2 additions & 2 deletions projects/kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@maskito/angular": "1.9.0",
"@maskito/core": "1.9.0",
"@maskito/kit": "1.9.0",
"@ng-web-apis/intersection-observer": "3.1.6",
"@ng-web-apis/intersection-observer": "3.2.0",
"text-mask-core": "5.1.2"
},
"peerDependencies": {
Expand All @@ -25,7 +25,7 @@
"@angular/forms": ">=12.0.0",
"@angular/router": ">=12.0.0",
"@ng-web-apis/common": "3.0.6",
"@ng-web-apis/mutation-observer": "3.0.6",
"@ng-web-apis/mutation-observer": "3.1.0",
"@ng-web-apis/resize-observer": "3.0.6",
"@taiga-ui/cdk": ">=3.59.0",
"@taiga-ui/core": ">=3.59.0",
Expand Down

0 comments on commit fcea78d

Please sign in to comment.