2023-06-02 15:43:30 +00:00
|
|
|
<script>
|
|
|
|
import BaseComponent from 'primevue/basecomponent';
|
2023-10-02 10:46:09 +00:00
|
|
|
import PickListStyle from 'primevue/picklist/style';
|
2023-06-02 15:43:30 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'BasePickList',
|
|
|
|
extends: BaseComponent,
|
|
|
|
props: {
|
|
|
|
modelValue: {
|
|
|
|
type: Array,
|
|
|
|
default: () => [[], []]
|
|
|
|
},
|
|
|
|
selection: {
|
|
|
|
type: Array,
|
|
|
|
default: () => [[], []]
|
|
|
|
},
|
|
|
|
dataKey: {
|
|
|
|
type: String,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
listStyle: {
|
|
|
|
type: null,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
metaKeySelection: {
|
|
|
|
type: Boolean,
|
2023-12-20 10:28:13 +00:00
|
|
|
default: false
|
2023-06-02 15:43:30 +00:00
|
|
|
},
|
2024-01-17 14:09:34 +00:00
|
|
|
autoOptionFocus: {
|
|
|
|
type: Boolean,
|
2024-01-24 07:02:00 +00:00
|
|
|
default: true
|
|
|
|
},
|
|
|
|
focusOnHover: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
2024-01-17 14:09:34 +00:00
|
|
|
},
|
2023-06-02 15:43:30 +00:00
|
|
|
responsive: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
|
|
|
},
|
|
|
|
breakpoint: {
|
|
|
|
type: String,
|
|
|
|
default: '960px'
|
|
|
|
},
|
2024-05-27 06:39:11 +00:00
|
|
|
striped: {
|
2023-06-02 15:43:30 +00:00
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
2024-03-26 14:21:39 +00:00
|
|
|
scrollHeight: {
|
|
|
|
type: String,
|
|
|
|
default: '14rem'
|
|
|
|
},
|
2023-06-02 15:43:30 +00:00
|
|
|
showSourceControls: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
|
|
|
},
|
|
|
|
showTargetControls: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
|
|
|
},
|
2024-03-25 13:02:23 +00:00
|
|
|
buttonProps: {
|
|
|
|
type: Object,
|
|
|
|
default() {
|
|
|
|
return { severity: 'secondary' };
|
|
|
|
}
|
|
|
|
},
|
|
|
|
moveUpButtonProps: {
|
|
|
|
type: null,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
moveTopButtonProps: {
|
|
|
|
type: null,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
moveDownButtonProps: {
|
|
|
|
type: null,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
moveBottomButtonProps: {
|
|
|
|
type: null,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
moveToTargetProps: {
|
|
|
|
type: null,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
moveAllToTargetProps: {
|
|
|
|
type: null,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
moveToSourceProps: {
|
|
|
|
type: null,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
moveAllToSourceProps: {
|
|
|
|
type: null,
|
|
|
|
default: null
|
2023-06-02 15:43:30 +00:00
|
|
|
},
|
|
|
|
tabindex: {
|
|
|
|
type: Number,
|
|
|
|
default: 0
|
2024-03-21 13:52:26 +00:00
|
|
|
},
|
|
|
|
disabled: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
2023-06-02 15:43:30 +00:00
|
|
|
}
|
|
|
|
},
|
2023-10-02 10:46:09 +00:00
|
|
|
style: PickListStyle,
|
2023-06-02 15:43:30 +00:00
|
|
|
provide() {
|
|
|
|
return {
|
2024-04-25 01:26:06 +00:00
|
|
|
$pcPickList: this,
|
2023-06-02 15:43:30 +00:00
|
|
|
$parentInstance: this
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|