Galleria image d.ts updated
parent
5de42d4ebe
commit
48ade79d27
|
@ -1,10 +1,15 @@
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Galleria is an advanced content gallery component.
|
||||||
|
*
|
||||||
|
* [Live Demo](https://www.primevue.org/galleria/)
|
||||||
|
*
|
||||||
|
* @module galleria
|
||||||
|
*
|
||||||
|
*/
|
||||||
import { ButtonHTMLAttributes, HTMLAttributes, VNode } from 'vue';
|
import { ButtonHTMLAttributes, HTMLAttributes, VNode } from 'vue';
|
||||||
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
||||||
|
|
||||||
type GalleriaThumbnailsPositionType = 'bottom' | 'top' | 'left' | 'right' | undefined;
|
|
||||||
|
|
||||||
type GalleriaIndicatorsPositionType = 'bottom' | 'top' | 'left' | 'right' | undefined;
|
|
||||||
|
|
||||||
export interface GalleriaResponsiveOptions {
|
export interface GalleriaResponsiveOptions {
|
||||||
/**
|
/**
|
||||||
* Breakpoint for responsive mode. Exp; @media screen and (max-width: ${breakpoint}) {...}
|
* Breakpoint for responsive mode. Exp; @media screen and (max-width: ${breakpoint}) {...}
|
||||||
|
@ -16,6 +21,9 @@ export interface GalleriaResponsiveOptions {
|
||||||
numVisible: number;
|
numVisible: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines valid properties in Galleria component.
|
||||||
|
*/
|
||||||
export interface GalleriaProps {
|
export interface GalleriaProps {
|
||||||
/**
|
/**
|
||||||
* Unique identifier of the element.
|
* Unique identifier of the element.
|
||||||
|
@ -27,19 +35,22 @@ export interface GalleriaProps {
|
||||||
value?: any[];
|
value?: any[];
|
||||||
/**
|
/**
|
||||||
* Index of the first item.
|
* Index of the first item.
|
||||||
* Default value is 0.
|
* @defaultValue 0
|
||||||
*/
|
*/
|
||||||
activeIndex?: number | undefined;
|
activeIndex?: number | undefined;
|
||||||
/**
|
/**
|
||||||
* Whether to display the component on fullscreen.
|
* Whether to display the component on fullscreen.
|
||||||
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
fullScreen?: boolean | undefined;
|
fullScreen?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* Specifies the visibility of the mask on fullscreen mode.
|
* Specifies the visibility of the mask on fullscreen mode.
|
||||||
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
visible?: boolean | undefined;
|
visible?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* Number of items per page.
|
* Number of items per page.
|
||||||
|
* @defaultValue 3
|
||||||
*/
|
*/
|
||||||
numVisible?: number | undefined;
|
numVisible?: number | undefined;
|
||||||
/**
|
/**
|
||||||
|
@ -49,67 +60,72 @@ export interface GalleriaProps {
|
||||||
responsiveOptions?: GalleriaResponsiveOptions[];
|
responsiveOptions?: GalleriaResponsiveOptions[];
|
||||||
/**
|
/**
|
||||||
* Whether to display navigation buttons in item section.
|
* Whether to display navigation buttons in item section.
|
||||||
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
showItemNavigators?: boolean | undefined;
|
showItemNavigators?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* Whether to display navigation buttons in thumbnail container.
|
* Whether to display navigation buttons in thumbnail container.
|
||||||
* Default value is true.
|
* @defaultValue true
|
||||||
*/
|
*/
|
||||||
showThumbnailNavigators?: boolean | undefined;
|
showThumbnailNavigators?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* Whether to display navigation buttons on item hover.
|
* Whether to display navigation buttons on item hover.
|
||||||
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
showItemNavigatorsOnHover?: boolean | undefined;
|
showItemNavigatorsOnHover?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* When enabled, item is changed on indicator hover.
|
* When enabled, item is changed on indicator hover.
|
||||||
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
changeItemOnIndicatorHover?: boolean | undefined;
|
changeItemOnIndicatorHover?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* Defines if scrolling would be infinite.
|
* Defines if scrolling would be infinite.
|
||||||
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
circular?: boolean | undefined;
|
circular?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* Items are displayed with a slideshow in autoPlay mode.
|
* Items are displayed with a slideshow in autoPlay mode.
|
||||||
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
autoPlay?: boolean | undefined;
|
autoPlay?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* Time in milliseconds to scroll items.
|
* Time in milliseconds to scroll items.
|
||||||
* Default value is 4000.
|
* @defaultValue 4000
|
||||||
*/
|
*/
|
||||||
transitionInterval?: number | undefined;
|
transitionInterval?: number | undefined;
|
||||||
/**
|
/**
|
||||||
* Whether to display thumbnail container.
|
* Whether to display thumbnail container.
|
||||||
* Default value is true.
|
* @defaultValue true
|
||||||
*/
|
*/
|
||||||
showThumbnails?: boolean | undefined;
|
showThumbnails?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* Position of thumbnails.
|
* Position of thumbnails.
|
||||||
* @see GalleriaThumbnailsPositionType
|
* @defaultValue bottom
|
||||||
* Default value is 'bottom'.
|
|
||||||
*/
|
*/
|
||||||
thumbnailsPosition?: GalleriaThumbnailsPositionType;
|
thumbnailsPosition?: 'bottom' | 'top' | 'left' | 'right' | undefined;
|
||||||
/**
|
/**
|
||||||
* Height of the viewport in vertical thumbnail.
|
* Height of the viewport in vertical thumbnail.
|
||||||
* Default value is '300px'.
|
* @defaultValue 300px
|
||||||
*/
|
*/
|
||||||
verticalThumbnailViewPortHeight?: string | undefined;
|
verticalThumbnailViewPortHeight?: string | undefined;
|
||||||
/**
|
/**
|
||||||
* Whether to display indicator container.
|
* Whether to display indicator container.
|
||||||
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
showIndicators?: boolean | undefined;
|
showIndicators?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* When enabled, indicator container is displayed on item container.
|
* When enabled, indicator container is displayed on item container.
|
||||||
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
showIndicatorsOnItem?: boolean | undefined;
|
showIndicatorsOnItem?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* Position of indicators.
|
* Position of indicators.
|
||||||
* @see GalleriaIndicatorsPositionType
|
* @defaultValue bottom
|
||||||
* Default value is 'bottom'.
|
|
||||||
*/
|
*/
|
||||||
indicatorsPosition?: GalleriaIndicatorsPositionType;
|
indicatorsPosition?: 'bottom' | 'top' | 'left' | 'right' | undefined;
|
||||||
/**
|
/**
|
||||||
* Base zIndex value to use in layering.
|
* Base zIndex value to use in layering.
|
||||||
* Default value is 0.
|
* @defaultValue 0
|
||||||
*/
|
*/
|
||||||
baseZIndex?: number | undefined;
|
baseZIndex?: number | undefined;
|
||||||
/**
|
/**
|
||||||
|
@ -137,71 +153,88 @@ export interface GalleriaProps {
|
||||||
*/
|
*/
|
||||||
nextButtonProps?: ButtonHTMLAttributes | undefined;
|
nextButtonProps?: ButtonHTMLAttributes | undefined;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Defines valid slots in Galleria slots.
|
||||||
|
*/
|
||||||
export interface GalleriaSlots {
|
export interface GalleriaSlots {
|
||||||
/**
|
/**
|
||||||
* Custom header template.
|
* Custom header template.
|
||||||
*/
|
*/
|
||||||
header: () => VNode[];
|
header(): VNode[];
|
||||||
/**
|
/**
|
||||||
* Custom footer template.
|
* Custom footer template.
|
||||||
*/
|
*/
|
||||||
footer: () => VNode[];
|
footer(): VNode[];
|
||||||
/**
|
/**
|
||||||
* Custom item template.
|
* Custom item template.
|
||||||
* @param {Object} scope - item slot's params.
|
* @param {Object} scope - item slot's params.
|
||||||
*/
|
*/
|
||||||
item: (scope: {
|
item(scope: {
|
||||||
/**
|
/**
|
||||||
* Item instance
|
* Item instance
|
||||||
*/
|
*/
|
||||||
item: any;
|
item: any;
|
||||||
}) => VNode[];
|
}): VNode[];
|
||||||
/**
|
/**
|
||||||
* Custom caption template.
|
* Custom caption template.
|
||||||
* @param {Object} scope - caption slot's params.
|
* @param {Object} scope - caption slot's params.
|
||||||
*/
|
*/
|
||||||
caption: (scope: {
|
caption(scope: {
|
||||||
/**
|
/**
|
||||||
* Item instance
|
* Item instance
|
||||||
*/
|
*/
|
||||||
item: any;
|
item: any;
|
||||||
}) => VNode[];
|
}): VNode[];
|
||||||
/**
|
/**
|
||||||
* Custom indicator template.
|
* Custom indicator template.
|
||||||
* @param {Object} scope - indicator slot's params.
|
* @param {Object} scope - indicator slot's params.
|
||||||
*/
|
*/
|
||||||
indicator: (scope: {
|
indicator(scope: {
|
||||||
/**
|
/**
|
||||||
* Index of the indicator item
|
* Index of the indicator item
|
||||||
*/
|
*/
|
||||||
index: number;
|
index: number;
|
||||||
}) => VNode[];
|
}): VNode[];
|
||||||
/**
|
/**
|
||||||
* Custom thumbnail template.
|
* Custom thumbnail template.
|
||||||
* @param {Object} scope - thumbnail slot's params.
|
* @param {Object} scope - thumbnail slot's params.
|
||||||
*/
|
*/
|
||||||
thumbnail: (scope: {
|
thumbnail(scope: {
|
||||||
/**
|
/**
|
||||||
* Item instance
|
* Item instance
|
||||||
*/
|
*/
|
||||||
item: any;
|
item: any;
|
||||||
}) => VNode[];
|
}): VNode[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare type GalleriaEmits = {
|
/**
|
||||||
|
* Defines valid emits in Galleria component.
|
||||||
|
*/
|
||||||
|
export interface GalleriaEmits {
|
||||||
/**
|
/**
|
||||||
* Emitted when the active index changes.
|
* Emitted when the active index changes.
|
||||||
* @param {number} value - Index of new active item.
|
* @param {number} value - Index of new active item.
|
||||||
*/
|
*/
|
||||||
'update:activeIndex': (value: number) => void;
|
'update:activeIndex'(value: number): void;
|
||||||
/**
|
/**
|
||||||
* Emitted when the visible changes.
|
* Emitted when the visible changes.
|
||||||
* @param {boolean} value - New value.
|
* @param {boolean} value - New value.
|
||||||
*/
|
*/
|
||||||
'update:visible': (value: boolean) => void;
|
'update:visible'(value: boolean): void;
|
||||||
};
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **PrimeVue - Galleria**
|
||||||
|
*
|
||||||
|
* _Galleria is an advanced content gallery component._
|
||||||
|
*
|
||||||
|
* [Live Demo](https://www.primevue.org/galleria/)
|
||||||
|
* --- ---
|
||||||
|
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo.svg)
|
||||||
|
*
|
||||||
|
* @group Component
|
||||||
|
*
|
||||||
|
*/
|
||||||
declare class Galleria extends ClassComponent<GalleriaProps, GalleriaSlots, GalleriaEmits> {}
|
declare class Galleria extends ClassComponent<GalleriaProps, GalleriaSlots, GalleriaEmits> {}
|
||||||
|
|
||||||
declare module '@vue/runtime-core' {
|
declare module '@vue/runtime-core' {
|
||||||
|
@ -210,13 +243,4 @@ declare module '@vue/runtime-core' {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* Galleria is an advanced content gallery component.
|
|
||||||
*
|
|
||||||
* Demos:
|
|
||||||
*
|
|
||||||
* - [Galleria](https://www.primefaces.org/primevue/galleria)
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export default Galleria;
|
export default Galleria;
|
||||||
|
|
|
@ -1,9 +1,22 @@
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Displays an image with preview and tranformation options. For multiple image, see Galleria.
|
||||||
|
*
|
||||||
|
* [Live Demo](https://www.primevue.org/image/)
|
||||||
|
*
|
||||||
|
* @module image
|
||||||
|
*
|
||||||
|
*/
|
||||||
import { VNode } from 'vue';
|
import { VNode } from 'vue';
|
||||||
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines valid properties in Image component.
|
||||||
|
*/
|
||||||
export interface ImageProps {
|
export interface ImageProps {
|
||||||
/**
|
/**
|
||||||
* Controls the preview functionality.
|
* Controls the preview functionality.
|
||||||
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
preview?: boolean | undefined;
|
preview?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
|
@ -16,34 +29,49 @@ export interface ImageProps {
|
||||||
imageClass?: any;
|
imageClass?: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines valid slots in Image slots.
|
||||||
|
*/
|
||||||
export interface ImageSlots {
|
export interface ImageSlots {
|
||||||
/**
|
/**
|
||||||
* Custom indicator template.
|
* Custom indicator template.
|
||||||
*/
|
*/
|
||||||
indicator: () => VNode[];
|
indicator(): VNode[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare type ImageEmits = {};
|
export interface ImageEmits {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **PrimeVue - Image**
|
||||||
|
*
|
||||||
|
* _Displays an image with preview and tranformation options. For multiple image, see Galleria._
|
||||||
|
*
|
||||||
|
* [Live Demo](https://www.primevue.org/image/)
|
||||||
|
* --- ---
|
||||||
|
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo.svg)
|
||||||
|
*
|
||||||
|
* @group Component
|
||||||
|
*
|
||||||
|
*/
|
||||||
declare class Image extends ClassComponent<ImageProps, ImageSlots, ImageEmits> {
|
declare class Image extends ClassComponent<ImageProps, ImageSlots, ImageEmits> {
|
||||||
/**
|
/**
|
||||||
* Triggered when the preview overlay is shown.
|
* Triggered when the preview overlay is shown.
|
||||||
*
|
*
|
||||||
* @memberof Image
|
* @memberof Image
|
||||||
*/
|
*/
|
||||||
show: () => void;
|
show(): void;
|
||||||
/**
|
/**
|
||||||
* Triggered when the preview overlay is hidden.
|
* Triggered when the preview overlay is hidden.
|
||||||
*
|
*
|
||||||
* @memberof Image
|
* @memberof Image
|
||||||
*/
|
*/
|
||||||
hide: () => void;
|
hide(): void;
|
||||||
/**
|
/**
|
||||||
* Triggered when an error occurs while loading an image file.
|
* Triggered when an error occurs while loading an image file.
|
||||||
*
|
*
|
||||||
* @memberof Image
|
* @memberof Image
|
||||||
*/
|
*/
|
||||||
error: () => void;
|
error(): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module '@vue/runtime-core' {
|
declare module '@vue/runtime-core' {
|
||||||
|
|
Loading…
Reference in New Issue