primevue 4.3.7 → 4.3.9
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/autocomplete/style/index.mjs +0 -1
- package/autocomplete/style/index.mjs.map +1 -1
- package/cascadeselect/CascadeSelect.vue +1 -1
- package/cascadeselect/index.mjs +1 -1
- package/cascadeselect/index.mjs.map +1 -1
- package/colorpicker/ColorPicker.vue +2 -2
- package/colorpicker/index.mjs +2 -2
- package/colorpicker/index.mjs.map +1 -1
- package/column/index.d.ts +2 -2
- package/datatable/BodyCell.vue +2 -2
- package/datatable/ColumnFilter.vue +1 -1
- package/datatable/DataTable.vue +4 -1
- package/datatable/index.mjs +10 -9
- package/datatable/index.mjs.map +1 -1
- package/datepicker/BaseDatePicker.vue +4 -0
- package/datepicker/DatePicker.vue +22 -6
- package/datepicker/index.d.ts +4 -0
- package/datepicker/index.mjs +29 -10
- package/datepicker/index.mjs.map +1 -1
- package/dialog/Dialog.vue +1 -1
- package/dialog/index.d.ts +5 -0
- package/dialog/index.mjs +2 -1
- package/dialog/index.mjs.map +1 -1
- package/fileupload/FileUpload.vue +2 -2
- package/fileupload/index.mjs +2 -2
- package/fileupload/index.mjs.map +1 -1
- package/inputnumber/InputNumber.vue +19 -2
- package/inputnumber/index.mjs +14 -1
- package/inputnumber/index.mjs.map +1 -1
- package/keyfilter/index.mjs +14 -1
- package/keyfilter/index.mjs.map +1 -1
- package/listbox/Listbox.vue +7 -13
- package/listbox/index.mjs +12 -18
- package/listbox/index.mjs.map +1 -1
- package/multiselect/MultiSelect.vue +6 -7
- package/multiselect/index.mjs +7 -8
- package/multiselect/index.mjs.map +1 -1
- package/package.json +3 -3
- package/select/Select.vue +5 -5
- package/select/index.mjs +6 -6
- package/select/index.mjs.map +1 -1
- package/styleclass/index.d.ts +11 -1
- package/styleclass/index.mjs +62 -15
- package/styleclass/index.mjs.map +1 -1
- package/tab/Tab.vue +0 -1
- package/tab/index.mjs +0 -1
- package/tab/index.mjs.map +1 -1
- package/togglebutton/BaseToggleButton.vue +0 -4
- package/togglebutton/index.d.ts +0 -5
- package/togglebutton/index.mjs +0 -4
- package/togglebutton/index.mjs.map +1 -1
- package/tooltip/index.mjs +5 -1
- package/tooltip/index.mjs.map +1 -1
- package/treeselect/TreeSelect.vue +1 -1
- package/treeselect/index.mjs +1 -1
- package/treeselect/index.mjs.map +1 -1
- package/treetable/TreeTable.vue +15 -1
- package/treetable/index.d.ts +58 -4
- package/treetable/index.mjs +19 -6
- package/treetable/index.mjs.map +1 -1
- package/umd/primevue.min.js +1 -1
- package/vetur-attributes.json +0 -4
- package/vetur-tags.json +0 -1
- package/web-types.json +1 -11
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
:invalid="invalid"
|
|
15
15
|
:variant="variant"
|
|
16
16
|
:fluid="fluid"
|
|
17
|
+
:required="required"
|
|
17
18
|
:unstyled="unstyled"
|
|
18
19
|
autocomplete="off"
|
|
19
20
|
aria-autocomplete="none"
|
|
@@ -612,7 +613,8 @@ export default {
|
|
|
612
613
|
currentView: this.view,
|
|
613
614
|
query: null,
|
|
614
615
|
queryMatches: false,
|
|
615
|
-
queryOrientation: null
|
|
616
|
+
queryOrientation: null,
|
|
617
|
+
focusedDateIndex: 0
|
|
616
618
|
};
|
|
617
619
|
},
|
|
618
620
|
watch: {
|
|
@@ -1261,14 +1263,17 @@ export default {
|
|
|
1261
1263
|
|
|
1262
1264
|
if (!endDate && date.getTime() >= startDate.getTime()) {
|
|
1263
1265
|
endDate = date;
|
|
1266
|
+
this.focusedDateIndex = 1;
|
|
1264
1267
|
} else {
|
|
1265
1268
|
startDate = date;
|
|
1266
1269
|
endDate = null;
|
|
1270
|
+
this.focusedDateIndex = 0;
|
|
1267
1271
|
}
|
|
1268
1272
|
|
|
1269
1273
|
modelVal = [startDate, endDate];
|
|
1270
1274
|
} else {
|
|
1271
1275
|
modelVal = [date, null];
|
|
1276
|
+
this.focusedDateIndex = 0;
|
|
1272
1277
|
}
|
|
1273
1278
|
}
|
|
1274
1279
|
|
|
@@ -1714,7 +1719,7 @@ export default {
|
|
|
1714
1719
|
let value = this.isComparable() ? this.d_value : this.viewDate;
|
|
1715
1720
|
|
|
1716
1721
|
if (this.isRangeSelection()) {
|
|
1717
|
-
value = this.d_value[
|
|
1722
|
+
value = this.d_value[this.focusedDateIndex] || this.d_value[0];
|
|
1718
1723
|
}
|
|
1719
1724
|
|
|
1720
1725
|
if (this.isMultipleSelection()) {
|
|
@@ -1734,8 +1739,13 @@ export default {
|
|
|
1734
1739
|
value.setSeconds(this.currentSecond);
|
|
1735
1740
|
|
|
1736
1741
|
if (this.isRangeSelection()) {
|
|
1737
|
-
if (this.
|
|
1738
|
-
|
|
1742
|
+
if (this.focusedDateIndex === 1 && this.d_value[1]) {
|
|
1743
|
+
value = [this.d_value[0], value];
|
|
1744
|
+
} else if (this.focusedDateIndex === 0) {
|
|
1745
|
+
value = [value, this.d_value[1]];
|
|
1746
|
+
} else {
|
|
1747
|
+
value = [value, null];
|
|
1748
|
+
}
|
|
1739
1749
|
}
|
|
1740
1750
|
|
|
1741
1751
|
if (this.isMultipleSelection()) {
|
|
@@ -1789,7 +1799,13 @@ export default {
|
|
|
1789
1799
|
this.currentYear = viewDate.getFullYear();
|
|
1790
1800
|
|
|
1791
1801
|
if (this.showTime || this.timeOnly) {
|
|
1792
|
-
|
|
1802
|
+
let timeDate = viewDate;
|
|
1803
|
+
|
|
1804
|
+
if (this.isRangeSelection() && this.d_value && this.d_value[this.focusedDateIndex]) {
|
|
1805
|
+
timeDate = this.d_value[this.focusedDateIndex];
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
this.updateCurrentTimeMeta(timeDate);
|
|
1793
1809
|
}
|
|
1794
1810
|
},
|
|
1795
1811
|
isValidSelection(value) {
|
|
@@ -2061,7 +2077,7 @@ export default {
|
|
|
2061
2077
|
day = doy;
|
|
2062
2078
|
|
|
2063
2079
|
do {
|
|
2064
|
-
dim = this.getDaysCountInMonth(
|
|
2080
|
+
dim = this.getDaysCountInMonth(month - 1, year);
|
|
2065
2081
|
|
|
2066
2082
|
if (day <= dim) {
|
|
2067
2083
|
break;
|
package/datepicker/index.d.ts
CHANGED
|
@@ -731,6 +731,10 @@ export interface DatePickerProps {
|
|
|
731
731
|
* Placeholder text for the input.
|
|
732
732
|
*/
|
|
733
733
|
placeholder?: string | undefined;
|
|
734
|
+
/*
|
|
735
|
+
* When present, it specifies that the component is a required field.
|
|
736
|
+
*/
|
|
737
|
+
required?: boolean | undefined;
|
|
734
738
|
/**
|
|
735
739
|
* A valid query selector or an HTMLElement to specify where the overlay gets attached.
|
|
736
740
|
* @defaultValue body
|
package/datepicker/index.mjs
CHANGED
|
@@ -182,6 +182,10 @@ var script$1 = {
|
|
|
182
182
|
type: String,
|
|
183
183
|
"default": null
|
|
184
184
|
},
|
|
185
|
+
required: {
|
|
186
|
+
type: Boolean,
|
|
187
|
+
"default": null
|
|
188
|
+
},
|
|
185
189
|
inputId: {
|
|
186
190
|
type: String,
|
|
187
191
|
"default": null
|
|
@@ -308,7 +312,8 @@ var script = {
|
|
|
308
312
|
currentView: this.view,
|
|
309
313
|
query: null,
|
|
310
314
|
queryMatches: false,
|
|
311
|
-
queryOrientation: null
|
|
315
|
+
queryOrientation: null,
|
|
316
|
+
focusedDateIndex: 0
|
|
312
317
|
};
|
|
313
318
|
},
|
|
314
319
|
watch: {
|
|
@@ -949,13 +954,16 @@ var script = {
|
|
|
949
954
|
var endDate = this.d_value[1];
|
|
950
955
|
if (!endDate && date.getTime() >= startDate.getTime()) {
|
|
951
956
|
endDate = date;
|
|
957
|
+
this.focusedDateIndex = 1;
|
|
952
958
|
} else {
|
|
953
959
|
startDate = date;
|
|
954
960
|
endDate = null;
|
|
961
|
+
this.focusedDateIndex = 0;
|
|
955
962
|
}
|
|
956
963
|
modelVal = [startDate, endDate];
|
|
957
964
|
} else {
|
|
958
965
|
modelVal = [date, null];
|
|
966
|
+
this.focusedDateIndex = 0;
|
|
959
967
|
}
|
|
960
968
|
}
|
|
961
969
|
if (modelVal !== null) {
|
|
@@ -1332,7 +1340,7 @@ var script = {
|
|
|
1332
1340
|
this.timePickerChange = true;
|
|
1333
1341
|
var value = this.isComparable() ? this.d_value : this.viewDate;
|
|
1334
1342
|
if (this.isRangeSelection()) {
|
|
1335
|
-
value = this.d_value[
|
|
1343
|
+
value = this.d_value[this.focusedDateIndex] || this.d_value[0];
|
|
1336
1344
|
}
|
|
1337
1345
|
if (this.isMultipleSelection()) {
|
|
1338
1346
|
value = this.d_value[this.d_value.length - 1];
|
|
@@ -1346,7 +1354,13 @@ var script = {
|
|
|
1346
1354
|
value.setMinutes(this.currentMinute);
|
|
1347
1355
|
value.setSeconds(this.currentSecond);
|
|
1348
1356
|
if (this.isRangeSelection()) {
|
|
1349
|
-
if (this.
|
|
1357
|
+
if (this.focusedDateIndex === 1 && this.d_value[1]) {
|
|
1358
|
+
value = [this.d_value[0], value];
|
|
1359
|
+
} else if (this.focusedDateIndex === 0) {
|
|
1360
|
+
value = [value, this.d_value[1]];
|
|
1361
|
+
} else {
|
|
1362
|
+
value = [value, null];
|
|
1363
|
+
}
|
|
1350
1364
|
}
|
|
1351
1365
|
if (this.isMultipleSelection()) {
|
|
1352
1366
|
value = [].concat(_toConsumableArray(this.d_value.slice(0, -1)), [value]);
|
|
@@ -1412,7 +1426,11 @@ var script = {
|
|
|
1412
1426
|
this.currentMonth = viewDate.getMonth();
|
|
1413
1427
|
this.currentYear = viewDate.getFullYear();
|
|
1414
1428
|
if (this.showTime || this.timeOnly) {
|
|
1415
|
-
|
|
1429
|
+
var timeDate = viewDate;
|
|
1430
|
+
if (this.isRangeSelection() && this.d_value && this.d_value[this.focusedDateIndex]) {
|
|
1431
|
+
timeDate = this.d_value[this.focusedDateIndex];
|
|
1432
|
+
}
|
|
1433
|
+
this.updateCurrentTimeMeta(timeDate);
|
|
1416
1434
|
}
|
|
1417
1435
|
},
|
|
1418
1436
|
isValidSelection: function isValidSelection(value) {
|
|
@@ -1658,7 +1676,7 @@ var script = {
|
|
|
1658
1676
|
month = 1;
|
|
1659
1677
|
day = doy;
|
|
1660
1678
|
do {
|
|
1661
|
-
dim = this.getDaysCountInMonth(
|
|
1679
|
+
dim = this.getDaysCountInMonth(month - 1, year);
|
|
1662
1680
|
if (day <= dim) {
|
|
1663
1681
|
break;
|
|
1664
1682
|
}
|
|
@@ -2767,6 +2785,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2767
2785
|
invalid: _ctx.invalid,
|
|
2768
2786
|
variant: _ctx.variant,
|
|
2769
2787
|
fluid: _ctx.fluid,
|
|
2788
|
+
required: _ctx.required,
|
|
2770
2789
|
unstyled: _ctx.unstyled,
|
|
2771
2790
|
autocomplete: "off",
|
|
2772
2791
|
"aria-autocomplete": "none",
|
|
@@ -2787,7 +2806,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2787
2806
|
"data-p-has-dropdown": _ctx.showIcon && _ctx.iconDisplay === 'button' && !_ctx.inline,
|
|
2788
2807
|
"data-p-has-e-icon": _ctx.showIcon && _ctx.iconDisplay === 'input' && !_ctx.inline,
|
|
2789
2808
|
pt: _ctx.ptm('pcInputText')
|
|
2790
|
-
}, null, 8, ["id", "class", "style", "defaultValue", "placeholder", "name", "size", "invalid", "variant", "fluid", "unstyled", "aria-expanded", "aria-controls", "aria-labelledby", "aria-label", "disabled", "readonly", "onInput", "onClick", "onFocus", "onBlur", "onKeydown", "data-p-has-dropdown", "data-p-has-e-icon", "pt"])) : createCommentVNode("", true), _ctx.showIcon && _ctx.iconDisplay === 'button' && !_ctx.inline ? renderSlot(_ctx.$slots, "dropdownbutton", {
|
|
2809
|
+
}, null, 8, ["id", "class", "style", "defaultValue", "placeholder", "name", "size", "invalid", "variant", "fluid", "required", "unstyled", "aria-expanded", "aria-controls", "aria-labelledby", "aria-label", "disabled", "readonly", "onInput", "onClick", "onFocus", "onBlur", "onKeydown", "data-p-has-dropdown", "data-p-has-e-icon", "pt"])) : createCommentVNode("", true), _ctx.showIcon && _ctx.iconDisplay === 'button' && !_ctx.inline ? renderSlot(_ctx.$slots, "dropdownbutton", {
|
|
2791
2810
|
key: 1,
|
|
2792
2811
|
toggleCallback: $options.onButtonClick
|
|
2793
2812
|
}, function () {
|
|
@@ -2903,8 +2922,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2903
2922
|
}, _ctx.ptm('pcPrevButton')['icon']), null, 16, ["class"]))];
|
|
2904
2923
|
})];
|
|
2905
2924
|
}),
|
|
2906
|
-
_:
|
|
2907
|
-
},
|
|
2925
|
+
_: 3
|
|
2926
|
+
}, 16, ["class", "disabled", "aria-label", "unstyled", "onClick", "onKeydown", "pt"]), [[vShow, groupIndex === 0]])];
|
|
2908
2927
|
}), createElementVNode("div", mergeProps({
|
|
2909
2928
|
"class": _ctx.cx('title')
|
|
2910
2929
|
}, {
|
|
@@ -3018,8 +3037,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3018
3037
|
}, _ctx.ptm('pcNextButton')['icon']), null, 16, ["class"]))];
|
|
3019
3038
|
})];
|
|
3020
3039
|
}),
|
|
3021
|
-
_:
|
|
3022
|
-
},
|
|
3040
|
+
_: 3
|
|
3041
|
+
}, 16, ["class", "disabled", "aria-label", "unstyled", "onClick", "onKeydown", "pt"]), [[vShow, _ctx.numberOfMonths === 1 ? true : groupIndex === _ctx.numberOfMonths - 1]])];
|
|
3023
3042
|
})], 16), $data.currentView === 'date' ? (openBlock(), createElementBlock("table", mergeProps({
|
|
3024
3043
|
key: 0,
|
|
3025
3044
|
"class": _ctx.cx('dayView'),
|