diff --git a/core/src/components.d.ts b/core/src/components.d.ts index e2fd69dd29..ace6c43037 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -5,7 +5,7 @@ * It contains typing information for all components that exist in this project. */ import { HTMLStencilElement, JSXBase } from "@stencil/core/internal"; -import { AccordionGroupChangeEventDetail, ActionSheetAttributes, ActionSheetButton, AlertButton, AlertInput, AnimationBuilder, AutocompleteTypes, BreadcrumbCollapsedClickEventDetail, CheckboxChangeEventDetail, Color, ComponentProps, ComponentRef, DatetimeChangeEventDetail, DatetimePresentation, DomRenderFn, FooterHeightFn, FrameworkDelegate, HeaderFn, HeaderHeightFn, InputChangeEventDetail, ItemHeightFn, ItemRenderFn, ItemReorderEventDetail, LoadingAttributes, MenuChangeEventDetail, ModalAttributes, ModalBreakpointChangeEventDetail, ModalHandleBehavior, NavComponent, NavComponentWithProps, NavOptions, OverlayEventDetail, PickerAttributes, PickerButton, PickerColumn, PopoverAttributes, PopoverSize, PositionAlign, PositionReference, PositionSide, RadioGroupChangeEventDetail, RangeChangeEventDetail, RangeKnobMoveEndEventDetail, RangeKnobMoveStartEventDetail, RangeValue, RefresherEventDetail, RouteID, RouterDirection, RouterEventDetail, RouterOutletOptions, RouteWrite, ScrollBaseDetail, ScrollDetail, SearchbarChangeEventDetail, SegmentButtonLayout, SegmentChangeEventDetail, SelectChangeEventDetail, SelectInterface, SelectPopoverOption, Side, SpinnerTypes, StyleEventDetail, SwipeGestureHandler, TabBarChangedEventDetail, TabButtonClickEventDetail, TabButtonLayout, TextareaChangeEventDetail, TextFieldTypes, ToastButton, ToggleChangeEventDetail, TransitionDoneFn, TransitionInstruction, TriggerAction, ViewController } from "./interface"; +import { AccordionGroupChangeEventDetail, ActionSheetAttributes, ActionSheetButton, AlertButton, AlertInput, AnimationBuilder, AutocompleteTypes, BreadcrumbCollapsedClickEventDetail, CheckboxChangeEventDetail, Color, ComponentProps, ComponentRef, DatetimeChangeEventDetail, DatetimePresentation, FrameworkDelegate, InputChangeEventDetail, ItemReorderEventDetail, LoadingAttributes, MenuChangeEventDetail, ModalAttributes, ModalBreakpointChangeEventDetail, ModalHandleBehavior, NavComponent, NavComponentWithProps, NavOptions, OverlayEventDetail, PickerAttributes, PickerButton, PickerColumn, PopoverAttributes, PopoverSize, PositionAlign, PositionReference, PositionSide, RadioGroupChangeEventDetail, RangeChangeEventDetail, RangeKnobMoveEndEventDetail, RangeKnobMoveStartEventDetail, RangeValue, RefresherEventDetail, RouteID, RouterDirection, RouterEventDetail, RouterOutletOptions, RouteWrite, ScrollBaseDetail, ScrollDetail, SearchbarChangeEventDetail, SegmentButtonLayout, SegmentChangeEventDetail, SelectChangeEventDetail, SelectInterface, SelectPopoverOption, Side, SpinnerTypes, StyleEventDetail, SwipeGestureHandler, TabBarChangedEventDetail, TabButtonClickEventDetail, TabButtonLayout, TextareaChangeEventDetail, TextFieldTypes, ToastButton, ToggleChangeEventDetail, TransitionDoneFn, TransitionInstruction, TriggerAction, ViewController } from "./interface"; import { IonicSafeString } from "./utils/sanitization"; import { AlertAttributes } from "./components/alert/alert-interface"; import { CounterFormatter } from "./components/item/item-interface"; @@ -2569,101 +2569,6 @@ export namespace Components { */ "animated": boolean; } - interface IonSlide { - } - interface IonSlides { - /** - * Get the index of the active slide. - */ - "getActiveIndex": () => Promise; - /** - * Get the index of the previous slide. - */ - "getPreviousIndex": () => Promise; - /** - * Get the Swiper instance. Use this to access the full Swiper API. See https://swiperjs.com/swiper-api for all API options. - */ - "getSwiper": () => Promise; - /** - * Get whether or not the current slide is the first slide. - */ - "isBeginning": () => Promise; - /** - * Get whether or not the current slide is the last slide. - */ - "isEnd": () => Promise; - /** - * Get the total number of slides. - */ - "length": () => Promise; - /** - * Lock or unlock the ability to slide to the next slide. - * @param lock If `true`, disable swiping to the next slide. - */ - "lockSwipeToNext": (lock: boolean) => Promise; - /** - * Lock or unlock the ability to slide to the previous slide. - * @param lock If `true`, disable swiping to the previous slide. - */ - "lockSwipeToPrev": (lock: boolean) => Promise; - /** - * Lock or unlock the ability to slide to the next or previous slide. - * @param lock If `true`, disable swiping to the next and previous slide. - */ - "lockSwipes": (lock: boolean) => Promise; - /** - * The mode determines which platform styles to use. - */ - "mode"?: "ios" | "md"; - /** - * Options to pass to the swiper instance. See https://swiperjs.com/swiper-api for valid options - */ - "options": any; - /** - * If `true`, show the pagination. - */ - "pager": boolean; - /** - * If `true`, show the scrollbar. - */ - "scrollbar": boolean; - /** - * Transition to the next slide. - * @param speed The transition duration (in ms). - * @param runCallbacks If true, the transition will produce [Transition/SlideChange][Start/End] transition events. - */ - "slideNext": (speed?: number | undefined, runCallbacks?: boolean | undefined) => Promise; - /** - * Transition to the previous slide. - * @param speed The transition duration (in ms). - * @param runCallbacks If true, the transition will produce the [Transition/SlideChange][Start/End] transition events. - */ - "slidePrev": (speed?: number | undefined, runCallbacks?: boolean | undefined) => Promise; - /** - * Transition to the specified slide. - * @param index The index of the slide to transition to. - * @param speed The transition duration (in ms). - * @param runCallbacks If true, the transition will produce [Transition/SlideChange][Start/End] transition events. - */ - "slideTo": (index: number, speed?: number | undefined, runCallbacks?: boolean | undefined) => Promise; - /** - * Start auto play. - */ - "startAutoplay": () => Promise; - /** - * Stop auto play. - */ - "stopAutoplay": () => Promise; - /** - * Update the underlying slider implementation. Call this if you've added or removed child slides. - */ - "update": () => Promise; - /** - * Force swiper to update its height (when autoHeight is enabled) for the duration equal to 'speed' parameter. - * @param speed The transition duration (in ms). - */ - "updateAutoHeight": (speed?: number | undefined) => Promise; - } interface IonSpinner { /** * The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics). @@ -3024,73 +2929,6 @@ export namespace Components { */ "mode"?: "ios" | "md"; } - interface IonVirtualScroll { - /** - * The approximate width of each footer template's cell. This dimension is used to help determine how many cells should be created when initialized, and to help calculate the height of the scrollable area. This height value can only use `px` units. Note that the actual rendered size of each cell comes from the app's CSS, whereas this approximation is used to help calculate initial dimensions before the item has been rendered. - */ - "approxFooterHeight": number; - /** - * The approximate height of each header template's cell. This dimension is used to help determine how many cells should be created when initialized, and to help calculate the height of the scrollable area. This height value can only use `px` units. Note that the actual rendered size of each cell comes from the app's CSS, whereas this approximation is used to help calculate initial dimensions before the item has been rendered. - */ - "approxHeaderHeight": number; - /** - * It is important to provide this if virtual item height will be significantly larger than the default The approximate height of each virtual item template's cell. This dimension is used to help determine how many cells should be created when initialized, and to help calculate the height of the scrollable area. This height value can only use `px` units. Note that the actual rendered size of each cell comes from the app's CSS, whereas this approximation is used to help calculate initial dimensions before the item has been rendered. - */ - "approxItemHeight": number; - /** - * This method marks the tail the items array as dirty, so they can be re-rendered. It's equivalent to calling: ```js virtualScroll.checkRange(lastItemLen); ``` - */ - "checkEnd": () => Promise; - /** - * This method marks a subset of items as dirty, so they can be re-rendered. Items should be marked as dirty any time the content or their style changes. The subset of items to be updated can are specifying by an offset and a length. - */ - "checkRange": (offset: number, len?: number) => Promise; - "domRender"?: DomRenderFn; - /** - * Section footers and the data used within its given template can be dynamically created by passing a function to `footerFn`. The logic within the footer function can decide if the footer template should be used, and what data to give to the footer template. The function must return `null` if a footer cell shouldn't be created. - */ - "footerFn"?: HeaderFn; - /** - * An optional function that maps each item footer within their height. - */ - "footerHeight"?: FooterHeightFn; - /** - * Section headers and the data used within its given template can be dynamically created by passing a function to `headerFn`. For example, a large list of contacts usually has dividers between each letter in the alphabet. App's can provide their own custom `headerFn` which is called with each record within the dataset. The logic within the header function can decide if the header template should be used, and what data to give to the header template. The function must return `null` if a header cell shouldn't be created. - */ - "headerFn"?: HeaderFn; - /** - * An optional function that maps each item header within their height. - */ - "headerHeight"?: HeaderHeightFn; - /** - * An optional function that maps each item within their height. When this function is provides, heavy optimizations and fast path can be taked by `ion-virtual-scroll` leading to massive performance improvements. This function allows to skip all DOM reads, which can be Doing so leads to massive performance - */ - "itemHeight"?: ItemHeightFn; - /** - * The data that builds the templates within the virtual scroll. It's important to note that when this data has changed, then the entire virtual scroll is reset, which is an expensive operation and should be avoided if possible. - */ - "items"?: any[]; - /** - * NOTE: only Vanilla JS API. - */ - "nodeRender"?: ItemRenderFn; - /** - * Returns the position of the virtual item at the given index. - */ - "positionForItem": (index: number) => Promise; - /** - * NOTE: only JSX API for stencil. Provide a render function for the footer to be rendered. Returns a JSX virtual-dom. - */ - "renderFooter"?: (item: any, index: number) => any; - /** - * NOTE: only JSX API for stencil. Provide a render function for the header to be rendered. Returns a JSX virtual-dom. - */ - "renderHeader"?: (item: any, index: number) => any; - /** - * NOTE: only JSX API for stencil. Provide a render function for the items to be rendered. Returns a JSX virtual-dom. - */ - "renderItem"?: (item: any, index: number) => any; - } } export interface IonAccordionGroupCustomEvent extends CustomEvent { detail: T; @@ -3244,10 +3082,6 @@ export interface IonSelectCustomEvent extends CustomEvent { detail: T; target: HTMLIonSelectElement; } -export interface IonSlidesCustomEvent extends CustomEvent { - detail: T; - target: HTMLIonSlidesElement; -} export interface IonSplitPaneCustomEvent extends CustomEvent { detail: T; target: HTMLIonSplitPaneElement; @@ -3749,18 +3583,6 @@ declare global { prototype: HTMLIonSkeletonTextElement; new (): HTMLIonSkeletonTextElement; }; - interface HTMLIonSlideElement extends Components.IonSlide, HTMLStencilElement { - } - var HTMLIonSlideElement: { - prototype: HTMLIonSlideElement; - new (): HTMLIonSlideElement; - }; - interface HTMLIonSlidesElement extends Components.IonSlides, HTMLStencilElement { - } - var HTMLIonSlidesElement: { - prototype: HTMLIonSlidesElement; - new (): HTMLIonSlidesElement; - }; interface HTMLIonSpinnerElement extends Components.IonSpinner, HTMLStencilElement { } var HTMLIonSpinnerElement: { @@ -3839,12 +3661,6 @@ declare global { prototype: HTMLIonToolbarElement; new (): HTMLIonToolbarElement; }; - interface HTMLIonVirtualScrollElement extends Components.IonVirtualScroll, HTMLStencilElement { - } - var HTMLIonVirtualScrollElement: { - prototype: HTMLIonVirtualScrollElement; - new (): HTMLIonVirtualScrollElement; - }; interface HTMLElementTagNameMap { "ion-accordion": HTMLIonAccordionElement; "ion-accordion-group": HTMLIonAccordionGroupElement; @@ -3924,8 +3740,6 @@ declare global { "ion-select-option": HTMLIonSelectOptionElement; "ion-select-popover": HTMLIonSelectPopoverElement; "ion-skeleton-text": HTMLIonSkeletonTextElement; - "ion-slide": HTMLIonSlideElement; - "ion-slides": HTMLIonSlidesElement; "ion-spinner": HTMLIonSpinnerElement; "ion-split-pane": HTMLIonSplitPaneElement; "ion-tab": HTMLIonTabElement; @@ -3939,7 +3753,6 @@ declare global { "ion-toast": HTMLIonToastElement; "ion-toggle": HTMLIonToggleElement; "ion-toolbar": HTMLIonToolbarElement; - "ion-virtual-scroll": HTMLIonVirtualScrollElement; } } declare namespace LocalJSX { @@ -6550,90 +6363,6 @@ declare namespace LocalJSX { */ "animated"?: boolean; } - interface IonSlide { - } - interface IonSlides { - /** - * The mode determines which platform styles to use. - */ - "mode"?: "ios" | "md"; - /** - * Emitted after the active slide has changed. - */ - "onIonSlideDidChange"?: (event: IonSlidesCustomEvent) => void; - /** - * Emitted when the user double taps on the slide's container. - */ - "onIonSlideDoubleTap"?: (event: IonSlidesCustomEvent) => void; - /** - * Emitted when the slider is actively being moved. - */ - "onIonSlideDrag"?: (event: IonSlidesCustomEvent) => void; - /** - * Emitted when the next slide has ended. - */ - "onIonSlideNextEnd"?: (event: IonSlidesCustomEvent) => void; - /** - * Emitted when the next slide has started. - */ - "onIonSlideNextStart"?: (event: IonSlidesCustomEvent) => void; - /** - * Emitted when the previous slide has ended. - */ - "onIonSlidePrevEnd"?: (event: IonSlidesCustomEvent) => void; - /** - * Emitted when the previous slide has started. - */ - "onIonSlidePrevStart"?: (event: IonSlidesCustomEvent) => void; - /** - * Emitted when the slider is at the last slide. - */ - "onIonSlideReachEnd"?: (event: IonSlidesCustomEvent) => void; - /** - * Emitted when the slider is at its initial position. - */ - "onIonSlideReachStart"?: (event: IonSlidesCustomEvent) => void; - /** - * Emitted when the user taps/clicks on the slide's container. - */ - "onIonSlideTap"?: (event: IonSlidesCustomEvent) => void; - /** - * Emitted when the user releases the touch. - */ - "onIonSlideTouchEnd"?: (event: IonSlidesCustomEvent) => void; - /** - * Emitted when the user first touches the slider. - */ - "onIonSlideTouchStart"?: (event: IonSlidesCustomEvent) => void; - /** - * Emitted when the slide transition has ended. - */ - "onIonSlideTransitionEnd"?: (event: IonSlidesCustomEvent) => void; - /** - * Emitted when the slide transition has started. - */ - "onIonSlideTransitionStart"?: (event: IonSlidesCustomEvent) => void; - /** - * Emitted before the active slide has changed. - */ - "onIonSlideWillChange"?: (event: IonSlidesCustomEvent) => void; - /** - * Emitted after Swiper initialization - */ - "onIonSlidesDidLoad"?: (event: IonSlidesCustomEvent) => void; - /** - * Options to pass to the swiper instance. See https://swiperjs.com/swiper-api for valid options - */ - "options"?: any; - /** - * If `true`, show the pagination. - */ - "pager"?: boolean; - /** - * If `true`, show the scrollbar. - */ - "scrollbar"?: boolean; - } interface IonSpinner { /** * The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics). @@ -7025,61 +6754,6 @@ declare namespace LocalJSX { */ "mode"?: "ios" | "md"; } - interface IonVirtualScroll { - /** - * The approximate width of each footer template's cell. This dimension is used to help determine how many cells should be created when initialized, and to help calculate the height of the scrollable area. This height value can only use `px` units. Note that the actual rendered size of each cell comes from the app's CSS, whereas this approximation is used to help calculate initial dimensions before the item has been rendered. - */ - "approxFooterHeight"?: number; - /** - * The approximate height of each header template's cell. This dimension is used to help determine how many cells should be created when initialized, and to help calculate the height of the scrollable area. This height value can only use `px` units. Note that the actual rendered size of each cell comes from the app's CSS, whereas this approximation is used to help calculate initial dimensions before the item has been rendered. - */ - "approxHeaderHeight"?: number; - /** - * It is important to provide this if virtual item height will be significantly larger than the default The approximate height of each virtual item template's cell. This dimension is used to help determine how many cells should be created when initialized, and to help calculate the height of the scrollable area. This height value can only use `px` units. Note that the actual rendered size of each cell comes from the app's CSS, whereas this approximation is used to help calculate initial dimensions before the item has been rendered. - */ - "approxItemHeight"?: number; - "domRender"?: DomRenderFn; - /** - * Section footers and the data used within its given template can be dynamically created by passing a function to `footerFn`. The logic within the footer function can decide if the footer template should be used, and what data to give to the footer template. The function must return `null` if a footer cell shouldn't be created. - */ - "footerFn"?: HeaderFn; - /** - * An optional function that maps each item footer within their height. - */ - "footerHeight"?: FooterHeightFn; - /** - * Section headers and the data used within its given template can be dynamically created by passing a function to `headerFn`. For example, a large list of contacts usually has dividers between each letter in the alphabet. App's can provide their own custom `headerFn` which is called with each record within the dataset. The logic within the header function can decide if the header template should be used, and what data to give to the header template. The function must return `null` if a header cell shouldn't be created. - */ - "headerFn"?: HeaderFn; - /** - * An optional function that maps each item header within their height. - */ - "headerHeight"?: HeaderHeightFn; - /** - * An optional function that maps each item within their height. When this function is provides, heavy optimizations and fast path can be taked by `ion-virtual-scroll` leading to massive performance improvements. This function allows to skip all DOM reads, which can be Doing so leads to massive performance - */ - "itemHeight"?: ItemHeightFn; - /** - * The data that builds the templates within the virtual scroll. It's important to note that when this data has changed, then the entire virtual scroll is reset, which is an expensive operation and should be avoided if possible. - */ - "items"?: any[]; - /** - * NOTE: only Vanilla JS API. - */ - "nodeRender"?: ItemRenderFn; - /** - * NOTE: only JSX API for stencil. Provide a render function for the footer to be rendered. Returns a JSX virtual-dom. - */ - "renderFooter"?: (item: any, index: number) => any; - /** - * NOTE: only JSX API for stencil. Provide a render function for the header to be rendered. Returns a JSX virtual-dom. - */ - "renderHeader"?: (item: any, index: number) => any; - /** - * NOTE: only JSX API for stencil. Provide a render function for the items to be rendered. Returns a JSX virtual-dom. - */ - "renderItem"?: (item: any, index: number) => any; - } interface IntrinsicElements { "ion-accordion": IonAccordion; "ion-accordion-group": IonAccordionGroup; @@ -7159,8 +6833,6 @@ declare namespace LocalJSX { "ion-select-option": IonSelectOption; "ion-select-popover": IonSelectPopover; "ion-skeleton-text": IonSkeletonText; - "ion-slide": IonSlide; - "ion-slides": IonSlides; "ion-spinner": IonSpinner; "ion-split-pane": IonSplitPane; "ion-tab": IonTab; @@ -7174,7 +6846,6 @@ declare namespace LocalJSX { "ion-toast": IonToast; "ion-toggle": IonToggle; "ion-toolbar": IonToolbar; - "ion-virtual-scroll": IonVirtualScroll; } } export { LocalJSX as JSX }; @@ -7259,8 +6930,6 @@ declare module "@stencil/core" { "ion-select-option": LocalJSX.IonSelectOption & JSXBase.HTMLAttributes; "ion-select-popover": LocalJSX.IonSelectPopover & JSXBase.HTMLAttributes; "ion-skeleton-text": LocalJSX.IonSkeletonText & JSXBase.HTMLAttributes; - "ion-slide": LocalJSX.IonSlide & JSXBase.HTMLAttributes; - "ion-slides": LocalJSX.IonSlides & JSXBase.HTMLAttributes; "ion-spinner": LocalJSX.IonSpinner & JSXBase.HTMLAttributes; "ion-split-pane": LocalJSX.IonSplitPane & JSXBase.HTMLAttributes; "ion-tab": LocalJSX.IonTab & JSXBase.HTMLAttributes; @@ -7274,7 +6943,6 @@ declare module "@stencil/core" { "ion-toast": LocalJSX.IonToast & JSXBase.HTMLAttributes; "ion-toggle": LocalJSX.IonToggle & JSXBase.HTMLAttributes; "ion-toolbar": LocalJSX.IonToolbar & JSXBase.HTMLAttributes; - "ion-virtual-scroll": LocalJSX.IonVirtualScroll & JSXBase.HTMLAttributes; } } }