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
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
<span>{{ label }}</span>
|
|
35
35
|
</template>
|
|
36
36
|
<template v-else>
|
|
37
|
-
<span v-for="item of d_value" :key="getLabelByValue(item)" :class="cx('chipItem')" v-bind="ptm('chipItem')">
|
|
37
|
+
<span v-for="(item, idx) of d_value" :key="`chip-${optionValue ? item : getLabelByValue(item)}_${idx}`" :class="cx('chipItem')" v-bind="ptm('chipItem')">
|
|
38
38
|
<slot name="chip" :value="item" :removeCallback="(event) => removeOption(event, item)">
|
|
39
39
|
<!-- TODO: removetokenicon and removeTokenIcon deprecated since v4.0. Use chipicon slot and chipIcon prop-->
|
|
40
40
|
<Chip :class="cx('pcChip')" :label="getLabelByValue(item)" :removeIcon="chipIcon || removeTokenIcon" removable :unstyled="unstyled" @remove="removeOption($event, item)" :pt="ptm('pcChip')">
|
|
@@ -496,10 +496,9 @@ export default {
|
|
|
496
496
|
|
|
497
497
|
let selected = this.isSelected(option);
|
|
498
498
|
let value = null;
|
|
499
|
-
const _value = this.getOptionValue(option) !== '' ? this.getOptionValue(option) : this.getOptionLabel(option);
|
|
500
499
|
|
|
501
|
-
if (selected) value = this.d_value.filter((val) => !equals(val,
|
|
502
|
-
else value = [...(this.d_value || []),
|
|
500
|
+
if (selected) value = this.d_value.filter((val) => !equals(val, this.getOptionValue(option), this.equalityKey));
|
|
501
|
+
else value = [...(this.d_value || []), this.getOptionValue(option)];
|
|
503
502
|
|
|
504
503
|
this.updateModel(event, value);
|
|
505
504
|
index !== -1 && (this.focusedOptionIndex = index);
|
|
@@ -830,7 +829,7 @@ export default {
|
|
|
830
829
|
},
|
|
831
830
|
getLabelByValue(value) {
|
|
832
831
|
const options = this.optionGroupLabel ? this.flatOptions(this.options) : this.options || [];
|
|
833
|
-
const matchedOption = options.find((option) => !this.isOptionGroup(option) && equals(this.getOptionValue(option)
|
|
832
|
+
const matchedOption = options.find((option) => !this.isOptionGroup(option) && equals(this.getOptionValue(option), value, this.equalityKey));
|
|
834
833
|
|
|
835
834
|
return matchedOption ? this.getOptionLabel(matchedOption) : null;
|
|
836
835
|
},
|
|
@@ -878,7 +877,7 @@ export default {
|
|
|
878
877
|
return equals(value1, value2, this.equalityKey);
|
|
879
878
|
},
|
|
880
879
|
isSelected(option) {
|
|
881
|
-
const optionValue = this.getOptionValue(option)
|
|
880
|
+
const optionValue = this.getOptionValue(option);
|
|
882
881
|
|
|
883
882
|
return (this.d_value || []).some((value) => this.isEquals(value, optionValue));
|
|
884
883
|
},
|
|
@@ -1150,7 +1149,7 @@ export default {
|
|
|
1150
1149
|
return isEmpty(this.fluid) ? !!this.$pcFluid : this.fluid;
|
|
1151
1150
|
},
|
|
1152
1151
|
isClearIconVisible() {
|
|
1153
|
-
return this.showClear && this.d_value && this.d_value.length && this.d_value != null && isNotEmpty(this.options);
|
|
1152
|
+
return this.showClear && this.d_value && this.d_value.length && this.d_value != null && isNotEmpty(this.options) && !this.disabled && !this.loading;
|
|
1154
1153
|
},
|
|
1155
1154
|
containerDataP() {
|
|
1156
1155
|
return cn({
|
package/multiselect/index.mjs
CHANGED
|
@@ -449,10 +449,9 @@ var script = {
|
|
|
449
449
|
}
|
|
450
450
|
var selected = this.isSelected(option);
|
|
451
451
|
var value = null;
|
|
452
|
-
var _value = this.getOptionValue(option) !== '' ? this.getOptionValue(option) : this.getOptionLabel(option);
|
|
453
452
|
if (selected) value = this.d_value.filter(function (val) {
|
|
454
|
-
return !equals(val,
|
|
455
|
-
});else value = [].concat(_toConsumableArray(this.d_value || []), [
|
|
453
|
+
return !equals(val, _this4.getOptionValue(option), _this4.equalityKey);
|
|
454
|
+
});else value = [].concat(_toConsumableArray(this.d_value || []), [this.getOptionValue(option)]);
|
|
456
455
|
this.updateModel(event, value);
|
|
457
456
|
index !== -1 && (this.focusedOptionIndex = index);
|
|
458
457
|
isFocus && focus(this.$refs.focusInput);
|
|
@@ -755,7 +754,7 @@ var script = {
|
|
|
755
754
|
var _this9 = this;
|
|
756
755
|
var options = this.optionGroupLabel ? this.flatOptions(this.options) : this.options || [];
|
|
757
756
|
var matchedOption = options.find(function (option) {
|
|
758
|
-
return !_this9.isOptionGroup(option) && equals(_this9.getOptionValue(option)
|
|
757
|
+
return !_this9.isOptionGroup(option) && equals(_this9.getOptionValue(option), value, _this9.equalityKey);
|
|
759
758
|
});
|
|
760
759
|
return matchedOption ? this.getOptionLabel(matchedOption) : null;
|
|
761
760
|
},
|
|
@@ -812,7 +811,7 @@ var script = {
|
|
|
812
811
|
},
|
|
813
812
|
isSelected: function isSelected(option) {
|
|
814
813
|
var _this10 = this;
|
|
815
|
-
var optionValue = this.getOptionValue(option)
|
|
814
|
+
var optionValue = this.getOptionValue(option);
|
|
816
815
|
return (this.d_value || []).some(function (value) {
|
|
817
816
|
return _this10.isEquals(value, optionValue);
|
|
818
817
|
});
|
|
@@ -1117,7 +1116,7 @@ var script = {
|
|
|
1117
1116
|
return isEmpty(this.fluid) ? !!this.$pcFluid : this.fluid;
|
|
1118
1117
|
},
|
|
1119
1118
|
isClearIconVisible: function isClearIconVisible() {
|
|
1120
|
-
return this.showClear && this.d_value && this.d_value.length && this.d_value != null && isNotEmpty(this.options);
|
|
1119
|
+
return this.showClear && this.d_value && this.d_value.length && this.d_value != null && isNotEmpty(this.options) && !this.disabled && !this.loading;
|
|
1121
1120
|
},
|
|
1122
1121
|
containerDataP: function containerDataP() {
|
|
1123
1122
|
return cn(_defineProperty$1({
|
|
@@ -1238,9 +1237,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1238
1237
|
key: 1
|
|
1239
1238
|
}, [$options.chipSelectedItems ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString($options.label), 1)) : (openBlock(true), createElementBlock(Fragment, {
|
|
1240
1239
|
key: 1
|
|
1241
|
-
}, renderList(_ctx.d_value, function (item) {
|
|
1240
|
+
}, renderList(_ctx.d_value, function (item, idx) {
|
|
1242
1241
|
return openBlock(), createElementBlock("span", mergeProps({
|
|
1243
|
-
key: $options.getLabelByValue(item),
|
|
1242
|
+
key: "chip-".concat(_ctx.optionValue ? item : $options.getLabelByValue(item), "_").concat(idx),
|
|
1244
1243
|
"class": _ctx.cx('chipItem')
|
|
1245
1244
|
}, {
|
|
1246
1245
|
ref_for: true
|