primevue 4.3.8 → 4.4.0
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/AutoComplete.vue +18 -3
- package/autocomplete/BaseAutoComplete.vue +4 -0
- package/autocomplete/index.d.ts +20 -0
- package/autocomplete/index.mjs +34 -7
- package/autocomplete/index.mjs.map +1 -1
- package/autocomplete/style/index.d.ts +4 -0
- package/autocomplete/style/index.mjs +3 -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/checkbox/Checkbox.vue +15 -2
- package/checkbox/index.mjs +14 -2
- package/checkbox/index.mjs.map +1 -1
- package/colorpicker/ColorPicker.vue +5 -6
- package/colorpicker/index.mjs +5 -5
- package/colorpicker/index.mjs.map +1 -1
- package/column/index.d.ts +2 -2
- package/confirmdialog/ConfirmDialog.vue +1 -1
- package/confirmdialog/index.d.ts +5 -0
- package/confirmdialog/index.mjs +3 -2
- package/confirmdialog/index.mjs.map +1 -1
- package/datatable/BodyCell.vue +1 -1
- package/datatable/ColumnFilter.vue +1 -1
- package/datatable/DataTable.vue +6 -3
- package/datatable/HeaderCheckbox.vue +3 -3
- package/datatable/index.mjs +19 -9
- package/datatable/index.mjs.map +1 -1
- package/datepicker/BaseDatePicker.vue +8 -0
- package/datepicker/DatePicker.vue +200 -82
- package/datepicker/index.d.ts +25 -0
- package/datepicker/index.mjs +263 -155
- package/datepicker/index.mjs.map +1 -1
- package/datepicker/style/index.d.ts +4 -0
- package/datepicker/style/index.mjs +5 -2
- package/datepicker/style/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/drawer/BaseDrawer.vue +4 -0
- package/drawer/Drawer.vue +4 -4
- package/drawer/index.d.ts +5 -0
- package/drawer/index.mjs +8 -4
- package/drawer/index.mjs.map +1 -1
- package/editor/Editor.vue +5 -1
- package/editor/index.mjs +5 -0
- package/editor/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/image/index.d.ts +5 -11
- package/inputmask/InputMask.vue +1 -2
- package/inputmask/index.mjs +1 -1
- package/inputmask/index.mjs.map +1 -1
- package/inputnumber/BaseInputNumber.vue +4 -0
- package/inputnumber/InputNumber.vue +33 -5
- package/inputnumber/index.d.ts +20 -0
- package/inputnumber/index.mjs +48 -7
- package/inputnumber/index.mjs.map +1 -1
- package/inputnumber/style/index.mjs +1 -0
- package/inputnumber/style/index.mjs.map +1 -1
- package/inputotp/InputOtp.vue +7 -3
- package/inputotp/index.mjs +6 -3
- package/inputotp/index.mjs.map +1 -1
- package/keyfilter/index.mjs +14 -1
- package/keyfilter/index.mjs.map +1 -1
- package/listbox/Listbox.vue +8 -14
- package/listbox/index.mjs +13 -19
- package/listbox/index.mjs.map +1 -1
- package/multiselect/MultiSelect.vue +15 -12
- package/multiselect/index.mjs +21 -18
- package/multiselect/index.mjs.map +1 -1
- package/package.json +5 -5
- package/panel/Panel.vue +1 -1
- package/panel/index.d.ts +4 -0
- package/panel/index.mjs +2 -1
- package/panel/index.mjs.map +1 -1
- package/password/BasePassword.vue +4 -0
- package/password/Password.vue +12 -1
- package/password/index.d.ts +20 -0
- package/password/index.mjs +23 -1
- package/password/index.mjs.map +1 -1
- package/password/style/index.d.ts +4 -0
- package/password/style/index.mjs +1 -0
- package/password/style/index.mjs.map +1 -1
- package/select/Select.vue +5 -4
- package/select/index.mjs +6 -5
- package/select/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/tree/BaseTree.vue +16 -0
- package/tree/Tree.vue +179 -4
- package/tree/TreeNode.vue +225 -3
- package/tree/index.d.ts +65 -0
- package/tree/index.mjs +499 -22
- package/tree/index.mjs.map +1 -1
- package/tree/style/index.mjs +9 -4
- package/tree/style/index.mjs.map +1 -1
- package/treenode/index.d.ts +12 -0
- package/treeselect/TreeSelect.vue +2 -2
- package/treeselect/index.mjs +2 -2
- 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')">
|
|
@@ -331,8 +331,9 @@ export default {
|
|
|
331
331
|
return this.optionDisabled ? resolveFieldData(option, this.optionDisabled) : false;
|
|
332
332
|
},
|
|
333
333
|
isOptionGroup(option) {
|
|
334
|
-
return this.optionGroupLabel && option.optionGroup && option.group;
|
|
334
|
+
return !!(this.optionGroupLabel && option.optionGroup && option.group);
|
|
335
335
|
},
|
|
336
|
+
|
|
336
337
|
getOptionGroupLabel(optionGroup) {
|
|
337
338
|
return resolveFieldData(optionGroup, this.optionGroupLabel);
|
|
338
339
|
},
|
|
@@ -496,10 +497,9 @@ export default {
|
|
|
496
497
|
|
|
497
498
|
let selected = this.isSelected(option);
|
|
498
499
|
let value = null;
|
|
499
|
-
const _value = this.getOptionValue(option) !== '' ? this.getOptionValue(option) : this.getOptionLabel(option);
|
|
500
500
|
|
|
501
|
-
if (selected) value = this.d_value.filter((val) => !equals(val,
|
|
502
|
-
else value = [...(this.d_value || []),
|
|
501
|
+
if (selected) value = this.d_value.filter((val) => !equals(val, this.getOptionValue(option), this.equalityKey));
|
|
502
|
+
else value = [...(this.d_value || []), this.getOptionValue(option)];
|
|
503
503
|
|
|
504
504
|
this.updateModel(event, value);
|
|
505
505
|
index !== -1 && (this.focusedOptionIndex = index);
|
|
@@ -830,9 +830,9 @@ export default {
|
|
|
830
830
|
},
|
|
831
831
|
getLabelByValue(value) {
|
|
832
832
|
const options = this.optionGroupLabel ? this.flatOptions(this.options) : this.options || [];
|
|
833
|
-
const matchedOption = options.find((option) => !this.isOptionGroup(option) && equals(this.getOptionValue(option)
|
|
833
|
+
const matchedOption = options.find((option) => !this.isOptionGroup(option) && equals(this.getOptionValue(option), value, this.equalityKey));
|
|
834
834
|
|
|
835
|
-
return
|
|
835
|
+
return this.getOptionLabel(matchedOption);
|
|
836
836
|
},
|
|
837
837
|
getSelectedItemsLabel() {
|
|
838
838
|
let pattern = /{(.*?)}/;
|
|
@@ -878,7 +878,7 @@ export default {
|
|
|
878
878
|
return equals(value1, value2, this.equalityKey);
|
|
879
879
|
},
|
|
880
880
|
isSelected(option) {
|
|
881
|
-
const optionValue = this.getOptionValue(option)
|
|
881
|
+
const optionValue = this.getOptionValue(option);
|
|
882
882
|
|
|
883
883
|
return (this.d_value || []).some((value) => this.isEquals(value, optionValue));
|
|
884
884
|
},
|
|
@@ -1021,11 +1021,14 @@ export default {
|
|
|
1021
1021
|
},
|
|
1022
1022
|
flatOptions(options) {
|
|
1023
1023
|
return (options || []).reduce((result, option, index) => {
|
|
1024
|
-
result.push({ optionGroup: option, group: true, index });
|
|
1025
|
-
|
|
1026
1024
|
const optionGroupChildren = this.getOptionGroupChildren(option);
|
|
1027
1025
|
|
|
1028
|
-
optionGroupChildren &&
|
|
1026
|
+
if (optionGroupChildren && Array.isArray(optionGroupChildren)) {
|
|
1027
|
+
result.push({ optionGroup: option, group: true, index });
|
|
1028
|
+
optionGroupChildren.forEach((o) => result.push(o));
|
|
1029
|
+
} else {
|
|
1030
|
+
result.push(option);
|
|
1031
|
+
}
|
|
1029
1032
|
|
|
1030
1033
|
return result;
|
|
1031
1034
|
}, []);
|
|
@@ -1150,7 +1153,7 @@ export default {
|
|
|
1150
1153
|
return isEmpty(this.fluid) ? !!this.$pcFluid : this.fluid;
|
|
1151
1154
|
},
|
|
1152
1155
|
isClearIconVisible() {
|
|
1153
|
-
return this.showClear && this.d_value && this.d_value.length && this.d_value != null && isNotEmpty(this.options);
|
|
1156
|
+
return this.showClear && this.d_value && this.d_value.length && this.d_value != null && isNotEmpty(this.options) && !this.disabled && !this.loading;
|
|
1154
1157
|
},
|
|
1155
1158
|
containerDataP() {
|
|
1156
1159
|
return cn({
|
package/multiselect/index.mjs
CHANGED
|
@@ -300,7 +300,7 @@ var script = {
|
|
|
300
300
|
return this.optionDisabled ? resolveFieldData(option, this.optionDisabled) : false;
|
|
301
301
|
},
|
|
302
302
|
isOptionGroup: function isOptionGroup(option) {
|
|
303
|
-
return this.optionGroupLabel && option.optionGroup && option.group;
|
|
303
|
+
return !!(this.optionGroupLabel && option.optionGroup && option.group);
|
|
304
304
|
},
|
|
305
305
|
getOptionGroupLabel: function getOptionGroupLabel(optionGroup) {
|
|
306
306
|
return resolveFieldData(optionGroup, this.optionGroupLabel);
|
|
@@ -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,9 +754,9 @@ 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
|
-
return
|
|
759
|
+
return this.getOptionLabel(matchedOption);
|
|
761
760
|
},
|
|
762
761
|
getSelectedItemsLabel: function getSelectedItemsLabel() {
|
|
763
762
|
var pattern = /{(.*?)}/;
|
|
@@ -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
|
});
|
|
@@ -987,15 +986,19 @@ var script = {
|
|
|
987
986
|
flatOptions: function flatOptions(options) {
|
|
988
987
|
var _this22 = this;
|
|
989
988
|
return (options || []).reduce(function (result, option, index) {
|
|
990
|
-
result.push({
|
|
991
|
-
optionGroup: option,
|
|
992
|
-
group: true,
|
|
993
|
-
index: index
|
|
994
|
-
});
|
|
995
989
|
var optionGroupChildren = _this22.getOptionGroupChildren(option);
|
|
996
|
-
optionGroupChildren &&
|
|
997
|
-
|
|
998
|
-
|
|
990
|
+
if (optionGroupChildren && Array.isArray(optionGroupChildren)) {
|
|
991
|
+
result.push({
|
|
992
|
+
optionGroup: option,
|
|
993
|
+
group: true,
|
|
994
|
+
index: index
|
|
995
|
+
});
|
|
996
|
+
optionGroupChildren.forEach(function (o) {
|
|
997
|
+
return result.push(o);
|
|
998
|
+
});
|
|
999
|
+
} else {
|
|
1000
|
+
result.push(option);
|
|
1001
|
+
}
|
|
999
1002
|
return result;
|
|
1000
1003
|
}, []);
|
|
1001
1004
|
},
|
|
@@ -1117,7 +1120,7 @@ var script = {
|
|
|
1117
1120
|
return isEmpty(this.fluid) ? !!this.$pcFluid : this.fluid;
|
|
1118
1121
|
},
|
|
1119
1122
|
isClearIconVisible: function isClearIconVisible() {
|
|
1120
|
-
return this.showClear && this.d_value && this.d_value.length && this.d_value != null && isNotEmpty(this.options);
|
|
1123
|
+
return this.showClear && this.d_value && this.d_value.length && this.d_value != null && isNotEmpty(this.options) && !this.disabled && !this.loading;
|
|
1121
1124
|
},
|
|
1122
1125
|
containerDataP: function containerDataP() {
|
|
1123
1126
|
return cn(_defineProperty$1({
|
|
@@ -1238,9 +1241,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1238
1241
|
key: 1
|
|
1239
1242
|
}, [$options.chipSelectedItems ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString($options.label), 1)) : (openBlock(true), createElementBlock(Fragment, {
|
|
1240
1243
|
key: 1
|
|
1241
|
-
}, renderList(_ctx.d_value, function (item) {
|
|
1244
|
+
}, renderList(_ctx.d_value, function (item, idx) {
|
|
1242
1245
|
return openBlock(), createElementBlock("span", mergeProps({
|
|
1243
|
-
key: $options.getLabelByValue(item),
|
|
1246
|
+
key: "chip-".concat(_ctx.optionValue ? item : $options.getLabelByValue(item), "_").concat(idx),
|
|
1244
1247
|
"class": _ctx.cx('chipItem')
|
|
1245
1248
|
}, {
|
|
1246
1249
|
ref_for: true
|