@itwin/appui-react 5.1.0 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -1
- package/lib/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/appui-react/UiFramework.js +2 -0
- package/lib/appui-react/UiFramework.js.map +1 -1
- package/lib/appui-react/configurableui/ConfigurableUiContent.d.ts +3 -1
- package/lib/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
- package/lib/appui-react/configurableui/ConfigurableUiContent.js +14 -6
- package/lib/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
- package/lib/appui-react/cursor/CursorInformation.d.ts +7 -0
- package/lib/appui-react/cursor/CursorInformation.d.ts.map +1 -1
- package/lib/appui-react/cursor/CursorInformation.js +13 -0
- package/lib/appui-react/cursor/CursorInformation.js.map +1 -1
- package/lib/appui-react/cursor/cursorpopup/CursorPopup.js +1 -1
- package/lib/appui-react/cursor/cursorpopup/CursorPopup.js.map +1 -1
- package/lib/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts +3 -0
- package/lib/appui-react/cursor/cursorpopup/CursorPopupManager.d.ts.map +1 -1
- package/lib/appui-react/cursor/cursorpopup/CursorPopupManager.js +45 -30
- package/lib/appui-react/cursor/cursorpopup/CursorPopupManager.js.map +1 -1
- package/lib/appui-react/cursor/cursorprompt/CursorPrompt.d.ts +12 -15
- package/lib/appui-react/cursor/cursorprompt/CursorPrompt.d.ts.map +1 -1
- package/lib/appui-react/cursor/cursorprompt/CursorPrompt.js +47 -38
- package/lib/appui-react/cursor/cursorprompt/CursorPrompt.js.map +1 -1
- package/lib/appui-react/layout/StandardLayout.d.ts.map +1 -1
- package/lib/appui-react/layout/StandardLayout.js +5 -1
- package/lib/appui-react/layout/StandardLayout.js.map +1 -1
- package/lib/appui-react/redux/FrameworkState.d.ts +1 -1
- package/lib/appui-react/redux/SessionState.d.ts +2 -2
- package/lib/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts +11 -7
- package/lib/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts.map +1 -1
- package/lib/appui-react/statusfields/toolassistance/ToolAssistanceField.js +22 -4
- package/lib/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
- package/lib/appui-react/theme/ThemeManager.d.ts +1 -1
- package/lib/appui-react/theme/ThemeManager.js +1 -1
- package/lib/appui-react/theme/ThemeManager.js.map +1 -1
- package/lib/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
- package/lib/appui-react/widget-panels/Frontstage.js +2 -0
- package/lib/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/lib/appui-react/widgets/Widget.d.ts +11 -2
- package/lib/appui-react/widgets/Widget.d.ts.map +1 -1
- package/lib/appui-react/widgets/Widget.js.map +1 -1
- package/package.json +11 -12
|
@@ -11,52 +11,61 @@ import { RelativePosition } from "@itwin/appui-abstract";
|
|
|
11
11
|
import { Icon, Timer } from "@itwin/core-react";
|
|
12
12
|
import { Point } from "@itwin/core-react/internal";
|
|
13
13
|
import { Text } from "@itwin/itwinui-react";
|
|
14
|
-
import { CursorInformation } from "../CursorInformation.js";
|
|
14
|
+
import { CursorInformation, useCursorInformationStore, } from "../CursorInformation.js";
|
|
15
15
|
import { CursorPopupManager } from "../cursorpopup/CursorPopupManager.js";
|
|
16
16
|
/** @internal */
|
|
17
17
|
export class CursorPrompt {
|
|
18
|
-
constructor(
|
|
19
|
-
this._relativePosition = RelativePosition.BottomRight;
|
|
20
|
-
this._offset = new Point(20, 20);
|
|
18
|
+
constructor() {
|
|
21
19
|
this._popupId = "cursor-prompt";
|
|
22
|
-
this._startCursorPopup = (promptElement) => {
|
|
23
|
-
CursorPopupManager.open(this._popupId, promptElement, CursorInformation.cursorPosition, this._offset, this._relativePosition, 0, { shadow: true });
|
|
24
|
-
if (!CursorInformation.onCursorUpdatedEvent.has(this._handleCursorUpdated))
|
|
25
|
-
CursorInformation.onCursorUpdatedEvent.addListener(this._handleCursorUpdated);
|
|
26
|
-
};
|
|
27
|
-
this._endCursorPopup = (fadeOut) => {
|
|
28
|
-
CursorPopupManager.close(this._popupId, false, fadeOut);
|
|
29
|
-
CursorInformation.onCursorUpdatedEvent.removeListener(this._handleCursorUpdated);
|
|
30
|
-
};
|
|
31
|
-
this._handleCursorUpdated = (args) => {
|
|
32
|
-
CursorPopupManager.updatePosition(args.newPt);
|
|
33
|
-
};
|
|
34
|
-
this._timeOut = timeOut;
|
|
35
|
-
this._fadeOut = fadeOut;
|
|
36
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
37
|
-
this._timer = new Timer(timeOut);
|
|
38
20
|
}
|
|
39
|
-
|
|
40
|
-
if (!
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
21
|
+
open({ timeout, fadeout, iconSpec, instruction, promptAtContent, }) {
|
|
22
|
+
if (!this._removeListeners) {
|
|
23
|
+
const listeners = [
|
|
24
|
+
CursorInformation.onCursorUpdatedEvent.addListener((args) => {
|
|
25
|
+
CursorPopupManager.updatePosition(args.newPt);
|
|
26
|
+
}),
|
|
27
|
+
useCursorInformationStore.subscribe((state) => {
|
|
28
|
+
if (!promptAtContent)
|
|
29
|
+
return;
|
|
30
|
+
if (state.contentHovered) {
|
|
31
|
+
this.show({
|
|
32
|
+
iconSpec,
|
|
33
|
+
instruction,
|
|
34
|
+
});
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
this.hide(fadeout);
|
|
38
|
+
}),
|
|
39
|
+
];
|
|
40
|
+
this._removeListeners = () => {
|
|
41
|
+
listeners.forEach((remove) => remove());
|
|
42
|
+
};
|
|
44
43
|
}
|
|
45
|
-
this.
|
|
46
|
-
|
|
44
|
+
this.show({ iconSpec, instruction });
|
|
45
|
+
if (timeout === Number.POSITIVE_INFINITY)
|
|
46
|
+
return;
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
48
|
+
const timer = new Timer(timeout);
|
|
49
|
+
timer.setOnExecute(() => this.close(fadeout));
|
|
50
|
+
timer.start();
|
|
51
|
+
this._timer = timer;
|
|
52
|
+
}
|
|
53
|
+
close(fadeout) {
|
|
54
|
+
this._timer?.stop();
|
|
55
|
+
this._timer = undefined;
|
|
56
|
+
this._removeListeners?.();
|
|
57
|
+
this._removeListeners = undefined;
|
|
58
|
+
this.hide(fadeout);
|
|
59
|
+
}
|
|
60
|
+
show({ iconSpec, instruction, }) {
|
|
47
61
|
const promptElement = (React.createElement("div", { className: "uifw-cursor-prompt" },
|
|
48
|
-
|
|
49
|
-
React.createElement(Icon, { iconSpec:
|
|
50
|
-
React.createElement(Text, { variant: "body", className: "uifw-cursor-prompt-text" }, instruction
|
|
51
|
-
this.
|
|
52
|
-
this._timer.setOnExecute(() => this._endCursorPopup(this._fadeOut));
|
|
53
|
-
this._timer.delay = this._timeOut;
|
|
54
|
-
this._timer.start();
|
|
62
|
+
iconSpec && (React.createElement("span", { className: "uifw-cursor-prompt-icon" },
|
|
63
|
+
React.createElement(Icon, { iconSpec: iconSpec }))),
|
|
64
|
+
React.createElement(Text, { variant: "body", className: "uifw-cursor-prompt-text" }, instruction)));
|
|
65
|
+
CursorPopupManager.open(this._popupId, promptElement, CursorInformation.cursorPosition, new Point(20, 20), RelativePosition.BottomRight, 0, { shadow: true });
|
|
55
66
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
this._timer.stop();
|
|
59
|
-
this._endCursorPopup(fadeOut);
|
|
67
|
+
hide(fadeout) {
|
|
68
|
+
CursorPopupManager.close(this._popupId, false, fadeout);
|
|
60
69
|
}
|
|
61
70
|
}
|
|
62
71
|
//# sourceMappingURL=CursorPrompt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CursorPrompt.js","sourceRoot":"","sources":["../../../../src/appui-react/cursor/cursorprompt/CursorPrompt.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,qBAAqB,CAAC;AAC7B,OAAO,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,IAAI,CACrB,IAAI,CAAC,QAAQ,EACb,aAAa,EACb,iBAAiB,CAAC,cAAc,EAChC,IAAI,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,EACjB,gBAAgB,CAAC,WAAW,EAC5B,CAAC,EACD,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB,CAAC;IACJ,CAAC;IAEO,IAAI,CAAC,OAAgB;QAC3B,kBAAkB,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Notification\n */\n\nimport \"./CursorPrompt.scss\";\nimport * as React from \"react\";\nimport { RelativePosition } from \"@itwin/appui-abstract\";\nimport { Icon, Timer } from \"@itwin/core-react\";\nimport { Point } from \"@itwin/core-react/internal\";\nimport { Text } from \"@itwin/itwinui-react\";\nimport {\n CursorInformation,\n useCursorInformationStore,\n} from \"../CursorInformation.js\";\nimport { CursorPopupManager } from \"../cursorpopup/CursorPopupManager.js\";\n\n/** @internal */\nexport class CursorPrompt {\n private _popupId = \"cursor-prompt\";\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n private _timer: Timer | undefined;\n private _removeListeners: (() => void) | undefined;\n\n public open({\n timeout,\n fadeout,\n iconSpec,\n instruction,\n promptAtContent,\n }: {\n timeout: number;\n fadeout: boolean;\n iconSpec: string;\n instruction: string;\n promptAtContent: boolean;\n }) {\n if (!this._removeListeners) {\n const listeners = [\n CursorInformation.onCursorUpdatedEvent.addListener((args) => {\n CursorPopupManager.updatePosition(args.newPt);\n }),\n useCursorInformationStore.subscribe((state) => {\n if (!promptAtContent) return;\n if (state.contentHovered) {\n this.show({\n iconSpec,\n instruction,\n });\n return;\n }\n\n this.hide(fadeout);\n }),\n ];\n this._removeListeners = () => {\n listeners.forEach((remove) => remove());\n };\n }\n\n this.show({ iconSpec, instruction });\n\n if (timeout === Number.POSITIVE_INFINITY) return;\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const timer = new Timer(timeout);\n timer.setOnExecute(() => this.close(fadeout));\n timer.start();\n this._timer = timer;\n }\n\n public close(fadeout: boolean) {\n this._timer?.stop();\n this._timer = undefined;\n this._removeListeners?.();\n this._removeListeners = undefined;\n\n this.hide(fadeout);\n }\n\n private show({\n iconSpec,\n instruction,\n }: {\n iconSpec: string;\n instruction: string;\n }) {\n const promptElement = (\n <div className=\"uifw-cursor-prompt\">\n {iconSpec && (\n <span className=\"uifw-cursor-prompt-icon\">\n {/* eslint-disable-next-line @typescript-eslint/no-deprecated */}\n <Icon iconSpec={iconSpec} />\n </span>\n )}\n <Text variant=\"body\" className=\"uifw-cursor-prompt-text\">\n {instruction}\n </Text>\n </div>\n );\n\n CursorPopupManager.open(\n this._popupId,\n promptElement,\n CursorInformation.cursorPosition,\n new Point(20, 20),\n RelativePosition.BottomRight,\n 0,\n { shadow: true }\n );\n }\n\n private hide(fadeout: boolean) {\n CursorPopupManager.close(this._popupId, false, fadeout);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StandardLayout.d.ts","sourceRoot":"","sources":["../../../src/appui-react/layout/StandardLayout.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,uBAAuB,CAAC;AAE/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"StandardLayout.d.ts","sourceRoot":"","sources":["../../../src/appui-react/layout/StandardLayout.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,uBAAuB,CAAC;AAE/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAWrD,UAAU,mBAAoB,SAAQ,WAAW;IAC/C,gHAAgH;IAChH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,wGAAwG;IACxG,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,qBAwBxD"}
|
|
@@ -13,16 +13,20 @@ import { useContentAlwaysMaxSize } from "../preview/content-always-max-size/useC
|
|
|
13
13
|
import { useMaximizedPanelLayout } from "../preview/enable-maximized-widget/useMaximizedWidget.js";
|
|
14
14
|
import { useHorizontalPanelAlignment } from "../preview/horizontal-panel-alignment/useHorizontalPanelAlignment.js";
|
|
15
15
|
import { usePanelsAutoCollapse } from "./widget-panels/usePanelsAutoCollapse.js";
|
|
16
|
+
import { ConfigurableUiContext } from "../configurableui/ConfigurableUiContent.js";
|
|
17
|
+
import { useRefs } from "@itwin/core-react/internal";
|
|
16
18
|
/** Component that displays widgets in a standard layout.
|
|
17
19
|
* @internal
|
|
18
20
|
*/
|
|
19
21
|
export function StandardLayout(props) {
|
|
22
|
+
const { contentElementRef } = React.useContext(ConfigurableUiContext);
|
|
20
23
|
const pinned = usePinnedPanels();
|
|
21
24
|
const appContentRef = usePanelsAutoCollapse();
|
|
25
|
+
const refs = useRefs(contentElementRef, appContentRef);
|
|
22
26
|
const className = classnames("nz-standardLayout", pinned, props.className);
|
|
23
27
|
const contentAlwaysMaxSize = useContentAlwaysMaxSize();
|
|
24
28
|
return (React.createElement("div", { className: className, style: props.style },
|
|
25
|
-
React.createElement("div", { className: classnames("nz-appContent", contentAlwaysMaxSize), ref:
|
|
29
|
+
React.createElement("div", { className: classnames("nz-appContent", contentAlwaysMaxSize), ref: refs }, props.children),
|
|
26
30
|
React.createElement("div", { className: "nz-centerContent" }, props.centerContent),
|
|
27
31
|
React.createElement(Panel, { side: "left" }, props.leftPanel),
|
|
28
32
|
React.createElement(Panel, { side: "right" }, props.rightPanel),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StandardLayout.js","sourceRoot":"","sources":["../../../src/appui-react/layout/StandardLayout.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,uBAAuB,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+DAA+D,CAAC;AACxG,OAAO,EAAE,uBAAuB,EAAE,MAAM,0DAA0D,CAAC;AACnG,OAAO,EAAE,2BAA2B,EAAE,MAAM,sEAAsE,CAAC;AACnH,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"StandardLayout.js","sourceRoot":"","sources":["../../../src/appui-react/layout/StandardLayout.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,uBAAuB,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+DAA+D,CAAC;AACxG,OAAO,EAAE,uBAAuB,EAAE,MAAM,0DAA0D,CAAC;AACnG,OAA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,KAAK,CAAC,YAAY,CAAO;QAC3D,6BAAK,SAAS,EAAC,cAAc,IAAE,KAAK,CAAC,SAAS,CAAO,CACjD,CACP,CAAC;AACJ,CAAC;AAMD,SAAS,KAAK,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAuC;IACpE,MAAM,eAAe,GAAG,uBAAuB,CAAC,IAAI,CAAC,CAAC;IACtD,MAAM,mBAAmB,GAAG,2BAA2B,CAAC,IAAI,CAAC,CAAC;IAC9D,MAAM,SAAS,GAAG,UAAU,CAC1B,qBAAqB,IAAI,OAAO,EAChC,eAAe,EACf,mBAAmB,CAAC,UAAU,CAC/B,CAAC;IACF,OAAO,CACL,6BAAK,SAAS,EAAE,SAAS,KAAM,mBAAmB,CAAC,UAAU,IAC1D,QAAQ,CACL,CACP,CAAC;AACJ,CAAC;AAED,SAAS,eAAe;IACtB,MAAM,UAAU,GAAG,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAClE,MAAM,WAAW,GAAG,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACpE,MAAM,SAAS,GAAG,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAChE,MAAM,YAAY,GAAG,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACtE,OAAO;QACL,gBAAgB,EAAE,UAAU;QAC5B,iBAAiB,EAAE,WAAW;QAC9B,eAAe,EAAE,SAAS;QAC1B,kBAAkB,EAAE,YAAY;KACjC,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module WidgetPanels\n */\n\nimport \"./StandardLayout.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { useLayout } from \"./base/LayoutStore.js\";\nimport { useContentAlwaysMaxSize } from \"../preview/content-always-max-size/useContentAlwaysMaxSize.js\";\nimport { useMaximizedPanelLayout } from \"../preview/enable-maximized-widget/useMaximizedWidget.js\";\nimport { useHorizontalPanelAlignment } from \"../preview/horizontal-panel-alignment/useHorizontalPanelAlignment.js\";\nimport { usePanelsAutoCollapse } from \"./widget-panels/usePanelsAutoCollapse.js\";\nimport type { PanelSide } from \"./widget-panels/PanelTypes.js\";\nimport { ConfigurableUiContext } from \"../configurableui/ConfigurableUiContent.js\";\nimport { useRefs } from \"@itwin/core-react/internal\";\n\n// eslint-disable-next-line @typescript-eslint/no-deprecated\ninterface StandardLayoutProps extends CommonProps {\n /** Main content area of the application (i.e. viewport) that will change bounds based on panel pinned state. */\n children?: React.ReactNode;\n /** Component that displays center content (i.e. toolbars). Content is always bound by widget panels. */\n centerContent?: React.ReactNode;\n toolSettings?: React.ReactNode;\n statusBar?: React.ReactNode;\n topPanel?: React.ReactNode;\n leftPanel?: React.ReactNode;\n rightPanel?: React.ReactNode;\n bottomPanel?: React.ReactNode;\n}\n\n/** Component that displays widgets in a standard layout.\n * @internal\n */\nexport function StandardLayout(props: StandardLayoutProps) {\n const { contentElementRef } = React.useContext(ConfigurableUiContext);\n const pinned = usePinnedPanels();\n const appContentRef = usePanelsAutoCollapse<HTMLDivElement>();\n const refs = useRefs(contentElementRef, appContentRef);\n const className = classnames(\"nz-standardLayout\", pinned, props.className);\n const contentAlwaysMaxSize = useContentAlwaysMaxSize();\n return (\n <div className={className} style={props.style}>\n <div\n className={classnames(\"nz-appContent\", contentAlwaysMaxSize)}\n ref={refs}\n >\n {props.children}\n </div>\n <div className=\"nz-centerContent\">{props.centerContent}</div>\n <Panel side=\"left\">{props.leftPanel}</Panel>\n <Panel side=\"right\">{props.rightPanel}</Panel>\n <Panel side=\"top\">{props.topPanel}</Panel>\n <Panel side=\"bottom\">{props.bottomPanel}</Panel>\n <div className=\"nz-toolSettings\">{props.toolSettings}</div>\n <div className=\"nz-statusBar\">{props.statusBar}</div>\n </div>\n );\n}\n\ninterface PanelProps {\n side: PanelSide;\n}\n\nfunction Panel({ children, side }: React.PropsWithChildren<PanelProps>) {\n const maximizedWidget = useMaximizedPanelLayout(side);\n const horizontalAlignment = useHorizontalPanelAlignment(side);\n const className = classnames(\n `nz-standardLayout_${side}Panel`,\n maximizedWidget,\n horizontalAlignment.classNames\n );\n return (\n <div className={className} {...horizontalAlignment.attributes}>\n {children}\n </div>\n );\n}\n\nfunction usePinnedPanels() {\n const leftPinned = useLayout((state) => state.panels.left.pinned);\n const rightPinned = useLayout((state) => state.panels.right.pinned);\n const topPinned = useLayout((state) => state.panels.top.pinned);\n const bottomPinned = useLayout((state) => state.panels.bottom.pinned);\n return {\n \"nz-pinned-left\": leftPinned,\n \"nz-pinned-right\": rightPinned,\n \"nz-pinned-top\": topPinned,\n \"nz-pinned-bottom\": bottomPinned,\n };\n}\n"]}
|
|
@@ -18,7 +18,7 @@ export interface FrameworkState {
|
|
|
18
18
|
export declare const FrameworkReducer: import("redux").Reducer<{
|
|
19
19
|
configurableUiState: ConfigurableUiState;
|
|
20
20
|
sessionState: import("./redux-ts.js").DeepReadonlyObject<SessionState>;
|
|
21
|
-
}, import("./
|
|
21
|
+
}, import("./ConfigurableUiState.js").ConfigurableUiActionsUnion | import("./SessionState.js").SessionStateActionsUnion, Partial<{
|
|
22
22
|
configurableUiState: never;
|
|
23
23
|
sessionState: never;
|
|
24
24
|
}>>;
|
|
@@ -102,7 +102,7 @@ export declare const SessionStateActions: {
|
|
|
102
102
|
setNumItemsSelected: (numSelected: number) => import("./redux-ts.js").ActionWithPayload<SessionStateActionId.SetNumItemsSelected, number>;
|
|
103
103
|
setIModelConnection: (iModelConnection: any) => import("./redux-ts.js").ActionWithPayload<SessionStateActionId.SetIModelConnection, any>;
|
|
104
104
|
setSelectionScope: (activeSelectionScope: string) => import("./redux-ts.js").ActionWithPayload<SessionStateActionId.SetSelectionScope, string>;
|
|
105
|
-
updateCursorMenu: (cursorMenuData: CursorMenuData | CursorMenuPayload) => import("./redux-ts.js").ActionWithPayload<SessionStateActionId.UpdateCursorMenu, import("./redux-ts.js").DeepReadonlyObject<
|
|
105
|
+
updateCursorMenu: (cursorMenuData: CursorMenuData | CursorMenuPayload) => import("./redux-ts.js").ActionWithPayload<SessionStateActionId.UpdateCursorMenu, import("./redux-ts.js").DeepReadonlyObject<CursorMenuData> | import("./redux-ts.js").DeepReadonlyObject<CursorMenuPayload>>;
|
|
106
106
|
};
|
|
107
107
|
/** Object that contains available actions that modify SessionState. Parent control's props should
|
|
108
108
|
* extend from SessionStateActionsProps before using this in Redux 'connect' function.
|
|
@@ -118,7 +118,7 @@ export declare const sessionStateMapDispatchToProps: {
|
|
|
118
118
|
setNumItemsSelected: (numSelected: number) => import("./redux-ts.js").ActionWithPayload<SessionStateActionId.SetNumItemsSelected, number>;
|
|
119
119
|
setIModelConnection: (iModelConnection: any) => import("./redux-ts.js").ActionWithPayload<SessionStateActionId.SetIModelConnection, any>;
|
|
120
120
|
setSelectionScope: (activeSelectionScope: string) => import("./redux-ts.js").ActionWithPayload<SessionStateActionId.SetSelectionScope, string>;
|
|
121
|
-
updateCursorMenu: (cursorMenuData: CursorMenuData | CursorMenuPayload) => import("./redux-ts.js").ActionWithPayload<SessionStateActionId.UpdateCursorMenu, import("./redux-ts.js").DeepReadonlyObject<
|
|
121
|
+
updateCursorMenu: (cursorMenuData: CursorMenuData | CursorMenuPayload) => import("./redux-ts.js").ActionWithPayload<SessionStateActionId.UpdateCursorMenu, import("./redux-ts.js").DeepReadonlyObject<CursorMenuData> | import("./redux-ts.js").DeepReadonlyObject<CursorMenuPayload>>;
|
|
122
122
|
};
|
|
123
123
|
/** Union of SessionState Redux actions
|
|
124
124
|
* @public
|
|
@@ -11,19 +11,21 @@ import { type UiStateStorage } from "../../uistate/UiStateStorage.js";
|
|
|
11
11
|
* @public
|
|
12
12
|
*/
|
|
13
13
|
export interface ToolAssistanceFieldProps extends CommonProps {
|
|
14
|
-
/** Indicates whether to include promptAtCursor Checkbox. Defaults to true
|
|
14
|
+
/** Indicates whether to include promptAtCursor Checkbox. Defaults to `true`. */
|
|
15
15
|
includePromptAtCursor: boolean;
|
|
16
|
-
/** Optional parameter for persistent UI settings. Defaults to UiStateStorageContext
|
|
17
|
-
*/
|
|
16
|
+
/** Optional parameter for persistent UI settings. Defaults to `UiStateStorageContext`. */
|
|
18
17
|
uiStateStorage?: UiStateStorage;
|
|
19
|
-
/** Cursor
|
|
18
|
+
/** Cursor prompt timeout period. Defaults to `5000`.
|
|
19
|
+
* @note Specify `Number.POSITIVE_INFINITY` to keep the cursor prompt open indefinitely.
|
|
20
|
+
*/
|
|
20
21
|
cursorPromptTimeout: number;
|
|
21
|
-
/** Fade
|
|
22
|
+
/** Fade out the cursor prompt when closed. */
|
|
22
23
|
fadeOutCursorPrompt: boolean;
|
|
23
|
-
/** Indicates whether to show promptAtCursor by default. Defaults to false
|
|
24
|
+
/** Indicates whether to show promptAtCursor by default. Defaults to `false`. */
|
|
24
25
|
defaultPromptAtCursor: boolean;
|
|
26
|
+
/** When set to `true` will show prompt at cursor only when the content area is hovered. */
|
|
27
|
+
promptAtContent?: boolean;
|
|
25
28
|
}
|
|
26
|
-
/** @internal */
|
|
27
29
|
interface ToolAssistanceFieldState {
|
|
28
30
|
instructions: ToolAssistanceInstructions | undefined;
|
|
29
31
|
toolIconSpec: string;
|
|
@@ -58,6 +60,8 @@ export declare class ToolAssistanceField extends React.Component<ToolAssistanceF
|
|
|
58
60
|
static readonly defaultProps: Pick<ToolAssistanceFieldProps, "includePromptAtCursor" | "uiStateStorage" | "cursorPromptTimeout" | "fadeOutCursorPrompt" | "defaultPromptAtCursor">;
|
|
59
61
|
constructor(p: ToolAssistanceFieldProps);
|
|
60
62
|
componentDidMount(): Promise<void>;
|
|
63
|
+
/** @internal */
|
|
64
|
+
componentDidUpdate(): void;
|
|
61
65
|
componentWillUnmount(): void;
|
|
62
66
|
private restoreSettings;
|
|
63
67
|
private _handleToolAssistanceChangedEvent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolAssistanceField.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/toolassistance/ToolAssistanceField.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,EACV,yBAAyB,EACzB,0BAA0B,EAG3B,MAAM,sBAAsB,CAAC;AAM9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,4BAA4B,CAAC;AA0BpC,OAAO,EACL,KAAK,cAAc,EAEpB,MAAM,iCAAiC,CAAC;AAGzC;;GAEG;AAEH,MAAM,WAAW,wBAAyB,SAAQ,WAAW;IAC3D,
|
|
1
|
+
{"version":3,"file":"ToolAssistanceField.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/toolassistance/ToolAssistanceField.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,EACV,yBAAyB,EACzB,0BAA0B,EAG3B,MAAM,sBAAsB,CAAC;AAM9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,4BAA4B,CAAC;AA0BpC,OAAO,EACL,KAAK,cAAc,EAEpB,MAAM,iCAAiC,CAAC;AAGzC;;GAEG;AAEH,MAAM,WAAW,wBAAyB,SAA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,OAAO,CAAC,kBAAkB,CAAiB;IAE3C,gBAAuB,YAAY,EAAE,IAAI,CACvC,wBAAwB,EACtB,uBAAuB,GACvB,gBAAgB,GAChB,qBAAqB,GACrB,qBAAqB,GACrB,uBAAuB,CAC1B,CAKC;gBAEU,CAAC,EAAE,wBAAwB;IAmCjB,iBAAiB;IAgBvC,gBAAgB;IACA,kBAAkB;IAKlB,oBAAoB;YAWtB,eAAe;IA2B7B,OAAO,CAAC,iCAAiC,CAsDvC;IAEF,OAAO,CAAC,kBAAkB,CAKxB;IAEF,OAAO,CAAC,mBAAmB,CACmC;IAE9D,OAAO,CAAC,mBAAmB,CACmC;IAE9D,OAAO,CAAC,2BAA2B,CAYjC;IAEF,OAAO,CAAC,iBAAiB;IAgBzB,OAAO,CAAC,kCAAkC;IAO1C,OAAO,CAAC,2BAA2B;IAiBnC,OAAO,CAAC,oBAAoB,CAiB1B;IAEc,MAAM,IAAI,KAAK,CAAC,SAAS;IA4KzC,OAAO,CAAC,uBAAuB,CAc7B;IAEF,OAAO,CAAC,qBAAqB,CAE3B;IAEF,OAAO,CAAC,uBAAuB,CAE7B;IAEF,OAAO,CAAC,SAAS;IAUjB,gBAAgB;WACF,mBAAmB,CAC/B,WAAW,EAAE,yBAAyB,GACrC,KAAK,CAAC,SAAS;IAwElB,OAAO,CAAC,MAAM,CAAC,sBAAsB;IA0FrC,OAAO,CAAC,MAAM,CAAC,2BAA2B;IA0D1C,OAAO,CAAC,MAAM,CAAC,UAAU;CAe1B"}
|
|
@@ -94,7 +94,9 @@ export class ToolAssistanceField extends React.Component {
|
|
|
94
94
|
this._isTouchInstruction = (instruction) => instruction.inputMethod === ToolAssistanceInputMethod.Touch;
|
|
95
95
|
this._handleToolIconChangedEvent = (args) => {
|
|
96
96
|
if (this._isMounted)
|
|
97
|
-
this.setState({
|
|
97
|
+
this.setState({
|
|
98
|
+
toolIconSpec: args.iconSpec,
|
|
99
|
+
}, () => {
|
|
98
100
|
this._showCursorPrompt();
|
|
99
101
|
});
|
|
100
102
|
};
|
|
@@ -140,7 +142,7 @@ export class ToolAssistanceField extends React.Component {
|
|
|
140
142
|
isOpen: false,
|
|
141
143
|
};
|
|
142
144
|
this._uiSettingsStorage = new LocalStateStorage();
|
|
143
|
-
this._cursorPrompt = new CursorPrompt(
|
|
145
|
+
this._cursorPrompt = new CursorPrompt();
|
|
144
146
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
145
147
|
this._showPromptAtCursorSetting = new UiStateEntry(ToolAssistanceField._toolAssistanceKey, ToolAssistanceField._showPromptAtCursorKey, () => this.state.showPromptAtCursor);
|
|
146
148
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
@@ -156,8 +158,14 @@ export class ToolAssistanceField extends React.Component {
|
|
|
156
158
|
this._uiSettingsStorage = this.context;
|
|
157
159
|
await this.restoreSettings();
|
|
158
160
|
}
|
|
161
|
+
/** @internal */
|
|
162
|
+
componentDidUpdate() {
|
|
163
|
+
if (!this.state.showPromptAtCursor)
|
|
164
|
+
this._cursorPrompt.close(this.props.fadeOutCursorPrompt);
|
|
165
|
+
}
|
|
159
166
|
componentWillUnmount() {
|
|
160
167
|
this._isMounted = false;
|
|
168
|
+
this._cursorPrompt.close(this.props.fadeOutCursorPrompt);
|
|
161
169
|
MessageManager.onToolAssistanceChangedEvent.removeListener(this._handleToolAssistanceChangedEvent);
|
|
162
170
|
UiFramework.frontstages.onToolIconChangedEvent.removeListener(this._handleToolIconChangedEvent);
|
|
163
171
|
}
|
|
@@ -179,8 +187,18 @@ export class ToolAssistanceField extends React.Component {
|
|
|
179
187
|
}
|
|
180
188
|
}
|
|
181
189
|
_showCursorPrompt() {
|
|
182
|
-
|
|
183
|
-
|
|
190
|
+
const instruction = this.state.instructions?.mainInstruction.text;
|
|
191
|
+
if (!this.state.showPromptAtCursor || !instruction) {
|
|
192
|
+
this._cursorPrompt.close(this.props.fadeOutCursorPrompt);
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
this._cursorPrompt.open({
|
|
196
|
+
timeout: this.props.cursorPromptTimeout,
|
|
197
|
+
fadeout: this.props.fadeOutCursorPrompt,
|
|
198
|
+
iconSpec: this.state.toolIconSpec,
|
|
199
|
+
instruction,
|
|
200
|
+
promptAtContent: this.props.promptAtContent ?? false,
|
|
201
|
+
});
|
|
184
202
|
}
|
|
185
203
|
_sectionHasDisplayableInstructions(section) {
|
|
186
204
|
const displayableInstructions = this._getDisplayableInstructions(section);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolAssistanceField.js","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/toolassistance/ToolAssistanceField.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAO9D,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,4BAA4B,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AACrF,OAAO,EAAE,yBAAyB,IAAI,4BAA4B,EAAE,MAAM,oDAA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S,EAAE,UAAU,CAAC,yBAAyB,EAAE,SAAS,CAAC;YAG3D,oBAAC,YAAY,QAAE,GAAG,CAAgB,CAC9B,CACP,CAAC;IACJ,CAAC;;AAtrBD,gBAAgB;AACO,+BAAW,GAAG,qBAAqB,AAAxB,CAAyB;AAI5C,sCAAkB,GAAG,gBAAgB,AAAnB,CAAoB;AACtC,0CAAsB,GAAG,oBAAoB,AAAvB,CAAwB;AAC9C,0CAAsB,GAAG,oBAAoB,AAAvB,CAAwB;AAUtC,gCAAY,GAO/B;IACF,qBAAqB,EAAE,IAAI;IAC3B,mBAAmB,EAAE,IAAI;IACzB,mBAAmB,EAAE,IAAI;IACzB,qBAAqB,EAAE,KAAK;CAC7B,AAZkC,CAYjC;AA4pBJ,SAAS,qBAAqB,CAAC,QAAgB;IAC7C,IAAI,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1D,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Notification\n */\n\nimport { Logger, ProcessDetector } from \"@itwin/core-bentley\";\nimport type {\n ToolAssistanceInstruction,\n ToolAssistanceInstructions,\n ToolAssistanceKeyboardInfo,\n ToolAssistanceSection,\n} from \"@itwin/core-frontend\";\nimport {\n IModelApp,\n ToolAssistanceImage,\n ToolAssistanceInputMethod,\n} from \"@itwin/core-frontend\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport type { ListenerType } from \"@itwin/core-react/internal\";\nimport { FillCentered, Icon, UiStateEntry } from \"@itwin/core-react\";\nimport { Button, Tabs, ToggleSwitch } from \"@itwin/itwinui-react\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { UiFramework } from \"../../UiFramework.js\";\nimport { CursorPrompt } from \"../../cursor/cursorprompt/CursorPrompt.js\";\nimport { MessageManager } from \"../../messages/MessageManager.js\";\nimport { UiStateStorageContext } from \"../../uistate/useUiStateStorage.js\";\nimport \"./ToolAssistanceField.scss\";\n\nimport { SvgClose, SvgPin } from \"@itwin/itwinui-icons-react\";\nimport { ToolAssistanceDialog } from \"../../layout/footer/tool-assistance/Dialog.js\";\nimport { ToolAssistanceInstruction as NZ_ToolAssistanceInstruction } from \"../../layout/footer/tool-assistance/Instruction.js\";\nimport { ToolAssistanceItem } from \"../../layout/footer/tool-assistance/Item.js\";\nimport { ToolAssistanceSeparator } from \"../../layout/footer/tool-assistance/Separator.js\";\nimport { StatusBarDialog } from \"../../statusbar/dialog/Dialog.js\";\nimport acceptPointIcon from \"./accept-point.svg\";\nimport cursorClickIcon from \"./cursor-click.svg\";\nimport oneTouchDragIcon from \"./gesture-one-finger-drag.svg\";\nimport oneTouchDoubleTapIcon from \"./gesture-one-finger-tap-double.svg\";\nimport oneTouchTapIcon from \"./gesture-one-finger-tap.svg\";\nimport twoTouchPinchIcon from \"./gesture-pinch.svg\";\nimport twoTouchDragIcon from \"./gesture-two-finger-drag.svg\";\nimport twoTouchTapIcon from \"./gesture-two-finger-tap.svg\";\nimport clickLeftDragIcon from \"./mouse-click-left-drag.svg\";\nimport clickLeftIcon from \"./mouse-click-left.svg\";\nimport clickRightDragIcon from \"./mouse-click-right-drag.svg\";\nimport clickRightIcon from \"./mouse-click-right.svg\";\nimport clickMouseWheelDragIcon from \"./mouse-click-wheel-drag.svg\";\nimport mouseWheelClickIcon from \"./mouse-click-wheel.svg\";\nimport touchCursorDragIcon from \"./touch-cursor-pan.svg\";\nimport touchCursorTapIcon from \"./touch-cursor-point.svg\";\nimport { StatusBarPopover } from \"../../statusbar/popup/StatusBarPopover.js\";\nimport type { UiStateStorageResult } from \"../../uistate/UiStateStorage.js\";\nimport {\n type UiStateStorage,\n UiStateStorageStatus,\n} from \"../../uistate/UiStateStorage.js\";\nimport { LocalStateStorage } from \"../../uistate/LocalStateStorage.js\";\n\n/** Properties of [[ToolAssistanceField]] component.\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface ToolAssistanceFieldProps extends CommonProps {\n /** Indicates whether to include promptAtCursor Checkbox. Defaults to true. */\n includePromptAtCursor: boolean;\n /** Optional parameter for persistent UI settings. Defaults to UiStateStorageContext.\n */\n uiStateStorage?: UiStateStorage;\n /** Cursor Prompt Timeout period. Defaults to 5000. */\n cursorPromptTimeout: number;\n /** Fade Out the Cursor Prompt when closed. */\n fadeOutCursorPrompt: boolean;\n /** Indicates whether to show promptAtCursor by default. Defaults to false. */\n defaultPromptAtCursor: boolean;\n}\n\n/** @internal */\ninterface ToolAssistanceFieldState {\n instructions: ToolAssistanceInstructions | undefined;\n toolIconSpec: string;\n showPromptAtCursor: boolean;\n includeMouseInstructions: boolean;\n includeTouchInstructions: boolean;\n showMouseTouchTabs: boolean;\n showMouseInstructions: boolean;\n showTouchInstructions: boolean;\n mouseTouchTabIndex: number;\n isPinned: boolean;\n isOpen: boolean;\n}\n\n/** Tool Assistance Field React component.\n * @public\n * @note Tool assistance field will only display 30 characters in the status bar. Any additional text will be hidden. The full text will always be shown in the opened popover.\n */\nexport class ToolAssistanceField extends React.Component<\n ToolAssistanceFieldProps,\n ToolAssistanceFieldState\n> {\n /** @internal */\n public static override contextType = UiStateStorageContext;\n /** @internal */\n public declare context: React.ContextType<typeof UiStateStorageContext>;\n\n private static _toolAssistanceKey = \"ToolAssistance\";\n private static _showPromptAtCursorKey = \"showPromptAtCursor\";\n private static _mouseTouchTabIndexKey = \"mouseTouchTabIndex\";\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n private _showPromptAtCursorSetting: UiStateEntry<boolean>;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n private _mouseTouchTabIndexSetting: UiStateEntry<number>;\n private _indicator = React.createRef<HTMLButtonElement>();\n private _cursorPrompt: CursorPrompt;\n private _isMounted = false;\n private _uiSettingsStorage: UiStateStorage;\n\n public static readonly defaultProps: Pick<\n ToolAssistanceFieldProps,\n | \"includePromptAtCursor\"\n | \"uiStateStorage\"\n | \"cursorPromptTimeout\"\n | \"fadeOutCursorPrompt\"\n | \"defaultPromptAtCursor\"\n > = {\n includePromptAtCursor: true,\n cursorPromptTimeout: 5000,\n fadeOutCursorPrompt: true,\n defaultPromptAtCursor: false,\n };\n\n constructor(p: ToolAssistanceFieldProps) {\n super(p);\n\n const mobile = ProcessDetector.isMobileBrowser;\n\n this.state = {\n instructions: undefined,\n toolIconSpec: \"\",\n showPromptAtCursor: p.defaultPromptAtCursor,\n includeMouseInstructions: !mobile,\n includeTouchInstructions: true,\n showMouseTouchTabs: false,\n showMouseInstructions: false,\n showTouchInstructions: false,\n mouseTouchTabIndex: 0,\n isPinned: false,\n isOpen: false,\n };\n\n this._uiSettingsStorage = new LocalStateStorage();\n this._cursorPrompt = new CursorPrompt(\n this.props.cursorPromptTimeout,\n this.props.fadeOutCursorPrompt\n );\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this._showPromptAtCursorSetting = new UiStateEntry(\n ToolAssistanceField._toolAssistanceKey,\n ToolAssistanceField._showPromptAtCursorKey,\n () => this.state.showPromptAtCursor\n );\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this._mouseTouchTabIndexSetting = new UiStateEntry(\n ToolAssistanceField._toolAssistanceKey,\n ToolAssistanceField._mouseTouchTabIndexKey,\n () => this.state.mouseTouchTabIndex\n );\n }\n\n public override async componentDidMount() {\n this._isMounted = true;\n MessageManager.onToolAssistanceChangedEvent.addListener(\n this._handleToolAssistanceChangedEvent\n );\n UiFramework.frontstages.onToolIconChangedEvent.addListener(\n this._handleToolIconChangedEvent\n );\n\n if (this.props.uiStateStorage)\n this._uiSettingsStorage = this.props.uiStateStorage;\n else if (this.context) this._uiSettingsStorage = this.context;\n\n await this.restoreSettings();\n }\n\n public override componentWillUnmount() {\n this._isMounted = false;\n MessageManager.onToolAssistanceChangedEvent.removeListener(\n this._handleToolAssistanceChangedEvent\n );\n UiFramework.frontstages.onToolIconChangedEvent.removeListener(\n this._handleToolIconChangedEvent\n );\n }\n\n private async restoreSettings() {\n let getShowPromptAtCursor: Promise<UiStateStorageResult> | undefined;\n if (this.props.includePromptAtCursor) {\n getShowPromptAtCursor = this._showPromptAtCursorSetting.getSetting(\n this._uiSettingsStorage\n );\n }\n const getMouseTouchTabIndex = this._mouseTouchTabIndexSetting.getSetting(\n this._uiSettingsStorage\n );\n const [showPromptAtCursorResult, mouseTouchTabIndexResult] =\n await Promise.all([getShowPromptAtCursor, getMouseTouchTabIndex]);\n\n if (\n showPromptAtCursorResult !== undefined &&\n showPromptAtCursorResult.status === UiStateStorageStatus.Success\n ) {\n if (this._isMounted)\n this.setState({ showPromptAtCursor: showPromptAtCursorResult.setting });\n }\n\n if (mouseTouchTabIndexResult.status === UiStateStorageStatus.Success) {\n if (this._isMounted)\n this.setState({ mouseTouchTabIndex: mouseTouchTabIndexResult.setting });\n }\n }\n\n private _handleToolAssistanceChangedEvent: ListenerType<\n typeof MessageManager.onToolAssistanceChangedEvent\n > = (args) => {\n let showMouseTouchTabs = false;\n let showMouseInstructions = false;\n let showTouchInstructions = false;\n\n if (args.instructions && args.instructions.sections) {\n const hasMouseInstructions = args.instructions.sections.some(\n (section: ToolAssistanceSection) => {\n return section.instructions.some(\n (instruction: ToolAssistanceInstruction) =>\n this._isMouseInstruction(instruction)\n );\n }\n );\n const hasTouchInstructions = args.instructions.sections.some(\n (section: ToolAssistanceSection) => {\n return section.instructions.some(\n (instruction: ToolAssistanceInstruction) =>\n this._isTouchInstruction(instruction)\n );\n }\n );\n\n if (\n this.state.includeMouseInstructions &&\n this.state.includeTouchInstructions &&\n hasMouseInstructions &&\n hasTouchInstructions\n ) {\n showMouseTouchTabs = true;\n showMouseInstructions = this.state.mouseTouchTabIndex === 0;\n showTouchInstructions = this.state.mouseTouchTabIndex === 1;\n } else {\n if (this.state.includeMouseInstructions && hasMouseInstructions)\n showMouseInstructions = true;\n else if (this.state.includeTouchInstructions && hasTouchInstructions)\n showTouchInstructions = true;\n }\n }\n\n if (this._isMounted)\n this.setState(\n {\n instructions: args.instructions,\n showMouseTouchTabs,\n showMouseInstructions,\n showTouchInstructions,\n },\n () => {\n this._showCursorPrompt();\n }\n );\n };\n\n private _isBothInstruction = (instruction: ToolAssistanceInstruction) => {\n return (\n instruction.inputMethod === undefined ||\n instruction.inputMethod === ToolAssistanceInputMethod.Both\n );\n };\n\n private _isMouseInstruction = (instruction: ToolAssistanceInstruction) =>\n instruction.inputMethod === ToolAssistanceInputMethod.Mouse;\n\n private _isTouchInstruction = (instruction: ToolAssistanceInstruction) =>\n instruction.inputMethod === ToolAssistanceInputMethod.Touch;\n\n private _handleToolIconChangedEvent: ListenerType<\n typeof UiFramework.frontstages.onToolIconChangedEvent\n > = (args) => {\n if (this._isMounted)\n this.setState({ toolIconSpec: args.iconSpec }, () => {\n this._showCursorPrompt();\n });\n };\n\n private _showCursorPrompt() {\n if (this.state.showPromptAtCursor && this.state.instructions)\n this._cursorPrompt.display(\n this.state.toolIconSpec,\n this.state.instructions.mainInstruction\n );\n }\n\n private _sectionHasDisplayableInstructions(\n section: ToolAssistanceSection\n ): boolean {\n const displayableInstructions = this._getDisplayableInstructions(section);\n return displayableInstructions.length > 0;\n }\n\n private _getDisplayableInstructions(\n section: ToolAssistanceSection\n ): ToolAssistanceInstruction[] {\n const displayableInstructions = section.instructions.filter(\n (instruction: ToolAssistanceInstruction) => {\n return (\n this._isBothInstruction(instruction) ||\n (this.state.showMouseInstructions &&\n this._isMouseInstruction(instruction)) ||\n (this.state.showTouchInstructions &&\n this._isTouchInstruction(instruction))\n );\n }\n );\n return displayableInstructions;\n }\n\n private _handleMouseTouchTab = async (index: number) => {\n const showMouseInstructions = index === 0;\n const showTouchInstructions = index === 1;\n\n if (this._isMounted)\n this.setState(\n {\n mouseTouchTabIndex: index,\n showMouseInstructions,\n showTouchInstructions,\n },\n async () => {\n await this._mouseTouchTabIndexSetting.saveSetting(\n this._uiSettingsStorage\n );\n }\n );\n };\n\n public override render(): React.ReactNode {\n const { instructions } = this.state;\n const dialogTitle = IModelApp.toolAdmin.activeTool\n ? IModelApp.toolAdmin.activeTool.flyover\n : UiFramework.translate(\"toolAssistance.title\");\n const mouseLabel = UiFramework.translate(\"toolAssistance.mouse\");\n const touchLabel = UiFramework.translate(\"toolAssistance.touch\");\n let prompt = \"\";\n let tooltip = \"\";\n let toolIcon: React.ReactNode;\n let dialogContent: React.ReactNode;\n\n if (instructions) {\n prompt = instructions.mainInstruction.text;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n toolIcon = <Icon iconSpec={this.state.toolIconSpec} />;\n\n let displayableSections: ToolAssistanceSection[] | undefined;\n if (instructions.sections) {\n displayableSections = instructions.sections.filter(\n (section: ToolAssistanceSection) =>\n this._sectionHasDisplayableInstructions(section)\n );\n }\n\n dialogContent = (\n <div>\n {this.state.showMouseTouchTabs && (\n <Tabs.Wrapper\n type=\"pill\"\n value={String(this.state.mouseTouchTabIndex)}\n >\n <Tabs.TabList className=\"uifw-toolAssistance-tabs\">\n {[mouseLabel, touchLabel].map((label, index) => (\n <Tabs.Tab\n key={index}\n className=\"uifw-tab\"\n value={String(index)}\n label={label}\n onClick={async () => this._handleMouseTouchTab(index)}\n />\n ))}\n </Tabs.TabList>\n </Tabs.Wrapper>\n )}\n\n <div className=\"uifw-toolAssistance-content\">\n <NZ_ToolAssistanceInstruction\n key=\"main\"\n image={ToolAssistanceField.getInstructionImage(\n instructions.mainInstruction\n )}\n text={instructions.mainInstruction.text}\n isNew={instructions.mainInstruction.isNew}\n />\n\n {displayableSections &&\n displayableSections.map(\n (section: ToolAssistanceSection, index1: number) => {\n return (\n <React.Fragment key={index1.toString()}>\n <ToolAssistanceSeparator key={index1.toString()}>\n {section.label}\n </ToolAssistanceSeparator>\n {this._getDisplayableInstructions(section).map(\n (\n instruction: ToolAssistanceInstruction,\n index2: number\n ) => {\n return (\n <NZ_ToolAssistanceInstruction\n key={`${index1.toString()}-${index2.toString()}`}\n image={ToolAssistanceField.getInstructionImage(\n instruction\n )}\n text={instruction.text}\n isNew={instruction.isNew}\n />\n );\n }\n )}\n </React.Fragment>\n );\n }\n )}\n\n {this.props.includePromptAtCursor && (\n <>\n <ToolAssistanceSeparator key=\"prompt-sep\" />\n <ToolAssistanceItem key=\"prompt-item\">\n <ToggleSwitch\n label={UiFramework.translate(\n \"toolAssistance.promptAtCursor\"\n )}\n labelPosition=\"right\"\n checked={this.state.showPromptAtCursor}\n onChange={this._onPromptAtCursorChange}\n />\n </ToolAssistanceItem>\n </>\n )}\n </div>\n </div>\n );\n }\n\n if (prompt) tooltip = prompt;\n\n if (IModelApp.toolAdmin.activeTool)\n tooltip = `${IModelApp.toolAdmin.activeTool.flyover} > ${tooltip} `;\n\n if (tooltip) {\n const lineBreak = \"\\u000d\\u000a\";\n tooltip = tooltip + lineBreak;\n }\n\n tooltip += UiFramework.translate(\"toolAssistance.moreInfo\");\n\n return (\n <StatusBarPopover\n visible={this.state.isOpen}\n onVisibleChange={(visible) => {\n this.setIsOpen(visible);\n }}\n closeOnOutsideClick={!this.state.isPinned}\n content={\n <ToolAssistanceDialog\n buttons={\n <>\n {!this.state.isPinned && (\n <StatusBarDialog.TitleBarButton\n onClick={this._handlePinButtonClick}\n title={UiFramework.translate(\"toolAssistance.pin\")}\n >\n <SvgPin />\n </StatusBarDialog.TitleBarButton>\n )}\n {this.state.isPinned && (\n <StatusBarDialog.TitleBarButton\n onClick={this._handleCloseButtonClick}\n title={UiFramework.translate(\"dialog.close\")}\n >\n <SvgClose />\n </StatusBarDialog.TitleBarButton>\n )}\n </>\n }\n title={dialogTitle}\n >\n {dialogContent}\n </ToolAssistanceDialog>\n }\n >\n <Button\n styleType=\"borderless\"\n startIcon={<>{toolIcon}</>}\n className={classnames(\n \"uifw-statusFields-toolAssistance-toolAssistanceField\",\n this.props.className\n )}\n title={tooltip}\n style={this.props.style}\n ref={this._indicator}\n labelProps={{ className: \"prompt\" }}\n >\n {prompt}\n <StatusBarPopover.ExpandIndicator />\n </Button>\n </StatusBarPopover>\n );\n }\n\n private _onPromptAtCursorChange = async (\n e: React.ChangeEvent<HTMLInputElement>\n ) => {\n if (this._isMounted)\n this.setState(\n {\n showPromptAtCursor: e.target.checked,\n },\n async () => {\n await this._showPromptAtCursorSetting.saveSetting(\n this._uiSettingsStorage\n );\n }\n );\n };\n\n private _handlePinButtonClick = () => {\n if (this._isMounted) this.setState({ isPinned: true });\n };\n\n private _handleCloseButtonClick = () => {\n this.setIsOpen(false);\n };\n\n private setIsOpen(isOpen: boolean) {\n let newState = {\n isOpen,\n };\n if (!isOpen && this.state.isPinned && this._isMounted) {\n newState = { ...newState, ...{ isPinned: false } };\n }\n this.setState(newState);\n }\n\n /** @internal */\n public static getInstructionImage(\n instruction: ToolAssistanceInstruction\n ): React.ReactNode {\n let image: React.ReactNode;\n\n if (\n (typeof instruction.image === \"string\" ||\n instruction.image !== ToolAssistanceImage.Keyboard) &&\n instruction.keyboardInfo\n ) {\n if (\n instruction.keyboardInfo.keys.length === 1 &&\n !instruction.keyboardInfo.bottomKeys\n ) {\n const key = instruction.keyboardInfo.keys[0];\n const rightImage =\n typeof instruction.image === \"string\" ? (\n <div className=\"uifw-toolassistance-icon-medium\">\n {/* eslint-disable-next-line @typescript-eslint/no-deprecated */}\n <Icon iconSpec={instruction.image} />\n </div>\n ) : (\n this.getInstructionSvgImage(instruction, true)\n );\n\n image = (\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n <FillCentered>\n {ToolAssistanceField.getKeyNode(\n key,\n 0,\n \"uifw-toolassistance-key-modifier\"\n )}\n {rightImage}\n </FillCentered>\n );\n } else {\n Logger.logError(\n UiFramework.loggerCategory(\"ToolAssistanceField\"),\n `getInstructionImage: Invalid keyboardInfo provided with image`\n );\n }\n } else if (typeof instruction.image === \"string\") {\n if (instruction.image.length > 0) {\n const svgSource = getWebComponentSource(instruction.image);\n const className =\n svgSource !== undefined\n ? \"uifw-toolassistance-svg\"\n : \"uifw-toolassistance-icon-large\";\n image = (\n <div className={className}>\n {/* eslint-disable-next-line @typescript-eslint/no-deprecated */}\n <Icon iconSpec={svgSource ?? instruction.image} />\n </div>\n );\n }\n } else if (instruction.image === ToolAssistanceImage.Keyboard) {\n if (instruction.keyboardInfo) {\n image = ToolAssistanceField.getInstructionKeyboardImage(\n instruction.keyboardInfo\n );\n } else {\n Logger.logError(\n UiFramework.loggerCategory(\"ToolAssistanceField\"),\n `getInstructionImage: ToolAssistanceImage.Keyboard specified but no keyboardInfo provided`\n );\n }\n } else {\n image = this.getInstructionSvgImage(instruction, false);\n }\n\n return image;\n }\n\n private static getInstructionSvgImage(\n instruction: ToolAssistanceInstruction,\n mediumSize: boolean\n ): React.ReactNode {\n let image: React.ReactNode;\n let className = mediumSize\n ? \"uifw-toolassistance-svg-medium\"\n : \"uifw-toolassistance-svg\";\n\n if (\n typeof instruction.image !== \"string\" &&\n instruction.image !== ToolAssistanceImage.Keyboard\n ) {\n const toolAssistanceImage: ToolAssistanceImage = instruction.image;\n let svgImage = \"\";\n\n switch (toolAssistanceImage) {\n case ToolAssistanceImage.AcceptPoint:\n svgImage = acceptPointIcon;\n break;\n case ToolAssistanceImage.CursorClick:\n svgImage = cursorClickIcon;\n break;\n case ToolAssistanceImage.LeftClick:\n svgImage = clickLeftIcon;\n break;\n case ToolAssistanceImage.RightClick:\n svgImage = clickRightIcon;\n break;\n case ToolAssistanceImage.MouseWheel:\n svgImage = mouseWheelClickIcon;\n break;\n case ToolAssistanceImage.LeftClickDrag:\n svgImage = clickLeftDragIcon;\n className = mediumSize\n ? \"uifw-toolassistance-svg-medium-wide\"\n : \"uifw-toolassistance-svg-wide\";\n break;\n case ToolAssistanceImage.RightClickDrag:\n svgImage = clickRightDragIcon;\n className = mediumSize\n ? \"uifw-toolassistance-svg-medium-wide\"\n : \"uifw-toolassistance-svg-wide\";\n break;\n case ToolAssistanceImage.MouseWheelClickDrag:\n svgImage = clickMouseWheelDragIcon;\n className = mediumSize\n ? \"uifw-toolassistance-svg-medium-wide\"\n : \"uifw-toolassistance-svg-wide\";\n break;\n case ToolAssistanceImage.OneTouchTap:\n svgImage = oneTouchTapIcon;\n break;\n case ToolAssistanceImage.OneTouchDoubleTap:\n svgImage = oneTouchDoubleTapIcon;\n break;\n case ToolAssistanceImage.OneTouchDrag:\n svgImage = oneTouchDragIcon;\n break;\n case ToolAssistanceImage.TwoTouchTap:\n svgImage = twoTouchTapIcon;\n break;\n case ToolAssistanceImage.TwoTouchDrag:\n svgImage = twoTouchDragIcon;\n break;\n case ToolAssistanceImage.TwoTouchPinch:\n svgImage = twoTouchPinchIcon;\n break;\n case ToolAssistanceImage.TouchCursorTap:\n svgImage = touchCursorTapIcon;\n break;\n case ToolAssistanceImage.TouchCursorDrag:\n svgImage = touchCursorDragIcon;\n className = mediumSize\n ? \"uifw-toolassistance-svg-medium-wide\"\n : \"uifw-toolassistance-svg-wide\";\n break;\n }\n\n image = (\n <div className={className}>\n {/* eslint-disable-next-line @typescript-eslint/no-deprecated */}\n {svgImage && <Icon iconSpec={svgImage} />}\n </div>\n );\n }\n\n return image;\n }\n\n private static getInstructionKeyboardImage(\n keyboardInfo: ToolAssistanceKeyboardInfo\n ): React.ReactNode {\n let image: React.ReactNode;\n\n if (keyboardInfo.bottomKeys !== undefined) {\n image = (\n <div className=\"uifw-toolassistance-key-group\">\n <span className=\"row1\">\n {keyboardInfo.keys.map((key: string, index1: number) => {\n return ToolAssistanceField.getKeyNode(\n key,\n index1,\n \"uifw-toolassistance-key-small\"\n );\n })}\n </span>\n <br />\n <span className=\"row2\">\n {keyboardInfo.bottomKeys.map((key: string, index2: number) => {\n return ToolAssistanceField.getKeyNode(\n key,\n index2,\n \"uifw-toolassistance-key-small\"\n );\n })}\n </span>\n </div>\n );\n } else if (keyboardInfo.keys.length === 2) {\n image = (\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n <FillCentered>\n {keyboardInfo.keys.map((key: string, index3: number) => {\n let className = \"uifw-toolassistance-key-medium\";\n if (key.length > 1) className = \"uifw-toolassistance-key-modifier\";\n return ToolAssistanceField.getKeyNode(key, index3, className);\n })}\n </FillCentered>\n );\n } else if (keyboardInfo.keys[0]) {\n if (keyboardInfo.keys[0].length > 1)\n image = ToolAssistanceField.getKeyNode(\n keyboardInfo.keys[0],\n 0,\n \"uifw-toolassistance-key-large\"\n );\n else image = ToolAssistanceField.getKeyNode(keyboardInfo.keys[0], 0);\n } else {\n Logger.logError(\n UiFramework.loggerCategory(\"ToolAssistanceField\"),\n `ToolAssistanceImage.Keyboard specified but ToolAssistanceKeyboardInfo not valid`\n );\n }\n\n return image;\n }\n\n private static getKeyNode(\n key: string,\n index: number,\n className?: string\n ): React.ReactNode {\n return (\n <div\n key={index.toString()}\n className={classnames(\"uifw-toolassistance-key\", className)}\n >\n {/* eslint-disable-next-line @typescript-eslint/no-deprecated */}\n <FillCentered>{key}</FillCentered>\n </div>\n );\n }\n}\n\nfunction getWebComponentSource(iconSpec: string): string | undefined {\n if (iconSpec.startsWith(\"webSvg:\") && iconSpec.length > 7) {\n return iconSpec.slice(7);\n }\n\n return undefined;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ToolAssistanceField.js","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/toolassistance/ToolAssistanceField.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAO9D,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;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ACtC,0CAAsB,GAAG,oBAAoB,AAAvB,CAAwB;AAC9C,0CAAsB,GAAG,oBAAoB,AAAvB,CAAwB;AAUtC,gCAAY,GAO/B;IACF,qBAAqB,EAAE,IAAI;IAC3B,mBAAmB,EAAE,IAAI;IACzB,mBAAmB,EAAE,IAAI;IACzB,qBAAqB,EAAE,KAAK;CAC7B,AAZkC,CAYjC;AA6qBJ,SAAS,qBAAqB,CAAC,QAAgB;IAC7C,IAAI,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1D,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Notification\n */\n\nimport { Logger, ProcessDetector } from \"@itwin/core-bentley\";\nimport type {\n ToolAssistanceInstruction,\n ToolAssistanceInstructions,\n ToolAssistanceKeyboardInfo,\n ToolAssistanceSection,\n} from \"@itwin/core-frontend\";\nimport {\n IModelApp,\n ToolAssistanceImage,\n ToolAssistanceInputMethod,\n} from \"@itwin/core-frontend\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport type { ListenerType } from \"@itwin/core-react/internal\";\nimport { FillCentered, Icon, UiStateEntry } from \"@itwin/core-react\";\nimport { Button, Tabs, ToggleSwitch } from \"@itwin/itwinui-react\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { UiFramework } from \"../../UiFramework.js\";\nimport { CursorPrompt } from \"../../cursor/cursorprompt/CursorPrompt.js\";\nimport { MessageManager } from \"../../messages/MessageManager.js\";\nimport { UiStateStorageContext } from \"../../uistate/useUiStateStorage.js\";\nimport \"./ToolAssistanceField.scss\";\n\nimport { SvgClose, SvgPin } from \"@itwin/itwinui-icons-react\";\nimport { ToolAssistanceDialog } from \"../../layout/footer/tool-assistance/Dialog.js\";\nimport { ToolAssistanceInstruction as NZ_ToolAssistanceInstruction } from \"../../layout/footer/tool-assistance/Instruction.js\";\nimport { ToolAssistanceItem } from \"../../layout/footer/tool-assistance/Item.js\";\nimport { ToolAssistanceSeparator } from \"../../layout/footer/tool-assistance/Separator.js\";\nimport { StatusBarDialog } from \"../../statusbar/dialog/Dialog.js\";\nimport acceptPointIcon from \"./accept-point.svg\";\nimport cursorClickIcon from \"./cursor-click.svg\";\nimport oneTouchDragIcon from \"./gesture-one-finger-drag.svg\";\nimport oneTouchDoubleTapIcon from \"./gesture-one-finger-tap-double.svg\";\nimport oneTouchTapIcon from \"./gesture-one-finger-tap.svg\";\nimport twoTouchPinchIcon from \"./gesture-pinch.svg\";\nimport twoTouchDragIcon from \"./gesture-two-finger-drag.svg\";\nimport twoTouchTapIcon from \"./gesture-two-finger-tap.svg\";\nimport clickLeftDragIcon from \"./mouse-click-left-drag.svg\";\nimport clickLeftIcon from \"./mouse-click-left.svg\";\nimport clickRightDragIcon from \"./mouse-click-right-drag.svg\";\nimport clickRightIcon from \"./mouse-click-right.svg\";\nimport clickMouseWheelDragIcon from \"./mouse-click-wheel-drag.svg\";\nimport mouseWheelClickIcon from \"./mouse-click-wheel.svg\";\nimport touchCursorDragIcon from \"./touch-cursor-pan.svg\";\nimport touchCursorTapIcon from \"./touch-cursor-point.svg\";\nimport { StatusBarPopover } from \"../../statusbar/popup/StatusBarPopover.js\";\nimport type { UiStateStorageResult } from \"../../uistate/UiStateStorage.js\";\nimport {\n type UiStateStorage,\n UiStateStorageStatus,\n} from \"../../uistate/UiStateStorage.js\";\nimport { LocalStateStorage } from \"../../uistate/LocalStateStorage.js\";\n\n/** Properties of [[ToolAssistanceField]] component.\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface ToolAssistanceFieldProps extends CommonProps {\n /** Indicates whether to include promptAtCursor Checkbox. Defaults to `true`. */\n includePromptAtCursor: boolean;\n /** Optional parameter for persistent UI settings. Defaults to `UiStateStorageContext`. */\n uiStateStorage?: UiStateStorage;\n /** Cursor prompt timeout period. Defaults to `5000`.\n * @note Specify `Number.POSITIVE_INFINITY` to keep the cursor prompt open indefinitely.\n */\n cursorPromptTimeout: number;\n /** Fade out the cursor prompt when closed. */\n fadeOutCursorPrompt: boolean;\n /** Indicates whether to show promptAtCursor by default. Defaults to `false`. */\n defaultPromptAtCursor: boolean;\n /** When set to `true` will show prompt at cursor only when the content area is hovered. */\n promptAtContent?: boolean;\n}\n\ninterface ToolAssistanceFieldState {\n instructions: ToolAssistanceInstructions | undefined;\n toolIconSpec: string;\n showPromptAtCursor: boolean;\n includeMouseInstructions: boolean;\n includeTouchInstructions: boolean;\n showMouseTouchTabs: boolean;\n showMouseInstructions: boolean;\n showTouchInstructions: boolean;\n mouseTouchTabIndex: number;\n isPinned: boolean;\n isOpen: boolean;\n}\n\n/** Tool Assistance Field React component.\n * @public\n * @note Tool assistance field will only display 30 characters in the status bar. Any additional text will be hidden. The full text will always be shown in the opened popover.\n */\nexport class ToolAssistanceField extends React.Component<\n ToolAssistanceFieldProps,\n ToolAssistanceFieldState\n> {\n /** @internal */\n public static override contextType = UiStateStorageContext;\n /** @internal */\n public declare context: React.ContextType<typeof UiStateStorageContext>;\n\n private static _toolAssistanceKey = \"ToolAssistance\";\n private static _showPromptAtCursorKey = \"showPromptAtCursor\";\n private static _mouseTouchTabIndexKey = \"mouseTouchTabIndex\";\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n private _showPromptAtCursorSetting: UiStateEntry<boolean>;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n private _mouseTouchTabIndexSetting: UiStateEntry<number>;\n private _indicator = React.createRef<HTMLButtonElement>();\n private _cursorPrompt: CursorPrompt;\n private _isMounted = false;\n private _uiSettingsStorage: UiStateStorage;\n\n public static readonly defaultProps: Pick<\n ToolAssistanceFieldProps,\n | \"includePromptAtCursor\"\n | \"uiStateStorage\"\n | \"cursorPromptTimeout\"\n | \"fadeOutCursorPrompt\"\n | \"defaultPromptAtCursor\"\n > = {\n includePromptAtCursor: true,\n cursorPromptTimeout: 5000,\n fadeOutCursorPrompt: true,\n defaultPromptAtCursor: false,\n };\n\n constructor(p: ToolAssistanceFieldProps) {\n super(p);\n\n const mobile = ProcessDetector.isMobileBrowser;\n\n this.state = {\n instructions: undefined,\n toolIconSpec: \"\",\n showPromptAtCursor: p.defaultPromptAtCursor,\n includeMouseInstructions: !mobile,\n includeTouchInstructions: true,\n showMouseTouchTabs: false,\n showMouseInstructions: false,\n showTouchInstructions: false,\n mouseTouchTabIndex: 0,\n isPinned: false,\n isOpen: false,\n };\n\n this._uiSettingsStorage = new LocalStateStorage();\n this._cursorPrompt = new CursorPrompt();\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this._showPromptAtCursorSetting = new UiStateEntry(\n ToolAssistanceField._toolAssistanceKey,\n ToolAssistanceField._showPromptAtCursorKey,\n () => this.state.showPromptAtCursor\n );\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this._mouseTouchTabIndexSetting = new UiStateEntry(\n ToolAssistanceField._toolAssistanceKey,\n ToolAssistanceField._mouseTouchTabIndexKey,\n () => this.state.mouseTouchTabIndex\n );\n }\n\n public override async componentDidMount() {\n this._isMounted = true;\n MessageManager.onToolAssistanceChangedEvent.addListener(\n this._handleToolAssistanceChangedEvent\n );\n UiFramework.frontstages.onToolIconChangedEvent.addListener(\n this._handleToolIconChangedEvent\n );\n\n if (this.props.uiStateStorage)\n this._uiSettingsStorage = this.props.uiStateStorage;\n else if (this.context) this._uiSettingsStorage = this.context;\n\n await this.restoreSettings();\n }\n\n /** @internal */\n public override componentDidUpdate() {\n if (!this.state.showPromptAtCursor)\n this._cursorPrompt.close(this.props.fadeOutCursorPrompt);\n }\n\n public override componentWillUnmount() {\n this._isMounted = false;\n this._cursorPrompt.close(this.props.fadeOutCursorPrompt);\n MessageManager.onToolAssistanceChangedEvent.removeListener(\n this._handleToolAssistanceChangedEvent\n );\n UiFramework.frontstages.onToolIconChangedEvent.removeListener(\n this._handleToolIconChangedEvent\n );\n }\n\n private async restoreSettings() {\n let getShowPromptAtCursor: Promise<UiStateStorageResult> | undefined;\n if (this.props.includePromptAtCursor) {\n getShowPromptAtCursor = this._showPromptAtCursorSetting.getSetting(\n this._uiSettingsStorage\n );\n }\n const getMouseTouchTabIndex = this._mouseTouchTabIndexSetting.getSetting(\n this._uiSettingsStorage\n );\n const [showPromptAtCursorResult, mouseTouchTabIndexResult] =\n await Promise.all([getShowPromptAtCursor, getMouseTouchTabIndex]);\n\n if (\n showPromptAtCursorResult !== undefined &&\n showPromptAtCursorResult.status === UiStateStorageStatus.Success\n ) {\n if (this._isMounted)\n this.setState({ showPromptAtCursor: showPromptAtCursorResult.setting });\n }\n\n if (mouseTouchTabIndexResult.status === UiStateStorageStatus.Success) {\n if (this._isMounted)\n this.setState({ mouseTouchTabIndex: mouseTouchTabIndexResult.setting });\n }\n }\n\n private _handleToolAssistanceChangedEvent: ListenerType<\n typeof MessageManager.onToolAssistanceChangedEvent\n > = (args) => {\n let showMouseTouchTabs = false;\n let showMouseInstructions = false;\n let showTouchInstructions = false;\n\n if (args.instructions && args.instructions.sections) {\n const hasMouseInstructions = args.instructions.sections.some(\n (section: ToolAssistanceSection) => {\n return section.instructions.some(\n (instruction: ToolAssistanceInstruction) =>\n this._isMouseInstruction(instruction)\n );\n }\n );\n const hasTouchInstructions = args.instructions.sections.some(\n (section: ToolAssistanceSection) => {\n return section.instructions.some(\n (instruction: ToolAssistanceInstruction) =>\n this._isTouchInstruction(instruction)\n );\n }\n );\n\n if (\n this.state.includeMouseInstructions &&\n this.state.includeTouchInstructions &&\n hasMouseInstructions &&\n hasTouchInstructions\n ) {\n showMouseTouchTabs = true;\n showMouseInstructions = this.state.mouseTouchTabIndex === 0;\n showTouchInstructions = this.state.mouseTouchTabIndex === 1;\n } else {\n if (this.state.includeMouseInstructions && hasMouseInstructions)\n showMouseInstructions = true;\n else if (this.state.includeTouchInstructions && hasTouchInstructions)\n showTouchInstructions = true;\n }\n }\n\n if (this._isMounted)\n this.setState(\n {\n instructions: args.instructions,\n showMouseTouchTabs,\n showMouseInstructions,\n showTouchInstructions,\n },\n () => {\n this._showCursorPrompt();\n }\n );\n };\n\n private _isBothInstruction = (instruction: ToolAssistanceInstruction) => {\n return (\n instruction.inputMethod === undefined ||\n instruction.inputMethod === ToolAssistanceInputMethod.Both\n );\n };\n\n private _isMouseInstruction = (instruction: ToolAssistanceInstruction) =>\n instruction.inputMethod === ToolAssistanceInputMethod.Mouse;\n\n private _isTouchInstruction = (instruction: ToolAssistanceInstruction) =>\n instruction.inputMethod === ToolAssistanceInputMethod.Touch;\n\n private _handleToolIconChangedEvent: ListenerType<\n typeof UiFramework.frontstages.onToolIconChangedEvent\n > = (args) => {\n if (this._isMounted)\n this.setState(\n {\n toolIconSpec: args.iconSpec,\n },\n () => {\n this._showCursorPrompt();\n }\n );\n };\n\n private _showCursorPrompt() {\n const instruction = this.state.instructions?.mainInstruction.text;\n if (!this.state.showPromptAtCursor || !instruction) {\n this._cursorPrompt.close(this.props.fadeOutCursorPrompt);\n return;\n }\n\n this._cursorPrompt.open({\n timeout: this.props.cursorPromptTimeout,\n fadeout: this.props.fadeOutCursorPrompt,\n iconSpec: this.state.toolIconSpec,\n instruction,\n promptAtContent: this.props.promptAtContent ?? false,\n });\n }\n\n private _sectionHasDisplayableInstructions(\n section: ToolAssistanceSection\n ): boolean {\n const displayableInstructions = this._getDisplayableInstructions(section);\n return displayableInstructions.length > 0;\n }\n\n private _getDisplayableInstructions(\n section: ToolAssistanceSection\n ): ToolAssistanceInstruction[] {\n const displayableInstructions = section.instructions.filter(\n (instruction: ToolAssistanceInstruction) => {\n return (\n this._isBothInstruction(instruction) ||\n (this.state.showMouseInstructions &&\n this._isMouseInstruction(instruction)) ||\n (this.state.showTouchInstructions &&\n this._isTouchInstruction(instruction))\n );\n }\n );\n return displayableInstructions;\n }\n\n private _handleMouseTouchTab = async (index: number) => {\n const showMouseInstructions = index === 0;\n const showTouchInstructions = index === 1;\n\n if (this._isMounted)\n this.setState(\n {\n mouseTouchTabIndex: index,\n showMouseInstructions,\n showTouchInstructions,\n },\n async () => {\n await this._mouseTouchTabIndexSetting.saveSetting(\n this._uiSettingsStorage\n );\n }\n );\n };\n\n public override render(): React.ReactNode {\n const { instructions } = this.state;\n const dialogTitle = IModelApp.toolAdmin.activeTool\n ? IModelApp.toolAdmin.activeTool.flyover\n : UiFramework.translate(\"toolAssistance.title\");\n const mouseLabel = UiFramework.translate(\"toolAssistance.mouse\");\n const touchLabel = UiFramework.translate(\"toolAssistance.touch\");\n let prompt = \"\";\n let tooltip = \"\";\n let toolIcon: React.ReactNode;\n let dialogContent: React.ReactNode;\n\n if (instructions) {\n prompt = instructions.mainInstruction.text;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n toolIcon = <Icon iconSpec={this.state.toolIconSpec} />;\n\n let displayableSections: ToolAssistanceSection[] | undefined;\n if (instructions.sections) {\n displayableSections = instructions.sections.filter(\n (section: ToolAssistanceSection) =>\n this._sectionHasDisplayableInstructions(section)\n );\n }\n\n dialogContent = (\n <div>\n {this.state.showMouseTouchTabs && (\n <Tabs.Wrapper\n type=\"pill\"\n value={String(this.state.mouseTouchTabIndex)}\n >\n <Tabs.TabList className=\"uifw-toolAssistance-tabs\">\n {[mouseLabel, touchLabel].map((label, index) => (\n <Tabs.Tab\n key={index}\n className=\"uifw-tab\"\n value={String(index)}\n label={label}\n onClick={async () => this._handleMouseTouchTab(index)}\n />\n ))}\n </Tabs.TabList>\n </Tabs.Wrapper>\n )}\n\n <div className=\"uifw-toolAssistance-content\">\n <NZ_ToolAssistanceInstruction\n key=\"main\"\n image={ToolAssistanceField.getInstructionImage(\n instructions.mainInstruction\n )}\n text={instructions.mainInstruction.text}\n isNew={instructions.mainInstruction.isNew}\n />\n\n {displayableSections &&\n displayableSections.map(\n (section: ToolAssistanceSection, index1: number) => {\n return (\n <React.Fragment key={index1.toString()}>\n <ToolAssistanceSeparator key={index1.toString()}>\n {section.label}\n </ToolAssistanceSeparator>\n {this._getDisplayableInstructions(section).map(\n (\n instruction: ToolAssistanceInstruction,\n index2: number\n ) => {\n return (\n <NZ_ToolAssistanceInstruction\n key={`${index1.toString()}-${index2.toString()}`}\n image={ToolAssistanceField.getInstructionImage(\n instruction\n )}\n text={instruction.text}\n isNew={instruction.isNew}\n />\n );\n }\n )}\n </React.Fragment>\n );\n }\n )}\n\n {this.props.includePromptAtCursor && (\n <>\n <ToolAssistanceSeparator key=\"prompt-sep\" />\n <ToolAssistanceItem key=\"prompt-item\">\n <ToggleSwitch\n label={UiFramework.translate(\n \"toolAssistance.promptAtCursor\"\n )}\n labelPosition=\"right\"\n checked={this.state.showPromptAtCursor}\n onChange={this._onPromptAtCursorChange}\n />\n </ToolAssistanceItem>\n </>\n )}\n </div>\n </div>\n );\n }\n\n if (prompt) tooltip = prompt;\n\n if (IModelApp.toolAdmin.activeTool)\n tooltip = `${IModelApp.toolAdmin.activeTool.flyover} > ${tooltip} `;\n\n if (tooltip) {\n const lineBreak = \"\\u000d\\u000a\";\n tooltip = tooltip + lineBreak;\n }\n\n tooltip += UiFramework.translate(\"toolAssistance.moreInfo\");\n\n return (\n <StatusBarPopover\n visible={this.state.isOpen}\n onVisibleChange={(visible) => {\n this.setIsOpen(visible);\n }}\n closeOnOutsideClick={!this.state.isPinned}\n content={\n <ToolAssistanceDialog\n buttons={\n <>\n {!this.state.isPinned && (\n <StatusBarDialog.TitleBarButton\n onClick={this._handlePinButtonClick}\n title={UiFramework.translate(\"toolAssistance.pin\")}\n >\n <SvgPin />\n </StatusBarDialog.TitleBarButton>\n )}\n {this.state.isPinned && (\n <StatusBarDialog.TitleBarButton\n onClick={this._handleCloseButtonClick}\n title={UiFramework.translate(\"dialog.close\")}\n >\n <SvgClose />\n </StatusBarDialog.TitleBarButton>\n )}\n </>\n }\n title={dialogTitle}\n >\n {dialogContent}\n </ToolAssistanceDialog>\n }\n >\n <Button\n styleType=\"borderless\"\n startIcon={<>{toolIcon}</>}\n className={classnames(\n \"uifw-statusFields-toolAssistance-toolAssistanceField\",\n this.props.className\n )}\n title={tooltip}\n style={this.props.style}\n ref={this._indicator}\n labelProps={{ className: \"prompt\" }}\n >\n {prompt}\n <StatusBarPopover.ExpandIndicator />\n </Button>\n </StatusBarPopover>\n );\n }\n\n private _onPromptAtCursorChange = async (\n e: React.ChangeEvent<HTMLInputElement>\n ) => {\n if (this._isMounted)\n this.setState(\n {\n showPromptAtCursor: e.target.checked,\n },\n async () => {\n await this._showPromptAtCursorSetting.saveSetting(\n this._uiSettingsStorage\n );\n }\n );\n };\n\n private _handlePinButtonClick = () => {\n if (this._isMounted) this.setState({ isPinned: true });\n };\n\n private _handleCloseButtonClick = () => {\n this.setIsOpen(false);\n };\n\n private setIsOpen(isOpen: boolean) {\n let newState = {\n isOpen,\n };\n if (!isOpen && this.state.isPinned && this._isMounted) {\n newState = { ...newState, ...{ isPinned: false } };\n }\n this.setState(newState);\n }\n\n /** @internal */\n public static getInstructionImage(\n instruction: ToolAssistanceInstruction\n ): React.ReactNode {\n let image: React.ReactNode;\n\n if (\n (typeof instruction.image === \"string\" ||\n instruction.image !== ToolAssistanceImage.Keyboard) &&\n instruction.keyboardInfo\n ) {\n if (\n instruction.keyboardInfo.keys.length === 1 &&\n !instruction.keyboardInfo.bottomKeys\n ) {\n const key = instruction.keyboardInfo.keys[0];\n const rightImage =\n typeof instruction.image === \"string\" ? (\n <div className=\"uifw-toolassistance-icon-medium\">\n {/* eslint-disable-next-line @typescript-eslint/no-deprecated */}\n <Icon iconSpec={instruction.image} />\n </div>\n ) : (\n this.getInstructionSvgImage(instruction, true)\n );\n\n image = (\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n <FillCentered>\n {ToolAssistanceField.getKeyNode(\n key,\n 0,\n \"uifw-toolassistance-key-modifier\"\n )}\n {rightImage}\n </FillCentered>\n );\n } else {\n Logger.logError(\n UiFramework.loggerCategory(\"ToolAssistanceField\"),\n `getInstructionImage: Invalid keyboardInfo provided with image`\n );\n }\n } else if (typeof instruction.image === \"string\") {\n if (instruction.image.length > 0) {\n const svgSource = getWebComponentSource(instruction.image);\n const className =\n svgSource !== undefined\n ? \"uifw-toolassistance-svg\"\n : \"uifw-toolassistance-icon-large\";\n image = (\n <div className={className}>\n {/* eslint-disable-next-line @typescript-eslint/no-deprecated */}\n <Icon iconSpec={svgSource ?? instruction.image} />\n </div>\n );\n }\n } else if (instruction.image === ToolAssistanceImage.Keyboard) {\n if (instruction.keyboardInfo) {\n image = ToolAssistanceField.getInstructionKeyboardImage(\n instruction.keyboardInfo\n );\n } else {\n Logger.logError(\n UiFramework.loggerCategory(\"ToolAssistanceField\"),\n `getInstructionImage: ToolAssistanceImage.Keyboard specified but no keyboardInfo provided`\n );\n }\n } else {\n image = this.getInstructionSvgImage(instruction, false);\n }\n\n return image;\n }\n\n private static getInstructionSvgImage(\n instruction: ToolAssistanceInstruction,\n mediumSize: boolean\n ): React.ReactNode {\n let image: React.ReactNode;\n let className = mediumSize\n ? \"uifw-toolassistance-svg-medium\"\n : \"uifw-toolassistance-svg\";\n\n if (\n typeof instruction.image !== \"string\" &&\n instruction.image !== ToolAssistanceImage.Keyboard\n ) {\n const toolAssistanceImage: ToolAssistanceImage = instruction.image;\n let svgImage = \"\";\n\n switch (toolAssistanceImage) {\n case ToolAssistanceImage.AcceptPoint:\n svgImage = acceptPointIcon;\n break;\n case ToolAssistanceImage.CursorClick:\n svgImage = cursorClickIcon;\n break;\n case ToolAssistanceImage.LeftClick:\n svgImage = clickLeftIcon;\n break;\n case ToolAssistanceImage.RightClick:\n svgImage = clickRightIcon;\n break;\n case ToolAssistanceImage.MouseWheel:\n svgImage = mouseWheelClickIcon;\n break;\n case ToolAssistanceImage.LeftClickDrag:\n svgImage = clickLeftDragIcon;\n className = mediumSize\n ? \"uifw-toolassistance-svg-medium-wide\"\n : \"uifw-toolassistance-svg-wide\";\n break;\n case ToolAssistanceImage.RightClickDrag:\n svgImage = clickRightDragIcon;\n className = mediumSize\n ? \"uifw-toolassistance-svg-medium-wide\"\n : \"uifw-toolassistance-svg-wide\";\n break;\n case ToolAssistanceImage.MouseWheelClickDrag:\n svgImage = clickMouseWheelDragIcon;\n className = mediumSize\n ? \"uifw-toolassistance-svg-medium-wide\"\n : \"uifw-toolassistance-svg-wide\";\n break;\n case ToolAssistanceImage.OneTouchTap:\n svgImage = oneTouchTapIcon;\n break;\n case ToolAssistanceImage.OneTouchDoubleTap:\n svgImage = oneTouchDoubleTapIcon;\n break;\n case ToolAssistanceImage.OneTouchDrag:\n svgImage = oneTouchDragIcon;\n break;\n case ToolAssistanceImage.TwoTouchTap:\n svgImage = twoTouchTapIcon;\n break;\n case ToolAssistanceImage.TwoTouchDrag:\n svgImage = twoTouchDragIcon;\n break;\n case ToolAssistanceImage.TwoTouchPinch:\n svgImage = twoTouchPinchIcon;\n break;\n case ToolAssistanceImage.TouchCursorTap:\n svgImage = touchCursorTapIcon;\n break;\n case ToolAssistanceImage.TouchCursorDrag:\n svgImage = touchCursorDragIcon;\n className = mediumSize\n ? \"uifw-toolassistance-svg-medium-wide\"\n : \"uifw-toolassistance-svg-wide\";\n break;\n }\n\n image = (\n <div className={className}>\n {/* eslint-disable-next-line @typescript-eslint/no-deprecated */}\n {svgImage && <Icon iconSpec={svgImage} />}\n </div>\n );\n }\n\n return image;\n }\n\n private static getInstructionKeyboardImage(\n keyboardInfo: ToolAssistanceKeyboardInfo\n ): React.ReactNode {\n let image: React.ReactNode;\n\n if (keyboardInfo.bottomKeys !== undefined) {\n image = (\n <div className=\"uifw-toolassistance-key-group\">\n <span className=\"row1\">\n {keyboardInfo.keys.map((key: string, index1: number) => {\n return ToolAssistanceField.getKeyNode(\n key,\n index1,\n \"uifw-toolassistance-key-small\"\n );\n })}\n </span>\n <br />\n <span className=\"row2\">\n {keyboardInfo.bottomKeys.map((key: string, index2: number) => {\n return ToolAssistanceField.getKeyNode(\n key,\n index2,\n \"uifw-toolassistance-key-small\"\n );\n })}\n </span>\n </div>\n );\n } else if (keyboardInfo.keys.length === 2) {\n image = (\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n <FillCentered>\n {keyboardInfo.keys.map((key: string, index3: number) => {\n let className = \"uifw-toolassistance-key-medium\";\n if (key.length > 1) className = \"uifw-toolassistance-key-modifier\";\n return ToolAssistanceField.getKeyNode(key, index3, className);\n })}\n </FillCentered>\n );\n } else if (keyboardInfo.keys[0]) {\n if (keyboardInfo.keys[0].length > 1)\n image = ToolAssistanceField.getKeyNode(\n keyboardInfo.keys[0],\n 0,\n \"uifw-toolassistance-key-large\"\n );\n else image = ToolAssistanceField.getKeyNode(keyboardInfo.keys[0], 0);\n } else {\n Logger.logError(\n UiFramework.loggerCategory(\"ToolAssistanceField\"),\n `ToolAssistanceImage.Keyboard specified but ToolAssistanceKeyboardInfo not valid`\n );\n }\n\n return image;\n }\n\n private static getKeyNode(\n key: string,\n index: number,\n className?: string\n ): React.ReactNode {\n return (\n <div\n key={index.toString()}\n className={classnames(\"uifw-toolassistance-key\", className)}\n >\n {/* eslint-disable-next-line @typescript-eslint/no-deprecated */}\n <FillCentered>{key}</FillCentered>\n </div>\n );\n }\n}\n\nfunction getWebComponentSource(iconSpec: string): string | undefined {\n if (iconSpec.startsWith(\"webSvg:\") && iconSpec.length > 7) {\n return iconSpec.slice(7);\n }\n\n return undefined;\n}\n"]}
|
|
@@ -11,7 +11,7 @@ interface ThemeManagerProps {
|
|
|
11
11
|
}
|
|
12
12
|
/** `ThemeManager` handles setting color themes. Note that this component will
|
|
13
13
|
* affect the entire application by setting the internal `data-theme` attribute.
|
|
14
|
-
* Component children are wrapped with
|
|
14
|
+
* Component children are wrapped with iTwinUI `ThemeProvider` component, so all nodes within the tree will have the same theme.
|
|
15
15
|
* Specified `ThemeId` will be mapped to iTwinUI `theme` accordingly.
|
|
16
16
|
* Any other string will only apply the `data-theme` attribute to the underlying `html` element
|
|
17
17
|
* and `ThemeProvider` theme will be set to `inherit`, in this case the application is
|
|
@@ -26,7 +26,7 @@ const highContrastColorThemes = [
|
|
|
26
26
|
];
|
|
27
27
|
/** `ThemeManager` handles setting color themes. Note that this component will
|
|
28
28
|
* affect the entire application by setting the internal `data-theme` attribute.
|
|
29
|
-
* Component children are wrapped with
|
|
29
|
+
* Component children are wrapped with iTwinUI `ThemeProvider` component, so all nodes within the tree will have the same theme.
|
|
30
30
|
* Specified `ThemeId` will be mapped to iTwinUI `theme` accordingly.
|
|
31
31
|
* Any other string will only apply the `data-theme` attribute to the underlying `html` element
|
|
32
32
|
* and `ThemeProvider` theme will be set to `inherit`, in this case the application is
|