2022-09-12 07:13:52 +00:00
|
|
|
const ImageProps = [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'preview',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'false',
|
|
|
|
description: 'Controls the preview functionality.'
|
2023-03-24 13:44:45 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'indicatorIcon',
|
|
|
|
type: 'string',
|
|
|
|
default: 'pi pi-eye',
|
|
|
|
description: 'Custom indicator icon.'
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
const ImageEvents = [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'show',
|
|
|
|
description: 'Triggered when the preview overlay is shown.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'hide',
|
|
|
|
description: 'Triggered when the preview overlay is hidden.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'error',
|
|
|
|
description: 'Triggered when an error occurs while loading an image file.'
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
const ImageSlots = [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'indicator',
|
2023-03-22 13:40:31 +00:00
|
|
|
description: 'Custom content for the preview indicator.'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'refresh',
|
|
|
|
description: 'Custom content for the component refresh.'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'undo',
|
|
|
|
description: 'Custom content for the component undo.'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'zoomout',
|
|
|
|
description: 'Custom content for the component zoomout.'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'zoomin',
|
|
|
|
description: 'Custom content for the component zoomin.'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'close',
|
|
|
|
description: 'Custom content for the component close.'
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
image: {
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'Image',
|
|
|
|
description: 'Displays an image with preview and tranformation options.',
|
2022-09-12 07:13:52 +00:00
|
|
|
props: ImageProps,
|
|
|
|
events: ImageEvents,
|
|
|
|
slots: ImageSlots
|
|
|
|
}
|
|
|
|
};
|