diff --git a/types/express-serve-static-core/express-serve-static-core-tests.ts b/types/express-serve-static-core/express-serve-static-core-tests.ts index 6261537061b180..e0029d3590cf4d 100644 --- a/types/express-serve-static-core/express-serve-static-core-tests.ts +++ b/types/express-serve-static-core/express-serve-static-core-tests.ts @@ -351,3 +351,6 @@ app.router.stack; app.on("mount", (app) => { app; // $ExpectType Application }); + +// QUERY method presence depends on environment +app.query?.("/foo/bar", (req) => req.method); diff --git a/types/express-serve-static-core/index.d.ts b/types/express-serve-static-core/index.d.ts index 4f1fc7736269db..d13bf897d3a60d 100644 --- a/types/express-serve-static-core/index.d.ts +++ b/types/express-serve-static-core/index.d.ts @@ -124,7 +124,7 @@ type ParseRouteParameters = string extends Route ? ParamsD /* eslint-disable @definitelytyped/no-unnecessary-generics */ export interface IRouterMatcher< T, - Method extends "all" | "get" | "post" | "put" | "delete" | "patch" | "options" | "head" = any, + Method extends "all" | "get" | "post" | "put" | "delete" | "patch" | "options" | "head" | "query" = any, > { < Route extends string | RegExp, @@ -268,6 +268,11 @@ export interface IRouter extends RequestHandler { patch: IRouterMatcher; options: IRouterMatcher; head: IRouterMatcher; + /** + * Requires Node.js >=20.19.3 <21 || >=22.2.0 + * @see https://expressjs.com/en/5x/api/application/#appquery + */ + query?: IRouterMatcher; checkout: IRouterMatcher; connect: IRouterMatcher; diff --git a/types/express-serve-static-core/v4/express-serve-static-core-tests.ts b/types/express-serve-static-core/v4/express-serve-static-core-tests.ts index 04ebe7d8574397..c59a3ade891376 100644 --- a/types/express-serve-static-core/v4/express-serve-static-core-tests.ts +++ b/types/express-serve-static-core/v4/express-serve-static-core-tests.ts @@ -311,3 +311,6 @@ app.get("/:readonly", req => { // @ts-expect-error req.xhr = true; }); + +// QUERY method presence depends on environment +app.query?.("/foo/bar", (req) => req.method); diff --git a/types/express-serve-static-core/v4/index.d.ts b/types/express-serve-static-core/v4/index.d.ts index 878b4e8819be7e..f43011a9f08604 100644 --- a/types/express-serve-static-core/v4/index.d.ts +++ b/types/express-serve-static-core/v4/index.d.ts @@ -110,7 +110,7 @@ export type RouteParameters = string extends Route ? Param /* eslint-disable @definitelytyped/no-unnecessary-generics */ export interface IRouterMatcher< T, - Method extends "all" | "get" | "post" | "put" | "delete" | "patch" | "options" | "head" = any, + Method extends "all" | "get" | "post" | "put" | "delete" | "patch" | "options" | "head" | "query" = any, > { < Route extends string, @@ -261,6 +261,11 @@ export interface IRouter extends RequestHandler { patch: IRouterMatcher; options: IRouterMatcher; head: IRouterMatcher; + /** + * Requires Node.js >=20.19.3 <21 || >=22.2.0 + * @see https://expressjs.com/en/4x/api/application/#appquery + */ + query?: IRouterMatcher; checkout: IRouterMatcher; connect: IRouterMatcher; diff --git a/types/express/express-tests.ts b/types/express/express-tests.ts index 3d6261180e01d1..7941c87d6b9994 100644 --- a/types/express/express-tests.ts +++ b/types/express/express-tests.ts @@ -61,14 +61,17 @@ namespace express_tests { router.put(path); router.post(path); router.delete(path); + router.query?.(path); router.get(pathStr); router.put(pathStr); router.post(pathStr); router.delete(pathStr); + router.query?.(pathStr); router.get(pathRE); router.put(pathRE); router.post(pathRE); router.delete(pathRE); + router.query?.(pathRE); router.use((req, res, next) => { next(); diff --git a/types/express/v4/express-tests.ts b/types/express/v4/express-tests.ts index 953f5b5e0d1427..81a95b7076cc54 100644 --- a/types/express/v4/express-tests.ts +++ b/types/express/v4/express-tests.ts @@ -68,14 +68,17 @@ namespace express_tests { router.put(path); router.post(path); router.delete(path); + router.query?.(path); router.get(pathStr); router.put(pathStr); router.post(pathStr); router.delete(pathStr); + router.query?.(pathStr); router.get(pathRE); router.put(pathRE); router.post(pathRE); router.delete(pathRE); + router.query?.(pathRE); router.use((req, res, next) => { next(); diff --git a/types/mpv-script/index.d.ts b/types/mpv-script/index.d.ts index edf44b5ed5ed8a..88b9087867964b 100644 --- a/types/mpv-script/index.d.ts +++ b/types/mpv-script/index.d.ts @@ -407,6 +407,23 @@ declare namespace mp { | `${"max" | "avg"}-pq-y` | `prim-${"red" | "green" | "blue" | "white"}-${"x" | "y"}`; + /** + * @see https://mpv.io/manual/stable/#input-command-prefixes + */ + type CommandPrefix = + | "osd-auto" + | "no-osd" + | "osd-bar" + | "osd-msg" + | "osd-msg-bar" + | "raw" + | "expand-properties" + | "repeatable" + | "nonrepeatable" + | "nonscalable" + | "async" + | "sync"; + /** * Options can be set like properties as well * this is a not completed list of writeable options that can be set/get by `mp.set_property` etc @@ -466,63 +483,532 @@ declare namespace mp { is_dir: boolean; } - interface BaseCommandOpts { - args: string[]; - playback_only?: boolean; - capture_size?: number; - detach?: boolean; - env?: string[]; - stdin_data?: string; - passthrough_stdin?: boolean; - } - - interface UnnamedCommandOpts extends BaseCommandOpts { - capture_stdout?: boolean; - capture_stderr?: boolean; + interface CommandNativeOptsBase { + /** + * name of the mpv input command + * + * this should be removed in favor of `_name` if `_name` is officially released + */ + name: CommandName | (string & {}); // allow any string just in case this CommandName union is out-dated + /** + * `name` field is replaced by `_name` in development build + */ + _name?: CommandName | (string & {}); + /** + * The special entry `_flags` is optional, and if present, must be an array of Input Command Prefixes to apply. + */ + _flags?: CommandPrefix[]; } - interface UncapturedNamedCommandOpts extends BaseCommandOpts { - name: string; - capture_stdout?: false; - capture_stderr?: false; - } + /** + * NOTE: + * Commands have their own dedicated arguments as object properties(namely Named Arguments in the doc) + */ + interface CommandNativeExtraOptsMap { + seek: { + /** + * certain unit(depending on `flags` property) of number to seek + */ + target: number; + /** + * Multiple flags can be combined, e.g.: `absolute+keyframes`. + * + * By default, `keyframes` is used for `relative`, `relative-percent`, and `absolute-percent` seeks, while `exact` is used for `absolute` seeks. + * + * Before mpv 0.9, the `keyframes` and `exact` flags had to be passed as 3rd parameter (essentially using a space instead of `+`). + * The 3rd parameter is still parsed, but is considered deprecated. + */ + flags?: + | "relative" + | "absolute" + | "absolute-percent" + | "relative-percent" + | "keyframes" + | "exact" + | (string & {}); + }; + "revert-seek": { + flags?: "mark" | "mark-permanent"; + }; + "sub-seek": { + /** + * For example `1` skips to the next subtitle, `-1` skips to the previous subtitles, and `0` seeks to the beginning of the current subtitle. + */ + skip: number; + flags?: "primary" | "secondary"; + }; + "frame-step": { + /** + * If `frames` is omitted, the value is assumed to be 1. + */ + frames?: number; + flags?: "play" | "seek" | "mute"; + }; + stop: { + flags?: "keep-playlist"; + }; + set: { + // conflicts with default base opt `name`, `_name` will be added it future version of mpv to replace `name` + // TODO: uncomment when `_name` is released + // name: SetPropertyName + value: unknown; + }; + del: { + // TODO: uncomment when `_name` is released + // name: string + }; + add: { + // TODO: uncomment when `_name` is released + // name: SetPropertyName + value?: number; + }; + multiply: { + // TODO: uncomment when `_name` is released + // name: SetPropertyName + value: number; + }; + cycle: { + // TODO: uncomment when `_name` is released + // name: SetPropertyName + value?: "up" | "down"; + }; + // 'cycle-values': { } // this has not named argument form + "change-list": { + // TODO: uncomment when `_name` is released + // name: string // TODO: not sure about the names of list options + /** + * different type of list option may support different set of operations + * + * this ts target type is only for the convenience of getting code completions + * + * see https://mpv.io/manual/stable/#list-options before appling + */ + operation: + | "set" + | "append" + | "add" + | "pre" + | "clr" + | "del" + | "remove" + | "toggle" + | "help" + | (string & {}); + value: string; + }; + "playlist-next": { + flags?: "weak" | "force"; + }; + "playlist-prev": { + flags?: "weak" | "force"; + }; + // 'playlist-play-index': { } // no idea how + loadfile: { + /** + * file url to load + */ + url: string; + flags?: + | "replace" + | "append" + | "append-play" + | "insert-next" + | "insert-next-play" + | "insert-at" + | "insert-at-play"; + /** + * insertion index, used only by the `insert-at` and `insert-at-play` actions. + */ + index?: number; + /** + * A list of options and values which should be set while the file is playing. + * + * It is of the form `opt1=value1,opt2=value2,...` + * + * When using the client API, this can be a `MPV_FORMAT_NODE_MAP` (or a Lua table), however the values themselves must be strings currently. + */ + options?: string; + }; + loadlist: { + /** + * playlist url to load + */ + url: string; + flags?: + | "replace" + | "append" + | "append-play" + | "insert-next" + | "insert-next-play" + | "insert-at" + | "insert-at-play"; - interface NamedCommandOptsWithStdout extends BaseCommandOpts { - name: string; - capture_stdout: true; - capture_stderr?: false; - } + /** + * An insertion index, used only by the `insert-at` and `insert-at-play` actions. + * + * When used with those actions, the new playlist will be inserted at the index position in the internal playlist, + * or appended to the end if index is less than 0 or greater than the size of the internal playlist. + */ + index?: number; + }; + "playlist-remove": { + index: number; + }; + "playlist-move": { + /** + * index move playlist from + */ + index1: number; + /** + * index move playlist to + */ + index2: number; + }; + "sub-add": { + // url of subtitle + url: string; + /** + * @see https://mpv.io/manual/stable/#command-interface-sub-add[]]%5d + */ + flags?: "select" | "auto" | "cached" | (string & {}); + /** + * track language + */ + lang?: string; + }; + "sub-remove": { + id?: number; + }; + "sub-reload": { + id?: number; + }; + "sub-step": { + skip: number; + flags?: "primary" | "secondary"; + }; + "audio-add": { + /** + * url of audio + */ + url: string; + /** + * see flags for `sub-add` + */ + flags?: "select" | "auto" | "cached" | (string & {}); + title?: string; + lang?: string; + }; + "audio-remove": { + id?: number; + }; + "audio-reload": { + id?: number; + }; + "video-add": { + /** + * url of video + */ + url: string; + /** + * see flags for `sub-add` + */ + flags?: "select" | "auto" | "cached" | (string & {}); + title?: string; + lang?: string; + /** + * If enabled, mpv will load the given video as album art. + */ + albumart?: boolean; + }; + "video-remove": { + id?: number; + }; + "video-reload": { + id?: number; + }; + "rescan-external-files": { + mode?: "reselect" | "keep-selection"; + }; + "print-text": { + text: string; + }; + "expand-text": { + text: string; + }; + "expand-path": { + text: string; + }; + "normalize-path": { + filename: string; + }; + "escape-ass": { + text: string; + }; + "apply-profile": { + // TODO: uncomment when `_name` is released + // name: string + mode?: "apply" | "restore"; + }; + "load-config-file": { + filename: string; + }; + "delete-watch-later-config": { + filename?: string; + }; + // 'show-text' // not sure how + "overlay-add": { + /** + * an integer between 0 and 63 identifying the overlay element + * The ID can be used to add multiple overlay parts, update a part by using this command with an already existing ID, + * or to remove a part with overlay-remove. Using a previously unused ID will add a new overlay, while reusing an ID will update it. + */ + id: number; + x: number; + y: number; + /** + * specifies the file the raw image data is read from. + * + * It can be either a numeric UNIX file descriptor prefixed with @ (e.g. @4), or a filename. + * The file will be mapped into memory with mmap(), copied, and unmapped before the command returns (changed in mpv 0.18.1). + */ + file: string; + /** + * the byte offset of the first pixel in the source file. + * + * (The current implementation always mmap's the whole file from position 0 to the end of the image, so large offsets should be avoided. Before mpv 0.8.0, the offset was actually passed directly to mmap, but it was changed to make using it easier.) + */ + offset: number; + /** + * a string identifying the image format. Currently, only bgra is defined. + */ + fmt: "bgra" | (string & {}); + /** + * visible width of overlay + */ + w: number; + /** + * visible height of overlay + */ + h: number; + /** + * the width in bytes in memory + */ + stride: number; + dw?: number; + dh?: number; + }; + "overlay-remove": { + id: number; + }; + "osd-overlay": { + /** + * Arbitrary integer that identifies the overlay. + * Multiple overlays can be added by calling this command with different `id` parameters. + * Calling this command with the same id replaces the previously set overlay. + * + * There is a separate namespace for each libmpv client (i.e. IPC connection, script), + * so IDs can be made up and assigned by the API user without conflicting with other API users. + * + * If the libmpv client is destroyed, all overlays associated with it are also deleted. + * In particular, connecting via `--input-ipc-server`, adding an overlay, and disconnecting will remove the overlay immediately again. + */ + id: number; - interface NamedCommandOptsWithStderr extends BaseCommandOpts { - name: string; - capture_stderr: true; - capture_stdout?: false; - } + /** + * String that gives the type of the overlay. + * @see https://mpv.io/manual/stable/#command-interface-format + */ + format: "ass-events" | "none"; + /** + * String defining the overlay contents according to the `format` parameter. + */ + data: string; + /** + * Used if `format` is set to `ass-events` (see description there). Optional, defaults to 0 + */ + res_x?: number; + /** + * Used if `format` is set to `ass-events` (see description there). Optional, defaults to 720 + */ + res_y?: number; + /** + * The Z order of the overlay. Optional, defaults to 0. + */ + z?: number; + /** + * If set to true, do not display this (default: false). + */ + hidden?: boolean; + /** + * If set to true, attempt to determine bounds and write them to the command's result value as x0, x1, y0, y1 rectangle + */ + compute_bounds?: boolean; + }; + mouse: { + x: number; + y: number; + /** + * The button number of clicked mouse button. This should be one of 0-19. If `button` is omitted, only the position will be updated. + */ + button?: number; + /** + * default: single + */ + mode?: "single" | "double"; + }; - interface CapturedNamedOptsCommand extends BaseCommandOpts { - name: string; - capture_stdout: true; - capture_stderr: true; + keypress: { + // TODO: uncomment when `_name` is released + // name: string + scale?: number; + }; + keydown: { + // TODO: uncomment when `_name` is released + // name: string + }; + keyup: { + // TODO: uncomment when `_name` is released + // name?: string + }; + keybind: { + // TODO: uncomment when `_name` is released + // name: string + cmd: string; + comment?: string; + }; + // *-section commands are deprecated, so not types for them + "load-input-conf": { + filename: string; + }; + quit: { + /** + * Exit the player. If an argument is given, it's used as process exit code. + */ + code?: number; + }; + "quit-watch-later": { + /** + * Exit player, and store current playback position. + * + * Playing that file later will seek to the previous position on start. + * + * The (optional) argument is exactly as in the `quit` command. + */ + code?: number; + }; + "script-binding": { + // TODO: uncomment when `_name` is released + // name: string + arg: string; + }; + "load-script": { + filename: string; + }; + screenshot: { + /** + * can be combined with `+`, such as `video+each-frame` + * @see https://mpv.io/manual/stable/#command-interface-screenshot-[%5d + */ + flags?: "video" | "scaled" | "subtitles" | "osd" | "window" | "each-frame" | (string & {}); + }; + "screenshot-to-file": { + /** + * Take a screenshot and save it to a given file. + * The format of the file will be guessed by the extension (and `--screenshot-format` is ignored - the behavior when the extension is missing or unknown is arbitrary). + * If the file already exists, it's overwritten. + */ + filename: string; + /** + * can be combined with `+`, such as `video+each-frame` + * @see https://mpv.io/manual/stable/#command-interface-screenshot-[%5d + */ + flags?: "video" | "scaled" | "subtitles" | "osd" | "window" | "each-frame" | (string & {}); + }; + "screenshot-raw": { + /** + * can be combined with `+`, such as `video+each-frame` + * @see https://mpv.io/manual/stable/#command-interface-screenshot-[%5d + */ + flags?: "video" | "scaled" | "subtitles" | "osd" | "window" | "each-frame" | (string & {}); + format?: "bgr0" | "bgra" | "rgba" | "rgba64"; + }; + vf: { + /** + * @see https://mpv.io/manual/stable/#command-interface-vf---, ...unknown[]] + ): true | undefined; - function command_native(table: [CommandName | (string & {}), ...unknown[]]): null | undefined; // `undefined` on error + /** + * Notes from observation: + * 1. command_native returns `null | undefined` for most commands, including `run` + * 1. some commands can only be invoked by array-like overload `command_native(array)` such as `run` + * 1. some commands can only be invoked by `command_native(opts)` overload(namely named arguments) such as `subprocess` + */ - function command_native(table: [CommandName | (string & {}), ...unknown[]], def: T): null | T; // `T` on error + interface SubprocessCommandOpts { + /** + * Array of strings with the command as first argument, and subsequent command line arguments following. + * + * This is just like the `run` command argument list. + * + * The first array entry is either an absolute path to the executable, or a filename with no path components, in which case the executable is searched in the directories in the PATH environment variable. + * + * On Unix, this is equivalent to posix_spawnp and execvp behavior. + */ + args: string[]; - function command_native(table: UnnamedCommandOpts): undefined; + /** + * Boolean indicating whether the process should be killed when playback of the current playlist entry terminates (optional, default: true). + * + * If enabled, stopping playback will automatically kill the process, and you can't start it outside of playback. + */ + playback_only?: boolean; - function command_native(table: UnnamedCommandOpts, def: T): T; + /** + * Integer setting the **maximum number of stdout plus stderr bytes** that can be captured (optional, default: 64MB). + * If the **number of bytes** exceeds this, capturing is stopped. The limit is per captured stream. + */ + capture_size?: number; - function command_native(table: UncapturedNamedCommandOpts, def?: unknown): UncapturedProcess; + /** + * Capture all data the process outputs to stdout and return it once the process ends (optional, default: no). + */ + capture_stdout?: boolean; + /** + * Capture all data the process outputs to stderr and return it once the process ends (optional, default: no). + */ + capture_stderr?: boolean; + /** + * Whether to run the process in detached mode (optional, default: no). + * + * In this mode, the process is run in a new process session, and the command does not wait for the process to terminate. + * + * If neither `capture_stdout` nor `capture_stderr` have been set to true, the command returns immediately after the new process has been started, otherwise the command will read as long as the pipes are open. + */ + detach?: boolean; + /** + * Set a list of environment variables for the new process (default: empty). + * + * If an empty list is passed, the environment of the mpv process is used instead. (Unlike the underlying OS mechanisms, the mpv command cannot start a process with empty environment. Fortunately, that is completely useless.) + * The format of the list is as in the `execle()` syscall. Each string item defines an environment variable as in `NAME=VALUE`. + */ + env?: `${string}=${string}`[]; + /** + * Feed the given string to the new process' stdin. Since this is a string, you cannot pass arbitrary binary data. + * + * If the process terminates or closes the pipe before all data is written, the remaining data is silently discarded. + * + * Probably does not work on win32. + */ + stdin_data?: string; + /** + * If enabled, wire the new process' stdin to mpv's stdin (default: no). + */ + passthrough_stdin?: boolean; + } + + /** + * Gets the shape of `subprocess` command result based on whether `capture_stderr` and `capture_stdout` are specified + */ + type GetSubprocessResult = TOpts extends { + capture_stderr: true; + capture_stdout: true; + } ? SubprocessResultWithStd + : TOpts extends { capture_stderr: true } ? SubprocessResultWithStderr + : TOpts extends { capture_stdout: true } ? SubprocessResultWithStdout + : SubprocessResultBase; + + // gets the corresponding shape of opts by command name + // TODO: change `name` to `_name` if `_name` is released officially + type GetCommandNativeOpts = TOpts["name"] extends keyof CommandNativeExtraOptsMap + ? CommandNativeOptsBase & CommandNativeExtraOptsMap[TOpts["name"]] + : CommandNativeOptsBase; + + // TODO: change `name` to `_name` if `_name` is released officially + // TODO: when only `name = 'subprocess'` is specified, this overload is not recognized, it was inferred to the overload below + // NOTE: subprocess overload has not def parameter because def is only returned when the command name(subprocess) is not correct, which should be avoided in the first place + // dedicated overload for `subprocess` command + function command_native( + opts: TOpts, + ): GetSubprocessResult; + + // NOTE: DO NOT use `CommandNativeOptsBase` as typeparam constraint here as `name` is the only key to retrieve opt type + // TODO: change `name` to `_name` if `_name` is released officially + // NOTE: some commands doesn't support named argument such as `run`, but using `Exclude` to filter `CommandName` fails the inference of `TOpts` + // TODO: `TOpts` is unconditionally inferred on left hand side, so it allows arbitrary properties which is not perfect + // This is overload for other commands + /** + * Returns `null` on success, `undefined` on error + */ + function command_native( + opts: TOpts & GetCommandNativeOpts, // & evaluates the left hand side TOpts then the right hand side, effectively incremental inference + ): null | undefined; - function command_native(table: NamedCommandOptsWithStdout, def?: unknown): ProcessWithStdout; + function command_native( + opts: TOpts & GetCommandNativeOpts, // & evaluates the left hand side TOpts then the right hand side, effectively incremental inference + def: TDefault, + ): null | TDefault; // null if success, TDefault on error - function command_native(table: NamedCommandOptsWithStderr, def?: unknown): ProcessWithStderr; + /** + * Returns `null` on success, `undefined` on error + */ + function command_native( + list: [Exclude | (string & {}), ...unknown[]], + ): null | undefined; - function command_native(table: CapturedNamedOptsCommand, def?: unknown): CapturedProcess; + /** + * Returns `null` on success, `T` on error + */ + function command_native( + list: [Exclude | (string & {}), ...unknown[]], + def: T, + ): null | T; /** * Nominal brand for return type of `mp.command_native_async`. @@ -596,10 +1203,17 @@ declare namespace mp { * If starting the command failed for some reason, `undefined` returned, and `fn` is called indicating failure, using the same error value. * `fn` is always called asynchronously, even if the command failed to start. */ - function command_native_async( - table: unknown, - fn?: (success: boolean, result: unknown, error: string | undefined) => void, - ): __AsyncCommandReturn; + // TODO: change `name` to `_name` if `_name` is released officially + function command_native_async( + opts: TOpts, + fn?: (success: boolean, result: GetSubprocessResult, error: string) => void, + ): __AsyncCommandReturn | undefined; + + // TODO: change `name` to `_name` if `_name` is released officially + function command_native_async( + opts: TOpts & GetCommandNativeOpts, + fn?: (success: boolean, result: null | undefined, error: string) => void, // result is null on success, undefined on error + ): __AsyncCommandReturn | undefined; /** * Abort a `mp.command_native_async` call. diff --git a/types/mpv-script/mpv-script-tests.ts b/types/mpv-script/mpv-script-tests.ts index 58603b3dc2d182..1820a8f892ef0c 100644 --- a/types/mpv-script/mpv-script-tests.ts +++ b/types/mpv-script/mpv-script-tests.ts @@ -1,65 +1,104 @@ -// command_native 1: Array parameter without `def`, expecting null when not occurring error or undefine on error +// @ts-expect-error +mp.commandv("subprocess", "foo", "bar"); // subprocess can only be invoked by named arguments + // $ExpectType null | undefined mp.command_native(["print-text", "test"]); -// command_native 2: Array parameter with `def`, expecting null when not occurring error or `typeof def` on error // $ExpectType null | "def" mp.command_native(["print-text", "test"], "def"); -// command_native 3: UnnamedCommandOpts without `def`, expecting undefined -// $ExpectType undefined -mp.command_native({ args: ["echo", "test"] }); - -// command_native 4: UnnamedCommandOpts with `def`, expecting `def` type -// $ExpectType "def" -mp.command_native({ args: ["echo", "test"] }, "def"); - -// command_native 5: UncapturedNamedCommandOpts without `def`, expecting UncapturedProcess return type -// $ExpectType UncapturedProcess -mp.command_native({ name: "echo", args: ["echo", "test"] }); - -// command_native 6: UncapturedNamedCommandOpts with `def`, expecting UncapturedProcess return type -// $ExpectType UncapturedProcess -mp.command_native({ name: "echo", args: ["echo", "test"] }, "def"); - -// command_native 7: NamedCommandOptsWithStdout without `def`, expecting ProcessWithStdout return type -// $ExpectType ProcessWithStdout -mp.command_native({ name: "echo", args: ["echo", "test"], capture_stdout: true }); - -// command_native 8: NamedCommandOptsWithStdout with `def`, expecting ProcessWithStdout return type -// $ExpectType ProcessWithStdout -mp.command_native({ name: "echo", args: ["echo", "test"], capture_stdout: true }, "def"); - -// command_native 9: NamedCommandOptsWithStderr without `def`, expecting ProcessWithStderr return type -// $ExpectType ProcessWithStderr -mp.command_native({ name: "echo", args: ["echo", "test"], capture_stderr: true }); +// $ExpectType SubprocessResultBase +mp.command_native({ + name: "subprocess", + args: ["echo", "test"], +}); -// command_native 10: NamedCommandOptsWithStderr with `def`, expecting ProcessWithStderr return type -// $ExpectType ProcessWithStderr -mp.command_native({ name: "echo", args: ["echo", "test"], capture_stderr: true }, "def"); +// $ExpectType "def" | null +mp.command_native({ + name: "non-exist command", + text: "foo", +}, "def"); + +// $ExpectType SubprocessResultWithStderr +mp.command_native({ + name: "subprocess", + args: ["echo", "test"], + capture_stderr: true, +}); -// command_native 11: CapturedNamedCommandOpts without `def`, expecting CapturedProcess return type -// $ExpectType CapturedProcess -mp.command_native({ name: "echo", args: ["echo", "test"], capture_stdout: true, capture_stderr: true }); +// $ExpectType SubprocessResultWithStdout +mp.command_native({ + name: "subprocess", + args: ["echo", "test"], + capture_stdout: true, +}); -// command_native 12: CapturedNamedCommandOpts with `def`, expecting CapturedProcess return type -// $ExpectType CapturedProcess -mp.command_native({ name: "echo", args: ["echo", "test"], capture_stdout: true, capture_stderr: true }, "def"); +// $ExpectType SubprocessResultWithStd +mp.command_native({ + name: "subprocess", + args: ["echo", "test"], + capture_stdout: true, + capture_stderr: true, +}); -// command_native 13: wrong options without `def` // @ts-expect-error mp.command_native({}); -// command_native 14: wrong options with `def` +// might return undefined on fail +const res = mp.command_native_async({ + name: "subprocess", + args: ["echo", "test"], +}); // @ts-expect-error -mp.command_native({}, "def"); - -// result from command_native_async can be passed to abort_async_command -const res = mp.command_native_async([], () => {}); mp.abort_async_command(res); +if (res) mp.abort_async_command(res); // @ts-expect-error mp.abort_async_command({}); +mp.command_native_async({ + name: "subprocess", + args: ["echo", "test"], +}, function(ok, res, err) { + // $ExpectType SubprocessResultBase + var r = res; +}); + +mp.command_native_async({ + name: "subprocess", + args: ["echo", "test"], +}, function(ok, res, err) { + // $ExpectType SubprocessResultBase + var r = res; +}); + +mp.command_native_async({ + name: "subprocess", + args: ["echo", "test"], + capture_stdout: true, +}, function(ok, res, err) { + // $ExpectType SubprocessResultWithStdout + var r = res; +}); + +mp.command_native_async({ + name: "subprocess", + args: ["echo", "test"], + capture_stderr: true, +}, function(ok, res, err) { + // $ExpectType SubprocessResultWithStderr + var r = res; +}); + +mp.command_native_async({ + name: "subprocess", + args: ["echo", "test"], + capture_stdout: true, + capture_stderr: true, +}, function(ok, res, err) { + // $ExpectType SubprocessResultWithStd + var r = res; +}); + // Function passed to register_event can be passed to unregister_event function onEvent() {} // @ts-expect-error diff --git a/types/openui5/openui5-tests.ts b/types/openui5/openui5-tests.ts index bdda3a77eee3b2..155d9755a7f666 100644 --- a/types/openui5/openui5-tests.ts +++ b/types/openui5/openui5-tests.ts @@ -300,3 +300,5 @@ const p13nEngine = new Engine(); // version 1.148.0 added - tests are not required as the type definitions are generated and the generator is sufficiently tested // version 1.149.0 added - tests are not required as the type definitions are generated and the generator is sufficiently tested + +// version 1.150.0 added - tests are not required as the type definitions are generated and the generator is sufficiently tested diff --git a/types/openui5/package.json b/types/openui5/package.json index 7ec8195b6e8a78..9ef734a55898a7 100644 --- a/types/openui5/package.json +++ b/types/openui5/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@types/openui5", - "version": "1.149.9999", + "version": "1.150.9999", "nonNpm": true, "nonNpmDescription": "openui5", "projects": [ diff --git a/types/openui5/sap.f.d.ts b/types/openui5/sap.f.d.ts index 57f8c852b6484a..e5e639a964edf5 100644 --- a/types/openui5/sap.f.d.ts +++ b/types/openui5/sap.f.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.149.0 +// For Library Version: 1.150.0 declare module "sap/tnt/library" { export interface IToolHeader { @@ -1509,7 +1509,7 @@ declare module "sap/f/CardBase" { import Event from "sap/ui/base/Event"; - import { CSSSize } from "sap/ui/core/library"; + import { TitleLevel, CSSSize } from "sap/ui/core/library"; import ElementMetadata from "sap/ui/core/ElementMetadata"; @@ -1686,6 +1686,21 @@ declare module "sap/f/CardBase" { * @returns The accessibility role for the `sap.f.GridContainer` item */ getGridItemRole(): string; + /** + * Gets current value of property {@link #getHeadingLevel headingLevel}. + * + * Defines the semantic level of the card header title (mapped to `aria-level`). + * + * Values `H1`–`H6` correspond to `aria-level` 1–6 and allow the application to align the card heading with + * the heading hierarchy of the surrounding page. + * + * Default value is `H3`. + * + * @since 1.150 + * + * @returns Value of property `headingLevel` + */ + getHeadingLevel(): TitleLevel; /** * Gets current value of property {@link #getHeight height}. * @@ -1721,6 +1736,28 @@ declare module "sap/f/CardBase" { * @returns Value of property `width` */ getWidth(): CSSSize; + /** + * Sets a new value for property {@link #getHeadingLevel headingLevel}. + * + * Defines the semantic level of the card header title (mapped to `aria-level`). + * + * Values `H1`–`H6` correspond to `aria-level` 1–6 and allow the application to align the card heading with + * the heading hierarchy of the surrounding page. + * + * When called with a value of `null` or `undefined`, the default value of the property will be restored. + * + * Default value is `H3`. + * + * @since 1.150 + * + * @returns Reference to `this` in order to allow method chaining + */ + setHeadingLevel( + /** + * New value for property `headingLevel` + */ + sHeadingLevel?: TitleLevel | keyof typeof TitleLevel + ): this; /** * Sets a new value for property {@link #getHeight height}. * @@ -1805,6 +1842,19 @@ declare module "sap/f/CardBase" { | PropertyBindingInfo | `{${string}}`; + /** + * Defines the semantic level of the card header title (mapped to `aria-level`). + * + * Values `H1`–`H6` correspond to `aria-level` 1–6 and allow the application to align the card heading with + * the heading hierarchy of the surrounding page. + * + * @since 1.150 + */ + headingLevel?: + | (TitleLevel | keyof typeof TitleLevel) + | PropertyBindingInfo + | `{${string}}`; + /** * Fired when action is added on card level. * @@ -5877,8 +5927,7 @@ declare module "sap/f/DynamicPageAccessibleLandmarkInfo" { /** * Describes the settings that can be provided to the DynamicPageAccessibleLandmarkInfo constructor. */ - export interface $DynamicPageAccessibleLandmarkInfoSettings - extends $ElementSettings { + export interface $DynamicPageAccessibleLandmarkInfoSettings extends $ElementSettings { /** * Landmark role of the root container of the corresponding `sap.f.DynamicPage` control. * @@ -10443,8 +10492,7 @@ declare module "sap/f/FlexibleColumnLayoutAccessibleLandmarkInfo" { /** * Describes the settings that can be provided to the FlexibleColumnLayoutAccessibleLandmarkInfo constructor. */ - export interface $FlexibleColumnLayoutAccessibleLandmarkInfoSettings - extends $ElementSettings { + export interface $FlexibleColumnLayoutAccessibleLandmarkInfoSettings extends $ElementSettings { /** * Text that describes the landmark of the first column of the corresponding `sap.f.FlexibleColumnLayout` * control. @@ -10638,8 +10686,7 @@ declare module "sap/f/FlexibleColumnLayoutData" { /** * Describes the settings that can be provided to the FlexibleColumnLayoutData constructor. */ - export interface $FlexibleColumnLayoutDataSettings - extends $LayoutDataSettings { + export interface $FlexibleColumnLayoutDataSettings extends $LayoutDataSettings { /** * Allows LayoutData of type `sap.f.FlexibleColumnLayoutDataForDesktop` */ @@ -10920,8 +10967,7 @@ declare module "sap/f/FlexibleColumnLayoutDataForDesktop" { /** * Describes the settings that can be provided to the FlexibleColumnLayoutDataForDesktop constructor. */ - export interface $FlexibleColumnLayoutDataForDesktopSettings - extends $LayoutDataSettings { + export interface $FlexibleColumnLayoutDataForDesktopSettings extends $LayoutDataSettings { /** * Columns distribution of TwoColumnsBeginExpanded layout in the format "begin/mid/end", where values are * set in percentages. @@ -11228,8 +11274,7 @@ declare module "sap/f/FlexibleColumnLayoutDataForTablet" { /** * Describes the settings that can be provided to the FlexibleColumnLayoutDataForTablet constructor. */ - export interface $FlexibleColumnLayoutDataForTabletSettings - extends $LayoutDataSettings { + export interface $FlexibleColumnLayoutDataForTabletSettings extends $LayoutDataSettings { /** * Columns distribution of TwoColumnsBeginExpanded layout in the format "begin/mid/end", where values are * set in percentages. @@ -12942,8 +12987,7 @@ declare module "sap/f/GridContainerItemLayoutData" { /** * Describes the settings that can be provided to the GridContainerItemLayoutData constructor. */ - export interface $GridContainerItemLayoutDataSettings - extends $LayoutDataSettings { + export interface $GridContainerItemLayoutDataSettings extends $LayoutDataSettings { /** * Specifies the number of columns, which the item should take * @@ -13243,8 +13287,7 @@ declare module "sap/f/GridContainerSettings" { /** * Describes the settings that can be provided to the GridContainerSettings constructor. */ - export interface $GridContainerSettingsSettings - extends $ManagedObjectSettings { + export interface $GridContainerSettingsSettings extends $ManagedObjectSettings { /** * How many columns to have on a row. * @@ -13939,8 +13982,7 @@ declare module "sap/f/IllustratedMessage" { * * @deprecated As of version 1.98. Use the {@link sap.m.IllustratedMessage} instead. */ - export interface $IllustratedMessageSettings - extends $IllustratedMessageSettings1 {} + export interface $IllustratedMessageSettings extends $IllustratedMessageSettings1 {} } declare module "sap/f/Illustration" { @@ -16437,8 +16479,7 @@ declare module "sap/f/semantic/DiscussInJamAction" { /** * Describes the settings that can be provided to the DiscussInJamAction constructor. */ - export interface $DiscussInJamActionSettings - extends $SemanticButtonSettings {} + export interface $DiscussInJamActionSettings extends $SemanticButtonSettings {} } declare module "sap/f/semantic/EditAction" { @@ -16622,8 +16663,7 @@ declare module "sap/f/semantic/ExitFullScreenAction" { /** * Describes the settings that can be provided to the ExitFullScreenAction constructor. */ - export interface $ExitFullScreenActionSettings - extends $SemanticButtonSettings {} + export interface $ExitFullScreenActionSettings extends $SemanticButtonSettings {} } declare module "sap/f/semantic/FavoriteAction" { @@ -16715,8 +16755,7 @@ declare module "sap/f/semantic/FavoriteAction" { /** * Describes the settings that can be provided to the FavoriteAction constructor. */ - export interface $FavoriteActionSettings - extends $SemanticToggleButtonSettings {} + export interface $FavoriteActionSettings extends $SemanticToggleButtonSettings {} } declare module "sap/f/semantic/FlagAction" { @@ -20326,8 +20365,7 @@ declare module "sap/f/semantic/SemanticToggleButton" { /** * Describes the settings that can be provided to the SemanticToggleButton constructor. */ - export interface $SemanticToggleButtonSettings - extends $SemanticToggleButtonSettings1 {} + export interface $SemanticToggleButtonSettings extends $SemanticToggleButtonSettings1 {} } declare module "sap/f/semantic/SendEmailAction" { diff --git a/types/openui5/sap.m.d.ts b/types/openui5/sap.m.d.ts index c2c393b3439ee5..43dd453b649ce2 100644 --- a/types/openui5/sap.m.d.ts +++ b/types/openui5/sap.m.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.149.0 +// For Library Version: 1.150.0 declare module "sap/f/library" { export interface IShellBar { @@ -2824,6 +2824,29 @@ declare module "sap/m/library" { */ Region = "Region", } + /** + * Available Panel Background Design. + * + * This enum is part of the 'sap/m/library' module export and must be accessed by the property 'PanelBackgroundDesign'. + */ + export enum PanelBackgroundDesign { + /** + * Contrasting background for a better visual grouping when a panel is placed inside a container + */ + Contrast = "Contrast", + /** + * A solid background color dependent on the theme. + */ + Solid = "Solid", + /** + * A translucent background depending on the opacity value of the theme. + */ + Translucent = "Translucent", + /** + * Transparent background. + */ + Transparent = "Transparent", + } /** * PDF viewer display types. * @@ -7376,7 +7399,14 @@ declare module "sap/m/App" { declare module "sap/m/Avatar" { import { default as Control, $ControlSettings } from "sap/ui/core/Control"; - import { ID, aria, URI, ValueState, CSSSize } from "sap/ui/core/library"; + import { + IFormContent, + ID, + aria, + URI, + ValueState, + CSSSize, + } from "sap/ui/core/library"; import Event from "sap/ui/base/Event"; @@ -7423,7 +7453,8 @@ declare module "sap/m/Avatar" { * * @since 1.73 */ - export default class Avatar extends Control { + export default class Avatar extends Control implements IFormContent { + __implements__sap_ui_core_IFormContent: boolean; /** * Constructor for a new `Avatar`. * @@ -7833,6 +7864,17 @@ declare module "sap/m/Avatar" { * @returns Value of property `fallbackIcon` */ getFallbackIcon(): string; + /** + * Implements {@link sap.ui.core.IFormContent} interface. + * + * Prevents the Form layout from stretching the `Avatar` to full width, preserving its predefined fixed + * sizes. + * + * @ui5-protected Do not call from applications (only from related classes in the framework) + * + * @returns `true` + */ + getFormDoNotAdjustWidth(): boolean; /** * Gets current value of property {@link #getImageFitType imageFitType}. * @@ -17663,8 +17705,7 @@ declare module "sap/m/ComboBox" { /** * Parameters of the ComboBox#change event. */ - export interface ComboBox$ChangeEventParameters - extends InputBase$ChangeEventParameters { + export interface ComboBox$ChangeEventParameters extends InputBase$ChangeEventParameters { /** * Indicates whether the change event was caused by selecting an item in the list */ @@ -17719,6 +17760,8 @@ declare module "sap/m/ComboBoxBase" { import List from "sap/m/List"; + import { CSSSize } from "sap/ui/core/library"; + import ElementMetadata from "sap/ui/core/ElementMetadata"; import Input from "sap/m/Input"; @@ -18052,6 +18095,19 @@ declare module "sap/m/ComboBoxBase" { * @returns The list instance object or `null`. */ getList(): List | null; + /** + * Gets current value of property {@link #getMaxPickerHeight maxPickerHeight}. + * + * Defines the maximum height of the picker popup. When the available items exceed this height, vertical + * scrolling is enabled. This property only applies to the picker popup on desktop and tablet devices. + * + * **Note:** On phones, the suggestions are displayed in a fullscreen dialog, so this property has no effect. + * + * @since 1.150 + * + * @returns Value of property `maxPickerHeight` + */ + getMaxPickerHeight(): CSSSize; /** * Gets the control's picker popup. * @@ -18287,6 +18343,26 @@ declare module "sap/m/ComboBoxBase" { */ fnFilter?: (p1?: string, p2?: Item) => boolean ): this; + /** + * Sets a new value for property {@link #getMaxPickerHeight maxPickerHeight}. + * + * Defines the maximum height of the picker popup. When the available items exceed this height, vertical + * scrolling is enabled. This property only applies to the picker popup on desktop and tablet devices. + * + * **Note:** On phones, the suggestions are displayed in a fullscreen dialog, so this property has no effect. + * + * When called with a value of `null` or `undefined`, the default value of the property will be restored. + * + * @since 1.150 + * + * @returns Reference to `this` in order to allow method chaining + */ + setMaxPickerHeight( + /** + * New value for property `maxPickerHeight` + */ + sMaxPickerHeight?: CSSSize + ): this; /** * Sets the property `_sPickerType`. * @@ -18430,6 +18506,16 @@ declare module "sap/m/ComboBoxBase" { */ showClearIcon?: boolean | PropertyBindingInfo | `{${string}}`; + /** + * Defines the maximum height of the picker popup. When the available items exceed this height, vertical + * scrolling is enabled. This property only applies to the picker popup on desktop and tablet devices. + * + * **Note:** On phones, the suggestions are displayed in a fullscreen dialog, so this property has no effect. + * + * @since 1.150 + */ + maxPickerHeight?: CSSSize | PropertyBindingInfo | `{${string}}`; + /** * Defines the items contained within this control. **Note:** Disabled items are not visualized in the list * with the available options, however they can still be accessed through the aggregation. @@ -20590,8 +20676,7 @@ declare module "sap/m/DatePicker" { /** * Parameters of the DatePicker#change event. */ - export interface DatePicker$ChangeEventParameters - extends InputBase$ChangeEventParameters { + export interface DatePicker$ChangeEventParameters extends InputBase$ChangeEventParameters { /** * Indicator for a valid date. */ @@ -21099,8 +21184,7 @@ declare module "sap/m/DateRangeSelection" { /** * Parameters of the DateRangeSelection#change event. */ - export interface DateRangeSelection$ChangeEventParameters - extends DatePicker$ChangeEventParameters { + export interface DateRangeSelection$ChangeEventParameters extends DatePicker$ChangeEventParameters { /** * Current start date after change. */ @@ -23571,6 +23655,28 @@ declare module "sap/m/Dialog" { * instead which is more RTL friendly. */ getRightButton(): ID | null; + /** + * Gets current value of property {@link #getShowFullScreenButton showFullScreenButton}. + * + * Determines whether the fullscreen toggle functionality is enabled. When set to `true`, a fullscreen button + * is shown in the dialog header, the keyboard shortcut `Shift+Ctrl+F` toggles fullscreen, and double-clicking + * the header toggles fullscreen mode on desktop devices. When set to `false` (the default), none of the + * fullscreen features are active and double-click on the header repositions the dialog. + * + * **Note:** When set to `true`, the default double-click behavior (reposition dialog to center) is replaced + * by the fullscreen toggle. + * + * The fullscreen toggle directly changes the `stretch` property. + * + * **Note:** This property has no effect on phones or when a `customHeader` is used. + * + * Default value is `false`. + * + * @since 1.149 + * + * @returns Value of property `showFullScreenButton` + */ + getShowFullScreenButton(): boolean; /** * Gets current value of property {@link #getShowHeader showHeader}. * @@ -24111,6 +24217,35 @@ declare module "sap/m/Dialog" { */ oRightButton: ID | Button ): this; + /** + * Sets a new value for property {@link #getShowFullScreenButton showFullScreenButton}. + * + * Determines whether the fullscreen toggle functionality is enabled. When set to `true`, a fullscreen button + * is shown in the dialog header, the keyboard shortcut `Shift+Ctrl+F` toggles fullscreen, and double-clicking + * the header toggles fullscreen mode on desktop devices. When set to `false` (the default), none of the + * fullscreen features are active and double-click on the header repositions the dialog. + * + * **Note:** When set to `true`, the default double-click behavior (reposition dialog to center) is replaced + * by the fullscreen toggle. + * + * The fullscreen toggle directly changes the `stretch` property. + * + * **Note:** This property has no effect on phones or when a `customHeader` is used. + * + * When called with a value of `null` or `undefined`, the default value of the property will be restored. + * + * Default value is `false`. + * + * @since 1.149 + * + * @returns Reference to `this` in order to allow method chaining + */ + setShowFullScreenButton( + /** + * New value for property `showFullScreenButton` + */ + bShowFullScreenButton?: boolean + ): this; /** * Sets a new value for property {@link #getShowHeader showHeader}. * @@ -24458,6 +24593,23 @@ declare module "sap/m/Dialog" { | PropertyBindingInfo | `{${string}}`; + /** + * Determines whether the fullscreen toggle functionality is enabled. When set to `true`, a fullscreen button + * is shown in the dialog header, the keyboard shortcut `Shift+Ctrl+F` toggles fullscreen, and double-clicking + * the header toggles fullscreen mode on desktop devices. When set to `false` (the default), none of the + * fullscreen features are active and double-click on the header repositions the dialog. + * + * **Note:** When set to `true`, the default double-click behavior (reposition dialog to center) is replaced + * by the fullscreen toggle. + * + * The fullscreen toggle directly changes the `stretch` property. + * + * **Note:** This property has no effect on phones or when a `customHeader` is used. + * + * @since 1.149 + */ + showFullScreenButton?: boolean | PropertyBindingInfo | `{${string}}`; + /** * The content inside the Dialog. * **Note:** When the content of the Dialog is comprised of controls that use `position: absolute`, such @@ -25411,6 +25563,21 @@ declare module "sap/m/DynamicDateOption" { */ oControl: DynamicDateRange ): DynamicDateRangeValue; + /** + * Returns the format type used for the ValueHelp dialog footer "Selected" date label. + * + * Override this in custom options when the default date-only label is not sufficient. Return `datetime` + * to include the time portion. + * + * + * @returns `datetime` for date-and-time formatting, or `null` for date-only formatting (default). + */ + getValueHelpUIFooterFormatTypes( + /** + * The control instance + */ + oControl: DynamicDateRange + ): string | null; /** * Defines the UI types of the option. They are used to create predefined UI for the DynamicDateRange's * value help dialog corresponding to this option. The types are DynamicDateValueHelpUIType instances. Their @@ -26974,8 +27141,7 @@ declare module "sap/m/DynamicDateValueHelpUIType" { /** * Describes the settings that can be provided to the DynamicDateValueHelpUIType constructor. */ - export interface $DynamicDateValueHelpUITypeSettings - extends $ElementSettings { + export interface $DynamicDateValueHelpUITypeSettings extends $ElementSettings { /** * One of the predefined types - "date", "daterange", "month", "int". They determine controls - calendar * or input. @@ -31759,8 +31925,7 @@ declare module "sap/m/FeedListItemAction" { /** * Describes the settings that can be provided to the FeedListItemAction constructor. */ - export interface $FeedListItemActionSettings - extends $ListItemActionBaseSettings { + export interface $FeedListItemActionSettings extends $ListItemActionBaseSettings { /** * The key of the item. */ @@ -68444,8 +68609,7 @@ declare module "sap/m/NotificationListGroup" { /** * Describes the settings that can be provided to the NotificationListGroup constructor. */ - export interface $NotificationListGroupSettings - extends $NotificationListBaseSettings { + export interface $NotificationListGroupSettings extends $NotificationListBaseSettings { /** * Determines if the group is collapsed or expanded. */ @@ -68887,8 +69051,7 @@ declare module "sap/m/NotificationListItem" { /** * Describes the settings that can be provided to the NotificationListItem constructor. */ - export interface $NotificationListItemSettings - extends $NotificationListBaseSettings { + export interface $NotificationListItemSettings extends $NotificationListBaseSettings { /** * Determines the description of the NotificationListItem. */ @@ -76536,8 +76699,7 @@ declare module "sap/m/OverflowToolbarLayoutData" { /** * Describes the settings that can be provided to the OverflowToolbarLayoutData constructor. */ - export interface $OverflowToolbarLayoutDataSettings - extends $ToolbarLayoutDataSettings { + export interface $OverflowToolbarLayoutDataSettings extends $ToolbarLayoutDataSettings { /** * The OverflowToolbar item can or cannot move to the overflow area * @@ -76655,8 +76817,7 @@ declare module "sap/m/OverflowToolbarMenuButton" { /** * Describes the settings that can be provided to the OverflowToolbarMenuButton constructor. */ - export interface $OverflowToolbarMenuButtonSettings - extends $MenuButtonSettings {} + export interface $OverflowToolbarMenuButtonSettings extends $MenuButtonSettings {} } declare module "sap/m/OverflowToolbarToggleButton" { @@ -76735,8 +76896,7 @@ declare module "sap/m/OverflowToolbarToggleButton" { /** * Describes the settings that can be provided to the OverflowToolbarToggleButton constructor. */ - export interface $OverflowToolbarToggleButtonSettings - extends $ToggleButtonSettings {} + export interface $OverflowToolbarToggleButtonSettings extends $ToggleButtonSettings {} } declare module "sap/m/OverflowToolbarTokenizer" { @@ -87940,8 +88100,7 @@ declare module "sap/m/PageAccessibleLandmarkInfo" { /** * Describes the settings that can be provided to the PageAccessibleLandmarkInfo constructor. */ - export interface $PageAccessibleLandmarkInfoSettings - extends $ElementSettings { + export interface $PageAccessibleLandmarkInfoSettings extends $ElementSettings { /** * Landmark role of the root container of the corresponding `sap.m.Page` control. * @@ -88380,7 +88539,7 @@ declare module "sap/m/PagingButton" { declare module "sap/m/Panel" { import { default as Control, $ControlSettings } from "sap/ui/core/Control"; - import { PanelAccessibleRole, BackgroundDesign } from "sap/m/library"; + import { PanelAccessibleRole, PanelBackgroundDesign } from "sap/m/library"; import Toolbar from "sap/m/Toolbar"; @@ -88632,7 +88791,7 @@ declare module "sap/m/Panel" { * Gets current value of property {@link #getBackgroundDesign backgroundDesign}. * * This property is used to set the background color of the Panel. Depending on the theme you can change - * the state of the background from "Solid" over "Translucent" to "Transparent". + * the state of the background from "Solid" over "Translucent" to "Transparent" or "Contrast". * * Default value is `Translucent`. * @@ -88640,7 +88799,7 @@ declare module "sap/m/Panel" { * * @returns Value of property `backgroundDesign` */ - getBackgroundDesign(): BackgroundDesign; + getBackgroundDesign(): PanelBackgroundDesign; /** * Gets content of aggregation {@link #getContent content}. * @@ -88832,7 +88991,7 @@ declare module "sap/m/Panel" { * Sets a new value for property {@link #getBackgroundDesign backgroundDesign}. * * This property is used to set the background color of the Panel. Depending on the theme you can change - * the state of the background from "Solid" over "Translucent" to "Transparent". + * the state of the background from "Solid" over "Translucent" to "Transparent" or "Contrast". * * When called with a value of `null` or `undefined`, the default value of the property will be restored. * @@ -88846,7 +89005,9 @@ declare module "sap/m/Panel" { /** * New value for property `backgroundDesign` */ - sBackgroundDesign?: BackgroundDesign | keyof typeof BackgroundDesign + sBackgroundDesign?: + | PanelBackgroundDesign + | keyof typeof PanelBackgroundDesign ): this; /** * Sets a new value for property {@link #getExpandable expandable}. @@ -89052,12 +89213,12 @@ declare module "sap/m/Panel" { /** * This property is used to set the background color of the Panel. Depending on the theme you can change - * the state of the background from "Solid" over "Translucent" to "Transparent". + * the state of the background from "Solid" over "Translucent" to "Transparent" or "Contrast". * * @since 1.30 */ backgroundDesign?: - | (BackgroundDesign | keyof typeof BackgroundDesign) + | (PanelBackgroundDesign | keyof typeof PanelBackgroundDesign) | PropertyBindingInfo | `{${string}}`; @@ -93020,8 +93181,7 @@ declare module "sap/m/PlanningCalendarLegend" { /** * Describes the settings that can be provided to the PlanningCalendarLegend constructor. */ - export interface $PlanningCalendarLegendSettings - extends $CalendarLegendSettings { + export interface $PlanningCalendarLegendSettings extends $CalendarLegendSettings { /** * Defines the text displayed in the header of the items list. It is commonly related to the calendar days. */ @@ -93661,6 +93821,8 @@ declare module "sap/m/PlanningCalendarRow" { * **Note:** In "One month" view, the appointments are not draggable on small screen (as there they are * displayed as a list below the dates). Group appointments are also not draggable. * + * **Note:** Drag and drop is currently not supported for occurrences of {@link sap.ui.unified.RecurringCalendarAppointment recurring appointments}. + * * **Note:** Additional application-level code will be needed to provide a keyboard alternative to drag * and drop mouse interactions. One possible option is by handling {@link sap.m.PlanningCalendar#event:appointmentSelect appointmentSelect } * event of the `sap.m.PlanningCalendar`, as shown in the following simplified example: @@ -94210,6 +94372,8 @@ declare module "sap/m/PlanningCalendarRow" { * **Note:** In "One month" view, the appointments are not draggable on small screen (as there they are * displayed as a list below the dates). Group appointments are also not draggable. * + * **Note:** Drag and drop is currently not supported for occurrences of {@link sap.ui.unified.RecurringCalendarAppointment recurring appointments}. + * * **Note:** Additional application-level code will be needed to provide a keyboard alternative to drag * and drop mouse interactions. One possible option is by handling {@link sap.m.PlanningCalendar#event:appointmentSelect appointmentSelect } * event of the `sap.m.PlanningCalendar`, as shown in the following simplified example: @@ -94542,6 +94706,8 @@ declare module "sap/m/PlanningCalendarRow" { * **Note:** In "One month" view, the appointments are not draggable on small screen (as there they are * displayed as a list below the dates). Group appointments are also not draggable. * + * **Note:** Drag and drop is currently not supported for occurrences of {@link sap.ui.unified.RecurringCalendarAppointment recurring appointments}. + * * **Note:** Additional application-level code will be needed to provide a keyboard alternative to drag * and drop mouse interactions. One possible option is by handling {@link sap.m.PlanningCalendar#event:appointmentSelect appointmentSelect } * event of the `sap.m.PlanningCalendar`, as shown in the following simplified example: @@ -122510,8 +122676,7 @@ declare module "sap/m/semantic/DiscussInJamAction" { /** * Describes the settings that can be provided to the DiscussInJamAction constructor. */ - export interface $DiscussInJamActionSettings - extends $SemanticButtonSettings {} + export interface $DiscussInJamActionSettings extends $SemanticButtonSettings {} } declare module "sap/m/semantic/EditAction" { @@ -122695,8 +122860,7 @@ declare module "sap/m/semantic/FavoriteAction" { /** * Describes the settings that can be provided to the FavoriteAction constructor. */ - export interface $FavoriteActionSettings - extends $SemanticToggleButtonSettings {} + export interface $FavoriteActionSettings extends $SemanticToggleButtonSettings {} } declare module "sap/m/semantic/FilterAction" { @@ -124930,8 +125094,7 @@ declare module "sap/m/semantic/MultiSelectAction" { /** * Describes the settings that can be provided to the MultiSelectAction constructor. */ - export interface $MultiSelectActionSettings - extends $SemanticToggleButtonSettings {} + export interface $MultiSelectActionSettings extends $SemanticToggleButtonSettings {} } declare module "sap/m/semantic/NegativeAction" { @@ -127173,8 +127336,7 @@ declare module "sap/m/semantic/SemanticToggleButton" { /** * Describes the settings that can be provided to the SemanticToggleButton constructor. */ - export interface $SemanticToggleButtonSettings - extends $SemanticButtonSettings { + export interface $SemanticToggleButtonSettings extends $SemanticButtonSettings { /** * The property is “true” when the control is toggled. The default state of this property is "false". */ @@ -131325,8 +131487,7 @@ declare module "sap/m/SinglePlanningCalendarDayView" { /** * Describes the settings that can be provided to the SinglePlanningCalendarDayView constructor. */ - export interface $SinglePlanningCalendarDayViewSettings - extends $SinglePlanningCalendarViewSettings {} + export interface $SinglePlanningCalendarDayViewSettings extends $SinglePlanningCalendarViewSettings {} } declare module "sap/m/SinglePlanningCalendarMonthView" { @@ -131416,8 +131577,7 @@ declare module "sap/m/SinglePlanningCalendarMonthView" { /** * Describes the settings that can be provided to the SinglePlanningCalendarMonthView constructor. */ - export interface $SinglePlanningCalendarMonthViewSettings - extends $SinglePlanningCalendarViewSettings {} + export interface $SinglePlanningCalendarMonthViewSettings extends $SinglePlanningCalendarViewSettings {} } declare module "sap/m/SinglePlanningCalendarView" { @@ -131654,8 +131814,7 @@ declare module "sap/m/SinglePlanningCalendarView" { /** * Describes the settings that can be provided to the SinglePlanningCalendarView constructor. */ - export interface $SinglePlanningCalendarViewSettings - extends $ElementSettings { + export interface $SinglePlanningCalendarViewSettings extends $ElementSettings { /** * Indicates a unique key for the view */ @@ -131777,8 +131936,7 @@ declare module "sap/m/SinglePlanningCalendarWeekView" { /** * Describes the settings that can be provided to the SinglePlanningCalendarWeekView constructor. */ - export interface $SinglePlanningCalendarWeekViewSettings - extends $SinglePlanningCalendarViewSettings {} + export interface $SinglePlanningCalendarWeekViewSettings extends $SinglePlanningCalendarViewSettings {} } declare module "sap/m/SinglePlanningCalendarWorkWeekView" { @@ -131868,8 +132026,7 @@ declare module "sap/m/SinglePlanningCalendarWorkWeekView" { /** * Describes the settings that can be provided to the SinglePlanningCalendarWorkWeekView constructor. */ - export interface $SinglePlanningCalendarWorkWeekViewSettings - extends $SinglePlanningCalendarViewSettings {} + export interface $SinglePlanningCalendarWorkWeekViewSettings extends $SinglePlanningCalendarViewSettings {} } declare module "sap/m/Slider" { @@ -136443,6 +136600,19 @@ declare module "sap/m/StandardListItem" { * @returns Value of property `info` */ getInfo(): string; + /** + * Gets current value of property {@link #getInfoIcon infoIcon}. + * + * Defines the icon that is shown together with the info text. The icon is displayed to the left of the + * info text. + * + * **Note:** This property has no visible effect if the `info` property is not set. + * + * @since 1.150 + * + * @returns Value of property `infoIcon` + */ + getInfoIcon(): URI; /** * Gets current value of property {@link #getInfoState infoState}. * @@ -136532,8 +136702,7 @@ declare module "sap/m/StandardListItem" { * In the desktop mode, initial rendering of the control contains 300 characters along with a button to * expand and collapse the text whereas in the phone mode, the character limit is set to 100 characters. * A wrapping of the information text is supported as of 1.95. But expanding and collapsing the information - * text is not possible. A wrapping of the information text is disabled if `infoStateInverted` is set to - * `true`. + * text is not possible. * * Default value is `false`. * @@ -136683,6 +136852,26 @@ declare module "sap/m/StandardListItem" { */ sInfo?: string ): this; + /** + * Sets a new value for property {@link #getInfoIcon infoIcon}. + * + * Defines the icon that is shown together with the info text. The icon is displayed to the left of the + * info text. + * + * **Note:** This property has no visible effect if the `info` property is not set. + * + * When called with a value of `null` or `undefined`, the default value of the property will be restored. + * + * @since 1.150 + * + * @returns Reference to `this` in order to allow method chaining + */ + setInfoIcon( + /** + * New value for property `infoIcon` + */ + sInfoIcon?: URI + ): this; /** * Sets a new value for property {@link #getInfoState infoState}. * @@ -136814,8 +137003,7 @@ declare module "sap/m/StandardListItem" { * In the desktop mode, initial rendering of the control contains 300 characters along with a button to * expand and collapse the text whereas in the phone mode, the character limit is set to 100 characters. * A wrapping of the information text is supported as of 1.95. But expanding and collapsing the information - * text is not possible. A wrapping of the information text is disabled if `infoStateInverted` is set to - * `true`. + * text is not possible. * * When called with a value of `null` or `undefined`, the default value of the property will be restored. * @@ -136886,6 +137074,16 @@ declare module "sap/m/StandardListItem" { | PropertyBindingInfo | `{${string}}`; + /** + * Defines the icon that is shown together with the info text. The icon is displayed to the left of the + * info text. + * + * **Note:** This property has no visible effect if the `info` property is not set. + * + * @since 1.150 + */ + infoIcon?: URI | PropertyBindingInfo | `{${string}}`; + /** * By default, the title size adapts to the available space and gets bigger if the description is empty. * If you have list items with and without descriptions, this results in titles with different sizes. In @@ -136925,8 +137123,7 @@ declare module "sap/m/StandardListItem" { * In the desktop mode, initial rendering of the control contains 300 characters along with a button to * expand and collapse the text whereas in the phone mode, the character limit is set to 100 characters. * A wrapping of the information text is supported as of 1.95. But expanding and collapsing the information - * text is not possible. A wrapping of the information text is disabled if `infoStateInverted` is set to - * `true`. + * text is not possible. * * @since 1.67 */ @@ -141405,8 +141602,7 @@ declare module "sap/m/Table" { /** * Parameters of the Table#beforeOpenContextMenu event. */ - export interface Table$BeforeOpenContextMenuEventParameters - extends ListBase$BeforeOpenContextMenuEventParameters { + export interface Table$BeforeOpenContextMenuEventParameters extends ListBase$BeforeOpenContextMenuEventParameters { /** * Column in which the context menu was opened. **Note:** This parameter might be undefined for the items * that are not part of a column definition. @@ -146249,8 +146445,7 @@ declare module "sap/m/TablePersoController" { * @deprecated As of version 1.115. Please use the {@link sap.m.p13n.Engine Engine} for personalization * instead. */ - export interface $TablePersoControllerSettings - extends $ManagedObjectSettings { + export interface $TablePersoControllerSettings extends $ManagedObjectSettings { contentWidth?: CSSSize | PropertyBindingInfo | `{${string}}`; contentHeight?: CSSSize | PropertyBindingInfo | `{${string}}`; @@ -148155,8 +148350,7 @@ declare module "sap/m/TableSelectDialog" { /** * Describes the settings that can be provided to the TableSelectDialog constructor. */ - export interface $TableSelectDialogSettings - extends $SelectDialogBaseSettings { + export interface $TableSelectDialogSettings extends $SelectDialogBaseSettings { /** * Specifies the title text in the dialog header. */ @@ -152665,8 +152859,7 @@ declare module "sap/m/TimePicker" { /** * Parameters of the TimePicker#change event. */ - export interface TimePicker$ChangeEventParameters - extends InputBase$ChangeEventParameters { + export interface TimePicker$ChangeEventParameters extends InputBase$ChangeEventParameters { /** * Indicator for a valid time */ @@ -152684,8 +152877,7 @@ declare module "sap/m/TimePicker" { /** * Parameters of the TimePicker#liveChange event. */ - export interface TimePicker$LiveChangeEventParameters - extends DateTimeField$LiveChangeEventParameters {} + export interface TimePicker$LiveChangeEventParameters extends DateTimeField$LiveChangeEventParameters {} /** * Event object of the TimePicker#liveChange event. @@ -154268,8 +154460,7 @@ declare module "sap/m/ToggleButton" { /** * Parameters of the ToggleButton#press event. */ - export interface ToggleButton$PressEventParameters - extends Button$PressEventParameters { + export interface ToggleButton$PressEventParameters extends Button$PressEventParameters { /** * The current pressed state of the control. */ @@ -158330,14 +158521,14 @@ declare module "sap/m/upload/FilePreviewDialog" { * * Supported File Types for Preview: * - * Following are the supported file types that can be previewed: + * The following file types are supported for preview: * * * - Image (PNG, JPEG, BMP, GIF) * - PDF * - Text (Txt) - * - Video (MP4, MPEG, Quicktime, MsVideo) - * - SAP 3D Visual models (VDS) + * - Video (MP4, QuickTime, WebM, OGG) — playback depends on browser codec support. + * - SAP 3D Visual models (VDS) — requires {@link sap.ui.vk} and WebGL support. * * @since 1.120 */ @@ -166031,8 +166222,7 @@ declare module "sap/m/upload/UploadSetToolbarPlaceholder" { * * @deprecated As of version 1.129. replaced by {@link sap.m.upload.ActionsPlaceholder} */ - export interface $UploadSetToolbarPlaceholderSettings - extends $ControlSettings {} + export interface $UploadSetToolbarPlaceholderSettings extends $ControlSettings {} } declare module "sap/m/UploadCollection" { @@ -169843,8 +170033,7 @@ declare module "sap/m/UploadCollectionToolbarPlaceholder" { * * @deprecated As of version 1.88. replaced by {@link sap.m.upload.UploadSetToolbarPlaceholder}. */ - export interface $UploadCollectionToolbarPlaceholderSettings - extends $ControlSettings {} + export interface $UploadCollectionToolbarPlaceholderSettings extends $ControlSettings {} } declare module "sap/m/VariantItem" { @@ -171950,8 +172139,7 @@ declare module "sap/m/ViewSettingsCustomItem" { /** * Describes the settings that can be provided to the ViewSettingsCustomItem constructor. */ - export interface $ViewSettingsCustomItemSettings - extends $ViewSettingsItemSettings { + export interface $ViewSettingsCustomItemSettings extends $ViewSettingsItemSettings { /** * The number of currently active filters for this custom filter item. It will be displayed in the filter * list of the ViewSettingsDialog to represent the filter state of the custom control. @@ -172422,8 +172610,7 @@ declare module "sap/m/ViewSettingsFilterItem" { /** * Describes the settings that can be provided to the ViewSettingsFilterItem constructor. */ - export interface $ViewSettingsFilterItemSettings - extends $ViewSettingsItemSettings { + export interface $ViewSettingsFilterItemSettings extends $ViewSettingsItemSettings { /** * If set to (true), multi selection will be allowed for the items aggregation. */ diff --git a/types/openui5/sap.tnt.d.ts b/types/openui5/sap.tnt.d.ts index 6452856fba7b75..d45f5708aa8df0 100644 --- a/types/openui5/sap.tnt.d.ts +++ b/types/openui5/sap.tnt.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.149.0 +// For Library Version: 1.150.0 declare module "sap/tnt/library" { /** @@ -1439,8 +1439,7 @@ declare module "sap/tnt/NavigationListGroup" { /** * Describes the settings that can be provided to the NavigationListGroup constructor. */ - export interface $NavigationListGroupSettings - extends $NavigationListItemBaseSettings { + export interface $NavigationListGroupSettings extends $NavigationListItemBaseSettings { /** * The sub items. * @@ -2004,8 +2003,7 @@ declare module "sap/tnt/NavigationListItem" { /** * Describes the settings that can be provided to the NavigationListItem constructor. */ - export interface $NavigationListItemSettings - extends $NavigationListItemBaseSettings { + export interface $NavigationListItemSettings extends $NavigationListItemBaseSettings { /** * Specifies the icon for the item. * @@ -3342,8 +3340,7 @@ declare module "sap/tnt/ToolHeaderUtilitySeparator" { /** * Describes the settings that can be provided to the ToolHeaderUtilitySeparator constructor. */ - export interface $ToolHeaderUtilitySeparatorSettings - extends $ControlSettings {} + export interface $ToolHeaderUtilitySeparatorSettings extends $ControlSettings {} } declare module "sap/tnt/ToolPage" { diff --git a/types/openui5/sap.ui.codeeditor.d.ts b/types/openui5/sap.ui.codeeditor.d.ts index 381fb9da6c5a3d..da072a865ba731 100644 --- a/types/openui5/sap.ui.codeeditor.d.ts +++ b/types/openui5/sap.ui.codeeditor.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.149.0 +// For Library Version: 1.150.0 declare module "sap/ui/codeeditor/library" {} diff --git a/types/openui5/sap.ui.commons.d.ts b/types/openui5/sap.ui.commons.d.ts index 680360e6153764..722fc316eaf4aa 100644 --- a/types/openui5/sap.ui.commons.d.ts +++ b/types/openui5/sap.ui.commons.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.149.0 +// For Library Version: 1.150.0 declare module "sap/ui/commons/library" { import { ColorPickerMode as ColorPickerMode1 } from "sap/ui/unified/library"; @@ -6242,8 +6242,7 @@ declare module "sap/ui/commons/ComboBox" { /** * Parameters of the ComboBox#change event. */ - export interface ComboBox$ChangeEventParameters - extends TextField$ChangeEventParameters { + export interface ComboBox$ChangeEventParameters extends TextField$ChangeEventParameters { /** * The new / changed item of the ComboBox. */ @@ -12985,8 +12984,7 @@ declare module "sap/ui/commons/form/GridContainerData" { * * @deprecated As of version 1.16.0. moved to sap.ui.layout library. Please use this one. */ - export interface $GridContainerDataSettings - extends $GridContainerDataSettings1 {} + export interface $GridContainerDataSettings extends $GridContainerDataSettings1 {} } declare module "sap/ui/commons/form/GridElementData" { @@ -13265,8 +13263,7 @@ declare module "sap/ui/commons/form/ResponsiveLayout" { * * @deprecated As of version 1.16.0. moved to sap.ui.layout library. Please use this one. */ - export interface $ResponsiveLayoutSettings - extends $ResponsiveLayoutSettings1 {} + export interface $ResponsiveLayoutSettings extends $ResponsiveLayoutSettings1 {} } declare module "sap/ui/commons/form/SimpleForm" { @@ -16428,8 +16425,7 @@ declare module "sap/ui/commons/layout/HorizontalLayout" { * * @deprecated As of version 1.38. Instead, use the `sap.ui.layout.HorizontalLayout` control. */ - export interface $HorizontalLayoutSettings - extends $HorizontalLayoutSettings1 {} + export interface $HorizontalLayoutSettings extends $HorizontalLayoutSettings1 {} } declare module "sap/ui/commons/layout/MatrixLayout" { @@ -17982,8 +17978,7 @@ declare module "sap/ui/commons/layout/ResponsiveFlowLayout" { * * @deprecated As of version 1.16.0. moved to sap.ui.layout library. Please use this one. */ - export interface $ResponsiveFlowLayoutSettings - extends $ResponsiveFlowLayoutSettings1 {} + export interface $ResponsiveFlowLayoutSettings extends $ResponsiveFlowLayoutSettings1 {} } declare module "sap/ui/commons/layout/ResponsiveFlowLayoutData" { @@ -18100,8 +18095,7 @@ declare module "sap/ui/commons/layout/ResponsiveFlowLayoutData" { * * @deprecated As of version 1.16.0. moved to sap.ui.layout library. Please use this one. */ - export interface $ResponsiveFlowLayoutDataSettings - extends $ResponsiveFlowLayoutDataSettings1 {} + export interface $ResponsiveFlowLayoutDataSettings extends $ResponsiveFlowLayoutDataSettings1 {} } declare module "sap/ui/commons/layout/VerticalLayout" { @@ -20446,8 +20440,7 @@ declare module "sap/ui/commons/MenuButton" { /** * Parameters of the MenuButton#press event. */ - export interface MenuButton$PressEventParameters - extends Button$PressEventParameters { + export interface MenuButton$PressEventParameters extends Button$PressEventParameters { /** * The id of the selected item */ @@ -20697,8 +20690,7 @@ declare module "sap/ui/commons/MenuTextFieldItem" { * @deprecated As of version 1.21.0. Please use the control `sap.ui.unified.MenuTextFieldItem` of the library * `sap.ui.unified` instead. */ - export interface $MenuTextFieldItemSettings - extends $MenuTextFieldItemSettings1 {} + export interface $MenuTextFieldItemSettings extends $MenuTextFieldItemSettings1 {} } declare module "sap/ui/commons/Message" { @@ -29419,8 +29411,7 @@ declare module "sap/ui/commons/SearchProvider" { * * @deprecated As of version 1.6.0. Replaced by sap.ui.core.search.OpenSearchProvider */ - export interface $SearchProviderSettings - extends $OpenSearchProviderSettings {} + export interface $SearchProviderSettings extends $OpenSearchProviderSettings {} } declare module "sap/ui/commons/SegmentedButton" { diff --git a/types/openui5/sap.ui.core.d.ts b/types/openui5/sap.ui.core.d.ts index b21f34c5df3041..983c34ca8e8652 100644 --- a/types/openui5/sap.ui.core.d.ts +++ b/types/openui5/sap.ui.core.d.ts @@ -279,7 +279,7 @@ declare namespace sap { "sap/ui/thirdparty/qunit-2": undefined; } } -// For Library Version: 1.149.0 +// For Library Version: 1.150.0 declare module "sap/base/assert" { /** @@ -6844,6 +6844,7 @@ declare module "sap/ui/model/odata/v2/ODataModel" { * See: * {@link http://www.sap.com/protocols/SAPData "SAP Annotations for OData Version 2.0" Specification} * + * @deprecated As of version 1.150.0. will be replaced by OData V4 hierarchy functionality, see {@link topic:7d914317c0b64c23824bf932cc8a4ae1/section_RCH Recursive Hierarchy} * * @returns The new tree binding */ @@ -8959,8 +8960,7 @@ declare module "sap/ui/model/odata/v2/ODataModel" { /** * Parameters of the ODataModel#requestCompleted event. */ - export interface ODataModel$RequestCompletedEventParameters - extends Model$RequestCompletedEventParameters { + export interface ODataModel$RequestCompletedEventParameters extends Model$RequestCompletedEventParameters { /** * The request ID */ @@ -8994,8 +8994,7 @@ declare module "sap/ui/model/odata/v2/ODataModel" { /** * Parameters of the ODataModel#requestFailed event. */ - export interface ODataModel$RequestFailedEventParameters - extends Model$RequestFailedEventParameters { + export interface ODataModel$RequestFailedEventParameters extends Model$RequestFailedEventParameters { /** * The request ID */ @@ -9044,8 +9043,7 @@ declare module "sap/ui/model/odata/v2/ODataModel" { /** * Parameters of the ODataModel#requestSent event. */ - export interface ODataModel$RequestSentEventParameters - extends Model$RequestSentEventParameters { + export interface ODataModel$RequestSentEventParameters extends Model$RequestSentEventParameters { /** * The request ID */ @@ -12027,9 +12025,9 @@ declare module "sap/ui/base/Event" { * the event handler is done. */ export default class Event< - ParamsType extends Record = object, - SourceType extends EventProvider = EventProvider, - > + ParamsType extends Record = object, + SourceType extends EventProvider = EventProvider, + > extends BaseObject implements Poolable { @@ -20492,6 +20490,13 @@ declare module "sap/ui/core/ComponentContainer" { * and the models will be propagated if defined. If the `usage` property is set the ComponentLifecycle is * processed like a "Container" lifecycle. * + * **Note:** The `component` association is stored by ID, not by object reference (see {@link sap.ui.base.ManagedObject#setAssociation}). + * Setting an ID that equals the currently stored one is treated as a no-op. When a previously associated + * UIComponent is destroyed via {@link sap.ui.core.UIComponent#destroy}, the association is **not** cleared + * automatically. If, however, the application destroys the component differently or replaces it with a + * new instance that happens to share the same ID, the stale ID must be cleared explicitly by calling `setComponent(null)` + * before assigning the new instance. + * * * @returns the reference to `this` in order to allow method chaining */ @@ -20500,7 +20505,7 @@ declare module "sap/ui/core/ComponentContainer" { * ID of an element which becomes the new target of this component association. Alternatively, an element * instance may be given. */ - vComponent: ID | UIComponent + vComponent: ID | UIComponent | null ): this; /** * Sets a new value for property {@link #getHandleValidation handleValidation}. @@ -30529,172 +30534,7 @@ declare module "sap/ui/core/format/NumberFormat" { * The option object, which supports the following parameters. If no options are given, default values according * to the type and locale settings are used. */ - oFormatOptions?: { - /** - * defines whether the currency is shown as a code in currency format. The currency symbol is displayed - * when this option is set to `false` and a symbol has been defined for the given currency code. - */ - currencyCode?: boolean; - /** - * can be set either to 'standard' (the default value) or to 'accounting' for an accounting-specific currency - * display - */ - currencyContext?: string; - /** - * defines a set of custom currencies exclusive to this NumberFormat instance. Custom currencies must not - * only consist of digits. If custom currencies are defined on the instance, no other currencies can be - * formatted and parsed by this instance. Globally available custom currencies can be added via the global - * configuration. See the above examples. See also {@link module:sap/base/i18n/Formatting.setCustomCurrencies Formatting.setCustomCurrencies } - * and {@link module:sap/base/i18n/Formatting.addCustomCurrencies Formatting.addCustomCurrencies}. - */ - customCurrencies?: Record; - /** - * The target length of places after the decimal separator; if the number has fewer decimal places than - * given in this option, it is padded with whitespaces at the end up to the target length. An additional - * whitespace character for the decimal separator is added for a number without any decimals. **Note:** - * This format option is only allowed if the following conditions apply: - * - It has a value greater than 0. - * - The `FormatOptions.showMeasure` format option is set to `false`. - * - The `oFormatOptions.style` format option is **not** set to `"short"` or `"long"`. - */ - decimalPadding?: int; - /** - * defines the number of decimal digits - */ - decimals?: int; - /** - * defines the character used as decimal separator. Note: `decimalSeparator` must always be different from - * `groupingSeparator`. - */ - decimalSeparator?: string; - /** - * since 1.30.0 defines what an empty string is parsed as, and what is formatted as an empty string. The - * allowed values are "" (empty string), NaN, `null`, or 0. The 'format' and 'parse' functions are done - * in a symmetric way. For example, when this parameter is set to NaN, an empty string is parsed as [NaN, - * undefined], and NaN is formatted as an empty string. - */ - emptyString?: null | number | string; - /** - * defines the grouping base size in digits if it is different from the grouping size (e.g. Indian grouping) - */ - groupingBaseSize?: int; - /** - * defines whether grouping is enabled (grouping separators are shown). **Note:** Grouping is disabled if - * the `groupingSize` format option is set to a non-positive value. - */ - groupingEnabled?: boolean; - /** - * defines the character used as grouping separator. Note: `groupingSeparator` must always be different - * from `decimalSeparator`. - */ - groupingSeparator?: string; - /** - * defines the grouping size in digits; the default is `3`. **Note:** If this format option is set to a - * non-positive value, grouping will be disabled entirely. - */ - groupingSize?: int; - /** - * defines the maximum number of decimal digits - */ - maxFractionDigits?: int; - /** - * defines the maximum number of non-decimal digits. If the number exceeds this maximum, e.g. 1e+120, "?" - * characters are shown instead of digits. - */ - maxIntegerDigits?: int; - /** - * Deprecated as of 1.130; this format option does not have an effect on currency formats since decimals - * can always be determined, either through the given format options, custom currencies or the CLDR - */ - minFractionDigits?: int; - /** - * defines the minimal number of non-decimal digits - */ - minIntegerDigits?: int; - /** - * defines the used minus symbol - */ - minusSign?: string; - /** - * since 1.28.2 defines whether to output the string from the parse function in order to keep the precision - * for big numbers. Numbers in scientific notation are parsed back to standard notation. For example, "5e-3" - * is parsed to "0.005". - */ - parseAsString?: boolean; - /** - * CLDR number pattern which is used to format the number - */ - pattern?: string; - /** - * defines the used plus symbol - */ - plusSign?: string; - /** - * Whether {@link #format} preserves decimal digits except trailing zeros in case there are more decimals - * than the `maxFractionDigits` format option allows. If decimals are not preserved, the formatted number - * is rounded to `maxFractionDigits`. - */ - preserveDecimals?: boolean; - /** - * Specifies the rounding behavior for discarding the digits after the maximum fraction digits defined by - * `maxFractionDigits`. This can be assigned - * - by value in {@link sap.ui.core.format.NumberFormat.RoundingMode RoundingMode}, - * - via a function that is used for rounding the number and takes two parameters: the number itself, - * and the number of decimal digits that should be reserved. **Using a function is deprecated since 1.121.0**; - * string based numbers are not rounded via this custom function. - */ - roundingMode?: RoundingMode | keyof typeof RoundingMode; - /** - * defines the number of decimal in the shortened format string. If this isn't specified, the 'decimals' - * options is used - */ - shortDecimals?: int; - /** - * only use short number formatting for values above this limit - */ - shortLimit?: int; - /** - * since 1.40 specifies a number from which the scale factor for 'short' or 'long' style format is generated. - * The generated scale factor is used for all numbers which are formatted with this format instance. This - * option has effect only when the option 'style' is set to 'short' or 'long'. This option is by default - * set with `undefined` which means the scale factor is selected automatically for each number being formatted. - */ - shortRefNumber?: int; - /** - * defines whether the currency code/symbol is shown in the formatted string, e.g. true: "1.00 EUR", false: - * "1.00" for locale "en" If both `showMeasure` and `showNumber` are false, an empty string is returned - */ - showMeasure?: boolean; - /** - * defines whether the number is shown as part of the result string, e.g. 1 EUR for locale "en" `NumberFormat.getCurrencyInstance({showNumber:true}).format(1, - * "EUR"); // "1.00 EUR"` `NumberFormat.getCurrencyInstance({showNumber:false}).format(1, "EUR"); // "EUR"` - * If both `showMeasure` and `showNumber` are false, an empty string is returned - */ - showNumber?: boolean; - /** - * since 1.40 specifies whether the scale factor is shown in the formatted number. This option takes effect - * only when the 'style' options is set to either 'short' or 'long'. - */ - showScale?: boolean; - /** - * whether the positions of grouping separators are validated. Space characters used as grouping separators - * are not validated. - */ - strictGroupingValidation?: boolean; - /** - * defines the style of format. Valid values are 'short, 'long' or 'standard' (based on the CLDR decimalFormat). - * When set to 'short' or 'long', numbers are formatted into the 'short' form only. When this option is - * set, the default value of the 'precision' option is set to 2. This can be changed by setting either min/maxFractionDigits, - * decimals, shortDecimals, or the 'precision' option itself. - */ - style?: string; - /** - * overrides the global configuration value {@link module:sap/base/i18n/Formatting.getTrailingCurrencyCode Formatting.getTrailingCurrencyCode}, - * which has a default value of `true. This is ignored if oFormatOptions.currencyCode` is set to - * `false`, or if `oFormatOptions.pattern` is supplied. - */ - trailingCurrencyCode?: boolean; - }, + oFormatOptions?: CurrencyFormatOptions, /** * The locale to get the formatter for; if no locale is given, a locale for the currently configured language * is used; see {@link module:sap/base/i18n/Formatting.getLanguageTag Formatting.getLanguageTag} @@ -30947,167 +30787,7 @@ declare module "sap/ui/core/format/NumberFormat" { * The option object, which supports the following parameters. If no options are given, default values according * to the type and locale settings are used. */ - oFormatOptions?: { - /** - * defines the allowed units for formatting and parsing, e.g. ["size-meter", "volume-liter", ...] - */ - allowedUnits?: any[]; - /** - * defines a set of custom units, e.g. {"electric-inductance": { "displayName": "henry", "unitPattern-count-one": - * "{0} H", "unitPattern-count-other": "{0} H", "perUnitPattern": "{0}/H", "decimals": 2, "precision": 4 - * }} - */ - customUnits?: Record; - /** - * The target length of places after the decimal separator; if the number has fewer decimal places than - * given in this option, it is padded with whitespaces at the end up to the target length. An additional - * whitespace character for the decimal separator is added for a number without any decimals. **Note:** - * This format option is only allowed if the following conditions apply: - * - It has a value greater than 0. - * - The `FormatOptions.showMeasure` format option is set to `false`. - * - The `oFormatOptions.style` format option is **not** set to `"short"` or `"long"`. - */ - decimalPadding?: int; - /** - * defines the number of decimal digits - */ - decimals?: int; - /** - * defines the character used as decimal separator. Note: `decimalSeparator` must always be different from - * `groupingSeparator`. - */ - decimalSeparator?: string; - /** - * since 1.30.0 defines what an empty string is parsed as, and what is formatted as an empty string. The - * allowed values are "" (empty string), NaN, `null`, or 0. The 'format' and 'parse' functions are done - * in a symmetric way. For example, when this parameter is set to NaN, an empty string is parsed as [NaN, - * undefined], and NaN is formatted as an empty string. - */ - emptyString?: null | number | string; - /** - * defines the grouping base size in digits if it is different from the grouping size (e.g. Indian grouping) - */ - groupingBaseSize?: int; - /** - * defines whether grouping is enabled (grouping separators are shown). **Note:** Grouping is disabled if - * the `groupingSize` format option is set to a non-positive value. - */ - groupingEnabled?: boolean; - /** - * defines the character used as grouping separator. Note: `groupingSeparator` must always be different - * from `decimalSeparator`. - */ - groupingSeparator?: string; - /** - * defines the grouping size in digits; the default is `3`. **Note:** If this format option is set to a - * non-positive value, grouping will be disabled entirely. - */ - groupingSize?: int; - /** - * defines the maximum number of decimal digits - */ - maxFractionDigits?: int; - /** - * defines the maximum number of non-decimal digits. If the number exceeds this maximum, e.g. 1e+120, "?" - * characters are shown instead of digits. - */ - maxIntegerDigits?: int; - /** - * defines the minimal number of decimal digits - */ - minFractionDigits?: int; - /** - * defines the minimal number of non-decimal digits - */ - minIntegerDigits?: int; - /** - * defines the used minus symbol - */ - minusSign?: string; - /** - * since 1.28.2 defines whether to output the string from the parse function in order to keep the precision - * for big numbers. Numbers in scientific notation are parsed back to standard notation. For example, "5e-3" - * is parsed to "0.005". - */ - parseAsString?: boolean; - /** - * CLDR number pattern which is used to format the number - */ - pattern?: string; - /** - * defines the used plus symbol - */ - plusSign?: string; - /** - * The maximum number of digits in the formatted representation of a number; if the `precision` is less - * than the overall length of the number, its fractional part is truncated through rounding. As the `precision` - * only affects the rounding of a number, its integer part can retain more digits than defined by this parameter. - * **Example:** With a `precision` of 2, the parameters `"234.567", "mass-kilogram"` are formatted to `"235 - * kg"`. **Note:** The formatted output may differ depending on locale. - */ - precision?: int; - /** - * Whether {@link #format} preserves decimal digits except trailing zeros in case there are more decimals - * than the `maxFractionDigits` format option allows. If decimals are not preserved, the formatted number - * is rounded to `maxFractionDigits`. - */ - preserveDecimals?: boolean; - /** - * Specifies the rounding behavior for discarding the digits after the maximum fraction digits defined by - * `maxFractionDigits`. This can be assigned - * - by value in {@link sap.ui.core.format.NumberFormat.RoundingMode RoundingMode}, - * - via a function that is used for rounding the number and takes two parameters: the number itself, - * and the number of decimal digits that should be reserved. **Using a function is deprecated since 1.121.0**; - * string based numbers are not rounded via this custom function. - */ - roundingMode?: RoundingMode | keyof typeof RoundingMode; - /** - * defines the number of decimals in the shortened format string. If this option isn't specified, the 'decimals' - * option is used instead. - */ - shortDecimals?: int; - /** - * defines a limit above which only short number formatting is used - */ - shortLimit?: int; - /** - * since 1.40 specifies a number from which the scale factor for the 'short' or 'long' style format is generated. - * The generated scale factor is used for all numbers which are formatted with this format instance. This - * option only takes effect when the 'style' option is set to 'short' or 'long'. This option is set to `undefined` - * by default, which means that the scale factor is selected automatically for each number being formatted. - */ - shortRefNumber?: int; - /** - * defines whether the unit of measure is shown in the formatted string, e.g. for input 1 and "duration-day" - * true: "1 day", false: "1". If both `showMeasure` and `showNumber` are false, an empty string is returned - */ - showMeasure?: boolean; - /** - * defines whether the number is shown as part of the result string, e.g. 1 day for locale "en" `NumberFormat.getUnitInstance({showNumber:true}).format(1, - * "duration-day"); // "1 day"` `NumberFormat.getUnitInstance({showNumber:false}).format(1, "duration-day"); - * // "day"` e.g. 2 days for locale "en" `NumberFormat.getUnitInstance({showNumber:true}).format(2, "duration-day"); - * // "2 days"` `NumberFormat.getUnitInstance({showNumber:false}).format(2, "duration-day"); // "days"` - * If both `showMeasure` and `showNumber` are false, an empty string is returned - */ - showNumber?: boolean; - /** - * since 1.40 specifies whether the scale factor is shown in the formatted number. This option takes effect - * only when the 'style' options is set to either 'short' or 'long'. - */ - showScale?: boolean; - /** - * whether the positions of grouping separators are validated. Space characters used as grouping separators - * are not validated. - */ - strictGroupingValidation?: boolean; - /** - * defines the style of format. Valid values are 'short, 'long' or 'standard' (based on the CLDR decimalFormat). - * When set to 'short' or 'long', numbers are formatted into compact forms. When this option is set, the - * default value of the 'precision' option is set to 2. This can be changed by setting either min/maxFractionDigits, - * decimals, shortDecimals, or the 'precision' option itself. - */ - style?: string; - }, + oFormatOptions?: UnitFormatOptions, /** * The locale to get the formatter for; if no locale is given, a locale for the currently configured language * is used; see {@link module:sap/base/i18n/Formatting.getLanguageTag Formatting.getLanguageTag} @@ -31166,10 +30846,115 @@ declare module "sap/ui/core/format/NumberFormat" { sValue: string ): number | any[] | string | null; } + /** + * The format options for currencies. + */ + export type CurrencyFormatOptions = FormatOptions & { + /** + * Defines whether the currency is shown as a code in currency format. The currency symbol is displayed + * when this option is set to `false` and a symbol has been defined for the given currency code. + */ + currencyCode?: boolean; + /** + * Can be set either to 'standard' (the default value) or to 'accounting' for an accounting-specific currency + * display + */ + currencyContext?: + | "standard" + | "accounting" + | "sap-standard" + | "sap-accounting"; + /** + * Defines a set of custom currencies exclusive to this NumberFormat instance. Custom currencies must not + * only consist of digits. If custom currencies are defined on the instance, no other currencies can be + * formatted and parsed by this instance. Globally available custom currencies can be added via the global + * configuration. See the above examples. See also {@link module:sap/base/i18n/Formatting.setCustomCurrencies Formatting.setCustomCurrencies } + * and {@link module:sap/base/i18n/Formatting.addCustomCurrencies Formatting.addCustomCurrencies}. + */ + customCurrencies?: Record; + /** + * The number of decimal digits. + */ + decimals?: int; + /** + * The target length of places after the decimal separator; if the number has fewer decimals than specified + * in this option, it is padded with whitespaces at the end up to the target length. An additional whitespace + * character for the decimal separator is added for a number without any decimals. **Note:** This format + * option is only allowed if the following conditions apply: + * - It has a value greater than 0. + * - The `oFormatOptions.style` format option is **not** set to `"short"` or `"long"`. + */ + decimalPadding?: int; + /** + * Since 1.130.0. Defines what value an empty string is parsed into and what value is formatted as an empty + * string. The {@link #format} and {@link #parse} functions are done in a symmetric way. For example, when + * this parameter is set to `NaN`, an empty string is parsed as `NaN`, and `NaN` is formatted as an empty + * string. + */ + emptyString?: null | number | string; + /** + * Deprecated as of 1.130; this format option does not have an effect on currency formats since decimals + * can always be determined, either through the given format options, custom currencies or the CLDR + */ + minFractionDigits?: int; + /** + * Since 1.28.2, whether to parse the number as a string in order to keep the precision for big numbers. + * Numbers in scientific notation are parsed back to standard notation. For example, `5e-3` is parsed to + * `0.005`. + */ + parseAsString?: boolean; + /** + * The maximum number of digits in the formatted representation of a number; if the `precision` is less + * than the overall length of the number, its fractional part is truncated through rounding. As the `precision` + * only affects the rounding of a number, its integer part can retain more digits than defined by this parameter. + * **Example:** With a `precision` of 2, `234.567` is formatted to `235`. **Note:** The formatted output + * may differ depending on locale. + */ + precision?: int; + /** + * Whether {@link #format} preserves decimal digits (except trailing zeros) when there are more decimals + * than the `maxFractionDigits` format option allows. When decimals aren't preserved, the formatted number + * is rounded to `maxFractionDigits`. + */ + preserveDecimals?: boolean; + /** + * Defines whether the currency code/symbol is shown in the formatted string, e.g. true: "1.00 EUR", false: + * "1.00" for locale "en" If both `showMeasure` and `showNumber` are false, an empty string is returned + */ + showMeasure?: boolean; + /** + * Defines whether the number is shown as part of the result string, e.g. 1 EUR for locale "en" + * ```javascript + * `NumberFormat.getCurrencyInstance({showNumber: true}).format(1, "EUR"); // "1.00 EUR"```` + * + * ```javascript + * `NumberFormat.getCurrencyInstance({showNumber: false}).format(1, "EUR"); // "EUR"```` + * If both `showMeasure` and `showNumber` are false, an empty string is returned + */ + showNumber?: boolean; + /** + * The style of format. Valid values are based on the CLDR `decimalFormat`. When set to `short` or `long`, + * numbers are formatted into compact forms. When this option is set, the default value of the `precision` + * option is set to `2`. This can be changed by setting either `min/maxFractionDigits`, `decimals`, `shortDecimals`, + * or the `precision` option itself. + */ + style?: "short" | "long" | "standard"; + /** + * Overrides the global configuration value {@link module:sap/base/i18n/Formatting.getTrailingCurrencyCode Formatting.getTrailingCurrencyCode}, + * which has a default value of `true`. This is ignored if `oFormatOptions.currencyCode` is set to `false`, + * or if `oFormatOptions.pattern` is supplied. + */ + trailingCurrencyCode?: boolean; + }; + /** * The format options for floating-point numbers. */ export type FloatFormatOptions = FormatOptions & { + /** + * The number of decimal digits. + */ + decimals?: int; /** * The target length of places after the decimal separator; if the number has fewer decimal places than * given in this option, it is padded with whitespaces at the end up to the target length. An additional @@ -31179,10 +30964,23 @@ declare module "sap/ui/core/format/NumberFormat" { * - The `oFormatOptions.style` format option is **not** set to `"short"` or `"long"`. */ decimalPadding?: int; + /** + * Since 1.130.0. Defines what value an empty string is parsed into and what value is formatted as an empty + * string. The {@link #format} and {@link #parse} functions are done in a symmetric way. For example, when + * this parameter is set to `NaN`, an empty string is parsed as `NaN`, and `NaN` is formatted as an empty + * string. + */ + emptyString?: null | number | string; /** * The minimal number of decimal digits. */ minFractionDigits?: int; + /** + * Since 1.28.2, whether to parse the number as a string in order to keep the precision for big numbers. + * Numbers in scientific notation are parsed back to standard notation. For example, `5e-3` is parsed to + * `0.005`. + */ + parseAsString?: boolean; /** * The maximum number of digits in the formatted representation of a number; if the `precision` is less * than the overall length of the number, its fractional part is truncated through rounding. As the `precision` @@ -31191,6 +30989,12 @@ declare module "sap/ui/core/format/NumberFormat" { * may differ depending on locale. */ precision?: int; + /** + * Whether {@link #format} preserves decimal digits (except trailing zeros) when there are more decimals + * than the `maxFractionDigits` format option allows. When decimals aren't preserved, the formatted number + * is rounded to `maxFractionDigits`. + */ + preserveDecimals?: boolean; /** * The style of format. Valid values are based on the CLDR `decimalFormat`. When set to `short` or `long`, * numbers are formatted into compact forms. When this option is set, the default value of the `precision` @@ -31204,22 +31008,11 @@ declare module "sap/ui/core/format/NumberFormat" { * The base type for the numeric format options. */ export type FormatOptions = { - /** - * The number of decimal digits. - */ - decimals?: int; /** * The character used as decimal separator. If none is given, the locale-specific decimal separator is used. * **Note:** `decimalSeparator` must always be different from `groupingSeparator`. */ decimalSeparator?: string; - /** - * Since 1.130.0. Defines what value an empty string is parsed into and what value is formatted as an empty - * string. The {@link #format} and {@link #parse} functions are done in a symmetric way. For example, when - * this parameter is set to `NaN`, an empty string is parsed as `NaN`, and `NaN` is formatted as an empty - * string. - */ - emptyString?: null | number | string; /** * The grouping base size in digits if it is different from the grouping size (e.g. Indian grouping). */ @@ -31255,12 +31048,6 @@ declare module "sap/ui/core/format/NumberFormat" { * The symbol for the minus sign. If none is given, the locale-specific minus sign is used. */ minusSign?: string; - /** - * Since 1.28.2, whether to parse the number as a string in order to keep the precision for big numbers. - * Numbers in scientific notation are parsed back to standard notation. For example, `5e-3` is parsed to - * `0.005`. - */ - parseAsString?: boolean; /** * The CLDR number pattern which is used to format a number. If none is given, the default pattern for the * locale and type is used. @@ -31270,12 +31057,6 @@ declare module "sap/ui/core/format/NumberFormat" { * The symbol for the plus sign. If none is given, the locale-specific plus sign is used. */ plusSign?: string; - /** - * Whether {@link #format} preserves decimal digits except trailing zeros if there are more decimals than - * the `maxFractionDigits` format option allows. If decimals are not preserved, the formatted number is - * rounded to `maxFractionDigits`. - */ - preserveDecimals?: boolean; /** * Defines how numbers are rounded when the number of fraction digits exceeds the value of `maxFractionDigits`. * The rounding behavior of the formatter can be defined in the following ways: @@ -31319,6 +31100,17 @@ declare module "sap/ui/core/format/NumberFormat" { * The format options for integer numbers. */ export type IntegerFormatOptions = FormatOptions & { + /** + * The number of decimal digits. + */ + decimals?: int; + /** + * Since 1.130.0. Defines what value an empty string is parsed into and what value is formatted as an empty + * string. The {@link #format} and {@link #parse} functions are done in a symmetric way. For example, when + * this parameter is set to `NaN`, an empty string is parsed as `NaN`, and `NaN` is formatted as an empty + * string. + */ + emptyString?: null | number | string; /** * The minimal number of decimal digits. */ @@ -31332,6 +31124,18 @@ declare module "sap/ui/core/format/NumberFormat" { * `234567` is formatted to `"235K"`. */ precision?: int; + /** + * Since 1.28.2, whether to parse the number as a string in order to keep the precision for big numbers. + * Numbers in scientific notation are parsed back to standard notation. For example, `5e-3` is parsed to + * `0.005`. + */ + parseAsString?: boolean; + /** + * Whether {@link #format} preserves decimal digits (except trailing zeros) when there are more decimals + * than the `maxFractionDigits` format option allows. When decimals aren't preserved, the formatted number + * is rounded to `maxFractionDigits`. + */ + preserveDecimals?: boolean; /** * The style of format. Valid values are based on the CLDR `decimalFormat`. When set to `short` or `long`, * numbers are formatted into compact forms. When this option is set, the default value of the `precision` @@ -31396,6 +31200,107 @@ declare module "sap/ui/core/format/NumberFormat" { */ TOWARDS_ZERO = "TOWARDS_ZERO", } + /** + * The format options for units. + */ + export type UnitFormatOptions = FormatOptions & { + /** + * Defines the allowed units for formatting and parsing, for example `["size-meter", "volume-liter", ...]` + * If this option is not specified, all units are allowed. + */ + allowedUnits?: string[]; + /** + * Defines a set of custom units, for example: + * ```javascript + * {"electric-inductance": { + * "displayName": "henry", + * "unitPattern-count-one": "{0} H", + * "unitPattern-count-other": "{0} H", + * "perUnitPattern": "{0}/H", + * "decimals": 2, + * "precision": 4 + * } + * }``` + */ + customUnits?: Record; + /** + * The number of decimal digits. + */ + decimals?: int; + /** + * The target length of places after the decimal separator; if the number has fewer decimals than specified + * in this option, it is padded with whitespaces at the end up to the target length. An additional whitespace + * character for the decimal separator is added for a number without any decimals. **Note:** This format + * option is only allowed if the following conditions apply: + * - It has a value greater than 0. + * - The `oFormatOptions.style` format option is **not** set to `"short"` or `"long"`. + */ + decimalPadding?: int; + /** + * Since 1.130.0. Defines what value an empty string is parsed into and what value is formatted as an empty + * string. The {@link #format} and {@link #parse} functions are done in a symmetric way. For example, when + * this parameter is set to `NaN`, an empty string is parsed as `NaN`, and `NaN` is formatted as an empty + * string. + */ + emptyString?: null | number | string; + /** + * The minimal number of decimal digits. + */ + minFractionDigits?: int; + /** + * Since 1.28.2, whether to parse the number as a string in order to keep the precision for big numbers. + * Numbers in scientific notation are parsed back to standard notation. For example, `5e-3` is parsed to + * `0.005`. + */ + parseAsString?: boolean; + /** + * The maximum number of digits in the formatted representation of a number; if the `precision` is less + * than the overall length of the number, its fractional part is truncated through rounding. As the `precision` + * only affects the rounding of a number, its integer part can retain more digits than defined by this parameter. + * **Example:** With a `precision` of 2, `234.567` is formatted to `235`. **Note:** The formatted output + * may differ depending on locale. + */ + precision?: int; + /** + * Whether {@link #format} preserves decimal digits (except trailing zeros) when there are more decimals + * than the `maxFractionDigits` format option allows. When decimals aren't preserved, the formatted number + * is rounded to `maxFractionDigits`. + */ + preserveDecimals?: boolean; + /** + * Defines whether the unit of measure is shown in the formatted string, for example 1 day for locale "en" + * + * ```javascript + * NumberFormat.getUnitInstance({showMeasure: true}) + * .format(1, "duration-day"); // "1 day"``` + * + * ```javascript + * NumberFormat.getUnitInstance({showMeasure: false}) + * .format(1, "duration-day"); // "1"``` + * If both `showMeasure` and `showNumber` are set to false, an empty string is returned. + */ + showMeasure?: boolean; + /** + * Defines whether the number is shown as part of the formatted string, for example 1 day for locale "en" + * + * ```javascript + * NumberFormat.getUnitInstance({showNumber: true}) + * .format(1, "duration-day"); // "1 day"``` + * + * ```javascript + * NumberFormat.getUnitInstance({showNumber: false}) + * .format(1, "duration-day"); // "day"``` + * If both `showMeasure` and `showNumber` are false, an empty string is returned + */ + showNumber?: boolean; + /** + * The style of format. Valid values are based on the CLDR `decimalFormat`. When set to `short` or `long`, + * numbers are formatted into compact forms. When this option is set, the default value of the `precision` + * option is set to `2`. This can be changed by setting either `min/maxFractionDigits`, `decimals`, `shortDecimals`, + * or the `precision` option itself. + */ + style?: "short" | "long" | "standard"; + }; } declare module "sap/ui/core/Fragment" { @@ -45121,6 +45026,8 @@ declare module "sap/ui/core/routing/HashChanger" { import Metadata from "sap/ui/base/Metadata"; + import Router from "sap/ui/core/routing/Router"; + import { routing } from "sap/ui/core/library"; import Event from "sap/ui/base/Event"; @@ -45233,6 +45140,28 @@ declare module "sap/ui/core/routing/HashChanger" { * @returns false if it was initialized before, true if it was initialized the first time */ init(): boolean; + /** + * Parses the given hash and returns the hash segment that belongs to the given router. + * + * In nested component routing scenarios, the browser hash contains segments for multiple routers combined + * with "&/" delimiters and prefix keys. This method parses the given hash and returns only the portion + * that is relevant to the given router, based on the prefix key of its {@link sap.ui.core.routing.RouterHashChanger}. + * + * @since 1.149 + * + * @returns The hash segment belonging to the given router, or `undefined` if the router has no {@link sap.ui.core.routing.RouterHashChanger } + * assigned + */ + parseHashForRouter( + /** + * The full browser hash to parse (e.g. as returned by {@link sap.ui.core.routing.History#getPreviousHash}) + */ + sHash: string, + /** + * The router for which the hash segment should be extracted + */ + oRouter: Router + ): string | undefined; /** * Replaces the hash with a certain value. When using the replace function, no browser history entry is * written. If you want to have an entry in the browser history, please use the {@link #setHash} function. @@ -47347,7 +47276,8 @@ declare module "sap/ui/core/theming/Parameters" { * are loaded and available or within the callback in case not all CSS files are already loaded. This is * the **only asynchronous** API variant. This variant is the preferred way to retrieve theming parameters. * The structure of the return value is the same as listed above depending on the type of the name property - * within the `object`. + * within the `object`. Further information on the usage of theming parameters can be found here: {@link https://ui5.sap.com/#/topic/45df6dff504647c686ab9ba72af827f6 Enhanced Theming Concepts}. + * * * The returned key-value maps are a copy so changing values in the map does not have any effect * @@ -53257,8 +53187,7 @@ declare module "sap/ui/core/ws/SapPcpWebSocket" { /** * Parameters of the SapPcpWebSocket#message event. */ - export interface SapPcpWebSocket$MessageEventParameters - extends WebSocket$MessageEventParameters { + export interface SapPcpWebSocket$MessageEventParameters extends WebSocket$MessageEventParameters { /** * Received pcpFields as a key-value map. */ @@ -61234,7 +61163,7 @@ declare module "sap/ui/model/json/TypedJSONModel" { export type AbsoluteBindingPath = Type extends Array ? // if Type is an array: - | `/${number}` // /0 -> first element of array + | `/${number}` // /0 -> first element of array | `/${number}${AbsoluteBindingPath}` // /0/{NestedPath} : // if Type is not an array: Type extends object @@ -61242,7 +61171,7 @@ declare module "sap/ui/model/json/TypedJSONModel" { | { [Key in keyof Type]: Type[Key] extends Array ? // Type[Key] is an array: - | `/${string & Key}/${number}` // items/0 -> elem of array + | `/${string & Key}/${number}` // items/0 -> elem of array // path can end there or: | `/${string & Key}/${number}${AbsoluteBindingPath}` // items/0/{NestedPath} : // Type[Key] is NOT an array: @@ -63268,6 +63197,8 @@ declare module "sap/ui/model/odata/ODataTreeBindingFlat" { /** * Adapter for TreeBindings to add the ListBinding functionality and use the tree structure in list based * controls. + * + * @deprecated As of version 1.150.0. will be replaced by OData V4 hierarchy functionality, see {@link topic:7d914317c0b64c23824bf932cc8a4ae1/section_RCH Recursive Hierarchy} */ export default function ODataTreeBindingFlat(): void; } @@ -67990,6 +67921,8 @@ declare module "sap/ui/model/odata/type/Currency" { import ValidateException from "sap/ui/model/ValidateException"; + import { FormatOptions } from "sap/ui/core/format/NumberFormat"; + /** * This class represents the `Currency` composite type with the parts amount, currency, and currency customizing. * The type may only be used for amount and currency parts from a {@link sap.ui.model.odata.v4.ODataModel } @@ -68015,32 +67948,7 @@ declare module "sap/ui/model/odata/type/Currency" { * the feature of ignoring messages, see {@link sap.ui.model.Binding#supportsIgnoreMessages}, and the corresponding * binding parameter is not set manually. */ - oFormatOptions?: { - /** - * Not supported; the type derives this from its currency customizing part. - */ - customCurrencies?: object; - /** - * Whether the amount is parsed to a string; set to `false` if the amount's underlying type is represented - * as a `number`, for example {@link sap.ui.model.odata.type.Int32} - */ - parseAsString?: boolean; - /** - * Whether the amount is parsed if no currency is entered; defaults to `true` if neither `showMeasure` nor - * `showNumber` is set to a falsy value, otherwise defaults to `false` - */ - unitOptional?: boolean; - /** - * Defines how an empty string is parsed into the amount. With the default value `0` the amount becomes - * `0` when an empty string is parsed. - */ - emptyString?: any; - /** - * By default decimals are preserved, unless `oFormatOptions.style` is given as "short" or "long"; since - * 1.89.0 - */ - preserveDecimals?: boolean; - }, + oFormatOptions?: CurrencyFormatOptions, /** * Only the 'skipDecimalsValidation' constraint is supported. Constraints are immutable, that is, they can * only be set once on construction. @@ -68167,6 +68075,100 @@ declare module "sap/ui/model/odata/type/Currency" { aValues: any[] ): void; } + /** + * Format options for the {@link sap.ui.model.odata.type.Currency} type. + */ + export type CurrencyFormatOptions = FormatOptions & { + /** + * Defines whether the currency is shown as a code in currency format. The currency symbol is displayed + * when this option is set to `false` and a symbol exists for the given currency code. + */ + currencyCode?: boolean; + /** + * Can be set to either 'standard' (the default value) or to 'accounting' for an accounting-specific currency + * display + */ + currencyContext?: + | "standard" + | "accounting" + | "sap-standard" + | "sap-accounting"; + /** + * The target length of places after the decimal separator; if the number has fewer decimals than specified + * in this option, it is padded with whitespaces at the end up to the target length. An additional whitespace + * character for the decimal separator is added for a number without any decimals. **Note:** This format + * option is only allowed if the following conditions apply: + * - It has a value greater than 0. + * - The `oFormatOptions.style` format option is **not** set to `"short"` or `"long"`. + */ + decimalPadding?: int; + /** + * The number of decimal digits. + */ + decimals?: int; + /** + * Defines how an empty string is parsed into the amount. With the default value `0`, the amount becomes + * `0` when an empty string is parsed. + */ + emptyString?: any; + /** + * Deprecated as of 1.130; this format option does not have an effect on currency formats since decimals + * can always be determined, either through the given format options, custom currencies, or the CLDR + */ + minFractionDigits?: int; + /** + * Whether the amount is parsed to a string; set to `false` if the amount's underlying type is represented + * as a `number`, for example {@link sap.ui.model.odata.type.Int32} + */ + parseAsString?: boolean; + /** + * The maximum number of digits in the formatted representation of a number; if the `precision` is less + * than the overall length of the number, its fractional part is truncated through rounding. As the `precision` + * only affects the rounding of a number, its integer part can retain more digits than defined by this parameter. + * **Example:** With a `precision` of 2, `234.567` is formatted to `235`. **Note:** The formatted output + * may differ depending on locale. + */ + precision?: int; + /** + * By default, decimals are preserved unless `oFormatOptions.style` is given as "short" or "long"; since + * 1.89.0 + */ + preserveDecimals?: boolean; + /** + * Defines whether the currency code or symbol is shown in the formatted string, for example true: "1.00 + * EUR", false: "1.00" for locale "en" If both `showMeasure` and `showNumber` are `false`, an empty string + * is returned + */ + showMeasure?: boolean; + /** + * Defines whether the number is shown as part of the result string, for example 1 EUR for locale "en" + * ```javascript + * `NumberFormat.getCurrencyInstance({showNumber: true}).format(1, "EUR"); // "1.00 EUR"```` + * + * ```javascript + * `NumberFormat.getCurrencyInstance({showNumber: false}).format(1, "EUR"); // "EUR"```` + * If both `showMeasure` and `showNumber` are `false`, an empty string is returned + */ + showNumber?: boolean; + /** + * The style of format. Valid values are based on the CLDR `decimalFormat`. When set to `short` or `long`, + * numbers are formatted into compact forms. When this option is set, the default value of the `precision` + * option is set to `2`. This can be changed by setting either `min/maxFractionDigits`, `decimals`, `shortDecimals`, + * or the `precision` option itself. + */ + style?: "short" | "long" | "standard"; + /** + * Overrides the global configuration value {@link module:sap/base/i18n/Formatting.getTrailingCurrencyCode Formatting.getTrailingCurrencyCode}, + * which has a default value of `true`. This is ignored if `oFormatOptions.currencyCode` is set to `false`, + * or if `oFormatOptions.pattern` is supplied. + */ + trailingCurrencyCode?: boolean; + /** + * Whether the amount is parsed if no currency is entered; defaults to `true` if neither `showMeasure` nor + * `showNumber` is set to a falsy value, otherwise defaults to `false` + */ + unitOptional?: boolean; + }; } declare module "sap/ui/model/odata/type/Date" { @@ -68746,6 +68748,8 @@ declare module "sap/ui/model/odata/type/DateTimeWithTimezone" { import Metadata from "sap/ui/base/Metadata"; + import UI5Date from "sap/ui/core/date/UI5Date"; + import ParseException from "sap/ui/model/ParseException"; /** @@ -68854,7 +68858,7 @@ declare module "sap/ui/model/odata/type/DateTimeWithTimezone" { getPartsIgnoringMessages(): number[]; /** * Returns a language-dependent placeholder text such as "e.g. " where is formatted - * using this type. + * using this type. If given, a sample date within the given range is used. * * * @returns The language-dependent placeholder text or `undefined` if the type does not offer a placeholder @@ -68863,11 +68867,11 @@ declare module "sap/ui/model/odata/type/DateTimeWithTimezone" { /** * The minimum date */ - oMinimum?: /* was: sap.ui.core.date.UI5Date */ any, + oMinimum?: UI5Date, /** * The maximum date */ - oMaximum?: /* was: sap.ui.core.date.UI5Date */ any + oMaximum?: UI5Date ): string | undefined; /** * Parses the given value. @@ -69915,9 +69919,8 @@ declare module "sap/ui/model/odata/type/ODataType" { * using this type. The `oMinimum` and `oMaximum` parameters are supported since 1.149.0 and only by types * that use {@link sap.ui.core.format.DateFormat} for formatting ({@link sap.ui.model.odata.type.Date}, * {@link sap.ui.model.odata.type.DateTime}, {@link sap.ui.model.odata.type.DateTimeOffset}, {@link sap.ui.model.odata.type.DateTimeWithTimezone}, - * {@link sap.ui.model.odata.type.Time}, and {@link sap.ui.model.odata.type.TimeOfDay}). The default sample - * date is used if it is valid. Otherwise, the closest valid year end, highest valid month end, or highest - * valid date is used. + * {@link sap.ui.model.odata.type.Time}, and {@link sap.ui.model.odata.type.TimeOfDay}). If given, a sample + * date within [`oMinimum`, `oMaximum`] is used. * * * @returns The language-dependent placeholder text or `undefined` if the type does not offer a placeholder @@ -70878,6 +70881,8 @@ declare module "sap/ui/model/odata/type/Unit" { import ValidateException from "sap/ui/model/ValidateException"; + import { FormatOptions } from "sap/ui/core/format/NumberFormat"; + /** * This class represents the `Unit` composite type with the parts measure, unit, and unit customizing. The * type may only be used for measure and unit parts from a {@link sap.ui.model.odata.v4.ODataModel} or a @@ -70903,32 +70908,7 @@ declare module "sap/ui/model/odata/type/Unit" { * the feature of ignoring messages, see {@link sap.ui.model.Binding#supportsIgnoreMessages}, and the corresponding * binding parameter is not set manually. */ - oFormatOptions?: { - /** - * Not supported; the type derives this from its unit customizing part. - */ - customUnits?: object; - /** - * Whether the measure is parsed to a string; set to `false` if the measure's underlying type is represented - * as a `number`, for example {@link sap.ui.model.odata.type.Int32} - */ - parseAsString?: boolean; - /** - * By default decimals are preserved, unless `oFormatOptions.style` is given as "short" or "long"; since - * 1.89.0 - */ - preserveDecimals?: boolean; - /** - * Whether the measure is parsed if no unit is entered; defaults to `true` if neither `showMeasure` nor - * `showNumber` is set to a falsy value, otherwise defaults to `false` - */ - unitOptional?: boolean; - /** - * Defines how an empty string is parsed into the measure. With the default value `0` the measure becomes - * `0` when an empty string is parsed. - */ - emptyString?: any; - }, + oFormatOptions?: UnitFormatOptions, /** * Only the 'skipDecimalsValidation' constraint is supported. Constraints are immutable, that is, they can * only be set once on construction. @@ -71059,6 +71039,96 @@ declare module "sap/ui/model/odata/type/Unit" { aValues: any[] ): void; } + /** + * Format options for the {@link sap.ui.model.odata.type.Unit}. + */ + export type UnitFormatOptions = FormatOptions & { + /** + * The number of decimals to be used for formatting the numerical value of the unit composite type; if none + * of the format options `maxFractionDigits`, `minFractionDigits` or `decimals` are given, the following + * defaults apply: + * - **0** if the numerical value is of an OData integer type, i.e. {@link sap.ui.model.odata.type.Int } + * or {@link sap.ui.model.odata.type.Int64} + * - the **scale constraint of the numerical value's type** if this type is {@link sap.ui.model.odata.type.Decimal } + * and the scale is not "variable" + * - **3** otherwise + */ + decimals?: int; + /** + * The target length of places after the decimal separator; if the number has fewer decimals than specified + * in this option, it is padded with whitespaces at the end up to the target length. An additional whitespace + * character for the decimal separator is added for a number without any decimals. **Note:** This format + * option is only allowed if the following conditions apply: + * - It has a value greater than 0 + * - The `oFormatOptions.style` format option is **not** set to `"short"` or `"long"` + */ + decimalPadding?: int; + /** + * Defines how an empty string is parsed into the measure. With the default value `0` the measure becomes + * `0` when an empty string is parsed. + */ + emptyString?: null | number | string; + /** + * The minimal number of decimal digits. + */ + minFractionDigits?: int; + /** + * Whether the measure is parsed to a string; set to `false` if the measure's underlying type is represented + * as a `number`, for example {@link sap.ui.model.odata.type.Int32} + */ + parseAsString?: boolean; + /** + * The maximum number of digits in the formatted representation of a number; if the `precision` is less + * than the overall length of the number, its fractional part is truncated through rounding. As the `precision` + * only affects the rounding of a number, its integer part can retain more digits than defined by this parameter. + * **Example:** With a `precision` of 2, `234.567` is formatted to `235`. **Note:** The formatted output + * may differ depending on locale. + */ + precision?: int; + /** + * By default decimals are preserved, unless `oFormatOptions.style` is given as "short" or "long"; since + * 1.89.0 + */ + preserveDecimals?: boolean; + /** + * Defines whether the unit of measure is shown in the formatted string, for example 1 day for locale "en" + * + * ```javascript + * NumberFormat.getUnitInstance({showMeasure: true}) + * .format(1, "duration-day"); // "1 day"``` + * + * ```javascript + * NumberFormat.getUnitInstance({showMeasure: false}) + * .format(1, "duration-day"); // "1"``` + * If both `showMeasure` and `showNumber` are set to false, an empty string is returned. + */ + showMeasure?: boolean; + /** + * Defines whether the number is shown as part of the formatted string, for example 1 day for locale "en" + * + * ```javascript + * NumberFormat.getUnitInstance({showNumber: true}) + * .format(1, "duration-day"); // "1 day"``` + * + * ```javascript + * NumberFormat.getUnitInstance({showNumber: false}) + * .format(1, "duration-day"); // "day"``` + * If both `showMeasure` and `showNumber` are false, an empty string is returned + */ + showNumber?: boolean; + /** + * The style of format. Valid values are based on the CLDR `decimalFormat`. When set to `short` or `long`, + * numbers are formatted into compact forms. When this option is set, the default value of the `precision` + * option is set to `2`. This can be changed by setting either `min/maxFractionDigits`, `decimals`, `shortDecimals`, + * or the `precision` option itself. + */ + style?: "short" | "long" | "standard"; + /** + * Whether the measure is parsed if no unit is entered; defaults to `true` if neither `showMeasure` nor + * `showNumber` is set to a falsy value, otherwise defaults to `false` + */ + unitOptional?: boolean; + }; } declare module "sap/ui/model/odata/UpdateMethod" { @@ -72587,6 +72657,8 @@ declare module "sap/ui/model/odata/v2/ODataTreeBinding" { /** * Tree binding implementation for the {@link sap.ui.model.odata.v2.ODataModel}. Use {@link sap.ui.model.odata.v2.ODataModel#bindTree } * for creating an instance. + * + * @deprecated As of version 1.150.0. will be replaced by OData V4 hierarchy functionality, see {@link topic:7d914317c0b64c23824bf932cc8a4ae1/section_RCH Recursive Hierarchy} */ export default class ODataTreeBinding extends TreeBinding { /** @@ -74898,8 +74970,7 @@ declare module "sap/ui/model/odata/v4/ODataContextBinding" { /** * Parameters of the ODataContextBinding#change event. */ - export interface ODataContextBinding$ChangeEventParameters - extends Binding$ChangeEventParameters {} + export interface ODataContextBinding$ChangeEventParameters extends Binding$ChangeEventParameters {} /** * Event object of the ODataContextBinding#change event. @@ -74912,8 +74983,7 @@ declare module "sap/ui/model/odata/v4/ODataContextBinding" { /** * Parameters of the ODataContextBinding#dataReceived event. */ - export interface ODataContextBinding$DataReceivedEventParameters - extends Binding$DataReceivedEventParameters { + export interface ODataContextBinding$DataReceivedEventParameters extends Binding$DataReceivedEventParameters { /** * The error object if a back-end request failed. If there are multiple failed back-end requests, the error * of the first one is provided. @@ -74932,8 +75002,7 @@ declare module "sap/ui/model/odata/v4/ODataContextBinding" { /** * Parameters of the ODataContextBinding#dataRequested event. */ - export interface ODataContextBinding$DataRequestedEventParameters - extends Binding$DataRequestedEventParameters {} + export interface ODataContextBinding$DataRequestedEventParameters extends Binding$DataRequestedEventParameters {} /** * Event object of the ODataContextBinding#dataRequested event. @@ -76235,8 +76304,7 @@ declare module "sap/ui/model/odata/v4/ODataListBinding" { /** * Parameters of the ODataListBinding#change event. */ - export interface ODataListBinding$ChangeEventParameters - extends Binding$ChangeEventParameters { + export interface ODataListBinding$ChangeEventParameters extends Binding$ChangeEventParameters { /** * During automatic determination of $expand and $select, a "virtual" context is first added with detailed * reason "AddVirtualContext" and then removed with detailed reason "RemoveVirtualContext" (since 1.69.0); @@ -76315,8 +76383,7 @@ declare module "sap/ui/model/odata/v4/ODataListBinding" { /** * Parameters of the ODataListBinding#dataReceived event. */ - export interface ODataListBinding$DataReceivedEventParameters - extends Binding$DataReceivedEventParameters { + export interface ODataListBinding$DataReceivedEventParameters extends Binding$DataReceivedEventParameters { /** * The error object if a back-end request failed. If there are multiple failed back-end requests, the error * of the first one is provided. @@ -76335,8 +76402,7 @@ declare module "sap/ui/model/odata/v4/ODataListBinding" { /** * Parameters of the ODataListBinding#dataRequested event. */ - export interface ODataListBinding$DataRequestedEventParameters - extends Binding$DataRequestedEventParameters {} + export interface ODataListBinding$DataRequestedEventParameters extends Binding$DataRequestedEventParameters {} /** * Event object of the ODataListBinding#dataRequested event. @@ -76380,8 +76446,7 @@ declare module "sap/ui/model/odata/v4/ODataListBinding" { /** * Parameters of the ODataListBinding#refresh event. */ - export interface ODataListBinding$RefreshEventParameters - extends Binding$RefreshEventParameters {} + export interface ODataListBinding$RefreshEventParameters extends Binding$RefreshEventParameters {} /** * Event object of the ODataListBinding#refresh event. @@ -78456,8 +78521,7 @@ declare module "sap/ui/model/odata/v4/ODataModel" { * * @deprecated As of version 1.37.0. this event is not supported */ - export interface ODataModel$ParseErrorEventParameters - extends Model$ParseErrorEventParameters {} + export interface ODataModel$ParseErrorEventParameters extends Model$ParseErrorEventParameters {} /** * Event object of the ODataModel#parseError event. @@ -78472,8 +78536,7 @@ declare module "sap/ui/model/odata/v4/ODataModel" { /** * Parameters of the ODataModel#propertyChange event. */ - export interface ODataModel$PropertyChangeEventParameters - extends Model$PropertyChangeEventParameters { + export interface ODataModel$PropertyChangeEventParameters extends Model$PropertyChangeEventParameters { /** * A promise on the outcome of the PATCH request, much like {@link sap.ui.model.odata.v4.Context#setProperty } * provides it for `bRetry === true`; missing in case there is no PATCH @@ -78499,8 +78562,7 @@ declare module "sap/ui/model/odata/v4/ODataModel" { * * @deprecated As of version 1.37.0. this event is not supported */ - export interface ODataModel$RequestCompletedEventParameters - extends Model$RequestCompletedEventParameters {} + export interface ODataModel$RequestCompletedEventParameters extends Model$RequestCompletedEventParameters {} /** * Event object of the ODataModel#requestCompleted event. @@ -78517,8 +78579,7 @@ declare module "sap/ui/model/odata/v4/ODataModel" { * * @deprecated As of version 1.37.0. this event is not supported */ - export interface ODataModel$RequestFailedEventParameters - extends Model$RequestFailedEventParameters {} + export interface ODataModel$RequestFailedEventParameters extends Model$RequestFailedEventParameters {} /** * Event object of the ODataModel#requestFailed event. @@ -78535,8 +78596,7 @@ declare module "sap/ui/model/odata/v4/ODataModel" { * * @deprecated As of version 1.37.0. this event is not supported */ - export interface ODataModel$RequestSentEventParameters - extends Model$RequestSentEventParameters {} + export interface ODataModel$RequestSentEventParameters extends Model$RequestSentEventParameters {} /** * Event object of the ODataModel#requestSent event. @@ -78927,8 +78987,7 @@ declare module "sap/ui/model/odata/v4/ODataPropertyBinding" { /** * Parameters of the ODataPropertyBinding#change event. */ - export interface ODataPropertyBinding$ChangeEventParameters - extends Binding$ChangeEventParameters {} + export interface ODataPropertyBinding$ChangeEventParameters extends Binding$ChangeEventParameters {} /** * Event object of the ODataPropertyBinding#change event. @@ -78941,8 +79000,7 @@ declare module "sap/ui/model/odata/v4/ODataPropertyBinding" { /** * Parameters of the ODataPropertyBinding#dataReceived event. */ - export interface ODataPropertyBinding$DataReceivedEventParameters - extends Binding$DataReceivedEventParameters { + export interface ODataPropertyBinding$DataReceivedEventParameters extends Binding$DataReceivedEventParameters { /** * The error object if a back-end request failed. If there are multiple failed back-end requests, the error * of the first one is provided. @@ -78961,8 +79019,7 @@ declare module "sap/ui/model/odata/v4/ODataPropertyBinding" { /** * Parameters of the ODataPropertyBinding#dataRequested event. */ - export interface ODataPropertyBinding$DataRequestedEventParameters - extends Binding$DataRequestedEventParameters {} + export interface ODataPropertyBinding$DataRequestedEventParameters extends Binding$DataRequestedEventParameters {} /** * Event object of the ODataPropertyBinding#dataRequested event. @@ -80793,6 +80850,8 @@ declare module "sap/ui/model/type/Currency" { import ParseException from "sap/ui/model/ParseException"; + import { FormatOptions } from "sap/ui/core/format/NumberFormat"; + /** * This class represents the composite type `Currency`, which consists of the parts "amount" (of type `number` * or `string`) and "currency" (of type `string`). In case the amount is a `string`, it must be the JavaScript @@ -80811,20 +80870,7 @@ declare module "sap/ui/model/type/Currency" { * feature of ignoring model messages, see {@link sap.ui.model.Binding#supportsIgnoreMessages}, and the * corresponding binding parameter is not set manually. */ - oFormatOptions?: { - /** - * By default decimals are preserved, unless `oFormatOptions.style` is given as "short" or "long"; since - * 1.89.0 - */ - preserveDecimals?: boolean; - /** - * A set of format options as defined for {@link sap.ui.core.format.NumberFormat.getCurrencyInstance} which - * describes the format of amount and currency in the model in case the model holds this in one property - * of type `string`, e.g. as "EUR 22". If an empty object is given, grouping is disabled, the - * decimal separator is a dot and the grouping separator is a comma. - */ - source?: object; - }, + oFormatOptions?: CurrencyFormatOptions, /** * Constraints for the value part */ @@ -80929,6 +80975,113 @@ declare module "sap/ui/model/type/Currency" { aCurrentValues?: any[] ): any[] | string; } + /** + * Format options for the {@link sap.ui.model.type.Currency} type. + */ + export type CurrencyFormatOptions = FormatOptions & { + /** + * Defines whether the currency is shown as a code in currency format. The currency symbol is displayed + * when this option is set to `false` and a symbol exists for the given currency code. + */ + currencyCode?: boolean; + /** + * Can be set to either 'standard' (the default value) or to 'accounting' for an accounting-specific currency + * display + */ + currencyContext?: + | "standard" + | "accounting" + | "sap-standard" + | "sap-accounting"; + /** + * Defines a set of custom currencies exclusive to this NumberFormat instance. Custom currencies must not + * consist only of digits. If custom currencies are defined on the instance, no other currencies can be + * formatted and parsed by this instance. Globally available custom currencies can be added via the global + * configuration. See {@link module:sap/base/i18n/Formatting.setCustomCurrencies Formatting.setCustomCurrencies } + * and {@link module:sap/base/i18n/Formatting.addCustomCurrencies Formatting.addCustomCurrencies}. + */ + customCurrencies?: Record; + /** + * The number of decimal digits. + */ + decimals?: int; + /** + * The target length of places after the decimal separator; if the number has fewer decimals than specified + * in this option, it is padded with whitespaces at the end up to the target length. An additional whitespace + * character for the decimal separator is added for a number without any decimals. **Note:** This format + * option is only allowed if the following conditions apply: + * - It has a value greater than 0. + * - The `oFormatOptions.style` format option is **not** set to `"short"` or `"long"`. + */ + decimalPadding?: int; + /** + * Since 1.130.0. Defines what value an empty string is parsed into and what value is formatted as an empty + * string. The {@link #format} and {@link #parse} functions are done in a symmetric way. For example, when + * this parameter is set to `NaN`, an empty string is parsed as `NaN`, and `NaN` is formatted as an empty + * string. + */ + emptyString?: null | number | string; + /** + * Deprecated as of 1.130; this format option does not have an effect on currency formats since decimals + * can always be determined, either through the given format options, custom currencies or the CLDR + */ + minFractionDigits?: int; + /** + * Since 1.28.2, whether to parse the number as a string in order to keep the precision for large numbers. + * Numbers in scientific notation are parsed back to standard notation. For example, `5e-3` is parsed to + * `0.005`. + */ + parseAsString?: boolean; + /** + * The maximum number of digits in the formatted representation of a number; if the `precision` is less + * than the overall length of the number, its fractional part is truncated through rounding. As the `precision` + * only affects the rounding of a number, its integer part can retain more digits than defined by this parameter. + * **Example:** With a `precision` of 2, `234.567` is formatted to `235`. **Note:** The formatted output + * may differ depending on locale. + */ + precision?: int; + /** + * By default, decimals are preserved unless `oFormatOptions.style` is given as "short" or "long"; since + * 1.89.0 + */ + preserveDecimals?: boolean; + /** + * Defines whether the currency code or symbol is shown in the formatted string, for example true: "1.00 + * EUR", false: "1.00" for locale "en" If both `showMeasure` and `showNumber` are `false`, an empty string + * is returned + */ + showMeasure?: boolean; + /** + * Defines whether the number is shown as part of the result string, for example 1 EUR for locale "en" + * ```javascript + * `NumberFormat.getCurrencyInstance({showNumber: true}).format(1, "EUR"); // "1.00 EUR"```` + * + * ```javascript + * `NumberFormat.getCurrencyInstance({showNumber: false}).format(1, "EUR"); // "EUR"```` + * If both `showMeasure` and `showNumber` are `false`, an empty string is returned + */ + showNumber?: boolean; + /** + * A set of format options as defined for {@link sap.ui.core.format.NumberFormat.getCurrencyInstance} which + * describes the format of amount and currency in the model in case the model holds this in one property + * of type `string`, for example as "EUR 22". If an empty object is given, grouping is disabled, the decimal + * separator is a dot, and the grouping separator is a comma. + */ + source?: object; + /** + * The style of format. Valid values are based on the CLDR `decimalFormat`. When set to `short` or `long`, + * numbers are formatted into compact forms. When this option is set, the default value of the `precision` + * option is set to `2`. This can be changed by setting either `min/maxFractionDigits`, `decimals`, `shortDecimals`, + * or the `precision` option itself. + */ + style?: "short" | "long" | "standard"; + /** + * Overrides the global configuration value {@link module:sap/base/i18n/Formatting.getTrailingCurrencyCode Formatting.getTrailingCurrencyCode}, + * which has a default value of `true`. This is ignored if `oFormatOptions.currencyCode` is set to `false`, + * or if `oFormatOptions.pattern` is supplied. + */ + trailingCurrencyCode?: boolean; + }; } declare module "sap/ui/model/type/Date" { @@ -80936,6 +81089,8 @@ declare module "sap/ui/model/type/Date" { import Metadata from "sap/ui/base/Metadata"; + import UI5Date from "sap/ui/core/date/UI5Date"; + /** * This class represents date simple types. */ @@ -81018,13 +81173,25 @@ declare module "sap/ui/model/type/Date" { */ getOutputPattern(): string; /** - * Returns a language-dependent placeholder text such as "e.g. " where is formatted - * using this type. + * Returns a language-dependent placeholder text for this type. The `oMinimum` and `oMaximum` parameters + * are supported since 1.150. + * + * If given, a sample date within [`oMinimum`, `oMaximum`] is used. If not given, `oConstraints.minimum`/`oConstraints.maximum` + * are used as fallback. * * * @returns The language-dependent placeholder text or `undefined` if the type does not offer a placeholder */ - getPlaceholderText(): string | undefined; + getPlaceholderText( + /** + * The minimum date + */ + oMinimum?: UI5Date, + /** + * The maximum date + */ + oMaximum?: UI5Date + ): string | undefined; } } @@ -81157,13 +81324,25 @@ declare module "sap/ui/model/type/DateInterval" { sTargetType: string ): string; /** - * Returns a language-dependent placeholder text such as "e.g. " where is formatted - * using this type. + * Returns a language-dependent placeholder text for this type. The `oMinimum` and `oMaximum` parameters + * are supported since 1.150. + * + * If given, a sample date within [`oMinimum`, `oMaximum`] is used. If not given, `oConstraints.minimum`/`oConstraints.maximum` + * are used as fallback. * * * @returns The language-dependent placeholder text or `undefined` if the type does not offer a placeholder */ - getPlaceholderText(): string | undefined; + getPlaceholderText( + /** + * The minimum date + */ + oMinimum?: UI5Date, + /** + * The maximum date + */ + oMaximum?: UI5Date + ): string | undefined; /** * Parses the given value to an array of two values representing the start date and the end date of the * interval, where the time part of the start date is 0 and the time part of end date is the end of day @@ -81880,6 +82059,8 @@ declare module "sap/ui/model/type/Unit" { import ParseException from "sap/ui/model/ParseException"; + import { FormatOptions } from "sap/ui/core/format/NumberFormat"; + /** * This class represents the Unit composite type. */ @@ -81895,30 +82076,7 @@ declare module "sap/ui/model/type/Unit" { * model messages, see {@link sap.ui.model.Binding#supportsIgnoreMessages}, and the corresponding binding * parameter is not set manually. */ - oFormatOptions?: { - /** - * The number of decimals to be used for formatting the numerical value of the unit composite type; if none - * of the format options `maxFractionDigits`, `minFractionDigits` or `decimals` are given, the following - * defaults apply: - * - **0** if the numerical value is of an OData integer type, i.e. {@link sap.ui.model.odata.type.Int } - * or {@link sap.ui.model.odata.type.Int64} - * - the **scale constraint of the numerical value's type** if this type is {@link sap.ui.model.odata.type.Decimal } - * and the scale is not "variable" - * - **3** otherwise - */ - decimals?: object; - /** - * By default decimals are preserved, unless `oFormatOptions.style` is given as "short" or "long"; since - * 1.89.0 - */ - preserveDecimals?: boolean; - /** - * Additional set of format options to be used if the property in the model is not of type `string` and - * needs formatting as well. If an empty object is given, the grouping is disabled and a dot is used as - * decimal separator. - */ - source?: object; - }, + oFormatOptions?: UnitFormatOptions, /** * Value constraints */ @@ -82033,6 +82191,116 @@ declare module "sap/ui/model/type/Unit" { aCurrentValues?: any[] ): any[] | string; } + /** + * Format options for the {@link sap.ui.model.type.Unit Unit type}. + */ + export type UnitFormatOptions = FormatOptions & { + /** + * Defines the allowed units for formatting and parsing, for example `["size-meter", "volume-liter", ...]` + * If this option is not specified, all units are allowed. + */ + allowedUnits?: string[]; + /** + * Defines a set of custom units, for example: + * ```javascript + * {"electric-inductance": { + * "displayName": "henry", + * "unitPattern-count-one": "{0} H", + * "unitPattern-count-other": "{0} H", + * "perUnitPattern": "{0}/H", + * "decimals": 2, + * "precision": 4 + * } + * }``` + */ + customUnits?: Record; + /** + * The number of decimals to be used for formatting the numerical value of the unit composite type; if none + * of the format options `maxFractionDigits`, `minFractionDigits` or `decimals` are given, the following + * defaults apply: + * - **0** if the numerical value is of an OData integer type, i.e. {@link sap.ui.model.odata.type.Int } + * or {@link sap.ui.model.odata.type.Int64} + * - the **scale constraint of the numerical value's type** if this type is {@link sap.ui.model.odata.type.Decimal } + * and the scale is not "variable" + * - **3** otherwise + */ + decimals?: int; + /** + * The target length of places after the decimal separator; if the number has fewer decimals than specified + * in this option, it is padded with whitespaces at the end up to the target length. An additional whitespace + * character for the decimal separator is added for a number without any decimals. **Note:** This format + * option is only allowed if the following conditions apply: + * - It has a value greater than 0 + * - The `oFormatOptions.style` format option is **not** set to `"short"` or `"long"` + */ + decimalPadding?: int; + /** + * Defines how an empty string is parsed into the measure. With the default value `0` the measure becomes + * `0` when an empty string is parsed. + */ + emptyString?: null | number | string; + /** + * The minimal number of decimal digits. + */ + minFractionDigits?: int; + /** + * Whether the measure is parsed to a string; set to `false` if the measure's underlying type is represented + * as a `number`, for example {@link sap.ui.model.type.Integer} + */ + parseAsString?: boolean; + /** + * The maximum number of digits in the formatted representation of a number; if the `precision` is less + * than the overall length of the number, its fractional part is truncated through rounding. As the `precision` + * only affects the rounding of a number, its integer part can retain more digits than defined by this parameter. + * **Example:** With a `precision` of 2, `234.567` is formatted to `235`. **Note:** The formatted output + * may differ depending on locale. + */ + precision?: int; + /** + * By default decimals are preserved, unless `oFormatOptions.style` is given as "short" or "long"; since + * 1.89.0 + */ + preserveDecimals?: boolean; + /** + * Defines whether the unit of measure is shown in the formatted string, for example 1 day for locale "en" + * + * ```javascript + * NumberFormat.getUnitInstance({showMeasure: true}) + * .format(1, "duration-day"); // "1 day"``` + * + * ```javascript + * NumberFormat.getUnitInstance({showMeasure: false}) + * .format(1, "duration-day"); // "1"``` + * If both `showMeasure` and `showNumber` are set to false, an empty string is returned. + */ + showMeasure?: boolean; + /** + * Defines whether the number is shown as part of the formatted string, for example 1 day for locale "en" + * + * ```javascript + * NumberFormat.getUnitInstance({showNumber: true}) + * .format(1, "duration-day"); // "1 day"``` + * + * ```javascript + * NumberFormat.getUnitInstance({showNumber: false}) + * .format(1, "duration-day"); // "day"``` + * If both `showMeasure` and `showNumber` are false, an empty string is returned + */ + showNumber?: boolean; + /** + * Additional set of format options to be used if the property in the model is not of type `string` and + * needs formatting as well. If an empty object is given, the grouping is disabled and a dot is used as + * decimal separator. + */ + source?: object; + /** + * The style of format. Valid values are based on the CLDR `decimalFormat`. When set to `short` or `long`, + * numbers are formatted into compact forms. When this option is set, the default value of the `precision` + * option is set to `2`. This can be changed by setting either `min/maxFractionDigits`, `decimals`, `shortDecimals`, + * or the `precision` option itself. + */ + style?: "short" | "long" | "standard"; + }; } declare module "sap/ui/model/ValidateException" { @@ -84166,8 +84434,7 @@ declare module "sap/ui/test/matchers/AggregationContainsPropertyEqual" { /** * Describes the settings that can be provided to the AggregationContainsPropertyEqual constructor. */ - export interface $AggregationContainsPropertyEqualSettings - extends $MatcherSettings { + export interface $AggregationContainsPropertyEqualSettings extends $MatcherSettings { /** * The Name of the aggregation that is used for matching. */ diff --git a/types/openui5/sap.ui.dt.d.ts b/types/openui5/sap.ui.dt.d.ts index 54c206e21282d9..d56527e04a0647 100644 --- a/types/openui5/sap.ui.dt.d.ts +++ b/types/openui5/sap.ui.dt.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.149.0 +// For Library Version: 1.150.0 declare module "sap/ui/dt/library" { export namespace designtime { diff --git a/types/openui5/sap.ui.fl.d.ts b/types/openui5/sap.ui.fl.d.ts index 408f3712485b26..9e2b6d4d540f73 100644 --- a/types/openui5/sap.ui.fl.d.ts +++ b/types/openui5/sap.ui.fl.d.ts @@ -1,10 +1,12 @@ -// For Library Version: 1.149.0 +// For Library Version: 1.150.0 declare module "sap/ui/fl/library" {} declare module "sap/ui/fl/apply/api/ControlVariantApplyAPI" { import ManagedObject from "sap/ui/base/ManagedObject"; + import VariantManagement from "sap/ui/fl/variants/VariantManagement"; + import Control from "sap/ui/core/Control"; /** @@ -76,20 +78,23 @@ declare module "sap/ui/fl/apply/api/ControlVariantApplyAPI" { * Clears URL technical parameter `sap-ui-fl-control-variant-id` for control variants. Use this method in * case you normally want the variant parameter in the URL, but have a few special navigation patterns where * you want to clear it. If you don't want that parameter in general, set the `updateVariantInURL` parameter - * on your variant management control to `false`. SAP Fiori elements use this method. If a variant management - * control is given as a parameter, only parameters specific to that control are cleared. + * on your variant management control to `false`. SAP Fiori elements use this method. + * + * + * @returns Resolves once the URL parameter has been cleared */ clearVariantParameterInURL( /** * Object with parameters as properties */ - mPropertyBag: { + mPropertyBag?: { /** - * Variant management control for which the URL technical parameter has to be cleared + * Variant management control whose variant ids should be removed from the URL parameter. If omitted, all + * variant ids are removed. */ - control: ManagedObject; + control?: VariantManagement; } - ): void; + ): Promise; /** * Removes the saved callback for the given control and variant management control. */ @@ -1463,8 +1468,7 @@ declare module "sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExte * * @since 1.87 */ - interface MultiTenantABAPExtensibilityVariant - extends ABAPExtensibilityVariant { + interface MultiTenantABAPExtensibilityVariant extends ABAPExtensibilityVariant { /** * Creates a new subclass of class sap.ui.fl.write._internal.fieldExtensibility.MultiTenantABAPExtensibilityVariant * with name `sClassName` and enriches it with the information contained in `oClassInfo`. diff --git a/types/openui5/sap.ui.integration.d.ts b/types/openui5/sap.ui.integration.d.ts index 9c6270f91eb825..0c6a32479a2462 100644 --- a/types/openui5/sap.ui.integration.d.ts +++ b/types/openui5/sap.ui.integration.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.149.0 +// For Library Version: 1.150.0 declare module "sap/ui/integration/library" { import { URI } from "sap/ui/core/library"; diff --git a/types/openui5/sap.ui.layout.d.ts b/types/openui5/sap.ui.layout.d.ts index 7ce77a218ae88e..2dfe77da09ccb4 100644 --- a/types/openui5/sap.ui.layout.d.ts +++ b/types/openui5/sap.ui.layout.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.149.0 +// For Library Version: 1.150.0 declare module "sap/ui/layout/library" { import Control from "sap/ui/core/Control"; @@ -3765,8 +3765,7 @@ declare module "sap/ui/layout/cssgrid/GridResponsiveLayout" { /** * Describes the settings that can be provided to the GridResponsiveLayout constructor. */ - export interface $GridResponsiveLayoutSettings - extends $GridLayoutBaseSettings { + export interface $GridResponsiveLayoutSettings extends $GridLayoutBaseSettings { /** * If set to `true`, the current range (large, medium or small) is defined by the size of the container * surrounding the `CSSGrid` instead of the device screen size (media Query). @@ -4343,8 +4342,7 @@ declare module "sap/ui/layout/cssgrid/ResponsiveColumnItemLayoutData" { /** * Describes the settings that can be provided to the ResponsiveColumnItemLayoutData constructor. */ - export interface $ResponsiveColumnItemLayoutDataSettings - extends $LayoutDataSettings { + export interface $ResponsiveColumnItemLayoutDataSettings extends $LayoutDataSettings { /** * Specifies the number of columns, which the item should take. */ @@ -4539,8 +4537,7 @@ declare module "sap/ui/layout/cssgrid/ResponsiveColumnLayout" { /** * Describes the settings that can be provided to the ResponsiveColumnLayout constructor. */ - export interface $ResponsiveColumnLayoutSettings - extends $GridLayoutBaseSettings { + export interface $ResponsiveColumnLayoutSettings extends $GridLayoutBaseSettings { /** * Fired when the currently active layout changes */ @@ -13849,8 +13846,7 @@ declare module "sap/ui/layout/ResponsiveFlowLayoutData" { /** * Describes the settings that can be provided to the ResponsiveFlowLayoutData constructor. */ - export interface $ResponsiveFlowLayoutDataSettings - extends $LayoutDataSettings { + export interface $ResponsiveFlowLayoutDataSettings extends $LayoutDataSettings { /** * Defines the minimal size in px of a ResponsiveFlowLayout element. The element will be shrunk down to * this value. diff --git a/types/openui5/sap.ui.mdc.d.ts b/types/openui5/sap.ui.mdc.d.ts index c089bcac368960..0d7b200dcbc7d9 100644 --- a/types/openui5/sap.ui.mdc.d.ts +++ b/types/openui5/sap.ui.mdc.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.149.0 +// For Library Version: 1.150.0 declare module "sap/ui/mdc/AggregationBaseDelegate" { import BaseDelegate from "sap/ui/mdc/BaseDelegate"; @@ -3192,16 +3192,16 @@ declare module "sap/ui/mdc/ValueHelpDelegate" { import { ConditionObject } from "sap/ui/mdc/condition/Condition"; - import FilterableListContent from "sap/ui/mdc/valuehelp/base/FilterableListContent"; + import ListContent from "sap/ui/mdc/valuehelp/base/ListContent"; import Context from "sap/ui/model/Context"; + import FilterableListContent from "sap/ui/mdc/valuehelp/base/FilterableListContent"; + import { util } from "sap/ui/mdc/library"; import Filter from "sap/ui/model/Filter"; - import ListContent from "sap/ui/mdc/valuehelp/base/ListContent"; - import Content from "sap/ui/mdc/valuehelp/base/Content"; import ValueHelpSelectionType from "sap/ui/mdc/enums/ValueHelpSelectionType"; @@ -3268,6 +3268,29 @@ declare module "sap/ui/mdc/ValueHelpDelegate" { */ oConditionB: ConditionObject ): boolean; + /** + * Creates a condition that represents the given context for 'Select from list' scenarios. + * By default, this method creates a {@link sap.ui.mdc.condition.ConditionObject Condition} representing + * an "equal to" filter. + * + * @since 1.150.0 + * + * @returns Condition representing the given context + */ + createConditionForContext( + /** + * The `ValueHelp` control instance + */ + oValueHelp: ValueHelp, + /** + * `ValueHelp` content instance + */ + oContent: ListContent, + /** + * Entry of a given list + */ + oContext: Context + ): ConditionObject; /** * Provides the possibility to convey custom data in conditions. This enables an application to enhance * conditions with data relevant for combined key or out parameter scenarios. @@ -3404,16 +3427,16 @@ declare module "sap/ui/mdc/ValueHelpDelegate" { * the same way. * * For each relevant column all items are searched for an exact match first and again with a startsWith - * filter afterwards, if necessary. + * filter afterwards, if necessary (and supported by the used data type). * * If the `caseSensitive` property is disabled, whichever entry comes first, wins, whether the user's input * is in lowercase or uppercase letters. * * {@link sap.ui.mdc.valuehelp.base.ListContent ListContent} * - * @since 1.120.0 + * @since 1.120 * - * @returns Promise resolving in the `Context` that's relevant' + * @returns The `Context` that matches the user input best */ getFirstMatch( /** @@ -3428,7 +3451,7 @@ declare module "sap/ui/mdc/ValueHelpDelegate" { * Configuration */ oConfig: ItemForValueConfiguration - ): Context; + ): Context | undefined; /** * Provides type information for list content filtering. * By default, this method returns an object of types per binding path, extracted from a binding template @@ -5953,8 +5976,7 @@ declare module "sap/ui/mdc/chart/ActionLayoutData" { /** * Describes the settings that can be provided to the ActionLayoutData constructor. */ - export interface $ActionLayoutDataSettings - extends $OverflowToolbarLayoutDataSettings { + export interface $ActionLayoutDataSettings extends $OverflowToolbarLayoutDataSettings { /** * Defines the position of the action within the group of chart actions. */ @@ -6091,8 +6113,7 @@ declare module "sap/ui/mdc/chart/ChartImplementationContainer" { /** * Describes the settings that can be provided to the ChartImplementationContainer constructor. */ - export interface $ChartImplementationContainerSettings - extends $ControlSettings { + export interface $ChartImplementationContainerSettings extends $ControlSettings { /** * Toggles the visibility of the noDataContent & content */ @@ -6277,8 +6298,7 @@ declare module "sap/ui/mdc/chart/ChartSelectionDetails" { /** * Describes the settings that can be provided to the ChartSelectionDetails constructor. */ - export interface $ChartSelectionDetailsSettings - extends $SelectionDetailsSettings { + export interface $ChartSelectionDetailsSettings extends $SelectionDetailsSettings { /** * Callback function that is called for each `SelectionDetailsItem` to determine if the navigation is enabled. * The callback is called with the following parameters: @@ -20161,8 +20181,7 @@ declare module "sap/ui/mdc/table/ActionLayoutData" { /** * Describes the settings that can be provided to the ActionLayoutData constructor. */ - export interface $ActionLayoutDataSettings - extends $OverflowToolbarLayoutDataSettings { + export interface $ActionLayoutDataSettings extends $OverflowToolbarLayoutDataSettings { /** * Defines the position of the action within the group of table actions. */ @@ -22194,8 +22213,7 @@ declare module "sap/ui/mdc/table/ResponsiveColumnSettings" { /** * Describes the settings that can be provided to the ResponsiveColumnSettings constructor. */ - export interface $ResponsiveColumnSettingsSettings - extends $ColumnSettingsSettings { + export interface $ResponsiveColumnSettingsSettings extends $ColumnSettingsSettings { /** * Defines the column importance. * @@ -26846,6 +26864,19 @@ declare module "sap/ui/mdc/valuehelp/content/FixedList" { * @returns Value of property `groupable` */ getGroupable(): boolean; + /** + * Gets current value of property {@link #getHighlightFilterResults highlightFilterResults}. + * + * If set to `true`, the filter is applied word by word, and matched text in the results is highlighted. + * If set to `false`, filtering takes the whole string into account, and nothing is highlighted. + * + * Default value is `false`. + * + * @since 1.150 + * + * @returns Value of property `highlightFilterResults` + */ + getHighlightFilterResults(): boolean; /** * Gets content of aggregation {@link #getItems items}. * @@ -26990,6 +27021,26 @@ declare module "sap/ui/mdc/valuehelp/content/FixedList" { */ bGroupable?: boolean ): this; + /** + * Sets a new value for property {@link #getHighlightFilterResults highlightFilterResults}. + * + * If set to `true`, the filter is applied word by word, and matched text in the results is highlighted. + * If set to `false`, filtering takes the whole string into account, and nothing is highlighted. + * + * When called with a value of `null` or `undefined`, the default value of the property will be restored. + * + * Default value is `false`. + * + * @since 1.150 + * + * @returns Reference to `this` in order to allow method chaining + */ + setHighlightFilterResults( + /** + * New value for property `highlightFilterResults` + */ + bHighlightFilterResults?: boolean + ): this; /** * Sets a new value for property {@link #getRestrictedToFixedValues restrictedToFixedValues}. * @@ -27035,6 +27086,14 @@ declare module "sap/ui/mdc/valuehelp/content/FixedList" { */ filterList?: boolean | PropertyBindingInfo | `{${string}}`; + /** + * If set to `true`, the filter is applied word by word, and matched text in the results is highlighted. + * If set to `false`, filtering takes the whole string into account, and nothing is highlighted. + * + * @since 1.150 + */ + highlightFilterResults?: boolean | PropertyBindingInfo | `{${string}}`; + /** * If set, an item to clear the selection is added. * diff --git a/types/openui5/sap.ui.rta.d.ts b/types/openui5/sap.ui.rta.d.ts index 3531d415618db6..ba66b3f8298a85 100644 --- a/types/openui5/sap.ui.rta.d.ts +++ b/types/openui5/sap.ui.rta.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.149.0 +// For Library Version: 1.150.0 declare module "sap/ui/rta/api/startAdaptation" { import Control from "sap/ui/core/Control"; diff --git a/types/openui5/sap.ui.suite.d.ts b/types/openui5/sap.ui.suite.d.ts index 122d63669c22de..fd2230b2fab54b 100644 --- a/types/openui5/sap.ui.suite.d.ts +++ b/types/openui5/sap.ui.suite.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.149.0 +// For Library Version: 1.150.0 declare module "sap/ui/suite/library" { /** diff --git a/types/openui5/sap.ui.support.d.ts b/types/openui5/sap.ui.support.d.ts index 5036e3f37eb4ae..76c24ba0937f45 100644 --- a/types/openui5/sap.ui.support.d.ts +++ b/types/openui5/sap.ui.support.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.149.0 +// For Library Version: 1.150.0 declare module "sap/ui/support/library" { /** @@ -321,6 +321,8 @@ declare module "sap/ui/support/RuleAnalyzer" { * Adds new temporary rule when in silent mode * * @since 1.60 + * @deprecated As of version 1.150. Temporary rules are deprecated. Please use library rulesets instead. + * See {@link topic:b5a51358b3574aea9143fa50ae4e0e2a Creating a Ruleset for a Library}. * * @returns Rule creation status. Possible values are "success" or description of why adding failed. */ diff --git a/types/openui5/sap.ui.table.d.ts b/types/openui5/sap.ui.table.d.ts index 4901a204bab1ae..547b1170418f7b 100644 --- a/types/openui5/sap.ui.table.d.ts +++ b/types/openui5/sap.ui.table.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.149.0 +// For Library Version: 1.150.0 declare module "sap/ui/table/library" { import TreeAutoExpandMode1 from "sap/ui/model/TreeAutoExpandMode"; @@ -1461,8 +1461,7 @@ declare module "sap/ui/table/AnalyticalTable" { /** * Parameters of the AnalyticalTable#group event. */ - export interface AnalyticalTable$GroupEventParameters - extends Table$GroupEventParameters {} + export interface AnalyticalTable$GroupEventParameters extends Table$GroupEventParameters {} /** * Event object of the AnalyticalTable#group event. @@ -3501,8 +3500,7 @@ declare module "sap/ui/table/plugins/MultiSelectionPlugin" { /** * Describes the settings that can be provided to the MultiSelectionPlugin constructor. */ - export interface $MultiSelectionPluginSettings - extends $SelectionPluginSettings { + export interface $MultiSelectionPluginSettings extends $SelectionPluginSettings { /** * Number of indices which can be selected in a range. Accepts positive integer values. If set to 0, the * limit is disabled, and the Select All checkbox appears instead of the Deselect All button. @@ -3551,8 +3549,7 @@ declare module "sap/ui/table/plugins/MultiSelectionPlugin" { /** * Parameters of the MultiSelectionPlugin#selectionChange event. */ - export interface MultiSelectionPlugin$SelectionChangeEventParameters - extends SelectionPlugin$SelectionChangeEventParameters { + export interface MultiSelectionPlugin$SelectionChangeEventParameters extends SelectionPlugin$SelectionChangeEventParameters { /** * Array of indices whose selection has been changed (either selected or deselected) */ @@ -4029,8 +4026,7 @@ declare module "sap/ui/table/plugins/ODataV4MultiSelection" { /** * Describes the settings that can be provided to the ODataV4MultiSelection constructor. */ - export interface $ODataV4MultiSelectionSettings - extends $SelectionPluginSettings { + export interface $ODataV4MultiSelectionSettings extends $SelectionPluginSettings { /** * Enables notifications that are displayed once a selection has been limited. */ @@ -4145,8 +4141,7 @@ declare module "sap/ui/table/plugins/ODataV4SingleSelection" { /** * Describes the settings that can be provided to the ODataV4SingleSelection constructor. */ - export interface $ODataV4SingleSelectionSettings - extends $SelectionPluginSettings {} + export interface $ODataV4SingleSelectionSettings extends $SelectionPluginSettings {} } declare module "sap/ui/table/plugins/SelectionPlugin" { @@ -11201,8 +11196,7 @@ declare module "sap/ui/table/TablePersoController" { * @deprecated As of version 1.115. Please use the {@link sap.m.p13n.Engine Engine} for personalization * instead. */ - export interface $TablePersoControllerSettings - extends $ManagedObjectSettings { + export interface $TablePersoControllerSettings extends $ManagedObjectSettings { /** * Auto save state */ diff --git a/types/openui5/sap.ui.testrecorder.d.ts b/types/openui5/sap.ui.testrecorder.d.ts index 99014b786c51a1..3eefb41bf3b5b8 100644 --- a/types/openui5/sap.ui.testrecorder.d.ts +++ b/types/openui5/sap.ui.testrecorder.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.149.0 +// For Library Version: 1.150.0 declare module "sap/ui/testrecorder/library" {} diff --git a/types/openui5/sap.ui.unified.d.ts b/types/openui5/sap.ui.unified.d.ts index 98dbfa70a72d53..d95822c2fea631 100644 --- a/types/openui5/sap.ui.unified.d.ts +++ b/types/openui5/sap.ui.unified.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.149.0 +// For Library Version: 1.150.0 declare module "sap/ui/unified/library" { /** @@ -7713,7 +7713,7 @@ declare module "sap/ui/unified/CalendarAppointment" { $DateTypeRangeSettings, } from "sap/ui/unified/DateTypeRange"; - import { ID, CSSColor, URI } from "sap/ui/core/library"; + import { ID, aria, CSSColor, URI } from "sap/ui/core/library"; import Control from "sap/ui/core/Control"; @@ -7828,6 +7828,27 @@ declare module "sap/ui/unified/CalendarAppointment" { * @returns Reference to `this` in order to allow method chaining */ destroyCustomContent(): this; + /** + * Gets current value of property {@link #getAriaHasPopup ariaHasPopup}. + * + * Specifies the value of the `aria-haspopup` attribute + * + * If the value is `None`, the attribute will not be rendered. Otherwise it will be rendered with the selected + * value. + * + * NOTE: Use this property only when an `sap.ui.unified.CalendarAppointment` instance is active and related + * to a popover/popup. The value needs to be equal to the main/root role of the popup - e.g. dialog, menu + * or list (examples: if you have dialog -> dialog, if you have menu -> menu; if you have list -> list; + * if you have dialog containing a list -> dialog). Do not use it, if you open a standard sap.m.Dialog, + * MessageBox or other type of modal dialogs. + * + * Default value is `None`. + * + * @since 1.150.0 + * + * @returns Value of property `ariaHasPopup` + */ + getAriaHasPopup(): aria.HasPopup; /** * Returns array of IDs of the elements which are the current targets of the association {@link #getAriaLabelledBy ariaLabelledBy}. */ @@ -8011,6 +8032,34 @@ declare module "sap/ui/unified/CalendarAppointment" { */ vCustomContent: int | string | Control ): Control | null; + /** + * Sets a new value for property {@link #getAriaHasPopup ariaHasPopup}. + * + * Specifies the value of the `aria-haspopup` attribute + * + * If the value is `None`, the attribute will not be rendered. Otherwise it will be rendered with the selected + * value. + * + * NOTE: Use this property only when an `sap.ui.unified.CalendarAppointment` instance is active and related + * to a popover/popup. The value needs to be equal to the main/root role of the popup - e.g. dialog, menu + * or list (examples: if you have dialog -> dialog, if you have menu -> menu; if you have list -> list; + * if you have dialog containing a list -> dialog). Do not use it, if you open a standard sap.m.Dialog, + * MessageBox or other type of modal dialogs. + * + * When called with a value of `null` or `undefined`, the default value of the property will be restored. + * + * Default value is `None`. + * + * @since 1.150.0 + * + * @returns Reference to `this` in order to allow method chaining + */ + setAriaHasPopup( + /** + * New value for property `ariaHasPopup` + */ + sAriaHasPopup?: aria.HasPopup | keyof typeof aria.HasPopup + ): this; /** * Sets a new value for property {@link #getColor color}. * @@ -8200,6 +8249,25 @@ declare module "sap/ui/unified/CalendarAppointment" { */ color?: CSSColor | PropertyBindingInfo | `{${string}}`; + /** + * Specifies the value of the `aria-haspopup` attribute + * + * If the value is `None`, the attribute will not be rendered. Otherwise it will be rendered with the selected + * value. + * + * NOTE: Use this property only when an `sap.ui.unified.CalendarAppointment` instance is active and related + * to a popover/popup. The value needs to be equal to the main/root role of the popup - e.g. dialog, menu + * or list (examples: if you have dialog -> dialog, if you have menu -> menu; if you have list -> list; + * if you have dialog containing a list -> dialog). Do not use it, if you open a standard sap.m.Dialog, + * MessageBox or other type of modal dialogs. + * + * @since 1.150.0 + */ + ariaHasPopup?: + | (aria.HasPopup | keyof typeof aria.HasPopup) + | PropertyBindingInfo + | `{${string}}`; + /** * Holds the content of the appointment. * @@ -20974,8 +21042,7 @@ declare module "sap/ui/unified/RecurringCalendarAppointment" { * * @experimental As of version 1.149. */ - export interface $RecurringCalendarAppointmentSettings - extends $CalendarAppointmentSettings { + export interface $RecurringCalendarAppointmentSettings extends $CalendarAppointmentSettings { /** * The recurrence type (Daily, Weekly, Monthly, Yearly). */ @@ -21251,8 +21318,7 @@ declare module "sap/ui/unified/RecurringNonWorkingPeriod" { * * @experimental As of version 1.127.0. */ - export interface $RecurringNonWorkingPeriodSettings - extends $NonWorkingPeriodSettings { + export interface $RecurringNonWorkingPeriodSettings extends $NonWorkingPeriodSettings { /** * The recurrenceType determines the pattern of recurrence for a given calendar item. */ diff --git a/types/openui5/sap.ui.ux3.d.ts b/types/openui5/sap.ui.ux3.d.ts index c72b14ee2f6c66..fd6021bf1680c0 100644 --- a/types/openui5/sap.ui.ux3.d.ts +++ b/types/openui5/sap.ui.ux3.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.149.0 +// For Library Version: 1.150.0 declare module "sap/ui/ux3/library" { /** diff --git a/types/openui5/sap.uxap.d.ts b/types/openui5/sap.uxap.d.ts index a067a3a6f17c9b..d81f7984d76431 100644 --- a/types/openui5/sap.uxap.d.ts +++ b/types/openui5/sap.uxap.d.ts @@ -1,4 +1,4 @@ -// For Library Version: 1.149.0 +// For Library Version: 1.150.0 declare module "sap/uxap/library" { /** @@ -2013,8 +2013,7 @@ declare module "sap/uxap/ObjectPageAccessibleLandmarkInfo" { /** * Describes the settings that can be provided to the ObjectPageAccessibleLandmarkInfo constructor. */ - export interface $ObjectPageAccessibleLandmarkInfoSettings - extends $ElementSettings { + export interface $ObjectPageAccessibleLandmarkInfoSettings extends $ElementSettings { /** * Landmark role of the root container of the corresponding `sap.uxap.ObjectPageLayout` control. * @@ -2225,8 +2224,7 @@ declare module "sap/uxap/ObjectPageDynamicHeaderContent" { /** * Describes the settings that can be provided to the ObjectPageDynamicHeaderContent constructor. */ - export interface $ObjectPageDynamicHeaderContentSettings - extends $DynamicPageHeaderSettings {} + export interface $ObjectPageDynamicHeaderContentSettings extends $DynamicPageHeaderSettings {} } declare module "sap/uxap/ObjectPageDynamicHeaderTitle" { @@ -2337,8 +2335,7 @@ declare module "sap/uxap/ObjectPageDynamicHeaderTitle" { /** * Describes the settings that can be provided to the ObjectPageDynamicHeaderTitle constructor. */ - export interface $ObjectPageDynamicHeaderTitleSettings - extends $DynamicPageTitleSettings {} + export interface $ObjectPageDynamicHeaderTitleSettings extends $DynamicPageTitleSettings {} } declare module "sap/uxap/ObjectPageHeader" { @@ -3961,8 +3958,7 @@ declare module "sap/uxap/ObjectPageHeaderActionButton" { /** * Describes the settings that can be provided to the ObjectPageHeaderActionButton constructor. */ - export interface $ObjectPageHeaderActionButtonSettings - extends $ButtonSettings { + export interface $ObjectPageHeaderActionButtonSettings extends $ButtonSettings { /** * Hide the button text when rendered into the headerTitle part of the ObjectPageLayout. This is useful * if you want to display icons only in the headerTitle part but still want to display text + icon in the @@ -4486,8 +4482,7 @@ declare module "sap/uxap/ObjectPageHeaderLayoutData" { /** * Describes the settings that can be provided to the ObjectPageHeaderLayoutData constructor. */ - export interface $ObjectPageHeaderLayoutDataSettings - extends $LayoutDataSettings { + export interface $ObjectPageHeaderLayoutDataSettings extends $LayoutDataSettings { /** * If this property is set the control will be visible (or not) in a small sized layout. */ @@ -7476,8 +7471,7 @@ declare module "sap/uxap/ObjectPageSection" { /** * Describes the settings that can be provided to the ObjectPageSection constructor. */ - export interface $ObjectPageSectionSettings - extends $ObjectPageSectionBaseSettings { + export interface $ObjectPageSectionSettings extends $ObjectPageSectionBaseSettings { /** * Determines whether to display the Section title or not. */ @@ -8361,8 +8355,7 @@ declare module "sap/uxap/ObjectPageSubSection" { /** * Describes the settings that can be provided to the ObjectPageSubSection constructor. */ - export interface $ObjectPageSubSectionSettings - extends $ObjectPageSectionBaseSettings { + export interface $ObjectPageSubSectionSettings extends $ObjectPageSectionBaseSettings { /** * Determines whether to display the `SubSection` title or not. * diff --git a/types/titanium/index.d.ts b/types/titanium/index.d.ts index 20a6d20fa8e615..3c359802a927f1 100644 --- a/types/titanium/index.d.ts +++ b/types/titanium/index.d.ts @@ -3,8 +3,8 @@ type _Omit = Pick>; type FunctionPropertyNames = { - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - [K in keyof T]: T[K] extends Function ? K : never; + // tslint:disable-next-line:ban-types + [K in keyof T]: T[K] extends (...args: any[]) => any ? K : never; }[keyof T]; type Dictionary = Partial<_Omit>>; interface ProxyEventMap {} @@ -87,7 +87,7 @@ interface AnimatedOptions { animated?: boolean; } /** - * A JavaScript object holding `animated` and `duration` properties. Used on iOS For [TablewView](Titanium.UI.TableView) and [ListView](Titanium.UI.ListView) content offset transitions. + * A JavaScript object holding `animated` and `duration` properties. Used on iOS For [TableView](Titanium.UI.TableView) and [ListView](Titanium.UI.ListView) content offset transitions. */ interface AnimatedWithDurationOptions extends AnimatedOptions { /** @@ -245,7 +245,7 @@ interface CPU { times?: CPUTimes; } /** - * Simple object holding the data for a logical cpu execution times. + * Simple object holding the data for a logical CPU execution times. */ interface CPUTimes { /** @@ -308,6 +308,11 @@ interface CameraMediaItemType extends SuccessResponse { */ mediaType?: string; + /** + * The path of the image when returning data from the gallery. + */ + path?: string; + /** * Simple object defining the preview image size. This will be undefined when custom camera overlay is not used. Values are assumed to be in pixels. */ @@ -337,6 +342,20 @@ interface CameraMediaMultipleItemsType extends SuccessResponse { */ videos?: CameraMediaItemType[]; } +/** + * Parameters of the open callback + */ +interface CameraOpen { + /** + * Height of the preview camera image + */ + height?: number; + + /** + * Width of the preview camera image + */ + width?: number; +} /** * Simple object for specifying options to [showCamera](Titanium.Media.showCamera). */ @@ -393,6 +412,11 @@ interface CameraOptionsType { */ mediaTypes?: string[]; + /** + * Function to call when the camera is shown + */ + open?: (param0: CameraOpen) => void; + /** * View to added as an overlay to the camera UI (on top). */ @@ -403,6 +427,11 @@ interface CameraOptionsType { */ popoverView?: Titanium.UI.View; + /** + * Function to call during recording. Returns size and duration. + */ + recording?: (param0: CameraRecordingCallback) => void; + /** * Specifies if the media should be saved to the photo gallery upon successful capture. */ @@ -418,6 +447,18 @@ interface CameraOptionsType { */ success?: (param0: CameraMediaItemType) => void; + /** + * Maximum height of the saved image. Depending on your phone and your value this might not be + * exactly the value you specify. Check `Ti.Media.cameraOutputSizes` first. + */ + targetImageHeight?: number; + + /** + * Maximum width of the saved image. Depending on your phone and your value this might not be + * exactly the value you specify. Check `Ti.Media.cameraOutputSizes` first. + */ + targetImageWidth?: number; + /** * Transformation matrix to apply to the camera or photogallery view. */ @@ -437,6 +478,25 @@ interface CameraOptionsType { * Opens the camera with the specified camera direction. */ whichCamera?: number; + + /** + * Specifies if pinch to zoom is enabled or not. + */ + zoomEnabled?: boolean; +} +/** + * Infos about the current video recording + */ +interface CameraRecordingCallback { + /** + * Length in milliseconds + */ + duration?: number; + + /** + * Size of the video in bytes + */ + size?: number; } /** * Dictionary describing the items for . @@ -527,6 +587,30 @@ interface CreateStreamArgs { */ source?: Titanium.Blob | Titanium.Buffer; } +/** + * Dictionary object of parameters for the . + */ +interface CutoutSize { + /** + * The height of the cutout + */ + height?: number; + + /** + * The left position of the cutout. + */ + left?: number; + + /** + * The top position of the cutout. + */ + top?: number; + + /** + * The width of the cutout + */ + width?: number; +} /** * The parameter passed to the or callback. */ @@ -546,6 +630,15 @@ interface DataCreationResult { */ success?: boolean; } +/** + * Success callback in . + */ +interface DataCreationResultAndroid { + /** + * The created data. + */ + data?: Titanium.Blob; +} /** * Generic type for elements of returned `Array` from */ @@ -791,6 +884,20 @@ interface FailureResponse extends ErrorResponse { */ success?: boolean; } +/** + * An object representing a FairPlay Streaming configuration. + */ +interface FairPlayConfiguration { + /** + * The FairPlay Streaming public certificate to authenticate the content key request. + */ + certificate?: Titanium.Blob; + + /** + * The FairPlay Streaming license URL to handle the server-side authentication flow. + */ + licenseURL?: string; +} /** * An abstract datatype for specifying a text font. */ @@ -1008,7 +1115,7 @@ interface GetUserNotificationSettings { carPlaySetting?: number; /** - * Set of categories of user notification actions required by the applicaiton to use. + * Set of categories of user notification actions required by the application to use. */ categories?: Titanium.App.iOS.UserNotificationCategory[]; @@ -1024,7 +1131,7 @@ interface GetUserNotificationSettings { lockScreenSetting?: number; /** - * The current notication-center settings. + * The current notification-center settings. */ notificationCenterSetting?: number; @@ -1044,6 +1151,25 @@ interface GetUserNotificationSettings { */ types?: number[]; } +/** + * Object of options for configuring the glass effect on a . + */ +interface GlassEffectConfiguration { + /** + * Whether the glass effect responds to user interaction. + */ + interactive?: boolean; + + /** + * The style of the glass effect. + */ + style: number; + + /** + * The tint color to apply to the glass effect. + */ + tintColor?: string; +} /** * A simple object defining a color gradient. */ @@ -1223,7 +1349,7 @@ interface LaunchOptionsType { source?: string; /** - * The url that was triggered by the application or service. + * The URL that was triggered by the application or service. */ url?: string; } @@ -1459,29 +1585,6 @@ interface Matrix3DCreationDict { */ scale?: number; } -/** - * Simple object passed to to initialize a matrix. - */ -interface MatrixCreationDict { - /** - * Point to rotate around, specified as a dictionary object with `x` and `y` - * properties, where { x: 0.5, y: 0.5 } represents the center of whatever is being - * rotated. - */ - anchorPoint?: Point; - - /** - * Rotation angle, in degrees. See the [rotate](Titanium.UI.2DMatrix.rotate) method - * for a discussion of rotation. - */ - rotate?: number; - - /** - * Scale the matrix by the specified scaling factor. The same scaling factor is used - * for both horizontal and vertical scaling. - */ - scale?: number; -} /** * Argument passed to the callback when a request finishes successfully or erroneously. */ @@ -1652,7 +1755,7 @@ interface MessageReply { error?: string; /** - * Reply message from watchapp. + * Reply message from watch app. */ message?: any; @@ -1749,6 +1852,20 @@ interface MusicLibraryResponseType { */ types?: number; } +/** + * The parameter passed to the `error` callback of . + */ +interface NotificationChannels { + /** + * ID of the channel + */ + id?: string; + + /** + * Name of the channel + */ + name?: string; +} /** * Dictionary object of parameters used to create a notification using * . @@ -1864,7 +1981,7 @@ interface NumberFormattedPart { */ interface OnLinkURLResponse { /** - * The url of the link that should be navigated to. + * The URL of the link that should be navigated to. */ url?: string; } @@ -2039,6 +2156,11 @@ interface PhotoGalleryOptionsType { */ error?: (param0: FailureResponse) => void; + /** + * Specifies the number of images a user can select at maximum. + */ + maxImages?: boolean; + /** * Array of media type constants to allow. * Live photos is only supported on the iOS platform, starting with iOS 9.1. If you want @@ -2048,6 +2170,11 @@ interface PhotoGalleryOptionsType { */ mediaTypes?: string[]; + /** + * Do not include the blob in the result + */ + pathOnly?: boolean; + /** * View to position the photo gallery popover on top of. */ @@ -2301,6 +2428,20 @@ interface ReadyStatePayload { */ readyState?: number; } +/** + * Offset of the refresh control view. + */ +interface RefreshControlOffset { + /** + * The offset from the top of this view at which the progress spinner should come to rest after a successful swipe gesture. + */ + end?: number; + + /** + * The offset from the top of this view at which the progress spinner should appear. + */ + start?: number; +} /** * Argument passed to the callback when a request finishes successfully or erroneously. */ @@ -2361,7 +2502,7 @@ interface RouteDescription { outputs?: string[]; } /** - * Represents the custom edit action for a ListItem. + * Represents the custom edit action for a ListItem or TableViewRow. */ interface RowActionType { /** @@ -2375,6 +2516,16 @@ interface RowActionType { */ identifier?: string; + /** + * The image/icon of the row action. + */ + image?: string; + + /** + * The state to show this edit action. Either "trailing" (default) or "leading". + */ + state?: string; + /** * The style of the row action. */ @@ -2856,7 +3007,7 @@ declare namespace Titanium { const ACTION_BATTERY_LOW: string; /** - * Inidicates the battery is now okay after being low. + * Indicates the battery is now okay after being low. */ const ACTION_BATTERY_OKAY: string; @@ -3973,7 +4124,7 @@ declare namespace Titanium { const TILE_STATE_INACTIVE: number; /** - * QuickSettings tile is unavailble. + * QuickSettings tile is unavailable. */ const TILE_STATE_UNAVAILABLE: number; @@ -3988,12 +4139,12 @@ declare namespace Titanium { const VISIBILITY_PRIVATE: number; /** - * Shows the notification's full content on the lockscreen. This is the system default if visibility is left unspecified. + * Shows the notification's full content on the lock screen. This is the system default if visibility is left unspecified. */ const VISIBILITY_PUBLIC: number; /** - * Shows the most minimal information of the notification on the lockscreen. + * Shows the most minimal information of the notification on the lock screen. */ const VISIBILITY_SECRET: number; @@ -4683,7 +4834,7 @@ declare namespace Titanium { accessibilityHint: string; /** - * A succint label identifying the view for the device's accessibility service. + * A succinct label identifying the view for the device's accessibility service. */ accessibilityLabel: string; @@ -4977,7 +5128,7 @@ declare namespace Titanium { tickerText: string; /** - * Allows user to conceal private information of the notification on the lockscreen. + * Allows user to conceal private information of the notification on the lock screen. */ visibility: number; @@ -5081,7 +5232,7 @@ declare namespace Titanium { lightColor: number; /** - * Whether or not notifications posted to this channel are shown on the lockscreen in full or redacted form. + * Whether or not notifications posted to this channel are shown on the lock screen in full or redacted form. */ lockscreenVisibility: number; @@ -5195,6 +5346,11 @@ declare namespace Titanium { */ static lifecycleContainer: Titanium.UI.Window | Titanium.UI.TabGroup; + /** + * Returns an object with the ID and name of the notification channels + */ + static notificationChannels: Dictionary; + /** * Adds the specified callback as an event listener for the named event. */ @@ -5353,7 +5509,7 @@ declare namespace Titanium { interface QuickSettingsService_tileremoved_Event extends QuickSettingsServiceBaseEvent { } /** - * An item from the signle choice menu has been selected. + * An item from the single choice menu has been selected. */ interface QuickSettingsService_tiledialogoptionselected_Event extends QuickSettingsServiceBaseEvent { /** @@ -5520,7 +5676,7 @@ declare namespace Titanium { showDialog(options: showParams): void; /** - * Colapses the quick settings menu and starts an activity for the passed Intent. + * Collapses the quick settings menu and starts an activity for the passed Intent. */ startActivityAndCollapse(intent: Titanium.Android.Intent): void; @@ -6145,12 +6301,12 @@ declare namespace Titanium { const USER_NOTIFICATION_TYPE_SOUND: number; /** - * Uniform type identifier for Mac OS icon images. + * Uniform type identifier for macOS icon images. */ const UTTYPE_APPLE_ICNS: string; /** - * Uniform type identifier for protected MPEG-4 audio (iTunes music store format). + * Uniform type identifier for Apple-protected MPEG-4 audio. */ const UTTYPE_APPLE_PROTECTED_MPEG4_AUDIO: string; @@ -6500,15 +6656,15 @@ declare namespace Titanium { * Adds an array of Titanium.App.iOS.SearchableItem objects to the default search index. */ addToDefaultSearchableIndex( - Array: readonly Titanium.App.iOS.SearchableItem[], + Array: ReadonlyArray, callback: (param0: any) => void, ): void; /** * Removes search items based on an array of domain identifiers. */ - deleteAllSearchableItemByDomainIdenifiers( - Array: readonly string[], + deleteAllSearchableItemByDomainIdentifiers( + Array: ReadonlyArray, callback: (param0: any) => void, ): void; @@ -6520,7 +6676,7 @@ declare namespace Titanium { /** * Removes search items based on an array of identifiers. */ - deleteSearchableItemsByIdentifiers(Array: readonly string[], callback: (param0: any) => void): void; + deleteSearchableItemsByIdentifiers(Array: ReadonlyArray, callback: (param0: any) => void): void; /** * Fires a synthesized event to any registered listeners. @@ -7076,7 +7232,7 @@ declare namespace Titanium { } /** * Fired if the activity context needs to be saved before being continued on another device. - * To fire the event, set the UserActiviy object's `needsSave ` property to `true`. + * To fire the event, set the UserActivity object's `needsSave ` property to `true`. * The receiver should update the activity with current activity state. * After the event is fired, iOS will reset the `needsSave` property to false. */ @@ -7178,7 +7334,7 @@ declare namespace Titanium { keywords: string[]; /** - * Set to true everytime you have updated the user activity and need the changes to be saved before handing it off to another device. + * Set to true every time you have updated the user activity and need the changes to be saved before handing it off to another device. */ needsSave: boolean; @@ -7245,7 +7401,7 @@ declare namespace Titanium { /** * Deletes user activities created by your app that have the specified persistent identifiers. */ - deleteSavedUserActivitiesForPersistentIdentifiers(persistentIdentifiers: readonly string[]): void; + deleteSavedUserActivitiesForPersistentIdentifiers(persistentIdentifiers: ReadonlyArray): void; /** * Fires a synthesized event to any registered listeners. @@ -7306,6 +7462,8 @@ declare namespace Titanium { * The UserDefaults module is used for storing application-related data in property/value pairs * that persist beyond application sessions and device power cycles. UserDefaults allows the suiteName * of the UserDefaults to be specified at creation time. + * **Important**: Using this API requires the `NSPrivacyAccessedAPICategoryUserDefaults` property set in the + * privacy manifest that was introduced in iOS 17. You can learn more about it [here](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api). */ interface UserDefaults extends Titanium.App.Properties { /** @@ -7516,7 +7674,7 @@ declare namespace Titanium { * Removes the specified delivered notifications from the notification-center. * If no notifications are specified, all delivered notifications will be removed. */ - static removeDeliveredNotifications(notifications: readonly UserNotificationDictionary[]): void; + static removeDeliveredNotifications(notifications: ReadonlyArray): void; /** * Removes the specified callback as an event listener for the named event. @@ -7527,7 +7685,7 @@ declare namespace Titanium { * Removes the specified pending notifications to prevent them from being triggered. * If no notifications are specified, all pending notifications will be removed. */ - static removePendingNotifications(notifications: readonly UserNotificationDictionary[]): void; + static removePendingNotifications(notifications: ReadonlyArray): void; /** * Notification types and user notification categories the application is registered to use. @@ -7613,6 +7771,11 @@ declare namespace Titanium { */ static applyProperties(props: any): void; + /** + * Clears app data and cache. This will close the app. + */ + static clearUserCache(): void; + /** * Fires a synthesized event to any registered listeners. */ @@ -7719,7 +7882,7 @@ declare namespace Titanium { /** * Returns the value of a property as an array data type. */ - static getList(property: string, defaultValue?: readonly any[]): any[]; + static getList(property: string, defaultValue?: ReadonlyArray): any[]; /** * Returns the value of a property as an object. @@ -7786,7 +7949,7 @@ declare namespace Titanium { * Sets the value of a property as an array data type. The property will be created if it * does not exist. */ - static setList(property: string, value: readonly any[]): void; + static setList(property: string, value: ReadonlyArray): void; /** * Sets the value of a property as an object data type. The property will be created if it @@ -8096,13 +8259,13 @@ declare namespace Titanium { /** * A string containing the localized description of the error. - * This property does not exhist if errorCode is 0, which means there is no error. + * This property does not exist if errorCode is 0, which means there is no error. */ message: string; /** * The response text for [task](Modules.URLSession.task) and [uploadTask](Modules.URLSession.uploadTask). - * This property does not exhist for download task. For download task response, + * This property does not exist for download task. For download task response, * use [downloadcompleted](Titanium.App.iOS.downloadcompleted) event. */ responseText: string; @@ -8178,7 +8341,7 @@ declare namespace Titanium { activityType: string; /** - * With field will contain the searchable Unique Identifier if the continueactivity is fired from a Core Spotlight searh result. + * With field will contain the searchable Unique Identifier if the continueactivity is fired from a Core Spotlight search result. */ searchableItemActivityIdentifier: string; @@ -8602,22 +8765,22 @@ declare namespace Titanium { const METHOD_SMS: number; /** - * Indicates a daily recurrence rule for a events reccurance frequency. + * Indicates a daily recurrence rule for a events recurrence frequency. */ const RECURRENCEFREQUENCY_DAILY: number; /** - * Indicates a monthly recurrence rule for a events reccurance frequency. + * Indicates a monthly recurrence rule for a events recurrence frequency. */ const RECURRENCEFREQUENCY_MONTHLY: number; /** - * Indicates a weekly recurrence rule for a events reccurance frequency. + * Indicates a weekly recurrence rule for a events recurrence frequency. */ const RECURRENCEFREQUENCY_WEEKLY: number; /** - * Indicates a yearly recurrence rule for a events reccurance frequency. + * Indicates a yearly recurrence rule for a events recurrence frequency. */ const RECURRENCEFREQUENCY_YEARLY: number; @@ -8911,6 +9074,18 @@ declare namespace Titanium { */ createEvent(properties: Dictionary): Titanium.Calendar.Event; + /** + * Creates multiple events at once in this calendar. + */ + createEvents( + propertiesArray: ReadonlyArray>, + ): Titanium.Calendar.Event[]; + + /** + * Deletes multiple events with their specified identifier(s). + */ + deleteEvents(ids: number[] | string[]): number; + /** * Fires a synthesized event to any registered listeners. */ @@ -8926,6 +9101,11 @@ declare namespace Titanium { */ getEventsBetweenDates(date1: Date | string, date2: Date | string): Titanium.Calendar.Event[]; + /** + * Gets multiple events with their specified identifier(s). + */ + getEventsById(ids: number[] | string[]): Titanium.Calendar.Event[]; + /** * Gets events that occur on a specified date. * @deprecated Use [Titanium.Calendar.Calendar.getEventsBetweenDates](Titanium.Calendar.Calendar.getEventsBetweenDates) instead. @@ -9087,7 +9267,7 @@ declare namespace Titanium { refresh(): boolean; /** - * Removes an event from the event store. + * Removes an event from the calendar. */ remove(span: number): boolean; @@ -9307,7 +9487,7 @@ declare namespace Titanium { members(): Titanium.Contacts.Person[]; /** - * Removes a person from this group. For >= iOS9, it is not + * Removes a person from this group. For >= iOS 9, it is not * required to call after calling this method. */ remove(person: Titanium.Contacts.Person): void; @@ -9383,7 +9563,7 @@ declare namespace Titanium { readonly identifier: string; /** - * Image for the person. Single value. Read-only for >= iOS9 + * Image for the person. Single value. Read-only for >= iOS 9 */ image: Titanium.Blob; @@ -9559,7 +9739,7 @@ declare namespace Titanium { /** * Executes an SQL statement against the database and returns a `ResultSet`. */ - execute(sql: string, vararg?: readonly string[]): Titanium.Database.ResultSet; + execute(sql: string, vararg?: ReadonlyArray): Titanium.Database.ResultSet; /** * Executes an SQL statement against the database and returns a `ResultSet`. @@ -9569,20 +9749,20 @@ declare namespace Titanium { /** * Executes an SQL statement against the database and returns a `ResultSet`. */ - execute(sql: string, vararg?: readonly any[]): Titanium.Database.ResultSet; + execute(sql: string, vararg?: ReadonlyArray): Titanium.Database.ResultSet; /** * Synchronously executes an array of SQL statements against the database and returns an array of `ResultSet`. * On failure, this will throw an [Error](BatchQueryError) that reports the failed index and partial results */ - executeAll(queries: readonly string[]): Titanium.Database.ResultSet[]; + executeAll(queries: ReadonlyArray): Titanium.Database.ResultSet[]; /** * Asynchronously executes an array of SQL statements against the database and fires a callback with a possible Error, and an array of `ResultSet`. * On failure, this will call the callback with an [Error](PossibleBatchQueryError) that reports the failed `index`, and a second argument with the partial `results`. */ executeAllAsync( - queries: readonly string[], + queries: ReadonlyArray, callback?: (param0: PossibleBatchQueryError, param1: Titanium.Database.ResultSet[]) => void, ): Promise; @@ -10062,7 +10242,7 @@ declare namespace Titanium { /** * A [locationServicesAuthorization](Titanium.Geolocation.locationServicesAuthorization) value - * indicating that the application is not authorized to use location servies *and* + * indicating that the application is not authorized to use location services *and* * the user cannot change this application's status. */ const AUTHORIZATION_RESTRICTED: number; @@ -10295,6 +10475,16 @@ declare namespace Titanium { * The top-level Media module. */ namespace Media { + /** + * Aspect ratio 16:9 + */ + const ASPECT_RATIO_16_9: number; + + /** + * Aspect ratio 4:3 + */ + const ASPECT_RATIO_4_3: number; + /** * Audio file format 3GPP2. */ @@ -10426,7 +10616,7 @@ declare namespace Titanium { const AUDIO_SESSION_PORT_BLUETOOTHHFP: string; /** - * Constant for output on a Bluetooth Low Energy device. This is an output port. This is available on iOS7 and later. + * Constant for output on a Bluetooth Low Energy device. This is an output port. This is available on iOS 7 and later. */ const AUDIO_SESSION_PORT_BLUETOOTHLE: string; @@ -10446,7 +10636,7 @@ declare namespace Titanium { const AUDIO_SESSION_PORT_BUILTINSPEAKER: string; /** - * Constant for Input or output via Car Audio. This can be both an input and output port. This is available on iOS7 and later. + * Constant for Input or output via Car Audio. This can be both an input and output port. This is available on iOS 7 and later. */ const AUDIO_SESSION_PORT_CARAUDIO: string; @@ -10521,27 +10711,22 @@ declare namespace Titanium { const AUDIO_STATE_WAITING_FOR_DATA: number; /** - * Player is waiting for audio data to fill the queue. - */ - const AUDIO_STATE_WAITING_FOR_QUEUE: number; - - /** - * Constant specifying that app is authorized to use camera. This is available on iOS7 and later. + * Constant specifying that app is authorized to use camera. This is available on iOS 7 and later. */ const CAMERA_AUTHORIZATION_AUTHORIZED: number; /** - * Constant specifying that app is denied usage of camera. This is available on iOS7 and later. + * Constant specifying that app is denied usage of camera. This is available on iOS 7 and later. */ const CAMERA_AUTHORIZATION_DENIED: number; /** - * Constant specifying that app is restricted from using camera. This is available on iOS7 and later. + * Constant specifying that app is restricted from using camera. This is available on iOS 7 and later. */ const CAMERA_AUTHORIZATION_RESTRICTED: number; /** - * Constant specifying that app is not yet authorized to use camera. This is available on iOS7 and later. + * Constant specifying that app is not yet authorized to use camera. This is available on iOS 7 and later. */ const CAMERA_AUTHORIZATION_UNKNOWN: number; @@ -10755,11 +10940,26 @@ declare namespace Titanium { */ const NO_CAMERA: number; + /** + * Constant for camera didn't focus when taking a trying to take a picture. + */ + const NO_FOCUS: number; + /** * Constant for media no video error. */ const NO_VIDEO: number; + /** + * Media type constant for FHD video recording. + */ + const QUALITY_FHD: number; + + /** + * Media type constant for HD video recording. + */ + const QUALITY_HD: number; + /** * Media type constant for high-quality video recording. */ @@ -10775,11 +10975,36 @@ declare namespace Titanium { */ const QUALITY_MEDIUM: number; + /** + * Media type constant for SD video recording. + */ + const QUALITY_SD: number; + + /** + * Media type constant for UHD video recording. + */ + const QUALITY_UHD: number; + /** * Constant for unknown media error. */ const UNKNOWN_ERROR: number; + /** + * Vertical align center + */ + const VERTICAL_ALIGN_BOTTOM: number; + + /** + * Vertical align center + */ + const VERTICAL_ALIGN_CENTER: number; + + /** + * Vertical align center + */ + const VERTICAL_ALIGN_TOP: number; + /** * Constant for default video controls. * @deprecated This property has been removed for iOS in Titanium SDK 7.0.0 as of the official deprecation by Apple. @@ -10926,7 +11151,7 @@ declare namespace Titanium { const VIDEO_REPEAT_MODE_NONE: number; /** - * Constant for repeating one video (i.e., the one video will repeat constantly) during playback. + * Constant for repeating one video (e.g., the one video will repeat constantly) during playback. */ const VIDEO_REPEAT_MODE_ONE: number; @@ -11041,8 +11266,8 @@ declare namespace Titanium { * Android media providers, such as the Gallery. */ static scanMediaFiles( - paths: readonly string[], - mimeTypes: readonly string[], + paths: ReadonlyArray, + mimeTypes: ReadonlyArray, callback: (param0: MediaScannerResponse) => void, ): void; @@ -11111,7 +11336,7 @@ declare namespace Titanium { */ interface AudioPlayer_error_Event extends AudioPlayerBaseEvent { /** - * Error code. Different between android and iOS. + * Error code. Different between Android and iOS. */ code: number; @@ -11576,8 +11801,7 @@ declare namespace Titanium { readonly assetURL: string; /** - * The number of musical beats per minute for the media item, corresponding - * to the "BPM" field in the Info tab in the "Get Info" dialog in iTunes. + * The number of musical beats per minute for the media item. */ readonly beatsPerMinute: number; @@ -11587,8 +11811,7 @@ declare namespace Titanium { readonly bookmarkTime: string; /** - * Textual information about the media item, corresponding to the "Comments" - * field in in the Info tab in the Get Info dialog in iTunes. + * Textual information about the media item. */ readonly comments: string; @@ -11708,8 +11931,7 @@ declare namespace Titanium { readonly title: string; /** - * Corresponds to the "Grouping" field in the Info tab in the "Get Info" - * dialog in iTunes. + * Grouping information for the media item. */ readonly userGrouping: string; @@ -12402,6 +12624,15 @@ declare namespace Titanium { */ interface VideoPlayer_postlayout_Event extends VideoPlayerBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface VideoPlayer_rotate_Event extends VideoPlayerBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -12727,6 +12958,8 @@ declare namespace Titanium { resize: VideoPlayer_resize_Event; + rotate: VideoPlayer_rotate_Event; + singletap: VideoPlayer_singletap_Event; swipe: VideoPlayer_swipe_Event; @@ -12750,6 +12983,11 @@ declare namespace Titanium { */ allowsAirPlay: boolean; + /** + * Indicates if player is hidden by default and shown when its ready. + */ + autoHide: boolean; + /** * Indicates if a movie should automatically start playback. */ @@ -12776,6 +13014,11 @@ declare namespace Titanium { */ endPlaybackTime: number; + /** + * Handle DRM-encrypted video assets using the [Apple FairPlay Streaming API](https://developer.apple.com/streaming/fps/). + */ + fairPlayConfiguration: FairPlayConfiguration; + /** * Determines if the movie is presented in the entire screen (obscuring all other application content). * @deprecated This property has been removed for iOS in Titanium SDK 7.0.0 as of the official deprecation by Apple. @@ -12860,6 +13103,11 @@ declare namespace Titanium { */ showsControls: boolean; + /** + * Playback speed of the video. + */ + speed: number; + /** * URL of the media to play. */ @@ -12930,7 +13178,7 @@ declare namespace Titanium { * Asynchronously request thumbnail images for one or more points in time in the video. */ requestThumbnailImagesAtTimes( - times: readonly number[], + times: ReadonlyArray, option: number, callback: (param0: ThumbnailResponse) => void, ): void; @@ -12986,7 +13234,7 @@ declare namespace Titanium { const NOTIFICATION_TYPE_BADGE: number; /** - * Constant value for a Newsstand style push notification. Only available on iOS5 and later + * Constant value for a Newsstand style push notification. Only available on iOS 5 and later */ const NOTIFICATION_TYPE_NEWSSTAND: number; @@ -13083,6 +13331,11 @@ declare namespace Titanium { */ port: number; + /** + * Creates a secure socket. + */ + secure: boolean; + /** * Current state of the socket. */ @@ -13403,7 +13656,7 @@ declare namespace Titanium { readonly name: string; /** - * The origual url attribute of the cookie. + * The original URL attribute of the cookie. */ originalUrl: string; @@ -13567,6 +13820,11 @@ declare namespace Titanium { */ readonly responseData: Titanium.Blob; + /** + * Response as JSON object. + */ + readonly responseDictionary: string; + /** * Returns all the response headers returned with the request. */ @@ -14503,6 +14761,21 @@ declare namespace Titanium { */ const BLEND_MODE_XOR: number; + /** + * Line breaking strategy balances line lengths. + */ + const BREAK_BALANCED: number; + + /** + * Line breaking uses high-quality strategy, including hyphenation. + */ + const BREAK_HIGH_QUALITY: number; + + /** + * Line breaking uses simple strategy. + */ + const BREAK_SIMPLE: number; + /** * Use with [Button.style](Titanium.UI.Button.style) to show a solid filled button. */ @@ -14629,6 +14902,31 @@ declare namespace Titanium { */ const HINT_TYPE_STATIC: number; + /** + * Standard amount of hyphenation, useful for running text and for screens with limited space for text. + */ + const HYPHEN_FULL: number; + + /** + * Same to hyphenationFrequency="full" but using faster algorithm for measuring hyphenation break points. + */ + const HYPHEN_FULL_FAST: number; + + /** + * No hyphenation. + */ + const HYPHEN_NONE: number; + + /** + * Less frequent hyphenation, useful for informal use cases, such as chat messages. + */ + const HYPHEN_NORMAL: number; + + /** + * Same to hyphenationFrequency="normal" but using faster algorithm for measuring hyphenation break points. + */ + const HYPHEN_NORMAL_FAST: number; + /** * Use a bezel-style border on the input field. */ @@ -14969,6 +15267,16 @@ declare namespace Titanium { */ const TABLE_VIEW_SEPARATOR_STYLE_SINGLE_LINE: number; + /** + * Bottom navigation style. + */ + const TABS_STYLE_BOTTOM_NAVIGATION: number; + + /** + * Default tab style. + */ + const TABS_STYLE_DEFAULT: number; + /** * Center align text. */ @@ -15010,7 +15318,7 @@ declare namespace Titanium { const TEXT_AUTOCAPITALIZATION_WORDS: number; /** - * Add ellipses before the first character that doesnt fit. + * Add ellipses before the first character that doesn't fit. */ const TEXT_ELLIPSIZE_TRUNCATE_CHAR_WRAP: number; @@ -15150,7 +15458,7 @@ declare namespace Titanium { const UNKNOWN: number; /** - * Orientation constant for inverted portait orientation. + * Orientation constant for inverted portrait orientation. */ const UPSIDE_PORTRAIT: number; @@ -15160,7 +15468,7 @@ declare namespace Titanium { const URL_ERROR_AUTHENTICATION: number; /** - * Bad url error code reported via . + * Bad URL error code reported via . */ const URL_ERROR_BAD_URL: number; @@ -15205,7 +15513,7 @@ declare namespace Titanium { const URL_ERROR_UNKNOWN: number; /** - * Error code reported via when a url contains an unsupported scheme. + * Error code reported via when a URL contains an unsupported scheme. */ const URL_ERROR_UNSUPPORTED_SCHEME: number; @@ -15507,6 +15815,46 @@ declare namespace Titanium { */ const PROGRESS_INDICATOR_STATUS_BAR: number; + /** + * When entering (scrolling on screen) the view will scroll on any downwards scroll event, regardless of whether the scrolling view is also scrolling. This is commonly referred to as the 'quick return' pattern. + */ + const SCROLL_FLAG_ENTER_ALWAYS: number; + + /** + * An additional flag for 'enterAlways' which modifies the returning view to only initially scroll back to it's collapsed height. Once the scrolling view has reached the end of it's scroll range, the remainder of this view will be scrolled into view. The collapsed height is defined by the view's minimum height. + */ + const SCROLL_FLAG_ENTER_ALWAYS_COLLAPSED: number; + + /** + * When exiting (scrolling off screen) the view will be scrolled until it is 'collapsed'. The collapsed height is defined by the view's minimum height. + */ + const SCROLL_FLAG_EXIT_UNTIL_COLLAPSED: number; + + /** + * Disable scrolling on the view. This flag should not be combined with any of the other scroll flags. + */ + const SCROLL_FLAG_NO_SCROLL: number; + + /** + * The view will be scroll in direct relation to scroll events. This flag needs to be set for any of the other flags to take effect. If any sibling views before this one do not have this flag, then this value has no effect. + */ + const SCROLL_FLAG_SCROLL: number; + + /** + * Upon a scroll ending, if the view is only partially visible then it will be snapped and scrolled to its closest edge. For example, if the view only has its bottom 25% displayed, it will be scrolled off screen completely. Conversely, if its bottom 75% is visible then it will be scrolled fully into view. + */ + const SCROLL_FLAG_SNAP: number; + + /** + * An additional flag to be used with 'snap'. If set, the view will be snapped to its top and bottom margins, as opposed to the edges of the view itself. + */ + const SCROLL_FLAG_SNAP_MARGINS: number; + + /** + * The window will not be resized, and it will not be panned to make its focus visible. + */ + const SOFT_INPUT_ADJUST_NOTHING: number; + /** * Pan the current heavyweight window when the input method (ie software keyboard) is shown, to * ensure that its contents are not obscured. @@ -15573,6 +15921,11 @@ declare namespace Titanium { */ const SOFT_KEYBOARD_SHOW_ON_FOCUS: number; + /** + * Sets the color of the status bar to light mode. Needs Android API level 23. + */ + const STATUS_BAR_LIGHT: number; + /** * Display a checkbox. * @deprecated Use instead. @@ -15601,6 +15954,16 @@ declare namespace Titanium { */ const TABS_STYLE_DEFAULT: number; + /** + * Set the TabGroup tab mode to fixed (default). + */ + let TAB_MODE_FIXED: number; + + /** + * Set the TabGroup tab mode to scrollable. + */ + let TAB_MODE_SCROLLABLE: number; + /** * Captures layout bounds of target views before and after the scene change and animates those changes during the transition. */ @@ -15696,6 +16059,26 @@ declare namespace Titanium { */ const WEBVIEW_PLUGINS_ON_DEMAND: number; + /** + * Show horizontal and vertical scrollbar in a Ti.UI.WebView. + */ + const WEBVIEW_SCROLLBARS_DEFAULT: number; + + /** + * Hide all scrollbars in a Ti.UI.WebView. + */ + const WEBVIEW_SCROLLBARS_HIDE_ALL: number; + + /** + * Hide horizontal scrollbar in a Ti.UI.WebView. + */ + const WEBVIEW_SCROLLBARS_HIDE_HORIZONTAL: number; + + /** + * Hide vertical scrollbar in a Ti.UI.WebView. + */ + const WEBVIEW_SCROLLBARS_HIDE_VERTICAL: number; + /** * Base event for class Titanium.UI.Android.CardView */ @@ -15893,6 +16276,15 @@ declare namespace Titanium { */ interface CardView_postlayout_Event extends CardViewBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface CardView_rotate_Event extends CardViewBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -16201,7 +16593,1670 @@ declare namespace Titanium { /** * Fired when the device detects a two-finger tap against the view. */ - interface CardView_twofingertap_Event extends CardViewBaseEvent { + interface CardView_twofingertap_Event extends CardViewBaseEvent { + /** + * Returns `true` if the tap passed through an overlapping window belonging to another app. + * This is a security feature to protect an app from "tapjacking", where a malicious app can use a + * system overlay to intercept touch events in your app or to trick the end-user to tap on UI + * in your app intended for the overlay. + */ + obscured: boolean; + + /** + * X coordinate of the event from the `source` view's coordinate system. + */ + x: number; + + /** + * Y coordinate of the event from the `source` view's coordinate system. + */ + y: number; + } + interface CardViewEventMap extends ProxyEventMap { + click: CardView_click_Event; + + dblclick: CardView_dblclick_Event; + + doubletap: CardView_doubletap_Event; + + focus: CardView_focus_Event; + + keypressed: CardView_keypressed_Event; + + longclick: CardView_longclick_Event; + + longpress: CardView_longpress_Event; + + pinch: CardView_pinch_Event; + + postlayout: CardView_postlayout_Event; + + rotate: CardView_rotate_Event; + + singletap: CardView_singletap_Event; + + swipe: CardView_swipe_Event; + + touchcancel: CardView_touchcancel_Event; + + touchend: CardView_touchend_Event; + + touchmove: CardView_touchmove_Event; + + touchstart: CardView_touchstart_Event; + + twofingertap: CardView_twofingertap_Event; + } + /** + * CardView provides a layout container with rounded corners and a shadow indicating the view is elevated. + */ + class CardView extends Titanium.UI.View { + /** + * Background color for CardView as a color name or hex triplet. + */ + backgroundColor: string; + + /** + * A background gradient for the view. + */ + backgroundGradient: never; + + /** + * Background image for the view, specified as a local file path or URL. + */ + backgroundImage: never; + + /** + * Determines whether to tile a background across a view. + */ + backgroundRepeat: never; + + /** + * Border color of the view, as a color name or hex triplet. + */ + borderColor: never; + + /** + * Corner radius for CardView. + */ + borderRadius: number; + + /** + * Elevation for CardView. + */ + elevation: number; + + /** + * Maximum Elevation for CardView. + */ + maxElevation: number; + + /** + * Inner padding between the edges of the Card and children of the CardView. + */ + padding: number; + + /** + * Inner padding between the bottom edge of the Card and children of the CardView. + */ + paddingBottom: number; + + /** + * Inner padding between the left edge of the Card and children of the CardView. + */ + paddingLeft: number; + + /** + * Inner padding between the right edge of the Card and children of the CardView. + */ + paddingRight: number; + + /** + * Inner padding between the top edge of the Card and children of the CardView. + */ + paddingTop: number; + + /** + * Add padding to CardView on API level 20 and before to prevent intersections between + * the Card content and rounded corners. + */ + preventCornerOverlap: boolean; + + /** + * Add padding on API level 21 and above to have the same measurements with previous versions. + */ + useCompatPadding: boolean; + + /** + * Adds the specified callback as an event listener for the named event. + */ + addEventListener( + name: K, + callback: (this: Titanium.UI.Android.CardView, event: CardViewEventMap[K]) => void, + ): void; + + /** + * Adds the specified callback as an event listener for the named event. + */ + addEventListener(name: string, callback: (param0: Titanium.Event) => void): void; + + /** + * Fires a synthesized event to any registered listeners. + */ + fireEvent(name: K, event?: CardViewEventMap[K]): void; + + /** + * Fires a synthesized event to any registered listeners. + */ + fireEvent(name: string, event?: any): void; + + /** + * Removes the specified callback as an event listener for the named event. + */ + removeEventListener( + name: K, + callback: (this: Titanium.UI.Android.CardView, event: CardViewEventMap[K]) => void, + ): void; + + /** + * Removes the specified callback as an event listener for the named event. + */ + removeEventListener(name: string, callback: (param0: Titanium.Event) => void): void; + } + /** + * Base event for class Titanium.UI.Android.CollapseToolbar + */ + interface CollapseToolbarBaseEvent extends Ti.Event { + /** + * Source object that fired the event. + */ + source: Titanium.UI.Android.CollapseToolbar; + } + /** + * Fired when the device detects a click against the view. + */ + interface CollapseToolbar_click_Event extends CollapseToolbarBaseEvent { + /** + * Returns `true` if the click passed through an overlapping window belonging to another app. + * This is a security feature to protect an app from "tapjacking", where a malicious app can use a + * system overlay to intercept touch events in your app or to trick the end-user to tap on UI + * in your app intended for the overlay. + */ + obscured: boolean; + + /** + * X coordinate of the event from the `source` view's coordinate system. + */ + x: number; + + /** + * Y coordinate of the event from the `source` view's coordinate system. + */ + y: number; + } + /** + * Fired when the device detects a double click against the view. + */ + interface CollapseToolbar_dblclick_Event extends CollapseToolbarBaseEvent { + /** + * Returns `true` if the double click passed through an overlapping window belonging to another app. + * This is a security feature to protect an app from "tapjacking", where a malicious app can use a + * system overlay to intercept touch events in your app or to trick the end-user to tap on UI + * in your app intended for the overlay. + */ + obscured: boolean; + + /** + * X coordinate of the event from the `source` view's coordinate system. + */ + x: number; + + /** + * Y coordinate of the event from the `source` view's coordinate system. + */ + y: number; + } + /** + * Fired when the device detects a double tap against the view. + */ + interface CollapseToolbar_doubletap_Event extends CollapseToolbarBaseEvent { + /** + * Returns `true` if the double tap passed through an overlapping window belonging to another app. + * This is a security feature to protect an app from "tapjacking", where a malicious app can use a + * system overlay to intercept touch events in your app or to trick the end-user to tap on UI + * in your app intended for the overlay. + */ + obscured: boolean; + + /** + * X coordinate of the event from the `source` view's coordinate system. + */ + x: number; + + /** + * Y coordinate of the event from the `source` view's coordinate system. + */ + y: number; + } + /** + * Fired when the view element gains focus. + */ + interface CollapseToolbar_focus_Event extends CollapseToolbarBaseEvent { + } + /** + * Fired when a hardware key is pressed in the view. + */ + interface CollapseToolbar_keypressed_Event extends CollapseToolbarBaseEvent { + /** + * The code for the physical key that was pressed. For more details, see [KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html). This API is experimental and subject to change. + */ + keyCode: number; + } + /** + * Fired when the device detects a long click. + */ + interface CollapseToolbar_longclick_Event extends CollapseToolbarBaseEvent { + } + /** + * Fired when the device detects a long press. + */ + interface CollapseToolbar_longpress_Event extends CollapseToolbarBaseEvent { + /** + * Returns `true` if the long press passed through an overlapping window belonging to another app. + * This is a security feature to protect an app from "tapjacking", where a malicious app can use a + * system overlay to intercept touch events in your app or to trick the end-user to tap on UI + * in your app intended for the overlay. + */ + obscured: boolean; + + /** + * X coordinate of the event from the `source` view's coordinate system. + */ + x: number; + + /** + * Y coordinate of the event from the `source` view's coordinate system. + */ + y: number; + } + /** + * Fired when the device detects a pinch gesture. + */ + interface CollapseToolbar_pinch_Event extends CollapseToolbarBaseEvent { + /** + * The average distance between each of the pointers forming the gesture in progress through + * the focal point. + */ + currentSpan: number; + + /** + * The average X distance between each of the pointers forming the gesture in progress through + * the focal point. + */ + currentSpanX: number; + + /** + * The average Y distance between each of the pointers forming the gesture in progress through + * the focal point. + */ + currentSpanY: number; + + /** + * The X coordinate of the current gesture's focal point. + */ + focusX: number; + + /** + * The Y coordinate of the current gesture's focal point. + */ + focusY: number; + + /** + * Returns `true` if a scale gesture is in progress, `false` otherwise. + */ + inProgress: boolean; + + /** + * The previous average distance between each of the pointers forming the gesture in progress through + * the focal point. + */ + previousSpan: number; + + /** + * The previous average X distance between each of the pointers forming the gesture in progress through + * the focal point. + */ + previousSpanX: number; + + /** + * The previous average Y distance between each of the pointers forming the gesture in progress through + * the focal point. + */ + previousSpanY: number; + + /** + * The scale factor relative to the points of the two touches in screen coordinates. + */ + scale: number; + + /** + * The event time of the current event being processed. + */ + time: number; + + /** + * The time difference in milliseconds between the previous accepted scaling event and the + * current scaling event. + */ + timeDelta: number; + + /** + * The velocity of the pinch in scale factor per second. + */ + velocity: number; + } + /** + * Fired when a layout cycle is finished. + */ + interface CollapseToolbar_postlayout_Event extends CollapseToolbarBaseEvent { + } + /** + * Fired when the device detects a two finger rotation. + */ + interface CollapseToolbar_rotate_Event extends CollapseToolbarBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } + /** + * Fired when the device detects a single tap against the view. + */ + interface CollapseToolbar_singletap_Event extends CollapseToolbarBaseEvent { + /** + * Returns `true` if the single tap passed through an overlapping window belonging to another app. + * This is a security feature to protect an app from "tapjacking", where a malicious app can use a + * system overlay to intercept touch events in your app or to trick the end-user to tap on UI + * in your app intended for the overlay. + */ + obscured: boolean; + + /** + * X coordinate of the event from the `source` view's coordinate system. + */ + x: number; + + /** + * Y coordinate of the event from the `source` view's coordinate system. + */ + y: number; + } + /** + * Fired when the device detects a swipe gesture against the view. + */ + interface CollapseToolbar_swipe_Event extends CollapseToolbarBaseEvent { + /** + * Direction of the swipe--either 'left', 'right', 'up', or 'down'. + */ + direction: string; + + /** + * Returns `true` if the swipe passed through an overlapping window belonging to another app. + * This is a security feature to protect an app from "tapjacking", where a malicious app can use a + * system overlay to intercept touch events in your app or to trick the end-user to tap on UI + * in your app intended for the overlay. + */ + obscured: boolean; + + /** + * X coordinate of the event's endpoint from the `source` view's coordinate system. + */ + x: number; + + /** + * Y coordinate of the event's endpoint from the `source` view's coordinate system. + */ + y: number; + } + /** + * Fired when a touch event is interrupted by the device. + */ + interface CollapseToolbar_touchcancel_Event extends CollapseToolbarBaseEvent { + /** + * A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is + * being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0. + * Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later. + */ + altitudeAngle: number; + + /** + * The x value of the unit vector that points in the direction of the azimuth of the stylus. + * Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later. + */ + azimuthUnitVectorInViewX: number; + + /** + * The y value of the unit vector that points in the direction of the azimuth of the stylus. + * Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later. + */ + azimuthUnitVectorInViewY: number; + + /** + * The current force value of the touch event. + * Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices. + */ + force: number; + + /** + * Maximum possible value of the force property. + * Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later. + */ + maximumPossibleForce: number; + + /** + * Returns `true` if the touch passed through an overlapping window belonging to another app. + * This is a security feature to protect an app from "tapjacking", where a malicious app can use a + * system overlay to intercept touch events in your app or to trick the end-user to tap on UI + * in your app intended for the overlay. + */ + obscured: boolean; + + /** + * The current size of the touch area. Note: This property is only available on some Android devices. + */ + size: number; + + /** + * The time (in seconds) when the touch was used in correlation with the system start up. + * Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later. + */ + timestamp: number; + + /** + * X coordinate of the event from the `source` view's coordinate system. + */ + x: number; + + /** + * Y coordinate of the event from the `source` view's coordinate system. + */ + y: number; + } + /** + * Fired when a touch event is completed. + */ + interface CollapseToolbar_touchend_Event extends CollapseToolbarBaseEvent { + /** + * A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is + * being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0. + * Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later. + */ + altitudeAngle: number; + + /** + * The x value of the unit vector that points in the direction of the azimuth of the stylus. + * Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later. + */ + azimuthUnitVectorInViewX: number; + + /** + * The y value of the unit vector that points in the direction of the azimuth of the stylus. + * Note: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later. + */ + azimuthUnitVectorInViewY: number; + + /** + * The current force value of the touch event. + * Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices. + */ + force: number; + + /** + * Maximum possible value of the force property. + * Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later. + */ + maximumPossibleForce: number; + + /** + * Returns `true` if the touch passed through an overlapping window belonging to another app. + * This is a security feature to protect an app from "tapjacking", where a malicious app can use a + * system overlay to intercept touch events in your app or to trick the end-user to tap on UI + * in your app intended for the overlay. + */ + obscured: boolean; + + /** + * The current size of the touch area. Note: This property is only available on some Android devices. + */ + size: number; + + /** + * The time (in seconds) when the touch was used in correlation with the system start up. + * Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later. + */ + timestamp: number; + + /** + * X coordinate of the event from the `source` view's coordinate system. + */ + x: number; + + /** + * Y coordinate of the event from the `source` view's coordinate system. + */ + y: number; + } + /** + * Fired as soon as the device detects movement of a touch. + */ + interface CollapseToolbar_touchmove_Event extends CollapseToolbarBaseEvent { + /** + * A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is + * being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0. + * Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later. + */ + altitudeAngle: number; + + /** + * The x value of the unit vector that points in the direction of the azimuth of the stylus. + * Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later. + */ + azimuthUnitVectorInViewX: number; + + /** + * The y value of the unit vector that points in the direction of the azimuth of the stylus. + * Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later. + */ + azimuthUnitVectorInViewY: number; + + /** + * The current force value of the touch event. + * Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices. + */ + force: number; + + /** + * Maximum possible value of the force property. + * Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later. + */ + maximumPossibleForce: number; + + /** + * Returns `true` if the touch passed through an overlapping window belonging to another app. + * This is a security feature to protect an app from "tapjacking", where a malicious app can use a + * system overlay to intercept touch events in your app or to trick the end-user to tap on UI + * in your app intended for the overlay. + */ + obscured: boolean; + + /** + * The current size of the touch area. Note: This property is only available on some Android devices. + */ + size: number; + + /** + * The time (in seconds) when the touch was used in correlation with the system start up. + * Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later. + */ + timestamp: number; + + /** + * X coordinate of the event from the `source` view's coordinate system. + */ + x: number; + + /** + * Y coordinate of the event from the `source` view's coordinate system. + */ + y: number; + } + /** + * Fired as soon as the device detects a touch gesture. + */ + interface CollapseToolbar_touchstart_Event extends CollapseToolbarBaseEvent { + /** + * A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is + * being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0. + * Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later. + */ + altitudeAngle: number; + + /** + * The x value of the unit vector that points in the direction of the azimuth of the stylus. + * Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later. + */ + azimuthUnitVectorInViewX: number; + + /** + * The y value of the unit vector that points in the direction of the azimuth of the stylus. + * Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later. + */ + azimuthUnitVectorInViewY: number; + + /** + * The current force value of the touch event. + * Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices. + */ + force: number; + + /** + * Maximum possible value of the force property. + * Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later. + */ + maximumPossibleForce: number; + + /** + * Returns `true` if the touch passed through an overlapping window belonging to another app. + * This is a security feature to protect an app from "tapjacking", where a malicious app can use a + * system overlay to intercept touch events in your app or to trick the end-user to tap on UI + * in your app intended for the overlay. + */ + obscured: boolean; + + /** + * The current size of the touch area. Note: This property is only available on some Android devices. + */ + size: number; + + /** + * The time (in seconds) when the touch was used in correlation with the system start up. + * Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later. + */ + timestamp: number; + + /** + * X coordinate of the event from the `source` view's coordinate system. + */ + x: number; + + /** + * Y coordinate of the event from the `source` view's coordinate system. + */ + y: number; + } + /** + * Fired when the device detects a two-finger tap against the view. + */ + interface CollapseToolbar_twofingertap_Event extends CollapseToolbarBaseEvent { + /** + * Returns `true` if the tap passed through an overlapping window belonging to another app. + * This is a security feature to protect an app from "tapjacking", where a malicious app can use a + * system overlay to intercept touch events in your app or to trick the end-user to tap on UI + * in your app intended for the overlay. + */ + obscured: boolean; + + /** + * X coordinate of the event from the `source` view's coordinate system. + */ + x: number; + + /** + * Y coordinate of the event from the `source` view's coordinate system. + */ + y: number; + } + interface CollapseToolbarEventMap extends ProxyEventMap { + click: CollapseToolbar_click_Event; + + dblclick: CollapseToolbar_dblclick_Event; + + doubletap: CollapseToolbar_doubletap_Event; + + focus: CollapseToolbar_focus_Event; + + keypressed: CollapseToolbar_keypressed_Event; + + longclick: CollapseToolbar_longclick_Event; + + longpress: CollapseToolbar_longpress_Event; + + pinch: CollapseToolbar_pinch_Event; + + postlayout: CollapseToolbar_postlayout_Event; + + rotate: CollapseToolbar_rotate_Event; + + singletap: CollapseToolbar_singletap_Event; + + swipe: CollapseToolbar_swipe_Event; + + touchcancel: CollapseToolbar_touchcancel_Event; + + touchend: CollapseToolbar_touchend_Event; + + touchmove: CollapseToolbar_touchmove_Event; + + touchstart: CollapseToolbar_touchstart_Event; + + twofingertap: CollapseToolbar_twofingertap_Event; + } + /** + * A collapsing toolbar layout. + */ + class CollapseToolbar extends Titanium.UI.View { + /** + * Whether the view should be "hidden" from (i.e., ignored by) the accessibility service. + */ + accessibilityHidden: never; + + /** + * Briefly describes what performing an action (such as a click) on the view will do. + */ + accessibilityHint: never; + + /** + * A succinct label identifying the view for the device's accessibility service. + */ + accessibilityLabel: never; + + /** + * A string describing the value (if any) of the view for the device's accessibility service. + */ + accessibilityValue: never; + + /** + * Coordinate of the view about which to pivot an animation. + */ + anchorPoint: never; + + /** + * Background color of the view, as a color name or hex triplet. + */ + backgroundColor: never; + + /** + * Disabled background color of the view, as a color name or hex triplet. + */ + backgroundDisabledColor: never; + + /** + * Disabled background image for the view, specified as a local file path or URL. + */ + backgroundDisabledImage: never; + + /** + * Focused background color of the view, as a color name or hex triplet. + */ + backgroundFocusedColor: never; + + /** + * Focused background image for the view, specified as a local file path or URL. + */ + backgroundFocusedImage: never; + + /** + * A background gradient for the view. + */ + backgroundGradient: never; + + /** + * Background image for the view, specified as a local file path or URL. + */ + backgroundImage: never; + + /** + * Determines whether to tile a background across a view. + */ + backgroundRepeat: never; + + /** + * Selected background color of the view, as a color name or hex triplet. + */ + backgroundSelectedColor: never; + + /** + * Selected background image URL for the view, specified as a local file path or URL. + */ + backgroundSelectedImage: never; + + /** + * Background color of the extended toolbar when no image is shown. + */ + barColor: string; + + /** + * Border color of the view, as a color name or hex triplet. + */ + borderColor: never; + + /** + * Radius for the rounded corners of the view's border. + */ + borderRadius: never; + + /** + * Border width of the view. + */ + borderWidth: never; + + /** + * View's bottom position, in platform-specific units. + */ + bottom: never; + + /** + * Indicates if the proxy will bubble an event to its parent. + */ + bubbleParent: never; + + /** + * View's center position, in the parent view's coordinates. + */ + center: never; + + /** + * Array of this view's child views. + */ + readonly children: never; + + /** + * Color of the title. + */ + color: string; + + /** + * Background color of the small toolbar when the content is scrolled up. + */ + contentScrimColor: string; + + /** + * Main view below the toolbar. + */ + contentView: Titanium.UI.View; + + /** + * Displays an "up" affordance on the "home" area of the action bar. + */ + displayHomeAsUp: boolean; + + /** + * Base elevation of the view relative to its parent in pixels. + */ + elevation: never; + + /** + * Discards touch related events if another app's system overlay covers the view. + */ + filterTouchesWhenObscured: never; + + /** + * Scroll flags. Check [Android documentation](https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout.LayoutParams#constants_1) for more details. + */ + flags: number; + + /** + * Whether view should be focusable while navigating with the trackball. + */ + focusable: never; + + /** + * Sets the behavior when hiding an object to release or keep the free space + */ + hiddenBehavior: never; + + /** + * Determines whether the layout has wrapping behavior. + */ + horizontalWrap: never; + + /** + * Background image for the full size toolbar. Has a parallax effect when scrolling upwards. + */ + image: string; + + /** + * Height of the image. Use `height` for the height of the extended toolbar. + */ + imageHeight: number; + + /** + * Determines whether to keep the device screen on. + */ + keepScreenOn: never; + + /** + * Specifies how the view positions its children. + * One of: 'composite', 'vertical', or 'horizontal'. + */ + layout: never; + + /** + * View's left position, in platform-specific units. + */ + left: never; + + /** + * The Window or TabGroup whose Activity lifecycle should be triggered on the proxy. + */ + lifecycleContainer: never; + + /** + * Color of the back arrow. + */ + navigationIconColor: string; + + /** + * Callback function called when the home icon is clicked. + */ + onHomeIconItemSelected: (...args: any[]) => void; + + /** + * Opacity of this view, from 0.0 (transparent) to 1.0 (opaque). Defaults to 1.0 (opaque). + */ + opacity: never; + + /** + * When on, animate call overrides current animation if applicable. + */ + overrideCurrentAnimation: never; + + /** + * The bounding box of the view relative to its parent, in system units. + */ + readonly rect: never; + + /** + * View's right position, in platform-specific units. + */ + right: never; + + /** + * Clockwise 2D rotation of the view in degrees. + */ + rotation: never; + + /** + * Clockwise rotation of the view in degrees (x-axis). + */ + rotationX: never; + + /** + * Clockwise rotation of the view in degrees (y-axis). + */ + rotationY: never; + + /** + * Scaling of the view in x-axis in pixels. + */ + scaleX: never; + + /** + * Scaling of the view in y-axis in pixels. + */ + scaleY: never; + + /** + * The size of the view in system units. + */ + readonly size: never; + + /** + * Determines keyboard behavior when this view is focused. Defaults to . + */ + softKeyboardOnFocus: never; + + /** + * Title of the toolbar. + */ + title: string; + + /** + * Determines whether view should receive touch events. + */ + touchEnabled: never; + + /** + * A material design visual construct that provides an instantaneous visual confirmation of touch point. + */ + touchFeedback: never; + + /** + * Optional touch feedback ripple color. This has no effect unless `touchFeedback` is true. + */ + touchFeedbackColor: never; + + /** + * Transformation matrix to apply to the view. + */ + transform: never; + + /** + * A name to identify this view in activity transition. + */ + transitionName: never; + + /** + * Horizontal location of the view relative to its left position in pixels. + */ + translationX: never; + + /** + * Vertical location of the view relative to its top position in pixels. + */ + translationY: never; + + /** + * Depth of the view relative to its elevation in pixels. + */ + translationZ: never; + + /** + * Determines the color of the shadow. + */ + viewShadowColor: never; + + /** + * Determines whether the view is visible. + */ + visible: never; + + /** + * View's width, in platform-specific units. + */ + width: never; + + /** + * Z-index stack order position, relative to other sibling views. + */ + zIndex: never; + + /** + * Adds a child to this view's hierarchy. + */ + add: never; + + /** + * Adds the specified callback as an event listener for the named event. + */ + addEventListener( + name: K, + callback: (this: Titanium.UI.Android.CollapseToolbar, event: CollapseToolbarEventMap[K]) => void, + ): void; + + /** + * Animates this view. + */ + animate: never; + + /** + * Applies the properties to the proxy. + */ + applyProperties: never; + + /** + * Translates a point from this view's coordinate system to another view's coordinate system. + */ + convertPointToView: never; + + /** + * Fires a synthesized event to any registered listeners. + */ + fireEvent(name: K, event?: CollapseToolbarEventMap[K]): void; + + /** + * Returns the matching view of a given view ID. + */ + getViewById: never; + + /** + * Hides this view. + */ + hide: never; + + /** + * Inserts a view at the specified position in the [children](Titanium.UI.View.children) array. + */ + insertAt: never; + + /** + * Removes a child view from this view's hierarchy. + */ + remove: never; + + /** + * Removes all child views from this view's hierarchy. + */ + removeAllChildren: never; + + /** + * Removes the specified callback as an event listener for the named event. + */ + removeEventListener( + name: K, + callback: (this: Titanium.UI.Android.CollapseToolbar, event: CollapseToolbarEventMap[K]) => void, + ): void; + + /** + * Replaces a view at the specified position in the [children](Titanium.UI.View.children) array. + */ + replaceAt: never; + + /** + * Makes this view visible. + */ + show: never; + + /** + * Returns an image of the rendered view, as a Blob. + */ + toImage: never; + } + /** + * Base event for class Titanium.UI.Android.DrawerLayout + */ + interface DrawerLayoutBaseEvent extends Ti.Event { + /** + * Source object that fired the event. + */ + source: Titanium.UI.Android.DrawerLayout; + } + /** + * Fired when the device detects a click against the view. + */ + interface DrawerLayout_click_Event extends DrawerLayoutBaseEvent { + /** + * Returns `true` if the click passed through an overlapping window belonging to another app. + * This is a security feature to protect an app from "tapjacking", where a malicious app can use a + * system overlay to intercept touch events in your app or to trick the end-user to tap on UI + * in your app intended for the overlay. + */ + obscured: boolean; + + /** + * X coordinate of the event from the `source` view's coordinate system. + */ + x: number; + + /** + * Y coordinate of the event from the `source` view's coordinate system. + */ + y: number; + } + /** + * Fired when the device detects a double click against the view. + */ + interface DrawerLayout_dblclick_Event extends DrawerLayoutBaseEvent { + /** + * Returns `true` if the double click passed through an overlapping window belonging to another app. + * This is a security feature to protect an app from "tapjacking", where a malicious app can use a + * system overlay to intercept touch events in your app or to trick the end-user to tap on UI + * in your app intended for the overlay. + */ + obscured: boolean; + + /** + * X coordinate of the event from the `source` view's coordinate system. + */ + x: number; + + /** + * Y coordinate of the event from the `source` view's coordinate system. + */ + y: number; + } + /** + * Fired when the device detects a double tap against the view. + */ + interface DrawerLayout_doubletap_Event extends DrawerLayoutBaseEvent { + /** + * Returns `true` if the double tap passed through an overlapping window belonging to another app. + * This is a security feature to protect an app from "tapjacking", where a malicious app can use a + * system overlay to intercept touch events in your app or to trick the end-user to tap on UI + * in your app intended for the overlay. + */ + obscured: boolean; + + /** + * X coordinate of the event from the `source` view's coordinate system. + */ + x: number; + + /** + * Y coordinate of the event from the `source` view's coordinate system. + */ + y: number; + } + /** + * Fired when the view element gains focus. + */ + interface DrawerLayout_focus_Event extends DrawerLayoutBaseEvent { + } + /** + * Fired when a hardware key is pressed in the view. + */ + interface DrawerLayout_keypressed_Event extends DrawerLayoutBaseEvent { + /** + * The code for the physical key that was pressed. For more details, see [KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html). This API is experimental and subject to change. + */ + keyCode: number; + } + /** + * Fired when the device detects a long click. + */ + interface DrawerLayout_longclick_Event extends DrawerLayoutBaseEvent { + } + /** + * Fired when the device detects a long press. + */ + interface DrawerLayout_longpress_Event extends DrawerLayoutBaseEvent { + /** + * Returns `true` if the long press passed through an overlapping window belonging to another app. + * This is a security feature to protect an app from "tapjacking", where a malicious app can use a + * system overlay to intercept touch events in your app or to trick the end-user to tap on UI + * in your app intended for the overlay. + */ + obscured: boolean; + + /** + * X coordinate of the event from the `source` view's coordinate system. + */ + x: number; + + /** + * Y coordinate of the event from the `source` view's coordinate system. + */ + y: number; + } + /** + * Fired when the device detects a pinch gesture. + */ + interface DrawerLayout_pinch_Event extends DrawerLayoutBaseEvent { + /** + * The average distance between each of the pointers forming the gesture in progress through + * the focal point. + */ + currentSpan: number; + + /** + * The average X distance between each of the pointers forming the gesture in progress through + * the focal point. + */ + currentSpanX: number; + + /** + * The average Y distance between each of the pointers forming the gesture in progress through + * the focal point. + */ + currentSpanY: number; + + /** + * The X coordinate of the current gesture's focal point. + */ + focusX: number; + + /** + * The Y coordinate of the current gesture's focal point. + */ + focusY: number; + + /** + * Returns `true` if a scale gesture is in progress, `false` otherwise. + */ + inProgress: boolean; + + /** + * The previous average distance between each of the pointers forming the gesture in progress through + * the focal point. + */ + previousSpan: number; + + /** + * The previous average X distance between each of the pointers forming the gesture in progress through + * the focal point. + */ + previousSpanX: number; + + /** + * The previous average Y distance between each of the pointers forming the gesture in progress through + * the focal point. + */ + previousSpanY: number; + + /** + * The scale factor relative to the points of the two touches in screen coordinates. + */ + scale: number; + + /** + * The event time of the current event being processed. + */ + time: number; + + /** + * The time difference in milliseconds between the previous accepted scaling event and the + * current scaling event. + */ + timeDelta: number; + + /** + * The velocity of the pinch in scale factor per second. + */ + velocity: number; + } + /** + * Fired when a layout cycle is finished. + */ + interface DrawerLayout_postlayout_Event extends DrawerLayoutBaseEvent { + } + /** + * Fired when the device detects a two finger rotation. + */ + interface DrawerLayout_rotate_Event extends DrawerLayoutBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } + /** + * Fired when the device detects a single tap against the view. + */ + interface DrawerLayout_singletap_Event extends DrawerLayoutBaseEvent { + /** + * Returns `true` if the single tap passed through an overlapping window belonging to another app. + * This is a security feature to protect an app from "tapjacking", where a malicious app can use a + * system overlay to intercept touch events in your app or to trick the end-user to tap on UI + * in your app intended for the overlay. + */ + obscured: boolean; + + /** + * X coordinate of the event from the `source` view's coordinate system. + */ + x: number; + + /** + * Y coordinate of the event from the `source` view's coordinate system. + */ + y: number; + } + /** + * Fired when the device detects a swipe gesture against the view. + */ + interface DrawerLayout_swipe_Event extends DrawerLayoutBaseEvent { + /** + * Direction of the swipe--either 'left', 'right', 'up', or 'down'. + */ + direction: string; + + /** + * Returns `true` if the swipe passed through an overlapping window belonging to another app. + * This is a security feature to protect an app from "tapjacking", where a malicious app can use a + * system overlay to intercept touch events in your app or to trick the end-user to tap on UI + * in your app intended for the overlay. + */ + obscured: boolean; + + /** + * X coordinate of the event's endpoint from the `source` view's coordinate system. + */ + x: number; + + /** + * Y coordinate of the event's endpoint from the `source` view's coordinate system. + */ + y: number; + } + /** + * Fired when a touch event is interrupted by the device. + */ + interface DrawerLayout_touchcancel_Event extends DrawerLayoutBaseEvent { + /** + * A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is + * being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0. + * Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later. + */ + altitudeAngle: number; + + /** + * The x value of the unit vector that points in the direction of the azimuth of the stylus. + * Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later. + */ + azimuthUnitVectorInViewX: number; + + /** + * The y value of the unit vector that points in the direction of the azimuth of the stylus. + * Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later. + */ + azimuthUnitVectorInViewY: number; + + /** + * The current force value of the touch event. + * Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices. + */ + force: number; + + /** + * Maximum possible value of the force property. + * Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later. + */ + maximumPossibleForce: number; + + /** + * Returns `true` if the touch passed through an overlapping window belonging to another app. + * This is a security feature to protect an app from "tapjacking", where a malicious app can use a + * system overlay to intercept touch events in your app or to trick the end-user to tap on UI + * in your app intended for the overlay. + */ + obscured: boolean; + + /** + * The current size of the touch area. Note: This property is only available on some Android devices. + */ + size: number; + + /** + * The time (in seconds) when the touch was used in correlation with the system start up. + * Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later. + */ + timestamp: number; + + /** + * X coordinate of the event from the `source` view's coordinate system. + */ + x: number; + + /** + * Y coordinate of the event from the `source` view's coordinate system. + */ + y: number; + } + /** + * Fired when a touch event is completed. + */ + interface DrawerLayout_touchend_Event extends DrawerLayoutBaseEvent { + /** + * A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is + * being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0. + * Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later. + */ + altitudeAngle: number; + + /** + * The x value of the unit vector that points in the direction of the azimuth of the stylus. + * Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later. + */ + azimuthUnitVectorInViewX: number; + + /** + * The y value of the unit vector that points in the direction of the azimuth of the stylus. + * Note: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later. + */ + azimuthUnitVectorInViewY: number; + + /** + * The current force value of the touch event. + * Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices. + */ + force: number; + + /** + * Maximum possible value of the force property. + * Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later. + */ + maximumPossibleForce: number; + + /** + * Returns `true` if the touch passed through an overlapping window belonging to another app. + * This is a security feature to protect an app from "tapjacking", where a malicious app can use a + * system overlay to intercept touch events in your app or to trick the end-user to tap on UI + * in your app intended for the overlay. + */ + obscured: boolean; + + /** + * The current size of the touch area. Note: This property is only available on some Android devices. + */ + size: number; + + /** + * The time (in seconds) when the touch was used in correlation with the system start up. + * Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later. + */ + timestamp: number; + + /** + * X coordinate of the event from the `source` view's coordinate system. + */ + x: number; + + /** + * Y coordinate of the event from the `source` view's coordinate system. + */ + y: number; + } + /** + * Fired as soon as the device detects movement of a touch. + */ + interface DrawerLayout_touchmove_Event extends DrawerLayoutBaseEvent { + /** + * A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is + * being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0. + * Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later. + */ + altitudeAngle: number; + + /** + * The x value of the unit vector that points in the direction of the azimuth of the stylus. + * Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later. + */ + azimuthUnitVectorInViewX: number; + + /** + * The y value of the unit vector that points in the direction of the azimuth of the stylus. + * Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later. + */ + azimuthUnitVectorInViewY: number; + + /** + * The current force value of the touch event. + * Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices. + */ + force: number; + + /** + * Maximum possible value of the force property. + * Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later. + */ + maximumPossibleForce: number; + + /** + * Returns `true` if the touch passed through an overlapping window belonging to another app. + * This is a security feature to protect an app from "tapjacking", where a malicious app can use a + * system overlay to intercept touch events in your app or to trick the end-user to tap on UI + * in your app intended for the overlay. + */ + obscured: boolean; + + /** + * The current size of the touch area. Note: This property is only available on some Android devices. + */ + size: number; + + /** + * The time (in seconds) when the touch was used in correlation with the system start up. + * Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later. + */ + timestamp: number; + + /** + * X coordinate of the event from the `source` view's coordinate system. + */ + x: number; + + /** + * Y coordinate of the event from the `source` view's coordinate system. + */ + y: number; + } + /** + * Fired as soon as the device detects a touch gesture. + */ + interface DrawerLayout_touchstart_Event extends DrawerLayoutBaseEvent { + /** + * A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is + * being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0. + * Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later. + */ + altitudeAngle: number; + + /** + * The x value of the unit vector that points in the direction of the azimuth of the stylus. + * Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later. + */ + azimuthUnitVectorInViewX: number; + + /** + * The y value of the unit vector that points in the direction of the azimuth of the stylus. + * Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later. + */ + azimuthUnitVectorInViewY: number; + + /** + * The current force value of the touch event. + * Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices. + */ + force: number; + + /** + * Maximum possible value of the force property. + * Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later. + */ + maximumPossibleForce: number; + + /** + * Returns `true` if the touch passed through an overlapping window belonging to another app. + * This is a security feature to protect an app from "tapjacking", where a malicious app can use a + * system overlay to intercept touch events in your app or to trick the end-user to tap on UI + * in your app intended for the overlay. + */ + obscured: boolean; + + /** + * The current size of the touch area. Note: This property is only available on some Android devices. + */ + size: number; + + /** + * The time (in seconds) when the touch was used in correlation with the system start up. + * Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later. + */ + timestamp: number; + + /** + * X coordinate of the event from the `source` view's coordinate system. + */ + x: number; + + /** + * Y coordinate of the event from the `source` view's coordinate system. + */ + y: number; + } + /** + * Fired when the device detects a two-finger tap against the view. + */ + interface DrawerLayout_twofingertap_Event extends DrawerLayoutBaseEvent { /** * Returns `true` if the tap passed through an overlapping window belonging to another app. * This is a security feature to protect an app from "tapjacking", where a malicious app can use a @@ -16220,125 +18275,215 @@ declare namespace Titanium { */ y: number; } - interface CardViewEventMap extends ProxyEventMap { - click: CardView_click_Event; + /** + * Fired when the drawer view is opened. + */ + interface DrawerLayout_open_Event extends DrawerLayoutBaseEvent { + /** + * Contains the drawer frame type. Either `left` or `right`. + */ + drawer: string; + } + /** + * Fired when the drawer view is closed. + */ + interface DrawerLayout_close_Event extends DrawerLayoutBaseEvent { + /** + * Contains the drawer frame type. Either `left` or `right`. + */ + drawer: string; + } + /** + * Fired when the motion state of the drawer view changes. + */ + interface DrawerLayout_change_Event extends DrawerLayoutBaseEvent { + /** + * Whether or not the drawer is currently dragging. + */ + dragging: boolean; - dblclick: CardView_dblclick_Event; + /** + * Contains the drawer frame type. Either `left` or `right`. + */ + drawer: string; - doubletap: CardView_doubletap_Event; + /** + * Whether or not the drawer is currently idle. + */ + idle: boolean; - focus: CardView_focus_Event; + /** + * Whether or not the drawer is currently settling. + */ + settling: boolean; - keypressed: CardView_keypressed_Event; + /** + * The current drawer state. + */ + state: number; + } + /** + * Fired when the drawer view changes it's position. + */ + interface DrawerLayout_slide_Event extends DrawerLayoutBaseEvent { + /** + * Contains the drawer frame type. Either `left` or `right`. + */ + drawer: string; - longclick: CardView_longclick_Event; + /** + * The current drawer offset. + */ + offset: number; + } + interface DrawerLayoutEventMap extends ProxyEventMap { + change: DrawerLayout_change_Event; - longpress: CardView_longpress_Event; + click: DrawerLayout_click_Event; - pinch: CardView_pinch_Event; + close: DrawerLayout_close_Event; - postlayout: CardView_postlayout_Event; + dblclick: DrawerLayout_dblclick_Event; - singletap: CardView_singletap_Event; + doubletap: DrawerLayout_doubletap_Event; - swipe: CardView_swipe_Event; + focus: DrawerLayout_focus_Event; - touchcancel: CardView_touchcancel_Event; + keypressed: DrawerLayout_keypressed_Event; - touchend: CardView_touchend_Event; + longclick: DrawerLayout_longclick_Event; - touchmove: CardView_touchmove_Event; + longpress: DrawerLayout_longpress_Event; - touchstart: CardView_touchstart_Event; + open: DrawerLayout_open_Event; - twofingertap: CardView_twofingertap_Event; + pinch: DrawerLayout_pinch_Event; + + postlayout: DrawerLayout_postlayout_Event; + + rotate: DrawerLayout_rotate_Event; + + singletap: DrawerLayout_singletap_Event; + + slide: DrawerLayout_slide_Event; + + swipe: DrawerLayout_swipe_Event; + + touchcancel: DrawerLayout_touchcancel_Event; + + touchend: DrawerLayout_touchend_Event; + + touchmove: DrawerLayout_touchmove_Event; + + touchstart: DrawerLayout_touchstart_Event; + + twofingertap: DrawerLayout_twofingertap_Event; } /** - * CardView provides a layout container with rounded corners and a shadow indicating the view is elevated. + * A panel that displays the app's main navigation options on the left edge of the screen. */ - class CardView extends Titanium.UI.View { + class DrawerLayout extends Titanium.UI.View { /** - * Background color for CardView as a color name or hex triplet. + * Use with [DrawerLayout.drawerLockMode](Titanium.UI.Android.DrawerLayout.drawerLockMode) to specify the drawer is locked closed. */ - backgroundColor: string; + readonly LOCK_MODE_LOCKED_CLOSED: number; /** - * A background gradient for the view. + * Use with [DrawerLayout.drawerLockMode](Titanium.UI.Android.DrawerLayout.drawerLockMode) to specify the drawer is locked opened. */ - backgroundGradient: never; + readonly LOCK_MODE_LOCKED_OPEN: number; /** - * Background image for the view, specified as a local file path or URL. + * Use with [DrawerLayout.drawerLockMode](Titanium.UI.Android.DrawerLayout.drawerLockMode) to specify the drawer is reset to default lock state. */ - backgroundImage: never; + readonly LOCK_MODE_UNDEFINED: number; /** - * Determines whether to tile a background across a view. + * Use with [DrawerLayout.drawerLockMode](Titanium.UI.Android.DrawerLayout.drawerLockMode) to specify the drawer is unlocked. */ - backgroundRepeat: never; + readonly LOCK_MODE_UNLOCKED: number; /** - * Border color of the view, as a color name or hex triplet. + * Get or set the center view */ - borderColor: never; + centerView: Titanium.UI.View; /** - * Corner radius for CardView. + * Determine the drawer indicator status */ - borderRadius: number; + drawerIndicatorEnabled: boolean; /** - * Elevation for CardView. + * Get or set the drawerLockMode */ - elevation: number; + drawerLockMode: number; /** - * Maximum Elevation for CardView. + * Determine whether the left drawer is open */ - maxElevation: number; + isLeftOpen: boolean; /** - * Inner padding between the edges of the Card and children of the CardView. + * Determine whether the left drawer is visible */ - padding: number; + isLeftVisible: boolean; /** - * Inner padding between the bottom edge of the Card and children of the CardView. + * Determine whether the right drawer is open */ - paddingBottom: number; + isRightOpen: boolean; /** - * Inner padding between the left edge of the Card and children of the CardView. + * Determine whether the right drawer is visible */ - paddingLeft: number; + isRightVisible: boolean; /** - * Inner padding between the right edge of the Card and children of the CardView. + * Get or set lock mode for the left drawer */ - paddingRight: number; + leftDrawerLockMode: number; /** - * Inner padding between the top edge of the Card and children of the CardView. + * Get or set the view of the left drawer */ - paddingTop: number; + leftView: Titanium.UI.View; /** - * Add padding to CardView on API level 20 and before to prevent intersections between - * the Card content and rounded corners. + * Get or set the width of the left drawer */ - preventCornerOverlap: boolean; + leftWidth: number; /** - * Add padding on API level 21 and above to have the same measurements with previous versions. + * Get or set lock mode for the right drawer */ - useCompatPadding: boolean; + rightDrawerLockMode: number; + + /** + * Get or set the view of the right drawer + */ + rightView: Titanium.UI.View; + + /** + * Get or set the width of the right drawer + */ + rightWidth: number; + + /** + * A Toolbar instance to use as a toolbar. + */ + toolbar: Titanium.UI.Toolbar; + + /** + * Determine whether to enable the toolbar. + */ + toolbarEnabled: boolean; /** * Adds the specified callback as an event listener for the named event. */ - addEventListener( + addEventListener( name: K, - callback: (this: Titanium.UI.Android.CardView, event: CardViewEventMap[K]) => void, + callback: (this: Titanium.UI.Android.DrawerLayout, event: DrawerLayoutEventMap[K]) => void, ): void; /** @@ -16346,42 +18491,77 @@ declare namespace Titanium { */ addEventListener(name: string, callback: (param0: Titanium.Event) => void): void; + /** + * Close the left view. + */ + closeLeft(): void; + + /** + * Close the right view. + */ + closeRight(): void; + /** * Fires a synthesized event to any registered listeners. */ - fireEvent(name: K, event?: CardViewEventMap[K]): void; + fireEvent(name: K, event?: DrawerLayoutEventMap[K]): void; /** * Fires a synthesized event to any registered listeners. */ fireEvent(name: string, event?: any): void; + /** + * Disallow touch events on a specific view. + */ + interceptTouchEvent(view: Titanium.UI.View, disallowIntercept: boolean): void; + + /** + * Open the left view. + */ + openLeft(): void; + + /** + * Open the right view. + */ + openRight(): void; + /** * Removes the specified callback as an event listener for the named event. */ - removeEventListener( + removeEventListener( name: K, - callback: (this: Titanium.UI.Android.CardView, event: CardViewEventMap[K]) => void, + callback: (this: Titanium.UI.Android.DrawerLayout, event: DrawerLayoutEventMap[K]) => void, ): void; /** * Removes the specified callback as an event listener for the named event. */ removeEventListener(name: string, callback: (param0: Titanium.Event) => void): void; + + /** + * Toggle the visibility of the left view. + */ + toggleLeft(): void; + + /** + * Toggle the visibility of the right view. + */ + toggleRight(): void; } /** - * Base event for class Titanium.UI.Android.DrawerLayout + * Base event for class Titanium.UI.Android.FloatingActionButton */ - interface DrawerLayoutBaseEvent extends Ti.Event { + interface FloatingActionButtonBaseEvent extends Ti.Event { /** * Source object that fired the event. */ - source: Titanium.UI.Android.DrawerLayout; + source: Titanium.UI.Android.FloatingActionButton; } /** - * Fired when the device detects a click against the view. + * Fired when the button is clicked */ - interface DrawerLayout_click_Event extends DrawerLayoutBaseEvent { + interface FloatingActionButton_click_Event extends FloatingActionButtonBaseEvent { /** * Returns `true` if the click passed through an overlapping window belonging to another app. * This is a security feature to protect an app from "tapjacking", where a malicious app can use a @@ -16403,7 +18583,7 @@ declare namespace Titanium { /** * Fired when the device detects a double click against the view. */ - interface DrawerLayout_dblclick_Event extends DrawerLayoutBaseEvent { + interface FloatingActionButton_dblclick_Event extends FloatingActionButtonBaseEvent { /** * Returns `true` if the double click passed through an overlapping window belonging to another app. * This is a security feature to protect an app from "tapjacking", where a malicious app can use a @@ -16425,7 +18605,7 @@ declare namespace Titanium { /** * Fired when the device detects a double tap against the view. */ - interface DrawerLayout_doubletap_Event extends DrawerLayoutBaseEvent { + interface FloatingActionButton_doubletap_Event extends FloatingActionButtonBaseEvent { /** * Returns `true` if the double tap passed through an overlapping window belonging to another app. * This is a security feature to protect an app from "tapjacking", where a malicious app can use a @@ -16447,12 +18627,12 @@ declare namespace Titanium { /** * Fired when the view element gains focus. */ - interface DrawerLayout_focus_Event extends DrawerLayoutBaseEvent { + interface FloatingActionButton_focus_Event extends FloatingActionButtonBaseEvent { } /** * Fired when a hardware key is pressed in the view. */ - interface DrawerLayout_keypressed_Event extends DrawerLayoutBaseEvent { + interface FloatingActionButton_keypressed_Event extends FloatingActionButtonBaseEvent { /** * The code for the physical key that was pressed. For more details, see [KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html). This API is experimental and subject to change. */ @@ -16461,12 +18641,12 @@ declare namespace Titanium { /** * Fired when the device detects a long click. */ - interface DrawerLayout_longclick_Event extends DrawerLayoutBaseEvent { + interface FloatingActionButton_longclick_Event extends FloatingActionButtonBaseEvent { } /** * Fired when the device detects a long press. */ - interface DrawerLayout_longpress_Event extends DrawerLayoutBaseEvent { + interface FloatingActionButton_longpress_Event extends FloatingActionButtonBaseEvent { /** * Returns `true` if the long press passed through an overlapping window belonging to another app. * This is a security feature to protect an app from "tapjacking", where a malicious app can use a @@ -16488,7 +18668,7 @@ declare namespace Titanium { /** * Fired when the device detects a pinch gesture. */ - interface DrawerLayout_pinch_Event extends DrawerLayoutBaseEvent { + interface FloatingActionButton_pinch_Event extends FloatingActionButtonBaseEvent { /** * The average distance between each of the pointers forming the gesture in progress through * the focal point. @@ -16564,12 +18744,21 @@ declare namespace Titanium { /** * Fired when a layout cycle is finished. */ - interface DrawerLayout_postlayout_Event extends DrawerLayoutBaseEvent { + interface FloatingActionButton_postlayout_Event extends FloatingActionButtonBaseEvent { + } + /** + * Fired when the device detects a two finger rotation. + */ + interface FloatingActionButton_rotate_Event extends FloatingActionButtonBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; } /** * Fired when the device detects a single tap against the view. */ - interface DrawerLayout_singletap_Event extends DrawerLayoutBaseEvent { + interface FloatingActionButton_singletap_Event extends FloatingActionButtonBaseEvent { /** * Returns `true` if the single tap passed through an overlapping window belonging to another app. * This is a security feature to protect an app from "tapjacking", where a malicious app can use a @@ -16591,7 +18780,7 @@ declare namespace Titanium { /** * Fired when the device detects a swipe gesture against the view. */ - interface DrawerLayout_swipe_Event extends DrawerLayoutBaseEvent { + interface FloatingActionButton_swipe_Event extends FloatingActionButtonBaseEvent { /** * Direction of the swipe--either 'left', 'right', 'up', or 'down'. */ @@ -16618,7 +18807,7 @@ declare namespace Titanium { /** * Fired when a touch event is interrupted by the device. */ - interface DrawerLayout_touchcancel_Event extends DrawerLayoutBaseEvent { + interface FloatingActionButton_touchcancel_Event extends FloatingActionButtonBaseEvent { /** * A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is * being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0. @@ -16682,7 +18871,7 @@ declare namespace Titanium { /** * Fired when a touch event is completed. */ - interface DrawerLayout_touchend_Event extends DrawerLayoutBaseEvent { + interface FloatingActionButton_touchend_Event extends FloatingActionButtonBaseEvent { /** * A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is * being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0. @@ -16746,7 +18935,7 @@ declare namespace Titanium { /** * Fired as soon as the device detects movement of a touch. */ - interface DrawerLayout_touchmove_Event extends DrawerLayoutBaseEvent { + interface FloatingActionButton_touchmove_Event extends FloatingActionButtonBaseEvent { /** * A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is * being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0. @@ -16810,7 +18999,7 @@ declare namespace Titanium { /** * Fired as soon as the device detects a touch gesture. */ - interface DrawerLayout_touchstart_Event extends DrawerLayoutBaseEvent { + interface FloatingActionButton_touchstart_Event extends FloatingActionButtonBaseEvent { /** * A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is * being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0. @@ -16874,7 +19063,7 @@ declare namespace Titanium { /** * Fired when the device detects a two-finger tap against the view. */ - interface DrawerLayout_twofingertap_Event extends DrawerLayoutBaseEvent { + interface FloatingActionButton_twofingertap_Event extends FloatingActionButtonBaseEvent { /** * Returns `true` if the tap passed through an overlapping window belonging to another app. * This is a security feature to protect an app from "tapjacking", where a malicious app can use a @@ -16893,213 +19082,255 @@ declare namespace Titanium { */ y: number; } - /** - * Fired when the drawer view is opened. - */ - interface DrawerLayout_open_Event extends DrawerLayoutBaseEvent { - /** - * Contains the drawer frame type. Either `left` or `right`. - */ - drawer: string; + interface FloatingActionButtonEventMap extends ProxyEventMap { + click: FloatingActionButton_click_Event; + + dblclick: FloatingActionButton_dblclick_Event; + + doubletap: FloatingActionButton_doubletap_Event; + + focus: FloatingActionButton_focus_Event; + + keypressed: FloatingActionButton_keypressed_Event; + + longclick: FloatingActionButton_longclick_Event; + + longpress: FloatingActionButton_longpress_Event; + + pinch: FloatingActionButton_pinch_Event; + + postlayout: FloatingActionButton_postlayout_Event; + + rotate: FloatingActionButton_rotate_Event; + + singletap: FloatingActionButton_singletap_Event; + + swipe: FloatingActionButton_swipe_Event; + + touchcancel: FloatingActionButton_touchcancel_Event; + + touchend: FloatingActionButton_touchend_Event; + + touchmove: FloatingActionButton_touchmove_Event; + + touchstart: FloatingActionButton_touchstart_Event; + + twofingertap: FloatingActionButton_twofingertap_Event; } /** - * Fired when the drawer view is closed. + * A floating action button (FAB) is a circular button that triggers the primary action in your app's UI. */ - interface DrawerLayout_close_Event extends DrawerLayoutBaseEvent { + class FloatingActionButton extends Titanium.UI.View { /** - * Contains the drawer frame type. Either `left` or `right`. + * Whether the view should be "hidden" from (i.e., ignored by) the accessibility service. */ - drawer: string; - } - /** - * Fired when the motion state of the drawer view changes. - */ - interface DrawerLayout_change_Event extends DrawerLayoutBaseEvent { + accessibilityHidden: never; + /** - * Whether or not the drawer is currently dragging. + * Briefly describes what performing an action (such as a click) on the view will do. */ - dragging: boolean; + accessibilityHint: never; /** - * Contains the drawer frame type. Either `left` or `right`. + * A succinct label identifying the view for the device's accessibility service. */ - drawer: string; + accessibilityLabel: never; /** - * Whether or not the drawer is currently idle. + * A string describing the value (if any) of the view for the device's accessibility service. */ - idle: boolean; + accessibilityValue: never; /** - * Whether or not the drawer is currently settling. + * Coordinate of the view about which to pivot an animation. */ - settling: boolean; + anchorPoint: never; /** - * The current drawer state. + * Disabled background color of the view, as a color name or hex triplet. */ - state: number; - } - /** - * Fired when the drawer view changes it's position. - */ - interface DrawerLayout_slide_Event extends DrawerLayoutBaseEvent { + backgroundDisabledColor: never; + /** - * Contains the drawer frame type. Either `left` or `right`. + * Disabled background image for the view, specified as a local file path or URL. */ - drawer: string; + backgroundDisabledImage: never; /** - * The current drawer offset. + * Focused background color of the view, as a color name or hex triplet. */ - offset: number; - } - interface DrawerLayoutEventMap extends ProxyEventMap { - change: DrawerLayout_change_Event; - - click: DrawerLayout_click_Event; - - close: DrawerLayout_close_Event; - - dblclick: DrawerLayout_dblclick_Event; - - doubletap: DrawerLayout_doubletap_Event; - - focus: DrawerLayout_focus_Event; + backgroundFocusedColor: never; - keypressed: DrawerLayout_keypressed_Event; + /** + * Focused background image for the view, specified as a local file path or URL. + */ + backgroundFocusedImage: never; - longclick: DrawerLayout_longclick_Event; + /** + * A background gradient for the view. + */ + backgroundGradient: never; - longpress: DrawerLayout_longpress_Event; + /** + * Background image for the view, specified as a local file path or URL. + */ + backgroundImage: never; - open: DrawerLayout_open_Event; + /** + * Determines whether to tile a background across a view. + */ + backgroundRepeat: never; - pinch: DrawerLayout_pinch_Event; + /** + * Selected background color of the view, as a color name or hex triplet. + */ + backgroundSelectedColor: never; - postlayout: DrawerLayout_postlayout_Event; + /** + * Selected background image URL for the view, specified as a local file path or URL. + */ + backgroundSelectedImage: never; - singletap: DrawerLayout_singletap_Event; + /** + * Border color of the view, as a color name or hex triplet. + */ + borderColor: never; - slide: DrawerLayout_slide_Event; + /** + * Radius for the rounded corners of the view's border. + */ + borderRadius: never; - swipe: DrawerLayout_swipe_Event; + /** + * Border width of the view. + */ + borderWidth: never; - touchcancel: DrawerLayout_touchcancel_Event; + /** + * View's center position, in the parent view's coordinates. + */ + center: never; - touchend: DrawerLayout_touchend_Event; + /** + * Array of this view's child views. + */ + readonly children: never; - touchmove: DrawerLayout_touchmove_Event; + /** + * Size of the button + */ + customSize: number; - touchstart: DrawerLayout_touchstart_Event; + /** + * Whether view should be focusable while navigating with the trackball. + */ + focusable: never; - twofingertap: DrawerLayout_twofingertap_Event; - } - /** - * A panel that displays the app's main navigation options on the left edge of the screen. - */ - class DrawerLayout extends Titanium.UI.View { /** - * Use with [DrawerLayout.drawerLockMode](Titanium.UI.Android.DrawerLayout.drawerLockMode) to specify the drawer is locked closed. + * View height, in platform-specific units. */ - readonly LOCK_MODE_LOCKED_CLOSED: number; + height: never; /** - * Use with [DrawerLayout.drawerLockMode](Titanium.UI.Android.DrawerLayout.drawerLockMode) to specify the drawer is locked opened. + * Determines whether the layout has wrapping behavior. */ - readonly LOCK_MODE_LOCKED_OPEN: number; + horizontalWrap: never; /** - * Use with [DrawerLayout.drawerLockMode](Titanium.UI.Android.DrawerLayout.drawerLockMode) to specify the drawer is reset to default lock state. + * Predefined button size */ - readonly LOCK_MODE_UNDEFINED: number; + readonly iconSize: string; /** - * Use with [DrawerLayout.drawerLockMode](Titanium.UI.Android.DrawerLayout.drawerLockMode) to specify the drawer is unlocked. + * Image inside the button (the icon) */ - readonly LOCK_MODE_UNLOCKED: number; + image: string | number | Titanium.Blob; /** - * Get or set the center view + * Determines whether to keep the device screen on. */ - centerView: Titanium.UI.View; + keepScreenOn: never; /** - * Determine the drawer indicator status + * Specifies how the view positions its children. + * One of: 'composite', 'vertical', or 'horizontal'. */ - drawerIndicatorEnabled: boolean; + layout: never; /** - * Get or set the drawerLockMode + * Size of the image inside the button */ - drawerLockMode: number; + maxImageSize: number; /** - * Determine whether the left drawer is open + * Opacity of this view, from 0.0 (transparent) to 1.0 (opaque). Defaults to 1.0 (opaque). */ - isLeftOpen: boolean; + opacity: never; /** - * Determine whether the left drawer is visible + * When on, animate call overrides current animation if applicable. */ - isLeftVisible: boolean; + overrideCurrentAnimation: never; /** - * Determine whether the right drawer is open + * The bounding box of the view relative to its parent, in system units. */ - isRightOpen: boolean; + readonly rect: never; /** - * Determine whether the right drawer is visible + * The size of the view in system units. */ - isRightVisible: boolean; + readonly size: never; /** - * Get or set lock mode for the left drawer + * Determines keyboard behavior when this view is focused. Defaults to . */ - leftDrawerLockMode: number; + softKeyboardOnFocus: never; /** - * Get or set the view of the left drawer + * Determines whether view should receive touch events. */ - leftView: Titanium.UI.View; + touchEnabled: never; /** - * Get or set the width of the left drawer + * A material design visual construct that provides an instantaneous visual confirmation of touch point. */ - leftWidth: number; + touchFeedback: never; /** - * Get or set lock mode for the right drawer + * Transformation matrix to apply to the view. */ - rightDrawerLockMode: number; + transform: never; /** - * Get or set the view of the right drawer + * Determines the color of the shadow. */ - rightView: Titanium.UI.View; + viewShadowColor: never; /** - * Get or set the width of the right drawer + * View's width, in platform-specific units. */ - rightWidth: number; + width: never; /** - * A Toolbar instance to use as a toolbar. + * Z-index stack order position, relative to other sibling views. */ - toolbar: Titanium.UI.Toolbar; + zIndex: never; /** - * Determine whether to enable the toolbar. + * Adds a child to this view's hierarchy. */ - toolbarEnabled: boolean; + add: never; /** * Adds the specified callback as an event listener for the named event. */ - addEventListener( + addEventListener( name: K, - callback: (this: Titanium.UI.Android.DrawerLayout, event: DrawerLayoutEventMap[K]) => void, + callback: ( + this: Titanium.UI.Android.FloatingActionButton, + event: FloatingActionButtonEventMap[K], + ) => void, ): void; /** @@ -17108,19 +19339,22 @@ declare namespace Titanium { addEventListener(name: string, callback: (param0: Titanium.Event) => void): void; /** - * Close the left view. + * Animates this view. */ - closeLeft(): void; + animate: never; /** - * Close the right view. + * Translates a point from this view's coordinate system to another view's coordinate system. */ - closeRight(): void; + convertPointToView: never; /** * Fires a synthesized event to any registered listeners. */ - fireEvent(name: K, event?: DrawerLayoutEventMap[K]): void; + fireEvent( + name: K, + event?: FloatingActionButtonEventMap[K], + ): void; /** * Fires a synthesized event to any registered listeners. @@ -17128,26 +19362,24 @@ declare namespace Titanium { fireEvent(name: string, event?: any): void; /** - * Disallow touch events on a specific view. - */ - interceptTouchEvent(view: Titanium.UI.View, disallowIntercept: boolean): void; - - /** - * Open the left view. + * Removes a child view from this view's hierarchy. */ - openLeft(): void; + remove: never; /** - * Open the right view. + * Removes all child views from this view's hierarchy. */ - openRight(): void; + removeAllChildren: never; /** * Removes the specified callback as an event listener for the named event. */ - removeEventListener( + removeEventListener( name: K, - callback: (this: Titanium.UI.Android.DrawerLayout, event: DrawerLayoutEventMap[K]) => void, + callback: ( + this: Titanium.UI.Android.FloatingActionButton, + event: FloatingActionButtonEventMap[K], + ) => void, ): void; /** @@ -17156,14 +19388,9 @@ declare namespace Titanium { removeEventListener(name: string, callback: (param0: Titanium.Event) => void): void; /** - * Toggle the visibility of the left view. - */ - toggleLeft(): void; - - /** - * Toggle the visibility of the right view. + * Returns an image of the rendered view, as a Blob. */ - toggleRight(): void; + toImage: never; } /** * Base event for class Titanium.UI.Android.ProgressIndicator @@ -17362,6 +19589,15 @@ declare namespace Titanium { */ interface ProgressIndicator_postlayout_Event extends ProgressIndicatorBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface ProgressIndicator_rotate_Event extends ProgressIndicatorBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -17715,6 +19951,8 @@ declare namespace Titanium { postlayout: ProgressIndicator_postlayout_Event; + rotate: ProgressIndicator_rotate_Event; + singletap: ProgressIndicator_singletap_Event; swipe: ProgressIndicator_swipe_Event; @@ -17744,7 +19982,7 @@ declare namespace Titanium { accessibilityHint: never; /** - * A succint label identifying the view for the device's accessibility service. + * A succinct label identifying the view for the device's accessibility service. */ accessibilityLabel: never; @@ -17804,7 +20042,7 @@ declare namespace Titanium { backgroundSelectedColor: never; /** - * Selected background image url for the view, specified as a local file path or URL. + * Selected background image URL for the view, specified as a local file path or URL. */ backgroundSelectedImage: never; @@ -18256,6 +20494,15 @@ declare namespace Titanium { */ interface SearchView_postlayout_Event extends SearchViewBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface SearchView_rotate_Event extends SearchViewBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -18628,6 +20875,8 @@ declare namespace Titanium { postlayout: SearchView_postlayout_Event; + rotate: SearchView_rotate_Event; + singletap: SearchView_singletap_Event; submit: SearchView_submit_Event; @@ -18918,6 +21167,15 @@ declare namespace Titanium { */ interface Snackbar_postlayout_Event extends SnackbarBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface Snackbar_rotate_Event extends SnackbarBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -19264,6 +21522,8 @@ declare namespace Titanium { postlayout: Snackbar_postlayout_Event; + rotate: Snackbar_rotate_Event; + singletap: Snackbar_singletap_Event; swipe: Snackbar_swipe_Event; @@ -19308,7 +21568,7 @@ declare namespace Titanium { accessibilityHint: never; /** - * A succint label identifying the view for the device's accessibility service. + * A succinct label identifying the view for the device's accessibility service. */ accessibilityLabel: never; @@ -19373,7 +21633,7 @@ declare namespace Titanium { backgroundSelectedColor: never; /** - * Selected background image url for the view, specified as a local file path or URL. + * Selected background image URL for the view, specified as a local file path or URL. */ backgroundSelectedImage: never; @@ -19950,6 +22210,16 @@ declare namespace Titanium { */ const FEEDBACK_GENERATOR_TYPE_SELECTION: number; + /** + * Use with [BlurView.glassEffect](Titanium.UI.iOS.BlurView.glassEffect) to specify a clear glass effect style. + */ + const GLASS_EFFECT_STYLE_CLEAR: number; + + /** + * Use with [BlurView.glassEffect](Titanium.UI.iOS.BlurView.glassEffect) to specify a regular glass effect style. + */ + const GLASS_EFFECT_STYLE_REGULAR: number; + /** * Inject the script after the document finishes loading, but before other subresources finish loading. */ @@ -20148,6 +22418,21 @@ declare namespace Titanium { */ const SCROLL_DECELERATION_RATE_NORMAL: number; + /** + * Use with to apply the system default edge effect style. + */ + const SCROLL_VIEW_EDGE_EFFECT_STYLE_AUTOMATIC: number; + + /** + * Use with to apply a scroll edge effect with a hard cutoff and dividing line. + */ + const SCROLL_VIEW_EDGE_EFFECT_STYLE_HARD: number; + + /** + * Use with to apply a soft-edged scroll edge effect. + */ + const SCROLL_VIEW_EDGE_EFFECT_STYLE_SOFT: number; + /** * Use with to change the search bar style. */ @@ -20318,6 +22603,26 @@ declare namespace Titanium { */ const TABLEVIEW_INDEX_SEARCH: string; + /** + * Automatically determine when the tab group minimizes. + */ + const TAB_GROUP_MINIMIZE_BEHAVIOR_AUTOMATIC: number; + + /** + * Do not minimize the tab group. + */ + const TAB_GROUP_MINIMIZE_BEHAVIOR_NEVER: number; + + /** + * Minimize the tab group when scrolling down. + */ + const TAB_GROUP_MINIMIZE_BEHAVIOR_ON_SCROLL_DOWN: number; + + /** + * Minimize the tab group when scrolling up. + */ + const TAB_GROUP_MINIMIZE_BEHAVIOR_ON_SCROLL_UP: number; + /** * A set of constants for the style that can be used for the `style` property of * . @@ -20820,44 +23125,6 @@ declare namespace Titanium { */ const TRASH: number; } - /** - * A set of constants for the system button styles that can be used for the button `style` property. - */ - namespace SystemButtonStyle { - /** - * A simple button style with a border. - * @deprecated Use the instead. - */ - const BORDERED: number; - - /** - * The style for a **Done** button--for example, a button that completes some task and returns - * to the previous view. - * @deprecated Use the instead. - */ - const DONE: number; - - /** - * Specifies a borderless button, the default style for toolbars, button bars, and tabbed bars. - * @deprecated Use the instead. - */ - const PLAIN: number; - - /** - * Adds the specified callback as an event listener for the named event. - */ - function addEventListener(name: string, callback: (param0: Titanium.Event) => void): void; - - /** - * Fires a synthesized event to any registered listeners. - */ - function fireEvent(name: string, event?: any): void; - - /** - * Removes the specified callback as an event listener for the named event. - */ - function removeEventListener(name: string, callback: (param0: Titanium.Event) => void): void; - } /** * A set of constants for the system icon styles that can be used on a tab group tab. */ @@ -21451,6 +23718,15 @@ declare namespace Titanium { */ interface BlurView_postlayout_Event extends BlurViewBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface BlurView_rotate_Event extends BlurViewBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -21793,6 +24069,8 @@ declare namespace Titanium { postlayout: BlurView_postlayout_Event; + rotate: BlurView_rotate_Event; + singletap: BlurView_singletap_Event; swipe: BlurView_swipe_Event; @@ -21812,15 +24090,19 @@ declare namespace Titanium { * The blur effect is applied to every view the blur view is added to by default. You can also place the * blur view above other views and all visible views layered under the blur view are blurred as well. * For more information on BlurView, please refer to the official [Apple documentation](https://developer.apple.com/documentation/uikit/uivisualeffectview). - * Note: Apple introduced two new constants and in - * iOS 10. These are internally mapped to and . + * Note: In iOS 26, Apple introduced the `UIGlassEffectView`, an alternative to classic blur views. See the property for more details. */ class BlurView extends Titanium.UI.View { /** - * The effect you provide for the view. + * The blur effect to apply to the effect view. */ effect: number; + /** + * The glass effect configuration to apply to the effect view. + */ + glassEffect: GlassEffectConfiguration; + /** * Adds the specified callback as an event listener for the named event. */ @@ -21857,6 +24139,100 @@ declare namespace Titanium { */ removeEventListener(name: string, callback: (param0: Titanium.Event) => void): void; } + /** + * A configuration object for customizing the appearance and behavior of a button. + */ + class ButtonConfiguration extends Titanium.Proxy { + /** + * Specify an attributed string for the button title. + */ + attributedString: Titanium.UI.AttributedString; + + /** + * The background color of the button. + */ + backgroundColor: string | Titanium.UI.Color; + + /** + * Background color to use while the button is highlighted (pressed). + */ + backgroundSelectedColor: string | Titanium.UI.Color; + + /** + * The foreground color of the button's content. + */ + color: string | Titanium.UI.Color; + + /** + * Font to use for the button title. + */ + font: Font; + + /** + * The image to display on the button. + */ + image: string | Titanium.Blob | Titanium.Filesystem.File; + + /** + * The spacing between the image and title. + */ + imagePadding: number; + + /** + * The placement of the image relative to the title. + */ + imagePlacement: string; + + /** + * Whether or not a loading indicator should be shown + */ + loading: boolean; + + /** + * The padding around the button's content. + */ + padding: Padding; + + /** + * The style of button configuration to create. + */ + style: string; + + /** + * The subtitle text to display below the title. + */ + subtitle: string; + + /** + * Text alignment of the configuration title. + */ + textAlign: string | number; + + /** + * The title text to display on the button. + */ + title: string; + + /** + * The spacing between the title and subtitle. + */ + titlePadding: number; + + /** + * Adds the specified callback as an event listener for the named event. + */ + addEventListener(name: string, callback: (param0: Titanium.Event) => void): void; + + /** + * Fires a synthesized event to any registered listeners. + */ + fireEvent(name: string, event?: any): void; + + /** + * Removes the specified callback as an event listener for the named event. + */ + removeEventListener(name: string, callback: (param0: Titanium.Event) => void): void; + } /** * Base event for class Titanium.UI.iOS.CollisionBehavior */ @@ -22191,6 +24567,15 @@ declare namespace Titanium { */ interface CoverFlowView_postlayout_Event extends CoverFlowViewBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface CoverFlowView_rotate_Event extends CoverFlowViewBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -22549,6 +24934,8 @@ declare namespace Titanium { postlayout: CoverFlowView_postlayout_Event; + rotate: CoverFlowView_rotate_Event; + singletap: CoverFlowView_singletap_Event; swipe: CoverFlowView_swipe_Event; @@ -22565,7 +24952,7 @@ declare namespace Titanium { } /** * The cover flow view is a container showing animated three-dimensional images in a style - * consistent with the cover flow presentation style used for iPod, iTunes, and file browsing. + * consistent with the former cover flow presentation style used for iPod, iTunes, and Finder. */ class CoverFlowView extends Titanium.UI.View { /** @@ -22693,6 +25080,11 @@ declare namespace Titanium { */ readonly name: string; + /** + * Title of the file. + */ + title: string; + /** * URL of the document being previewed. */ @@ -23133,6 +25525,15 @@ declare namespace Titanium { */ interface LivePhotoView_postlayout_Event extends LivePhotoViewBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface LivePhotoView_rotate_Event extends LivePhotoViewBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -23493,6 +25894,8 @@ declare namespace Titanium { postlayout: LivePhotoView_postlayout_Event; + rotate: LivePhotoView_rotate_Event; + singletap: LivePhotoView_singletap_Event; start: LivePhotoView_start_Event; @@ -23757,7 +26160,7 @@ declare namespace Titanium { removeEventListener(name: string, callback: (param0: Titanium.Event) => void): void; } /** - * A PreviewActionGroup provides options to configure a group of actions used by the iOS9 3D-Touch + * A PreviewActionGroup provides options to configure a group of actions used by the iOS 9 3D-Touch * feature "Peek and Pop". */ class PreviewActionGroup extends Titanium.Proxy { @@ -24197,6 +26600,15 @@ declare namespace Titanium { */ interface SplitWindow_postlayout_Event extends SplitWindowBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface SplitWindow_rotate_Event extends SplitWindowBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -24562,6 +26974,8 @@ declare namespace Titanium { postlayout: SplitWindow_postlayout_Event; + rotate: SplitWindow_rotate_Event; + singletap: SplitWindow_singletap_Event; swipe: SplitWindow_swipe_Event; @@ -24865,6 +27279,15 @@ declare namespace Titanium { */ interface Stepper_postlayout_Event extends StepperBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface Stepper_rotate_Event extends StepperBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -25228,6 +27651,8 @@ declare namespace Titanium { postlayout: Stepper_postlayout_Event; + rotate: Stepper_rotate_Event; + singletap: Stepper_singletap_Event; swipe: Stepper_swipe_Event; @@ -25839,6 +28264,15 @@ declare namespace Titanium { */ interface Popover_postlayout_Event extends PopoverBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface Popover_rotate_Event extends PopoverBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -26188,6 +28622,8 @@ declare namespace Titanium { postlayout: Popover_postlayout_Event; + rotate: Popover_rotate_Event; + singletap: Popover_singletap_Event; swipe: Popover_swipe_Event; @@ -26217,7 +28653,7 @@ declare namespace Titanium { accessibilityHint: never; /** - * A succint label identifying the view for the device's accessibility service. + * A succinct label identifying the view for the device's accessibility service. */ accessibilityLabel: never; @@ -26266,6 +28702,11 @@ declare namespace Titanium { */ backgroundRepeat: never; + /** + * Selected background color of the view, as a color name or hex triplet. + */ + backgroundSelectedColor: never; + /** * Size of the top end cap. */ @@ -26682,6 +29123,15 @@ declare namespace Titanium { */ interface ActivityIndicator_postlayout_Event extends ActivityIndicatorBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface ActivityIndicator_rotate_Event extends ActivityIndicatorBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -27028,6 +29478,8 @@ declare namespace Titanium { postlayout: ActivityIndicator_postlayout_Event; + rotate: ActivityIndicator_rotate_Event; + singletap: ActivityIndicator_singletap_Event; swipe: ActivityIndicator_swipe_Event; @@ -27057,7 +29509,7 @@ declare namespace Titanium { accessibilityHint: never; /** - * A succint label identifying the view for the device's accessibility service. + * A succinct label identifying the view for the device's accessibility service. */ accessibilityLabel: never; @@ -27127,7 +29579,7 @@ declare namespace Titanium { backgroundSelectedColor: never; /** - * Selected background image url for the view, specified as a local file path or URL. + * Selected background image URL for the view, specified as a local file path or URL. */ backgroundSelectedImage: never; @@ -27676,6 +30128,15 @@ declare namespace Titanium { */ interface AlertDialog_postlayout_Event extends AlertDialogBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface AlertDialog_rotate_Event extends AlertDialogBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -28022,6 +30483,8 @@ declare namespace Titanium { postlayout: AlertDialog_postlayout_Event; + rotate: AlertDialog_rotate_Event; + singletap: AlertDialog_singletap_Event; swipe: AlertDialog_swipe_Event; @@ -28052,7 +30515,7 @@ declare namespace Titanium { accessibilityHint: never; /** - * A succint label identifying the view for the device's accessibility service. + * A succinct label identifying the view for the device's accessibility service. */ accessibilityLabel: never; @@ -28127,7 +30590,7 @@ declare namespace Titanium { backgroundSelectedColor: never; /** - * Selected background image url for the view, specified as a local file path or URL. + * Selected background image URL for the view, specified as a local file path or URL. */ backgroundSelectedImage: never; @@ -28581,6 +31044,13 @@ declare namespace Titanium { */ static createCardView(parameters?: Dictionary): Titanium.UI.Android.CardView; + /** + * Creates and returns an instance of . + */ + static createCollapseToolbar( + parameters?: Dictionary, + ): Titanium.UI.Android.CollapseToolbar; + /** * Creates and returns an instance of . */ @@ -28588,6 +31058,13 @@ declare namespace Titanium { parameters?: Dictionary, ): Titanium.UI.Android.DrawerLayout; + /** + * Creates and returns an instance of . + */ + static createFloatingActionButton( + parameters?: Dictionary, + ): Titanium.UI.Android.FloatingActionButton; + /** * Creates and returns an instance of . */ @@ -28627,6 +31104,11 @@ declare namespace Titanium { */ static hideSoftKeyboard(): void; + /** + * Moves the app to the background + */ + static moveToBackground(): void; + /** * Opens an application preferences dialog, using the native Android system settings interface, * defined by the platform-specific `preferences.xml` and `array.xml` files. @@ -28647,6 +31129,11 @@ declare namespace Titanium { */ source: Titanium.UI.Animation; } + /** + * Fired when the animation is canceled. + */ + interface Animation_cancel_Event extends AnimationBaseEvent { + } /** * Fired when the animation completes. */ @@ -28658,6 +31145,8 @@ declare namespace Titanium { interface Animation_start_Event extends AnimationBaseEvent { } interface AnimationEventMap extends ProxyEventMap { + cancel: Animation_cancel_Event; + complete: Animation_complete_Event; start: Animation_start_Event; @@ -28687,6 +31176,11 @@ declare namespace Titanium { */ bottom: number; + /** + * The animation bounce. If set, the animation uses the iOS 17+ spring animation. + */ + bounce: number; + /** * Value of the `center` property at the end of the animation. */ @@ -28752,6 +31246,16 @@ declare namespace Titanium { */ right: number; + /** + * Value of the `rotationX` property at the end of the animation. + */ + rotationX: number; + + /** + * Value of the `rotationY` property at the end of the animation. + */ + rotationY: number; + /** * The initial spring velocity. */ @@ -28763,7 +31267,7 @@ declare namespace Titanium { top: number; /** - * Animate the view from its current tranform to the specified transform. + * Animate the view from its current transform to the specified transform. */ transform: Titanium.UI.Matrix2D | Titanium.UI.Matrix3D; @@ -29060,6 +31564,15 @@ declare namespace Titanium { */ interface Button_postlayout_Event extends ButtonBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface Button_rotate_Event extends ButtonBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -29425,6 +31938,8 @@ declare namespace Titanium { postlayout: Button_postlayout_Event; + rotate: Button_rotate_Event; + singletap: Button_singletap_Event; swipe: Button_swipe_Event; @@ -29488,6 +32003,11 @@ declare namespace Titanium { */ color: string | Titanium.UI.Color; + /** + * Button configuration for modern button styling. + */ + configuration: any; + /** * Text color of the button in its disabled state, as a color name or hex triplet. */ @@ -29563,6 +32083,11 @@ declare namespace Titanium { */ titleid: string; + /** + * The default text to display in the control's tooltip. + */ + tooltip: string; + /** * Vertical alignment for the text field, specified using one of the * vertical alignment constants from . @@ -29809,6 +32334,15 @@ declare namespace Titanium { */ interface ButtonBar_postlayout_Event extends ButtonBarBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface ButtonBar_rotate_Event extends ButtonBarBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -30155,6 +32689,8 @@ declare namespace Titanium { postlayout: ButtonBar_postlayout_Event; + rotate: ButtonBar_rotate_Event; + singletap: ButtonBar_singletap_Event; swipe: ButtonBar_swipe_Event; @@ -30702,6 +33238,15 @@ declare namespace Titanium { */ interface DashboardView_postlayout_Event extends DashboardViewBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface DashboardView_rotate_Event extends DashboardViewBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -31118,6 +33663,8 @@ declare namespace Titanium { postlayout: DashboardView_postlayout_Event; + rotate: DashboardView_rotate_Event; + singletap: DashboardView_singletap_Event; swipe: DashboardView_swipe_Event; @@ -31137,6 +33684,11 @@ declare namespace Titanium { * be deleted and reordered by the user using its built-in edit mode. */ class DashboardView extends Titanium.UI.View { + /** + * Selected background color of the view, as a color name or hex triplet. + */ + backgroundSelectedColor: never; + /** * The number of columns of items in the view. */ @@ -31425,6 +33977,15 @@ declare namespace Titanium { */ interface EmailDialog_postlayout_Event extends EmailDialogBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface EmailDialog_rotate_Event extends EmailDialogBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -31805,6 +34366,8 @@ declare namespace Titanium { postlayout: EmailDialog_postlayout_Event; + rotate: EmailDialog_rotate_Event; + singletap: EmailDialog_singletap_Event; swipe: EmailDialog_swipe_Event; @@ -31854,7 +34417,7 @@ declare namespace Titanium { accessibilityHint: never; /** - * A succint label identifying the view for the device's accessibility service. + * A succinct label identifying the view for the device's accessibility service. */ accessibilityLabel: never; @@ -31924,7 +34487,7 @@ declare namespace Titanium { backgroundSelectedColor: never; /** - * Selected background image url for the view, specified as a local file path or URL. + * Selected background image URL for the view, specified as a local file path or URL. */ backgroundSelectedImage: never; @@ -32400,6 +34963,15 @@ declare namespace Titanium { */ interface ImageView_postlayout_Event extends ImageViewBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface ImageView_rotate_Event extends ImageViewBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -32815,6 +35387,8 @@ declare namespace Titanium { postlayout: ImageView_postlayout_Event; + rotate: ImageView_rotate_Event; + singletap: ImageView_singletap_Event; start: ImageView_start_Event; @@ -32951,6 +35525,16 @@ declare namespace Titanium { */ addEventListener(name: string, callback: (param0: Titanium.Event) => void): void; + /** + * Adds a symbol effect to the image view with specified options, animation, and callback. + */ + addSymbolEffect( + symbolEffect: string, + options: string, + animated: boolean, + callback: (...args: any[]) => void, + ): void; + /** * Fires a synthesized event to any registered listeners. */ @@ -33211,6 +35795,15 @@ declare namespace Titanium { */ interface Label_postlayout_Event extends LabelBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface Label_rotate_Event extends LabelBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -33578,6 +36171,8 @@ declare namespace Titanium { postlayout: Label_postlayout_Event; + rotate: Label_rotate_Event; + singletap: Label_singletap_Event; swipe: Label_swipe_Event; @@ -33631,6 +36226,11 @@ declare namespace Titanium { */ backgroundPaddingTop: number; + /** + * Break strategy (control over paragraph layout). Check [Android breakStrategy](https://developer.android.com/reference/android/widget/TextView#attr_android:breakStrategy) for more infos. + */ + breakStrategy: number; + /** * Array of this view's child views. */ @@ -33657,15 +36257,30 @@ declare namespace Titanium { highlightedColor: string | Titanium.UI.Color; /** - * Simple HTML formatting. + * Pass a HTML-based string and it will be formatted accordingly. */ html: string; + /** + * Frequency of automatic hyphenation. Check [Android hyphenationFrequency](https://developer.android.com/reference/android/widget/TextView#attr_android:hyphenationFrequency) for more infos. + */ + hyphenationFrequency: number; + /** * Includes extra top and bottom padding to make room for accents that go above normal ascent and descent. */ includeFontPadding: boolean; + /** + * Letter spacing of the [text](Titanium.UI.Label.text) as a float value. + */ + letterSpacing: number; + + /** + * Returns the amount of lines the content is actually using. Is equal or lower than `maxLines`. + */ + readonly lineCount: number; + /** * Line spacing of the [text](Titanium.UI.Label.text), as a dictionary with the properties `add` and `multiply`. */ @@ -33711,6 +36326,11 @@ declare namespace Titanium { */ textAlign: string | number; + /** + * Property that specifies how to capitalize the text. Can be `lowercase`, `uppercase` or `none` (default) + */ + textTransform: string; + /** * Key identifying a string from the locale file to use for the label text. */ @@ -33722,6 +36342,11 @@ declare namespace Titanium { */ verticalAlign: number | string; + /** + * Returns the actual text seen on the screen. If the text is ellipsized it will be different to the normal `text`. + */ + readonly visibleText: string; + /** * Enable or disable word wrapping in the label. * @deprecated If you want to disable wrapping, then set [Titanium.UI.Label.maxLines](Titanium.UI.Label.maxLines) to 1 instead. @@ -33998,7 +36623,7 @@ declare namespace Titanium { /** * Appends the data entries to the end of the list section. */ - appendItems(dataItems: readonly ListDataItem[], animation?: ListViewAnimationProperties): void; + appendItems(dataItems: ReadonlyArray, animation?: ListViewAnimationProperties): void; /** * Removes count entries from the list section at the specified index. @@ -34020,7 +36645,7 @@ declare namespace Titanium { */ insertItemsAt( itemIndex: number, - dataItems: readonly ListDataItem[], + dataItems: ReadonlyArray, animation?: ListViewAnimationProperties, ): void; @@ -34036,14 +36661,14 @@ declare namespace Titanium { replaceItemsAt( index: number, count: number, - dataItems: readonly ListDataItem[], + dataItems: ReadonlyArray, animation?: ListViewAnimationProperties, ): void; /** * Sets the data entries in the list section. */ - setItems(dataItems: readonly ListDataItem[], animation?: ListViewAnimationProperties): void; + setItems(dataItems: ReadonlyArray, animation?: ListViewAnimationProperties): void; /** * Updates an item at the specified index. @@ -34247,6 +36872,15 @@ declare namespace Titanium { */ interface ListView_postlayout_Event extends ListViewBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface ListView_rotate_Event extends ListViewBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -34970,10 +37604,32 @@ declare namespace Titanium { */ interface ListView_scrolling_Event extends ListViewBaseEvent { /** - * Direction of the scroll either 'up', or 'down'. + * Direction of the scroll either 'up', 'down' or 'unknown'. */ direction: string; + /** + * The first visible item in the list view when the event fires; this item might not be fully visible. May be -1 on iOS. + */ + firstVisibleItem: any; + + /** + * The index of the first visible item in the list view when the event fires; this item might not be fully visible. + * Note: The index is `-1` when there are no items in the . + */ + firstVisibleItemIndex: number; + + /** + * The first visible section in the list view when the event fires. + */ + firstVisibleSection: Titanium.UI.ListSection; + + /** + * The index of the first visible section in the list view when the event fires. + * Note: The index is `-1` when there are no items in the . + */ + firstVisibleSectionIndex: number; + /** * The expected y axis offset when the scrolling action decelerates to a stop. */ @@ -34983,6 +37639,11 @@ declare namespace Titanium { * The velocity of the scroll in scale factor per second */ velocity: number; + + /** + * The number of visible items in the list view when the event fires. + */ + visibleItemCount: number; } interface ListViewEventMap extends ProxyEventMap { cancelprefetch: ListView_cancelprefetch_Event; @@ -35037,6 +37698,8 @@ declare namespace Titanium { pullend: ListView_pullend_Event; + rotate: ListView_rotate_Event; + scrollend: ListView_scrollend_Event; scrolling: ListView_scrolling_Event; @@ -35088,7 +37751,7 @@ declare namespace Titanium { backgroundSelectedColor: never; /** - * Selected background image url for the view, specified as a local file path or URL. + * Selected background image URL for the view, specified as a local file path or URL. */ backgroundSelectedImage: never; @@ -35107,6 +37770,11 @@ declare namespace Titanium { */ readonly children: never; + /** + * X and Y coordinates to which to reposition the top-left point of the content region. + */ + contentOffset: Point; + /** * Determines if the scrolling event should fire every time there is a new visible item. */ @@ -35157,6 +37825,11 @@ declare namespace Titanium { */ footerView: Titanium.UI.View; + /** + * Optimize the `continuousUpdate` scrolling event. + */ + forceUpdates: boolean; + /** * When set to false, the ListView will not draw the divider after the header view. */ @@ -35659,6 +38332,15 @@ declare namespace Titanium { */ interface MaskedImage_postlayout_Event extends MaskedImageBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface MaskedImage_rotate_Event extends MaskedImageBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -36005,6 +38687,8 @@ declare namespace Titanium { postlayout: MaskedImage_postlayout_Event; + rotate: MaskedImage_rotate_Event; + singletap: MaskedImage_singletap_Event; swipe: MaskedImage_swipe_Event; @@ -36499,6 +39183,15 @@ declare namespace Titanium { */ interface NavigationWindow_postlayout_Event extends NavigationWindowBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface NavigationWindow_rotate_Event extends NavigationWindowBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -36908,6 +39601,8 @@ declare namespace Titanium { postlayout: NavigationWindow_postlayout_Event; + rotate: NavigationWindow_rotate_Event; + singletap: NavigationWindow_singletap_Event; swipe: NavigationWindow_swipe_Event; @@ -36952,6 +39647,13 @@ declare namespace Titanium { */ hideShadow: never; + /** + * A boolean indicating whether or not child windows of this navigation window + * should have the ability to be swipe-to-closed over the full width of it's window or not. + * @deprecated This is handled by the operation system in newer versions of iOS. + */ + interactiveDismissModeEnabled: never; + /** * View to show in the left nav bar area. */ @@ -37066,11 +39768,6 @@ declare namespace Titanium { */ fireEvent(name: string, event?: any): void; - /** - * Hides the tab bar. Must be called before opening the window. - */ - hideTabBar: never; - /** * Opens a window within the navigation window. */ @@ -37129,7 +39826,7 @@ declare namespace Titanium { message: string; /** - * Vertical placement of the notifcation, *as a fraction of the screen height*. + * Vertical placement of the notification, *as a fraction of the screen height*. */ verticalMargin: number; @@ -37347,6 +40044,15 @@ declare namespace Titanium { */ interface OptionBar_postlayout_Event extends OptionBarBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface OptionBar_rotate_Event extends OptionBarBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -37693,6 +40399,8 @@ declare namespace Titanium { postlayout: OptionBar_postlayout_Event; + rotate: OptionBar_rotate_Event; + singletap: OptionBar_singletap_Event; swipe: OptionBar_swipe_Event; @@ -37716,6 +40424,11 @@ declare namespace Titanium { */ readonly children: never; + /** + * Text color of the unselected button + */ + color: string | Titanium.UI.Color; + /** * Index of the currently selected option. */ @@ -37731,6 +40444,21 @@ declare namespace Titanium { */ layout: string; + /** + * Background color of the selected button + */ + selectedBackgroundColor: string | Titanium.UI.Color; + + /** + * Border color of the selected button + */ + selectedBorderColor: string | Titanium.UI.Color; + + /** + * Text color of the selected button + */ + selectedTextColor: string | Titanium.UI.Color; + /** * Adds a child to this view's hierarchy. */ @@ -37993,6 +40721,15 @@ declare namespace Titanium { */ interface OptionDialog_postlayout_Event extends OptionDialogBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface OptionDialog_rotate_Event extends OptionDialogBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -38339,6 +41076,8 @@ declare namespace Titanium { postlayout: OptionDialog_postlayout_Event; + rotate: OptionDialog_rotate_Event; + singletap: OptionDialog_singletap_Event; swipe: OptionDialog_swipe_Event; @@ -38370,7 +41109,7 @@ declare namespace Titanium { accessibilityHint: never; /** - * A succint label identifying the view for the device's accessibility service. + * A succinct label identifying the view for the device's accessibility service. */ accessibilityLabel: never; @@ -38445,7 +41184,7 @@ declare namespace Titanium { backgroundSelectedColor: never; /** - * Selected background image url for the view, specified as a local file path or URL. + * Selected background image URL for the view, specified as a local file path or URL. */ backgroundSelectedImage: never; @@ -38916,6 +41655,15 @@ declare namespace Titanium { */ interface Picker_postlayout_Event extends PickerBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface Picker_rotate_Event extends PickerBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -39308,6 +42056,8 @@ declare namespace Titanium { postlayout: Picker_postlayout_Event; + rotate: Picker_rotate_Event; + singletap: Picker_singletap_Event; swipe: Picker_swipe_Event; @@ -39382,7 +42132,7 @@ declare namespace Titanium { backgroundSelectedColor: never; /** - * Selected background image url for the view, specified as a local file path or URL. + * Selected background image URL for the view, specified as a local file path or URL. */ backgroundSelectedImage: never; @@ -39478,10 +42228,15 @@ declare namespace Titanium { minuteInterval: number; /** - * Determines if a multicolumn spinner or single column drop-down picker should be used. + * Determines if a multi-column spinner or single column drop-down picker should be used. */ nativeSpinner: boolean; + /** + * Forces the picker to used assigned theme instead of the system theme. + */ + overrideUserInterfaceStyle: number; + /** * Determines whether the visual selection indicator is shown. * @deprecated This property is ignored as of Titanium 10.0.1. @@ -39493,6 +42248,11 @@ declare namespace Titanium { */ selectionOpens: boolean; + /** + * Horizontal text alignment of the date picker when using . + */ + textAlign: string | number; + /** * The view's tintColor */ @@ -39504,7 +42264,7 @@ declare namespace Titanium { type: number; /** - * Determines if a multicolumn spinner or single column drop-down picker should be used. + * Determines if a multi-column spinner or single column drop-down picker should be used. */ useSpinner: boolean; @@ -39815,6 +42575,15 @@ declare namespace Titanium { */ interface PickerColumn_postlayout_Event extends PickerColumnBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface PickerColumn_rotate_Event extends PickerColumnBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -40161,6 +42930,8 @@ declare namespace Titanium { postlayout: PickerColumn_postlayout_Event; + rotate: PickerColumn_rotate_Event; + singletap: PickerColumn_singletap_Event; swipe: PickerColumn_swipe_Event; @@ -40190,7 +42961,7 @@ declare namespace Titanium { accessibilityHint: never; /** - * A succint label identifying the view for the device's accessibility service. + * A succinct label identifying the view for the device's accessibility service. */ accessibilityLabel: never; @@ -40260,7 +43031,7 @@ declare namespace Titanium { backgroundSelectedColor: never; /** - * Selected background image url for the view, specified as a local file path or URL. + * Selected background image URL for the view, specified as a local file path or URL. */ backgroundSelectedImage: never; @@ -40617,23 +43388,10 @@ declare namespace Titanium { */ show: never; - /** - * Starts a batch update of this view's layout properties. - * @deprecated Use the [Titanium.Proxy.applyProperties](Titanium.Proxy.applyProperties) method to batch-update layout properties. - */ - startLayout: never; - /** * Returns an image of the rendered view, as a Blob. */ toImage: never; - - /** - * Performs a batch update of all supplied layout properties and schedules a layout pass after - * they have been updated. - * @deprecated Use the [Titanium.Proxy.applyProperties](Titanium.Proxy.applyProperties) method to batch-update layout properties. - */ - updateLayout: never; } /** * Base event for class Titanium.UI.PickerRow @@ -40832,6 +43590,15 @@ declare namespace Titanium { */ interface PickerRow_postlayout_Event extends PickerRowBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface PickerRow_rotate_Event extends PickerRowBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -41178,6 +43945,8 @@ declare namespace Titanium { postlayout: PickerRow_postlayout_Event; + rotate: PickerRow_rotate_Event; + singletap: PickerRow_singletap_Event; swipe: PickerRow_swipe_Event; @@ -41449,6 +44218,15 @@ declare namespace Titanium { */ interface ProgressBar_postlayout_Event extends ProgressBarBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface ProgressBar_rotate_Event extends ProgressBarBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -41795,6 +44573,8 @@ declare namespace Titanium { postlayout: ProgressBar_postlayout_Event; + rotate: ProgressBar_rotate_Event; + singletap: ProgressBar_singletap_Event; swipe: ProgressBar_swipe_Event; @@ -41964,6 +44744,16 @@ declare namespace Titanium { * and Android [SwipeRefreshLayout](https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.html). */ class RefreshControl extends Titanium.Proxy { + /** + * The background color for the refresh control, as a color name or hex triplet. + */ + backgroundColor: string | Titanium.UI.Color; + + /** + * Offset of the refresh control view. + */ + offset: RefreshControlOffset; + /** * The tint color for the refresh control, as a color name or hex triplet. */ @@ -42217,6 +45007,15 @@ declare namespace Titanium { */ interface ScrollView_postlayout_Event extends ScrollViewBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface ScrollView_rotate_Event extends ScrollViewBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -42616,6 +45415,15 @@ declare namespace Titanium { * Fired when the scrollable region starts being dragged. */ interface ScrollView_dragstart_Event extends ScrollViewBaseEvent { + /** + * X coordinate from the scrollable touch position. + */ + x: number; + + /** + * Y coordinate from the scrollable touch position. + */ + y: number; } /** * Fired when the scrollable region stops being dragged. @@ -42627,6 +45435,16 @@ declare namespace Titanium { * Is always `true` on Android. */ decelerate: boolean; + + /** + * X coordinate from the scrollable touch position. + */ + x: number; + + /** + * Y coordinate from the scrollable touch position. + */ + y: number; } interface ScrollViewEventMap extends ProxyEventMap { click: ScrollView_click_Event; @@ -42655,6 +45473,8 @@ declare namespace Titanium { postlayout: ScrollView_postlayout_Event; + rotate: ScrollView_rotate_Event; + scale: ScrollView_scale_Event; scroll: ScrollView_scroll_Event; @@ -42707,6 +45527,11 @@ declare namespace Titanium { */ disableBounce: boolean; + /** + * Configures the edge effects displayed when the scroll view hits its bounds. + */ + edgeEffect: any; + /** * Determines whether horizontal scroll bounce of the scrollable region is enabled. */ @@ -43012,6 +45837,15 @@ declare namespace Titanium { */ interface ScrollableView_postlayout_Event extends ScrollableViewBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface ScrollableView_rotate_Event extends ScrollableViewBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against this view. */ @@ -43293,6 +46127,8 @@ declare namespace Titanium { postlayout: ScrollableView_postlayout_Event; + rotate: ScrollableView_rotate_Event; + scroll: ScrollableView_scroll_Event; scrollend: ScrollableView_scrollend_Event; @@ -43402,6 +46238,11 @@ declare namespace Titanium { */ preferredIndicatorImage: string | Titanium.Blob; + /** + * Direction of the ScrollableView (`horizontal` or `vertical`). + */ + scrollType: string; + /** * Determines whether scrolling is enabled for the view. */ @@ -43453,7 +46294,7 @@ declare namespace Titanium { /** * Inserts views at the specified position in the [views](Titanium.UI.ScrollableView.views) array. */ - insertViewsAt(position: number, views: readonly Titanium.UI.View[]): void; + insertViewsAt(position: number, views: ReadonlyArray): void; /** * Sets the current page to the next consecutive page in . @@ -43709,6 +46550,15 @@ declare namespace Titanium { */ interface SearchBar_postlayout_Event extends SearchBarBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface SearchBar_rotate_Event extends SearchBarBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -44110,6 +46960,8 @@ declare namespace Titanium { return: SearchBar_return_Event; + rotate: SearchBar_rotate_Event; + singletap: SearchBar_singletap_Event; swipe: SearchBar_swipe_Event; @@ -44673,6 +47525,15 @@ declare namespace Titanium { */ interface Slider_postlayout_Event extends SliderBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface Slider_rotate_Event extends SliderBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -45075,6 +47936,8 @@ declare namespace Titanium { postlayout: Slider_postlayout_Event; + rotate: Slider_rotate_Event; + singletap: Slider_singletap_Event; start: Slider_start_Event; @@ -45482,6 +48345,15 @@ declare namespace Titanium { */ interface Switch_postlayout_Event extends SwitchBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface Switch_rotate_Event extends SwitchBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -45839,6 +48711,8 @@ declare namespace Titanium { postlayout: Switch_postlayout_Event; + rotate: Switch_rotate_Event; + singletap: Switch_singletap_Event; swipe: Switch_swipe_Event; @@ -45882,6 +48756,8 @@ declare namespace Titanium { */ font: Font; + onThumbColor: string | Titanium.UI.Color; + /** * The color used to tint the appearance of the switch when it is turned on. */ @@ -45897,6 +48773,8 @@ declare namespace Titanium { */ textAlign: string | number; + thumbColor: string | Titanium.UI.Color; + /** * The color used to tint the appearance of the thumb. */ @@ -46064,6 +48942,11 @@ declare namespace Titanium { */ y: number; } + /** + * Fired when the view element gains focus. + */ + interface Tab_focus_Event extends TabBaseEvent { + } /** * Fired when a hardware key is pressed in the view. */ @@ -46181,6 +49064,15 @@ declare namespace Titanium { */ interface Tab_postlayout_Event extends TabBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface Tab_rotate_Event extends TabBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -46563,6 +49455,8 @@ declare namespace Titanium { doubletap: Tab_doubletap_Event; + focus: Tab_focus_Event; + keypressed: Tab_keypressed_Event; longclick: Tab_longclick_Event; @@ -46573,6 +49467,8 @@ declare namespace Titanium { postlayout: Tab_postlayout_Event; + rotate: Tab_rotate_Event; + selected: Tab_selected_Event; singletap: Tab_singletap_Event; @@ -46606,7 +49502,7 @@ declare namespace Titanium { accessibilityHint: never; /** - * A succint label identifying the view for the device's accessibility service. + * A succinct label identifying the view for the device's accessibility service. */ accessibilityLabel: never; @@ -46689,8 +49585,20 @@ declare namespace Titanium { * If this item displays a badge, this color will be used for the badge's background. * If set to null, the default background color will be used instead. */ + badgeBackgroundColor: string | Titanium.UI.Color; + + /** + * If this item displays a badge, this color will be used for the badge's background. + * If set to null, the default background color will be used instead. + * @deprecated Use [Titanium.UI.Tab.badgeBackgroundColor](Titanium.UI.Tab.badgeBackgroundColor) instead. + */ badgeColor: string | Titanium.UI.Color; + /** + * Set the text color of the badge. + */ + badgeTextColor: string | Titanium.UI.Color; + /** * Border color of the view, as a color name or hex triplet. */ @@ -46741,6 +49649,11 @@ declare namespace Titanium { */ icon: string; + /** + * Specifies the font family or specific font to use. + */ + iconFamily: string; + /** * The icon inset or outset for each edge. */ @@ -47151,6 +50064,15 @@ declare namespace Titanium { */ interface TabGroup_postlayout_Event extends TabGroupBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface TabGroup_rotate_Event extends TabGroupBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -47583,6 +50505,8 @@ declare namespace Titanium { postlayout: TabGroup_postlayout_Event; + rotate: TabGroup_rotate_Event; + singletap: TabGroup_singletap_Event; swipe: TabGroup_swipe_Event; @@ -47612,7 +50536,7 @@ declare namespace Titanium { accessibilityHint: never; /** - * A succint label identifying the view for the device's accessibility service. + * A succinct label identifying the view for the device's accessibility service. */ accessibilityLabel: never; @@ -47719,7 +50643,7 @@ declare namespace Titanium { backgroundSelectedColor: never; /** - * Selected background image url for the view, specified as a local file path or URL. + * Selected background image URL for the view, specified as a local file path or URL. */ backgroundSelectedImage: never; @@ -47753,6 +50677,11 @@ declare namespace Titanium { */ bottom: never; + /** + * View shown as a bottom accessory attached to the tab group. + */ + bottomAccessoryView: Titanium.UI.View; + /** * Array of this view's child views. */ @@ -47763,17 +50692,39 @@ declare namespace Titanium { */ editButtonTitle: string; + /** + * Enables or disables the menu in a BottomNavigation. If disabled you can't change to a different tab. + */ + enabled: number; + /** * Boolean value indicating if the application should exit when closing the tab group, whether via Android * back button or the [close](Titanium.UI.TabGroup.close) method. */ exitOnClose: boolean; + /** + * Only used for a BottomNavigation setup. If set to `true` it will use an optimized BottomNavigation + * setup with fixes for Material 3 layouts and new properties: `indicatorColor` and `iconFamily`. + * The new BottomNavigation will only load the active Activity and doesn't support `swipeable`. + */ + experimental: boolean; + + /** + * Additional flags to set on the TabGroup. + */ + flags: number; + /** * Whether view should be focusable while navigating with the trackball. */ focusable: never; + /** + * Force tab bar to bottom position. + */ + forceBottomPosition: boolean; + /** * View height, in platform-specific units. */ @@ -47784,6 +50735,13 @@ declare namespace Titanium { */ horizontalWrap: never; + /** + * A boolean indicating whether or not child windows of this tab group + * should have the ability to be swipe-to-closed over the full width of it's window or not. + * @deprecated This is handled by the operation system in newer versions of iOS. + */ + interactiveDismissModeEnabled: never; + /** * Specifies how the view positions its children. * One of: 'composite', 'vertical', or 'horizontal'. @@ -47795,6 +50753,11 @@ declare namespace Titanium { */ left: never; + /** + * Defines the minimize behavior for the tab group, if it is supported. + */ + minimizeBehavior: number; + /** * The tintColor to apply to the navigation bar (typically for the **More** tab). */ @@ -47826,7 +50789,7 @@ declare namespace Titanium { right: never; /** - * Image of the shadow placed between the tab bar and the content area. + * Image of the shadow placed between the tab group and the content area. */ shadowImage: string; @@ -47845,6 +50808,11 @@ declare namespace Titanium { */ softKeyboardOnFocus: never; + /** + * The color of the status bar (top bar) for this window. + */ + statusBarColor: number; + /** * Property defining which style for the TabGroup to be used. */ @@ -47855,6 +50823,16 @@ declare namespace Titanium { */ swipeable: boolean; + /** + * Programmatically shows / hides the bottom tab group of the tab group. + */ + tabBarVisible: boolean; + + /** + * Property defining which tabMode is used for the TabGroup. + */ + tabMode: number; + /** * Tabs managed by the tab group. */ @@ -47882,7 +50860,7 @@ declare namespace Titanium { tabsTintColor: string | Titanium.UI.Color; /** - * A Boolean value that indicates whether the tab bar is translucent. + * A Boolean value that indicates whether the tab group is translucent. */ tabsTranslucent: boolean; @@ -47975,8 +50953,9 @@ declare namespace Titanium { /** * Disable (or re-enable) tab navigation. If tab navigation is disabled, the tabs are hidden and * the last selected tab window is shown. + * @deprecated */ - disableTabNavigation(disable: boolean): void; + disableTabNavigation(params: disableTabOptions): void; /** * Fires a synthesized event to any registered listeners. @@ -48000,6 +50979,12 @@ declare namespace Titanium { */ getTabs: never; + /** + * Hides the tab group with animation. + * @deprecated Deprecated in favor of property. + */ + hideTabBar: never; + /** * Opens the tab group and makes it visible. */ @@ -48048,6 +51033,12 @@ declare namespace Titanium { * Sets the array of items to show in the window's toolbar. */ setToolbar: never; + + /** + * Shows the tab group with animation. + * @deprecated Deprecated in favor of property. + */ + showTabBar: never; } /** * Base event for class Titanium.UI.TabbedBar @@ -48233,6 +51224,15 @@ declare namespace Titanium { */ interface TabbedBar_postlayout_Event extends TabbedBarBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface TabbedBar_rotate_Event extends TabbedBarBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -48579,6 +51579,8 @@ declare namespace Titanium { postlayout: TabbedBar_postlayout_Event; + rotate: TabbedBar_rotate_Event; + singletap: TabbedBar_singletap_Event; swipe: TabbedBar_swipe_Event; @@ -48597,6 +51599,11 @@ declare namespace Titanium { * A button bar that maintains a selected state. */ class TabbedBar extends Titanium.UI.View { + /** + * Icon tint color of the selected tab + */ + activeTintColor: string | Titanium.UI.Color; + /** * Array of this view's child views. */ @@ -48612,6 +51619,11 @@ declare namespace Titanium { */ labels: string[] | BarItemType[]; + /** + * Background color of the selected tab indicator. + */ + selectedBackgroundColor: string | Titanium.UI.Color; + /** * Color of the selected text */ @@ -48938,6 +51950,15 @@ declare namespace Titanium { */ interface TableView_postlayout_Event extends TableViewBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface TableView_rotate_Event extends TableViewBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -48977,7 +51998,7 @@ declare namespace Titanium { */ interface TableView_swipe_Event extends TableViewBaseEvent { /** - * Direction of the swipe, either `left` or `right`. + * Direction of the swipe, either `left`, `right` or `unknown`. */ direction: string; @@ -49453,6 +52474,36 @@ declare namespace Titanium { */ decelerate: boolean; } + /** + * Fired when the user interacts with one of the custom edit actions defined by . + */ + interface TableView_editaction_Event extends TableViewBaseEvent { + /** + * The [title](RowActionType.title) as defined in the row action object. + */ + action: string; + + /** + * The [identifier](RowActionType. identifier) of the row action. Only included in the event + * if previously defined. + */ + identifier: string; + + /** + * The index of the row that fired this event. + */ + index: number; + + /** + * The row that fired this event. + */ + row: Titanium.UI.TableViewRow | Dictionary; + + /** + * The section that fired this event. + */ + section: Titanium.UI.TableViewSection; + } interface TableViewEventMap extends ProxyEventMap { click: TableView_click_Event; @@ -49466,6 +52517,8 @@ declare namespace Titanium { dragstart: TableView_dragstart_Event; + editaction: TableView_editaction_Event; + focus: TableView_focus_Event; indexclick: TableView_indexclick_Event; @@ -49482,6 +52535,8 @@ declare namespace Titanium { postlayout: TableView_postlayout_Event; + rotate: TableView_rotate_Event; + rowsselected: TableView_rowsselected_Event; scroll: TableView_scroll_Event; @@ -49538,7 +52593,7 @@ declare namespace Titanium { backgroundSelectedColor: never; /** - * Selected background image url for the view, specified as a local file path or URL. + * Selected background image URL for the view, specified as a local file path or URL. */ backgroundSelectedImage: never; @@ -49547,6 +52602,11 @@ declare namespace Titanium { */ readonly children: never; + /** + * X and Y coordinates to which to reposition the top-left point of the content region. + */ + contentOffset: Point; + /** * Rows of the table view. */ @@ -49634,6 +52694,11 @@ declare namespace Titanium { */ index: TableViewIndexEntry[]; + /** + * The manner in which the keyboard is dismissed when a drag begins in the table view. + */ + keyboardDismissMode: number; + /** * Max number of row class names. */ @@ -49707,7 +52772,7 @@ declare namespace Titanium { scrollIndicatorStyle: number; /** - * If `true`, the tableview can be scrolled. + * If `true`, the table view can be scrolled. */ scrollable: boolean; @@ -50203,6 +53268,15 @@ declare namespace Titanium { */ interface TableViewRow_postlayout_Event extends TableViewRowBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface TableViewRow_rotate_Event extends TableViewRowBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -50349,6 +53423,8 @@ declare namespace Titanium { postlayout: TableViewRow_postlayout_Event; + rotate: TableViewRow_rotate_Event; + singletap: TableViewRow_singletap_Event; swipe: TableViewRow_swipe_Event; @@ -50368,7 +53444,7 @@ declare namespace Titanium { */ class TableViewRow extends Titanium.UI.View { /** - * A succint label associated with the table row for the device's accessibility service. + * A succinct label associated with the table row for the device's accessibility service. */ accessibilityLabel: string; @@ -50397,12 +53473,22 @@ declare namespace Titanium { */ deleteButtonTitle: string; + /** + * Specifies custom action items to be shown when when a list item is edited. + */ + editActions: RowActionType[]; + /** * Determines the rows' editable behavior, which allows them to be deleted by the user when the * table is in `editing` or `moving` mode. */ editable: boolean; + /** + * This row will always be visible when you filter your content. + */ + filterAlwaysInclude: boolean; + /** * Font to use for the row title. */ @@ -50806,6 +53892,15 @@ declare namespace Titanium { */ interface TextArea_postlayout_Event extends TextAreaBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface TextArea_rotate_Event extends TextAreaBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -51220,6 +54315,8 @@ declare namespace Titanium { return: TextArea_return_Event; + rotate: TextArea_rotate_Event; + selected: TextArea_selected_Event; singletap: TextArea_singletap_Event; @@ -51346,6 +54443,17 @@ declare namespace Titanium { */ hintType: number; + /** + * Key identifying a string from the locale file to use for the + * [hintText](Titanium.UI.TextArea.hintText) property. + */ + hinttextid: string; + + /** + * Pass a HTML-based string and it will be formatted accordingly. + */ + html: string; + /** * Determines the appearance of the keyboard displayed when this text area is focused. */ @@ -51413,7 +54521,7 @@ declare namespace Titanium { readonly selection: textAreaSelectedParams; /** - * Determinates if the undo and redo buttons on the left side of the keyboard should be displayed or not. Only valid on iOS9 and above. This property can only be set upon creation. + * Determines if the undo and redo buttons on the left side of the keyboard should be displayed or not. Only valid on iOS 9 and above. This property can only be set upon creation. */ showUndoRedoActions: boolean; @@ -51715,6 +54823,15 @@ declare namespace Titanium { */ interface TextField_postlayout_Event extends TextFieldBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface TextField_rotate_Event extends TextFieldBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -52060,6 +55177,15 @@ declare namespace Titanium { */ value: string; } + /** + * Fired when the field is empty and you press backspace key again. + */ + interface TextField_empty_Event extends TextFieldBaseEvent { + /** + * Key code of the key. + */ + keyCode: number; + } /** * Fired when the return key is pressed on the keyboard. */ @@ -52080,6 +55206,8 @@ declare namespace Titanium { doubletap: TextField_doubletap_Event; + empty: TextField_empty_Event; + focus: TextField_focus_Event; keypressed: TextField_keypressed_Event; @@ -52094,6 +55222,8 @@ declare namespace Titanium { return: TextField_return_Event; + rotate: TextField_rotate_Event; + singletap: TextField_singletap_Event; swipe: TextField_swipe_Event; @@ -52322,7 +55452,7 @@ declare namespace Titanium { readonly selection: textFieldSelectedParams; /** - * Determinates if the undo and redo buttons on the left side of the keyboard should be displayed or not. Only valid on iOS9 and above. + * Determines if the undo and redo buttons on the left side of the keyboard should be displayed or not. Only valid on iOS 9 and above. */ showUndoRedoActions: boolean; @@ -52620,6 +55750,15 @@ declare namespace Titanium { */ interface Toolbar_postlayout_Event extends ToolbarBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface Toolbar_rotate_Event extends ToolbarBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -52966,6 +56105,8 @@ declare namespace Titanium { postlayout: Toolbar_postlayout_Event; + rotate: Toolbar_rotate_Event; + singletap: Toolbar_singletap_Event; swipe: Toolbar_swipe_Event; @@ -53025,7 +56166,7 @@ declare namespace Titanium { backgroundSelectedColor: never; /** - * Selected background image url for the view, specified as a local file path or URL. + * Selected background image URL for the view, specified as a local file path or URL. */ backgroundSelectedImage: never; @@ -53080,6 +56221,11 @@ declare namespace Titanium { */ navigationIcon: string | Titanium.Blob | Titanium.Filesystem.File; + /** + * Tint color of the navigation icon (e.g. home arrow) + */ + navigationIconColor: string; + /** * Image to be used for the overflow menu. */ @@ -53139,7 +56285,7 @@ declare namespace Titanium { collapseActionViews(): void; /** - * Collapses expandend ActionViews and hides overflow menu + * Collapses expanded ActionViews and hides overflow menu */ dismissPopupMenus(): void; @@ -53448,6 +56594,15 @@ declare namespace Titanium { */ interface View_postlayout_Event extends ViewBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface View_rotate_Event extends ViewBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -53794,6 +56949,8 @@ declare namespace Titanium { postlayout: View_postlayout_Event; + rotate: View_rotate_Event; + singletap: View_singletap_Event; swipe: View_swipe_Event; @@ -53812,6 +56969,11 @@ declare namespace Titanium { * An empty drawing surface or container */ class View extends Titanium.Proxy { + /** + * Boolean value to remove the long press notification for the device's accessibility service. + */ + accessibilityDisableLongPress: boolean; + /** * Whether the view should be "hidden" from (i.e., ignored by) the accessibility service. */ @@ -53823,7 +56985,7 @@ declare namespace Titanium { accessibilityHint: string; /** - * A succint label identifying the view for the device's accessibility service. + * A succinct label identifying the view for the device's accessibility service. */ accessibilityLabel: string; @@ -53893,7 +57055,7 @@ declare namespace Titanium { backgroundSelectedColor: string | Titanium.UI.Color; /** - * Selected background image url for the view, specified as a local file path or URL. + * Selected background image URL for the view, specified as a local file path or URL. */ backgroundSelectedImage: string; @@ -53977,6 +57139,11 @@ declare namespace Titanium { */ id?: string; + /** + * A value indicating the render mode of the View + */ + keepHardwareMode: boolean; + /** * Determines whether to keep the device screen on. */ @@ -54064,6 +57231,11 @@ declare namespace Titanium { */ tintColor: string | Titanium.UI.Color; + /** + * The default text to display in the control's tooltip. + */ + tooltip: string; + /** * The view's top position. */ @@ -54239,22 +57411,14 @@ declare namespace Titanium { show(options?: AnimatedOptions): void; /** - * Starts a batch update of this view's layout properties. - * @deprecated Use the [Titanium.Proxy.applyProperties](Titanium.Proxy.applyProperties) method to batch-update layout properties. + * Stops a running animation. */ - startLayout: never; + stopAnimation(): void; /** * Returns an image of the rendered view, as a Blob. */ toImage(callback?: (param0: Titanium.Blob) => void, honorScaleFactor?: boolean): Titanium.Blob; - - /** - * Performs a batch update of all supplied layout properties and schedules a layout pass after - * they have been updated. - * @deprecated Use the [Titanium.Proxy.applyProperties](Titanium.Proxy.applyProperties) method to batch-update layout properties. - */ - updateLayout: never; } /** * Base event for class Titanium.UI.WebView @@ -54453,6 +57617,15 @@ declare namespace Titanium { */ interface WebView_postlayout_Event extends WebViewBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface WebView_rotate_Event extends WebViewBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -54839,7 +58012,7 @@ declare namespace Titanium { */ interface WebView_onLoadResource_Event extends WebViewBaseEvent { /** - * The url of the resource that will load. + * The URL of the resource that will load. */ url: string; } @@ -54975,6 +58148,8 @@ declare namespace Titanium { redirect: WebView_redirect_Event; + rotate: WebView_rotate_Event; + singletap: WebView_singletap_Event; sslerror: WebView_sslerror_Event; @@ -54995,13 +58170,58 @@ declare namespace Titanium { * The web view allows you to open an HTML5 based view which can load either local or remote content. */ class WebView extends Titanium.UI.View { + /** + * Hardware rendering mode + */ + readonly LAYER_TYPE_HARDWARE: number; + + /** + * Default rendering mode + */ + readonly LAYER_TYPE_NONE: number; + + /** + * Software rendering mode + */ + readonly LAYER_TYPE_SOFTWARE: number; + + /** + * PDF paper size + */ + readonly PDF_PAGE_DIN_A1: number; + + /** + * PDF paper size + */ + readonly PDF_PAGE_DIN_A2: number; + + /** + * PDF paper size + */ + readonly PDF_PAGE_DIN_A3: number; + + /** + * PDF paper size + */ + readonly PDF_PAGE_DIN_A4: number; + + /** + * PDF paper size + */ + readonly PDF_PAGE_DIN_A5: number; + + /** + * A Boolean value indicating file access within WebView. + */ + allowFileAccess: boolean; + /** * List of allowed URL schemes for the web view. */ allowedURLSchemes: string[]; /** - * A Boolean value indicating whether horizontal swipe gestures will trigger back-forward list navigations. + * A Boolean value indicating whether horizontal swipe gestures will trigger back-forward list navigation. */ allowsBackForwardNavigationGestures: boolean; @@ -55017,13 +58237,18 @@ declare namespace Titanium { assetsDirectory: string; /** - * An array of url strings to blacklist. + * Specifies whether or not the web view should automatically adjust its scroll view insets. + */ + autoAdjustScrollViewInsets: boolean; + + /** + * An array of URL strings to blacklist. * @deprecated Use the property instead. */ blacklistedURLs: string[]; /** - * An array of url strings to be blocked. + * An array of URL strings to be blocked. */ blockedURLs: string[]; @@ -55063,7 +58288,7 @@ declare namespace Titanium { disableContextMenu: boolean; /** - * Enable adding javascript interfaces internally to webview prior to JELLY_BEAN_MR1 (Android 4.2) + * Enable adding JavaScript interfaces internally to webview prior to JELLY_BEAN_MR1 (Android 4.2) */ enableJavascriptInterface: boolean; @@ -55075,11 +58300,16 @@ declare namespace Titanium { /** * Lets the webview handle platform supported urls * @deprecated This property in no more supported in Titanium SDK 8.0.0+. Use property - * in conjuction with . See the example section + * in conjunction with . See the example section * "Usage of allowedURLSchemes and handleurl in iOS". */ handlePlatformUrl: boolean; + /** + * A Boolean value indicating whether to hide the keyboard accessory bar. + */ + hideKeyboardAccessoryView: boolean; + /** * Hides activity indicator when loading remote URL. */ @@ -55100,6 +58330,11 @@ declare namespace Titanium { */ keyboardDisplayRequiresUserAction: boolean; + /** + * A value indicating the render mode of the WebView + */ + layerType: number; + /** * Enables using light touches to make a selection and activate mouseovers. */ @@ -55115,6 +58350,11 @@ declare namespace Titanium { */ mixedContentMode: boolean; + /** + * If set to `false` it will prevent the WebView from opening new windows/tabs. + */ + multipleWindows: boolean; + /** * Callback function called when there is a request for the application to create a new window * to host new content. @@ -55151,6 +58391,11 @@ declare namespace Titanium { */ scalesPageToFit: boolean; + /** + * Enable or disable horizontal/vertical scrollbars in a WebView. + */ + scrollbars: number; + /** * Controls whether the scroll-to-top gesture is effective. */ @@ -55243,7 +58488,15 @@ declare namespace Titanium { /** * Create a PDF document representation from the web page currently displayed in the WebView. */ - createPDF(callback: (param0: DataCreationResult) => void): void; + createPDF( + pageWidth: number, + pageHeight: number, + pageSize: number, + showMenu: boolean, + firstPageOnly: boolean, + success: (param0: DataCreationResultAndroid) => void, + callback: (param0: DataCreationResult) => void, + ): void; /** * Create WebKit web archive data representing the current web content of the WebView. @@ -55362,12 +58615,12 @@ declare namespace Titanium { /** * Add native properties for observing for change. */ - startListeningToProperties(propertyList: readonly string[]): void; + startListeningToProperties(propertyList: ReadonlyArray): void; /** * Remove native properties from observing. */ - stopListeningToProperties(propertyList: readonly string[]): void; + stopListeningToProperties(propertyList: ReadonlyArray): void; /** * Stops loading a currently loading page. @@ -55576,6 +58829,15 @@ declare namespace Titanium { */ interface Window_postlayout_Event extends WindowBaseEvent { } + /** + * Fired when the device detects a two finger rotation. + */ + interface Window_rotate_Event extends WindowBaseEvent { + /** + * Rotation in degrees. + */ + rotate: number; + } /** * Fired when the device detects a single tap against the view. */ @@ -55985,6 +59247,8 @@ declare namespace Titanium { postlayout: Window_postlayout_Event; + rotate: Window_rotate_Event; + singletap: Window_singletap_Event; swipe: Window_swipe_Event; @@ -56190,6 +59454,11 @@ declare namespace Titanium { */ modal: boolean; + /** + * The color of the navigation bar (bottom bar) for this window. + */ + navBarColor: number; + /** * Hides the navigation bar (`true`) or shows the navigation bar (`false`). */ @@ -56254,10 +59523,15 @@ declare namespace Titanium { /** * Boolean value to enable split action bar. - * @deprecated Deprecated in AppCompat theme. The same behaviour can be achived by using Toolbar. + * @deprecated Deprecated in AppCompat theme. The same behaviour can be achieved by using Toolbar. */ splitActionBar: boolean; + /** + * The color of the status bar (top bar) for this window. + */ + statusBarColor: number; + /** * The status bar style associated with this window. */ @@ -56339,6 +59613,11 @@ declare namespace Titanium { */ translucent: boolean; + /** + * Additional UI flags to set on the Activity Window. + */ + uiFlags: number; + /** * Additional flags to set on the Activity Window. */ @@ -56351,7 +59630,7 @@ declare namespace Titanium { /** * Determines whether a window's soft input area (ie software keyboard) is visible - * as it receives focus and how the window behaves in order to accomodate it while keeping its + * as it receives focus and how the window behaves in order to accommodate it while keeping its * contents in view. */ windowSoftInputMode: number; @@ -56396,8 +59675,9 @@ declare namespace Titanium { /** * Hides the tab bar. Must be called before opening the window. + * @deprecated Deprecated in favor of property. */ - hideTabBar(): void; + hideTabBar: never; /** * Makes the bottom toolbar invisible. @@ -56435,13 +59715,19 @@ declare namespace Titanium { /** * Sets the array of items to show in the window's toolbar. */ - setToolbar(items: readonly any[], params?: windowToolbarParam): void; + setToolbar(items: ReadonlyArray, params?: windowToolbarParam): void; /** * Makes the navigation bar visible. */ showNavBar(options?: AnimatedOptions): void; + /** + * Shows the tab bar. Must be called before opening the window. + * @deprecated Deprecated in favor of property. + */ + showTabBar: never; + /** * Makes the bottom toolbar visible. */ @@ -56509,6 +59795,13 @@ declare namespace Titanium { */ static createBlurView(parameters?: Dictionary): Titanium.UI.iOS.BlurView; + /** + * Creates a button configuration object for customizing button appearance. + */ + static createButtonConfiguration( + parameters: Dictionary, + ): Titanium.UI.iOS.ButtonConfiguration; + /** * Creates and returns an instance of . */ @@ -56851,7 +60144,7 @@ declare namespace Titanium { } /** * An interface extending with a set of attributes and methods for accessing character data in the DOM. - * Implements the [DOM Level 2 API](https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-FF21A306) on Android and iOS. For reasons of compatibility with the javascript engine, text is represented by UTF-8 instead of UTF-16 on Android and iOS. + * Implements the [DOM Level 2 API](https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-FF21A306) on Android and iOS. For reasons of compatibility with the JavaScript engine, text is represented by UTF-8 instead of UTF-16 on Android and iOS. */ class CharacterData extends Titanium.XML.Node { /** @@ -57306,12 +60599,12 @@ declare namespace Titanium { removeEventListener(name: string, callback: (param0: Titanium.Event) => void): void; /** - * Removes a node from the map specified by name. When this map contains attributes attached to an element, if the removed attribtue is known to have a default, it is replaced with that value. + * Removes a node from the map specified by name. When this map contains attributes attached to an element, if the removed attribute is known to have a default, it is replaced with that value. */ removeNamedItem(name: string): Titanium.XML.Node; /** - * Removes a node from the map specified by local name and namespace URI. When this map contains attributes attached to an element, if the removed attribtue is known to have a default, it is replaced with that value. Returns the node removed from the map, or `null` if there is no corresponding node. + * Removes a node from the map specified by local name and namespace URI. When this map contains attributes attached to an element, if the removed attribute is known to have a default, it is replaced with that value. Returns the node removed from the map, or `null` if there is no corresponding node. */ removeNamedItemNS(namespaceURI: string, localName: string): Titanium.XML.Node; @@ -57578,7 +60871,7 @@ declare namespace Titanium { */ class ProcessingInstruction extends Titanium.Proxy { /** - * Retrieve the content of this processing instruction. This from the first non white space character after the target to the character immediatly preceding the ?>. When setting a processing instruction, a DOMException may be thrown on an invalid instruction. + * Retrieve the content of this processing instruction. This from the first non white space character after the target to the character immediately preceding the ?>. When setting a processing instruction, a DOMException may be thrown on an invalid instruction. */ data: string; @@ -57949,7 +61242,7 @@ declare namespace Titanium { */ static registerBroadcastReceiver( broadcastReceiver: Titanium.Android.BroadcastReceiver, - actions: readonly string[], + actions: ReadonlyArray, ): void; /** @@ -58027,23 +61320,28 @@ declare namespace Titanium { */ state: boolean; } + /** + * Fired after the user takes a screenshot, e.g. by pressing both the home and lock screen buttons. + */ + interface App_screenshotcaptured_Event extends AppBaseEvent { + } /** * Fired when an uncaught JavaScript exception occurs. */ interface App_uncaughtException_Event extends AppBaseEvent { /** - * The column offset on the line where the error occured. + * The column offset on the line where the error occurred. */ column: number; /** - * The java stack trace of the exception. (Deprecated since 9.0.0. Use `nativeStack` instead.) + * The Java stack trace of the exception. (Deprecated since 9.0.0. Use `nativeStack` instead.) * @deprecated Use `nativeStack` property for cross-platform parity. */ javaStack: string; /** - * The javascript stack trace of the exception. (Deprecated since 9.0.0. Use `stack` instead.) + * The JavaScript stack trace of the exception. (Deprecated since 9.0.0. Use `stack` instead.) * @deprecated Use `stack` property for cross-platform parity. */ javascriptStack: string; @@ -58090,7 +61388,7 @@ declare namespace Titanium { sourceURL: string; /** - * The javascript stack trace of the exception. + * The JavaScript stack trace of the exception. */ stack: string; @@ -58171,6 +61469,8 @@ declare namespace Titanium { resumed: App_resumed_Event; + screenshotcaptured: App_screenshotcaptured_Event; + shortcutitemclick: App_shortcutitemclick_Event; significanttimechange: App_significanttimechange_Event; @@ -58212,7 +61512,7 @@ declare namespace Titanium { static readonly copyright: string; /** - * A reference to the currnet background service running when the application is placed in the background. + * A reference to the current background service running when the application is placed in the background. */ static readonly currentService: Titanium.App.iOS.BackgroundService; @@ -58297,7 +61597,7 @@ declare namespace Titanium { static readonly sessionId: string; /** - * Indicates whether or not the user interaction shoud be tracked. + * Indicates whether or not the user interaction should be tracked. */ static trackUserInteraction: boolean; @@ -58394,6 +61694,11 @@ declare namespace Titanium { */ readonly nativePath: string; + /** + * EXIF rotation of the image if available. Can be `undefined` if no orientation was found. + */ + readonly rotation: number; + /** * Size of the blob in pixels (for image blobs) or bytes (for all other blobs). */ @@ -59020,7 +62325,7 @@ declare namespace Titanium { /** * Commits all pending changes to the underlying contacts database. */ - static save(contacts: readonly Titanium.Contacts.Person[]): void; + static save(contacts: ReadonlyArray): void; /** * Displays a picker that allows a person to be selected. @@ -59218,7 +62523,7 @@ declare namespace Titanium { /** * Returns a `File` object representing the file identified by the path arguments. */ - static getFile(path: readonly string[]): Titanium.Filesystem.File; + static getFile(path: ReadonlyArray): Titanium.Filesystem.File; /** * Returns `true` if the app has storage permissions. @@ -59654,11 +62959,16 @@ declare namespace Titanium { * Removes the specified callback as an event listener for the named event. */ static removeEventListener(name: string, callback: (param0: Titanium.Event) => void): void; + + /** + * Stops the gesture listener. + */ + static stopListener(): void; } /** * IOStream is the interface that all stream types implement. */ - // eslint-disable-next-line @typescript-eslint/naming-convention + // tslint:disable-next-line:interface-name class IOStream extends Titanium.Proxy { /** * Adds the specified callback as an event listener for the named event. @@ -59742,17 +63052,17 @@ declare namespace Titanium { static bubbleParent: boolean; /** - * Country of the current system locale, as an ISO 2-letter code. + * Country of the app's current locale, as an ISO 2-letter code. */ static readonly currentCountry: string; /** - * Language of the current system locale, as an ISO 2-letter code. + * Language of the app's current locale, as an ISO 2-letter code. */ static readonly currentLanguage: string; /** - * Current system locale, as a combination of ISO 2-letter language and country codes. + * Current app locale, as a combination of ISO 2-letter language and country codes. */ static readonly currentLocale: string; @@ -59916,6 +63226,11 @@ declare namespace Titanium { */ static readonly appMusicPlayer: Titanium.Media.MusicPlayer; + /** + * Aspect ratio of the image. + */ + static readonly aspectRatio: number; + /** * Returns `true` if the device is playing audio. */ @@ -59966,6 +63281,14 @@ declare namespace Titanium { */ static cameraFlashMode: number; + /** + * Returns an object of possible `targetImageWidth` and `targetImageHeight` values. The output + * contains a `cameraType` (front or back) and object of width/height values. You have to set + * `targetImageWidth` and `targetImageHeight` if you want to change the camera image output size. + * Note: depending on your phone and camera the values won't be used or can be different. + */ + static readonly cameraOutputSizes: any; + /** * `true` if the device has a recording input device available. */ @@ -59986,21 +63309,56 @@ declare namespace Titanium { */ static lifecycleContainer: Titanium.UI.Window | Titanium.UI.TabGroup; + /** + * Returns the max zoom level of the camera. + */ + static readonly maxZoomLevel: number; + + /** + * Returns the min zoom level of the camera. + */ + static readonly minZoomLevel: number; + /** * Current microphone level peak power in dB or -1 if microphone monitoring is disabled. */ static readonly peakMicrophonePower: number; + /** + * Scaling mode of the preview image. + */ + static readonly scalingMode: number; + /** * An instance of representing the system-wide music player. */ static readonly systemMusicPlayer: Titanium.Media.MusicPlayer; + /** + * Enable or disable the camera torch. + */ + static torch: boolean; + + /** + * To use the new CameraX classes for "camera with overlay" set `useCameraX` to `true` + */ + static readonly useCameraX: boolean; + + /** + * Vertical align of the preview image for aspect fit. + */ + static readonly verticalAlign: number; + /** * Current volume of the playback device. */ static readonly volume: number; + /** + * Sets the zoom level of the camera. + */ + static zoomLevel: number; + /** * Adds the specified callback as an event listener for the named event. */ @@ -60111,6 +63469,11 @@ declare namespace Titanium { */ static openPhotoGallery(options: PhotoGalleryOptionsType): void; + /** + * Pauses video capturing. + */ + static pauseVideoCapture(): void; + /** * Displays the given image. */ @@ -60160,6 +63523,11 @@ declare namespace Titanium { callback?: (param0: RequestPhotoGalleryAccessResult) => void, ): Promise; + /** + * Resumes video capturing. + */ + static resumeVideoCapture(): void; + /** * Saves media to the device's photo gallery / camera roll. */ @@ -60214,7 +63582,7 @@ declare namespace Titanium { /** * Makes the device vibrate. */ - static vibrate(pattern?: readonly number[]): void; + static vibrate(pattern?: ReadonlyArray): void; } /** * Base type for all Titanium modules. @@ -60637,7 +64005,7 @@ declare namespace Titanium { static readonly netmask: string; /** - * Short name of the system's Operating System. Returns `android` for the Android platfrom, + * Short name of the system's Operating System. Returns `android` for the Android platform, * `iphone` for the iPhone or iPod Touch, `ipad` for the iPad, `windowsphone` for Windows Phone, and `windowsstore` for Windows Store * platform. */ @@ -60717,7 +64085,7 @@ declare namespace Titanium { static canOpenURL(url: string): boolean; /** - * Returns an array of basic cpu information for all logical processors + * Returns an array of basic CPU information for all logical processors */ static cpus(): CPU[]; @@ -60888,8 +64256,7 @@ declare namespace Titanium { sourceStream: Titanium.IOStream, buffer?: Titanium.Buffer, resultsCallback?: (param0: ReadCallbackArgs) => void, - // eslint-disable-next-line @typescript-eslint/no-invalid-void-type - ): Titanium.Buffer | void; + ): Titanium.Buffer | undefined; /** * Removes the specified callback as an event listener for the named event. @@ -60947,6 +64314,11 @@ declare namespace Titanium { */ static readonly apiName: string; + /** + * Returns a list of font families that are provided by the system. + */ + static readonly availableSystemFontFamilies: string[]; + /** * Sets the background color of the master view (when there are no windows or other top-level * controls displayed). @@ -60964,6 +64336,11 @@ declare namespace Titanium { */ static bubbleParent: boolean; + /** + * Returns the position and shape of the Android notch. Read more about the notch [here](https://developer.android.com/develop/ui/views/layout/display-cutout). + */ + static readonly cutoutSize: CutoutSize; + /** * The Window or TabGroup whose Activity lifecycle should be triggered on the proxy. */ @@ -60980,6 +64357,11 @@ declare namespace Titanium { */ static semanticColorType: string; + /** + * The total height of the status bar including safe area padding. + */ + static readonly statusBarHeight: number; + /** * Sets the global tint color of the application. It is inherited by the child views and can be * overwritten by them using the `tintColor` property. @@ -61014,18 +64396,6 @@ declare namespace Titanium { */ static convertUnits(convertFromValue: string, convertToUnits: number): number; - /** - * Creates and returns an instance of . - * @deprecated Use [Titanium.UI.createMatrix2D](Titanium.UI.createMatrix2D) instead. - */ - static create2DMatrix(parameters?: Matrix2DCreationDict): Titanium.UI.Matrix2D; - - /** - * Creates and returns an instance of . - * @deprecated Use [Titanium.UI.createMatrix3D](Titanium.UI.createMatrix3D) instead. - */ - static create3DMatrix(parameters?: Matrix3DCreationDict): Titanium.UI.Matrix3D; - /** * Creates and returns an instance of . */ @@ -61363,7 +64733,7 @@ declare namespace Titanium { source: Titanium.WatchSession; } /** - * App received message from apple watch in foreground. Will be called on startup if the + * App received message from Apple Watch in foreground. Will be called on startup if the * incoming message caused the receiver to launch. */ interface WatchSession_receivemessage_Event extends WatchSessionBaseEvent { @@ -61373,7 +64743,7 @@ declare namespace Titanium { message: any; } /** - * App received app context from apple watch. Will be called on startup if an applicationContext is available. + * App received app context from Apple Watch. Will be called on startup if an applicationContext is available. */ interface WatchSession_receiveapplicationcontext_Event extends WatchSessionBaseEvent { /** @@ -61382,7 +64752,7 @@ declare namespace Titanium { applicationContext: any; } /** - * App received user info from apple watch in background. Will be called on startup if the user info finished + * App received user info from Apple Watch in background. Will be called on startup if the user info finished * transferring when the receiver was not running. */ interface WatchSession_receiveuserinfo_Event extends WatchSessionBaseEvent { @@ -61392,7 +64762,7 @@ declare namespace Titanium { userInfo: any; } /** - * App received file from apple watch in background. + * App received file from Apple Watch in background. */ interface WatchSession_receivefile_Event extends WatchSessionBaseEvent { /** @@ -61431,28 +64801,28 @@ declare namespace Titanium { activationState: number; /** - * If the apple watch is currently activated. Only available on iOS 9.3 + * If the Apple Watch is currently activated. Only available on iOS 9.3 * and later. See for more infos. */ isActivated: boolean; /** - * If the complication is enabled in the apple watch. + * If the complication is enabled in the Apple Watch. */ isComplicationEnabled: boolean; /** - * If the device is paired with the apple watch. + * If the device is paired with the Apple Watch. */ isPaired: boolean; /** - * If apple watch is currently reachable. + * If the Apple Watch is currently reachable. */ isReachable: boolean; /** - * If the watch app is installed in the apple watch. + * If the watch app is installed in the Apple Watch. */ isWatchAppInstalled: boolean; } @@ -61467,28 +64837,28 @@ declare namespace Titanium { activationState: number; /** - * If the apple watch is currently activated. Only available on iOS 9.3 + * If the Apple Watch is currently activated. Only available on iOS 9.3 * and later. See for more infos. */ isActivated: boolean; /** - * If the complication is enabled in the apple watch. + * If the complication is enabled in the Apple Watch. */ isComplicationEnabled: boolean; /** - * If the device is paired with the apple watch. + * If the device is paired with the Apple Watch. */ isPaired: boolean; /** - * If apple watch is currently reachable. + * If the Apple Watch is currently reachable. */ isReachable: boolean; /** - * If the watch app is installed in the apple watch. + * If the watch app is installed in the Apple Watch. */ isWatchAppInstalled: boolean; } @@ -61558,28 +64928,28 @@ declare namespace Titanium { activationState: number; /** - * If the apple watch is currently activated. Only available on iOS 9.3 + * If the Apple Watch is currently activated. Only available on iOS 9.3 * and later. See for more infos. */ isActivated: boolean; /** - * If the complication is enabled in the apple watch. + * If the complication is enabled in the Apple Watch. */ isComplicationEnabled: boolean; /** - * If the device is paired with the apple watch. + * If the device is paired with the Apple Watch. */ isPaired: boolean; /** - * If apple watch is currently reachable. + * If the Apple Watch is currently reachable. */ isReachable: boolean; /** - * If the watch app is installed in the apple watch. + * If the watch app is installed in the Apple Watch. */ isWatchAppInstalled: boolean; } @@ -61595,39 +64965,39 @@ declare namespace Titanium { activationState: number; /** - * If the apple watch has currently content pending. Only available on iOS 10.0 + * If the Apple Watch has currently content pending. Only available on iOS 10.0 * and later. See for more infos. */ hasContentPending: boolean; /** - * If the apple watch is currently activated. Only available on iOS 9.3 + * If the Apple Watch is currently activated. Only available on iOS 9.3 * and later. See for more infos. */ isActivated: boolean; /** - * If the complication is enabled in the apple watch. + * If the complication is enabled in the Apple Watch. */ isComplicationEnabled: boolean; /** - * If the device is paired with the apple watch. + * If the device is paired with the Apple Watch. */ isPaired: boolean; /** - * If apple watch is currently reachable. + * If the Apple Watch is currently reachable. */ isReachable: boolean; /** - * If the watch app is installed in the apple watch. + * If the watch app is installed in the Apple Watch. */ isWatchAppInstalled: boolean; /** - * If the apple watch has complication userInfo transfers left. Only available on iOS 10.0 + * If the Apple Watch has complication userInfo transfers left. Only available on iOS 10.0 * and later. See for more infos. */ remainingComplicationUserInfoTransfers: boolean; @@ -61645,28 +65015,28 @@ declare namespace Titanium { activationState: number; /** - * If the apple watch is currently activated. Only available on iOS 9.3 + * If the Apple Watch is currently activated. Only available on iOS 9.3 * and later. See for more infos. */ isActivated: boolean; /** - * If the complication is enabled in the apple watch. + * If the complication is enabled in the Apple Watch. */ isComplicationEnabled: boolean; /** - * If the device is paired with the apple watch. + * If the device is paired with the Apple Watch. */ isPaired: boolean; /** - * If apple watch is currently reachable. + * If the Apple Watch is currently reachable. */ isReachable: boolean; /** - * If the watch app is installed in the apple watch. + * If the watch app is installed in the Apple Watch. */ isWatchAppInstalled: boolean; } @@ -61797,17 +65167,17 @@ declare namespace Titanium { static applyProperties(props: any): void; /** - * Cancels all incomplete file transfers to the apple watch. + * Cancels all incomplete file transfers to the Apple Watch. */ static cancelAllFileTransfers(): void; /** - * Cancels all incomplete transfers to the apple watch. + * Cancels all incomplete transfers to the Apple Watch. */ static cancelAllTransfers(): void; /** - * Cancels all incomplete user info and complication transfers to the apple watch. + * Cancels all incomplete user info and complication transfers to the Apple Watch. */ static cancelAllUserInfoTransfers(): void; @@ -61835,7 +65205,7 @@ declare namespace Titanium { static removeEventListener(name: string, callback: (param0: Titanium.Event) => void): void; /** - * Sends a message to the apple watch. + * Sends a message to the Apple Watch. */ static sendMessage(message: any, reply?: (param0: MessageReply) => void): void; @@ -61845,17 +65215,17 @@ declare namespace Titanium { static transferCurrentComplication(params: any): void; /** - * Transfers a file to the apple watch. + * Transfers a file to the Apple Watch. */ static transferFile(params: any): void; /** - * Transfers an user info to the apple watch. + * Transfers an user info to the Apple Watch. */ static transferUserInfo(params: any): void; /** - * Sends an app context update to the apple watch. + * Sends an app context update to the Apple Watch. */ static updateApplicationContext(params: any): void; } @@ -61908,11 +65278,15 @@ declare namespace Titanium { */ static serializeToString(node: Titanium.XML.Node): string; } +} +/** + * Dictionary object of parameters. + */ +interface UserInfoDictionary { /** - * The top level Yahoo module. The Yahoo module is used for accessing Yahoo related API services. - * @deprecated Use the standalone [Ti.Yahoo](https://github.com/appcelerator-modules/ti.yahoo) module instead. + * Show notification if app is in foreground */ - const Yahoo: never; + showInForeground?: number; } /** * Provide at least the property `identifier` and `url` property to identify a local @@ -62018,7 +65392,7 @@ interface UserNotificationDictionary { /** * Custom data object. */ - userInfo?: any; + userInfo?: UserInfoDictionary; } /** * Dictionary object of parameters used to register the application with local notifications using @@ -62028,7 +65402,7 @@ interface UserNotificationDictionary { */ interface UserNotificationSettings { /** - * Set of categories of user notification actions required by the applicaiton to use. + * Set of categories of user notification actions required by the application to use. */ categories?: Titanium.App.iOS.UserNotificationCategory[]; @@ -62061,7 +65435,7 @@ interface UserScriptParams { * Pass an object with the following key-value pairs: * * `view` (Titanium.UI.View): View to insert * * `position` (Number): Position in the [children](Titanium.UI.View.children) array of - * the view elment to replace. + * the view element to replace. */ interface ViewPositionOptions { /** @@ -62173,31 +65547,6 @@ interface WriteStreamCallbackArgs extends ErrorResponse { */ toStream?: Titanium.IOStream; } -/** - * Properties passed to a yql callback to report a success or failure. - */ -interface YQLResponse extends ErrorResponse { - /** - * Error code. Returns 0 if `success` is `true`. - */ - code?: number; - - /** - * The data payload received from the YQL. - */ - data?: any; - - /** - * Error message, if any returned. - */ - error?: string; - - /** - * Error message, if any returned. Use `error` instead - * @deprecated - */ - message?: string; -} /** * Dictionary of options for the method. */ @@ -62243,6 +65592,20 @@ interface daysOfTheWeekDictionary { */ week?: number; } +/** + * Dictionary of options for the method. + */ +interface disableTabOptions { + /** + * Determines whether to use an animated effect to hide/show the navigation bar. + */ + animated?: boolean; + + /** + * Show or hide the navigation bar. + */ + enabled?: boolean; +} /** * Dictionary of options for the method. */ diff --git a/types/titanium/package.json b/types/titanium/package.json index dd671ffdf84cfb..4bc5482c3ed49b 100644 --- a/types/titanium/package.json +++ b/types/titanium/package.json @@ -1,31 +1,23 @@ { "private": true, "name": "@types/titanium", - "version": "12.0.9999", + "version": "13.3.9999", "nonNpm": "conflict", "nonNpmDescription": "Titanium", "projects": [ - "https://github.com/appcelerator/titanium_mobile" + "https://github.com/tidev/titanium-sdk" ], "devDependencies": { "@types/titanium": "workspace:." }, "owners": [ { - "name": "Axway Appcelerator", - "githubUsername": "appcelerator" + "name": "TiDev, Inc.", + "githubUsername": "tidev" }, { "name": "Jan Vennemann", "githubUsername": "janvennemann" - }, - { - "name": "Sergey Volkov", - "githubUsername": "drauggres" - }, - { - "name": "Mathias Lorenzen", - "githubUsername": "ffMathy" } ] } diff --git a/types/titanium/titanium-tests.ts b/types/titanium/titanium-tests.ts index 54ee6d94b62e33..7b12d31afd340a 100644 --- a/types/titanium/titanium-tests.ts +++ b/types/titanium/titanium-tests.ts @@ -8,7 +8,7 @@ function test_window() { window.backgroundColor = "blue"; window.opacity = 0.92; - const matrix = Ti.UI.create2DMatrix().scale(1.1, 1); + const matrix = Ti.UI.createMatrix2D().scale(1.1, 1); window.transform = matrix; let label: Titanium.UI.Label;