Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion apps/test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
"vite-plugin-static-copy": "catalog:"
},
"dependencies": {
"@bentley/icons-generic": "catalog:",
"@bentley/icons-generic-webfont": "catalog:",
"@itwin/appui-abstract": "catalog:",
"@itwin/appui-react": "workspace:*",
Expand Down
1 change: 0 additions & 1 deletion apps/test-app/src/frontend/appui/icons/draw.svg

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion apps/test-app/src/frontend/appui/icons/filter.svg

This file was deleted.

6 changes: 0 additions & 6 deletions apps/test-app/src/frontend/appui/icons/rotate.svg

This file was deleted.

1 change: 0 additions & 1 deletion apps/test-providers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"typescript": "~5.6.3"
},
"dependencies": {
"@bentley/icons-generic": "catalog:",
"@itwin/appui-abstract": "catalog:",
"@itwin/appui-react": "workspace:*",
"@itwin/components-react": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,6 @@
"NewYork": "New York"
}
},
"uiItemsProvidersTest-GenericLocateTool": {
"keyin": "state generic tool",
"description": "Generic Tool from Provider",
"flyover": "Generic Tool",
"Prompts": {
"identifyElement": "Identify Element",
"identifyPosition": "Identify Position"
}
},
"SetWidgetStateTool": {
"keyin": "widget setstate"
},
Expand Down
1 change: 0 additions & 1 deletion apps/test-providers/src/appui-test-providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
export * from "./tools/ContentLayoutTools.js";
export * from "./tools/GenericLocateTool.js";
export * from "./tools/InspectUiItemInfoTool.js";
export * from "./tools/OpenAbstractModalDialogTool.js";
export * from "./tools/OpenCustomDialogTool.js";
Expand Down
27 changes: 19 additions & 8 deletions apps/test-providers/src/tools/ContentLayoutTools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ import {
useConditionalValue,
} from "@itwin/appui-react";
import { IModelConnection, ScreenViewport, Tool } from "@itwin/core-frontend";
import { SvgWindow, SvgWindowSplitVertical } from "@itwin/itwinui-icons-react";

import layoutRestoreIconSvg from "@bentley/icons-generic/icons/download.svg";
import layoutSaveIconSvg from "@bentley/icons-generic/icons/upload.svg";
import { ToolUtilities } from "@itwin/imodel-components-react";
import {
SvgDownload,
SvgUpload,
SvgWindow,
SvgWindowSplitVertical,
} from "@itwin/itwinui-icons-react";
import { ViewportContent } from "../ui/ViewportContent.js";

function getIModelSpecificKey(
Expand Down Expand Up @@ -64,9 +67,8 @@ export async function getSavedViewLayoutProps(
return savedViewLayoutProps;
}

export class SaveContentLayoutTool extends Tool {
class SaveContentLayoutToolBase extends Tool {
public static override toolId = "SaveContentLayoutTool";
public static override iconSpec = layoutSaveIconSvg;
public static override get minArgs() {
return 0;
}
Expand Down Expand Up @@ -124,9 +126,13 @@ export class SaveContentLayoutTool extends Tool {
}
}

export class RestoreSavedContentLayoutTool extends Tool {
export const SaveContentLayoutTool = ToolUtilities.defineIcon(
SaveContentLayoutToolBase,
<SvgUpload />
);

class RestoreSavedContentLayoutToolBase extends Tool {
public static override toolId = "RestoreSavedContentLayoutTool";
public static override iconSpec = layoutRestoreIconSvg;
public static override get minArgs() {
return 0;
}
Expand Down Expand Up @@ -182,6 +188,11 @@ export class RestoreSavedContentLayoutTool extends Tool {
}
}

export const RestoreSavedContentLayoutTool = ToolUtilities.defineIcon(
RestoreSavedContentLayoutToolBase,
<SvgDownload />
);

function SplitWindowIcon() {
const split = useConditionalValue(
() =>
Expand Down
16 changes: 0 additions & 16 deletions apps/test-providers/src/tools/DynamicTool.svg

This file was deleted.

177 changes: 0 additions & 177 deletions apps/test-providers/src/tools/GenericLocateTool.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,24 @@
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
* @module Tools
*/

import * as React from "react";
import {
BeButtonEvent,
EventHandled,
IModelApp,
PrimitiveTool,
} from "@itwin/core-frontend";
import inspectIconSvg from "@bentley/icons-generic/icons/search.svg";
import { ToolUtilities } from "@itwin/imodel-components-react";
import { SvgSearch } from "@itwin/itwinui-icons-react";

export class InspectUiItemInfoTool extends PrimitiveTool {
class InspectUiItemInfoToolBase extends PrimitiveTool {
private _timerId: number | undefined;
private _currentX = 0;
private _currentY = 0;
private _lastElement: HTMLElement | null = null;

private static _counter = 0;
public static override toolId = "InspectUiItemInfoTool";
public static override iconSpec = inspectIconSvg;

public static override get minArgs() {
return 0;
Expand Down Expand Up @@ -153,3 +150,8 @@ export class InspectUiItemInfoTool extends PrimitiveTool {
IModelApp.notifications.outputPrompt("click over UI item");
}
}

export const InspectUiItemInfoTool = ToolUtilities.defineIcon(
InspectUiItemInfoToolBase,
<SvgSearch />
);
13 changes: 9 additions & 4 deletions apps/test-providers/src/tools/OpenCustomDialogTool.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@
*/

import * as React from "react";
import { UiFramework } from "@itwin/appui-react";
import { Tool } from "@itwin/core-frontend";
import { ToolUtilities } from "@itwin/imodel-components-react";
import { SvgRefresh } from "@itwin/itwinui-icons-react";
import { SampleModalDialog } from "../ui/dialogs/SampleModalDialog.js";
import { AppUiTestProviders } from "../AppUiTestProviders.js";
import connectedQuerySvg from "../ui/icons/connected-query.svg";
import { UiFramework } from "@itwin/appui-react";

/**
* Immediate tool that will open an example modal dialog.The tool is created and register to allow the user
* to activate the tool via the key-in palette using the tools keyin property (which must be unique across
* all registered tools).
*/
export class OpenCustomDialogTool extends Tool {
class OpenCustomDialogToolBase extends Tool {
public static override toolId = "appuiTestProviders-OpenCustomDialogTool";
public static override iconSpec = connectedQuerySvg;

public static override get minArgs() {
return 0;
Expand All @@ -47,3 +47,8 @@ export class OpenCustomDialogTool extends Tool {
return "open custom dialog";
}
}

export const OpenCustomDialogTool = ToolUtilities.defineIcon(
OpenCustomDialogToolBase,
<SvgRefresh />
);
Loading
Loading