primevue 4.3.0 → 4.3.2
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/accordionheader/AccordionHeader.vue +8 -2
- package/accordionheader/index.mjs +8 -1
- package/accordionheader/index.mjs.map +1 -1
- package/autocomplete/AutoComplete.vue +16 -6
- package/autocomplete/index.d.ts +3 -3
- package/autocomplete/index.mjs +17 -4
- package/autocomplete/index.mjs.map +1 -1
- package/avatar/Avatar.vue +13 -4
- package/avatar/index.d.ts +3 -3
- package/avatar/index.mjs +26 -6
- package/avatar/index.mjs.map +1 -1
- package/badge/Badge.vue +13 -2
- package/badge/index.d.ts +1 -1
- package/badge/index.mjs +18 -3
- package/badge/index.mjs.map +1 -1
- package/blockui/BlockUI.vue +15 -4
- package/blockui/index.mjs +13 -4
- package/blockui/index.mjs.map +1 -1
- package/button/Button.vue +30 -3
- package/button/index.d.ts +3 -7
- package/button/index.mjs +28 -9
- package/button/index.mjs.map +1 -1
- package/cascadeselect/index.d.ts +2 -2
- package/checkbox/Checkbox.vue +14 -4
- package/checkbox/index.d.ts +2 -2
- package/checkbox/index.mjs +27 -6
- package/checkbox/index.mjs.map +1 -1
- package/chip/Chip.vue +9 -1
- package/chip/index.mjs +12 -2
- package/chip/index.mjs.map +1 -1
- package/colorpicker/ColorPicker.vue +10 -2
- package/colorpicker/index.d.ts +1 -1
- package/colorpicker/index.mjs +9 -2
- package/colorpicker/index.mjs.map +1 -1
- package/column/index.d.ts +3 -3
- package/columngroup/index.d.ts +2 -2
- package/confirmationoptions/index.d.ts +1 -1
- package/confirmpopup/ConfirmPopup.vue +2 -2
- package/confirmpopup/index.mjs +2 -2
- package/confirmpopup/index.mjs.map +1 -1
- package/datatable/BodyCell.vue +3 -1
- package/datatable/BodyRow.vue +2 -0
- package/datatable/index.d.ts +10 -10
- package/datatable/index.mjs +7 -2
- package/datatable/index.mjs.map +1 -1
- package/dataview/index.d.ts +3 -3
- package/datepicker/DatePicker.vue +1 -3
- package/datepicker/index.d.ts +6 -6
- package/datepicker/index.mjs +21 -24
- package/datepicker/index.mjs.map +1 -1
- package/dialog/Dialog.vue +48 -39
- package/dialog/index.d.ts +26 -1
- package/dialog/index.mjs +73 -50
- package/dialog/index.mjs.map +1 -1
- package/divider/Divider.vue +13 -3
- package/divider/index.d.ts +4 -4
- package/divider/index.mjs +18 -5
- package/divider/index.mjs.map +1 -1
- package/dock/index.d.ts +4 -4
- package/drawer/index.d.ts +2 -2
- package/fieldset/Fieldset.vue +8 -2
- package/fieldset/index.mjs +20 -10
- package/fieldset/index.mjs.map +1 -1
- package/fileupload/index.d.ts +2 -2
- package/floatlabel/index.d.ts +2 -2
- package/galleria/GalleriaItem.vue +8 -9
- package/galleria/index.d.ts +3 -3
- package/galleria/index.mjs +8 -8
- package/galleria/index.mjs.map +1 -1
- package/inputchips/index.d.ts +2 -2
- package/inputmask/InputMask.vue +15 -1
- package/inputmask/index.d.ts +3 -3
- package/inputmask/index.mjs +12 -1
- package/inputmask/index.mjs.map +1 -1
- package/inputnumber/InputNumber.vue +28 -6
- package/inputnumber/index.d.ts +6 -6
- package/inputnumber/index.mjs +43 -19
- package/inputnumber/index.mjs.map +1 -1
- package/inputotp/index.d.ts +3 -3
- package/inputtext/InputText.vue +10 -1
- package/inputtext/index.d.ts +3 -3
- package/inputtext/index.mjs +14 -1
- package/inputtext/index.mjs.map +1 -1
- package/knob/Knob.vue +1 -1
- package/knob/index.mjs +1 -1
- package/knob/index.mjs.map +1 -1
- package/megamenu/index.d.ts +2 -2
- package/message/Message.vue +16 -7
- package/message/index.d.ts +2 -2
- package/message/index.mjs +35 -13
- package/message/index.mjs.map +1 -1
- package/multiselect/MultiSelect.vue +5 -1
- package/multiselect/index.d.ts +3 -3
- package/multiselect/index.mjs +4 -1
- package/multiselect/index.mjs.map +1 -1
- package/organizationchart/index.d.ts +2 -2
- package/overlaybadge/index.d.ts +1 -1
- package/package.json +3 -3
- package/panel/Panel.vue +29 -22
- package/panel/index.d.ts +22 -2
- package/panel/index.mjs +55 -31
- package/panel/index.mjs.map +1 -1
- package/password/index.d.ts +2 -2
- package/popover/Popover.vue +2 -2
- package/popover/index.mjs +2 -2
- package/popover/index.mjs.map +1 -1
- package/progressbar/ProgressBar.vue +11 -4
- package/progressbar/index.mjs +24 -6
- package/progressbar/index.mjs.map +1 -1
- package/radiobutton/RadioButton.vue +13 -3
- package/radiobutton/index.d.ts +3 -3
- package/radiobutton/index.mjs +24 -4
- package/radiobutton/index.mjs.map +1 -1
- package/rating/Rating.vue +19 -2
- package/rating/index.mjs +28 -7
- package/rating/index.mjs.map +1 -1
- package/scrolltop/index.d.ts +2 -2
- package/select/Select.vue +8 -4
- package/select/index.d.ts +2 -2
- package/select/index.mjs +9 -5
- package/select/index.mjs.map +1 -1
- package/selectbutton/SelectButton.vue +26 -9
- package/selectbutton/index.d.ts +2 -2
- package/selectbutton/index.mjs +30 -10
- package/selectbutton/index.mjs.map +1 -1
- package/skeleton/Skeleton.vue +7 -1
- package/skeleton/index.d.ts +3 -3
- package/skeleton/index.mjs +12 -1
- package/skeleton/index.mjs.map +1 -1
- package/slider/Slider.vue +11 -2
- package/slider/index.d.ts +2 -2
- package/slider/index.mjs +27 -8
- package/slider/index.mjs.map +1 -1
- package/speeddial/index.d.ts +5 -5
- package/splitbutton/index.d.ts +1 -1
- package/splitter/index.d.ts +3 -3
- package/stepper/index.d.ts +4 -0
- package/tab/Tab.vue +8 -2
- package/tab/index.mjs +9 -1
- package/tab/index.mjs.map +1 -1
- package/tablist/TabList.vue +10 -2
- package/tablist/index.mjs +20 -8
- package/tablist/index.mjs.map +1 -1
- package/tag/Tag.vue +11 -2
- package/tag/index.mjs +17 -3
- package/tag/index.mjs.map +1 -1
- package/textarea/Textarea.vue +10 -1
- package/textarea/index.d.ts +3 -3
- package/textarea/index.mjs +14 -1
- package/textarea/index.mjs.map +1 -1
- package/timeline/Timeline.vue +16 -7
- package/timeline/index.d.ts +3 -3
- package/timeline/index.mjs +42 -11
- package/timeline/index.mjs.map +1 -1
- package/toast/Toast.vue +10 -1
- package/toast/ToastMessage.vue +29 -19
- package/toast/index.d.ts +2 -2
- package/toast/index.mjs +77 -38
- package/toast/index.mjs.map +1 -1
- package/togglebutton/ToggleButton.vue +10 -1
- package/togglebutton/index.d.ts +3 -3
- package/togglebutton/index.mjs +19 -4
- package/togglebutton/index.mjs.map +1 -1
- package/toggleswitch/ToggleSwitch.vue +11 -3
- package/toggleswitch/index.mjs +20 -5
- package/toggleswitch/index.mjs.map +1 -1
- package/tooltip/index.mjs +0 -6
- package/tooltip/index.mjs.map +1 -1
- package/tree/index.d.ts +3 -3
- package/treeselect/index.d.ts +6 -6
- package/treetable/index.d.ts +7 -7
- package/treetable/style/index.mjs +2 -3
- package/treetable/style/index.mjs.map +1 -1
- package/umd/primevue.min.js +1 -1
- package/virtualscroller/index.d.ts +2 -2
- package/web-types.json +1 -1
package/dataview/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @module dataview
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
import type { DefineComponent, DesignToken, EmitFn, PassThrough } from '@primevue/core';
|
|
10
|
+
import type { DefineComponent, DesignToken, EmitFn, HintedString, PassThrough } from '@primevue/core';
|
|
11
11
|
import type { ComponentHooks } from '@primevue/core/basecomponent';
|
|
12
12
|
import type { PaginatorPassThroughOptionType } from 'primevue/paginator';
|
|
13
13
|
import type { PassThroughOptions } from 'primevue/passthrough';
|
|
@@ -152,7 +152,7 @@ export interface DataViewProps {
|
|
|
152
152
|
* Layout of the items, valid values are 'list' and 'grid'.
|
|
153
153
|
* @defaultValue list
|
|
154
154
|
*/
|
|
155
|
-
layout?: 'list' | 'grid' | undefined;
|
|
155
|
+
layout?: HintedString<'list' | 'grid'> | undefined;
|
|
156
156
|
/**
|
|
157
157
|
* Number of rows to display per page.
|
|
158
158
|
* @defaultValue 0
|
|
@@ -176,7 +176,7 @@ export interface DataViewProps {
|
|
|
176
176
|
* Position of the paginator, options are 'top','bottom' or 'both'.
|
|
177
177
|
* @defaultValue bottom
|
|
178
178
|
*/
|
|
179
|
-
paginatorPosition?: 'top' | 'bottom' | 'both' | undefined;
|
|
179
|
+
paginatorPosition?: HintedString<'top' | 'bottom' | 'both'> | undefined;
|
|
180
180
|
/**
|
|
181
181
|
* Whether to show it even there is only one page.
|
|
182
182
|
* @defaultValue true
|
|
@@ -1271,7 +1271,7 @@ export default {
|
|
|
1271
1271
|
},
|
|
1272
1272
|
formatValue(value) {
|
|
1273
1273
|
if (typeof value === 'string') {
|
|
1274
|
-
return value;
|
|
1274
|
+
return this.dateFormat ? (isNaN(new Date(value)) ? value : this.formatDate(new Date(value), this.dateFormat)) : value;
|
|
1275
1275
|
}
|
|
1276
1276
|
|
|
1277
1277
|
let formattedValue = '';
|
|
@@ -1348,8 +1348,6 @@ export default {
|
|
|
1348
1348
|
if (lookAhead(match)) {
|
|
1349
1349
|
while (num.length < len) {
|
|
1350
1350
|
num = '0' + num;
|
|
1351
|
-
this.selectionStart = this.selectionStart + 1;
|
|
1352
|
-
this.selectionEnd = this.selectionEnd + 1;
|
|
1353
1351
|
}
|
|
1354
1352
|
}
|
|
1355
1353
|
|
package/datepicker/index.d.ts
CHANGED
|
@@ -529,7 +529,7 @@ export interface DatePickerProps {
|
|
|
529
529
|
* Defines the quantity of the selection.
|
|
530
530
|
* @defaultValue single
|
|
531
531
|
*/
|
|
532
|
-
selectionMode?: 'single' | 'multiple' | 'range' | undefined;
|
|
532
|
+
selectionMode?: HintedString<'single' | 'multiple' | 'range'> | undefined;
|
|
533
533
|
/**
|
|
534
534
|
* Format of the date. Defaults to PrimeVue Locale configuration.
|
|
535
535
|
*/
|
|
@@ -558,7 +558,7 @@ export interface DatePickerProps {
|
|
|
558
558
|
* Icon position of the component. This only applies if the showIcon option is set to true.
|
|
559
559
|
* @defaultValue 'button'
|
|
560
560
|
*/
|
|
561
|
-
iconDisplay?: 'button' | 'input' | undefined;
|
|
561
|
+
iconDisplay?: HintedString<'button' | 'input'> | undefined;
|
|
562
562
|
/**
|
|
563
563
|
* Icon of the datepicker button.
|
|
564
564
|
*/
|
|
@@ -597,7 +597,7 @@ export interface DatePickerProps {
|
|
|
597
597
|
* Type of view to display.
|
|
598
598
|
* @defaultValue date
|
|
599
599
|
*/
|
|
600
|
-
view?: 'date' | 'month' | 'year' | undefined;
|
|
600
|
+
view?: HintedString<'date' | 'month' | 'year'> | undefined;
|
|
601
601
|
/**
|
|
602
602
|
* The minimum selectable date.
|
|
603
603
|
*/
|
|
@@ -657,7 +657,7 @@ export interface DatePickerProps {
|
|
|
657
657
|
* Specifies hour format.
|
|
658
658
|
* @defaultValue 24
|
|
659
659
|
*/
|
|
660
|
-
hourFormat?: '12' | '24' | undefined;
|
|
660
|
+
hourFormat?: HintedString<'12' | '24'> | undefined;
|
|
661
661
|
/**
|
|
662
662
|
* Hours to change per step.
|
|
663
663
|
* @defaultValue 1
|
|
@@ -706,7 +706,7 @@ export interface DatePickerProps {
|
|
|
706
706
|
/**
|
|
707
707
|
* Defines the size of the component.
|
|
708
708
|
*/
|
|
709
|
-
size?: 'small' | 'large' | undefined;
|
|
709
|
+
size?: HintedString<'small' | 'large'> | undefined;
|
|
710
710
|
/**
|
|
711
711
|
* When present, it specifies that the component should have invalid state style.
|
|
712
712
|
* @defaultValue false
|
|
@@ -721,7 +721,7 @@ export interface DatePickerProps {
|
|
|
721
721
|
* Specifies the input variant of the component.
|
|
722
722
|
* @defaultValue null
|
|
723
723
|
*/
|
|
724
|
-
variant?: 'outlined' | 'filled' | undefined | null;
|
|
724
|
+
variant?: HintedString<'outlined' | 'filled'> | undefined | null;
|
|
725
725
|
/**
|
|
726
726
|
* When present, it specifies that an input field is read-only.
|
|
727
727
|
* @defaultValue false
|
package/datepicker/index.mjs
CHANGED
|
@@ -978,7 +978,7 @@ var script = {
|
|
|
978
978
|
},
|
|
979
979
|
formatValue: function formatValue(value) {
|
|
980
980
|
if (typeof value === 'string') {
|
|
981
|
-
return value;
|
|
981
|
+
return this.dateFormat ? isNaN(new Date(value)) ? value : this.formatDate(new Date(value), this.dateFormat) : value;
|
|
982
982
|
}
|
|
983
983
|
var formattedValue = '';
|
|
984
984
|
if (value) {
|
|
@@ -1024,7 +1024,6 @@ var script = {
|
|
|
1024
1024
|
return formattedValue;
|
|
1025
1025
|
},
|
|
1026
1026
|
formatDate: function formatDate(date, format) {
|
|
1027
|
-
var _this10 = this;
|
|
1028
1027
|
if (!date) {
|
|
1029
1028
|
return '';
|
|
1030
1029
|
}
|
|
@@ -1041,8 +1040,6 @@ var script = {
|
|
|
1041
1040
|
if (lookAhead(match)) {
|
|
1042
1041
|
while (num.length < len) {
|
|
1043
1042
|
num = '0' + num;
|
|
1044
|
-
_this10.selectionStart = _this10.selectionStart + 1;
|
|
1045
|
-
_this10.selectionEnd = _this10.selectionEnd + 1;
|
|
1046
1043
|
}
|
|
1047
1044
|
}
|
|
1048
1045
|
return num;
|
|
@@ -1165,11 +1162,11 @@ var script = {
|
|
|
1165
1162
|
this.clearTimePickerTimer();
|
|
1166
1163
|
},
|
|
1167
1164
|
repeat: function repeat(event, interval, type, direction) {
|
|
1168
|
-
var
|
|
1165
|
+
var _this10 = this;
|
|
1169
1166
|
var i = interval || 500;
|
|
1170
1167
|
this.clearTimePickerTimer();
|
|
1171
1168
|
this.timePickerTimer = setTimeout(function () {
|
|
1172
|
-
|
|
1169
|
+
_this10.repeat(event, 100, type, direction);
|
|
1173
1170
|
}, i);
|
|
1174
1171
|
switch (type) {
|
|
1175
1172
|
case 0:
|
|
@@ -1299,7 +1296,7 @@ var script = {
|
|
|
1299
1296
|
event.preventDefault();
|
|
1300
1297
|
},
|
|
1301
1298
|
updateModelTime: function updateModelTime() {
|
|
1302
|
-
var
|
|
1299
|
+
var _this11 = this;
|
|
1303
1300
|
this.timePickerChange = true;
|
|
1304
1301
|
var value = this.isComparable() ? this.d_value : this.viewDate;
|
|
1305
1302
|
if (this.isRangeSelection()) {
|
|
@@ -1325,7 +1322,7 @@ var script = {
|
|
|
1325
1322
|
this.updateModel(value);
|
|
1326
1323
|
this.$emit('date-select', value);
|
|
1327
1324
|
setTimeout(function () {
|
|
1328
|
-
return
|
|
1325
|
+
return _this11.timePickerChange = false;
|
|
1329
1326
|
}, 0);
|
|
1330
1327
|
},
|
|
1331
1328
|
toggleAMPM: function toggleAMPM(event) {
|
|
@@ -1387,7 +1384,7 @@ var script = {
|
|
|
1387
1384
|
}
|
|
1388
1385
|
},
|
|
1389
1386
|
isValidSelection: function isValidSelection(value) {
|
|
1390
|
-
var
|
|
1387
|
+
var _this12 = this;
|
|
1391
1388
|
if (value == null) {
|
|
1392
1389
|
return true;
|
|
1393
1390
|
}
|
|
@@ -1397,7 +1394,7 @@ var script = {
|
|
|
1397
1394
|
isValid = false;
|
|
1398
1395
|
}
|
|
1399
1396
|
} else if (value.every(function (v) {
|
|
1400
|
-
return
|
|
1397
|
+
return _this12.isSelectable(v.getDate(), v.getMonth(), v.getFullYear(), false);
|
|
1401
1398
|
})) {
|
|
1402
1399
|
if (this.isRangeSelection()) {
|
|
1403
1400
|
isValid = value.length > 1 && value[1] >= value[0];
|
|
@@ -2441,20 +2438,20 @@ var script = {
|
|
|
2441
2438
|
return this.dateFormat || this.$primevue.config.locale.dateFormat;
|
|
2442
2439
|
},
|
|
2443
2440
|
monthPickerValues: function monthPickerValues() {
|
|
2444
|
-
var
|
|
2441
|
+
var _this13 = this;
|
|
2445
2442
|
var monthPickerValues = [];
|
|
2446
2443
|
var isSelectableMonth = function isSelectableMonth(baseMonth) {
|
|
2447
|
-
if (
|
|
2448
|
-
var minMonth =
|
|
2449
|
-
var minYear =
|
|
2450
|
-
if (
|
|
2444
|
+
if (_this13.minDate) {
|
|
2445
|
+
var minMonth = _this13.minDate.getMonth();
|
|
2446
|
+
var minYear = _this13.minDate.getFullYear();
|
|
2447
|
+
if (_this13.currentYear < minYear || _this13.currentYear === minYear && baseMonth < minMonth) {
|
|
2451
2448
|
return false;
|
|
2452
2449
|
}
|
|
2453
2450
|
}
|
|
2454
|
-
if (
|
|
2455
|
-
var maxMonth =
|
|
2456
|
-
var maxYear =
|
|
2457
|
-
if (
|
|
2451
|
+
if (_this13.maxDate) {
|
|
2452
|
+
var maxMonth = _this13.maxDate.getMonth();
|
|
2453
|
+
var maxYear = _this13.maxDate.getFullYear();
|
|
2454
|
+
if (_this13.currentYear > maxYear || _this13.currentYear === maxYear && baseMonth > maxMonth) {
|
|
2458
2455
|
return false;
|
|
2459
2456
|
}
|
|
2460
2457
|
}
|
|
@@ -2469,15 +2466,15 @@ var script = {
|
|
|
2469
2466
|
return monthPickerValues;
|
|
2470
2467
|
},
|
|
2471
2468
|
yearPickerValues: function yearPickerValues() {
|
|
2472
|
-
var
|
|
2469
|
+
var _this14 = this;
|
|
2473
2470
|
var yearPickerValues = [];
|
|
2474
2471
|
var base = this.currentYear - this.currentYear % 10;
|
|
2475
2472
|
var isSelectableYear = function isSelectableYear(baseYear) {
|
|
2476
|
-
if (
|
|
2477
|
-
if (
|
|
2473
|
+
if (_this14.minDate) {
|
|
2474
|
+
if (_this14.minDate.getFullYear() > baseYear) return false;
|
|
2478
2475
|
}
|
|
2479
|
-
if (
|
|
2480
|
-
if (
|
|
2476
|
+
if (_this14.maxDate) {
|
|
2477
|
+
if (_this14.maxDate.getFullYear() < baseYear) return false;
|
|
2481
2478
|
}
|
|
2482
2479
|
return true;
|
|
2483
2480
|
};
|