@exhaustive-ui/core 22.0.0-alpha.10 → 22.0.0-alpha.12
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/fesm2022/exhaustive-ui-core-autocomplete.mjs +5 -5
- package/fesm2022/exhaustive-ui-core-autocomplete.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-basecomponent.mjs +6 -1
- package/fesm2022/exhaustive-ui-core-basecomponent.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-breadcrumb.mjs +11 -4
- package/fesm2022/exhaustive-ui-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-card.mjs +0 -4
- package/fesm2022/exhaustive-ui-core-card.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-cascadeselect.mjs +5 -5
- package/fesm2022/exhaustive-ui-core-cascadeselect.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-chart.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-confirmdialog.mjs +11 -9
- package/fesm2022/exhaustive-ui-core-confirmdialog.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-confirmpopup.mjs +18 -1
- package/fesm2022/exhaustive-ui-core-confirmpopup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-contextmenu.mjs +6 -4
- package/fesm2022/exhaustive-ui-core-contextmenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-datepicker.mjs +42 -7
- package/fesm2022/exhaustive-ui-core-datepicker.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dialog.mjs +2 -1
- package/fesm2022/exhaustive-ui-core-dialog.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-drawer.mjs +11 -2
- package/fesm2022/exhaustive-ui-core-drawer.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-fieldset.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-fieldset.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-fileupload.mjs +22 -11
- package/fesm2022/exhaustive-ui-core-fileupload.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-iconfield.mjs +16 -1
- package/fesm2022/exhaustive-ui-core-iconfield.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputgroup.mjs +9 -0
- package/fesm2022/exhaustive-ui-core-inputgroup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputnumber.mjs +54 -21
- package/fesm2022/exhaustive-ui-core-inputnumber.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputtext.mjs +6 -5
- package/fesm2022/exhaustive-ui-core-inputtext.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-listbox.mjs +4 -2
- package/fesm2022/exhaustive-ui-core-listbox.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-megamenu.mjs +1 -0
- package/fesm2022/exhaustive-ui-core-megamenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-menu.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-menu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-metergroup.mjs +5 -5
- package/fesm2022/exhaustive-ui-core-metergroup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-multiselect.mjs +25 -14
- package/fesm2022/exhaustive-ui-core-multiselect.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-orderlist.mjs +9 -2
- package/fesm2022/exhaustive-ui-core-orderlist.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-overlaybadge.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-overlaybadge.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-paginator.mjs +4 -1
- package/fesm2022/exhaustive-ui-core-paginator.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-panelmenu.mjs +7 -1
- package/fesm2022/exhaustive-ui-core-panelmenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-password.mjs +34 -14
- package/fesm2022/exhaustive-ui-core-password.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-picklist.mjs +4 -4
- package/fesm2022/exhaustive-ui-core-picklist.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-popover.mjs +26 -7
- package/fesm2022/exhaustive-ui-core-popover.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-select.mjs +20 -14
- package/fesm2022/exhaustive-ui-core-select.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-selectbutton.mjs +10 -6
- package/fesm2022/exhaustive-ui-core-selectbutton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-slider.mjs +7 -3
- package/fesm2022/exhaustive-ui-core-slider.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-splitter.mjs +5 -0
- package/fesm2022/exhaustive-ui-core-splitter.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-stepper.mjs +3 -0
- package/fesm2022/exhaustive-ui-core-stepper.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-table.mjs +97 -65
- package/fesm2022/exhaustive-ui-core-table.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tabs.mjs +37 -7
- package/fesm2022/exhaustive-ui-core-tabs.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tieredmenu.mjs +2 -1
- package/fesm2022/exhaustive-ui-core-tieredmenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-toast.mjs +12 -1
- package/fesm2022/exhaustive-ui-core-toast.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-togglebutton.mjs +9 -2
- package/fesm2022/exhaustive-ui-core-togglebutton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-toggleswitch.mjs +0 -2
- package/fesm2022/exhaustive-ui-core-toggleswitch.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tree.mjs +4 -4
- package/fesm2022/exhaustive-ui-core-tree.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-treeselect.mjs +15 -3
- package/fesm2022/exhaustive-ui-core-treeselect.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-treetable.mjs +4 -0
- package/fesm2022/exhaustive-ui-core-treetable.mjs.map +1 -1
- package/package.json +5 -5
- package/schematics/migrate-from-primeflex/index.js +4 -2
- package/schematics/migrate-from-primeflex/schema.json +5 -0
- package/schematics/utils/package-json.js +17 -0
- package/schematics/utils/primeflex.js +45 -10
- package/schematics/utils/versions.json +8 -8
- package/types/exhaustive-ui-core-api.d.ts +4 -0
- package/types/exhaustive-ui-core-basecomponent.d.ts +1 -0
- package/types/exhaustive-ui-core-breadcrumb.d.ts +7 -1
- package/types/exhaustive-ui-core-cascadeselect.d.ts +1 -1
- package/types/exhaustive-ui-core-chart.d.ts +2 -2
- package/types/exhaustive-ui-core-confirmdialog.d.ts +3 -2
- package/types/exhaustive-ui-core-confirmpopup.d.ts +4 -0
- package/types/exhaustive-ui-core-datepicker.d.ts +2 -1
- package/types/exhaustive-ui-core-drawer.d.ts +1 -0
- package/types/exhaustive-ui-core-fileupload.d.ts +4 -0
- package/types/exhaustive-ui-core-iconfield.d.ts +1 -2
- package/types/exhaustive-ui-core-inputnumber.d.ts +8 -0
- package/types/exhaustive-ui-core-megamenu.d.ts +1 -0
- package/types/exhaustive-ui-core-metergroup.d.ts +1 -1
- package/types/exhaustive-ui-core-orderlist.d.ts +6 -1
- package/types/exhaustive-ui-core-password.d.ts +7 -1
- package/types/exhaustive-ui-core-popover.d.ts +3 -0
- package/types/exhaustive-ui-core-select.d.ts +1 -0
- package/types/exhaustive-ui-core-selectbutton.d.ts +3 -0
- package/types/exhaustive-ui-core-splitter.d.ts +1 -0
- package/types/exhaustive-ui-core-stepper.d.ts +3 -2
- package/types/exhaustive-ui-core-table.d.ts +8 -1
- package/types/exhaustive-ui-core-tabs.d.ts +3 -0
- package/types/exhaustive-ui-core-togglebutton.d.ts +1 -0
- package/types/exhaustive-ui-core-treeselect.d.ts +6 -1
- package/types/exhaustive-ui-core-types-chart.d.ts +21 -1
- package/types/exhaustive-ui-core-types-confirmdialog.d.ts +1 -3
- package/types/exhaustive-ui-core-types-table.d.ts +1 -1
- package/types/exhaustive-ui-core-types-treetable.d.ts +2 -2
|
@@ -29,6 +29,10 @@ ${style$1}
|
|
|
29
29
|
.p-datepicker.ng-invalid.ng-dirty .p-inputtext {
|
|
30
30
|
border-color: dt('inputtext.invalid.border.color');
|
|
31
31
|
}
|
|
32
|
+
|
|
33
|
+
.p-datepicker.ng-invalid.ng-dirty .p-inputtext::placeholder {
|
|
34
|
+
color: dt('inputtext.invalid.placeholder.color');
|
|
35
|
+
}
|
|
32
36
|
`;
|
|
33
37
|
const inlineStyles = {
|
|
34
38
|
root: () => ({ position: 'relative' })
|
|
@@ -430,8 +434,7 @@ class DatePicker extends BaseInput {
|
|
|
430
434
|
* Specifies 12 or 24 hour format.
|
|
431
435
|
* @group Props
|
|
432
436
|
*/
|
|
433
|
-
hourFormat = input('24', /*
|
|
434
|
-
...(ngDevMode ? [{ debugName: "hourFormat" }] : /* istanbul ignore next */ []));
|
|
437
|
+
hourFormat = input('24', { ...(ngDevMode ? { debugName: "hourFormat" } : /* istanbul ignore next */ {}), transform: (value) => String(value) });
|
|
435
438
|
/**
|
|
436
439
|
* Whether to display timepicker only.
|
|
437
440
|
* @group Props
|
|
@@ -1172,7 +1175,9 @@ class DatePicker extends BaseInput {
|
|
|
1172
1175
|
}
|
|
1173
1176
|
}
|
|
1174
1177
|
if (this.showWeek()) {
|
|
1175
|
-
|
|
1178
|
+
// an ISO week is the one of its Thursday, so number the row by the Thursday it contains
|
|
1179
|
+
let weekDay = this.startWeekFromFirstDayOfYear() ? week[0] : week[(11 - +this.getFirstDateOfWeek()) % 7];
|
|
1180
|
+
weekNumbers.push(this.getWeekNumber(new Date(weekDay.year, weekDay.month, weekDay.day)));
|
|
1176
1181
|
}
|
|
1177
1182
|
dates.push(week);
|
|
1178
1183
|
}
|
|
@@ -1224,6 +1229,7 @@ class DatePicker extends BaseInput {
|
|
|
1224
1229
|
}
|
|
1225
1230
|
this.onMonthChange.emit({ month: this.currentMonth() + 1, year: this.currentYear() });
|
|
1226
1231
|
this.createMonths(this.currentMonth(), this.currentYear());
|
|
1232
|
+
this.realignOverlay();
|
|
1227
1233
|
}
|
|
1228
1234
|
}
|
|
1229
1235
|
navForward(event) {
|
|
@@ -1254,6 +1260,7 @@ class DatePicker extends BaseInput {
|
|
|
1254
1260
|
}
|
|
1255
1261
|
this.onMonthChange.emit({ month: this.currentMonth() + 1, year: this.currentYear() });
|
|
1256
1262
|
this.createMonths(this.currentMonth(), this.currentYear());
|
|
1263
|
+
this.realignOverlay();
|
|
1257
1264
|
}
|
|
1258
1265
|
}
|
|
1259
1266
|
decrementYear() {
|
|
@@ -1403,7 +1410,7 @@ class DatePicker extends BaseInput {
|
|
|
1403
1410
|
return new Date(dateMeta.year, dateMeta.month, dateMeta.day);
|
|
1404
1411
|
}
|
|
1405
1412
|
formatDateKey(date) {
|
|
1406
|
-
return `${date.getFullYear()}-${date.getMonth()}-${date.getDate()}`;
|
|
1413
|
+
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
|
|
1407
1414
|
}
|
|
1408
1415
|
setCurrentHourPM(hours) {
|
|
1409
1416
|
if (this.hourFormat() == '12') {
|
|
@@ -1610,6 +1617,10 @@ class DatePicker extends BaseInput {
|
|
|
1610
1617
|
}
|
|
1611
1618
|
isYearSelected(year) {
|
|
1612
1619
|
if (this.isComparable()) {
|
|
1620
|
+
if (this.isRangeSelection() && this.value()[1]) {
|
|
1621
|
+
// like isMonthSelected, a complete range highlights every year it spans
|
|
1622
|
+
return this.value()[0]?.getFullYear() <= year && year <= this.value()[1].getFullYear();
|
|
1623
|
+
}
|
|
1613
1624
|
let value = this.isRangeSelection() ? this.value()[0] : this.value();
|
|
1614
1625
|
return !this.isMultipleSelection() ? value?.getFullYear() === year : false;
|
|
1615
1626
|
}
|
|
@@ -2576,7 +2587,9 @@ class DatePicker extends BaseInput {
|
|
|
2576
2587
|
if (this.isMultipleSelection()) {
|
|
2577
2588
|
value = this.value()[this.value().length - 1];
|
|
2578
2589
|
}
|
|
2579
|
-
|
|
2590
|
+
// without a value, the time applies to the day the panel shows on opening: defaultDate when given, today otherwise
|
|
2591
|
+
const defaultDate = this.defaultDate();
|
|
2592
|
+
value = value && isDate(value) ? new Date(value.getTime()) : defaultDate && isDate(defaultDate) ? new Date(defaultDate.getTime()) : new Date();
|
|
2580
2593
|
if (this.hourFormat() == '12') {
|
|
2581
2594
|
if (this.currentHour() === 12)
|
|
2582
2595
|
value.setHours(this.pm() ? 12 : 0);
|
|
@@ -2623,6 +2636,7 @@ class DatePicker extends BaseInput {
|
|
|
2623
2636
|
value = Array.isArray(value) ? value.map((date) => date && constrain(date)) : constrain(value);
|
|
2624
2637
|
this.updateModel(value);
|
|
2625
2638
|
this.updateUI();
|
|
2639
|
+
this.realignOverlay();
|
|
2626
2640
|
}
|
|
2627
2641
|
else if (this.keepInvalid()) {
|
|
2628
2642
|
this.updateModel(value);
|
|
@@ -2784,6 +2798,13 @@ class DatePicker extends BaseInput {
|
|
|
2784
2798
|
this.el.nativeElement.appendChild(this.overlay());
|
|
2785
2799
|
}
|
|
2786
2800
|
}
|
|
2801
|
+
// a month can have 4 to 6 rows: a panel opened above the input has to move with its new height
|
|
2802
|
+
realignOverlay() {
|
|
2803
|
+
if (this.overlayVisible() && !this.inline()) {
|
|
2804
|
+
this.cd.detectChanges();
|
|
2805
|
+
this.alignOverlay();
|
|
2806
|
+
}
|
|
2807
|
+
}
|
|
2787
2808
|
alignOverlay() {
|
|
2788
2809
|
if (this.touchUI()) {
|
|
2789
2810
|
this.enableModality(this.overlay());
|
|
@@ -3166,6 +3187,12 @@ class DatePicker extends BaseInput {
|
|
|
3166
3187
|
today: true,
|
|
3167
3188
|
selectable: true
|
|
3168
3189
|
};
|
|
3190
|
+
// selectDate applies the time picker values: set them to now, not to the time of the current value
|
|
3191
|
+
if (this.showTime() || this.timeOnly()) {
|
|
3192
|
+
this.setCurrentHourPM(date.getHours());
|
|
3193
|
+
this.currentMinute.set(date.getMinutes());
|
|
3194
|
+
this.currentSecond.set(this.showSeconds() ? date.getSeconds() : 0);
|
|
3195
|
+
}
|
|
3169
3196
|
this.createMonths(date.getMonth(), date.getFullYear());
|
|
3170
3197
|
this.onDateSelect(event, dateMeta);
|
|
3171
3198
|
this.onTodayClick.emit(date);
|
|
@@ -3405,7 +3432,11 @@ class DatePicker extends BaseInput {
|
|
|
3405
3432
|
@if (iconDisplay() === 'input' && showIcon()) {
|
|
3406
3433
|
<span [class]="cx('inputIconContainer')" [pBind]="ptm('inputIconContainer')" [attr.data-p]="inputIconDataP">
|
|
3407
3434
|
@if (!inputIconTemplate() && !_inputIconTemplate()) {
|
|
3408
|
-
|
|
3435
|
+
@if (icon()) {
|
|
3436
|
+
<span (click)="onButtonClick($event)" [class]="cn(cx('inputIcon'), icon())" [pBind]="ptm('inputIcon')"></span>
|
|
3437
|
+
} @else {
|
|
3438
|
+
<svg data-p-icon="calendar" (click)="onButtonClick($event)" [class]="cx('inputIcon')" [pBind]="ptm('inputIcon')" />
|
|
3439
|
+
}
|
|
3409
3440
|
}
|
|
3410
3441
|
|
|
3411
3442
|
<ng-container *ngTemplateOutlet="inputIconTemplate() || _inputIconTemplate(); context: { clickCallBack: onButtonClick.bind(this) }"></ng-container>
|
|
@@ -3952,7 +3983,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
3952
3983
|
@if (iconDisplay() === 'input' && showIcon()) {
|
|
3953
3984
|
<span [class]="cx('inputIconContainer')" [pBind]="ptm('inputIconContainer')" [attr.data-p]="inputIconDataP">
|
|
3954
3985
|
@if (!inputIconTemplate() && !_inputIconTemplate()) {
|
|
3955
|
-
|
|
3986
|
+
@if (icon()) {
|
|
3987
|
+
<span (click)="onButtonClick($event)" [class]="cn(cx('inputIcon'), icon())" [pBind]="ptm('inputIcon')"></span>
|
|
3988
|
+
} @else {
|
|
3989
|
+
<svg data-p-icon="calendar" (click)="onButtonClick($event)" [class]="cx('inputIcon')" [pBind]="ptm('inputIcon')" />
|
|
3990
|
+
}
|
|
3956
3991
|
}
|
|
3957
3992
|
|
|
3958
3993
|
<ng-container *ngTemplateOutlet="inputIconTemplate() || _inputIconTemplate(); context: { clickCallBack: onButtonClick.bind(this) }"></ng-container>
|