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.'
|
2023-04-10 10:35:15 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'zoomInDisabled',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'false',
|
|
|
|
description: 'Disable the zoom-in button'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'zoomOutDisabled',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'false',
|
|
|
|
description: 'Disable the zoom-out button'
|
2023-05-11 12:14:03 +00:00
|
|
|
},
|
2023-05-04 07:45:01 +00:00
|
|
|
{
|
|
|
|
name: 'pt',
|
|
|
|
type: 'any',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Uses to pass attributes to DOM elements inside the component.'
|
2023-07-06 13:20:37 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'unstyled',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'false',
|
|
|
|
description: 'When enabled, it removes component related styles in the core.'
|
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.'
|
2023-04-29 18:43:56 +00:00
|
|
|
},
|
|
|
|
{
|
2023-05-03 17:54:50 +00:00
|
|
|
name: 'image',
|
|
|
|
description: 'Custom content for the component image.'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'preview',
|
2023-04-29 18:43:56 +00:00
|
|
|
description: 'Custom content for the component preview.'
|
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
|
|
|
|
}
|
|
|
|
};
|