@clr/angular 13.5.0 → 13.8.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.
- package/clarity.api.md +7 -3
- package/data/datagrid/datagrid-page-size.d.ts +2 -1
- package/esm2020/data/datagrid/datagrid-page-size.mjs +9 -4
- package/esm2020/forms/datepicker/day.mjs +15 -5
- package/esm2020/utils/i18n/common-strings.default.mjs +2 -1
- package/esm2020/utils/i18n/common-strings.interface.mjs +1 -1
- package/fesm2015/clr-angular.mjs +21 -7
- package/fesm2015/clr-angular.mjs.map +1 -1
- package/fesm2020/clr-angular.mjs +21 -7
- package/fesm2020/clr-angular.mjs.map +1 -1
- package/forms/datepicker/day.d.ts +4 -2
- package/package.json +3 -3
- package/utils/i18n/common-strings.interface.d.ts +1 -0
package/fesm2020/clr-angular.mjs
CHANGED
|
@@ -328,6 +328,7 @@ const commonStringsDefault = {
|
|
|
328
328
|
datepickerCurrentDecade: 'Current decade',
|
|
329
329
|
datepickerSelectMonthText: 'Select month, the current month is {CALENDAR_MONTH}',
|
|
330
330
|
datepickerSelectYearText: 'Select year, the current year is {CALENDAR_YEAR}',
|
|
331
|
+
datepickerSelectedLabel: '{FULL_DATE} - Selected',
|
|
331
332
|
// Stack View
|
|
332
333
|
stackViewChanged: 'Value changed.',
|
|
333
334
|
// Responsive Nav
|
|
@@ -8085,21 +8086,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
|
|
|
8085
8086
|
* The full license information can be found in LICENSE in the root directory of this project.
|
|
8086
8087
|
*/
|
|
8087
8088
|
class ClrDay {
|
|
8088
|
-
constructor(_dateNavigationService, _toggleService, dateFormControlService) {
|
|
8089
|
+
constructor(_dateNavigationService, _toggleService, dateFormControlService, commonStrings) {
|
|
8089
8090
|
this._dateNavigationService = _dateNavigationService;
|
|
8090
8091
|
this._toggleService = _toggleService;
|
|
8091
8092
|
this.dateFormControlService = dateFormControlService;
|
|
8093
|
+
this.commonStrings = commonStrings;
|
|
8092
8094
|
}
|
|
8093
8095
|
/**
|
|
8094
8096
|
* DayViewModel input which is used to build the Day View.
|
|
8095
8097
|
*/
|
|
8096
8098
|
set dayView(day) {
|
|
8097
8099
|
this._dayView = day;
|
|
8098
|
-
this.dayString = this._dayView.dayModel.toDateString();
|
|
8099
8100
|
}
|
|
8100
8101
|
get dayView() {
|
|
8101
8102
|
return this._dayView;
|
|
8102
8103
|
}
|
|
8104
|
+
get dayString() {
|
|
8105
|
+
return this.dayView.isSelected
|
|
8106
|
+
? this.commonStrings.parse(this.commonStrings.keys.datepickerSelectedLabel, {
|
|
8107
|
+
FULL_DATE: this._dayView.dayModel.toDateString(),
|
|
8108
|
+
})
|
|
8109
|
+
: this._dayView.dayModel.toDateString();
|
|
8110
|
+
}
|
|
8103
8111
|
/**
|
|
8104
8112
|
* Updates the focusedDay in the DateNavigationService when the ClrDay is focused.
|
|
8105
8113
|
*/
|
|
@@ -8116,7 +8124,7 @@ class ClrDay {
|
|
|
8116
8124
|
this._toggleService.open = false;
|
|
8117
8125
|
}
|
|
8118
8126
|
}
|
|
8119
|
-
ClrDay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrDay, deps: [{ token: DateNavigationService }, { token: ClrPopoverToggleService }, { token: DateFormControlService }], target: i0.ɵɵFactoryTarget.Component });
|
|
8127
|
+
ClrDay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrDay, deps: [{ token: DateNavigationService }, { token: ClrPopoverToggleService }, { token: DateFormControlService }, { token: ClrCommonStringsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
8120
8128
|
ClrDay.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ClrDay, selector: "clr-day", inputs: { dayView: ["clrDayView", "dayView"] }, host: { properties: { "class.day": "true" } }, ngImport: i0, template: `
|
|
8121
8129
|
<button
|
|
8122
8130
|
class="day-btn"
|
|
@@ -8128,6 +8136,7 @@ ClrDay.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.
|
|
|
8128
8136
|
[attr.tabindex]="dayView.tabIndex"
|
|
8129
8137
|
(click)="selectDay()"
|
|
8130
8138
|
(focus)="onDayViewFocus()"
|
|
8139
|
+
[attr.aria-current]="dayView.isTodaysDate ? 'date' : 'false'"
|
|
8131
8140
|
[attr.aria-label]="dayString"
|
|
8132
8141
|
[attr.aria-selected]="dayView.isSelected"
|
|
8133
8142
|
>
|
|
@@ -8149,6 +8158,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
|
|
|
8149
8158
|
[attr.tabindex]="dayView.tabIndex"
|
|
8150
8159
|
(click)="selectDay()"
|
|
8151
8160
|
(focus)="onDayViewFocus()"
|
|
8161
|
+
[attr.aria-current]="dayView.isTodaysDate ? 'date' : 'false'"
|
|
8152
8162
|
[attr.aria-label]="dayString"
|
|
8153
8163
|
[attr.aria-selected]="dayView.isSelected"
|
|
8154
8164
|
>
|
|
@@ -8157,7 +8167,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
|
|
|
8157
8167
|
`,
|
|
8158
8168
|
host: { '[class.day]': 'true' },
|
|
8159
8169
|
}]
|
|
8160
|
-
}], ctorParameters: function () { return [{ type: DateNavigationService }, { type: ClrPopoverToggleService }, { type: DateFormControlService }]; }, propDecorators: { dayView: [{
|
|
8170
|
+
}], ctorParameters: function () { return [{ type: DateNavigationService }, { type: ClrPopoverToggleService }, { type: DateFormControlService }, { type: ClrCommonStringsService }]; }, propDecorators: { dayView: [{
|
|
8161
8171
|
type: Input,
|
|
8162
8172
|
args: ['clrDayView']
|
|
8163
8173
|
}] } });
|
|
@@ -17189,6 +17199,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
|
|
|
17189
17199
|
class ClrDatagridPageSize {
|
|
17190
17200
|
constructor(page) {
|
|
17191
17201
|
this.page = page;
|
|
17202
|
+
this.pageSizeOptionsId = uniqueIdFactory();
|
|
17192
17203
|
}
|
|
17193
17204
|
ngOnInit() {
|
|
17194
17205
|
if (!this.pageSizeOptions || this.pageSizeOptions.length === 0) {
|
|
@@ -17197,10 +17208,10 @@ class ClrDatagridPageSize {
|
|
|
17197
17208
|
}
|
|
17198
17209
|
}
|
|
17199
17210
|
ClrDatagridPageSize.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrDatagridPageSize, deps: [{ token: Page }], target: i0.ɵɵFactoryTarget.Component });
|
|
17200
|
-
ClrDatagridPageSize.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ClrDatagridPageSize, selector: "clr-dg-page-size", inputs: { pageSizeOptions: ["clrPageSizeOptions", "pageSizeOptions"] }, ngImport: i0, template: `
|
|
17211
|
+
ClrDatagridPageSize.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ClrDatagridPageSize, selector: "clr-dg-page-size", inputs: { pageSizeOptions: ["clrPageSizeOptions", "pageSizeOptions"], pageSizeOptionsId: ["clrPageSizeOptionsId", "pageSizeOptionsId"] }, ngImport: i0, template: `
|
|
17201
17212
|
<ng-content></ng-content>
|
|
17202
17213
|
<div class="clr-select-wrapper">
|
|
17203
|
-
<select [class.clr-page-size-select]="true" [(ngModel)]="page.size">
|
|
17214
|
+
<select [id]="pageSizeOptionsId" [class.clr-page-size-select]="true" [(ngModel)]="page.size">
|
|
17204
17215
|
<option *ngFor="let option of pageSizeOptions" [ngValue]="option">{{ option }}</option>
|
|
17205
17216
|
</select>
|
|
17206
17217
|
</div>
|
|
@@ -17212,7 +17223,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
|
|
|
17212
17223
|
template: `
|
|
17213
17224
|
<ng-content></ng-content>
|
|
17214
17225
|
<div class="clr-select-wrapper">
|
|
17215
|
-
<select [class.clr-page-size-select]="true" [(ngModel)]="page.size">
|
|
17226
|
+
<select [id]="pageSizeOptionsId" [class.clr-page-size-select]="true" [(ngModel)]="page.size">
|
|
17216
17227
|
<option *ngFor="let option of pageSizeOptions" [ngValue]="option">{{ option }}</option>
|
|
17217
17228
|
</select>
|
|
17218
17229
|
</div>
|
|
@@ -17221,6 +17232,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
|
|
|
17221
17232
|
}], ctorParameters: function () { return [{ type: Page }]; }, propDecorators: { pageSizeOptions: [{
|
|
17222
17233
|
type: Input,
|
|
17223
17234
|
args: ['clrPageSizeOptions']
|
|
17235
|
+
}], pageSizeOptionsId: [{
|
|
17236
|
+
type: Input,
|
|
17237
|
+
args: ['clrPageSizeOptionsId']
|
|
17224
17238
|
}] } });
|
|
17225
17239
|
|
|
17226
17240
|
/*
|