primevue 4.3.7 → 4.3.8
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/datatable/BodyCell.vue +1 -1
- package/datatable/index.mjs +3 -3
- package/datatable/index.mjs.map +1 -1
- package/datepicker/BaseDatePicker.vue +4 -0
- package/datepicker/DatePicker.vue +21 -5
- package/datepicker/index.d.ts +4 -0
- package/datepicker/index.mjs +24 -5
- package/datepicker/index.mjs.map +1 -1
- package/inputnumber/InputNumber.vue +16 -2
- package/inputnumber/index.mjs +11 -1
- package/inputnumber/index.mjs.map +1 -1
- package/package.json +3 -3
- package/select/Select.vue +1 -1
- package/select/index.mjs +1 -1
- 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/umd/primevue.min.js +1 -1
- package/web-types.json +1 -1
|
@@ -311,7 +311,16 @@ export default {
|
|
|
311
311
|
|
|
312
312
|
this.spin(event, dir);
|
|
313
313
|
},
|
|
314
|
-
addWithPrecision(base, increment
|
|
314
|
+
addWithPrecision(base, increment) {
|
|
315
|
+
const baseStr = base.toString();
|
|
316
|
+
const stepStr = increment.toString();
|
|
317
|
+
|
|
318
|
+
const baseDecimalPlaces = baseStr.includes('.') ? baseStr.split('.')[1].length : 0;
|
|
319
|
+
const stepDecimalPlaces = stepStr.includes('.') ? stepStr.split('.')[1].length : 0;
|
|
320
|
+
|
|
321
|
+
const maxDecimalPlaces = Math.max(baseDecimalPlaces, stepDecimalPlaces);
|
|
322
|
+
const precision = Math.pow(10, maxDecimalPlaces);
|
|
323
|
+
|
|
315
324
|
return Math.round((base + increment) * precision) / precision;
|
|
316
325
|
},
|
|
317
326
|
spin(event, dir) {
|
|
@@ -392,6 +401,11 @@ export default {
|
|
|
392
401
|
return;
|
|
393
402
|
}
|
|
394
403
|
|
|
404
|
+
// block composition input
|
|
405
|
+
if (event.isComposing) {
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
|
|
395
409
|
if (event.altKey || event.ctrlKey || event.metaKey) {
|
|
396
410
|
this.isSpecialChar = true;
|
|
397
411
|
this.lastValue = this.$refs.input.$el.value;
|
|
@@ -581,7 +595,7 @@ export default {
|
|
|
581
595
|
if (this.readonly) {
|
|
582
596
|
return;
|
|
583
597
|
}
|
|
584
|
-
|
|
598
|
+
|
|
585
599
|
event.preventDefault();
|
|
586
600
|
let data = (event.clipboardData || window['clipboardData']).getData('Text');
|
|
587
601
|
|
package/inputnumber/index.mjs
CHANGED
|
@@ -386,7 +386,12 @@ var script = {
|
|
|
386
386
|
this.spin(event, dir);
|
|
387
387
|
},
|
|
388
388
|
addWithPrecision: function addWithPrecision(base, increment) {
|
|
389
|
-
var
|
|
389
|
+
var baseStr = base.toString();
|
|
390
|
+
var stepStr = increment.toString();
|
|
391
|
+
var baseDecimalPlaces = baseStr.includes('.') ? baseStr.split('.')[1].length : 0;
|
|
392
|
+
var stepDecimalPlaces = stepStr.includes('.') ? stepStr.split('.')[1].length : 0;
|
|
393
|
+
var maxDecimalPlaces = Math.max(baseDecimalPlaces, stepDecimalPlaces);
|
|
394
|
+
var precision = Math.pow(10, maxDecimalPlaces);
|
|
390
395
|
return Math.round((base + increment) * precision) / precision;
|
|
391
396
|
},
|
|
392
397
|
spin: function spin(event, dir) {
|
|
@@ -463,6 +468,11 @@ var script = {
|
|
|
463
468
|
if (this.readonly) {
|
|
464
469
|
return;
|
|
465
470
|
}
|
|
471
|
+
|
|
472
|
+
// block composition input
|
|
473
|
+
if (event.isComposing) {
|
|
474
|
+
return;
|
|
475
|
+
}
|
|
466
476
|
if (event.altKey || event.ctrlKey || event.metaKey) {
|
|
467
477
|
this.isSpecialChar = true;
|
|
468
478
|
this.lastValue = this.$refs.input.$el.value;
|