2023-05-29 10:59:47 +00:00
|
|
|
<script>
|
|
|
|
import BaseComponent from 'primevue/basecomponent';
|
2023-10-02 10:46:09 +00:00
|
|
|
import DialogStyle from 'primevue/dialog/style';
|
2023-05-29 10:59:47 +00:00
|
|
|
|
|
|
|
export default {
|
2023-05-29 12:12:26 +00:00
|
|
|
name: 'BaseDialog',
|
2023-05-29 10:59:47 +00:00
|
|
|
extends: BaseComponent,
|
|
|
|
props: {
|
|
|
|
header: {
|
|
|
|
type: null,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
footer: {
|
|
|
|
type: null,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
visible: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
modal: {
|
|
|
|
type: Boolean,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
contentStyle: {
|
|
|
|
type: null,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
contentClass: {
|
|
|
|
type: String,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
contentProps: {
|
|
|
|
type: null,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
rtl: {
|
|
|
|
type: Boolean,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
maximizable: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
dismissableMask: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
closable: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
|
|
|
},
|
|
|
|
closeOnEscape: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
|
|
|
},
|
|
|
|
showHeader: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
|
|
|
},
|
2023-09-18 09:14:52 +00:00
|
|
|
blockScroll: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
2023-05-29 10:59:47 +00:00
|
|
|
baseZIndex: {
|
|
|
|
type: Number,
|
|
|
|
default: 0
|
|
|
|
},
|
|
|
|
autoZIndex: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
|
|
|
},
|
|
|
|
position: {
|
|
|
|
type: String,
|
|
|
|
default: 'center'
|
|
|
|
},
|
|
|
|
breakpoints: {
|
|
|
|
type: Object,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
draggable: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
|
|
|
},
|
|
|
|
keepInViewport: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
|
|
|
},
|
|
|
|
minX: {
|
|
|
|
type: Number,
|
|
|
|
default: 0
|
|
|
|
},
|
|
|
|
minY: {
|
|
|
|
type: Number,
|
|
|
|
default: 0
|
|
|
|
},
|
|
|
|
appendTo: {
|
2024-01-08 09:33:05 +00:00
|
|
|
type: [String, Object],
|
2023-05-29 10:59:47 +00:00
|
|
|
default: 'body'
|
|
|
|
},
|
|
|
|
closeIcon: {
|
|
|
|
type: String,
|
|
|
|
default: undefined
|
|
|
|
},
|
|
|
|
maximizeIcon: {
|
|
|
|
type: String,
|
|
|
|
default: undefined
|
|
|
|
},
|
|
|
|
minimizeIcon: {
|
|
|
|
type: String,
|
|
|
|
default: undefined
|
|
|
|
},
|
|
|
|
closeButtonProps: {
|
2024-04-15 08:08:42 +00:00
|
|
|
type: Object,
|
|
|
|
default: () => {
|
|
|
|
return {
|
|
|
|
severity: 'secondary',
|
|
|
|
text: true,
|
|
|
|
rounded: true
|
|
|
|
};
|
|
|
|
}
|
|
|
|
},
|
|
|
|
maximizeButtonProps: {
|
|
|
|
type: Object,
|
|
|
|
default: () => {
|
|
|
|
return {
|
|
|
|
severity: 'secondary',
|
|
|
|
text: true,
|
|
|
|
rounded: true
|
|
|
|
};
|
|
|
|
}
|
2023-05-29 10:59:47 +00:00
|
|
|
},
|
|
|
|
_instance: null
|
|
|
|
},
|
2023-10-02 10:46:09 +00:00
|
|
|
style: DialogStyle,
|
2023-05-30 12:28:04 +00:00
|
|
|
provide() {
|
|
|
|
return {
|
|
|
|
$parentInstance: this
|
|
|
|
};
|
2023-05-29 10:59:47 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|