From cf3035778c770dbc04091191b50c474db39b7e53 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Wed, 10 Jun 2020 11:36:02 -0400 Subject: [PATCH] chore(stencil): update to v1.14 (#21458) --- core/api.txt | 4 +- core/package.json | 2 +- core/src/components.d.ts | 274 +++++++++++++------- core/src/components/content/readme.md | 2 +- core/src/components/input/input.tsx | 2 +- core/src/components/item-sliding/readme.md | 2 +- core/src/components/searchbar/searchbar.tsx | 2 +- core/src/components/textarea/textarea.tsx | 2 +- 8 files changed, 186 insertions(+), 104 deletions(-) diff --git a/core/api.txt b/core/api.txt index ee2d879a90..f6c88ae20d 100644 --- a/core/api.txt +++ b/core/api.txt @@ -296,7 +296,7 @@ ion-content,prop,scrollY,boolean,true,false,false ion-content,method,getScrollElement,getScrollElement() => Promise ion-content,method,scrollByPoint,scrollByPoint(x: number, y: number, duration: number) => Promise ion-content,method,scrollToBottom,scrollToBottom(duration?: number) => Promise -ion-content,method,scrollToPoint,scrollToPoint(x: number | null | undefined, y: number | null | undefined, duration?: number) => Promise +ion-content,method,scrollToPoint,scrollToPoint(x: number | undefined | null, y: number | undefined | null, duration?: number) => Promise ion-content,method,scrollToTop,scrollToTop(duration?: number) => Promise ion-content,event,ionScroll,ScrollDetail,true ion-content,event,ionScrollEnd,ScrollBaseDetail,true @@ -588,7 +588,7 @@ ion-item-sliding,method,close,close() => Promise ion-item-sliding,method,closeOpened,closeOpened() => Promise ion-item-sliding,method,getOpenAmount,getOpenAmount() => Promise ion-item-sliding,method,getSlidingRatio,getSlidingRatio() => Promise -ion-item-sliding,method,open,open(side: "start" | "end" | undefined) => Promise +ion-item-sliding,method,open,open(side: Side | undefined) => Promise ion-item-sliding,event,ionDrag,any,true ion-label,scoped diff --git a/core/package.json b/core/package.json index 97afa917cb..50df9bcc27 100644 --- a/core/package.json +++ b/core/package.json @@ -34,7 +34,7 @@ "tslib": "^1.10.0" }, "devDependencies": { - "@stencil/core": "1.13.0", + "@stencil/core": "1.14.0", "@stencil/sass": "1.3.1", "@types/jest": "24.9.1", "@types/node": "12.12.3", diff --git a/core/src/components.d.ts b/core/src/components.d.ts index 7bde5b5347..4c65aa6fc7 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -5,9 +5,9 @@ * It contains typing information for all components that exist in this project. */ import { HTMLStencilElement, JSXBase } from "@stencil/core/internal"; -import { ActionSheetButton, AlertButton, AlertInput, AnimationBuilder, AutocompleteTypes, CheckboxChangeEventDetail, Color, ComponentProps, ComponentRef, DatetimeChangeEventDetail, DatetimeOptions, DomRenderFn, FooterHeightFn, FrameworkDelegate, HeaderFn, HeaderHeightFn, InputChangeEventDetail, ItemHeightFn, ItemRenderFn, ItemReorderEventDetail, MenuChangeEventDetail, NavComponent, NavOptions, OverlayEventDetail, PickerButton, PickerColumn, RadioGroupChangeEventDetail, RangeChangeEventDetail, 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, ViewController, } from "./interface"; -import { IonicSafeString, } from "./utils/sanitization"; -import { SelectCompareFn, } from "./components/select/select-interface"; +import { ActionSheetButton, AlertButton, AlertInput, AnimationBuilder, AutocompleteTypes, CheckboxChangeEventDetail, Color, ComponentProps, ComponentRef, DatetimeChangeEventDetail, DatetimeOptions, DomRenderFn, FooterHeightFn, FrameworkDelegate, HeaderFn, HeaderHeightFn, InputChangeEventDetail, ItemHeightFn, ItemRenderFn, ItemReorderEventDetail, MenuChangeEventDetail, NavComponent, NavOptions, OverlayEventDetail, PickerButton, PickerColumn, RadioGroupChangeEventDetail, RangeChangeEventDetail, 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, ViewController } from "./interface"; +import { IonicSafeString } from "./utils/sanitization"; +import { SelectCompareFn } from "./components/select/select-interface"; export namespace Components { interface IonActionSheet { /** @@ -183,7 +183,7 @@ export namespace Components { /** * The type of the button. */ - "type": "submit" | "reset" | "button"; + "type": 'submit' | 'reset' | 'button'; } interface IonBackdrop { /** @@ -229,11 +229,11 @@ export namespace Components { /** * Set to `"block"` for a full-width button or to `"full"` for a full-width button without left and right borders. */ - "expand"?: "full" | "block"; + "expand"?: 'full' | 'block'; /** * Set to `"clear"` for a transparent button, to `"outline"` for a transparent button with a border, or to `"solid"`. The default style is `"solid"` except inside of a toolbar, where the default is `"clear"`. */ - "fill"?: "clear" | "outline" | "solid" | "default"; + "fill"?: 'clear' | 'outline' | 'solid' | 'default'; /** * Contains a URL or a URL fragment that the hyperlink points to. If this property is set, an anchor tag will be rendered. */ @@ -257,11 +257,11 @@ export namespace Components { /** * The button shape. */ - "shape"?: "round"; + "shape"?: 'round'; /** * The button size. */ - "size"?: "small" | "default" | "large"; + "size"?: 'small' | 'default' | 'large'; /** * If `true`, activates a button with a heavier font weight. */ @@ -273,7 +273,7 @@ export namespace Components { /** * The type of the button. */ - "type": "submit" | "reset" | "button"; + "type": 'submit' | 'reset' | 'button'; } interface IonButtons { /** @@ -325,7 +325,7 @@ export namespace Components { /** * The type of the button. Only used when an `onclick` or `button` property is present. */ - "type": "submit" | "reset" | "button"; + "type": 'submit' | 'reset' | 'button'; } interface IonCardContent { /** @@ -548,7 +548,7 @@ export namespace Components { * @param y The point to scroll to on the vertical axis. * @param duration The amount of time to take scrolling to that point. Defaults to `0`. */ - "scrollToPoint": (x: number | null | undefined, y: number | null | undefined, duration?: number) => Promise; + "scrollToPoint": (x: number | undefined | null, y: number | undefined | null, duration?: number) => Promise; /** * Scroll to the top of the component. * @param duration The amount of time to take scrolling to the top. Defaults to `0`. @@ -677,11 +677,11 @@ export namespace Components { /** * Where to align the fab horizontally in the viewport. */ - "horizontal"?: "start" | "end" | "center"; + "horizontal"?: 'start' | 'end' | 'center'; /** * Where to align the fab vertically in the viewport. */ - "vertical"?: "top" | "bottom" | "center"; + "vertical"?: 'top' | 'bottom' | 'center'; } interface IonFabButton { /** @@ -731,7 +731,7 @@ export namespace Components { /** * The size of the button. Set this to `small` in order to have a mini fab button. */ - "size"?: "small"; + "size"?: 'small'; /** * Specifies where to display the linked URL. Only applies when an `href` is provided. Special keywords: `"_blank"`, `"_self"`, `"_parent"`, `"_top"`. */ @@ -743,7 +743,7 @@ export namespace Components { /** * The type of the button. */ - "type": "submit" | "reset" | "button"; + "type": 'submit' | 'reset' | 'button'; } interface IonFabList { /** @@ -753,7 +753,7 @@ export namespace Components { /** * The side the fab list will show on relative to the main fab button. */ - "side": "start" | "end" | "top" | "bottom"; + "side": 'start' | 'end' | 'top' | 'bottom'; } interface IonFooter { /** @@ -775,7 +775,7 @@ export namespace Components { /** * Describes the scroll effect that will be applied to the header `condense` only applies in iOS mode. Typically used for [Collapsible Large Titles](https://ionicframework.com/docs/api/title#collapsible-large-titles) */ - "collapse"?: "condense"; + "collapse"?: 'condense'; /** * The mode determines which platform styles to use. */ @@ -807,7 +807,7 @@ export namespace Components { /** * The position of the infinite scroll element. The value can be either `top` or `bottom`. */ - "position": "top" | "bottom"; + "position": 'top' | 'bottom'; /** * The threshold distance from the bottom of the content to call the `infinite` output event when scrolled. The threshold value can be either a percent, or in pixels. For example, use the value of `10%` for the `infinite` output event to get called when the user has scrolled 10% from the bottom of the page. Use the value `100px` when the scroll is within 100 pixels from the bottom of the page. */ @@ -839,7 +839,7 @@ export namespace Components { /** * Whether auto correction should be enabled when the user is entering/editing the text value. */ - "autocorrect": "on" | "off"; + "autocorrect": 'on' | 'off'; /** * This Boolean attribute lets you specify that a form control should have input focus when the page loads. */ @@ -867,7 +867,7 @@ export namespace Components { /** * A hint to the browser for which enter key to display. Possible values: `"enter"`, `"done"`, `"go"`, `"next"`, `"previous"`, `"search"`, and `"send"`. */ - "enterkeyhint"?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send"; + "enterkeyhint"?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send'; /** * Returns the native `` element used under the hood. */ @@ -875,7 +875,7 @@ export namespace Components { /** * A hint to the browser for which keyboard to display. Possible values: `"none"`, `"text"`, `"tel"`, `"url"`, `"email"`, `"numeric"`, `"decimal"`, and `"search"`. */ - "inputmode"?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search"; + "inputmode"?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search'; /** * The maximum value, which must not be less than its minimum (min attribute) value. */ @@ -977,7 +977,7 @@ export namespace Components { /** * How the bottom border should be displayed on the item. */ - "lines"?: "full" | "inset" | "none"; + "lines"?: 'full' | 'inset' | 'none'; /** * The mode determines which platform styles to use. */ @@ -1001,7 +1001,7 @@ export namespace Components { /** * The type of the button. Only used when an `onclick` or `button` property is present. */ - "type": "submit" | "reset" | "button"; + "type": 'submit' | 'reset' | 'button'; } interface IonItemDivider { /** @@ -1055,7 +1055,7 @@ export namespace Components { /** * The type of the button. */ - "type": "submit" | "reset" | "button"; + "type": 'submit' | 'reset' | 'button'; } interface IonItemOptions { "fireSwipeEvent": () => Promise; @@ -1089,7 +1089,7 @@ export namespace Components { * Open the sliding item. * @param side The side of the options to open. If a side is not provided, it will open the first set of options it finds within the item. */ - "open": (side: "start" | "end" | undefined) => Promise; + "open": (side: Side | undefined) => Promise; } interface IonLabel { /** @@ -1103,7 +1103,7 @@ export namespace Components { /** * The position determines where and how the label behaves inside an item. */ - "position"?: "fixed" | "stacked" | "floating"; + "position"?: 'fixed' | 'stacked' | 'floating'; } interface IonList { /** @@ -1117,7 +1117,7 @@ export namespace Components { /** * How the bottom border should be displayed on all items. */ - "lines"?: "full" | "inset" | "none"; + "lines"?: 'full' | 'inset' | 'none'; /** * The mode determines which platform styles to use. */ @@ -1131,7 +1131,7 @@ export namespace Components { /** * How the bottom border should be displayed on the list header. */ - "lines"?: "full" | "inset" | "none"; + "lines"?: 'full' | 'inset' | 'none'; /** * The mode determines which platform styles to use. */ @@ -1284,7 +1284,7 @@ export namespace Components { /** * The type of the button. */ - "type": "submit" | "reset" | "button"; + "type": 'submit' | 'reset' | 'button'; } interface IonMenuToggle { /** @@ -1471,7 +1471,7 @@ export namespace Components { * @param done The transition complete function. */ "setRoot": (component: T, componentProps?: ComponentProps | null | undefined, opts?: NavOptions | null | undefined, done?: TransitionDoneFn | undefined) => Promise; - "setRouteId": (id: string, params: ComponentProps | undefined, direction: RouterDirection, animation?: AnimationBuilder | undefined) => Promise; + "setRouteId": (id: string, params: ComponentProps | undefined, direction: RouterDirection, animation?: AnimationBuilder | undefined) => Promise; /** * If the nav component should allow for swipe-to-go-back. */ @@ -1671,7 +1671,7 @@ export namespace Components { /** * The state of the progress bar, based on if the time the process takes is known or not. Default options are: `"determinate"` (no animation), `"indeterminate"` (animate from left to right). */ - "type": "determinate" | "indeterminate"; + "type": 'determinate' | 'indeterminate'; /** * The value determines how much of the active bar should display when the `type` is `"determinate"`. The value should be between [0, 1]. */ @@ -1846,7 +1846,7 @@ export namespace Components { /** * Sets the type of ripple-effect: - `bounded`: the ripple effect expands from the user's click position - `unbounded`: the ripple effect expands from the center of the button and overflows the container. NOTE: Surfaces for bounded ripples should have the overflow property set to hidden, while surfaces for unbounded ripples should have it set to visible. */ - "type": "bounded" | "unbounded"; + "type": 'bounded' | 'unbounded'; } interface IonRoute { /** @@ -1856,9 +1856,7 @@ export namespace Components { /** * A key value `{ 'red': true, 'blue': 'white'}` containing props that should be passed to the defined component when rendered. */ - "componentProps"?: { - [key: string]: any; - }; + "componentProps"?: {[key: string]: any}; /** * Relative path that needs to match in order for this route to apply. Accepts paths similar to expressjs so that you can define parameters in the url /foo/:bar where bar would be available in incoming props. */ @@ -1938,7 +1936,7 @@ export namespace Components { * The mode determines which platform styles to use. */ "mode": "ios" | "md"; - "setRouteId": (id: string, params: ComponentProps | undefined, direction: RouterDirection, animation?: AnimationBuilder | undefined) => Promise; + "setRouteId": (id: string, params: ComponentProps | undefined, direction: RouterDirection, animation?: AnimationBuilder | undefined) => Promise; "swipeHandler"?: SwipeGestureHandler; } interface IonRow { @@ -1955,7 +1953,7 @@ export namespace Components { /** * Set the input's autocorrect property. */ - "autocorrect": "on" | "off"; + "autocorrect": 'on' | 'off'; /** * Set the cancel button icon. Only applies to `md` mode. Defaults to `"arrow-back-sharp"`. */ @@ -1983,7 +1981,7 @@ export namespace Components { /** * A hint to the browser for which enter key to display. Possible values: `"enter"`, `"done"`, `"go"`, `"next"`, `"previous"`, `"search"`, and `"send"`. */ - "enterkeyhint"?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send"; + "enterkeyhint"?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send'; /** * Returns the native `` element used under the hood. */ @@ -1991,7 +1989,7 @@ export namespace Components { /** * A hint to the browser for which keyboard to display. Possible values: `"none"`, `"text"`, `"tel"`, `"url"`, `"email"`, `"numeric"`, `"decimal"`, and `"search"`. */ - "inputmode"?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search"; + "inputmode"?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search'; /** * The mode determines which platform styles to use. */ @@ -2011,7 +2009,7 @@ export namespace Components { /** * Sets the behavior for the cancel button. Defaults to `"never"`. Setting to `"focus"` shows the cancel button on focus. Setting to `"never"` hides the cancel button. Setting to `"always"` shows the cancel button regardless of focus state. */ - "showCancelButton": "never" | "focus" | "always"; + "showCancelButton": 'never' | 'focus' | 'always'; /** * If `true`, enable spellcheck on the input. */ @@ -2019,7 +2017,7 @@ export namespace Components { /** * Set the type of the input. */ - "type": "text" | "password" | "email" | "number" | "search" | "tel" | "url"; + "type": 'text' | 'password' | 'email' | 'number' | 'search' | 'tel' | 'url'; /** * the value of the searchbar. */ @@ -2063,7 +2061,7 @@ export namespace Components { /** * The type of the button. */ - "type": "submit" | "reset" | "button"; + "type": 'submit' | 'reset' | 'button'; /** * The value of the segment button. */ @@ -2422,7 +2420,7 @@ export namespace Components { /** * A hint to the browser for which enter key to display. Possible values: `"enter"`, `"done"`, `"go"`, `"next"`, `"previous"`, `"search"`, and `"send"`. */ - "enterkeyhint"?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send"; + "enterkeyhint"?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send'; /** * Returns the native `