diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 8d8b006fb6c690..4e60407fecbd90 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4175,11 +4175,9 @@ /types/leaflet.awesome-markers/v0/ @Odrin @sebek64 /types/leaflet.chinatmsproviders/ @TwoKe945 /types/leaflet.featuregroup.subgroup/ @drtomato -/types/leaflet.fullscreen/ @wcomartin @danmana /types/leaflet.gridlayer.googlemutant/ @ernest-rhinozeros /types/leaflet.heat/ @onderceylan /types/leaflet.icon.glyph/ @BePo65 -/types/leaflet.locatecontrol/ @DenisCarriere /types/leaflet.markercluster/ @rimig @nenadfilipovic @YaroslavKormushyn /types/leaflet.markercluster.layersupport/ @AsamK /types/leaflet.pancontrol/ @Brictarus diff --git a/notNeededPackages.json b/notNeededPackages.json index 94b794804ac29d..508636058d2295 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -3793,10 +3793,18 @@ "libraryName": "ldclient-js", "asOfVersion": "1.1.11" }, + "leaflet.fullscreen": { + "libraryName": "leaflet.fullscreen", + "asOfVersion": "5.2.0" + }, "leaflet-geosearch": { "libraryName": "leaflet-geosearch", "asOfVersion": "3.0.0" }, + "leaflet.locatecontrol": { + "libraryName": "leaflet.locatecontrol", + "asOfVersion": "0.85.1" + }, "leaflet-offline": { "libraryName": "leaflet.offline", "asOfVersion": "3.0.0" diff --git a/types/jasmine/package.json b/types/jasmine/package.json index 3f486733af5f96..d0161c4ce29e08 100644 --- a/types/jasmine/package.json +++ b/types/jasmine/package.json @@ -25,10 +25,6 @@ "name": "Boris Breuer", "githubUsername": "Engineer2B" }, - { - "name": "Chris Yungmann", - "githubUsername": "cyungmann" - }, { "name": "Giles Roadnight", "githubUsername": "Roaders" diff --git a/types/jasmine/v2/package.json b/types/jasmine/v2/package.json index bcf7d4466dca76..36908981cbbd9d 100644 --- a/types/jasmine/v2/package.json +++ b/types/jasmine/v2/package.json @@ -33,10 +33,6 @@ "name": "Boris Breuer", "githubUsername": "Engineer2B" }, - { - "name": "Chris Yungmann", - "githubUsername": "cyungmann" - }, { "name": "Yaroslav Admin", "githubUsername": "devoto13" diff --git a/types/jasmine/v3/package.json b/types/jasmine/v3/package.json index 4d43b4ca8c6474..660dc63605eb7a 100644 --- a/types/jasmine/v3/package.json +++ b/types/jasmine/v3/package.json @@ -29,10 +29,6 @@ "name": "Boris Breuer", "githubUsername": "Engineer2B" }, - { - "name": "Chris Yungmann", - "githubUsername": "cyungmann" - }, { "name": "Giles Roadnight", "githubUsername": "Roaders" diff --git a/types/jasmine/v4/package.json b/types/jasmine/v4/package.json index 9adfa00c73bbab..37feb6458b8cdf 100644 --- a/types/jasmine/v4/package.json +++ b/types/jasmine/v4/package.json @@ -29,10 +29,6 @@ "name": "Boris Breuer", "githubUsername": "Engineer2B" }, - { - "name": "Chris Yungmann", - "githubUsername": "cyungmann" - }, { "name": "Giles Roadnight", "githubUsername": "Roaders" diff --git a/types/leaflet-fullscreen/.npmignore b/types/leaflet-fullscreen/.npmignore deleted file mode 100644 index 93e307400a5456..00000000000000 --- a/types/leaflet-fullscreen/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -* -!**/*.d.ts -!**/*.d.cts -!**/*.d.mts -!**/*.d.*.ts diff --git a/types/leaflet-fullscreen/index.d.ts b/types/leaflet-fullscreen/index.d.ts deleted file mode 100644 index 9dbc99b723494f..00000000000000 --- a/types/leaflet-fullscreen/index.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import * as L from "leaflet"; - -declare module "leaflet" { - interface MapOptions { - fullscreenControl?: true | FullscreenControlOptions | undefined; - } - - interface FullscreenControlOptions extends ControlOptions { - pseudoFullscreen?: boolean; - title?: { - "false": string; - "true": string; - }; - } - - interface Map { - isFullscreen: () => boolean; - toggleFullscreen: (options?: FullscreenControlOptions) => void; - } -} diff --git a/types/leaflet-fullscreen/leaflet-fullscreen-tests.ts b/types/leaflet-fullscreen/leaflet-fullscreen-tests.ts deleted file mode 100644 index 751d137085ec5a..00000000000000 --- a/types/leaflet-fullscreen/leaflet-fullscreen-tests.ts +++ /dev/null @@ -1,12 +0,0 @@ -import * as L from "leaflet"; - -const map = L.map("map", { - center: [51.505, -0.09], - zoom: 13, - fullscreenControl: true, -}); - -// $ExpectType boolean -map.isFullscreen(); -map.toggleFullscreen(); -map.toggleFullscreen({ pseudoFullscreen: true }); diff --git a/types/leaflet-fullscreen/package.json b/types/leaflet-fullscreen/package.json deleted file mode 100644 index 2de037294f4561..00000000000000 --- a/types/leaflet-fullscreen/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "private": true, - "name": "@types/leaflet-fullscreen", - "version": "1.0.9999", - "projects": [ - "https://github.com/Leaflet/Leaflet.fullscreen" - ], - "dependencies": { - "@types/leaflet": "^1.9" - }, - "devDependencies": { - "@types/leaflet-fullscreen": "workspace:." - }, - "owners": [ - { - "name": "Denis Carriere", - "githubUsername": "DenisCarriere" - }, - { - "name": "Brian Jubelirer", - "githubUsername": "bjubes" - } - ] -} diff --git a/types/leaflet-fullscreen/tsconfig.json b/types/leaflet-fullscreen/tsconfig.json deleted file mode 100644 index 9c3aeefdeed3fe..00000000000000 --- a/types/leaflet-fullscreen/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "module": "node16", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "leaflet-fullscreen-tests.ts" - ] -} diff --git a/types/leaflet.locatecontrol/.npmignore b/types/leaflet.locatecontrol/.npmignore deleted file mode 100644 index 93e307400a5456..00000000000000 --- a/types/leaflet.locatecontrol/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -* -!**/*.d.ts -!**/*.d.cts -!**/*.d.mts -!**/*.d.*.ts diff --git a/types/leaflet.locatecontrol/index.d.ts b/types/leaflet.locatecontrol/index.d.ts deleted file mode 100644 index 750073513f4624..00000000000000 --- a/types/leaflet.locatecontrol/index.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -import * as L from "leaflet"; - -declare module "leaflet" { - namespace Control { - class Locate extends Control { - constructor(locateOptions?: LocateOptions); - onAdd(map: Map): HTMLElement; - start(): void; - stop(): void; - stopFollowing(): void; - setView(): void; - } - interface LocateOptions extends ControlOptions { - layer?: Layer | undefined; - setView?: boolean | string | undefined; - keepCurrentZoomLevel?: boolean | undefined; - initialZoomLevel?: number | boolean | undefined; - flyTo?: boolean | undefined; - clickBehavior?: any; - returnToPrevBounds?: boolean | undefined; - cacheLocation?: boolean | undefined; - drawCircle?: boolean | undefined; - drawMarker?: boolean | undefined; - showCompass?: boolean | undefined; - markerClass?: any; - compassClass?: any; - circleStyle?: PathOptions | undefined; - markerStyle?: PathOptions | MarkerOptions | undefined; - compassStyle?: PathOptions | undefined; - followCircleStyle?: PathOptions | undefined; - followMarkerStyle?: PathOptions | undefined; - icon?: string | undefined; - iconLoading?: string | undefined; - iconElementTag?: string | undefined; - textElementTag?: string | undefined; - circlePadding?: number[] | undefined; - metric?: boolean | undefined; - createButtonCallback?: - | (( - container: HTMLDivElement, - options: LocateOptions, - ) => { link: HTMLAnchorElement; icon: HTMLElement }) - | undefined; - onLocationError?: ((event: ErrorEvent, control: Locate) => void) | undefined; - onLocationOutsideMapBounds?: ((control: Locate) => void) | undefined; - showPopup?: boolean | undefined; - strings?: StringsOptions | undefined; - locateOptions?: L.LocateOptions | undefined; - } - interface StringsOptions { - title?: string | undefined; - metersUnit?: string | undefined; - feetUnit?: string | undefined; - popup?: string | undefined; - outsideMapBoundsMsg?: string | undefined; - } - } - - namespace control { - /** - * Creates a Leaflet.Locate control - */ - function locate(options?: Control.LocateOptions): Control.Locate; - } -} - -export type LocateOptions = L.Control.LocateOptions; - -// Usage with bundler or esm -// https://github.com/domoritz/leaflet-locatecontrol/blob/b20d77e4184fdfc59ff0037f8d95471a49af6f81/README.md#with-npm -export class LocateControl extends L.Control.Locate {} diff --git a/types/leaflet.locatecontrol/leaflet.locatecontrol-tests.ts b/types/leaflet.locatecontrol/leaflet.locatecontrol-tests.ts deleted file mode 100644 index 53a22dbf8d891a..00000000000000 --- a/types/leaflet.locatecontrol/leaflet.locatecontrol-tests.ts +++ /dev/null @@ -1,52 +0,0 @@ -import * as L from "leaflet"; -import { LocateControl, type LocateOptions } from "leaflet.locatecontrol"; - -const map = L.map("map", { - center: [51.505, -0.09], - zoom: 13, -}); - -// Defaults -L.control.locate().addTo(map); - -// Simple -const lc = L.control.locate({ - position: "topright", - strings: { - title: "Show me where I am, yo!", - }, - initialZoomLevel: 10, - showCompass: false, -}).addTo(map); - -// Locate Options -map.addControl(L.control.locate({ - locateOptions: { - maxZoom: 10, - enableHighAccuracy: true, - }, -})); - -let createButtonCallback: - | ((container: HTMLDivElement, options: L.Control.LocateOptions) => { link: HTMLAnchorElement; icon: HTMLElement }) - | undefined = undefined; -L.control.locate({ - createButtonCallback, -}); - -// Explicit definition of LocateOptions -const options: LocateOptions = { - strings: { title: "Select my location" }, - showPopup: false, - drawMarker: false, - clickBehavior: { - inView: "stop", - outOfView: "setView", - inViewNotFollowing: "setView", - }, -}; - -// Usage with bundler or esm -// https://github.com/domoritz/leaflet-locatecontrol/blob/b20d77e4184fdfc59ff0037f8d95471a49af6f81/README.md#with-npm -const locateControl = new LocateControl(options); -map.addControl(locateControl); diff --git a/types/leaflet.locatecontrol/package.json b/types/leaflet.locatecontrol/package.json deleted file mode 100644 index 7a2cb4f0085684..00000000000000 --- a/types/leaflet.locatecontrol/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "private": true, - "name": "@types/leaflet.locatecontrol", - "version": "0.82.9999", - "projects": [ - "https://github.com/domoritz/leaflet-locatecontrol" - ], - "dependencies": { - "@types/leaflet": "^1.9" - }, - "devDependencies": { - "@types/leaflet.locatecontrol": "workspace:." - }, - "owners": [ - { - "name": "Denis Carriere", - "githubUsername": "DenisCarriere" - } - ] -} diff --git a/types/leaflet.locatecontrol/tsconfig.json b/types/leaflet.locatecontrol/tsconfig.json deleted file mode 100644 index c6e05e86368cd2..00000000000000 --- a/types/leaflet.locatecontrol/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "module": "node16", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "leaflet.locatecontrol-tests.ts" - ] -} diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index b1a20a9e356851..101ebbd7c6f81c 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -21395,6 +21395,10 @@ declare namespace Office { * * - Any code included after the `sendAsync` call isn't guaranteed to run since the add-in completes processing after the `sendAsync` call. * + * - The `sendAsync` method is available for preview in Outlook on Mac starting in Version 16.105 (Build 25121117). + * To test this feature, join the {@link https://techcommunity.microsoft.com/kb/microsoft-365-insider-kb/join-the-microsoft-365-insider-program-on-macos/4401756 | Microsoft 365 Insider program} + * and select the **Beta Channel** option to access Office beta builds. + * * @param options - An object literal that contains the `asyncContext` property. Use the `asyncContext` property to specify any object you want to access in the * callback function. * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`. The `asyncResult` @@ -21430,6 +21434,10 @@ declare namespace Office { * * - Any code included after the `sendAsync` call isn't guaranteed to run since the add-in completes processing after the `sendAsync` call. * + * - The `sendAsync` method is available for preview in Outlook on Mac starting in Version 16.105 (Build 25121117). + * To test this feature, join the {@link https://techcommunity.microsoft.com/kb/microsoft-365-insider-kb/join-the-microsoft-365-insider-program-on-macos/4401756 | Microsoft 365 Insider program} + * and select the **Beta Channel** option to access Office beta builds. + * * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`. The `asyncResult` * parameter is an `Office.AsyncResult` object. */ @@ -24961,16 +24969,15 @@ declare namespace Office { * * The customizable button in the Smart Alerts dialog varies depending on the Outlook client and its version. * - * - In Outlook on the web, new Outlook on Windows, and classic Outlook on Windows starting in Version 2412 (Build 18324.20000), the `cancelLabel` property customizes the text of the **Take Action** button. + * - In Outlook on the web, on Mac (in preview starting in Version 16.105 (Build 25121117)), new Outlook on Windows, and classic Outlook on Windows starting in Version 2412 (Build 18324.20000), the `cancelLabel` property customizes the text of the **Take Action** button. * The **Take Action** button only appears on the Smart Alerts dialog if the `commandId` option is configured in the `event.completed` call. The option must be configured * if you want to customize the text of the dialog button. In this implementation, the **Don't Send** button cancels the item being sent. Its text and functionality can't be customized. * If you previously customized the text of the **Don't Send** button without assigning it a task pane or function command, your custom text won't take effect in the latest Outlook client versions. * If you previously assigned a task pane or function command to the **Don't Send** button, no additional action is needed to implement the **Take Action** button in the latest versions. * The default or customized **Take Action** button will automatically appear the next time a user receives a Smart Alerts dialog. Although no implementation changes are needed, we recommend notifying users of this updated experience. * - * - In earlier supported versions of classic Outlook on Windows (versions prior to Version 2412 (Build 18324.20000) that support - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets#version-support-for-requirement-sets-in-classic-outlook-on-windows | Mailbox requirement set 1.14}), - * and Outlook on Mac, the `cancelLabel` property customizes the text of the **Don't Send** button. The **Don't Send** button cancels the item being sent. + * - In classic Outlook on Windows (prior to Version 2412 (Build 18324.20000) and Outlook on Mac (prior to Version 16.105 (Build 25121117)), + * the `cancelLabel` property customizes the text of the **Don't Send** button. The **Don't Send** button cancels the item being sent. */ cancelLabel?: string; /** @@ -24998,13 +25005,13 @@ declare namespace Office { * - **Unified manifest for Microsoft 365**: The "id" property of the task pane or function command in the "controls" array. * * The button in the Smart Alerts dialog that opens a task pane or runs a function varies depending on the Outlook client and version. - * In Outlook on the web, new Outlook on Windows, and classic Outlook on Windows starting in Version 2412 (Build 18324.20000), the **Take Action** button opens a + * In Outlook on the web, on Mac (in preview starting in Version 16.105 (Build 25121117)), new Outlook on Windows, and classic Outlook on Windows starting in Version 2412 (Build 18324.20000), the **Take Action** button opens a * task pane or runs a function. In this implementation, the **Don't Send** button cancels the item being sent. Its text and functionality can't be customized. * In earlier supported versions of classic Outlook on Windows (versions prior to Version 2412 (Build 18324.20000) that support * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets#version-support-for-requirement-sets-in-classic-outlook-on-windows | Mailbox requirement set 1.14}), * and Outlook on Mac, the **Don't Send** button opens a task pane or runs a function. * - * If you customized the text and functionality of the **Don't Send** button in your Smart Alerts add-in prior to Version 2412 (Build 18324.20000) of classic Outlook on Windows, + * If you've already customized the text and functionality of the **Don't Send** button in your Smart Alerts add-in prior to Version 2412 (Build 18324.20000) of classic Outlook on Windows or prior to Version 16.105 (Build 25121117) of Outlook on Mac, * no additional action is needed to implement the **Take Action** button in the latest supported versions. The default or customized **Take Action** button will automatically appear the next time a user receives a Smart Alerts dialog. * Although no implementation changes are needed, we recommend notifying users of this updated experience. * @@ -25015,6 +25022,10 @@ declare namespace Office { * * When you configure a button in the Smart Alerts dialog to run a function, a button for the function is also added to the ribbon or action bar of the Outlook client. * Use the `contextData` option to distinguish when a user runs the function from the Smart Alerts dialog. + * + * Programming a button in the Smart Alerts dialog to run a function is available for preview in Outlook on Mac starting in Version 16.105 (Build 25121117). + * To test this feature, join the {@link https://techcommunity.microsoft.com/kb/microsoft-365-insider-kb/join-the-microsoft-365-insider-program-on-macos/4401756 | Microsoft 365 Insider program} + * and select the **Beta Channel** option to access Office beta builds. */ commandId?: string; /** @@ -25203,6 +25214,10 @@ declare namespace Office { * `Office.MailboxEnums.MoveSpamItemTo.NoMove`. * * - If you implement a task pane to open after a reported message is processed, when the `event.completed` call occurs, any task pane that's open or pinned is closed. + * + * - The `commandId` option is available for preview in Outlook on Mac starting in Version 16.103 (Build 25101816). To test this option, join the + * {@link https://techcommunity.microsoft.com/kb/microsoft-365-insider-kb/join-the-microsoft-365-insider-program-on-macos/4401756 | Microsoft 365 Insider program} + * and select the **Beta Channel** option to access Office beta builds. */ commandId?: string; /** @@ -25240,6 +25255,10 @@ declare namespace Office { * - To retrieve the value of the `contextData` property, you must call `Office.context.mailbox.item.getInitializationContextAsync` in the JavaScript implementation * of your task pane. If you create a JSON string using `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using * `JSON.parse()` once you retrieve it. + * + * - The `contextData` option is available for preview in Outlook on Mac starting in Version 16.103 (Build 25101816). To test this option, join the + * {@link https://techcommunity.microsoft.com/kb/microsoft-365-insider-kb/join-the-microsoft-365-insider-program-on-macos/4401756 | Microsoft 365 Insider program} + * and select the **Beta Channel** option to access Office beta builds. */ contextData?: any; /** diff --git a/types/selenium-webdriver/lib/webdriver.d.ts b/types/selenium-webdriver/lib/webdriver.d.ts index 555582d28e1eca..0f6ebd7dd12ec4 100644 --- a/types/selenium-webdriver/lib/webdriver.d.ts +++ b/types/selenium-webdriver/lib/webdriver.d.ts @@ -110,6 +110,14 @@ export class Condition { * Defines a condition that will result in a {@link WebElement}. */ export class WebElementCondition extends Condition { + /** + * Private discriminator to prevent structural type compatibility with + * Condition. This ensures TypeScript correctly resolves + * driver.wait() overloads when using elementsLocated() vs elementLocated(). + * @see https://github.com/SeleniumHQ/selenium/issues/14239 + */ + private readonly __isWebElementCondition: true; + /** * @param {string} message A descriptive error message. Should complete the * sentence "Waiting [...]" diff --git a/types/selenium-webdriver/test/index.ts b/types/selenium-webdriver/test/index.ts index eae28e273b993a..225168813d6af2 100644 --- a/types/selenium-webdriver/test/index.ts +++ b/types/selenium-webdriver/test/index.ts @@ -599,6 +599,29 @@ function TestUntilModule() { conditionWebElements = webdriver.until.elementsLocated(webdriver.By.className("class")); } +// Test for https://github.com/SeleniumHQ/selenium/issues/14239 +// driver.wait(until.elementsLocated(...)) should return Promise, not WebElementPromise +async function TestElementsLocatedReturnsArray() { + let driver: webdriver.WebDriver = new webdriver.Builder().withCapabilities(webdriver.Capabilities.chrome()).build(); + + // elementsLocated should return Condition + // driver.wait should correctly resolve this to Promise + const elements: webdriver.WebElement[] = await driver.wait( + webdriver.until.elementsLocated(webdriver.By.css(".foo")), + ); + + // These should compile - elements is an array + const length: number = elements.length; + elements.forEach((el: webdriver.WebElement) => el.click()); + const mapped: string[] = elements.map((el: webdriver.WebElement) => "test"); + + // elementLocated (singular) should still return WebElementPromise + const singleElement: webdriver.WebElement = await driver.wait( + webdriver.until.elementLocated(webdriver.By.css(".foo")), + ); + singleElement.click(); +} + function TestShadowRoot() { let driver: webdriver.WebDriver = new webdriver.Builder().withCapabilities(webdriver.Capabilities.chrome()).build();